:root {
  --surface-canvas: #f4f6f7;
  --surface-page: #f8fafa;
  --surface-panel: #ffffff;
  --surface-panel-muted: #f1f4f4;
  --surface-input: #fbfcfc;
  --border-subtle: #e6eaeb;
  --border-default: #d9e0e1;
  --border-strong: #c6d0d2;
  --text-primary: #101818;
  --text-secondary: #4a5557;
  --text-muted: #7b8688;
  --text-inverse: #ffffff;
  --brand-900: #063f3c;
  --brand-800: #0b514d;
  --brand-700: #0e6a65;
  --brand-100: #e7f2f1;
  --brand-050: #f1f8f7;
  --premium-gold: #b89a55;
  --premium-gold-soft: #f4efe2;
  --success: #20855d;
  --success-bg: #e8f5ef;
  --warning: #b7791f;
  --warning-bg: #fff4df;
  --danger: #c2413b;
  --danger-bg: #fcebe9;
  --info: #2c6e91;
  --info-bg: #e8f3f8;
  --shadow-panel: 0 1px 2px rgba(16, 24, 24, 0.04);
  --shadow-float: 0 18px 45px rgba(16, 24, 24, 0.1);
  color: var(--text-primary);
  font-family: Inter, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--surface-canvas);
}

body {
  margin: 0;
  min-width: 0;
  background: var(--surface-canvas);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.hidden {
  display: none !important;
}

.form-error {
  color: var(--danger);
  font-size: 0.92rem;
  font-weight: 700;
  margin: 0;
}

.brand,
.sidebar-brand {
  align-items: center;
  color: var(--text-primary);
  display: inline-flex;
  font-size: 16px;
  font-weight: 700;
  gap: 10px;
  letter-spacing: 0.08em;
}

.brand-mark {
  align-items: center;
  border: 1px solid rgba(6, 63, 60, 0.28);
  border-radius: 7px;
  color: var(--brand-900);
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  height: 26px;
  justify-content: center;
  letter-spacing: 0;
  width: 26px;
}

.lucide-icon {
  display: block;
  height: 18px;
  width: 18px;
}

.primary-button,
.secondary-button,
.ghost-button {
  align-items: center;
  border-radius: 6px;
  display: inline-flex;
  font-size: 14px;
  font-weight: 600;
  height: 40px;
  justify-content: center;
  padding: 0 18px;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
  white-space: nowrap;
}

.primary-button {
  background: var(--brand-900);
  border: 1px solid var(--brand-900);
  color: var(--text-inverse);
}

.primary-button:hover {
  background: var(--brand-800);
  border-color: var(--brand-800);
}

.secondary-button {
  background: var(--surface-panel);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
}

.secondary-button:hover,
.ghost-button:hover {
  border-color: var(--border-strong);
  background: var(--surface-panel-muted);
}

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

.ghost-button {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-primary);
}

.large {
  height: 46px;
  padding-inline: 22px;
}

.full {
  width: 100%;
}

.public-site {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 250, 250, 0.98)),
    radial-gradient(circle at 12% 4%, rgba(184, 154, 85, 0.12), transparent 30%),
    var(--surface-page);
  min-height: 100vh;
}

.public-header {
  align-items: center;
  display: flex;
  height: 78px;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1600px;
  padding: 0 42px;
}

.public-nav {
  align-items: center;
  display: flex;
  gap: 34px;
}

.public-nav a {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
}

.public-actions,
.hero-buttons,
.button-row,
.filter-row {
  align-items: center;
  display: flex;
  gap: 10px;
}

.hero-section {
  align-items: center;
  display: grid;
  gap: 80px;
  grid-template-columns: minmax(560px, 1fr) 420px;
  margin: 0 auto;
  max-width: 1600px;
  min-height: 650px;
  padding: 58px 42px 72px;
  position: relative;
}

