.skip-link {
  position: fixed;
  top: -100px;
  background: white;
  padding: 15px;
  z-index: 500;
}
.date-field { display: flex; flex-direction: column; gap: 6px; color: #617467; font-size: 12px; min-width: 170px; }
.date-trigger { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 38px; width: 100%; padding: 9px 12px; border: 1px solid #dfe7e3; border-radius: 7px; background: #fff; color: #263a32; font: inherit; font-size: 13px; text-align: left; }
.date-trigger:focus-visible, .date-popover :focus-visible { outline: 2px solid #147d69; outline-offset: 2px; }
.date-popover { position: fixed; z-index: 600; width: min(330px, calc(100vw - 16px)); max-height: calc(100dvh - 16px); overflow-y: auto; padding: 14px; border: 1px solid #dfe7e3; border-radius: 12px; background: white; color: #263a32; box-shadow: 0 12px 40px #203a3226; font-size: 14px; }
.date-popover button, .date-popover select, .date-popover input { font: inherit; color: inherit; border: 1px solid transparent; border-radius: 6px; background: transparent; min-height: 36px; }
.date-popover button { cursor: pointer; padding: 6px; }
.date-popover button:hover:not(:disabled) { background: #eaf5ee; }
.date-heading, .date-footer, .date-navigation { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.date-heading { margin-bottom: 8px; }
.date-heading button, .date-navigation > button { min-width: 32px; font-size: 22px; }
.date-navigation select, .date-navigation input { border-color: #dfe7e3; padding: 4px; min-width: 0; }
.date-navigation select { flex: 1; }
.date-navigation [data-calendar="year"] { width: 76px; flex: none; }
.date-grid { width: 100%; border-collapse: collapse; table-layout: fixed; margin: 10px 0; }
.date-grid th, .date-grid td { text-align: center; padding: 2px 0; border: 0; }
.date-grid th { font-size: 12px; font-weight: 500; color: #617467; background: transparent; }
.date-grid button { width: 100%; padding: 0; }
.date-grid .outside { color: #819389; }
.date-grid button[aria-current="date"] { border-color: #147d69; }
.date-grid [aria-selected="true"] button { background: #147d69; color: white; }
.date-popover button:disabled { opacity: .3; cursor: not-allowed; }
.date-footer { border-top: 1px solid #edf1ee; padding-top: 8px; }
.date-footer button { color: #147d69; }
.date-footer span { font-size: 10px; color: #617467; overflow-wrap: anywhere; text-align: center; }
@media (max-width: 600px) { .live-filters .date-field { width: 100%; min-width: 0; } .date-trigger { min-height: 44px; } }
.skip-link:focus {
  top: 0;
}
.auth-wrap {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(ellipse at top left, #d9eee3, transparent 65%), #f7f9fa;
}
.auth-card {
  width: 100%;
  max-width: 440px;
  min-width: 0;
  padding: 32px;
}
.auth-card .brand {
  padding: 0 0 32px;
  justify-content: center;
}
.auth-card h1 {
  font-size: 23px;
  text-align: center;
}
.auth-card p {
  line-height: 1.8;
  color: #617467;
}
.auth-card .primary {
  width: 100%;
}
.auth-card .language-control {
  float: none;
}
.auth-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 32px; font-size: 12px; }
.auth-top a, .auth-switch { color: #147d69; }
.auth-card .auth-entry-label { margin: -12px 0 8px; font-size: 10px; color: #147d69; letter-spacing: 2px; text-align: center; }
.auth-description, .auth-switch { text-align: center; }
.auth-switch { display: block; font-size: 12px; line-height: 1.8; }
.content { width: 100%; max-width: 1480px; margin-inline: auto; }
@media (max-width: 480px) { .auth-wrap { padding: 16px; } .auth-card { padding: 24px; } .auth-card h1 { font-size: 21px; } }
.form-error {
  color: #a53737;
  background: #fff0ed;
  padding: 12px;
  border-radius: 6px;
  line-height: 1.6;
  margin-bottom: 16px;
  overflow-wrap: anywhere;
}
.form-error:empty {
  display: none;
}
.workspace-subtitle {
  font-size: 12px;
  color: #81918a;
  line-height: 1.7;
}
.live-badge {
  color: #278267;
  background: #eaf5ee;
  padding: 6px 9px;
  border-radius: 5px;
  font-size: 11px;
  white-space: nowrap;
}
.nav-symbol {
  width: 20px;
  text-align: center;
  font-size: 17px;
}
.form-field textarea {
  min-height: 110px;
}
.notice {
  line-height: 1.8;
}
.demo-notice { margin-bottom: 20px; }
.commission-note { margin-bottom: 20px; }
.commission-wallet { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,220px),1fr)); gap: 16px; margin-bottom: 24px; }
.commission-wallet article { padding: 20px; min-width: 0; }
.commission-wallet span, .commission-wallet small { display: block; color: #617169; font-size: 13px; line-height: 1.7; }
.commission-wallet strong { display: block; color: #203b31; font-size: 24px; margin: 8px 0; white-space: nowrap; overflow-x: auto; font-variant-numeric: tabular-nums; }
.commission-detail-head { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; margin-bottom: 20px; }
.commission-detail-head h2 { margin: 0 0 6px; font-size: 20px; }
.commission-detail-head p { margin: 0; color: #617169; overflow-wrap: anywhere; }
.commission-orders-title { margin: 24px 0 14px; font-size: 16px; }
.commission-amount { white-space: nowrap; font-variant-numeric: tabular-nums; }
.commission-state { min-width: 180px; font-size: 12px; }
.commission-state span { display: flex; justify-content: space-between; gap: 12px; margin: 5px 0; }
.commission-state b { font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; }
.commission-table .data-table td:first-child { min-width: 185px; }
.commission-table .data-table td:last-child { min-width: 145px; }
.commission-table .data-table td:first-child .list-meta { max-width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.commission-table button { white-space: nowrap; }
.data-table td {
  white-space: normal;
  min-width: 100px;
  max-width: 380px;
  overflow-wrap: anywhere;
}
.data-table td:last-child {
  min-width: 180px;
}
.row-actions {
  flex-wrap: wrap;
}
.connection-summary { padding: 16px; background: #f5f9f7; border: 1px solid #dce8e2; border-radius: 12px; margin: 16px 0; min-width: 0; }
.connection-summary dl { margin: 0 0 12px; }
.connection-summary dl > div { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 10px; font-size: 13px; }
.connection-summary dt { flex-shrink: 0; }
.connection-summary dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.connection-summary small { font-size: 11px; color: #64766e; line-height: 1.6; }
.check-good { color: #187958; }
.check-pending { color: #805b24; }
.connection-events { padding-left: 20px; line-height: 1.8; }
.modal-body code, .modal-body p, .campaign p { overflow-wrap: anywhere; }
@media(max-width: 480px) { .connection-summary dl > div { flex-direction: column; gap: 4px; } .connection-summary dd { text-align: left; } }
.live-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  margin-bottom: 22px;
}
.live-filters label {
  font-size: 11px;
  color: #72877d;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.live-filters select,
.live-filters input {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: white;
  max-width: 220px;
}
.live-filters .search-field {
  margin-left: auto;
}
.real-stats {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.real-stats .metric-value {
  font-size: 24px;
}
.card-padding {
  padding: 24px;
}
.checklist {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0;
}
.checklist a {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 7px;
}
.checklist small {
  display: block;
  color: #789084;
  margin-top: 8px;
}
.blank-state {
  text-align: center;
  padding: 65px 25px;
  line-height: 1.8;
}
.blank-state h2 {
  margin-bottom: 10px;
}
.blank-state p {
  color: #7d8d85;
}
.code-block {
  width: 100%;
  min-height: 140px;
  font: 12px/1.6 monospace;
  word-break: break-all;
}
.permission-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  max-height: 300px;
  overflow: auto;
}
.permission-grid label {
  font-size: 12px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.workspace-table-summary {
  padding: 16px 22px;
  color: #7c8e83;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.live-asset-cover {
  width: 100%;
  height: 190px;
  object-fit: contain;
  background: #edf4ee;
  border-bottom: 1px solid var(--border);
}
.text-cover {
  height: 190px;
  overflow: hidden;
  background: #f0f2e9;
  padding: 25px;
  white-space: pre-wrap;
  line-height: 1.7;
  color: #496b56;
}
.asset-card-body h3 {
  font-size: 15px;
}
.asset-selection {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.asset-selection label {
  display: flex;
  gap: 7px;
  align-items: center;
}
.muted-box {
  padding: 16px;
  background: #f6f8f7;
  border-radius: 8px;
  line-height: 1.8;
  margin: 16px 0;
}
.detail-list {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 12px;
  line-height: 1.7;
}
.detail-list dt {
  color: #809388;
}
.detail-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.setup-notice {
  border: 1px solid #d4e6db;
  background: #eef7f1;
  border-radius: 8px;
  padding: 16px;
  line-height: 1.8;
  margin-bottom: 22px;
}
.progress-note {
  font-size: 12px;
  line-height: 1.7;
  color: #547b66;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.trend-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 12px 0;
  font-size: 12px;
}
.trend-row .bar-track {
  flex: 1;
  margin: 0;
  height: 8px;
}
.list-meta {
  display: block;
  color: #85988b;
  font-size: 11px;
  margin-top: 5px;
}
.modal-bg .modal {
  margin: auto;
}
.modal-foot {
  position: sticky;
  bottom: 0;
}
.top-actions button {
  white-space: nowrap;
}
.text-content {
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 260px;
  overflow: auto;
}
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.detail-media {
  max-height: 300px;
  width: 100%;
  object-fit: contain;
}
.busy {
  cursor: wait;
}
.status.attention,
.status.uncertain {
  background: #fff0ed;
  color: #a94c40;
}
.status.draft,
.status.pending {
  background: #fbf4e6;
  color: #9a762a;
}
.sidebar-bottom .user {
  align-items: flex-start;
}
.user strong {
  overflow-wrap: anywhere;
}
.mobile-shade {
  display: none;
}
.button-link {
  color: var(--green);
  text-decoration: underline;
  cursor: pointer;
}
@media (max-width: 900px) {
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .live-filters .search-field {
    margin-left: 0;
  }
  .topbar .crumb {
    display: none;
  }
}
@media (max-width: 680px) {
  .mobile-shade {
    display: block;
    position: fixed;
    inset: 0;
    background: #18332650;
    z-index: 25;
    border: 0;
    border-radius: 0;
  }
  .auth-card {
    padding: 25px;
  }
  .content {
    padding: 24px 16px;
  }
  .checklist {
    grid-template-columns: 1fr;
  }
  .permission-grid {
    grid-template-columns: 1fr;
  }
  .live-filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .live-filters input,
  .live-filters select {
    width: 100%;
    max-width: none;
    min-width: 0;
  }
  .live-filters label {
    min-width: 0;
  }
  .live-filters .search-field {
    grid-column: 1/-1;
  }
  .real-stats {
    grid-template-columns: 1fr 1fr;
  }
  .real-stats .metric-value {
    font-size: 20px;
  }
  .detail-list {
    grid-template-columns: 1fr;
  }
  .detail-list dd {
    margin-bottom: 10px;
  }
  .topbar {
    justify-content: space-between;
  }
  .top-actions {
    max-width: 100%;
  }
  .workspace-table-summary {
    flex-wrap: wrap;
  }
  .asset-selection {
    gap: 10px;
    flex-wrap: wrap;
  }
  .modal-body {
    padding: 18px;
  }
  .modal-foot {
    padding: 14px;
  }
  .modal-head h2 {
    font-size: 17px;
  }
}
/* Reports keep currencies separate and charts inside the main content width. */
.report-toolbar { padding: 18px; margin-bottom: 18px; }
.report-toolbar .live-filters { margin: 0; padding: 0; border: 0; }
.report-presets, .report-context, .report-section-head, .report-tabs, .report-asset-stats { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.report-presets { margin-top: 14px; }
.report-presets span, .report-context, .report-chart small, .report-chart span { color: #617169; font-size: 12px; }
.report-context { justify-content: space-between; margin: 16px 0; }
.report-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 18px; margin-bottom: 24px; }
.report-summary .report-currency-card { padding: 24px; min-width: 0; container-type: inline-size; border-color: #dce6e1; box-shadow: 0 3px 12px #213d3004; }
.report-currency-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.report-currency-head h2 { margin: 0; padding: 5px 10px; border-radius: 7px; background: #eaf5ef; color: #147d69; font-size: 13px; font-weight: 700; letter-spacing: .04em; }
.report-currency-head > span { color: #617169; font-size: 12px; text-align: right; }
.report-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; margin: 0; }
.report-kpis > div { min-width: 0; }
.report-kpis dt { color: #617169; font-size: 13px; line-height: 1.5; }
.report-kpis dd { margin: 6px 0 0; font-variant-numeric: tabular-nums lining-nums; font-weight: 650; line-height: 1.3; white-space: nowrap; overflow-wrap: normal; word-break: normal; max-width: 100%; overflow-x: auto; }
.report-kpi-revenue, .report-kpi-commission { grid-column: 1 / -1; }
.report-kpi-revenue dd { color: #203b31; font-size: 30px; font-size: clamp(22px, 9cqi, 34px); letter-spacing: -.025em; }
.report-kpi-commission { margin-top: 18px; padding-bottom: 20px; border-bottom: 1px solid #e9efec; }
.report-kpi-commission dd { color: #147d69; font-size: 21px; font-size: clamp(18px, 6.5cqi, 24px); }
.report-kpi-count { padding-top: 18px; }
.report-kpi-count + .report-kpi-count { padding-left: 24px; border-left: 1px solid #e9efec; }
.report-kpi-count dd { font-size: 22px; font-size: clamp(18px, 6.5cqi, 24px); }
.report-trends, .report-details, .report-definitions { margin-bottom: 18px; padding: 20px; min-width: 0; }
.report-section-head { justify-content: space-between; margin-bottom: 16px; }
.report-section-head h2 { margin: 0; font-size: 16px; }
.report-navigation { padding: 14px 18px; margin: 18px 0; }
.report-section-head select { max-width: 100%; padding: 8px; border: 1px solid #dce5df; border-radius: 8px; background: white; }
.report-chart { padding: 10px 0 14px; border-bottom: 1px solid #edf1ee; }
.report-chart:last-child { border-bottom: 0; }
.report-chart > div { display: flex; justify-content: space-between; gap: 8px; }
.report-chart svg { display: block; width: 100%; height: auto; min-height: 100px; }
.report-asset-stats { padding: 12px 0 18px; }
.report-definitions { color: #617169; line-height: 1.8; font-size: 13px; }
.report-definitions summary { font-weight: 600; color: #263a31; cursor: pointer; }
.report-definitions ul { padding-left: 20px; }
.report-definitions li + li { margin-top: 8px; }
#report-message:not(:empty) { padding: 15px; margin: 12px 0; border-radius: 10px; background: #f0f5f2; }
.report-details td small { display: block; color: #617169; }
.report-details .workspace-table-summary { padding-left: 0; padding-right: 0; }
.report-details caption { text-align: left; padding: 8px 0; font-weight: 600; }
.report-details caption.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 600px) {
  .report-summary .report-currency-card { padding: 20px; }
  .report-toolbar, .report-trends, .report-details, .report-definitions { padding: 14px; }
  .report-toolbar .live-filters label { width: 100%; min-width: 0; }
  .report-tabs { gap: 6px; }
  .report-tabs .btn { padding: 8px 10px; }
}
.tier-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr)); gap:16px; margin-top:20px; }
.tier-card { padding:20px; border:1px solid #dce6e1; border-radius:14px; min-width:0; overflow-wrap:anywhere; }
.tier-card h3 { margin:12px 0; }
.tier-card small { color:#697f75; }
.tier-rate { display:block; font-size:28px; color:#148570; white-space:nowrap; }
.link-destination { display:flex; align-items:stretch; min-width:0; }
.link-destination-origin { display:flex; align-items:center; max-width:55%; padding:12px; border:1px solid #dce5df; border-right:0; border-radius:10px 0 0 10px; background:#f0f5f2; color:#48665b; overflow-wrap:anywhere; }
.link-destination input { flex:1; min-width:0; width:0; border-radius:0 10px 10px 0; }
.link-destination-preview { margin:0 0 20px; padding:12px 14px; border-radius:10px; background:#f6f9f7; color:#617169; font-size:13px; }
.link-destination-preview output { display:block; margin-top:6px; color:#203b31; overflow-wrap:anywhere; }
@media (max-width:600px) {
  .link-destination { flex-direction:column; }
  .link-destination-origin { max-width:100%; border-right:1px solid #dce5df; border-bottom:0; border-radius:10px 10px 0 0; }
  .link-destination input { width:100%; border-radius:0 0 10px 10px; }
}
