:root {
  --bg: #f5f8f8;
  --card: #ffffff;
  --panel: #f8fafc;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-soft: #f1f5f9;
  --primary: #2cc4f6;
  --primary-dark: #0aa7dc;
  --primary-soft: rgba(44, 196, 246, 0.12);
  --success: #16a34a;
  --success-soft: #f0fdf4;
  --success-line: #9ae6b4;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --danger-line: #fecaca;
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

body.app-loading .page {
  opacity: 0;
  pointer-events: none;
}

body.modal-open {
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
}

.page {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 16px;
  display: grid;
  gap: 16px;
  /* В iframe Bitrix24 нельзя завязывать высоту на 100vh:
     вместе с BX24.fitWindow() это может запускать цикл,
     когда каждый пересчет увеличивает контейнер еще сильнее. */
  min-height: 100%;
}

.shell {
  width: 100%;
  min-height: 0;
}

.card-compact {
  max-width: 600px;
  margin: 0 auto;
}

.card-wide {
  max-width: min(1680px, calc(100vw - 32px));
  margin: 0 auto;
}

.card {
  width: 100%;
  min-height: 0;
  background: var(--card);
  border-radius: 18px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  overflow: hidden;
}

.hero,
.manager-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
}

.hero {
  justify-content: flex-start;
  align-items: flex-start;
  padding: 24px;
}

.hero-title {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.hero-icon,
.button-icon,
.icon-button,
.edit-icon,
.tree-icon,
.file-icon,
.table-action,
.message-icon,
.message-link-icon,
.message-close {
  font-family: "Material Symbols Outlined", sans-serif;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
}

.hero-icon {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 28px;
  flex-shrink: 0;
}

.manager-title {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  min-width: 0;
}

.manager-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 20px;
  line-height: 1.2;
}

h2 {
  font-size: 20px;
  line-height: 1.25;
}

.subtle {
  margin-top: 2px;
  color: var(--muted);
  line-height: 1.35;
  font-size: 13px;
}

.button {
  border: none;
  border-radius: 12px;
  padding: 12px 18px;
  color: white;
  cursor: pointer;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.button-primary {
  background: var(--primary);
}

.button-secondary {
  background: #e2f7ff;
  color: var(--primary-dark);
}

.button-secondary:hover {
  background: #c8f0fe;
}

.button-link {
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  padding: 8px 10px;
  min-height: 40px;
  font-weight: 600;
}

.button-attach {
  box-shadow: none;
  background: #ffffff;
  border: 1px solid #d7dee8;
  color: #64748b;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  padding: 10px 18px;
  gap: 10px;
}

.button-attach .button-icon {
  font-size: 18px;
}

.button-attach:hover {
  background: #f8fafc;
  color: #475569;
  border-color: #cbd5e1;
}

.button-link:hover {
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.button-primary:hover {
  background: var(--primary-dark);
}

.button-large {
  width: 100%;
  min-height: 48px;
  font-size: 14px;
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(44, 196, 246, 0.2);
}

.button-header-action {
  min-height: 36px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 600;
}

.button:disabled,
.icon-button:disabled,
.inline-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.card-content {
  display: grid;
  gap: 24px;
  padding: 24px;
}

.card-content-compact {
  gap: 24px;
}

.message-host {
  min-height: 0;
}

.manager-message-host {
  padding: 24px 24px 0;
}

.details {
  padding: 20px;
  background: var(--panel);
  border-radius: 16px;
  border: 1px solid var(--line-soft);
}

.row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 16px;
  align-items: center;
}

.row + .row {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
}

.row-label {
  color: var(--muted);
  font-size: 14px;
}

.row-label.top {
  align-self: start;
  padding-top: 2px;
}

.row-value {
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.inline-field {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.inline-button {
  padding: 0;
  border: none;
  background: transparent;
  display: inline-flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
  cursor: pointer;
  color: var(--text);
  width: 100%;
  text-align: left;
}

.inline-button .row-value {
  white-space: normal;
  line-height: 1.3;
}

.inline-input,
.search-input,
.select-input {
  width: 100%;
  border: 1px solid var(--line);
  background: white;
  padding: 12px 14px;
  border-radius: 12px;
  outline: none;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
}

.inline-input {
  background: transparent;
  border: none;
  padding: 0;
  font-weight: 600;
}

.edit-icon,
.icon-button,
.table-action,
.message-close {
  color: #94a3b8;
  font-size: 18px;
}

.icon-button {
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 4px;
}

.icon-button-round {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}

.icon-button-round:hover,
.icon-button:hover,
.table-action:hover {
  background: #f1f5f9;
  color: var(--primary-dark);
}

.tree {
  display: grid;
  gap: 8px;
}

.tree-node {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #475569;
  font-size: 14px;
}

.tree-node-child {
  padding-left: 18px;
}

.tree-node-leaf {
  padding-left: 36px;
  color: var(--primary-dark);
  font-weight: 700;
}

.tree-node-direct-child {
  padding-left: 18px;
}

.tree-icon {
  font-size: 20px;
}

.tree-arrow {
  color: #cbd5e1;
}

.card-footer,
.manager-footer {
  padding: 0;
  display: flex;
  justify-content: center;
}

.manager-footer {
  justify-content: center;
  padding: 24px 24px 28px;
  background: var(--panel);
  border-top: 1px solid var(--line-soft);
}

.create-actions,
.manager-upload-actions {
  display: grid;
  gap: 16px;
  width: 100%;
  justify-items: center;
}

.create-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  justify-content: center;
}

.manager-upload-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  width: 100%;
  max-width: 760px;
  justify-content: center;
  margin: 0 auto;
}

.create-actions .button {
  min-height: 48px;
}

.manager-upload-actions .button {
  min-height: 48px;
  flex: 1 1 280px;
  width: 100%;
  min-width: min(280px, 100%);
  max-width: 340px;
  padding-inline: 32px;
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(44, 196, 246, 0.18);
}

.manager-upload-actions .button-secondary {
  box-shadow: none;
}

.table-panel {
  padding: 24px;
}

.table-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.muted-badge {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-height: 24px;
}

.breadcrumb {
  border: none;
  background: transparent;
  color: var(--primary-dark);
  border-radius: 0;
  padding: 0;
  cursor: pointer;
  font-size: 15px;
}

.breadcrumb:hover,
.breadcrumb:focus-visible {
  background: transparent;
  color: var(--primary);
}

.breadcrumb-current {
  color: var(--text);
  font-weight: 500;
  cursor: default;
}

.breadcrumb-separator {
  color: #94a3b8;
  font-size: 18px;
}

.table-wrap {
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  overflow: hidden;
  background: white;
}

.file-table {
  width: 100%;
  border-collapse: collapse;
}

.file-table thead {
  background: var(--panel);
}

.file-table th,
.file-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line-soft);
}

