
:root {
  color-scheme: light;
  --krelen-black: #0b0c0b;
  --krelen-charcoal: #191b19;
  --krelen-olive: #687447;
  --krelen-olive-deep: #4d5837;
  --krelen-olive-hover: #59653d;
  --krelen-sage: #a6ad8a;
  --krelen-warm-white: #f2f1ea;
  --krelen-white: #ffffff;
  --font-ui: "Inter", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;
  --space-24: 96px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-marketing: 20px;
  --control-height: 40px;
  --touch-target: 44px;
  --type-caption: 0.75rem;
  --type-label: 0.875rem;
  --type-body: 1rem;
  --type-title: clamp(1.25rem, 1.1rem + 0.6vw, 1.75rem);
  --type-display: clamp(1.75rem, 1.3rem + 1.4vw, 2.5rem);
  --line-body: 1.6;
  --line-heading: 1.25;
  --line-arabic: 1.8;
  --motion-fast: 120ms;
  --motion-normal: 180ms;
  --motion-slow: 240ms;
  --motion-loading: 1200ms;
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
  --content-max: 1600px;
  --reading-max: 72ch;
  --form-max: 640px;
  --dialog-max: 560px;
  --sidebar-width: 264px;
  --border-width: 1px;
  --state-pressed: var(--krelen-olive-deep);
  --state-selected: var(--accent-soft);
  --state-readonly: var(--bg-subtle);
  --state-disabled-opacity: 0.55;
  --bg-page: #f5f5f2;
  --bg-surface: #fdfdfb;
  --bg-subtle: #eff1eb;
  --text-primary: #262925;
  --text-secondary: #51584e;
  --text-muted: #63695f;
  --text-on-accent: var(--krelen-white);
  --border-default: #d5d8d0;
  --border-subtle: #e3e5de;
  --accent: var(--krelen-olive);
  --accent-hover: var(--krelen-olive-hover);
  --accent-soft: #e9eddf;
  --accent-contrast: var(--krelen-white);
  --accent-strong: var(--krelen-olive-deep);
  --sidebar-bg: var(--krelen-black);
  --sidebar-text: var(--krelen-warm-white);
  --sidebar-muted: #a4a69b;
  --sidebar-active: #282e20;
  --sidebar-active-text: var(--krelen-warm-white);
  --sidebar-hover: rgba(166, 173, 138, 0.08);
  --sidebar-border: rgba(255, 255, 255, 0.08);
  --success: #376749;
  --success-soft: rgba(55, 103, 73, 0.09);
  --warning: #865c20;
  --warning-soft: rgba(134, 92, 32, 0.09);
  --danger: #a74343;
  --danger-soft: rgba(167, 67, 67, 0.09);
  --danger-contrast: var(--krelen-white);
  --info: #516765;
  --info-soft: #e8eeeb;
  --focus-ring: var(--krelen-olive-deep);
  --surface-rgb: 253 253 251;
  --accent-rgb: 104 116 71;
  --accent-soft-rgb: 233 237 223;
  --text-rgb: 38 41 37;
  --muted-rgb: 99 105 95;
  --shadow-rgb: 11 12 11;
  --shadow-sm: 0 2px 8px rgb(var(--shadow-rgb) / 0.04);
  --shadow-md: 0 8px 24px rgb(var(--shadow-rgb) / 0.07);
  --shadow: var(--shadow-md);
  --brand-wordmark: var(--text-primary);
  
  --background: var(--bg-page);
  --bg: var(--bg-page);
  --surface: var(--bg-surface);
  --surface-strong: var(--bg-surface);
  --canvas: var(--bg-page);
  --border: var(--border-subtle);
  --sidebar: var(--sidebar-bg);
  --sidebar-soft: color-mix(in srgb, var(--sidebar-bg) 82%, var(--sidebar-text));
  --sidebar-deep: var(--krelen-black);
  --line: var(--border-subtle);
  --line-strong: var(--border-default);
  --text: var(--text-primary);
  --muted: var(--text-muted);
  --surface-tint: var(--bg-subtle);
  --surface-tint-soft: var(--accent-soft);
  --surface-tint-strong: var(--accent-soft);
  --platform-noon: #ccff00;
  --platform-noon-rgb: 204 255 0;
  --platform-noon-ink: #2b3900;
  --ink: var(--text-primary);
  --ink-soft: var(--text-secondary);
  --primary: var(--accent);
  --text-soft: var(--text-muted);
}


html[data-theme="rose"], .app-shell[data-theme="rose"] { --bg-page: #f5f5f2; }
html[data-theme="ocean"], .app-shell[data-theme="ocean"] { --bg-page: #f5f5f2; }
html[data-theme="sand"], .app-shell[data-theme="sand"] { --bg-page: #f5f5f2; }
html[data-theme="mint"], .app-shell[data-theme="mint"] { --bg-page: #f5f5f2; }
html[data-theme="lavender"], .app-shell[data-theme="lavender"] { --bg-page: #f5f5f2; }

html[data-theme="midnight"],
.app-shell[data-theme="midnight"] {
  color-scheme: dark;
  --bg-page: #0b0c0b;
  --bg-surface: #191b19;
  --bg-subtle: #1e211d;
  --text-primary: #f2f1ea;
  --text-secondary: #b3b5aa;
  --text-muted: #a4a69b;
  --border-default: rgba(255, 255, 255, 0.2);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --accent: #687447;
  --accent-contrast: #ffffff;
  --accent-soft: #282e20;
  --accent-strong: var(--krelen-sage);
  --success: #91b39a;
  --success-soft: rgba(145, 179, 154, 0.1);
  --warning: #c9aa72;
  --warning-soft: rgba(201, 170, 114, 0.1);
  --danger: #d69c96;
  --danger-soft: rgba(214, 156, 150, 0.1);
  --danger-contrast: #191b19;
  --info: #a6ad8a;
  --info-soft: #282e20;
  --focus-ring: var(--krelen-sage);
  --surface-rgb: 25 27 25;
  --accent-soft-rgb: 40 46 32;
  --text-rgb: 242 241 234;
  --muted-rgb: 164 166 155;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.12);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.2);
}

html[data-theme="graphite"],
.app-shell[data-theme="graphite"] {
  color-scheme: dark;
  --bg-page: #141614;
  --bg-surface: #191b19;
  --bg-subtle: #1e211d;
  --text-primary: #f2f1ea;
  --text-secondary: #b3b5aa;
  --text-muted: #a4a69b;
  --border-default: rgba(255, 255, 255, 0.2);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --accent: #687447;
  --accent-contrast: #ffffff;
  --accent-soft: #282e20;
  --accent-strong: var(--krelen-sage);
  --success: #91b39a;
  --success-soft: rgba(145, 179, 154, 0.1);
  --warning: #c9aa72;
  --warning-soft: rgba(201, 170, 114, 0.1);
  --danger: #d69c96;
  --danger-soft: rgba(214, 156, 150, 0.1);
  --danger-contrast: #191b19;
  --info: #a6ad8a;
  --info-soft: #282e20;
  --focus-ring: var(--krelen-sage);
  --surface-rgb: 25 27 25;
  --accent-soft-rgb: 40 46 32;
  --text-rgb: 242 241 234;
  --muted-rgb: 164 166 155;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.12);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.2);
}

500;600;700&family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&display=swap');






.returns-screen { width:100%; max-width:none; padding-inline:24px; }
.returns-page-head { margin-bottom:14px; }
.returns-page-head h1 { margin:3px 0 0; }
.returns-summary { display:flex; align-items:center; gap:12px; margin-bottom:10px; color:var(--ink); font-size:13px; }
.returns-summary span { color:var(--muted); font-size:12px; }
.returns-table { width:100%; overflow:hidden; background:var(--surface); border:1px solid var(--line); border-radius:14px; }
.returns-table-head, .returns-table-row { display:grid; grid-template-columns:minmax(150px,1.15fr) 120px minmax(280px,2.6fr) 150px 140px; align-items:center; column-gap:16px; }
.returns-table-head { min-height:40px; padding:0 16px; background:#F7FAFA; color:var(--muted); font-size:12px; font-weight:600; }
.returns-table-row { min-height:76px; padding:14px 16px; border-top:1px solid var(--line); box-sizing:border-box; }
.returns-table-row:hover { background:color-mix(in srgb, var(--accent) 3%, var(--surface)); }
.return-order-cell, .return-items-cell { min-width:0; display:grid; gap:3px; }
.return-order-cell strong { color:var(--ink); font-size:14px; font-weight:700; direction:ltr; text-align:start; }
.return-order-cell small, .return-destination-label { color:var(--muted); font-size:11px; }
.return-items-cell span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--ink); font-size:13px; }
.return-count-badge { display:inline-flex; align-items:center; width:max-content; min-height:26px; padding:0 9px; border:1px solid #CDE4E4; border-radius:999px; background:#F1F8F8; color:#17636A; font-size:11px; font-weight:700; white-space:nowrap; }
.return-destination-value { display:block; margin-top:3px; color:var(--ink); font-size:13px; }
.return-confirm-btn { height:40px; min-height:40px; padding-inline:14px; white-space:nowrap; }
.returns-state { margin:0; padding:28px 16px; color:var(--muted); text-align:center; font-size:13px; }
@media (max-width:900px) {
  .returns-screen { padding-inline:16px; }
  .returns-table { overflow-x:auto; }
  .returns-table-head, .returns-table-row { min-width:860px; }
}

html, body, button, input, select, textarea {
  font-family: var(--font-ui);
}
body { font-variant-numeric: tabular-nums; }







html[data-theme="rose"] body,
html[data-theme="ocean"] body,
html[data-theme="sand"] body,
html[data-theme="mint"] body,
html[data-theme="lavender"] body,
html[data-theme="midnight"] body,
html[data-theme="graphite"] body,
html[data-theme="neutral"] body {
  background: var(--bg-page);
}


.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, 0.92fr) minmax(420px, 1.08fr);
  padding: 22px;
  gap: 18px;
}

.login-brand-panel,
.login-card {
  min-height: calc(100vh - 44px);
  border-radius: 32px;
}

.login-brand-panel {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(32px, 6vw, 72px);
  color: var(--surface-tint);
  background:
    radial-gradient(circle at 18% 18%, rgb(var(--accent-rgb) / 0.14), transparent 48%),
    var(--krelen-black);
  box-shadow: var(--shadow-sm);
}

.login-brand-panel::after {
  content: "";
  position: absolute;
  inset-inline-end: -24px;
  bottom: -88px;
  font-family: Georgia, serif;
  font-size: clamp(260px, 30vw, 520px);
  line-height: 1;
  color: rgba(255, 255, 255, 0.035);
  pointer-events: none;
}

.login-brand-mark {
  position: relative;
  width: 144px;
  height: 144px;
  border-radius: 34px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
}

.login-brand-mark img {
  object-fit: contain;
  transform: scale(1.08);
}

.login-brand-panel > div:last-child {
  position: relative;
  z-index: 1;
  max-width: 620px;
}

.login-brand-panel span,
.login-heading > span,
.screen-heading > div > span,
.home-hero > div > span {
  color: var(--accent-soft);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.login-brand-panel h1 {
  max-width: 620px;
  margin: 18px 0 14px;
  font-size: clamp(40px, 5.2vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.login-brand-panel p {
  max-width: 520px;
  margin: 0;
  color: rgba(255, 248, 251, 0.7);
  font-size: 17px;
  line-height: 1.8;
}

.login-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(32px, 8vw, 110px);
  border: 1px solid var(--line);
  background: rgba(255, 252, 249, 0.94);
  box-shadow: var(--shadow);
}

.login-language {
  align-self: flex-end;
  display: flex;
  padding: 4px;
  margin-bottom: 64px;
  border-radius: 999px;
  background: var(--surface-tint-strong);
}

.login-language button {
  min-width: 86px;
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
}

.login-language button.active {
  background: #fff;
  color: var(--text);
  box-shadow: 0 6px 18px rgba(49, 13, 26, 0.08);
}

.login-heading h2 {
  margin: 8px 0 10px;
  font-size: clamp(38px, 4vw, 58px);
  letter-spacing: -0.045em;
}

.login-heading p {
  margin: 0;
  color: var(--muted);
}

.login-form {
  display: grid;
  gap: 18px;
  margin-top: 42px;
}

.login-form label,
.password-settings-form label,
.create-user-card label,
.permission-user-toolbar label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.login-form input,
.password-settings-form input,
.create-user-card input,
.create-user-card select,
.permission-user-toolbar select {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  color: var(--text);
  outline: none;
}

.login-form input:focus,
.password-settings-form input:focus,
.create-user-card input:focus,
.create-user-card select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgb(var(--accent-rgb) / 0.08);
}

.password-input-wrap {
  position: relative;
}

.password-input-wrap input {
  padding-inline-end: 78px;
}

.password-input-wrap button {
  position: absolute;
  inset-inline-end: 8px;
  top: 8px;
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: var(--surface-tint-strong);
  color: var(--accent-strong);
}

.login-error {
  padding: 13px 15px;
  border: 1px solid rgba(181, 61, 86, 0.18);
  border-radius: 14px;
  background: rgba(181, 61, 86, 0.07);
  color: var(--danger);
  font-size: 14px;
}

.login-submit {
  min-height: 54px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
  font-weight: 800;
  box-shadow: 0 16px 34px rgba(141, 21, 69, 0.22);
}

.login-submit:disabled {
  cursor: wait;
  opacity: 0.68;
}

.forgot-password-link {
  justify-self: center;
  color: var(--accent-strong);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.forgot-password-link:hover,
.forgot-password-link:focus-visible {
  color: var(--accent);
  text-decoration: underline;
}

.setup-password-card .login-language {
  margin-bottom: 46px;
}

.invite-status,
.invite-error-state {
  margin-top: 36px;
}

.invite-status {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  color: var(--muted);
  font-size: 14px;
}

.invite-status.success {
  border-color: rgba(45, 138, 98, 0.2);
  background: rgba(45, 138, 98, 0.08);
  color: var(--success);
}

.invite-error-state {
  display: grid;
  gap: 16px;
}

.invite-error-state a {
  justify-self: start;
  color: var(--accent-strong);
  font-weight: 800;
  text-decoration: none;
}

.sidebar-home-item {
  margin-top: 14px;
}

.sidebar-utility-nav {
  gap: 8px;
}

.screen-page {
  min-height: calc(100vh - 64px);
  animation: screen-enter 240ms ease both;
}

.account-statement-screen { padding: 0 18px 32px; }
.reports-screen { display: grid; gap: 16px; padding: 0 18px 32px; }
.reports-heading { padding-bottom: 4px; }
.reports-heading p { max-width: 680px; margin: 9px 0 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
.reports-statement-link, .reports-refresh { min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-strong); color: var(--accent-strong); font: inherit; font-weight: 800; }
.reports-statement-link:hover, .reports-statement-link:focus-visible { border-color: var(--line-strong); background: var(--surface-tint); }
.reports-controls { display: flex; align-items: end; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.reports-controls label { display: grid; gap: 6px; min-width: 168px; color: var(--muted); font-size: 12px; font-weight: 750; }
.reports-controls input, .reports-controls select { min-height: var(--control-height); padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-strong); color: var(--text); font: inherit; }
.reports-controls .dashboard-date-value { color: var(--text-soft); font-size: 10px; font-weight: 650; letter-spacing: .03em; text-align: start; }
.reports-refresh { border-color: transparent; background: var(--accent); color: var(--accent-contrast); }
.reports-refresh:disabled { opacity: .65; cursor: wait; }
.reports-error, .reports-loading, .report-empty { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-strong); color: var(--muted); }
.reports-error { border-color: color-mix(in srgb, var(--danger) 32%, var(--line)); color: var(--danger); }
.reports-metrics { display: grid; grid-template-columns: repeat(6, minmax(135px, 1fr)); gap: 10px; }
.report-metric { min-height: 108px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-strong); box-shadow: var(--shadow-sm); }
.report-metric span { display: block; color: var(--muted); font-size: 12px; font-weight: 700; }
.report-metric strong { display: block; margin-top: 12px; color: var(--text); font-size: clamp(19px, 2vw, 25px); letter-spacing: -.03em; direction: ltr; text-align: start; }
.metric-currency strong { color: var(--accent-strong); }
.reports-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr); gap: 14px; }
.report-panel { min-width: 0; padding: 17px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface-strong); box-shadow: var(--shadow-sm); }
.report-panel-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.report-panel-heading h3 { margin: 0; color: var(--text); font-size: 17px; }
.report-panel-heading > span { color: var(--muted); font-size: 12px; }
.channel-list, .status-list { display: grid; gap: 10px; }
.channel-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.channel-row:last-child { padding-bottom: 0; border-bottom: 0; }
.channel-row > div:first-child { display: grid; gap: 4px; min-width: 0; }
.channel-row strong { overflow: hidden; color: var(--text); text-overflow: ellipsis; white-space: nowrap; }
.channel-row span { color: var(--muted); font-size: 12px; }
.channel-value { display: grid; justify-items: end; gap: 7px; min-width: 126px; direction: ltr; }
.channel-value > strong { color: var(--accent-strong); font-size: 14px; }
.channel-value i { display: block; width: 126px; height: 5px; overflow: hidden; border-radius: 999px; background: var(--surface-tint-strong); }
.channel-value i b { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.status-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.status-list > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-tint); }
.status-list span { color: var(--muted); font-size: 13px; }
.status-list strong { color: var(--text); direction: ltr; }
.report-items-panel, .report-daily-panel { grid-column: span 1; }
.report-table-wrap { overflow-x: auto; }
.report-table { width: 100%; min-width: 360px; border-collapse: collapse; }
.report-table th, .report-table td { padding: 11px 8px; border-bottom: 1px solid var(--line); text-align: start; }
.report-table th { color: var(--muted); font-size: 11px; font-weight: 800; }
.report-table td { color: var(--text); font-size: 13px; }
.report-table td:nth-last-child(-n+2), .report-table th:nth-last-child(-n+2) { direction: ltr; text-align: end; }
.report-table tr:last-child td { border-bottom: 0; }
.report-table td strong, .report-table td small { display: block; }
.report-table td small { margin-top: 3px; color: var(--muted); font-size: 11px; direction: ltr; }
.reports-main-empty { min-height: 180px; display: grid; place-items: center; text-align: center; }


.performance-dashboard {
  --chart-series-1: var(--accent);
  --chart-series-2: var(--info);
  --chart-series-3: var(--warning);
  --chart-series-4: var(--success);
  --chart-series-5: var(--danger);
  gap: 18px;
}
.dashboard-heading { align-items: flex-start; }
.dashboard-heading > div { min-width: 0; }
.dashboard-heading h2 { max-width: 760px; }
.dashboard-applied-period { display: inline-flex; gap: 6px; margin-top: 6px; color: var(--muted); font-size: 11px; font-weight: 700; }
.dashboard-applied-period strong { color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.dashboard-pending-filters { display: block; margin-top: 5px; color: var(--warning); font-size: 11px; font-weight: 700; }
.dashboard-controls { align-items: end; display: grid; grid-template-columns: minmax(140px, .62fr) repeat(2, minmax(148px, .72fr)) minmax(220px, 1.2fr) minmax(246px, 1.05fr) auto; }
.dashboard-controls > label, .dashboard-platform-picker, .dashboard-mode { min-width: 0; }
.dashboard-platform-picker, .dashboard-mode { display: grid; position: relative; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 750; }
.dashboard-picker-trigger { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: var(--control-height); gap: 10px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-strong); color: var(--text); font: inherit; text-align: start; }
.dashboard-picker-trigger:hover, .dashboard-picker-trigger:focus-visible { border-color: var(--line-strong); background: var(--surface-tint); }
.dashboard-picker-trigger.has-selection { color: var(--accent-strong); }
.dashboard-picker-trigger strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-picker-trigger i { color: var(--accent); font-size: 16px; font-style: normal; }
.dashboard-picker-popover { position: absolute; z-index: 35; top: calc(100% + 7px); inset-inline: 0; display: grid; gap: 9px; min-width: min(360px, calc(100vw - 36px)); padding: 10px; border: 1px solid var(--line-strong); border-radius: 15px; background: var(--surface-strong); box-shadow: var(--shadow-md); }
.dashboard-picker-tools { display: flex; gap: 8px; }
.dashboard-picker-tools input { min-width: 0; flex: 1; min-height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; }
.dashboard-picker-tools button { min-height: 38px; padding: 0 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-tint); color: var(--accent-strong); font: inherit; font-weight: 750; }
.dashboard-picker-options { display: grid; max-height: 230px; overflow: auto; border-top: 1px solid var(--line); }
.dashboard-picker-options label { display: flex; align-items: center; gap: 9px; min-height: 39px; padding: 7px 3px; border-bottom: 1px solid var(--line); color: var(--text); cursor: pointer; font-size: 13px; font-weight: 650; }
.dashboard-picker-options label:last-child { border-bottom: 0; }
.dashboard-picker-options input { accent-color: var(--accent); }
.dashboard-mode > div { display: flex; min-height: var(--control-height); overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-strong); }
.dashboard-mode button { flex: 1; min-width: 0; padding: 0 10px; border: 0; border-inline-end: 1px solid var(--line); background: transparent; color: var(--muted); font: inherit; font-size: 12px; font-weight: 750; }
.dashboard-mode button:last-child { border-inline-end: 0; }
.dashboard-mode button.active { background: var(--surface-tint-strong); color: var(--accent-strong); }
.dashboard-metrics { grid-template-columns: repeat(5, minmax(150px, 1fr)); }
.dashboard-metric { position: relative; overflow: hidden; min-height: 100px; }
.dashboard-metric::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--accent); }
.dashboard-metric.tone-success::before { background: var(--success); }
.dashboard-metric.tone-warning::before { background: var(--warning); }
.dashboard-metric.tone-danger::before { background: var(--danger); }
.dashboard-metric strong { margin-top: 9px; }
.dashboard-metric.tone-success strong { color: var(--success); }
.dashboard-metric.tone-warning strong { color: var(--warning); }
.dashboard-metric.tone-danger strong { color: var(--danger); }
.dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.dashboard-panel { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface-strong); box-shadow: var(--shadow-sm); }
.dashboard-panel.dashboard-wide { grid-column: 1 / -1; }
.dashboard-panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.dashboard-panel-heading h3, .dashboard-panel-heading p { margin: 0; }
.dashboard-panel-heading h3 { color: var(--text); font-size: 16px; letter-spacing: -.01em; }
.dashboard-panel-heading p { max-width: 620px; margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.chart-wrap { position: relative; display: grid; gap: 9px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 7px 14px; min-height: 21px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 700; }
.chart-legend i, .donut-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
.dashboard-line-chart, .dashboard-column-chart { display: block; width: 100%; min-height: 190px; max-height: 280px; overflow: visible; }
.records-table tr.inactive-record td { background: var(--surface-tint); color: var(--muted); }
.records-table tr.inactive-record .account-tree-name,
.records-table tr.inactive-record td:not(:has(.active-state-badge)) { text-decoration: line-through; text-decoration-thickness: 1px; text-decoration-color: var(--muted); }
.records-table tr.inactive-record .inline-open,
.records-table tr.inactive-record .active-state-badge { text-decoration: none; }
.active-state-badge { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 8px; border: 1px solid var(--line); border-radius: 999px; font-size: 11px; font-weight: 750; line-height: 1; text-decoration: none; }
.active-state-badge.active { border-color: color-mix(in srgb, var(--success) 32%, var(--line)); background: color-mix(in srgb, var(--success) 10%, var(--surface-strong)); color: var(--success); }
.active-state-badge.inactive { border-color: color-mix(in srgb, var(--danger) 28%, var(--line)); background: color-mix(in srgb, var(--danger) 8%, var(--surface-strong)); color: var(--danger); }
.chart-grid-line { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart-zero-line { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 4 4; opacity: .5; vector-effect: non-scaling-stroke; }
.chart-axis-label { fill: var(--muted); font-size: 11px; font-weight: 650; }
.chart-axis-value { fill: var(--muted); font-size: 10px; font-weight: 650; direction: ltr; }
.chart-axis-title { fill: var(--muted); font-size: 10px; font-weight: 750; }
.dashboard-chart-bar { cursor: pointer; outline: none; transition: opacity 140ms ease, filter 140ms ease; }
.dashboard-chart-bar:hover, .dashboard-chart-bar:focus-visible { filter: brightness(1.05); opacity: .82; }
.dashboard-chart-bar:focus-visible { stroke: var(--text); stroke-width: 1.5; }
.dashboard-chart-tooltip { position: absolute; z-index: 2; left: var(--tooltip-x); top: calc(42px + var(--tooltip-y)); display: inline-flex; align-items: center; gap: 6px; min-height: 28px; max-width: min(260px, calc(100% - 20px)); padding: 5px 8px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface-strong); box-shadow: var(--shadow-md); color: var(--text); font-size: 11px; line-height: 1.2; pointer-events: none; transform: translate(-50%, -115%); white-space: nowrap; }
.dashboard-chart-tooltip i { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; }
.dashboard-chart-tooltip span { overflow: hidden; color: var(--muted); text-overflow: ellipsis; }
.dashboard-chart-tooltip strong { direction: ltr; }
.dashboard-empty { display: grid; min-height: 220px; place-items: center; margin: 0; padding: 14px; border: 1px dashed var(--line-strong); border-radius: 14px; color: var(--muted); text-align: center; }
.platform-balance-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: 10px; }
.platform-balance-grid article { display: grid; gap: 8px; min-height: 92px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-tint); }
.platform-balance-grid span { overflow: hidden; color: var(--muted); font-size: 12px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.platform-balance-grid strong { color: var(--accent-strong); font-size: 19px; letter-spacing: -.02em; direction: ltr; text-align: start; }
.platform-balance-grid strong.negative { color: var(--danger); }
.dashboard-item-grouping { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.dashboard-item-grouping-mode { display: flex; align-items: center; gap: 10px; min-width: 0; }
.dashboard-item-grouping-mode > span, .dashboard-item-limit > span { color: var(--muted); font-size: 12px; font-weight: 750; white-space: nowrap; }
.dashboard-item-grouping-mode > div { display: inline-flex; min-height: 38px; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.dashboard-item-grouping button { min-width: 92px; padding: 0 11px; border: 0; border-inline-end: 1px solid var(--line); background: transparent; color: var(--muted); font: inherit; font-size: 12px; font-weight: 750; }
.dashboard-item-grouping-mode button:last-child { border-inline-end: 0; }
.dashboard-item-grouping button:hover, .dashboard-item-grouping button:focus-visible { background: var(--surface-tint); color: var(--accent-strong); }
.dashboard-item-grouping button.active { background: var(--surface-tint-strong); color: var(--accent-strong); }
.dashboard-item-limit { display: inline-flex; align-items: center; gap: 7px; }
.dashboard-item-limit select { min-height: 38px; min-width: 70px; padding: 0 10px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--text); font: inherit; font-size: 13px; font-weight: 800; direction: ltr; }
.dashboard-item-search { display: grid; gap: 5px; min-width: min(245px, 100%); }
.dashboard-item-search > span { color: var(--muted); font-size: 12px; font-weight: 750; }
.dashboard-item-search input { min-height: 38px; width: 100%; padding: 0 11px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--text); font: inherit; font-size: 12px; }
.dashboard-item-search input:focus-visible { border-color: var(--line-strong); outline: 2px solid color-mix(in srgb, var(--accent) 25%, transparent); outline-offset: 1px; }
.dashboard-item-ranking-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.dashboard-item-ranking { min-width: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.dashboard-item-ranking h4 { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0; padding: 12px 13px; border-bottom: 1px solid var(--line); color: var(--text); font-size: 13px; }
.dashboard-item-ranking h4 > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-item-ranking h4 > b { display: inline-flex; align-items: baseline; flex: 0 0 auto; gap: 4px; color: var(--accent-strong); font-size: 12px; direction: ltr; }
.dashboard-item-ranking h4 > b em { color: var(--muted); font-size: 9px; font-style: normal; font-weight: 650; }
.dashboard-item-ranking ol { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.dashboard-item-ranking li { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 54px; padding: 7px 11px; border-bottom: 1px solid var(--line); }
.dashboard-item-ranking li:last-child { border-bottom: 0; }
.dashboard-item-rank { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; background: var(--surface-tint-strong); color: var(--accent-strong); font-size: 11px; font-weight: 800; direction: ltr; }
.dashboard-item-ranking li > div { min-width: 0; }
.dashboard-item-ranking li strong, .dashboard-item-ranking li small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-item-ranking li strong { color: var(--text); font-size: 12px; }
.dashboard-item-ranking li small { margin-top: 3px; color: var(--muted); font-size: 10px; direction: ltr; }
.dashboard-item-ranking li b { display: grid; justify-items: end; color: var(--accent-strong); font-size: 12px; direction: ltr; }
.dashboard-item-ranking li b em { margin-top: 2px; color: var(--muted); font-size: 9px; font-style: normal; font-weight: 650; }
.dashboard-item-empty { min-height: 125px; display: grid; place-items: center; margin: 0; padding: 12px; color: var(--muted); font-size: 12px; text-align: center; }
.donut-layout { display: grid; grid-template-columns: minmax(130px, .72fr) minmax(150px, 1fr); align-items: center; gap: 10px; min-height: 220px; }
.dashboard-donut { display: block; width: min(100%, 190px); margin: auto; overflow: visible; }
.donut-total-label { fill: var(--muted); font-size: 10px; font-weight: 700; }
.donut-total-value { fill: var(--text); font-size: 10px; font-weight: 800; direction: ltr; }
.donut-legend { display: grid; gap: 8px; }
.donut-legend > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.donut-legend > div:last-child { padding-bottom: 0; border-bottom: 0; }
.donut-legend span { display: inline-flex; min-width: 0; align-items: center; gap: 6px; overflow: hidden; color: var(--muted); font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.donut-legend strong { flex: 0 0 auto; color: var(--text); font-size: 12px; direction: ltr; }
@media (max-width: 1220px) { .dashboard-controls { grid-template-columns: repeat(2, minmax(180px, 1fr)); } .dashboard-controls .reports-refresh { grid-column: span 2; } .dashboard-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); } .dashboard-item-ranking-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .dashboard-controls { grid-template-columns: 1fr; } .dashboard-controls .reports-refresh { grid-column: auto; width: 100%; } .dashboard-grid { grid-template-columns: 1fr; } .dashboard-panel.dashboard-wide { grid-column: auto; } .dashboard-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dashboard-metric:last-child { grid-column: 1 / -1; } .dashboard-panel { padding: 15px; } .donut-layout { grid-template-columns: 1fr; } .dashboard-donut { width: 155px; } .dashboard-item-grouping { align-items: stretch; flex-direction: column; } .dashboard-item-grouping-mode { align-items: stretch; flex-direction: column; } .dashboard-item-grouping-mode > div { width: 100%; } .dashboard-item-grouping button { min-width: 0; flex: 1; padding-inline: 6px; } .dashboard-item-search { min-width: 0; } .dashboard-item-limit { justify-content: space-between; } .dashboard-item-ranking-grid { grid-template-columns: 1fr; } }


.performance-dashboard { max-width:1560px; margin-inline:auto; gap:20px; }
.performance-dashboard .dashboard-heading { min-height:0; margin-bottom:4px; }
.performance-dashboard .dashboard-heading h2 { font-size:36px; line-height:1.15; letter-spacing:-.035em; }
.performance-dashboard .dashboard-controls { padding:14px 16px; border:1px solid var(--border-subtle); border-radius:16px; background:var(--bg-surface); box-shadow:var(--shadow-sm); }
.performance-dashboard .dashboard-controls input,
.performance-dashboard .dashboard-controls select,
.performance-dashboard .dashboard-controls button { min-height:43px; height:43px; border-radius:12px; }
.performance-dashboard .dashboard-metrics { gap:12px; }
.performance-dashboard .dashboard-metric { min-height:112px; padding:18px 20px; border:1px solid var(--border-subtle); border-radius:16px; background:var(--bg-surface); box-shadow:var(--shadow-sm); }
.performance-dashboard .dashboard-metric::before { width:3px; opacity:.7; }
.performance-dashboard .dashboard-metric strong { font-size:34px; line-height:1.1; font-variant-numeric:tabular-nums; }
.performance-dashboard .dashboard-grid { gap:16px; align-items:start; }
.performance-dashboard .dashboard-panel { padding:18px 20px; border:1px solid var(--border-subtle); border-radius:16px; background:var(--bg-surface); box-shadow:var(--shadow-sm); }
.performance-dashboard .dashboard-panel-heading { margin-bottom:10px; }
.performance-dashboard .dashboard-panel-heading h3 { font-size:19px; font-weight:600; }
.performance-dashboard .dashboard-panel-heading p { color:var(--text-secondary); font-size:12px; }
.performance-dashboard .dashboard-line-chart,
.performance-dashboard .dashboard-column-chart { min-height:205px; }
.performance-dashboard .dashboard-item-grouping { margin-bottom:10px; padding-bottom:10px; }
.performance-dashboard .dashboard-item-ranking-grid { gap:10px; }
.performance-dashboard .dashboard-item-ranking { border-color:var(--border-subtle); border-radius:14px; box-shadow:none; }
.performance-dashboard .dashboard-item-ranking li { min-height:48px; padding:6px 10px; }
.performance-dashboard .dashboard-item-ranking li:hover { background:var(--bg-subtle); }
.performance-dashboard .dashboard-donut { width:min(100%,210px); }
@media (max-width:1220px) { .performance-dashboard .dashboard-metrics { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media (max-width:760px) { .performance-dashboard .dashboard-heading h2 { font-size:28px; } .performance-dashboard .dashboard-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); } .performance-dashboard .dashboard-panel { padding:15px; } }


.performance-dashboard .dashboard-grid { align-items: start; gap: 18px; }
.performance-dashboard .dashboard-panel.dashboard-hero-chart {
  min-height: 420px;
  padding: 16px 18px 14px;
}
.performance-dashboard .dashboard-panel.dashboard-secondary-chart {
  min-height: 340px;
  padding: 16px 18px 14px;
}
.performance-dashboard .dashboard-hero-chart .dashboard-column-chart { height: 342px; max-height: none; }
.performance-dashboard .dashboard-secondary-chart .dashboard-column-chart { height: 262px; max-height: none; }
.performance-dashboard .dashboard-panel.dashboard-hero-chart .dashboard-panel-heading,
.performance-dashboard .dashboard-panel.dashboard-secondary-chart .dashboard-panel-heading { margin-bottom: 8px; }
.performance-dashboard .chart-wrap { gap: 6px; }
.performance-dashboard .chart-legend { min-height: 20px; gap: 5px 11px; }
.performance-dashboard .chart-legend span { font-size: 11px; font-weight: 650; }
.performance-dashboard .chart-legend i { width: 8px; height: 8px; }
.performance-dashboard .chart-grid-line { opacity: .42; }
.performance-dashboard .chart-zero-line { stroke-width: 1.35; opacity: .72; }
.performance-dashboard .dashboard-chart-tooltip { max-width: min(360px, calc(100% - 20px)); padding: 7px 9px; border-radius: 10px; box-shadow: var(--shadow-sm); white-space: normal; }
.performance-dashboard .platform-balance-grid { gap: 8px; }
.performance-dashboard .platform-balance-grid article { min-height: 76px; padding: 11px 12px; gap: 5px; background: var(--bg-subtle); }
.performance-dashboard .dashboard-donut-panel { min-height: 300px; padding: 16px 18px; }
.performance-dashboard .dashboard-donut-panel:last-child { grid-column: 1 / -1; }
.performance-dashboard .dashboard-donut-panel .donut-layout { min-height: 250px; }
.performance-dashboard .dashboard-donut-panel .dashboard-donut { width: min(100%, 220px); }
.performance-dashboard .dashboard-donut-panel .donut-legend { gap: 6px; }
.performance-dashboard .dashboard-donut-panel .donut-legend > div { padding-bottom: 6px; }
@media (max-width:760px) {
  .performance-dashboard .dashboard-panel.dashboard-hero-chart,
  .performance-dashboard .dashboard-panel.dashboard-secondary-chart { min-height: 0; }
  .performance-dashboard .dashboard-hero-chart .dashboard-column-chart,
  .performance-dashboard .dashboard-secondary-chart .dashboard-column-chart { height: auto; min-height: 230px; }
  .performance-dashboard .dashboard-donut-panel:last-child { grid-column: auto; }
}
.standard-reports-screen { display: grid; gap: 16px; padding: 0 18px 32px; }
.standard-report-workspace { display: grid; gap: 14px; }
.standard-report-workspace > .report-panel-heading { margin: 0; padding-inline: 2px; }
.report-controls-card { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)) auto; align-items: end; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.report-control-field, .report-picker { display: grid; position: relative; min-width: 0; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 750; }
.report-control-field input, .report-control-field select { width: 100%; min-height: var(--control-height); padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-strong); color: var(--text); font: inherit; }
.report-control-item { min-width: min(280px, 100%); }
.report-picker-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-picker-trigger { display: flex; align-items: center; justify-content: space-between; min-width: 0; min-height: var(--control-height); padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-strong); color: var(--text); font: inherit; text-align: start; transition: border-color 160ms ease, background 160ms ease; }
.report-picker-trigger:hover, .report-picker-trigger:focus-visible { border-color: var(--line-strong); background: var(--surface-tint); }
.report-picker-trigger.has-selection { color: var(--accent-strong); }
.report-picker-trigger strong { overflow: hidden; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.report-picker-trigger i { flex: 0 0 auto; margin-inline-start: 8px; color: var(--accent); font-size: 16px; font-style: normal; }
.report-picker-popover { position: absolute; z-index: 32; top: calc(100% + 7px); inset-inline: 0; display: grid; gap: 9px; min-width: min(340px, calc(100vw - 48px)); padding: 10px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--surface-strong); box-shadow: var(--shadow-lg); }
.report-picker-search { display: flex; gap: 7px; }
.report-picker-search input { min-width: 0; flex: 1; min-height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; }
.report-picker-search button { flex: 0 0 auto; min-height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--accent-strong); font: inherit; font-size: 12px; font-weight: 750; }
.report-picker-options { display: grid; max-height: 245px; overflow: auto; border-top: 1px solid var(--line); }
.report-picker-options label { display: flex; align-items: center; gap: 9px; min-height: 38px; padding: 7px 3px; border-bottom: 1px solid var(--line); color: var(--text); cursor: pointer; font-size: 13px; font-weight: 650; }
.report-picker-options label:last-child { border-bottom: 0; }
.report-picker-options input { accent-color: var(--accent); }
.report-picker-options span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: inherit; }
.report-picker-options p { margin: 10px 3px; color: var(--muted); font-size: 12px; }
.standard-ledger-launch { display: grid; gap: 12px; max-width: 760px; }
.standard-ledger-launch h3, .standard-ledger-launch p { margin: 0; }
.standard-ledger-launch p, .standard-report-hint { color: var(--muted); line-height: 1.7; }
.standard-report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.standard-report-wide { grid-column: 1 / -1; }
.standard-section-total, .standard-totals, .standard-summary { display: flex; flex-wrap: wrap; gap: 10px; }
.standard-section-total { justify-content: space-between; margin-top: 14px; padding: 12px; border-radius: 12px; background: var(--surface-tint); color: var(--muted); }
.standard-section-total strong, .standard-totals strong, .standard-summary strong { color: var(--text); direction: ltr; }
.standard-totals, .standard-summary { padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-strong); box-shadow: var(--shadow-sm); }
.standard-totals span, .standard-summary span { display: grid; flex: 1 1 180px; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 750; }
.standard-totals strong, .standard-summary strong { font-size: 19px; }
.standard-report-hint { margin: 0; padding: 13px 15px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-tint); }
.standard-report-empty { padding-block: 24px !important; color: var(--muted) !important; text-align: center !important; }
.report-main-account td { background: color-mix(in srgb, var(--accent) 7%, var(--surface-strong)); font-weight: 800; }
.report-main-account td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.standard-balance-difference { border-inline-start: 1px solid var(--line); padding-inline-start: 12px; }
@media (max-width: 980px) { .report-controls-card { grid-template-columns: repeat(2, minmax(0, 1fr)); } .report-controls-card .reports-refresh { grid-column: span 2; } }
@media (max-width: 760px) { .standard-reports-screen { padding-inline: 4px; } .standard-report-grid { grid-template-columns: 1fr; } .standard-report-wide { grid-column: auto; } .report-controls-card { grid-template-columns: 1fr; } .report-controls-card .reports-refresh { grid-column: auto; width: 100%; } .report-picker-popover { min-width: 0; } }
@media (max-width: 1200px) { .reports-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .reports-screen { padding-inline: 4px; } .reports-heading { align-items: stretch; } .reports-statement-link { width: 100%; } .reports-controls { display: grid; grid-template-columns: 1fr; } .reports-controls label { min-width: 0; } .reports-metrics, .reports-grid { grid-template-columns: 1fr; } .status-list { grid-template-columns: 1fr; } .report-items-panel, .report-daily-panel { grid-column: auto; } }
.statement-controls { display: grid; grid-template-columns: repeat(3, minmax(170px, 1fr)); gap: 12px; padding: 18px; border: 1px solid var(--line); border-radius: 22px; background: rgba(255, 255, 255, 0.78); }
.statement-controls label { display: grid; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 700; }
.statement-controls select, .statement-controls input { min-width: 0; min-height: 46px; padding: 0 13px; border: 1px solid var(--line); border-radius: 13px; background: #fff; color: var(--text); font: inherit; }
.statement-load { align-self: end; min-height: 46px; padding: 0 20px; border: 0; border-radius: 13px; background: var(--accent); color: var(--accent-contrast); font-weight: 800; }
.statement-load:disabled { opacity: .65; cursor: wait; }
.statement-account-chip { display: inline-flex; gap: 10px; align-items: center; margin: 16px 0 0; padding: 9px 13px; border-radius: 999px; background: var(--surface-tint-strong); color: var(--accent-strong); }
.statement-account-chip span { color: var(--muted); font-size: 12px; direction: ltr; }
.statement-error, .statement-empty { margin-top: 16px; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: #fff; color: var(--muted); }
.statement-error { border-color: rgba(181, 61, 86, .22); color: var(--danger); }
.statement-summary { display: grid; grid-template-columns: repeat(4, minmax(140px, 1fr)); gap: 12px; margin-top: 16px; }
.statement-summary > div { padding: 17px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.statement-summary span { display: block; color: var(--muted); font-size: 12px; }
.statement-summary strong { display: block; margin-top: 8px; font-size: 24px; direction: ltr; text-align: start; }
.statement-summary .closing { border-color: rgba(45, 138, 98, .28); background: rgba(45, 138, 98, .06); }
.statement-table-card { margin-top: 16px; overflow: auto; border: 1px solid var(--line); border-radius: 20px; background: #fff; }
.statement-table { width: 100%; min-width: 720px; table-layout: fixed; border-collapse: collapse; }
.statement-table th, .statement-table td { padding: 11px 10px; border-bottom: 1px solid var(--line); text-align: start; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.statement-table th:nth-child(1), .statement-table td:nth-child(1) { width: 10%; }
.statement-table th:nth-child(2), .statement-table td:nth-child(2) { width: 17%; }
.statement-table th:nth-child(3), .statement-table td:nth-child(3) { width: 12%; }
.statement-table th:nth-child(4), .statement-table td:nth-child(4) { width: 18%; }
.statement-table th:nth-child(5), .statement-table td:nth-child(5), .statement-table th:nth-child(6), .statement-table td:nth-child(6), .statement-table th:nth-child(7), .statement-table td:nth-child(7) { width: 10%; }
.statement-table th:nth-child(8), .statement-table td:nth-child(8) { width: 13%; }
.statement-table th { color: var(--muted); font-size: 12px; background: var(--surface-tint); }
.statement-table td:nth-last-child(2), .statement-table th:nth-last-child(2), .statement-table td:nth-last-child(3), .statement-table th:nth-last-child(3) { direction: ltr; }
.statement-opening td { background: var(--surface-tint-strong); color: var(--muted); font-weight: 700; }
.statement-open { padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--accent-strong); font-weight: 700; }
.statement-table-tools, .statement-pagination { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin-top: 16px; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-strong); }
.statement-table-tools label, .statement-pagination label { display: grid; gap: 5px; color: var(--muted); font-size: 12px; font-weight: 700; }
.statement-table-tools select, .statement-table-tools input, .statement-pagination select, .statement-pagination input { min-height: 38px; min-width: 120px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; }
.statement-table-tools input { min-width: 220px; }
.statement-filter-clear, .statement-pagination button { min-height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; font-weight: 700; }
.statement-pagination { justify-content: end; align-items: center; }
.statement-pagination > span:first-child { margin-inline-end: auto; color: var(--muted); font-size: 13px; }
.statement-pagination input { width: 64px; min-width: 64px; }
.statement-pagination button:disabled { opacity: .45; cursor: not-allowed; }
.statement-sort { display: inline-flex; align-items: center; gap: 6px; border: 0; padding: 0; background: transparent; color: inherit; font: inherit; font-weight: 800; cursor: pointer; }
.statement-sort i { color: var(--accent); font-style: normal; }
@media (max-width: 900px) { .statement-controls { grid-template-columns: 1fr 1fr; } .statement-controls label:first-child { grid-column: 1 / -1; } .statement-load { grid-column: 1 / -1; } .statement-summary { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .statement-table-tools, .statement-pagination { align-items: stretch; } .statement-table-tools label, .statement-pagination label { flex: 1 1 140px; } .statement-table-tools input { min-width: 0; width: 100%; } .statement-pagination > span:first-child { flex-basis: 100%; } }

@keyframes screen-enter {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.screen-heading,
.home-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 18px 26px;
}

.screen-heading h2,
.home-hero h2 {
  margin: 6px 0 0;
  font-size: clamp(36px, 4vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.home-hero p {
  max-width: 720px;
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.home-total-card {
  min-width: 180px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
}

.home-total-card span,
.home-priority-grid small,
.home-section-title span {
  color: var(--muted);
  font-size: 12px;
}

.home-total-card strong {
  display: block;
  margin-top: 8px;
  font-size: 34px;
}

.home-priority-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 12px;
}

.home-priority-grid button {
  position: relative;
  min-height: 174px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  color: var(--text);
  text-align: start;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.home-priority-grid button:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: 0 20px 40px rgb(var(--shadow-rgb) / 0.1);
}

.home-priority-grid button > span:not(.home-card-index) {
  color: var(--muted);
  font-weight: 700;
}

.home-priority-grid strong {
  margin: 7px 0 14px;
  font-size: 34px;
}

.home-card-index {
  position: absolute;
  inset-inline-end: 18px;
  top: 14px;
  color: rgb(var(--accent-rgb) / 0.18);
  font-size: 38px;
  font-weight: 900;
}

.home-directory {
  margin-top: 14px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.72);
}

.home-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.home-section-title strong {
  min-width: 34px;
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--surface-tint-strong);
  color: var(--accent-strong);
  text-align: center;
}

.home-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.home-group-card {
  padding: 16px;
  border: 1px solid rgb(var(--accent-rgb) / 0.1);
  border-radius: 18px;
  background: #fff;
}

.home-group-card h3 {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-group-card > div {
  display: grid;
  gap: 4px;
}

.home-group-card button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  padding: 0 10px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--text);
  text-align: start;
}

.home-group-card button:hover {
  background: var(--surface-tint-soft);
}

.home-group-card button strong {
  color: var(--accent-strong);
  font-size: 12px;
}

.settings-user-chip {
  display: grid;
  gap: 3px;
  min-width: 240px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  text-align: start;
}

.settings-user-chip span {
  color: var(--muted);
  font-size: 12px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.settings-panel-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
}

.settings-policy-field {
  display: grid;
  gap: 8px;
  max-width: 420px;
  font-weight: 700;
  color: var(--ink-strong);
}

.settings-policy-field select,
.settings-policy-field input {
  min-height: 44px;
  width: 100%;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 0 14px;
  background: var(--surface);
  color: var(--ink-strong);
  font: inherit;
}

.settings-policy-subsection { display: grid; gap: 8px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: color-mix(in srgb, var(--accent) 3%, var(--surface)); }
.settings-policy-subsection strong { color: var(--ink); }
.settings-policy-subsection p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.settings-policy-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

.settings-session-card {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.integration-credentials-card {
  grid-column: 1 / -1;
}

.integration-credential-grid {
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.integration-connection-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.integration-connection-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-tint);
}

.integration-connection-summary h4 { margin: 10px 0 4px; font-size: 19px; }
.integration-connection-summary p { margin: 0; color: var(--muted); font-size: 13px; }
.integration-status-badge { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; }
.integration-status-badge.active { background: #e7f6ef; color: #14734b; }
.integration-status-badge.inactive { background: #fff0e3; color: #9a5c12; }

.integration-credential-form {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-tint);
}

.integration-provider-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.integration-provider-heading strong { font-size: 18px; }
.integration-provider-heading span,
.integration-credential-form small,
.integration-credential-note { color: var(--muted); font-size: 12px; line-height: 1.5; }

.integration-credential-form label { display: grid; gap: 6px; color: var(--text); font-size: 13px; font-weight: 700; }
.integration-credential-form input,
.integration-credential-form textarea { width: 100%; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--text); font: inherit; padding: 10px 12px; resize: vertical; }
.integration-credential-note { margin: 16px 0 0; }

.credential-modal-backdrop {
  position: fixed;
  z-index: 70;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px 22px;
  overflow: auto;
  background: rgba(42, 19, 29, .38);
  backdrop-filter: blur(4px);
}

.credential-modal {
  width: min(650px, 100%);
  max-height: calc(100dvh - 32px);
  margin: 0;
  overflow: auto;
  padding: 24px;
  border: 1px solid var(--accent-soft);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(54, 21, 36, .25);
}

.credential-modal > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.credential-modal > header span { color: var(--accent); font-size: 12px; font-weight: 800; }
.credential-modal > header h3 { margin: 4px 0 0; font-size: 24px; }
.credential-modal-close { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--muted); font-size: 24px; line-height: 1; }
.credential-warning { margin: 0 0 16px; padding: 14px 16px; border: 1px solid #f3d292; border-radius: 16px; background: #fff8e8; color: #64410f; }
.credential-warning strong { display: block; margin-bottom: 5px; }
.credential-warning p { margin: 5px 0; font-size: 13px; line-height: 1.55; }
.credential-confirm { display: flex !important; grid-template-columns: 18px minmax(0, 1fr); align-items: flex-start; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff; font-weight: 600 !important; }
.credential-confirm input { width: 17px; height: 17px; margin-top: 1px; accent-color: var(--accent); }
.credential-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 2px; }
.import-files-backdrop {
  position: fixed;
  z-index: 160;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  overflow: auto;
  background: rgb(20 39 44 / 0.36);
  backdrop-filter: blur(5px);
}

.import-files-dialog {
  width: min(720px, 100%);
  max-height: calc(100dvh - 40px);
  overflow: auto;
  padding: 24px;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 26px 75px rgb(15 41 47 / 0.26);
}

.import-files-dialog > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.import-files-dialog > header span { color: var(--accent); font-size: 12px; font-weight: 800; }
.import-files-dialog h3 { margin: 4px 0 5px; color: var(--text); font-size: 23px; }
.import-files-dialog header p { max-width: 580px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.import-files-close { display: grid; flex: 0 0 auto; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--muted); font-size: 24px; line-height: 1; cursor: pointer; }
.import-files-close:hover { color: var(--text); border-color: var(--line-strong); }
.import-files-list { display: grid; gap: 12px; }
.import-file-field { padding: 14px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface-tint-soft); }
.import-file-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.import-file-label strong { color: var(--text); font-size: 14px; }
.import-file-label span { padding: 3px 8px; border-radius: 999px; background: var(--surface-tint-strong); color: var(--accent-strong); font-size: 11px; font-weight: 750; }
.import-file-field > p { margin: 5px 0 10px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.import-dropzone { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 10px 12px; border: 1px dashed var(--line-strong); border-radius: 12px; background: var(--surface); color: var(--muted); font: inherit; text-align: start; cursor: pointer; transition: border-color 140ms ease, background 140ms ease; }
.import-dropzone:hover, .import-dropzone.dragging { border-color: var(--accent); background: var(--surface-tint); }
.import-dropzone.selected { border-style: solid; color: var(--text); }
.import-dropzone > span:nth-child(2) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.import-dropzone-icon { display: grid; place-items: center; flex: 0 0 28px; width: 28px; height: 28px; border-radius: 9px; background: var(--surface-tint-strong); color: var(--accent-strong); font-size: 20px; font-weight: 800; }
.import-dropzone i { display: grid; place-items: center; flex: 0 0 auto; width: 24px; height: 24px; margin-inline-start: auto; border-radius: 8px; color: var(--muted); font-size: 18px; font-style: normal; }
.import-dropzone i:hover, .import-dropzone i:focus-visible { background: var(--surface-tint-strong); color: var(--danger); outline: none; }
.import-files-dialog footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
@media (max-width: 640px) {
  .import-files-backdrop { align-items: end; padding: 10px; }
  .import-files-dialog { max-height: calc(100dvh - 20px); padding: 18px; border-radius: 18px; }
  .import-files-dialog footer { flex-direction: column-reverse; }
  .import-files-dialog footer .action-btn { width: 100%; }
}
.amazon-history-sync { display: grid; gap: 5px; min-width: 162px; color: var(--muted); font-size: 12px; font-weight: 700; }
.amazon-history-sync input { min-height: 38px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; padding: 6px 9px; }

.settings-card-heading {
  display: flex;
  gap: 14px;
  margin-bottom: 24px;
}

.settings-card-heading > span {
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
}

.settings-card-heading h3 {
  margin: 0 0 6px;
  font-size: 20px;
}

.settings-card-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.settings-language-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.settings-language-options button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 62px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--text);
}

.settings-language-options button span {
  color: var(--muted);
  font-size: 11px;
}

.settings-language-options button.active {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--focus-ring);
}

.theme-options {
  display: grid;
  gap: 10px;
}

.theme-option {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 74px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--text);
  text-align: start;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.theme-option:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.theme-option.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.theme-option > span:last-child {
  display: grid;
  gap: 4px;
}

.theme-option strong {
  font-size: 14px;
}

.theme-option small {
  color: var(--muted);
  font-size: 12px;
}

.theme-option-preview {
  display: grid;
  grid-template-columns: 26px 1fr;
  grid-template-rows: 22px 1fr;
  gap: 4px;
  height: 52px;
  padding: 4px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 11px;
  background: var(--krelen-warm-white);
}

.theme-option-preview i {
  display: block;
  border-radius: 4px;
}

.theme-option-preview i:first-child {
  grid-row: 1 / -1;
  background: var(--krelen-black);
}

.theme-option-preview i:nth-child(2) {
  background: var(--surface-tint);
}

.theme-option-preview i:nth-child(3) {
  background: var(--accent);

}
.password-settings-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.password-settings-form label:first-child,
.password-settings-form .action-btn {
  grid-column: 1 / -1;
}

.permissions-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 14px;
}

.permission-users-list,
.permission-matrix-card,
.create-user-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--bg-surface);
  color: var(--text-primary);
}

.permission-users-list {
  align-self: start;
  padding: 12px;
}

.permission-list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 8px 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.permission-list-heading span {
  min-width: 28px;
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--surface-tint-strong);
  color: var(--accent-strong);
  text-align: center;
}

.permission-users-list > button {
  width: 100%;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 62px;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: var(--text);
  text-align: start;
}

.permission-users-list > button.active {
  border-color: var(--line);
  background: var(--surface-tint-soft);
}

.permission-avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--surface-tint-strong);
  color: var(--accent-strong);
  font-weight: 900;
}

.permission-users-list button > span:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.permission-users-list small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
}

.permission-users-list i {
  padding: 4px 6px;
  border-radius: 999px;
  font-size: 9px;
  font-style: normal;
}

.permission-users-list i.active { background: #e7f5ef; color: #247352; }
.permission-users-list i.inactive { background: #f7e8eb; color: var(--danger); }

.permission-matrix-card {
  min-width: 0;
  overflow: hidden;
}

.permission-user-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 150px auto auto;
  align-items: end;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.permission-user-toolbar > div {
  display: grid;
  gap: 3px;
}

.permission-user-toolbar > div span {
  color: var(--muted);
  font-size: 11px;
}

.permission-active-toggle {
  display: flex !important;
  align-items: center;
  min-height: 52px;
}

.permission-active-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.permission-table-wrap {
  overflow: auto;
}

.permission-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.permission-table th,
.permission-table td {
  padding: 13px 12px;
  border-bottom: 1px solid rgb(var(--accent-rgb) / 0.08);
  text-align: center;
  font-size: 13px;
}

.permission-table th {
  background: var(--surface-tint);
  color: var(--muted);
  font-size: 11px;
}

.permission-table th > span { display: block; }
.permission-column-actions { display: flex; justify-content: center; gap: 5px; margin-top: 6px; }
.permission-column-actions button { min-height: 24px; padding: 2px 6px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--accent-strong); font: inherit; font-size: 10px; font-weight: 750; }
.permission-column-actions button:hover, .permission-column-actions button:focus-visible { border-color: var(--line-strong); background: var(--surface-tint-soft); }

.report-table-interactive { display: grid; gap: 10px; }
.report-table-tools { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.report-table-tools input { width: min(250px, 100%); min-height: 34px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); font: inherit; }
.report-table-tools details { position: relative; }
.report-table-tools summary { min-height: 34px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--text); cursor: pointer; font-size: 12px; font-weight: 750; }
.report-table-tools details > div { position: absolute; z-index: 3; inset-inline-end: 0; top: calc(100% + 6px); display: grid; min-width: 190px; max-height: 260px; overflow: auto; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow-md); }
.report-table-tools label { display: flex; align-items: center; gap: 7px; padding: 6px; font-size: 12px; }
.report-table th button { width: 100%; border: 0; background: transparent; color: inherit; font: inherit; font-weight: 800; text-align: inherit; }
@media (max-width: 720px) { .report-table-tools { align-items: stretch; flex-direction: column; } .report-table-tools input { width: 100%; } }

.permission-table th:first-child,
.permission-table td:first-child {
  min-width: 210px;
  text-align: start;
}

.permission-table td:first-child {
  display: grid;
  gap: 3px;
}

.permission-table td:first-child span {
  color: var(--muted);
  font-size: 10px;
}

.matrix-check {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
}

.matrix-check input {
  position: absolute;
  opacity: 0;
}

.matrix-check span {
  width: 20px;
  height: 20px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--bg-surface);
}

.matrix-check input:checked + span {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: inset 0 0 0 4px var(--bg-surface);
}

.matrix-check input:disabled + span {
  opacity: 0.55;
  cursor: not-allowed;
}

.matrix-check.unavailable {
  opacity: 0.38;
}

.permission-category-row th {
  padding: 10px 14px;
  color: var(--text-secondary);
  background: var(--surface-tint-strong);
  border-block: 1px solid var(--line);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-align: start;
}

.permission-empty {
  padding: 40px 20px;
  color: var(--muted);
  text-align: center;
}

.create-user-card {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  align-items: end;
  gap: 12px;
  padding: 16px;
  margin-bottom: 14px;
}

.create-user-actions {
  display: flex;
  gap: 8px;
}


.record-filters {
  grid-template-columns: 170px 180px minmax(220px, 1fr) minmax(220px, 0.8fr);
  width: min(100%, 980px);
}

.sort-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px;
  gap: 6px;
}

.sort-direction-btn {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  color: var(--accent-strong);
  font-size: 18px;
}

.sortable-heading {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-weight: inherit;
  text-align: start;
}

.sortable-heading i {
  color: rgb(var(--muted-rgb) / 0.45);
  font-size: 11px;
  font-style: normal;
}

.sortable-heading.active {
  color: var(--accent-strong);
}

.sortable-heading.active i {
  color: var(--accent);
}

.column-heading-actions {
  position: relative;
  display: flex;
  align-items: center;
  min-width: max-content;
}

.column-filter-trigger,
.column-sort-trigger {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.column-filter-trigger {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  padding: 2px 3px;
  color: inherit;
  font-weight: inherit;
  text-align: start;
}

.column-filter-trigger i {
  color: rgb(var(--muted-rgb) / 0.56);
  font-size: 14px;
  font-style: normal;
  line-height: 1;
}

.column-filter-trigger.filtered {
  color: var(--accent-strong);
}

.column-filter-trigger.filtered i {
  color: var(--accent);
}

.column-sort-trigger {
  margin-inline-start: 3px;
  padding: 2px 5px;
  border-radius: 7px;
  color: rgb(var(--muted-rgb) / 0.48);
  font-size: 12px;
  line-height: 1;
}

.column-sort-trigger:hover,
.column-sort-trigger.active {
  background: rgb(var(--accent-rgb) / 0.09);
  color: var(--accent-strong);
}

.column-filter-popover {
  position: absolute;
  z-index: 40;
  top: calc(100% + 9px);
  inset-inline-start: 0;
  display: grid;
  gap: 9px;
  width: min(280px, calc(100vw - 32px));
  max-height: 360px;
  padding: 11px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 16px 36px rgb(var(--shadow-rgb) / 0.16);
}

.column-filter-popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--text);
  font-size: 13px;
}

.column-filter-popover-head button {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 19px;
  cursor: pointer;
}

.column-filter-popover-head button:hover {
  background: var(--surface-tint-soft);
  color: var(--accent-strong);
}

.column-filter-value-search {
  width: 100%;
  min-height: 37px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 13px;
}

.column-filter-value-search:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgb(var(--accent-rgb) / 0.1);
}

.column-filter-options {
  display: grid;
  gap: 4px;
  max-height: 242px;
  overflow: auto;
  padding-inline-end: 2px;
}

.column-filter-options button {
  width: 100%;
  min-height: 36px;
  overflow: hidden;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  text-align: start;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.column-filter-options button:hover {
  background: var(--surface-tint-soft);
}

.column-filter-options button.selected {
  border-color: var(--line-strong);
  background: var(--surface-tint-strong);
  color: var(--accent-strong);
  font-weight: 700;
}

.column-filter-loading {
  padding: 11px 8px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

@media (max-width: 1280px) {
  .home-priority-grid { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
  .record-filters { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
  .create-user-card { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .create-user-actions { grid-column: 1 / -1; }
}

@media (max-width: 980px) {
  .login-page { grid-template-columns: 1fr; padding: 12px; }
  .login-brand-panel { min-height: 380px; }
  .login-card { min-height: auto; }
  .home-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-grid { grid-template-columns: 1fr; }
  .settings-policy-grid { grid-template-columns: 1fr; }
  .settings-session-card { grid-column: auto; }
  .integration-credentials-card { grid-column: auto; }
  .integration-credential-grid { grid-template-columns: 1fr; }
  .permissions-layout { grid-template-columns: 1fr; }
  .permission-user-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .login-page { display: block; }
  .login-brand-panel { display: none; }
  .login-card { min-height: calc(100vh - 24px); padding: 28px 20px; }
  .login-language { margin-bottom: 40px; }
  .screen-heading,
  .home-hero,
  .settings-session-card { flex-direction: column; }
  .home-total-card,
  .settings-user-chip { width: 100%; min-width: 0; }
  .home-priority-grid,
  .home-groups,
  .settings-language-options,
  .password-settings-form,
  .record-filters,
  .create-user-card,
  .permission-user-toolbar { grid-template-columns: 1fr; }
  .password-settings-form label:first-child,
  .password-settings-form .action-btn { grid-column: auto; }
  .home-priority-grid button { min-height: 140px; }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-ui);
}

body {
  overflow-x: hidden;
  overflow-y: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  padding: 14px;
}

.workspace {
  display: grid;
  grid-template-columns: 288px minmax(0, 1fr);
  gap: 16px;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  align-items: start;
}

.sidebar,
.content,
.records-panel,
.editor-panel,
.banner {
  box-shadow: var(--shadow);
}

.sidebar {
  position: sticky;
  top: 14px;
  max-height: calc(100vh - 28px);
  overflow: auto;
  padding: 22px 18px 18px;
  border-radius: 28px;
  background: linear-gradient(180deg, var(--sidebar) 0%, var(--sidebar-deep) 100%);
  color: #fff7fb;
}

.mobile-navigation,
.mobile-navigation-layer {
  display: none;
}

.brand {
  display: grid;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-logo {
  position: relative;
  width: 108px;
  height: 108px;
  margin-inline: auto;
  border-radius: 26px;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  overflow: hidden;
}

.brand-logo-image {
  object-fit: contain;
  padding: 4px;
  transform: scale(1.08);
  transform-origin: center;
}

.brand-copy {
  text-align: center;
}

.sidebar-actions {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}

.sidebar-action {
  min-height: 40px;
  min-width: 40px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #fff7fb;
}

.sidebar-action.icon-only {
  display: grid;
  place-items: center;
}

.sidebar-action-icon {
  width: 18px;
  height: 18px;
}

.brand-kicker,
.panel-kicker,
.group-title,
.content-kicker {
  color: var(--accent-soft);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.brand h1,
.panel-head h3,
.content-title h2 {
  margin: 4px 0 0;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.brand h1 {
  font-size: 36px;
  color: var(--surface-tint);
}

.group-list {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.group-section {
  display: grid;
  gap: 9px;
  padding: 10px 10px 8px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
}

.group-items {
  display: grid;
  gap: 8px;
  transition: grid-template-rows 180ms ease, opacity 180ms ease, transform 180ms ease;
}

.group-section.closed .group-items {
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  height: 0;
  overflow: hidden;
}

.group-section.open .group-items {
  opacity: 1;
  transform: translateY(0);
  height: auto;
}

.group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 10px;
  padding: 2px 2px 6px;
  background: transparent;
  border: 0;
  color: inherit;
}

.group-toggle .group-title {
  font-size: 12px;
  letter-spacing: 0.14em;
  opacity: 0.9;
}

.group-chevron {
  width: 16px;
  height: 16px;
  opacity: 0.8;
  transition: transform 180ms ease;
}

.sidebar[data-lang="ar"] .group-section.open .group-chevron {
  transform: rotate(90deg);
}

.sidebar[data-lang="ar"] .group-section.closed .group-chevron {
  transform: rotate(0deg);
}

.sidebar[data-lang="en"] .group-section.open .group-chevron {
  transform: rotate(-90deg);
}

.sidebar[data-lang="en"] .group-section.closed .group-chevron {
  transform: rotate(0deg);
}

.table-item {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--surface-tint);
  border-radius: 16px;
  padding: 12px 14px;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}

.table-item:hover {
  transform: translateY(-1px);
  border-color: rgb(var(--accent-soft-rgb) / 0.38);
}

.table-item.active {
  background: linear-gradient(135deg, rgb(var(--accent-soft-rgb) / 0.24), rgb(var(--accent-rgb) / 0.46));
  border-color: rgb(var(--accent-soft-rgb) / 0.42);
}

.table-item-main {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-start;
  direction: rtl;
  text-align: right;
}

.nav-icon,
.table-title-icon,
.settings-icon,
.inline-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.table-item-main .nav-icon {
  opacity: 0.94;
}

.sidebar[data-lang="en"] .table-item-main {
  direction: ltr;
  text-align: left;
}

.sidebar[data-lang="en"] .table-item-main .nav-icon {
  order: 0;
}

.sidebar[data-lang="en"] .table-item-main span:last-child {
  order: 1;
}

.sidebar[data-lang="ar"] .table-item-main {
  direction: rtl;
  text-align: right;
}

.sidebar[data-lang="ar"] .group-toggle {
  direction: rtl;
}

.sidebar[data-lang="en"] .group-toggle {
  direction: ltr;
}

.settings-card {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.settings-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.lang-btn,
.action-btn,
.ghost-btn {
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.lang-btn {
  min-height: 44px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--surface-tint);
  border-color: rgba(255, 255, 255, 0.08);
}

.lang-btn.active {
  background: linear-gradient(135deg, var(--accent-soft), var(--accent));
  border-color: transparent;
}

.content {
  min-width: 0;
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 28px;
  background: var(--surface);
  border: 1px solid rgb(var(--accent-rgb) / 0.1);
}

.content-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.content-title {
  display: grid;
  gap: 6px;
}

.title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.content-title h2 {
  font-size: clamp(28px, 3vw, 44px);
}

.content-kicker {
  color: var(--accent);
}

.table-title-icon {
  width: 24px;
  height: 24px;
  color: var(--accent);
}

.updated-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgb(var(--accent-rgb) / 0.12);
  background: rgba(255, 255, 255, 0.72);
  color: #000000;
  font: inherit;
  font-size: 12px;
  font-weight: 400;
}

.updated-chip strong {
  color: #000000;
  font-weight: 400;
}

.platform-cell {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 30px;
  padding: 4px 9px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-weight: 750;
  white-space: nowrap;
}

.column-filter-static {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.topbar-actions,
.editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.provider-action-group {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.72);
}

.provider-action-label {
  padding-inline: 8px 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.provider-action-group-noon {
  border-color: rgb(var(--platform-noon-rgb) / 0.5);
  background: linear-gradient(135deg, rgb(var(--platform-noon-rgb) / 0.13), rgba(255, 255, 255, 0.88));
}

.editor-provider-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 14px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.74);
}

.editor-provider-actions-noon {
  border-color: rgb(var(--platform-noon-rgb) / 0.5);
  background: linear-gradient(135deg, rgb(var(--platform-noon-rgb) / 0.13), rgba(255, 255, 255, 0.9));
}

.editor-provider-actions-jumia {
  border-color: rgba(239, 109, 45, 0.28);
  background: linear-gradient(135deg, rgba(255, 246, 239, 0.96), rgba(255, 255, 255, 0.9));
}

.editor-provider-actions-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.editor-provider-actions-copy strong {
  font-size: 16px;
}

.editor-provider-actions-copy > span:last-child {
  color: var(--muted);
  font-size: 12px;
}

.editor-provider-actions-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

@media (max-width: 780px) {
  .editor-provider-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .editor-provider-actions-buttons {
    justify-content: flex-start;
  }
}


html {
  scrollbar-gutter: stable;
}

html,
body,
button,
input,
select,
textarea {
  font-family: var(--font-ui);
}

button,
input,
select,
textarea,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled,
[aria-disabled="true"] {
  cursor: not-allowed;
}

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

::selection {
  color: var(--text);
  background: var(--accent-soft);
}

::placeholder {
  color: var(--text-soft);
  opacity: 1;
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgb(var(--muted-rgb) / 0.58) transparent;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: rgb(var(--muted-rgb) / 0.58);
  background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
  background: rgba(92, 69, 80, 0.72);
  background-clip: padding-box;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.table-wrap,
.permission-table-wrap,
.statement-table-card {
  max-width: 100%;
  overflow: auto;
  overscroll-behavior: auto;
  scrollbar-gutter: stable;
}

.records-table thead th,
.statement-table thead th,
.permission-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  box-shadow: 0 1px 0 var(--line);
}

.records-table tbody tr:focus-within {
  background: rgb(var(--accent-rgb) / 0.055);
}

.records-table tr.selected.account-root,
.records-table tr.selected.account-child {
  border-inline-start: 3px solid rgb(var(--accent-rgb) / 0.5);
  box-shadow: none;
}

.editor-modal-layer,
.credential-modal-backdrop {
  overflow-y: auto;
  overscroll-behavior: contain;
}

.editor-modal-layer .editor-panel,
.credential-modal {
  scrollbar-gutter: stable;
}

.editor-modal-layer .panel-head {
  position: sticky;
  top: 0;
  z-index: 8;
  margin: -1px -1px 18px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 252, 250, 0.96);
  backdrop-filter: blur(10px);
}

.credential-modal > header {
  position: sticky;
  top: -24px;
  z-index: 2;
  margin: -24px -24px 18px;
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
}

.home-data-warning,
.statement-loading {
  padding: 12px 16px;
  border: 1px solid rgba(155, 91, 22, 0.22);
  border-radius: var(--radius-md);
  color: #6f4518;
  background: #fffaf0;
  font-size: 14px;
  line-height: 1.6;
}

.home-data-warning {
  margin: 0 0 18px;
}

.statement-loading {
  margin: 12px 0 0;
}

.login-mobile-brand {
  display: none;
}

.login-mobile-brand-mark {
  position: relative;
  display: block;
  width: 64px;
  height: 64px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.login-mobile-brand-mark img {
  object-fit: contain;
  transform: scale(1.08);
}

@media (max-width: 680px) {
  .login-mobile-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    color: var(--accent-strong);
    font-size: 12px;
    letter-spacing: 0.12em;
  }

  .login-language {
    align-self: stretch;
    margin-bottom: 28px;
  }

  .login-language button {
    min-height: var(--control-height);
  }

  .editor-modal-layer .panel-head {
    padding: 14px;
  }

  :where(button, input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
    min-height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.provider-workspace {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
}

.provider-workspace-noon {
  border-color: rgb(var(--platform-noon-rgb) / 0.5);
  background:
    radial-gradient(circle at 7% 20%, rgb(var(--platform-noon-rgb) / 0.19), transparent 34%),
    linear-gradient(135deg, #fffdf4, #ffffff 72%);
}

.provider-workspace-jumia {
  border-color: rgba(239, 109, 45, 0.24);
  background: linear-gradient(135deg, var(--surface-tint), #ffffff 72%);
}

.provider-workspace-identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 13px;
}

.provider-workspace-identity strong {
  display: block;
  margin-bottom: 3px;
  color: var(--text);
}

.provider-workspace-identity p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.provider-workspace-badge {
  flex: 0 0 auto;
  min-width: 82px;
  padding: 9px 11px;
  border-radius: 12px;
  background: #2b1920;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.provider-workspace-noon .provider-workspace-badge {
  background: var(--platform-noon);
  color: var(--platform-noon-ink);
}

.provider-workspace-status {
  flex: 0 0 auto;
  display: grid;
  gap: 2px;
  min-width: 126px;
  padding: 9px 12px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.82);
  text-align: start;
}

.provider-workspace-status span {
  color: var(--muted);
  font-size: 10px;
}

.provider-workspace-status strong {
  font-size: 13px;
}

.noon-fbpi-shipment-card {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 15px;
  border: 1px solid rgb(var(--platform-noon-rgb) / 0.5);
  border-radius: 18px;
  background:
    radial-gradient(circle at 8% 0%, rgb(var(--platform-noon-rgb) / 0.17), transparent 36%),
    linear-gradient(135deg, var(--surface-tint), #fff);
}

.noon-fbpi-shipment-head,
.noon-fbpi-shipment-actions,
.noon-fbpi-shipment-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.noon-fbpi-shipment-head strong {
  display: block;
  margin-top: 2px;
  color: var(--text);
}

.noon-fbpi-shipment-note,
.noon-fbpi-shipment-error {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.noon-fbpi-shipment-error {
  color: #b53958;
}

.noon-fbpi-shipment-meta {
  padding: 8px 10px;
  border: 1px solid rgb(var(--platform-noon-rgb) / 0.42);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 12px;
}

.noon-fbpi-shipment-meta strong {
  color: var(--text);
  direction: ltr;
  text-align: end;
}

.noon-fbpi-awb-entry {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.noon-fbpi-awb-entry input {
  width: 100%;
  min-height: 40px;
  padding: 9px 11px;
  border: 1px solid rgb(var(--platform-noon-rgb) / 0.5);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

.noon-fbpi-awb-entry input:focus {
  outline: 2px solid rgb(var(--platform-noon-rgb) / 0.24);
  border-color: var(--platform-noon);
}

.noon-fbpi-shipment-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.amazon-mfn-shipment-card {
  border-color: color-mix(in srgb, var(--accent) 32%, var(--border));
}

.amazon-mfn-shipment-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.85rem;
}

@media (max-width: 880px) {
  .amazon-mfn-shipment-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .amazon-mfn-shipment-fields {
    grid-template-columns: 1fr;
  }
}

.noon-fbpi-unavailable-lines {
  display: grid;
  gap: 9px;
  padding: 11px;
  border: 1px solid rgba(187, 67, 92, 0.22);
  border-radius: 13px;
  background: rgba(255, 245, 247, 0.7);
}

.noon-fbpi-unavailable-lines-head {
  display: grid;
  gap: 2px;
}

.noon-fbpi-unavailable-lines-head span {
  color: var(--muted);
  font-size: 11px;
}

.noon-fbpi-unavailable-lines-list {
  display: grid;
  gap: 6px;
}

.noon-fbpi-unavailable-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(187, 67, 92, 0.14);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}

.noon-fbpi-unavailable-line input {
  accent-color: var(--accent);
}

.noon-fbpi-unavailable-line span {
  color: var(--text);
  font-weight: 650;
}

.noon-fbpi-unavailable-line small {
  grid-column: 2;
  color: var(--muted);
  font-size: 11px;
}

.data-menu {
  position: relative;
}

.data-menu-trigger {
  min-width: 124px;
}

.data-menu-chevron {
  width: 16px;
  height: 16px;
  transition: transform 160ms ease;
}

.data-menu.open .data-menu-chevron {
  transform: rotate(180deg);
}

.data-menu-popover {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 8px);
  z-index: 30;
  min-width: 180px;
  display: grid;
  gap: 6px;
  padding: 8px;
  border-radius: 18px;
  border: 1px solid rgb(var(--accent-rgb) / 0.12);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 22px 54px rgb(var(--shadow-rgb) / 0.14);
  backdrop-filter: blur(12px);
}

.data-menu-item {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgb(var(--accent-rgb) / 0.08);
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, var(--surface-tint-soft));
  color: var(--text);
  font: inherit;
  text-align: start;
  cursor: pointer;
}

.data-menu-item:hover {
  border-color: rgb(var(--accent-rgb) / 0.18);
  background: rgb(var(--accent-rgb) / 0.05);
}

.data-menu-item:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.action-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 15px;
  border-color: var(--border-default);
  background: var(--bg-surface);
  color: var(--text-primary);
}

.action-btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: var(--accent-contrast);
  border-color: transparent;
}

.action-btn.danger {
  background: linear-gradient(135deg, color-mix(in srgb, var(--danger) 84%, white 16%), var(--danger));
  color: var(--danger-contrast);
  border-color: transparent;
}

.action-btn svg,
.ghost-btn svg {
  color: inherit;
  stroke: currentColor;
}

.action-btn:hover,
.ghost-btn:hover,
.lang-btn:hover {
  transform: translateY(-1px);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  color: var(--muted);
}

.stat-pill strong,
.pill strong {
  color: var(--text);
}

.banner {
  border-radius: 16px;
  padding: 13px 16px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--line);
  overflow-wrap: anywhere;
}

.banner.error {
  border-color: rgba(181, 61, 86, 0.18);
}

.banner.success {
  border-color: rgba(45, 138, 98, 0.18);
}

.settlement-actions-card {
  display: grid;
  gap: 14px;
  margin: 0 0 16px;
  padding: 16px;
  border: 1px solid rgba(43, 123, 145, 0.18);
  border-radius: 18px;
  background: linear-gradient(125deg, rgba(246, 252, 253, 0.98), rgba(255, 250, 252, 0.98));
}

.settlement-actions-head,
.settlement-payout-submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.settlement-actions-head strong {
  display: block;
  margin-top: 2px;
  color: var(--text);
}

.settlement-actions-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.settlement-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.settlement-payout-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding-top: 2px;
}

.settlement-payout-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.8rem;
}

.settlement-payout-form input,
.settlement-payout-form select {
  width: 100%;
  min-height: 42px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  font: inherit;
}

.settlement-payout-submit {
  grid-column: 1 / -1;
  padding-top: 4px;
  color: var(--muted);
  font-size: 0.88rem;
}

@media (max-width: 720px) {
  .settlement-payout-form {
    grid-template-columns: 1fr;
  }

  .settlement-payout-submit {
    grid-column: auto;
    align-items: stretch;
    flex-direction: column;
  }
}


.workspace {
  grid-template-columns: 274px minmax(0, 1fr);
  gap: 18px;
}

.sidebar {
  padding: 18px 14px 14px;
  border-radius: 24px;
  overflow: visible;
  z-index: 100;
  scrollbar-color: rgb(255 255 255 / 0.24) transparent;
}

.brand {
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 4px 6px 16px;
}

.brand-logo {
  width: 54px;
  height: 54px;
  margin: 0;
  border-radius: 17px;
}

.brand-logo-image {
  transform: scale(1.04);
}

.brand-copy {
  text-align: start;
}

.brand h1 {
  font-size: 24px;
  letter-spacing: -0.025em;
}

.brand-kicker {
  font-size: 9px;
  letter-spacing: 0.13em;
}

.sidebar-primary-nav {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.sidebar-nav-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 24px;
  color: rgb(255 255 255 / 0.58);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sidebar-action {
  min-width: 28px;
  min-height: 28px;
  color: rgb(255 255 255 / 0.76);
}

.sidebar-action:hover,
.sidebar-action:focus-visible {
  background: rgb(255 255 255 / 0.14);
  border-color: rgb(255 255 255 / 0.24);
}

.sidebar-action-icon {
  width: 14px;
  height: 14px;
}

.sidebar-primary-items,
.group-items {
  display: grid;
  gap: 4px;
}

.group-list {
  display: grid;
  gap: 4px;
  margin-top: 12px;
}

.group-section {
  gap: 3px;
  padding: 4px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.group-toggle {
  min-height: 38px;
  padding: 0 10px;
  border-radius: 12px;
}

.group-toggle:hover,
.group-toggle:focus-visible {
  background: rgb(255 255 255 / 0.06);
}

.group-heading-main {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.group-heading-icon {
  width: 16px;
  height: 16px;
  color: var(--accent-soft);
}

.group-toggle .group-title {
  color: rgb(255 255 255 / 0.82);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0;
  text-transform: none;
}

.group-items {
  padding-inline: 4px;
}

.sidebar-item-wrap {
  display: grid;
  gap: 4px;
  position: relative;
}

.table-item.has-children::after {
  content: "⌄";
  color: rgb(255 255 255 / 0.48);
  font-size: 14px;
  line-height: 1;
  margin-inline-start: auto;
  transition: transform 170ms ease;
}

.sidebar[data-lang="ar"] .table-item.has-children::after {
  content: "⌄";
}

.sidebar-item-wrap:has(.sidebar-submenu.open) > .table-item.has-children::after { transform: rotate(180deg); }

.table-item.has-children {
  min-height: 36px;
  padding-block: 7px;
  background: transparent;
  border-color: transparent;
}

.table-item.has-children:hover,
.table-item.has-children:focus-visible {
  background: rgb(255 255 255 / 0.06);
  border-color: transparent;
}

.sidebar-submenu {
  display: grid;
  max-height: 0;
  gap: 0;
  overflow: hidden;
  padding-inline-start: 18px;
  opacity: 0;
  transition: max-height 170ms ease, opacity 170ms ease, gap 170ms ease;
}

.sidebar-submenu.open {
  max-height: 220px;
  gap: 4px;
  opacity: 1;
}

.sidebar-submenu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: rgb(255 255 255 / 0.72);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  text-align: start;
}

.sidebar-submenu-item:hover,
.sidebar-submenu-item:focus-visible { border-color: rgb(255 255 255 / 0.13); background: rgb(255 255 255 / 0.08); color: #fff; }
.sidebar-submenu-item.active { color: #fff; background: rgb(var(--accent-rgb) / 0.45); }
.sidebar[data-lang="ar"] .sidebar-submenu-item { direction: rtl; }

.sidebar-inline-section {
  margin-top: 8px;
  padding-inline: 9px;
  color: rgb(255 255 255 / 0.42);
  font-size: 9px;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.table-item {
  min-height: 39px;
  padding: 9px 10px;
  border-color: transparent;
  border-radius: 12px;
  background: transparent;
  color: rgb(255 255 255 / 0.88);
  box-shadow: none;
}

.table-item:hover {
  transform: none;
  background: rgb(255 255 255 / 0.07);
  border-color: rgb(255 255 255 / 0.08);
}

.table-item.active {
  background: rgb(var(--accent-rgb) / 0.82);
  border-color: rgb(var(--accent-soft-rgb) / 0.52);
  box-shadow: 0 8px 20px rgb(0 0 0 / 0.13);
}

.table-item-main {
  gap: 9px;
  font-size: 13px;
  font-weight: 650;
}

.table-item-main .nav-icon {
  width: 17px;
  height: 17px;
}

.sidebar-item-meta {
  display: block;
  margin-top: 2px;
  padding-inline-start: 26px;
  color: rgb(255 255 255 / 0.56);
  font-size: 10px;
  font-weight: 600;
}

.table-item.active .sidebar-item-meta {
  color: rgb(255 255 255 / 0.76);
}

.settings-card.sidebar-utility-nav {
  gap: 4px;
  margin-top: 14px;
  padding: 14px 4px 0;
}

.utility-heading {
  padding-inline: 8px;
}

.current-user-card {
  margin-top: 8px;
  padding: 11px 12px;
  border-radius: 13px;
  background: rgb(255 255 255 / 0.045);
  border-color: rgb(255 255 255 / 0.08);
}

.current-user-email {
  font-size: 12px;
}

.home-screen {
  display: grid;
  gap: 20px;
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(12px, 2vw, 30px);
}

.home-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 26px;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(135deg, var(--surface-strong), rgb(var(--surface-rgb) / 0.74));
  box-shadow: var(--shadow-sm);
}

.home-hero h2 {
  max-width: 720px;
  font-size: clamp(30px, 4.2vw, 50px);
}

.home-hero p {
  max-width: 680px;
}

.home-total-card {
  min-width: 180px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-tint-soft);
}

.home-total-card small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.home-workspace-section {
  display: grid;
  gap: 12px;
}

.home-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.home-section-heading > div > span {
  display: block;
  color: var(--accent);
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-section-heading h3 {
  margin: 3px 0 0;
  color: var(--text);
  font-size: 20px;
}

.home-section-heading p {
  max-width: 390px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.home-quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(195px, 1fr));
  gap: 10px;
}

.home-quick-action {
  position: relative;
  display: grid;
  min-height: 142px;
  align-content: start;
  gap: 7px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-strong);
  color: var(--text);
  text-align: start;
  box-shadow: var(--shadow-sm);
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.home-quick-action:hover,
.home-quick-action:focus-visible {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

.home-quick-action strong {
  font-size: 16px;
}

.home-quick-action small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.home-quick-arrow {
  position: absolute;
  inset-inline-end: 16px;
  bottom: 14px;
  color: var(--accent);
  font-size: 18px;
}

.home-operational-section {
  padding-top: 4px;
}

.content-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.content-breadcrumb button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
}

.content-breadcrumb button:hover,
.content-breadcrumb button:focus-visible {
  text-decoration: underline;
}

.content-breadcrumb span:last-child {
  color: var(--muted);
}

.home-priority-grid {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.home-priority-grid button {
  min-height: 128px;
  padding: 16px;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.home-priority-grid button:hover,
.home-priority-grid button:focus-visible {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

@media (max-width: 1120px) {
  .sidebar {
    border-radius: 20px;
  }

  .brand {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .sidebar-primary-items,
  .group-items,
  .settings-card.sidebar-utility-nav {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }

  .group-section {
    padding: 8px 0;
    border-bottom: 1px solid rgb(255 255 255 / 0.08);
  }

  .group-section:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 720px) {
  .home-screen {
    gap: 16px;
    padding: 4px;
  }

  .home-hero,
  .home-section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .home-total-card {
    min-width: 0;
  }

  .sidebar-primary-items,
  .group-items,
  .settings-card.sidebar-utility-nav {
    grid-template-columns: 1fr;
  }

  .home-quick-grid,
  .home-priority-grid {
    grid-template-columns: 1fr;
  }

  
  .sidebar {
    display: none;
  }

  .workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .app-shell {
    padding-bottom: 86px;
  }

  .mobile-navigation {
    position: fixed;
    z-index: 80;
    inset-inline: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    min-height: 62px;
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: 19px;
    background: color-mix(in srgb, var(--surface-strong) 94%, transparent);
    box-shadow: 0 14px 36px rgb(14 37 41 / 0.2);
    backdrop-filter: blur(16px);
  }

  .mobile-nav-item {
    display: grid;
    min-width: 0;
    place-items: center;
    gap: 3px;
    padding: 6px 4px;
    border: 0;
    border-radius: 14px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 10px;
    font-weight: 750;
  }

  .mobile-nav-item.active {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 5px 14px rgb(var(--accent-rgb) / 0.25);
  }

  .mobile-nav-icon { width: 19px; height: 19px; }

  .mobile-navigation-layer {
    position: fixed;
    z-index: 90;
    inset: 0;
    display: grid;
    align-items: end;
  }

  .mobile-navigation-scrim {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgb(14 26 29 / 0.42);
  }

  .mobile-navigation-sheet {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    height: min(78dvh, 720px);
    min-height: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px 24px 0 0;
    background: var(--surface-strong);
    box-shadow: 0 -18px 44px rgb(14 37 41 / 0.2);
    animation: mobile-sheet-enter 180ms ease-out;
  }

  .mobile-navigation-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 17px 18px 13px;
    border-bottom: 1px solid var(--line);
  }

  .mobile-navigation-sheet-header span { color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .08em; }
  .mobile-navigation-sheet-header h2 { margin: 2px 0 0; color: var(--text); font-size: 20px; }
  .mobile-navigation-close { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); font-size: 24px; line-height: 1; }
  .mobile-navigation-sheet-scroll {
    display: grid;
    min-height: 0;
    gap: 16px;
    overflow-y: auto;
    padding: 16px 18px calc(28px + env(safe-area-inset-bottom));
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }
  .mobile-navigation-section { display: grid; gap: 8px; }
  .mobile-navigation-section h3 { display: flex; align-items: center; gap: 7px; margin: 0; color: var(--muted); font-size: 12px; font-weight: 800; }
  .mobile-group-icon { width: 15px; height: 15px; color: var(--accent); }
  .mobile-navigation-list { display: grid; gap: 6px; }
  .mobile-navigation-screen { display: flex; align-items: center; min-height: 46px; gap: 10px; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); color: var(--text); font: inherit; font-size: 13px; font-weight: 700; text-align: start; }
  .mobile-navigation-screen.active { border-color: var(--line-strong); background: var(--surface-tint-strong); color: var(--accent-strong); }
  .mobile-navigation-screen.nested { margin-inline-start: 14px; width: calc(100% - 14px); min-height: 41px; background: var(--surface-tint-soft); font-size: 12px; }
  .mobile-screen-icon { flex: 0 0 auto; width: 17px; height: 17px; color: var(--accent); }
  .mobile-navigation-screen small { margin-inline-start: auto; color: var(--muted); font-size: 10px; }
  .mobile-navigation-item-group { display: grid; gap: 5px; }
  .mobile-navigation-children { display: grid; gap: 5px; }

  @keyframes mobile-sheet-enter { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
}

.records-table tbody tr.needs-mapping:not(.selected) {
  background: rgba(245, 158, 11, 0.055);
}

.mapping-state-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.08);
  color: #2f6f5f;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.mapping-state-badge.warning {
  border-color: rgba(217, 119, 6, 0.24);
  background: rgba(245, 158, 11, 0.11);
  color: #9a5b0a;
}

.mapping-state-badge.posted {
  border-color: rgba(37, 99, 235, 0.2);
  background: rgba(59, 130, 246, 0.09);
  color: #245a99;
}

.order-bulk-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid rgb(var(--accent-rgb) / 0.13);
  border-radius: 16px;
  background: linear-gradient(120deg, rgba(255, 251, 252, 0.98), rgba(252, 247, 249, 0.95));
}

.order-bulk-copy,
.order-bulk-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.order-bulk-copy strong {
  display: grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border-radius: 10px;
  background: var(--primary);
  color: var(--accent-contrast);
  font-size: 0.86rem;
}

.order-bulk-copy span,
.bulk-clear-selection {
  color: var(--muted);
  font-size: 0.82rem;
}

.bulk-fulfillment-btn,
.bulk-clear-selection {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  font: inherit;
  cursor: pointer;
}

.bulk-fulfillment-btn {
  border: 1px solid transparent;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 750;
}

.bulk-fulfillment-btn.direct {
  background: var(--accent-strong);
  color: var(--accent-contrast);
}

.bulk-fulfillment-btn.stock {
  background: #155e75;
}

.bulk-fulfillment-btn:hover:not(:disabled) {
  filter: brightness(1.07);
}

.bulk-fulfillment-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.bulk-clear-selection {
  border: 1px solid var(--line);
  background: #fff;
}

.order-select-column {
  width: 42px;
  min-width: 42px;
  text-align: center;
}

.order-select-column input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

.review-group-row td {
  padding: 10px 12px;
  border-top: 10px solid #fff;
  background: var(--surface-tint-soft);
}

.review-group-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.review-group-title {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.review-group-title input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

.review-group-label {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 0.8rem;
  font-weight: 800;
}

.review-group-label.returns {
  border-color: rgb(var(--accent-rgb) / 0.2);
  background: rgb(var(--accent-rgb) / 0.08);
  color: var(--accent-strong);
}

.review-group-label.other {
  border-color: rgba(180, 83, 9, 0.2);
  background: rgba(245, 158, 11, 0.1);
  color: #9a5b0a;
}

.mfa-start-button { margin-top: 36px; }

.mfa-setup {
  display: grid;
  justify-items: center;
  gap: 12px;
  margin-top: 30px;
  text-align: center;
}

.mfa-qr {
  width: min(240px, 70vw);
  height: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.mfa-setup p,
.mfa-deadline {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.mfa-setup code {
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface-tint-strong);
}

.mfa-error { margin-top: 24px; }

.mfa-secondary-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

.mfa-secondary-actions button {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--accent-strong);
  font-weight: 750;
}

.mfa-deadline {
  margin-top: 14px;
  text-align: center;
}


.public-site {
  min-height: 100vh;
  background:
    radial-gradient(circle at 88% 4%, color-mix(in srgb, var(--accent-soft) 72%, transparent) 0, transparent 30rem),
    var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-ui);
}

.public-header,
.public-footer {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.public-header {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--border-subtle);
}

.public-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.public-brand-mark {
  position: relative;
  width: 42px;
  height: 42px;
  overflow: hidden;
  border-radius: 12px;
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
}

.public-brand-mark img { object-fit: cover; }
.public-brand > span:last-child { display: grid; gap: 1px; }
.public-brand strong { font-size: 17px; letter-spacing: 0.01em; }
.public-brand small { color: var(--text-muted); font-size: 11px; }

.public-header nav,
.public-footer nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.public-header nav a:hover,
.public-footer nav a:hover { color: var(--accent-hover); }

.public-header .public-nav-action {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--text-on-accent);
}

.public-header .public-nav-action:hover { background: var(--accent-hover); color: var(--text-on-accent); }

.public-main {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 86px 0 100px;
}

.public-hero {
  max-width: 920px;
  padding: 52px 0 76px;
}

.public-eyebrow,
.public-section-heading > span,
.public-callout span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent-soft) 60%, transparent);
  color: var(--accent-hover);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.public-hero h1,
.public-legal-heading h1 {
  margin: 24px 0 20px;
  max-width: 900px;
  color: var(--text-primary);
  font-size: clamp(42px, 6.5vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.public-hero > p,
.public-legal-heading > p:last-child {
  max-width: 750px;
  margin: 0;
  color: var(--text-secondary);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.7;
}

.public-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.public-button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 19px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 750;
  text-decoration: none;
}

.public-button-disabled { background: var(--text-primary); color: var(--text-on-accent); opacity: 0.84; }
.public-button-secondary { border: 1px solid var(--border-default); background: var(--bg-surface); color: var(--text-primary); }
.public-button-secondary:hover { border-color: var(--accent); color: var(--accent-hover); }

.public-hero .public-disclaimer {
  max-width: 720px;
  margin-top: 20px;
  padding-left: 14px;
  border-left: 3px solid var(--warning);
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.65;
}

.public-section {
  padding: 78px 0;
  border-top: 1px solid var(--border-subtle);
}

.public-section-heading { max-width: 680px; }
.public-section-heading h2,
.public-callout h2 {
  margin: 18px 0 12px;
  color: var(--text-primary);
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.public-section-heading p,
.public-prose p,
.public-callout p {
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.75;
}

.public-capability-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 36px;
}

.public-capability-grid article {
  min-height: 220px;
  padding: 24px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--bg-surface) 92%, transparent);
  box-shadow: var(--shadow-sm);
}

.public-capability-grid article > span { color: var(--accent); font-size: 12px; font-weight: 800; }
.public-capability-grid h3 { margin: 46px 0 10px; font-size: 19px; }
.public-capability-grid p { margin: 0; color: var(--text-secondary); font-size: 14px; line-height: 1.65; }

.public-split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(44px, 9vw, 120px);
}

.public-prose { display: grid; gap: 20px; }
.public-prose p { margin: 0; }

.public-callout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  align-items: end;
  gap: 52px;
  margin-top: 36px;
  padding: 38px;
  border-radius: var(--radius-lg);
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
}

.public-callout span { border-color: var(--sidebar-border); background: var(--sidebar-hover); color: var(--sidebar-muted); }
.public-callout h2 { color: var(--sidebar-text); }
.public-callout p { margin: 0; color: var(--sidebar-muted); }

.public-legal { max-width: 1000px; }
.public-legal-heading { max-width: 800px; margin-bottom: 68px; }
.public-legal-heading h1 { font-size: clamp(44px, 6vw, 68px); }
.public-legal-heading > p:nth-of-type(1) { margin: -8px 0 24px; color: var(--text-muted); font-size: 13px; }

.public-legal-sections { border-top: 1px solid var(--border-default); }
.public-legal-sections section {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 20px;
  padding: 32px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.public-legal-sections section > span { padding-top: 4px; color: var(--accent); font-size: 12px; font-weight: 800; }
.public-legal-sections h2 { margin: 0 0 10px; font-size: 21px; letter-spacing: -0.02em; }
.public-legal-sections p { max-width: 780px; margin: 0; color: var(--text-secondary); font-size: 15px; line-height: 1.8; }

.public-footer {
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--border-subtle);
}

.public-footer > div { display: grid; gap: 5px; }
.public-footer > div span { color: var(--text-muted); font-size: 12px; }

@media (max-width: 900px) {
  .public-header { padding: 14px 0; align-items: flex-start; }
  .public-header nav { justify-content: flex-end; flex-wrap: wrap; gap: 12px 18px; }
  .public-capability-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .public-split,
  .public-callout { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .public-header,
  .public-footer,
  .public-main { width: min(100% - 28px, 1180px); }
  .public-header { min-height: 70px; align-items: center; }
  .public-header nav a:not(.public-nav-action) { display: none; }
  .public-brand small { display: none; }
  .public-main { padding: 48px 0 70px; }
  .public-hero { padding: 28px 0 54px; }
  .public-hero h1 { font-size: clamp(38px, 13vw, 56px); }
  .public-capability-grid { grid-template-columns: 1fr; }
  .public-capability-grid article { min-height: 180px; }
  .public-section { padding: 56px 0; }
  .public-callout { padding: 26px; }
  .public-legal-sections section { grid-template-columns: 36px minmax(0, 1fr); gap: 10px; }
  .public-footer { min-height: 180px; align-items: flex-start; justify-content: center; flex-direction: column; }
  .public-footer nav { flex-wrap: wrap; gap: 12px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .public-site * { scroll-behavior: auto !important; }
}

.review-reason-cell,
.review-evidence-cell {
  display: grid;
  gap: 5px;
  min-inline-size: 0;
  max-inline-size: 360px;
  color: var(--text-primary);
  line-height: 1.45;
  white-space: normal;
}

.review-reason-cell span,
.review-evidence-cell span {
  position: relative;
  display: block;
  padding-inline-start: 12px;
  overflow-wrap: anywhere;
}

.review-reason-cell span::before,
.review-evidence-cell span::before {
  position: absolute;
  inset-inline-start: 0;
  top: 0.62em;
  inline-size: 5px;
  block-size: 5px;
  border-radius: 999px;
  background: var(--warning);
  content: "";
}

.review-reason-item strong,
.review-reason-item small {
  display: block;
}

.review-reason-item strong {
  font-size: 0.78rem;
}

.review-reason-item small {
  margin-top: 2px;
  color: var(--text-secondary);
  font-size: 0.7rem;
  font-weight: 400;
  line-height: 1.35;
}

.review-evidence-cell {
  color: var(--text-secondary);
}

.records-panel:has(.orders-records-table) .records-table [data-column="__review_reason"] {
  min-width: 210px;
}

.records-panel:has(.orders-records-table) .records-table [data-column="__review_required_evidence"] {
  min-width: 320px;
}

.order-status-badge,
.order-fulfillment-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid rgba(119, 92, 104, 0.13);
  border-radius: 999px;
  background: rgba(119, 92, 104, 0.06);
  color: #6b5560;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.order-status-badge.status-delivered {
  border-color: rgba(16, 185, 129, 0.2);
  background: rgba(16, 185, 129, 0.09);
  color: #2f6f5f;
}

.order-status-badge.status-shipped,
.order-fulfillment-badge.set {
  border-color: rgba(59, 130, 246, 0.2);
  background: rgba(59, 130, 246, 0.08);
  color: #245a99;
}

.order-status-badge.status-cancelled,
.order-status-badge.status-returned {
  border-color: rgba(217, 119, 6, 0.24);
  background: rgba(245, 158, 11, 0.11);
  color: #9a5b0a;
}

.order-status-badge.status-new {
  border-color: rgba(119, 92, 104, 0.16);
  background: rgba(119, 92, 104, 0.06);
  color: #6b5560;
}

.order-status-badge.status-readytoship {
  border-color: rgba(13, 148, 136, 0.2);
  background: rgba(13, 148, 136, 0.08);
  color: #166a63;
}

.order-fulfillment-badge.unset {
  color: rgba(107, 85, 96, 0.72);
}

.mapping-warning-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid rgba(217, 119, 6, 0.24);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 251, 235, 0.96), rgba(255, 247, 237, 0.82));
  color: #70410a;
}

.mapping-warning-banner > div {
  display: grid;
  gap: 4px;
}

.mapping-warning-banner strong {
  font-size: 0.92rem;
}

.mapping-warning-banner span {
  color: #8a6330;
  font-size: 0.8rem;
  line-height: 1.6;
}

@media (max-width: 720px) {
  .mapping-warning-banner {
    align-items: stretch;
    flex-direction: column;
  }
}

.toast {
  position: fixed;
  
  inset-inline-end: 20px;
  bottom: 20px;
  
  z-index: 140;
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: min(380px, calc(100vw - 32px));
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--border-default);
  background: color-mix(in srgb, var(--bg-surface) 94%, var(--bg-page) 6%);
  color: var(--text-primary);
  backdrop-filter: blur(14px);
  box-shadow: 0 24px 60px rgb(var(--shadow-rgb) / 0.16);
  animation: toast-in 180ms ease-out;
}

.toast-badge {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgb(var(--accent-rgb) / 0.12);
}

.toast-success {
  border-color: color-mix(in srgb, var(--success) 38%, var(--border-default));
  background: color-mix(in srgb, var(--bg-surface) 90%, var(--success) 10%);
}

.toast-error {
  border-color: color-mix(in srgb, var(--danger) 42%, var(--border-default));
  background: color-mix(in srgb, var(--bg-surface) 90%, var(--danger) 10%);
}

.toast-info {
  border-color: color-mix(in srgb, var(--info) 38%, var(--border-default));
  background: color-mix(in srgb, var(--bg-surface) 90%, var(--info) 10%);
}

.toast-success .toast-badge,
.toast.success .toast-badge {
  background: var(--success);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--success) 16%, transparent);
}

.toast-error .toast-badge,
.toast.error .toast-badge {
  background: var(--danger);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--danger) 16%, transparent);
}

.toast-info .toast-badge,
.toast.info .toast-badge {
  background: var(--info);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--info) 16%, transparent);
}

.toast-body {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-primary);
  overflow-wrap: anywhere;
}

.toast-close {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
}

.toast-close:hover {
  color: var(--text-primary);
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 14px;
  align-items: start;
}

.main-grid.single {
  grid-template-columns: minmax(0, 1fr);
}

.main-grid.journal-focus {
  grid-template-columns: minmax(0, 1fr);
}

.main-grid.journal-focus .editor-panel {
  order: 1;
}

.main-grid.journal-focus .records-panel {
  order: 2;
}

.records-panel,
.editor-panel {
  min-width: 0;
  border-radius: 22px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  padding: 16px;
}

.editor-panel.editing {
  border-color: rgb(var(--accent-rgb) / 0.32);
  box-shadow:
    0 0 0 1px rgb(var(--accent-rgb) / 0.08) inset,
    0 24px 60px rgb(var(--accent-rgb) / 0.08),
    0 0 0 8px rgb(var(--accent-rgb) / 0.03);
  background:
    linear-gradient(180deg, rgba(255, 248, 251, 0.98), rgba(255, 255, 255, 0.98)),
    var(--surface-strong);
}

.editor-panel.creating {
  border-color: rgba(22, 128, 90, 0.24);
  box-shadow:
    0 0 0 1px rgba(22, 128, 90, 0.07) inset,
    0 24px 60px rgba(22, 128, 90, 0.06);
}

.editor-panel.closed {
  display: none;
}

.editor-modal-layer {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(50, 23, 34, 0.32);
  backdrop-filter: blur(5px);
  animation: editor-modal-backdrop-in 160ms ease-out;
}

.editor-modal-layer .editor-panel {
  position: relative;
  top: auto;
  width: min(760px, calc(100vw - 48px));
  max-height: min(860px, calc(100vh - 48px));
  overflow: auto;
  overscroll-behavior: contain;
  border-color: rgb(var(--accent-rgb) / 0.24);
  box-shadow: 0 28px 90px rgba(38, 16, 27, 0.28);
  animation: editor-modal-card-in 180ms ease-out;
}

.editor-modal-layer .editor-panel.editor-modal-wide {
  width: min(1440px, calc(100vw - 48px));
}

.editor-close-btn {
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
}

@keyframes editor-modal-backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes editor-modal-card-in {
  from { opacity: 0; transform: translateY(12px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.editor-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.child-account-btn {
  color: var(--accent);
  border-color: rgb(var(--accent-rgb) / 0.22);
  background: rgb(var(--accent-rgb) / 0.05);
}

.panel-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.panel-head h3 {
  font-size: 24px;
}

.active-filter-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin: -2px 0 14px;
}

.filter-chips-label {
  color: var(--muted);
  font-size: 12px;
}

.filter-chip,
.clear-filters-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  border-radius: 999px;
  font: inherit;
  font-size: 12px;
}

.filter-chip {
  max-width: min(100%, 320px);
  padding: 0 10px;
  border: 1px solid rgb(var(--accent-rgb) / 0.16);
  background: rgb(var(--accent-rgb) / 0.055);
  color: var(--text);
}

.filter-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-chip b {
  color: var(--accent);
  font-size: 15px;
  line-height: 1;
}

.clear-filters-btn {
  padding: 0 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--accent);
}

.clear-filters-btn:hover {
  border-color: rgb(var(--accent-rgb) / 0.18);
  background: rgb(var(--accent-rgb) / 0.04);
}

.refreshing-indicator {
  display: inline-flex;
  align-items: center;
  margin-top: 3px;
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 500;
}

.mode-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.03em;
  border: 1px solid transparent;
}

.mode-chip-edit {
  color: var(--accent);
  background: rgb(var(--accent-rgb) / 0.08);
  border-color: rgb(var(--accent-rgb) / 0.12);
}

.mode-chip-create {
  color: #12735b;
  background: rgba(18, 115, 91, 0.08);
  border-color: rgba(18, 115, 91, 0.12);
}

.search-input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.98);
  color: var(--text);
  outline: none;
}

.search-input::placeholder {
  color: var(--text-soft);
}

.search-input.compact {
  width: min(320px, 100%);
}

.filter-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  font: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.2;
  text-align: start;
  color: var(--text);
  background: rgba(255, 255, 255, 0.98);
  padding-inline-end: 34px;
  padding-top: 0;
  padding-bottom: 0;
}

.filter-select.placeholder-like {
  color: var(--text-soft);
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.record-filters {
  display: grid;
  grid-template-columns: 160px minmax(220px, 1fr);
  gap: 8px;
  width: min(100%, 560px);
}

.marketplace-provider-filter {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
  min-height: 42px;
  padding: 4px;
  border: 0;
  border-radius: 14px;
  background: transparent;
}

.marketplace-provider-filter button {
  min-width: 70px;
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.marketplace-provider-filter button:hover {
  color: var(--text-primary);
  background: var(--bg-subtle);
}

.marketplace-provider-filter button.active {
  color: var(--accent-contrast);
  background: var(--accent);
  box-shadow: 0 2px 6px color-mix(in srgb, var(--accent) 18%, transparent);
}

.search-group {
  min-width: 0;
}

.filter-group {
  display: grid;
  gap: 6px;
}

.filter-label {
  font-size: 11px;
  color: rgb(var(--muted-rgb) / 0.7);
  letter-spacing: 0.04em;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.records-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  background: #fff;
}

.records-table th,
.records-table td {
  padding: 12px 10px;
  border-bottom: 1px solid rgb(var(--accent-rgb) / 0.08);
  text-align: start;
  font-size: 14px;
  white-space: nowrap;
}

.records-table th {
  background: var(--surface-tint);
  color: var(--muted);
  font-weight: 700;
}

.records-table tbody tr {
  transition: background 120ms ease;
}

.records-table tbody tr:hover {
  background: rgb(var(--accent-rgb) / 0.04);
}

.records-table tr.selected {
  background: rgb(var(--accent-rgb) / 0.07);
}


.records-table tr.last-reviewed:not(.selected) td {
  background: color-mix(in srgb, var(--accent) 7%, var(--surface-strong));
}

.records-table tr.last-reviewed:not(.selected) td:first-child {
  box-shadow: inset 3px 0 0 rgb(var(--accent-rgb) / 0.58);
}


.records-table[dir="rtl"] tr.last-reviewed:not(.selected) td:first-child {
  box-shadow:none;
}
.records-table[dir="rtl"] tr.last-reviewed:not(.selected) td:nth-child(2) {
  box-shadow:inset -3px 0 0 rgb(var(--accent-rgb) / 0.58);
}
.records-panel:has(.orders-records-table) .records-table tr.last-reviewed:not(.selected) td:first-child { box-shadow:inset -3px 0 0 rgb(var(--accent-rgb) / 0.58); }
.records-panel:has(.orders-records-table) .records-table tr.last-reviewed:not(.selected) td:nth-child(2) { box-shadow:none; }
.records-panel:has(.orders-records-table) .order-bulk-toolbar.has-selection .order-bulk-copy strong {
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:0 9px;
  border-radius:999px;
  background:var(--accent);
  color:var(--accent-contrast) !important;
  white-space:nowrap;
}
.return-lines-toolbar { display:flex; align-items:center; justify-content:space-between; gap:10px; margin:10px 0 8px; color:var(--muted); font-size:12px; }
.return-lines-toolbar .ghost-btn { min-height:34px; padding:0 10px; border:1px solid var(--line); border-radius:8px; background:transparent; color:var(--accent-strong); font:inherit; }
.editor-modal-wide:has(.order-editor-sections) .journal-detail-table-shell,
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row,
.editor-modal-wide:has(.order-editor-sections) .journal-detail-table-cell { overflow:visible; }
.editor-modal-wide:has(.order-editor-sections) .reference-picker { position:relative; z-index:30; }
.editor-modal-wide:has(.order-editor-sections) .reference-popover { z-index:50; }

.records-table tr.account-child {
  background: rgb(var(--accent-rgb) / 0.015);
}

.records-table tr.account-child:hover {
  background: rgb(var(--accent-rgb) / 0.055);
}

.records-table tr.selected.account-root,
.records-table tr.selected.account-child {
  background: rgb(var(--accent-rgb) / 0.095);
  box-shadow: inset 3px 0 0 rgb(var(--accent-rgb) / 0.42);
}

.account-tree-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.account-tree-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tree-toggle,
.tree-spacer {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 999px;
}

.tree-toggle {
  display: inline-grid;
  place-items: center;
  border: 1px solid rgb(var(--accent-rgb) / 0.14);
  background: rgba(255, 255, 255, 0.94);
  color: var(--accent);
  cursor: pointer;
  padding: 0;
}

.tree-toggle:hover {
  background: rgb(var(--accent-rgb) / 0.08);
}

.tree-toggle .tree-chevron {
  width: 14px;
  height: 14px;
  transition: transform 140ms ease;
}

.tree-toggle.open .tree-chevron {
  transform: rotate(180deg);
}

.tree-spacer {
  display: inline-block;
}

.empty-state {
  padding: 28px 12px;
  color: var(--muted);
  text-align: center;
}

.inline-open {
  min-height: 36px;
  padding: 0 12px;
}

.editor-panel {
  position: sticky;
  top: 14px;
  max-height: calc(100vh - 28px);
  overflow: auto;
}

.editor-panel.journal-entry-editor {
  position: static;
  max-height: none;
  overflow: visible;
}

.editor-summary {
  display: grid;
  gap: 4px;
  padding: 14px;
  margin-bottom: 12px;
  border-radius: 18px;
  background: var(--surface-tint-strong);
  border: 1px solid rgb(var(--accent-rgb) / 0.08);
}

.summary-label {
  font-size: 12px;
  color: rgb(var(--muted-rgb) / 0.58);
}

.summary-value {
  font-weight: 800;
  font-size: 18px;
  color: rgb(var(--text-rgb) / 0.85);
}

.editor-fields {
  display: grid;
  gap: 10px;
}

.editor-fields.journal-editor-fields {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}

.editor-fields.orders-editor-fields {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.editor-fields.orders-editor-fields .field {
  min-width: 0;
}

.order-editor-sections {
  display: grid;
  gap: 14px;
}

.order-editor-card {
  border: 1px solid rgba(35, 181, 168, 0.12);
  border-radius: 22px;
  padding: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(252, 248, 246, 0.96));
  box-shadow: 0 14px 28px rgba(56, 24, 36, 0.06);
}

.order-editor-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.order-editor-card-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: rgba(43, 21, 31, 0.88);
}

.order-editor-card.order-editor-card-audit {
  background: linear-gradient(180deg, rgba(251, 247, 245, 0.94), rgba(248, 241, 238, 0.98));
}

.order-editor-card.order-editor-card-audit .editor-fields.orders-editor-fields {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.field.soft-locked {
  background: linear-gradient(180deg, rgba(250, 244, 246, 0.94), rgba(247, 241, 243, 0.98));
}

.field.soft-locked input,
.field.soft-locked .reference-trigger {
  background: rgba(241, 234, 237, 0.88);
}

.editor-fields.purchase-editor-fields {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.editor-fields.ledger-entry-fields {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.editor-fields.ledger-entry-fields .field {
  min-width: 0;
}

.editor-fields.ledger-entry-fields .field.field-ledger_entry_id,
.editor-fields.ledger-entry-fields .field.field-source_type,
.editor-fields.ledger-entry-fields .field.field-source_id,
.editor-fields.ledger-entry-fields .field.field-entry_date,
.editor-fields.ledger-entry-fields .field.field-status,
.editor-fields.ledger-entry-fields .field.field-total_debit,
.editor-fields.ledger-entry-fields .field.field-total_credit,
.editor-fields.ledger-entry-fields .field.field-posted_by,
.editor-fields.ledger-entry-fields .field.field-record_date,
.editor-fields.ledger-entry-fields .field.field-updated_at {
  grid-column: span 1;
}

.editor-fields.ledger-entry-fields .field.field-description {
  grid-column: 1 / -1;
}

.editor-fields.purchase-editor-fields .field {
  min-width: 0;
}

.editor-fields.purchase-editor-fields .field.field-purchase_no,
.editor-fields.purchase-editor-fields .field.field-purchase_date,
.editor-fields.purchase-editor-fields .field.field-supplier_id,
.editor-fields.purchase-editor-fields .field.field-warehouse_id,
.editor-fields.purchase-editor-fields .field.field-debit_account_id,
.editor-fields.purchase-editor-fields .field.field-invoice_discount,
.editor-fields.purchase-editor-fields .field.field-notes {
  grid-column: span 1;
}

.editor-fields.journal-editor-fields .field.field-entry_no,
.editor-fields.journal-editor-fields .field.field-entry_date {
  grid-column: span 2;
}

.editor-fields.journal-editor-fields .field.field-description {
  grid-column: 1 / -1;
}

.editor-fields.journal-editor-fields .field.field-posted_by,
.editor-fields.journal-editor-fields .field.field-record_date {
  grid-column: span 2;
}

.editor-fields.journal-editor-fields .field.field-record_date {
  min-width: calc(100% + 2ch);
}

.editor-fields.journal-editor-fields .field.field-entry_no {
  grid-column: span 3;
}

.editor-fields.journal-editor-fields .field.field-entry_date input,
.editor-fields.journal-editor-fields .field.field-entry_no input {
  min-height: 40px;
}

.editor-fields.journal-editor-fields .field.field-entry_date {
  max-width: 300px;
}

.editor-fields.journal-editor-fields .field.field-entry_no {
  max-width: 360px;
}

.editor-fields.journal-editor-fields .field.audit-field {
  width: 100%;
  justify-self: stretch;
  padding: 12px;
  border-radius: 14px;
}

.editor-fields.journal-editor-fields .field.audit-field input {
  min-height: 44px;
  padding: 0 12px;
  font-size: 16px;
  line-height: 1.2;
}

.editor-fields.journal-editor-fields .field.audit-field .field-name {
  font-size: 11px;
}

.journal-details-shell {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid rgb(var(--accent-rgb) / 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(253, 247, 245, 0.96));
}

.journal-details-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.journal-details-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
}

.journal-details-subtitle {
  margin-top: 4px;
  font-size: 12px;
  color: rgb(var(--muted-rgb) / 0.72);
}

.journal-details-loading {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgb(var(--accent-rgb) / 0.05);
  color: rgb(var(--muted-rgb) / 0.8);
  font-size: 13px;
}

.journal-details-subtitle {
  display: none;
}

.journal-detail-list {
  display: grid;
  gap: 10px;
}

.journal-detail-table-shell {
  display: grid;
  gap: 8px;
}

.journal-detail-table-head,
.journal-detail-table-row {
  display: grid;
  grid-template-columns: 56px minmax(160px, 0.95fr) minmax(160px, 0.95fr) minmax(110px, 0.62fr) minmax(110px, 0.62fr) minmax(240px, 1.7fr) 84px;
  gap: 12px;
  align-items: stretch;
}

.order-detail-table-head,
.order-detail-table-row {
  grid-template-columns: 48px minmax(170px, 1.35fr) minmax(104px, 0.74fr) minmax(58px, 0.32fr) minmax(72px, 0.4fr) minmax(72px, 0.4fr) minmax(82px, 0.48fr);
  gap: 8px;
}

.ledger-detail-table-head,
.ledger-detail-table-row {
  grid-template-columns: 56px minmax(180px, 1fr) minmax(180px, 1fr) minmax(110px, 0.65fr) minmax(110px, 0.65fr) minmax(220px, 1.4fr);
}

.ledger-detail-pill {
  width: 100%;
  justify-content: flex-start;
}

.journal-detail-table-head {
  padding: 0 10px;
  color: rgb(var(--muted-rgb) / 0.78);
  font-size: 12px;
  font-weight: 700;
}

.journal-detail-table-row {
  padding: 8px;
  border-radius: 14px;
  border: 1px solid rgb(var(--accent-rgb) / 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(253, 248, 246, 0.98));
}

.journal-detail-table-cell {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.journal-detail-inline-field {
  padding: 0;
  border: 0;
  background: transparent;
  gap: 6px;
}

.journal-detail-inline-field .field-name {
  display: none;
}

.journal-detail-inline-field input,
.journal-detail-inline-field .reference-trigger {
  background: linear-gradient(180deg, rgba(252, 248, 246, 0.95), rgba(255, 255, 255, 0.98));
  border-color: rgb(var(--accent-rgb) / 0.1);
}

.journal-detail-inline-field input:focus,
.journal-detail-inline-field .reference-trigger:focus,
.journal-detail-inline-field .reference-trigger:hover {
  border-color: rgb(var(--accent-rgb) / 0.2);
  box-shadow: 0 0 0 3px rgb(var(--accent-rgb) / 0.05);
}

.row-index-head,
.row-index-cell {
  align-items: center;
  justify-content: center;
}

.row-index-cell {
  font-weight: 800;
  color: rgb(var(--text-rgb) / 0.82);
  gap: 4px;
}

.actions-head,
.journal-detail-actions-cell {
  align-items: center;
  justify-content: center;
}

.journal-detail-actions-cell {
  border-inline-start: 1px solid rgb(var(--accent-rgb) / 0.08);
  background: rgba(252, 247, 245, 0.92);
  border-radius: 14px;
}

.journal-detail-actions-cell .ghost-btn.icon-only {
  align-self: center;
  width: 42px;
  height: 42px;
}

.journal-detail-inline-field .reference-trigger {
  min-height: 40px;
}

.journal-detail-inline-field .reference-trigger-label {
  -webkit-line-clamp: 1;
}

.journal-detail-inline-field .reference-trigger-meta {
  max-width: 110px;
}

.journal-detail-inline-field input[type="number"] {
  text-align: center;
}

.order-line-delete-btn {
  width: 28px !important;
  min-width: 28px !important;
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 !important;
  color: var(--danger) !important;
}

.orders-filter-cluster {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.order-status-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.order-status-count {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}

.order-status-count b {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.order-status-count:hover,
.order-status-count.active {
  border-color: color-mix(in srgb, var(--primary) 45%, var(--line));
  background: color-mix(in srgb, var(--primary) 8%, var(--surface));
  color: var(--primary);
}

.editor-fields.orders-editor-fields {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.order-editor-card-workflow .field,
.order-editor-card-links .field {
  grid-column: span 1;
}

.order-editor-card-customer .field.field-customer_name,
.order-editor-card-customer .field.field-customer_mobile {
  grid-column: span 1;
}

.order-editor-card-customer .field.field-shipping_address {
  grid-column: span 2;
}

.order-editor-card-customer .field:not(.field-customer_name):not(.field-customer_mobile):not(.field-shipping_address) {
  grid-column: span 1;
}

.order-editor-card-amounts .field.field-commission_amount,
.order-editor-card-amounts .field.field-shipping_amount {
  grid-column: span 1;
}

.order-editor-card-amounts .field.field-notes {
  grid-column: span 4;
}

.order-editor-system-footer {
  margin-top: 4px;
}

.order-editor-system-footer .order-editor-card-audit {
  padding: 7px 10px;
  border-color: transparent;
  background: transparent;
}

.order-editor-system-footer .field {
  grid-column: span 1;
}

.order-editor-system-footer .field-name {
  font-size: 10px;
  font-weight: 650;
}

.order-editor-system-footer input {
  min-height: 30px;
  padding-block: 5px;
  font-size: 11px;
}

@media (max-width: 900px) {
  .editor-fields.orders-editor-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .order-editor-card-customer .field.field-shipping_address,
  .order-editor-card-amounts .field.field-notes { grid-column: 1 / -1; }
  .order-detail-table-head { display: none; }
  .order-detail-table-row { min-width: 680px; }
}

.order-line-marketplace-reference {
  display: block;
  overflow: hidden;
  color: rgb(var(--muted-rgb) / 0.76);
  font-size: 0.72rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.journal-detail-card {
  display: grid;
  gap: 12px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgb(var(--accent-rgb) / 0.08);
  background: rgba(255, 255, 255, 0.94);
}

.journal-detail-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.journal-detail-card-title {
  font-weight: 800;
  color: rgb(var(--text-rgb) / 0.9);
}

.journal-detail-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.journal-detail-fields .field {
  padding: 10px;
  border-radius: 14px;
}

.journal-detail-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgb(var(--accent-rgb) / 0.12);
  background: rgba(255, 255, 255, 0.96);
  font-size: 13px;
  color: rgb(var(--text-rgb) / 0.82);
}

.journal-detail-summary strong {
  font-weight: 700;
}

.journal-detail-summary.unbalanced {
  border-color: rgba(184, 61, 86, 0.22);
  background: rgba(184, 61, 86, 0.05);
}

.journal-detail-summary.balanced {
  border-color: rgba(59, 130, 246, 0.18);
}

.detail-summary-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgb(var(--accent-rgb) / 0.12);
  background: rgba(255, 255, 255, 0.96);
  color: rgb(var(--text-rgb) / 0.88);
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 8px 22px rgb(var(--shadow-rgb) / 0.05);
}

.remove-icon {
  width: 16px;
  height: 16px;
}

.field {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgb(var(--accent-rgb) / 0.08);
  background: rgba(255, 255, 255, 0.94);
}

.field.invalid {
  border-color: rgba(184, 61, 86, 0.32);
  box-shadow: 0 0 0 3px rgba(184, 61, 86, 0.08);
}

.field.locked {
  background: linear-gradient(180deg, rgba(245, 245, 245, 0.96), rgba(250, 250, 250, 0.98));
  border-color: rgba(170, 170, 170, 0.16);
}

.field.locked .field-name {
  color: rgba(95, 95, 95, 0.88);
}

.field.audit-field {
  background: linear-gradient(180deg, rgba(252, 249, 248, 0.92), rgba(250, 246, 244, 0.96));
  border-color: rgb(var(--accent-rgb) / 0.06);
  padding: 10px 12px;
}

.field.audit-field .field-name {
  color: rgb(var(--muted-rgb) / 0.68);
  font-size: 12px;
  font-weight: 600;
}

.field.audit-field input,
.field.audit-field .reference-trigger,
.field.audit-field select,
.field.audit-field .field-select {
  min-height: 40px;
  background: rgba(255, 255, 255, 0.78);
  color: rgba(74, 57, 65, 0.8);
  border-color: rgb(var(--accent-rgb) / 0.08);
  font-size: 13px;
}

.field.locked input,
.field.locked select {
  background: rgba(239, 239, 239, 0.95);
  color: rgba(86, 86, 86, 0.92);
  border-color: rgba(170, 170, 170, 0.16);
  box-shadow: none;
}

.field.locked input::placeholder {
  color: rgba(140, 140, 140, 0.7);
}

.field.locked .reference-trigger {
  background: rgba(239, 239, 239, 0.95);
  border-color: rgba(170, 170, 170, 0.16);
  color: rgba(86, 86, 86, 0.92);
}

.field.locked .reference-trigger-label,
.field.locked .reference-trigger-meta {
  color: rgba(86, 86, 86, 0.92);
}

.field.locked .reference-trigger:disabled {
  opacity: 1;
  cursor: not-allowed;
}

.field.locked input:disabled,
.field.locked select:disabled {
  opacity: 1;
  -webkit-text-fill-color: rgba(86, 86, 86, 0.92);
  background: rgba(239, 239, 239, 0.95);
}

.field.field-warehouse_id input:disabled,
.field.field-debit_account_id input:disabled {
  opacity: 1;
  -webkit-text-fill-color: var(--text);
}


.current-user-card {
  display: grid;
  gap: 4px;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgb(var(--accent-rgb) / 0.12);
  background: rgba(255, 255, 255, 0.05);
}

.current-user-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.62);
}

.current-user-email {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  word-break: break-word;
}

.current-user-email.placeholder {
  color: rgba(255, 255, 255, 0.55);
  font-weight: 600;
}

.editor-panel .ghost-btn.icon-only {
  min-width: 40px;
  padding-inline: 0;
}

.field-search {
  width: 100%;
  min-height: 40px;
  border: 1px solid rgb(var(--accent-rgb) / 0.14);
  border-radius: 12px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.98);
  color: var(--text);
  outline: none;
}

.field-search::placeholder {
  color: var(--text-soft);
}

.field-hint {
  margin-top: -2px;
  font-size: 12px;
  color: rgb(var(--muted-rgb) / 0.72);
}

.reference-picker {
  position: relative;
}

.reference-trigger {
  width: 100%;
  min-height: 48px;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 0 14px;
  border: 1px solid rgb(var(--accent-rgb) / 0.14);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, var(--surface-tint-soft));
  color: var(--text);
  cursor: pointer;
  text-align: start;
}

.reference-trigger:hover {
  border-color: rgb(var(--accent-rgb) / 0.22);
  box-shadow: 0 0 0 3px rgb(var(--accent-rgb) / 0.06);
}

.reference-trigger:disabled {
  cursor: not-allowed;
  opacity: 0.9;
}

.reference-trigger-label {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.25;
}

.reference-trigger-label.placeholder {
  color: var(--text-soft);
  font-weight: 500;
}

.reference-trigger-meta {
  display: none;
  flex: 0 0 auto;
  font-size: 11px;
  color: rgb(var(--muted-rgb) / 0.72);
  white-space: normal;
  max-width: 120px;
  text-align: end;
}

.reference-trigger-icon {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  color: var(--accent);
  transition: transform 160ms ease;
}

.reference-picker.open .reference-trigger-icon {
  transform: rotate(180deg);
}

.reference-popover {
  position: absolute;
  inset-inline: 0;
  top: calc(100% + 8px);
  z-index: 20;
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgb(var(--accent-rgb) / 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 22px 54px rgb(var(--shadow-rgb) / 0.16);
  backdrop-filter: blur(12px);
}

.reference-popover-head {
  display: flex;
  gap: 8px;
  align-items: center;
}

.reference-search {
  flex: 1;
  min-width: 0;
  min-height: 42px;
  border: 1px solid rgb(var(--accent-rgb) / 0.14);
  border-radius: 12px;
  padding: 0 12px;
  background: #fff;
  color: var(--text);
}

.reference-clear {
  min-height: 42px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgb(var(--accent-rgb) / 0.14);
  background: rgb(var(--accent-rgb) / 0.06);
  color: var(--accent);
  font: inherit;
  cursor: pointer;
}

.reference-popover-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: rgb(var(--muted-rgb) / 0.72);
}

.reference-results {
  max-height: 280px;
  overflow: auto;
  display: grid;
  gap: 6px;
  padding-right: 2px;
}

.reference-result {
  display: grid;
  gap: 3px;
  align-items: start;
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgb(var(--accent-rgb) / 0.1);
  background: #fff;
  text-align: start;
  cursor: pointer;
}

.reference-result:hover {
  background: rgb(var(--accent-rgb) / 0.05);
  border-color: rgb(var(--accent-rgb) / 0.18);
}

.reference-result.selected {
  background: rgb(var(--accent-rgb) / 0.08);
  border-color: rgb(var(--accent-rgb) / 0.24);
}

.reference-result-label {
  font-weight: 700;
  color: var(--text);
}

.reference-result-value {
  font-size: 12px;
  color: rgb(var(--muted-rgb) / 0.82);
}

.reference-empty {
  padding: 16px 12px;
  color: var(--muted);
  text-align: center;
}

.field-name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-weight: 700;
}

.pk {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 24px;
  border-radius: 999px;
  background: rgb(var(--accent-rgb) / 0.1);
  color: var(--accent);
  font-size: 11px;
}

.required-star {
  color: var(--accent);
  font-size: 14px;
  line-height: 1;
}

.field input[type="text"],
.field input[type="number"],
.field input[type="date"],
.field select,
.field-select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 0 12px;
  background: #fff;
  color: var(--text);
  outline: none;
}

.field input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
}

.order-status-action {
  display: grid;
  gap: 8px;
}

.subtle-action-button {
  min-height: 36px;
  border: 1px solid rgb(var(--accent-rgb) / 0.28);
  border-radius: 11px;
  padding: 0 12px;
  background: rgb(var(--accent-rgb) / 0.08);
  color: var(--accent);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.subtle-action-button:hover:not(:disabled) {
  background: rgb(var(--accent-rgb) / 0.14);
}

.subtle-action-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.field input:focus,
.field select:focus,
.search-input:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 4px rgb(var(--accent-rgb) / 0.08);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.editor-actions {
  margin-top: 14px;
  position: sticky;
  bottom: 0;
  z-index: 4;
  padding: 12px 0 2px;
  border-top: 1px solid rgb(var(--accent-rgb) / 0.1);
  background: linear-gradient(180deg, rgba(255, 253, 251, 0.78), var(--surface-strong) 42%);
}

.empty-editor {
  min-height: 320px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 18px;
  background: rgba(251, 247, 244, 0.75);
  padding: 20px;
}

@media (max-width: 1280px) {
  .workspace {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .main-grid {
    grid-template-columns: minmax(0, 1fr) 330px;
  }
}

@media (max-width: 1120px) {
  .editor-actions {
    position: static;
    padding-bottom: 0;
    background: transparent;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .sidebar,
  .editor-panel {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .main-grid,
  .main-grid.single {
    grid-template-columns: 1fr;
  }

  .editor-fields.journal-editor-fields,
  .editor-fields.ledger-entry-fields,
  .editor-fields.orders-editor-fields,
  .journal-detail-fields {
    grid-template-columns: 1fr;
  }

  .order-editor-card.order-editor-card-audit .editor-fields.orders-editor-fields {
    grid-template-columns: 1fr;
  }

  .editor-fields.journal-editor-fields .field.field-entry_no,
  .editor-fields.journal-editor-fields .field.field-entry_date,
  .editor-fields.journal-editor-fields .field.field-description,
  .editor-fields.journal-editor-fields .field.field-posted_by,
  .editor-fields.journal-editor-fields .field.field-record_date {
    grid-column: span 1;
  }
}

@media (max-width: 720px) {
  .app-shell {
    padding: 10px;
  }

  .workspace {
    gap: 12px;
  }

  .sidebar,
  .content,
  .records-panel,
  .editor-panel {
    border-radius: 22px;
  }

  .editor-modal-layer {
    padding: 0;
    place-items: stretch;
  }

  .editor-modal-layer .editor-panel,
  .editor-modal-layer .editor-panel.editor-modal-wide {
    width: 100%;
    max-height: 100vh;
    border-radius: 0;
    border: none;
    overflow: auto;
  }

  .content {
    padding: 14px;
  }

  .content-head,
  .panel-head {
    flex-direction: column;
  }

  .topbar-actions {
    width: 100%;
  }

  .topbar-actions .action-btn {
    flex: 1 1 calc(50% - 8px);
  }

  .provider-action-group,
  .provider-workspace {
    width: 100%;
  }

  .provider-action-group {
    flex-wrap: wrap;
  }

  .provider-action-label {
    flex: 1 0 100%;
  }

  .provider-workspace {
    align-items: flex-start;
    flex-direction: column;
  }

  .search-input.compact {
    width: 100%;
  }

  .record-filters {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .records-table {
    min-width: 620px;
  }

  .toast {
    inset-inline: 12px auto;
    bottom: 12px;
    width: auto;
  }

  .journal-details-head {
    flex-direction: column;
  }

  .editor-fields.journal-editor-fields,
  .journal-detail-fields {
    grid-template-columns: 1fr;
  }
}

.records-panel .record-filters {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  width: min(100%, 620px);
}

.records-panel .record-filters .search-group {
  flex: 1 1 280px;
  min-width: min(100%, 240px);
}

.records-panel .marketplace-provider-filter {
  flex: 0 0 auto;
}

.records-panel .sort-group {
  display: none;
}

.records-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 2px 0;
  color: var(--muted);
  font-size: 13px;
}

.records-pagination {
  display: flex;
  align-items: center;
  gap: 10px;
}

.records-page-size {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  white-space: nowrap;
}

.records-page-size select {
  min-height: 36px;
  min-width: 68px;
  padding: 0 28px 0 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.records-page-size select:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.records-pagination button {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.records-page-jump {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.records-page-jump input {
  width: 76px;
  min-height: 36px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-strong);
  color: var(--text);
  font: inherit;
  text-align: center;
}

.records-page-jump input:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent);
  outline-offset: 1px;
}

.records-pagination button:hover:not(:disabled) {
  border-color: var(--line-strong);
  background: rgb(var(--accent-rgb) / 0.04);
}

.records-pagination button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.records-pagination span {
  min-width: 100px;
  text-align: center;
  color: var(--text);
}

@media (max-width: 1280px) {
  .records-panel .record-filters {
    width: min(100%, 560px);
  }
}

@media (max-width: 680px) {
  .order-bulk-toolbar,
  .order-bulk-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .order-bulk-copy {
    justify-content: flex-start;
  }

  .bulk-fulfillment-btn,
  .bulk-clear-selection {
    width: 100%;
  }

  .records-panel .record-filters {
    align-items: stretch;
    width: 100%;
  }

  .records-panel .record-filters .search-group,
  .records-panel .marketplace-provider-filter {
    flex-basis: 100%;
    width: 100%;
  }

  .records-panel .marketplace-provider-filter button {
    flex: 1 1 0;
  }

  .records-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .records-pagination {
    justify-content: space-between;
  }

  .records-page-size {
    justify-content: space-between;
  }
}

.website-inbox-screen { display: grid; gap: 18px; padding: 24px; }
.website-inbox-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; padding: 8px 4px; }
.website-inbox-head-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.website-inbox-head p { margin: 0 0 4px; color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.website-inbox-head h1 { margin: 0; color: var(--ink); font-size: clamp(26px, 3vw, 38px); }
.website-inbox-head span { display: block; margin-top: 6px; color: var(--muted); }
.website-inbox-list { display: grid; gap: 12px; }
.website-inbox-order, .website-inbox-empty, .website-inbox-accepted { border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-soft); overflow: visible; }
.website-inbox-order.exception { border-color: color-mix(in srgb, var(--warning, #d08a25) 45%, var(--line)); }
.website-inbox-order.accepted { opacity: .82; }
.website-inbox-summary { width: 100%; display: grid; grid-template-columns: minmax(150px, 1.1fr) auto repeat(3, minmax(110px, .8fr)) minmax(170px, 1.25fr) 20px; align-items: center; gap: 12px; border: 0; border-radius: inherit; padding: 16px 18px; background: transparent; color: var(--ink); text-align: inherit; cursor: pointer; }
.website-inbox-summary:hover { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.website-inbox-order-id { font-weight: 800; direction: ltr; text-align: start; }
.website-inbox-date { color: var(--muted); font-size: 13px; }
.website-inbox-state { display: inline-flex; width: fit-content; padding: 5px 9px; border-radius: 999px; font-size: 12px; font-weight: 750; }
.website-inbox-state.warning { color: #895600; background: #fff1d7; }
.website-inbox-state.exception { color: #895600; background: #fff1d7; }
.website-inbox-state.ready { color: #08735d; background: #dcf8ef; }
.website-inbox-state.accepted { color: #62707a; background: #eaf0f1; }
.website-inbox-body { display: grid; gap: 16px; padding: 0 18px 18px; border-top: 1px solid var(--line); }
.website-inbox-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.website-inbox-metrics > span { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 12px 15px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--muted); font-size: 13px; }
.website-inbox-metrics > span.warning { border-color: color-mix(in srgb, var(--warning, #d08a25) 50%, var(--line)); }
.website-inbox-metrics b { color: var(--ink); font-size: 21px; font-variant-numeric: tabular-nums; }
.website-inbox-section { display: grid; gap: 10px; }
.website-inbox-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 3px 4px; }
.website-inbox-section-head h2 { margin: 0; font-size: 17px; color: var(--ink); }
.website-inbox-section-head small { color: var(--muted); }
.website-inbox-section-head > span { display: inline-grid; place-items: center; min-width: 28px; height: 28px; padding: 0 8px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 10%, var(--surface)); color: var(--accent); font-size: 13px; font-weight: 800; }
.website-inbox-exception { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--warning, #d08a25) 32%, var(--line)); border-radius: 13px; background: color-mix(in srgb, var(--warning, #d08a25) 8%, var(--surface)); }
.website-inbox-exception > div { display: grid; gap: 4px; min-width: 0; }
.website-inbox-exception span { color: var(--muted); overflow-wrap: anywhere; }
.website-inbox-customer { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding-top: 16px; }
.website-inbox-customer > div { display: grid; gap: 4px; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--canvas) 78%, var(--surface)); }
.website-inbox-customer small, .website-inbox-line small { color: var(--muted); font-size: 12px; }
.website-inbox-lines { display: grid; gap: 8px; }
.website-inbox-lines h3 { margin: 4px 0 2px; font-size: 15px; }
.website-inbox-line { display: grid; grid-template-columns: minmax(190px, 1fr) minmax(280px, 1.4fr) 90px; gap: 14px; align-items: start; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: color-mix(in srgb, var(--surface) 94%, var(--canvas)); }
.website-inbox-external, .website-inbox-mapping { display: grid; gap: 4px; min-width: 0; }
.website-inbox-external strong, .website-inbox-mapping .mapped { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.website-inbox-external span { color: var(--muted); font-size: 12px; direction: ltr; text-align: start; }
.website-inbox-variants { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.website-inbox-variants span { direction: inherit; padding: 3px 7px; border: 1px solid var(--line); border-radius: 999px; background: color-mix(in srgb, var(--accent) 5%, var(--surface)); color: var(--muted); font-size: 11px; }
.website-inbox-variants b { color: var(--ink); font-weight: 750; }
.website-inbox-variants .missing { color: var(--muted); font-style: italic; }
.website-inbox-mapping { position: relative; }
.website-inbox-mapping input, .website-inbox-accept select { min-height: 38px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: var(--surface); color: var(--ink); font: inherit; }
.website-inbox-mapping .mapped { color: #08735d; font-size: 13px; }
.website-inbox-mapping .unmapped { color: #a15b00; font-size: 13px; }
.website-inbox-candidates { position: absolute; z-index: 5; top: 64px; inset-inline: 0; display: grid; max-height: 220px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 14px 30px rgba(20, 48, 52, .16); }
.website-inbox-candidates button, .website-inbox-candidates span { border: 0; padding: 10px 12px; background: transparent; color: var(--ink); font: inherit; text-align: start; }
.website-inbox-candidates button:hover { background: color-mix(in srgb, var(--accent) 9%, transparent); }
.website-inbox-line-total { padding-top: 25px; font-weight: 800; direction: ltr; text-align: end; }
.website-inbox-accept { display: grid; grid-template-columns: minmax(180px, .75fr) minmax(180px, .75fr) auto; gap: 12px; align-items: end; padding: 14px; border-radius: 14px; background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
.website-inbox-accept label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 700; }
.website-inbox-actions { display: flex; justify-content: flex-end; }
.website-inbox-empty { padding: 38px; color: var(--muted); text-align: center; }
.website-inbox-accepted { padding: 14px 16px; }
.website-inbox-accepted summary { cursor: pointer; font-weight: 750; }
.website-inbox-accepted .website-inbox-list { margin-top: 14px; }
.website-inbox-sku-action { width: fit-content; margin-top: 5px; }
.website-sku-manager { display: grid; gap: 16px; min-width: 0; padding: 18px; border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--line)); border-radius: 18px; background: color-mix(in srgb, var(--accent) 3%, var(--surface)); box-shadow: var(--shadow-soft); }
.website-sku-manager-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.website-sku-manager-head > div { display: grid; gap: 4px; }
.website-sku-manager-head p { margin: 0; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.website-sku-manager-head h2 { margin: 0; color: var(--ink); font-size: 20px; }
.website-sku-manager-head span, .website-sku-catalog-head span { color: var(--muted); font-size: 13px; }
.website-sku-lookup { display: grid; grid-template-columns: minmax(220px, 1fr) auto auto; gap: 10px; align-items: flex-end; padding: 14px; border-radius: 14px; background: var(--surface); }
.website-sku-lookup label, .website-sku-catalog-head label, .website-sku-edit-form label { display: grid; gap: 6px; min-width: 0; color: var(--muted); font-size: 12px; font-weight: 750; }
.website-sku-lookup input, .website-sku-catalog-head input, .website-sku-edit-form input { min-height: 40px; width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 8px 11px; background: var(--canvas); color: var(--ink); font: inherit; }
.website-sku-lookup input:focus-visible, .website-sku-catalog-head input:focus-visible, .website-sku-edit-form input:focus-visible { outline: 2px solid color-mix(in srgb, var(--accent) 65%, transparent); outline-offset: 2px; }
.website-sku-message, .website-sku-result { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.website-sku-message.warning { border-color: color-mix(in srgb, var(--warning, #d08a25) 45%, var(--line)); background: color-mix(in srgb, var(--warning, #d08a25) 7%, var(--surface)); }
.website-sku-message, .website-sku-result > div { display: grid; gap: 3px; }
.website-sku-message span, .website-sku-result span { color: var(--muted); font-size: 12px; }
.website-sku-result small, .website-sku-editor-head small, .website-sku-preview small { color: var(--muted); font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; }
.website-sku-catalog { display: grid; gap: 10px; min-width: 0; }
.website-sku-catalog-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.website-sku-catalog-head > div { display: grid; gap: 3px; }
.website-sku-catalog-head h3, .website-sku-editor h3 { margin: 0; color: var(--ink); font-size: 16px; }
.website-sku-catalog-head label { width: min(360px, 100%); }
.website-sku-table-wrap { min-width: 0; overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.website-sku-table-wrap table { width: 100%; min-width: 760px; border-collapse: collapse; }
.website-sku-table-wrap th, .website-sku-table-wrap td { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: middle; }
.website-sku-table-wrap th { position: sticky; top: 0; z-index: 1; background: color-mix(in srgb, var(--canvas) 82%, var(--surface)); color: var(--muted); font-size: 11px; font-weight: 800; }
.website-sku-table-wrap td { color: var(--ink); font-size: 13px; }
.website-sku-table-wrap td:first-child, .website-sku-table-wrap td:nth-child(2) { display: table-cell; }
.website-sku-table-wrap td:first-child strong, .website-sku-table-wrap td:first-child small, .website-sku-table-wrap td:nth-child(2) strong, .website-sku-table-wrap td:nth-child(2) small { display: block; }
.website-sku-table-wrap td small { max-width: 260px; margin-top: 2px; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.website-sku-table-wrap tr:last-child td { border-bottom: 0; }
.website-sku-availability { display: inline-flex; width: max-content; padding: 4px 8px; border-radius: 999px; font-size: 11px; font-weight: 750; }
.website-sku-availability.available { color: #08735d; background: #dcf8ef; }
.website-sku-availability.unavailable { color: #a13535; background: #fde7e7; }
.website-sku-availability.unknown { color: var(--muted); background: color-mix(in srgb, var(--canvas) 75%, var(--surface)); }
.website-sku-empty { padding: 28px; color: var(--muted); text-align: center; }
.website-sku-editor { display: grid; gap: 13px; padding: 15px; border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); border-radius: 14px; background: var(--surface); }
.website-sku-editor-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.website-sku-editor-head > div { display: grid; gap: 3px; }
.website-sku-edit-form { display: grid; grid-template-columns: minmax(180px, .8fr) minmax(220px, 1fr) auto; gap: 12px; align-items: flex-end; }
.website-sku-edit-form input[readonly] { background: color-mix(in srgb, var(--canvas) 75%, var(--surface)); color: var(--muted); }
.website-sku-edit-form label small { color: var(--muted); font-weight: 500; }
.website-sku-preview { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px; border-radius: 12px; background: color-mix(in srgb, var(--warning, #d08a25) 7%, var(--surface)); }
.website-sku-preview > div:first-child { display: grid; gap: 7px; }
.website-sku-preview > div:last-child { display: flex; flex-wrap: wrap; gap: 8px; }
.website-sku-preview span { display: flex; align-items: center; gap: 10px; font-size: 17px; }
.website-sku-preview del { color: var(--muted); }
.website-sku-preview strong { color: var(--ink); }
.website-sku-preview p { margin: 0; color: var(--muted); font-size: 12px; }
.review-website-inbox-link { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; margin: 2px 0 14px; padding: 13px 15px; border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line)); border-radius: 14px; background: color-mix(in srgb, var(--accent) 5%, var(--surface)); color: var(--ink); font: inherit; text-align: inherit; cursor: pointer; }
.review-website-inbox-link:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, var(--surface)); }
.review-website-inbox-link > span:nth-child(2) { display: grid; gap: 3px; min-width: 0; }
.review-website-inbox-link strong { font-size: 14px; }
.review-website-inbox-link small { color: var(--muted); }
.review-website-inbox-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--surface); color: var(--accent); }
@media (max-width: 860px) {
  .website-inbox-screen { padding: 16px; }
  .website-inbox-head { align-items: start; flex-direction: column; }
  .website-inbox-head-actions { justify-content: flex-start; }
  .website-inbox-summary { grid-template-columns: 1fr auto; }
  .website-inbox-summary > span:not(.website-inbox-order-id):not(.website-inbox-state):not(:last-child) { display: none; }
  .website-inbox-customer, .website-inbox-line, .website-inbox-accept, .website-inbox-metrics { grid-template-columns: 1fr; }
  .website-inbox-exception { align-items: stretch; flex-direction: column; }
  .website-inbox-line-total { padding-top: 0; text-align: start; }
  .website-sku-manager-head, .website-sku-catalog-head, .website-sku-editor-head, .website-sku-preview { align-items: stretch; flex-direction: column; }
  .website-sku-lookup, .website-sku-edit-form { grid-template-columns: 1fr; }
  .website-sku-catalog-head label { width: 100%; }
  .website-sku-preview > div:last-child { justify-content: flex-end; }
}


.availability-screen { display: grid; gap: 18px; min-width: 0; padding: 24px; }
.availability-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; padding: 6px 4px; }
.availability-heading > div { display: grid; gap: 5px; }
.availability-heading span { color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.availability-heading h1 { margin: 0; color: var(--ink); font-size: clamp(26px, 3vw, 38px); line-height: 1.15; }
.availability-heading p { max-width: 680px; margin: 0; color: var(--muted); }
.availability-toolbar, .availability-settings-card, .availability-table-card, .availability-loading, .availability-error { border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-soft); }
.availability-toolbar { display: grid; grid-template-columns: minmax(220px, .55fr) minmax(280px, 1fr); gap: 14px; padding: 16px; }
.availability-toolbar label, .availability-settings-card label { display: grid; gap: 7px; min-width: 0; color: var(--muted); font-size: 12px; font-weight: 750; }
.availability-toolbar select, .availability-toolbar input, .availability-settings-card select, .availability-settings-card input { min-height: 42px; width: 100%; border: 1px solid var(--line); border-radius: 11px; padding: 9px 12px; background: var(--canvas); color: var(--ink); font: inherit; }
.availability-settings-card { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(180px, .65fr) minmax(140px, .4fr) auto; align-items: end; gap: 14px; padding: 17px; }
.availability-settings-card.compact { grid-template-columns: minmax(260px, 1fr) auto; }
.availability-source-actions { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.availability-settings-card strong { color: var(--ink); }
.availability-settings-card p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.availability-notice { padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--line) 70%, var(--accent)); border-radius: 13px; background: color-mix(in srgb, var(--accent) 6%, var(--surface)); color: var(--ink); font-size: 13px; }
.availability-notice.warning { border-color: #e6bb70; background: #fff8e8; color: #73500c; }
.availability-notice.info { color: var(--muted); }
.availability-notice.success { border-color: color-mix(in srgb, var(--success) 45%, var(--line)); background: color-mix(in srgb, var(--success) 8%, var(--surface)); color: var(--ink); }
.availability-table-card { overflow: hidden; }
.availability-table-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; padding: 13px 16px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--canvas) 42%, var(--surface)); }
.availability-table-actions > span { margin-inline-end: auto; color: var(--muted); font-size: 13px; }
.availability-count-summary { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-inline-end: auto; color: var(--muted); font-size: 12px; }
.availability-count-summary span { padding: 5px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); white-space: nowrap; }
.availability-count-summary span:last-child { color: var(--ink); font-weight: 780; }
.availability-advanced { position: relative; }
.availability-advanced summary { list-style: none; cursor: pointer; color: var(--muted); font-size: 12px; font-weight: 750; padding: 9px 4px; }
.availability-advanced summary::-webkit-details-marker { display: none; }
.availability-advanced summary::after { content: "⌄"; display: inline-block; margin-inline-start: 6px; color: var(--accent); }
.availability-advanced[open] > .action-btn { position: absolute; inset-inline-end: 0; top: calc(100% + 6px); z-index: 5; min-width: 190px; box-shadow: var(--shadow-soft); background: var(--surface); }
.availability-table-scroll { max-width: 100%; overflow: auto; }
.availability-table-scroll table { width: 100%; min-width: 840px; border-collapse: collapse; color: var(--ink); text-align: start; }
.availability-table-scroll th, .availability-table-scroll td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.availability-table-scroll th { color: var(--muted); font-size: 12px; font-weight: 800; background: color-mix(in srgb, var(--canvas) 74%, var(--surface)); }
.availability-table-scroll tbody tr:last-child td { border-bottom: 0; }
.availability-table-scroll tbody tr.selected { background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.availability-group-row td { border-top: 1px solid var(--line); background: color-mix(in srgb, var(--accent) 6%, var(--canvas)); color: var(--ink); }
.availability-group-row strong { font-size: 12px; font-weight: 760; letter-spacing: .015em; }
.availability-group-row small { display: inline; margin-inline-start: 8px; }
.availability-subgroup-row td { background: color-mix(in srgb, var(--canvas) 82%, var(--surface)); }
.availability-subgroup-row strong { font-size: 14px; font-weight: 800; }
.availability-group-toggle { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; border: 0; padding: 2px 0; background: transparent; color: inherit; font: inherit; text-align: start; cursor: pointer; }
.availability-group-toggle:hover strong { color: var(--accent); }
.availability-group-toggle:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: 4px; }
.availability-group-toggle i { display: inline-grid; place-items: center; inline-size: 18px; block-size: 18px; color: var(--accent); font-size: 17px; font-style: normal; line-height: 1; }
.availability-table-scroll small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.availability-table-scroll input[type="checkbox"] { inline-size: 16px; block-size: 16px; accent-color: var(--accent); }
.availability-provider, .availability-state, .availability-sync { display: inline-flex; align-items: center; width: fit-content; border-radius: 999px; padding: 5px 9px; font-size: 12px; font-weight: 760; }
.availability-provider { background: color-mix(in srgb, var(--accent) 8%, var(--surface)); color: var(--ink); direction: ltr; }
.availability-provider.amazon { color: #9d5518; background: #fff1df; }
.availability-provider.jumia { color: #176bb4; background: #e4f1ff; }
.availability-provider.noon { color: #6c5a00; background: #fff8bd; }
.availability-provider.website { color: #ab2760; background: #ffe8f1; }
.availability-state.available { color: #067159; background: #e0f8ef; }
.availability-state.unavailable { color: #8d3e45; background: #fff0f1; }
.availability-sync.pending { color: #75633b; background: #f8f3e9; }
.availability-sync.synced { color: #08735d; background: #e0f8ef; }
.availability-sync.failed { color: #a63947; background: #fff0f1; }
.availability-sync.unsupported { color: #66737b; background: #eff3f4; }
.availability-error-text { max-width: 240px; color: #ae3c49 !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.availability-empty { padding: 42px !important; color: var(--muted); text-align: center; }
.availability-loading, .availability-error { display: grid; gap: 12px; justify-items: start; padding: 32px; color: var(--muted); }
.availability-error strong { color: var(--ink); }
.availability-inline-error { padding: 10px 16px; color: #a63947; background: #fff0f1; font-size: 13px; }
.availability-problems { border: 1px solid #ebc38b; border-radius: 14px; background: #fff9ec; color: #6d4d13; overflow: hidden; }
.availability-problems summary { padding: 12px 14px; cursor: pointer; font-weight: 800; }
.availability-problems > div { display: grid; gap: 7px; padding: 0 14px 14px; }
.availability-problems p { display: flex; flex-wrap: wrap; gap: 7px; margin: 0; padding-top: 8px; border-top: 1px solid #f0dcb8; font-size: 13px; }
.availability-problems span { color: #8b6f3e; direction: ltr; }
.availability-bulk-quantity { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 750; }
.availability-bulk-quantity input { width: 90px; min-height: 36px; border: 1px solid var(--line); border-radius: 10px; padding: 6px 9px; background: var(--canvas); color: var(--ink); font: inherit; }


.quantity-sync-screen { display: grid; gap: 14px; min-width: 0; padding: 0 0 24px; }
.quantity-sync-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 2px 4px; }
.quantity-sync-heading > div { display: grid; gap: 4px; }
.quantity-sync-heading span { color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.quantity-sync-heading h1 { margin: 0; color: var(--ink); font-size: clamp(26px, 3vw, 38px); line-height: 1.15; }
.quantity-sync-heading p { max-width: 680px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.quantity-sync-controls, .quantity-sync-mode-card, .quantity-sync-table-card, .quantity-sync-loading, .quantity-sync-error, .quantity-sync-progress { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-soft); }
.quantity-sync-controls { display: grid; grid-template-columns: minmax(210px, .8fr) minmax(190px, .7fr) minmax(240px, 1.2fr) auto; gap: 10px; align-items: end; padding: 12px; }
.quantity-sync-controls > label, .quantity-sync-sheet-action { display: grid; gap: 6px; min-width: 0; color: var(--muted); font-size: 12px; font-weight: 750; }
.quantity-sync-controls select, .quantity-sync-controls input { width: 100%; min-height: 40px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 11px; background: var(--canvas); color: var(--ink); font: inherit; }
.quantity-sync-sheet-action .action-btn { min-height: 40px; white-space: nowrap; }
.quantity-sync-mode-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; }
.quantity-sync-mode-card strong { color: var(--ink); font-size: 14px; }
.quantity-sync-mode-card p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.quantity-mode-toggle { display: inline-flex; flex-wrap: wrap; gap: 5px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--canvas); }
.quantity-mode-toggle button { min-height: 32px; border: 0; border-radius: 8px; padding: 6px 10px; background: transparent; color: var(--muted); font: inherit; font-size: 12px; font-weight: 760; cursor: pointer; }
.quantity-mode-toggle button:hover:not(:disabled) { color: var(--ink); background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.quantity-mode-toggle button.active { background: var(--accent); color: var(--accent-contrast, var(--text-on-accent)); box-shadow: 0 4px 10px color-mix(in srgb, var(--accent) 24%, transparent); }
.quantity-mode-toggle button:disabled { cursor: not-allowed; opacity: .55; }
.quantity-sync-progress { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-color: color-mix(in srgb, var(--accent) 42%, var(--line)); }
.quantity-sync-progress strong, .quantity-sync-progress small { display: block; }
.quantity-sync-progress strong { color: var(--ink); font-size: 13px; }
.quantity-sync-progress small { margin-top: 2px; color: var(--muted); font-size: 12px; }
.quantity-sync-spinner { inline-size: 19px; block-size: 19px; flex: 0 0 19px; border: 2px solid color-mix(in srgb, var(--accent) 24%, transparent); border-top-color: var(--accent); border-radius: 50%; animation: quantity-sync-spin .7s linear infinite; }
@keyframes quantity-sync-spin { to { transform: rotate(360deg); } }
.quantity-sync-notice { padding: 10px 13px; border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--line)); border-radius: 12px; background: color-mix(in srgb, var(--accent) 6%, var(--surface)); color: var(--ink); font-size: 13px; }
.quantity-sync-table-card { overflow: hidden; }
.quantity-sync-table-topline { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 13px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--canvas) 46%, var(--surface)); }
.quantity-sync-metrics, .quantity-sync-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.quantity-sync-metrics span { display: inline-flex; align-items: baseline; gap: 4px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 12px; white-space: nowrap; }
.quantity-sync-metrics strong { color: var(--ink); font-size: 13px; }
.quantity-sync-metrics .warning { border-color: #e5c47e; background: #fff9ed; color: #815c15; }
.quantity-sync-table-scroll { max-width: 100%; overflow: auto; }
.quantity-sync-table-scroll table { width: 100%; min-width: 980px; border-collapse: collapse; color: var(--ink); text-align: start; }
.quantity-sync-table-scroll th, .quantity-sync-table-scroll td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.quantity-sync-table-scroll th { color: var(--muted); background: color-mix(in srgb, var(--canvas) 76%, var(--surface)); font-size: 12px; font-weight: 800; white-space: nowrap; }
.quantity-sync-table-scroll tbody tr:last-child td { border-bottom: 0; }
.quantity-sync-table-scroll tbody tr.selected { background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
.quantity-sync-table-scroll tbody tr.is-unmapped { background: color-mix(in srgb, #d99a2b 5%, var(--surface)); }
.quantity-sync-table-scroll strong { font-size: 13px; }
.quantity-sync-table-scroll small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.quantity-sync-table-scroll input[type="checkbox"] { inline-size: 16px; block-size: 16px; accent-color: var(--accent); }
.quantity-sync-group-row td { border-top: 1px solid var(--line); background: color-mix(in srgb, var(--accent) 6%, var(--canvas)); }
.quantity-sync-subgroup-row td { background: color-mix(in srgb, var(--canvas) 82%, var(--surface)); }
.quantity-sync-group-toggle { display: inline-flex; align-items: center; gap: 8px; border: 0; padding: 1px 0; background: transparent; color: var(--ink); font: inherit; text-align: start; cursor: pointer; }
.quantity-sync-group-toggle i { display: inline-grid; place-items: center; inline-size: 18px; block-size: 18px; color: var(--accent); font-size: 17px; font-style: normal; line-height: 1; }
.quantity-sync-group-toggle small { display: inline; margin: 0; }
.quantity-provider-badge, .quantity-sync-state, .quantity-unmapped { display: inline-flex; align-items: center; width: fit-content; border-radius: 999px; padding: 5px 8px; font-size: 12px; font-weight: 760; direction: ltr; }
.quantity-provider-badge { background: color-mix(in srgb, var(--accent) 9%, var(--surface)); color: var(--ink); }
.quantity-provider-badge.amazon { color: #9d5518; background: #fff1df; }
.quantity-provider-badge.jumia { color: #176bb4; background: #e4f1ff; }
.quantity-provider-badge.noon { color: #695500; background: #fff1a6; }
.quantity-provider-badge.website { color: #ab2760; background: #ffe8f1; }
.quantity-unmapped { color: #815c15; background: #fff6e4; direction: inherit; }
.quantity-sync-state.synced { color: #08735d; background: #e0f8ef; }
.quantity-sync-state.pending { color: #75633b; background: #f8f3e9; }
.quantity-sync-state.failed { color: #a63947; background: #fff0f1; }
.quantity-sync-state.unmapped { color: #815c15; background: #fff6e4; }
.quantity-final-input { display: flex; align-items: center; gap: 5px; }
.quantity-final-input input { inline-size: 94px; min-height: 36px; border: 1px solid var(--line); border-radius: 9px; padding: 6px 8px; background: var(--canvas); color: var(--ink); font: inherit; text-align: center; }
.quantity-final-input button { inline-size: 30px; block-size: 30px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--muted); cursor: pointer; }
.quantity-row-error { max-width: 190px; color: #a63947 !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quantity-sync-empty { padding: 42px !important; color: var(--muted); text-align: center; }
.quantity-sync-loading, .quantity-sync-error { display: grid; justify-items: start; gap: 10px; padding: 32px; color: var(--muted); }
.quantity-sync-error strong { color: var(--ink); }
.quantity-sync-inline-error { padding: 10px 13px; border-bottom: 1px solid #f1c6ce; background: #fff0f1; color: #a63947; font-size: 13px; }
@media (max-width: 980px) { .quantity-sync-controls { grid-template-columns: 1fr 1fr; } .quantity-sync-mode-card { align-items: start; flex-direction: column; } }
@media (max-width: 680px) { .quantity-sync-screen { gap: 11px; } .quantity-sync-heading { align-items: start; flex-direction: column; } .quantity-sync-controls { grid-template-columns: 1fr; } .quantity-sync-sheet-action .action-btn, .quantity-sync-heading > .action-btn { width: 100%; } .quantity-sync-table-topline { align-items: stretch; } .quantity-sync-actions > .action-btn { flex: 1 1 160px; } }


.app-shell { padding: 10px; }
.workspace { grid-template-columns: 264px minmax(0, 1fr); gap: 12px; }
.sidebar { top: 10px; max-height: calc(100vh - 20px); padding: 16px 14px 14px; border-radius: 22px; }
.brand { gap: 12px; padding-bottom: 14px; }
.brand-logo { width: 82px; height: 82px; border-radius: 20px; }
.brand h1 { font-size: 29px; }
.sidebar-actions { margin-top: 10px; }
.group-list { gap: 10px; margin-top: 12px; }
.group-section { gap: 6px; padding: 8px; border-radius: 14px; }
.group-items { gap: 6px; }
.group-toggle { padding-bottom: 4px; }
.table-item { border-radius: 12px; padding: 9px 10px; }
.table-item-main { gap: 8px; font-size: 13px; }
.nav-icon, .table-title-icon, .settings-icon, .inline-icon { width: 16px; height: 16px; }
.content { gap: 12px; padding: 14px; border-radius: 22px; }
.content-head { gap: 12px; }
.content-title { gap: 3px; }
.content-title h2 { font-size: clamp(27px, 2.5vw, 38px); }
.content-kicker, .brand-kicker, .panel-kicker, .group-title { font-size: 10px; letter-spacing: .11em; }
.updated-chip { padding: 4px 8px; font-size: 11px; }
.main-grid { grid-template-columns: minmax(0, 1fr) 320px; gap: 12px; }
.records-panel, .editor-panel { border-radius: 16px; padding: 13px; }
.editor-panel { top: 10px; max-height: calc(100vh - 20px); }
.editor-modal-layer { padding: 16px; }
.editor-modal-layer .editor-panel { width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 32px); }
.editor-modal-layer .editor-panel.editor-modal-wide { width: min(1360px, calc(100vw - 32px)); }
.editor-modal-layer .panel-head { margin-bottom: 12px; padding: 14px; }
.panel-head { margin-bottom: 10px; }
.panel-head h3 { font-size: 21px; }
.search-input { min-height: 40px; border-radius: 10px; padding-inline: 11px; }
.record-filters { grid-template-columns: 148px minmax(200px, 1fr); }
.marketplace-provider-filter { min-height: 38px; border-radius: 11px; }
.marketplace-provider-filter button { min-height: 29px; min-width: 62px; padding-inline: 9px; }
.table-wrap { border-radius: 12px; }
.records-table th, .records-table td { padding: 9px; font-size: 13px; }
.records-table th { font-size: 12px; }
.inline-open { min-height: 32px; padding-inline: 10px; }
.empty-state { padding: 20px 10px; font-size: 13px; }
.editor-summary { gap: 2px; padding: 10px 12px; margin-bottom: 10px; border-radius: 12px; }
.summary-label { font-size: 11px; }
.summary-value { font-size: 16px; }
.editor-fields, .editor-fields.orders-editor-fields, .editor-fields.purchase-editor-fields { gap: 8px; }
.order-editor-sections { gap: 10px; }
.order-editor-card { border-radius: 14px; padding: 12px; box-shadow: none; }
.order-editor-card-head { margin-bottom: 8px; }
.order-editor-card-head h3 { font-size: 15px; }
.order-editor-card.order-editor-card-audit { background: color-mix(in srgb, var(--surface-tint-strong) 65%, var(--surface-strong)); }
.field.soft-locked { background: color-mix(in srgb, var(--muted) 7%, var(--surface-strong)); }
.field.soft-locked input, .field.soft-locked .reference-trigger { background: color-mix(in srgb, var(--muted) 10%, var(--surface-strong)); }
.credential-modal-backdrop { align-items: center; padding: 16px; }
.credential-modal { max-height: calc(100dvh - 32px); margin: auto; }
.credential-modal > header { top: 0; margin: 0 0 12px; padding: 14px 16px 12px; }
.reports-screen, .availability-screen { gap: 12px; padding: 0 0 20px; }
.reports-heading, .availability-heading { padding: 0 2px; }
.reports-heading p, .availability-heading p { font-size: 13px; line-height: 1.45; }
.reports-controls, .report-controls-card { gap: 9px; padding: 11px; border-radius: 16px; }
.report-metric { min-height: 88px; padding: 12px; border-radius: 13px; }
.report-metric strong { margin-top: 8px; }
.reports-grid, .dashboard-grid { gap: 12px; }
.report-panel { padding: 13px; border-radius: 16px; }
.report-panel-heading { margin-bottom: 10px; }
.report-table th, .report-table td { padding: 9px 7px; }
.availability-toolbar { gap: 10px; padding: 12px; border-radius: 15px; }
.availability-settings-card { gap: 10px; padding: 12px; border-radius: 15px; }
.availability-table-actions { gap: 7px; padding: 10px 12px; }
.availability-table-scroll th, .availability-table-scroll td { padding: 9px 11px; }
.availability-notice { padding: 9px 11px; font-size: 12px; }
.home-hero { padding: 18px !important; border-radius: 18px !important; }
.home-hero h2 { font-size: clamp(26px, 3vw, 36px) !important; }
.home-hero p, .home-section-heading > p { display: none; }
.home-workspace-section { gap: 10px !important; }
.home-section-heading { align-items: center !important; }
.home-quick-grid, .home-priority-grid { gap: 10px !important; }
.home-quick-action { min-height: 104px !important; padding: 13px !important; }
.home-quick-action small { display: none; }

@media (max-width: 1100px) {
  .workspace { grid-template-columns: 236px minmax(0, 1fr); }
  .main-grid { grid-template-columns: minmax(0, 1fr); }
  .editor-panel { position: static; max-height: none; }
}

@media (max-width: 760px) {
  .app-shell { padding: 0; }
  .content { border-radius: 0; border-inline: 0; padding: 12px 12px 88px; }
  .content-head { align-items: flex-start; }
  .content-title h2 { font-size: 27px; }
  .records-panel, .editor-panel { padding: 11px; }
  .record-filters { grid-template-columns: 1fr; width: 100%; }
  .reports-controls, .report-controls-card, .availability-toolbar, .availability-settings-card { grid-template-columns: 1fr; }
  .editor-modal-layer { padding: 8px; align-items: end; }
  .editor-modal-layer .editor-panel, .editor-modal-layer .editor-panel.editor-modal-wide { width: 100%; max-height: calc(100dvh - 16px); border-radius: 18px 18px 12px 12px; }
  .credential-modal-backdrop { align-items: end; padding: 8px; }
  .credential-modal { width: 100%; max-width: none; max-height: calc(100dvh - 16px); border-radius: 18px 18px 12px 12px; }
}


.records-panel:has(.orders-records-table),
.editor-modal-wide:has(.order-editor-sections) {
  --orders-control-height: 42px;
  --orders-gap: 8px;
  --orders-section-gap: 12px;
}

.records-panel:has(.orders-records-table) {
  width: 100%;
  max-width: none;
}

.records-panel:has(.orders-records-table) .record-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-tint);
}

.records-panel:has(.orders-records-table) .orders-filter-cluster {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
}

.records-panel:has(.orders-records-table) .record-filters input,
.records-panel:has(.orders-records-table) .record-filters select,
.editor-modal-wide:has(.order-editor-sections) input,
.editor-modal-wide:has(.order-editor-sections) select,
.editor-modal-wide:has(.order-editor-sections) button {
  min-height: 42px;
  height: 42px;
}

.records-panel:has(.orders-records-table) .records-table th,
.records-panel:has(.orders-records-table) .records-table td {
  padding: 8px 12px;
  vertical-align: middle;
}

.records-panel:has(.orders-records-table) .status-badge,
.order-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.editor-modal-wide:has(.order-editor-sections) {
  width: min(1600px, calc(100vw - 32px));
  max-width: none;
}

.order-summary-compact {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px 12px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-tint);
}

.order-summary-item {
  min-width: 0;
  display: grid;
  gap: 8px;
  text-align: start;
}

.order-summary-item span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.order-summary-item strong {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-summary-total {
  grid-column: span 2;
  padding-inline: 12px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--primary) 8%, var(--surface-strong));
}

.order-summary-total strong {
  color: var(--primary);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.order-editor-sections { gap: 12px; }
.order-editor-card {
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-tint);
  box-shadow: none;
}

.order-editor-card-head { margin-bottom: 8px; }
.editor-modal-wide:has(.order-editor-sections) .editor-fields.orders-editor-fields {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.editor-modal-wide:has(.order-editor-sections) .field input,
.editor-modal-wide:has(.order-editor-sections) .field select,
.editor-modal-wide:has(.order-editor-sections) .reference-trigger {
  height: 42px;
  min-height: 42px;
  border-radius: 10px;
  border-color: color-mix(in srgb, var(--line) 78%, transparent);
  box-shadow: none;
}

.editor-modal-wide:has(.order-editor-sections) .field-readonly-value {
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-strong);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.journal-details-shell,
.order-editor-card-shipping,
.order-editor-card-workflow,
.order-editor-card-links {
  border-color: var(--line);
  border-radius: 14px;
  background: var(--surface-tint);
  box-shadow: none;
}

.journal-detail-table-shell { gap: 8px; }
.journal-detail-table-head,
.journal-detail-table-row { gap: 8px; }
.journal-detail-table-row { padding: 8px; border-radius: 10px; }
.journal-detail-inline-field input,
.journal-detail-inline-field select,
.journal-detail-inline-field .reference-trigger { height: 42px; min-height: 42px; border-radius: 10px; }

.editor-modal-wide:has(.order-editor-sections) .editor-actions {
  position: sticky;
  bottom: 0;
  z-index: 4;
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding: 12px 0 0;
  background: linear-gradient(to bottom, transparent, var(--surface-strong) 12px);
}

.editor-modal-wide:has(.order-editor-sections) .editor-actions .action-btn.primary { order: 1; }
.editor-modal-wide:has(.order-editor-sections) .editor-actions .action-btn:not(.primary) { order: 2; }

@media (min-width: 1500px) {
  .editor-modal-wide:has(.order-editor-sections) .editor-fields.orders-editor-fields { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 1100px) {
  .order-summary-compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .editor-modal-wide:has(.order-editor-sections) .editor-fields.orders-editor-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .records-panel:has(.orders-records-table) .record-filters { grid-template-columns: 1fr; }
  .order-summary-compact,
  .editor-modal-wide:has(.order-editor-sections) .editor-fields.orders-editor-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .order-summary-total { grid-column: span 2; }
}

@media (max-width: 480px) {
  .order-summary-compact,
  .editor-modal-wide:has(.order-editor-sections) .editor-fields.orders-editor-fields { grid-template-columns: 1fr; }
  .order-summary-total { grid-column: auto; }
}
.local-order-operations-card { display: grid; gap: 12px; padding: 14px; border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--line)); border-radius: 16px; background: color-mix(in srgb, var(--accent) 2%, var(--surface)); }
.local-order-operations-head, .local-order-operation-subhead { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.local-order-operations-head > div, .local-order-operation-subhead { display: grid; gap: 4px; }
.local-order-operations-head strong { color: var(--ink); font-size: 16px; }
.local-order-operation-subhead span { color: var(--muted); font-size: 12px; }
.local-order-operation-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.local-order-operation-grid label, .local-order-collection-section > label { display: grid; gap: 4px; color: var(--muted); font-size: 11px; font-weight: 750; }
.local-order-operation-grid input, .local-order-operation-grid select, .local-order-operation-actions select, .local-order-collection-section input, .local-order-collection-section select { min-height: 36px; border: 1px solid var(--line); border-radius: 9px; padding: 6px 9px; background: var(--surface); color: var(--ink); font: inherit; }
.local-order-operation-actions { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; grid-column: 1 / -1; }
.local-order-operation-grid .text-action-btn { justify-self: start; min-height: auto; padding: 2px 0; border: 0; background: transparent; color: var(--primary); font: inherit; font-size: 12px; font-weight: 750; cursor: pointer; }
.local-order-operation-grid .text-action-btn:disabled { cursor: wait; opacity: .6; }
.local-order-shipment-reference { display: grid; align-content: center; min-width: 10rem; padding: 0.7rem 0.85rem; border: 1px solid var(--line); border-radius: 0.85rem; background: var(--surface-muted); }
.local-order-shipment-reference span { color: var(--muted); font-size: 0.72rem; }
.local-order-shipment-reference strong { color: var(--ink); font-size: 0.84rem; }
.local-order-exchange { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; padding: 10px; border: 1px solid color-mix(in srgb, var(--primary) 24%, var(--line)); border-radius: 10px; background: var(--surface-muted); }
.local-order-exchange .local-order-operation-subhead { grid-column: 1 / -1; }
.local-order-exchange-summary { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; }
.local-order-exchange-summary span { display: grid; gap: 2px; padding: 7px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--muted); font-size: 11px; }
.local-order-exchange-summary strong { color: var(--ink); font-size: 13px; }
.local-order-exchange-summary strong.negative { color: var(--danger); }
.local-order-exchange .settlement-actions-note { grid-column: 1 / -1; margin: 0; }
.order-history-card { display:grid; gap:10px; padding:14px; border:1px solid var(--line); border-radius:16px; background:var(--surface); }
.order-history-head { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.order-history-head > strong { color:var(--ink); font-size:16px; }
.order-history-filters { display:flex; flex-wrap:wrap; gap:6px; }
.order-history-filters button { border:1px solid var(--line); border-radius:999px; padding:5px 9px; background:var(--surface); color:var(--muted); font:inherit; font-size:12px; cursor:pointer; }
.order-history-filters button.active { border-color:var(--primary); background:color-mix(in srgb, var(--primary) 12%, var(--surface)); color:var(--primary); font-weight:700; }
.order-history-error { color:var(--danger); font-weight:700; }
.order-history-list { display:grid; gap:0; margin:0; padding:0; list-style:none; }
.order-history-event { position:relative; display:grid; grid-template-columns:16px minmax(0,1fr) auto; gap:9px; align-items:start; padding:10px 0; border-top:1px solid var(--line); }
.order-history-dot { width:9px; height:9px; margin-top:5px; border-radius:50%; background:var(--muted); box-shadow:0 0 0 3px var(--surface); }
.order-history-event.status .order-history-dot { background:var(--primary); }.order-history-event.shipment .order-history-dot { background:#0d8a9b; }.order-history-event.inventory .order-history-dot { background:#22835e; }.order-history-event.financial .order-history-dot { background:#8d5b13; }.order-history-event.return .order-history-dot { background:#c04b65; }
.order-history-copy { display:grid; gap:2px; min-width:0; }.order-history-copy strong { color:var(--ink); font-size:13px; overflow-wrap:anywhere; }.order-history-copy span,.order-history-copy small { color:var(--muted); font-size:12px; overflow-wrap:anywhere; }
.order-history-meta { display:grid; justify-items:end; gap:3px; color:var(--muted); font-size:11px; white-space:nowrap; }.order-history-meta b { color:var(--ink); font-size:12px; }
.local-order-return-section, .local-order-collection-section { display: grid; gap: 11px; padding-top: 14px; border-top: 1px solid var(--line); }
.local-order-return-lines { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.local-order-return-lines label { display: grid; grid-template-columns: minmax(0, 1fr) 54px; gap: 2px 10px; align-items: center; padding: 9px 11px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 700; }
.local-order-return-lines small { grid-column: 1; color: var(--muted); font-size: 11px; font-weight: 500; }
.local-order-return-lines input { grid-column: 2; grid-row: 1 / span 2; min-height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 5px 7px; background: var(--canvas); color: var(--ink); font: inherit; }
.local-return-receipt-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: end; padding: 12px; border: 1px solid color-mix(in srgb, var(--warning) 45%, var(--line)); border-radius: 13px; background: color-mix(in srgb, var(--warning) 8%, var(--surface)); }
.local-return-receipt-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; grid-column: 1 / -1; }
.local-return-receipt-head > div { display: grid; gap: 3px; }
.local-return-receipt-card strong { color: var(--ink); }
.local-return-receipt-card small, .local-return-receipt-card span { color: var(--muted); font-size: 12px; }
.local-return-receipt-lines { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; grid-column: 1 / -1; }
.local-return-receipt-lines label { display: grid; grid-template-columns: minmax(0, 1fr) 58px; gap: 2px 9px; align-items: center; padding: 8px 10px; border: 1px solid color-mix(in srgb, var(--warning) 35%, var(--line)); border-radius: 10px; background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 750; }
.local-return-receipt-lines small { grid-column: 1; }
.local-return-receipt-lines input { grid-column: 2; grid-row: 1 / span 2; min-height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 5px 7px; background: var(--canvas); color: var(--ink); font: inherit; }
.return-receipt-line { display: grid; gap: 7px; }
.return-receipt-line > label { display: grid; grid-template-columns: minmax(0, 1fr) 76px; align-items: center; gap: 9px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.return-receipt-line > label span { display: grid; gap: 2px; }
.return-receipt-line > label small { color: var(--muted); }
.return-receipt-line > label input, .return-variance-fields input { min-height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 5px 7px; background: var(--canvas); color: var(--ink); font: inherit; }
.return-variance-fields { display: grid; grid-template-columns: auto minmax(120px, 1fr) minmax(120px, 1fr); gap: 7px; align-items: center; padding: 7px 10px; border: 1px solid color-mix(in srgb, var(--warning) 38%, var(--line)); border-radius: 9px; background: color-mix(in srgb, var(--warning) 8%, var(--surface)); font-size: 12px; }
@media (max-width: 680px) { .return-variance-fields { grid-template-columns: 1fr; } }
.local-order-collection-section { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; }
.local-order-collection-section .local-order-operation-subhead { grid-column: 1 / -1; }
.local-collection-backdrop { position: fixed; inset: 0; z-index: 145; display: grid; place-items: center; padding: 22px; overflow: auto; background: color-mix(in srgb, #071d25 46%, transparent); backdrop-filter: blur(5px); }
.local-collection-dialog { width: min(860px, 100%); max-height: min(780px, calc(100dvh - 44px)); overflow: auto; padding: 22px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: 0 22px 70px rgb(4 22 28 / 26%); }
.local-collection-dialog > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.local-collection-dialog > header > div { display: grid; gap: 4px; }
.local-collection-dialog header span { color: var(--accent); font-size: 12px; font-weight: 800; }
.local-collection-dialog h3 { margin: 0; color: var(--ink); font-size: 24px; }
.local-collection-dialog header p { max-width: 620px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.local-collection-order-list { display: grid; gap: 8px; }
.local-collection-order-list label { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(130px, auto) 130px; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--canvas); }
.local-collection-order-list label > span { display: grid; gap: 3px; min-width: 0; }
.local-collection-order-list strong { color: var(--ink); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.local-collection-order-list small, .local-collection-order-list em { color: var(--muted); font-size: 12px; font-style: normal; }
.local-collection-order-list input, .local-collection-form-grid input, .local-collection-form-grid select { min-height: 39px; border: 1px solid var(--line); border-radius: 10px; padding: 7px 9px; background: var(--surface); color: var(--ink); font: inherit; }
.local-collection-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.local-collection-form-grid label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 750; }
.local-collection-dialog footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.local-collection-dialog footer > div { display: grid; gap: 2px; margin-inline-end: auto; color: var(--muted); font-size: 12px; }
.local-collection-dialog footer strong { color: var(--ink); font-size: 16px; }
@media (max-width: 860px) {
  .local-order-operation-grid, .local-order-return-lines, .local-order-collection-section { grid-template-columns: 1fr; }
  .local-order-collection-section .local-order-operation-subhead { grid-column: auto; }
  .local-order-operations-head, .local-return-receipt-head { align-items: start; flex-direction: column; }
  .local-return-receipt-card { grid-template-columns: 1fr; }
  .local-collection-backdrop { align-items: end; padding: 10px; }
  .local-collection-dialog { max-height: calc(100dvh - 20px); padding: 18px; border-radius: 18px; }
  .local-collection-order-list label, .local-collection-form-grid { grid-template-columns: 1fr; }
  .local-collection-dialog footer { align-items: stretch; }
  .local-collection-dialog footer > div { margin-inline-end: 0; }
  .local-collection-dialog footer .action-btn { flex: 1; }
}
@media (max-width: 860px) {
  .availability-screen { padding: 16px; }
  .availability-heading { align-items: start; flex-direction: column; }
  .availability-toolbar, .availability-settings-card, .availability-settings-card.compact { grid-template-columns: 1fr; }
  .availability-source-actions { width: 100%; }
  .availability-table-actions > span { width: 100%; }
  .availability-count-summary { width: 100%; }
}


button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
}

.settings-card-heading > div > p,
.settings-policy-subsection > p {
  display: none;
}

.settings-panel-card {
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
}

.settings-card-heading { gap: 10px; }
.settings-card-heading h3 { font-size: 17px; }
.settings-policy-grid { gap: 8px; }
.integration-connection-summary { padding: 12px; border-radius: 14px; }
.integration-connection-summary p { margin: 3px 0 0; font-size: 12px; }
.credential-warning { padding: 11px 12px; border-radius: 12px; }
.credential-warning p { margin: 5px 0 0; font-size: 12px; line-height: 1.45; }

.local-order-operations-card { gap: 10px; padding: 12px; border-radius: 14px; }
.local-order-operations-head strong { font-size: 15px; }
.local-order-operation-grid { gap: 8px; }
.local-order-return-section, .local-order-collection-section { gap: 8px; padding-top: 10px; }
.local-collection-dialog { padding: 16px; border-radius: 16px; }
.local-collection-dialog > header { margin-bottom: 12px; }
.local-collection-dialog h3 { font-size: 20px; }
.local-collection-dialog header p { display: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}


.records-panel:has(.orders-records-table) .record-filters { display:flex; flex-wrap:nowrap; align-items:center; width:100%; height:64px; min-height:64px; max-height:64px; padding:8px 12px; gap:8px; overflow:hidden; background:var(--surface-strong); }
.records-panel:has(.orders-records-table) .orders-filter-cluster { display:contents; }
.records-panel:has(.orders-records-table) .marketplace-provider-filter,
.records-panel:has(.orders-records-table) .order-status-counts,
.records-panel:has(.orders-records-table) .record-filters .search-group { flex:0 0 auto; width:auto; min-width:0; margin:0; }
.records-panel:has(.orders-records-table) .marketplace-provider-filter { order:1; }
.records-panel:has(.orders-records-table) .order-status-counts { order:2; display:flex; flex-wrap:nowrap; align-items:center; gap:8px; overflow:hidden; }
.records-panel:has(.orders-records-table) .record-filters .search-group { order:3; width:300px; margin-inline-start:auto; }
.records-panel:has(.orders-records-table) .record-filters .search-group input { width:100%; }

.editor-modal-wide:has(.order-editor-sections) .order-editor-sections,
.editor-modal-wide:has(.order-editor-sections) .order-editor-card,
.editor-modal-wide:has(.order-editor-sections) .journal-details-shell,
.editor-modal-wide:has(.order-editor-sections) .local-order-operations-card,
.editor-modal-wide:has(.order-editor-sections) .order-editor-system-footer { position:static; inset:auto; height:auto; min-height:0; margin:0; }
.editor-modal-wide:has(.order-editor-sections) .order-editor-card,
.editor-modal-wide:has(.order-editor-sections) .journal-details-shell,
.editor-modal-wide:has(.order-editor-sections) .local-order-operations-card { padding:12px 16px; }
.editor-modal-wide:has(.order-editor-sections) .journal-details-head { margin:0 0 12px; }
.editor-modal-wide:has(.order-editor-sections) .journal-detail-table-shell { display:grid; gap:6px; margin:0; }
.editor-modal-wide:has(.order-editor-sections) .journal-detail-table-head { margin:0; }
.editor-modal-wide:has(.order-editor-sections) .journal-detail-table-row { height:64px; min-height:0; margin:0; }
.editor-modal-wide:has(.order-editor-sections) .local-order-operations-card { overflow:visible; }
.editor-modal-wide:has(.order-editor-sections) .local-order-operation-grid { height:auto; min-height:0; margin:0; grid-template-columns:repeat(3,minmax(0,1fr)); grid-template-rows:repeat(2,auto); align-items:end; }
.editor-modal-wide:has(.order-editor-sections) .local-order-operation-actions { grid-column:1/-1; grid-row:3; height:auto; min-height:0; margin:0; }
.editor-modal-wide:has(.order-editor-sections) .order-editor-system-footer { height:52px; min-height:52px; padding:8px 12px; overflow:visible; }
.editor-modal-wide:has(.order-editor-sections) .editor-modal-content,
.editor-modal-wide:has(.order-editor-sections) .editor-panel-content { padding-bottom:72px; }
.editor-modal-wide:has(.order-editor-sections) .editor-actions { position:sticky; bottom:0; height:56px; min-height:56px; margin:0; padding:8px 0 0; box-sizing:border-box; background:var(--surface-strong); }
@media (max-width:760px) {
  .records-panel:has(.orders-records-table) .record-filters { height:auto; max-height:none; min-height:64px; flex-wrap:wrap; overflow:visible; }
  .records-panel:has(.orders-records-table) .record-filters .search-group { width:min(100%,300px); margin-inline-start:0; }
  .editor-modal-wide:has(.order-editor-sections) .local-order-operation-grid { grid-template-columns:repeat(2,minmax(0,1fr)); grid-template-rows:auto; }
  .local-order-exchange { grid-template-columns: 1fr; }
  .local-order-exchange-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .order-history-head { align-items:start; flex-direction:column; }.order-history-event { grid-template-columns:14px minmax(0,1fr); }.order-history-meta { grid-column:2; justify-items:start; white-space:normal; }
}


.records-panel:has(.orders-records-table) .order-bulk-toolbar.has-selection .order-bulk-copy strong {
  color: var(--accent-contrast) !important;
}

.records-panel:has(.orders-records-table) .records-table tr.last-reviewed:not(.selected) td:first-child,
.records-panel:has(.orders-records-table) .records-table tr.last-reviewed:not(.selected) td:nth-child(2) {
  box-shadow: none;
}

.records-panel:has(.orders-records-table) .records-table tr.last-reviewed:not(.selected) td.order-select-column {
  box-shadow: inset -3px 0 0 color-mix(in srgb, var(--accent) 58%, transparent);
}

.editor-modal-wide:has(.order-editor-sections) .journal-details-shell,
.editor-modal-wide:has(.order-editor-sections) .journal-detail-table-shell,
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row,
.editor-modal-wide:has(.order-editor-sections) .journal-detail-table-cell,
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row .field,
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row .reference-picker {
  overflow: visible;
}

.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row:has(.reference-picker.open) {
  position: relative;
  z-index: 10;
}

.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row .reference-popover {
  z-index: 100;
  max-width: min(360px, calc(100vw - 48px));
}

.shimex-sector-picker {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.shimex-sector-picker.open {
  z-index: 40;
}

.shimex-sector-picker .reference-trigger {
  width: 100%;
}

.shimex-sector-picker .reference-popover {
  min-width: min(100%, 320px);
}

.shimex-sector-results {
  max-height: 240px;
}

.local-order-operations-card:has(.shimex-sector-picker),
.local-order-operation-grid:has(.shimex-sector-picker) {
  overflow: visible;
}

.return-lines-toolbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}


.app-loading-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  background: var(--bg-page);
  color: var(--text-primary);
  opacity: 1;
  visibility: visible;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.app-loading-screen.is-dismissed {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.app-loading-content {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
}

.app-loading-mark {
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--border-default);
  border-radius: 12px;
  background: var(--bg-surface);
  color: var(--accent);
  font-weight: 700;
}

.app-loading-spinner {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  border: 2px solid color-mix(in srgb, var(--accent) 24%, transparent);
  border-inline-end-color: var(--accent);
  border-radius: 50%;
  animation: app-loading-spin 700ms linear infinite;
}

@keyframes app-loading-spin {
  to { transform: rotate(360deg); }
}

.records-panel:has(.orders-records-table) {
  position: relative;
}

.route-loading-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background: color-mix(in srgb, var(--bg-surface) 78%, transparent);
  color: var(--text-secondary);
  font-size: 12px;
  pointer-events: none;
}


.channel-identity { color: var(--text-primary) !important; }


.editor-panel:has(.field.table-saleschannels) .editor-scroll-content {
  padding-bottom: 24px;
}

.editor-panel:has(.field.table-saleschannels) .editor-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.editor-panel:has(.field.table-saleschannels) .field {
  min-width: 0;
  min-height: 0;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: var(--bg-surface);
}

.editor-panel:has(.field.table-saleschannels) .field.locked {
  border-color: var(--border-subtle);
  background: var(--bg-surface);
}

.editor-panel:has(.field.table-saleschannels) .field-name {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 650;
}

.editor-panel:has(.field.table-saleschannels) .field input[type="text"],
.editor-panel:has(.field.table-saleschannels) .field input[type="number"],
.editor-panel:has(.field.table-saleschannels) .field select,
.editor-panel:has(.field.table-saleschannels) .field-select {
  min-height: 42px;
  height: 42px;
  border-color: var(--border-default);
  border-radius: 10px;
  background: var(--bg-surface);
  color: var(--text-primary);
}

.editor-panel:has(.field.table-saleschannels) .field.field-channel_id,
.editor-panel:has(.field.table-saleschannels) .field.field-channel_color,
.editor-panel:has(.field.table-saleschannels) .field.field-notes {
  grid-column: 1 / -1;
}

.field-readonly-compact {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 42px;
  height: 42px;
  box-sizing: border-box;
  overflow: hidden;
  padding-inline: 12px;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-color-control {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.channel-color-control-main {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 40px;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.channel-color-preview-button,
.channel-color-picker-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 42px;
  box-sizing: border-box;
  border: 1px solid var(--border-default);
  border-radius: 10px;
  color: var(--text-secondary);
  cursor: pointer;
}

.channel-color-preview-button {
  border-color: color-mix(in srgb, var(--channel-color, var(--accent)) 35%, var(--border-default));
  box-shadow: inset 0 0 0 3px var(--bg-surface);
}

.channel-color-preview-button:hover:not(:disabled),
.channel-color-picker-button:hover:not(:disabled) {
  border-color: var(--accent);
}

.channel-color-picker-button {
  background: var(--bg-subtle);
}

.channel-color-picker-button svg {
  width: 18px;
  height: 18px;
}

.channel-color-native-picker {
  position: absolute;
  inset-inline-start: 0;
  inset-block-start: 0;
  width: 1px !important;
  height: 1px !important;
  min-width: 1px !important;
  min-height: 1px !important;
  padding: 0 !important;
  opacity: 0;
  pointer-events: none;
}

.channel-color-hex-field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.channel-color-hex-field > span {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
}

.channel-color-hex-field input {
  width: 100%;
  min-width: 0;
  height: 42px;
  box-sizing: border-box;
  padding-inline: 10px;
  border: 1px solid var(--border-default);
  border-radius: 10px;
  background: var(--bg-surface);
  color: var(--text-primary);
  direction: ltr;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 13px;
  font-weight: 600;
}

.channel-color-hex-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent);
  outline: none;
}

.channel-color-preview-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--text-muted);
  font-size: 11px;
}

.channel-color-preview-dot {
  flex: 0 0 12px;
  width: 12px;
  height: 12px;
  border: 1px solid color-mix(in srgb, var(--channel-color, var(--accent)) 35%, var(--border-default));
  border-radius: 999px;
}

.channel-color-preview-line code {
  overflow: hidden;
  color: var(--text-secondary);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-color-presets {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.channel-color-presets button {
  width: 23px;
  height: 23px;
  box-sizing: border-box;
  padding: 0;
  border: 2px solid var(--bg-surface);
  border-radius: 999px;
  box-shadow: 0 0 0 1px var(--border-default);
  cursor: pointer;
}

.channel-color-presets button:hover:not(:disabled) {
  box-shadow: 0 0 0 2px var(--accent), 0 0 0 4px var(--bg-surface);
}

.channel-color-presets button.selected {
  box-shadow: 0 0 0 2px var(--accent), 0 0 0 4px var(--bg-surface);
}

.channel-color-validation {
  margin: 0;
  color: var(--danger);
  font-size: 11px;
  line-height: 1.4;
}

.channel-color-control.invalid .channel-color-hex-field input {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 10%, transparent);
}

.channel-active-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  width: max-content;
  min-width: 118px;
  height: 42px;
  padding: 0 10px;
  border: 1px solid var(--border-default);
  border-radius: 10px;
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
}

.channel-active-toggle.on {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border-default));
  background: var(--accent-soft);
  color: var(--text-primary);
}

.channel-active-toggle-track {
  position: relative;
  flex: 0 0 38px;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: var(--border-default);
  transition: background 160ms ease;
}

.channel-active-toggle-track > span {
  position: absolute;
  inset-inline-start: 3px;
  inset-block-start: 3px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--bg-surface);
  box-shadow: 0 1px 3px color-mix(in srgb, var(--text-primary) 18%, transparent);
  transition: inset-inline-start 160ms ease;
}

.channel-active-toggle.on .channel-active-toggle-track {
  background: var(--accent);
}

.channel-active-toggle.on .channel-active-toggle-track > span {
  inset-inline-start: 19px;
}

.channel-active-toggle:focus-visible,
.channel-color-preview-button:focus-visible,
.channel-color-picker-button:focus-visible,
.channel-color-presets button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 760px) {
  .editor-panel:has(.field.table-saleschannels) .editor-fields { grid-template-columns: 1fr; }
}


.channel-identity {
  color: var(--text-primary) !important;
}


.records-panel:has(.orders-records-table) .records-table thead th,
.records-panel:has(.orders-records-table) .records-table thead th .column-filter-trigger,
.records-panel:has(.orders-records-table) .records-table thead th .column-filter-static {
  color: var(--text-secondary) !important;
  font-weight: 600;
}
.records-panel:has(.orders-records-table) .records-table thead th .column-sort-trigger {
  color: var(--text-muted) !important;
  opacity: 1;
}
.records-panel:has(.orders-records-table) .records-table tbody td {
  color: var(--text-primary) !important;
  font-weight: 500;
  opacity: 1;
}
.records-panel:has(.orders-records-table) .records-table tbody td[data-column="customer_name"] {
  color: var(--text-primary) !important;
  font-weight: 500;
}
.records-panel:has(.orders-records-table) .records-table tbody td[data-column="source_order_code"] {
  color: var(--text-secondary) !important;
}
.records-panel:has(.orders-records-table) .records-table tbody td[data-column="order_date"] {
  color: var(--text-secondary) !important;
  font-variant-numeric: tabular-nums;
}
.records-panel:has(.orders-records-table) .records-table tbody td:last-child .inline-open,
.records-panel:has(.orders-records-table) .records-table tbody td:last-child .inline-open:hover {
  color: var(--text-secondary) !important;
  opacity: 1;
}


.records-panel:has(.orders-records-table) .table-wrap {
  overflow: auto;
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  background: var(--bg-surface);
}
.records-panel:has(.orders-records-table) .records-table {
  width: 100%;
  min-width: 980px;
  table-layout: fixed;
  border-collapse: collapse;
  background: var(--bg-surface);
}
.records-panel:has(.orders-records-table) .records-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 44px;
  box-sizing: border-box;
  padding-block: 0;
  padding-inline: 14px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  vertical-align: middle;
}
.records-panel:has(.orders-records-table) .records-table tbody tr {
  height: 52px;
  background: var(--bg-surface);
  cursor: pointer;
  transition: background 150ms ease;
}
.records-panel:has(.orders-records-table) .records-table tbody tr:hover { background: #f5fbfb; }
.records-panel:has(.orders-records-table) .records-table tbody tr.selected { background: #eaf6f6; }
.records-panel:has(.orders-records-table) .records-table tbody tr.selected > td:first-child {
  border-inline-start: 3px solid var(--accent);
}
.records-panel:has(.orders-records-table) .records-table tbody tr.last-reviewed:not(.selected) { background: #fbfefe; }
.records-panel:has(.orders-records-table) .records-table tbody tr.last-reviewed:not(.selected) > td:first-child {
  border-inline-start: 2px solid rgb(var(--accent-rgb) / 0.32);
}
.records-panel:has(.orders-records-table) .records-table tbody td {
  height: 52px;
  box-sizing: border-box;
  min-width: 0;
  padding-block: 0;
  padding-inline: 14px;
  border-bottom: 1px solid #edf3f3;
  color: var(--text);
  font-size: 13px;
  line-height: 1.25;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.records-panel:has(.orders-records-table) .records-table tbody tr:last-child td { border-bottom: 0; }
.records-panel:has(.orders-records-table) .records-table th:first-child,
.records-panel:has(.orders-records-table) .records-table td:first-child {
  width: 48px;
  padding-inline: 8px;
  text-align: center;
}
.records-panel:has(.orders-records-table) .records-table th:last-child,
.records-panel:has(.orders-records-table) .records-table td:last-child {
  width: 62px;
  padding-inline: 6px;
  text-align: center;
}
.records-panel:has(.orders-records-table) .records-table .order-select-column input[type="checkbox"] {
  inline-size: 18px;
  block-size: 18px;
  margin: 0;
  vertical-align: middle;
  accent-color: var(--accent);
}
.records-panel:has(.orders-records-table) .records-table [data-column="order_no"] {
  color: var(--text);
  font-weight: 600;
}
.records-panel:has(.orders-records-table) .records-table [data-column="customer_name"] {
  color: var(--text);
  font-weight: 500;
}
.records-panel:has(.orders-records-table) .records-table [data-column="order_date"],
.records-panel:has(.orders-records-table) .records-table [data-column="source_order_code"] {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.records-panel:has(.orders-records-table) .records-table .order-status-badge,
.records-panel:has(.orders-records-table) .records-table .order-fulfillment-badge,
.records-panel:has(.orders-records-table) .records-table .mapping-state-badge {
  min-height: 26px;
  box-sizing: border-box;
  padding-block: 4px;
  padding-inline: 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
}
.records-panel:has(.orders-records-table) .records-table .order-status-badge.status-new { border-color: #d9e0e2; background: #f7f9f9; color: #65767a; }
.records-panel:has(.orders-records-table) .records-table .order-status-badge.status-readytoship { border-color: #b9e1dd; background: #eefafa; color: #277b78; }
.records-panel:has(.orders-records-table) .records-table .order-status-badge.status-shipped { border-color: #c8dbef; background: #f1f7fd; color: #4779a7; }
.records-panel:has(.orders-records-table) .records-table .order-status-badge.status-delivered { border-color: #c6e4d6; background: #f1faf5; color: #438064; }
.records-panel:has(.orders-records-table) .records-table .order-status-badge.status-cancelled { border-color: #efd1d1; background: #fff6f6; color: #a76666; }
.records-panel:has(.orders-records-table) .records-table .order-status-badge.status-returned,
.records-panel:has(.orders-records-table) .records-table .order-status-badge.status-partiallydelivered { border-color: #ecdab4; background: #fffaf0; color: #967143; }
.records-panel:has(.orders-records-table) .records-table .order-fulfillment-badge,
.records-panel:has(.orders-records-table) .records-table .order-fulfillment-badge.set { border-color: #d9e0e2; background: #f8fafa; color: #667579; }
.records-panel:has(.orders-records-table) .records-table .mapping-state-badge { opacity: .78; }
.records-panel:has(.orders-records-table) .records-table .inline-open {
  height: 30px;
  min-height: 30px;
  padding-inline: 5px;
  border: 0;
  background: transparent;
  color: #668084;
  font-size: 12px;
}
.records-panel:has(.orders-records-table) .records-table .inline-open:hover,
.records-panel:has(.orders-records-table) .records-table tbody tr:hover .inline-open {
  background: transparent;
  color: var(--accent-strong);
}
.records-panel:has(.orders-records-table) .records-table .inline-open .inline-icon { inline-size: 14px; block-size: 14px; }
.records-panel:has(.orders-records-table) .records-table .column-sort-trigger { font-size: 10px; opacity: .48; }

@media (max-width: 760px) {
  .records-panel:has(.orders-records-table) .records-table { min-width: 880px; }
  .records-panel:has(.orders-records-table) .records-table thead th,
  .records-panel:has(.orders-records-table) .records-table tbody td { padding-inline: 10px; }
}


.records-panel:has(.orders-records-table) .records-table thead th {
  color: var(--text-secondary);
  font-weight: 600;
}
.records-panel:has(.orders-records-table) .records-table thead th .column-filter-trigger,
.records-panel:has(.orders-records-table) .records-table thead th .column-filter-static {
  color: var(--text-secondary);
  font-weight: 600;
}
.records-panel:has(.orders-records-table) .records-table thead th .column-sort-trigger {
  color: var(--text-muted);
  opacity: 1;
}
.records-panel:has(.orders-records-table) .records-table tbody td {
  color: var(--text-primary);
  font-weight: 500;
}
.records-panel:has(.orders-records-table) .records-table tbody td[data-column="customer_name"] {
  color: var(--text-primary);
  font-weight: 500;
}
.records-panel:has(.orders-records-table) .records-table tbody td[data-column="source_order_code"],
.records-panel:has(.orders-records-table) .records-table tbody td[data-column="order_date"] {
  color: var(--text-secondary);
}
.records-panel:has(.orders-records-table) .records-table tbody td[data-column="order_date"] {
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}
.records-panel:has(.orders-records-table) .records-table tbody td:last-child .inline-open {
  color: var(--text-secondary);
  opacity: 1;
}
.records-panel:has(.orders-records-table) .records-table tbody td:last-child .inline-open:hover,
.records-panel:has(.orders-records-table) .records-table tbody tr:hover td:last-child .inline-open {
  color: var(--text-primary);
  opacity: 1;
}


.records-panel:has(.orders-records-table) .table-wrap {
  overflow: auto;
  border: 1px solid #e1ecec;
  border-radius: 14px;
  background: #fff;
}
.records-panel:has(.orders-records-table) .records-table {
  width: 100%;
  min-width: 980px;
  table-layout: fixed;
  border-collapse: collapse;
  background: #fff;
}
.records-panel:has(.orders-records-table) .records-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 44px;
  box-sizing: border-box;
  padding-inline: 14px;
  padding-block: 0;
  border-bottom: 1px solid #e1ecec;
  background: #f6fbfb;
  color: #708387;
  font-size: 12px;
  font-weight: 600;
  vertical-align: middle;
}
.records-panel:has(.orders-records-table) .records-table tbody tr {
  height: 52px;
  background: #fff;
  cursor: pointer;
  transition: background 150ms ease;
}
.records-panel:has(.orders-records-table) .records-table tbody tr:hover {
  background: color-mix(in srgb, var(--accent) 5%, var(--bg-surface));
}
.records-panel:has(.orders-records-table) .records-table tbody tr.selected {
  background: var(--accent-soft);
}
.records-panel:has(.orders-records-table) .records-table tbody tr.selected > td:first-child {
  border-inline-start: 3px solid var(--accent);
}
.records-panel:has(.orders-records-table) .records-table tbody tr.last-reviewed:not(.selected) {
  background: var(--bg-surface);
}
.records-panel:has(.orders-records-table) .records-table tbody tr.last-reviewed:not(.selected) > td:first-child {
  border-inline-start: 2px solid color-mix(in srgb, var(--accent) 32%, transparent);
}
.records-panel:has(.orders-records-table) .records-table tbody td {
  height: 52px;
  box-sizing: border-box;
  padding-inline: 14px;
  padding-block: 0;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 13px;
  line-height: 1.25;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.records-panel:has(.orders-records-table) .records-table tbody tr:last-child td { border-bottom: 0; }
.records-panel:has(.orders-records-table) .records-table th:first-child,
.records-panel:has(.orders-records-table) .records-table td:first-child { width: 48px; padding-inline: 8px; text-align: center; }
.records-panel:has(.orders-records-table) .records-table th:last-child,
.records-panel:has(.orders-records-table) .records-table td:last-child { width: 62px; padding-inline: 6px; text-align: center; }
.records-panel:has(.orders-records-table) .records-table .order-select-column input[type="checkbox"] { inline-size: 18px; block-size: 18px; margin: 0; vertical-align: middle; accent-color: var(--accent); }
.records-panel:has(.orders-records-table) .records-table .platform-cell { display: inline-block; max-width: 100%; overflow: hidden; padding: 4px 8px; border: 1px solid var(--border-default); border-radius: 8px; background: var(--accent-soft); color: var(--accent-hover); font-size: 12px; font-weight: 600; text-overflow: ellipsis; vertical-align: middle; white-space: nowrap; }
.records-panel:has(.orders-records-table) .records-table .platform-jumia { border-color: var(--border-default); background: var(--info-soft); color: var(--info); }
.records-panel:has(.orders-records-table) .records-table tbody td[data-column="customer_name"] { font-weight: 500; color: var(--text-primary); }
.records-panel:has(.orders-records-table) .records-table tbody td[data-column="order_date"] { color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.records-panel:has(.orders-records-table) .records-table .order-status-badge,
.records-panel:has(.orders-records-table) .records-table .order-fulfillment-badge,
.records-panel:has(.orders-records-table) .records-table .mapping-state-badge {
  min-height: 26px;
  box-sizing: border-box;
  padding-inline: 9px;
  padding-block: 4px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
}
.records-panel:has(.orders-records-table) .records-table .order-status-badge.status-new { border-color: var(--border-subtle); background: var(--bg-subtle); color: var(--text-secondary); }
.records-panel:has(.orders-records-table) .records-table .order-status-badge.status-readytoship { border-color: var(--border-default); background: var(--accent-soft); color: var(--accent-hover); }
.records-panel:has(.orders-records-table) .records-table .order-status-badge.status-shipped { border-color: var(--border-default); background: var(--info-soft); color: var(--info); }
.records-panel:has(.orders-records-table) .records-table .order-status-badge.status-delivered { border-color: color-mix(in srgb, var(--success) 28%, var(--border-subtle)); background: var(--success-soft); color: var(--success); }
.records-panel:has(.orders-records-table) .records-table .order-status-badge.status-cancelled { border-color: color-mix(in srgb, var(--danger) 28%, var(--border-subtle)); background: var(--danger-soft); color: var(--danger); }
.records-panel:has(.orders-records-table) .records-table .order-status-badge.status-returned { border-color: color-mix(in srgb, var(--warning) 28%, var(--border-subtle)); background: var(--warning-soft); color: var(--warning); }
.records-panel:has(.orders-records-table) .records-table .order-fulfillment-badge { border-color: var(--border-subtle); background: var(--bg-subtle); color: var(--text-secondary); }
.records-panel:has(.orders-records-table) .records-table .order-fulfillment-badge.set { border-color: var(--border-subtle); background: var(--bg-subtle); color: var(--text-secondary); }
.records-panel:has(.orders-records-table) .records-table .mapping-state-badge { opacity: .78; }
.records-panel:has(.orders-records-table) .records-table .inline-open { min-height: 30px; height: 30px; padding-inline: 5px; border: 0; background: transparent; color: var(--text-secondary); font-size: 12px; }
.records-panel:has(.orders-records-table) .records-table .inline-open:hover,
.records-panel:has(.orders-records-table) .records-table tbody tr:hover .inline-open { background: transparent; color: var(--accent-strong); }
.records-panel:has(.orders-records-table) .records-table .inline-open .inline-icon { inline-size: 14px; block-size: 14px; }
.records-panel:has(.orders-records-table) .records-table .column-sort-trigger { font-size: 10px; opacity: .48; }


.workspace:has(.sidebar.is-collapsed) { grid-template-columns: 78px minmax(0, 1fr); }
.sidebar {
  display: flex;
  flex-direction: column;
  block-size: calc(100vh - 20px);
  min-block-size: 0;
  overflow: visible;
  background: #062f34;
  box-shadow: none;
  transition: width 170ms ease, padding 170ms ease;
}
.sidebar-navigation-scroll {
  display: flex;
  flex: 1 1 auto;
  min-block-size: 0;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: visible;
  scrollbar-width: thin;
  scrollbar-color: rgb(255 255 255 / 0.2) transparent;
}

.sidebar .group-items[hidden],
.sidebar .sidebar-submenu[hidden],
.mobile-navigation-list[hidden] {
  display: none !important;
}
.sidebar-navigation-scroll::-webkit-scrollbar { inline-size: 5px; }
.sidebar-navigation-scroll::-webkit-scrollbar-thumb { border-radius: 999px; background: rgb(255 255 255 / 0.2); }
.sidebar .brand {
  flex: 0 0 auto;
  gap: 8px;
  padding: 2px 4px 14px;
  border-bottom: 1px solid rgb(255 255 255 / 0.09);
}
.sidebar .brand-logo { inline-size: 68px; block-size: 68px; border-radius: 16px; }
.sidebar .brand h1 { font-size: 24px; }
.sidebar .brand-copy { min-inline-size: 0; }
.sidebar .brand-kicker { font-size: 9px; }
.sidebar .sidebar-primary-nav { margin-block-start: 12px; }
.sidebar .sidebar-nav-heading,
.sidebar .utility-heading { font-size: 11px; letter-spacing: .08em; }
.sidebar .sidebar-nav-heading { padding-inline: 2px; }
.sidebar .sidebar-action { inline-size: 28px; min-inline-size: 28px; block-size: 28px; min-block-size: 28px; }
.sidebar .group-list { gap: 12px; margin-block-start: 12px; }
.sidebar .group-section { gap: 4px; padding: 0; border: 0; background: transparent; }
.sidebar .group-toggle,
.sidebar .table-item { min-block-size: 44px; border-radius: 10px; padding-inline: 12px; }
.sidebar .group-toggle { gap: 10px; }
.sidebar .group-toggle:hover,
.sidebar .group-toggle:focus-visible,
.sidebar .table-item:hover { background: rgb(255 255 255 / 0.05); border-color: transparent; }
.sidebar .table-item { color: rgb(255 255 255 / 0.7); transition: background 150ms ease, color 150ms ease, border-color 150ms ease; }
.sidebar .table-item.active { border-inline-start: 3px solid var(--accent); background: rgb(var(--accent-rgb) / 0.78); color: #fff; }
.sidebar .nav-icon,
.sidebar .group-heading-icon { inline-size: 17px; block-size: 17px; }
.sidebar .sidebar-submenu { padding-inline-start: 20px; }
.sidebar .sidebar-submenu-item { min-block-size: 39px; border: 1px solid transparent; border-radius: 9px; padding-inline: 10px; background: transparent; color: rgb(255 255 255 / 0.62); font-size: 12px; }
.sidebar .sidebar-submenu-item:hover,
.sidebar .sidebar-submenu-item:focus-visible { border-color: transparent; background: rgb(var(--accent-rgb) / 0.12); color: #fff; }
.sidebar .sidebar-submenu-item.active { background: rgb(var(--accent-rgb) / 0.32); color: #fff; }
.sidebar .sidebar-inline-section { margin-block-start: 8px; padding-inline: 12px; font-size: 10px; letter-spacing: .04em; }
.sidebar .sidebar-utility-nav { flex: 0 0 auto; margin-block-start: 12px; padding: 10px 0 0; border: 0; border-block-start: 1px solid rgb(255 255 255 / 0.09); background: transparent; }
.sidebar .current-user-card { margin-block-start: 8px; padding: 9px 12px; border: 1px solid rgb(255 255 255 / 0.08); border-radius: 10px; background: rgb(255 255 255 / 0.03); }
.sidebar .current-user-email { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.sidebar .current-user-label { font-size: 10px; }
.sidebar.is-collapsed { inline-size: 78px; }
.sidebar.is-collapsed .brand { grid-template-columns: 1fr; justify-items: center; }
.sidebar.is-collapsed .brand-copy,
.sidebar.is-collapsed .sidebar-nav-heading > span,
.sidebar.is-collapsed .group-title,
.sidebar.is-collapsed .table-item-main > span,
.sidebar.is-collapsed .sidebar-item-meta,
.sidebar.is-collapsed .sidebar-inline-section,
.sidebar.is-collapsed .utility-heading,
.sidebar.is-collapsed .current-user-card { display: none; }
.sidebar.is-collapsed .brand-logo { inline-size: 48px; block-size: 48px; }
.sidebar.is-collapsed .sidebar-nav-heading { justify-content: center; }
.sidebar.is-collapsed .group-toggle,
.sidebar.is-collapsed .table-item { justify-content: center; padding-inline: 0; }
.sidebar.is-collapsed .table-item-main { justify-content: center; }
.sidebar.is-collapsed .group-toggle .group-chevron,
.sidebar.is-collapsed .table-item.has-children::after { display: none; }
.sidebar.is-collapsed .group-items { display: none; }
.sidebar.is-collapsed .sidebar-submenu { display: none; }
.sidebar.is-collapsed .sidebar-utility-nav { padding-block-start: 8px; }
@media (max-width: 1120px) and (min-width: 721px) {
  .sidebar { inline-size: 78px; }
  .workspace { grid-template-columns: 78px minmax(0, 1fr); }
  .sidebar .brand-copy,
  .sidebar .sidebar-nav-heading > span,
  .sidebar .group-title,
  .sidebar .table-item-main > span,
  .sidebar .sidebar-item-meta,
  .sidebar .sidebar-inline-section,
  .sidebar .utility-heading,
  .sidebar .current-user-card { display: none; }
  .sidebar .brand { grid-template-columns: 1fr; justify-items: center; }
  .sidebar .group-items { display: none; }
  .sidebar .group-toggle,
  .sidebar .table-item { justify-content: center; padding-inline: 0; }
}


.sidebar {
  background: var(--sidebar-bg) !important;
  color: var(--sidebar-text);
  border-color: var(--sidebar-border);
}
.sidebar .brand,
.sidebar .sidebar-utility-nav { border-color: var(--sidebar-border); }
.sidebar .brand,
.sidebar .brand h1,
.sidebar .brand-kicker,
.sidebar .sidebar-nav-heading,
.sidebar .utility-heading,
.sidebar .group-toggle,
.sidebar .table-item,
.sidebar .table-item-main,
.sidebar .sidebar-item-meta,
.sidebar .current-user-card { color: var(--sidebar-text); }
.sidebar .table-item,
.sidebar .sidebar-submenu-item { color: var(--sidebar-muted); }
.sidebar .group-toggle:hover,
.sidebar .group-toggle:focus-visible,
.sidebar .table-item:hover,
.sidebar .sidebar-submenu-item:hover,
.sidebar .sidebar-submenu-item:focus-visible { background: var(--sidebar-hover); color: var(--sidebar-text); }
.sidebar .table-item.active,
.sidebar .sidebar-submenu-item.active { background: var(--sidebar-active); color: var(--sidebar-active-text); border-color: var(--sidebar-active); }
.sidebar .sidebar-submenu-item { border-color: transparent; }
.sidebar-navigation-scroll { scrollbar-color: var(--sidebar-border) transparent; }
.sidebar-navigation-scroll::-webkit-scrollbar-thumb { background: var(--sidebar-border); }

.channel-identity {
  display: inline-flex;
  align-items: center;
  min-inline-size: 0;
  max-inline-size: 100%;
  overflow: hidden;
  color: var(--text-primary) !important;
  background: color-mix(in srgb, var(--channel-color) 11%, var(--bg-surface));
  border: 1px solid color-mix(in srgb, var(--channel-color) 30%, var(--border-subtle));
  border-radius: 8px;
  padding: 4px 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.channel-color-editor { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; min-block-size: 42px; }
.channel-color-swatches { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.channel-color-swatches button,
.channel-color-swatches input[type="color"] { inline-size: 28px; block-size: 28px; box-sizing: border-box; padding: 0; border: 2px solid var(--bg-surface); border-radius: 999px; box-shadow: 0 0 0 1px var(--border-default); cursor: pointer; }
.channel-color-swatches button.selected { box-shadow: 0 0 0 2px var(--accent), 0 0 0 4px var(--bg-surface); }
.channel-color-swatches input[type="color"] { padding: 2px; background: var(--bg-surface); }
.channel-color-hex { display: inline-flex; align-items: center; gap: 6px; }
.channel-color-hex span { color: var(--text-muted); font-size: 10px; font-weight: 700; }
.channel-color-hex input { inline-size: 92px; block-size: 34px; box-sizing: border-box; padding-inline: 8px; border: 1px solid var(--border-default); border-radius: 8px; color: var(--text-primary); background: var(--bg-surface); direction: ltr; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; }
.marketplace-provider-filter button { background: transparent; color: var(--text-secondary); border-color: transparent; box-shadow: none; }
.marketplace-provider-filter button:hover:not(.active),
.marketplace-provider-filter button:focus-visible:not(.active) { background: color-mix(in srgb, var(--channel-color) 7%, var(--bg-surface)); color: var(--text-primary); }
.marketplace-provider-filter button.active { background: var(--channel-color); color: var(--channel-text); border-color: var(--channel-color); box-shadow: 0 2px 6px color-mix(in srgb, var(--channel-color) 18%, transparent); }
.marketplace-provider-filter button:active:not(.active) { background: transparent; box-shadow: none; }


.records-panel:has(.mapping-requests-records-table) .record-filters {
  width: 100%;
  justify-content: space-between;
}

@media (max-width: 760px) {
  .records-panel:has(.mapping-requests-records-table) .record-filters {
    align-items: stretch;
  }

  .records-panel:has(.mapping-requests-records-table) .marketplace-provider-filter {
    width: 100%;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .records-panel:has(.mapping-requests-records-table) .marketplace-provider-filter button {
    flex: 0 0 auto;
  }
}


.records-panel:has(.orders-records-table) .record-filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  height: auto;
  min-height: 0;
  max-height: none;
  overflow: visible;
  align-items: start;
}
.records-panel:has(.orders-records-table) .orders-filter-cluster {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}
.records-panel:has(.orders-records-table) .marketplace-provider-filter,
.records-panel:has(.orders-records-table) .order-status-counts {
  overflow: visible;
  flex-wrap: wrap;
}
.records-panel:has(.orders-records-table) .order-status-counts { gap: 6px; }
.records-panel:has(.orders-records-table) .record-filters .search-group {
  width: 100%;
  margin: 0;
  align-self: start;
}
@media (max-width: 980px) {
  .records-panel:has(.orders-records-table) .record-filters { grid-template-columns: 1fr; }
  .records-panel:has(.orders-records-table) .record-filters .search-group { max-width: none; }
}


.returns-screen { width:100%; max-width:none; padding-inline:24px; }
.returns-page-head { margin-bottom:14px; }
.returns-page-head h1 { margin:3px 0 0; }
.returns-summary { display:flex; align-items:center; gap:12px; margin-bottom:10px; color:var(--ink); font-size:13px; }
.returns-summary span { color:var(--muted); font-size:12px; }
.returns-table { width:100%; overflow:hidden; background:var(--surface); border:1px solid var(--line); border-radius:14px; }
.returns-table-head, .returns-table-row { display:grid; grid-template-columns:minmax(150px,1.15fr) 120px minmax(280px,2.6fr) 150px 140px; align-items:center; column-gap:16px; }
.returns-table-head { min-height:40px; padding:0 16px; background:#F7FAFA; color:var(--muted); font-size:12px; font-weight:600; }
.returns-table-row { min-height:76px; padding:14px 16px; border-top:1px solid var(--line); box-sizing:border-box; }
.returns-table-row:hover { background:color-mix(in srgb, var(--accent) 3%, var(--surface)); }
.return-order-cell, .return-items-cell { min-width:0; display:grid; gap:3px; }
.return-order-cell strong { color:var(--ink); font-size:14px; font-weight:700; direction:ltr; text-align:start; }
.return-order-cell small, .return-destination-label { color:var(--muted); font-size:11px; }
.return-items-cell span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--ink); font-size:13px; }
.return-count-badge { display:inline-flex; align-items:center; width:max-content; min-height:26px; padding:0 9px; border:1px solid #CDE4E4; border-radius:999px; background:#F1F8F8; color:#17636A; font-size:11px; font-weight:700; white-space:nowrap; }
.return-destination-value { display:block; margin-top:3px; color:var(--ink); font-size:13px; }
.return-confirm-btn { height:40px; min-height:40px; padding-inline:14px; white-space:nowrap; }
.returns-state { margin:0; padding:28px 16px; color:var(--muted); text-align:center; font-size:13px; }
@media (max-width:900px) {
  .returns-screen { padding-inline:16px; }
  .returns-table { overflow-x:auto; }
  .returns-table-head, .returns-table-row { min-width:860px; }
}


.returns-screen { width:100%; max-width:none; padding-inline:24px; }
.returns-page-head { margin-bottom:14px; }
.returns-page-head h1 { margin:3px 0 0; }
.returns-summary { display:flex; align-items:center; gap:12px; margin-bottom:10px; color:var(--ink); font-size:13px; }
.returns-summary span { color:var(--muted); font-size:12px; }
.returns-table { width:100%; overflow:hidden; background:var(--surface); border:1px solid var(--line); border-radius:14px; }
.returns-table-head, .returns-table-row { display:grid; grid-template-columns:minmax(150px,1.15fr) 120px minmax(280px,2.6fr) 150px 140px; align-items:center; column-gap:16px; }
.returns-table-head { min-height:40px; padding:0 16px; background:#F7FAFA; color:var(--muted); font-size:12px; font-weight:600; }
.returns-table-row { min-height:76px; padding:14px 16px; border-top:1px solid var(--line); box-sizing:border-box; }
.returns-table-row:hover { background:color-mix(in srgb, var(--accent) 3%, var(--surface)); }
.return-order-cell, .return-items-cell { min-width:0; display:grid; gap:3px; }
.return-order-cell strong { color:var(--ink); font-size:14px; font-weight:700; direction:ltr; text-align:start; }
.return-order-cell small, .return-destination-label { color:var(--muted); font-size:11px; }
.return-items-cell span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--ink); font-size:13px; }
.return-count-badge { display:inline-flex; align-items:center; width:max-content; min-height:26px; padding:0 9px; border:1px solid #CDE4E4; border-radius:999px; background:#F1F8F8; color:#17636A; font-size:11px; font-weight:700; white-space:nowrap; }
.return-destination-value { display:block; margin-top:3px; color:var(--ink); font-size:13px; }
.return-confirm-btn { height:40px; min-height:40px; padding-inline:14px; white-space:nowrap; }
.returns-state { margin:0; padding:28px 16px; color:var(--muted); text-align:center; font-size:13px; }
@media (max-width:900px) {
  .returns-screen { padding-inline:16px; }
  .returns-table { overflow-x:auto; }
  .returns-table-head, .returns-table-row { min-width:860px; }
}


.records-panel:has(.orders-records-table) .order-bulk-toolbar {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  min-height:54px;
  height:54px;
  margin:10px 0;
  padding:8px 12px;
  background:var(--bg-subtle);
  border:1px solid var(--border-subtle);
  border-radius:12px;
  box-sizing:border-box;
  overflow:hidden;
  transition:opacity 160ms ease, transform 160ms ease;
}
.records-panel:has(.orders-records-table) .order-bulk-toolbar.is-empty {
  justify-content:flex-start;
}
.records-panel:has(.orders-records-table) .order-bulk-copy {
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
  white-space:nowrap;
}
.records-panel:has(.orders-records-table) .order-bulk-copy strong {
  color:var(--text-primary);
  font-size:13px;
  font-weight:700;
}
.records-panel:has(.orders-records-table) .order-bulk-copy span {
  color:var(--text-secondary);
  font-size:12px;
  overflow:hidden;
  text-overflow:ellipsis;
}
.records-panel:has(.orders-records-table) .order-bulk-actions {
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
  flex-wrap:nowrap;
}
.records-panel:has(.orders-records-table) .bulk-fulfillment-btn,
.records-panel:has(.orders-records-table) .bulk-clear-selection {
  height:38px;
  min-height:38px;
  padding:0 12px;
  border-radius:9px;
  box-shadow:none;
  white-space:nowrap;
}
.records-panel:has(.orders-records-table) .bulk-fulfillment-btn:not(:disabled) {
  background:var(--accent-soft);
  border:1px solid var(--border-default);
  color:var(--accent);
}
.records-panel:has(.orders-records-table) .bulk-fulfillment-btn.collection:not(:disabled) {
  background:var(--accent);
  border-color:var(--accent);
  color:var(--accent-contrast);
}
.records-panel:has(.orders-records-table) .bulk-fulfillment-btn:disabled {
  opacity:.42;
  cursor:not-allowed;
}
.records-panel:has(.orders-records-table) .bulk-clear-selection {
  margin-inline-start:4px;
  background:transparent;
  border:1px solid var(--border-default);
  color:var(--text-secondary);
}
.records-panel:has(.orders-records-table) .bulk-clear-selection:hover {
  background:var(--bg-surface);
  color:var(--text-primary);
}
@media (max-width:1100px) {
  .records-panel:has(.orders-records-table) .order-bulk-toolbar { height:auto; min-height:54px; overflow:visible; }
  .records-panel:has(.orders-records-table) .order-bulk-actions { overflow-x:auto; padding-bottom:1px; }
}


.records-panel:has(.orders-records-table) .panel-head { gap:10px; }
.records-panel:has(.orders-records-table) .record-filters { height:58px; min-height:58px; max-height:58px; padding:8px 12px; gap:8px; align-items:center; }
.records-panel:has(.orders-records-table) .marketplace-provider-filter,
.records-panel:has(.orders-records-table) .order-status-counts,
.records-panel:has(.orders-records-table) .record-filters .search-group { align-self:center; }
.records-panel:has(.orders-records-table) .marketplace-provider-filter button,
.records-panel:has(.orders-records-table) .order-status-count,
.records-panel:has(.orders-records-table) .record-filters .search-input { height:39px; min-height:39px; border-radius:10px; }
.records-panel:has(.orders-records-table) .order-status-count { padding-inline:9px; gap:5px; }
.records-panel:has(.orders-records-table) .order-status-count b { margin-inline-start:2px; }
.records-panel:has(.orders-records-table) .record-filters .search-group { width:320px; }
.records-panel:has(.orders-records-table) .order-bulk-toolbar { height:52px; min-height:52px; margin-block:10px; padding:7px 12px; background:var(--bg-subtle); border:1px solid var(--border-subtle); box-shadow:none; }
.records-panel:has(.orders-records-table) .bulk-fulfillment-btn,
.records-panel:has(.orders-records-table) .bulk-clear-selection { height:38px; min-height:38px; padding-inline:11px; border-radius:10px; }
.records-panel:has(.orders-records-table) .bulk-fulfillment-btn:not(:disabled) { background:var(--bg-surface); border-color:var(--border-default); color:var(--accent-hover); }
.records-panel:has(.orders-records-table) .bulk-fulfillment-btn:disabled { opacity:.45; }
.records-panel:has(.orders-records-table) .table-wrap { margin-top:10px; }
.records-panel:has(.orders-records-table) .records-table th { color:var(--muted); font-weight:600; }
.records-panel:has(.orders-records-table) .records-table th .column-sort-trigger { font-size:11px; opacity:.6; }
.records-panel:has(.orders-records-table) .records-table tbody tr { height:48px; }
.records-panel:has(.orders-records-table) .records-table tbody tr:hover { background:color-mix(in srgb,var(--accent) 4%,transparent); }
.records-panel:has(.orders-records-table) .records-table tbody td { padding-block:6px; vertical-align:middle; }
.records-panel:has(.orders-records-table) .records-table tbody td .inline-open { min-height:34px; height:34px; padding-inline:8px; border-radius:8px; background:transparent; border-color:transparent; box-shadow:none; }
.records-panel:has(.orders-records-table) .records-table tbody td .inline-open:hover { background:var(--surface-tint); border-color:var(--line); }
.records-panel:has(.orders-records-table) .records-table tbody td .status-badge,
.records-panel:has(.orders-records-table) .records-table tbody td .order-source-badge { filter:saturate(.78); }
.records-panel:has(.orders-records-table) .records-table tbody td:nth-child(3) { font-weight:500; }
.records-panel:has(.orders-records-table) .records-table tbody td:nth-child(4),
.records-panel:has(.orders-records-table) .records-table tbody td:nth-child(5) { color:var(--muted); }
.records-panel:has(.orders-records-table) .records-table input[type="checkbox"] { width:18px; height:18px; margin:0 auto; accent-color:var(--accent); }
@media (max-width:760px) {
  .records-panel:has(.orders-records-table) .record-filters { height:auto; min-height:58px; max-height:none; }
  .records-panel:has(.orders-records-table) .record-filters .search-group { width:100%; }
}


.local-collections-screen { width:100%; max-width:none; padding:20px 24px; gap:16px; }
.local-collections-screen .local-workflow-head { min-height:0; margin:0; align-items:center; }
.local-collections-screen .local-workflow-head h1 { margin:4px 0 0; font-size:28px; }
.local-collections-screen .local-workflow-head p { margin:4px 0 0; color:var(--muted); font-size:12px; }
.local-collections-screen .local-workflow-head button { height:42px; min-height:42px; }
.local-collection-summary { display:flex; gap:28px; align-items:center; padding:12px 16px; border:1px solid var(--line); border-radius:14px; background:#fff; }
.local-collection-summary div { display:grid; gap:3px; }
.local-collection-summary span { color:var(--muted); font-size:12px; }
.local-collection-summary strong { color:var(--text); font-size:18px; font-variant-numeric:tabular-nums; }
.local-collections-screen .local-workflow-toolbar { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:12px 16px; border:1px solid var(--line); border-radius:14px; background:#fff; }
.collection-search { display:flex; align-items:center; gap:8px; width:min(420px,100%); height:42px; padding:0 12px; border:1px solid var(--line); border-radius:12px; background:var(--surface); }
.collection-search > span { color:var(--muted); font-size:20px; line-height:1; }
.collection-search input { width:100%; min-width:0; height:40px; border:0; outline:0; background:transparent; color:var(--text); font:inherit; font-size:13px; }
.collection-bulk-summary { display:flex; align-items:center; gap:8px; color:var(--muted); font-size:13px; }
.collection-bulk-summary strong { color:var(--text); font-variant-numeric:tabular-nums; }
.collection-bulk-summary button { height:42px; min-height:42px; margin-inline-start:8px; }
.collection-table { overflow-x:auto; padding:0; border:1px solid var(--line); border-radius:14px; background:#fff; }
.collection-table-head, .collection-table-row { display:grid; grid-template-columns:44px minmax(150px,1.25fr) minmax(150px,1.2fr) minmax(120px,1fr) 120px minmax(110px,1fr) 150px 130px; align-items:center; column-gap:14px; min-width:980px; box-sizing:border-box; }
.collection-table-head { min-height:44px; padding:0 16px; border-bottom:1px solid var(--line); color:var(--muted); font-size:12px; font-weight:600; }
.collection-table-row { min-height:60px; margin:0; padding:8px 16px; border-bottom:1px solid var(--line); color:var(--text); cursor:pointer; }
.collection-table-row:last-child { border-bottom:0; }
.collection-table-row:hover { background:var(--surface-tint); }
.collection-table-row.selected { background:color-mix(in srgb,var(--accent) 6%,#fff); }
.collection-table-head input, .collection-table-row > input { width:18px; height:18px; margin:0; accent-color:var(--accent); justify-self:center; }
.collection-table-row strong { font-size:14px; font-weight:600; font-variant-numeric:tabular-nums; }
.collection-table-row > span, .collection-table-row > small { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--muted); font-size:13px; }
.collection-table-row b { color:var(--text); font-size:14px; font-weight:600; font-variant-numeric:tabular-nums; text-align:end; white-space:nowrap; }
.collection-status-badge { justify-self:start; padding:4px 8px; border-radius:999px; background:var(--surface-tint-strong); color:var(--accent-strong) !important; font-size:11px !important; }
.collection-empty { display:grid; place-items:center; gap:8px; min-height:180px; color:var(--muted); font-size:13px; }
.collection-empty .inline-spinner { width:16px; height:16px; border:2px solid var(--line); border-top-color:var(--accent); border-radius:50%; animation:spin .8s linear infinite; }
@media (max-width:900px) { .local-collections-screen .local-workflow-toolbar { align-items:stretch; flex-direction:column; } .collection-search { width:100%; } }
@media (max-width:700px) { .local-collections-screen { padding:16px; } .local-collection-summary { gap:16px; } .collection-table-head, .collection-table-row { grid-template-columns:44px minmax(145px,1.2fr) minmax(140px,1fr) 110px 130px 120px; min-width:760px; } .collection-table-head span:nth-of-type(3), .collection-table-row > span:nth-of-type(2), .collection-table-head span:nth-of-type(4), .collection-table-row > span:nth-of-type(3) { display:none; } }


.settings-screen { background:#f7fbfb; }
.settings-screen .screen-heading { margin-bottom:16px; }
.settings-screen .settings-user-chip { padding:10px 14px; border-radius:12px; background:#fff; border:1px solid var(--line); }
.settings-screen .settings-user-chip span { color:var(--muted); font-size:12px; }
.settings-screen .settings-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; align-items:start; }
.settings-screen .settings-panel-card { height:auto; min-height:0; padding:16px 20px; border-radius:14px; background:#fff; border:1px solid var(--line); box-shadow:none; }
.settings-screen .settings-card-heading { display:flex; align-items:flex-start; gap:0; margin:0 0 12px; }
.settings-screen .settings-card-heading > span { display:none; }
.settings-screen .settings-card-heading h3 { margin:0; font-size:16px; }
.settings-screen .settings-card-heading p { margin:4px 0 0; font-size:12px; color:var(--muted); }
.settings-screen .settings-language-card { grid-column:1; }
.settings-screen .settings-theme-card { grid-column:2; }
.settings-screen .settings-password-card { grid-column:1; }
.settings-screen .order-policy-card,
.settings-screen .invoice-branding-card,
.settings-screen .integration-credentials-card { grid-column:1 / -1; }
.settings-screen .settings-session-card { grid-column:1 / -1; order:10; display:flex; align-items:center; justify-content:space-between; gap:16px; min-height:76px; }
.settings-screen .settings-session-card .settings-card-heading { margin:0; }
.settings-screen .settings-language-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.settings-screen .settings-language-options button { height:54px; padding:8px 12px; border-radius:10px; }
.settings-screen .theme-options { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.settings-screen .theme-option { min-height:64px; height:64px; padding:8px 10px; border:1px solid var(--line); border-radius:10px; background:#fff; box-shadow:none; }
.settings-screen .theme-option.active { border:2px solid var(--primary); }
.settings-screen .password-settings-form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.settings-screen .password-settings-form label:first-child,
.settings-screen .password-settings-form button { grid-column:1 / -1; }
.settings-screen .settings-policy-field { display:flex; flex-direction:column; gap:5px; min-width:0; }
.settings-screen .settings-policy-field > span,
.settings-screen .integration-credential-form label > span { font-size:12px; margin:0; color:var(--muted); }
.settings-screen .settings-policy-field input,
.settings-screen .settings-policy-field select,
.settings-screen .password-settings-form input,
.settings-screen .integration-credential-form input,
.settings-screen .integration-credential-form textarea { height:43px; min-height:43px; box-sizing:border-box; }
.settings-screen .order-policy-card { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.settings-screen .order-policy-card .settings-card-heading,
.settings-screen .order-policy-card .settings-policy-subsection,
.settings-screen .order-policy-card > .action-btn { grid-column:1 / -1; }
.settings-screen .order-policy-card .settings-card-heading { margin-bottom:0; }
.settings-screen .settings-policy-subsection { padding:12px 14px; border:1px solid var(--line); border-radius:12px; background:#fbfefe; }
.settings-screen .settings-policy-subsection p { margin:4px 0 10px; color:var(--muted); font-size:12px; }
.settings-screen .settings-policy-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.settings-screen .integration-connection-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.settings-screen .integration-connection-summary { min-height:0; padding:12px 14px; border:1px solid var(--line); border-radius:12px; background:#fff; display:flex; align-items:center; justify-content:space-between; gap:12px; }
.settings-screen .integration-connection-summary > div:first-child { min-width:0; }
.settings-screen .integration-connection-summary h4 { margin:4px 0 2px; font-size:14px; }
.settings-screen .integration-connection-summary p { margin:0; color:var(--muted); font-size:11px; }
.settings-screen .integration-status-badge { display:inline-flex; padding:3px 8px; border-radius:999px; font-size:11px; }
.settings-screen .integration-status-badge.active { background:#eaf7ef; color:#26734a; }
.settings-screen .integration-status-badge.inactive { background:#f2f4f4; color:var(--muted); }
.settings-screen .integration-connection-actions { display:flex; gap:8px; flex-shrink:0; }
.settings-screen .integration-connection-actions .action-btn { height:40px; min-height:40px; padding-inline:12px; }
.settings-screen .integration-credential-grid { display:none; }
.settings-screen .settings-panel-card > .action-btn { justify-self:start; height:42px; min-height:42px; }
.settings-screen .invoice-branding-form { display:grid; grid-template-columns:minmax(180px,260px) minmax(0,1fr); gap:18px; align-items:center; }
.settings-screen .invoice-logo-preview { display:grid; place-items:center; min-height:150px; padding:12px; border:1px solid var(--line); border-radius:12px; background:#fff; overflow:hidden; }
.settings-screen .invoice-logo-preview img { display:block; width:100%; max-width:220px; height:135px; object-fit:contain; }
.settings-screen .invoice-logo-preview span { color:var(--muted); font-size:12px; }
.settings-screen .invoice-logo-actions { display:flex; flex-wrap:wrap; align-items:end; gap:10px; }
.settings-screen .invoice-logo-picker { display:grid; gap:6px; color:var(--muted); font-size:12px; font-weight:700; }
.settings-screen .invoice-logo-picker input { max-width:320px; padding:9px; border:1px solid var(--line); border-radius:10px; background:var(--surface); }
@media (max-width:900px) {
  .settings-screen .settings-grid { grid-template-columns:1fr; }
  .settings-screen .settings-language-card,
  .settings-screen .settings-theme-card,
  .settings-screen .settings-password-card,
  .settings-screen .order-policy-card,
  .settings-screen .invoice-branding-card,
  .settings-screen .integration-credentials-card,
  .settings-screen .settings-session-card { grid-column:1; }
}
@media (max-width:600px) {
  .settings-screen .invoice-branding-form { grid-template-columns:1fr; }
  .settings-screen .theme-options,
  .settings-screen .password-settings-form,
  .settings-screen .settings-policy-grid,
  .settings-screen .integration-connection-list { grid-template-columns:1fr; }
  .settings-screen .password-settings-form label:first-child,
  .settings-screen .password-settings-form button { grid-column:auto; }
  .settings-screen .settings-session-card { align-items:stretch; flex-direction:column; }
  .settings-screen .settings-session-card .action-btn { width:100%; }
}


.local-workflow-screen {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 28px;
  display: grid;
  gap: 14px;
}
.local-workflow-head,
.local-workflow-toolbar,
.local-workflow-list {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-strong);
}
.local-workflow-head { padding: 18px 20px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.local-workflow-head span { color: var(--text-muted); font-size: .76rem; }
.local-workflow-head h1 { margin: 3px 0 0; font-size: clamp(1.4rem, 2.4vw, 2rem); }
.local-workflow-toolbar { padding: 12px; display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.local-workflow-toolbar > input { min-width: 260px; flex: 1; }
.local-workflow-toolbar > div { display: flex; align-items: center; gap: 12px; }
.local-workflow-toolbar small { color: var(--text-muted); }
.local-workflow-list { overflow: hidden; }
.local-workflow-list > p { margin: 0; padding: 28px; text-align: center; color: var(--text-muted); }
.local-workflow-row { min-height: 62px; padding: 10px 16px; display: grid; grid-template-columns: 22px minmax(180px, 1.4fr) minmax(150px, 1fr) minmax(120px, .6fr); align-items: center; gap: 12px; border-bottom: 1px solid var(--border); cursor: pointer; }
.local-workflow-row:last-child { border-bottom: 0; }
.local-workflow-row.selected { background: color-mix(in srgb, var(--accent) 8%, var(--surface-strong)); }
.local-workflow-row > div { display: grid; gap: 3px; min-width: 0; }
.local-workflow-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.local-workflow-row span,
.local-workflow-row small { color: var(--text-muted); font-size: .82rem; }
.local-workflow-row b { font-variant-numeric: tabular-nums; text-align: end; }
.local-workflow-row.return-row { grid-template-columns: minmax(190px, 1fr) minmax(260px, 1.8fr) auto; cursor: default; }
.return-receipt-dialog .return-warehouse { display: grid; gap: 6px; margin-bottom: 14px; }
.return-receipt-dialog .return-warehouse span { color: var(--text-muted); font-size: .8rem; }
@media (max-width: 760px) {
  .local-workflow-screen { padding: 14px; }
  .local-workflow-toolbar { align-items: stretch; flex-direction: column; }
  .local-workflow-toolbar > input { min-width: 0; width: 100%; }
  .local-workflow-toolbar > div { flex-wrap: wrap; }
  .local-workflow-row { grid-template-columns: 20px minmax(0, 1fr) auto; }
  .local-workflow-row > div:nth-of-type(2) { display: none; }
  .local-workflow-row.return-row { grid-template-columns: minmax(0, 1fr) auto; }
  .local-workflow-row.return-row > div:nth-of-type(2) { display: none; }
}


.local-collections-screen .collection-table-head,
.local-collections-screen .collection-table-row {
  display:grid !important;
  grid-template-columns:40px minmax(210px,1.6fr) minmax(160px,1.2fr) 130px 110px minmax(150px,1.1fr) 120px 130px !important;
  align-items:center;
  column-gap:12px;
  min-width:1100px;
  box-sizing:border-box;
}
.local-collections-screen .collection-table-row { min-height:56px; height:56px; padding:0 16px; }
.local-collections-screen .collection-table-row > * { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; box-sizing:border-box; }
.local-collections-screen .collection-table-row > input { width:18px; height:18px; justify-self:center; }
.local-collections-screen .collection-table-row > span[dir="ltr"] { direction:auto; }
.local-collections-screen .collection-table-row > b { text-align:end; font-variant-numeric:tabular-nums; font-weight:600; }
.local-collections-screen .collection-table-row .collection-status-badge { overflow:visible; text-overflow:clip; }
.local-collections-screen .local-workflow-toolbar { flex-direction:row; }
.local-collections-screen .collection-search { order:3; flex:0 0 420px; }
.local-collections-screen .collection-bulk-summary { order:2; margin-inline:auto; }
@media (max-width:900px) { .local-collections-screen .local-workflow-toolbar { flex-direction:column; } .local-collections-screen .collection-search { order:1; flex-basis:auto; width:100%; } .local-collections-screen .collection-bulk-summary { order:2; margin-inline:0; } }


.editor-modal-wide:has(.order-editor-sections) .order-detail-table-head,
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row { display:grid !important; grid-template-columns:36px minmax(300px,3fr) minmax(150px,1.2fr) 80px 110px 100px 120px 40px !important; grid-auto-flow:column; align-items:center; column-gap:10px; }
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row > * { grid-row:1; min-width:0; }
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row .order-line-actions-cell { width:40px; height:42px; align-self:center; }
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row .order-line-actions-cell .order-line-delete-btn { width:36px; height:36px; margin:0; padding:0; display:flex; align-items:center; justify-content:center; align-self:center; background:transparent; border:0; border-radius:8px; color:color-mix(in srgb,var(--danger) 68%,var(--muted)); }
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row .order-line-delete-btn:hover:not(:disabled) { background:color-mix(in srgb,var(--danger) 10%,transparent); color:var(--danger); }


.editor-modal-wide:has(.order-editor-sections) .journal-details-shell,
.editor-modal-wide:has(.order-editor-sections) .journal-detail-table-shell {
  height:auto;
  min-height:0;
  background:transparent;
  box-shadow:none;
}
.editor-modal-wide:has(.order-editor-sections) .journal-detail-table-shell {
  display:block;
  width:100%;
  margin:0;
  padding:0;
  overflow-x:auto;
}
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-head,
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row {
  display:grid;
  grid-template-columns:36px minmax(300px,3fr) minmax(150px,1.2fr) 80px 110px 100px 120px 44px;
  align-items:center;
  column-gap:10px;
  width:100%;
  min-width:950px;
  box-sizing:border-box;
}
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-head {
  height:36px;
  min-height:0;
  margin:0;
  padding:0 0 6px;
  background:transparent;
  border:0;
  font-size:12px;
  color:var(--muted);
}
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row {
  min-height:58px;
  height:auto;
  margin:0;
  padding:8px 0;
  background:transparent;
  border:0;
  border-bottom:1px solid var(--line);
  border-radius:0;
  box-shadow:none;
}
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row > * {
  min-width:0;
  width:auto;
  margin:0;
  box-sizing:border-box;
}
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row .field {
  display:block;
  height:42px;
  min-height:42px;
  padding:0;
  border:0;
  background:transparent;
}
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row .field-name { display:none; }
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row input,
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row select,
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row .reference-trigger {
  display:block;
  width:100%;
  height:42px;
  min-height:42px;
  box-sizing:border-box;
  border:1px solid var(--line);
  border-radius:8px;
  background:#fff;
}
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row .row-index-cell,
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row .order-line-actions-cell {
  display:flex;
  align-items:center;
  justify-content:center;
  align-self:stretch;
  height:42px;
  min-height:42px;
  padding:0;
  background:transparent;
  border:0;
  border-radius:0;
}
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row .row-index-cell {
  color:var(--text);
  font-weight:600;
  text-align:center;
}
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row .order-line-actions-cell .order-line-delete-btn {
  display:flex;
  align-items:center;
  justify-content:center;
  width:36px;
  height:36px;
  min-height:36px;
  margin:0;
  padding:0;
  background:transparent;
  border:0;
  border-radius:8px;
  color:var(--danger);
  box-shadow:none;
}
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row .order-line-actions-cell .order-line-delete-btn:hover:not(:disabled) {
  background:color-mix(in srgb,var(--danger) 8%,transparent);
}


.editor-modal-wide:has(.order-editor-sections) .order-detail-table-head,
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row {
  grid-template-columns:36px minmax(300px,3fr) minmax(150px,1.2fr) 80px 110px 100px 120px 40px;
}
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row .field:has(.reference-trigger) {
  display:block;
  height:42px;
  min-height:42px;
}
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row .reference-trigger {
  display:flex;
  align-items:center;
  justify-content:space-between;
  line-height:1;
  padding-top:0;
  padding-bottom:0;
}
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row .reference-trigger-label,
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row .reference-trigger-icon {
  align-self:center;
  line-height:1;
}
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-head .actions-head {
  width:40px;
  padding:0;
}
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row .order-line-actions-cell {
  width:40px;
}
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row .order-line-actions-cell .order-line-delete-btn {
  width:36px;
  height:36px;
  min-height:36px;
  background:transparent;
  border:0;
  color:color-mix(in srgb,var(--danger) 68%,var(--muted));
  border-radius:8px;
}
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row .order-line-actions-cell .order-line-delete-btn:hover:not(:disabled) {
  background:color-mix(in srgb,var(--danger) 10%,transparent);
  color:var(--danger);
}


.editor-modal-wide:has(.order-editor-sections) .journal-details-shell {
  display:block;
  height:auto;
  min-height:0;
  padding:12px 16px;
  background:transparent;
  border:0;
  border-radius:0;
  box-shadow:none;
}
.editor-modal-wide:has(.order-editor-sections) .journal-details-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  height:42px;
  margin:0 0 12px;
  padding:0;
}
.editor-modal-wide:has(.order-editor-sections) .journal-details-head .detail-summary-pill {
  margin:0;
  padding:0;
  background:transparent;
  border:0;
  box-shadow:none;
}
.editor-modal-wide:has(.order-editor-sections) .journal-detail-table-shell {
  display:block;
  width:100%;
  margin:0;
  padding:0;
  overflow-x:auto;
}
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-head,
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row {
  display:grid;
  grid-template-columns:36px minmax(300px,3fr) minmax(150px,1.2fr) 80px 110px 100px 120px 44px;
  align-items:center;
  column-gap:10px;
  width:100%;
  min-width:950px;
  box-sizing:border-box;
}
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-head {
  height:36px;
  min-height:0;
  padding:0 0 6px;
  color:var(--muted);
  font-size:12px;
  font-weight:700;
  background:transparent;
  border:0;
}
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row {
  min-height:58px;
  height:auto;
  padding:8px 0;
  margin:0;
  background:transparent;
  border:0;
  border-bottom:1px solid var(--line);
  border-radius:0;
  box-shadow:none;
}
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row > * {
  min-width:0;
  width:auto;
  margin:0;
  box-sizing:border-box;
}
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row .field {
  display:block;
  height:42px;
  min-height:42px;
  padding:0;
  border:0;
  background:transparent;
}
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row .field-name { display:none; }
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row input,
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row select,
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row .reference-trigger {
  display:block;
  width:100%;
  height:42px;
  min-height:42px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#fff;
  box-sizing:border-box;
}
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row .row-index-cell,
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row .order-line-actions-cell {
  display:flex;
  align-items:center;
  justify-content:center;
  align-self:stretch;
  height:42px;
  min-height:42px;
  padding:0;
  background:transparent;
  border:0;
  border-radius:0;
}
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row .row-index-cell {
  color:var(--text);
  font-weight:600;
  text-align:center;
}
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row .order-line-actions-cell .order-line-delete-btn {
  width:36px;
  height:36px;
  min-height:36px;
  padding:0;
  background:transparent;
  border:0;
  border-radius:8px;
  color:var(--danger);
  box-shadow:none;
}
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row .order-line-actions-cell .order-line-delete-btn:hover:not(:disabled) {
  background:color-mix(in srgb,var(--danger) 8%,transparent);
}
@media (max-width:760px) {
  .editor-modal-wide:has(.order-editor-sections) .order-detail-table-shell { overflow-x:auto; }
}


.records-panel:has(.orders-records-table) .record-filters { display:flex; align-items:center; flex-wrap:nowrap; gap:8px; height:64px; min-height:64px; max-height:64px; padding:8px 16px; overflow:visible; box-sizing:border-box; }
.records-panel:has(.orders-records-table) .orders-filter-cluster { display:contents; }
.records-panel:has(.orders-records-table) .marketplace-provider-filter,
.records-panel:has(.orders-records-table) .order-status-counts,
.records-panel:has(.orders-records-table) .search-group { align-self:center; margin:0; flex:none; }
.records-panel:has(.orders-records-table) .marketplace-provider-filter { order:1; padding-inline:4px; }
.records-panel:has(.orders-records-table) .order-status-counts { order:2; display:flex; align-items:center; gap:8px; overflow:visible; }
.records-panel:has(.orders-records-table) .search-group { order:3; width:280px; }
.records-panel:has(.orders-records-table) .search-group .filter-label { display:none; }
.records-panel:has(.orders-records-table) .marketplace-provider-filter button,
.records-panel:has(.orders-records-table) .order-status-count,
.records-panel:has(.orders-records-table) .search-input { height:38px; min-height:38px; box-sizing:border-box; }
.records-panel:has(.orders-records-table) .marketplace-provider-filter button,
.records-panel:has(.orders-records-table) .order-status-count { min-width:max-content; white-space:nowrap; }
.records-panel:has(.orders-records-table) .order-bulk-toolbar { height:54px; min-height:54px; padding:8px 12px; box-sizing:border-box; background:var(--bg-subtle); border:1px solid var(--border-subtle); color:var(--text-primary); background-image:none; }
.records-panel:has(.orders-records-table) .order-bulk-toolbar::before,
.records-panel:has(.orders-records-table) .order-bulk-toolbar::after { display:none; }
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-head,
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row { display:grid; align-items:center; column-gap:10px; min-width:0; grid-template-columns:48px minmax(320px,2.8fr) minmax(150px,1fr) 90px 120px 110px 130px; }
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-head { height:36px; min-height:36px; }
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row { height:auto; min-height:58px; padding:8px 0; position:static; }
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row > *, .editor-modal-wide:has(.order-editor-sections) .order-detail-table-head > * { min-width:0; width:auto; box-sizing:border-box; }
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row .field { position:static; min-width:0; width:100%; margin:0; }
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row input,
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row select,
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row .reference-trigger { width:100%; height:42px; min-height:42px; min-width:0; box-sizing:border-box; }
.editor-modal-wide:has(.order-editor-sections) .order-editor-system-footer { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); align-items:center; height:auto; min-height:48px; margin-top:12px; padding:10px 16px; background:var(--bg-subtle); border:1px solid var(--border-subtle); border-radius:12px; }
.editor-modal-wide:has(.order-editor-sections) .order-editor-system-footer .order-editor-card-audit { display:contents; }
.editor-modal-wide:has(.order-editor-sections) .order-editor-system-footer .editor-fields.orders-editor-fields { display:contents; }
.editor-modal-wide:has(.order-editor-sections) .order-editor-system-footer .field { min-height:0; margin:0; padding:0; }
.editor-modal-wide:has(.order-editor-sections) .order-editor-system-footer .field-readonly-value { min-height:0; height:auto; padding:0; border:0; background:transparent; }
.editor-modal-wide:has(.order-editor-sections) .local-order-operations-card { height:auto; min-height:0; margin-bottom:12px; overflow:visible; }
.editor-modal-wide:has(.order-editor-sections) .editor-actions { position:sticky; bottom:0; height:56px; min-height:56px; margin:0; padding:8px 0 0; box-sizing:border-box; background:var(--surface-strong); }
.editor-modal-wide:has(.order-editor-sections) .editor-panel, .editor-modal-wide:has(.order-editor-sections) .editor-modal-content, .editor-modal-wide:has(.order-editor-sections) .editor-panel-content { padding-bottom:74px; }
@media (max-width:760px) {
  .records-panel:has(.orders-records-table) .record-filters { height:auto; max-height:128px; flex-wrap:wrap; }
  .records-panel:has(.orders-records-table) .search-group { width:min(280px,100%); }
  .editor-modal-wide:has(.order-editor-sections) .order-detail-table-shell { overflow-x:auto; }
  .editor-modal-wide:has(.order-editor-sections) .order-editor-system-footer { grid-template-columns:1fr; }
}

.records-panel:has(.orders-records-table) .refreshing-indicator { display:inline-flex; align-items:center; gap:8px; height:24px; margin:0; padding:0; font-size:12px; }
.records-panel:has(.orders-records-table) .refreshing-indicator::before { content:""; width:12px; height:12px; border:2px solid currentColor; border-inline-end-color:transparent; border-radius:50%; animation:orders-spin .7s linear infinite; }
@keyframes orders-spin { to { transform:rotate(360deg); } }
.refresh-action-btn { min-width:112px; justify-content:center; gap:8px; }
.refresh-spinner { width:14px; height:14px; flex:0 0 14px; border:2px solid currentColor; border-inline-end-color:transparent; border-radius:50%; animation:orders-spin .7s linear infinite; }
.editor-modal-wide:has(.order-editor-sections) .order-metadata-bar { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; position:static; width:100%; height:auto; min-height:44px; margin-top:10px; padding:8px 16px; box-sizing:border-box; background:var(--bg-subtle); border:1px solid var(--border-subtle); border-radius:10px; }
.editor-modal-wide:has(.order-editor-sections) .order-metadata-item { display:flex; align-items:center; gap:8px; min-width:0; height:28px; margin:0; padding:0; background:transparent; border:0; }
.editor-modal-wide:has(.order-editor-sections) .order-metadata-item span { color:var(--muted); font-size:11px; white-space:nowrap; }
.editor-modal-wide:has(.order-editor-sections) .order-metadata-item strong { min-width:0; overflow:hidden; color:var(--text); font-size:12px; font-weight:700; text-overflow:ellipsis; white-space:nowrap; }
.editor-modal-wide:has(.order-editor-sections) .local-order-operations-card,
.editor-modal-wide:has(.order-editor-sections) .noon-fbpi-shipment-card,
.editor-modal-wide:has(.order-editor-sections) .amazon-mfn-shipment-card { height:auto; min-height:0; margin-bottom:10px; padding:12px 16px; }
.editor-modal-wide:has(.order-editor-sections) .editor-scroll-content { flex:1 1 auto; min-height:0; overflow-y:auto; overflow-x:hidden; padding-bottom:76px; }
.editor-modal-wide:has(.order-editor-sections) > .editor-actions { flex:0 0 56px; height:56px; min-height:56px; position:sticky; bottom:0; z-index:20; background:var(--bg-surface); border-top:1px solid var(--border-subtle); }
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-head,
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row {
  grid-template-columns:48px minmax(320px,2.8fr) minmax(150px,1fr) 90px 120px 110px 130px 48px;
  display:grid;
  align-items:center;
  column-gap:10px;
}
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row { height:60px; min-height:60px; padding:0; }
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-head { height:36px; min-height:36px; }
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row .row-index-cell,
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-head .row-index-head,
.editor-modal-wide:has(.order-editor-sections) .order-line-actions-cell { align-self:stretch; display:flex; align-items:center; justify-content:center; min-width:0; width:auto; padding:0; background:transparent; border:0; border-radius:0; text-align:center; }
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row .row-index-cell { color:var(--text); font-weight:600; font-variant-numeric:tabular-nums; }
.editor-modal-wide:has(.order-editor-sections) .order-line-actions-cell .order-line-delete-btn { width:36px; height:36px; min-height:36px; padding:0; border:1px solid color-mix(in srgb,var(--danger) 24%,var(--line)); border-radius:10px; background:color-mix(in srgb,var(--danger) 5%,transparent); color:var(--danger); }
.editor-modal-wide:has(.order-editor-sections) .order-line-actions-cell .order-line-delete-btn:hover:not(:disabled) { background:color-mix(in srgb,var(--danger) 14%,transparent); border-color:var(--danger); color:var(--danger); }
.editor-modal-wide:has(.order-editor-sections) .order-line-actions-cell .order-line-delete-btn:disabled { opacity:.42; }
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row > *, .editor-modal-wide:has(.order-editor-sections) .order-detail-table-head > * { min-width:0; box-sizing:border-box; }
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row .field { width:100%; min-width:0; margin:0; }
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row input,
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row select,
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row .reference-trigger { width:100%; min-width:0; height:42px; min-height:42px; box-sizing:border-box; }


.editor-modal-wide:has(.order-editor-sections) .order-detail-table-head,
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row {
  display:grid;
  grid-template-columns:40px minmax(240px,2.8fr) minmax(140px,1fr) 90px 120px 110px 130px 40px;
  align-items:center;
  column-gap:10px;
  width:100%;
  min-width:0;
  box-sizing:border-box;
}
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row { height:auto; min-height:0; padding:8px 0; margin:0; position:static; }
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row > *,
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-head > * { min-width:0; width:auto; height:42px; box-sizing:border-box; margin:0; padding:0; align-self:center; }
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row .row-index-cell,
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row .order-line-actions-cell { display:flex; align-items:center; justify-content:center; align-self:center; background:transparent; border:0; border-radius:0; }
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row .row-index-cell { color:var(--text); font-weight:600; text-align:center; }
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row .field { display:grid; align-content:center; align-items:center; gap:0; height:42px; min-height:42px; margin:0; padding:0; position:static; }
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row .field .field-name { display:none; }
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row .field input,
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row .field select,
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row .field .reference-trigger { width:100%; height:42px; min-height:42px; min-width:0; margin:0; padding-inline:10px; box-sizing:border-box; }
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row .order-line-actions-cell .order-line-delete-btn { display:flex; align-items:center; justify-content:center; align-self:center; width:36px; height:36px; min-height:36px; margin:0; padding:0; transform:none; position:static; }
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-head .row-index-head,
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-head .actions-head { display:flex; align-items:center; justify-content:center; height:42px; margin:0; padding:0; }


.editor-modal-wide:has(.order-editor-sections) .journal-details-shell {
  display:block;
  height:auto;
  min-height:0;
  padding:12px 16px;
  background:transparent;
  border:0;
  border-radius:0;
  box-shadow:none;
}
.editor-modal-wide:has(.order-editor-sections) .journal-details-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  height:42px;
  margin:0 0 12px;
  padding:0;
}
.editor-modal-wide:has(.order-editor-sections) .journal-details-head > div:first-child { margin-inline-end:auto; }
.editor-modal-wide:has(.order-editor-sections) .journal-details-head .detail-summary-pill { margin:0; padding:0; background:transparent; border:0; box-shadow:none; }
.editor-modal-wide:has(.order-editor-sections) .journal-detail-table-shell { display:block; width:100%; margin:0; padding:0; overflow-x:auto; }
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-head,
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row {
  display:grid;
  grid-template-columns:36px minmax(300px,3fr) minmax(150px,1.2fr) 80px 110px 100px 120px 44px;
  align-items:center;
  column-gap:10px;
  width:100%;
  min-width:950px;
  box-sizing:border-box;
}
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-head {
  height:36px;
  min-height:0;
  padding:0 0 6px;
  color:var(--muted);
  font-size:12px;
  font-weight:700;
  background:transparent;
  border:0;
}
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row {
  min-height:58px;
  height:auto;
  padding:8px 0;
  margin:0;
  background:transparent;
  border:0;
  border-bottom:1px solid var(--line);
  border-radius:0;
  box-shadow:none;
}
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row > * { min-width:0; width:auto; margin:0; box-sizing:border-box; }
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row .field { display:block; height:42px; min-height:42px; padding:0; border:0; background:transparent; }
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row .field-name { display:none; }
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row input,
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row select,
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row .reference-trigger { display:block; width:100%; height:42px; min-height:42px; border:1px solid var(--line); border-radius:8px; background:#fff; box-sizing:border-box; }
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row .row-index-cell,
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row .order-line-actions-cell { display:flex; align-items:center; justify-content:center; align-self:stretch; height:42px; min-height:42px; padding:0; background:transparent; border:0; border-radius:0; }
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row .row-index-cell { color:var(--text); font-weight:600; text-align:center; }
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row .order-line-actions-cell .order-line-delete-btn { width:36px; height:36px; min-height:36px; padding:0; background:transparent; border:0; border-radius:8px; color:var(--danger); box-shadow:none; }
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row .order-line-actions-cell .order-line-delete-btn:hover:not(:disabled) { background:color-mix(in srgb,var(--danger) 8%,transparent); }
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row .order-line-marketplace-reference { display:none; }
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row .row-index-cell {
  display:flex;
  align-items:center;
  justify-content:center;
  align-self:stretch;
  width:40px;
  height:42px;
  min-height:0;
  margin:0;
  padding:0;
  color:var(--text-primary, var(--text));
  background:transparent;
  border:0;
  border-radius:0;
  font-weight:600;
  text-align:center;
}
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-head .row-index-head {
  width:40px;
  min-width:0;
  background:transparent;
  border:0;
  border-radius:0;
  color:var(--text-primary, var(--text));
  font-weight:600;
}
.editor-modal-wide:has(.order-editor-sections) { display:flex; flex-direction:column; overflow:hidden; }
.editor-modal-wide:has(.order-editor-sections) > .panel-head { flex:0 0 auto; position:sticky; top:0; z-index:21; background:#fff; }
.editor-modal-wide:has(.order-editor-sections) > .editor-scroll-content { flex:1 1 auto; min-height:0; overflow-y:auto; overflow-x:hidden; padding-bottom:76px; }
.editor-modal-wide:has(.order-editor-sections) > .editor-actions { flex:0 0 60px; position:sticky; bottom:0; z-index:20; height:60px; min-height:60px; background:var(--bg-surface); border-top:1px solid var(--border-subtle); }
.editor-modal-wide:has(.order-editor-sections) .order-editor-system-footer { position:static; margin-top:12px; }

.records-panel:has(.orders-records-table) .marketplace-provider-filter { background:transparent; border:0; }
.records-panel:has(.orders-records-table) .marketplace-provider-filter button { background:transparent; color:var(--text-secondary); border:0; box-shadow:none; }
.records-panel:has(.orders-records-table) .marketplace-provider-filter button:hover { background:var(--bg-subtle); color:var(--text-primary); }
.records-panel:has(.orders-records-table) .marketplace-provider-filter button:focus-visible { background:transparent; color:var(--text-secondary); box-shadow:none; }
.records-panel:has(.orders-records-table) .marketplace-provider-filter button.active,
.records-panel:has(.orders-records-table) .marketplace-provider-filter button.active:hover,
.records-panel:has(.orders-records-table) .marketplace-provider-filter button.active:focus-visible { background:var(--accent); color:var(--accent-contrast); border:0; box-shadow:0 2px 6px color-mix(in srgb, var(--accent) 18%, transparent); }
.editor-modal-wide:has(.order-editor-sections) .journal-details-head { display:flex; align-items:center; gap:12px; margin-bottom:12px; }
.editor-modal-wide:has(.order-editor-sections) .journal-details-head > div:first-child { flex:1 1 auto; }
.editor-modal-wide:has(.order-editor-sections) .journal-details-head .detail-summary-pill { margin:0; }
.editor-modal-wide:has(.order-editor-sections) .journal-detail-table-shell { margin-top:0; gap:6px; }
.editor-modal-wide:has(.order-editor-sections) .order-editor-system-footer { position:static; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; width:100%; height:auto; min-height:48px; margin-top:12px; padding:10px 16px; box-sizing:border-box; }
.editor-modal-wide:has(.order-editor-sections) .order-editor-system-footer .order-editor-card-audit { position:static; display:contents; margin:0; }
.editor-modal-wide:has(.order-editor-sections) .order-editor-system-footer .editor-fields.orders-editor-fields { display:contents; }
.editor-modal-wide:has(.order-editor-sections) .editor-actions { position:sticky; bottom:0; height:60px; min-height:60px; margin:0; }
.editor-modal-wide:has(.order-editor-sections) .editor-panel { padding-bottom:76px; }
@media (max-width:760px) {
  .editor-modal-wide:has(.order-editor-sections) .order-editor-system-footer { grid-template-columns:1fr; }
}


.editor-modal-wide:has(.order-editor-sections) {
  width: min(94vw, 1500px);
  max-height: 92vh;
  padding: 16px;
}

.editor-modal-wide:has(.order-editor-sections) .editor-modal-head {
  margin-bottom: 12px;
}

.editor-modal-wide:has(.order-editor-sections) .order-summary-compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
  padding: 8px 12px;
}

.editor-modal-wide:has(.order-editor-sections) .order-summary-order-no,
.editor-modal-wide:has(.order-editor-sections) .order-summary-item:nth-child(3),
.editor-modal-wide:has(.order-editor-sections) .order-summary-item:nth-child(5) {
  display: none;
}

.editor-modal-wide:has(.order-editor-sections) .order-summary-item { gap: 8px; }
.editor-modal-wide:has(.order-editor-sections) .order-summary-total { grid-column: auto; }

.editor-modal-wide:has(.order-editor-sections) .order-editor-card {
  min-height: 0;
  padding: 12px 16px;
  background: var(--surface-strong);
}

.editor-modal-wide:has(.order-editor-sections) .order-editor-card-head {
  margin-bottom: 8px;
  padding-bottom: 0;
}

.editor-modal-wide:has(.order-editor-sections) .editor-fields.orders-editor-fields {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px 12px;
}

.editor-modal-wide:has(.order-editor-sections) .field {
  min-height: 0;
  gap: 8px;
}

.editor-modal-wide:has(.order-editor-sections) .order-editor-card-customer .field-shipping_address,
.editor-modal-wide:has(.order-editor-sections) .order-editor-card-amounts .field-notes {
  grid-column: span 2;
}

.editor-modal-wide:has(.order-editor-sections) .journal-details-shell,
.editor-modal-wide:has(.order-editor-sections) .local-order-operations-card {
  min-height: 0;
  padding: 12px 16px;
  background: var(--surface-strong);
}

.editor-modal-wide:has(.order-editor-sections) .journal-details-head {
  margin-bottom: 8px;
}

.editor-modal-wide:has(.order-editor-sections) .journal-detail-table-head {
  min-height: 24px;
  padding: 0 8px;
  margin-bottom: 0;
}

.editor-modal-wide:has(.order-editor-sections) .journal-detail-table-row {
  padding: 4px 8px;
}

.editor-modal-wide:has(.order-editor-sections) .journal-detail-table-head,
.editor-modal-wide:has(.order-editor-sections) .journal-detail-table-row {
  grid-template-columns: 40px minmax(220px, 2.2fr) minmax(70px, .55fr) minmax(90px, .7fr) minmax(80px, .6fr) minmax(100px, .8fr);
}

.editor-modal-wide:has(.order-editor-sections) .local-order-operation-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 12px;
}

.editor-modal-wide:has(.order-editor-sections) .local-order-operation-grid input,
.editor-modal-wide:has(.order-editor-sections) .local-order-operation-grid select,
.editor-modal-wide:has(.order-editor-sections) .local-order-operation-actions button {
  min-height: 42px;
  height: 42px;
  border-radius: 10px;
}

.editor-modal-wide:has(.order-editor-sections) .local-order-operation-actions {
  grid-column: 1 / -1;
  padding-top: 0;
}

.editor-modal-wide:has(.order-editor-sections) .order-editor-system-footer {
  display: block;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-tint);
}

.editor-modal-wide:has(.order-editor-sections) .order-editor-system-footer .order-editor-card-audit {
  padding: 0;
  border: 0;
  background: transparent;
}

.editor-modal-wide:has(.order-editor-sections) .order-editor-system-footer .editor-fields.orders-editor-fields {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 12px;
}

.editor-modal-wide:has(.order-editor-sections) .editor-actions {
  min-height: 56px;
  height: 56px;
  box-sizing: border-box;
  align-items: center;
  margin-top: 12px;
  padding: 8px 0 0;
}

.records-panel:has(.orders-records-table) .record-filters {
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
}

.records-panel:has(.orders-records-table) .orders-filter-cluster {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 12px;
  width: 100%;
}

.records-panel:has(.orders-records-table) .order-status-counts {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 1100px) {
  .editor-modal-wide:has(.order-editor-sections) .editor-fields.orders-editor-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .editor-modal-wide:has(.order-editor-sections) { width: calc(100vw - 16px); padding: 12px; }
  .editor-modal-wide:has(.order-editor-sections) .order-summary-compact,
  .editor-modal-wide:has(.order-editor-sections) .editor-fields.orders-editor-fields,
  .editor-modal-wide:has(.order-editor-sections) .editor-modal-wide .editor-fields.orders-editor-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .editor-modal-wide:has(.order-editor-sections) .local-order-operation-grid { grid-template-columns: 1fr; }
  .editor-modal-wide:has(.order-editor-sections) .journal-detail-table-shell { overflow-x: auto; }
}


.records-panel:has(.orders-records-table) .record-filters {
  min-height: 0;
  max-height: 140px;
  box-sizing: border-box;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  padding: 12px 16px;
}

.records-panel:has(.orders-records-table) .orders-filter-cluster {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px 12px;
}

.records-panel:has(.orders-records-table) .marketplace-provider-filter,
.records-panel:has(.orders-records-table) .order-status-counts,
.records-panel:has(.orders-records-table) .record-filters .search-group {
  min-height: 0;
}

.records-panel:has(.orders-records-table) .records-table tr { height: 0; }

.editor-modal-wide:has(.order-editor-sections) .order-editor-card,
.editor-modal-wide:has(.order-editor-sections) .journal-details-shell,
.editor-modal-wide:has(.order-editor-sections) .local-order-operations-card,
.editor-modal-wide:has(.order-editor-sections) .order-editor-system-footer {
  min-height: 0;
  box-sizing: border-box;
}

.editor-modal-wide:has(.order-editor-sections) .order-editor-card-workflow .editor-fields.orders-editor-fields {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding-bottom: 0;
}

.editor-modal-wide:has(.order-editor-sections) .order-editor-card-links .editor-fields.orders-editor-fields {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding-bottom: 0;
}

.editor-modal-wide:has(.order-editor-sections) .order-editor-card-customer .editor-fields.orders-editor-fields {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 2fr);
  padding-bottom: 0;
}

.editor-modal-wide:has(.order-editor-sections) .order-editor-card-customer .field-shipping_address,
.editor-modal-wide:has(.order-editor-sections) .order-editor-card-amounts .field-notes { grid-column: auto; }

.editor-modal-wide:has(.order-editor-sections) .order-editor-card-amounts .editor-fields.orders-editor-fields {
  grid-template-columns: minmax(120px, .8fr) minmax(120px, .8fr) minmax(240px, 2fr);
  padding-bottom: 0;
}

.editor-modal-wide:has(.order-editor-sections) .order-editor-card-shipping .editor-fields.orders-editor-fields,
.editor-modal-wide:has(.order-editor-sections) .local-order-operation-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: minmax(0, auto);
  row-gap: 8px;
}

.editor-modal-wide:has(.order-editor-sections) .order-editor-card-head + .editor-fields,
.editor-modal-wide:has(.order-editor-sections) .journal-details-head + .journal-detail-table-shell { margin-top: 0; }

.editor-modal-wide:has(.order-editor-sections) .journal-detail-table-head,
.editor-modal-wide:has(.order-editor-sections) .journal-detail-table-row {
  grid-template-columns: 32px 40fr 16fr 9fr 12fr 10fr 13fr;
}

.editor-modal-wide:has(.order-editor-sections) .journal-detail-table-head {
  height: 24px;
  min-height: 24px;
  align-items: center;
}

.editor-modal-wide:has(.order-editor-sections) .journal-detail-table-row {
  min-height: 0;
  height: 64px;
  align-items: center;
}

.editor-modal-wide:has(.order-editor-sections) .journal-detail-table-row .field {
  min-height: 0;
  align-content: center;
}

.editor-modal-wide:has(.order-editor-sections) .journal-detail-table-row .field-name { display: none; }

.editor-modal-wide:has(.order-editor-sections) .local-order-operation-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 0;
}

.editor-modal-wide:has(.order-editor-sections) .order-editor-system-footer {
  height: 56px;
  padding: 8px 12px;
}

.editor-modal-wide:has(.order-editor-sections) .order-editor-system-footer .editor-fields.orders-editor-fields {
  height: 40px;
  align-items: center;
}

.editor-modal-wide:has(.order-editor-sections) .editor-actions {
  height: 56px;
  min-height: 56px;
  margin-top: 8px;
  padding: 8px 0 0;
}

@media (max-width: 1100px) {
  .editor-modal-wide:has(.order-editor-sections) .order-editor-card-workflow .editor-fields.orders-editor-fields,
  .editor-modal-wide:has(.order-editor-sections) .order-editor-card-links .editor-fields.orders-editor-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .editor-modal-wide:has(.order-editor-sections) .journal-detail-table-shell { overflow-x: auto; }
}


.records-panel:has(.orders-records-table) .record-filters,
.records-panel:has(.orders-records-table) .order-status-counts { overflow: visible; }
.records-panel:has(.orders-records-table) .marketplace-provider-filter { flex-shrink: 0; }
.records-panel:has(.orders-records-table) .marketplace-provider-filter button,
.records-panel:has(.orders-records-table) .order-status-count { min-width: max-content; white-space: nowrap; }
.records-panel:has(.orders-records-table) .record-filters .search-group { flex: 0 0 300px; }
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-head,
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row { grid-template-columns: 32px 40fr 16fr 9fr 12fr 10fr 13fr; }
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row { height: auto; min-height: 64px; align-items: end; }
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row .field { min-width: 0; width: 100%; position: static; }
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row input,
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row select,
.editor-modal-wide:has(.order-editor-sections) .order-detail-table-row .reference-trigger { width: 100%; min-width: 0; box-sizing: border-box; }
.editor-modal-wide:has(.order-editor-sections) .order-editor-system-footer { position: static; margin-top: 12px; }
.editor-modal-wide:has(.order-editor-sections) .editor-actions { position: sticky; bottom: 0; height: 56px; min-height: 56px; }
@media (max-width: 760px) {
  .records-panel:has(.orders-records-table) .record-filters { height: auto; max-height: 128px; flex-wrap: wrap; }
  .records-panel:has(.orders-records-table) .record-filters .search-group { flex-basis: min(300px, 100%); }
  .editor-modal-wide:has(.order-editor-sections) .order-detail-table-shell { overflow-x: auto; }
}


.records-panel:has(.orders-records-table) .record-filters { display:flex; flex-wrap:nowrap; align-items:center; width:100%; height:64px; min-height:64px; max-height:64px; padding:8px 12px; gap:8px; overflow:hidden; background:var(--surface-strong); }
.records-panel:has(.orders-records-table) .orders-filter-cluster { display:contents; }
.records-panel:has(.orders-records-table) .marketplace-provider-filter,
.records-panel:has(.orders-records-table) .order-status-counts,
.records-panel:has(.orders-records-table) .record-filters .search-group { flex:0 0 auto; width:auto; min-width:0; margin:0; }
.records-panel:has(.orders-records-table) .marketplace-provider-filter { order:1; }
.records-panel:has(.orders-records-table) .order-status-counts { order:2; display:flex; flex-wrap:nowrap; align-items:center; gap:8px; overflow:hidden; }
.records-panel:has(.orders-records-table) .record-filters .search-group { order:3; width:300px; margin-inline-start:auto; }
.records-panel:has(.orders-records-table) .record-filters .search-group input { width:100%; }
.editor-modal-wide:has(.order-editor-sections) .order-editor-sections,
.editor-modal-wide:has(.order-editor-sections) .order-editor-card,
.editor-modal-wide:has(.order-editor-sections) .journal-details-shell,
.editor-modal-wide:has(.order-editor-sections) .local-order-operations-card,
.editor-modal-wide:has(.order-editor-sections) .order-editor-system-footer { position:static; inset:auto; height:auto; min-height:0; margin:0; }
.editor-modal-wide:has(.order-editor-sections) .order-editor-card,
.editor-modal-wide:has(.order-editor-sections) .journal-details-shell,
.editor-modal-wide:has(.order-editor-sections) .local-order-operations-card { padding:12px 16px; }
.editor-modal-wide:has(.order-editor-sections) .journal-details-head { margin:0 0 12px; }
.editor-modal-wide:has(.order-editor-sections) .journal-detail-table-shell { display:grid; gap:6px; margin:0; }
.editor-modal-wide:has(.order-editor-sections) .journal-detail-table-head { margin:0; }
.editor-modal-wide:has(.order-editor-sections) .journal-detail-table-row { height:64px; min-height:0; margin:0; }
.editor-modal-wide:has(.order-editor-sections) .local-order-operations-card { overflow:visible; }
.editor-modal-wide:has(.order-editor-sections) .local-order-operation-grid { height:auto; min-height:0; margin:0; grid-template-columns:repeat(3,minmax(0,1fr)); grid-template-rows:repeat(2,auto); align-items:end; }
.editor-modal-wide:has(.order-editor-sections) .local-order-operation-actions { grid-column:1/-1; grid-row:3; height:auto; min-height:0; margin:0; }
.editor-modal-wide:has(.order-editor-sections) .order-editor-system-footer { height:52px; min-height:52px; padding:8px 12px; overflow:visible; }
.editor-modal-wide:has(.order-editor-sections) .editor-modal-content,
.editor-modal-wide:has(.order-editor-sections) .editor-panel-content { padding-bottom:72px; }
.editor-modal-wide:has(.order-editor-sections) .editor-actions { position:sticky; bottom:0; height:56px; min-height:56px; margin:0; padding:8px 0 0; box-sizing:border-box; background:var(--surface-strong); }
@media (max-width:760px) {
  .records-panel:has(.orders-records-table) .record-filters { height:auto; max-height:none; min-height:64px; flex-wrap:wrap; overflow:visible; }
  .records-panel:has(.orders-records-table) .record-filters .search-group { width:min(100%,300px); margin-inline-start:0; }
  .editor-modal-wide:has(.order-editor-sections) .local-order-operation-grid { grid-template-columns:repeat(2,minmax(0,1fr)); grid-template-rows:auto; }
}


.performance-dashboard {
  max-width: none;
  gap: 22px;
}

.performance-dashboard .dashboard-metrics {
  width: 100%;
  gap: 12px;
}

.performance-dashboard .dashboard-metrics-primary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.performance-dashboard .dashboard-metrics-secondary {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.performance-dashboard .dashboard-metric {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-color: var(--border-subtle);
  border-radius: 14px;
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
}

.performance-dashboard .dashboard-metric::before {
  inset-block: 0;
  inset-inline-start: 0;
  inset-inline-end: auto;
  width: 3px;
  opacity: .72;
}

.performance-dashboard .dashboard-metric > span {
  display: block;
  overflow: hidden;
  color: var(--text-secondary);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.performance-dashboard .dashboard-metric > strong {
  display: block;
  overflow: hidden;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.performance-dashboard .dashboard-metric > small {
  display: block;
  margin-top: 2px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
}

.performance-dashboard .dashboard-metric-primary {
  min-height: 124px;
  padding: 18px 20px;
}

.performance-dashboard .dashboard-metric-primary > span {
  font-size: 13px;
  font-weight: 700;
}

.performance-dashboard .dashboard-metric-primary > strong {
  margin-top: 12px;
  font-size: clamp(27px, 2.35vw, 36px);
  line-height: 1.08;
}

.performance-dashboard .dashboard-metric-secondary {
  min-height: 88px;
  padding: 14px 16px;
}

.performance-dashboard .dashboard-metric-secondary > span {
  font-size: 12px;
  font-weight: 650;
}

.performance-dashboard .dashboard-metric-secondary > strong {
  margin-top: 8px;
  font-size: clamp(21px, 1.7vw, 27px);
  line-height: 1.08;
}

.performance-dashboard .dashboard-metric.tone-success > strong { color: var(--success); }
.performance-dashboard .dashboard-metric.tone-warning > strong { color: var(--warning); }
.performance-dashboard .dashboard-metric.tone-danger > strong { color: var(--danger); }

.performance-dashboard .dashboard-grid {
  gap: 20px;
  align-items: start;
}

.performance-dashboard .dashboard-panel {
  min-width: 0;
  border-color: var(--border-subtle);
  border-radius: 14px;
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
}

.performance-dashboard .dashboard-panel.dashboard-hero-chart {
  min-height: 420px;
}

.performance-dashboard .dashboard-panel.dashboard-secondary-chart {
  min-height: 340px;
}

.performance-dashboard .dashboard-panel-heading h3 {
  color: var(--text-primary);
}

.performance-dashboard .dashboard-panel-heading p {
  color: var(--text-secondary);
}

.performance-dashboard .dashboard-donut-panel {
  min-height: 300px;
}

.performance-dashboard .platform-balance-grid article {
  min-height: 0;
  padding: 10px 12px;
  border-color: var(--border-subtle);
  background: var(--bg-subtle);
}

.performance-dashboard .platform-balance-grid span {
  color: var(--text-secondary);
}

.performance-dashboard .platform-balance-grid strong {
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.performance-dashboard .dashboard-item-ranking {
  border-color: var(--border-subtle);
  background: var(--bg-surface);
}

.performance-dashboard .dashboard-item-ranking li:hover {
  background: var(--bg-subtle);
}

@media (max-width: 1220px) {
  .performance-dashboard .dashboard-metrics-primary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .performance-dashboard .dashboard-metrics-secondary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 880px) {
  .performance-dashboard .dashboard-metrics-primary,
  .performance-dashboard .dashboard-metrics-secondary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .performance-dashboard .dashboard-metrics-primary,
  .performance-dashboard .dashboard-metrics-secondary { grid-template-columns: 1fr; }
  .performance-dashboard .dashboard-metric-primary,
  .performance-dashboard .dashboard-metric-secondary { min-height: 0; }
}


.performance-dashboard .dashboard-controls {
  display: grid;
  align-items: end;
  column-gap: 12px;
  row-gap: 0;
}

.performance-dashboard .dashboard-controls > label,
.performance-dashboard .dashboard-controls .dashboard-platform-picker,
.performance-dashboard .dashboard-controls .dashboard-mode {
  display: grid;
  grid-template-rows: 18px 44px;
  align-content: end;
  row-gap: 6px;
  min-width: 0;
}

.performance-dashboard .dashboard-controls > label > span,
.performance-dashboard .dashboard-controls .dashboard-platform-picker > span,
.performance-dashboard .dashboard-controls .dashboard-mode > span {
  min-height: 18px;
  margin: 0;
  line-height: 18px;
}

.performance-dashboard .dashboard-controls > label > input,
.performance-dashboard .dashboard-controls .dashboard-picker-trigger,
.performance-dashboard .dashboard-controls .dashboard-mode > div,
.performance-dashboard .dashboard-controls .reports-refresh {
  height: 44px;
  min-height: 44px;
  box-sizing: border-box;
}

.performance-dashboard .dashboard-controls .reports-refresh {
  align-self: end;
}


.report-period-context {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 650;
}
.report-period-context strong { color: var(--text-primary); font-variant-numeric: tabular-nums; }
.report-period-context em { margin-inline-start: auto; color: var(--warning); font-style: normal; font-weight: 750; }

.searchable-select-field { display: grid; position: relative; min-width: 0; gap: 6px; color: var(--text-secondary); font-size: 12px; font-weight: 700; }
.searchable-select { position: relative; min-width: 0; }
.searchable-select > input {
  width: 100%;
  min-width: 0;
  min-height: var(--control-height);
  box-sizing: border-box;
  padding: 0 38px 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-strong);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
}
[dir="rtl"] .searchable-select > input { padding: 0 12px 0 38px; }
.searchable-select > input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-color: var(--accent); }
.searchable-select-clear, .searchable-select-chevron {
  position: absolute;
  z-index: 2;
  inset-inline-end: 9px;
  top: 50%;
  translate: 0 -50%;
}
.searchable-select-clear { width: 24px; height: 24px; padding: 0; border: 0; border-radius: 7px; background: var(--surface-tint); color: var(--text-secondary); cursor: pointer; font: inherit; }
.searchable-select-chevron { pointer-events: none; color: var(--accent); font-size: 16px; }
.searchable-select:has(.searchable-select-clear) .searchable-select-chevron { display: none; }
.searchable-select-list {
  position: absolute;
  z-index: 70;
  top: calc(100% + 6px);
  inset-inline: 0;
  display: grid;
  min-width: min(390px, calc(100vw - 48px));
  max-height: 280px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface-strong);
  box-shadow: var(--shadow-lg);
}
.searchable-select-list button { min-height: 38px; padding: 7px 9px; border: 0; border-radius: 8px; background: transparent; color: var(--text); cursor: pointer; font: inherit; font-size: 13px; text-align: start; }
.searchable-select-list button.active, .searchable-select-list button:hover { background: var(--surface-tint); }
.searchable-select-list button.selected { color: var(--accent-strong); font-weight: 750; }
.searchable-select-list p { margin: 8px; color: var(--text-secondary); font-size: 12px; font-weight: 600; }

.trial-balance-totals {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 8px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-tint);
}
.trial-balance-totals span { display: grid; gap: 5px; color: var(--text-secondary); font-size: 11px; font-weight: 700; }
.trial-balance-totals strong { color: var(--text-primary); direction: ltr; font-size: 15px; font-variant-numeric: tabular-nums; text-align: end; }
.report-result-count { margin-inline-end: auto; color: var(--text-secondary); font-size: 12px; font-weight: 700; }
.standard-reports-screen .report-table thead th,
.account-statement-screen .statement-table thead th { position: sticky; top: 0; z-index: 2; background: var(--surface-strong); }
.standard-reports-screen .report-table td:nth-child(n+3),
.standard-reports-screen .report-table td:last-child,
.account-statement-screen .statement-table td:nth-child(n+5) { font-variant-numeric: tabular-nums; }


@media (max-width: 1380px) {
  .performance-dashboard .dashboard-controls { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
  .performance-dashboard .dashboard-controls .reports-refresh { grid-column: span 2; }
}


@media (max-width: 1200px) {
  .standard-reports-screen .searchable-select-list,
  .account-statement-screen .searchable-select-list {
    width: 100%;
    min-width: 0;
    max-height: 240px;
  }
}

@media (max-width: 720px) {
  .workspace:not(:has(.orders-records-table)) .sidebar { display: none; }
  .workspace:not(:has(.orders-records-table)) { grid-template-columns: minmax(0, 1fr); }
  .workspace:not(:has(.orders-records-table)) .content { min-width: 0; }
  .report-period-context { align-items: flex-start; flex-direction: column; }
  .report-period-context em { margin-inline-start: 0; }
  .searchable-select-list { min-width: 0; }
  .trial-balance-totals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .screen-page { animation: none; }
  .sidebar { transition: none; }
}

.quantity-publish-preview-backdrop {
  position: fixed;
  z-index: 140;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgb(3 28 31 / .62);
  backdrop-filter: blur(3px);
}
.quantity-publish-preview {
  width: min(620px, 100%);
  max-height: calc(100dvh - 36px);
  overflow: auto;
  padding: 20px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: var(--surface-strong);
  box-shadow: var(--shadow-lg);
  color: var(--text);
}
.quantity-publish-preview > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.quantity-publish-preview > header span { color: var(--accent-strong); font-size: 11px; font-weight: 800; letter-spacing: .04em; }
.quantity-publish-preview > header h2 { margin: 5px 0 0; font-size: 21px; }
.quantity-publish-preview > header > button { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); cursor: pointer; font-size: 21px; }
.quantity-publish-preview > p { margin: 14px 0; color: var(--text-secondary); font-size: 13px; line-height: 1.65; }
.quantity-publish-preview-list { display: grid; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.quantity-publish-preview-list > div { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 48px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.quantity-publish-preview-list > div:last-child { border-bottom: 0; }
.quantity-publish-preview-list span { display: grid; min-width: 0; gap: 2px; }
.quantity-publish-preview-list strong { font-size: 13px; direction: ltr; text-align: start; }
.quantity-publish-preview-list small { overflow: hidden; color: var(--text-secondary); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.quantity-publish-preview-list b { flex: 0 0 auto; min-width: 52px; color: var(--accent-strong); font-variant-numeric: tabular-nums; text-align: end; }
.quantity-publish-preview-more { display: block; margin-top: 9px; color: var(--text-secondary); font-weight: 700; }
.quantity-publish-preview > footer { display: flex; justify-content: flex-end; gap: 9px; margin-top: 18px; }
@media (max-width: 620px) {
  .quantity-publish-preview-backdrop { align-items: end; padding: 8px; }
  .quantity-publish-preview { max-height: calc(100dvh - 16px); border-radius: 18px 18px 10px 10px; }
  .quantity-publish-preview > footer { align-items: stretch; flex-direction: column-reverse; }
  .quantity-publish-preview > footer .action-btn { width: 100%; }
}


.permissions-screen { width:100%; max-width:none; display:grid; gap:16px; padding:0 18px 32px; }
.permissions-page-heading { align-items:flex-end; margin:0; }
.permissions-page-heading p { max-width:720px; margin:8px 0 0; color:var(--text-secondary); font-size:13px; line-height:1.65; }
.permission-stats { display:grid; grid-template-columns:repeat(4,minmax(140px,1fr)); gap:10px; }
.permission-stats button { display:flex; align-items:center; justify-content:space-between; min-height:76px; padding:14px 16px; border:1px solid var(--border-subtle); border-radius:14px; background:var(--bg-surface); color:var(--text-secondary); text-align:start; box-shadow:var(--shadow-sm); }
.permission-stats button:hover, .permission-stats button:focus-visible { border-color:var(--border-default); }
.permission-stats button.active { border-color:var(--accent); background:var(--accent-soft); color:var(--accent-hover); box-shadow:inset 0 0 0 1px var(--accent); }
.permission-stats span { font-size:12px; font-weight:700; }
.permission-stats strong { color:var(--text-primary); font-size:25px; font-variant-numeric:tabular-nums; }
.permission-create-card { grid-template-columns:minmax(210px,1.25fr) repeat(4,minmax(150px,1fr)) auto; margin:0; border-radius:16px; box-shadow:var(--shadow-sm); }
.permission-create-intro { display:grid; align-self:center; gap:5px; }
.permission-create-intro strong { color:var(--text-primary); font-size:15px; }
.permission-create-intro span, .permission-create-card label small { color:var(--text-secondary); font-size:10px; line-height:1.5; }
.permission-create-card input, .permission-create-card select { min-height:44px; border-radius:11px; }

.permissions-screen .permissions-layout { grid-template-columns:minmax(300px,340px) minmax(720px,1fr); gap:16px; align-items:start; }
.permissions-screen .permission-users-list, .permissions-screen .permission-matrix-card { border-radius:16px; border-color:var(--border-subtle); box-shadow:var(--shadow-sm); }
.permissions-screen .permission-users-list { position:sticky; top:14px; display:grid; grid-template-rows:auto auto minmax(180px,1fr); gap:10px; max-height:calc(100vh - 28px); padding:14px; }
.permissions-screen .permission-list-heading { padding:0 2px; color:var(--text-primary); }
.permissions-screen .permission-list-heading strong { font-size:14px; }
.permissions-screen .permission-list-heading span { min-width:auto; padding:4px 8px; color:var(--text-secondary); font-size:10px; }
.permission-user-search, .permission-screen-search { position:relative; min-width:0; }
.permission-user-search > span, .permission-screen-search > span { position:absolute; z-index:1; inset-inline-start:12px; top:50%; translate:0 -50%; color:var(--text-muted); font-size:18px; pointer-events:none; }
.permission-user-search input, .permission-screen-search input { width:100%; min-height:42px; padding:0 38px 0 12px; border:1px solid var(--border-subtle); border-radius:11px; background:var(--bg-subtle); color:var(--text-primary); outline:0; }
[dir="ltr"] .permission-user-search input, [dir="ltr"] .permission-screen-search input { padding:0 12px 0 38px; }
.permission-user-search input:focus, .permission-screen-search input:focus { border-color:var(--accent); background:var(--bg-surface); box-shadow:0 0 0 3px var(--focus-ring); }
.permission-user-scroll { min-height:0; overflow-y:auto; overscroll-behavior:contain; }
.permissions-screen .permission-user-scroll > button { width:100%; display:grid; grid-template-columns:42px minmax(0,1fr) auto; align-items:center; gap:10px; min-height:76px; padding:9px; border:1px solid transparent; border-radius:12px; background:transparent; color:var(--text-primary); text-align:start; }
.permissions-screen .permission-user-scroll > button:hover { background:var(--bg-subtle); }
.permissions-screen .permission-user-scroll > button.active { border-color:var(--border-default); background:var(--accent-soft); }
.permissions-screen .permission-user-scroll button > span:nth-child(2) { min-width:0; display:grid; gap:2px; }
.permissions-screen .permission-user-scroll small { overflow:hidden; color:var(--text-secondary); font-size:10px; text-overflow:ellipsis; white-space:nowrap; }
.permissions-screen .permission-user-scroll em { width:max-content; color:var(--accent-hover); font-size:9px; font-style:normal; font-weight:800; }
.permissions-screen .permission-user-scroll i { padding:4px 7px; border-radius:999px; font-size:9px; font-style:normal; white-space:nowrap; }
.permissions-screen .permission-user-scroll i.active { background:var(--success-soft); color:var(--success); }
.permissions-screen .permission-user-scroll i.inactive { background:var(--danger-soft); color:var(--danger); }
.permissions-screen .permission-avatar { width:42px; height:42px; border-radius:12px; }
.permissions-screen .permission-avatar.large { width:52px; height:52px; border-radius:15px; font-size:18px; }

.permissions-screen .permission-matrix-card { overflow:visible; }
.permission-user-profile { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:18px; border-bottom:1px solid var(--border-subtle); }
.permission-profile-identity { display:flex; align-items:center; gap:12px; min-width:0; }
.permission-profile-identity > div { display:grid; min-width:0; gap:3px; }
.permission-profile-identity strong { color:var(--text-primary); font-size:18px; }
.permission-profile-identity span { overflow:hidden; color:var(--text-secondary); font-size:11px; text-overflow:ellipsis; }
.permission-profile-identity small { width:max-content; padding:3px 7px; border-radius:999px; background:var(--accent-soft); color:var(--accent-hover); font-size:9px; font-weight:800; }
.permission-profile-controls { display:grid; grid-template-columns:minmax(150px,1fr) 130px 180px; align-items:end; gap:12px; }
.permission-profile-controls label { display:grid; gap:6px; color:var(--text-secondary); font-size:11px; font-weight:700; }
.permission-profile-controls input, .permission-profile-controls select { width:100%; min-height:42px; padding:0 11px; border:1px solid var(--border-subtle); border-radius:11px; background:var(--bg-surface); color:var(--text-primary); }
.permission-switch { position:relative; display:flex; align-items:center; gap:9px; min-height:42px; padding:0 11px; border:1px solid var(--border-subtle); border-radius:11px; background:var(--bg-subtle); }
.permission-switch input { position:absolute; inset:0; width:100%; height:100%; margin:0; opacity:0; cursor:pointer; }
.permission-switch input:disabled { cursor:not-allowed; }
.permission-switch i { position:relative; width:34px; height:20px; border-radius:999px; background:var(--text-muted); transition:background 160ms ease; }
.permission-switch i::after { content:""; position:absolute; top:3px; inset-inline-start:3px; width:14px; height:14px; border-radius:50%; background:#fff; transition:translate 160ms ease; }
.permission-switch input:checked + i { background:var(--success); }
.permission-switch input:checked + i::after { translate:14px 0; }
[dir="rtl"] .permission-switch input:checked + i::after { translate:-14px 0; }
.permission-switch input:focus-visible + i { outline:2px solid var(--accent); outline-offset:2px; }
.permission-switch input:disabled + i { opacity:.55; }
.permission-switch b { color:var(--text-primary); font-size:11px; white-space:nowrap; }

.permission-access-summary { display:grid; grid-template-columns:repeat(3,minmax(120px,1fr)) minmax(260px,2fr); gap:8px; padding:12px 18px; border-bottom:1px solid var(--border-subtle); background:var(--bg-subtle); }
.permission-access-summary > div { display:grid; gap:4px; padding:8px 10px; border-inline-end:1px solid var(--border-subtle); }
.permission-access-summary span { color:var(--text-secondary); font-size:10px; font-weight:700; }
.permission-access-summary strong { color:var(--text-primary); font-size:19px; font-variant-numeric:tabular-nums; }
.permission-access-summary strong small { color:var(--text-muted); font-size:10px; }
.permission-access-summary p { align-self:center; margin:0; color:var(--text-secondary); font-size:11px; line-height:1.6; }
.permission-tools { display:grid; grid-template-columns:minmax(330px,1fr) minmax(210px,.7fr) auto; align-items:end; gap:12px; padding:14px 18px; }
.permission-preset-group { display:grid; gap:6px; }
.permission-preset-group > span { color:var(--text-secondary); font-size:10px; font-weight:800; }
.permission-preset-group > div, .permission-filter-tabs { display:flex; gap:5px; padding:4px; border-radius:11px; background:var(--bg-subtle); }
.permission-preset-group button, .permission-filter-tabs button { min-height:34px; padding:0 10px; border:1px solid transparent; border-radius:8px; background:transparent; color:var(--text-secondary); font-size:10px; font-weight:750; white-space:nowrap; }
.permission-preset-group button:hover, .permission-filter-tabs button:hover { background:var(--bg-surface); }
.permission-preset-group button.danger { color:var(--danger); }
.permission-preset-group button:disabled { opacity:.45; cursor:not-allowed; }
.permission-filter-tabs button.active { border-color:var(--border-subtle); background:var(--bg-surface); color:var(--accent-hover); box-shadow:var(--shadow-sm); }
.permission-matrix-heading { display:flex; align-items:center; justify-content:space-between; padding:0 18px 10px; }
.permission-matrix-heading strong { color:var(--text-primary); font-size:14px; }
.permission-matrix-heading span { padding:4px 8px; border-radius:999px; background:var(--bg-subtle); color:var(--text-secondary); font-size:10px; font-weight:700; }
.permissions-screen .permission-table-wrap { max-height:calc(100vh - 220px); overflow:auto; border-block:1px solid var(--border-subtle); }
.permissions-screen .permission-table { min-width:820px; }
.permissions-screen .permission-table thead { position:sticky; z-index:3; top:0; }
.permissions-screen .permission-table th, .permissions-screen .permission-table td { padding:11px 12px; }
.permissions-screen .permission-table tbody tr:not(.permission-category-row):hover { background:var(--bg-subtle); }
.permissions-screen .permission-table td:first-child { min-width:250px; }
.permissions-screen .permission-category-row th { position:relative; padding:7px 12px; background:var(--accent-soft); }
.permissions-screen .permission-category-row button { min-height:30px; padding:0 7px; border:0; border-radius:7px; background:transparent; color:var(--accent-hover); font:inherit; }
.permissions-screen .permission-category-row th > button { display:flex; align-items:center; gap:8px; width:100%; padding-inline-end:100px; text-align:start; }
.permissions-screen .permission-category-row th > button small { display:inline-grid; place-items:center; min-width:22px; height:22px; border-radius:999px; background:var(--bg-surface); color:var(--text-secondary); }
.permissions-screen .permission-category-row th > div { position:absolute; inset-inline-end:12px; top:7px; display:flex; gap:4px; }
.permissions-screen .permission-category-row th > div button { border:1px solid var(--border-subtle); background:var(--bg-surface); font-size:9px; }
.permissions-screen .permission-column-actions button:disabled { opacity:.4; cursor:not-allowed; }
.permission-save-bar { position:sticky; z-index:4; bottom:0; display:flex; align-items:center; justify-content:space-between; gap:14px; min-height:66px; padding:10px 18px; border-top:1px solid var(--border-subtle); border-radius:0 0 16px 16px; background:color-mix(in srgb,var(--bg-surface) 92%,transparent); backdrop-filter:blur(12px); }
.permission-save-bar > span { color:var(--text-secondary); font-size:11px; font-weight:700; }
.permission-save-bar.dirty > span { color:var(--warning); }
.permission-save-bar > div { display:flex; gap:8px; }
.permission-save-bar .action-btn:disabled { opacity:.5; cursor:not-allowed; }

@media (max-width:1250px) {
  .permission-create-card { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .permission-create-intro, .permission-create-card .create-user-actions { grid-column:1/-1; }
  .permissions-screen .permissions-layout { grid-template-columns:280px minmax(680px,1fr); }
  .permission-tools { grid-template-columns:1fr 1fr; }
  .permission-preset-group { grid-column:1/-1; }
}
@media (max-width:980px) {
  .permissions-screen .permissions-layout { grid-template-columns:1fr; }
  .permissions-screen .permission-users-list { position:static; max-height:none; }
  .permission-user-scroll { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); max-height:300px; }
  .permission-user-profile { align-items:stretch; flex-direction:column; }
  .permission-access-summary { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .permission-access-summary p { grid-column:1/-1; }
}
@media (max-width:680px) {
  .permissions-screen { padding-inline:12px; }
  .permission-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .permission-stats button { min-height:64px; }
  .permission-create-card, .permission-profile-controls, .permission-tools { grid-template-columns:1fr; }
  .permission-create-intro, .permission-create-card .create-user-actions, .permission-preset-group { grid-column:auto; }
  .permission-user-scroll { grid-template-columns:1fr; }
  .permission-access-summary { grid-template-columns:1fr; }
  .permission-access-summary > div { border-inline-end:0; border-bottom:1px solid var(--border-subtle); }
  .permission-preset-group > div, .permission-filter-tabs { overflow-x:auto; }
  .permission-save-bar { align-items:stretch; flex-direction:column; }
  .permission-save-bar > div, .permission-save-bar .action-btn { width:100%; }
}


.settings-screen .automatic-sync-card { grid-column:1/-1; display:grid; gap:14px; }
.automatic-sync-card .settings-card-heading { align-items:flex-start; }
.automatic-sync-list { display:grid; gap:9px; }
.automatic-sync-row { display:grid; grid-template-columns:minmax(210px,1.2fr) 150px 160px 150px minmax(220px,1fr) auto; align-items:end; gap:12px; padding:13px; border:1px solid var(--border-subtle); border-radius:12px; background:var(--bg-subtle); }
.automatic-sync-row.enabled { border-color:color-mix(in srgb,var(--success) 30%,var(--border-subtle)); background:color-mix(in srgb,var(--success-soft) 55%,var(--bg-surface)); }
.automatic-sync-identity { display:flex; align-items:center; gap:10px; min-width:0; align-self:center; }
.automatic-sync-identity > div { display:grid; min-width:0; gap:3px; }
.automatic-sync-identity strong { overflow:hidden; color:var(--text-primary); font-size:13px; text-overflow:ellipsis; white-space:nowrap; }
.automatic-sync-identity small { color:var(--text-secondary); font-size:10px; }
.automatic-sync-provider { display:inline-grid; place-items:center; flex:0 0 auto; min-width:62px; min-height:30px; padding:0 8px; border-radius:9px; background:var(--accent-soft); color:var(--accent-hover); font-size:10px; font-weight:850; }
.automatic-sync-provider.jumia { background:#e4f1ff; color:#176bb4; }
.automatic-sync-provider.noon { background:#fff8bd; color:#6c5a00; }
.automatic-sync-provider.amazon { background:#fff1df; color:#9d5518; }
.automatic-sync-provider.website { background:#ffe8f1; color:#ab2760; }
.automatic-sync-provider.google-sheets { background:color-mix(in srgb,var(--success) 14%,var(--bg-surface)); color:var(--success); }
.automatic-sync-row > label { display:grid; gap:6px; color:var(--text-secondary); font-size:10px; font-weight:750; }
.automatic-sync-row > label select, .automatic-sync-row > label input[type="time"] { width:100%; min-height:40px; padding:0 10px; border:1px solid var(--border-subtle); border-radius:10px; background:var(--bg-surface); color:var(--text-primary); }
.automatic-sync-toggle { align-self:center; display:flex !important; grid-template-columns:none; align-items:center; gap:8px !important; min-height:40px; padding:0 10px; border:1px solid var(--border-subtle); border-radius:10px; background:var(--bg-surface); }
.automatic-sync-toggle input { position:absolute; opacity:0; }
.automatic-sync-toggle i { position:relative; width:32px; height:19px; border-radius:999px; background:var(--text-muted); }
.automatic-sync-toggle i::after { content:""; position:absolute; top:3px; inset-inline-start:3px; width:13px; height:13px; border-radius:50%; background:#fff; transition:translate 160ms ease; }
.automatic-sync-toggle input:checked + i { background:var(--success); }
.automatic-sync-toggle input:checked + i::after { translate:13px 0; }
[dir="rtl"] .automatic-sync-toggle input:checked + i::after { translate:-13px 0; }
.automatic-sync-toggle input:focus-visible + i { outline:2px solid var(--accent); outline-offset:2px; }
.automatic-sync-toggle span { color:var(--text-primary); font-size:10px; white-space:nowrap; }
.automatic-sync-status { display:grid; align-self:center; min-width:0; gap:4px; }
.automatic-sync-status .status { width:max-content; padding:3px 7px; border-radius:999px; background:var(--bg-surface); color:var(--text-secondary); font-size:9px; font-weight:800; }
.automatic-sync-status .status.success { background:var(--success-soft); color:var(--success); }
.automatic-sync-status .status.failed { background:var(--danger-soft); color:var(--danger); }
.automatic-sync-status .status.running { background:var(--info-soft); color:var(--info); }
.automatic-sync-status small { color:var(--text-secondary); font-size:9px; }
.automatic-sync-status em { overflow:hidden; max-width:280px; color:var(--danger); font-size:9px; font-style:normal; text-overflow:ellipsis; white-space:nowrap; }
.automatic-sync-row > .action-btn { min-height:40px; white-space:nowrap; }
.automatic-sync-actions { display:flex; align-items:center; justify-content:flex-end; gap:7px; }
.automatic-sync-actions .action-btn { min-height:40px; padding-inline:11px; white-space:nowrap; }
.automatic-sync-empty { padding:24px; border:1px dashed var(--border-default); border-radius:12px; color:var(--text-secondary); font-size:12px; text-align:center; }
.automatic-sync-note { margin:0; padding:10px 12px; border-radius:10px; background:var(--info-soft); color:var(--text-secondary); font-size:11px; line-height:1.6; }
.automatic-sync-error { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 12px; border:1px solid color-mix(in srgb,var(--danger) 26%,var(--border-subtle)); border-radius:10px; background:var(--danger-soft); color:var(--danger); font-size:11px; }
.automatic-sync-history { overflow:hidden; border:1px solid var(--border-subtle); border-radius:12px; background:var(--bg-surface); }
.automatic-sync-history-summary { display:grid; grid-template-columns:36px minmax(0,1fr) auto 22px; align-items:center; gap:10px; min-height:62px; padding:9px 12px; cursor:pointer; list-style:none; transition:background 160ms ease; }
.automatic-sync-history-summary::-webkit-details-marker { display:none; }
.automatic-sync-history-summary:hover { background:var(--bg-subtle); }
.automatic-sync-history-summary:focus-visible { outline:2px solid var(--accent); outline-offset:-3px; }
.automatic-sync-history-mark { display:grid; place-items:center; width:34px; height:34px; border-radius:10px; background:var(--accent-soft); color:var(--accent-hover); font-size:18px; font-weight:800; }
.automatic-sync-history-title { display:grid; min-width:0; gap:2px; }
.automatic-sync-history-title strong { color:var(--text-primary); font-size:12px; }
.automatic-sync-history-title small { color:var(--text-secondary); font-size:9px; }
.automatic-sync-history-counts { display:flex; align-items:center; gap:6px; }
.automatic-sync-history-counts > span { padding:4px 8px; border-radius:999px; background:var(--bg-subtle); color:var(--text-secondary); font-size:9px; font-weight:800; white-space:nowrap; }
.automatic-sync-history-counts > .failed { background:var(--danger-soft); color:var(--danger); }
.automatic-sync-history-chevron { color:var(--text-secondary); font-size:17px; line-height:1; transition:rotate 160ms ease; }
.automatic-sync-history[open] .automatic-sync-history-chevron { rotate:180deg; }
.automatic-sync-history-body { display:grid; gap:10px; padding:12px; border-top:1px solid var(--border-subtle); background:var(--bg-subtle); }
.automatic-sync-history-toolbar { display:flex; align-items:center; justify-content:space-between; gap:14px; }
.automatic-sync-history-toolbar p { margin:0; color:var(--text-secondary); font-size:9px; }
.automatic-sync-history-filters { display:flex; align-items:center; gap:3px; padding:3px; border:1px solid var(--border-subtle); border-radius:9px; background:var(--bg-surface); }
.automatic-sync-history-filters button { min-height:28px; padding:0 9px; border:0; border-radius:6px; background:transparent; color:var(--text-secondary); font-size:9px; font-weight:800; cursor:pointer; }
.automatic-sync-history-filters button:hover { color:var(--text-primary); }
.automatic-sync-history-filters button.active { background:var(--accent-soft); color:var(--accent-hover); }
.automatic-sync-history-filters button:focus-visible { outline:2px solid var(--accent); outline-offset:1px; }
.automatic-sync-history-table-wrap { overflow:auto; max-height:340px; border:1px solid var(--border-subtle); border-radius:10px; background:var(--bg-surface); }
.automatic-sync-history-table { width:100%; border-collapse:collapse; table-layout:fixed; font-size:11px; }
.automatic-sync-history-table th { position:sticky; top:0; z-index:1; padding:9px 11px; background:var(--bg-surface); color:var(--text-secondary); font-size:9px; font-weight:800; text-align:start; }
.automatic-sync-history-table td { padding:10px 11px; border-top:1px solid var(--border-subtle); color:var(--text-primary); vertical-align:middle; }
.automatic-sync-history-table th:nth-child(1) { width:22%; }
.automatic-sync-history-table th:nth-child(2) { width:13%; }
.automatic-sync-history-table th:nth-child(3) { width:18%; }
.automatic-sync-history-table th:nth-child(4) { width:10%; }
.automatic-sync-history-table td:first-child, .automatic-sync-history-table td:nth-child(2) { display:grid; gap:3px; }
.automatic-sync-history-table td small { color:var(--text-secondary); font-size:9px; }
.automatic-sync-history-table td:last-child > span { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.automatic-sync-history-table .run-error-message { color:var(--danger); }
.automatic-sync-history-empty { display:grid; justify-items:center; gap:3px; padding:18px 12px; border:1px dashed var(--border-default); border-radius:10px; background:var(--bg-surface); text-align:center; }
.automatic-sync-history-empty strong { color:var(--text-primary); font-size:11px; }
.automatic-sync-history-empty span { color:var(--text-secondary); font-size:9px; }
.automatic-sync-run-status { width:max-content; padding:3px 8px; border-radius:999px; background:var(--bg-subtle); color:var(--text-secondary); font-size:9px; font-weight:850; }
.automatic-sync-run-status.success { background:var(--success-soft); color:var(--success); }
.automatic-sync-run-status.failed { background:var(--danger-soft); color:var(--danger); }
.automatic-sync-run-status.running { background:var(--info-soft); color:var(--info); }
@media (max-width:1380px) {
  .automatic-sync-row { grid-template-columns:minmax(200px,1fr) 150px repeat(2,minmax(140px,.7fr)); }
  .automatic-sync-status { grid-column:1/-2; }
}
@media (max-width:860px) {
  .automatic-sync-row { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .automatic-sync-identity, .automatic-sync-status { grid-column:1/-1; }
  .automatic-sync-row > .action-btn { width:100%; }
  .automatic-sync-actions { justify-content:stretch; }
  .automatic-sync-actions .action-btn { flex:1 1 0; }
  .automatic-sync-history-toolbar { align-items:stretch; flex-direction:column; }
  .automatic-sync-history-filters { align-self:flex-start; overflow-x:auto; max-width:100%; }
}
@media (max-width:560px) {
  .automatic-sync-row { grid-template-columns:1fr; }
  .automatic-sync-identity, .automatic-sync-status { grid-column:auto; }
  .automatic-sync-actions { flex-direction:column; }
  .automatic-sync-actions .action-btn { width:100%; }
  .automatic-sync-error { align-items:flex-start; flex-direction:column; }
  .automatic-sync-history-summary { grid-template-columns:34px minmax(0,1fr) 20px; }
  .automatic-sync-history-counts { grid-column:2; justify-self:start; }
  .automatic-sync-history-chevron { grid-column:3; grid-row:1; }
  .automatic-sync-history-body { padding:10px; }
  .automatic-sync-history-table-wrap { overflow:visible; border:0; background:transparent; }
  .automatic-sync-history-table, .automatic-sync-history-table tbody { display:grid; gap:8px; }
  .automatic-sync-history-table thead { display:none; }
  .automatic-sync-history-table tr { display:grid; gap:8px; padding:11px; border:1px solid var(--border-subtle); border-radius:11px; background:var(--bg-surface); }
  .automatic-sync-history-table td { display:grid !important; grid-template-columns:minmax(92px,.7fr) minmax(0,1.3fr); gap:8px; padding:0; border:0; }
  .automatic-sync-history-table td::before { content:attr(data-label); color:var(--text-secondary); font-size:9px; font-weight:800; }
  .automatic-sync-history-table td:first-child, .automatic-sync-history-table td:nth-child(2) { align-items:start; }
  .automatic-sync-history-table td:last-child > span { white-space:normal; }
}


.reconciliation-screen { display:grid; gap:14px; width:100%; max-width:1560px; margin:0 auto; padding:22px 24px 34px; }
.reconciliation-head { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; }
.reconciliation-head > div { display:grid; gap:3px; }
.reconciliation-head span { color:var(--text-muted); font-size:11px; font-weight:700; }
.reconciliation-head h1 { margin:0; color:var(--text-primary); font-size:24px; line-height:1.3; }
.reconciliation-head p { margin:0; color:var(--text-secondary); font-size:12px; }
.reconciliation-provider-tabs { display:flex; gap:4px; width:max-content; padding:4px; border:1px solid var(--border-subtle); border-radius:12px; background:var(--bg-surface); }
.reconciliation-provider-tabs button { display:grid; min-width:150px; gap:1px; padding:7px 13px; border:0; border-radius:8px; background:transparent; color:var(--text-secondary); text-align:start; cursor:pointer; }
.reconciliation-provider-tabs button span { font-size:12px; font-weight:800; }
.reconciliation-provider-tabs button small { font-size:9px; }
.reconciliation-provider-tabs button.active { background:var(--accent-soft); color:var(--accent-hover); }
.reconciliation-provider-tabs button:focus-visible, .reconciliation-history button:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.reconciliation-readonly-banner, .reconciliation-source-alert { display:grid; gap:3px; padding:11px 14px; border:1px solid color-mix(in srgb,var(--accent) 28%,var(--border-subtle)); border-radius:11px; background:var(--accent-soft); color:var(--text-secondary); }
.reconciliation-readonly-banner strong, .reconciliation-source-alert strong { color:var(--text-primary); font-size:11px; }
.reconciliation-readonly-banner span, .reconciliation-source-alert span { font-size:10px; line-height:1.6; }
.reconciliation-source-alert { border-color:color-mix(in srgb,var(--danger) 28%,var(--border-subtle)); background:var(--danger-soft); }
.reconciliation-source-alert small { color:var(--text-muted); font-size:9px; }
.reconciliation-state, .reconciliation-error { padding:18px; border:1px solid var(--border-subtle); border-radius:12px; background:var(--bg-surface); color:var(--text-secondary); font-size:12px; text-align:center; }
.reconciliation-error { border-color:color-mix(in srgb,var(--danger) 30%,var(--border-subtle)); background:var(--danger-soft); color:var(--danger); }
.reconciliation-status-line { display:flex; align-items:center; justify-content:space-between; gap:16px; padding-block:11px; border-block:1px solid var(--border-subtle); }
.reconciliation-status-line > div { display:flex; align-items:baseline; gap:9px; min-width:0; }
.reconciliation-status-line strong { color:var(--text-primary); font-size:14px; }
.reconciliation-status-line span:not(.reconciliation-status) { overflow:hidden; color:var(--text-secondary); font-size:10px; text-overflow:ellipsis; white-space:nowrap; }
.reconciliation-status { flex:none; padding:5px 10px; border-radius:999px; background:var(--bg-subtle); color:var(--text-secondary); font-size:10px; font-weight:800; }
.reconciliation-status.status-matched, .reconciliation-status.status-explained { background:var(--success-soft); color:var(--success); }
.reconciliation-status.status-needsreview { background:var(--danger-soft); color:var(--danger); }
.reconciliation-status.status-needsbalance { background:var(--warning-soft); color:var(--warning); }
.reconciliation-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); border:1px solid var(--border-subtle); border-radius:13px; background:var(--bg-surface); overflow:hidden; }
.reconciliation-metrics > div { display:grid; align-content:center; min-height:86px; gap:3px; padding:13px 16px; border-inline-start:1px solid var(--border-subtle); }
.reconciliation-metrics > div:first-child { border-inline-start:0; }
.reconciliation-metrics span { color:var(--text-secondary); font-size:10px; font-weight:700; }
.reconciliation-metrics strong { color:var(--text-primary); font-size:22px; font-variant-numeric:tabular-nums; }
.reconciliation-metrics small { color:var(--text-muted); font-size:9px; }
.reconciliation-metrics .metric-alert { background:var(--danger-soft); }
.reconciliation-metrics .metric-alert strong { color:var(--danger); }
.reconciliation-formula { display:flex; align-items:center; flex-wrap:wrap; gap:9px; padding:9px 12px; border:1px solid var(--border-subtle); border-radius:11px; background:var(--bg-subtle); color:var(--text-secondary); font-size:10px; }
.reconciliation-formula > strong { color:var(--text-primary); font-size:14px; }
.reconciliation-formula .formula-part { display:flex; align-items:baseline; gap:5px; }
.reconciliation-formula .formula-part b { color:var(--text-primary); font-size:12px; }
.reconciliation-formula .formula-part small { color:var(--text-muted); font-size:9px; }
.reconciliation-section { overflow:hidden; border:1px solid var(--border-subtle); border-radius:13px; background:var(--bg-surface); }
.reconciliation-section > header { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; padding:12px 15px; border-bottom:1px solid var(--border-subtle); }
.reconciliation-section > header h2 { margin:0; color:var(--text-primary); font-size:13px; }
.reconciliation-section > header p { margin:2px 0 0; color:var(--text-secondary); font-size:10px; }
.reconciliation-section > header > span { display:grid; place-items:center; min-width:27px; min-height:27px; border-radius:999px; background:var(--bg-subtle); color:var(--text-secondary); font-size:10px; font-weight:800; }
.reconciliation-table-wrap { overflow:auto; }
.reconciliation-table { width:100%; min-width:840px; border-collapse:collapse; font-size:11px; }
.reconciliation-table th { padding:9px 13px; background:var(--bg-subtle); color:var(--text-secondary); font-size:9px; font-weight:800; text-align:start; }
.reconciliation-table td { padding:11px 13px; border-top:1px solid var(--border-subtle); color:var(--text-primary); vertical-align:middle; }
.reconciliation-table td:nth-child(4), .reconciliation-table td:nth-child(5) { font-variant-numeric:tabular-nums; font-weight:700; }
.reconciliation-table .negative { color:var(--danger); }
.reconciliation-table .positive { color:var(--success); }
.reconciliation-table code, .reconciliation-history code { color:var(--text-muted); font:600 9px/1.4 ui-monospace,SFMono-Regular,Consolas,monospace; overflow-wrap:anywhere; }
.reconciliation-source-cell { display:grid; min-width:210px; gap:2px; }
.reconciliation-source-cell strong { color:var(--text-primary); font-size:10px; }
.reconciliation-source-cell small { color:var(--text-secondary); font-size:9px; line-height:1.5; }
.reconciliation-history ul { display:grid; max-height:300px; margin:0; padding:0; overflow:auto; list-style:none; }
.reconciliation-history li { display:grid; grid-template-columns:auto minmax(0,1fr) auto auto; align-items:center; gap:9px; padding:10px 13px; border-top:1px solid var(--border-subtle); }
.reconciliation-history li:first-child { border-top:0; }
.reconciliation-history li > span { padding:3px 7px; border-radius:999px; background:var(--success-soft); color:var(--success); font-size:8px; font-weight:800; }
.reconciliation-history li > span.operation-failed { background:var(--danger-soft); color:var(--danger); }
.reconciliation-history li > div { display:grid; min-width:0; gap:2px; }
.reconciliation-history li strong { color:var(--text-primary); font-size:10px; }
.reconciliation-history li small { overflow:hidden; color:var(--text-secondary); font-size:9px; text-overflow:ellipsis; white-space:nowrap; }
.reconciliation-history time { color:var(--text-muted); font-size:8px; white-space:nowrap; }
.reconciliation-history button { border:0; background:transparent; color:var(--accent-hover); font-size:9px; font-weight:800; cursor:pointer; }
.reconciliation-history .history-empty { display:block; color:var(--text-secondary); font-size:10px; text-align:center; }

.order-correction-reason { grid-column:1 / -1; padding:14px; border:1px solid color-mix(in srgb,var(--warning) 35%,var(--border-subtle)); border-radius:12px; background:var(--warning-soft); }
.order-correction-reason textarea { width:100%; min-height:82px; resize:vertical; padding:10px 12px; border:1px solid var(--border-default); border-radius:9px; background:var(--bg-surface); color:var(--text-primary); font:inherit; line-height:1.6; }
.order-correction-reason textarea:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.order-correction-reason small { color:var(--text-secondary); font-size:10px; line-height:1.5; }
@media (max-width:1080px) {
  .reconciliation-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .reconciliation-metrics > div:nth-child(3) { border-top:1px solid var(--border-subtle); border-inline-start:0; }
  .reconciliation-metrics > div:nth-child(4) { border-top:1px solid var(--border-subtle); }
}
@media (max-width:680px) {
  .reconciliation-screen { padding:16px 12px 28px; }
  .reconciliation-head { align-items:stretch; flex-direction:column; }
  .reconciliation-head .action-btn { width:100%; }
  .reconciliation-provider-tabs { width:100%; }
  .reconciliation-provider-tabs button { min-width:0; flex:1; }
  .reconciliation-status-line, .reconciliation-status-line > div { align-items:flex-start; flex-direction:column; }
  .reconciliation-metrics { grid-template-columns:1fr 1fr; }
  .reconciliation-metrics > div { min-height:78px; padding:11px; }
  .reconciliation-metrics strong { font-size:18px; }
  .reconciliation-history li { grid-template-columns:auto minmax(0,1fr); }
  .reconciliation-history time, .reconciliation-history button { grid-column:2; justify-self:start; }
}

.settings-screen {
  --settings-panel-radius: 16px;
  background: color-mix(in srgb, var(--canvas) 96%, var(--primary) 4%);
}

.settings-screen .screen-heading {
  align-items: center;
  gap: 20px;
  min-height: 94px;
  margin-bottom: 12px;
  padding: 16px 18px;
  border: 1px solid color-mix(in srgb, var(--primary) 15%, var(--line));
  border-inline-start: 4px solid var(--primary);
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 94%, var(--primary) 6%);
  box-shadow: 0 12px 30px color-mix(in srgb, var(--primary) 7%, transparent);
}

.settings-screen .screen-heading > div:first-child {
  display: grid;
  gap: 3px;
  max-width: 680px;
}

.settings-screen .screen-heading h2 {
  margin: 0;
  font-size: clamp(28px, 2.4vw, 36px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.settings-screen .screen-heading p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.settings-screen .settings-user-chip {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 250px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: none;
  text-align: start;
}

.settings-user-chip > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.settings-user-chip strong,
.settings-user-chip > div > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-user-avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--primary);
  color: white;
  font-size: 16px;
  font-weight: 850;
}

.settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

.settings-section-nav {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
  margin-bottom: 12px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--canvas) 55%, var(--surface));
  box-shadow: none;
}

.settings-section-nav button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 54px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  text-align: center;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease, color 140ms ease;
}

.settings-section-nav button:hover {
  border-color: var(--line);
  background: color-mix(in srgb, var(--primary) 4%, var(--surface));
}

.settings-section-nav button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--primary) 30%, transparent);
  outline-offset: 2px;
}

.settings-section-nav button.active {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--accent-contrast);
  box-shadow: 0 6px 14px color-mix(in srgb, var(--primary) 22%, transparent);
}

.settings-section-nav button > span {
  min-width: 0;
}

.settings-section-nav button strong {
  font-size: 13px;
  line-height: 1.3;
}

.settings-section-nav button small {
  display: none;
}

.settings-section-nav button b {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--canvas) 82%, var(--line));
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
}

.settings-section-nav button.active b {
  background: color-mix(in srgb, var(--accent-contrast) 18%, transparent);
  color: var(--accent-contrast);
}

.settings-section-workspace {
  min-width: 0;
}

.settings-section-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  min-height: 58px;
  margin-bottom: 12px;
  padding: 4px 4px 11px;
  border-bottom: 1px solid var(--line);
}

.settings-section-intro > div {
  display: grid;
  gap: 2px;
}

.settings-section-intro span {
  color: var(--primary);
  font-size: 10px;
  font-weight: 800;
}

.settings-section-intro h2 {
  margin: 0;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.25;
}

.settings-section-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  text-align: end;
}

.settings-screen .settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.settings-screen .settings-section-account {
  grid-template-columns: minmax(360px, 0.82fr) minmax(560px, 1.18fr);
}

.settings-screen .settings-panel-card {
  min-height: 0;
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--primary) 11%, var(--line));
  border-radius: var(--settings-panel-radius);
  background: var(--surface);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--primary) 5%, transparent);
}

.settings-screen .settings-panel-card.settings-password-card,
.settings-screen .settings-panel-card.settings-session-card,
.settings-screen .order-policy-card,
.settings-screen .invoice-branding-card,
.settings-screen .automatic-sync-card,
.settings-screen .integration-credentials-card {
  grid-column: 1 / -1;
}

.settings-screen .settings-session-card {
  order: initial;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.settings-screen .password-settings-form {
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  align-items: end;
}

.settings-screen .password-settings-form label:first-child,
.settings-screen .password-settings-form .action-btn,
.settings-screen .password-settings-form button {
  grid-column: auto;
}

.settings-screen .password-settings-form .action-btn {
  min-width: 150px;
  white-space: nowrap;
}

.settings-screen .settings-language-options button,
.settings-screen .theme-option {
  min-height: 58px;
}

.settings-screen .integration-connection-summary {
  background: color-mix(in srgb, var(--canvas) 54%, var(--surface));
}

@media (max-width: 1180px) {
  .settings-section-nav {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
  }

  .settings-section-nav button {
    flex: 0 0 200px;
    scroll-snap-align: start;
  }

  .settings-screen .settings-section-account {
    grid-template-columns: 1fr;
  }

  .settings-screen .password-settings-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-screen .password-settings-form .action-btn {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

@media (max-width: 760px) {
  .settings-screen .screen-heading,
  .settings-section-intro {
    align-items: stretch;
    flex-direction: column;
  }

  .settings-screen .settings-user-chip {
    width: 100%;
    min-width: 0;
  }

  .settings-section-nav {
    margin-inline: -2px;
  }

  .settings-section-nav button {
    flex-basis: min(72vw, 200px);
  }

  .settings-section-intro p {
    text-align: start;
  }

  .settings-screen .settings-grid,
  .settings-screen .password-settings-form,
  .settings-screen .settings-policy-grid,
  .settings-screen .integration-connection-list {
    grid-template-columns: 1fr;
  }

  .settings-screen .settings-language-card,
  .settings-screen .settings-theme-card,
  .settings-screen .settings-password-card,
  .settings-screen .settings-session-card {
    grid-column: 1;
  }

  .settings-screen .settings-session-card,
  .settings-screen .integration-connection-summary {
    align-items: stretch;
    flex-direction: column;
  }

  .settings-screen .settings-session-card .action-btn,
  .settings-screen .integration-connection-actions,
  .settings-screen .integration-connection-actions .action-btn,
  .settings-screen .password-settings-form .action-btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .settings-section-nav button {
    transition: none;
  }
}


.dashboard-home {
  --dashboard-radius: 16px;
  gap: 14px;
  background: color-mix(in srgb, var(--canvas) 96%, var(--primary) 4%);
}

.dashboard-home .dashboard-heading {
  min-height: 108px;
  margin-bottom: 0;
  padding: 16px 18px;
  border: 1px solid color-mix(in srgb, var(--primary) 15%, var(--line));
  border-inline-start: 4px solid var(--primary);
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 94%, var(--primary) 6%);
  box-shadow: 0 12px 30px color-mix(in srgb, var(--primary) 7%, transparent);
}

.dashboard-home .dashboard-heading h2 {
  margin-top: 2px;
  font-size: clamp(29px, 2.4vw, 37px);
}

.dashboard-home .dashboard-heading p {
  max-width: 760px;
  margin-top: 5px;
  color: var(--text-secondary);
}

.dashboard-home .dashboard-controls {
  margin: 0;
  padding: 12px 14px;
  border-color: color-mix(in srgb, var(--primary) 9%, var(--line));
  border-radius: var(--dashboard-radius);
  box-shadow: none;
}

.dashboard-section-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--canvas) 55%, var(--surface));
}

.dashboard-section-nav button {
  display: grid;
  gap: 3px;
  min-height: 58px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--text-primary);
  text-align: start;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease, color 140ms ease;
}

.dashboard-section-nav button:hover {
  border-color: var(--line);
  background: color-mix(in srgb, var(--primary) 4%, var(--surface));
}

.dashboard-section-nav button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--primary) 28%, transparent);
  outline-offset: 2px;
}

.dashboard-section-nav button strong {
  font-size: 13px;
  line-height: 1.35;
}

.dashboard-section-nav button span {
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 10px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-section-nav button.active {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
  box-shadow: 0 6px 14px color-mix(in srgb, var(--primary) 20%, transparent);
}

.dashboard-section-nav button.active span {
  color: color-mix(in srgb, white 82%, transparent);
}

.dashboard-section-panel {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.dashboard-home .dashboard-metrics {
  gap: 9px;
}

.dashboard-home .dashboard-metric-primary {
  min-height: 108px;
  padding: 15px 17px;
}

.dashboard-home .dashboard-metric-primary > strong {
  margin-top: 9px;
  font-size: clamp(26px, 2vw, 33px);
}

.dashboard-home .dashboard-metric-secondary {
  min-height: 78px;
  padding: 12px 14px;
}

.dashboard-home .dashboard-metric-secondary > strong {
  margin-top: 6px;
  font-size: clamp(20px, 1.55vw, 25px);
}

.dashboard-home .dashboard-view-grid {
  gap: 12px;
}

.dashboard-home .dashboard-view-overview {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-home .dashboard-view-overview .dashboard-wide {
  grid-column: 1 / -1;
}

.dashboard-home .dashboard-view-overview .dashboard-donut-panel,
.dashboard-home .dashboard-view-overview .dashboard-donut-panel:last-child {
  grid-column: auto;
  min-height: 270px;
}

.dashboard-home .dashboard-view-overview .dashboard-donut-panel .donut-layout {
  min-height: 220px;
  grid-template-columns: minmax(120px, .85fr) minmax(130px, 1.15fr);
  gap: 12px;
}

.dashboard-home .dashboard-view-overview .dashboard-donut {
  width: min(100%, 175px);
}

.dashboard-home .dashboard-hero-chart {
  min-height: 390px;
}

.dashboard-home .dashboard-view-monthly {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-home .dashboard-view-items {
  grid-template-columns: minmax(0, 1fr);
}

.dashboard-home .dashboard-view-items .dashboard-wide {
  grid-column: auto;
}

.dashboard-home .dashboard-panel {
  padding: 16px 18px;
  border-color: color-mix(in srgb, var(--primary) 8%, var(--line));
  box-shadow: 0 8px 22px color-mix(in srgb, var(--primary) 4%, transparent);
}

.dashboard-home .dashboard-panel-heading h3 {
  font-size: 17px;
}

@media (max-width: 1180px) {
  .dashboard-home .dashboard-view-overview,
  .dashboard-home .dashboard-view-monthly {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-home .dashboard-view-overview .dashboard-donut-panel:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .dashboard-home .dashboard-heading {
    padding: 14px;
  }

  .dashboard-section-nav {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
  }

  .dashboard-section-nav button {
    flex: 0 0 min(74vw, 230px);
    scroll-snap-align: start;
  }

  .dashboard-home .dashboard-view-overview,
  .dashboard-home .dashboard-view-monthly {
    grid-template-columns: 1fr;
  }

  .dashboard-home .dashboard-view-overview .dashboard-donut-panel,
  .dashboard-home .dashboard-view-overview .dashboard-donut-panel:last-child {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-section-nav button {
    transition: none;
  }
}


.settings-screen .settings-theme-card {
  grid-column: 1 / -1;
}

.settings-screen .theme-options {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.settings-screen .theme-option {
  grid-template-columns: 72px minmax(0, 1fr);
  height: auto;
  min-height: 78px;
  padding: 10px;
  border-color: var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-primary);
}

.settings-screen .theme-option:hover:not(:disabled) {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--bg-surface) 92%, var(--accent) 8%);
  transform: translateY(-1px);
}

.settings-screen .theme-option.active {
  border: 2px solid var(--accent);
  background: color-mix(in srgb, var(--bg-surface) 88%, var(--accent) 12%);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.settings-screen .theme-option:disabled {
  cursor: wait;
  opacity: .72;
}

.settings-screen .theme-option-preview {
  width: 72px;
  height: 50px;
  box-sizing: border-box;
  border-color: var(--border-subtle);
}

.theme-option-copy {
  min-width: 0;
}

.theme-option-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.theme-option-title em {
  padding: 2px 6px;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
}


@media (max-width: 1180px) {
  .settings-screen .theme-options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .settings-screen .theme-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 460px) {
  .settings-screen .theme-options {
    grid-template-columns: 1fr;
  }
}

:is(html[data-theme="midnight"], html[data-theme="graphite"]) .app-shell {
  background: var(--bg-page);
  color: var(--text-primary);
}

:is(html[data-theme="midnight"], html[data-theme="graphite"]) .app-shell :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
  border-color: var(--border-subtle);
  background-color: var(--bg-surface);
  color: var(--text-primary);
}

:is(html[data-theme="midnight"], html[data-theme="graphite"]) .app-shell :is(
  .content,
  .records-panel,
  .editor-panel,
  .banner,
  .settings-screen,
  .settings-user-chip,
  .settings-panel-card,
  .settings-policy-subsection,
  .integration-connection-summary,
  .invoice-logo-preview,
  .local-collection-summary,
  .local-workflow-toolbar,
  .collection-table,
  .table-wrap,
  .records-table,
  .statement-error,
  .statement-empty,
  .statement-summary > div,
  .statement-table-card,
  .credential-modal,
  .credential-confirm,
  .column-filter-popover,
  .reference-search,
  .reference-result,
  .create-user-card,
  .home-total-card,
  .home-group-card,
  .home-priority-grid button
) {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

:is(html[data-theme="midnight"], html[data-theme="graphite"]) .app-shell :is(
  .returns-table-head,
  .records-table thead th,
  .collection-table-head,
  .statement-table thead th
) {
  background-color: var(--bg-subtle);
  color: var(--text-secondary);
}

:is(html[data-theme="midnight"], html[data-theme="graphite"]) .app-shell :is(
  .records-table tbody tr,
  .collection-table-row,
  .returns-table-row
) {
  background-color: var(--bg-surface);
  color: var(--text-primary);
}

:is(html[data-theme="midnight"], html[data-theme="graphite"]) .app-shell :is(
  .records-table tbody tr:hover,
  .collection-table-row:hover,
  .returns-table-row:hover
) {
  background-color: color-mix(in srgb, var(--bg-surface) 88%, var(--accent) 12%);
}

:is(html[data-theme="midnight"], html[data-theme="graphite"]) .app-shell .updated-chip {
  border-color: var(--border-subtle);
  background: var(--bg-subtle);
  color: var(--text-primary);
}

:is(html[data-theme="midnight"], html[data-theme="graphite"]) .app-shell .updated-chip strong {
  color: var(--text-primary);
}

:is(html[data-theme="midnight"], html[data-theme="graphite"]) .app-shell :is(
  .settings-language-options button,
  .theme-option,
  .statement-open,
  .credential-modal-close,
  .sort-direction-btn,
  .bulk-clear-selection,
  .records-pagination button
) {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

:is(html[data-theme="midnight"], html[data-theme="graphite"]) .app-shell .settings-language-options button.active,
:is(html[data-theme="midnight"], html[data-theme="graphite"]) .app-shell .settings-screen .theme-option.active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--bg-surface) 82%, var(--accent) 18%);
  color: var(--text-primary);
}

:is(html[data-theme="midnight"], html[data-theme="graphite"]) .app-shell .records-table tbody tr.last-reviewed:not(.selected) {
  background: color-mix(in srgb, var(--bg-surface) 92%, var(--accent) 8%);
}

:is(html[data-theme="midnight"], html[data-theme="graphite"]) .app-shell .provider-action-group,
:is(html[data-theme="midnight"], html[data-theme="graphite"]) .app-shell .editor-provider-actions {
  background: color-mix(in srgb, var(--bg-surface) 92%, var(--accent) 8%);
}

:is(html[data-theme="midnight"], html[data-theme="graphite"]) .app-shell .provider-action-group-noon,
:is(html[data-theme="midnight"], html[data-theme="graphite"]) .app-shell .editor-provider-actions-noon {
  background: color-mix(in srgb, var(--bg-surface) 88%, rgb(var(--platform-noon-rgb)) 12%);
}

:is(html[data-theme="midnight"], html[data-theme="graphite"]) .app-shell .editor-provider-actions-jumia {
  background: color-mix(in srgb, var(--bg-surface) 88%, #ef6d2d 12%);
}

:is(html[data-theme="midnight"], html[data-theme="graphite"]) .app-shell .editor-actions {
  background-color: var(--bg-surface);
}

@media (prefers-reduced-motion: reduce) {
  .settings-screen .theme-option {
    transition: none;
  }
}


.workspace {
  grid-template-columns: 284px minmax(0, 1fr);
  gap: 14px;
}

.workspace:has(.sidebar.is-collapsed) {
  grid-template-columns: 76px minmax(0, 1fr);
}

.sidebar {
  inline-size: 284px;
  block-size: calc(100dvh - 20px);
  padding: 12px 11px 10px;
  border: 1px solid var(--sidebar-border);
  border-radius: 20px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--sidebar-bg) 96%, white 4%), var(--sidebar-bg)) !important;
  box-shadow: 0 14px 34px rgb(8 28 32 / .11);
  isolation: isolate;
}

.sidebar .brand {
  grid-template-columns: 50px minmax(0, 1fr);
  min-block-size: 64px;
  gap: 11px;
  padding: 5px 7px 10px;
}

.sidebar .brand-logo {
  inline-size: 50px;
  block-size: 50px;
  border-radius: 14px;
  box-shadow: 0 5px 16px rgb(0 0 0 / .16);
}

.sidebar .brand-kicker {
  color: var(--sidebar-muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .11em;
}

.sidebar .brand h1 {
  overflow: hidden;
  margin-block-start: 3px;
  color: var(--sidebar-text);
  font-size: 19px;
  line-height: 1.18;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-navigation-scroll {
  gap: 0;
  padding-inline: 2px;
  padding-block-end: 8px;
  overscroll-behavior: contain;
  scroll-padding-block: 12px;
}

.sidebar .sidebar-primary-nav {
  gap: 6px;
  margin-block-start: 8px;
  padding-block-end: 9px;
  border-block-end: 1px solid var(--sidebar-border);
}

.sidebar .sidebar-nav-heading {
  min-block-size: 30px;
  padding-inline: 8px 4px;
  color: var(--sidebar-muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .075em;
}

.sidebar .sidebar-action {
  inline-size: 30px;
  min-inline-size: 30px;
  block-size: 30px;
  min-block-size: 30px;
  border-color: var(--sidebar-border);
  background: var(--sidebar-hover);
}

.sidebar .sidebar-action-icon {
  inline-size: 15px;
  block-size: 15px;
  transform: rotate(90deg);
}

.sidebar[data-lang="en"] .sidebar-action-icon {
  transform: rotate(-90deg);
}

.sidebar .sidebar-primary-items,
.sidebar .group-items {
  gap: 3px;
}

.sidebar-search {
  position: relative;
  display: flex;
  align-items: center;
  min-block-size: 40px;
  margin: 10px 3px 4px;
  border: 1px solid var(--sidebar-border);
  border-radius: 11px;
  background: rgb(255 255 255 / .055);
  color: var(--sidebar-muted);
  transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.sidebar-search:focus-within {
  border-color: color-mix(in srgb, var(--sidebar-active) 76%, white 24%);
  background: rgb(255 255 255 / .085);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--sidebar-active) 28%, transparent);
}

.sidebar-search-icon {
  flex: 0 0 auto;
  inline-size: 16px;
  block-size: 16px;
  margin-inline-start: 11px;
}

.sidebar-search input {
  min-inline-size: 0;
  inline-size: 100%;
  block-size: 38px;
  padding: 0 9px;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--sidebar-text) !important;
  font: inherit;
  font-size: 12px;
}

.sidebar-search input::placeholder {
  color: var(--sidebar-muted);
  opacity: .82;
}

.sidebar-search input::-webkit-search-cancel-button {
  display: none;
}

.sidebar-search button {
  display: grid;
  flex: 0 0 auto;
  inline-size: 27px;
  block-size: 27px;
  margin-inline-end: 5px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--sidebar-muted);
  font: inherit;
  font-size: 18px;
}

.sidebar-search button:hover,
.sidebar-search button:focus-visible {
  background: var(--sidebar-hover);
  color: var(--sidebar-text);
}

.sidebar .group-list {
  gap: 4px;
  margin-block-start: 5px;
}

.sidebar .group-section {
  gap: 2px;
  padding: 0;
}

.sidebar .group-toggle {
  position: relative;
  min-block-size: 42px;
  padding-inline: 10px 8px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: var(--sidebar-muted);
}

.sidebar .group-section.has-active > .group-toggle {
  border-color: color-mix(in srgb, var(--sidebar-active) 42%, transparent);
  background: color-mix(in srgb, var(--sidebar-active) 17%, transparent);
  color: var(--sidebar-text);
}

.sidebar .group-toggle:disabled,
.mobile-navigation-group-toggle:disabled {
  cursor: default;
  opacity: 1;
}

.sidebar .group-heading-main {
  min-inline-size: 0;
  gap: 10px;
}

.sidebar .group-heading-icon {
  inline-size: 18px;
  block-size: 18px;
  color: currentColor;
}

.sidebar .group-toggle .group-title {
  overflow: hidden;
  color: inherit;
  font-size: 12.5px;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-toggle-meta {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
}

.sidebar-group-count {
  display: grid;
  min-inline-size: 23px;
  block-size: 20px;
  padding-inline: 5px;
  place-items: center;
  border: 1px solid var(--sidebar-border);
  border-radius: 999px;
  background: rgb(255 255 255 / .045);
  color: var(--sidebar-muted);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.sidebar .group-chevron {
  inline-size: 14px;
  block-size: 14px;
}

.sidebar .group-items {
  margin: 3px 13px 7px 0;
  padding-inline: 10px 0;
  border-inline-start: 1px solid var(--sidebar-border);
}

.sidebar[data-lang="en"] .group-items {
  margin: 3px 0 7px 13px;
  padding-inline: 10px 0;
}

.sidebar .table-item {
  position: relative;
  min-block-size: 40px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--sidebar-muted);
}

.sidebar .table-item-main {
  min-inline-size: 0;
  gap: 9px;
  font-size: 12.5px;
  font-weight: 640;
}

.sidebar .table-item-main > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar .table-item.active {
  border-color: color-mix(in srgb, var(--sidebar-active) 64%, white 12%);
  background: color-mix(in srgb, var(--sidebar-active) 88%, transparent);
  box-shadow: 0 7px 18px rgb(0 0 0 / .12);
}

.sidebar .table-item.active::before,
.sidebar .sidebar-submenu-item.active::before {
  content: "";
  position: absolute;
  inset-block: 9px;
  inset-inline-start: 4px;
  inline-size: 3px;
  border-radius: 999px;
  background: currentColor;
  opacity: .9;
}

.sidebar .nav-icon {
  inline-size: 17px;
  block-size: 17px;
}

.sidebar .sidebar-inline-section {
  margin-block-start: 9px;
  padding-inline: 9px;
  color: var(--sidebar-muted);
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: .045em;
  opacity: .72;
}

.sidebar .sidebar-submenu {
  padding-inline-start: 14px;
}

.sidebar .sidebar-submenu-item {
  position: relative;
  min-block-size: 36px;
  border-radius: 9px;
  color: var(--sidebar-muted);
  font-size: 11.5px;
  font-weight: 650;
}

.sidebar-search-empty {
  margin: 9px 4px;
  padding: 18px 12px;
  border: 1px dashed var(--sidebar-border);
  border-radius: 11px;
  color: var(--sidebar-muted);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.sidebar .sidebar-utility-nav {
  gap: 3px;
  margin-block-start: 7px;
  padding: 8px 2px 0;
}

.sidebar .utility-heading {
  min-block-size: 22px;
}

.sidebar .current-user-card {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-block-size: 54px;
  margin-block-start: 5px;
  padding: 8px;
  border-color: var(--sidebar-border);
  border-radius: 11px;
  background: rgb(255 255 255 / .04);
}

.current-user-avatar {
  display: grid;
  inline-size: 36px;
  block-size: 36px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--sidebar-active) 64%, white 10%);
  border-radius: 10px;
  background: color-mix(in srgb, var(--sidebar-active) 46%, transparent);
  color: var(--sidebar-text);
  font-size: 13px;
  font-weight: 850;
}

.current-user-copy {
  display: grid;
  min-inline-size: 0;
  gap: 1px;
}

.sidebar .current-user-label {
  color: var(--sidebar-muted);
  font-size: 8.5px;
  font-weight: 750;
}

.sidebar .current-user-email,
.sidebar .current-user-detail {
  display: block;
  overflow: hidden;
  color: var(--sidebar-text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar .current-user-email {
  font-size: 11.5px;
}

.sidebar .current-user-detail {
  color: var(--sidebar-muted);
  font-size: 8.5px;
}

.sidebar.is-collapsed {
  inline-size: 76px;
  padding-inline: 9px;
}

.sidebar.is-collapsed .brand {
  min-block-size: 58px;
  padding-inline: 0;
}

.sidebar.is-collapsed .brand-logo {
  inline-size: 44px;
  block-size: 44px;
  border-radius: 12px;
}

.sidebar.is-collapsed .sidebar-search,
.sidebar.is-collapsed .sidebar-group-count,
.sidebar.is-collapsed .group-toggle-meta,
.sidebar.is-collapsed .current-user-card {
  display: none;
}

.sidebar.is-collapsed .sidebar-primary-nav {
  padding-block-end: 7px;
}

.sidebar.is-collapsed .sidebar-primary-items,
.sidebar.is-collapsed .group-list,
.sidebar.is-collapsed .sidebar-utility-nav {
  gap: 5px;
}

.sidebar.is-collapsed .group-toggle,
.sidebar.is-collapsed .table-item {
  min-block-size: 42px;
  padding: 0;
  border-radius: 11px;
}

.sidebar.is-collapsed .table-item.active::before {
  inset-block: 10px;
  inset-inline-start: 3px;
}

@media (max-width: 1120px) and (min-width: 721px) {
  .workspace { grid-template-columns: 76px minmax(0, 1fr); }
  .sidebar { inline-size: 76px; padding-inline: 9px; }
  .sidebar .brand { min-block-size: 58px; padding-inline: 0; }
  .sidebar .brand-logo { inline-size: 44px; block-size: 44px; border-radius: 12px; }
  .sidebar .sidebar-search,
  .sidebar .sidebar-group-count,
  .sidebar .group-toggle-meta { display: none; }
  .sidebar .sidebar-primary-nav { padding-block-end: 7px; }
  .sidebar .sidebar-primary-items,
  .sidebar .group-list,
  .sidebar .sidebar-utility-nav { display: grid; grid-template-columns: 1fr; gap: 5px; }
  .sidebar .group-toggle,
  .sidebar .table-item { min-block-size: 42px; padding: 0; border-radius: 11px; }
}

@media (max-width: 720px) {
  .mobile-navigation {
    min-block-size: 64px;
    padding: 5px;
    border-color: var(--border-default);
    background: color-mix(in srgb, var(--bg-surface) 94%, transparent);
    box-shadow: 0 16px 40px rgb(8 28 32 / .22);
  }

  .mobile-nav-item {
    min-block-size: 52px;
    border: 1px solid transparent;
    font-size: 10px;
  }

  .mobile-nav-item.active {
    border-color: color-mix(in srgb, var(--accent) 60%, var(--border-default));
    background: var(--accent);
    color: var(--text-on-accent);
  }

  .mobile-navigation-sheet {
    grid-template-rows: auto auto minmax(0, 1fr);
    inline-size: min(100%, 640px);
    block-size: min(82dvh, 760px);
    margin-inline: auto;
    border-color: var(--border-default);
    background: var(--bg-surface);
  }

  .mobile-navigation-sheet-header {
    padding: 15px 16px 11px;
  }

  .mobile-navigation-sheet-header span {
    color: var(--accent-strong);
  }

  .mobile-navigation-sheet-header h2 {
    color: var(--text-primary);
    font-size: 19px;
  }

  .mobile-navigation-close {
    inline-size: 40px;
    block-size: 40px;
    border-color: var(--border-default);
    background: var(--bg-surface);
    color: var(--text-primary);
  }

  .mobile-navigation-search {
    display: flex;
    align-items: center;
    min-block-size: 44px;
    margin: 10px 16px 4px;
    border: 1px solid var(--border-default);
    border-radius: 12px;
    background: var(--bg-surface);
    color: var(--text-muted);
  }

  .mobile-navigation-search:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--focus-ring);
  }

  .mobile-navigation-search-icon {
    flex: 0 0 auto;
    inline-size: 17px;
    block-size: 17px;
    margin-inline-start: 12px;
  }

  .mobile-navigation-search input {
    min-inline-size: 0;
    inline-size: 100%;
    block-size: 42px;
    padding-inline: 9px;
    border: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--text-primary) !important;
    font: inherit;
    font-size: 13px;
  }

  .mobile-navigation-search button {
    display: grid;
    flex: 0 0 auto;
    inline-size: 30px;
    block-size: 30px;
    margin-inline-end: 6px;
    place-items: center;
    border: 0;
    border-radius: 8px;
    background: var(--bg-subtle);
    color: var(--text-secondary);
    font: inherit;
    font-size: 18px;
  }

  .mobile-navigation-sheet-scroll {
    gap: 12px;
    padding: 10px 16px calc(28px + env(safe-area-inset-bottom));
  }

  .mobile-navigation-section {
    gap: 6px;
  }

  .mobile-navigation-section > h3 {
    padding-inline: 4px;
    color: var(--text-muted);
    font-size: 10px;
    letter-spacing: .055em;
  }

  .mobile-navigation-group-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    inline-size: 100%;
    min-block-size: 46px;
    padding: 9px 11px;
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    background: var(--bg-surface);
    color: var(--text-primary);
    font: inherit;
  }

  .mobile-navigation-group-toggle > span {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-inline-size: 0;
    font-size: 13px;
    font-weight: 760;
  }

  .mobile-navigation-group-toggle small {
    display: grid;
    min-inline-size: 24px;
    block-size: 21px;
    padding-inline: 5px;
    place-items: center;
    border-radius: 999px;
    background: var(--bg-subtle);
    color: var(--text-muted);
    font-size: 9px;
  }

  .mobile-group-icon {
    inline-size: 17px;
    block-size: 17px;
    color: var(--accent-strong);
  }

  .mobile-navigation-group-chevron {
    inline-size: 15px;
    block-size: 15px;
    color: var(--text-muted);
    transition: transform 160ms ease;
  }

  [dir="rtl"] .mobile-navigation-section.open .mobile-navigation-group-chevron {
    transform: rotate(180deg);
  }

  [dir="ltr"] .mobile-navigation-section.open .mobile-navigation-group-chevron {
    transform: rotate(180deg);
  }

  .mobile-navigation-list {
    gap: 5px;
    padding-block-start: 1px;
  }

  .mobile-navigation-screen {
    position: relative;
    min-block-size: 44px;
    border-color: var(--border-subtle);
    border-radius: 11px;
    background: var(--bg-surface);
    color: var(--text-primary);
    font-size: 12.5px;
  }

  .mobile-navigation-screen.active {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--bg-surface) 82%, var(--accent) 18%);
    color: var(--accent-strong);
  }

  .mobile-navigation-screen.active::before {
    content: "";
    position: absolute;
    inset-block: 10px;
    inset-inline-start: 4px;
    inline-size: 3px;
    border-radius: 999px;
    background: currentColor;
  }

  .mobile-navigation-screen.nested {
    min-block-size: 40px;
    background: var(--bg-subtle);
  }

  .mobile-navigation-empty {
    padding: 28px 14px;
    border: 1px dashed var(--border-default);
    border-radius: 13px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar-search,
  .mobile-navigation-group-chevron {
    transition: none;
  }
}

.review-center-panel {
  display: grid;
  gap: 14px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.review-center-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 0.42fr);
  gap: 18px;
  padding: 20px;
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  background:
    radial-gradient(circle at 8% 0%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 34%),
    var(--bg-surface);
  box-shadow: var(--shadow-soft);
}

.review-center-intro {
  align-content: start;
  display: grid;
  gap: 6px;
  min-width: 0;
}

.review-center-eyebrow {
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.review-center-intro h3 {
  margin: 0;
  color: var(--text-primary);
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.2;
}

.review-center-intro p {
  max-width: 740px;
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.75;
}

.review-center-panel .review-website-inbox-link {
  align-self: start;
  min-height: 68px;
  margin: 0;
  border-color: color-mix(in srgb, var(--accent) 26%, var(--border-subtle));
  background: color-mix(in srgb, var(--accent) 7%, var(--bg-surface));
}

.review-center-panel .review-website-inbox-link:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 11%, var(--bg-surface));
}

.review-center-panel .review-website-inbox-icon {
  background: var(--bg-surface);
  color: var(--accent-strong);
}

.review-shortcut-action {
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.review-center-metrics {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  border-radius: 15px;
  background: color-mix(in srgb, var(--bg-subtle) 76%, transparent);
}

.review-metric {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 13px 16px;
  border-inline-end: 1px solid var(--border-subtle);
}

.review-metric:last-child { border-inline-end: 0; }
.review-metric.primary { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.review-metric span { color: var(--text-secondary); font-size: 11px; font-weight: 700; }
.review-metric strong { color: var(--text-primary); font-size: 24px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.review-metric.primary strong { color: var(--accent-strong); }
.review-metric small { color: var(--text-muted); font-size: 10px; }

.review-center-panel > .panel-head {
  display: grid;
  grid-template-columns: minmax(180px, auto) minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  background: var(--bg-surface);
  box-shadow: var(--shadow-soft);
}

.review-list-heading { display: grid; gap: 3px; }
.review-list-heading strong { color: var(--text-primary); font-size: 15px; }
.review-list-heading span { color: var(--text-muted); font-size: 11px; }

.review-center-panel .record-filters,
.review-center-panel:has(.orders-records-table) .record-filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  align-items: center;
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: none;
  padding: 0;
  overflow: visible;
  background: transparent;
}

.review-center-panel .orders-filter-cluster { display: block; min-width: 0; }
.review-center-panel .marketplace-provider-filter { display: flex; flex-wrap: wrap; gap: 6px; }
.review-center-panel .marketplace-provider-filter button { min-height: 36px; }
.review-center-panel .record-filters .search-group { width: 100%; margin: 0; }
.review-center-panel .record-filters .search-group input { min-height: 40px; width: 100%; }

.review-reason-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  padding: 2px 4px;
}

.review-reason-filters > span {
  margin-inline-end: 2px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 800;
}

.review-reason-filters button {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--border-default);
  border-radius: 999px;
  background: var(--bg-surface);
  color: var(--text-secondary);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.review-reason-filters button:hover,
.review-reason-filters button.active {
  border-color: color-mix(in srgb, var(--accent) 52%, var(--border-default));
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.review-reason-filters button:focus-visible,
.review-center-panel .review-website-inbox-link:focus-visible,
.review-empty-state button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.review-center-panel .active-filter-chips { margin: -3px 4px 0; }
.review-center-panel .order-bulk-toolbar { margin: 0; }

.review-center-panel .table-wrap,
.review-center-panel:has(.orders-records-table) .table-wrap {
  border-color: var(--border-subtle);
  background: var(--bg-surface);
  box-shadow: var(--shadow-soft);
}

.review-center-panel:has(.orders-records-table) .records-table,
.review-center-panel:has(.orders-records-table) .records-table tbody tr {
  background: var(--bg-surface);
}

.review-center-panel:has(.orders-records-table) .records-table thead th {
  background: var(--bg-subtle);
}

.review-center-panel:has(.orders-records-table) .records-table tbody td {
  border-bottom-color: var(--border-subtle);
}

.review-center-panel .review-group-row td {
  height: auto;
  padding: 9px 14px;
  border-top: 8px solid var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
}

.review-center-panel .review-group-label.returns {
  border-color: color-mix(in srgb, var(--warning, #d08a25) 32%, var(--border-subtle));
  background: color-mix(in srgb, var(--warning, #d08a25) 10%, var(--bg-surface));
  color: var(--warning-strong, #9a5b0a);
}

.review-center-panel .review-group-label.other {
  border-color: color-mix(in srgb, var(--accent) 26%, var(--border-subtle));
  background: color-mix(in srgb, var(--accent) 8%, var(--bg-surface));
  color: var(--accent-strong);
}

.review-empty-state {
  display: grid;
  justify-items: center;
  gap: 6px;
  max-width: 430px;
  margin: 0 auto;
  padding: 38px 18px;
}

.review-empty-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  margin-bottom: 4px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.review-empty-icon svg { width: 21px; height: 21px; }
.review-empty-state strong { color: var(--text-primary); font-size: 15px; }
.review-empty-state p { margin: 0; color: var(--text-secondary); font-size: 12px; line-height: 1.6; }
.review-empty-state button { min-height: 36px; margin-top: 6px; padding: 0 14px; border: 1px solid var(--border-default); border-radius: 10px; background: var(--bg-surface); color: var(--text-primary); font: inherit; font-size: 12px; font-weight: 750; cursor: pointer; }

.review-center-panel .records-footer {
  margin: 0;
  padding: 4px 6px 10px;
}

@media (max-width: 1100px) {
  .review-center-overview { grid-template-columns: 1fr; }
  .review-center-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .review-metric:nth-child(2) { border-inline-end: 0; }
  .review-metric:nth-child(-n + 2) { border-bottom: 1px solid var(--border-subtle); }
  .review-center-panel > .panel-head { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .app-shell .sidebar { display: none; }
  .app-shell .workspace { grid-template-columns: minmax(0, 1fr); }
  .app-shell { padding-bottom: 86px; }
  .app-shell .mobile-navigation { display: grid; }
  .review-center-panel { gap: 10px; }
  .review-center-overview { gap: 14px; padding: 16px; border-radius: 16px; }
  .review-center-intro h3 { font-size: 21px; }
  .review-center-panel .review-website-inbox-link { grid-template-columns: auto minmax(0, 1fr); }
  .review-shortcut-action { grid-column: 2; }
  .review-center-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .review-metric { padding: 12px; }
  .review-metric strong { font-size: 21px; }
  .review-center-panel > .panel-head { gap: 12px; padding: 13px; }
  .review-center-panel .record-filters,
  .review-center-panel:has(.orders-records-table) .record-filters { grid-template-columns: 1fr; gap: 10px; }
  .review-center-panel .marketplace-provider-filter { flex-wrap: nowrap; padding-bottom: 3px; overflow-x: auto; scrollbar-width: thin; }
  .review-center-panel .marketplace-provider-filter button { flex: 0 0 auto; min-height: 40px; }
  .review-reason-filters { flex-wrap: nowrap; overflow-x: auto; padding: 2px 1px 5px; scrollbar-width: thin; }
  .review-reason-filters > span,
  .review-reason-filters button { flex: 0 0 auto; }
  .review-reason-filters button { min-height: 40px; }
  .review-center-panel .records-footer { align-items: stretch; }
}


:is(html[data-theme="midnight"], html[data-theme="graphite"]) .app-shell :is(
  .action-btn:not(.primary):not(.danger),
  .ghost-btn,
  .reports-statement-link,
  .dashboard-picker-tools button,
  .report-picker-search button,
  .statement-filter-clear,
  .statement-pagination button,
  .data-menu-item,
  .credential-modal-close,
  .sort-direction-btn,
  .bulk-clear-selection,
  .records-pagination button
) {
  border-color: var(--border-default);
  background: var(--bg-subtle);
  color: var(--text-primary);
}

:is(html[data-theme="midnight"], html[data-theme="graphite"]) .app-shell :is(
  .action-btn,
  .ghost-btn,
  .reports-refresh,
  .statement-load,
  .settings-section-nav button
):disabled {
  opacity: .72;
  filter: saturate(.72);
}

:is(html[data-theme="midnight"], html[data-theme="graphite"]) .app-shell :is(
  .action-btn.primary,
  .reports-refresh,
  .statement-load,
  .settings-section-nav button.active,
  .order-bulk-copy strong,
  .bulk-fulfillment-btn.direct
) {
  color: var(--accent-contrast);
}

:is(html[data-theme="midnight"], html[data-theme="graphite"]) .app-shell :is(
  .data-menu-popover,
  .column-filter-popover,
  .reference-popover
) {
  border-color: var(--border-default);
  background: var(--bg-surface);
  color: var(--text-primary);
}

:is(html[data-theme="midnight"], html[data-theme="graphite"]) .app-shell :is(
  .mapping-warning-banner,
  .credential-warning,
  .availability-notice.warning,
  .website-inbox-state.warning,
  .website-inbox-state.exception
) {
  border-color: color-mix(in srgb, var(--warning) 38%, var(--border-default));
  background: var(--warning-soft);
  color: var(--warning);
}

:is(html[data-theme="midnight"], html[data-theme="graphite"]) .app-shell .mapping-warning-banner span {
  color: var(--text-secondary);
}

:is(html[data-theme="midnight"], html[data-theme="graphite"]) .app-shell :is(
  .quantity-sync-inline-error,
  .availability-inline-error,
  .reports-error,
  .statement-error,
  .automatic-sync-error,
  .reconciliation-error
) {
  border-color: color-mix(in srgb, var(--danger) 38%, var(--border-default));
  background: var(--danger-soft);
  color: var(--danger);
}


@media (max-width: 760px) {
  html { scrollbar-gutter: auto; }

  body {
    min-inline-size: 0;
    overflow-x: clip;
  }

  .app-shell {
    min-height: 100dvh;
    padding: 0 0 calc(82px + env(safe-area-inset-bottom));
    overflow-x: clip;
  }

  .app-shell .workspace {
    min-width: 0;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .app-shell .content {
    width: 100%;
    min-width: 0;
    padding: 10px;
    border-inline: 0;
    border-radius: 0;
    overflow: visible;
  }

  .screen-page,
  :is(
    .home-screen,
    .dashboard-home,
    .performance-dashboard,
    .settings-screen,
    .permissions-screen,
    .reports-screen,
    .standard-reports-screen,
    .account-statement-screen,
    .availability-screen,
    .quantity-sync-screen,
    .reconciliation-screen,
    .website-inbox-screen,
    .local-order-collections-screen,
    .local-order-returns-screen
  ) {
    min-width: 0;
    max-width: 100%;
  }

  :is(.screen-heading, .dashboard-heading, .settings-heading, .availability-heading, .quantity-sync-heading, .website-inbox-head) {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    padding: 6px 2px;
  }

  :is(.screen-heading, .dashboard-heading, .settings-heading, .availability-heading, .quantity-sync-heading, .website-inbox-head) h1,
  :is(.screen-heading, .dashboard-heading, .settings-heading, .availability-heading, .quantity-sync-heading, .website-inbox-head) h2 {
    font-size: clamp(25px, 8vw, 34px);
    line-height: 1.14;
    overflow-wrap: anywhere;
  }

  :is(button, [role="button"], input, select, textarea) {
    max-width: 100%;
  }

  :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
    font-size: 16px;
  }

  :is(
    .action-btn,
    .ghost-btn,
    .primary-btn,
    .reports-refresh,
    .reports-statement-link,
    .statement-load,
    .statement-filter-clear,
    .login-submit,
    .mobile-navigation button,
    .settings-section-nav button
  ) {
    min-height: 44px;
  }

  :is(.table-wrap, .report-table-wrap, .statement-table-wrap, .automatic-sync-history-table-wrap, .permissions-matrix-wrap) {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
  }

  :is(.records-table, .report-table, .statement-table) {
    min-width: 720px;
  }

  .toast {
    inset-inline: 10px;
    bottom: calc(82px + env(safe-area-inset-bottom));
    width: auto;
    max-width: none;
  }

  .app-shell .mobile-navigation {
    inset-inline: 8px;
    bottom: max(8px, env(safe-area-inset-bottom));
    width: auto;
    min-height: 64px;
    padding-bottom: 0;
    border-radius: 18px;
  }

  .mobile-navigation-sheet {
    max-height: min(82dvh, 720px);
    padding-bottom: env(safe-area-inset-bottom);
  }

  
  .records-panel,
  .review-center-panel {
    min-width: 0;
    border-radius: 14px;
  }

  .records-panel:has(.orders-records-table) .record-filters,
  .records-panel .record-filters,
  .review-center-panel .record-filters,
  .review-center-panel:has(.orders-records-table) .record-filters {
    display: grid;
    width: 100%;
    height: auto;
    min-height: 0;
    max-height: none;
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
    padding: 10px;
    overflow: visible;
  }

  .records-panel:has(.orders-records-table) .record-filters .search-group,
  .records-panel .record-filters .search-group,
  .review-center-panel .record-filters .search-group {
    order: initial;
    width: 100%;
    max-width: none;
    margin: 0;
    flex-basis: auto;
  }

  .records-panel .marketplace-provider-filter,
  .review-center-panel .marketplace-provider-filter,
  .review-reason-filters,
  .settings-section-nav,
  .dashboard-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 7px;
    max-width: 100%;
    padding-bottom: 5px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
    scroll-snap-type: inline proximity;
  }

  .records-panel .marketplace-provider-filter button,
  .review-center-panel .marketplace-provider-filter button,
  .review-reason-filters button,
  .settings-section-nav button,
  .dashboard-tabs button {
    flex: 0 0 auto;
    min-width: max-content;
    scroll-snap-align: start;
  }

  :is(.records-footer, .records-pagination, .panel-head, .order-bulk-toolbar) {
    align-items: stretch;
    flex-wrap: wrap;
    gap: 8px;
  }

  
  :is(.modal-backdrop, .editor-backdrop, .credential-modal-backdrop) {
    align-items: end;
    padding: 8px;
  }

  :is(.modal-card, .editor-modal, .editor-modal-wide, .credential-modal) {
    width: 100%;
    max-width: 100%;
    max-height: calc(100dvh - 16px);
    border-radius: 20px 20px 14px 14px;
  }

  :is(.editor-form-grid, .editor-section-grid, .editor-fields, .credential-modal-grid) {
    grid-template-columns: minmax(0, 1fr);
  }

  :is(.editor-actions, .credential-modal-actions, .modal-actions) {
    position: sticky;
    z-index: 24;
    bottom: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    height: auto;
    min-height: 0;
    padding: 10px 0 calc(4px + env(safe-area-inset-bottom));
    background: var(--bg-surface);
  }

  :is(.editor-actions, .credential-modal-actions, .modal-actions) > button {
    width: 100%;
    min-height: 46px;
  }

  
  .performance-dashboard {
    width: 100%;
    max-width: 100%;
    margin: 0;
    grid-template-columns: minmax(0, 1fr);
    overflow: clip;
  }

  .performance-dashboard :is(
    .dashboard-heading,
    .dashboard-controls,
    .dashboard-section-nav,
    .dashboard-section-panel,
    .dashboard-metrics,
    .dashboard-grid,
    .dashboard-panel,
    .chart-wrap
  ) {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .performance-dashboard .dashboard-controls {
    grid-template-columns: minmax(0, 1fr);
    column-gap: 0;
    row-gap: 10px;
    padding: 12px;
  }

  .performance-dashboard .dashboard-controls > label,
  .performance-dashboard .dashboard-controls .dashboard-platform-picker,
  .performance-dashboard .dashboard-controls .dashboard-mode {
    width: 100%;
    grid-template-rows: auto 44px;
  }

  .performance-dashboard .dashboard-controls .reports-refresh {
    grid-column: 1;
    width: 100%;
  }

  .performance-dashboard .dashboard-section-nav {
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
  }

  .performance-dashboard .dashboard-section-panel {
    grid-template-columns: minmax(0, 1fr);
  }

  .performance-dashboard .dashboard-view-overview,
  .performance-dashboard .dashboard-view-monthly,
  .performance-dashboard .dashboard-view-items {
    grid-template-columns: minmax(0, 1fr);
  }

  .performance-dashboard .dashboard-panel.dashboard-wide,
  .performance-dashboard .dashboard-view-overview .dashboard-donut-panel,
  .performance-dashboard .dashboard-view-overview .dashboard-donut-panel:last-child {
    grid-column: 1;
  }

  .performance-dashboard .dashboard-view-overview .dashboard-donut-panel .donut-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .performance-dashboard .dashboard-panel.dashboard-hero-chart,
  .performance-dashboard .dashboard-panel.dashboard-secondary-chart,
  .performance-dashboard .dashboard-donut-panel {
    min-height: 0;
  }

  .performance-dashboard :is(.dashboard-line-chart, .dashboard-column-chart, .dashboard-donut) {
    max-width: 100%;
  }

  :is(.dashboard-panel, .dashboard-card, .review-center-overview, .review-center-panel > .panel-head) {
    padding: 13px;
    border-radius: 15px;
  }

  :is(.dashboard-metrics, .review-center-metrics, .home-metrics, .permissions-stats) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .dashboard-metric {
    min-width: 0;
    padding: 12px;
  }

  :is(.dashboard-controls, .dashboard-grid, .dashboard-item-ranking-grid, .review-center-overview) {
    grid-template-columns: minmax(0, 1fr);
  }

  .review-shortcut-action { grid-column: auto; }

  
  .settings-screen {
    gap: 12px;
    padding-inline: 0;
  }

  :is(.settings-card, .settings-panel, .settings-section) {
    min-width: 0;
    padding: 14px;
    border-radius: 15px;
  }

  .settings-section-nav {
    padding: 4px;
  }

  .settings-section-nav button {
    flex-basis: auto;
    min-height: 46px;
    padding-inline: 14px;
  }

  .automatic-sync-list { gap: 10px; }

  .automatic-sync-row {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 10px;
    padding: 12px;
  }

  .automatic-sync-identity,
  .automatic-sync-status {
    grid-column: auto;
  }

  .automatic-sync-identity strong,
  .automatic-sync-status em {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .automatic-sync-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
  }

  .automatic-sync-actions .action-btn { width: 100%; }

  .automatic-sync-history-summary {
    grid-template-columns: 34px minmax(0, 1fr) 20px;
  }

  .automatic-sync-history-counts {
    grid-column: 2;
    justify-self: start;
    flex-wrap: wrap;
  }

  .automatic-sync-history-chevron {
    grid-column: 3;
    grid-row: 1;
  }

  
  :is(.availability-screen, .quantity-sync-screen, .website-inbox-screen) {
    gap: 12px;
    padding: 0;
  }

  :is(.availability-toolbar, .availability-settings-card, .quantity-sync-controls, .quantity-sync-summary, .website-inbox-customer, .website-inbox-line, .website-inbox-accept, .website-inbox-metrics) {
    grid-template-columns: minmax(0, 1fr);
  }

  .availability-settings-card.compact { grid-template-columns: minmax(0, 1fr); }

  .availability-source-actions,
  .website-inbox-head-actions {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .availability-source-actions > *,
  .website-inbox-head-actions > * { width: 100%; }

  .website-inbox-summary {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding: 13px;
  }

  .website-inbox-body { padding: 0 12px 12px; }

  .website-inbox-exception {
    align-items: stretch;
    flex-direction: column;
  }

  .website-inbox-line-total {
    padding-top: 0;
    text-align: start;
  }

  
  :is(.reports-screen, .standard-reports-screen, .account-statement-screen) {
    gap: 12px;
    padding: 0;
  }

  :is(.reports-controls, .report-controls-card, .statement-controls, .account-statement-controls, .standard-report-grid, .reports-grid, .reports-metrics, .standard-summary) {
    grid-template-columns: minmax(0, 1fr);
  }

  :is(.reports-controls, .report-controls-card, .statement-controls, .account-statement-controls) label {
    min-width: 0;
  }

  :is(.reports-refresh, .reports-statement-link, .statement-load) { width: 100%; }

  :is(.report-panel, .standard-report-workspace, .statement-panel) {
    min-width: 0;
    padding: 13px;
    border-radius: 15px;
  }

  
  .permissions-screen { gap: 12px; }

  :is(.permission-user-list, .permission-access-summary, .permission-editor-grid) {
    grid-template-columns: minmax(0, 1fr);
  }

  .permission-save-bar {
    bottom: calc(72px + env(safe-area-inset-bottom));
    align-items: stretch;
    flex-direction: column;
    padding: 10px;
    border-radius: 14px;
  }

  .permission-save-bar > div {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .permission-save-bar .action-btn { width: 100%; }

  
  .login-page {
    display: block;
    width: 100%;
    max-width: 100vw;
    min-height: 100dvh;
    padding: 8px;
    overflow-x: clip;
  }

  .login-card {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-height: calc(100dvh - 16px);
    padding: 24px 18px;
    border-radius: 20px;
    overflow: hidden;
  }

  .login-language {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 28px;
  }

  .login-language button { min-width: 0; }

  :is(.login-mobile-brand, .login-heading, .login-form) {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .login-heading :is(h2, p) { overflow-wrap: anywhere; }
}

@media (max-width: 430px) {
  .app-shell .content { padding: 8px; }

  .performance-dashboard .dashboard-metrics-primary,
  .performance-dashboard .dashboard-metrics-secondary {
    grid-template-columns: minmax(0, 1fr);
  }

  .performance-dashboard .dashboard-section-nav button {
    flex-basis: min(78vw, 220px);
  }

  :is(.dashboard-metrics, .home-metrics, .permissions-stats, .review-center-metrics) {
    grid-template-columns: minmax(0, 1fr);
  }

  :is(.automatic-sync-actions, .availability-source-actions, .website-inbox-head-actions, .permission-save-bar > div, .editor-actions, .credential-modal-actions, .modal-actions) {
    grid-template-columns: minmax(0, 1fr);
  }

  .mobile-navigation-screen.nested {
    width: 100%;
    margin-inline-start: 0;
  }
}


:is(html[data-theme="midnight"], html[data-theme="graphite"])
  .editor-modal-wide:has(.order-editor-sections) {
  color-scheme: dark;
}

:is(html[data-theme="midnight"], html[data-theme="graphite"])
  .editor-modal-wide:has(.order-editor-sections) > .panel-head {
  border-block-end: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-primary);
}

:is(html[data-theme="midnight"], html[data-theme="graphite"])
  .editor-modal-wide:has(.order-editor-sections) > .panel-head :is(h3, span) {
  color: var(--text-primary);
}

:is(html[data-theme="midnight"], html[data-theme="graphite"])
  .editor-modal-wide:has(.order-editor-sections) :is(.order-editor-card-head h3, .journal-details-head h3, .field-name) {
  color: var(--text-primary);
}

:is(html[data-theme="midnight"], html[data-theme="graphite"])
  .editor-modal-wide:has(.order-editor-sections) .order-editor-card .field {
  border-color: var(--border-subtle);
  background: var(--bg-subtle);
}

:is(html[data-theme="midnight"], html[data-theme="graphite"])
  .editor-modal-wide:has(.order-editor-sections) .order-editor-card :is(.field.locked, .field.audit-field) {
  border-color: var(--border-subtle);
  background: color-mix(in srgb, var(--bg-subtle) 76%, var(--bg-surface));
}

:is(html[data-theme="midnight"], html[data-theme="graphite"])
  .editor-modal-wide:has(.order-editor-sections) .order-editor-card .field :is(input, select, textarea, .field-select, .reference-trigger, .field-readonly-value) {
  border-color: var(--border-default);
  background: var(--bg-surface);
  color: var(--text-primary);
}

:is(html[data-theme="midnight"], html[data-theme="graphite"])
  .editor-modal-wide:has(.order-editor-sections) .order-editor-card .field :is(input, select, textarea, .field-select, .reference-trigger):focus-visible {
  border-color: var(--accent);
  outline: 2px solid var(--focus-ring);
  outline-offset: 1px;
}

:is(html[data-theme="midnight"], html[data-theme="graphite"])
  .editor-modal-wide:has(.order-editor-sections) .order-detail-table-row :is(input, select, .reference-trigger) {
  border-color: var(--border-default);
  background: var(--bg-subtle);
  color: var(--text-primary);
}

:is(html[data-theme="midnight"], html[data-theme="graphite"])
  .editor-modal-wide:has(.order-editor-sections) .order-detail-table-row :is(input, select, .reference-trigger):focus-visible {
  border-color: var(--accent);
  outline: 2px solid var(--focus-ring);
  outline-offset: 1px;
}

:is(html[data-theme="midnight"], html[data-theme="graphite"])
  .editor-modal-wide:has(.order-editor-sections) .order-detail-table-row :is(input:disabled, input:read-only, select:disabled, .reference-trigger:disabled) {
  border-color: var(--border-subtle);
  background: color-mix(in srgb, var(--bg-subtle) 76%, var(--bg-surface));
  color: var(--text-secondary);
  opacity: 1;
}

:is(html[data-theme="midnight"], html[data-theme="graphite"])
  .editor-modal-wide:has(.order-editor-sections) .order-detail-table-row select option {
  background: var(--bg-surface);
  color: var(--text-primary);
}

:is(html[data-theme="midnight"], html[data-theme="graphite"])
  .editor-modal-wide:has(.order-editor-sections) :is(.reference-trigger-label, .reference-result-label) {
  color: var(--text-primary);
}

:is(html[data-theme="midnight"], html[data-theme="graphite"])
  .editor-modal-wide:has(.order-editor-sections) :is(.reference-trigger-icon, .reference-clear) {
  color: var(--accent);
}

:is(html[data-theme="midnight"], html[data-theme="graphite"])
  .editor-modal-wide:has(.order-editor-sections) :is(.reference-popover, .reference-search, .reference-result) {
  border-color: var(--border-default);
  background: var(--bg-surface);
  color: var(--text-primary);
}

:is(html[data-theme="midnight"], html[data-theme="graphite"])
  .editor-modal-wide:has(.order-editor-sections) .reference-result:hover,
:is(html[data-theme="midnight"], html[data-theme="graphite"])
  .editor-modal-wide:has(.order-editor-sections) .reference-result.selected {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border-default));
  background: var(--accent-soft);
}
.company-context-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.75rem;
  padding: 0.45rem 1rem;
  border-bottom: 1px solid var(--border-subtle, rgba(148, 163, 184, 0.2));
}

.company-context-bar select {
  max-width: 20rem;
}


html, body, button, input, select, textarea, .public-site { font-family: var(--font-ui); }
.krelen-brand {
  display: inline-block;
  flex-shrink: 0;
  direction: ltr;
  -webkit-mask-image: url("/brand/krelen-logo-master.png");
  mask-image: url("/brand/krelen-logo-master.png");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: auto 100%;
  mask-size: auto 100%;
  -webkit-mask-position: left center;
  mask-position: left center;
}
.krelen-brand-lockup {
  width: 210px;
  max-width: 100%;
  aspect-ratio: 1317 / 513;
  
  background: linear-gradient(90deg, var(--krelen-olive) 28%, var(--brand-wordmark) 28%);
}
.krelen-brand-icon { width: 36px; aspect-ratio: 350 / 513; background: var(--krelen-olive); }
.krelen-brand-white { background: var(--krelen-white); }
.krelen-brand-black { background: var(--krelen-black); }
.login-brand-panel, .sidebar { --brand-wordmark: var(--krelen-warm-white); }
.login-brand-panel { color: var(--krelen-warm-white); }
.login-brand-panel, .login-card { border-radius: var(--radius-marketing); }
.login-brand-mark, .login-mobile-brand-mark {
  display: flex;
  align-items: center;
  width: min(240px, 100%);
  height: auto;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.login-mobile-brand-mark { width: 180px; }
.login-mobile-brand > strong { display: none; }
.login-card { background: var(--bg-surface); box-shadow: var(--shadow-sm); }
.login-brand-panel p, .login-brand-panel span { color: var(--krelen-sage); }
.login-heading > span, .public-eyebrow, .public-section-heading > span, .public-callout span { color: var(--accent-strong); }
.login-brand-panel h1, .login-heading h2 { font-weight: 600; }
.login-page[data-lang="ar"] :is(h1, h2) { letter-spacing: 0; line-height: 1.3; }
.login-form input { border-radius: var(--radius-sm); background: var(--bg-subtle); }
.login-form label { color: var(--text-secondary); font-weight: 500; }
.login-submit { border-radius: var(--radius-sm); background: var(--accent); color: var(--accent-contrast); font-weight: 600; box-shadow: none; }
.login-submit:hover:not(:disabled) { background: var(--accent-hover); }
.login-language { background: var(--bg-subtle); }
.login-language button.active { background: var(--accent-soft); color: var(--text-primary); box-shadow: none; }
.forgot-password-link, .login-back-link, .password-input-wrap button { color: var(--accent-strong); }
.brand-logo, .public-brand-mark { display: flex; align-items: center; justify-content: center; background: transparent; box-shadow: none; overflow: visible; }
.sidebar .table-item.active .nav-icon { color: var(--krelen-sage); }
.public-site { background: var(--bg-page); }
.public-button { font-weight: 600; border-radius: var(--radius-sm); }
.public-button-disabled { background: var(--bg-subtle); color: var(--text-secondary); border: 1px solid var(--border-default); }
.public-button-secondary:hover { color: var(--accent-strong); }
.public-header nav a:hover, .public-footer nav a:hover { color: var(--accent-strong); }
.public-header .public-nav-action:hover { color: var(--accent-contrast); }
.returns-table-head { background: var(--bg-subtle); }
.return-count-badge { color: var(--accent-strong); background: var(--accent-soft); border-color: var(--border-subtle); }
.theme-option-preview { background: var(--krelen-warm-white); }
.theme-option-preview i:first-child { background: var(--krelen-black); }
.theme-option-preview i:nth-child(2) { background: var(--krelen-olive); }
.theme-option-preview i:nth-child(3) { background: var(--krelen-sage); }
.theme-midnight .theme-option-preview, .theme-graphite .theme-option-preview { background: var(--krelen-charcoal); }
:is(a, button, input, select, textarea, [tabindex]):focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }
@media (max-width: 600px) {
  .login-mobile-brand { flex-wrap: wrap; gap: var(--space-2); }
  .login-card { border-radius: var(--radius-lg); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}


.app-shell { font-size: var(--type-label); line-height: var(--line-body); }
.app-shell .workspace { width: 100%; max-inline-size: var(--content-max); margin-inline: auto; gap: var(--space-4); grid-template-columns: var(--sidebar-width) minmax(0, 1fr); }
.app-shell .sidebar { inline-size: var(--sidebar-width); border-radius: var(--radius-lg); background: var(--sidebar-bg) !important; box-shadow: none; }
.app-shell .sidebar .brand-logo { background: transparent; box-shadow: none; }
.app-shell .content { min-inline-size: 0; border-radius: var(--radius-lg); gap: var(--space-4); }
.app-shell :is(h1, h2, h3, .brand-kicker, .group-title, .table-item, .sidebar-inline-section, .mobile-navigation-section h3, .mobile-navigation-sheet-header span) { font-weight: 600; }
.app-shell h2 { font-size: var(--type-title); line-height: var(--line-heading); }
.app-shell .brand h1 { font-size: var(--type-title); }
.app-shell .table-item { min-block-size: var(--touch-target); }
.app-shell .group-toggle { min-block-size: var(--touch-target); }
.app-shell .sidebar.is-collapsed { inline-size: 76px; }
.app-shell .workspace:has(.sidebar.is-collapsed) { grid-template-columns: 76px minmax(0, 1fr); }
.product-shell-header { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); padding-block-end: var(--space-4); border-block-end: var(--border-width) solid var(--border-subtle); }
.product-shell-context { display: grid; gap: var(--space-1); margin-inline-end: auto; min-inline-size: 0; }
.product-shell-context > span { color: var(--text-muted); font-size: var(--type-caption); }
.product-shell-context > strong { font-size: var(--type-title); font-weight: 600; }
.product-shell-tools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); min-inline-size: 0; }
.product-account { max-inline-size: 240px; }
.product-account bdi { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.company-context-bar { flex-wrap: wrap; min-inline-size: 0; padding: 0; border: 0; gap: var(--space-2); }
.company-context-bar select { min-block-size: var(--touch-target); max-inline-size: min(20rem, 100%); min-inline-size: 0; padding: var(--space-2); border: var(--border-width) solid var(--border-default); border-radius: var(--radius-sm); background: var(--bg-subtle); color: var(--text-primary); }
.k-reserved-note { color: var(--text-muted); font-size: var(--type-caption); margin: var(--space-2) var(--space-3); }
.sidebar .k-reserved-note { color: var(--sidebar-muted); }
.sidebar.is-collapsed .k-reserved-note { display: none; }
.k-skip-link { position: fixed; inset-block-start: var(--space-2); inset-inline-start: var(--space-2); z-index: 1000; padding: var(--space-3); color: var(--text-primary); background: var(--bg-surface); transform: translateY(-200%); }
.k-skip-link:focus { transform: none; }

.k-button, .app-shell .action-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-block-size: var(--touch-target); padding: var(--space-2) var(--space-3); border: var(--border-width) solid var(--border-default); border-radius: var(--radius-sm); font: inherit; font-weight: 500; background: var(--bg-surface); color: var(--text-primary); box-shadow: none; cursor: pointer; transition: background var(--motion-fast) var(--ease-standard), border-color var(--motion-fast) var(--ease-standard); }
.k-button-primary, .app-shell .action-btn.primary { background: var(--accent); color: var(--text-on-accent); border-color: var(--accent); }
.k-button-primary:hover:not(:disabled), .app-shell .action-btn.primary:hover:not(:disabled) { background: var(--accent-hover); }
.k-button-secondary:hover:not(:disabled), .app-shell .action-btn:not(.primary):not(.danger):hover:not(:disabled) { background: var(--bg-subtle); }
.k-button-quiet { background: transparent; border-color: transparent; color: var(--text-secondary); }
.k-button-quiet:hover:not(:disabled) { background: var(--bg-subtle); color: var(--text-primary); }
.k-button-destructive, .app-shell .action-btn.danger { background: var(--danger); color: var(--danger-contrast); border-color: var(--danger); }
.k-button-destructive:hover:not(:disabled), .app-shell .action-btn.danger:hover:not(:disabled) { filter: brightness(0.95); }
.k-button:active:not(:disabled), .app-shell .action-btn:active:not(:disabled) { box-shadow: inset 0 0 0 2px var(--border-default); }
.k-button-primary:active:not(:disabled), .app-shell .action-btn.primary:active:not(:disabled) { background: var(--state-pressed); }
.k-button[aria-pressed="true"] { border-color: var(--accent-strong); background: var(--state-selected); color: var(--text-primary); }
.k-icon-button { min-inline-size: var(--touch-target); padding: var(--space-2); }
.k-button:disabled, .app-shell button:disabled { cursor: not-allowed; opacity: var(--state-disabled-opacity); }
.k-field { display: grid; gap: var(--space-2); min-inline-size: 0; }
.k-field > span, .k-form label > span { color: var(--text-secondary); font-weight: 500; }
.k-input, .k-select, .app-shell :is(.record-filters, .editor-fields, .statement-table-tools, .statement-pagination) :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) { min-block-size: var(--touch-target); padding: var(--space-2) var(--space-3); max-inline-size: 100%; min-inline-size: 0; border: var(--border-width) solid var(--border-default); border-radius: var(--radius-sm); background: var(--bg-surface); color: var(--text-primary); font: inherit; }
.k-input[readonly], .app-shell input[readonly] { background: var(--state-readonly); border-style: dashed; }
.k-input[aria-invalid="true"], .k-select[aria-invalid="true"] { border-color: var(--danger); }
.k-field-help { color: var(--text-muted); font-size: var(--type-caption); }
.k-field-error { color: var(--danger); font-size: var(--type-label); }
.k-toolbar, .k-pagination, .k-bulk-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.k-bulk-actions { padding: var(--space-3); background: var(--state-selected); border-radius: var(--radius-sm); }
.k-form { display: grid; gap: var(--space-6); max-inline-size: var(--form-max); }
.k-card { padding: var(--space-6); border: var(--border-width) solid var(--border-subtle); border-radius: var(--radius-md); background: var(--bg-surface); box-shadow: var(--shadow-sm); }
.k-table-scroll { max-inline-size: 100%; overflow-x: auto; overscroll-behavior-inline: contain; }
.k-table { inline-size: 100%; border-collapse: collapse; }
.k-table :is(th, td) { padding: var(--space-3) var(--space-4); text-align: start; border-block-end: var(--border-width) solid var(--border-subtle); }
.k-table th { font-weight: 500; background: var(--bg-subtle); color: var(--text-secondary); }
.k-table [aria-sort] button { display: inline-flex; align-items: center; gap: var(--space-2); }
.k-badge { display: inline-flex; align-items: center; gap: var(--space-1); border: var(--border-width) solid var(--border-subtle); border-radius: 999px; padding: var(--space-1) var(--space-2); color: var(--text-secondary); background: var(--bg-subtle); font-size: var(--type-caption); }
.k-badge[data-state="success"], .k-banner[data-state="success"] { color: var(--success); background: var(--success-soft); }
.k-badge[data-state="warning"], .k-banner[data-state="warning"] { color: var(--warning); background: var(--warning-soft); }
.k-badge[data-state="error"], .k-banner[data-state="error"] { color: var(--danger); background: var(--danger-soft); }
.k-banner { padding: var(--space-4); border: var(--border-width) solid var(--border-subtle); border-radius: var(--radius-sm); color: var(--info); background: var(--info-soft); }
.k-state { display: grid; justify-items: start; gap: var(--space-3); padding: var(--space-6); max-inline-size: var(--reading-max); }
.k-state > :is(h2, p) { margin: 0; }
.k-state p { color: var(--text-secondary); }
.k-skeleton { block-size: var(--space-4); inline-size: 100%; background: var(--bg-subtle); border-radius: var(--radius-sm); animation: k-pulse var(--motion-loading) var(--ease-standard) alternate infinite; }
@keyframes k-pulse { to { opacity: 0.55; } }
.k-dialog { inline-size: min(var(--dialog-max), calc(100% - 32px)); max-block-size: calc(100dvh - 32px); overflow: auto; box-sizing: border-box; padding: var(--space-6); border: var(--border-width) solid var(--border-subtle); border-radius: var(--radius-lg); background: var(--bg-surface); color: var(--text-primary); box-shadow: var(--shadow-md); }
.k-dialog::backdrop { background: rgb(11 12 11 / 0.65); }
.k-drawer { margin-inline-start: auto; margin-inline-end: 0; margin-block: 0; block-size: 100dvh; max-block-size: 100dvh; border-start-end-radius: 0; border-end-end-radius: 0; }
.k-numeric, .k-identifier, .app-shell :is(.amount, .current-user-detail) { direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }
.k-numeric { text-align: end; white-space: nowrap; }
.app-shell :is(input[type="date"], input[type="number"]) { direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }
.app-shell[data-lang="ar"], :lang(ar) { line-height: var(--line-arabic); }
.app-shell[data-lang="ar"] :is(h1, h2, h3, button, label, .brand-kicker, .group-title, .sidebar-inline-section, .mobile-navigation-sheet-header span), :lang(ar) :is(h1, h2, h3, button, label) { letter-spacing: 0; }
.app-shell[data-lang="ar"] :is(h1, h2, h3) { line-height: 1.5; }
@media (min-width: 761px) and (max-width: 1120px) {
  .app-shell .workspace { grid-template-columns: 216px minmax(0, 1fr); }
  .app-shell .sidebar { display: flex; inline-size: 216px; }
  .app-shell .sidebar:not(.is-collapsed) :is(.brand-copy, .sidebar-nav-heading > span, .group-title, .table-item-main > span, .sidebar-item-meta, .sidebar-inline-section, .utility-heading, .current-user-card) { display: block; }
  .app-shell .sidebar:not(.is-collapsed) .group-items:not([hidden]) { display: grid; }
  .app-shell .sidebar:not(.is-collapsed) .group-toggle, .app-shell .sidebar:not(.is-collapsed) .table-item { justify-content: start; padding-inline: var(--space-2); }
  .app-shell .sidebar:not(.is-collapsed) .brand { grid-template-columns: 44px minmax(0, 1fr); }
  .app-shell .workspace:has(.sidebar.is-collapsed) { grid-template-columns: 76px minmax(0, 1fr); }
  .app-shell .sidebar.is-collapsed { inline-size: 76px; }
  .product-shell-tools { flex: 1 1 100%; }
}
@media (max-width: 760px) {
  .app-shell .workspace, .app-shell .workspace:has(.sidebar.is-collapsed) { grid-template-columns: minmax(0, 1fr); }
  .app-shell .sidebar { display: none; }
  .app-shell .content { border-radius: var(--radius-md); }
  .product-shell-header { gap: var(--space-3); }
  .product-shell-tools { inline-size: 100%; }
  .company-context-bar { flex: 1 1 100%; }
  .company-context-bar select { flex: 1; inline-size: 100%; }
  .k-input, .k-select { font-size: var(--type-body); }
  .product-account { flex: 1; }
  .mobile-navigation-sheet .krelen-brand { inline-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-iteration-count: 1 !important; }
  .k-skeleton { animation: none; }
}
.k-setup-hub { max-width: 72rem; margin-inline: auto; padding: var(--space-6, 24px); }
.k-setup-hub .k-page-header { display: flex; justify-content: space-between; align-items: start; gap: var(--space-6, 24px); flex-wrap: wrap; }
.k-setup-list { border-block-start: 1px solid var(--border); }
.k-setup-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: var(--space-6, 24px); align-items: center; padding-block: var(--space-6, 24px); border-block-end: 1px solid var(--border); }
.k-setup-row h3 { margin: 0 0 var(--space-2, 8px); }
.k-setup-row p { margin: 0 0 var(--space-2, 8px); color: var(--text-muted); }
.k-setup-row .k-button { white-space: normal; text-align: center; }
@media (max-width: 760px) { .k-setup-hub { padding: var(--space-4, 16px); } .k-setup-row { grid-template-columns: minmax(0, 1fr); gap: var(--space-3, 12px); } .k-setup-row .k-badge { justify-self: start; } }


.k-language-selector { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); min-width: 0; }
.k-language-selector label { font-size: var(--type-label); color: var(--muted); }
.k-language-selector select, .login-form select { min-height: 44px; max-width: 100%; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-surface); color: var(--text); padding: var(--space-2) var(--space-3); font: inherit; }
.k-language-selector p { flex-basis: 100%; max-width: 28rem; margin: 0; font-size: .875rem; color: var(--muted); overflow-wrap: anywhere; }
.login-card > .k-language-selector { margin-block-end: var(--space-4); }
.login-form select { width: 100%; }
.product-shell-tools .k-language-selector { flex: 0 1 12rem; }


.login-page { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-4); padding: var(--space-4); min-block-size: 100dvh; box-sizing: border-box; }
.login-brand-panel, .login-card { min-block-size: calc(100dvh - 32px); min-inline-size: 0; box-sizing: border-box; }
.login-brand-panel { padding: clamp(32px, 4vw, 64px); background: var(--krelen-black); box-shadow: none; }
.login-brand-panel > div:last-child { max-inline-size: 28rem; padding-block-end: var(--space-8); }
.login-brand-panel h1 { margin: 0 0 var(--space-4); font-size: clamp(2rem, 3.2vw, 3.5rem); line-height: 1.15; letter-spacing: -0.035em; text-wrap: balance; }
.login-brand-panel p { font-size: var(--type-body); line-height: var(--line-body); }
.login-card { padding: var(--space-12) clamp(24px, 4vw, 64px); align-items: center; box-shadow: none; }
.login-card > :is(.login-heading, .login-form, .k-banner, .k-toolbar, .k-company-list) { inline-size: 100%; max-inline-size: 25rem; min-inline-size: 0; box-sizing: border-box; }
.login-card > .k-language-selector { align-self: center; inline-size: 100%; max-inline-size: 25rem; justify-content: flex-end; margin-block-end: var(--space-8); }
.login-card > .login-language { margin-block-end: var(--space-6); }
.login-card .login-heading :is(h1, h2) { margin: 0 0 var(--space-2); font-size: var(--type-display); font-weight: 600; line-height: var(--line-heading); letter-spacing: -0.025em; overflow-wrap: anywhere; }
.login-heading p { font-size: var(--type-label); line-height: var(--line-body); }
.login-form { margin-block: var(--space-6) 0; gap: var(--space-4); }
.login-form :is(input, select) { min-block-size: var(--touch-target); padding: var(--space-3); font-size: var(--type-body); line-height: 1.25; box-sizing: border-box; background: var(--bg-subtle); }
.login-form label { gap: var(--space-2); font-size: var(--type-label); }
.login-form small { color: var(--text-muted); font-size: var(--type-caption); font-weight: 400; line-height: var(--line-body); }
.login-submit { min-block-size: 48px; font-size: var(--type-label); }
.login-form .forgot-password-link, .login-card > .forgot-password-link { font-weight: 500; line-height: var(--line-body); text-align: center; }
.login-card > .forgot-password-link { margin-block-start: var(--space-4); }
.login-error, .login-card .k-banner { margin: 0; padding: var(--space-3) var(--space-4); font-size: var(--type-label); line-height: var(--line-body); overflow-wrap: anywhere; background: var(--danger-soft); }
.login-card .k-banner { background: var(--info-soft); margin-block-start: var(--space-4); }
.k-banner p { margin: var(--space-2) 0 0; }
.k-language-selector select { min-inline-size: 0; min-block-size: var(--touch-target); font-size: var(--type-label); }
.login-page[data-lang="ar"] .login-heading :is(h1, h2), .login-page[data-lang="ar"] .login-brand-panel h1 { line-height: 1.5; letter-spacing: 0; }
.k-company-entry { grid-template-columns: minmax(0, 1fr); }
.k-company-entry .login-card { inline-size: min(100%, 36rem); justify-self: center; border: 0; background: transparent; }
.k-company-entry .login-card > .krelen-brand { inline-size: 160px; margin-block-end: var(--space-8); }
.k-company-list { display: grid; gap: var(--space-2); margin-block: var(--space-6); }
.k-company-list .k-button { justify-content: space-between; padding: var(--space-4); text-align: start; }
.k-company-list bdi { min-inline-size: 0; overflow-wrap: anywhere; }
.k-company-entry .k-toolbar { justify-content: center; }
.product-shell-context > strong { font-size: var(--type-body); }
.product-shell-header { gap: var(--space-4); }
.product-shell-tools { gap: var(--space-1); }
.product-shell-tools .k-language-selector { flex-basis: auto; }
.product-account { max-inline-size: 12rem; }
.app-shell .table-item { font-weight: 500; }
.k-setup-hub { inline-size: 100%; max-inline-size: 60rem; box-sizing: border-box; padding: var(--space-6); }
.k-setup-hub .k-page-header { margin-block-end: var(--space-8); gap: var(--space-4); align-items: center; }
.k-setup-hub .k-page-header h1 { margin: 0 0 var(--space-2); font-size: var(--type-display); font-weight: 600; line-height: var(--line-heading); }
.k-setup-hub .k-page-header p { margin: 0; color: var(--text-secondary); font-size: var(--type-label); }
.k-setup-list { border-color: var(--border-subtle); }
.k-setup-row { grid-template-columns: minmax(0, 1fr) auto minmax(7rem, auto); gap: var(--space-4); padding-block: var(--space-4); border-color: var(--border-subtle); }
.app-shell .k-setup-row h2, .k-setup-row h2 { margin: 0; font-size: var(--type-body); font-weight: 500; line-height: var(--line-body); }
.k-setup-row small { display: block; margin-block-start: var(--space-1); color: var(--text-muted); font-size: var(--type-caption); }
.k-setup-row[data-status="unavailable"] .k-badge { background: transparent; }
.k-setup-row > .k-button { justify-self: end; }
.k-setup-security { display: grid; gap: var(--space-2); max-inline-size: 14rem; }
.k-setup-security p { font-size: var(--type-caption); line-height: var(--line-body); margin: 0; }
.k-setup-detail { margin-block-start: var(--space-6); border: var(--border-width) solid var(--border-subtle); border-radius: var(--radius-md); background: var(--bg-subtle); }
.k-state { gap: var(--space-2); }
.k-state p { font-size: var(--type-label); line-height: var(--line-body); }
@media (max-width: 1120px) {
  .login-page { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); }
  .login-brand-panel h1 { font-size: var(--type-display); }
  .login-card { padding: var(--space-8); }
  .k-company-entry { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .login-page { display: grid; grid-template-columns: minmax(0, 1fr); padding: var(--space-2); }
  .login-brand-panel { display: none; }
  .login-card { padding: var(--space-8) var(--space-6); min-block-size: calc(100dvh - 16px); justify-content: center; }
  .login-mobile-brand { display: flex; justify-content: center; margin-block-end: var(--space-6); }
  .login-mobile-brand .krelen-brand, .login-mobile-brand > .krelen-brand { inline-size: 160px; }
  .login-card > .k-language-selector { margin-block-end: var(--space-6); }
  .product-shell-tools { gap: var(--space-2); }
  .product-shell-tools .k-language-selector { flex: 1 1 auto; }
  .product-account { max-inline-size: 100%; }
  .k-setup-hub { padding: var(--space-4); }
  .k-setup-row { grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-2) var(--space-3); }
  .k-setup-row > .k-badge { justify-self: end; max-inline-size: 100%; text-align: center; }
  .k-setup-row > .k-button, .k-setup-security { grid-column: 1 / -1; justify-self: start; }
  .k-setup-security { max-inline-size: 100%; }
  .k-setup-hub .k-page-header { margin-block-end: var(--space-6); }
}
.k-p4 { max-inline-size: 1200px; margin-inline: auto; padding: var(--krelen-space-6, 24px); }
.k-p4 .k-page-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--space-4); margin-block-end: var(--space-6); }
.k-p4 h1 { font-size: var(--type-display); font-weight: 600; line-height: var(--line-heading); }
.k-p4 h2, .k-p4 h3 { font-weight: 600; }
.k-product-methods, .k-product-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.k-product-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px; }
.k-product-fields label, .k-file-field { display: grid; gap: 8px; font-weight: 500; }
.k-product-fields input, .k-product-fields select, .k-file-field input { min-inline-size: 0; inline-size: 100%; padding: 12px; color: var(--text-primary); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.k-product-form, .k-product-import { display: grid; gap: 16px; margin-block: 24px; }
.k-product-form { padding-block: 24px; border-block-start: 1px solid var(--border); }
.k-product-form > .k-button, .k-product-import > .k-button { justify-self: start; }
.k-provider-row, .k-connection-row { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; padding-block: 20px; border-block-end: 1px solid var(--border); }
.k-provider-row h2 { min-inline-size: 90px; font-size: 18px; }
.k-provider-row > span:first-of-type, .k-connection-row > div:first-child { flex: 1; min-inline-size: min(220px, 100%); }
.k-p4 h1, .k-p4 h2, .k-p4 h3 { margin: 0; }
.k-p4 small { color: var(--text-secondary); }
.k-product-table { overflow: auto; max-block-size: 360px; border: 1px solid var(--border); border-radius: 8px; }
.k-product-table table { border-collapse: collapse; inline-size: 100%; }
.k-product-table td, .k-product-table th { text-align: start; padding: 12px; border-block-end: 1px solid var(--border); max-inline-size: 360px; overflow-wrap: anywhere; }
.k-product-table thead { position: sticky; top: 0; background: var(--surface); }
@media(max-width: 600px) { .k-p4 { padding: 16px; } .k-product-methods > button { inline-size: 100%; } .k-p4 .k-page-header { align-items: flex-start; gap: 16px; } }


.k-catalog { display:grid; gap:var(--space-4); }
.k-catalog-toolbar,.k-catalog-actions { display:flex; flex-wrap:wrap; gap:var(--space-3); align-items:end; }
.k-catalog-list { display:grid; gap:var(--space-3); }
.k-catalog-row { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:var(--space-4); padding:var(--space-4); border-block-end:1px solid var(--border); }
.k-catalog-row h2 { font-size:var(--type-body); margin:0; }
.k-catalog-row small { display:block; overflow-wrap:anywhere; color:var(--muted); }
.k-catalog-row label,.k-catalog-toolbar label { display:grid; gap:var(--space-2); }
.k-catalog-actions { grid-column:1/-1; }
.k-catalog-preview { max-height:20rem; overflow:auto; overflow-wrap:anywhere; }
.k-catalog summary { cursor:pointer; padding-block:var(--space-3); }
@media(max-width:700px) { .k-catalog-row { grid-template-columns:minmax(0,1fr); } .k-catalog-actions .k-button { flex:1; } .k-catalog input,.k-catalog select { min-width:0; max-width:100%; } }
.k-inventory-table { overflow-x: auto; max-width: 100%; margin-block: var(--krelen-space-4, 16px); }
.k-inventory-table table { width: 100%; border-collapse: collapse; text-align: start; }
.k-inventory-table th, .k-inventory-table td { padding: 12px; border-block-end: 1px solid var(--border); text-align: start; vertical-align: top; }
.k-inventory-table td small { display: block; color: var(--text-muted); }
.k-inventory input, .k-inventory select { max-width: 100%; }
.k-inventory > label { display: grid; gap: 8px; max-width: 32rem; margin-block: 16px; }
.k-inventory-table details { min-width: 9rem; }
.k-pricing label { display: grid; gap: var(--krelen-space-2, 8px); }
.k-pricing input:not([type="checkbox"]), .k-pricing select { min-inline-size: 0; inline-size: 100%; padding: 12px; color: var(--text-primary); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.k-pricing-table td { overflow-wrap: anywhere; }
.k-pricing-table td:last-child { min-inline-size: 9rem; }
@media (max-width: 600px) {
  .k-pricing-table table, .k-pricing-table tbody { display: block; }
  .k-pricing-table thead { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); }
  .k-pricing-table tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); position: relative; padding-block: var(--krelen-space-4, 16px); border-block-end: 1px solid var(--border); gap: var(--krelen-space-3, 12px); }
  .k-pricing-table td { display: block; border: 0; padding: 0; min-inline-size: 0; }
  .k-pricing-table td:first-child { position: absolute; inset-inline-end: 0; inset-block-start: var(--krelen-space-4, 16px); }
  .k-pricing-table td:nth-child(2) { grid-column: 1 / -1; padding-inline-end: 2rem; font-weight: 600; }
  .k-pricing-table td:nth-child(5), .k-pricing-table td:nth-child(6) { grid-column: 1 / -1; }
  .k-pricing-table td:nth-child(6) { display: flex; flex-wrap: wrap; gap: var(--krelen-space-2, 8px); }
  .k-pricing-table td[data-label]::before { content: attr(data-label); display: block; color: var(--text-muted); margin-block-end: var(--krelen-space-2, 8px); }
}
.k-order-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, .8fr); gap: var(--space-4, 16px); }
.k-order-split > :only-child { grid-column: 1 / -1; }
.k-order-detail { min-width: 0; padding: var(--space-4, 16px); border: 1px solid var(--border); border-radius: 12px; }
.k-order-detail small { display: block; overflow-wrap: anywhere; }
.k-order-detail dd { margin-inline-start: 0; overflow-wrap: anywhere; }
.k-order-operations .k-catalog-review input { max-width: 100%; }
.k-order-operations th { white-space: normal; overflow-wrap: anywhere; }
.k-order-operations td button bdi { white-space: nowrap; }
@media (max-width: 900px) { .k-order-split { grid-template-columns: minmax(0, 1fr); } }


.k-p9-preview { max-height: 20rem; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.k-p9 textarea { width: 100%; max-width: 100%; }
.k-p9 .k-order-detail { min-width: 0; }


:root {
  --product-sidebar: 240px;
  --product-page-width: 1440px;
  --product-title: 1.5rem;
  --product-section: 1.0625rem;
  --product-row: 40px;
}
.k-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.app-shell { padding: 0; min-block-size: 100dvh; background: var(--bg-page); }
.app-shell .workspace { grid-template-columns: var(--product-sidebar) minmax(0, 1fr); gap: 0; min-block-size: 100dvh; }
.app-shell .workspace:has(.sidebar.is-collapsed) { grid-template-columns: 76px minmax(0, 1fr); }
.app-shell .sidebar { inline-size: var(--product-sidebar); padding: var(--space-4) var(--space-3); border-radius: 0; border-inline-end: 1px solid var(--border-subtle); box-shadow: none; }
.app-shell .sidebar.is-collapsed { inline-size: 76px; }
.app-shell .brand { padding: var(--space-2) var(--space-2) var(--space-6); gap: var(--space-3); }
.app-shell .brand-copy h1 { font-size: var(--type-caption); font-weight: 400; color: var(--sidebar-muted); }
.app-shell .brand-kicker { font-size: 1.0625rem; letter-spacing: -.02em; }
.sidebar .sidebar-nav-heading { margin-block: var(--space-2); }
.sidebar .group-section { border: 0; margin-block: var(--space-3); background: transparent; box-shadow: none; }
.app-shell .sidebar .group-list { gap: 0; margin-block-start: var(--space-3); }
.app-shell .sidebar .sidebar-navigation-scroll { display: block; }
.app-shell .sidebar .group-section { margin-block: var(--space-2); padding: 0; }
.app-shell .sidebar .group-items { border: 0; padding: 0; }
.app-shell .sidebar .group-toggle .group-title { font-size: .6875rem; font-weight: 500; color: var(--sidebar-muted); }
.app-shell .sidebar .group-toggle { background: transparent; border: 0; border-radius: 0; }
.app-shell .sidebar .brand-logo { border: 0; background: transparent; box-shadow: none; }
.sidebar .group-toggle { min-block-size: 32px; padding: var(--space-1) var(--space-2); border: 0; background: transparent; color: var(--sidebar-muted); }
.sidebar .group-title { font-size: .6875rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.sidebar:not(.is-collapsed) .group-heading-icon, .sidebar:not(.is-collapsed) .group-toggle-meta { display: none; }
.sidebar .group-items { gap: 2px; padding: var(--space-1) 0; }
.sidebar .table-item { min-block-size: 38px; padding: var(--space-2) var(--space-3); border: 0; border-radius: var(--radius-sm); font-size: .8125rem; font-weight: 500; box-shadow: none; }
.sidebar .table-item.active { background: var(--sidebar-active); color: var(--sidebar-text); }
.sidebar .table-item.active .nav-icon { color: var(--krelen-sage); }
.sidebar .sidebar-inline-section { font-size: .6875rem; padding-block: var(--space-2); color: var(--sidebar-muted); }
.sidebar-more-tools { margin-block: var(--space-1); }
.sidebar-more-tools > summary { cursor: pointer; color: var(--sidebar-muted); font-size: .75rem; padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); }
.sidebar-more-tools[open] > summary { color: var(--sidebar-text); }
.sidebar-more-tools .table-item { font-weight: 400; }
.sidebar .sidebar-search { margin-block: var(--space-3); background: transparent; border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); }
.sidebar .settings-card { background: transparent; border: 0; border-block-start: 1px solid var(--border-subtle); padding: var(--space-3) 0 0; box-shadow: none; }
.sidebar .current-user-card { background: transparent; border: 0; padding: var(--space-3); }
.app-shell .content { padding: 0; background: var(--bg-page); border: 0; border-radius: 0; box-shadow: none; min-inline-size: 0; align-content: start; gap: 0; }
.product-shell-header { padding: var(--space-3) var(--space-6); gap: var(--space-4); background: var(--bg-page); min-block-size: 64px; margin: 0; }
.product-shell-context { font-size: .8125rem; color: var(--text-secondary); }
.product-shell-context strong { font-weight: 500; }
.product-shell-tools { margin-inline-start: auto; gap: var(--space-2); }
.product-shell-tools .k-button { font-size: .75rem; padding-inline: var(--space-2); }
.product-shell-tools .k-language-selector { flex: 0 1 auto; }
.product-shell-tools .k-language-selector label { position: absolute; inline-size: 1px; block-size: 1px; clip-path: inset(50%); overflow: hidden; }
.product-shell-tools .k-language-selector select { font-size: .75rem; border: 0; background: transparent; }
.company-context-bar { gap: var(--space-2); padding: 0; border: 0; background: transparent; font-size: .75rem; }
.company-context-bar select { min-block-size: 36px; max-inline-size: 220px; background: var(--bg-subtle); border-radius: var(--radius-sm); }
.product-account { max-inline-size: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k-p4, .k-setup-hub, .app-shell :is(.screen-page, .reconciliation-screen, .local-workflow-screen) { inline-size: 100%; max-inline-size: var(--product-page-width); margin-inline: auto; padding: var(--space-8) var(--space-6); box-sizing: border-box; }
.k-p4, .k-p4 > *, .k-p4 .k-order-split > * { min-inline-size: 0; }
.k-p4 .k-inventory-table { inline-size: 100%; }
.k-p4 .k-page-header, .k-page-header, .app-shell :is(.screen-heading, .reconciliation-head, .local-workflow-head, .home-hero) { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); margin: 0 0 var(--space-6); padding: 0; background: transparent; border: 0; box-shadow: none; }
.k-p4 h1, .k-page-header h1, .app-shell :is(.screen-heading h2, .reconciliation-head h1, .local-workflow-head h1, .home-hero h2) { font-size: var(--product-title); font-weight: 600; line-height: 1.35; letter-spacing: -.025em; margin: 0; }
.k-p4 :is(h2,h3), .k-setup-row h2, .app-shell :is(.settings-card-heading h3, .home-section-heading h3) { font-size: var(--product-section); margin-block: 0; }
.k-button, .app-shell :is(.action-btn, .ghost-btn) { min-block-size: 36px; border-radius: var(--radius-sm); font-size: .8125rem; font-weight: 500; box-shadow: none; }
.k-p4 :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) { min-block-size: 38px; padding: var(--space-2) var(--space-3); box-sizing: border-box; background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: var(--radius-sm); color: var(--text-primary); font: inherit; max-inline-size: 100%; min-inline-size: 0; }
.k-p4 label { font-size: .8125rem; color: var(--text-secondary); }
.k-p4 input[type="checkbox"] { inline-size: 16px; block-size: 16px; accent-color: var(--accent); }
.k-p4 :is(.k-catalog-toolbar, .k-catalog-actions) { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); margin-block: var(--space-4); }
.k-p4 .k-catalog-toolbar label, .k-p4 .k-catalog-actions label:has(input:not([type="checkbox"])) { display: grid; gap: var(--space-1); }
.k-p4 .k-catalog-actions label:has(input[type="checkbox"]) { display: flex; align-items: center; gap: var(--space-2); }
.k-p4 > label:has(input:not([type="checkbox"])) { display: grid; gap: var(--space-2); max-inline-size: 360px; margin-block: var(--space-4); }
.k-p4 .k-product-form { padding-block: var(--space-4); margin-block: var(--space-4); border: 0; border-block-start: 1px solid var(--border-subtle); background: transparent; box-shadow: none; }
.k-p4 details.k-product-form { display: block; }
.k-p4 details.k-product-form:not([open]) { padding-block: var(--space-2); margin-block: var(--space-2); }
.k-p4 details { margin-block: var(--space-2); }
.k-p4 details > summary, .k-setup-detail summary { cursor: pointer; color: var(--text-secondary); font-size: .8125rem; padding-block: var(--space-2); }
.k-p4 details[open] > summary { color: var(--text-primary); margin-block-end: var(--space-2); }
.k-diagnostic { max-inline-size: 300px; font-size: var(--type-caption); overflow-wrap: anywhere; }
.k-p4 .k-catalog-list { display: block; }
.k-p4 .k-catalog-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, .8fr) minmax(180px, .65fr); gap: var(--space-6); padding: var(--space-4) 0; background: transparent; border: 0; border-block-end: 1px solid var(--border-subtle); border-radius: 0; box-shadow: none; }
.k-p4 .k-catalog-row h2 { font-size: .9375rem; }
.k-p4 .k-catalog-row small { display: block; margin-block: var(--space-1); }
.k-p4 .k-catalog-row > div { min-inline-size: 0; }
.k-p4 .k-catalog-row .k-catalog-actions { grid-column: auto; align-content: center; margin: 0; gap: var(--space-2); }
.k-p4 .k-catalog-row :is(select, input:not([type="checkbox"])) { inline-size: 100%; }
.k-p4 .k-bulk-actions { background: var(--state-selected); padding: var(--space-3); border-radius: var(--radius-sm); }
.k-p4 :is(.k-catalog-review, .k-product-form:has(h2[tabindex]), .k-product-form:has(h3)) { padding: var(--space-6); border: 1px solid var(--accent-strong); border-radius: var(--radius-md); background: var(--bg-surface); }
.k-inventory-starting { border-block-end: 1px solid var(--border-subtle); padding-block-end: var(--space-3); margin-block-end: var(--space-6) !important; }
.k-p4 :is(.k-inventory-table, .k-product-table), .k-table-scroll { border: 0; border-radius: 0; max-inline-size: 100%; overflow: auto; }
.k-p4 table, .k-table { border-collapse: collapse; inline-size: 100%; font-size: .8125rem; }
.k-p4 :is(th, td), .k-table :is(th, td) { padding: var(--space-3); border-block-end: 1px solid var(--border-subtle); text-align: start; vertical-align: middle; font-variant-numeric: tabular-nums; }
.k-p4 thead th, .k-table thead th { position: sticky; inset-block-start: 0; z-index: 1; background: var(--bg-subtle); color: var(--text-secondary); font-weight: 500; white-space: nowrap; }
.k-p4 tbody tr:hover { background: var(--state-hover); }
.k-p4 tr:has([aria-pressed="true"]) { background: var(--state-selected); }
.k-p4 tbody td:first-child > .k-button { padding-inline: 0; border-color: transparent; background: transparent; font-weight: 600; color: var(--text-primary); }
.k-p4 .k-pricing-table td:last-child > button { display: block; margin-block: var(--space-1); min-block-size: 28px; border-color: transparent; background: transparent; padding: var(--space-1) var(--space-2); }
.k-product-status { white-space: nowrap; border: 0; font-weight: 500; }
.k-status-dot { inline-size: 5px; block-size: 5px; border-radius: 50%; background: currentColor; }
.k-row-meta { display: block; color: var(--text-muted); font-size: .75rem; margin-block-start: var(--space-1); }
.k-order-split { grid-template-columns: minmax(0, 1fr) minmax(300px, .8fr); gap: var(--space-6); align-items: start; }
.k-order-detail { border: 0; border-inline-start: 1px solid var(--border-subtle); border-radius: 0; padding: 0 0 0 var(--space-6); padding-inline: var(--space-6) 0; background: transparent; }
.k-order-detail .k-page-header { margin-block-end: var(--space-4); }
.k-order-detail dl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-2); font-size: .8125rem; }
.k-order-detail dt { color: var(--text-secondary); }
.k-order-detail dd { margin: 0; text-align: end; }
.k-p9 tr[data-total="true"] { background: var(--bg-subtle); font-weight: 600; }
.k-p9 tr[data-total="true"] td { text-align: end; }
.k-p9 tr[data-total="true"] th { color: var(--text-primary); }
.k-p4 > p[role="status"]:empty { margin: 0; }
.k-p4 > .k-muted, .k-p4 > .k-badge { font-size: .75rem; margin-block: 0 var(--space-4); }
.k-p4 .k-provider-list { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: var(--space-6); margin-block: var(--space-6); }
.k-marketplaces .k-provider-row { display: flex; flex-direction: column; align-items: start; gap: var(--space-2); padding: var(--space-4) 0; border: 0; border-block-end: 1px solid var(--border-subtle); background: transparent; border-radius: 0; }
.k-marketplaces .k-provider-row h2 { font-size: 1.25rem; }
.k-marketplaces .k-connection-row { border: 0; border-block-end: 1px solid var(--border-subtle); border-radius: 0; padding: var(--space-4) 0; background: transparent; }
.k-setup-hub { max-inline-size: 960px; }
.k-setup-row { grid-template-columns: minmax(0, 1fr) minmax(120px, auto) auto auto; gap: var(--space-4); padding-block: var(--space-5, 20px); }
.k-setup-security { display: contents; }
.k-setup-row .k-button-primary { background: transparent; color: var(--accent-strong); border-color: var(--border-default); }
.k-setup-row small { color: var(--text-muted); font-size: .75rem; }
.app-shell :is(.settings-panel-card, .permission-matrix-card, .permission-create-card, .report-summary-card, .home-total-card, .home-quick-action, .home-priority-grid > button) { border-radius: 0; box-shadow: none; background: transparent; }
.app-shell .settings-grid { display: block; }
.app-shell .settings-panel-card { padding: var(--space-6) 0; border: 0; border-block-end: 1px solid var(--border-subtle); }
.app-shell .settings-card-heading { margin-block-end: var(--space-4); }
.app-shell .settings-section-nav { padding: 0; background: transparent; border: 0; box-shadow: none; }
.app-shell .settings-section-nav button { min-block-size: 44px; border: 0; border-radius: var(--radius-sm); background: transparent; }
.app-shell .settings-section-nav button.active { background: var(--state-selected); color: var(--text-primary); }
.app-shell .settings-section-nav button.active b { color: var(--text-secondary); }
.app-shell .settings-section-intro { padding: 0 0 var(--space-4); border-block-end: 1px solid var(--border-subtle); }
.app-shell .permissions-screen .permissions-layout { grid-template-columns: minmax(220px,.35fr) minmax(0,1fr); gap: var(--space-6); }
.app-shell .permissions-layout > * { min-inline-size: 0; }
.app-shell .permissions-screen { min-inline-size: 0; }
.app-shell .permission-stats { grid-template-columns: repeat(4,minmax(0,1fr)); }
.app-shell .permission-stats > button { min-inline-size: 0; }
.app-shell :is(.permission-users-list,.permission-matrix-card) { border-radius: 0; box-shadow: none; background: transparent; }
.app-shell .permission-table-wrap { max-inline-size: 100%; overflow: auto; }
.app-shell .permission-create-card { grid-template-columns: repeat(3,minmax(0,1fr)); border-radius: var(--radius-sm); box-shadow: none; }
.app-shell .permission-create-card > :is(.permission-create-intro,.create-user-actions) { grid-column: 1 / -1; }
.app-shell .home-quick-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0; }
.app-shell .home-quick-action { min-block-size: 76px; padding: var(--space-4); border: 0; border-block-end: 1px solid var(--border-subtle); justify-content: space-between; }
.app-shell .home-quick-action strong { font-size: .9375rem; }
.app-shell .home-priority-grid { gap: 0; }
.app-shell .home-priority-grid > button { padding: var(--space-4); border: 0; border-inline-end: 1px solid var(--border-subtle); }
.app-shell .home-priority-grid strong { font-size: 1.75rem; font-weight: 500; }
.app-shell .home-total-card { padding: 0; border: 0; text-align: end; }
.app-shell .home-total-card strong { font-size: 1.5rem; }
.app-shell :is(.statement-table, .records-table, .report-table) :is(th,td) { padding-block: var(--space-2); font-size: .8125rem; }
.app-shell :is(.record-filters, .statement-table-tools, .reports-filter-bar) { background: transparent; box-shadow: none; border-radius: 0; }
.app-shell :is(.screen-heading, .home-section-heading, .settings-section-intro) > div > span { font-size: .6875rem; color: var(--text-muted); }
.reconciliation-readonly-banner { display: block; background: transparent; border: 0; padding: var(--space-2) 0; color: var(--text-secondary); font-size: .8125rem; }
.reconciliation-readonly-banner summary { cursor: pointer; }
.reconciliation-readonly-banner strong, .reconciliation-readonly-banner span { display: block; margin-block: var(--space-2); }
.k-reconciliation-detail summary, .reconciliation-source-cell summary { cursor: pointer; color: var(--text-secondary); font-size: .8125rem; padding-block: var(--space-2); }
.app-shell :is(.reconciliation-metrics > div,.reconciliation-section,.returns-order-card,.local-collection-order-card) { background: transparent; box-shadow: none; border-radius: 0; border: 0; border-block-end: 1px solid var(--border-subtle); }
.app-shell .reconciliation-metrics { gap: var(--space-6); }
.app-shell .reconciliation-metrics strong { font-size: 1.5rem; font-weight: 500; }
.app-shell .reconciliation-section { padding: var(--space-6) 0; }
.app-shell .reconciliation-section h2 { font-size: var(--product-section); }
.app-shell .reconciliation-table th { font-weight: 500; }
.app-shell .content-head { margin: 0; padding: var(--space-6); border-block-end: 1px solid var(--border-subtle); }
.app-shell .content-title h2 { font-size: var(--product-title); font-weight: 600; }
.app-shell .table-title-icon { inline-size: 20px; block-size: 20px; }
.app-shell .updated-chip { font-size: .6875rem; background: transparent; border: 0; font-weight: 400; }
.app-shell .content-breadcrumb { font-size: .75rem; }
.app-shell .records-panel { border-radius: 0; border: 0; box-shadow: none; }
.app-shell .records-table thead th { background: var(--bg-subtle); font-weight: 500; }
.app-shell .records-table tbody tr:hover { background: var(--state-hover); }
.app-shell :is(.record-row-actions button,.orders-row-actions button) { border-color: transparent; background: transparent; }
.app-shell .local-workflow-head { margin-block-end: var(--space-6); }
.app-shell :is(.order-editor-card,.journal-details-shell,.order-details-shell,.editor-summary) { background: transparent; border: 0; border-block-end: 1px solid var(--border-subtle); border-radius: 0; box-shadow: none; padding: var(--space-4) 0; }
.app-shell .editor-panel { border-radius: var(--radius-md); background: var(--bg-surface); box-shadow: var(--shadow-md); }
.app-shell .editor-panel-head { background: var(--bg-surface); border-block-end: 1px solid var(--border-subtle); }
.app-shell .order-summary-compact { border-radius: var(--radius-sm); background: var(--bg-subtle); box-shadow: none; }
.app-shell .editor-actions { background: var(--bg-surface); border-block-start: 1px solid var(--border-subtle); }
.k-order-metadata summary { padding-block: var(--space-3); color: var(--text-secondary); cursor: pointer; font-size: .8125rem; }
.app-shell :is(.return-receipt-card,.returns-order-card) { padding: var(--space-4) 0; box-shadow: none; }
.app-shell :is(.dashboard-panel, .report-panel, .report-controls-card, .dashboard-controls) { border-radius: 0; box-shadow: none; border: 0; background: transparent; padding: var(--space-4) 0; }
.app-shell :is(.dashboard-panel, .report-panel) { border-block-start: 1px solid var(--border-subtle); }
.app-shell .dashboard-grid { gap: var(--space-6); }
.app-shell .reports-screen { align-content: start; min-block-size: 0; }
.app-shell .dashboard-heading { min-block-size: 0; min-height: 0; }
.app-shell .dashboard-panel.dashboard-hero-chart { min-block-size: 0; min-height: 0; }
.app-shell .dashboard-panel .dashboard-empty { min-block-size: 120px; min-height: 120px; }
.app-shell .dashboard-controls { grid-template-columns: minmax(100px,.8fr) repeat(2,minmax(115px,.8fr)) minmax(140px,1fr) minmax(150px,1fr) auto; gap: var(--space-3); align-items: end; }
.app-shell .dashboard-controls label { min-inline-size: 0; }
.app-shell .dashboard-section-nav { display: flex; flex-wrap: wrap; padding: 0; gap: var(--space-6); border: 0; border-block-end: 1px solid var(--border-subtle); border-radius: 0; background: transparent; }
.app-shell .dashboard-section-nav button { min-block-size: 44px; padding: var(--space-2) 0; border: 0; border-block-end: 2px solid transparent; border-radius: 0; background: transparent; color: var(--text-secondary); }
.app-shell .dashboard-section-nav button.active { background: transparent; border-block-end-color: var(--accent-strong); color: var(--text-primary); }
.app-shell .dashboard-section-nav button strong { font-size: .8125rem; font-weight: 500; }
.app-shell .dashboard-metric { border: 0; border-radius: 0; box-shadow: none; background: transparent; padding: var(--space-4); border-inline-end: 1px solid var(--border-subtle); }
.app-shell .dashboard-metric strong { font-weight: 500; font-size: 1.75rem; }
.app-shell .dashboard-metrics { gap: 0; margin-block: var(--space-4); }
.app-shell .standard-summary { border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.app-shell .standard-summary > span { border-inline-end: 1px solid var(--border-subtle); }
.k-report-help, .k-secondary-metrics { color: var(--text-secondary); font-size: .8125rem; }
.k-report-help summary, .k-secondary-metrics summary { cursor: pointer; padding-block: var(--space-2); }
.k-report-help summary { font-size: 0; }
.k-report-help summary::after { content: "?"; font-size: .75rem; }
.k-report-help p { max-inline-size: 60ch; }

.login-page { gap: 0; padding: 0; grid-template-columns: minmax(320px, .8fr) minmax(0, 1.2fr); background: var(--bg-page); }
.login-brand-panel { min-block-size: 100dvh; border-radius: 0; border-inline-end: 1px solid var(--border-subtle); padding: clamp(32px, 6vw, 80px); background: var(--krelen-black); }
.login-brand-panel h1 { font-size: clamp(1.75rem, 2.8vw, 2.75rem); line-height: 1.2; max-inline-size: 12ch; }
.login-card { min-block-size: 100dvh; border: 0; border-radius: 0; background: transparent; padding: var(--space-12) var(--space-6); }
.login-card .login-heading :is(h1,h2) { font-size: 1.625rem; }
.login-form :is(input,select) { min-block-size: 48px; border-radius: var(--radius-sm); background: var(--bg-surface); }
.login-submit { min-block-size: 48px; border-radius: var(--radius-sm); }
.k-company-entry { grid-template-columns: minmax(0,1fr); }
.k-company-entry .login-card { max-inline-size: 520px; inline-size: 100%; margin-inline: auto; }
.k-company-list { display: grid; gap: var(--space-2); }
.k-company-list a { justify-content: space-between; padding: var(--space-4); }
@media (max-width: 1120px) and (min-width: 761px) {
  :root { --product-sidebar: 208px; }
  .app-shell .workspace { grid-template-columns: var(--product-sidebar) minmax(0,1fr); }
  .app-shell .sidebar { inline-size: var(--product-sidebar); }
  .product-shell-tools { flex: 0 1 auto; }
  .product-shell-context { display: none; }
  .k-p4 .k-catalog-row { grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: var(--space-4); }
  .k-p4 .k-catalog-row .k-catalog-actions { grid-column: 1 / -1; }
  .app-shell .dashboard-controls { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .app-shell .permissions-screen .permissions-layout { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 1000px) {
  .k-order-split { grid-template-columns: minmax(0,1fr); }
  .k-order-detail { border-inline-start: 0; border-block-start: 1px solid var(--border-subtle); padding: var(--space-6) 0 0; }
  .k-order-split:has(.k-order-detail) > div:first-child { display: none; }
  .k-order-detail { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .app-shell { padding-block-end: calc(82px + env(safe-area-inset-bottom)); }
  .app-shell .workspace, .app-shell .workspace:has(.sidebar.is-collapsed) { grid-template-columns: minmax(0,1fr); }
  .app-shell .sidebar { display: none; }
  .app-shell .content { border-radius: 0; }
  .product-shell-header { padding: var(--space-3) var(--space-4); gap: var(--space-2); }
  .product-shell-tools { flex: 1 1 100%; inline-size: 100%; justify-content: space-between; }
  .company-context-bar { flex: 1 1 100%; }
  .product-account { flex: 0 1 auto; max-inline-size: 120px; }
  .k-p4, .k-setup-hub, .app-shell :is(.screen-page,.reconciliation-screen,.local-workflow-screen) { padding: var(--space-6) var(--space-4); }
  .k-p4 .k-page-header { margin-block-end: var(--space-4); }
  .k-p4 .k-catalog-row { grid-template-columns: minmax(0,1fr); gap: var(--space-3); }
  .k-p4 .k-provider-list { grid-template-columns: minmax(0,1fr); gap: var(--space-2); }
  .k-setup-row { grid-template-columns: minmax(0,1fr) auto; gap: var(--space-3); }
  .k-setup-row > .k-badge { justify-self: end; }
  .k-setup-row > :is(button,.k-setup-security) { grid-column: auto; }
  .k-setup-row .k-button { font-size: .75rem; }
  .app-shell .home-quick-grid { grid-template-columns: minmax(0,1fr); }
  .app-shell .home-priority-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .app-shell .settings-layout { grid-template-columns: minmax(0,1fr); }
  .app-shell .permissions-screen .permissions-layout { grid-template-columns: minmax(0,1fr); }
  .app-shell .permission-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .app-shell .permission-create-card { grid-template-columns: minmax(0,1fr); }
  .app-shell .settings-section-nav { display: flex; overflow-x: auto; }
  .app-shell .settings-section-nav button { flex: 0 0 auto; }
  .app-shell .dashboard-controls { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .app-shell .dashboard-controls > :is(label:first-child,.dashboard-platform-picker,.dashboard-mode,.reports-refresh) { grid-column: 1 / -1; }
  .k-p4 :is(.k-button,input:not([type="checkbox"]),select), .product-shell-tools .k-button { min-block-size: 44px; }
  .k-p4 input:not([type="checkbox"]), .k-p4 select { font-size: 1rem; }
  .k-p4 .k-pricing-table td:last-child > button { display: inline-flex; min-block-size: 44px; }
  .k-order-operations .k-order-split > div > .k-inventory-table > table,
  .k-p9 .k-order-split > div > .k-inventory-table > table { min-inline-size: 0; }
  .k-order-operations .k-order-split > div > .k-inventory-table :is(table,tbody),
  .k-p9 .k-order-split > div > .k-inventory-table :is(table,tbody) { display: block; }
  .k-order-operations .k-order-split > div > .k-inventory-table thead,
  .k-p9 .k-order-split > div > .k-inventory-table thead { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); }
  .k-order-operations .k-order-split > div > .k-inventory-table tr,
  .k-p9 .k-order-split > div > .k-inventory-table tr { display: grid; grid-template-columns: minmax(0,1fr) auto; padding-block: var(--space-3); border-block-end: 1px solid var(--border-subtle); }
  .k-order-operations .k-order-split > div > .k-inventory-table td,
  .k-p9 .k-order-split > div > .k-inventory-table td { border: 0; padding: var(--space-1); }
  .k-order-operations .k-order-split > div > .k-inventory-table td:nth-child(3),
  .k-p9 .k-order-split > div > .k-inventory-table td:nth-child(3) { grid-column: 1; }
  .login-page { grid-template-columns: minmax(0,1fr); }
  .login-brand-panel { display: none; }
  .login-card { padding: var(--space-8) var(--space-6); }
  .login-mobile-brand { display: block; margin-block-end: var(--space-8); }
}
:lang(ar) :is(.group-title,h1,h2,h3,.brand-kicker) { letter-spacing: 0; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}

:root { --auth-brand-bg: #f3f2ee; --control-height: 40px; }
.k-logo { display: inline-flex; align-items: center; flex-shrink: 0; max-inline-size: 100%; color: var(--brand-wordmark); }
.k-logo[data-logo-theme="light"] { --brand-wordmark: #262925; }
.k-logo[data-logo-theme="dark"] { --brand-wordmark: #f2f1ea; }
.k-logo-compact { gap: var(--space-2); font-size: 1rem; font-weight: 600; }
.k-logo-symbol .krelen-brand-icon, .k-logo-compact .krelen-brand-icon { inline-size: 32px; }
.k-logo-wide { inline-size: clamp(180px, 24vw, 380px); }
.k-logo-wide .krelen-brand-lockup { inline-size: 100%; }
.k-logo-material { inline-size: 100%; }
.k-logo-material img { display: block; inline-size: 100%; block-size: auto; object-fit: contain; }

.login-page:has(.k-auth-brand) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.login-brand-panel.k-auth-brand { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: var(--space-8); background: var(--auth-brand-bg); color: #262925; border: 0; padding: clamp(24px, 3vw, 64px); }
.k-auth-brand .k-logo-wide { inline-size: min(100%, 620px); }
.login-brand-panel.k-auth-brand h1 { font-size: clamp(1.4rem, 2.15vw, 2.2rem); max-inline-size: none; margin: 0; font-weight: 500; letter-spacing: -.035em; text-align: center; }
.login-card { background: var(--bg-surface); }
.login-card .login-heading :is(h1,h2) { font-size: 1.625rem; font-weight: 600; }
.login-mobile-brand { display: none; }
.k-product-manual { margin-block: var(--space-4); }
.k-product-methods { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.k-p4 :is(th,td), .k-table :is(th,td), .app-shell .data-table :is(th,td) { padding-block: var(--space-2); min-block-size: var(--product-row); }
.k-badge { border-radius: 6px; font-size: .75rem; padding: 3px 8px; font-weight: 500; }
.k-p4 .k-page-header, .k-page-header { margin-block-end: var(--space-6); }
.k-button, .app-shell :is(.action-btn,.ghost-btn) { min-block-size: var(--control-height); padding-inline: var(--space-4); }

.k-select { display: inline-grid; position: relative; min-inline-size: 0; max-inline-size: 100%; vertical-align: middle; color: var(--text-primary); font: inherit; }
.k-select > select { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; opacity: 0; cursor: pointer; z-index: 1; margin: 0; }
.k-select-value { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); min-block-size: var(--control-height); box-sizing: border-box; padding: var(--space-2) var(--space-3); background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: var(--radius-sm); }
.k-select-value > span { color: var(--text-muted); }
.k-select:focus-within { outline: 2px solid var(--focus-ring); outline-offset: 3px; border-radius: var(--radius-sm); }
.k-select.is-open { z-index: 30; }
.k-select.is-open .k-select-value { border-color: var(--accent-strong); }
.k-select.is-disabled { opacity: var(--state-disabled-opacity); }
.k-select-options { position: absolute; display: grid; inset-block-start: calc(100% + 6px); inset-inline-start: 0; min-inline-size: 100%; max-inline-size: min(360px, calc(100vw - 32px)); max-block-size: 240px; overflow: auto; background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: var(--radius-sm); padding: var(--space-1); box-shadow: var(--shadow-md); z-index: 31; }
.k-select-options > [role="option"] { display: flex; justify-content: space-between; gap: var(--space-3); padding: var(--space-2) var(--space-3); min-block-size: 36px; box-sizing: border-box; border-radius: 4px; cursor: pointer; white-space: normal; }
.k-select-options > [role="option"][data-active="true"], .searchable-select-list button.active { background: var(--accent-soft); color: var(--accent-strong); }
.k-select-options > [role="option"][aria-selected="true"], .searchable-select-list button.selected { color: var(--accent-strong); font-weight: 600; }
.k-select-options > [aria-disabled="true"] { opacity: var(--state-disabled-opacity); cursor: default; }
.k-language-selector .k-select { min-inline-size: 105px; }
.k-product-fields .k-select, .login-form .k-select { inline-size: 100%; }
.k-inventory-table input[type="number"] { inline-size: 110px; }
@media (max-width: 760px) {
  .login-page:has(.k-auth-brand) { grid-template-columns: minmax(0,1fr); }
  .login-brand-panel.k-auth-brand { min-block-size: 0; padding: var(--space-6) var(--space-4); gap: var(--space-2); }
  .k-auth-brand .k-logo-wide { inline-size: min(100%, 300px); }
  .login-brand-panel.k-auth-brand h1 { font-size: 1.125rem; }
  .login-page:has(.k-auth-brand) .login-card { min-block-size: 0; padding-block: var(--space-8); }
  .k-button, .k-select-value { min-block-size: var(--touch-target); }
}
:lang(ar) :is(.k-page-header h1,.k-select,.k-button,.k-badge) { letter-spacing: 0; }
.k-select { padding: 0; border: 0; background: transparent; min-block-size: 0; }
.k-select-popup { inset-block-start: auto; inset-inline-start: auto; min-inline-size: 0; z-index: 1100; max-block-size: min(240px, 45dvh); }

:host{display:block;font:14px/1.5 var(--font-ui);color:var(--text-primary)}.k-inventory{padding:0!important;max-width:none!important}.k-inventory-table{margin:0!important}table{width:100%;min-width:740px}td[data-hf-value]{font-variant-numeric:tabular-nums;font-size:20px;font-weight:600;color:var(--accent-strong)}td.hf-updated{background:var(--accent-soft);animation:hf-cell .65s ease backwards}@keyframes hf-cell{from{opacity:.4}to{opacity:1}}@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}