:root {
  color-scheme: light;
  --ink-950: #102018;
  --ink-900: #142820;
  --ink-800: #1c382d;
  --ink-700: #28503f;
  --gold-700: #8f671e;
  --gold-600: #ad7e2d;
  --gold-500: #c99a43;
  --gold-300: #e7cf9e;
  --gold-100: #f6edd9;
  --cream-50: #fbfaf6;
  --paper: #ffffff;
  --stone-100: #f1f0ea;
  --stone-200: #e5e3dc;
  --stone-400: #9b9d98;
  --stone-600: #626b65;
  --danger: #b54a43;
  --danger-soft: #f8e7e5;
  --success: #287653;
  --success-soft: #e2f1e9;
  --warning: #a56c19;
  --warning-soft: #f8edd7;
  --info: #42658a;
  --info-soft: #e6eef5;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 8px 22px rgba(16, 32, 24, 0.07);
  --shadow-lg: 0 22px 60px rgba(16, 32, 24, 0.16);
  --sidebar: 268px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--cream-50);
  color: var(--ink-950);
  font-family: Tahoma, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.65;
  overflow-x: hidden;
}
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
svg { display: block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip-link { position: fixed; inset: 10px auto auto 50%; z-index: 200; transform: translate(-50%, -180%); padding: 10px 16px; border-radius: var(--radius-sm); background: var(--paper); box-shadow: var(--shadow-lg); }
.skip-link:focus { transform: translate(-50%, 0); }
:focus-visible { outline: 3px solid rgba(201, 154, 67, 0.48); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed;
  z-index: 80;
  inset: 0 0 0 auto;
  width: var(--sidebar);
  display: flex;
  flex-direction: column;
  padding: 22px 16px 18px;
  background: var(--ink-900);
  color: #fff;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.brand-block { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 4px 18px; border-bottom: 1px solid rgba(255, 255, 255, 0.09); }
.product-mark { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid rgba(231, 207, 158, 0.48); border-radius: 14px; color: var(--gold-300); background: rgba(255, 255, 255, 0.05); }
.product-mark svg { width: 22px; height: 22px; }
.brand-block > span:nth-child(2) { display: flex; flex-direction: column; line-height: 1.5; min-width: 0; }
.brand-block strong { font-size: 14px; }
.brand-block small { font-size: 11px; color: rgba(255, 255, 255, 0.58); }
.sidebar-close { display: none; margin-inline-start: auto; }
.workspace-card { display: flex; align-items: center; gap: 10px; margin: 18px 2px 8px; padding: 12px; border-radius: var(--radius-md); background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.07); }
.workspace-icon { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 10px; background: var(--gold-500); color: var(--ink-950); font-weight: 800; }
.workspace-card > span:nth-child(2) { min-width: 0; display: flex; flex-direction: column; line-height: 1.5; }
.workspace-card small { color: rgba(255, 255, 255, 0.54); font-size: 10px; }
.workspace-card strong { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-card i { width: 7px; height: 7px; margin-inline-start: auto; background: #71d19e; border-radius: 50%; box-shadow: 0 0 0 4px rgba(113, 209, 158, 0.1); }
.main-nav { padding: 6px 0; flex: 1; }
.main-nav p { margin: 17px 12px 7px; color: rgba(255, 255, 255, 0.38); font-size: 10px; font-weight: 700; letter-spacing: 0.03em; }
.nav-item { width: 100%; min-height: 42px; display: flex; align-items: center; gap: 11px; padding: 8px 12px; border: 0; border-radius: 12px; background: transparent; color: rgba(255, 255, 255, 0.67); text-align: right; transition: color .18s ease, background .18s ease, transform .18s ease; }
.nav-item:hover { color: #fff; background: rgba(255, 255, 255, 0.055); }
.nav-item.active { color: #fff; background: rgba(201, 154, 67, 0.17); box-shadow: inset -3px 0 var(--gold-500); }
.nav-item svg { width: 18px; height: 18px; flex: 0 0 auto; }
.nav-item b { min-width: 24px; margin-inline-start: auto; padding: 1px 7px; border-radius: 99px; background: var(--gold-500); color: var(--ink-950); font-size: 10px; text-align: center; }
.nav-status { width: 6px; height: 6px; margin-inline-start: auto; border-radius: 50%; background: #71d19e; }
.sidebar-foot { border-top: 1px solid rgba(255, 255, 255, .08); padding-top: 8px; }
.back-link { display: flex; align-items: center; justify-content: space-between; margin: 4px 2px 13px; padding: 9px 10px; font-size: 11px; color: var(--gold-300); }
.back-link svg { width: 15px; height: 15px; }
.operator { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 13px; background: rgba(0, 0, 0, .12); }
.operator > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--ink-700); font-size: 11px; }
.operator div { min-width: 0; display: flex; flex-direction: column; line-height: 1.5; }
.operator strong { font-size: 11px; }
.operator small { color: rgba(255,255,255,.48); font-size: 9px; }
.operator i { width: 7px; height: 7px; margin-inline-start: auto; border-radius: 50%; background: #71d19e; }
.operator button { width: 30px; height: 30px; display: grid; place-items: center; padding: 0; border: 1px solid rgba(255,255,255,.1); border-radius: 9px; background: transparent; color: rgba(255,255,255,.58); }
.operator button:hover { color: #fff; background: rgba(255,255,255,.08); }
.operator button svg { width: 15px; height: 15px; }

.content-column { min-height: 100vh; margin-right: var(--sidebar); }
.topbar { position: sticky; z-index: 50; top: 0; min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 12px clamp(18px, 3vw, 42px); border-bottom: 1px solid var(--stone-200); background: rgba(251, 250, 246, .94); backdrop-filter: blur(14px); }
.topbar-start, .topbar-actions { display: flex; align-items: center; gap: 12px; }
.page-identity p { margin: 0; color: var(--stone-600); font-size: 10px; }
.page-identity h1 { margin: -2px 0 0; font-size: 20px; line-height: 1.4; letter-spacing: -.02em; }
.menu-button { display: none; }
.icon-button { width: 40px; height: 40px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid var(--stone-200); border-radius: 12px; background: var(--paper); }
.sidebar .icon-button { border-color: rgba(255,255,255,.12); background: rgba(255,255,255,.05); color: #fff; }
.branch-picker { height: 42px; display: flex; align-items: center; gap: 8px; padding: 0 11px; border: 1px solid var(--stone-200); border-radius: 12px; background: var(--paper); color: var(--stone-600); }
.branch-picker svg { width: 17px; height: 17px; }
.branch-picker select { min-width: 116px; border: 0; outline: 0; background: transparent; color: var(--ink-950); }
.sync-state { height: 42px; display: flex; align-items: center; gap: 7px; padding: 0 12px; border: 1px solid var(--stone-200); border-radius: 12px; background: var(--paper); color: var(--stone-600); font-size: 11px; }
.sync-state i { width: 7px; height: 7px; border-radius: 50%; background: var(--warning); }
.sync-state.online i { background: var(--success); }
.sync-state.offline i { background: var(--danger); }
.notification-button { position: relative; }
.notification-button b { position: absolute; inset: -6px -5px auto auto; min-width: 18px; height: 18px; padding: 0 4px; border: 2px solid var(--cream-50); border-radius: 99px; background: var(--danger); color: #fff; font-size: 9px; line-height: 14px; }
.button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border: 1px solid transparent; border-radius: 12px; font-weight: 700; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button.primary { background: var(--ink-900); color: #fff; box-shadow: 0 8px 18px rgba(20, 40, 32, .14); }
.button.gold { background: var(--gold-500); color: var(--ink-950); }
.button.secondary { border-color: var(--stone-200); background: var(--paper); }
.button.danger { background: var(--danger-soft); color: var(--danger); }
.button svg { width: 17px; height: 17px; }

#workspace { width: min(1560px, 100%); min-height: calc(100vh - 76px); margin-inline: auto; padding: clamp(22px, 3vw, 42px); }
.loading-state { min-height: 60vh; display: grid; place-content: center; justify-items: center; text-align: center; color: var(--stone-600); }
.loading-state span { width: 42px; height: 42px; border: 3px solid var(--stone-200); border-top-color: var(--gold-500); border-radius: 50%; animation: spin .8s linear infinite; }
.loading-state h2 { margin: 18px 0 0; color: var(--ink-950); font-size: 17px; }
.loading-state p { margin: 4px 0; font-size: 12px; }
@keyframes spin { to { transform: rotate(360deg); } }

.view-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.view-head p { margin: 0 0 4px; color: var(--stone-600); font-size: 12px; }
.view-head h2 { margin: 0; font-size: clamp(23px, 3vw, 34px); line-height: 1.35; letter-spacing: -.035em; }
.view-head h2 em { color: var(--gold-700); font-style: normal; }
.view-head-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.date-chip { display: inline-flex; align-items: center; gap: 7px; margin-top: 11px; color: var(--stone-600); font-size: 11px; }
.date-chip svg { width: 15px; height: 15px; color: var(--gold-700); }

.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.metric-card { position: relative; min-height: 148px; padding: 20px; border: 1px solid var(--stone-200); border-radius: var(--radius-md); background: var(--paper); box-shadow: var(--shadow-sm); overflow: hidden; }
.metric-card::after { content: ""; position: absolute; inset: auto auto -38px -28px; width: 90px; height: 90px; border: 18px solid var(--gold-100); border-radius: 50%; opacity: .75; }
.metric-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--stone-600); font-size: 11px; }
.metric-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; background: var(--gold-100); color: var(--gold-700); }
.metric-icon svg { width: 17px; height: 17px; }
.metric-card strong { position: relative; z-index: 1; display: block; margin-top: 15px; font-size: clamp(22px, 2vw, 30px); line-height: 1.3; letter-spacing: -.03em; }
.metric-card > small { position: relative; z-index: 1; display: block; margin-top: 4px; color: var(--stone-600); font-size: 10px; }
.trend { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; color: var(--success); font-size: 10px; }
.trend.down { color: var(--danger); }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, .8fr); gap: 16px; }
.panel { border: 1px solid var(--stone-200); border-radius: var(--radius-md); background: var(--paper); box-shadow: var(--shadow-sm); overflow: hidden; }
.panel-head { min-height: 65px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 18px; border-bottom: 1px solid var(--stone-100); }
.panel-head h3 { margin: 0; font-size: 14px; }
.panel-head p { margin: 2px 0 0; color: var(--stone-600); font-size: 10px; }
.text-button { display: inline-flex; align-items: center; gap: 5px; padding: 7px; border: 0; background: transparent; color: var(--gold-700); font-size: 11px; font-weight: 700; }
.text-button svg { width: 14px; height: 14px; }
.chart-wrap { padding: 20px 18px 16px; }
.chart-total { display: flex; align-items: baseline; gap: 9px; }
.chart-total strong { font-size: 26px; }
.chart-total span { color: var(--stone-600); font-size: 11px; }
.bar-chart { height: 190px; display: flex; align-items: end; gap: clamp(8px, 2vw, 20px); margin-top: 18px; padding: 12px 5px 0; border-bottom: 1px solid var(--stone-200); }
.bar-column { flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: end; gap: 7px; min-width: 20px; }
.bar-column i { width: min(34px, 70%); min-height: 5px; border-radius: 7px 7px 2px 2px; background: var(--ink-800); transition: height .3s ease; }
.bar-column.today i { background: var(--gold-500); }
.bar-column span { color: var(--stone-600); font-size: 9px; white-space: nowrap; }
.activity-list { margin: 0; padding: 8px 18px 14px; list-style: none; }
.activity-list li { position: relative; display: flex; gap: 11px; padding: 12px 0; border-bottom: 1px solid var(--stone-100); }
.activity-list li:last-child { border: 0; }
.activity-dot { width: 9px; height: 9px; flex: 0 0 auto; margin-top: 7px; border: 2px solid var(--gold-500); border-radius: 50%; background: var(--paper); }
.activity-list strong { display: block; font-size: 11px; }
.activity-list p { margin: 1px 0 0; color: var(--stone-600); font-size: 10px; }
.activity-list time { margin-inline-start: auto; color: var(--stone-400); font-size: 9px; white-space: nowrap; }
.quick-strip { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; border: 1px solid var(--stone-200); border-radius: var(--radius-md); background: var(--stone-200); overflow: hidden; }
.quick-action { min-height: 86px; display: flex; align-items: center; gap: 12px; padding: 15px 18px; border: 0; background: var(--paper); text-align: right; }
.quick-action:hover { background: var(--gold-100); }
.quick-action > span:first-child { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 12px; background: var(--ink-900); color: #fff; }
.quick-action svg { width: 18px; height: 18px; }
.quick-action strong { display: block; font-size: 11px; }
.quick-action small { color: var(--stone-600); font-size: 9px; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.toolbar-group { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.search-field { position: relative; min-width: min(330px, 100%); }
.search-field svg { position: absolute; inset: 50% 12px auto auto; width: 17px; height: 17px; color: var(--stone-400); transform: translateY(-50%); }
.search-field input { width: 100%; height: 44px; padding: 8px 40px 8px 13px; border: 1px solid var(--stone-200); border-radius: 12px; background: var(--paper); outline: 0; }
.search-field input:focus { border-color: var(--gold-500); box-shadow: 0 0 0 3px rgba(201,154,67,.13); }
.filter-select { height: 44px; padding: 0 12px; border: 1px solid var(--stone-200); border-radius: 12px; background: var(--paper); }
.segmented { display: flex; gap: 3px; padding: 3px; border: 1px solid var(--stone-200); border-radius: 12px; background: var(--paper); }
.segmented button { min-height: 34px; padding: 6px 12px; border: 0; border-radius: 9px; background: transparent; color: var(--stone-600); font-size: 10px; }
.segmented button.active { background: var(--ink-900); color: #fff; }

.data-table-wrap { border: 1px solid var(--stone-200); border-radius: var(--radius-md); background: var(--paper); box-shadow: var(--shadow-sm); overflow: auto; }
.data-table { width: 100%; min-width: 760px; border-collapse: collapse; }
.data-table th { padding: 12px 15px; border-bottom: 1px solid var(--stone-200); background: #f8f7f3; color: var(--stone-600); font-size: 10px; text-align: right; white-space: nowrap; }
.data-table td { padding: 13px 15px; border-bottom: 1px solid var(--stone-100); vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fcfbf8; }
.product-cell { display: flex; align-items: center; gap: 10px; min-width: 190px; }
.product-glyph { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 12px; background: var(--gold-100); color: var(--gold-700); font-size: 18px; }
.product-cell strong { display: block; font-size: 11px; }
.product-cell small { display: block; color: var(--stone-600); font-size: 9px; direction: ltr; text-align: right; }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 99px; background: var(--stone-100); color: var(--stone-600); font-size: 9px; white-space: nowrap; }
.tag::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.tag.success { background: var(--success-soft); color: var(--success); }
.tag.warning { background: var(--warning-soft); color: var(--warning); }
.tag.danger { background: var(--danger-soft); color: var(--danger); }
.tag.info { background: var(--info-soft); color: var(--info); }
.row-actions { display: flex; gap: 5px; justify-content: flex-end; }
.row-button { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--stone-200); border-radius: 9px; background: var(--paper); }
.row-button svg { width: 15px; height: 15px; }

.pos-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.catalog { min-width: 0; }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.product-card { display: flex; flex-direction: column; min-height: 210px; padding: 16px; border: 1px solid var(--stone-200); border-radius: var(--radius-md); background: var(--paper); text-align: right; box-shadow: var(--shadow-sm); }
.product-card:hover { border-color: var(--gold-300); }
.product-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.product-card .product-glyph { width: 45px; height: 45px; font-size: 21px; }
.stock-count { color: var(--stone-600); font-size: 9px; }
.product-card h3 { margin: 14px 0 1px; font-size: 12px; }
.product-meta { margin: 0; color: var(--stone-600); font-size: 9px; }
.product-price { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; margin-top: auto; padding-top: 15px; }
.product-price strong { font-size: 14px; }
.product-price span { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 10px; background: var(--ink-900); color: #fff; }
.product-price svg { width: 15px; height: 15px; }
.cart-panel { position: sticky; top: 94px; border: 1px solid var(--stone-200); border-radius: var(--radius-md); background: var(--paper); box-shadow: var(--shadow-sm); overflow: hidden; }
.cart-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--stone-100); }
.cart-head h3 { margin: 0; font-size: 14px; }
.cart-head span { color: var(--stone-600); font-size: 10px; }
.cart-items { max-height: 355px; overflow-y: auto; padding: 7px 16px; }
.cart-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--stone-100); }
.cart-row strong { display: block; font-size: 11px; }
.cart-row small { color: var(--stone-600); font-size: 9px; }
.qty-control { display: flex; align-items: center; gap: 6px; }
.qty-control button { width: 26px; height: 26px; border: 1px solid var(--stone-200); border-radius: 8px; background: var(--paper); }
.qty-control span { min-width: 18px; text-align: center; font-weight: 700; }
.cart-empty { min-height: 210px; display: grid; place-content: center; justify-items: center; padding: 24px; color: var(--stone-600); text-align: center; }
.cart-empty span { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 18px; background: var(--gold-100); color: var(--gold-700); }
.cart-empty svg { width: 24px; height: 24px; }
.cart-empty strong { margin-top: 10px; color: var(--ink-950); font-size: 12px; }
.cart-empty p { margin: 3px 0; font-size: 9px; }
.cart-summary { padding: 14px 18px 18px; border-top: 1px solid var(--stone-100); }
.summary-row { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; color: var(--stone-600); font-size: 10px; }
.summary-row.total { margin: 11px 0 14px; padding-top: 11px; border-top: 1px dashed var(--stone-200); color: var(--ink-950); font-size: 13px; font-weight: 800; }
.cart-summary .button { width: 100%; }
.customer-select { width: 100%; height: 41px; margin-bottom: 12px; padding: 0 10px; border: 1px solid var(--stone-200); border-radius: 10px; background: var(--paper); }

.entity-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.entity-card { position: relative; padding: 18px; border: 1px solid var(--stone-200); border-radius: var(--radius-md); background: var(--paper); box-shadow: var(--shadow-sm); }
.entity-head { display: flex; align-items: center; gap: 11px; }
.entity-avatar { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: var(--ink-900); color: var(--gold-300); font-size: 11px; font-weight: 800; }
.entity-head h3 { margin: 0; font-size: 12px; }
.entity-head p { margin: 1px 0 0; color: var(--stone-600); font-size: 9px; direction: ltr; text-align: right; }
.entity-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.entity-stats span { padding: 9px; border-radius: 10px; background: var(--stone-100); }
.entity-stats small { display: block; color: var(--stone-600); font-size: 8px; }
.entity-stats strong { display: block; margin-top: 2px; font-size: 10px; }
.entity-card > button { margin-top: 12px; }

.account-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; margin-bottom: 16px; }
.balance-card { min-height: 128px; padding: 18px; border-radius: var(--radius-md); background: var(--ink-900); color: #fff; }
.balance-card.gold-bg { background: var(--gold-500); color: var(--ink-950); }
.balance-card.light-bg { border: 1px solid var(--stone-200); background: var(--paper); color: var(--ink-950); }
.balance-card small { color: currentColor; opacity: .64; font-size: 10px; }
.balance-card strong { display: block; margin-top: 15px; font-size: 23px; }
.balance-card p { margin: 3px 0 0; opacity: .62; font-size: 9px; }

.kanban { display: grid; grid-template-columns: repeat(3, minmax(260px, 1fr)); gap: 13px; overflow-x: auto; align-items: start; }
.kanban-column { min-height: 350px; padding: 11px; border: 1px solid var(--stone-200); border-radius: var(--radius-md); background: #f3f2ed; }
.kanban-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 4px 11px; }
.kanban-head strong { font-size: 11px; }
.kanban-head span { min-width: 22px; padding: 1px 6px; border-radius: 99px; background: var(--paper); color: var(--stone-600); font-size: 9px; text-align: center; }
.job-card { margin-bottom: 9px; padding: 14px; border: 1px solid var(--stone-200); border-radius: 13px; background: var(--paper); box-shadow: 0 5px 14px rgba(16,32,24,.05); }
.job-card:last-child { margin-bottom: 0; }
.job-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.job-card h3 { margin: 0; font-size: 11px; }
.job-card p { margin: 7px 0 0; color: var(--stone-600); font-size: 9px; }
.job-progress { height: 5px; margin: 12px 0 8px; border-radius: 99px; background: var(--stone-100); overflow: hidden; }
.job-progress i { display: block; height: 100%; border-radius: inherit; background: var(--gold-500); }
.job-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--stone-600); font-size: 9px; }

.branch-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; margin-bottom: 16px; }
.branch-card { padding: 18px; border: 1px solid var(--stone-200); border-radius: var(--radius-md); background: var(--paper); box-shadow: var(--shadow-sm); }
.branch-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.branch-card h3 { margin: 0; font-size: 12px; }
.branch-card p { margin: 2px 0 0; color: var(--stone-600); font-size: 9px; }
.branch-value { margin-top: 20px; }
.branch-value small { display: block; color: var(--stone-600); font-size: 9px; }
.branch-value strong { display: block; margin-top: 2px; font-size: 17px; }
.branch-mini { display: flex; justify-content: space-between; gap: 8px; margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--stone-100); color: var(--stone-600); font-size: 9px; }

