/* =====================================================================
   Tawakal Rewards — design system
   Restrained, information-dense commercial UI. Navy structure, gold accent
   used sparingly (brand mark, primary emphasis, tier/VIP moments).
   ===================================================================== */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/inter-400.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/inter-500.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/inter-600.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/inter-700.woff2") format("woff2"); }

:root {
  --navy: #172B46;
  --navy-2: #1F3756;
  --navy-3: #2A4467;
  --gold: #C5A46D;
  --gold-soft: #F4EDE1;
  --bg: #F7F8FA;
  --surface: #FFFFFF;
  --surface-2: #FBFBFC;
  --text: #172033;
  --text-2: #687386;
  --text-3: #98A1B1;
  --border: #E7EAF0;
  --border-strong: #D6DBE4;
  --success: #16865B;
  --success-soft: #E7F4EE;
  --warning: #D99A35;
  --warning-soft: #FBF2E3;
  --danger: #D94F4F;
  --danger-soft: #FBEAEA;
  --info: #2F6FB3;
  --info-soft: #E8F0F9;
  --radius: 8px;
  --radius-sm: 6px;
  --radius-lg: 12px;
  --shadow-1: 0 1px 2px rgba(23, 32, 51, .05);
  --shadow-2: 0 1px 3px rgba(23, 32, 51, .06), 0 6px 16px rgba(23, 32, 51, .05);
  --focus: 0 0 0 3px rgba(23, 43, 70, .14);
  --sidebar-w: 236px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Bootstrap overrides */
  --bs-body-font-family: var(--font);
  --bs-body-font-size: 14px;
  --bs-body-color: var(--text);
  --bs-body-bg: var(--bg);
  --bs-border-color: var(--border);
  --bs-border-radius: var(--radius);
  --bs-link-color: var(--navy);
  --bs-link-color-rgb: 23, 43, 70;
  --bs-link-hover-color: var(--navy-3);
  --bs-secondary-color: var(--text-2);
  --bs-emphasis-color: var(--text);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); font-size: 14px; line-height: 1.5; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01"; }
a { text-decoration: none; }
a:hover { text-decoration: none; }
h1, h2, h3, h4, h5 { color: var(--text); letter-spacing: -0.011em; font-weight: 600; }
.text-2 { color: var(--text-2) !important; }
.text-3 { color: var(--text-3) !important; }
.mono { font-family: var(--mono); font-size: .92em; letter-spacing: 0; }
.tabular { font-variant-numeric: tabular-nums; }
.fw-550 { font-weight: 550; }
.small-caps { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); }
.hr { height: 1px; background: var(--border); margin: 16px 0; }
:focus-visible { outline: none; box-shadow: var(--focus); }