.file-table th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.file-table tr:last-child td {
  border-bottom: none;
}

.file-row:hover {
  background: var(--panel);
}

.file-open-button {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
}

.file-open-button:hover {
  color: var(--primary-dark);
}

.file-icon {
  font-size: 20px;
  color: var(--primary);
}

.file-icon.file-pdf {
  color: #ef4444;
}

.file-icon.file-cad {
  color: #3b82f6;
}

.file-icon.file-zip {
  color: #f59e0b;
}

.table-action {
  border: none;
  background: transparent;
  border-radius: 10px;
  padding: 6px;
  cursor: pointer;
}

.align-right {
  text-align: right;
}

.message {
  width: 100%;
  margin: 0;
  border-radius: 12px;
  border: 1px solid #bbf7d0;
  background: #f2f9f2;
  color: #166534;
  box-shadow: none;
}

.message-error {
  border-color: var(--danger-line);
  background: var(--danger-soft);
  color: #991b1b;
  box-shadow: 0 10px 24px rgba(153, 27, 27, 0.08);
}

.message-content {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
}

.message-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--success);
  line-height: 1;
  margin-top: 1px;
}

.message-error .message-icon {
  color: var(--danger);
}

.message-copy {
  display: grid;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
}

.message-text {
  font-size: 13px;
  line-height: 1.3;
  font-weight: 600;
}

.message-link {
  border: none;
  background: transparent;
  color: inherit;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.message-link-icon {
  font-family: "Material Symbols Outlined", sans-serif;
  font-size: 18px;
}

.message-close {
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  color: inherit;
  font-size: 18px;
  line-height: 1;
  align-self: center;
}

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 30;
}

#attachFolderModal {
  align-items: flex-start;
  overflow-y: auto;
  padding: 12px 16px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
}

.modal-card {
  position: relative;
  width: min(560px, calc(100vw - 32px));
  background: white;
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 20px;
  z-index: 1;
}

.modal-card-narrow {
  width: min(420px, calc(100vw - 32px));
}

#attachFolderModal .modal-card-narrow {
  width: min(860px, calc(100vw - 32px));
  height: calc(100vh - 24px);
  max-height: calc(100vh - 24px);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr) auto;
  margin: 0 auto;
}

.modal-card-actions {
  width: min(760px, calc(100vw - 32px));
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 16px;
}

.modal-header h2 {
  min-width: 0;
  flex: 1 1 auto;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.2;
}

.modal-header .icon-button {
  flex: 0 0 auto;
}

.company-results {
  margin-top: 12px;
  display: grid;
  gap: 8px;
  max-height: 320px;
  overflow: auto;
}

.company-item {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  text-align: left;
  cursor: pointer;
}

