/* ===================================================================
   STYLE.CSS — Design tokens for ESS FOUR
   Edit the variables in :root to restyle the entire UI in one place.
   Pages use Tailwind utility classes; these tokens are available for
   any custom CSS that still references them (e.g. shade cards in JS).
   =================================================================== */


/* ─── DESIGN TOKENS ──────────────────────────────────────────────────
   All visual decisions live here as CSS custom properties.
   Change a value once → it updates every element that uses it.
   ------------------------------------------------------------------- */
:root {

  /* ── Brand / Accent color ──────────────────────────────────────────
     To change brand: set --color-brand to any hex, update hover/muted/border.
     Example violet: #7c3aed / #8b5cf6 */
  --color-brand:          #1e3a8a;          /* blue-900 / navy  */
  --color-brand-hover:    #1e40af;          /* blue-800        */
  --color-brand-muted:    rgba(30,58,138,0.10);
  --color-brand-border:   rgba(30,58,138,0.20);

  /* ── Page & Surface Backgrounds ──────────────────────────────────── */
  --color-bg-page:        #f9fafb;          /* gray-50  */
  --color-bg-surface:     #ffffff;          /* white    */
  --color-bg-raised:      #f3f4f6;          /* gray-100 */
  --color-bg-hover:       #e5e7eb;          /* gray-200 */

  /* ── Text Colors ─────────────────────────────────────────────────── */
  --color-text-primary:   #111827;          /* gray-900 */
  --color-text-secondary: #4b5563;          /* gray-600 */
  --color-text-muted:     #9ca3af;          /* gray-400 */

  /* ── Border Color ─────────────────────────────────────────────────── */
  --color-border:         #e5e7eb;          /* gray-200 */
  --color-border-soft:    rgba(229,231,235,0.8);

  /* ── Status / Semantic Colors ────────────────────────────────────── */
  --color-success:        #059669;          /* emerald-600 */
  --color-success-bg:     rgba(5,150,105,0.08);
  --color-success-border: rgba(5,150,105,0.20);

  --color-warning:        #d97706;          /* amber-600   */
  --color-warning-bg:     rgba(217,119,6,0.08);
  --color-warning-border: rgba(217,119,6,0.20);

  --color-danger:         #dc2626;          /* red-600     */
  --color-danger-bg:      rgba(220,38,38,0.07);
  --color-danger-border:  rgba(220,38,38,0.20);

  /* ── Typography ──────────────────────────────────────────────────── */
  --font-sans:            'DM Sans',  sans-serif;
  --font-mono:            'DM Mono',  monospace;
}