/* ---------------------------------------------------------- Buttons */
.btn { --bs-btn-font-size: 13.5px; --bs-btn-font-weight: 500; --bs-btn-padding-y: 7px; --bs-btn-padding-x: 14px; --bs-btn-border-radius: var(--radius-sm); display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; transition: background .12s, border-color .12s, color .12s, box-shadow .12s; }
.btn .bi { font-size: 1.05em; line-height: 1; }
.btn-primary { --bs-btn-bg: var(--navy); --bs-btn-border-color: var(--navy); --bs-btn-hover-bg: var(--navy-2); --bs-btn-hover-border-color: var(--navy-2); --bs-btn-active-bg: var(--navy-3); --bs-btn-active-border-color: var(--navy-3); --bs-btn-disabled-bg: var(--navy); --bs-btn-disabled-border-color: var(--navy); }
.btn-gold { --bs-btn-color: #2B2215; --bs-btn-bg: var(--gold); --bs-btn-border-color: var(--gold); --bs-btn-hover-bg: #B8955C; --bs-btn-hover-border-color: #B8955C; --bs-btn-hover-color: #1E170D; --bs-btn-active-bg: #AD8A52; }
.btn-light, .btn-outline { --bs-btn-color: var(--text); --bs-btn-bg: var(--surface); --bs-btn-border-color: var(--border-strong); --bs-btn-hover-bg: var(--surface-2); --bs-btn-hover-border-color: #C5CCD8; --bs-btn-hover-color: var(--text); --bs-btn-active-bg: #F1F3F6; --bs-btn-active-border-color: #C5CCD8; box-shadow: var(--shadow-1); }
.btn-ghost { --bs-btn-color: var(--text-2); --bs-btn-bg: transparent; --bs-btn-border-color: transparent; --bs-btn-hover-bg: #EEF0F4; --bs-btn-hover-color: var(--text); --bs-btn-active-bg: #E6E9EF; }
.btn-danger { --bs-btn-bg: var(--danger); --bs-btn-border-color: var(--danger); --bs-btn-hover-bg: #C54343; --bs-btn-hover-border-color: #C54343; }
.btn-outline-danger { --bs-btn-color: var(--danger); --bs-btn-border-color: #EDC3C3; --bs-btn-hover-bg: var(--danger-soft); --bs-btn-hover-color: #B93C3C; --bs-btn-hover-border-color: #E3A9A9; --bs-btn-bg: var(--surface); }
.btn-success { --bs-btn-bg: var(--success); --bs-btn-border-color: var(--success); --bs-btn-hover-bg: #127150; --bs-btn-hover-border-color: #127150; }
.btn-sm { --bs-btn-padding-y: 4px; --bs-btn-padding-x: 10px; --bs-btn-font-size: 12.5px; }
.btn-lg { --bs-btn-padding-y: 12px; --bs-btn-padding-x: 20px; --bs-btn-font-size: 15px; --bs-btn-border-radius: var(--radius); }
.btn-icon { width: 32px; height: 32px; padding: 0 !important; }

/* ---------------------------------------------------------- Forms */
.form-label { font-size: 13px; font-weight: 500; color: var(--text); margin-bottom: 5px; }
.form-text { font-size: 12px; color: var(--text-2); margin-top: 4px; }
.form-control, .form-select { font-size: 14px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 7px 11px; color: var(--text); background-color: var(--surface); box-shadow: var(--shadow-1); transition: border-color .12s, box-shadow .12s; }
.form-control::placeholder { color: var(--text-3); }
.form-control:focus, .form-select:focus { border-color: #8D9DB5; box-shadow: var(--focus); }
.form-control.is-invalid, .form-select.is-invalid { border-color: var(--danger); background-image: none; padding-right: 11px; }
.invalid-feedback { font-size: 12px; color: var(--danger); }
.form-check-input { border-color: var(--border-strong); }
.form-check-input:checked { background-color: var(--navy); border-color: var(--navy); }
.form-check-input:focus { box-shadow: var(--focus); border-color: #8D9DB5; }
.form-switch .form-check-input { width: 2.1em; }
.input-group-text { font-size: 13px; background: var(--surface-2); border-color: var(--border-strong); color: var(--text-2); }
.form-section { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 28px; padding: 22px 0; border-top: 1px solid var(--border); }
.form-section:first-child { border-top: 0; padding-top: 4px; }
.form-section h3 { font-size: 14px; margin: 0 0 4px; }
.form-section p { font-size: 13px; color: var(--text-2); margin: 0; }
@media (max-width: 860px) { .form-section { grid-template-columns: 1fr; gap: 12px; } }
.check-card { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; }
.check-card:hover { border-color: var(--border-strong); }
.check-card .form-check-input { margin-top: 3px; flex-shrink: 0; }
.check-card strong { display: block; font-weight: 500; font-size: 13.5px; }
.check-card span { display: block; font-size: 12px; color: var(--text-2); }

/* ---------------------------------------------------------- Panels / cards */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-1); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); min-height: 52px; }
.panel-head h2, .panel-head h3 { font-size: 14px; font-weight: 600; margin: 0; }
.panel-head .sub { font-size: 12.5px; color: var(--text-2); }
.panel-body { padding: 18px; }
.panel-foot { padding: 12px 18px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.panel + .panel { margin-top: 16px; }

/* KPI tiles: quiet, number-first */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 14px 16px; box-shadow: var(--shadow-1); }
.kpi-label { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.kpi-label .bi { color: var(--text-3); }
.kpi-value { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; margin-top: 6px; font-variant-numeric: tabular-nums; color: var(--text); line-height: 1.2; }
.kpi-sub { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.kpi.accent { border-top: 2px solid var(--gold); }

/* Definition list */
.dl { display: grid; grid-template-columns: 140px 1fr; gap: 8px 16px; margin: 0; font-size: 13.5px; }
.dl dt { color: var(--text-2); font-weight: 400; }
.dl dd { margin: 0; color: var(--text); word-break: break-word; }

/* ---------------------------------------------------------- Tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.tbl th { font-size: 12px; font-weight: 500; color: var(--text-2); text-align: left; padding: 9px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: #FAFBFC; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl .actions { text-align: right; white-space: nowrap; }
.tbl a.row-link { color: var(--text); font-weight: 500; }
.tbl a.row-link:hover { color: var(--navy-3); text-decoration: underline; text-underline-offset: 2px; }
.tbl .meta { display: block; font-size: 12px; color: var(--text-2); }
.pos { color: var(--success); font-weight: 550; }
.neg { color: var(--text); font-weight: 550; }
.neg-red { color: var(--danger); font-weight: 550; }

/* Status pills */
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; line-height: 1; padding: 4px 8px 4px 7px; border-radius: 999px; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .9; }
.pill-success { color: #0F6E4A; background: var(--success-soft); }
.pill-warning { color: #9A6510; background: var(--warning-soft); }
.pill-danger { color: #B33A3A; background: var(--danger-soft); }
.pill-info { color: #24588F; background: var(--info-soft); }
.pill-neutral { color: #4F596B; background: #EEF0F4; }
.pill-muted { color: #8792A3; background: #F2F3F6; }
.pill-gold { color: #7A5F2F; background: var(--gold-soft); }
.pill-gold::before { display: none; }
.tier-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.method { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; letter-spacing: .04em; color: var(--text-2); background: #F1F3F6; padding: 3px 6px; border-radius: 4px; }
.sim-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; color: #8A4B00; background: #FFF1D6; border: 1px dashed #E0A84A; padding: 2px 6px; border-radius: 4px; }

/* Filters bar */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.filters .form-control, .filters .form-select { width: auto; min-width: 140px; font-size: 13px; padding: 6px 10px; }
.filters .search { position: relative; flex: 1 1 220px; max-width: 320px; }
.filters .search .form-control { width: 100%; padding-left: 32px; }
.filters .search .bi { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.seg { display: inline-flex; background: #EEF0F4; border-radius: var(--radius-sm); padding: 2px; gap: 2px; }
.seg a { padding: 5px 10px; font-size: 12.5px; font-weight: 500; color: var(--text-2); border-radius: 5px; white-space: nowrap; }
.seg a.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }

/* Pagination */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--text-2); }
.pager .btn { --bs-btn-padding-y: 3px; --bs-btn-padding-x: 9px; --bs-btn-font-size: 12.5px; }

/* Tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: 9px 12px; font-size: 13.5px; font-weight: 500; color: var(--text-2); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--text); }
.tabs a.on { color: var(--text); border-bottom-color: var(--navy); }
.tabs .count { font-size: 11.5px; color: var(--text-3); margin-left: 4px; }

/* Empty state */
.empty { text-align: center; padding: 44px 20px; color: var(--text-2); }
.empty .bi { font-size: 26px; color: var(--text-3); display: block; margin-bottom: 8px; }
.empty h3 { font-size: 14.5px; margin-bottom: 4px; color: var(--text); }
.empty p { font-size: 13px; margin: 0 auto 14px; max-width: 360px; }

/* Alerts / flash */
.flash { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: var(--radius); font-size: 13.5px; border: 1px solid; margin-bottom: 14px; }
.flash .bi { font-size: 16px; line-height: 1.3; }
.flash-success { background: var(--success-soft); border-color: #BFE3D1; color: #0D5C3E; }
.flash-danger { background: var(--danger-soft); border-color: #F0C6C6; color: #962F2F; }
.flash-warning { background: var(--warning-soft); border-color: #EFD6AA; color: #7A500C; }
.flash-info { background: var(--info-soft); border-color: #C6D9EE; color: #1F4D7C; }
.notice { padding: 12px 14px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); font-size: 13px; color: var(--text-2); }
.notice strong { color: var(--text); }
.notice-gold { background: #FCFAF6; border-color: #EADFC9; }
.notice-danger { background: var(--danger-soft); border-color: #F0C6C6; color: #7E2A2A; }

/* Activity list */
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; gap: 12px; padding: 11px 18px; border-bottom: 1px solid var(--border); font-size: 13px; }
.feed li:last-child { border-bottom: 0; }
.feed .ico { width: 28px; height: 28px; border-radius: 7px; background: #F1F3F6; color: var(--text-2); display: grid; place-items: center; flex-shrink: 0; font-size: 13px; }
.feed .t { color: var(--text); }
.feed .m { color: var(--text-2); font-size: 12px; }

.avatar { width: 32px; height: 32px; border-radius: 50%; background: #E9EDF3; color: var(--navy); display: inline-grid; place-items: center; font-weight: 600; font-size: 12px; flex-shrink: 0; letter-spacing: .02em; }
.avatar-lg { width: 52px; height: 52px; font-size: 17px; }
.logo-box { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface) center/contain no-repeat; display: inline-grid; place-items: center; font-weight: 700; color: var(--navy); font-size: 13px; flex-shrink: 0; overflow: hidden; }
.logo-box img { width: 100%; height: 100%; object-fit: contain; }

.progress-thin { height: 6px; background: #EDF0F4; border-radius: 99px; overflow: hidden; }
.progress-thin > span { display: block; height: 100%; background: var(--navy); border-radius: 99px; }
.progress-thin.gold > span { background: var(--gold); }

.bar-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 8px 0; font-size: 13px; }
.bar-row .progress-thin { grid-column: 1 / -1; }

.code-box { font-family: var(--mono); font-size: 13px; background: #F4F6F9; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 10px; word-break: break-all; }

/* =====================================================================
   Admin shell (Tawakal + Business)
   ===================================================================== */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar-w); flex-shrink: 0; position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; z-index: 1030; transition: transform .2s ease; }
.sidebar .brand { display: flex; align-items: center; gap: 10px; padding: 16px 16px 14px; }
.brand-mark { width: 30px; height: 30px; border-radius: 7px; background: var(--navy); color: var(--gold); display: grid; place-items: center; font-weight: 700; font-size: 15px; flex-shrink: 0; letter-spacing: -0.02em; }
.brand-name { font-weight: 600; font-size: 14px; letter-spacing: -0.01em; line-height: 1.15; }
.brand-name small { display: block; font-size: 11.5px; font-weight: 500; opacity: .62; letter-spacing: 0; }
.nav-group { padding: 6px 10px; }
.nav-label { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding: 10px 8px 6px; opacity: .55; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 6px; font-size: 13.5px; font-weight: 500; margin-bottom: 1px; }
.nav-item .bi { font-size: 15px; width: 18px; text-align: center; opacity: .8; }
.nav-item .badge-count { margin-left: auto; font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 99px; }
.sidebar-foot { margin-top: auto; padding: 12px; }

/* Tawakal: navy sidebar */
.sidebar-dark { background: var(--navy); color: #DCE3EE; }
.sidebar-dark .brand-mark { background: rgba(255,255,255,.08); border: 1px solid rgba(197,164,109,.45); }
.sidebar-dark .brand-name { color: #fff; }
.sidebar-dark .nav-item { color: #C3CDDB; }
.sidebar-dark .nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar-dark .nav-item.on { background: rgba(255,255,255,.1); color: #fff; box-shadow: inset 2px 0 0 var(--gold); }
.sidebar-dark .nav-item .badge-count { background: rgba(197,164,109,.2); color: #E8D4AE; }
.sidebar-dark .sidebar-foot { border-top: 1px solid rgba(255,255,255,.08); }

/* Business: light sidebar */
.sidebar-light { background: var(--surface); border-right: 1px solid var(--border); color: var(--text); }
.sidebar-light .nav-item { color: #4A5568; }
.sidebar-light .nav-item:hover { background: #F2F4F7; color: var(--text); }
.sidebar-light .nav-item.on { background: #EDF1F6; color: var(--navy); }
.sidebar-light .nav-item.on .bi { opacity: 1; }
.sidebar-light .nav-item .badge-count { background: #EEF0F4; color: var(--text-2); }
.sidebar-light .sidebar-foot { border-top: 1px solid var(--border); }

.main { flex: 1; min-width: 0; margin-left: var(--sidebar-w); display: flex; flex-direction: column; }
.topbar { height: 56px; display: flex; align-items: center; gap: 12px; padding: 0 24px; background: rgba(247, 248, 250, .88); backdrop-filter: saturate(180%) blur(8px); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 1020; }
.topbar .crumbs { font-size: 13px; color: var(--text-2); display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.topbar .crumbs a { color: var(--text-2); }
.topbar .crumbs a:hover { color: var(--text); }
.topbar .crumbs strong { color: var(--text); font-weight: 500; }
.topbar .spacer { flex: 1; }
.topbar .who { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.content { padding: 24px; max-width: 1360px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 20px; margin: 0; letter-spacing: -0.015em; }
.page-head .sub { font-size: 13.5px; color: var(--text-2); margin-top: 3px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.menu-toggle { display: none; }
.scrim { display: none; }

.grid-2 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; }
.grid-2-eq { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.stack > * + * { margin-top: 16px; }
.chart-box { position: relative; height: 240px; }

@media (max-width: 1100px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-2); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(15, 23, 36, .35); z-index: 1025; }
  .main { margin-left: 0; }
  .menu-toggle { display: inline-flex; }
  .content { padding: 16px; }
  .topbar { padding: 0 12px; }
  .grid-2-eq { grid-template-columns: 1fr; }
  .dl { grid-template-columns: 110px 1fr; }
}

/* =====================================================================
   Auth
   ===================================================================== */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth-side { background: var(--navy); color: #D6DEEA; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-side::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 380px; height: 380px; border-radius: 50%; border: 1px solid rgba(197,164,109,.25); }
.auth-side::before { content: ""; position: absolute; right: -40px; bottom: -40px; width: 220px; height: 220px; border-radius: 50%; border: 1px solid rgba(197,164,109,.18); }
.auth-side h2 { color: #fff; font-size: 26px; font-weight: 600; letter-spacing: -0.02em; max-width: 420px; line-height: 1.25; }
.auth-side p { max-width: 420px; color: #AEBBCF; }
.auth-side .points { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; max-width: 420px; }
.auth-side .points li { display: flex; gap: 10px; font-size: 13.5px; }
.auth-side .points .bi { color: var(--gold); }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 32px 20px; }
.auth-card { width: 100%; max-width: 380px; }
.auth-card h1 { font-size: 22px; margin-bottom: 4px; }
.auth-card .lead { color: var(--text-2); font-size: 14px; margin-bottom: 24px; }
.portal-list { display: grid; gap: 10px; }
.portal-link { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius-lg); color: var(--text); box-shadow: var(--shadow-1); }
.portal-link:hover { border-color: var(--border-strong); background: var(--surface-2); color: var(--text); }
.portal-link .ico { width: 36px; height: 36px; border-radius: 8px; background: #EEF1F6; color: var(--navy); display: grid; place-items: center; font-size: 17px; }
.portal-link strong { display: block; font-weight: 600; font-size: 14px; }
.portal-link span { font-size: 12.5px; color: var(--text-2); }
.portal-link .bi-chevron-right { margin-left: auto; color: var(--text-3); }
@media (max-width: 860px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { display: none; }
}

/* =====================================================================
   Mobile app shell (Staff + Customer)
   ===================================================================== */
.app { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; max-width: 560px; margin: 0 auto; background: var(--bg); position: relative; }
@media (min-width: 600px) { body.app-body { background: #ECEFF3; } .app { box-shadow: 0 0 0 1px var(--border); } }
.app-top { position: sticky; top: 0; z-index: 50; background: var(--navy); color: #fff; padding: calc(env(safe-area-inset-top) + 10px) 16px 12px; display: flex; align-items: center; gap: 12px; }
.app-top .back { color: #fff; width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; margin-left: -8px; font-size: 20px; }
.app-top .back:active { background: rgba(255,255,255,.1); }
.app-top .ttl { font-weight: 600; font-size: 16px; line-height: 1.2; min-width: 0; }
.app-top .ttl small { display: block; font-weight: 500; font-size: 12px; color: #AFC0D6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-top .right { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.branch-chip { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.14); color: #fff; font-size: 12px; font-weight: 500; padding: 5px 10px; border-radius: 99px; max-width: 170px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.branch-chip .bi { color: var(--gold); }
.app-main { flex: 1; padding: 16px 16px calc(84px + env(safe-area-inset-bottom)); }
.app-main.no-nav { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
.bottom-nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 560px; background: var(--surface); border-top: 1px solid var(--border); display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); z-index: 60; }
.bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; color: var(--text-3); font-size: 11px; font-weight: 500; border-radius: 8px; min-height: 48px; justify-content: center; position: relative; }
.bottom-nav a .bi { font-size: 21px; line-height: 1; }
.bottom-nav a.on { color: var(--navy); }
.bottom-nav a.on::before { content: ""; position: absolute; top: -7px; width: 22px; height: 2px; background: var(--gold); border-radius: 2px; }
.bottom-nav a .dot { position: absolute; top: 4px; right: calc(50% - 16px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: var(--danger); color: #fff; font-size: 10px; font-weight: 600; display: grid; place-items: center; }
.bottom-nav a.primary-tab .bi { width: 46px; height: 46px; display: grid; place-items: center; background: var(--navy); color: var(--gold); border-radius: 14px; font-size: 22px; margin-top: -18px; box-shadow: 0 4px 12px rgba(23,43,70,.25); }
.bottom-nav a.primary-tab { color: var(--text-2); }

.sect-title { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--text-2); margin: 20px 2px 10px; display: flex; justify-content: space-between; align-items: center; }
.sect-title a { text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 13px; }
.m-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-1); }
.m-card + .m-card { margin-top: 12px; }
.m-pad { padding: 16px; }
.m-list { list-style: none; margin: 0; padding: 0; }
.m-list > li, .m-list > a { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--border); color: var(--text); min-height: 56px; }
.m-list > li:last-child, .m-list > a:last-child { border-bottom: 0; }
.m-list .grow { flex: 1; min-width: 0; }
.m-list .t1 { font-weight: 500; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-list .t2 { font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-list .amt { font-weight: 600; font-variant-numeric: tabular-nums; font-size: 14px; text-align: right; white-space: nowrap; }
.m-list .chev { color: var(--text-3); }
.tx-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-size: 16px; flex-shrink: 0; }
.tx-ico.earned, .tx-ico.bonus, .tx-ico.referral { background: var(--success-soft); color: var(--success); }
.tx-ico.redeemed { background: var(--info-soft); color: var(--info); }
.tx-ico.expired, .tx-ico.reversed { background: var(--danger-soft); color: var(--danger); }
.tx-ico.adjusted { background: #EEF0F4; color: var(--text-2); }

/* Staff home: action grid */
.today { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.today div { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; }
.today b { display: block; font-size: 19px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.today span { font-size: 11.5px; color: var(--text-2); }
.actions-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.action-btn { display: flex; flex-direction: column; justify-content: space-between; gap: 18px; min-height: 118px; padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); color: var(--text); box-shadow: var(--shadow-1); position: relative; -webkit-tap-highlight-color: transparent; transition: transform .08s; }
.action-btn:active { transform: scale(.98); background: var(--surface-2); }
.action-btn .bi { font-size: 26px; color: var(--navy); }
.action-btn strong { font-size: 15.5px; font-weight: 600; display: block; letter-spacing: -0.01em; }
.action-btn small { font-size: 12px; color: var(--text-2); }
.action-btn.hero { background: var(--navy); border-color: var(--navy); color: #fff; }
.action-btn.hero .bi { color: var(--gold); }
.action-btn.hero small { color: #AFC0D6; }
.action-btn.disabled { opacity: .55; pointer-events: none; }
.action-btn .tag { position: absolute; top: 12px; right: 12px; font-size: 10.5px; font-weight: 600; padding: 2px 7px; border-radius: 99px; background: #EEF0F4; color: var(--text-2); }
.action-btn.hero .tag { background: rgba(255,255,255,.12); color: #DCE3EE; }
.action-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; color: var(--text); margin-top: 10px; min-height: 60px; }
.action-row .bi:first-child { font-size: 20px; color: var(--navy); }
.action-row strong { font-weight: 600; font-size: 14.5px; }
.action-row .chev { margin-left: auto; color: var(--text-3); }

/* Current customer strip (staff) */
.cust-strip { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: #FCFAF6; border: 1px solid #EADFC9; color: var(--text); }
.cust-strip .grow { flex: 1; min-width: 0; }
.cust-strip .t1 { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cust-strip .t2 { font-size: 12.5px; color: var(--text-2); }

/* Customer hero (staff profile) */
.cust-hero { background: var(--navy); color: #fff; border-radius: 16px; padding: 18px; position: relative; overflow: hidden; }
.cust-hero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 180px; height: 180px; border-radius: 50%; border: 1px solid rgba(197,164,109,.3); }
.cust-hero .name { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.cust-hero .mid { font-family: var(--mono); font-size: 12.5px; color: #AFC0D6; }
.cust-hero .bal { font-size: 34px; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.cust-hero .bal small { font-size: 13px; font-weight: 500; color: #AFC0D6; letter-spacing: 0; margin-left: 4px; }
.cust-hero .via { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; letter-spacing: .03em; background: rgba(255,255,255,.1); padding: 4px 8px; border-radius: 6px; }
.tier-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 4px 9px; border-radius: 99px; background: rgba(197,164,109,.18); color: #EBD6AF; border: 1px solid rgba(197,164,109,.35); }

/* Big inputs for counter use */
.amount-input { font-size: 34px; font-weight: 600; letter-spacing: -0.02em; text-align: center; padding: 14px; border-radius: 14px; font-variant-numeric: tabular-nums; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.keypad button { height: 56px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); font-size: 21px; font-weight: 500; color: var(--text); -webkit-tap-highlight-color: transparent; }
.keypad button:active { background: #EEF0F4; }
.calc { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; font-size: 14px; border-bottom: 1px dashed var(--border); }
.calc:last-child { border-bottom: 0; }
.calc b { font-variant-numeric: tabular-nums; }
.calc.total { font-size: 16px; font-weight: 600; }
.calc.total b { font-size: 22px; color: var(--success); }
.sticky-cta { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(66px + env(safe-area-inset-bottom)); width: 100%; max-width: 560px; padding: 10px 16px; background: linear-gradient(to top, var(--bg) 70%, rgba(247,248,250,0)); z-index: 55; }
.sticky-cta .btn { width: 100%; min-height: 52px; font-size: 16px; font-weight: 600; border-radius: 14px; }

/* Reward selection (staff) */
.reward-opt { display: flex; gap: 12px; align-items: center; padding: 14px; border: 1.5px solid var(--border); border-radius: 14px; background: var(--surface); cursor: pointer; margin-bottom: 10px; -webkit-tap-highlight-color: transparent; }
.reward-opt.sel { border-color: var(--navy); box-shadow: var(--focus); }
.reward-opt.dim { opacity: .55; cursor: not-allowed; }
.reward-opt .pts { margin-left: auto; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.reward-opt .pts small { display: block; font-size: 11px; font-weight: 500; color: var(--text-2); }
.reward-thumb { width: 48px; height: 48px; border-radius: 10px; background: #F1F3F6 center/cover; display: grid; place-items: center; color: var(--text-3); font-size: 20px; flex-shrink: 0; }

/* Scanner */
.scanner { position: relative; border-radius: 18px; overflow: hidden; background: #0E1A2B; aspect-ratio: 1 / 1; }
.scanner #qr-reader { width: 100%; height: 100%; }
.scanner #qr-reader video { object-fit: cover; width: 100% !important; height: 100% !important; }
.scanner #qr-reader img, .scanner #qr-reader__dashboard_section_csr span { display: none !important; }
.scanner .frame { position: absolute; inset: 16%; border-radius: 18px; box-shadow: 0 0 0 999px rgba(14, 26, 43, .45); pointer-events: none; }
.scanner .frame i { position: absolute; width: 34px; height: 34px; border-color: var(--gold); border-style: solid; }
.scanner .frame i:nth-child(1) { top: -2px; left: -2px; border-width: 3px 0 0 3px; border-top-left-radius: 16px; }
.scanner .frame i:nth-child(2) { top: -2px; right: -2px; border-width: 3px 3px 0 0; border-top-right-radius: 16px; }
.scanner .frame i:nth-child(3) { bottom: -2px; left: -2px; border-width: 0 0 3px 3px; border-bottom-left-radius: 16px; }
.scanner .frame i:nth-child(4) { bottom: -2px; right: -2px; border-width: 0 3px 3px 0; border-bottom-right-radius: 16px; }
.scanner .scan-line { position: absolute; left: 18%; right: 18%; height: 2px; background: linear-gradient(90deg, transparent, var(--gold), transparent); top: 20%; animation: scanline 2.2s ease-in-out infinite; pointer-events: none; }
@keyframes scanline { 0%, 100% { top: 20%; } 50% { top: 78%; } }
.scanner .state { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: #DCE3EE; padding: 24px; font-size: 14px; }
.scanner .state .bi { font-size: 34px; display: block; margin-bottom: 8px; color: var(--gold); }

/* NFC reader */
.nfc-stage { text-align: center; padding: 26px 16px 22px; }
.nfc-ring { width: 170px; height: 170px; border-radius: 50%; margin: 6px auto 20px; position: relative; display: grid; place-items: center; background: #EEF2F7; }
.nfc-ring .core { width: 104px; height: 104px; border-radius: 50%; background: var(--navy); color: var(--gold); display: grid; place-items: center; font-size: 42px; position: relative; z-index: 2; box-shadow: 0 8px 22px rgba(23,43,70,.28); }
.nfc-ring::before, .nfc-ring::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(23,43,70,.25); opacity: 0; }
.nfc-stage.listening .nfc-ring::before { animation: ripple 2s ease-out infinite; }
.nfc-stage.listening .nfc-ring::after { animation: ripple 2s ease-out 1s infinite; }
@keyframes ripple { 0% { transform: scale(.62); opacity: .9; } 100% { transform: scale(1.18); opacity: 0; } }
.nfc-stage.success .nfc-ring .core { background: var(--success); color: #fff; }
.nfc-stage.error .nfc-ring .core { background: var(--danger); color: #fff; }
.nfc-stage h2 { font-size: 18px; margin-bottom: 6px; }
.nfc-stage p { color: var(--text-2); font-size: 14px; margin: 0 auto; max-width: 320px; }
.steps { list-style: none; padding: 0; margin: 0; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding: 9px 0 9px 34px; font-size: 13.5px; color: var(--text); }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 8px; width: 22px; height: 22px; border-radius: 50%; background: #EEF1F6; color: var(--navy); font-size: 12px; font-weight: 600; display: grid; place-items: center; flex-shrink: 0; }

.simulator { border: 1.5px dashed #E0A84A; background: #FFFBF2; border-radius: 14px; padding: 14px; }
.simulator h3 { font-size: 13px; color: #8A4B00; display: flex; align-items: center; gap: 6px; margin: 0 0 4px; }
.simulator p { font-size: 12px; color: #8A6A3C; margin: 0 0 10px; }
.simulator .sim-card { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 9px 10px; border: 1px solid #F0D9B0; background: #fff; border-radius: 10px; margin-bottom: 6px; font-size: 12.5px; }
.simulator .sim-card .mono { font-size: 12px; }
.simulator .sim-card small { display: block; color: var(--text-2); font-size: 11.5px; }

/* Result overlay */
.result { text-align: center; padding: 28px 12px 10px; }
.result .badge-ico { width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 14px; display: grid; place-items: center; font-size: 34px; background: var(--success-soft); color: var(--success); }
.result.err .badge-ico { background: var(--danger-soft); color: var(--danger); }
.result h2 { font-size: 20px; margin-bottom: 4px; }
.result .big { font-size: 42px; font-weight: 700; letter-spacing: -0.03em; color: var(--success); font-variant-numeric: tabular-nums; }
.receipt { margin-top: 14px; text-align: left; }

/* =====================================================================
   Customer wallet
   ===================================================================== */
.wallet-top { background: var(--bg); color: var(--text); padding: calc(env(safe-area-inset-top) + 14px) 16px 4px; display: flex; align-items: center; gap: 10px; }
.wallet-top .logo-box { width: 34px; height: 34px; }
.wallet-top .biz { font-weight: 600; font-size: 15px; line-height: 1.15; }
.wallet-top .biz small { display: block; font-size: 12px; color: var(--text-2); font-weight: 500; }
.wallet-top .right { margin-left: auto; }
.wallet-top .icon-btn { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: var(--text); font-size: 19px; position: relative; }
.wallet-top .icon-btn .dot { position: absolute; top: 6px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); border: 2px solid var(--bg); }

.member-card { position: relative; border-radius: 18px; padding: 20px 20px 18px; color: #fff; background: var(--navy); overflow: hidden; aspect-ratio: 1.586 / 1; display: flex; flex-direction: column; justify-content: space-between; box-shadow: 0 10px 28px rgba(23, 43, 70, .28), 0 2px 6px rgba(23, 43, 70, .2); isolation: isolate; }
.member-card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 90% at 100% 0%, rgba(197,164,109,.24), transparent 55%), radial-gradient(80% 60% at 0% 100%, rgba(255,255,255,.05), transparent 60%); z-index: -1; }
.member-card::after { content: ""; position: absolute; right: -70px; bottom: -90px; width: 240px; height: 240px; border-radius: 50%; border: 1px solid rgba(197,164,109,.28); z-index: -1; }
.member-card .row1 { display: flex; align-items: center; gap: 10px; }
.member-card .row1 .logo-box { width: 34px; height: 34px; border-color: rgba(255,255,255,.18); background-color: #fff; }
.member-card .bn { font-weight: 600; font-size: 15px; letter-spacing: -0.01em; line-height: 1.15; }
.member-card .bn small { display: block; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); font-weight: 600; margin-top: 2px; }
.member-card .chip { margin-left: auto; width: 34px; height: 26px; border-radius: 5px; background: linear-gradient(135deg, #E3CB9C, #B8955C); opacity: .9; position: relative; }
.member-card .chip::before { content: ""; position: absolute; inset: 6px 9px; border: 1px solid rgba(60, 44, 18, .35); border-radius: 2px; }
.member-card .bal-label { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #AFC0D6; }
.member-card .bal { font-size: 36px; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.05; }
.member-card .bal small { font-size: 14px; font-weight: 500; color: #AFC0D6; letter-spacing: 0; margin-left: 4px; }
.member-card .row3 { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
.member-card .holder { font-size: 14px; font-weight: 500; letter-spacing: .01em; }
.member-card .mno { font-family: var(--mono); font-size: 12px; color: #AFC0D6; letter-spacing: .06em; }

.qr-panel { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 18px; text-align: center; margin-top: 14px; box-shadow: var(--shadow-1); }
.qr-panel .qr { width: 216px; height: 216px; margin: 6px auto 10px; padding: 10px; background: #fff; border-radius: 12px; border: 1px solid var(--border); }
.qr-panel .qr svg, .qr-panel .qr img { width: 100%; height: 100%; display: block; }
.qr-panel .hint { font-size: 13px; color: var(--text-2); }
.qr-full { position: fixed; inset: 0; background: #fff; z-index: 2000; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; }
.qr-full .qr { width: min(80vw, 360px); height: min(80vw, 360px); }
.qr-full .qr svg { width: 100%; height: 100%; }

.tier-progress { padding: 14px 16px; }
.tier-progress .labels { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--text-2); margin-bottom: 8px; }
.tier-progress .labels b { color: var(--text); font-weight: 600; }

.rewards-scroll { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 2px 16px 6px; scrollbar-width: none; }
.rewards-scroll::-webkit-scrollbar { display: none; }
.r-card { flex: 0 0 78%; max-width: 280px; scroll-snap-align: start; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-1); display: flex; flex-direction: column; }
.r-img { height: 118px; background: #EEF1F6 center/cover; display: grid; place-items: center; color: #9AA6B8; font-size: 30px; position: relative; }
.r-img .val { position: absolute; left: 10px; bottom: 10px; background: rgba(23,43,70,.92); color: #fff; font-size: 11.5px; font-weight: 600; padding: 4px 8px; border-radius: 6px; }
.r-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.r-body h3 { font-size: 14.5px; margin: 0; font-weight: 600; }
.r-body p { font-size: 12.5px; color: var(--text-2); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.r-meta { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 10px; gap: 8px; }
.r-pts { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 15px; }
.r-pts small { font-size: 11.5px; font-weight: 500; color: var(--text-2); }
.r-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 420px) { .r-grid { grid-template-columns: 1fr 1fr; } .r-grid .r-img { height: 104px; } }
.r-card.locked .r-img { filter: grayscale(.6); opacity: .75; }

.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips a { white-space: nowrap; padding: 7px 12px; border-radius: 99px; border: 1px solid var(--border); background: var(--surface); font-size: 13px; font-weight: 500; color: var(--text-2); }
.chips a.on { background: var(--navy); color: #fff; border-color: var(--navy); }

.nfc-card-row { display: flex; gap: 12px; align-items: center; }
.mini-card { width: 56px; height: 36px; border-radius: 6px; background: var(--navy); position: relative; flex-shrink: 0; }
.mini-card::after { content: ""; position: absolute; left: 7px; top: 9px; width: 11px; height: 9px; border-radius: 2px; background: var(--gold); opacity: .85; }
.mini-card.off { background: #B8C0CC; }
.mini-card.off::after { background: #E5E8ED; }

/* Utilities */
.gap-2x { gap: 8px; }
.w-100m { width: 100%; }
@media (max-width: 575px) { .w-100m-sm { width: 100%; } }
.min-0 { min-width: 0; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hide-sm { }
@media (max-width: 640px) { .hide-sm { display: none !important; } }
.swal2-popup { font-family: var(--font) !important; border-radius: 14px !important; font-size: 14px !important; }
.swal2-title { font-size: 18px !important; font-weight: 600 !important; color: var(--text) !important; }
.swal2-html-container { font-size: 14px !important; color: var(--text-2) !important; }
.swal2-styled.swal2-confirm { background: var(--navy) !important; border-radius: 8px !important; font-weight: 500 !important; }
.swal2-styled.swal2-cancel { background: #EEF0F4 !important; color: var(--text) !important; border-radius: 8px !important; font-weight: 500 !important; }
.swal2-styled.swal2-deny { background: var(--danger) !important; border-radius: 8px !important; }
.swal2-input, .swal2-textarea { font-size: 14px !important; border-radius: 8px !important; }
.swal2-toast { box-shadow: var(--shadow-2) !important; }

.logo-box.logo-lg { width: 52px; height: 52px; border-radius: 12px; font-size: 17px; }
.customer-auth-logo .logo-box { width: 56px; height: 56px; }
:is(.grid-2, .grid-2-eq, .grid-3) > .panel { margin-top: 0; }
@media (max-width: 600px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .kpi { padding: 12px; }
  .kpi-value { font-size: 19px; }
  .page-head .actions { width: 100%; }
}