.company-item:hover {
  border-color: var(--primary);
  background: #f0fbff;
}

.action-list {
  display: grid;
  gap: 8px;
}

.action-button {
  border: 1px solid var(--line);
  background: white;
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  text-align: left;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.action-button span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.action-button:hover {
  background: var(--panel);
  border-color: #cbd5e1;
}

.action-icon,
.button-loader {
  font-family: "Material Symbols Outlined", sans-serif;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
}

.action-button-danger {
  color: var(--danger);
}

.button-loader {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: white;
  border-radius: 999px;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

.modal-subtle {
  margin-bottom: 16px;
}

#attachFolderModal .modal-subtle {
  max-width: 760px;
}

#attachFolderModal .search-input {
  width: 100%;
}

.available-folders {
  min-height: 0;
  max-height: none;
  overflow: auto;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  margin: 12px 0;
  background: white;
}

.attach-folder-breadcrumbs {
  margin-top: 14px;
  margin-bottom: 12px;
  flex: 0 0 auto;
}

#attachFolderModal .modal-footer {
  margin-top: 0;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
  background: white;
}

.folder-tree {
  display: grid;
  gap: 2px;
  padding: 10px;
}

.folder-tree-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 2px 6px;
}

.folder-tree-row-selected {
  background: #effaff;
  border-radius: 12px;
}

.folder-tree-toggle {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  flex: 0 0 28px;
}

.folder-tree-toggle:hover,
.folder-tree-toggle:focus-visible {
  background: #f1f5f9;
  color: var(--primary-dark);
}

.folder-tree-toggle-hidden {
  visibility: hidden;
  pointer-events: none;
}

.folder-tree-select {
  width: 100%;
  min-width: 0;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: var(--text);
  border-radius: 12px;
  padding: 12px 14px;
}

.folder-tree-select:hover,
.folder-tree-select:focus-visible {
  background: var(--panel);
  color: var(--primary-dark);
}

.folder-tree-row-selected .folder-tree-select {
  color: var(--primary-dark);
}

.folder-tree-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  width: 100%;
  overflow: hidden;
}

.folder-tree-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.folder-tree-meta {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.folder-tree-children {
  display: grid;
  gap: 2px;
}

.folder-tree-empty,
.folder-tree-loading,
.folder-tree-error {
  padding: 14px 16px 14px 52px;
  color: var(--muted);
  font-size: 13px;
}

.folder-tree-error {
  color: #991b1b;
}

.upload-queue {
  display: grid;
  gap: 12px;
}

.upload-row {
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 14px;
  background: var(--panel);
}

.upload-row-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.upload-name {
  font-weight: 600;
  color: var(--text);
  word-break: break-word;
}

.upload-status {
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.upload-bar {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: white;
  overflow: hidden;
  border: 1px solid var(--line);
}

.upload-bar-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  transition: width 0.2s ease;
}

.empty-state {
  padding: 36px;
  text-align: center;
  color: var(--muted);
}

.manage-content {
  gap: 20px;
}

.manage-summary .row-value {
  font-weight: 500;
}

.manage-panel {
  padding-top: 0;
}

.manage-table-header {
  margin-bottom: 18px;
}

.manage-folder-list {
  display: grid;
  gap: 14px;
}

.manage-folder-card {
  display: grid;
  gap: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
}

.manage-folder-main {
  display: grid;
  gap: 10px;
}

.manage-folder-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.manage-folder-heading h3 {
  font-size: 18px;
  line-height: 1.25;
}

.manage-folder-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.manage-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.manage-badge-outline {
  border: 1px solid var(--line);
  color: #475569;
  background: #fff;
}

.manage-source-company {
  background: #e8fbff;
  color: #0284c7;
}

.manage-source-deal {
  background: #ecfdf3;
  color: #15803d;
}

.manage-source-unassigned {
  background: #fff7ed;
  color: #c2410c;
}

.manage-folder-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
}

.manage-folder-meta a {
  color: var(--primary-dark);
  font-weight: 600;
  text-decoration: none;
}

.manage-folder-meta a:hover {
  text-decoration: underline;
}

.manage-folder-form {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr auto;
  gap: 12px;
  align-items: end;
}

.manage-field {
  display: grid;
  gap: 6px;
}

.manage-company-id-field.is-hidden {
  display: none;
}

.manage-attach-button {
  min-height: 48px;
  white-space: nowrap;
}

.manage-empty-state {
  border: 1px dashed var(--line);
  border-radius: 16px;
  background: var(--panel);
}

.install-log {
  border-radius: 14px;
  border: 1px dashed var(--line);
  padding: 16px;
  background: rgba(255, 255, 255, 0.55);
}