/* ─── GLOBAL BASE ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-sans); background: var(--color-bg-page); color: var(--color-text-primary); font-size: 14px; }

/* ─── SIDEBAR LAYOUT ─────────────────────────────────────────────── */
.sd-layout { display: flex; min-height: 100vh; }
.sd-sidebar { width: 220px; height: 100vh; position: fixed; left: 0; top: 0; background: var(--color-bg-surface); border-right: 1px solid var(--color-border); display: flex; flex-direction: column; transition: width 0.22s ease; z-index: 200; overflow: hidden; }
.sd-sidebar.collapsed { width: 64px; }
.sd-sidebar-header { display: flex; align-items: center; justify-content: space-between; padding: 0 12px; height: 60px; border-bottom: 1px solid var(--color-border); flex-shrink: 0; gap: 8px; }
.sd-logo-wrap { display: flex; align-items: center; overflow: hidden; flex: 1; min-width: 0; }
.sd-logo-mark { width: 32px; height: 32px; border-radius: 8px; background: var(--color-brand); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex-shrink: 0; }
.sd-logo-name { font-size: 15px; font-weight: 700; margin-left: 10px; white-space: nowrap; transition: opacity 0.22s, width 0.22s; overflow: hidden; }
.sd-sidebar.collapsed .sd-logo-name { opacity: 0; width: 0; margin-left: 0; }
.sd-toggle-btn { background: none; border: 1px solid var(--color-border); border-radius: 6px; width: 26px; height: 26px; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--color-text-secondary); }
.sd-toggle-btn .material-symbols-outlined { font-size: 16px; }
.sd-sidebar-nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 12px 0; scrollbar-width: none; }
.sd-sidebar-nav::-webkit-scrollbar { display: none; }
.sd-nav-group { margin-bottom: 4px; }
.sd-nav-group-label { display: block; font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--color-text-muted); padding: 8px 20px 4px; white-space: nowrap; transition: opacity 0.22s; }
.sd-sidebar.collapsed .sd-nav-group-label { opacity: 0; }
.sd-nav-link { display: flex; align-items: center; gap: 12px; padding: 9px 12px; margin: 1px 8px; border-radius: 8px; color: var(--color-text-secondary); text-decoration: none; font-size: 13.5px; font-weight: 500; white-space: nowrap; overflow: hidden; transition: background 0.15s, color 0.15s; }
.sd-nav-link:hover { background: var(--color-bg-raised); color: var(--color-text-primary); }
.sd-nav-link.active { background: var(--color-brand-muted); color: var(--color-brand); }
.sd-nav-link .material-symbols-outlined { font-size: 20px; flex-shrink: 0; }
.sd-sidebar.collapsed .sd-nav-link .sd-link-label { opacity: 0; }
.sd-main { margin-left: 220px; flex: 1; padding: 28px 24px; transition: margin-left 0.22s ease; }
.sd-main.shifted { margin-left: 64px; }

/* ─── TOASTS ──────────────────────────────────────────────────────── */
/* Fixed to the viewport (not the scrolling page content) so a toast fired
   while the admin is scrolled down/up/middle is still visible. */
#toastContainer { position: fixed; top: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.mytoast { min-width: 240px; max-width: 360px; padding: 12px 16px; border-radius: 10px; color: #fff; font-size: 13.5px; font-weight: 500; line-height: 1.4; box-shadow: 0 8px 24px rgba(0,0,0,.18); animation: sdToastIn 0.25s ease, sdToastOut 0.3s ease 3s forwards; pointer-events: auto; }
.mytoast.success { background: var(--color-success); }
.mytoast.error   { background: var(--color-danger); }
.mytoast.warning { background: var(--color-warning); }
.mytoast.info    { background: var(--color-brand); }
@keyframes sdToastIn  { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: translateX(0); } }
@keyframes sdToastOut { from { opacity: 1; } to { opacity: 0; transform: translateX(24px); } }

/* ─── TOPBAR ─────────────────────────────────────────────────────── */
.sd-topbar { display: flex; align-items: center; justify-content: space-between; padding-bottom: 20px; margin-bottom: 24px; border-bottom: 1px solid var(--color-border); }
.sd-topbar-title { font-size: 20px; font-weight: 700; color: var(--color-text-primary); }
.sd-topbar-subtitle { font-size: 13px; color: var(--color-text-secondary); margin-top: 2px; }
.sd-topbar-user { display: flex; align-items: center; gap: 10px; }
.sd-user-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--color-brand-muted); color: var(--color-brand); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex-shrink: 0; }
.sd-user-meta { line-height: 1.3; text-align: right; }
.sd-user-name { font-size: 13px; font-weight: 600; color: var(--color-text-primary); }
.sd-user-role { font-size: 11px; color: var(--color-text-muted); text-transform: capitalize; }

/* ─── MOBILE / TABLET NAV (hamburger drawer, hidden until the breakpoint) ── */
.sd-mobile-toggle { display: none; position: fixed; top: 14px; left: 14px; z-index: 250; width: 40px; height: 40px; border-radius: 10px; background: var(--color-bg-surface); border: 1px solid var(--color-border); align-items: center; justify-content: center; box-shadow: 0 4px 14px rgba(0,0,0,.12); color: var(--color-text-primary); cursor: pointer; }
.sd-mobile-overlay { display: none; position: fixed; inset: 0; background: rgba(17,24,39,.45); z-index: 190; }
.sd-mobile-overlay.open { display: block; }

