/* ==========================================================================
   Sports Store Inventory & POS — theme
   Bootstrap 5.3 + custom tokens. Light and dark (data-bs-theme="dark").
   ========================================================================== */

:root {
  --brand: #f97316;            /* energetic orange */
  --brand-600: #ea580c;
  --brand-700: #c2410c;
  --brand-rgb: 249, 115, 22;
  --brand-soft: rgba(249, 115, 22, .12);
  --navy: #0b1324;
  --navy-2: #121c33;
  --navy-3: #1c2945;
  --sidebar-w: 264px;
  --sidebar-w-collapsed: 76px;
  --topbar-h: 64px;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .08);
  --shadow: 0 4px 6px -1px rgba(15, 23, 42, .07), 0 2px 4px -2px rgba(15, 23, 42, .06);
  --shadow-lg: 0 20px 25px -5px rgba(15, 23, 42, .12), 0 8px 10px -6px rgba(15, 23, 42, .08);

  --bs-font-sans-serif: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bs-body-font-size: .9375rem;
  --bs-border-radius: .625rem;
  --bs-border-radius-sm: .5rem;
  --bs-border-radius-lg: .875rem;
  --bs-link-color: var(--brand-600);
  --bs-link-color-rgb: 234, 88, 12;
  --bs-link-hover-color: var(--brand-700);
  --bs-link-hover-color-rgb: 194, 65, 12;
  --bs-primary: var(--brand);
  --bs-primary-rgb: var(--brand-rgb);
  --bs-focus-ring-color: rgba(var(--brand-rgb), .3);
}

[data-bs-theme="light"] {
  --app-bg: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e5e9f2;
  --muted: #64748b;
  --bs-body-bg: var(--app-bg);
  --bs-body-color: #0f172a;
  --bs-border-color: var(--border);
  --bs-secondary-color: #64748b;
  --bs-tertiary-bg: #f1f5f9;
}

[data-bs-theme="dark"] {
  --app-bg: #0a0f1c;
  --surface: #111827;
  --surface-2: #0f1625;
  --border: #1f2a40;
  --muted: #94a3b8;
  --bs-body-bg: var(--app-bg);
  --bs-body-color: #e2e8f0;
  --bs-border-color: var(--border);
  --bs-secondary-color: #94a3b8;
  --bs-tertiary-bg: #162033;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 4px 10px rgba(0, 0, 0, .35);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, .5);
}

html, body { height: 100%; }
body {
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  background: var(--app-bg);
}
.tabular, .money, td.num, .table .num { font-variant-numeric: tabular-nums; }
.skip-link { position: absolute; left: 1rem; top: .5rem; z-index: 2000; background: var(--surface); padding: .5rem 1rem; border-radius: 8px; }
kbd { background: var(--bs-tertiary-bg); color: var(--bs-body-color); border: 1px solid var(--border); border-bottom-width: 2px; font-size: .72em; padding: .1em .4em; border-radius: 6px; font-family: inherit; font-weight: 600; }

/* ---------- Buttons ---------- */
.btn { font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; }
.btn-brand, .btn-primary {
  --bs-btn-color: #fff; --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand);
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--brand-600); --bs-btn-hover-border-color: var(--brand-600);
  --bs-btn-active-color: #fff; --bs-btn-active-bg: var(--brand-700); --bs-btn-active-border-color: var(--brand-700);
  --bs-btn-disabled-color: #fff; --bs-btn-disabled-bg: var(--brand); --bs-btn-disabled-border-color: var(--brand);
  --bs-btn-focus-shadow-rgb: var(--brand-rgb);
  box-shadow: 0 1px 2px rgba(234, 88, 12, .25), inset 0 1px 0 rgba(255, 255, 255, .15);
}
.btn-outline-brand {
  --bs-btn-color: var(--brand-600); --bs-btn-border-color: rgba(var(--brand-rgb), .45);
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--brand); --bs-btn-hover-border-color: var(--brand);
  --bs-btn-active-bg: var(--brand-600); --bs-btn-active-color: #fff;
}
.btn-light-soft { background: var(--bs-tertiary-bg); border: 1px solid var(--border); color: var(--bs-body-color); }
.btn-light-soft:hover { background: var(--surface); border-color: rgba(var(--brand-rgb), .4); color: var(--brand-600); }
.btn-icon {
  width: 38px; height: 38px; padding: 0; border-radius: 10px; color: var(--muted);
  border: 1px solid transparent; background: transparent;
}
.btn-icon:hover, .btn-icon:focus-visible { background: var(--bs-tertiary-bg); color: var(--bs-body-color); }
.btn-xl { padding: .9rem 1.25rem; font-size: 1.1rem; border-radius: 12px; }