.install-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.install-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.92) 0 2px, transparent 3px),
    radial-gradient(circle at 28% 42%, rgba(255, 255, 255, 0.65) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 54% 14%, rgba(255, 255, 255, 0.8) 0 2px, transparent 3px),
    radial-gradient(circle at 82% 24%, rgba(255, 255, 255, 0.88) 0 2px, transparent 3px),
    radial-gradient(circle at 92% 8%, rgba(255, 255, 255, 0.72) 0 1.5px, transparent 2.5px),
    linear-gradient(180deg, #08189f 0%, #0d25b9 28%, #eef6fb 28%, var(--bg) 100%);
  background-attachment: fixed;
}

.install-page {
  min-height: 100vh;
  padding: 22px 24px 40px;
  display: grid;
  gap: 18px;
}

.install-banner {
  min-height: 72px;
  display: flex;
  align-items: flex-start;
  padding: 2px 8px 0;
}

.install-banner-copy {
  display: grid;
  gap: 4px;
}

.install-brand {
  color: white;
  font-size: 34px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.install-banner-subtitle {
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  line-height: 1.35;
}

.install-shell {
  width: min(1280px, 100%);
  margin: 0 auto;
}

.install-card {
  border-radius: 28px;
  overflow: hidden;
  border-color: rgba(226, 232, 240, 0.92);
  box-shadow: 0 24px 56px rgba(15, 23, 42, 0.12);
}

.install-hero {
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 30px 24px;
}

.install-hero .hero-title {
  flex: 1 1 auto;
  align-items: center;
}

.install-hero .hero-icon {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  background: #dff6fe;
  color: var(--primary);
  font-size: 32px;
}

.install-eyebrow,
.install-log-eyebrow {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}

.install-hero h1 {
  font-size: 26px;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.install-hero-subtle {
  max-width: 760px;
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.45;
}

.install-badge {
  min-width: 190px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(44, 196, 246, 0.1), rgba(255, 255, 255, 0.96));
  display: grid;
  gap: 4px;
  align-self: stretch;
}

.install-badge-title {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.install-badge-value {
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
}

.install-content {
  gap: 18px;
  padding: 0 28px 28px;
}

.install-summary {
  padding: 22px 24px;
  border-radius: 20px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.95), rgba(255, 255, 255, 0.9));
}

.install-summary .row {
  grid-template-columns: 176px 1fr;
}

.install-actions-card,
.install-log-card {
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 22px;
  background: white;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.04);
}

.install-actions-card {
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.install-actions-copy {
  display: grid;
  gap: 8px;
  max-width: 660px;
}

.install-actions-copy h2,
.install-log-header h2 {
  font-size: 18px;
  line-height: 1.2;
}

.install-close-button,
.install-bind-button {
  min-height: 50px;
  padding-inline: 22px;
  border-radius: 14px;
  font-size: 15px;
}

.install-bind-button {
  box-shadow: 0 14px 30px rgba(44, 196, 246, 0.22);
}

.install-log-card {
  padding: 22px 24px 24px;
}

.install-log-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.install-log {
  margin: 0;
  min-height: 180px;
  max-height: 360px;
  overflow: auto;
  border-style: solid;
  border-color: rgba(226, 232, 240, 0.92);
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.85), rgba(255, 255, 255, 0.95));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 13px;
  line-height: 1.55;
  color: #0f172a;
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 900px) {
  .table-header,
  .manager-header,
  .hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .message-content {
    flex-direction: column;
  }

  .message-close {
    justify-self: end;
  }

  .install-hero,
  .install-actions-card,
  .install-log-header,
  .manage-folder-heading {
    flex-direction: column;
    align-items: flex-start;
  }

  .install-badge {
    width: 100%;
    min-width: 0;
  }

  .manager-upload-actions {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .create-actions {
    grid-template-columns: 1fr;
  }

  .manage-folder-form {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .page {
    padding: 12px;
  }

  .install-page {
    padding: 18px 14px 28px;
  }

  .install-brand {
    font-size: 28px;
  }

  .shell {
    min-height: 0;
  }

  .row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .details,
  .table-panel,
  .card-content,
  .hero,
  .manager-header,
  .manager-footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .install-hero,
  .install-content {
    padding-left: 18px;
    padding-right: 18px;
  }

  .install-actions-card,
  .install-log-card,
  .install-summary {
    padding: 18px;
  }

  .install-summary .row {
    grid-template-columns: 1fr;
  }

  .install-actions {
    width: 100%;
  }

  .install-close-button,
  .install-bind-button {
    width: 100%;
  }

  .details {
    margin: 0;
  }

  .manager-message-host {
    padding: 16px 16px 0;
  }

  .manager-upload-actions {
    max-width: none;
  }

  .manager-upload-actions .button {
    max-width: none;
  }

  .table-wrap {
    overflow-x: auto;
  }

  .manage-folder-form {
    grid-template-columns: 1fr;
  }
}