@media (max-width: 900px) {
  .sd-mobile-toggle { display: flex; }
  .sd-sidebar { transform: translateX(-100%); transition: transform 0.22s ease; width: 240px; box-shadow: 0 0 40px rgba(0,0,0,.2); }
  .sd-sidebar.collapsed { width: 240px; } /* the desktop icon-only mode doesn't apply to the mobile drawer */
  .sd-sidebar.collapsed .sd-logo-name,
  .sd-sidebar.collapsed .sd-nav-group-label,
  .sd-sidebar.collapsed .sd-nav-link .sd-link-label { opacity: 1; width: auto; }
  .sd-sidebar.mobile-open { transform: translateX(0); }
  .sd-toggle-btn { display: none; } /* desktop-only collapse-to-icons control */

  .sd-main, .sd-main.shifted { margin-left: 0; padding: 68px 14px 28px; }

  .modal-overlay { padding: 16px 10px; }
  .modal, .modal.wide { max-width: 100%; }
  .card-body { padding: 14px; }
  .filter-bar { padding: 12px; }
  .stat-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
  .form-grid { grid-template-columns: 1fr; }
  .item-card { flex-direction: column; }
  .item-card-img { width: 100%; height: 160px; }
}

@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .wizard-steps { flex-wrap: wrap; }
  .wizard-step { flex: 1 1 45%; }
}

/* ─── CARDS ──────────────────────────────────────────────────────── */
.card { background: var(--color-bg-surface); border: 1px solid var(--color-border); border-radius: 12px; }
.card-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--color-border); gap: 12px; flex-wrap: wrap; }
.card-title { font-size: 15px; font-weight: 700; }
.card-body { padding: 20px; }
.card-body.no-pad { padding: 0; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--color-bg-surface); border: 1px solid var(--color-border); border-radius: 12px; padding: 18px 20px; }
.stat-card-label { font-size: 12px; font-weight: 600; color: var(--color-text-secondary); text-transform: uppercase; letter-spacing: .04em; }
.stat-card-value { font-size: 26px; font-weight: 700; margin-top: 6px; color: var(--color-text-primary); }
.stat-card-hint { font-size: 12px; color: var(--color-text-muted); margin-top: 4px; }
.stat-card.accent .stat-card-value { color: var(--color-brand); }
.stat-card.success .stat-card-value { color: var(--color-success); }
.stat-card.warning .stat-card-value { color: var(--color-warning); }

a.stat-card { display: block; text-decoration: none; transition: border-color 0.15s, transform 0.1s, box-shadow 0.15s; }
a.stat-card:hover { border-color: var(--color-brand-border); box-shadow: 0 4px 14px rgba(0,0,0,.06); transform: translateY(-1px); }

/* ─── DASHBOARD CLOCK ────────────────────────────────────────────── */
.dash-clock { display: flex; flex-direction: column; align-items: flex-end; }
.dash-clock-time { font-family: var(--font-mono); font-size: 20px; font-weight: 700; color: var(--color-text-primary); }
.dash-clock-date { font-size: 12.5px; color: var(--color-text-muted); margin-top: 2px; }

/* ─── CHARTS ─────────────────────────────────────────────────────── */
.chart-wrap { position: relative; padding: 20px; }
.chart-wrap canvas { max-width: 100%; }
.chart-wrap.pie { max-width: 340px; margin: 0 auto; }