.form-control, .form-select { border-color: var(--border); background-color: var(--surface); }
.form-control:focus, .form-select:focus { border-color: rgba(var(--brand-rgb), .6); box-shadow: 0 0 0 .2rem rgba(var(--brand-rgb), .18); }
.form-label { font-weight: 600; font-size: .85rem; margin-bottom: .35rem; }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.form-switch .form-check-input:focus { --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%28249, 115, 22, 0.5%29'/%3e%3c/svg%3e"); }
.input-group-text { background: var(--bs-tertiary-bg); border-color: var(--border); color: var(--muted); }
.invalid-feedback { font-weight: 500; }

/* ---------- Sidebar ---------- */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 1040;
  background: linear-gradient(180deg, var(--navy) 0%, #0d1730 100%);
  color: #cbd5e1; display: flex; flex-direction: column;
  border-right: 1px solid rgba(255, 255, 255, .04);
  transition: width .2s ease, transform .25s ease;
}
.sidebar-brand { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 1rem .9rem 1.1rem; }
.brand-link { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: #fff; min-width: 0; }
.brand-mark { flex: none; border-radius: 10px; box-shadow: 0 6px 16px rgba(249, 115, 22, .35); }
.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.brand-name { font-weight: 800; font-size: 1.02rem; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-sub { font-size: .72rem; color: #8ea0bd; font-weight: 500; letter-spacing: .02em; }
.sidebar .btn-icon { color: #94a3b8; }
.sidebar .btn-icon:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.sidebar-cta { padding: .25rem 1rem .75rem; }
.sidebar-cta .btn { justify-content: flex-start; padding: .65rem .9rem; }
.sidebar-cta kbd { background: rgba(0, 0, 0, .18); border-color: rgba(255, 255, 255, .2); color: #fff; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: .25rem .75rem 1rem; scrollbar-width: thin; scrollbar-color: #24324f transparent; }
.nav-section { font-size: .68rem; text-transform: uppercase; letter-spacing: .09em; font-weight: 700; color: #5f7193; padding: 1rem .65rem .4rem; white-space: nowrap; }
.sidebar .nav-link {
  display: flex; align-items: center; gap: .75rem; color: #b8c4d9; font-weight: 500; font-size: .9rem;
  padding: .58rem .7rem; border-radius: 10px; position: relative; white-space: nowrap;
}
.sidebar .nav-link i { font-size: 1rem; color: #7b8cab; transition: color .15s; }
.sidebar .nav-link:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.sidebar .nav-link:hover i { color: #fff; }
.sidebar .nav-link.active { background: linear-gradient(90deg, rgba(249, 115, 22, .22), rgba(249, 115, 22, .06)); color: #fff; font-weight: 600; }
.sidebar .nav-link.active i { color: var(--brand); }
.sidebar .nav-link.active::before { content: ""; position: absolute; left: -.75rem; top: 20%; bottom: 20%; width: 4px; border-radius: 0 4px 4px 0; background: var(--brand); }
.sidebar-footer { padding: .75rem 1rem; border-top: 1px solid rgba(255, 255, 255, .05); display: flex; justify-content: flex-end; }
.sidebar-backdrop { display: none; }

.app-main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; transition: margin-left .2s ease; }

/* collapsed (desktop) */
@media (min-width: 992px) {
  .sidebar-collapsed .sidebar { width: var(--sidebar-w-collapsed); }
  .sidebar-collapsed .app-main { margin-left: var(--sidebar-w-collapsed); }
  .sidebar-collapsed .brand-text, .sidebar-collapsed .nav-link span, .sidebar-collapsed .sidebar-cta span,
  .sidebar-collapsed .sidebar-cta kbd { display: none; }
  .sidebar-collapsed .nav-section { font-size: 0; padding: .6rem 0 .2rem; border-top: 1px solid rgba(255, 255, 255, .05); margin: .4rem .5rem 0; }
  .sidebar-collapsed .sidebar .nav-link { justify-content: center; padding: .65rem 0; }
  .sidebar-collapsed .sidebar-cta { padding: .25rem .75rem .75rem; }
  .sidebar-collapsed .sidebar-cta .btn { justify-content: center; padding: .65rem 0; }
  .sidebar-collapsed .sidebar-brand { justify-content: center; padding-left: 1rem; }
  .sidebar-collapsed .collapse-toggle i { transform: rotate(180deg); }
  .sidebar-collapsed .sidebar-footer { justify-content: center; }
}
/* mobile off-canvas */
@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  .sidebar-open .sidebar { transform: none; }
  .sidebar-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(2, 6, 23, .55); z-index: 1035; backdrop-filter: blur(2px); }
  .app-main { margin-left: 0; }
}

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 1020; height: var(--topbar-h);
  display: flex; align-items: center; gap: .75rem; padding: 0 1.5rem;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar-search { position: relative; flex: 1; max-width: 560px; display: flex; align-items: center; }
.topbar-search .form-control { padding-left: 2.6rem; padding-right: 5.2rem; height: 42px; border-radius: 12px; background: var(--bs-tertiary-bg); border-color: transparent; }
.topbar-search .form-control:focus { background: var(--surface); border-color: rgba(var(--brand-rgb), .6); }
.topbar-search .search-icon { position: absolute; left: .95rem; color: var(--muted); pointer-events: none; }
.topbar-search .search-kbd { position: absolute; right: 3rem; }
.topbar-search .btn-icon { position: absolute; right: .2rem; height: 36px; width: 36px; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: .35rem; }
.scanner-status { align-items: center; gap: .45rem; font-size: .78rem; font-weight: 600; color: #16a34a; background: rgba(22, 163, 74, .1); padding: .3rem .65rem; border-radius: 999px; white-space: nowrap; }
.scanner-status .dot { width: 8px; height: 8px; border-radius: 50%; background: #16a34a; box-shadow: 0 0 0 0 rgba(22, 163, 74, .6); animation: pulse 2s infinite; }
.scanner-status.scanned { color: var(--brand-600); background: var(--brand-soft); }
.scanner-status.scanned .dot { background: var(--brand); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, .5); } 70% { box-shadow: 0 0 0 7px rgba(22, 163, 74, 0); } 100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); } }
.user-chip { display: flex; align-items: center; gap: .6rem; padding: .25rem .5rem .25rem .25rem; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); }
.user-chip:hover { border-color: rgba(var(--brand-rgb), .4); }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .78rem; color: #fff; background: linear-gradient(135deg, #1e293b, #334155); letter-spacing: .02em; }
.user-meta { flex-direction: column; align-items: flex-start; line-height: 1.1; text-align: left; }
.user-name { font-weight: 600; font-size: .85rem; }
.user-role { font-size: .72rem; color: var(--muted); font-weight: 500; }
[data-bs-theme="light"] .theme-icon-light, [data-bs-theme="dark"] .theme-icon-dark { display: none; }

/* ---------- Content ---------- */
.app-content { padding: 1.5rem; width: 100%; max-width: 1480px; margin: 0 auto; flex: 1; }
.app-content.content-fluid { max-width: none; }
.app-content:focus { outline: none; }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.page-title { font-size: 1.55rem; font-weight: 800; letter-spacing: -.02em; margin: 0; }
.page-subtitle { color: var(--muted); margin: .25rem 0 0; }
.page-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.breadcrumb { font-size: .8rem; margin-bottom: .3rem; --bs-breadcrumb-divider-color: var(--muted); }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--brand-600); }

.card { --bs-card-bg: var(--surface); --bs-card-border-color: var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-header { background: transparent; border-bottom-color: var(--border); padding: 1rem 1.25rem; font-weight: 700; display: flex; align-items: center; gap: .6rem; }
.card-header .card-title { margin: 0; font-size: 1rem; font-weight: 700; }
.card-body { padding: 1.25rem; }
.card-footer { background: var(--surface-2); border-top-color: var(--border); }
.section-title { font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; margin-bottom: .75rem; }

/* KPI / stat tiles */
.stat-card { position: relative; overflow: hidden; padding: 1.15rem 1.25rem; height: 100%; }
.stat-card .stat-label { color: var(--muted); font-size: .82rem; font-weight: 600; display: flex; align-items: center; gap: .45rem; }
.stat-card .stat-value { font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; margin-top: .35rem; font-variant-numeric: tabular-nums; }
.stat-card .stat-foot { font-size: .8rem; color: var(--muted); margin-top: .25rem; }
.stat-icon { width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.1rem; position: absolute; right: 1.1rem; top: 1.1rem; }
.tone-brand { background: var(--brand-soft); color: var(--brand-600); }
.tone-green { background: rgba(22, 163, 74, .12); color: #16a34a; }
.tone-blue { background: rgba(37, 99, 235, .12); color: #2563eb; }
.tone-red { background: rgba(220, 38, 38, .12); color: #dc2626; }
.tone-violet { background: rgba(124, 58, 237, .12); color: #7c3aed; }
.tone-amber { background: rgba(217, 119, 6, .14); color: #d97706; }
.trend-up { color: #16a34a; font-weight: 700; }
.trend-down { color: #dc2626; font-weight: 700; }

/* Badges / status pills */
.badge { font-weight: 600; letter-spacing: .01em; }
.pill { display: inline-flex; align-items: center; gap: .35rem; font-size: .75rem; font-weight: 700; padding: .28rem .6rem; border-radius: 999px; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-success { background: rgba(22, 163, 74, .12); color: #15803d; }
.pill-warning { background: rgba(217, 119, 6, .14); color: #b45309; }
.pill-danger { background: rgba(220, 38, 38, .12); color: #b91c1c; }
.pill-info { background: rgba(37, 99, 235, .12); color: #1d4ed8; }
.pill-muted { background: var(--bs-tertiary-bg); color: var(--muted); }
.pill-brand { background: var(--brand-soft); color: var(--brand-700); }
[data-bs-theme="dark"] .pill-success { color: #4ade80; }
[data-bs-theme="dark"] .pill-warning { color: #fbbf24; }
[data-bs-theme="dark"] .pill-danger { color: #f87171; }
[data-bs-theme="dark"] .pill-info { color: #60a5fa; }
[data-bs-theme="dark"] .pill-brand { color: #fdba74; }

/* Tables */
.table { --bs-table-bg: transparent; --bs-table-hover-bg: rgba(var(--brand-rgb), .045); --bs-table-striped-bg: transparent; margin-bottom: 0; }
.table > :not(caption) > * > * { padding: .75rem .85rem; border-bottom-color: var(--border); }
.table thead th { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; background: var(--surface-2); border-bottom-width: 1px; white-space: nowrap; }
.table td { vertical-align: middle; }
.table .num, .table th.num { text-align: right; }
.table-card { padding: 0; }
.table-card .dt-container { padding: 1rem 1.25rem; }
.table-card .table-responsive > .table thead th:first-child, .table-card .table td:first-child { padding-left: 1.25rem; }
.cell-product { display: flex; align-items: center; gap: .75rem; min-width: 220px; }
.cell-product .thumb { width: 42px; height: 42px; border-radius: 10px; object-fit: cover; flex: none; background: var(--bs-tertiary-bg); display: inline-flex; align-items: center; justify-content: center; color: var(--muted); border: 1px solid var(--border); }
.cell-product .name { font-weight: 600; line-height: 1.25; }
.cell-product .meta { font-size: .78rem; color: var(--muted); }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .82em; background: var(--bs-tertiary-bg); padding: .1rem .4rem; border-radius: 6px; }
.row-actions { display: inline-flex; gap: .25rem; }
.row-actions .btn { width: 32px; height: 32px; padding: 0; border-radius: 8px; color: var(--muted); }
.row-actions .btn:hover { background: var(--bs-tertiary-bg); color: var(--brand-600); }
.row-actions .btn.text-danger:hover { color: #dc2626 !important; }

/* DataTables integration */
div.dt-container .dt-search input { border-radius: 10px; min-width: 240px; margin-left: .5rem; }
div.dt-container .dt-length select { border-radius: 10px; }
div.dt-container .dt-paging .page-link { border-radius: 8px !important; margin: 0 2px; border: 0; color: var(--bs-body-color); }
div.dt-container .dt-paging .page-item.active .page-link { background: var(--brand); color: #fff; }
div.dt-container .dt-info { color: var(--muted); font-size: .85rem; }
div.dt-processing > div:last-child > div { background: var(--brand) !important; }
table.dataTable th.dt-type-numeric, table.dataTable td.dt-type-numeric { text-align: right; }
table.dataTable > thead > tr > th:not(.dt-orderable-none) { cursor: pointer; }
.dt-toolbar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.filters-bar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; padding: 1rem 1.25rem 0; }
.filters-bar .form-select, .filters-bar .form-control { width: auto; min-width: 160px; }

/* Empty states */
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.empty-icon { width: 76px; height: 76px; margin: 0 auto; border-radius: 22px; display: flex; align-items: center; justify-content: center; font-size: 1.9rem; background: var(--brand-soft); color: var(--brand-600); }

/* Modals, dropdowns, toasts */
.modal-content { border: 0; border-radius: 18px; box-shadow: var(--shadow-lg); background: var(--surface); }
.modal-header { border-bottom-color: var(--border); padding: 1.1rem 1.4rem; }
.modal-title { font-weight: 700; display: flex; align-items: center; gap: .55rem; }
.modal-title i { color: var(--brand); }
.modal-body { padding: 1.4rem; }
.modal-footer { border-top-color: var(--border); padding: .9rem 1.4rem; }
.dropdown-menu { border-color: var(--border); border-radius: 12px; padding: .4rem; background: var(--surface); }
.dropdown-item { border-radius: 8px; padding: .5rem .75rem; font-size: .9rem; }
.dropdown-item:active { background: var(--brand); }
.toast { border: 0; border-radius: 12px; box-shadow: var(--shadow-lg); overflow: hidden; min-width: 300px; background: var(--surface); }
.toast .toast-body { display: flex; gap: .7rem; align-items: flex-start; padding: .85rem 1rem; font-weight: 500; }
.toast .toast-icon { font-size: 1.1rem; margin-top: .05rem; }
.toast.toast-success { border-left: 4px solid #16a34a; } .toast.toast-success .toast-icon { color: #16a34a; }
.toast.toast-danger { border-left: 4px solid #dc2626; } .toast.toast-danger .toast-icon { color: #dc2626; }
.toast.toast-warning { border-left: 4px solid #d97706; } .toast.toast-warning .toast-icon { color: #d97706; }
.toast.toast-info { border-left: 4px solid #2563eb; } .toast.toast-info .toast-icon { color: #2563eb; }
div:where(.swal2-container) div:where(.swal2-popup) { border-radius: 18px; font-family: var(--bs-font-sans-serif); background: var(--surface); color: var(--bs-body-color); }
div:where(.swal2-container) button:where(.swal2-styled).swal2-confirm { background: var(--brand); border-radius: 10px; font-weight: 600; }
div:where(.swal2-container) button:where(.swal2-styled).swal2-cancel { border-radius: 10px; font-weight: 600; }
.ts-wrapper.form-select .ts-control, .ts-wrapper .ts-control { border-color: var(--border); background: var(--surface); border-radius: var(--bs-border-radius); min-height: 38px; }
.ts-dropdown { border-radius: 12px; border-color: var(--border); box-shadow: var(--shadow-lg); background: var(--surface); color: var(--bs-body-color); }
.ts-dropdown .active { background: var(--brand-soft); color: inherit; }
.flatpickr-calendar { border-radius: 14px; box-shadow: var(--shadow-lg); }
.flatpickr-day.selected, .flatpickr-day.selected:hover { background: var(--brand); border-color: var(--brand); }

/* Camera scanner */
.camera-modal { overflow: hidden; }
.camera-region { width: 100%; min-height: 300px; background: #000; position: relative; }
.camera-region video { width: 100% !important; display: block; }
.camera-hint { padding: .75rem 1.25rem; font-size: .85rem; color: var(--muted); text-align: center; }

/* Form validation from App.form */
.was-validated-server .form-control.is-invalid, .form-control.is-invalid, .form-select.is-invalid { border-color: #dc2626; }

/* ---------- Auth ---------- */
.auth-body { background: var(--app-bg); }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-hero {
  position: relative; overflow: hidden; color: #fff; display: flex; align-items: center; padding: 3rem 4rem;
  background:
    radial-gradient(circle at 15% 20%, rgba(249, 115, 22, .45), transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(37, 99, 235, .35), transparent 45%),
    linear-gradient(160deg, #0b1324 0%, #111c36 60%, #0b1324 100%);
}
.auth-hero::after { /* court lines */
  content: ""; position: absolute; inset: 8%; border: 2px solid rgba(255, 255, 255, .06); border-radius: 30px;
  background: linear-gradient(90deg, transparent calc(50% - 1px), rgba(255, 255, 255, .06) calc(50% - 1px), rgba(255, 255, 255, .06) calc(50% + 1px), transparent calc(50% + 1px));
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; max-width: 480px; }
.hero-title { font-size: 2.4rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; margin-bottom: 1.75rem; }
.hero-points { list-style: none; padding: 0; margin: 0 0 2.5rem; display: grid; gap: .9rem; }
.hero-points li { display: flex; gap: .8rem; align-items: center; color: #cbd5e1; font-weight: 500; }
.hero-points i { width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .08); color: #fdba74; flex: none; }
.hero-balls { display: flex; gap: 1.1rem; font-size: 1.6rem; color: rgba(255, 255, 255, .28); }
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 2rem; background: var(--surface); }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h1 { font-size: 1.75rem; font-weight: 800; letter-spacing: -.02em; }
.auth-card .form-control { height: 48px; }
.auth-card .btn-brand { height: 48px; font-size: 1rem; }
.password-toggle { position: absolute; right: .35rem; top: 50%; transform: translateY(-50%); }
@media (max-width: 991.98px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
}

/* ---------- POS ---------- */
.pos-body { height: 100vh; overflow: hidden; display: flex; flex-direction: column; background: var(--app-bg); }
.pos-topbar { height: 58px; flex: none; display: flex; align-items: center; gap: .9rem; padding: 0 1rem; background: var(--navy); color: #e2e8f0; }
.pos-topbar .btn-icon { color: #94a3b8; }
.pos-topbar .btn-icon:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.pos-topbar .user-chip { background: transparent; border-color: rgba(255, 255, 255, .15); padding: .2rem; }
.pos-topbar .scanner-status { background: rgba(22, 163, 74, .18); color: #4ade80; }
.pos-brand { display: flex; align-items: center; gap: .6rem; color: #fff; text-decoration: none; font-weight: 800; }
.pos-brand img { border-radius: 9px; }
.pos-badge { font-size: .78rem; font-weight: 700; color: #fdba74; background: rgba(249, 115, 22, .15); padding: .3rem .7rem; border-radius: 999px; display: inline-flex; gap: .4rem; align-items: center; }
.pos-clock { font-variant-numeric: tabular-nums; color: #94a3b8; font-weight: 600; font-size: .85rem; }
.pos-main { flex: 1; min-height: 0; }

/* Print */
@media print {
  .sidebar, .topbar, .page-actions, .no-print, .toast-container { display: none !important; }
  .app-main { margin: 0 !important; }
  .app-content { padding: 0; max-width: none; }
  body { background: #fff !important; }
  .card { box-shadow: none; border: 0; }
}

/* Utilities */
.fw-800 { font-weight: 800; }
.text-brand { color: var(--brand-600) !important; }
.bg-brand-soft { background: var(--brand-soft) !important; }
.min-w-0 { min-width: 0; }
.cursor-pointer { cursor: pointer; }
.gap-xs { gap: .35rem; }
.divider-dashed { border-top: 1px dashed var(--border); }
@media (max-width: 575.98px) {
  .app-content { padding: 1rem; }
  .topbar { padding: 0 .75rem; }
  .page-title { font-size: 1.3rem; }
}

/* Catalog */
.catalog-tabs .nav-link { color: var(--muted); font-weight: 600; border-radius: 10px; display: inline-flex; align-items: center; gap: .45rem; }
.catalog-tabs .nav-link.active { background: var(--surface); color: var(--bs-body-color); box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
.catalog-tabs .nav-link.active i { color: var(--brand); }
.icon-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: .4rem; }
.icon-choice { height: 44px; border: 1px solid var(--border); border-radius: 10px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--muted); font-size: 1.1rem; transition: all .12s; }
.icon-choice:hover { border-color: rgba(var(--brand-rgb), .5); color: var(--brand-600); }
.icon-choice:has(input:checked) { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-600); }
.icon-choice:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }

/* Tom Select readable in dark mode */
[data-bs-theme="dark"] .ts-wrapper .ts-control,
[data-bs-theme="dark"] .ts-wrapper .ts-control input,
[data-bs-theme="dark"] .ts-wrapper .ts-control .item,
[data-bs-theme="dark"] .ts-dropdown .option { color: var(--bs-body-color); }
[data-bs-theme="dark"] .ts-wrapper .ts-control input::placeholder { color: var(--muted); }

/* extra status pill tones */
.pill-violet { background: rgba(124, 58, 237, .12); color: #6d28d9; }
.pill-teal { background: rgba(13, 148, 136, .12); color: #0f766e; }
[data-bs-theme="dark"] .pill-violet { color: #c4b5fd; }
[data-bs-theme="dark"] .pill-teal { color: #5eead4; }
