/* =====================================================================
   Purple Reseller — application stylesheet
   ===================================================================== */
:root {
  --purple: #6c5ce7; --purple-600: #5b4ac9; --purple-700: #4a3bb0; --purple-800: #382a8f;
  --purple-100: #ece9fb; --purple-50: #f5f3ff; --purple-rgb: 108, 92, 231;
  --grad: linear-gradient(135deg, #6c5ce7 0%, #8b7cf6 55%, #a78bfa 100%);
  --side-bg: #1b1730; --side-bg-2: #231e3d; --side-text: rgba(255,255,255,.72);
  --bg: #f5f4fa; --surface: #ffffff; --surface-2: #faf9fd; --border: #e7e4f1; --border-2: #d9d5e8;
  --text: #1c1930; --text-2: #4b4766; --muted: #6f6b87; --muted-2: #9d99b3;
  --green: #16a34a; --green-bg: #dcfce7; --green-ink: #166534;
  --amber: #d97706; --amber-bg: #fef3c7; --amber-ink: #92400e;
  --red: #dc2626; --red-bg: #fee2e2; --red-ink: #991b1b;
  --blue: #2563eb; --blue-bg: #dbeafe; --blue-ink: #1e40af;
  --indigo: #4f46e5; --indigo-bg: #e0e7ff; --indigo-ink: #3730a3;
  --orange: #ea580c; --orange-bg: #ffedd5; --orange-ink: #9a3412;
  --gray-bg: #eeedf3; --gray-ink: #4b4766;
  --radius: 14px; --radius-sm: 9px; --radius-xs: 6px;
  --shadow: 0 1px 2px rgba(28,25,48,.04), 0 6px 20px -8px rgba(28,25,48,.10);
  --shadow-lg: 0 20px 50px -20px rgba(28,25,48,.25);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans Bengali', sans-serif;
  --side-w: 248px; --topbar-h: 60px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 14.5px; line-height: 1.5; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--purple-600); text-decoration: none; }