/* ─── BUTTONS ────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-family: var(--font-sans); font-size: 13.5px; font-weight: 600; padding: 9px 16px; border-radius: 8px; border: 1px solid transparent; cursor: pointer; transition: background 0.15s, border-color 0.15s, opacity 0.15s; white-space: nowrap; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn .material-symbols-outlined { font-size: 18px; }
.btn-sm { padding: 6px 12px; font-size: 12.5px; }
.btn-primary { background: var(--color-brand); border-color: var(--color-brand); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--color-brand-hover); border-color: var(--color-brand-hover); }
.btn-secondary { background: var(--color-bg-surface); border-color: var(--color-border); color: var(--color-text-primary); }
.btn-secondary:hover:not(:disabled) { background: var(--color-bg-raised); }
.btn-danger { background: var(--color-bg-surface); border-color: var(--color-danger-border); color: var(--color-danger); }
.btn-danger:hover:not(:disabled) { background: var(--color-danger-bg); }
.btn-danger.solid { background: var(--color-danger); border-color: var(--color-danger); color: #fff; }
.btn-danger.solid:hover:not(:disabled) { opacity: 0.9; }
.btn-ghost { background: none; border-color: transparent; color: var(--color-text-secondary); }
.btn-ghost:hover:not(:disabled) { background: var(--color-bg-raised); color: var(--color-text-primary); }
.btn-icon { padding: 8px; }

/* ─── FORMS ──────────────────────────────────────────────────────── */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-group.span-2 { grid-column: span 2; }
.form-label { font-size: 12.5px; font-weight: 600; color: var(--color-text-secondary); }
.form-label .req { color: var(--color-danger); }
.form-input, .form-select, .form-textarea {
  font-family: var(--font-sans); font-size: 13.5px; padding: 9px 12px; border-radius: 8px;
  border: 1px solid var(--color-border); background: var(--color-bg-surface); color: var(--color-text-primary);
  width: 100%; transition: border-color 0.15s, box-shadow 0.15s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { outline: none; border-color: var(--color-brand); box-shadow: 0 0 0 3px var(--color-brand-muted); }
.form-textarea { resize: vertical; min-height: 72px; }
/* Native <select> arrows look completely different per OS/browser and clash
   with the rest of this custom-styled UI — replace with one consistent
   chevron everywhere a .form-select is used, instead of the browser default. */
.form-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  cursor: pointer;
}
.form-hint { font-size: 11.5px; color: var(--color-text-muted); }
.form-error-text { font-size: 11.5px; color: var(--color-danger); }
.form-check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--color-text-primary); }
.form-check input { width: 16px; height: 16px; accent-color: var(--color-brand); }

/* ─── TABLES ─────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--color-text-muted); padding: 10px 16px; border-bottom: 1px solid var(--color-border); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--color-border-soft); color: var(--color-text-primary); vertical-align: middle; }
.table tbody tr:hover { background: var(--color-bg-raised); }
.table tbody tr:last-child td { border-bottom: none; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .actions-cell { text-align: right; white-space: nowrap; }
.table-empty { padding: 40px 20px; text-align: center; color: var(--color-text-muted); font-size: 13.5px; }

/* ─── BADGES ─────────────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; text-transform: capitalize; white-space: nowrap; }
.badge-open, .badge-assigned, .badge-pending { background: var(--color-brand-muted); color: var(--color-brand); }
.badge-partial, .badge-in_progress, .badge-hold { background: var(--color-warning-bg); color: var(--color-warning); }
.badge-closed, .badge-completed, .badge-active { background: var(--color-success-bg); color: var(--color-success); }
.badge-cancelled, .badge-inactive { background: var(--color-danger-bg); color: var(--color-danger); }
.badge-neutral { background: var(--color-bg-raised); color: var(--color-text-secondary); }
.badge-done { background: var(--color-success-bg); color: var(--color-success); }
.badge-paused { background: var(--color-warning-bg); color: var(--color-warning); }
.badge-shifted { background: var(--color-bg-raised); color: var(--color-text-secondary); }
.badge-received { background: var(--color-success-bg); color: var(--color-success); }
.badge-used { background: var(--color-bg-raised); color: var(--color-text-secondary); }
.badge-returned { background: var(--color-bg-raised); color: var(--color-text-secondary); }
.badge-returned_to_supplier { background: var(--color-warning-bg); color: var(--color-warning); }

.deadline-overdue { color: var(--color-danger); font-weight: 700; }
.deadline-warning { color: var(--color-warning); font-weight: 700; }

/* ─── MODAL ──────────────────────────────────────────────────────── */
.modal-overlay { position: fixed; inset: 0; background: rgba(17,24,39,0.45); display: flex; align-items: flex-start; justify-content: center; padding: 40px 20px; z-index: 500; overflow-y: auto; }
.modal-overlay.hidden { display: none; }
.modal { background: var(--color-bg-surface); border-radius: 14px; width: 100%; max-width: 560px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal.wide { max-width: 780px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--color-border); }
.modal-title { font-size: 16px; font-weight: 700; }
.modal-close { background: none; border: none; cursor: pointer; color: var(--color-text-muted); display: flex; padding: 4px; border-radius: 6px; }
.modal-close:hover { background: var(--color-bg-raised); color: var(--color-text-primary); }
.modal-body { padding: 22px; max-height: 70vh; overflow-y: auto; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--color-border); }

