/* SINGHAGIRI — iPay VKYC login + CRM Soft shell (exact tokens) */

:root {
  --fx-primary: #2b6ff3;
  --fx-primary-dark: #1e56c9;
  --fx-navy: #092c4c;
  --fx-navy-mid: #0d3a5f;
  --fx-on: #092c4c;
  --fx-muted: #7e91a1;
  --fx-success: #51d277;
  --fx-success-bg: #e8f8ed;
  --fx-success-bd: #b7e4c0;
  --fx-warn: #ffc736;
  --fx-warn-bg: #fff8e6;
  --fx-warn-bd: #ffe08a;
  --fx-danger: #ff6363;
  --fx-danger-bg: #ffecec;
  --fx-danger-bd: #ffc9c9;
  --fx-border: #e5e4e5;
  --fx-ice: #e2eaf2;
  --fx-snow: #fafafa;
  --fx-surface-low: #f2f4f7;
  --fx-white: #ffffff;
  --fx-shadow: 0 1px 3px rgba(9, 44, 76, 0.08);
  --fx-shadow-card: 0 2px 12px rgba(0, 51, 102, 0.12);
  --fx-shadow-lg: 0 10px 40px rgba(9, 44, 76, 0.12);
  --nav-w: 272px;
  --top-h: 56px;
  --r-lg: 12px;
  --r-md: 8px;
  --r-sm: 6px;
  --font-display: "Plus Jakarta Sans", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Sans", system-ui, sans-serif;
  --space: 0.65rem;
  --gap: 20px;
  /* login-only (stitch-tokens) */
  --st-primary: #001629;
  --st-secondary: #005cba;
}

.material-symbols-outlined {
  font-family: "Material Symbols Outlined";
  font-weight: normal;
  font-style: normal;
  font-size: 1.25rem;
  line-height: 1;
  letter-spacing: normal;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  vertical-align: middle;
}