.integration-hero { display: grid; grid-template-columns: 1.3fr .7fr; gap: 24px; align-items: center; min-height: 220px; margin-bottom: 16px; padding: clamp(22px,4vw,42px); border-radius: var(--radius-lg); background: var(--ink-900); color: #fff; overflow: hidden; }
.integration-hero h2 { margin: 8px 0; font-size: clamp(22px, 3vw, 34px); line-height: 1.35; }
.integration-hero p { max-width: 660px; margin: 0; color: rgba(255,255,255,.64); font-size: 11px; }
.integration-visual { position: relative; min-height: 150px; display: grid; place-items: center; }
.integration-core { width: 94px; height: 94px; display: grid; place-items: center; border: 1px solid var(--gold-300); border-radius: 28px; color: var(--gold-300); background: rgba(255,255,255,.05); }
.integration-core svg { width: 42px; height: 42px; }
.integration-ring { position: absolute; width: 150px; height: 150px; border: 1px dashed rgba(231,207,158,.35); border-radius: 50%; animation: rotate 14s linear infinite; }
.integration-ring i { position: absolute; inset: -5px auto auto 70px; width: 10px; height: 10px; border-radius: 50%; background: var(--gold-500); }
@keyframes rotate { to { transform: rotate(360deg); } }
.integration-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 13px; margin-bottom: 16px; }

