:root {
  --ink: #172027;
  --muted: #66727c;
  --line: #dfe5e8;
  --soft: #f3f6f7;
  --panel: #ffffff;
  --nav: #20292f;
  --teal: #087f72;
  --teal-dark: #06665d;
  --amber: #e2a629;
  --red: #c94747;
  --blue: #2d6db2;
  --shadow: 0 12px 28px rgba(23, 32, 39, 0.13);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink);
  background: var(--soft);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--soft); }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .48; }
input, select, textarea { width: 100%; border: 1px solid #ccd5d9; border-radius: 5px; background: #fff; color: var(--ink); outline: none; }
input, select { height: 38px; padding: 0 10px; }
textarea { min-height: 82px; padding: 9px 10px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(8, 127, 114, .12); }
label { display: grid; gap: 6px; color: #48545d; font-size: 13px; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }

.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: #e8edef; }
.login-panel { position: relative; width: min(400px, calc(100vw - 32px)); padding: 36px; border: 1px solid #d5dcdf; border-top: 4px solid var(--teal); background: #fff; box-shadow: var(--shadow); border-radius: 6px; }
.login-panel h1 { margin-top: 18px; font-size: 24px; }
.login-panel > p { margin-top: 5px; color: var(--muted); }
.brand-mark { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 6px; background: var(--teal); color: #fff; font-size: 24px; font-weight: 800; }
.brand-mark.small { width: 36px; height: 36px; font-size: 18px; }
.stack-form { display: grid; gap: 17px; margin-top: 28px; }
.form-error { margin-top: 14px; color: var(--red); font-size: 13px; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 226px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--nav); color: #fff; }
.sidebar-backdrop { display: none; }
.brand-row { height: 70px; display: flex; align-items: center; gap: 11px; padding: 0 18px; border-bottom: 1px solid rgba(255,255,255,.1); }
.brand-row strong, .brand-row span { display: block; }
.brand-row span { margin-top: 2px; color: #aeb8bd; font-size: 12px; }
.main-nav { display: grid; gap: 4px; padding: 15px 10px; }
.main-nav button { height: 42px; display: flex; align-items: center; gap: 11px; border: 0; border-radius: 5px; padding: 0 12px; background: transparent; color: #cbd3d7; text-align: left; }
.main-nav button:hover { background: rgba(255,255,255,.07); color: #fff; }
.main-nav button.active { background: var(--teal); color: #fff; }
.main-nav svg { width: 18px; height: 18px; }
.sidebar-footer { margin-top: auto; display: grid; grid-template-columns: 34px minmax(0,1fr) 34px; align-items: center; gap: 9px; padding: 15px 12px; border-top: 1px solid rgba(255,255,255,.1); }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #dfe9e8; color: var(--teal-dark); font-size: 12px; font-weight: 700; }
.identity { min-width: 0; }
.identity strong, .identity span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.identity strong { font-size: 13px; }
.identity span { color: #aeb8bd; font-size: 11px; margin-top: 3px; }

.workspace { min-width: 0; }
.topbar { height: 70px; display: flex; align-items: center; gap: 12px; padding: 0 24px; border-bottom: 1px solid var(--line); background: #fff; }
.page-heading { min-width: 0; }
.topbar h2 { overflow: hidden; font-size: 19px; text-overflow: ellipsis; white-space: nowrap; }
.topbar p { margin-top: 2px; color: var(--muted); font-size: 11px; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; }
.presence-toggle { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 7px; width: 106px; height: 34px; padding: 0 6px; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: var(--muted); font-size: 12px; }
.presence-toggle[aria-checked="true"] { color: #08685e; border-color: #90c9bc; }
.presence-toggle:disabled { cursor: wait; opacity: .65; }
.presence-track { position: relative; flex: 0 0 28px; width: 28px; height: 16px; border-radius: 8px; background: #86939a; }
.presence-track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 10px; height: 10px; border-radius: 50%; background: #fff; }
.presence-toggle[aria-checked="true"] .presence-track { background: #087d6f; }
.presence-toggle[aria-checked="true"] .presence-track::after { left: 15px; }
.language-control { min-width: 116px; height: 34px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 5px; padding: 0 8px; background: #fff; color: var(--ink); }
.language-control svg { width: 16px; height: 16px; flex: 0 0 auto; color: var(--muted); }
.language-control select { width: 100%; height: 30px; border: 0; outline: 0; padding: 0; background: transparent; color: inherit; font-size: 12px; }
.login-language { position: absolute; top: 18px; right: 18px; min-width: 112px; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; }
html[lang="uz-Latn-UZ"] .topbar h2 { font-size: 16px; }
.mobile-menu { display: none !important; }
.icon-button { width: 34px; height: 34px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 5px; background: transparent; color: inherit; }
.icon-button:hover { background: rgba(127,143,151,.12); }
.icon-button svg { width: 17px; height: 17px; }
.view { display: none; min-width: 0; }
.view.active { display: block; }

.status-tabs { display: flex; gap: 4px; overflow-x: auto; padding: 14px 24px 0; background: #fff; border-bottom: 1px solid var(--line); }
.status-tabs button { flex: 0 0 auto; min-width: 82px; height: 42px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: #59656d; }
.status-tabs button.active { border-bottom-color: var(--teal); color: var(--teal-dark); font-weight: 700; }
.status-tabs small { display: inline-block; min-width: 22px; margin-left: 5px; padding: 2px 5px; border-radius: 9px; background: #edf1f2; color: #5a6870; }
.order-record-filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 24px; background: #fff; border-bottom: 1px solid var(--line); }
.record-filter { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 5px; cursor: pointer; font-size: 13px; }
.record-filter:has(input:checked) { border-color: var(--teal); color: var(--teal-dark); background: #eaf6f3; }
.record-filter input { width: 15px; height: 15px; min-height: 0; margin: 0; accent-color: var(--teal); }
.record-filter small { font-variant-numeric: tabular-nums; color: var(--muted); }
.filter-band, .toolbar-band { padding: 14px 24px; border-bottom: 1px solid var(--line); background: #fff; }
.filter-band.compact { margin-bottom: 14px; }
.filter-grid { display: grid; grid-template-columns: repeat(6, minmax(130px, 1fr)); gap: 12px; align-items: end; }
.filter-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.toolbar-band { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.inline-form { display: flex; align-items: center; gap: 8px; }
.inline-form input { width: 250px; }
.inline-form select { width: 140px; }
.staff-toolbar { align-items: end; }
.staff-filter-form { flex: 1; display: grid; grid-template-columns: minmax(210px, 1.4fr) repeat(4, minmax(135px, 1fr)) auto; gap: 10px; align-items: end; }
.staff-table { min-width: 1760px; }
.staff-presence-cell { width: 84px; text-align: center; }
.presence-indicator { display: inline-flex; width: 24px; height: 24px; align-items: center; justify-content: center; vertical-align: middle; color: #c72d3d; }
.presence-indicator.online { color: #16803c; }
.presence-indicator svg { width: 20px; height: 20px; }
.settings-section { padding: 22px 24px; border-bottom: 1px solid var(--line); background: #fff; }
.withdrawal-rules-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.withdrawal-rules-heading h2 { margin: 0; font-size: 16px; }
.withdrawal-rule-values { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px 24px; margin: 0 0 12px; }
.withdrawal-rule-values dt { color: var(--muted); font-size: 12px; margin-bottom: 5px; }
.withdrawal-rule-values dd { margin: 0; font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.withdrawal-rule-policy { color: var(--muted); font-size: 12px; line-height: 1.6; margin: 0 0 12px; }
.withdrawal-instructions { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.65; margin: 0; }
.withdrawal-rules-form textarea { min-height: 150px; }
#view-finance > .toolbar-band { flex-wrap: wrap; }
#view-finance > .toolbar-band .segmented { flex-shrink: 0; max-width: 100%; }
#view-finance > .toolbar-band .segmented button { white-space: nowrap; }
.scope-form { width: min(920px, 100%); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.scope-form .full { grid-column: 1 / -1; }
.scope-actions { display: flex; justify-content: flex-end; }
.button { min-height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid #cbd3d7; border-radius: 5px; padding: 0 13px; background: #fff; color: #34414a; white-space: nowrap; }
.button:hover { border-color: #9daab0; background: #f8fafb; }
.button.primary { border-color: var(--teal); background: var(--teal); color: #fff; }
.button.primary:hover { border-color: var(--teal-dark); background: var(--teal-dark); }
.button.danger { border-color: #e7c3c3; color: var(--red); background: #fff7f7; }
.button.small { min-height: 30px; padding: 0 9px; font-size: 12px; }
.button.wide { width: 100%; height: 42px; }
.button svg { width: 15px; height: 15px; }

.table-section { min-width: 0; margin: 14px 18px 22px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.table-meta { min-height: 43px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.table-scroll { max-width: 100%; overflow: auto; }
.data-table { width: 100%; min-width: 880px; border-collapse: collapse; font-size: 13px; }
.order-table { min-width: 1320px; }
.data-table th { height: 42px; padding: 0 11px; background: #f5f7f8; color: #536069; font-size: 12px; font-weight: 600; text-align: left; white-space: nowrap; }
.data-table td { padding: 11px; border-top: 1px solid #e8edef; vertical-align: middle; }
.data-table tbody tr:hover { background: #f8fbfb; }
.data-table .sticky-right { position: sticky; right: 0; z-index: 1; background: inherit; box-shadow: -8px 0 12px rgba(19,34,42,.04); }
.order-id { color: var(--teal-dark); font-weight: 700; }
.subtext { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.line-clamp { display: -webkit-box; max-width: 260px; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.status-tag { display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px; border-radius: 4px; background: #edf5f4; color: var(--teal-dark); font-size: 12px; font-weight: 600; }
.status-tag.red { background: #fff0f0; color: var(--red); }
.status-tag.amber { background: #fff7e5; color: #946816; }
.status-tag.blue { background: #eef5fc; color: var(--blue); }
.status-tag.gray { background: #f1f3f5; color: #66737b; }
.status-tag.green { background: #edf8f1; color: #18794e; }
.order-scrollbar { position: fixed; bottom: 0; height: 22px; z-index: 35; background: #eef2f4; border-top: 1px solid var(--line); padding: 2px 4px; }
.order-scrollbar input { display: block; appearance: none; -webkit-appearance: none; width: 100%; height: 17px; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; cursor: ew-resize; }
.order-scrollbar input::-webkit-slider-runnable-track { height: 12px; border-radius: 6px; background: #dce3e7; }
.order-scrollbar input::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: var(--scroll-thumb-width, 80px); height: 12px; border-radius: 6px; background: #697f8b; }
.order-scrollbar input::-moz-range-track { height: 12px; border-radius: 6px; background: #dce3e7; }
.order-scrollbar input::-moz-range-thumb { width: var(--scroll-thumb-width, 80px); height: 12px; border: 0; border-radius: 6px; background: #697f8b; }
#view-orders { padding-bottom: 24px; }
.pagination { min-height: 50px; display: flex; justify-content: flex-end; align-items: center; gap: 7px; padding: 8px 13px; border-top: 1px solid var(--line); }
.pagination button { min-width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.pagination button.active { border-color: var(--teal); background: var(--teal); color: #fff; }
.empty-cell { height: 180px; color: var(--muted); text-align: center; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(160px, 1fr)); gap: 12px; padding: 0 18px 14px; }
.metric { min-height: 102px; padding: 17px; border: 1px solid var(--line); border-top: 3px solid var(--teal); border-radius: 6px; background: #fff; }
.metric span { color: var(--muted); font-size: 12px; }
.metric strong { display: block; margin-top: 12px; font-size: 26px; }
.split-section { display: grid; grid-template-columns: .8fr 1.2fr; gap: 14px; margin: 0 18px 22px; }
.plain-panel { min-width: 0; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.section-heading { height: 48px; display: flex; align-items: center; padding: 0 15px; border-bottom: 1px solid var(--line); }
.section-heading h3 { font-size: 15px; }
.status-matrix { display: grid; grid-template-columns: repeat(3, 1fr); }
.status-matrix div { min-height: 70px; display: grid; place-items: center; align-content: center; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.status-matrix strong { font-size: 19px; }
.status-matrix span { margin-top: 4px; color: var(--muted); font-size: 11px; }
.segmented { display: inline-flex; border: 1px solid var(--line); border-radius: 5px; overflow: hidden; }
.segmented button { height: 34px; border: 0; border-right: 1px solid var(--line); padding: 0 13px; background: #fff; }
.segmented button:last-child { border-right: 0; }
.segmented button.active { background: var(--ink); color: #fff; }

.backdrop { position: fixed; inset: 0; z-index: 20; background: rgba(21,30,36,.42); }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 21; width: min(760px, 96vw); display: flex; flex-direction: column; background: #fff; box-shadow: -18px 0 36px rgba(15,25,31,.2); transform: translateX(105%); transition: transform .2s ease; }
.drawer.open { transform: translateX(0); }
.drawer-header { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.drawer-header h2 { font-size: 19px; }
.drawer-header p { margin-top: 3px; color: var(--muted); font-size: 12px; }
.drawer-actions { display: flex; align-items: center; gap: 10px; }
.countdown { min-width: 78px; color: var(--red); font-variant-numeric: tabular-nums; font-weight: 700; }
.drawer-content { flex: 1; overflow: auto; padding: 17px 18px 40px; }
.detail-section { padding: 16px 0; border-bottom: 1px solid var(--line); }
.detail-section:first-child { padding-top: 0; }
.detail-section h3 { margin-bottom: 13px; font-size: 15px; }
.section-heading-inline { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 13px; }
.section-heading-inline h3 { margin-bottom: 0; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.detail-grid .full { grid-column: 1 / -1; }
.item-editor { display: grid; gap: 8px; }
.item-row { display: grid; grid-template-columns: minmax(0,1fr) 82px auto; gap: 8px; align-items: center; padding: 9px; border: 1px solid var(--line); border-radius: 5px; }
.item-row button { height: 34px; }
.item-summary { min-width: 0; overflow-wrap: anywhere; }
.item-freight { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-top: 5px; color: var(--muted); font-size: 12px; }
.item-freight strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.item-actions { display: flex; gap: 6px; }
.detail-total { margin: 12px 0; color: var(--muted); text-align: right; }
.detail-total strong { color: var(--ink); font-size: 17px; }
.action-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
.history-list { display: grid; gap: 10px; }
.history-item { display: grid; grid-template-columns: 12px minmax(0,1fr); gap: 9px; }
.history-dot { width: 9px; height: 9px; margin-top: 5px; border-radius: 50%; background: var(--teal); }
.history-item p { font-size: 13px; }
.history-item small { display: block; margin-top: 4px; color: var(--muted); }

.modal { width: min(620px, 94vw); max-height: 88vh; padding: 0; border: 0; border-radius: 6px; box-shadow: var(--shadow); }
.modal::backdrop { background: rgba(21,30,36,.42); }
.modal form { display: flex; max-height: 88vh; flex-direction: column; }
.modal header, .modal footer { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.modal footer { justify-content: flex-end; border-top: 1px solid var(--line); border-bottom: 0; }
.modal h3 { font-size: 17px; }
.modal header p { margin-top: 3px; color: var(--muted); font-size: 11px; }
.modal-body { overflow: auto; padding: 17px; }
.modal-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 13px; }
.modal-grid .full { grid-column: 1 / -1; }
.product-description > span { display: block; margin-bottom: 6px; color: #48545d; font-size: 13px; }
.product-description > div { max-height: 340px; overflow: auto; border: 1px solid var(--line); border-radius: 5px; padding: 13px; background: #fbfcfc; color: var(--ink); font-size: 14px; line-height: 1.65; }
.product-description img { display: block; max-width: 100%; height: auto; margin: 10px 0; }
.product-description p + p { margin-top: 8px; }
.picker-results { display: grid; max-height: 380px; overflow: auto; margin-top: 12px; border: 1px solid var(--line); border-radius: 5px; }
.picker-row { display: block; min-height: 58px; border: 0; border-bottom: 1px solid var(--line); padding: 9px 11px; background: #fff; color: var(--ink); text-align: left; }
.picker-row:last-child { border-bottom: 0; }
.picker-row:hover { background: #f1f7f6; }
.picker-row strong, .picker-row span { display: block; }
.picker-row span { margin-top: 5px; color: var(--muted); font-size: 11px; }
.empty-picker { padding: 28px; color: var(--muted); text-align: center; }
.check-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.check-grid label { display: flex; align-items: center; gap: 6px; }
.check-grid input { width: 16px; height: 16px; }
.toast-region { position: fixed; inset: 18px 18px auto auto; margin: 0; padding: 0; border: 0; background: transparent; overflow: visible; z-index: 2147483647; display: grid; gap: 9px; pointer-events: none; max-width: calc(100vw - 36px); }
.toast { min-width: min(240px, calc(100vw - 36px)); max-width: 420px; padding: 14px 16px; border: 1px solid #9cdaca; border-left: 5px solid #087f67; border-radius: 5px; background: #edfff7; color: #075b49; box-shadow: 0 6px 24px #0003; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.toast.error { border-color: #ef9898; border-left-color: #dc2626; background: #fff0f0; color: #a51616; }

@media (max-width: 1120px) {
  .filter-grid { grid-template-columns: repeat(3, minmax(130px, 1fr)); }
  .staff-filter-form { grid-template-columns: repeat(3, minmax(140px, 1fr)); }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .split-section { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .login-shell { padding: 16px; }
  .login-panel { padding: 28px 22px; }
  .app-shell { display: block; }
  body.mobile-sidebar-open { overflow: hidden; }
  .sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 39; width: 100%; height: 100%; padding: 0; border: 0; border-radius: 0; background: rgba(21,30,36,.32); touch-action: none; cursor: default; }
  .sidebar { position: fixed; z-index: 40; width: 226px; height: 100vh; height: 100dvh; overflow-y: auto; overscroll-behavior: contain; transform: translateX(-105%); transition: transform .2s ease; }
  .sidebar.open { transform: translateX(0); }
  .mobile-menu { display: inline-grid !important; }
  .topbar { padding: 0 12px; }
  .topbar-actions { gap: 7px; }
  #clock { display: none; }
  .language-control { min-width: 104px; }
  .topbar .language-control { width: 104px; }
  .topbar p { display: none; }
  html[lang="uz-Latn-UZ"] .topbar h2 { font-size: 14px; }
  .status-tabs, .filter-band, .toolbar-band, .order-record-filters { padding-left: 12px; padding-right: 12px; }
  .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-actions { grid-column: 1 / -1; flex-wrap: wrap; }
  .table-section, .split-section { margin-left: 10px; margin-right: 10px; }
  .metric-grid { grid-template-columns: 1fr 1fr; padding-left: 10px; padding-right: 10px; }
  .metric { min-height: 90px; padding: 13px; }
  .metric strong { font-size: 21px; }
  .detail-grid, .modal-grid { grid-template-columns: 1fr; }
  .detail-grid .full, .modal-grid .full { grid-column: auto; }
  .item-row { grid-template-columns: minmax(0, 1fr) auto; }
  .item-summary { grid-column: 1 / -1; }
  .item-row > label { max-width: 82px; }
  .action-grid { grid-template-columns: repeat(2, 1fr); }
  .inline-form { width: 100%; flex-wrap: wrap; }
  .inline-form input { width: 100%; }
  .staff-toolbar { align-items: stretch; flex-direction: column; }
  .staff-filter-form, .scope-form { grid-template-columns: 1fr 1fr; }
  .staff-filter-form .button { align-self: end; }
  .settings-section { padding-left: 12px; padding-right: 12px; }
}

.password-field, .phone-field, .copy-cell { display: flex; align-items: center; gap: 8px; min-width: 0; }
.password-field input, .phone-field input { min-width: 0; flex: 1; }
.remember-options { display: flex; gap: 20px; flex-wrap: wrap; }
.remember-options label { display: flex; align-items: center; gap: 6px; }
.remember-options input { width: 16px; height: 16px; }
.order-table { min-width: 1600px; }
.order-table .sticky-right { background: #fff; min-width: 94px; }
.order-table th.sticky-right { background: #f4f7f8; }
.order-product { display: flex; align-items: center; gap: 10px; }
.order-product img { width: 48px; height: 48px; object-fit: contain; flex: 0 0 48px; background: #fff; border: 1px solid #e1e7eb; border-radius: 4px; }
.order-product > div { min-width: 0; }
.daily-panel { margin: 20px 24px; }
.daily-panel table { min-width: 1020px; }
.date-shortcuts { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.split-section > div:only-child { grid-column: 1 / -1; }
#view-dashboard .split-section:not(.overview) { grid-template-columns: 1fr; }
#dashboard-comparison-panel table { min-width: 560px; }
.distribution-row { display: grid; grid-template-columns: minmax(90px, 1fr) 2fr 40px; gap: 12px; align-items: center; padding: 8px 20px; }
.distribution-row meter { width: 100%; height: 20px; }
.distribution-row meter::-webkit-meter-optimum-value { background: var(--meter-color); }
#dashboard-distribution { display: flex; align-items: center; gap: 24px; padding: 20px; flex-wrap: wrap; }
.donut-chart { width: 150px; height: 150px; flex: 0 0 150px; border-radius: 50%; display: grid; place-items: center; }
.donut-chart > span { width: 90px; height: 90px; border-radius: 50%; display: grid; place-items: center; background: white; font-size: 22px; font-weight: 600; }
.donut-legend { flex: 1; min-width: 180px; }
.donut-legend > div { display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: 8px; margin: 10px 0; font-size: 13px; }
.legend-swatch { width: 8px; height: 8px; border-radius: 2px; }
.metric small { color: #63717b; font-size: 11px; }
.qa-toolbar { display: flex; gap: 4px; border-bottom: 1px solid #dee5e9; padding-bottom: 8px; }
.qa-editor { min-height: 260px; max-height: 55vh; overflow: auto; padding: 12px; border: 1px solid #ccd6df; border-radius: 4px; line-height: 1.6; overflow-wrap: anywhere; }
.product-description { overflow-wrap: anywhere; }
.copy-cell { justify-content: space-between; }
.copy-cell span { overflow-wrap: anywhere; }
.copy-cell button { flex: 0 0 32px; width: 32px; height: 32px; }
.amount-credit { color: #117969; }
.amount-debit { color: #c74454; }
.clipboard-input { position: fixed; left: -10000px; top: 0; }
.flatpickr-calendar { z-index: 10000; }
.flatpickr-day.selected { background: #147d71; border-color: #147d71; }
#withdrawal-filter-form input { max-width: 200px; }
@media (max-width: 680px) {
  .daily-panel { margin: 16px 10px; }
  .copy-cell { min-width: 120px; }
  .distribution-row { padding: 8px 12px; }
}
@media (prefers-reduced-motion: reduce) { .sidebar { transition: none; } }
.callback-item { display: grid; grid-template-columns: minmax(0,1fr) 76px 38px; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid #e2e8e9; }
.callback-item span { overflow-wrap: anywhere; }
#toast-region[popover] { border: 0; background: transparent; padding: 0; margin: 0; left: auto; bottom: auto; }
.assignment-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.assignment-table { min-width: 2160px; }
.assignment-table [data-assignment-column] { min-width: 190px; }
.assignment-table .status-tag { white-space: nowrap; }
.assignment-modes, .assignment-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.assignment-tools label { display: grid; gap: 5px; font-size: 12px; }
.assignment-tools input, .assignment-tools select { width: 180px; max-width: 100%; }
.assignment-tools .button { min-height: 38px; }
#assignment-import-progress { flex-basis: 100%; font-size: 13px; color: #48616c; }
#assignment-import-progress:empty { display: none; }
.assignment-recipients { max-height: 45vh; overflow: auto; }
.assignment-recipients label { display: grid; grid-template-columns: 20px minmax(0,1fr) 44px; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid #e3e9ed; }
.assignment-recipients small { display: block; color: #63717b; overflow-wrap: anywhere; }
.assignment-recipients b { text-align: right; }
.assignment-priority { display: flex; gap: 10px; align-items: center; margin-top: 18px; }
.assignment-offer { width: 440px; max-width: calc(100vw - 24px); }
#assignment-countdown { display: block; font-size: 32px; font-variant-numeric: tabular-nums; font-weight: 600; margin-top: 12px; color: #9b5d09; }
.assignment-toolbar input[type=checkbox], .assignment-recipients input, .assignment-priority input, [data-select-assignment], #assignment-select-all { width: 18px; height: 18px; accent-color: #087c70; }
@media (max-width: 760px) {
  .assignment-toolbar { padding: 12px; }
  .assignment-tools { width: 100%; }
  .assignment-tools label { flex: 1 1 140px; min-width: 0; }
  .assignment-tools input, .assignment-tools select { width: 100%; }
  .assignment-tools .button { white-space: normal; }
}