body {
  color: var(--fx-on);
  background: linear-gradient(165deg, var(--fx-ice) 0%, #eef2f7 45%, #f4f6f9 100%);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── Login (iPay VKYC pattern) ──────────────────────────── */
.stitch-login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 24px 56px;
  background: radial-gradient(circle at top right, var(--fx-ice) 0%, #fff 100%);
  position: relative;
  overflow: hidden;
}
.stitch-login-bg {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
}
.stitch-login-bg .pattern {
  position: absolute; top: 0; right: 0; width: 55%; height: 100%;
  opacity: 0.08; background-color: var(--fx-navy);
  background-image: radial-gradient(#002b49 0.5px, transparent 0.5px);
  background-size: 24px 24px;
  transform: skewX(-12deg) translateX(80px);
}
.stitch-login-bg .blob-a {
  position: absolute; bottom: -10%; left: -5%;
  width: 380px; height: 380px; border-radius: 50%;
  background: #cfe5ff; filter: blur(100px); opacity: 0.35;
}
.stitch-login-bg .blob-b {
  position: absolute; top: -5%; right: -5%;
  width: 320px; height: 320px; border-radius: 50%;
  background: #5095fe; filter: blur(90px); opacity: 0.15;
}
.stitch-login-main {
  position: relative; z-index: 1; width: 100%; max-width: 1040px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 36px;
}
.stitch-login-brand { flex: 1 1 320px; max-width: 420px; }
.stitch-login-brand .brand-row {
  display: flex; align-items: center; gap: 12px; margin-bottom: 24px;
}
.stitch-login-brand .brand-icon {
  width: 52px; height: 52px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0, 22, 41, 0.15);
}
.stitch-login-brand .brand-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.stitch-login-brand .brand-title {
  font-family: var(--font-display); font-size: 1.75rem; font-weight: 800;
  color: #001629; margin: 0; letter-spacing: -0.02em;
}
.stitch-login-brand h2 {
  font-family: var(--font-display); font-size: 1.25rem; font-weight: 700;
  color: var(--fx-navy); margin: 0 0 12px; line-height: 1.3;
}
.stitch-login-brand .brand-desc {
  color: var(--fx-muted); font-size: 0.9375rem; line-height: 1.65; margin: 0 0 28px;
}
.stitch-feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stitch-feature {
  display: flex; align-items: center; gap: 10px; padding: 14px;
  border-radius: 12px; background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(228, 233, 240, 0.8); backdrop-filter: blur(8px);
  font-size: 0.8125rem; font-weight: 600; color: var(--fx-navy);
}
.stitch-feature .material-symbols-outlined { color: var(--fx-primary); }
.stitch-login-card-wrap { flex: 0 1 440px; width: 100%; }
.stitch-login-card {
  background: #fff; border: 1px solid var(--fx-border); border-radius: 16px;
  padding: 32px 28px; box-shadow: var(--fx-shadow-card);
}
.stitch-card-logo {
  width: 44px; height: 44px; border-radius: 50%; object-fit: cover;
  display: block; margin-bottom: 12px;
  box-shadow: 0 2px 10px rgba(0, 22, 41, 0.12);
}
.stitch-login-card h3 {
  font-family: var(--font-display); font-size: 1.375rem; font-weight: 700;
  color: var(--fx-navy); margin: 0 0 6px;
}
.stitch-login-card .card-sub {
  color: var(--fx-muted); font-size: 0.9375rem; margin: 0 0 24px;
}
.stitch-field { margin-bottom: 18px; }
.stitch-field label {
  display: block; font-size: 0.6875rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--fx-muted); margin-bottom: 6px;
}
.stitch-input-wrap { position: relative; }
.stitch-input-wrap .field-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: #899199; font-size: 1.125rem; pointer-events: none;
}
.stitch-input-wrap input {
  width: 100%; height: 48px; padding: 0 44px;
  border: 1px solid var(--fx-border); border-radius: 10px;
  background: var(--fx-surface-low); font: inherit; font-size: 0.9375rem;
  color: var(--fx-navy); outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.stitch-input-wrap input:focus {
  border-color: var(--fx-primary);
  box-shadow: 0 0 0 4px rgba(0, 92, 186, 0.12);
  background: #fff;
}
.stitch-input-wrap .toggle-pass {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  border: 0; background: none; cursor: pointer; color: #899199; padding: 4px; display: flex;
}
.stitch-input-wrap .toggle-pass:hover { color: var(--fx-navy); }
.stitch-notice {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px;
  margin: 4px 0 20px; border-radius: 10px;
  background: rgba(230, 232, 235, 0.45); border: 1px solid rgba(228, 233, 240, 0.8);
  font-size: 0.75rem; color: var(--fx-muted); line-height: 1.45;
}
.stitch-notice p { margin: 0; }
.stitch-notice .material-symbols-outlined { color: var(--fx-warn); font-size: 1.125rem; flex-shrink: 0; }
.stitch-login-btn {
  width: 100%; height: 48px; border: none; border-radius: 10px;
  background: var(--st-primary); color: #fff !important;
  font-family: var(--font-display); font-size: 0.9375rem; font-weight: 700;
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 2px 8px rgba(0, 22, 41, 0.2);
}
.stitch-login-btn:hover { background: #002b49; }
.stitch-login-btn:active { transform: scale(0.98); }
.stitch-card-footer {
  margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--fx-border); text-align: center;
}
.stitch-secure {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 0.75rem; color: var(--fx-success); font-weight: 600;
}
.stitch-secure .pulse {
  width: 8px; height: 8px; border-radius: 50%; background: var(--fx-success);
  animation: stitchPulse 1.5s ease-in-out infinite;
}
@keyframes stitchPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.stitch-powered {
  margin-top: 20px; text-align: center; opacity: 0.55;
  font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--fx-muted);
}
.stitch-powered strong {
  font-family: var(--font-display); font-style: italic;
  color: var(--fx-navy-mid); font-size: 0.95rem;
}
.stitch-page-footer {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 2;
  background: var(--st-primary); color: rgba(255, 255, 255, 0.75);
  font-size: 0.6875rem; padding: 10px 20px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}
.login-error {
  margin-bottom: 14px; padding: 10px 12px; border-radius: 8px;
  background: #ffe3e3; color: #c92a2a; font-size: 0.8125rem;
}
.login-error[hidden] { display: none !important; }

@media (max-width: 980px) {
  .stitch-login-brand { display: none; }
  .stitch-login-page { padding-bottom: 56px; }
  .stitch-login-card-wrap { order: 1; max-width: 420px; }
}