.report-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.report-card { padding: 20px; border: 1px solid var(--stone-200); border-radius: var(--radius-md); background: var(--paper); box-shadow: var(--shadow-sm); }
.report-card.wide { grid-column: 1 / -1; }
.report-card h3 { margin: 0 0 4px; font-size: 13px; }
.report-card > p { margin: 0 0 18px; color: var(--stone-600); font-size: 10px; }
.rank-list { margin: 0; padding: 0; list-style: none; }
.rank-list li { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 9px; padding: 10px 0; border-bottom: 1px solid var(--stone-100); }
.rank-list li:last-child { border: 0; }
.rank-list b { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 7px; background: var(--gold-100); color: var(--gold-700); font-size: 9px; }
.rank-list strong { font-size: 10px; }
.rank-list span { color: var(--stone-600); font-size: 9px; }

.settings-layout { display: grid; grid-template-columns: 280px minmax(0,1fr); gap: 16px; }
.settings-menu { padding: 8px; border: 1px solid var(--stone-200); border-radius: var(--radius-md); background: var(--paper); align-self: start; }
.settings-menu button { width: 100%; display: flex; align-items: center; gap: 9px; padding: 11px; border: 0; border-radius: 10px; background: transparent; text-align: right; font-size: 10px; }
.settings-menu button.active { background: var(--gold-100); color: var(--gold-700); font-weight: 800; }
.settings-form { padding: 22px; border: 1px solid var(--stone-200); border-radius: var(--radius-md); background: var(--paper); }
.settings-form h3 { margin: 0; font-size: 14px; }
.settings-form > p { margin: 3px 0 20px; color: var(--stone-600); font-size: 10px; }
.danger-zone { margin-top: 24px; padding: 16px; border: 1px solid #efd1ce; border-radius: 13px; background: #fffafa; }
.danger-zone h4 { margin: 0; color: var(--danger); font-size: 11px; }
.danger-zone p { margin: 3px 0 12px; color: var(--stone-600); font-size: 9px; }

.security-overview { display: grid; grid-template-columns: 1.3fr .7fr; gap: 16px; margin-bottom: 16px; }
.security-score { min-height: 220px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 25px; padding: 28px; border-radius: var(--radius-lg); background: var(--ink-900); color: #fff; }
.security-score p { margin: 0 0 7px; color: var(--gold-300); font-size: 10px; font-weight: 800; }
.security-score h3 { margin: 0; font-size: clamp(22px,3vw,34px); line-height: 1.4; }
.security-score > div > span { display: block; max-width: 620px; margin-top: 9px; color: rgba(255,255,255,.58); font-size: 10px; }
.score-ring { width: 116px; height: 116px; display: grid; place-items: center; border: 9px solid rgba(255,255,255,.12); border-top-color: var(--gold-500); border-inline-start-color: var(--gold-500); border-radius: 50%; text-align: center; }
.score-ring strong { display: block; font-size: 25px; line-height: 1.2; }
.score-ring small { color: rgba(255,255,255,.5); font-size: 8px; }
.security-checks { padding: 17px; border: 1px solid var(--stone-200); border-radius: var(--radius-md); background: var(--paper); box-shadow: var(--shadow-sm); }
.security-checks h3 { margin: 0 0 10px; font-size: 12px; }
.security-checks ul { margin: 0; padding: 0; list-style: none; }
.security-checks li { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--stone-100); color: var(--stone-600); font-size: 9px; }
.security-checks li:last-child { border: 0; }
.security-checks li svg { width: 15px; height: 15px; color: var(--success); }
.role-matrix { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; margin-top: 14px; }
.role-card { padding: 13px; border: 1px solid var(--stone-200); border-radius: 12px; background: var(--paper); }
.role-card strong { display: block; font-size: 10px; }
.role-card small { display: block; margin-top: 3px; color: var(--stone-600); font-size: 8px; line-height: 1.8; }
.security-tabs { display: flex; gap: 4px; margin-bottom: 13px; padding: 4px; border: 1px solid var(--stone-200); border-radius: 12px; background: var(--paper); width: fit-content; }
.security-tabs button { min-height: 34px; padding: 6px 13px; border: 0; border-radius: 9px; background: transparent; color: var(--stone-600); font-size: 9px; }
.security-tabs button.active { background: var(--ink-900); color: #fff; }
.access-note { margin-bottom: 14px; padding: 12px 14px; border: 1px solid var(--gold-300); border-radius: 12px; background: var(--gold-100); color: var(--gold-700); font-size: 9px; }

.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field.wide { grid-column: 1 / -1; }
.field > span { color: var(--stone-600); font-size: 10px; font-weight: 700; }
.field b { color: var(--danger); }
.field input, .field select, .field textarea { width: 100%; min-height: 44px; padding: 9px 11px; border: 1px solid var(--stone-200); border-radius: 11px; background: var(--paper); color: var(--ink-950); outline: 0; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--gold-500); box-shadow: 0 0 0 3px rgba(201,154,67,.12); }
.field small { color: var(--stone-400); font-size: 8px; }
.check-field { display: flex; align-items: flex-start; gap: 8px; padding: 12px; border: 1px solid var(--stone-200); border-radius: 11px; }
.check-field input { accent-color: var(--gold-600); }
.check-field strong { display: block; font-size: 10px; }
.check-field small { display: block; color: var(--stone-600); font-size: 8px; }
.form-error { min-height: 20px; margin: 10px 0 0; color: var(--danger); font-size: 10px; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--stone-100); }