a:hover { color: var(--purple-700); }
h1, h2, h3, h4 { margin: 0 0 .35em; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 26px; font-weight: 800; }
h2 { font-size: 21px; font-weight: 700; }
h3 { font-size: 16.5px; font-weight: 700; }
h4 { font-size: 14px; font-weight: 700; }
p { margin: 0 0 .8em; }
small, .small { font-size: 12.5px; }
.muted { color: var(--muted); }
.muted-2 { color: var(--muted-2); }
.strong { font-weight: 600; }
.mono, .num { font-variant-numeric: tabular-nums; }
.plain { list-style: none; margin: 0; padding: 0; }
.plain li + li { margin-top: 4px; }
.hide-sm { display: inline; }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.row { display: flex; align-items: center; flex-wrap: wrap; }
.row.gap { gap: 10px; }
.row.between { justify-content: space-between; }
.row.center { justify-content: center; }
.grow { flex: 1; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ic { flex: none; vertical-align: middle; }
[hidden] { display: none !important; }
::selection { background: rgba(var(--purple-rgb), .22); }

/* ------------------------------------------------------------------
   App shell
   ------------------------------------------------------------------ */
.app { display: flex; min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--side-w); background: var(--side-bg); color: var(--side-text); display: flex; flex-direction: column; z-index: 40; transition: transform .25s ease; }
.sidebar::after { content: ''; position: absolute; inset: 0; background: radial-gradient(600px 300px at -20% -10%, rgba(var(--purple-rgb), .35), transparent 60%); pointer-events: none; }
.sidebar > * { position: relative; z-index: 1; }
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 20px 14px; color: #fff; font-weight: 800; font-size: 17px; letter-spacing: -.02em; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--grad); display: grid; place-items: center; color: #fff; box-shadow: 0 6px 16px -4px rgba(var(--purple-rgb), .7); flex: none; }
.brand-lg { font-size: 20px; padding: 0; }
.brand-lg .brand-mark { width: 40px; height: 40px; border-radius: 12px; }
.nav { padding: 6px 12px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; flex: 1; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--side-text); font-weight: 500; font-size: 14px; position: relative; transition: background .15s, color .15s; }
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active { background: rgba(var(--purple-rgb), .28); color: #fff; box-shadow: inset 0 0 0 1px rgba(var(--purple-rgb), .45); }
.nav-item.active .ic { color: #b7adfb; }
.nav-badge { margin-left: auto; background: var(--purple); color: #fff; font-size: 11px; font-weight: 700; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; display: inline-grid; place-items: center; }
.sidebar-foot { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-top: 1px solid rgba(255,255,255,.08); }
.user-chip { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; color: #fff; padding: 6px; border-radius: 10px; }
.user-chip:hover { background: rgba(255,255,255,.06); color: #fff; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--grad); color: #fff; font-weight: 700; font-size: 13px; display: grid; place-items: center; flex: none; }
.avatar-lg { width: 56px; height: 56px; font-size: 18px; }
.user-meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.user-name { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-role { font-size: 11.5px; color: var(--side-text); }
.logout-form { margin: 0; }
.sidebar .icon-btn { color: var(--side-text); }
.sidebar .icon-btn:hover { color: #fff; background: rgba(255,255,255,.08); }
.sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(20,16,40,.5); z-index: 39; backdrop-filter: blur(2px); }
.main { flex: 1; margin-left: var(--side-w); min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; height: var(--topbar-h); display: flex; align-items: center; gap: 12px; padding: 0 24px; background: rgba(245,244,250,.85); backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--border); }
.topbar-title { font-weight: 700; font-size: 16px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.menu-btn { display: none; }
.content { padding: 24px; max-width: 1240px; width: 100%; margin: 0 auto; flex: 1; }
.content-wide { max-width: 1500px; }
.tabbar { display: none; }

/* ------------------------------------------------------------------
   Buttons
   ------------------------------------------------------------------ */
.btn { --btn-bg: var(--surface); --btn-fg: var(--text); --btn-bd: var(--border-2); display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 15px; border-radius: 10px; font: inherit; font-weight: 600; font-size: 13.5px; line-height: 1.2; cursor: pointer; border: 1px solid var(--btn-bd); background: var(--btn-bg); color: var(--btn-fg); white-space: nowrap; transition: transform .08s, box-shadow .15s, background .15s, color .15s, border-color .15s; user-select: none; text-decoration: none; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px -6px rgba(28,25,48,.25); color: var(--btn-fg); }
.btn:active { transform: translateY(0); }
.btn:disabled, .btn.disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-primary { --btn-bg: var(--purple); --btn-fg: #fff; --btn-bd: var(--purple); background: linear-gradient(135deg, #6c5ce7, #7b6cf0); box-shadow: 0 6px 16px -8px rgba(var(--purple-rgb), .8); }
.btn-primary:hover { --btn-fg: #fff; box-shadow: 0 8px 20px -8px rgba(var(--purple-rgb), .9); }
.btn-outline { --btn-bg: transparent; --btn-fg: var(--purple-600); --btn-bd: rgba(var(--purple-rgb), .45); }
.btn-outline:hover { --btn-bg: var(--purple-50); }
.btn-ghost { --btn-bg: transparent; --btn-bd: transparent; --btn-fg: var(--text-2); }
.btn-ghost:hover { --btn-bg: rgba(var(--purple-rgb), .08); box-shadow: none; }
.btn-danger { --btn-bg: var(--red); --btn-fg: #fff; --btn-bd: var(--red); }
.btn-danger-soft { --btn-bg: var(--red-bg); --btn-fg: var(--red-ink); --btn-bd: transparent; }
.btn-success { --btn-bg: var(--green); --btn-fg: #fff; --btn-bd: var(--green); }
.btn-success-soft { --btn-bg: var(--green-bg); --btn-fg: var(--green-ink); --btn-bd: transparent; }
.btn-soft { --btn-bg: var(--purple-100); --btn-fg: var(--purple-700); --btn-bd: transparent; }
.btn-dark { --btn-bg: var(--side-bg); --btn-fg: #fff; --btn-bd: var(--side-bg); }
.btn-sm { padding: 6px 11px; font-size: 12.5px; border-radius: 8px; gap: 5px; }
.btn-xs { padding: 4px 8px; font-size: 12px; border-radius: 7px; gap: 4px; }
.btn-lg { padding: 12px 20px; font-size: 15px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn .pill { background: rgba(255,255,255,.25); color: inherit; }
.btn-ghost .pill, .btn-outline .pill { background: var(--purple-100); color: var(--purple-700); }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; border: 0; background: transparent; color: var(--text-2); cursor: pointer; transition: background .15s; }
.icon-btn:hover { background: rgba(var(--purple-rgb), .1); color: var(--purple-700); }
.icon-btn.sm { width: 30px; height: 30px; }
.icon-btn.danger:hover { background: var(--red-bg); color: var(--red); }
.btn-group { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.seg { display: inline-flex; background: var(--gray-bg); border-radius: 10px; padding: 3px; gap: 2px; }
.seg a, .seg button { padding: 6px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--muted); border: 0; background: transparent; cursor: pointer; font-family: inherit; }
.seg .active { background: #fff; color: var(--text); box-shadow: var(--shadow); }

/* ------------------------------------------------------------------
   Badges / pills
   ------------------------------------------------------------------ */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 7px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.4; white-space: nowrap; }
.badge-sm { padding: 2px 7px 2px 5px; font-size: 11px; }
.badge-amber { background: var(--amber-bg); color: var(--amber-ink); }
.badge-blue { background: var(--blue-bg); color: var(--blue-ink); }
.badge-indigo { background: var(--indigo-bg); color: var(--indigo-ink); }
.badge-green { background: var(--green-bg); color: var(--green-ink); }
.badge-orange { background: var(--orange-bg); color: var(--orange-ink); }
.badge-red { background: var(--red-bg); color: var(--red-ink); }
.badge-gray { background: var(--gray-bg); color: var(--gray-ink); }
.badge-purple { background: var(--purple-100); color: var(--purple-700); }
.pill { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; font-size: 11.5px; font-weight: 700; background: var(--purple-100); color: var(--purple-700); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--surface); border: 1px solid var(--border-2); color: var(--text-2); cursor: pointer; white-space: nowrap; }
.chip:hover { border-color: rgba(var(--purple-rgb), .5); color: var(--purple-700); }
.chip.active { background: var(--side-bg); border-color: var(--side-bg); color: #fff; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* ------------------------------------------------------------------
   Cards / panels
   ------------------------------------------------------------------ */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-body { padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.card-head h3 { margin: 0; }
.card-foot { padding: 14px 20px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
.card + .card { margin-top: 18px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.page-head .sub { color: var(--muted); margin-top: 2px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.page-actions .input, .page-actions select { width: auto; min-width: 0; }
.page-actions .search-box input { width: 240px; }
.page-actions .seg { flex: none; }
.grid { display: grid; gap: 18px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.span-2 { grid-column: span 2; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.split-wide { grid-template-columns: minmax(0, 1fr) 420px; }
.sticky { position: sticky; top: calc(var(--topbar-h) + 16px); }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; position: relative; overflow: hidden; box-shadow: var(--shadow); }
.stat .stat-label { font-size: 12.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; display: flex; align-items: center; gap: 6px; padding-right: 48px; }
.stat .stat-value { font-size: 26px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat .stat-sub { font-size: 12.5px; color: var(--muted); }
.stat .stat-ic { position: absolute; right: 14px; top: 14px; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--purple-50); color: var(--purple); }
.stat.accent { background: var(--side-bg); border-color: var(--side-bg); color: #fff; }
.stat.accent::after { content: ''; position: absolute; inset: 0; background: radial-gradient(300px 140px at 100% 0%, rgba(var(--purple-rgb), .55), transparent 65%); }
.stat.accent > *:not(.stat-ic) { position: relative; }
.stat.accent .stat-label, .stat.accent .stat-sub { color: rgba(255,255,255,.72); }
.stat.accent .stat-ic { background: rgba(255,255,255,.12); color: #fff; }
.stat.green .stat-ic { background: var(--green-bg); color: var(--green); }
.stat.amber .stat-ic { background: var(--amber-bg); color: var(--amber); }
.stat.blue .stat-ic { background: var(--blue-bg); color: var(--blue); }
.stat.red .stat-ic { background: var(--red-bg); color: var(--red); }
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty .ic { color: var(--muted-2); margin: 0 auto 10px; }
.empty h3 { color: var(--text); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; }
.divider { height: 1px; background: var(--border); margin: 14px 0; }
.note { background: var(--purple-50); border: 1px dashed rgba(var(--purple-rgb), .4); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 13px; color: var(--purple-800); }

/* ------------------------------------------------------------------
   Alerts / toasts
   ------------------------------------------------------------------ */
.alert { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 13.5px; border: 1px solid transparent; position: relative; }
.alert .ic { margin-top: 2px; }
.alert > div { flex: 1; }
.alert-close { background: transparent; border: 0; font-size: 18px; line-height: 1; cursor: pointer; color: inherit; opacity: .6; padding: 0 2px; }
.alert-success { background: var(--green-bg); color: var(--green-ink); border-color: #bbf7d0; }
.alert-error { background: var(--red-bg); color: var(--red-ink); border-color: #fecaca; }
.alert-info { background: var(--blue-bg); color: var(--blue-ink); border-color: #bfdbfe; }
.alert-warning { background: var(--amber-bg); color: var(--amber-ink); border-color: #fde68a; }
.alert-floating { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 100; min-width: 280px; box-shadow: var(--shadow-lg); }
.toasts { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 120; }
.toast { background: var(--side-bg); color: #fff; padding: 11px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); font-size: 13.5px; font-weight: 500; display: flex; align-items: center; gap: 10px; animation: toast-in .25s ease; max-width: 360px; }
.toast.success .ic { color: #4ade80; } .toast.error .ic { color: #f87171; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------------
   Forms
   ------------------------------------------------------------------ */
.form { display: flex; flex-direction: column; gap: 14px; }
.form-section { margin: 8px 0 -4px; padding-top: 10px; border-top: 1px solid var(--border); color: var(--text-2); font-size: 13px; text-transform: uppercase; letter-spacing: .05em; }
.form-section:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > span { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.field small { color: var(--muted); font-size: 12px; }
.field input, .field select, .field textarea, .input { width: 100%; font: inherit; font-size: 14px; padding: 9px 12px; border: 1px solid var(--border-2); border-radius: 10px; background: var(--surface); color: var(--text); transition: border-color .15s, box-shadow .15s; -webkit-appearance: none; appearance: none; }
.field select, select.input { 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='%236f6b87' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 32px; }
.field textarea { min-height: 84px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px rgba(var(--purple-rgb), .18); }
.field input[readonly] { background: var(--surface-2); color: var(--muted); }
.field.error input { border-color: var(--red); }
.input-sm { padding: 6px 10px; font-size: 13px; border-radius: 8px; }
.input-wrap { position: relative; }
.input-wrap input { padding-right: 40px; }
.input-wrap .input-btn { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: transparent; border: 0; color: var(--muted); cursor: pointer; padding: 6px; border-radius: 6px; display: grid; place-items: center; }
.input-wrap .prefix { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; pointer-events: none; }
.input-wrap.has-prefix input { padding-left: 28px; }
.check { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13.5px; }
.check input { width: 17px; height: 17px; accent-color: var(--purple); margin: 0; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { width: 40px; height: 22px; border-radius: 11px; background: var(--border-2); position: relative; transition: background .2s; flex: none; }
.switch .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.switch input:checked + .track { background: var(--purple); }
.switch input:checked + .track::after { transform: translateX(18px); }
.radio-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.radio-card { position: relative; border: 1px solid var(--border-2); border-radius: 12px; padding: 12px 14px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; transition: border-color .15s, background .15s; }
.radio-card input { position: absolute; opacity: 0; }
.radio-card b { font-size: 14px; }
.radio-card span { font-size: 12.5px; color: var(--muted); }
.radio-card:has(input:checked) { border-color: var(--purple); background: var(--purple-50); box-shadow: 0 0 0 3px rgba(var(--purple-rgb), .15); }
.search-box { position: relative; }
.search-box .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-box input { padding-left: 38px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.filters .field { flex-direction: row; align-items: center; gap: 8px; }
.filters .field > span { white-space: nowrap; }
.filters .input, .filters select, .filters input { width: auto; min-width: 140px; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--border-2); border-radius: 9px; overflow: hidden; background: #fff; }
.stepper button { width: 30px; height: 32px; border: 0; background: transparent; cursor: pointer; color: var(--text-2); display: grid; place-items: center; }
.stepper button:hover { background: var(--purple-50); color: var(--purple-700); }
.stepper input { width: 42px; text-align: center; border: 0; font: inherit; font-weight: 600; padding: 0; height: 32px; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; }
.help { font-size: 12.5px; color: var(--muted); }
.upload-drop { border: 2px dashed var(--border-2); border-radius: 12px; padding: 18px; text-align: center; color: var(--muted); cursor: pointer; transition: border-color .15s, background .15s; }
.upload-drop:hover, .upload-drop.drag { border-color: var(--purple); background: var(--purple-50); }
.thumbs { display: flex; gap: 10px; flex-wrap: wrap; }
.thumb { position: relative; width: 84px; height: 84px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: #fff; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .rm { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; background: rgba(28,25,48,.75); color: #fff; border: 0; cursor: pointer; display: grid; place-items: center; }
.thumb.main::after { content: 'Main'; position: absolute; left: 0; right: 0; bottom: 0; font-size: 10px; text-align: center; background: rgba(var(--purple-rgb), .9); color: #fff; padding: 2px; }

/* ------------------------------------------------------------------
   Tables
   ------------------------------------------------------------------ */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); }
.card > .table-wrap { border-radius: 0 0 var(--radius) var(--radius); }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th, .table td { padding: 11px 14px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--border); }
.table th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; background: var(--surface-2); white-space: nowrap; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.table .num, .table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table .w-check { width: 34px; }
.table .actions { text-align: right; white-space: nowrap; }
.table .row-link { color: inherit; font-weight: 600; }
.table .row-link:hover { color: var(--purple-700); }
.table.compact th, .table.compact td { padding: 8px 10px; }
.table tr.selected { background: var(--purple-50); }
.thumb-sm { width: 42px; height: 42px; border-radius: 8px; object-fit: cover; border: 1px solid var(--border); background: #fff; flex: none; }
.thumb-xs { width: 32px; height: 32px; border-radius: 6px; object-fit: cover; border: 1px solid var(--border); background: #fff; flex: none; }
.cell-product { display: flex; align-items: center; gap: 10px; min-width: 200px; }
.cell-product .t { font-weight: 600; line-height: 1.3; }
.cell-product .s { font-size: 12px; color: var(--muted); }
.products-table .cell-product { min-width: 220px; max-width: 320px; }
.products-table .cell-product .t { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.inline-edit { width: 76px; padding: 5px 8px; border: 1px solid transparent; border-radius: 7px; font: inherit; font-size: 13.5px; text-align: right; background: transparent; font-variant-numeric: tabular-nums; }
.inline-edit:hover { border-color: var(--border-2); background: #fff; }
.inline-edit:focus { outline: none; border-color: var(--purple); background: #fff; box-shadow: 0 0 0 3px rgba(var(--purple-rgb), .15); }
.inline-edit.saved { border-color: var(--green); background: var(--green-bg); }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.pagination .pages { display: flex; gap: 4px; }
.pagination a, .pagination span.cur { min-width: 32px; height: 32px; display: inline-grid; place-items: center; border-radius: 8px; padding: 0 8px; font-weight: 600; }
.pagination a:hover { background: var(--purple-50); }
.pagination span.cur { background: var(--side-bg); color: #fff; }
.bulkbar { display: none; align-items: center; gap: 10px; padding: 10px 14px; background: var(--side-bg); color: #fff; border-radius: 12px; margin-bottom: 12px; position: sticky; top: calc(var(--topbar-h) + 8px); z-index: 20; box-shadow: var(--shadow-lg); flex-wrap: wrap; }
.bulkbar.show { display: flex; }
.bulkbar .count { font-weight: 700; }
.bulkbar .btn { --btn-bg: rgba(255,255,255,.12); --btn-fg: #fff; --btn-bd: transparent; }
.bulkbar .btn:hover { --btn-bg: rgba(255,255,255,.22); }
.bulkbar select { font: inherit; font-size: 13px; padding: 6px 28px 6px 10px; border-radius: 8px; border: 0; }

/* ------------------------------------------------------------------
   Product cards (catalogue)
   ------------------------------------------------------------------ */
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.pcard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; position: relative; }
.pcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.pcard-img { aspect-ratio: 1; background: #fff; position: relative; overflow: hidden; }
.pcard-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.pcard:hover .pcard-img img { transform: scale(1.04); }
.pcard-img .stock-pill { position: absolute; left: 10px; top: 10px; }
.pcard-img .disc { position: absolute; right: 10px; top: 10px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 7px; border-radius: 6px; }
.pcard-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.pcard .brand-line { font-size: 11.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.pcard .title { font-weight: 600; font-size: 13.5px; line-height: 1.35; min-height: 2.7em; color: var(--text); }
.pcard .title a { color: inherit; }
.pcard .prices { display: flex; align-items: baseline; gap: 8px; margin-top: auto; flex-wrap: wrap; }
.pcard .cost { font-weight: 800; font-size: 16px; }
.pcard .mrp { font-size: 12.5px; color: var(--muted); }
.pcard .margin { font-size: 12px; color: var(--green-ink); background: var(--green-bg); padding: 1px 7px; border-radius: 6px; font-weight: 600; }
.pcard-foot { display: flex; gap: 8px; align-items: center; }
.pcard-foot .btn { flex: 1; }
.pcard.oos .pcard-img img { filter: grayscale(.6); opacity: .7; }
.stock-pill { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 6px; background: rgba(255,255,255,.9); backdrop-filter: blur(4px); color: var(--green-ink); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.stock-pill.low { color: var(--amber-ink); }
.stock-pill.out { color: var(--red-ink); }
.cat-scroll { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 14px; scrollbar-width: none; }
.cat-scroll::-webkit-scrollbar { display: none; }

.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.pick-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.pick-item .pi-t { flex: 1; min-width: 0; }
.pick-item .pi-q { font-size: 20px; font-weight: 800; min-width: 34px; text-align: right; color: var(--purple-700); }

.ob-mobilebar { display: none; }

/* floating cart bar (catalogue) */
.cartbar { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--side-bg); color: #fff; padding: 10px 12px 10px 18px; border-radius: 999px; display: flex; align-items: center; gap: 14px; box-shadow: var(--shadow-lg); z-index: 35; font-weight: 600; transition: transform .25s, opacity .25s; }
.cartbar[hidden] { display: none; }
.cartbar .btn { border-radius: 999px; }
.cartbar .sum { color: rgba(255,255,255,.7); font-weight: 500; font-size: 13px; }

/* ------------------------------------------------------------------
   Order builder
   ------------------------------------------------------------------ */
.ob-item { display: grid; grid-template-columns: 56px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.ob-item:last-child { border-bottom: 0; }
.ob-item img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; border: 1px solid var(--border); }
.ob-item .t { font-weight: 600; font-size: 13.5px; line-height: 1.3; }
.ob-item .meta { font-size: 12px; color: var(--muted); }
.ob-item .controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.ob-item .price-in { display: inline-flex; align-items: center; border: 1px solid var(--border-2); border-radius: 9px; overflow: hidden; background: #fff; }
.ob-item .price-in span { padding: 0 8px; color: var(--muted); font-weight: 600; background: var(--surface-2); height: 32px; display: grid; place-items: center; font-size: 13px; }
.ob-item .price-in input { width: 84px; border: 0; height: 32px; padding: 0 8px; font: inherit; font-weight: 600; text-align: right; -moz-appearance: textfield; }
.ob-item .price-in input:focus { outline: none; }
.ob-item .price-in input::-webkit-inner-spin-button { -webkit-appearance: none; }
.ob-item .profit { font-size: 12.5px; font-weight: 700; margin-left: auto; }
.ob-item .profit.neg { color: var(--red); }
.ob-item .profit.pos { color: var(--green-ink); }
.ob-item .rm { margin-left: 4px; }
.summary { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.summary .line { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.summary .line.total { font-size: 17px; font-weight: 800; padding-top: 10px; border-top: 1px dashed var(--border-2); }
.summary .line.profit { color: var(--green-ink); font-weight: 700; }
.summary .line.profit.neg { color: var(--red); }
.summary .line small { color: var(--muted); font-weight: 400; }
.profit-hero { background: linear-gradient(135deg, #ecfdf5, #f0fdf4); border: 1px solid #bbf7d0; border-radius: 12px; padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; }
.profit-hero.neg { background: var(--red-bg); border-color: #fecaca; }
.profit-hero b { font-size: 20px; }
.quick-add { position: relative; }
.quick-add .results { position: absolute; left: 0; right: 0; top: 100%; margin-top: 6px; background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); z-index: 25; max-height: 320px; overflow-y: auto; }
.quick-add .results:empty { display: none; }
.qa-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; cursor: pointer; border-bottom: 1px solid var(--border); }
.qa-row:last-child { border-bottom: 0; }
.qa-row:hover { background: var(--purple-50); }
.qa-row .t { font-size: 13px; font-weight: 600; flex: 1; }
.qa-row .p { font-size: 12.5px; color: var(--muted); white-space: nowrap; }

/* ------------------------------------------------------------------
   Timeline / order detail
   ------------------------------------------------------------------ */
.timeline { list-style: none; margin: 0; padding: 0 0 0 4px; position: relative; }
.timeline::before { content: ''; position: absolute; left: 11px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.timeline li { position: relative; padding: 0 0 16px 30px; font-size: 13.5px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline .tdot { position: absolute; left: 4px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid var(--purple); }
.timeline .tdot.gray { border-color: var(--border-2); }
.timeline .tdot.green { border-color: var(--green); }
.timeline .tdot.red { border-color: var(--red); }
.timeline .tt { font-weight: 600; }
.timeline .tm { color: var(--muted); font-size: 12px; }
.steps { display: flex; gap: 6px; }
.steps .step { flex: 1; height: 6px; border-radius: 3px; background: var(--border); }
.steps .step.done { background: var(--purple); }
.steps .step.bad { background: var(--red); }
.status-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.order-items .oi { display: grid; grid-template-columns: 48px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.order-items .oi:last-child { border-bottom: 0; }
.order-items .oi img { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; border: 1px solid var(--border); }
.order-items .oi .t { font-weight: 600; font-size: 13.5px; }
.order-items .oi .m { font-size: 12px; color: var(--muted); }
.order-items .oi .amt { text-align: right; font-weight: 700; white-space: nowrap; }
.order-items .oi .amt small { display: block; font-weight: 500; color: var(--muted); }
.money-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.money-grid > div { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.money-grid .l { font-size: 11.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.money-grid .v { font-size: 17px; font-weight: 800; margin-top: 2px; }
.money-grid .v.green { color: var(--green-ink); }
.money-grid .v.red { color: var(--red); }

/* ------------------------------------------------------------------
   Modals / dropdown
   ------------------------------------------------------------------ */
.modal-root:empty { display: none; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(20,16,40,.55); z-index: 90; display: flex; align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(2px); animation: fade-in .15s ease; }
.modal { background: #fff; border-radius: 16px; width: 100%; max-width: 480px; box-shadow: var(--shadow-lg); animation: pop-in .18s ease; max-height: calc(100vh - 40px); display: flex; flex-direction: column; }
.modal.lg { max-width: 760px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-head h3 { margin: 0; }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.dropdown { position: relative; display: inline-block; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); min-width: 200px; padding: 6px; z-index: 50; display: none; }
.dropdown.open .dropdown-menu { display: block; }
.dropdown-menu a, .dropdown-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: 8px; border: 0; background: transparent; font: inherit; font-size: 13.5px; color: var(--text); cursor: pointer; text-align: left; }
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--purple-50); color: var(--purple-700); }
.dropdown-menu .sep { height: 1px; background: var(--border); margin: 6px 0; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 10px 14px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.tabs a.active { color: var(--purple-700); border-color: var(--purple); }
.tabs a .pill { margin-left: 2px; }

/* ------------------------------------------------------------------
   Auth pages
   ------------------------------------------------------------------ */
.bare-body { background: var(--bg); }
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.auth-side { background: var(--side-bg); color: #fff; position: relative; overflow: hidden; display: flex; align-items: center; }
.auth-side::before { content: ''; position: absolute; inset: 0; background: radial-gradient(700px 500px at 20% 10%, rgba(var(--purple-rgb), .55), transparent 60%), radial-gradient(500px 400px at 100% 100%, rgba(167,139,250,.35), transparent 60%); }
.auth-side-inner { position: relative; padding: 48px 56px; max-width: 640px; }
.auth-hero { font-size: clamp(28px, 3.4vw, 42px); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; margin: 28px 0 14px; }
.auth-hero em { font-style: normal; background: linear-gradient(90deg, #c4b5fd, #f0abfc); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-lede { color: rgba(255,255,255,.75); font-size: 15px; max-width: 480px; }
.auth-mosaic { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin: 26px 0; }
.mosaic-tile { aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: #fff; box-shadow: 0 10px 30px -12px rgba(0,0,0,.6); animation: rise .5s ease both; animation-delay: var(--d); }
.mosaic-tile img { width: 100%; height: 100%; object-fit: cover; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.auth-stats { display: flex; gap: 28px; flex-wrap: wrap; }
.auth-stats b { display: block; font-size: 18px; font-weight: 800; }
.auth-stats span { font-size: 12.5px; color: rgba(255,255,255,.65); }
.auth-main { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-card { background: #fff; border: 1px solid var(--border); border-radius: 20px; padding: 32px; width: 100%; max-width: 420px; box-shadow: var(--shadow-lg); }
.auth-card-wide { max-width: 560px; }
.auth-card h2 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.auth-card .form { margin-top: 18px; }
.auth-alt { margin: 18px 0 0; text-align: center; font-size: 13.5px; color: var(--muted); }
.auth-foot { margin-top: 20px; font-size: 12.5px; }
.setup-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--purple-100); color: var(--purple-700); font-weight: 700; font-size: 12px; padding: 4px 10px; border-radius: 999px; margin-bottom: 12px; }
.big-icon { width: 68px; height: 68px; border-radius: 20px; background: var(--purple-100); color: var(--purple); display: grid; place-items: center; margin: 0 auto 14px; }
.error-page { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px 20px; }
.error-code { font-size: 90px; font-weight: 800; letter-spacing: -.05em; line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ------------------------------------------------------------------
   Dashboard bits
   ------------------------------------------------------------------ */
.quick-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.quick-link { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); font-weight: 600; color: var(--text); transition: transform .15s, box-shadow .15s; }
.quick-link:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); color: var(--purple-700); }
.quick-link .ic { color: var(--purple); }
.mini-list { display: flex; flex-direction: column; }
.mini-list > a, .mini-list > div { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); color: inherit; }
.mini-list > *:last-child { border-bottom: 0; }
.mini-list .t { font-weight: 600; font-size: 13.5px; }
.mini-list .m { font-size: 12px; color: var(--muted); }
.mini-list .r { margin-left: auto; text-align: right; white-space: nowrap; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 120px; }
.bars .bar { flex: 1; background: var(--purple-100); border-radius: 6px 6px 2px 2px; position: relative; min-height: 3px; transition: background .15s; }
.bars .bar:hover { background: var(--purple); }
.bars .bar span { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); font-size: 10.5px; color: var(--muted); margin-bottom: 3px; white-space: nowrap; }
.bars .bar.today { background: var(--purple); }
.bar-labels { display: flex; gap: 6px; margin-top: 6px; }
.bar-labels span { flex: 1; text-align: center; font-size: 10.5px; color: var(--muted-2); }
.progress { height: 8px; background: var(--gray-bg); border-radius: 4px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--grad); border-radius: 4px; }
.welcome { background: var(--side-bg); color: #fff; border-radius: var(--radius); padding: 22px 24px; position: relative; overflow: hidden; margin-bottom: 20px; }
.welcome::after { content: ''; position: absolute; inset: 0; background: radial-gradient(500px 220px at 100% 0%, rgba(var(--purple-rgb), .6), transparent 65%); }
.welcome > * { position: relative; }
.welcome h2 { color: #fff; font-size: 22px; }
.welcome p { color: rgba(255,255,255,.75); max-width: 560px; margin: 0; }
.welcome .btn { margin-top: 14px; }

/* ------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------ */
@media (max-width: 1100px) {
  .split, .split-wide { grid-template-columns: 1fr; }
  .sticky { position: static; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  :root { --topbar-h: 56px; }
  .sidebar { transform: translateX(-100%); box-shadow: none; }
  body.sidebar-open .sidebar { transform: none; box-shadow: var(--shadow-lg); }
  body.sidebar-open .sidebar-backdrop { display: block; }
  .main { margin-left: 0; }
  .menu-btn { display: inline-grid; }
  .topbar { padding: 0 14px; }
  .content { padding: 16px 14px 96px; }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; background: rgba(255,255,255,.94); backdrop-filter: blur(12px); border-top: 1px solid var(--border); z-index: 38; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar .tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10.5px; font-weight: 600; color: var(--muted); padding: 4px 0; }
  .tabbar .tab.active { color: var(--purple-700); }
  .tabbar .tab-ic { position: relative; }
  .tabbar .tab-ic .nav-badge { position: absolute; top: -6px; right: -12px; height: 17px; min-width: 17px; font-size: 10px; }
  .cartbar { bottom: 74px; }
  .ob-mobilebar { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: fixed; left: 10px; right: 10px; bottom: 74px; background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 8px 14px; box-shadow: var(--shadow-lg); z-index: 35; }
  .ob-mobilebar b { font-size: 16px; }
  .toasts { bottom: 80px; right: 12px; left: 12px; }
  .toast { max-width: none; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .auth-main { padding: 28px 16px; justify-content: flex-start; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .money-grid { grid-template-columns: 1fr; }
  .stat .stat-value { font-size: 22px; }
}
@media (max-width: 600px) {
  .hide-sm { display: none; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .radio-cards { grid-template-columns: 1fr; }
  .card-body { padding: 16px; }
  .card-head { padding: 14px 16px; }
  .auth-card { padding: 24px 20px; }
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .pcard-body { padding: 10px 10px 12px; }
  .pcard .cost { font-size: 15px; }
  .page-head h1 { font-size: 22px; }
  .filters .input, .filters select, .filters input { min-width: 0; flex: 1; }
  .page-actions { width: 100%; }
  .page-actions .search-box { flex: 1 1 100%; }
  .page-actions .search-box input { width: 100%; }
  .page-actions .input, .page-actions select { flex: 1; }
  .table th, .table td { padding: 10px 10px; }
  .ob-item { grid-template-columns: 48px 1fr; }
  .ob-item img { width: 48px; height: 48px; }
  .modal { border-radius: 16px 16px 0 0; align-self: flex-end; max-height: 92vh; }
  .modal-backdrop { padding: 0; align-items: flex-end; }
  .stat { padding: 14px 16px; }
}
@media print {
  .sidebar, .topbar, .tabbar, .toasts, .cartbar, .bulkbar, .no-print { display: none !important; }
  .main { margin: 0; }
  .content { padding: 0; max-width: none; }
  body { background: #fff; }
}