/* ── Shell rail (CRM Soft exact) ────────────────────────── */
.app > .sidebar, .sidebar {
  width: var(--nav-w) !important;
  flex: 0 0 var(--nav-w) !important;
  background: linear-gradient(180deg, #092c4c 0%, #0d3a5f 50%, #092c4c 100%) !important;
  border-right: none;
  box-shadow: 4px 0 20px rgba(9, 44, 76, 0.1);
}
.brand {
  padding: 1.25rem 1.1rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.brand-logo {
  width: 40px !important; height: 40px !important;
  border-radius: 50% !important; object-fit: cover;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.brand h1 {
  font-family: var(--font-display);
  font-size: 1rem; font-weight: 800; letter-spacing: -0.02em;
  text-transform: none; line-height: 1.25;
}
.brand-sub {
  font-size: 0.6rem; letter-spacing: 0.1em; color: rgba(147, 197, 253, 0.95); font-weight: 600;
}
.nav { padding: 0.5rem 0.5rem 1rem; }
.nav-cap {
  font-size: 0.6rem; color: rgba(248, 250, 252, 0.38);
  letter-spacing: 0.12em; font-weight: 800;
  padding: 0.75rem 0.65rem 0.25rem;
}
.nav-item {
  display: flex; align-items: center; gap: 0.65rem;
  border-radius: 8px; font-size: 0.8125rem; font-weight: 600;
  padding: 0.5rem 0.65rem; color: rgba(248, 250, 252, 0.85);
  margin: 0 0 2px; transition: background 0.15s;
  width: 100%; text-align: left; background: transparent; border: 0; cursor: pointer;
}
.nav-item .material-symbols-outlined {
  font-size: 1.15rem; opacity: 0.85; font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 20;
}
.nav-item:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.nav-item.on {
  background: rgba(43, 111, 243, 0.3) !important;
  color: #fff !important;
  box-shadow: inset 0 0 0 1px rgba(91, 159, 255, 0.35) !important;
}
.nav-item.on .material-symbols-outlined { opacity: 1; color: #bfdbfe; }
.sidebar-foot {
  font-size: 0.62rem; color: rgba(248, 250, 252, 0.4); line-height: 1.45;
  letter-spacing: 0.02em; padding: 0.75rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

/* ── Top bar ────────────────────────────────────────────── */
.top {
  background: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(12px) !important;
  border-bottom: 1px solid var(--fx-border);
  height: auto; min-height: var(--top-h);
  padding: 0.65rem 1.15rem;
}
.top h2 {
  font-family: var(--font-display);
  font-size: 1.15rem; font-weight: 800; color: #092c4c;
  letter-spacing: -0.03em;
}
.top .desc { font-size: 0.8125rem; color: var(--fx-muted); }
.top-status { font-size: 0.75rem; color: var(--fx-muted); }
.top-status .online {
  display: inline-flex; align-items: center; gap: 0.4rem;
  color: var(--fx-muted); font-weight: 600;
  background: transparent; border: none; padding: 0;
}
.top-status .online::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--fx-success); box-shadow: 0 0 0 3px var(--fx-success-bg);
}
.user {
  border-radius: 8px !important; border-color: var(--fx-border) !important;
  background: #fff !important;
}
.avatar {
  border-radius: 50% !important; background: var(--fx-primary);
  font-size: 0.7rem; font-weight: 700;
}

.content {
  background: transparent;
  padding: var(--gap);
  gap: var(--gap);
}

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  border-radius: 8px; font-weight: 650; font-size: 0.8125rem;
  min-height: 36px; padding: 0.4rem 0.85rem;
  font-family: var(--font-body);
}
.btn-p {
  background: #2b6ff3;
  box-shadow: 0 1px 3px rgba(43, 111, 243, 0.28);
}
.btn-p:hover { background: #1e56c9; }
.btn-ghost {
  background: #fff; color: #092c4c; border: 1px solid #c5d0de;
  min-height: 36px;
}
.btn-ghost:hover { background: #eef4fb; }
.btn-warn { background: #d97706; border-radius: 8px; }
.btn-danger { background: var(--fx-danger); border-radius: 8px; }

/* ── KPI / cards (iPay wb-kpis) ──────────────────────────── */
.stat, .wb-kpis .kpi {
  border-radius: 10px; box-shadow: 0 1px 3px rgba(9, 44, 76, 0.06);
  border: 1px solid var(--fx-border);
  padding: 0.85rem 1rem; background: #fff;
}
.stat .label {
  font-size: 0.72rem; letter-spacing: 0.06em; color: var(--fx-muted);
  font-weight: 700; text-transform: uppercase;
}
.stat .value {
  font-family: var(--font-display) !important;
  font-size: 1.35rem; font-weight: 800; letter-spacing: -0.02em;
  color: #092c4c; margin-top: 0.3rem; line-height: 1.15;
}
.stat.profit .value { color: var(--fx-success); }
.stat.loss .value, .stat.loan .value { color: #b45309; }

.panel {
  border-radius: 12px; box-shadow: 0 1px 3px rgba(9, 44, 76, 0.06);
  border: 1px solid var(--fx-border);
  padding: 0.9rem 1rem; background: #fff;
}
.panel h3 {
  font-family: var(--font-display);
  font-size: 0.95rem; font-weight: 700; color: #092c4c;
}
.table-wrap {
  border: 1px solid var(--fx-border); border-radius: 10px;
  background: #fff; overflow: hidden;
}
table.data { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
table.data thead th {
  height: 40px; background: #f8fafc; color: var(--fx-muted);
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; border-bottom: 1px solid var(--fx-border);
  padding: 0 0.85rem; text-align: left;
}
table.data tbody td {
  height: 44px; padding: 0 0.85rem; border-bottom: 1px solid #f1f5f9;
  color: var(--fx-on); vertical-align: middle;
}
table.data tbody tr:hover { background: #f0f5ff; }
table.data tbody tr:last-child td { border-bottom: none; }
table.data .mono, .mono {
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  font-size: 0.84rem; font-weight: 600;
}

.badge {
  border-radius: 999px !important;
  font-size: 0.65rem !important; font-weight: 700;
  padding: 0.18rem 0.5rem !important;
}
.badge.ok { background: var(--fx-success-bg) !important; color: #166534 !important; border: 1px solid var(--fx-success-bd); }
.badge.warn { background: var(--fx-warn-bg) !important; color: #92400e !important; border: 1px solid var(--fx-warn-bd); }
.badge.bad { background: var(--fx-danger-bg) !important; color: #991b1b !important; border: 1px solid var(--fx-danger-bd); }

.pay-chip, .chip-pay {
  display: inline-flex; border-radius: 999px;
  font-size: 0.65rem; font-weight: 700; padding: 0.2rem 0.55rem;
  border: 1px solid var(--fx-border); background: #f8fafc; color: #334155;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.pay-chip.cash { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.pay-chip.card { background: #e0f2fe; color: #0369a1; border-color: #bae6fd; }
.pay-chip.transfer { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.pay-chip.loan { background: #fffbeb; color: #b45309; border-color: #fde68a; }

/* ── Sell ───────────────────────────────────────────────── */
.pos-layout {
  grid-template-columns: minmax(0, 1.85fr) minmax(340px, 0.95fr);
  gap: 0.75rem;
}
.browse-tile, .item-card {
  border-radius: 10px; border: 1px solid var(--fx-border);
  box-shadow: 0 1px 3px rgba(9, 44, 76, 0.05); background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.browse-tile:hover, .item-card:hover:not(:disabled) {
  border-color: #93b4ff;
  box-shadow: 0 2px 10px rgba(0, 92, 186, 0.1);
}
.item-card { min-height: 84px; padding: 0.55rem 0.6rem; }
.item-card .code { font-size: 0.65rem; font-weight: 600; color: var(--fx-muted); }
.item-card .name { font-size: 0.82rem; font-weight: 650; color: #092c4c; }
.item-grid {
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 0.5rem;
}
.browse-crumb { font-size: 0.8rem; font-weight: 600; color: var(--fx-muted); }
.crumb-link { color: var(--fx-primary); }
.crumb-now { color: #092c4c; font-weight: 750; }

.panel-cart {
  border: 1px solid var(--fx-border); border-radius: 12px;
  box-shadow: 0 1px 3px rgba(9, 44, 76, 0.06); background: #fff;
}
.cart-head {
  display: flex; justify-content: space-between; align-items: center;
  padding-bottom: 0.55rem; border-bottom: 1px solid #f1f5f9; margin-bottom: 0.55rem;
}
.cart-head strong { font-size: 0.95rem; color: #092c4c; font-weight: 750; }
.cart-count {
  font-size: 0.72rem; color: var(--fx-muted); font-weight: 600;
  background: #f1f5f9; padding: 0.15rem 0.5rem; border-radius: 999px;
}
.totals .grand {
  color: var(--fx-primary-dark); font-size: 1.3rem; font-weight: 800;
  letter-spacing: -0.02em;
}
.pay-block select, .pay-block input { border-radius: 8px; border-color: var(--fx-border); }

.date-filter input[type="date"],
.toolbar input, .toolbar select, .field input, .field select {
  border-radius: 8px; border-color: var(--fx-border); height: 38px;
  font-size: 0.84rem; background: #fff;
}
.date-filter input[type="date"]:focus,
.toolbar input:focus, .field input:focus {
  outline: none; border-color: var(--fx-primary);
  box-shadow: 0 0 0 3px rgba(0, 92, 186, 0.12);
}

.cust-profile .kpi-row, .cust-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.55rem;
}

.bottom-nav {
  border-top: 1px solid var(--fx-border); background: #fff;
}
.bnav-item.on { color: var(--fx-primary); }
.bnav-ico { display: none; }

.kb {
  font-size: 10px; font-weight: 700; color: var(--fx-muted);
  background: #f1f5f9; border: 1px solid var(--fx-border);
  border-radius: 6px; padding: 0.08rem 0.35rem;
}

.btn-menu { display: none !important; }
.browse-steps {
  display: flex; gap: 0.4rem; flex-wrap: wrap; margin: 0 0 0.65rem;
}
.browse-steps .step {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.03em;
  text-transform: uppercase; padding: 0.35rem 0.7rem; border-radius: 999px;
  border: 1px solid #c5d0de; background: #f8fafc; color: var(--fx-muted);
}
.browse-steps .step.done {
  background: var(--fx-success-bg); color: #166534; border-color: var(--fx-success-bd);
}
.browse-steps .step.on {
  background: #2b6ff3; color: #fff; border-color: #2b6ff3;
}

.pos-layout > .panel-items { height: 100% !important; align-self: stretch !important; }
.pos-layout > .panel-items:has(.brand-grid),
.pos-layout > .panel-items:has(.dept-grid) {
  height: auto !important;
  max-height: 100% !important;
  align-self: stretch !important;
}
.browse-stage {
  display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0;
}
.browse-grid, .item-grid {
  display: grid !important; gap: 0.55rem !important;
  flex: 1 1 auto !important; min-height: 0 !important; height: 100%;
  overflow: auto; align-content: start;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)) !important;
}
.browse-grid[data-fill], .item-grid[data-fill] {
  align-content: stretch !important;
  grid-template-columns: repeat(var(--fg-cols, 3), minmax(0, 1fr)) !important;
  grid-template-rows: repeat(var(--fg-rows, 2), minmax(100px, 1fr)) !important;
}
.browse-grid[data-fill] .browse-tile,
.item-grid[data-fill] .item-card {
  min-height: 0 !important; height: 100%;
  display: flex !important; flex-direction: column; justify-content: center;
  padding: 1rem 1.1rem !important;
}
.browse-grid[data-fill] .browse-tile strong {
  font-size: clamp(1rem, 2.4vh, 1.45rem); line-height: 1.2; color: #092c4c;
}
.browse-grid[data-fill] .browse-tile span {
  font-size: clamp(0.72rem, 1.5vh, 0.95rem); margin-top: 0.4rem; color: var(--fx-muted);
}
.item-grid[data-fill] .item-card .name {
  font-size: clamp(0.84rem, 1.8vh, 1.1rem); -webkit-line-clamp: 3;
}

.checkout-actions #btn-save-print {
  min-height: 48px !important; font-weight: 800 !important; border-radius: 10px !important;
}
.checkout-actions #btn-save-print:disabled {
  opacity: 0.55; background: var(--fx-primary) !important; color: #fff !important;
  box-shadow: none !important;
}
.browse-lead { margin: 0 0 0.55rem; font-size: 0.8rem; color: var(--fx-muted); }
.browse-tile { min-height: 72px !important; padding: 0.7rem 0.8rem !important; }
.brand-tile { min-height: 78px !important; }
.panel-items {
  display: flex !important; flex-direction: column !important; height: 100%; min-height: 0;
}
.pay-ways { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.35rem; }
.pay-ways button {
  height: 40px; border-radius: 8px; border: 1px solid #c5d0de;
  background: #fff; color: #092c4c; font-size: 0.75rem; font-weight: 700; cursor: pointer;
}
.pay-ways button:hover { border-color: #93b4ff; background: #f5f8ff; }
.pay-ways button.on {
  background: #1d4ed8; color: #fff; border-color: #1d4ed8;
}
.checkout-actions {
  display: grid !important;
  grid-template-columns: 1fr 1fr 1fr 1.6fr !important;
  gap: 0.4rem !important;
}
.checkout-actions .btn { min-height: 42px; width: 100%; border-radius: 8px; }
.checkout-actions .btn-p {
  min-height: 48px !important; font-size: 0.88rem !important;
  background: var(--fx-primary) !important;
}
.cash-chips .btn, .cash-row .btn { min-height: 34px; min-width: 48px; border-radius: 8px; }
.qty-ctrl button {
  width: 30px !important; height: 30px !important; border-radius: 8px !important;
}

/* ── Owner dashboard (platform KPI style) ───────────────── */
.owner-home { gap: 0.85rem; display: grid; grid-template-columns: 1fr 1fr; }
.owner-home > .owner-hero,
.owner-home > .owner-day-cards,
.owner-home > .owner-stock-strip {
  grid-column: 1 / -1;
}
.owner-home > .owner-block {
  min-width: 0;
}
@media (max-width: 1100px) {
  .owner-home { display: flex; flex-direction: column; }
}
.owner-hero {
  border-radius: 12px !important;
  background: linear-gradient(135deg, #092c4c 0%, #0d3a5f 60%, #1e56c9 140%) !important;
  padding: 1.35rem 1.5rem !important;
  box-shadow: var(--fx-shadow-lg) !important;
  border: none !important;
  color: #fff;
}
.owner-day-cards {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: var(--gap) !important;
}
.owner-stock-strip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap);
}
.owner-block .panel-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.75rem; margin-bottom: 0.65rem;
}
.sold-item-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center; gap: 0.75rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--fx-border);
  border-radius: 10px;
  background: #fff;
  margin-bottom: 0.45rem;
}
.sold-item-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column;
}
.sold-item-list li:last-child { margin-bottom: 0; border-bottom: 1px solid var(--fx-border); }
.pay-ways button.on {
  background: #2b6ff3; color: #fff; border-color: #2b6ff3;
}
.browse-steps .step.on {
  background: #2b6ff3; color: #fff; border-color: #2b6ff3;
}
.checkout-actions .btn-p {
  min-height: 48px !important; font-size: 0.88rem !important;
  background: #2b6ff3 !important;
}
.owner-hero-label {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: rgba(147, 197, 253, 0.95) !important;
}
.owner-hero-value {
  font-family: var(--font-display) !important;
  font-size: 2rem !important; letter-spacing: -0.03em;
  color: #fff !important; font-weight: 800; margin: 0.35rem 0;
}
.owner-hero-meta { color: rgba(226, 232, 240, 0.85) !important; font-size: 0.84rem; }
.owner-hero-actions .btn {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #fff !important; border-color: rgba(255, 255, 255, 0.28) !important;
}
.owner-day-cards {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 12px !important;
}
.owner-stock-strip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  margin-bottom: 0;
}
.owner-stock-strip .stat .value { font-size: 1.25rem; }
.top-lead .desc { max-width: 52ch; }

.sold-item-list {
  list-style: none; margin: 0; padding: 0;
}
.sold-item-list li {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.7rem 0.15rem; border-bottom: 1px solid #f1f5f9;
}
.sold-item-list li:last-child { border-bottom: none; }

@media (max-width: 1100px) {
  .owner-day-cards { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 900px) {
  .pos-layout { grid-template-columns: 1fr; }
  .cust-profile .kpi-row, .cust-stats { grid-template-columns: 1fr; }
  .owner-stock-strip, .owner-day-cards { grid-template-columns: repeat(2, 1fr) !important; }
  .pay-ways { grid-template-columns: repeat(2, 1fr); }
  .checkout-actions { grid-template-columns: 1fr 1fr !important; }
  .checkout-actions .btn-p { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
  .btn-menu { display: inline-flex !important; }
}

/* ── Cycles 3–12 density / CRM Soft parity ──────────────── */
.main, .content {
  min-height: calc(100vh - var(--top-h, 64px));
}
.content > .panel,
.content > .fill-stack {
  flex: 0 0 auto;
  overflow: visible;
}
.content > .owner-home {
  flex: 1 0 auto;
}
.toolbar > .btn,
.toolbar > button {
  flex: 0 0 auto;
  min-width: 0;
  width: auto;
}
.toolbar > input {
  flex: 1 1 220px;
  min-width: 180px;
  width: auto;
}
.brand-tile, .browse-tile.brand-tile {
  min-height: 64px !important;
  padding: 0.55rem 0.7rem !important;
  display: flex; flex-direction: column; justify-content: center; gap: 0.15rem;
  background: #fff !important;
  border: 1px solid var(--fx-border) !important;
  box-shadow: none !important;
}
.brand-tile strong, .browse-tile-name {
  font-size: 0.84rem !important; color: #092c4c !important;
}
.brand-tile span, .browse-tile-meta {
  font-size: 0.68rem !important; color: #64748b !important;
}
.browse-grid {
  gap: 0.5rem !important;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important;
}
.alert-list {
  gap: 0.25rem !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
}
.alert-list li {
  padding: 0.4rem 0.65rem 0.4rem 0.75rem !important;
  border-radius: 8px !important;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.15rem 0.85rem;
  align-items: start;
}
.alert-list li .alert-main strong {
  font-size: 0.8125rem; color: #092c4c; font-weight: 700;
}
.alert-list li .alert-body {
  font-size: 0.75rem; color: #475569; margin-top: 0.1rem; line-height: 1.35;
}
.alert-list li .meta {
  font-size: 0.68rem; color: #64748b; white-space: nowrap; padding-top: 0.15rem;
}
.btn-danger, table .btn-danger, td .btn.btn-danger {
  background: #fff !important;
  color: #b91c1c !important;
  border: 1px solid #fecaca !important;
  box-shadow: none !important;
  font-weight: 700;
  min-height: 32px;
  padding: 0.25rem 0.55rem;
}
.btn-danger:hover {
  background: #fef2f2 !important;
  border-color: #f87171 !important;
}
table td .btn, table .btn-ghost {
  min-height: 32px; padding: 0.25rem 0.55rem; font-size: 0.75rem;
}
.toolbar, .report-filters, .inv-filters {
  display: flex; flex-wrap: wrap; align-items: end; gap: 0.5rem 0.65rem;
}
.toolbar .grow, .report-filters .grow { flex: 1 1 220px; min-width: 180px; }
.owner-day-cards .stat, .owner-stock-strip .stat, .wb-kpis .kpi, .stat {
  padding: 0.7rem 0.85rem !important;
}
.owner-day-cards .stat .value, .owner-stock-strip .stat .value {
  font-size: 1.15rem !important; letter-spacing: -0.02em;
}
.owner-hero { padding: 1.1rem 1.25rem !important; }
.owner-hero-value { font-size: 1.75rem !important; }
.sold-item-list li {
  padding: 0.45rem 0 !important;
  border-bottom: 1px solid #eef2f7 !important;
}
.panel.grow, .fill-stack { min-height: 0; }
.table-wrap table th {
  font-size: 0.65rem; letter-spacing: 0.04em; color: #64748b;
  padding: 0.45rem 0.55rem; background: #f8fafc;
}
.table-wrap table td {
  padding: 0.45rem 0.55rem; font-size: 0.8rem;
}
.bnav-item .material-symbols-outlined {
  font-size: 1.2rem; line-height: 1;
}
.bnav-item {
  display: flex; flex-direction: column; align-items: center; gap: 0.1rem;
  font-size: 0.65rem;
}
.browse-grid.brand-grid, .browse-grid.dept-grid {
  height: auto !important;
  flex: 0 1 auto !important;
  align-content: start !important;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)) !important;
  gap: 0.45rem !important;
}
.browse-grid.brand-grid .brand-tile {
  min-height: 58px !important;
  height: auto !important;
  padding: 0.55rem 0.65rem !important;
}
.alert-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}
.alert-summary .stat {
  padding: 0.55rem 0.7rem !important;
}
.alert-summary .value.warn { color: #c2410c; }
.alert-list li.is-refund { border-left-color: #f97316 !important; }
.alert-list li.is-sold.unread { border-left-color: #2b6ff3 !important; }
@media (max-width: 900px) {
  .alert-summary { grid-template-columns: repeat(2, 1fr); }
}
.logout-btn, #btn-logout {
  border-radius: 8px !important;
  border: 1px solid #c5d0de !important;
  background: #fff !important;
  color: #092c4c !important;
  min-height: 36px;
  font-weight: 650;
}
.top .user { gap: 0.5rem; }