.empty-state { min-height: 270px; display: grid; place-content: center; justify-items: center; padding: 30px; border: 1px dashed var(--stone-200); border-radius: var(--radius-md); background: var(--paper); text-align: center; }
.empty-state span { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 18px; background: var(--gold-100); color: var(--gold-700); }
.empty-state svg { width: 25px; height: 25px; }
.empty-state h3 { margin: 13px 0 2px; font-size: 13px; }
.empty-state p { max-width: 340px; margin: 0 0 14px; color: var(--stone-600); font-size: 10px; }

.app-dialog { width: min(650px, calc(100% - 30px)); max-height: min(86vh, 850px); padding: 0; border: 0; border-radius: var(--radius-lg); background: transparent; box-shadow: var(--shadow-lg); overflow: hidden; }
.app-dialog::backdrop { background: rgba(10,22,16,.64); backdrop-filter: blur(5px); }
.dialog-frame { max-height: inherit; display: flex; flex-direction: column; background: var(--paper); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 22px; border-bottom: 1px solid var(--stone-100); }
.dialog-head p { margin: 0; color: var(--gold-700); font-size: 9px; font-weight: 800; }
.dialog-head h2 { margin: 2px 0 0; font-size: 18px; }
#dialogBody { padding: 20px 22px 24px; overflow-y: auto; }
.dialog-note { margin: 0 0 15px; padding: 11px 13px; border-radius: 11px; background: var(--gold-100); color: var(--gold-700); font-size: 9px; }
.checkout-total { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; padding: 15px; border-radius: 13px; background: var(--ink-900); color: #fff; }
.checkout-total span { font-size: 10px; opacity: .65; }
.checkout-total strong { font-size: 18px; }
.alert-stack { display: grid; gap: 9px; }
.alert-item { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border: 1px solid var(--stone-200); border-radius: 11px; }
.alert-item > span { width: 31px; height: 31px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 10px; background: var(--warning-soft); color: var(--warning); }
.alert-item svg { width: 16px; height: 16px; }
.alert-item strong { display: block; font-size: 10px; }
.alert-item p { margin: 1px 0 0; color: var(--stone-600); font-size: 8px; }

.toast-region { position: fixed; z-index: 150; inset: auto auto 24px 24px; display: grid; gap: 8px; width: min(360px, calc(100vw - 32px)); }
.toast { display: flex; align-items: center; gap: 10px; padding: 13px 15px; border: 1px solid var(--stone-200); border-radius: 13px; background: var(--paper); box-shadow: var(--shadow-lg); animation: toast-in .2s ease both; }
.toast > span { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; background: var(--success-soft); color: var(--success); }
.toast.error > span { background: var(--danger-soft); color: var(--danger); }
.toast svg { width: 15px; height: 15px; }
.toast p { margin: 0; font-size: 10px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

.mobile-dock { display: none; }
.sidebar-backdrop { display: none; }

@media (max-width: 1220px) {
  :root { --sidebar: 232px; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .entity-grid, .branch-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 980px) {
  :root { --sidebar: 276px; }
  .sidebar { transform: translateX(105%); transition: transform .24s ease; box-shadow: var(--shadow-lg); }
  .app-shell.menu-open .sidebar { transform: translateX(0); }
  .content-column { margin-right: 0; }
  .sidebar-close, .menu-button { display: grid; }
  .sidebar-backdrop { position: fixed; z-index: 70; inset: 0; width: 100%; border: 0; background: rgba(10,22,16,.55); opacity: 0; pointer-events: none; transition: opacity .2s ease; }
  .app-shell.menu-open .sidebar-backdrop { display: block; opacity: 1; pointer-events: auto; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .quick-strip { grid-template-columns: repeat(2, 1fr); }
  .pos-layout { grid-template-columns: 1fr; }
  .cart-panel { position: static; }
  .integration-hero { grid-template-columns: 1fr; }
  .integration-visual { display: none; }
  .settings-layout { grid-template-columns: 1fr; }
  .security-overview { grid-template-columns: 1fr; }
  .role-matrix { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .settings-menu { display: flex; overflow-x: auto; }
  .settings-menu button { min-width: max-content; }
}

@media (max-width: 720px) {
  body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .topbar { min-height: 64px; padding: 9px 13px; }
  .page-identity p, .sync-state, .notification-button, .top-sale { display: none; }
  .page-identity h1 { font-size: 16px; }
  .branch-picker { margin-inline-start: auto; height: 40px; }
  .branch-picker select { min-width: 96px; max-width: 126px; font-size: 10px; }
  #workspace { min-height: calc(100vh - 64px); padding: 18px 13px; }
  .view-head { align-items: flex-start; flex-direction: column; gap: 13px; margin-bottom: 18px; }
  .view-head h2 { font-size: 24px; }
  .view-head-actions { width: 100%; }
  .view-head-actions .button { flex: 1; }
  .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .metric-card { min-height: 125px; padding: 15px; }
  .metric-card strong { font-size: 19px; }
  .metric-top { align-items: flex-start; }
  .quick-strip { grid-template-columns: 1fr 1fr; }
  .quick-action { min-height: 74px; padding: 12px; }
  .quick-action > span:first-child { width: 34px; height: 34px; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .toolbar-group { display: grid; grid-template-columns: 1fr 1fr; }
  .search-field { min-width: 0; grid-column: 1 / -1; }
  .product-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .product-card { min-height: 196px; padding: 13px; }
  .product-card h3 { font-size: 11px; }
  .entity-grid, .branch-grid, .account-grid, .integration-stats, .report-layout { grid-template-columns: 1fr; }
  .security-score { grid-template-columns: 1fr; }
  .score-ring { display: none; }
  .role-matrix { grid-template-columns: 1fr 1fr; }
  .report-card.wide { grid-column: auto; }
  .form-grid { grid-template-columns: 1fr; }
  .field.wide { grid-column: auto; }
  .kanban { grid-template-columns: repeat(3, 280px); }
  .mobile-dock { position: fixed; z-index: 60; inset: auto 0 0; min-height: calc(65px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(5,1fr); align-items: start; padding: 7px 6px calc(5px + env(safe-area-inset-bottom)); border-top: 1px solid var(--stone-200); background: rgba(255,255,255,.96); backdrop-filter: blur(12px); }
  .mobile-dock button { min-height: 48px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 0; background: transparent; color: var(--stone-600); font-size: 8px; }
  .mobile-dock svg { width: 18px; height: 18px; }
  .mobile-dock button.active { color: var(--ink-900); font-weight: 800; }
  .mobile-dock .dock-create { width: 49px; height: 49px; min-height: 49px; justify-self: center; margin-top: -22px; border: 4px solid var(--cream-50); border-radius: 17px; background: var(--gold-500); color: var(--ink-950); box-shadow: 0 8px 20px rgba(143,103,30,.3); }
  .toast-region { inset: auto 16px calc(82px + env(safe-area-inset-bottom)) 16px; width: auto; }
}

@media (max-width: 460px) {
  .metrics { grid-template-columns: 1fr 1fr; }
  .metric-card { min-height: 116px; padding: 13px; }
  .metric-icon { width: 29px; height: 29px; }
  .metric-card strong { font-size: 17px; }
  .metric-card > small, .trend { font-size: 8px; }
  .quick-strip { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: 1fr; }
  .product-card { min-height: 180px; }
  .segmented { width: 100%; overflow-x: auto; }
  .segmented button { flex: 1; min-width: max-content; }
  .role-matrix { grid-template-columns: 1fr; }
  .app-dialog { width: calc(100% - 18px); max-height: calc(100vh - 26px); border-radius: 18px; }
  .dialog-head, #dialogBody { padding-inline: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Zarmadar: a calm, legible counter workspace across both branches. */
:root { --ink-950:#102c26; --ink-900:#143d35; --ink-800:#1c5146; --ink-700:#286350; --gold-700:#795417; --stone-600:#56645f; --danger:#96372f; --warning:#855715; --radius-md:18px; --shadow-sm:0 4px 18px rgb(16 44 38 / 4%); }
[hidden] { display:none !important; }
body { overflow-x:visible; line-height:1.8; }
:focus-visible { outline:3px solid #8b5d12; outline-offset:3px; }
.sidebar :focus-visible { outline-color:#f3d396; }
button:disabled { opacity:.55; cursor:not-allowed; transform:none; }
.sidebar { background:linear-gradient(160deg,#183e35,#102d26); padding-block-start:28px; }
.brand-block strong { font-size:18px; }
.brand-block small, .workspace-card small, .operator small { color:#b9cbc3; font-size:11px; }
.main-nav p { color:#b0c5bb; font-size:11px; }
.nav-item { min-height:47px; color:#d2ded7; font-size:13px; }
.nav-item.active { background:#315248; box-shadow:inset -3px 0 #dec18a; }
.back-link { min-height:44px; }
.operator button, .icon-button, .qty-control button { min-width:44px; min-height:44px; }
.content-column, .topbar-start, .topbar-actions, .page-identity { min-width:0; }
.topbar { gap:14px; }
.branch-picker { min-height:46px; padding-inline:10px; }
.branch-picker select { font-size:12px; max-width:150px; }
.sync-state { min-height:44px; }
.view-head h2 { font-size:clamp(25px,2.5vw,36px); letter-spacing:0; }
.view-head p, .date-chip { font-size:12px; }
.date-chip { flex-wrap:wrap; }
.demo-banner { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:12px clamp(18px,3vw,42px); background:#efe5cb; border-bottom:1px solid #ded0ae; color:#5b481f; font-size:12px; }
.demo-banner strong { display:inline-block; margin-inline-end:10px; color:#143d35; }
.demo-banner > div { display:flex; flex-wrap:wrap; gap:8px; flex-shrink:0; }
.demo-banner button { min-height:40px; padding:8px 12px; border:1px solid #a38b56; border-radius:9px; background:transparent; color:#483914; font-size:11px; }
.demo-banner button[aria-pressed="true"] { background:#143d35; color:white; border-color:#143d35; }
.recovery-banner { margin:16px clamp(13px,3vw,42px) 0; padding:18px; border:1px solid #c18547; border-radius:14px; background:#fff3dc; color:#553e20; }
.recovery-banner p { margin-block:0 10px; }
.recovery-banner > div { display:flex; gap:8px; flex-wrap:wrap; }
.metrics { gap:16px; }
.metric-card { min-height:176px; padding:22px; }
.metric-card::after { display:none; }
.metric-card strong { font-size:clamp(20px,1.85vw,29px); line-height:1.55; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; letter-spacing:0; }
.metric-amount { display:block; white-space:nowrap; font-size:clamp(17px,1.6vw,26px); }
.metric-currency { display:block; font-size:17px; font-weight:700; }
.mobile-cart-bar { display:none; }
.metric-top, .metric-card > small, .trend { font-size:11px; }
.metric-card:first-child { background:#173e34; color:white; border-color:#173e34; }
.metric-card:first-child .metric-top, .metric-card:first-child > small, .metric-card:first-child .trend { color:#d2e2d5; }
.metric-card:first-child .metric-icon { background:#35574b; color:#ead19a; }
.panel-head h3 { font-size:16px; }
.panel-head p, .activity-list p, .activity-list time, .quick-action small { font-size:11px; }
.activity-list strong, .quick-action strong, .product-card h3, .product-meta { font-size:13px; }
.bar-column span { font-size:11px; }
.bar-chart { direction:ltr; }
.bar-column { direction:rtl; }
.text-button { min-height:44px; padding-block:6px; font-size:12px; }
.data-table th { font-size:12px; color:#52625b; text-align:start; }
.data-table td { font-size:12px; }
.data-table-wrap { max-width:100%; overscroll-behavior-inline:contain; }
.product-cell small, .entity-card p, .entity-stats small { font-size:11px; }
.product-cell small, bdi { unicode-bidi:isolate; }
.product-cell small { direction:ltr; text-align:start; }
.entity-card, .branch-card { min-width:0; }
.entity-card h3 { overflow-wrap:anywhere; }
.entity-head { flex-wrap:wrap; }
.entity-head > div { min-width:0; }
.tag { font-size:10px; }
.field > span, .check-field small, .dialog-note, .form-error { font-size:12px; }
.field input, .field select, .field textarea { min-height:46px; font-size:14px; }
.field input[aria-invalid="true"] { border-color:#96372f; }
.app-dialog { width:min(700px,calc(100% - 30px)); max-height:calc(100dvh - 30px); }
.invoice-brand { display:flex; flex-direction:column; gap:7px; padding-bottom:16px; border-bottom:1px solid var(--stone-200); }
.invoice-brand strong { font-size:24px; }
.invoice-brand span { color:var(--stone-600); font-size:12px; }
.invoice .data-table { min-width:480px; }
.invoice-summary { padding-block:10px; }
.invoice-summary p { margin-block:5px; }
.customer-detail-metrics { grid-template-columns:1fr 1fr; }
.customer-note { overflow-wrap:anywhere; white-space:pre-wrap; }
.sales-history { margin-top:22px; scroll-margin-top:95px; }
.rate-reference { margin-block:22px 0; padding:14px 18px; border-inline-start:3px solid #b7904a; background:#f4eedf; font-size:12px; color:#535e50; }
.rate-reference a { text-decoration:underline; text-underline-offset:3px; color:#143d35; }
.sales-history > .toolbar { margin:0; padding:16px; }
.pagination { display:flex; align-items:center; justify-content:center; gap:18px; padding:16px; }
.kanban { max-width:100%; }
.integration-hero h2 { font-size:clamp(24px,3vw,38px); }
.settings-form > p { font-size:12px; }
.form-error:empty { min-height:0; margin:0; }
@media (min-width:981px) { .sidebar-close, .menu-button { display:none; } }
@media (min-width:981px) and (max-width:1250px) { .top-sale { display:none; } .topbar { padding-inline:24px; } }
@media (max-width:980px) { .demo-banner { flex-wrap:wrap; gap:8px; } .brand-block strong { font-size:17px; } }
@media (max-width:720px) {
  .topbar { padding-inline:12px; gap:6px; }
  .topbar-start, .topbar-actions { gap:7px; }
  .branch-picker { padding-inline:7px; max-width:154px; }
  .branch-picker select { font-size:11px; max-width:120px; min-width:88px; }
  .branch-picker svg { display:none; }
  .page-identity h1 { font-size:14px; }
  .demo-banner { padding:12px; font-size:11px; }
  .demo-banner > div { width:100%; display:grid; grid-template-columns:1fr 1fr; }
  .demo-banner button { min-height:44px; }
  .metric-card { min-height:154px; padding:16px; }
  .metric-card strong { font-size:21px; }
  .metric-amount { font-size:16px; }
  .metric-card > small, .trend, .metric-top { font-size:10px; }
  .metric-icon { width:30px; height:30px; }
  .metric-top { gap:5px; }
  .mobile-dock button { font-size:10px; }
  .quick-action { min-height:84px; }
  .view-head h2 { font-size:25px; }
  .chart-total strong { font-size:22px; }
  .panel-head { flex-wrap:wrap; }
  .kanban { grid-template-columns:1fr; overflow:visible; }
  .job-card-foot { flex-wrap:wrap; }
  .data-table { min-width:700px; }
  .account-grid { gap:12px; }
  .customer-detail-metrics { grid-template-columns:1fr; }
  .mobile-cart-bar { position:fixed; inset-inline:12px; bottom:calc(84px + env(safe-area-inset-bottom)); z-index:59; display:flex; align-items:center; justify-content:space-between; gap:8px; padding:10px 12px; border:1px solid #bda367; border-radius:14px; background:#fff9e9; box-shadow:0 8px 24px #143d3526; }
  .mobile-cart-bar > span { font-size:11px; }
  .mobile-cart-bar .button { flex-shrink:0; min-height:44px; padding-inline:12px; font-size:12px; }
  .pos-layout:has(.cart-row) { padding-bottom:70px; }
  .product-card { min-height:155px; }
}
@media (max-width:380px) {
  .metrics { grid-template-columns:1fr; }
  .metric-card { min-height:140px; }
  .metric-amount { font-size:23px; }
  .topbar-start { gap:5px; }
  .branch-picker { max-width:132px; }
  .page-identity h1 { font-size:13px; }
}
@media (forced-colors:active) { .button,.nav-item,.tag,.product-card { border:1px solid ButtonText; } }
.crm-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; margin-block:18px; }
.crm-summary > div { display:flex; flex-direction:column; gap:7px; padding:20px; border:1px solid var(--stone-200); border-radius:16px; background:#fffdf8; min-width:0; }
.crm-summary strong { font-size:clamp(17px,1.6vw,26px); line-height:1.65; overflow-wrap:anywhere; font-variant-numeric:tabular-nums; }
.crm-summary span { color:#52625b; font-size:12px; }
.section-note { font-size:13px; color:#52625b; line-height:1.9; margin-block:16px 22px; }
.followup-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.followup-card { padding:20px; border:1px solid var(--stone-200); border-radius:16px; background:#fff; min-width:0; }
.followup-heading { display:flex; justify-content:space-between; gap:10px; align-items:start; }
.followup-heading > div { min-width:0; }
.followup-card h3 { margin:0; font-size:16px; line-height:1.8; overflow-wrap:anywhere; }
.followup-card > p, .supplier-grid .customer-note { font-size:12px; line-height:1.9; color:#52625b; }
.followup-date { display:flex; align-items:center; flex-wrap:wrap; gap:7px; }
.followup-date svg { width:18px; height:18px; flex-shrink:0; }
.entity-actions { display:flex; align-items:center; flex-wrap:wrap; gap:10px; margin-block-start:14px; }
.customer-detail-actions { margin-block:0 18px; }
.supplier-balance { display:flex; justify-content:space-between; gap:10px; flex-wrap:wrap; padding-block:12px; border-block:1px solid var(--stone-200); font-size:13px; }
.purchase-history { margin-block-start:26px; }
.purchase-total { font-size:18px; font-weight:700; padding:14px; border-radius:12px; background:#f4eedf; overflow-wrap:anywhere; }
.detail-section-title { margin-block:25px 14px; }
#dialogBody .followup-list { grid-template-columns:1fr; }
.field small { font-size:11px; color:#52625b; line-height:1.8; }
@media (max-width:720px) { .crm-summary { grid-template-columns:1fr; gap:9px; } .crm-summary > div { padding:15px; flex-direction:row; justify-content:space-between; align-items:center; flex-wrap:wrap; } .crm-summary strong { font-size:20px; } .followup-list { grid-template-columns:1fr; } .followup-card { padding:16px; } .entity-actions .button { flex:1; } .supplier-grid { grid-template-columns:1fr; } .page-identity h1 { max-width:140px; line-height:1.65; } }
@media print {
  body { padding:0; background:white; }
  .app-shell,.mobile-dock,.toast-region,.app-dialog .dialog-head,.app-dialog .form-actions { display:none !important; }
  .app-dialog[open] { position:static; display:block; width:100%; max-height:none; margin:0; padding:0; border:0; box-shadow:none; overflow:visible; }
  .app-dialog::backdrop { background:white; }
  #dialogBody,.dialog-frame,.data-table-wrap { overflow:visible; }
  .invoice .data-table { min-width:0; }
  .invoice .dialog-note { background:white; border:1px solid #777; }
}