/* ─── PAGINATION ─────────────────────────────────────────────────── */
.pagination { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-top: 1px solid var(--color-border); flex-wrap: wrap; gap: 10px; }
.pagination-info { font-size: 12.5px; color: var(--color-text-secondary); }
.pagination-controls { display: flex; align-items: center; gap: 6px; }

/* ─── FILTER BAR ─────────────────────────────────────────────────── */
.filter-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 16px 20px; border-bottom: 1px solid var(--color-border); }
.filter-bar .form-input, .filter-bar .form-select { width: auto; min-width: 160px; }

/* ─── TABS ───────────────────────────────────────────────────────── */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--color-border); padding: 0 20px; }
.tab-btn { background: none; border: none; padding: 12px 6px; margin-right: 18px; font-size: 13.5px; font-weight: 600; color: var(--color-text-secondary); cursor: pointer; border-bottom: 2px solid transparent; }
.tab-btn.active { color: var(--color-brand); border-bottom-color: var(--color-brand); }

/* ─── MISC ───────────────────────────────────────────────────────── */
.text-muted { color: var(--color-text-muted); }
.text-secondary { color: var(--color-text-secondary); }
.mono { font-family: var(--font-mono); }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 60px 20px; color: var(--color-text-muted); }
.empty-state .material-symbols-outlined { font-size: 40px; margin-bottom: 10px; opacity: 0.5; }
.thumb { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; border: 1px solid var(--color-border); background: var(--color-bg-raised); cursor: zoom-in; }
.thumb-lg { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; border: 1px solid var(--color-border); background: var(--color-bg-raised); cursor: zoom-in; transition: opacity 0.15s; }
.thumb-lg:hover { opacity: 0.85; }
.upload-preview { display: block; max-width: 220px; max-height: 220px; margin-top: 10px; border-radius: 10px; object-fit: cover; border: 1px solid var(--color-border); background: var(--color-bg-raised); cursor: zoom-in; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--color-border); border-top-color: var(--color-brand); animation: sdSpin 0.7s linear infinite; }
@keyframes sdSpin { to { transform: rotate(360deg); } }
.loading-row { display: flex; align-items: center; justify-content: center; padding: 40px; gap: 10px; color: var(--color-text-muted); font-size: 13px; }

