/* ============================================================
   Yasin's Tools — Online Orders · Consolidated stylesheet
   Ported from the original v3 design system (Syne + DM Sans + DM Mono).
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-base:       #f5f4f1;
  --bg-surface:    #ffffff;
  --bg-elevated:   #faf9f7;
  --bg-overlay:    #f0ede8;
  --bg-hover:      #ece9e3;

  --border-subtle: rgba(0,0,0,0.07);
  --border-mid:    rgba(0,0,0,0.12);
  --border-strong: rgba(0,0,0,0.22);

  --text-primary:  #1a1814;
  --text-secondary:#4a4540;
  --text-muted:    #8a8078;
  --text-disabled: #bbb5ad;

  --accent:        #d97706;
  --accent-dim:    rgba(217,119,6,0.10);
  --accent-glow:   rgba(217,119,6,0.22);

  --green:     #059669; --green-dim:  rgba(5,150,105,0.10);
  --red:       #dc2626; --red-dim:    rgba(220,38,38,0.09);
  --blue:      #2563eb; --blue-dim:   rgba(37,99,235,0.09);
  --purple:    #7c3aed; --purple-dim: rgba(124,58,237,0.09);
  --orange:    #ea580c; --orange-dim: rgba(234,88,12,0.09);

  --font-display: 'Syne', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'DM Mono', monospace;

  --radius-sm: 6px; --radius-md: 10px; --radius-lg: 16px; --radius-xl: 24px;

  --ease:     cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --duration-fast: 120ms; --duration-mid: 220ms; --duration-slow: 380ms;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.10), 0 2px 6px rgba(0,0,0,0.06);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.13), 0 4px 12px rgba(0,0,0,0.07);
}

html { font-size: 16px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { font-family: var(--font-body); background: var(--bg-base); color: var(--text-primary); line-height: 1.6; min-height: 100vh; overflow-x: hidden; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
::selection { background: var(--accent-glow); color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius-sm); }

@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes shimmer { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.skeleton {
  background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--bg-overlay) 50%, var(--bg-elevated) 75%);
  background-size: 400px 100%; animation: shimmer 1.4s infinite; border-radius: var(--radius-sm);
}

/* ============================================================ LOGIN */
.lg-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--bg-base); position: relative; overflow: hidden; }
.lg-grid { position: fixed; inset: 0; background-image: radial-gradient(circle, rgba(0,0,0,0.06) 1px, transparent 1px); background-size: 28px 28px; pointer-events: none; z-index: 0; }
.lg-glow { position: fixed; top: -200px; left: 50%; transform: translateX(-50%); width: 600px; height: 600px; background: radial-gradient(ellipse, rgba(217,119,6,0.08) 0%, transparent 65%); pointer-events: none; z-index: 0; }
.lg-card { position: relative; z-index: 1; width: 100%; max-width: 400px; background: var(--bg-surface); border: 1px solid var(--border-mid); border-radius: var(--radius-xl); padding: 40px; box-shadow: var(--shadow-lg); animation: fadeUp var(--duration-slow) var(--ease) both; }
.lg-logo { margin-bottom: 24px; }
.lg-header { margin-bottom: 32px; }
.lg-title { font-family: var(--font-display); font-size: 26px; font-weight: 700; color: var(--text-primary); letter-spacing: -0.03em; line-height: 1.2; }
.lg-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.lg-form { display: flex; flex-direction: column; gap: 18px; }
.lg-field { display: flex; flex-direction: column; gap: 6px; }
.lg-label { font-size: 11.5px; font-weight: 600; color: var(--text-secondary); letter-spacing: 0.04em; text-transform: uppercase; }
.lg-input { background: var(--bg-elevated); border: 1.5px solid var(--border-mid); border-radius: var(--radius-md); color: var(--text-primary); font-family: var(--font-body); font-size: 15px; padding: 11px 14px; transition: border-color var(--duration-fast) var(--ease), box-shadow var(--duration-fast) var(--ease); width: 100%; }
.lg-input::placeholder { color: var(--text-disabled); }
.lg-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.lg-error { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--red); background: var(--red-dim); border: 1px solid rgba(220,38,38,0.15); border-radius: var(--radius-md); padding: 10px 12px; animation: fadeIn var(--duration-fast) var(--ease) both; }
.lg-button { display: flex; align-items: center; justify-content: center; gap: 8px; background: #1a1814; color: #f5f0e8; border: none; border-radius: var(--radius-md); font-family: var(--font-display); font-size: 14px; font-weight: 600; letter-spacing: 0.02em; padding: 13px 20px; cursor: pointer; margin-top: 4px; transition: opacity var(--duration-fast) var(--ease), transform var(--duration-fast) var(--ease), box-shadow var(--duration-fast) var(--ease); }
.lg-button:hover { opacity: 0.88; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.lg-button:active { transform: translateY(0); }
.lg-hint { font-size: 11px; color: var(--text-disabled); text-align: center; margin-top: 28px; letter-spacing: 0.02em; }

/* ============================================================ SHELL + SIDEBAR */
.app-shell { display: flex; min-height: 100vh; background: var(--bg-base); }
.sb { width: 240px; min-width: 240px; background: #1a1814; display: flex; flex-direction: column; position: fixed; top: 0; left: 0; height: 100vh; overflow-y: auto; z-index: 50; }
.sb-brand { display: flex; align-items: center; gap: 12px; padding: 24px 20px 20px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.sb-brand-icon { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sb-brand-name { font-family: var(--font-display); font-size: 15px; font-weight: 700; color: #f5f0e8; letter-spacing: -0.01em; line-height: 1.2; }
.sb-brand-sub { font-size: 10px; color: rgba(255,255,255,0.35); letter-spacing: 0.06em; text-transform: uppercase; margin-top: 1px; }
.sb-nav { flex: 1; padding: 16px 12px; display: flex; flex-direction: column; gap: 20px; }
.sb-group-label { font-size: 9.5px; font-weight: 700; color: rgba(255,255,255,0.25); letter-spacing: 0.1em; text-transform: uppercase; padding: 0 8px; margin-bottom: 4px; }
.sb-item { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: var(--radius-md); color: rgba(255,255,255,0.5); font-size: 13.5px; font-weight: 400; text-decoration: none; transition: background var(--duration-fast) var(--ease), color var(--duration-fast) var(--ease); cursor: pointer; }
.sb-item:hover { background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.9); }
.sb-item-active { background: rgba(217,119,6,0.18) !important; color: #f0c060 !important; font-weight: 500; }
.sb-icon { width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sb-label { flex: 1; }
.sb-footer { padding: 16px 12px 20px; border-top: 1px solid rgba(255,255,255,0.07); }
.sb-user-row { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--radius-md); background: rgba(255,255,255,0.05); }
.sb-avatar { width: 30px; height: 30px; border-radius: 50%; background: rgba(217,119,6,0.2); border: 1px solid rgba(217,119,6,0.4); color: #f0c060; font-family: var(--font-display); font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sb-user-info { flex: 1; min-width: 0; }
.sb-user-name { font-size: 13px; font-weight: 500; color: rgba(255,255,255,0.85); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-user-role { font-size: 11px; color: rgba(255,255,255,0.3); margin-top: 1px; }
.sb-logout { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; background: none; border: none; color: rgba(255,255,255,0.3); cursor: pointer; border-radius: var(--radius-sm); transition: color var(--duration-fast), background var(--duration-fast); flex-shrink: 0; text-decoration: none; }
.sb-logout:hover { color: #f87171; background: rgba(248,113,113,0.12); }
.app-main { flex: 1; margin-left: 240px; min-height: 100vh; background: var(--bg-base); }

/* ============================================================ ORDERS PAGE */
.o-page { max-width: 1200px; margin: 0 auto; padding: 40px 40px 80px; }
.o-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.o-title { font-family: var(--font-display); font-size: 28px; font-weight: 800; color: var(--text-primary); letter-spacing: -0.04em; line-height: 1; }
.o-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 6px; }
.o-refresh-time { color: var(--text-disabled); }
.o-header-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.o-view-toggle { display: flex; background: var(--bg-surface); border: 1.5px solid var(--border-mid); border-radius: var(--radius-md); overflow: hidden; padding: 3px; gap: 2px; box-shadow: var(--shadow-sm); }
.o-view-btn { display: flex; align-items: center; gap: 5px; padding: 5px 11px; background: none; border: none; border-radius: calc(var(--radius-md) - 2px); color: var(--text-muted); font-size: 12.5px; font-family: var(--font-body); cursor: pointer; transition: all var(--duration-fast); white-space: nowrap; }
.o-view-btn:hover { color: var(--text-primary); background: var(--bg-overlay); }
.o-view-active { background: var(--bg-elevated) !important; color: var(--text-primary) !important; box-shadow: var(--shadow-sm); }
.o-refresh-btn { display: flex; align-items: center; gap: 6px; padding: 8px 14px; background: var(--bg-surface); border: 1.5px solid var(--border-mid); border-radius: var(--radius-md); color: var(--text-secondary); font-size: 13px; font-family: var(--font-body); cursor: pointer; transition: all var(--duration-fast); white-space: nowrap; box-shadow: var(--shadow-sm); }
.o-refresh-btn:hover:not(:disabled) { background: var(--bg-elevated); color: var(--text-primary); }
.o-refresh-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.o-spinning { animation: spin 1s linear infinite; }

/* Filter bar */
.o-filter-bar { display: flex; align-items: center; gap: 0; background: var(--bg-surface); border: 1.5px solid var(--border-mid); border-radius: var(--radius-lg); padding: 10px 16px; margin-bottom: 18px; overflow-x: auto; flex-wrap: nowrap; box-shadow: var(--shadow-sm); }
.o-filter-left { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.o-filter-label { font-size: 9.5px; font-weight: 700; color: var(--text-disabled); text-transform: uppercase; letter-spacing: 0.1em; white-space: nowrap; flex-shrink: 0; }
.o-chip-group { display: flex; align-items: center; gap: 3px; flex-shrink: 0; padding: 0 8px; }
.o-filter-sep { width: 1px; height: 18px; background: var(--border-mid); flex-shrink: 0; margin: 0 4px; }
.o-segmented { display: flex; background: var(--bg-elevated); border: 1.5px solid var(--border-mid); border-radius: var(--radius-sm); overflow: hidden; padding: 2px; gap: 2px; }
.o-seg { padding: 4px 10px; background: none; border: none; border-radius: calc(var(--radius-sm) - 1px); color: var(--text-muted); font-size: 12px; font-family: var(--font-body); cursor: pointer; transition: all var(--duration-fast); white-space: nowrap; }
.o-seg:hover { color: var(--text-primary); }
.o-seg-active { background: var(--bg-surface) !important; color: var(--text-primary) !important; box-shadow: var(--shadow-sm); }
.o-date-pickers { display: flex; align-items: center; gap: 6px; }
.o-date-input { background: var(--bg-elevated); border: 1.5px solid var(--border-mid); border-radius: var(--radius-sm); color: var(--text-primary); font-family: var(--font-body); font-size: 12px; padding: 4px 8px; cursor: pointer; transition: border-color var(--duration-fast); }
.o-date-input:focus { outline: none; border-color: var(--accent); }
.o-date-sep { font-size: 11px; color: var(--text-disabled); }
.o-apply { padding: 4px 12px; background: var(--accent); border: none; border-radius: var(--radius-sm); color: white; font-size: 12px; font-family: var(--font-body); font-weight: 700; cursor: pointer; transition: opacity var(--duration-fast); white-space: nowrap; }
.o-apply:hover { opacity: 0.85; }
.o-chip { padding: 4px 10px; background: none; border: 1px solid transparent; border-radius: 99px; color: var(--text-muted); font-size: 12px; font-family: var(--font-body); cursor: pointer; white-space: nowrap; transition: all var(--duration-fast); }
.o-chip:hover { background: var(--bg-elevated); color: var(--text-primary); border-color: var(--border-mid); }
.o-chip-active { background: var(--accent-dim) !important; color: var(--accent) !important; border-color: rgba(217,119,6,0.2) !important; font-weight: 600; }

/* Bulk bar */
.o-bulk { display: flex; align-items: center; gap: 10px; background: rgba(217,119,6,0.06); border: 1.5px solid rgba(217,119,6,0.18); border-radius: var(--radius-lg); padding: 10px 16px; margin-bottom: 14px; flex-wrap: wrap; animation: fadeIn var(--duration-fast) var(--ease); }
.o-bulk-count { font-family: var(--font-display); font-size: 14px; font-weight: 700; color: var(--accent); }
.o-bulk-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.o-bulk-btn { padding: 5px 12px; background: var(--bg-surface); border: 1.5px solid var(--border-mid); border-radius: var(--radius-sm); color: var(--text-secondary); font-size: 12px; font-family: var(--font-body); cursor: pointer; transition: all var(--duration-fast); box-shadow: var(--shadow-sm); }
.o-bulk-btn:hover { background: var(--bg-elevated); color: var(--text-primary); }
.o-bulk-green { background: var(--green-dim) !important; color: var(--green) !important; border-color: rgba(5,150,105,0.18) !important; }
.o-bulk-amber { background: var(--accent-dim) !important; color: var(--accent) !important; border-color: rgba(217,119,6,0.2) !important; font-weight: 600; }
.o-bulk-blue { background: var(--blue-dim) !important; color: var(--blue) !important; border-color: rgba(37,99,235,0.15) !important; }
.o-bulk-close { padding: 5px 10px; background: none; border: none; color: var(--text-muted); font-size: 12px; cursor: pointer; border-radius: var(--radius-sm); transition: color var(--duration-fast); margin-left: auto; }
.o-bulk-close:hover { color: var(--red); }

/* Search */
.o-search { display: flex; align-items: center; gap: 10px; background: var(--bg-surface); border: 1.5px solid var(--border-mid); border-radius: var(--radius-lg); padding: 0 16px; margin-bottom: 14px; box-shadow: var(--shadow-sm); transition: border-color var(--duration-fast), box-shadow var(--duration-fast); }
.o-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.o-search-icon { color: var(--text-muted); flex-shrink: 0; }
.o-search:focus-within .o-search-icon { color: var(--accent); }
.o-search-input { flex: 1; background: transparent; border: none; color: var(--text-primary); font-family: var(--font-body); font-size: 14px; padding: 13px 0; caret-color: var(--accent); }
.o-search-input:focus { outline: none; }
.o-search-input::placeholder { color: var(--text-disabled); }
.o-search-clear { width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; background: var(--bg-overlay); border: none; border-radius: 50%; color: var(--text-muted); cursor: pointer; flex-shrink: 0; transition: all var(--duration-fast); }
.o-search-clear:hover { background: var(--bg-elevated); color: var(--text-primary); }

/* Error / skeleton / empty */
.o-error { display: flex; align-items: flex-start; gap: 12px; background: var(--red-dim); border: 1.5px solid rgba(220,38,38,0.15); border-radius: var(--radius-lg); padding: 16px 18px; margin-bottom: 18px; }
.o-error-title { font-size: 13.5px; font-weight: 600; color: var(--text-primary); }
.o-error-detail { font-size: 11.5px; color: var(--text-muted); font-family: var(--font-mono); margin-top: 2px; word-break: break-word; }
.o-retry { margin-left: auto; padding: 6px 14px; background: var(--bg-surface); border: 1.5px solid var(--border-mid); border-radius: var(--radius-md); color: var(--text-secondary); font-size: 12.5px; font-family: var(--font-body); cursor: pointer; white-space: nowrap; }
.o-retry:hover { background: var(--bg-elevated); }
.o-skel-list { display: flex; flex-direction: column; gap: 8px; }
.o-skel-card { background: var(--bg-surface); border: 1.5px solid var(--border-mid); border-radius: var(--radius-lg); padding: 16px 20px; animation: fadeIn var(--duration-mid) var(--ease) both; box-shadow: var(--shadow-sm); }
.o-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 80px 20px; gap: 12px; color: var(--text-disabled); animation: fadeIn var(--duration-mid) var(--ease); }
.o-empty p { font-size: 14px; color: var(--text-muted); }

/* Select-all row + list */
.o-selectall { display: flex; align-items: center; justify-content: space-between; padding: 6px 4px; margin-bottom: 8px; }
.o-check-label { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-muted); cursor: pointer; }
.o-checkbox { width: 14px; height: 14px; accent-color: var(--accent); cursor: pointer; }
.o-order-count { font-size: 11.5px; color: var(--text-disabled); }
.o-selectall-right { display: flex; align-items: center; gap: 12px; }
.o-select-entire { padding: 5px 13px; background: var(--accent-dim); border: 1px solid rgba(217,119,6,0.25); border-radius: var(--radius-sm); color: var(--accent); font-size: 12px; font-weight: 600; font-family: var(--font-body); cursor: pointer; white-space: nowrap; transition: background var(--duration-fast); }
.o-select-entire:hover:not(:disabled) { background: rgba(217,119,6,0.18); }
.o-select-entire:disabled { opacity: 0.5; cursor: not-allowed; }
.o-selected-count { font-size: 12px; font-weight: 600; color: var(--accent); white-space: nowrap; }
.o-order-list { display: flex; flex-direction: column; gap: 7px; }

/* Warehouse view */
.o-wh-view { display: flex; flex-direction: column; gap: 28px; }
.o-wh-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 2px solid var(--border-mid); }
.o-wh-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.o-wh-name { font-family: var(--font-display); font-size: 17px; font-weight: 700; color: var(--text-primary); letter-spacing: -0.02em; }
.o-wh-count { font-size: 11.5px; color: var(--text-muted); background: var(--bg-surface); border: 1.5px solid var(--border-mid); padding: 2px 8px; border-radius: 99px; }
.o-wh-list { display: flex; flex-direction: column; gap: 6px; }

/* ============================================================ KPI BAR */
.kpi-bar { display: flex; align-items: stretch; background: var(--bg-surface); border: 1.5px solid var(--border-mid); border-radius: var(--radius-lg); margin-bottom: 18px; overflow-x: auto; box-shadow: var(--shadow-sm); }
.kpi-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 16px 22px; border-radius: var(--radius-md); flex-shrink: 0; flex: 1; min-width: 80px; }
.kpi-clickable { cursor: pointer; transition: background var(--duration-fast); }
.kpi-clickable:hover { background: var(--bg-elevated); }
.kpi-active { background: var(--text-primary); box-shadow: inset 0 0 0 1.5px var(--text-primary); }
.kpi-active .kpi-value { color: #fff !important; }
.kpi-active .kpi-label { color: rgba(255,255,255,0.7); }
.kpi-value { font-family: var(--font-body); font-size: 24px; font-weight: 800; color: var(--text-primary); line-height: 1; letter-spacing: -0.03em; }
.kpi-label { font-family: var(--font-body); font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.07em; white-space: nowrap; font-weight: 600; }
.kpi-green { color: var(--green) !important; }
.kpi-red   { color: var(--red) !important; }
.kpi-amber { color: var(--accent) !important; }
.kpi-blue  { color: var(--blue) !important; }
.kpi-divider { width: 1px; background: var(--border-mid); flex-shrink: 0; align-self: stretch; margin: 10px 0; }

/* ============================================================ ORDER CARD */
.oc-card { background: var(--bg-surface); border: 1.5px solid var(--border-mid); border-radius: var(--radius-lg); overflow: hidden; transition: border-color var(--duration-fast) var(--ease), box-shadow var(--duration-fast) var(--ease); animation: fadeUp var(--duration-slow) var(--ease) both; box-shadow: var(--shadow-sm); }
.oc-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.oc-selected { border-color: var(--accent) !important; background: rgba(217,119,6,0.02); }
.oc-main { display: grid; grid-template-columns: 40px 155px 1fr auto auto auto; align-items: center; gap: 0; padding: 13px 16px; cursor: pointer; transition: background var(--duration-fast); }
.oc-compact .oc-main { grid-template-columns: 40px 120px 1fr auto auto auto; }
.oc-main:hover { background: var(--bg-elevated); }
.oc-check-cell { display: flex; align-items: center; justify-content: center; padding: 0 4px; cursor: pointer; }
.oc-checkbox { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; display: block; flex-shrink: 0; }
.oc-num { display: flex; flex-direction: column; gap: 2px; padding: 0 12px 0 6px; }
.oc-num-text { font-family: var(--font-display); font-size: 14px; font-weight: 700; color: var(--text-primary); letter-spacing: -0.01em; }
.oc-date { font-size: 10.5px; color: var(--text-muted); font-family: var(--font-mono); }
.oc-cust { display: flex; flex-direction: column; gap: 2px; padding: 0 12px; min-width: 0; }
.oc-cust-name { font-size: 13.5px; font-weight: 500; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oc-cust-phone { font-size: 12px; color: var(--text-secondary); font-family: var(--font-mono); }
.oc-cust-addr { font-size: 11.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oc-badges { display: flex; align-items: center; gap: 5px; padding: 0 10px; flex-shrink: 0; }
.oc-badge { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 99px; font-size: 11px; font-weight: 600; letter-spacing: 0.02em; white-space: nowrap; }
.oc-paid     { background: var(--green-dim); color: var(--green); border: 1px solid rgba(5,150,105,0.15); }
.oc-unpaid   { background: var(--red-dim);   color: var(--red);   border: 1px solid rgba(220,38,38,0.12); }
.oc-partial  { background: var(--accent-dim); color: var(--accent); border: 1px solid rgba(217,119,6,0.15); }
.oc-refunded { background: var(--bg-overlay); color: var(--text-muted); border: 1px solid var(--border-mid); }
.oc-unknown  { background: var(--bg-overlay); color: var(--text-muted); border: 1px solid var(--border-mid); }
.oc-split { background: rgba(217,119,6,0.08); color: var(--accent); border: 1px solid rgba(217,119,6,0.15); }
.oc-wh0 { background: var(--blue-dim);   color: var(--blue);   border: 1px solid rgba(37,99,235,0.12); }
.oc-wh1 { background: var(--green-dim);  color: var(--green);  border: 1px solid rgba(5,150,105,0.12); }
.oc-wh2 { background: var(--purple-dim); color: var(--purple); border: 1px solid rgba(124,58,237,0.12); }
.oc-wh3 { background: var(--orange-dim); color: var(--orange); border: 1px solid rgba(234,88,12,0.12); }
.oc-item-count { font-size: 11.5px; color: var(--text-muted); background: var(--bg-overlay); border: 1px solid var(--border-subtle); padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
.oc-pick-cell { padding: 0 8px; flex-shrink: 0; }
.oc-pick-badge { display: inline-flex; align-items: center; padding: 4px 11px; border-radius: var(--radius-sm); font-size: 11.5px; font-weight: 600; letter-spacing: 0.03em; transition: opacity var(--duration-fast); white-space: nowrap; cursor: pointer; }
.oc-pick-badge:hover { opacity: 0.7; }
.oc-st-new     { background: var(--bg-overlay); color: var(--text-muted); border: 1px solid var(--border-mid); }
.oc-st-picking { background: rgba(217,119,6,0.10); color: var(--accent); border: 1px solid rgba(217,119,6,0.2); }
.oc-st-picked  { background: var(--blue-dim); color: var(--blue); border: 1px solid rgba(37,99,235,0.15); }
.oc-st-ready   { background: var(--green-dim); color: var(--green); border: 1px solid rgba(5,150,105,0.18); }
.oc-expand { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; background: var(--bg-elevated); border: 1px solid var(--border-mid); border-radius: var(--radius-sm); color: var(--text-muted); cursor: pointer; transition: background var(--duration-fast), color var(--duration-fast); flex-shrink: 0; }
.oc-expand:hover { background: var(--bg-overlay); color: var(--text-primary); }
.oc-expand svg { transition: transform 0.15s; }
.oc-card-open .oc-expand svg { transform: rotate(180deg); }
.oc-detail { border-top: 1.5px solid var(--border-subtle); background: var(--bg-elevated); padding: 16px 20px; display: flex; flex-direction: column; gap: 14px; animation: fadeIn var(--duration-mid) var(--ease); }
.oc-detail-status { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.oc-detail-status-label { font-size: 10.5px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.oc-status-btns { display: flex; gap: 5px; }
.oc-status-btn { padding: 5px 12px; background: var(--bg-surface); border: 1.5px solid var(--border-mid); border-radius: var(--radius-sm); font-size: 12px; font-family: var(--font-body); color: var(--text-secondary); cursor: pointer; transition: all var(--duration-fast); }
.oc-status-btn:hover { background: var(--bg-overlay); color: var(--text-primary); }
.oc-status-btn-active { background: var(--accent-dim) !important; color: var(--accent) !important; border-color: rgba(217,119,6,0.25) !important; font-weight: 600; }
.oc-li-wrap { background: var(--bg-surface); border: 1.5px solid var(--border-mid); border-radius: var(--radius-md); overflow: hidden; }
.oc-li-head { display: grid; grid-template-columns: 52px 1fr 140px 50px 130px 90px; background: var(--bg-overlay); border-bottom: 1.5px solid var(--border-mid); padding: 8px 14px; }
.oc-li-head > span { font-size: 10px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.oc-li { display: grid; grid-template-columns: 52px 1fr 140px 50px 130px 90px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--border-subtle); transition: background var(--duration-fast); }
.oc-li:last-child { border-bottom: none; }
.oc-li:hover { background: var(--bg-elevated); }
.oc-li-img { width: 42px; height: 42px; border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-overlay); border: 1px solid var(--border-subtle); }
.oc-li-thumb { width: 100%; height: 100%; object-fit: cover; display: block; }
.oc-li-ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--text-disabled); }
.oc-li-name { display: flex; flex-direction: column; gap: 2px; padding: 0 10px; min-width: 0; }
.oc-li-title { font-size: 13px; font-weight: 500; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oc-li-variant { font-size: 11.5px; color: var(--text-muted); }
.oc-li-sku { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-secondary); padding: 0 10px; word-break: break-all; }
.oc-li-qty { font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--text-primary); padding: 0 6px; }
.oc-li-wh { padding: 0 10px; }
.oc-li-stock { padding: 0 10px; }
.oc-stock-ok  { font-size: 12px; color: var(--green); font-family: var(--font-mono); font-weight: 600; }
.oc-stock-low { font-size: 12px; color: var(--red);   font-family: var(--font-mono); font-weight: 600; }
.oc-note { font-size: 12.5px; color: var(--text-secondary); background: rgba(217,119,6,0.05); border: 1px solid rgba(217,119,6,0.12); border-radius: var(--radius-md); padding: 10px 14px; line-height: 1.5; }
.oc-note-label { font-weight: 700; color: var(--accent); text-transform: uppercase; font-size: 10px; letter-spacing: 0.05em; margin-right: 6px; }

/* ============================================================ PRINT MODAL CHROME */
.pm-screen { position: fixed; inset: 0; z-index: 300; display: flex; flex-direction: column; background: #f0ede8; animation: fadeIn var(--duration-mid) var(--ease); }
.pm-topbar { display: flex; align-items: center; justify-content: space-between; padding: 0 24px; height: 56px; min-height: 56px; background: #1a1814; flex-shrink: 0; gap: 16px; box-shadow: 0 2px 12px rgba(0,0,0,0.25); z-index: 10; }
.pm-close { display: flex; align-items: center; gap: 7px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12); border-radius: var(--radius-md); color: rgba(255,255,255,0.75); font-family: var(--font-body); font-size: 13px; font-weight: 500; cursor: pointer; padding: 7px 14px; transition: all var(--duration-fast); white-space: nowrap; flex-shrink: 0; }
.pm-close:hover { background: rgba(255,255,255,0.14); color: white; }
.pm-center { display: flex; flex-direction: column; align-items: center; gap: 2px; flex: 1; }
.pm-title { font-family: var(--font-display); font-size: 15px; font-weight: 700; color: white; letter-spacing: -0.01em; line-height: 1; }
.pm-meta { font-size: 11px; color: rgba(255,255,255,0.4); }
.pm-actions { display: flex; gap: 8px; flex-shrink: 0; }
.pm-csv, .pm-print { display: flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: var(--radius-md); font-size: 12.5px; font-family: var(--font-body); font-weight: 600; cursor: pointer; transition: all var(--duration-fast); white-space: nowrap; }
.pm-csv { background: rgba(5,150,105,0.18); border: 1px solid rgba(5,150,105,0.3); color: #34d399; }
.pm-csv:hover { background: rgba(5,150,105,0.28); }
.pm-print { background: rgba(217,119,6,0.2); border: 1px solid rgba(217,119,6,0.35); color: #fbbf24; }
.pm-print:hover { background: rgba(217,119,6,0.32); }
.pm-preview { flex: 1; overflow-y: auto; padding: 32px 24px 60px; display: flex; flex-direction: column; align-items: center; }
.pm-preview-label { font-size: 10.5px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 16px; }
.pm-a4 { width: 794px; min-height: 1123px; background: white; border-radius: 4px; padding: 30px; box-shadow: 0 4px 32px rgba(0,0,0,0.15), 0 1px 4px rgba(0,0,0,0.08); }

@media (max-width: 900px) {
  .app-main { margin-left: 0; }
  .sb { position: relative; width: 100%; min-width: 0; height: auto; flex-direction: row; align-items: center; }
  .sb-nav { flex-direction: row; padding: 8px; }
  .sb-footer { border-top: none; border-left: 1px solid rgba(255,255,255,0.07); }
  .o-page { padding: 24px 16px 60px; }
  .pm-a4 { width: 100%; }
}
