:root { --accent: #3c6fa8; --accent-soft: #e8eff5; --chart-secondary: #8067d1; --ink: #252f3e; --muted: #5d6b79; --line: #e0e6ed; --surface: #fff; --background: #f5f7fa; --subtle: #f7f9fb; --danger: #b54352; color-scheme: light; }
.mobile-logout { display: none; }
.mobile-rate-chip, .mobile-only { display: none; }
.desktop-only { display: inline; }
.mobile-topbar, .menu-close, .menu-backdrop { display: none; }
.dashboard-grid { align-items: start; }
.dashboard-grid .revenue-chart { grid-column: 1 / -1; align-self: start; }
#topProducts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
@media (max-width:599px) { #topProducts { grid-template-columns: 1fr; } }
.chart-toolbar { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.chart-toolbar > label { display: flex; gap: 10px; align-items: center; font-size: 14px; }
.chart-toolbar select { width: auto; }
.chart-toolbar input[type=checkbox] { width: 20px; height: 20px; }
.chart-stage { position: relative; }
.chart-tooltip { position: absolute; z-index: 5; min-width: 210px; max-width: min(290px, calc(100% - 16px)); background: var(--surface); border: 1px solid var(--line); box-shadow: 0 8px 30px #0003; padding: 14px; border-radius: 12px; font-size: 13px; pointer-events: none; direction: rtl; }
.chart-tooltip strong { display: block; margin-bottom: 10px; }
.chart-tooltip > div { display: flex; gap: 12px; justify-content: space-between; margin-bottom: 5px; }
.chart-tooltip small { display: block; color: var(--muted); line-height: 1.8; }
.chart-readout { font-size: 13px; line-height: 1.9; color: var(--muted); margin-top: 8px; }
.chart-readout > div { display: inline-flex; gap: 7px; margin-inline-end: 16px; }
.chart-readout strong { margin-inline-end: 18px; color: var(--ink); }
.chart-readout small { display: block; }
.chart-crosshair { stroke: var(--muted); stroke-dasharray: 4 4; pointer-events: none; }
.chart-focus { pointer-events: none; }
.chart-hit-area { cursor: crosshair; touch-action: pan-y; }
.rate-axis { fill: var(--chart-secondary); }
.rate-bubble { cursor: pointer; transition: opacity .15s; }
.rate-bubble:hover, .rate-bubble:focus, .rate-bubble.selected { fill-opacity: 1; stroke: var(--ink); stroke-width: 2; outline: none; }
@media (max-width:599px) { .chart-toolbar { gap: 12px; }.chart-toolbar > label { width: 100%; flex-wrap: wrap; }.chart-tooltip { font-size: 12px; padding: 10px; }.chart-readout > div { display: flex; } }
.seller-card { margin-top: 20px; }
@media (max-width:599px) { .mobile-logout { display: block; } }
:root[data-theme="dark"] { --accent: #8ab8f1; --accent-soft: #192b3d; --chart-secondary: #b9a1fc; --ink: #eaf0f7; --muted: #acbac9; --line: #354354; --surface: #18222e; --background: #101821; --subtle: #1d2a38; --danger: #ff8e9b; color-scheme: dark; }
body { background: var(--background); color: var(--ink); }

.sidebar { background: var(--surface); color: var(--ink); border-left: 1px solid var(--line); padding: 28px 17px 17px; gap: 5px; }
.sidebar-brand img { border-radius: 10px; }
.sidebar-caption { margin: 8px 46px 20px 0; color: var(--muted); font-size: 12px; }
.sidebar-brand .wordmark { font-size: 22px; letter-spacing: -1px; }
.brand-title{font-size:22px;font-weight:700;letter-spacing:-.6px;line-height:1.7;}.brand-title small{display:block;font-size:12px;color:var(--muted);font-weight:400;letter-spacing:0;}.catalog-nav{padding:12px;color:var(--muted);text-decoration:none;font-size:14px;border-radius:9px;}.catalog-nav:hover{background:var(--accent-soft);color:var(--accent);}
.brand-dot { color: var(--accent); }
.workspace-nav { overflow-y: auto; gap: 3px; padding-inline-end: 2px; scrollbar-width: thin; }
.nav-group-label { color: var(--muted); font-size: 12px; margin: 16px 12px 8px; }
.workspace-nav button { color: var(--muted); min-height: 44px; padding: 10px 12px; font-size: 14px; border-radius: 9px; }
.workspace-nav button:hover { background: var(--subtle); color: var(--ink); }
.workspace-nav button.active { background: var(--accent-soft); color: var(--accent); }
.nav-icon { font-size: 20px; }
.sidebar-bottom { padding-top: 18px; border-top: 1px solid var(--line); margin-top: 20px; }
.profile small, .logout { color: var(--muted); }.profile strong { color: var(--ink); }.logout { font-size: 13px; }
.avatar { background: var(--accent-soft); color: var(--accent); }
main { padding: 28px 38px; max-width: 1540px; }
.workspace-header { margin-bottom: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.breadcrumb { font-family: Arial, sans-serif; font-size: 12px; letter-spacing: 2px; color: var(--muted); }
.workspace-header h1 { font-size: 25px; }
.workspace-intro { font-size: 13px; margin-bottom: 25px; color: var(--muted); }
.workspace-intro p { display: flex; align-items: center; gap: 7px; }
.live-dot { width: 6px; height: 6px; background: var(--accent); border-radius: 100%; box-shadow: 0 0 0 4px var(--accent-soft); }
.today-label, .workspace-footer { color: var(--muted); }
.primary { background: var(--accent); color: #fff; border: 1px solid var(--accent); box-shadow: 0 3px 10px #25598d1a; }
[data-theme="dark"] .primary { color: #101d2a; }
.primary:hover { filter: brightness(1.07); }
.secondary, .export-button, .row-edit, .recipient-save { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.secondary:hover, .export-button:hover { background: var(--subtle); border-color: var(--accent); }
.danger { color: var(--danger); background: transparent; border: 1px solid var(--line); }
input, textarea, select { background: var(--surface); color: var(--ink); border: 1px solid var(--line); font: inherit; border-radius: 9px; padding: 11px; width: 100%; min-width: 0; }
label { color: var(--ink); font-weight: 400; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); outline: 0; box-shadow: 0 0 0 3px var(--accent-soft); }
.inline-price, .stock-editor, .input-with-suffix { background: var(--surface); border-color: var(--line); }
.inline-price input, .stock-editor input, .input-with-suffix input { background: var(--surface); }
.stock-editor button, .filter-row, .product-table-head, .field-card { background: var(--subtle); color: var(--muted); border-color: var(--line); }
.product-row { border-color: var(--line); }
.product-row:hover, .product-row.saving { background: var(--subtle); }
.filter-chip.active { background: var(--surface); color: var(--accent); }
.product-main small, .status-text, .autosave-note { color: var(--muted); }
.admin-search input { background: var(--surface); }
.stat { background: var(--surface); border-color: var(--line); }
.stat:first-child { background: var(--accent-soft); border-color: var(--line); }
.stat small { color: var(--muted); }
.modal-card, .auth-card, .recipient-card { background: var(--surface); border-color: var(--line); }
.modal-close { background: var(--subtle); color: var(--muted); }
.auth-view { background: var(--background); }
.auth-intro { background: #101f2d; }
.recipient-status { background: var(--subtle); color: var(--muted); }
.recipient-status.enabled { background: var(--accent-soft); color: var(--accent); }
.toast { background: var(--ink); color: var(--surface); }
.dashboard-hero { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin: 0 0 27px; }
.eyebrow { font-family: Arial, sans-serif; display: block; font-size: 12px; letter-spacing: 2px; color: var(--muted); direction: ltr; text-align: right; }
.dashboard-hero h2 { font-size: 30px; font-weight: 600; margin: 9px 0; letter-spacing: -1px; }
.dashboard-hero p { color: var(--muted); font-size: 15px; margin: 0; line-height: 1.9; }
.analytics-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 22px; }
.period-tabs { display: flex; gap: 5px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.period-tabs button { background: transparent; color: var(--muted); border: 0; min-height: 40px; padding: 8px 18px; font-size: 14px; border-radius: 7px; }
.period-tabs button.active { background: var(--accent-soft); color: var(--accent); }
#analyticsRange { display: flex; gap: 8px; align-items: end; }
#analyticsRange label { display: flex; align-items: center; gap: 5px; font-size: 13px; color: var(--muted); }
#analyticsRange input { width: 158px; font-size: 14px; padding: 8px; min-height: 42px; }
#analyticsRange button { font-size: 14px; padding: 8px 15px; }
.sales-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; margin-bottom: 22px; }
.sales-stat { padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.sales-stat.featured { background: linear-gradient(125deg, #21384f, #152739); border-color: #21384f; color: #f3f7fb; }
.stat-label { display: flex; justify-content: space-between; align-items: center; gap: 5px; font-size: 14px; color: var(--muted); }
.featured .stat-label, .featured small { color: #afc1d3; }
.stat-label span { font-family: sans-serif; font-size: 17px; padding: 6px 9px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); }
.sales-stat strong { display: block; font-size: clamp(20px, 1.8vw, 28px); font-weight: 600; letter-spacing: -.5px; margin: 19px 0 12px; overflow-wrap: anywhere; }
.sales-stat small { color: var(--muted); font-size: 13px; line-height: 1.9; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; }
.chart-card { padding: 24px; }
.chart-card h3 { font-size: 19px; font-weight: 600; margin: 10px 0 24px; }
.chart-heading { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.chart-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--muted); }
.chart-legend i, .channel-color { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.chart-legend .profit-dot { background: var(--chart-secondary); margin-inline-start: 7px; }
.chart-wrap svg { width: 100%; display: block; overflow: visible; direction: ltr; }
.chart-grid-line { stroke: var(--line); stroke-dasharray: 4 5; }
.chart-axis { font-size: 14px; fill: var(--muted); }
.rate-chart { grid-column: 2; grid-row: 2; }
.channel-row { margin-bottom: 20px; }
.channel-row > div { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 14px; margin-bottom: 9px; }
.channel-row span { display: flex; align-items: center; gap: 7px; }
.channel-row small { display: block; color: var(--muted); font-size: 13px; margin-top: 5px; }
.channel-1 { background: var(--chart-secondary); }.channel-2 { background: #e6ac62; }.channel-3 { background: #76a3ce; }
progress { width: 100%; height: 5px; border: 0; border-radius: 5px; background: var(--line); accent-color: var(--accent); }
progress::-webkit-progress-bar { background: var(--line); border-radius: 5px; } progress::-webkit-progress-value { background: var(--accent); border-radius: 5px; }
.rank-row { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); padding: 15px 0; }
.rank-row:last-child { border: 0; }.rank-number { font-size: 13px; color: var(--muted); background: var(--subtle); border-radius: 8px; padding: 8px 12px; }
.rank-row div { flex: 1; min-width: 0; }.rank-row strong { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }.rank-row small { display: block; color: var(--muted); font-size: 13px; margin-top: 4px; }.rank-row b { font-size: 16px; font-weight: 600; text-align: center; }
.text-link { color: var(--accent); font-size: 14px; text-decoration: none; }
.dashboard-links { display: flex; gap: 12px; margin: 22px 0; flex-wrap: wrap; }.dashboard-links a, .dashboard-links button { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 13px 20px; color: var(--muted); text-decoration: none; font-size: 14px; }
.operation-page-heading { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 24px; }.operation-page-heading h2 { font-size: 21px; margin: 0 0 7px; }.operation-page-heading p { color: var(--muted); font-size: 14px; line-height: 1.9; margin: 0; }
.row-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 14px; }.row-actions button, .row-actions a { font-size: 13px; padding: 8px 11px; min-height: 40px; white-space: nowrap; border-radius: 7px; }
.data-table-wrap { width: 100%; overflow-x: auto; }.data-table { width: 100%; border-collapse: collapse; font-size: 14px; text-align: right; }.data-table th { background: var(--subtle); color: var(--muted); font-size: 13px; font-weight: 600; white-space: nowrap; padding: 14px; }.data-table td { padding: 18px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; max-width: 290px; white-space: pre-line; overflow-wrap: anywhere; line-height: 1.9; }.data-table tbody tr:hover { background: var(--subtle); }
.badge { display: inline-block; padding: 5px 9px; border-radius: 6px; background: var(--subtle); color: var(--muted); font-size: 12px; white-space: nowrap; }.status-settled, .status-delivered, .status-resolved { color: var(--accent); background: var(--accent-soft); }.status-reserved_deposit, .status-checking { color: #946418; background: #d49b4415; }[data-theme="dark"] .status-reserved_deposit, [data-theme="dark"] .status-checking { color: #f0c47d; }.status-cancelled, .status-rejected { color: var(--danger); background: #c2526012; }
.list-filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }.list-filters input { flex: 1; min-width: 150px; }.list-filters select { width: 190px; font-size: 14px; }.list-filters button { font-size: 14px; }
.operation-dialog { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 18px; width: min(800px, calc(100vw - 32px)); padding: 28px; max-height: 90dvh; overflow-y: auto; box-shadow: 0 20px 100px #0004; }.operation-dialog::backdrop { background: #071016aa; backdrop-filter: blur(5px); }.operation-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 24px 0; }.wide-field, .operation-fields .data-table-wrap { grid-column: 1 / -1; }.operation-fields textarea { font-size: 15px; }.form-error { font-size: 14px; color: var(--danger); line-height: 2; }.permission-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; padding: 15px; background: var(--subtle); border-radius: 12px; }.permission-grid label { display: flex; align-items: center; gap: 8px; }.permission-grid input, .toggle-line input { width: 18px; height: 18px; accent-color: var(--accent); }
.configuration-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-bottom: 35px; }.configuration-tile { background: var(--subtle); border: 1px solid var(--line); border-radius: 12px; padding: 23px 15px; color: var(--ink); font-size: 15px; text-align: right; }.configuration-tile:hover { border-color: var(--accent); }
.empty-icon { display: block; font-size: 30px; color: var(--accent); }.empty-state h3 { font-size: 18px; }.empty-state p { font-size: 14px; }.section-divider { margin: 30px 0; border-top: 1px solid var(--line); } #rateHistory { margin-top: 25px; max-height: 420px; overflow-y: auto; }
.rate-comparison-toolbar { display: flex; align-items: end; flex-wrap: wrap; gap: 14px; margin: 0 0 20px; }
.rate-comparison-toolbar label { min-width: 180px; max-width: 300px; flex: 1; }
.rate-comparison-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 20px 0; }
.rate-comparison-summary > div { padding: 15px; background: var(--subtle); border: 1px solid var(--line); border-radius: 10px; }
.rate-comparison-summary small { display: block; color: var(--muted); font-size: 13px; }
.rate-comparison-summary strong { font-size: 20px; overflow-wrap: anywhere; }
.rate-sales-chart { grid-column: 1 / -1; }
.rate-comparison-card { grid-column: 1; grid-row: 2; }
#operationFields label[hidden] { display: none !important; }
.channel-chart-filter { display: grid; gap: 8px; margin-bottom: 18px; max-width: 330px; font-size: 14px; }
.channel-chart-filter select { font-size: 15px; }
#channelTrendChart { margin-bottom: 24px; }
.chart-card .hint { font-size: 13px; }
.channels-management .data-table { min-width: 0; }
@media (max-width:1399px) {
  main { padding: 25px; }
  .sales-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .analytics-toolbar { flex-wrap: wrap; }
  .dashboard-grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
  .chart-card { padding: 20px; }
}
@media (max-width:1023px) {
  
  .sidebar { padding: 22px 10px; }
  .sidebar-brand .wordmark { font-size: 20px; }
  .sidebar-caption { font-size: 12px; }
  .workspace-nav button { font-size: 14px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .rate-chart { grid-column: auto; grid-row: auto; }
  .rate-comparison-card { grid-column: auto; grid-row: auto; }
  .configuration-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-hero h2 { font-size: 28px; }
  .today-label { display: none; }
}
@media (max-width:1023px) {
  
  .mobile-topbar { display: flex; position: sticky; top: 0; z-index: 35; align-items: center; justify-content: space-between; gap: 12px; padding: calc(10px + env(safe-area-inset-top)) 16px 10px; min-height: 64px; background: var(--surface); border-bottom: 1px solid var(--line); }
  .mobile-brand { display: flex; align-items: center; gap: 9px; text-decoration: none; font-size: 20px; font-weight: 700; }
  .mobile-brand img { width: 32px; height: 32px; border-radius: 10px; }
  .menu-toggle { display: flex; align-items: center; justify-content: center; gap: 9px; min-width: 76px; min-height: 44px; border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; background: var(--subtle); color: var(--ink); font-size: 14px; }
  .hamburger, .hamburger::before, .hamburger::after { display: block; width: 19px; height: 2px; background: currentColor; border-radius: 2px; }
  .hamburger { position: relative; }
  .hamburger::before, .hamburger::after { content: ''; position: absolute; left: 0; }
  .hamburger::before { top: -6px; }.hamburger::after { top: 6px; }
  body.nav-open { overflow: hidden; }
  .menu-backdrop:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 60; border: 0; background: #07101699; backdrop-filter: blur(3px); }
  .sidebar { display: flex; position: fixed; inset: 0 0 0 auto; width: min(320px, calc(100vw - 48px)); height: 100dvh; z-index: 65; padding: calc(20px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom)); border-left: 1px solid var(--line); border-bottom: 0; transform: translateX(105%); visibility: hidden; transition: transform .22s ease; box-shadow: -12px 0 40px #0002; }
  .nav-open .sidebar { transform: translateX(0); visibility: visible; }
  .menu-close { display: grid; place-items: center; position: absolute; top: calc(20px + env(safe-area-inset-top)); left: 14px; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 11px; background: var(--subtle); color: var(--ink); font-size: 27px; }
  .sidebar-brand { margin: 0 0 8px; padding-inline-end: 48px; flex-shrink: 0; }
  .sidebar-caption { display: block; margin: 0 0 10px; }
  .nav-group-label { display: block; margin: 14px 12px 5px; }
  .sidebar-bottom { display: block; position: static; margin-top: 12px; padding-top: 12px; flex-shrink: 0; }
  .sidebar-bottom .profile { display: flex; }
  .logout { min-height: 44px; width: 100%; text-align: right; font-size: 14px; }
  .mobile-logout { display: none; }
  .workspace-nav { display: grid; flex: 1; min-height: 0; overflow-x: hidden; overflow-y: auto; align-content: start; gap: 4px; margin: 0; padding: 0 0 4px; overscroll-behavior: contain; }
  .workspace-nav button { flex: none; width: 100%; justify-content: flex-start; white-space: normal; padding: 12px; min-height: 48px; font-size: 15px; }
  .catalog-nav { min-height: 48px; font-size: 15px; }
  .nav-arrow { display: none; }
  main { padding: 20px; }
  input, textarea, select, .operation-fields textarea, .list-filters select { font-size: 16px; }
}
@media (max-width:599px) {
  main { padding: 20px 14px; }
  .workspace-header { gap: 9px; }
  .workspace-header h1 { font-size: 22px; }
  .header-actions { gap: 6px; }
  .header-actions button span { display: none; }
  .workspace-intro { align-items: start; flex-wrap: wrap; gap: 8px; }
  .workspace-intro p, .workspace-intro #lastUpdated { font-size: 12px; }
  .dashboard-hero { align-items: start; gap: 12px; flex-wrap: wrap; }
  .dashboard-hero h2 { font-size: 26px; }
  .dashboard-hero p { font-size: 14px; }
  .dashboard-hero button { font-size: 14px; padding: 10px 14px; }
  .eyebrow { font-size: 12px; }
  .sales-stats { gap: 12px; }
  .sales-stat { padding: 18px 15px; }
  .sales-stat strong { font-size: 23px; white-space: normal; margin: 14px 0 8px; }
  .stat-label { font-size: 13px; }
  .sales-stat small { font-size: 12px; }
  .stat-label span { padding: 4px 7px; font-size: 17px; }
  .analytics-toolbar { gap: 14px; }
  .period-tabs { flex-wrap: wrap; }
  .period-tabs button { padding: 8px 14px; }
  #analyticsRange { width: 100%; flex-wrap: wrap; gap: 8px; }
  #analyticsRange label { flex: 1 1 130px; min-width: 0; display: grid; }
  #analyticsRange input { width: 100%; font-size: 16px; }
  .chart-card { padding: 20px 15px; }
  .chart-heading { flex-wrap: wrap; }
  .chart-card h3 { margin-bottom: 18px; }
  .chart-legend { margin-bottom: 18px; }
  .dashboard-links > * { flex: 1 1 100%; text-align: right; }
  .operation-page-heading { flex-wrap: wrap; }
  .operation-page-heading .row-actions { width: 100%; }
  .data-table-wrap { overflow: visible; }
  .data-table { min-width: 0; display: block; }
  .data-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .data-table tbody { display: grid; gap: 14px; }
  .data-table tr { display: grid; min-width: 0; padding: 10px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
  .data-table td { display: grid; grid-template-columns: minmax(76px, 28%) minmax(0, 1fr); align-items: start; gap: 10px; max-width: none; padding: 10px 0; font-size: 14px; }
  .data-table td::before { content: attr(data-label); color: var(--muted); font-size: 13px; white-space: normal; }
  .data-table td:last-child { border-bottom: 0; }
  .data-table td > * { min-width: 0; max-width: 100%; }
  .data-table .row-actions { gap: 8px; }
  .data-table .row-actions > * { flex: 1 1 auto; white-space: normal; }
  .channels-management .data-table { min-width: 0; }
  .operation-dialog { width: calc(100vw - 20px); padding: 22px 16px; max-height: 94dvh; }
  .operation-fields { grid-template-columns: 1fr; gap: 15px; }
  .permission-grid, .configuration-grid { grid-template-columns: 1fr; }
  .wide-field { grid-column: auto; }
  .list-filters select { flex: 1; min-width: 120px; }
  .operation-fields .data-table { min-width: 0; }
  .operation-fields .data-table th, .operation-fields .data-table td { padding: 10px; }
  input, textarea, select, .operation-fields textarea, .list-filters select { font-size: 16px; }
  .channel-chart-filter, .channel-chart-filter select { font-size: 16px; max-width: none; }
  .rate-comparison-toolbar label { max-width: none; }
  .rate-comparison-summary { grid-template-columns: 1fr; }
  .workspace-header { flex-wrap: nowrap; align-items: center; margin-bottom: 14px; padding-bottom: 14px; }
  .workspace-header > div:first-child { min-width: 0; flex: 1; }
  .workspace-header h1 { font-size: 20px; line-height: 1.8; }
  .breadcrumb { display: none; }
  .header-actions { flex-shrink: 0; margin: 0; gap: 7px; }
  .header-actions .secondary { width: 44px; min-height: 44px; padding: 8px; }
  .header-actions #installButton { width: auto; }
  .workspace-intro { margin-bottom: 18px; }
  .operation-page-heading { gap: 14px; margin-bottom: 18px; }
  .operation-page-heading .row-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .operation-page-heading .row-actions > * { white-space: normal; min-height: 46px; }
  .operation-page-heading .row-actions > :only-child { grid-column: 1 / -1; }
  .list-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .list-filters input, .list-filters select { width: 100%; min-width: 0; }
  .list-filters input { grid-column: 1 / -1; }
  .editor-actions { flex-wrap: wrap; gap: 9px; }
  .editor-actions > * { flex: 1 1 120px; min-height: 46px; }
  .operation-dialog { margin: auto; max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); overscroll-behavior: contain; }
  .operation-dialog .modal-head { position: sticky; top: -22px; z-index: 2; background: var(--surface); padding-block: 12px; }
  .modal-head h2 { font-size: 19px; }
  .modal-close { flex-shrink: 0; width: 44px; height: 44px; }
  .product-row, .recipient-card { border-color: var(--line); }
  .product-main { border-color: var(--line); }
  .status-switch { min-height: 44px; }
  .stock-editor button { flex-basis: 40px; }
  .autosave-note { align-items: flex-start; line-height: 2; }
  .chart-toolbar > button { width: 100%; min-height: 44px; }
  .chart-readout, .chart-card .hint { font-size: 14px; }
  .chart-tooltip { min-width: 0; }
  .chart-tooltip > div { flex-wrap: wrap; gap: 3px 8px; }
  .period-tabs { width: 100%; }
  .period-tabs button { flex: 1; min-height: 44px; }
  #analyticsRange { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #analyticsRange button { grid-column: 1 / -1; }
  .workspace-footer { justify-content: center; text-align: center; font-size: 11px; }
  .workspace-footer span:first-child { letter-spacing: 1px; }
  .recipient-form { flex-wrap: wrap; }
  .recipient-save { width: 100%; }
}
@media (max-width:599px) {
  .sales-stats { grid-template-columns: 1fr; }
  .sales-stat strong { font-size: 26px; }
  .analytics-toolbar > * { max-width: 100%; }
  .period-tabs button { flex: 1; }
  .chart-card h3 { font-size: 18px; }
  .rank-row { gap: 8px; }
  .rank-number { padding: 7px 9px; }
  .rank-row b { font-size: 15px; }
}
.refund-notice { display: block; margin: 0 0 20px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink); text-decoration: none; line-height: 1.9; }
.refund-notice[hidden] { display: none; }

/* Login uses the same palette as the workspace, without the oversized split screen. */
.auth-view { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto 1fr auto; align-items: center; gap: 24px 60px; padding: 28px max(28px, calc((100vw - 1120px) / 2)); background: radial-gradient(ellipse at 85% 35%, var(--accent-soft), transparent 60%), var(--background); }
.auth-header { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.auth-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-size: 23px; font-weight: 700; }
.auth-brand img { width: 44px; height: 44px; border-radius: 13px; }
.auth-brand small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
#authThemeToggle { width: 44px; height: 44px; padding: 0; font-size: 20px; }
.auth-intro { background: transparent; color: var(--ink); padding: 24px 0; }
.auth-eyebrow { color: var(--accent); font-size: 14px; }
.auth-intro h1 { font-size: clamp(32px, 3.5vw, 48px); letter-spacing: -1.2px; line-height: 1.65; margin: 20px 0; }
.auth-intro p { color: var(--muted); font-size: 16px; line-height: 2.2; margin: 0; }
.auth-features { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 28px; }
.auth-features span { color: var(--accent); background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 8px 13px; font-size: 13px; }
.auth-form-wrap { display: block; padding: 24px 0; min-width: 0; }
.auth-card { max-width: 440px; margin: auto; padding: 32px; border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 16px 60px #14202c10; }
.auth-badge { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 15px; background: var(--accent-soft); color: var(--accent); font-size: 27px; margin-bottom: 20px; }
.auth-card h2 { font-size: 27px; margin: 0 0 10px; }
.auth-card .muted { font-size: 14px; line-height: 2; margin: 0; }
.auth-card .stack { gap: 10px; margin: 24px 0; }
.auth-card label { font-size: 14px; font-weight: 600; margin-top: 8px; }
.auth-card input { min-height: 52px; height: 52px; font-size: 16px; text-align: left; padding: 12px 14px; border-radius: 12px; }
.auth-card input::placeholder { font-family: "Estedad", Tahoma, sans-serif; color: var(--muted); font-size: 13px; text-align: right; }
.auth-password { position: relative; }
.auth-password input { padding-inline-start: 75px; }
#togglePin { position: absolute; right: 5px; top: 4px; min-height: 44px; width: 64px; padding: 5px; border: 0; border-radius: 8px; background: transparent; color: var(--accent); font-size: 13px; }
#togglePin:hover { background: var(--accent-soft); }
.auth-card .stack .primary { margin-top: 12px; min-height: 52px; height: auto; font-size: 16px; border-radius: 12px; }
.auth-help { padding: 16px; background: var(--subtle); border: 1px solid var(--line); border-radius: 13px; }
.auth-help strong { font-size: 13px; font-weight: 600; }
.auth-help p { color: var(--muted); font-size: 13px; line-height: 2; margin: 6px 0 0; }
.login-error { margin: 4px 0 0; border: 1px solid var(--danger); border-radius: 10px; padding: 12px; background: var(--surface); color: var(--danger); font-size: 14px; line-height: 2; overflow-wrap: anywhere; }
.login-error[hidden] { display: none; }
.auth-card input[aria-invalid="true"] { border-color: var(--danger); }
.auth-footer { grid-column: 1 / -1; color: var(--muted); font-size: 12px; text-align: center; padding-top: 8px; }
[data-theme="dark"] .busy { background: #101821df; color: var(--accent); }
@media (max-width:1023px) {
  .auth-view { gap: 20px 28px; padding: 24px; }
  .auth-card { padding: 26px; }
  .auth-intro h1 { font-size: 34px; }
}
@media (max-width:599px) {
  .auth-view { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr auto; gap: 16px; padding: calc(18px + env(safe-area-inset-top)) 18px calc(18px + env(safe-area-inset-bottom)); }
  .auth-header { gap: 12px; }
  .auth-brand { font-size: 21px; gap: 10px; }
  .auth-brand img { width: 38px; height: 38px; }
  .auth-intro { display: none; }
  .auth-form-wrap { padding: 8px 0; }
  .auth-card { padding: 24px 20px; border-radius: 20px; }
  .auth-card h2 { font-size: 25px; }
  .auth-badge { margin-bottom: 16px; }
  .auth-footer { font-size: 11px; }
}
@media (max-width:599px) { .auth-view { padding-inline: 12px; }.auth-card { padding: 22px 16px; }.auth-card label { font-size: 13px; } }

/* Quantity-based storage keeps location controls as readable as the sales workspace. */
.warehouse-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 20px; }
.warehouse-tabs button { min-height: 46px; flex: 1 1 160px; }
.warehouse-tabs button.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.warehouse-definition-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
.warehouse-section { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.warehouse-section .operation-page-heading h2 { font-size: 21px; }
.warehouse-summary { padding: 14px 18px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); margin-block: 12px 18px; line-height: 2; }
.stock-custody-badge.preorder-badge { color: #c4892f; background: #dba04120; border-color: #dba04180; }
.consignment-lines { min-width: 0; }
.consignment-line { display: grid; grid-template-columns: minmax(0, 1fr) 90px auto; align-items: end; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.consignment-line select { width: 100%; min-width: 0; }
.consignment-lines > button { margin-top: 14px; }
@media (max-width:599px) { .operation-fields .consignment-lines { grid-column: 1 / -1; }.consignment-line { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }.consignment-line > label:first-child { grid-column: 1 / -1; } }
.data-table th[aria-sort="ascending"], .data-table th[aria-sort="descending"] { color: var(--accent); }
.warehouse-availability { grid-column: 1 / -1; margin: 0; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; }
.row-location { min-height: 38px; width: fit-content; max-width: 100%; margin-top: 8px; padding: 6px 11px; border: 1px solid var(--line); border-radius: 10px; color: var(--accent); background: var(--accent-soft); font-size: 13px; flex-shrink: 0; }
.row-action-cell { display: flex; align-items: center; gap: 6px; }
[data-theme="dark"] .row-delete { color: #ff9aa7; background: #3b2229; border-color: #75404a; }
@media (max-width:599px) {
  .warehouse-tabs { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .warehouse-tabs button { width: 100%; font-size: 15px; }
  .warehouse-section { padding: 14px; border-radius: 14px; }
  .warehouse-filters { grid-template-columns: minmax(0, 1fr); }
  .warehouse-filters > * { width: 100%; }
  .warehouse-summary { font-size: 14px; padding: 12px; }
  .row-location { min-height: 44px; font-size: 14px; }
}
/* Owner and custody remain readable without relying on colour alone. */
.stock-custody-tabs{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0}
.stock-custody-tabs .active{background:var(--accent-soft);color:var(--accent);border-color:var(--accent)}
.stock-custody-badge{display:inline-block;padding:6px 10px;border-radius:9px;font-weight:600;line-height:1.7;white-space:normal}
.stock-custody-badge.consigned{background:#fff0cf;color:#795300;border:1px solid #d6ae50}
.stock-custody-badge.owned{background:#e6edf4;color:#123b63;border:1px solid #809db9}
[data-theme="dark"] .stock-custody-badge.consigned{background:#453821;color:#ffdd8d;border-color:#8a6a34}
[data-theme="dark"] .stock-custody-badge.owned{background:#172a3d;color:#a3c5e7;border-color:#38526d}
@media(max-width:599px){.stock-custody-tabs{display:grid;grid-template-columns:1fr}.stock-custody-tabs button{width:100%}}
.jalali-calendar{position:fixed;z-index:10000;padding:14px;background:var(--surface,#202124);color:var(--ink,#eaf0f5);border:1px solid var(--border,#667085);border-radius:16px;box-shadow:0 14px 50px #0004;direction:rtl;}
.calendar-header{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:8px;}
.jalali-calendar button{font:inherit;background:transparent;color:inherit;border:0;border-radius:8px;padding:7px;cursor:pointer;}
.calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px;text-align:center;}
.calendar-grid>span{font-size:12px;padding:4px;opacity:.65;}.calendar-grid button:hover{background:#548ccb33;}.calendar-grid button:disabled{opacity:.25;cursor:default;}.calendar-grid .calendar-selected{background:#517db5;color:#fff;}.calendar-grid .calendar-today{outline:1px solid #7da9e3;}
.invoice-cart{display:flex;flex-direction:column;gap:14px;border-top:1px solid var(--line);padding-top:18px;min-width:0;}.invoice-cart-lines{display:flex;flex-direction:column;gap:14px;}.invoice-cart-line{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:16px;border:1px solid var(--line);border-radius:14px;background:var(--subtle);min-width:0;}.invoice-cart-line select{min-width:0;max-width:100%;}.invoice-cart-summary{padding:14px;border-radius:12px;background:var(--accent-soft);color:var(--ink);line-height:2;}.product-preorder-label{padding:3px 9px;border-radius:8px;font-size:11px;font-weight:600;}
@media(max-width:599px){.invoice-cart-line{grid-template-columns:minmax(0,1fr);padding:12px;}.product-title-line{flex-wrap:wrap;}}
.shipping-stage{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:9px;font-weight:650;margin:3px;white-space:nowrap;border:1px solid currentColor}
.shipping-stage::before{content:'';width:8px;height:8px;border-radius:50%;background:currentColor}
.stage-dubai{color:#b42335;background:#ffe8ec}.stage-qeshm{color:#984500;background:#fff0d9}.stage-tipax{color:#16643c;background:#dcf5e6}.stage-unknown{color:var(--muted);background:var(--surface)}
html[data-theme="dark"] .stage-dubai{color:#ff9eac;background:#46232c}html[data-theme="dark"] .stage-qeshm{color:#ffc078;background:#48321f}html[data-theme="dark"] .stage-tipax{color:#83deb0;background:#203d30}
.warehouse-filters input[type="search"]{flex:1 1 260px;min-width:0}.preorder-search{width:100%;margin:12px 0}
.stock-overview{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:12px 0 20px}
.stock-overview-card{display:flex;flex-direction:column;align-items:flex-start;gap:8px;padding:18px;border:1px solid var(--line);border-radius:14px;background:var(--surface);color:var(--ink);text-align:start;min-width:0;cursor:pointer}
.stock-overview-card strong{font-size:30px;line-height:1.2}.stock-overview-card small{font-size:12px;color:var(--muted);white-space:normal}.stock-overview-card.active{border-color:var(--accent);background:var(--accent-soft)}
.stock-toolbar{display:flex;flex-wrap:wrap;align-items:flex-start;gap:10px;margin:14px 0}.stock-toolbar>input{flex:1 1 280px;min-width:0}.stock-more-filters{flex:0 1 450px;min-width:0}.stock-more-filters summary{padding:13px 16px;border:1px solid var(--line);border-radius:10px;cursor:pointer}.stock-filter-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:10px}.stock-filter-fields select{width:100%;min-width:0}
.stock-product{display:flex;flex-direction:column;gap:5px;max-width:290px}.stock-product strong{font-weight:600}.stock-product small{font-size:11px;color:var(--muted);overflow-wrap:anywhere;direction:ltr;text-align:start}.stock-inventory-table td{padding-block:15px}
@media(max-width:599px){.stock-overview{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.stock-overview-card{padding:13px}.stock-overview-card strong{font-size:25px}.stock-toolbar>input,.stock-more-filters{flex-basis:100%}.stock-filter-fields{grid-template-columns:minmax(0,1fr)}.stock-product{max-width:100%}}

/* Daily workbench: uses the active theme/palette tokens exclusively. */
.workbench-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;margin-bottom:22px}.workbench-heading h2{font-size:clamp(25px,3vw,34px);margin:7px 0 2px;letter-spacing:-1px}.workbench-heading p{margin:0}.rate-pill{display:grid;gap:2px;min-width:220px;padding:13px 16px;border:1px solid var(--line);border-radius:13px;background:var(--surface);font-size:14px}.rate-pill strong{color:var(--accent);font-size:17px}.rate-pill small{color:var(--muted);font-size:12px}.rate-pill.stale{border-color:var(--danger)}.rate-pill.stale small{color:var(--danger)}
.workbench-primary{width:100%;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:15px;min-height:104px;padding:20px 22px;border:1px solid var(--accent);border-radius:17px;background:var(--accent-soft);color:var(--ink);text-align:right}.workbench-primary:hover{border-color:var(--accent);filter:brightness(1.02)}.workbench-primary .workbench-action-icon{display:grid;place-items:center;width:52px;height:52px;border-radius:14px;background:var(--accent);color:var(--surface);font-size:27px}.workbench-primary strong{display:block;color:var(--accent);font-size:22px}.workbench-primary small{display:block;margin-top:4px;color:var(--muted);font-size:14px}.workbench-primary>b{color:var(--accent);font-size:24px}
.quick-access{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:14px 0 20px}.quick-access a{display:grid;grid-template-columns:auto 1fr;gap:2px 12px;align-items:center;min-height:104px;padding:18px;border:1px solid var(--line);border-radius:15px;background:var(--surface);text-decoration:none}.quick-access a:hover{border-color:var(--accent)}.quick-icon{grid-row:1/3;display:grid;place-items:center;width:42px;height:42px;border-radius:12px;background:var(--subtle);color:var(--accent);font-size:23px}.quick-access strong{font-size:17px}.quick-access small{color:var(--muted);font-size:12px;line-height:1.7}
.workbench-financial{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-bottom:20px}.workbench-metric{display:flex;flex-direction:column;min-height:150px;padding:19px;border:1px solid var(--line);border-radius:15px;background:var(--surface);text-decoration:none}.workbench-metric:hover{border-color:var(--accent)}.workbench-metric>span{color:var(--muted);font-size:14px}.workbench-metric>strong{margin:12px 0 8px;font-size:clamp(21px,2vw,28px);line-height:1.5}.workbench-metric>small{margin-top:auto;color:var(--muted);font-size:12px;line-height:1.8}.workbench-permission-note{grid-column:1/-1;padding:17px;border:1px solid var(--line);border-radius:13px;background:var(--subtle);color:var(--muted);font-size:13px}
.workbench-columns{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:20px;align-items:start}.workbench-panel{padding:22px}.workbench-panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.workbench-panel h3{margin:5px 0 0;font-size:20px}.task-list,.recent-sales{display:grid}.task-row,.recent-sale-row{display:grid;align-items:center;gap:12px;min-height:76px;padding:13px 4px;border-bottom:1px solid var(--line);text-decoration:none}.task-row{grid-template-columns:auto minmax(0,1fr) auto}.task-row:last-child,.recent-sale-row:last-child{border-bottom:0}.task-row:hover,.recent-sale-row:hover{color:var(--accent)}.task-icon{display:grid;place-items:center;width:40px;height:40px;border-radius:11px;background:var(--accent-soft);color:var(--accent);font-size:20px}.task-row.warning .task-icon{background:var(--subtle);color:var(--danger)}.task-row strong,.recent-sale-row strong{font-size:14px}.task-row small,.recent-sale-row small{display:block;color:var(--muted);font-size:12px;margin-top:3px}.recent-sale-row{grid-template-columns:minmax(130px,1.25fr) minmax(120px,.9fr) minmax(130px,1fr) auto}.recent-sale-amount{text-align:right}.recent-sale-status{display:flex;gap:5px;align-items:center;flex-wrap:wrap}.recent-sale-status i{font-style:normal}.calm-empty,.section-error{display:grid;justify-items:center;text-align:center;gap:5px;padding:34px 12px;color:var(--muted)}.calm-empty>span{display:grid;place-items:center;width:44px;height:44px;border-radius:50%;background:var(--accent-soft);color:var(--accent);font-size:22px}.calm-empty strong,.section-error strong{color:var(--ink)}.calm-empty small,.section-error small,.section-loading{color:var(--muted);font-size:12px}.section-loading{padding:28px;text-align:center}.active-list-filter{display:flex;justify-content:space-between;gap:12px;padding:12px 14px;margin-bottom:15px;border-radius:10px;background:var(--accent-soft);color:var(--accent);font-size:13px}.active-list-filter a{font-weight:600}.read-only .product-row{opacity:.82}
.mobile-bottom-nav{display:none}
@media(max-width:1023px){.workbench-columns{grid-template-columns:1fr}.workbench-financial{grid-template-columns:repeat(2,minmax(0,1fr))}.workbench-metric:last-child{grid-column:1/-1}.dashboard-grid{grid-template-columns:1fr}.revenue-chart,.rate-comparison-card{grid-column:auto;grid-row:auto}}
@media(max-width:599px){#adminDashboard main{padding-bottom:calc(100px + env(safe-area-inset-bottom))}.mobile-bottom-nav{position:fixed;z-index:45;right:0;bottom:0;left:0;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));align-items:end;padding:7px 5px calc(7px + env(safe-area-inset-bottom));border-top:1px solid var(--line);background:var(--surface);box-shadow:0 -8px 30px #00000012}.mobile-bottom-nav a,.mobile-bottom-nav button{display:grid;justify-items:center;align-content:center;gap:2px;min-width:0;min-height:52px;padding:3px;border:0;background:transparent;color:var(--muted);text-decoration:none;font:inherit}.mobile-bottom-nav span{font-family:sans-serif;font-size:23px;line-height:1}.mobile-bottom-nav small{font-size:11px}.mobile-bottom-nav .active{color:var(--accent)}.mobile-bottom-nav .mobile-sale-action{position:relative;top:-14px;width:68px;min-height:68px;justify-self:center;border:1px solid var(--accent);border-radius:50%;background:var(--accent-soft);color:var(--accent);box-shadow:0 5px 18px #0002}.mobile-bottom-nav .mobile-sale-action small{white-space:nowrap}.mobile-bottom-nav [hidden]{display:none}.operation-dialog[open]~* .mobile-bottom-nav,body:has(.operation-dialog[open]) .mobile-bottom-nav,body.modal-open .mobile-bottom-nav{display:none}.toast{bottom:calc(88px + env(safe-area-inset-bottom))}}
@media(max-width:599px){.workspace-header{margin-bottom:12px}.workspace-intro{margin-bottom:16px}.workbench-heading{display:grid;gap:12px}.rate-pill{min-width:0;width:100%}.workbench-primary{min-height:96px;padding:16px}.workbench-primary .workbench-action-icon{width:46px;height:46px}.workbench-primary strong{font-size:19px}.quick-access{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.quick-access a{display:flex;flex-direction:column;align-items:flex-start;min-height:126px;padding:14px}.quick-access a:first-child{grid-column:1/-1;min-height:88px;display:grid;grid-template-columns:auto 1fr}.quick-icon{flex:0 0 auto}.workbench-financial{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.workbench-metric{min-height:142px;padding:14px}.workbench-metric:last-child{grid-column:1/-1;min-height:120px}.workbench-metric>strong{font-size:20px}.workbench-panel{padding:16px 13px}.recent-sale-row{grid-template-columns:minmax(0,1fr) auto;padding:14px 2px}.recent-sale-amount{text-align:left}.recent-sale-status{grid-column:1/-1}.recent-sale-row>b{position:absolute;left:20px}.chart-card{padding:16px 12px}.chart-wrap{overflow:hidden}.chart-wrap svg{min-width:0}.chart-axis{font-size:12px}}
@media(max-width:599px){.workbench-financial{grid-template-columns:1fr}.workbench-metric:last-child{grid-column:auto}.quick-access small{font-size:11px}.mobile-bottom-nav small{font-size:10px}}
.recent-sale-row{position:relative}
@media(max-width:599px){.workbench-financial{grid-template-columns:repeat(2,minmax(0,1fr))}.workbench-metric:last-child{grid-column:1/-1}}

/* Mobile home (below 768px): compact, action-first, and isolated from desktop. */
.workbench-primary svg,.quick-icon svg,.task-icon svg,.calm-empty svg,.recent-sale-row>b svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.workbench-primary>b svg,.recent-sale-row>b svg{width:20px;height:20px}
.desktop-task-list{display:grid}.mobile-task-list{display:none}
.mobile-task-list .task-row{grid-template-columns:auto minmax(0,1fr) auto auto}
.mobile-task-list .task-row em{display:grid;place-items:center;min-width:30px;height:30px;padding:0 8px;border-radius:15px;background:var(--subtle);color:var(--ink);font-style:normal;font-weight:650}
.mobile-task-list .task-row>b{display:grid;place-items:center}
.mobile-more-sheet{width:min(100%,520px);max-height:min(78dvh,660px);margin:auto auto 0;padding:0;border:0;border-radius:20px 20px 0 0;background:var(--surface);color:var(--ink);box-shadow:0 -16px 60px #0004}
.mobile-more-sheet::backdrop{background:#07101699;backdrop-filter:blur(3px)}
.mobile-more-head{display:flex;align-items:center;justify-content:space-between;padding:17px 18px;border-bottom:1px solid var(--line)}
.mobile-more-head h2{margin:0;font-size:20px}.mobile-more-head button{display:grid;place-items:center;width:44px;height:44px;border:0;border-radius:12px;background:var(--subtle);color:var(--ink)}
.mobile-more-head svg,.mobile-more-groups svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.mobile-more-groups{display:grid;gap:18px;padding:18px 18px calc(18px + env(safe-area-inset-bottom));overflow-y:auto}
.mobile-more-groups section{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.mobile-more-groups h3{grid-column:1/-1;margin:0 0 3px;color:var(--muted);font-size:13px}
.mobile-more-groups a,.mobile-more-groups button{display:flex;align-items:center;justify-content:space-between;min-height:44px;padding:10px 12px;border:1px solid var(--line);border-radius:11px;background:var(--surface);color:var(--ink);text-decoration:none;text-align:right;font:inherit;font-size:13px}.mobile-more-groups [hidden]{display:none}

@media(max-width:599px){
  #adminDashboard main{padding-bottom:calc(88px + env(safe-area-inset-bottom))}
  .mobile-bottom-nav{height:72px;padding:5px 4px env(safe-area-inset-bottom)}
  .mobile-bottom-nav a,.mobile-bottom-nav button{gap:3px;min-height:56px;padding:2px}
  .mobile-bottom-nav>a>svg,.mobile-bottom-nav>button>svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
  .mobile-bottom-nav small{font-size:10px;white-space:nowrap}
  .mobile-bottom-nav .mobile-sale-action{top:-12px;width:auto;min-height:68px;justify-self:stretch;border:0;border-radius:0;background:transparent;box-shadow:none}
  .mobile-sale-icon{display:grid;place-items:center;width:48px;height:48px;border-radius:50%;background:var(--accent);color:var(--surface);box-shadow:0 5px 16px #0002}
  .mobile-sale-icon svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
  .mobile-workbench-route .mobile-topbar{position:relative;min-height:58px;padding:calc(8px + env(safe-area-inset-top)) 14px 8px}
  .mobile-workbench-route .mobile-brand{font-size:17px}.mobile-workbench-route .mobile-brand img{width:30px;height:30px}
  .mobile-workbench-route #menuToggle{display:none}
  .mobile-workbench-route .mobile-rate-chip{display:flex;align-items:center;gap:5px;min-height:44px;padding:7px 11px;border:1px solid var(--line);border-radius:22px;background:var(--subtle);color:var(--muted);text-decoration:none;font-size:11px}
  .mobile-rate-chip strong{color:var(--accent);font-size:13px}.mobile-rate-chip.stale strong{color:var(--danger)}
  .mobile-workbench-route main{padding:10px 12px calc(88px + env(safe-area-inset-bottom))}
  .mobile-workbench-route .workspace-header,.mobile-workbench-route #sectionTabs,.mobile-workbench-route .workspace-footer{display:none}
  .mobile-workbench-route .workspace-intro:not(.connection-warning){display:none}
  .mobile-workbench-route .workspace-intro.connection-warning{display:flex;margin:0 0 10px;padding:9px 11px;border:1px solid var(--danger);border-radius:10px;background:var(--surface);font-size:11px}
  .mobile-workbench-route .workspace-intro.connection-warning p{display:none}.mobile-workbench-route .workspace-intro.connection-warning #lastUpdated{font-size:11px;color:var(--danger)}
  .mobile-workbench-route .workbench-heading{display:block;margin:0 2px 10px}.mobile-workbench-route .workbench-heading h2{font-size:17px;line-height:1.5;margin:0}.mobile-workbench-route .workbench-heading p{font-size:12px;line-height:1.5}.mobile-workbench-route .rate-pill{display:none}
  .mobile-workbench-route .workbench-primary{height:64px;min-height:64px;gap:10px;padding:8px 12px;border-radius:14px;background:var(--accent);color:var(--surface)}
  .mobile-workbench-route .workbench-primary .workbench-action-icon{width:40px;height:40px;border-radius:11px;background:#ffffff20;color:inherit}.mobile-workbench-route .workbench-primary strong{color:inherit;font-size:16px}.mobile-workbench-route .workbench-primary small{margin-top:1px;color:inherit;opacity:.82;font-size:11px}.mobile-workbench-route .workbench-primary>b{display:none}
  .mobile-workbench-route .quick-access{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:8px 0}.mobile-workbench-route .quick-access .quick-sales{display:none}
  .mobile-workbench-route .quick-access a{display:grid;grid-column:auto;grid-template-columns:34px minmax(0,1fr);grid-template-rows:auto auto;align-items:center;gap:1px 8px;min-height:82px;padding:10px;border-radius:13px}
  .mobile-workbench-route .quick-price{order:1}.mobile-workbench-route .quick-inventory{order:2}.mobile-workbench-route .quick-icon{grid-row:1/3;width:34px;height:34px;border-radius:10px}.mobile-workbench-route .quick-icon svg{width:20px;height:20px}.mobile-workbench-route .quick-access strong{font-size:14px}.mobile-workbench-route .quick-access small{font-size:10px;line-height:1.5}
  .mobile-workbench-route .mobile-only{display:inline}.mobile-workbench-route .desktop-only{display:none}
  .mobile-workbench-route .workbench-financial{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:14px}.mobile-workbench-route .metric-received{display:none}
  .mobile-workbench-route .workbench-metric,.mobile-workbench-route .workbench-metric:last-child{grid-column:auto;min-height:82px;padding:11px;border-radius:13px}.mobile-workbench-route .workbench-metric>span{font-size:11px}.mobile-workbench-route .workbench-metric>strong{margin:7px 0 0;font-size:15px;line-height:1.4;white-space:nowrap}.mobile-workbench-route .workbench-metric>small{display:none}
  .mobile-workbench-route .workbench-columns{grid-template-columns:1fr;gap:12px}.mobile-workbench-route .workbench-panel{padding:13px 12px;border-radius:14px}.mobile-workbench-route .workbench-panel-head{margin-bottom:4px}.mobile-workbench-route .workbench-panel h3{margin:0;font-size:16px}.mobile-workbench-route .workbench-panel-head .text-link{min-height:44px;display:flex;align-items:center;font-size:11px}
  .mobile-workbench-route .desktop-task-list{display:none}.mobile-workbench-route .mobile-task-list{display:grid}.mobile-workbench-route .mobile-task-list .task-row{grid-template-columns:34px minmax(0,1fr) auto 18px;gap:8px;min-height:56px;padding:6px 0}.mobile-workbench-route .task-icon{width:34px;height:34px;border-radius:10px}.mobile-workbench-route .task-icon svg{width:19px;height:19px}.mobile-workbench-route .task-row strong{font-size:12px}.mobile-workbench-route .task-row small{display:none}.mobile-workbench-route .task-row em{min-width:27px;height:27px;padding:0 7px;font-size:11px}.mobile-workbench-route .task-row>b svg{width:17px;height:17px}
  .mobile-workbench-route .recent-sale-row{grid-template-columns:minmax(0,1fr) auto;gap:5px 8px;min-height:66px;padding:8px 0}.mobile-workbench-route .recent-sale-main strong{font-size:12px}.mobile-workbench-route .recent-sale-row small{font-size:9px}.mobile-workbench-route .recent-sale-amount{text-align:left}.mobile-workbench-route .recent-sale-amount strong{font-size:11px}.mobile-workbench-route .recent-sale-status{grid-column:1/-1}.mobile-workbench-route .delivery-badge{display:none}.mobile-workbench-route .recent-sale-status .badge{padding:3px 7px;font-size:9px}.mobile-workbench-route .recent-sale-row>b{display:none}
  #themeToggle{display:none}
}
.order-status-stack{display:flex;flex-wrap:wrap;gap:4px}.order-status-stack .badge{white-space:nowrap}
.mobile-head-actions{display:flex;align-items:center;gap:6px}.notification-bell{position:relative;display:grid;place-items:center;width:44px;height:44px;padding:0;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--ink)}.notification-bell svg,.notification-drawer svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.notification-count{position:absolute;top:-5px;left:-5px;display:grid;place-items:center;min-width:20px;height:20px;padding:0 5px;border:2px solid var(--surface);border-radius:12px;background:var(--danger);color:#fff;font-size:10px;font-weight:700}.notification-drawer{position:fixed;inset:0 0 0 auto;width:min(440px,100vw);height:100dvh;max-height:none;margin:0;padding:0;border:0;background:var(--surface);color:var(--ink);box-shadow:-10px 0 45px #0003}.notification-drawer::backdrop{background:#07101688}.notification-drawer header{display:flex;align-items:center;justify-content:space-between;padding:18px;border-bottom:1px solid var(--line)}.notification-drawer h2{margin:0}.notification-drawer header button{display:grid;place-items:center;width:44px;height:44px;border:0;border-radius:12px;background:var(--subtle);color:inherit}.notification-drawer nav{display:flex;gap:6px;padding:12px;overflow:auto;border-bottom:1px solid var(--line)}.notification-drawer nav button{min-height:44px;padding:8px 13px;border:1px solid var(--line);border-radius:22px;background:transparent;color:inherit;white-space:nowrap}.notification-drawer nav button.active{border-color:var(--accent);background:var(--accent-soft);color:var(--accent)}.notification-list{height:calc(100dvh - 126px);overflow:auto;padding:12px 16px calc(16px + env(safe-area-inset-bottom))}.notification-list section{margin-bottom:18px}.notification-list h3{margin:0 0 8px;color:var(--muted);font-size:12px}.notification-item{display:grid;grid-template-columns:1fr auto;gap:4px 10px;min-height:72px;padding:12px 4px;border-bottom:1px solid var(--line);color:inherit;text-decoration:none}.notification-item strong,.notification-item p{grid-column:1/-1}.notification-item p{margin:0;color:var(--muted);font-size:12px;line-height:1.7}.notification-item time,.notification-category{font-size:10px;color:var(--muted)}.notification-empty{padding:40px 10px;text-align:center;color:var(--muted)}
.notification-count[hidden]{display:none}.notification-drawer{max-width:100vw;max-height:100dvh}.notification-drawer[open]{display:flex;flex-direction:column}.notification-drawer>header,.notification-drawer>nav{flex-shrink:0}.notification-list{flex:1;min-height:0;height:auto}
.product-placement-badges {
  display:flex; flex-wrap:wrap; gap:5px; margin-top:8px; max-width:100%;
}
.product-placement-badges .badge {
  white-space:normal; overflow-wrap:anywhere; font-size:11px; line-height:1.7;
  background:var(--subtle); color:var(--muted); border:1px solid var(--line);
}
.product-sale-price { display:grid; gap:3px; margin-top:9px; min-width:0; }
.product-sale-price>small { color:var(--muted); font-size:11px; }
.product-sale-price>strong { color:var(--accent); font-size:13px; overflow-wrap:anywhere; }
.product-sale-rate { font-size:10px!important; }
.filter-chip { min-height:44px; }
.product-price-cell, .product-stock-cell { align-self:start; min-width:0; }
.product-placement-badges .shipping-stage {
  font-size:11px; line-height:1.7; white-space:normal; overflow-wrap:anywhere; margin:0;
}
.table-sort-button {
  display:inline-flex; align-items:center; gap:5px; min-height:44px;
  padding:4px 6px; border:0; border-radius:6px; background:transparent;
  color:inherit; font:inherit; cursor:pointer; box-shadow:none; text-align:right;
}
.table-sort-button svg { width:15px; height:15px; flex-shrink:0; fill:none; stroke:currentColor; stroke-width:1.8; }
.table-sort-button[data-sort-direction="1"], .table-sort-button[data-sort-direction="-1"] { color:var(--accent); }
.table-sort-button:hover { background:var(--accent-soft); }
.table-sort-button:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.product-table-head>span { display:flex; flex-wrap:wrap; align-items:center; gap:3px; }
.table-sort-mobile, .table-sort-caption { display:none; }
.notification-push-settings { display:grid; gap:8px; padding:14px 20px; border-bottom:1px solid var(--line); }
.notification-push-settings button { min-height:44px; }
.notification-push-settings [hidden] { display:none!important; }
.notification-push-settings small { color:var(--muted); line-height:1.9; }
.channel-multiselect { position:relative; flex:0 1 250px; min-width:0; }
.channel-multiselect summary { min-height:44px; padding:10px 12px; border:1px solid var(--line); border-radius:9px; cursor:pointer; background:var(--surface); color:var(--ink); overflow-wrap:anywhere; }
.channel-options { position:absolute; z-index:30; top:calc(100% + 5px); right:0; width:100%; max-height:300px; overflow-y:auto; padding:8px; border:1px solid var(--line); border-radius:10px; background:var(--surface); box-shadow:0 10px 25px #0003; }
.channel-options label { display:flex; align-items:center; gap:10px; min-height:44px; padding:5px; cursor:pointer; }
.channel-options input, .sales-history-toggle input { width:20px; height:20px; flex-shrink:0; accent-color:var(--accent); }
.sales-history-toggle { display:flex; align-items:center; gap:8px; min-height:44px; width:100%; font-size:12px; color:var(--muted); }
#operationDescription { white-space:pre-line; line-height:1.9; }
.delivery-guide { margin:12px 0; padding:8px 12px; border:1px solid var(--line); border-radius:10px; }
.delivery-guide summary { min-height:44px; display:flex; align-items:center; cursor:pointer; color:var(--muted); }
.delivery-guide p { font-size:12px; line-height:2; overflow-wrap:anywhere; }
.status-delivery-awaiting_arrival { color:#9a4b10; background:#ffeedb; }
.status-delivery-with_consignee { color:#7136a6; background:#f0e5ff; }
.status-delivery-ready { color:#235eb1; background:#e3edff; }
.status-delivery-shipped { color:#087b86; background:#dff7fa; }
.status-delivery-partial { color:#856407; background:#fff4c5; }
.status-delivery-delivered { color:#207141; background:#e0f3e6; }
.order-status-stack .status-registered, .order-status-stack .status-awaiting_pickup { color:var(--muted); background:var(--subtle); }
.order-status-stack .status-settled, .order-status-stack .status-delivered { color:#126d60; background:#def5ef; }
[data-theme="dark"] .status-delivery-awaiting_arrival { color:#ffb773; background:#463021; }
[data-theme="dark"] .status-delivery-with_consignee { color:#d6a8ff; background:#382843; }
[data-theme="dark"] .status-delivery-ready { color:#a2c6ff; background:#23344d; }
[data-theme="dark"] .status-delivery-shipped { color:#86e0ec; background:#1f3c41; }
[data-theme="dark"] .status-delivery-partial { color:#ffe185; background:#423a23; }
[data-theme="dark"] .status-delivery-delivered { color:#90dca9; background:#223c2b; }
[data-theme="dark"] .order-status-stack .status-settled, [data-theme="dark"] .order-status-stack .status-delivered { color:#83ddc4; background:#203c35; }
@media(max-width:599px) { .channel-multiselect { flex-basis:100%; min-width:0; } }
@media(max-width:599px) {
  .order-status-stack { min-width:0; max-width:100%; }
  .order-status-stack .badge { max-width:100%; white-space:normal; overflow-wrap:anywhere; }
}
.model-summary { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:16px 0; }
.model-summary-card { padding:16px;border:1px solid var(--line);border-radius:12px;background:var(--surface);display:grid;gap:8px;min-width:0; }
.model-summary-card strong { font-size:24px; }
.model-ownership-filters { display:flex;flex-wrap:wrap;gap:10px;flex-basis:100%;min-width:0; }
.model-ownership-filters label { display:flex;align-items:center;gap:8px;min-width:0; }.model-ownership-filters select { min-height:44px;width:auto;max-width:100%; }
.model-management-actions { grid-column:1/-1;display:flex;flex-wrap:wrap;gap:8px;margin:10px 0; }.model-management-actions button { min-height:44px; }
.model-ready-count { padding:8px;border-inline-start:3px solid var(--accent);background:var(--subtle);border-radius:6px; }
.stock-mobile-details,.stock-mobile-action { display:none; }
@media(max-width:599px) {
  .model-ownership-filters label { flex:1 1 150px; }.model-ownership-filters select { flex:1;min-width:0; }
  .model-management-actions button { flex:1 1 100px; }.model-numbers { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .stock-inventory-table { overflow:visible;min-width:0; }.stock-inventory-table .data-table { display:block;min-width:0;width:100%; }
  .stock-inventory-table .data-table thead { position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%); }
  .stock-inventory-table tbody { display:grid;gap:12px; }.stock-inventory-table .data-table tr { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));min-width:0;padding:12px;gap:6px 12px;border:1px solid var(--line);border-radius:12px;background:var(--surface); }
  .stock-inventory-table .data-table td { display:block;min-width:0;max-width:100%;padding:5px 0;white-space:normal;border:0;overflow-wrap:anywhere; }
  .stock-inventory-table .data-table td::before { display:block;content:attr(data-label);font-size:12px;color:var(--muted);margin-bottom:4px; }
  .stock-inventory-table .data-table .stock-card-title { grid-column:1/-1;order:1;font-weight:600; }.stock-inventory-table .data-table .stock-card-title::before { display:none; }
  .stock-inventory-table .stock-card-quantity { order:2;direction:rtl;unicode-bidi:normal; }.stock-inventory-table .stock-card-state { order:3; }.stock-inventory-table .stock-card-owner { order:4; }
  .stock-inventory-table .data-table .stock-card-actions { order:5;position:static;width:auto;align-self:center; }.stock-inventory-table .data-table .stock-card-actions::before { display:none; }
  .stock-inventory-table .data-table .stock-card-extra,.stock-inventory-table .stock-desktop-actions { display:none; }
  .stock-inventory-table .stock-mobile-action { display:block;min-height:44px;width:100%; }
  .stock-inventory-table .data-table .stock-mobile-details { display:block;grid-column:1/-1;order:6; }.stock-inventory-table .data-table .stock-mobile-details::before { display:none; }
  .stock-mobile-details summary { min-height:44px;cursor:pointer;padding:10px 0; }.stock-mobile-details dl { display:grid;grid-template-columns:minmax(70px,30%) minmax(0,1fr);gap:8px;margin:0; }.stock-mobile-details dd { margin:0;overflow-wrap:anywhere; }.stock-mobile-details dt { color:var(--muted); }
  .stock-inventory-table .badge,.stock-inventory-table .warehouse-state,.stock-mobile-details * { max-width:100%;white-space:normal;overflow-wrap:anywhere; }
  .stock-inventory-table .table-sort-mobile button { min-width:44px;flex-shrink:0; }
  .stock-inventory-table .table-sort-caption { display:block; }.stock-inventory-table .table-sort-mobile { display:flex;align-items:center;gap:8px;width:100%;margin:8px 0; }.stock-inventory-table .table-sort-mobile label { display:flex;align-items:center;gap:8px;flex:1;min-width:0; }.stock-inventory-table .table-sort-mobile select { flex:1;min-width:0; }.stock-inventory-table .table-sort-mobile select,.stock-inventory-table .table-sort-mobile button { min-height:44px; }
}
.model-toolbar { display:flex;flex-wrap:wrap;gap:10px;margin:18px 0; }.model-toolbar input { flex:1;min-width:160px; }.model-toolbar select { width:auto;max-width:100%;min-height:44px; }
.model-cards { display:grid;gap:16px;grid-template-columns:repeat(2,minmax(0,1fr)); }
.model-card { padding:18px;border:1px solid var(--line);border-radius:14px;background:var(--surface);min-width:0; }
.model-numbers { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;min-width:0; }.model-numbers span { display:grid;gap:6px;padding:8px;background:var(--subtle);border-radius:8px;font-size:13px; }.model-numbers strong { font-size:20px; }.model-numbers small { grid-column:1/-1;font-size:13px; }
.model-stage-chips { display:flex;flex-wrap:wrap;gap:6px;margin:10px 0; }.model-stage-chips .shipping-stage { white-space:normal;overflow-wrap:anywhere; }
.model-details { grid-column:1/-1;min-width:0;margin-top:12px; }.model-details summary,.model-free-editor summary { min-height:44px;cursor:pointer;padding:10px 0; }.model-details .data-table { min-width:0; }.model-product-row .row-location { display:none; }.model-product-row .product-stock-cell { min-width:0; }.model-product-row .model-free-editor .stock-editor { max-width:280px; }
#inventoryStageFilter { width:auto;max-width:100%;min-height:44px; }.model-details .data-table td { overflow-wrap:anywhere; }
@media(max-width:599px) { .model-cards { grid-template-columns:1fr; }.model-summary { gap:7px; }.model-summary-card { padding:12px; }.model-toolbar>* { flex:1;min-width:0; }.model-toolbar input { flex-basis:100%; }.model-details .data-table-wrap { overflow-x:auto;max-width:100%; }.model-details .data-table td { max-width:none; }.model-details .badge { white-space:normal; } }
@media(min-width:600px) and (max-width:1399px) {
  .product-table-head { display:none; }.product-table-body { display:grid;gap:14px; }
  .model-product-row { min-width:0;grid-template-columns:repeat(2,minmax(0,1fr));border:1px solid var(--line);border-radius:12px; }
  .model-product-row .product-main { grid-column:1/-1; }.model-product-row .product-stock-cell { min-width:0; }
}
@media(max-width:599px) {
  .table-sort-caption { display:table-caption; }
  .table-sort-mobile { display:flex; align-items:center; gap:8px; width:100%; margin:8px 0; }
  .table-sort-mobile label { display:flex; align-items:center; gap:8px; flex:1; min-width:0; }
  .table-sort-mobile select { flex:1; min-width:0; min-height:44px; }
}

/* Products: commercial buckets and ownership are separate groups. */
#adminStats.model-summary{grid-template-columns:repeat(3,minmax(0,1fr))}
.model-summary-card small{color:var(--muted);font-size:.8rem;line-height:1.8;overflow-wrap:anywhere}
.model-stock-breakdown{display:grid;gap:10px;min-width:0}
.model-stock-breakdown .model-commercial-numbers{grid-template-columns:repeat(3,minmax(0,1fr))}
.model-commercial-numbers [data-inventory-metric="sellable_qty"]{border-inline-start:3px solid var(--accent)}
.model-commercial-numbers [data-inventory-metric="committed_qty"]{color:#9a520a}
.model-ownership-caption{color:var(--muted);border-top:1px solid var(--line);padding-block-start:10px}
.model-ownership-numbers strong{font-size:17px}
[data-theme="dark"] .model-commercial-numbers [data-inventory-metric="committed_qty"]{color:#ffca82}
@media(max-width:1399px){#adminStats.model-summary{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:599px){.model-stock-breakdown .model-numbers span{font-size:.78rem;overflow-wrap:anywhere}.model-stock-breakdown .model-numbers strong{font-size:18px}}

/* Account, physical place and commercial state have independent presentations. */
.model-account-lines { min-width: 0; width: 100%; }
.model-account-line { margin: .5rem 0; line-height: 1.9; overflow-wrap: anywhere; }
.model-account-line .warehouse-sellable { color: var(--success, #16804a); }
.model-account-line .warehouse-committed-count,
[data-inventory-metric="committed_qty"] strong,
[data-stock-card="awaiting_dispatch"] strong { color: var(--warning, #ba7417); }
.model-commercial-numbers { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.model-summary, .stock-overview { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.model-card, .model-cards, .warehouse-view-results { min-width: 0; max-width: 100%; }
@media (max-width:599px) {
  .model-summary, .stock-overview, .model-commercial-numbers { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; }
  .model-summary-card, .stock-overview-card, .model-numbers > span { min-width: 0; padding: .55rem; overflow-wrap: anywhere; }
  .model-summary-card small, .stock-overview-card small { display: none; }
  .model-card .model-numbers { width: 100%; }
  .model-account-line { font-size: .82rem; }
  .model-toolbar, .warehouse-filters, .stock-filter-fields { min-width: 0; flex-wrap: wrap; }
  .warehouse-filters input, .warehouse-filters select, .model-toolbar input, .model-toolbar select { min-width: 0; max-width: 100%; }
  .model-details { min-width: 0; max-width: 100%; overflow-x: auto; }
}

/* The sales list is ordered/paged by the API, including appended batches. */
.sales-order-identity { white-space:pre-line;min-width:0;overflow-wrap:anywhere; }
.sales-registered-by { display:block;margin-top:7px;color:var(--muted);font-size:12px;white-space:normal;overflow-wrap:anywhere; }
.sales-list-footer { display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:12px;margin-top:18px; }
.sales-loaded-count,.sales-filter-hint { color:var(--muted);font-size:13px; }
.sales-filter-hint { width:100%;text-align:center;margin:0; }
.sales-load-more { min-height:44px; }
.sales-list-footer [hidden] { display:none; }
@media(max-width:599px) {
 .sales-server-list .sales-order-identity { max-width:100%; }
 .sales-server-list .sales-registered-by { font-size:12px; }
 .sales-list-footer { gap:10px; }.sales-load-more { width:100%; }
 .sales-server-list .table-sort-mobile label { min-width:0;flex:1; }
 .sales-server-list .table-sort-mobile select { min-width:0;max-width:100%; }
}
@media(max-width:599px) {
 .sales-server-list { overflow:visible;min-width:0; }
 .sales-server-list .data-table { display:block;width:100%;min-width:0; }
 .sales-server-list .data-table thead { position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%); }
 .sales-server-list .data-table tbody { display:grid;gap:12px;width:100%; }
 .sales-server-list .data-table tr { display:block;width:100%;min-width:0;padding:14px;border:1px solid var(--line);border-radius:12px; }
 .sales-server-list .data-table td { display:grid;grid-template-columns:minmax(76px,28%) minmax(0,1fr);gap:10px;max-width:none;padding:10px 0;white-space:pre-line;overflow-wrap:anywhere; }
 .sales-server-list .data-table td::before { content:attr(data-label);color:var(--muted);font-size:13px;white-space:normal; }
 .sales-server-list .data-table td > * { min-width:0;max-width:100%; }
 .sales-server-list .order-status-stack .badge { white-space:normal; }
 .sales-server-list .table-sort-caption { display:block; }
 .sales-server-list .table-sort-mobile { display:flex;align-items:center;gap:8px;width:100%;margin:8px 0; }
 .sales-server-list .table-sort-mobile label { display:flex;align-items:center;gap:8px; }
}

/* Owner team editor: separate read/action choices, scoped to this form. */
.team-presets, .team-permission-group { min-width: 0; grid-column: 1 / -1; }
.team-preset-controls { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.team-preset-controls select { flex: 1 1 160px; min-width: 0; }
.team-preset-controls button { min-height: 44px; }
.team-permission-group { margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: 12px; }
.team-permission-group legend { padding: 0 8px; font-weight: 700; }
.team-permission-group > .hint { margin: 0 0 12px; }
.team-permission-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.team-permission-grid .team-permission-option { display: flex; align-items: flex-start; gap: 10px; padding: 12px; min-height: 44px; border-radius: 8px; background: var(--subtle); cursor: pointer; }
.team-permission-option input { flex: 0 0 20px; width: 20px; height: 20px; margin-top: 3px; accent-color: var(--accent); }
.team-permission-option span { min-width: 0; }
.team-permission-option strong, .team-permission-option small { display: block; }
.team-permission-option small { margin-top: 4px; font-size: 12px; font-weight: 400; line-height: 1.8; color: var(--muted); }
@media (max-width:599px) {
  .team-permission-grid { grid-template-columns: 1fr; }
  .team-permission-group { padding: 12px; }
}

.team-permission-option.scope-option { flex-direction: column; align-items: stretch; }
.team-permission-option.scope-option select { width: 100%; min-width: 0; }

/* Shared operational rhythm, reading direction and keyboard focus. */
.workspace-header{margin-bottom:10px;padding-bottom:10px;gap:12px}.workspace-header h1{font-size:21px}.workspace-header .breadcrumb{display:none}
.workspace-intro{padding:6px 12px;margin-bottom:12px;min-height:0;gap:12px;font-size:12px}.workspace-intro p{margin:0}.workspace-intro #lastUpdated{font-size:12px}
.operation-page-heading{margin-bottom:14px}.operation-page-heading h2{font-size:19px;margin:0 0 5px}.operation-page-heading p{margin:0;line-height:1.8}
.workbench-heading{margin-bottom:12px}.workbench-heading h2{font-size:21px}.workbench-primary{padding:16px 20px;margin:14px 0}.workbench-columns{margin:12px 0}.workbench-panel{padding:18px}.workbench-panel-head{margin-bottom:10px}.task-row{padding:12px}
button,input,select,textarea{font-family:inherit}button,a,input,select,textarea,summary{touch-action:manipulation}:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
.data-table-wrap{max-width:100%;overflow:auto;overscroll-behavior-inline:contain}.data-table{width:100%;border-collapse:separate;border-spacing:0}.data-table th{position:sticky;top:0;background:var(--surface);z-index:1}.data-table td{word-break:normal;overflow-wrap:normal;line-height:1.85;vertical-align:top;min-width:0}.data-table td[data-label*="محصول"],.data-table td[data-label="کالا"]{min-width:0}.data-table td[data-label*="مبلغ"]{min-width:0}.data-table td[data-label="عملیات"]{min-width:0}.cell-value bdi{unicode-bidi:isolate}.no-wrap,.copy-value{white-space:nowrap}.copy-value{display:inline-flex;align-items:center;gap:6px;max-width:100%}.copy-button{padding:3px 7px!important;font-size:11px!important;background:var(--subtle);color:var(--ink);border:1px solid var(--line);border-radius:6px}.copy-button:focus-visible{outline-offset:1px}
.business-help{padding:10px 12px;border:1px solid var(--line);border-radius:10px;margin:12px 0;color:var(--muted);line-height:1.9}.business-help summary{cursor:pointer;color:var(--ink)}
.list-filters{align-items:end;gap:10px}.list-filters label{display:grid;gap:5px;font-size:12px;min-width:0}.list-filters input,.list-filters select{max-width:100%;min-width:0}.quick-filter-bar{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}.quick-filter-bar a{padding:8px 12px;background:var(--subtle);border:1px solid var(--line);border-radius:9px;color:var(--ink)}.quick-filter-bar a[aria-current]{background:var(--accent-soft);border-color:var(--accent)}
.product-main strong,.product-title-line strong{word-break:normal;overflow-wrap:normal}.product-main>small{unicode-bidi:isolate;text-align:start}.product-row.out-of-stock{background:var(--subtle)}.product-row.out-of-stock .photo-dot{opacity:.5}.inline-draft-error{color:var(--muted)}.inline-draft-error:not(:empty){margin-top:5px}.inline-draft-error[role=alert]{line-height:1.8}.row-action-cell details{font-size:12px}.row-action-cell summary{cursor:pointer}
html[data-density="compact"] .data-table td,html[data-density="compact"] .data-table th{padding:7px 10px;font-size:13px}html[data-density="compact"] .product-row{padding-block:9px}html[data-density="compact"] .badge{padding:3px 7px}
.sidebar-collapse{font-size:12px;align-self:stretch;margin-bottom:12px}.configuration-brand{padding:16px;border:1px solid var(--line);border-radius:12px}.configuration-brand h3{margin-top:0}.comparison-pair{display:grid;grid-template-columns:1fr 1fr;gap:12px}.comparison-pair>div{padding:12px;border:1px solid var(--line);border-radius:10px;min-width:0}.comparison-pair strong{display:block}.comparison-conflict{color:var(--danger);font-weight:600}
@media(min-width:1024px){body.sidebar-collapsed .sidebar{padding:12px 8px}body.sidebar-collapsed .sidebar-brand .wordmark,body.sidebar-collapsed .sidebar-caption,body.sidebar-collapsed .profile,body.sidebar-collapsed .nav-arrow{display:none}body.sidebar-collapsed .workspace-nav button{padding:10px 4px;gap:4px;flex-direction:column;font-size:11px}body.sidebar-collapsed .sidebar-brand{justify-content:center}body.sidebar-collapsed .sidebar-collapse{font-size:11px;padding:8px 4px}}
@media(max-width:1023px){.sidebar-collapse{display:none}.header-actions .density-toggle{display:block}.workspace-header{flex-wrap:wrap}.workbench-columns{grid-template-columns:1fr}.list-filters{display:flex;flex-wrap:wrap}.list-filters>label{flex:1 1 140px}.data-table-wrap:focus-visible{outline-offset:-3px}}
@media(max-width:599px){.copy-button{min-height:32px}.comparison-pair{grid-template-columns:1fr}.workbench-columns{margin-top:8px}.workbench-primary{min-height:64px}.header-actions{flex-wrap:wrap}.list-filters>input{width:100%}.workspace-intro{flex-wrap:wrap}}
.permission-category{grid-column:1/-1;color:var(--ink);border-bottom:1px solid var(--line);padding-bottom:8px;margin:12px 0 2px}.workbench-primary{min-height:70px}.workbench-primary strong{font-size:18px}.workbench-primary .workbench-action-icon{width:40px;height:40px}.workbench-heading .rate-pill{min-width:190px;padding:10px 14px}.business-help pre{white-space:pre-wrap;overflow-wrap:anywhere;max-width:100%;font-size:12px}.configuration-brand .configuration-tile{margin-bottom:8px;width:100%}
.data-table-wrap{max-height:72dvh}.sales-order-identity>small{display:block}.dispatch-next-step{font-size:12px;line-height:1.8;color:var(--muted)}
@media(max-width:599px){.sales-server-list{max-height:none}.sales-server-list .data-table td{min-width:0}.sales-server-list .cell-value bdi{white-space:normal}.sales-server-list .numeric-cell .cell-value bdi{white-space:nowrap}.sales-server-list .copy-value{flex-wrap:wrap;white-space:normal}.sales-server-list .copy-value bdi{white-space:nowrap}.sales-server-list .copy-button{padding:2px 5px!important}.sales-server-list .data-table td[data-label="کالا"]{overflow-wrap:normal;word-break:normal}}
.workbench-columns>*{min-width:0}.recent-sale-row{min-width:0;max-width:100%}
@media(min-width:1024px) and (max-width:1399px){.recent-sale-row{grid-template-columns:minmax(0,1fr) auto}.recent-sale-status{grid-column:1/-1;flex-wrap:wrap}.recent-sale-row>b{display:none}}
.list-filters>input[name="search"]{flex:1 0 100%;width:100%}.list-filters>.channel-multiselect{flex:1 1 160px;min-width:140px}.list-filters>select{flex:1 1 170px}.list-filters>label:not(.sales-history-toggle){flex:1 1 150px}.list-filters>.sales-history-toggle{display:flex;flex:1 0 100%;align-items:center;gap:8px}.sales-history-toggle input{flex:0 0 18px;width:18px;min-width:18px;height:18px;margin:0}.density-toggle{white-space:nowrap}
@media(max-width:1023px){.workspace-header>div:first-child{flex:1 0 100%}.workspace-header h1{font-size:18px;line-height:1.8}.workspace-header .header-actions{width:100%;justify-content:flex-start;gap:8px}.workspace-header #desktopNotificationBell{display:none}.workspace-header .density-toggle{font-size:12px;padding-inline:10px}.list-filters>label:not(.sales-history-toggle){flex-basis:130px}}
.sales-advanced-filters{flex:1 0 100%;margin:0}.advanced-filter-fields{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-top:12px}.advanced-filter-fields>label{display:grid;gap:5px;min-width:0}.advanced-filter-fields input,.advanced-filter-fields select{width:100%;min-width:0}.advanced-filter-fields .sales-history-toggle{display:flex;grid-column:1/-1;align-items:center;gap:8px}.advanced-filter-fields .sales-history-toggle input{width:18px;height:18px;flex:0 0 18px}.list-filters+.business-help{margin-top:0}
@media(max-width:1023px){.list-filters>select{width:130px;flex:1 1 125px}.list-filters>.channel-multiselect{flex-basis:100%}.advanced-filter-fields{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Channel metadata operation: one field and reachable controls on touch screens. */
.operation-dialog.sales-channel-dialog { width:min(480px,calc(100vw - 24px));box-sizing:border-box; }
.sales-channel-dialog .operation-fields { grid-template-columns:minmax(0,1fr); }
.sales-channel-dialog :is(select,button),.row-action-menu :is(button,a) { min-height:44px; }
/* The sales table fits the desktop grid; avoid overflow-x:auto creating a Y scroller. */
.sales-server-list { overflow:visible;max-height:none; }
/* Persian grouping marks must use their natural glyph advance, not a digit-wide cell. */
.data-table .numeric-cell,.record-drawer .drawer-body dd,.sales-stat strong,.workbench-metric>strong,.recent-sale-amount { font-variant-numeric:normal;letter-spacing:0;word-spacing:0; }
.nav-icon svg,.quick-icon svg,.workbench-action-icon svg { width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round; }

/* SALES 2.64.0 — exclusively sales-prefixed selectors. */
.sales-invoice{min-width:0;overflow-wrap:anywhere}.sales-strip{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-bottom:12px}.sales-metric{background:var(--subtle,var(--background));padding:10px;border:1px solid var(--line);border-radius:12px;min-width:0}.sales-metric span{display:block;color:var(--muted);font-size:.78rem}.sales-metric strong{font-size:.9rem}.sales-warning{color:var(--danger)}.sales-delivery-progress{margin:12px 0}.sales-progress{width:100%;height:8px;accent-color:var(--accent,var(--green))}.sales-drawer-actions{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}.sales-tabs{display:flex;gap:6px;border-bottom:1px solid var(--line);overflow-x:auto;margin-bottom:14px}.sales-tab[aria-selected=true],.sales-chip[aria-pressed=true]{color:var(--accent,var(--green));background:var(--accent-soft,var(--subtle));border-color:var(--accent,var(--green))}.sales-tab-panel[hidden],.sales-filter-panel[hidden]{display:none!important}.sales-line-card,.sales-return-card,.sales-proforma-card{padding:14px;border:1px solid var(--line);border-radius:12px;margin:10px 0;background:var(--surface);min-width:0;overflow-wrap:anywhere}.sales-line-card h4{margin:0 0 8px}.sales-pairs{display:block!important;margin:10px 0}.sales-pair{display:flex;justify-content:space-between;gap:12px;padding:8px 0;border-bottom:1px solid var(--line)}.sales-pair dt{color:var(--muted);font-size:.8rem}.sales-pair dd{margin:0;text-align:end;font-size:.85rem}.sales-allocation{font-size:.8rem;color:var(--muted)}.sales-tab:focus-visible,.sales-chip:focus-visible,.sales-line-card:focus-visible,.sales-return-card:focus-visible,.sales-filter-toggle:focus-visible{outline:3px solid var(--accent,var(--green));outline-offset:3px}.sales-filter-tools{display:grid;gap:8px}.sales-quick-filters,.sales-active-filters{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0}.sales-chip{border-radius:99px!important;font-size:.8rem!important}.sales-search-form{display:flex!important;flex-wrap:wrap}.sales-filter-panel{flex-basis:100%;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;background:var(--surface);padding:14px;border:1px solid var(--line);border-radius:12px}.sales-filter-panel label{display:grid;gap:6px;min-width:0}.sales-filter-panel .channel-multiselect{grid-column:1/-1}.sales-filter-panel .sales-history-toggle{display:flex}.sales-row-money,.sales-row-customer{display:grid;gap:4px}.sales-row-money small,.sales-row-customer small{color:var(--muted)}.sales-deposit-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:12px 0}.sales-deposit-age{display:block;font-size:.8rem}.sales-payment-progress{width:100%;accent-color:var(--accent,var(--green));height:7px}.sales-return-steps{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:12px 0}.sales-return-step{padding:10px;border-radius:10px;background:var(--subtle,var(--background))}.sales-return-step strong{display:block}.sales-return-meta{font-size:.85rem;color:var(--muted)}.sales-case-actions{display:flex;flex-wrap:wrap;gap:8px}.sales-case-chips{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}.sales-form{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;border-radius:0;padding:20px}.sales-form .sale-layout{grid-template-columns:minmax(0,1fr) minmax(250px,340px);max-width:1200px;margin:auto}.sales-form .sale-head{max-width:1200px;margin:0 auto 20px}.sales-form .sale-step{padding:16px;border:1px solid var(--line);border-radius:12px;margin:0 0 16px}.sales-form .sale-summary{top:8px}.sales-form .sale-actions{position:sticky;bottom:0;background:var(--surface);padding:12px;border-radius:12px}.sales-form .sale-line{margin-bottom:12px}.sales-source-details{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:12px;border-top:1px solid var(--line);padding-top:12px}.sales-source-details[hidden]{display:none}.sales-line-total{display:block;font-weight:600;padding:8px 0}.sales-edit-changes{background:var(--accent-soft,var(--subtle));padding:10px;border-radius:10px;margin:12px 0}.sales-proforma-context{padding:10px;border:1px solid var(--line);border-radius:10px;margin-bottom:12px}.sales-form-error{color:var(--danger);border:1px solid var(--danger);padding:10px;border-radius:10px}.sales-form-error:empty{display:none}
@media(max-width:760px){.sales-strip{gap:4px}.sales-metric{padding:8px}.sales-metric strong{font-size:.8rem}.sales-filter-panel{grid-template-columns:1fr 1fr}.sales-deposit-stats{grid-template-columns:1fr}.sales-form{padding:12px}.sales-form .sale-layout{grid-template-columns:1fr}.sales-form .sale-summary{position:static}.sales-return-steps{grid-template-columns:1fr}.sales-source-details{grid-template-columns:1fr}.sales-pair{flex-wrap:wrap}.sales-pair dd{max-width:100%}}
@media(prefers-reduced-motion:reduce){.sales-invoice,.sales-form,.sales-tab-panel{scroll-behavior:auto;animation:none;transition:none}}
/* Sales sheet overrides legacy wizard layout without changing its shared stylesheet. */
.sales-form.sale-wizard{display:block;inset:0;right:auto;width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;border-radius:0;overflow:auto;padding:20px!important}
.sales-form .sale-layout{display:grid;overflow:visible;direction:ltr;padding:0;grid-template-columns:minmax(0,1fr) minmax(250px,340px);max-width:1200px;margin:auto}
.sales-form .sale-main,.sales-form .sale-summary{direction:rtl}
.sales-form .sale-head{padding:0;margin:0 auto 20px}
.sales-form.sale-wizard .sale-summary{position:sticky;top:8px;bottom:auto;inset-inline:auto;order:0}
.sales-form .sale-summary dl{display:block}
.sales-form .sale-summary dd{white-space:normal}
@media(max-width:760px){.sales-form.sale-wizard{padding:12px!important}.sales-form .sale-layout{grid-template-columns:1fr}.sales-form.sale-wizard .sale-summary{position:static;order:0;width:100%}.sales-form .sale-summary h3{display:block}}
/* Return registration layout; wrapper is removed by the existing operation form. */
.sales-return-layout{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:16px;min-width:0}
.sales-return-fieldset{display:grid;align-content:start;gap:12px;border:1px solid var(--line);border-radius:12px;padding:14px;min-width:0}
.sales-return-fieldset legend{padding:0 8px;font-weight:600}
.sales-return-fieldset label{display:grid;gap:6px;min-width:0;font-size:.85rem}
.sales-return-fieldset input,.sales-return-fieldset select,.sales-return-fieldset textarea{width:100%;min-width:0;box-sizing:border-box}
.sales-return-fieldset input[type=checkbox]{width:auto;justify-self:start}
@media(max-width:760px){.sales-return-layout{grid-template-columns:1fr}}
.sales-proforma-card:focus-visible,.sales-invoice-row:focus-visible{outline:3px solid var(--accent,var(--green));outline-offset:2px}
@media(prefers-reduced-motion:reduce){.sales-form.sale-wizard{animation:none!important;transition:none!important}}

.sales-row-money{direction:rtl}
.sales-source-details > .sale-field:first-child{grid-column:1/-1}

/* SALES 2.64.1 — compact return/proforma cards; presentation only. */
.sales-return-card,.sales-proforma-card{display:flex;flex-wrap:wrap;align-items:center;gap:12px 20px;padding:12px 14px;margin:8px 0}
.sales-card-summary{flex:1 1 250px;min-width:0;display:grid;gap:4px}
.sales-card-summary h3{margin:0;font-size:.9rem;line-height:1.6}
.sales-card-summary p,.sales-proforma-status p,.sales-proforma-amount p,.sales-return-card .sales-return-meta{margin:0}
.sales-card-identity{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 8px;min-width:0}
.sales-card-identity p,.sales-card-identity a,.sales-card-description,.sales-card-summary>.sales-item-names{font-size:.8rem;line-height:1.8;color:var(--muted)}
.sales-card-identity p:empty{display:none}
.sales-card-identity p:not(:empty)::before{content:'·';padding-inline-end:8px}
.sales-card-description{display:flex;flex-wrap:wrap;align-items:baseline;column-gap:8px}
.sales-card-description .sales-item-names{display:block}
.sales-return-card .sales-return-steps{display:flex;flex:1.2 1 360px;flex-wrap:wrap;align-items:center;gap:12px 20px;margin:0;min-width:0}
.sales-return-card .sales-return-step{display:flex;flex-direction:column;align-items:flex-start;gap:4px;min-width:0;padding:0;background:transparent}
.sales-return-card .sales-return-step:first-child{flex:0 1 auto}
.sales-return-card .sales-return-step:last-child{flex:1 1 210px}
.sales-return-card .sales-return-step>strong{font-size:.72rem;font-weight:500;color:var(--muted)}
.sales-card-badge{max-width:100%;white-space:normal;overflow-wrap:anywhere;font-size:.74rem;line-height:1.7;padding:3px 8px;border-radius:99px}
.sales-return-card .sales-warning{background:color-mix(in srgb,var(--danger) 10%,var(--surface))}
.sales-return-card .sales-return-meta,.sales-card-stock-warning{font-size:.72rem;line-height:1.7;overflow-wrap:anywhere}
.sales-card-actions{display:flex;flex:0 1 auto;flex-wrap:wrap;align-items:center;gap:8px;max-width:100%;margin-inline-start:auto}
.sales-card-actions>button{font-size:.8rem;padding:8px 10px;min-height:44px}
.sales-proforma-amount{flex:0 1 180px;min-width:0;display:grid;gap:4px}
.sales-proforma-amount:empty{display:none}
.sales-proforma-amount>strong{font-size:.9rem;line-height:1.8}
.sales-proforma-status{flex:0 1 150px;min-width:0;display:flex;flex-direction:column;align-items:flex-start;gap:4px}
.sales-proforma-status>a{font-size:.8rem}
.sales-proforma-card{display:grid;grid-template-columns:minmax(0,1fr) 180px 150px 150px}
.sales-proforma-card>.sales-card-summary{grid-column:1;grid-row:1}
.sales-proforma-card>.sales-proforma-amount{grid-column:2;grid-row:1}
.sales-proforma-card>.sales-proforma-status{grid-column:3;grid-row:1}
.sales-proforma-card>.sales-card-actions{grid-column:4;grid-row:1;margin-inline-start:0;min-width:0}
.sales-proforma-card:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
@media(max-width:1000px){
 .sales-proforma-card{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
 .sales-proforma-card>.sales-card-summary{grid-column:1/-1;grid-row:1}
 .sales-proforma-card>.sales-proforma-amount{grid-column:1;grid-row:2}
 .sales-proforma-card>.sales-proforma-status{grid-column:2;grid-row:2}
 .sales-proforma-card>.sales-card-actions{grid-column:1/-1;grid-row:3}
 .sales-proforma-card>.sales-card-actions:empty{display:none}
}
@media(max-width:760px){
 .sales-return-card,.sales-proforma-card{padding:12px;gap:12px}
 .sales-card-summary{flex-basis:100%}
 .sales-return-card .sales-return-steps{flex-basis:100%;gap:12px}
 .sales-return-card .sales-return-step:first-child{flex:1 1 0}
 .sales-return-card .sales-return-step:last-child{flex:2 1 0}
 .sales-card-actions{width:100%;margin-inline-start:0}
 .sales-proforma-amount{flex:1 1 150px}
 .sales-proforma-status{flex:1 1 100px}
}

/* SALES 2.64.2 — allocation cards inside the owner-only shipping disclosure. */
.sales-shipping-allocations{display:grid;gap:10px;margin-block:10px;min-width:0}
.sales-shipping-card{display:block!important;min-width:0;margin:0;padding:10px;border:1px solid var(--line);border-radius:10px;background:var(--surface)}
.sales-shipping-pair{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,2fr);gap:6px 12px;align-items:baseline;padding-block:6px}
.sales-shipping-pair+.sales-shipping-pair{border-top:1px solid var(--line)}
.sales-shipping-pair dt{font-size:.78rem;color:var(--muted);line-height:1.8}
.sales-shipping-pair dd{min-width:0;margin:0;text-align:end;font-size:.85rem;line-height:1.8;white-space:normal;word-break:normal;overflow-wrap:anywhere}
.sales-shipping-value{white-space:normal;word-break:normal;overflow-wrap:anywhere}

/* Warehouse entry 2.65.0: only the purchase dialog's own fields. */
.warehouse-purchase-fields{grid-column:1/-1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;min-width:0}
.warehouse-purchase-fields>label{min-width:0;overflow-wrap:anywhere}
.warehouse-purchase-fields>label[hidden]{display:none!important}
.warehouse-purchase-fields select{width:100%;min-width:0}
@media(max-width:760px){.warehouse-purchase-fields{grid-template-columns:minmax(0,1fr)}}