.hero-section::before {
  background:
    linear-gradient(90deg, rgba(6, 63, 60, 0.06) 1px, transparent 1px),
    linear-gradient(180deg, rgba(6, 63, 60, 0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  bottom: 52px;
  content: "";
  height: 240px;
  left: 42px;
  mask-image: linear-gradient(90deg, black, transparent);
  opacity: 0.8;
  position: absolute;
  right: 520px;
  z-index: 0;
}

.hero-copy,
.login-card {
  position: relative;
  z-index: 1;
}

.eyebrow {
  color: var(--premium-gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  margin: 0 0 16px;
  text-transform: uppercase;
}

.hero-copy h1 {
  color: var(--text-primary);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 68px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 0.98;
  margin: 0;
  max-width: 820px;
}

.hero-text {
  color: var(--text-secondary);
  font-size: 17px;
  line-height: 1.65;
  margin: 28px 0 34px;
  max-width: 680px;
}

.trust-row {
  border-top: 1px solid var(--border-subtle);
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 48px;
  padding-top: 22px;
}

.trust-row span::before {
  color: var(--premium-gold);
  content: "◇";
  margin-right: 8px;
}

.login-card {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  box-shadow: var(--shadow-float);
  padding: 30px;
}

.login-card h2,
.request-dialog h2 {
  font-size: 22px;
  line-height: 1.2;
  margin: 0;
}

.login-card p,
.request-dialog p {
  color: var(--text-muted);
  margin: 8px 0 0;
}

.login-card form,
.request-dialog form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.fx-preview {
  background: var(--brand-050);
  border: 1px solid #cfe5e2;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.fx-preview.warning {
  background: var(--warning-bg);
  border-color: #f3d7a2;
}

.fx-preview-header {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.fx-preview-header span {
  color: var(--brand-700);
  font-size: 12px;
  font-weight: 800;
}

.fx-preview-header strong {
  color: var(--text-primary);
  font-size: 20px;
  line-height: 1.1;
  text-align: right;
}

.fx-preview dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.fx-preview dl div {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.fx-preview dt {
  color: var(--text-secondary);
  font-size: 12px;
}

.fx-preview dd {
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

label {
  color: var(--text-secondary);
  display: grid;
  font-size: 12px;
  font-weight: 600;
  gap: 8px;
}

input,
select,
textarea {
  background: var(--surface-input);
  border: 1px solid var(--border-default);
  border-radius: 6px;
  color: var(--text-primary);
  height: 40px;
  outline: none;
  padding: 0 12px;
}

textarea {
  min-height: 92px;
  padding-block: 10px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand-700);
}

.form-row {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.form-row a {
  color: var(--brand-700);
  font-size: 12px;
  font-weight: 600;
}

.checkbox-line {
  align-items: center;
  display: flex;
  flex-direction: row;
  font-weight: 500;
}

.checkbox-line input {
  height: 14px;
  width: 14px;
}

.login-divider {
  align-items: center;
  color: var(--text-muted);
  display: flex;
  font-size: 12px;
  gap: 12px;
  margin: 18px 0;
}

.login-divider::before,
.login-divider::after {
  background: var(--border-subtle);
  content: "";
  flex: 1;
  height: 1px;
}

.capability-band {
  background: var(--surface-panel);
  border-top: 1px solid var(--border-subtle);
  padding: 58px 42px 82px;
}

.section-heading {
  margin: 0 auto 26px;
  max-width: 1600px;
  text-align: center;
}

.section-heading h2 {
  font-size: 28px;
  margin: 0;
}

.capability-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, 1fr);
  margin: 0 auto;
  max-width: 1600px;
}

.capability-card {
  background: var(--surface-panel);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  min-height: 170px;
  padding: 22px;
}

.line-icon {
  align-items: center;
  background: var(--brand-050);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--brand-900);
  display: inline-flex;
  font-size: 18px;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.capability-card h3 {
  font-size: 16px;
  margin: 18px 0 8px;
}

.capability-card p {
  color: var(--text-secondary);
  margin: 0;
}

.app-shell {
  background: var(--surface-canvas);
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: var(--surface-panel);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 26px 18px;
}

.sidebar-brand {
  margin: 0 8px 28px;
}

.sidebar-nav,
.sidebar-footer {
  display: grid;
  gap: 5px;
}

.sidebar-footer {
  margin-top: auto;
}

.nav-item,
.subnav button {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text-secondary);
  display: flex;
  font-size: 14px;
  font-weight: 600;
  gap: 11px;
  min-height: 38px;
  padding: 0 12px;
  text-align: left;
  width: 100%;
}

.nav-item [data-icon] {
  color: var(--text-muted);
  display: inline-flex;
  flex: 0 0 18px;
  justify-content: center;
  width: 18px;
}

.nav-item.active {
  background: var(--brand-100);
  border-color: #d6e7e5;
  color: var(--brand-900);
}

.nav-item.active [data-icon] {
  color: var(--brand-900);
}

.nav-item:hover,
.subnav button:hover {
  background: var(--surface-panel-muted);
}

.nav-item.muted {
  color: var(--text-muted);
}

.subnav {
  display: grid;
  gap: 2px;
  margin: 2px 0 8px 41px;
}

.subnav button {
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  min-height: 30px;
  padding: 0 8px;
}

.workspace {
  min-width: 0;
  overflow-x: hidden;
}

.topbar {
  align-items: center;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  height: 72px;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 5;
}

.company-select,
.language-select,
.icon-button,
.user-pill,
.filter-row button,
.link-button {
  background: var(--surface-panel);
  border: 1px solid var(--border-default);
  border-radius: 6px;
  color: var(--text-primary);
  height: 36px;
  padding: 0 12px;
}

.company-select {
  font-weight: 600;
  min-width: 180px;
  text-align: left;
}

.language-select {
  font-weight: 700;
  min-width: 112px;
}

.language-select.compact {
  min-width: 96px;
}

.topbar-tools {
  align-items: center;
  display: flex;
  gap: 10px;
}

.icon-button {
  align-items: center;
  display: inline-flex;
  font-size: 16px;
  justify-content: center;
  padding: 0;
  position: relative;
  width: 36px;
}

.icon-button .lucide-icon {
  height: 17px;
  width: 17px;
}

.alert-dot::after {
  background: var(--brand-700);
  border: 2px solid var(--surface-panel);
  border-radius: 50%;
  content: "";
  height: 8px;
  position: absolute;
  right: 8px;
  top: 8px;
  width: 8px;
}

.user-pill {
  align-items: center;
  background: var(--brand-100);
  color: var(--brand-900);
  display: inline-flex;
  font-weight: 700;
  gap: 8px;
}

.user-pill span {
  color: var(--text-secondary);
  font-weight: 600;
}

.content {
  margin: 0 auto;
  max-width: 1600px;
  padding: 28px 32px 52px;
  width: 100%;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.page-title-row {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 24px;
  min-width: 0;
}

.page-title-row > div {
  min-width: 0;
}

.page-title-row h2 {
  font-size: 30px;
  line-height: 1.16;
  margin: 0;
}

.page-title-row p {
  color: var(--text-muted);
  margin: 6px 0 0;
}

.panel {
  background: var(--surface-panel);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  box-shadow: var(--shadow-panel);
  min-width: 0;
  padding: 20px;
}

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

.panel-header h3,
.placeholder-panel h3,
.document-detail h4 {
  font-size: 19px;
  line-height: 1.25;
  margin: 0;
}

.metric-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 24px;
}

.metric-card,
.compact-metric {
  min-height: 168px;
}

.metric-card span,
.compact-metric span {
  color: var(--text-muted);
  display: block;
  font-size: 12px;
  font-weight: 600;
}

.metric-card strong,
.compact-metric strong {
  display: block;
  font-size: 32px;
  font-weight: 600;
  line-height: 1.1;
  margin-top: 12px;
}

.metric-card small,
.compact-metric small {
  color: var(--brand-700);
  display: block;
  margin-top: 8px;
}

.sparkline {
  background:
    linear-gradient(135deg, transparent 0 19%, var(--brand-700) 20% 22%, transparent 23% 38%, var(--brand-700) 39% 41%, transparent 42% 58%, var(--brand-700) 59% 61%, transparent 62%),
    linear-gradient(180deg, transparent, var(--brand-050));
  border-bottom: 1px solid var(--border-subtle);
  height: 42px;
  margin-top: 14px;
}

.sparkline.second {
  opacity: 0.82;
}

.sparkline.third {
  background:
    linear-gradient(135deg, transparent 0 13%, var(--warning) 14% 16%, transparent 17% 45%, var(--warning) 46% 48%, transparent 49%),
    linear-gradient(180deg, transparent, var(--warning-bg));
}

.sparkline.fourth {
  background:
    linear-gradient(135deg, transparent 0 28%, var(--info) 29% 31%, transparent 32% 60%, var(--info) 61% 63%, transparent 64%),
    linear-gradient(180deg, transparent, var(--info-bg));
}

.dashboard-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1.45fr 0.9fr;
}

.table-panel,
.quick-panel {
  min-height: 320px;
}

.mini-table {
  border-top: 1px solid var(--border-subtle);
}

.table-row {
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
  display: grid;
  gap: 12px;
  grid-template-columns: 0.8fr 1.8fr 1.1fr 0.85fr;
  min-height: 54px;
}

.legal-table .table-row {
  grid-template-columns: 0.7fr 1.25fr 1fr 0.7fr 0.85fr;
}

.arbitration-table .table-row {
  grid-template-columns: 0.75fr 1.2fr 1fr 0.95fr 0.9fr;
}

.company-documents-table .table-row {
  grid-template-columns: 1.6fr 0.8fr;
}

.company-people-table .table-row {
  grid-template-columns: 1fr 1.25fr 0.8fr;
}

.signature-documents-table .table-row,
.signature-people-table .table-row,
.signature-delegations-table .table-row {
  grid-template-columns: 1.25fr 0.85fr 0.85fr 0.75fr;
}

.crypto-balances-table .table-row {
  grid-template-columns: 0.7fr 0.7fr 1fr 1fr 1fr;
}

.crypto-addresses-table .table-row {
  grid-template-columns: 0.55fr 0.65fr 1.8fr 0.7fr;
}

.crypto-transactions-table .table-row {
  grid-template-columns: 0.58fr 0.68fr 0.82fr 0.9fr 0.7fr 1.25fr;
}

.crypto-withdrawals-table .table-row {
  grid-template-columns: 0.72fr 0.8fr 0.9fr 0.75fr 1.25fr;
}

.investment-opportunities-table .table-row {
  grid-template-columns: 1.15fr 1fr 0.9fr 0.7fr 0.65fr;
}

.investment-commitments-table .table-row {
  grid-template-columns: 0.75fr 1.3fr 0.9fr 0.7fr;
}

.activity-table .table-row {
  grid-template-columns: 0.68fr 1.45fr 0.82fr 0.62fr 0.78fr;
}

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

.access-users-table .table-row {
  grid-template-columns: 1.15fr 0.85fr 1.25fr 0.65fr;
}

.access-roles-table .table-row {
  grid-template-columns: 0.8fr 1.6fr;
}

.legal-request-form {
  display: grid;
  gap: 16px;
}

.arbitration-form,
.company-update-form,
.signature-form,
.crypto-withdrawal-form,
.investment-form,
.access-form {
  display: grid;
  gap: 16px;
}

.signature-form,
.crypto-withdrawal-form,
.investment-form,
.access-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.signature-form label,
.signature-form input,
.signature-form select,
.crypto-withdrawal-form label,
.crypto-withdrawal-form input,
.crypto-withdrawal-form select,
.investment-form label,
.investment-form input,
.investment-form select,
.access-form label,
.access-form input,
.access-form select {
  min-width: 0;
}

.signature-form .button-row,
.crypto-withdrawal-form .button-row,
.investment-form .button-row,
.access-form .button-row {
  align-items: stretch;
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.signature-form .button-row .primary-button,
.signature-form .button-row .secondary-button,
.crypto-withdrawal-form .button-row .primary-button,
.crypto-withdrawal-form .button-row .secondary-button,
.investment-form .button-row .primary-button,
.investment-form .button-row .secondary-button,
.access-form .button-row .primary-button,
.access-form .button-row .secondary-button {
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
  width: 100%;
}

button.table-row {
  background: transparent;
  border-left: 0;
  border-right: 0;
  border-top: 0;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
  width: 100%;
}

.table-row > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.table-row.head {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  min-height: 44px;
}

.table-row.active {
  background: var(--brand-050);
  margin-inline: -10px;
  padding-inline: 10px;
}

.positive {
  color: var(--success);
  font-weight: 600;
}

.badge {
  align-items: center;
  border-radius: 4px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 700;
  height: 24px;
  justify-content: center;
  padding: 0 8px;
  width: fit-content;
}

.badge.success {
  background: var(--success-bg);
  color: var(--success);
}

.badge.warning {
  background: var(--warning-bg);
  color: var(--warning);
}

.badge.danger {
  background: var(--danger-bg);
  color: var(--danger);
}

.badge.neutral {
  background: var(--surface-panel-muted);
  color: var(--text-secondary);
}

.link-button {
  border: 0;
  color: var(--brand-700);
  font-weight: 700;
  padding: 0;
}

.donut-wrap {
  align-items: center;
  display: flex;
  gap: 26px;
  min-height: 210px;
}

.donut {
  align-items: center;
  background: conic-gradient(var(--brand-700) 0 44%, var(--warning) 44% 78%, var(--danger) 78% 100%);
  border-radius: 50%;
  display: flex;
  height: 128px;
  justify-content: center;
  position: relative;
  width: 128px;
}

.donut::after {
  background: var(--surface-panel);
  border-radius: 50%;
  content: "";
  height: 82px;
  position: absolute;
  width: 82px;
}

.donut span {
  font-size: 28px;
  font-weight: 700;
  position: relative;
  z-index: 1;
}

.issue-list {
  color: var(--text-secondary);
  display: grid;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.dot {
  border-radius: 50%;
  display: inline-block;
  height: 8px;
  margin-right: 8px;
  width: 8px;
}

.dot.teal {
  background: var(--brand-700);
}

.dot.amber {
  background: var(--warning);
}

.dot.red {
  background: var(--danger);
}

.deal-list {
  display: grid;
  gap: 12px;
}

.deal-list div,
.document-list div {
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 14px;
}

.deal-list span {
  color: var(--text-muted);
  font-size: 12px;
}

.quick-actions {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.quick-actions button {
  background: var(--surface-panel);
  border: 1px solid var(--border-default);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 700;
  min-height: 76px;
  padding: 12px;
  text-align: left;
}

.quick-actions button:hover {
  background: var(--brand-050);
  border-color: #d7e8e6;
}

.finance-grid,
.accounting-grid,
.escrow-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
}

.currency-tabs {
  display: flex;
  gap: 10px;
  margin: 0 0 16px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.currency-tabs button {
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  display: grid;
  gap: 4px;
  min-width: 154px;
  padding: 12px 14px;
  text-align: left;
}

.currency-tabs button.active {
  background: var(--brand-050);
  border-color: #cfe5e2;
  color: var(--brand-700);
}

.currency-tabs span {
  font-size: 13px;
  font-weight: 800;
}

.currency-tabs strong {
  font-size: 15px;
  line-height: 1.25;
}

.balance-focus {
  grid-column: span 1;
}

.balance-focus strong {
  display: block;
  font-size: 34px;
  margin: 8px 0 24px;
}

.span-2 {
  grid-column: span 2;
}

.requisites,
.document-detail dl,
.deal-summary dl {
  display: grid;
  gap: 12px;
}

.requisites div,
.document-detail dl div,
.deal-summary dl div {
  display: flex;
  justify-content: space-between;
}

.requisites span,
dt {
  color: var(--text-muted);
}

dd {
  font-weight: 700;
  margin: 0;
}

.finance-table .table-row {
  grid-template-columns: 0.7fr 0.8fr minmax(110px, 1.25fr) minmax(100px, 1fr) minmax(92px, 0.9fr) 0.8fr;
}

.finance-table .payment-timeline-row {
  grid-template-columns: 0.7fr minmax(0, 5.55fr);
  padding-top: 0;
}

.payment-timeline {
  background: var(--surface-panel-muted);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(5, minmax(88px, 1fr));
  padding: 10px;
}

.payment-timeline div {
  align-items: center;
  color: var(--text-muted);
  display: flex;
  gap: 7px;
  min-width: 0;
}

.payment-timeline b {
  background: var(--border-strong);
  border-radius: 50%;
  flex: 0 0 auto;
  height: 9px;
  width: 9px;
}

.payment-timeline .done {
  color: var(--text-primary);
}

.payment-timeline .done b {
  background: var(--success);
}

.payment-timeline .stopped b {
  background: var(--warning);
}

.payment-timeline span {
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.fx-row-detail {
  color: var(--text-muted);
  display: block;
  font-size: 11px;
  line-height: 1.25;
  margin-top: 3px;
  white-space: normal;
}

.counterparty-table .table-row {
  grid-template-columns: minmax(128px, 1.1fr) minmax(128px, 1fr) minmax(160px, 1.2fr) minmax(92px, 0.7fr) minmax(80px, 0.6fr);
}

.accounting-grid {
  grid-template-columns: 1.55fr 0.85fr;
}

.accounting-table .table-row {
  grid-template-columns: 0.75fr 1.45fr 1fr 1fr 0.7fr;
}

#view-accounting .panel-header {
  align-items: flex-start;
  flex-wrap: wrap;
}

#view-accounting .filter-row {
  flex-wrap: wrap;
  min-width: 0;
}

#view-accounting .filter-row select,
#view-accounting .filter-row input {
  max-width: 180px;
  min-width: 126px;
}

.document-detail {
  min-height: 530px;
}

.check-list {
  display: grid;
  gap: 12px;
  list-style: none;
  margin: 14px 0 22px;
  padding: 0;
}

.check-list li {
  align-items: center;
  color: var(--text-secondary);
  display: flex;
  gap: 10px;
}

.check-list li::before {
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  content: "";
  height: 16px;
  width: 16px;
}

.check-list li.ok::before {
  background: var(--success);
  border-color: var(--success);
}

.check-list li.missing {
  color: var(--danger);
  font-weight: 700;
}

.tabs {
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  gap: 24px;
  margin-bottom: 18px;
}

.tabs button {
  background: transparent;
  border: 0;
  color: var(--text-muted);
  font-weight: 700;
  padding: 0 0 13px;
}

.tabs button.active {
  border-bottom: 2px solid var(--brand-900);
  color: var(--brand-900);
}

.steps-panel {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 16px;
}

.step {
  align-items: center;
  display: grid;
  gap: 4px;
  grid-template-columns: 42px 1fr;
}

.step b {
  align-items: center;
  background: var(--surface-panel-muted);
  border-radius: 50%;
  display: flex;
  grid-row: span 2;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.step.active b {
  background: var(--brand-900);
  color: white;
}

.step small {
  color: var(--text-muted);
}

.escrow-grid {
  grid-template-columns: 0.9fr 1.25fr 0.85fr;
}

.deal-summary h3 {
  font-size: 21px;
  margin: 14px 0 4px;
}

.deal-summary p {
  color: var(--text-muted);
  margin: 0 0 18px;
}

.timeline {
  display: grid;
  gap: 18px;
}

.timeline div {
  display: grid;
  gap: 4px;
  grid-template-columns: 26px 1fr;
}

.timeline b {
  background: var(--warning);
  border-radius: 50%;
  grid-row: span 2;
  height: 14px;
  margin-top: 3px;
  width: 14px;
}

.timeline .done b {
  background: var(--success);
}

.timeline span {
  font-weight: 700;
}

.timeline small {
  color: var(--text-muted);
}

.document-list {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.document-list div {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.placeholder-panel {
  max-width: 720px;
}

.placeholder-panel p {
  color: var(--text-secondary);
  margin-bottom: 0;
}

.request-dialog {
  border: 1px solid var(--border-default);
  border-radius: 12px;
  box-shadow: var(--shadow-float);
  padding: 0;
  width: 420px;
}

.request-dialog::backdrop {
  background: rgba(16, 24, 24, 0.32);
}

.request-dialog form {
  margin: 0;
  padding: 28px;
}

.dialog-header {
  align-items: start;
  display: flex;
  justify-content: space-between;
}

.dialog-header button {
  background: transparent;
  border: 0;
  color: var(--text-muted);
  font-size: 24px;
  height: 32px;
  line-height: 1;
  width: 32px;
}

@media (max-width: 1280px) {
  .hero-section {
    gap: 42px;
    grid-template-columns: 1fr 390px;
  }

  .hero-copy h1 {
    font-size: 58px;
  }

  .capability-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1500px) {
  .content {
    padding-inline: 24px;
  }

  .finance-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .balance-focus,
  .span-2 {
    grid-column: auto;
  }

  .finance-table .table-row {
    grid-template-columns: 0.65fr 0.78fr minmax(96px, 1.15fr) minmax(88px, 0.95fr) minmax(86px, 0.85fr) 0.75fr;
  }
}

@media (max-width: 760px) {
  .public-header {
    align-items: flex-start;
    display: grid;
    gap: 14px;
    height: auto;
    padding: 18px 16px;
  }

  .public-nav {
    gap: 16px;
    margin-inline: -16px;
    overflow-x: auto;
    padding: 0 16px 6px;
    width: calc(100vw - 32px);
  }

  .public-actions,
  .hero-buttons {
    align-items: stretch;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  .hero-section {
    gap: 28px;
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    padding: 32px 16px 48px;
  }

  .hero-section::before {
    display: none;
  }

  .hero-copy h1 {
    font-size: 42px;
    max-width: 100%;
  }

  .hero-text {
    font-size: 15px;
    max-width: 100%;
  }

  .login-card {
    min-width: 0;
    padding: 22px;
    width: 100%;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    border-bottom: 1px solid var(--border-subtle);
    border-right: 0;
    min-height: 0;
    overflow: hidden;
    padding: 16px;
  }

  .sidebar-brand {
    margin: 0 0 14px;
  }

  .sidebar-nav {
    display: flex;
    gap: 8px;
    margin-inline: 0;
    max-width: 100%;
    overflow-x: auto;
    padding: 0 0 8px;
    width: 100%;
  }

  .sidebar-footer,
  .subnav {
    display: none;
  }

  .nav-item {
    flex: 0 0 auto;
    white-space: nowrap;
    width: auto;
  }

  .workspace {
    overflow-x: visible;
  }

  .topbar {
    gap: 12px;
    height: auto;
    padding: 14px 16px;
    position: static;
  }

  .company-select {
    min-width: 0;
  }

  .language-select.compact {
    min-width: 88px;
  }

  .topbar-tools {
    gap: 6px;
  }

  .topbar-tools .icon-button,
  .topbar-tools .user-pill {
    display: none;
  }

  .content {
    padding: 22px 16px 40px;
  }

  .page-title-row {
    align-items: stretch;
    display: grid;
  }

  .page-title-row h2 {
    font-size: 26px;
  }

  #view-accounting .panel-header {
    align-items: stretch;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr);
  }

  #view-accounting .filter-row {
    align-items: stretch;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  #view-accounting .filter-row select,
  #view-accounting .filter-row input {
    max-width: 100%;
    min-width: 0;
    width: 100%;
  }

  .metric-grid,
  .dashboard-grid,
  .finance-grid,
  .accounting-grid,
  .escrow-grid,
  .quick-actions,
  .steps-panel {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .mini-table {
    min-width: 640px;
  }

  .balance-focus .button-row {
    align-items: stretch;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .balance-focus .button-row .secondary-button {
    width: 100%;
  }

  .currency-tabs {
    margin-inline: 0;
  }

  .payment-timeline {
    grid-template-columns: minmax(0, 1fr);
  }

  .accounting-table {
    min-width: 720px;
  }

  .legal-table {
    min-width: 760px;
  }

  .arbitration-table {
    min-width: 780px;
  }

  .company-documents-table {
    min-width: 560px;
  }

  .company-people-table {
    min-width: 680px;
  }

  .signature-documents-table,
  .signature-people-table,
  .signature-delegations-table {
    min-width: 720px;
  }

  .crypto-balances-table,
  .crypto-addresses-table,
  .crypto-transactions-table,
  .crypto-withdrawals-table,
  .investment-opportunities-table,
  .investment-commitments-table,
  .activity-table,
  .access-users-table,
  .access-roles-table {
    min-width: 860px;
  }

  #view-signature .panel-header,
  #view-investments .panel-header,
  #view-activity .panel-header,
  #view-settings .panel-header {
    align-items: stretch;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr);
  }

  #view-signature .filter-row,
  #view-investments .filter-row,
  #view-activity .filter-row,
  #view-settings .filter-row {
    align-items: stretch;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  #view-signature .filter-row button,
  #view-investments .filter-row button,
  #view-activity .filter-row button,
  #view-settings .filter-row button {
    min-width: 0;
    width: 100%;
  }

  #view-crypto .panel-header {
    align-items: stretch;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr);
  }

  #view-crypto .filter-row {
    align-items: stretch;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  #view-crypto .filter-row button {
    min-width: 0;
    width: 100%;
  }

  .legal-request-form,
  .arbitration-form,
  .company-update-form,
  .signature-form,
  .crypto-withdrawal-form,
  .investment-form,
  .access-form {
    min-width: 0;
  }

  .legal-request-form input,
  .legal-request-form select,
  .legal-request-form textarea,
  .arbitration-form input,
  .arbitration-form select,
  .arbitration-form textarea,
  .company-update-form textarea,
  .signature-form input,
  .signature-form select,
  .crypto-withdrawal-form input,
  .crypto-withdrawal-form select,
  .investment-form input,
  .investment-form select,
  .access-form input,
  .access-form select {
    min-width: 0;
    width: 100%;
  }

  .legal-request-form .button-row,
  .arbitration-form .button-row,
  .company-update-form .button-row,
  .signature-form .button-row,
  .crypto-withdrawal-form .button-row,
  .investment-form .button-row,
  .access-form .button-row {
    align-items: stretch;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .legal-request-form .button-row .primary-button,
  .legal-request-form .button-row .secondary-button,
  .arbitration-form .button-row .primary-button,
  .arbitration-form .button-row .secondary-button,
  .company-update-form .button-row .primary-button,
  .company-update-form .button-row .secondary-button,
  .signature-form .button-row .primary-button,
  .signature-form .button-row .secondary-button,
  .crypto-withdrawal-form .button-row .primary-button,
  .crypto-withdrawal-form .button-row .secondary-button,
  .investment-form .button-row .primary-button,
  .investment-form .button-row .secondary-button,
  .access-form .button-row .primary-button,
  .access-form .button-row .secondary-button {
    height: auto;
    line-height: 1.2;
    min-height: 40px;
    overflow-wrap: anywhere;
    padding-block: 9px;
    white-space: normal;
    width: 100%;
  }

  .document-detail {
    min-height: 0;
  }

  .requisites div,
  .document-detail dl div,
  .deal-summary dl div {
    align-items: flex-start;
    display: grid;
    gap: 4px;
  }
}