/* ─── LOGIN PAGE ─────────────────────────────────────────────────── */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--color-bg-page); padding: 20px; }
.auth-card { width: 100%; max-width: 380px; background: var(--color-bg-surface); border: 1px solid var(--color-border); border-radius: 16px; padding: 32px; box-shadow: 0 10px 40px rgba(17,24,39,.06); }
.auth-logo { width: 44px; height: 44px; border-radius: 10px; background: var(--color-brand); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; margin-bottom: 18px; }
.auth-title { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.auth-subtitle { font-size: 13px; color: var(--color-text-secondary); margin-bottom: 24px; }

/* ─── SEARCHABLE COMBOBOX (customers/deals — avoids giant <select> dumps) ── */
.combobox-wrap { position: relative; }
.combobox-results { position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: var(--color-bg-surface); border: 1px solid var(--color-border); border-radius: 10px; max-height: 240px; overflow-y: auto; z-index: 600; box-shadow: 0 12px 32px rgba(0,0,0,.14); }
.combobox-results.hidden { display: none; }
.combobox-item { padding: 9px 12px; cursor: pointer; font-size: 13.5px; border-bottom: 1px solid var(--color-border-soft); }
.combobox-item:last-child { border-bottom: none; }
.combobox-item:hover, .combobox-item.active { background: var(--color-bg-raised); }
.combobox-item .cb-sub { font-size: 11.5px; color: var(--color-text-muted); margin-top: 2px; }
.combobox-empty, .combobox-loading { padding: 12px; font-size: 12.5px; color: var(--color-text-muted); text-align: center; }
.combobox-loadmore { padding: 8px 12px; font-size: 12px; color: var(--color-brand); text-align: center; cursor: pointer; font-weight: 600; }
.combobox-loadmore:hover { background: var(--color-bg-raised); }

/* ─── MATERIAL PICK LIST (deal/customer material chosen for an order item) ── */
.material-pick-list { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; border: 1px solid var(--color-border); border-radius: 8px; padding: 6px; }
.material-pick-item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 13px; border: 1px solid transparent; }
.material-pick-item:hover { background: var(--color-bg-raised); }
.material-pick-item.selected { background: var(--color-brand-muted); border-color: var(--color-brand-border); }
.material-pick-img { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; flex-shrink: 0; border: 1px solid var(--color-border); background: var(--color-bg-raised); }
.material-pick-info { flex: 1; min-width: 0; }
.material-pick-item .mp-code { font-weight: 600; font-family: var(--font-mono); }
.material-pick-item .mp-meta { font-size: 11.5px; color: var(--color-text-secondary); margin-top: 2px; }
.material-pick-item .mp-notes { font-size: 11.5px; color: var(--color-text-muted); margin-top: 2px; font-style: italic; }

/* ─── ITEM CARDS (order Items tab — image left, info right) ────────── */
.item-card-list { display: flex; flex-direction: column; gap: 12px; }
.item-card { display: flex; gap: 16px; background: var(--color-bg-surface); border: 1px solid var(--color-border); border-radius: 12px; padding: 14px; }
.item-card-img { width: 108px; height: 108px; border-radius: 10px; object-fit: cover; flex-shrink: 0; cursor: zoom-in; border: 1px solid var(--color-border); background: var(--color-bg-raised); transition: opacity 0.15s; }
.item-card-img:hover { opacity: 0.85; }
.item-card-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.item-card-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.item-card-title { font-size: 14.5px; font-weight: 700; color: var(--color-text-primary); }
.item-card-row { font-size: 13px; color: var(--color-text-primary); }
.item-card-row .text-muted { margin-right: 6px; }
.item-card-actions { margin-top: 6px; }
.item-card-cancelled { opacity: 0.55; }
.item-card-cancelled .item-card-img { cursor: default; filter: grayscale(60%); }

/* ─── MOBILE DASHBOARD (optional extra page, not gated/forced) ─────── */
.mob-page { max-width: 520px; margin: 0 auto; padding: 20px 16px 40px; }
.mob-topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.mob-title { font-size: 17px; font-weight: 700; }
.mob-subtitle { font-size: 12.5px; color: var(--color-text-secondary); margin-top: 2px; }
.mob-section-label { font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--color-text-muted); margin: 20px 0 10px; }
.mob-stat-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.mob-range-card { margin-bottom: 12px; }
.mob-range-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ─── WIZARD STEPPER ─────────────────────────────────────────────── */
.wizard-steps { display: flex; gap: 8px; margin-bottom: 20px; }
.wizard-step { flex: 1; text-align: center; padding: 8px 6px; border-radius: 8px; font-size: 12px; font-weight: 600; color: var(--color-text-muted); background: var(--color-bg-raised); }
.wizard-step.active { color: #fff; background: var(--color-brand); }
.wizard-step.done { color: var(--color-brand); background: var(--color-brand-muted); }
