/* =========================================================
   ELECTRICAL POS — CONSOLIDATED STYLESHEET (FIXED)
   ========================================================= */

/* ---------- 1. DESIGN TOKENS ---------- */
:root {
    --brand-50:  #eef2ff;
    --brand-100: #e0e7ff;
    --brand-200: #c7d2fe;
    --brand-300: #a5b4fc;
    --brand-400: #818cf8;
    --brand-500: #6366f1;
    --brand-600: #4f46e5;
    --brand-700: #4338ca;
    --accent-400:#22d3ee;
    --accent-500:#06b6d4;
    --accent-600:#0891b2;
    --slate-50:  #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    --success-bg: #dcfce7; --success-fg: #166534;
    --warning-bg: #fef3c7; --warning-fg: #92400e;
    --danger-bg:  #fee2e2; --danger-fg:  #991b1b;
    --info-bg:    #e0f2fe; --info-fg:    #0369a1;
    --shadow-sm: 0 1px 2px rgba(15,23,42,.06);
    --shadow-md: 0 4px 12px -2px rgba(15,23,42,.08);
    --shadow-lg: 0 20px 40px -20px rgba(15,23,42,.25);
    --shadow-xl: 0 30px 60px -30px rgba(79,70,229,.4);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --ease: cubic-bezier(.2,.8,.2,1);
    --header-h: 68px;
}

/* ---------- 2. RESET ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    background: #ffffff;
    color: var(--slate-900);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-600); text-decoration: none; transition: color .15s var(--ease); }
a:hover { color: var(--brand-700); }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { letter-spacing: -.02em; line-height: 1.2; }
.mono { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: .85rem; }

/* ---------- 3. UTILITIES ---------- */
.muted { color: var(--slate-500); }
.muted.small { font-size: .85rem; }
.center { text-align: center; }
.container { max-width: 1200px; margin: 0 auto; padding: 1rem; }
.text-danger  { color: var(--danger-fg) !important; }
.text-success { color: var(--success-fg) !important; }
.text-warning { color: var(--warning-fg) !important; }
.trend-up   { color: var(--success-fg); font-weight: 700; }
.trend-down { color: var(--danger-fg);  font-weight: 700; }
.trend-flat { color: var(--slate-400);  font-weight: 700; }
.link { font-size: .85rem; font-weight: 600; color: var(--brand-600); }
.link.small { font-size: .78rem; }

@keyframes posIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 4px rgba(34,197,94,.2); } 50% { box-shadow: 0 0 0 8px rgba(34,197,94,.05); } }
@keyframes grow { from { transform: scaleY(.1); transform-origin: bottom; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ---------- 4. BUTTONS ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
    padding: .7rem 1.25rem;
    border-radius: var(--radius-sm);
    font-weight: 600; font-size: .9rem;
    background: #fff; color: var(--slate-800);
    border: 1px solid var(--slate-200);
    cursor: pointer; text-decoration: none;
    transition: transform .08s var(--ease), background .15s var(--ease), border-color .15s var(--ease), box-shadow .15s var(--ease);
    white-space: nowrap;
    font-family: inherit;
}
.btn:hover { background: var(--slate-50); border-color: var(--slate-300); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: linear-gradient(135deg, var(--brand-500), var(--brand-700)); color: #fff; border: none; box-shadow: 0 8px 20px -6px rgba(79,70,229,.5); }
.btn.primary:hover { box-shadow: 0 12px 26px -6px rgba(79,70,229,.65); filter: brightness(1.05); }
.btn.accent { background: linear-gradient(135deg, var(--accent-400), var(--accent-600)); color: #fff; border: none; }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--slate-50); }
.btn.small { padding: .5rem .9rem; font-size: .85rem; }
.btn.large { padding: .95rem 1.75rem; font-size: 1rem; }
.btn.full { width: 100%; }
.btn.danger { background: var(--danger-bg); color: var(--danger-fg); border-color: #fecaca; }
.btn.danger:hover { background: #fecaca; }
.btn.on-dark { color: #fff; border-color: rgba(255,255,255,.3); background: rgba(255,255,255,.08); }
.btn.on-dark:hover { background: rgba(255,255,255,.18); color: #fff; }
.btn .arrow { transition: transform .2s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- 5. ALERTS ---------- */
.alert { padding: .85rem 1rem; border-radius: var(--radius-sm); margin: 1rem 0; background: var(--info-bg); color: var(--info-fg); border-left: 3px solid var(--accent-500); font-size: .9rem; }
.alert-error { background: var(--danger-bg); color: var(--danger-fg); border-left-color: #dc2626; }
.alert-warning { background: var(--warning-bg); color: var(--warning-fg); border-left-color: #d97706; }

/* ---------- 6. FORMS ---------- */
input, select, textarea { font-family: inherit; font-size: .9rem; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="date"], input[type="tel"], select, textarea {
    width: 100%;
    padding: .65rem .85rem;
    border: 1px solid var(--slate-300);
    border-radius: var(--radius-sm);
    background: #fff; color: var(--slate-900);
    transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand-500); box-shadow: 0 0 0 4px rgba(99,102,241,.12); }
label { display: block; font-size: .85rem; font-weight: 600; color: var(--slate-700); }
label input, label select, label textarea { margin-top: .3rem; }
.checkline { display: flex; align-items: center; gap: .45rem; font-size: .88rem; font-weight: 500; cursor: pointer; color: var(--slate-700); }
.checkline input[type="checkbox"] { width: auto; margin: 0; accent-color: var(--brand-600); }
.checkline.small { font-size: .8rem; }

/* ---------- 7. LANDING ---------- */
body.landing { background: #fff; }
.nav { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.85); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid var(--slate-200); }
.nav-inner { max-width: 1200px; margin: 0 auto; padding: .9rem 1.5rem; display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.nav-logo { display: inline-flex; align-items: center; gap: .55rem; color: var(--slate-900); font-weight: 800; font-size: 1.05rem; }
.nav-logo-mark { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--brand-500), var(--brand-700)); color: #fff; font-size: .95rem; box-shadow: 0 4px 12px -2px rgba(79,70,229,.5); }
.nav-links { display: flex; gap: 1.75rem; align-items: center; flex-wrap: wrap; }
.nav-links a { color: var(--slate-600); font-weight: 500; font-size: .92rem; }
.nav-links a:hover { color: var(--slate-900); }
.nav-actions { display: flex; gap: .5rem; align-items: center; }

.footer { background: var(--slate-900); color: var(--slate-400); padding: 4rem 1.5rem 2rem; margin-top: 5rem; }
.footer-inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; }
@media (max-width: 800px) { .footer-inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .footer-inner { grid-template-columns: 1fr; } }
.footer-logo { display: inline-flex; align-items: center; gap: .55rem; color: #fff; font-weight: 800; font-size: 1.05rem; margin-bottom: 1rem; }
.footer-tagline { color: var(--slate-400); font-size: .9rem; line-height: 1.6; max-width: 340px; }
.footer-meta { color: var(--slate-500); font-size: .8rem; margin-top: 1.5rem; }
.footer-col h4 { color: #fff; font-size: .9rem; font-weight: 700; margin: 0 0 1rem; text-transform: uppercase; letter-spacing: .06em; }
.footer-col a { display: block; color: var(--slate-400); padding: .3rem 0; font-size: .9rem; }
.footer-col a:hover { color: #fff; }

.hero { position: relative; max-width: 1200px; margin: 0 auto; padding: 5rem 1.5rem 4rem; }
.hero-home { overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 4rem; align-items: center; position: relative; z-index: 2; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; gap: 2.5rem; } .hero { padding: 3.5rem 1.5rem 2rem; } }
.hero-bg { position: absolute; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55; }
.blob-1 { width: 500px; height: 500px; background: var(--brand-400); top: -160px; right: -100px; }
.blob-2 { width: 400px; height: 400px; background: #a855f7; bottom: -180px; left: -120px; opacity: .35; }
.blob-3 { width: 320px; height: 320px; background: var(--accent-400); top: 40%; left: 40%; opacity: .25; }
.hero-copy { position: relative; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: .55rem; padding: .45rem .9rem; border-radius: 999px; background: var(--brand-50); color: var(--brand-700); font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 1.5rem; }
.hero-eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px rgba(34,197,94,.2); animation: pulse 2s infinite; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.75rem); line-height: 1.05; letter-spacing: -.035em; margin: 0 0 1.25rem; font-weight: 900; }
.gradient-text { background: linear-gradient(135deg, var(--brand-600) 0%, #a855f7 50%, var(--accent-500) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; display: inline-block; }
.hero .lead { font-size: 1.15rem; color: var(--slate-600); max-width: 560px; margin: 0 0 2rem; line-height: 1.65; }
.cta-row { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; }
.hero .cta-row { justify-content: flex-start; margin-bottom: .5rem; }
.cta-row.center { justify-content: center; }
.hero-bullets { list-style: none; padding: 0; margin: 1.5rem 0 0; display: flex; gap: 1.5rem; flex-wrap: wrap; color: var(--slate-600); font-size: .9rem; }
.hero-bullets li { display: inline-flex; align-items: center; gap: .45rem; }
.check { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--success-bg); color: var(--success-fg); font-size: .7rem; font-weight: 800; }

.hero-shop { display: grid; place-items: center; min-height: 70vh; padding: 5rem 1.5rem; }
.hero-shop-card { max-width: 560px; width: 100%; text-align: center; background: #fff; border: 1px solid var(--slate-200); border-radius: var(--radius-xl); padding: 3rem 2.25rem 2.25rem; box-shadow: var(--shadow-lg); }
.shop-logo-big { width: 80px; height: 80px; border-radius: 22px; background: linear-gradient(135deg, var(--brand-500), var(--brand-700)); color: #fff; display: grid; place-items: center; font-size: 2.25rem; font-weight: 800; margin: 0 auto 1.5rem; box-shadow: var(--shadow-xl); }
.hero-shop-card h1 { font-size: 2rem; margin: 0 0 .75rem; }
.hero-shop-card .lead { margin: 0 auto 1.5rem; color: var(--slate-500); }
.hero-shop-card .cta-row { justify-content: center; margin-bottom: 1rem; }

.hero-visual { position: relative; }
.mock-app { background: #fff; border-radius: 22px; box-shadow: 0 40px 80px -30px rgba(79,70,229,.35), 0 20px 40px -20px rgba(15,23,42,.15); overflow: hidden; transform: perspective(1400px) rotateY(-6deg) rotateX(3deg); transition: transform .5s var(--ease); }
.mock-app:hover { transform: perspective(1400px) rotateY(0deg) rotateX(0deg); }
.mock-bar { display: flex; align-items: center; gap: .5rem; padding: .8rem 1.15rem; background: var(--slate-900); color: var(--slate-300); font-size: .8rem; }
.mock-bar span { width: 11px; height: 11px; border-radius: 50%; background: var(--slate-700); }
.mock-bar span:nth-child(1) { background: #ef4444; }
.mock-bar span:nth-child(2) { background: #f59e0b; }
.mock-bar span:nth-child(3) { background: #22c55e; }
.mock-bar strong { margin-left: auto; color: var(--slate-400); font-weight: 600; }
.mock-body { padding: 1.25rem; }
.mock-kpis { display: grid; grid-template-columns: repeat(3,1fr); gap: .6rem; margin-bottom: 1.25rem; }
.mock-kpi { background: var(--slate-50); border: 1px solid var(--slate-200); border-radius: var(--radius-sm); padding: .7rem .85rem; }
.mock-kpi small { color: var(--slate-500); font-size: .7rem; display: block; }
.mock-kpi strong { font-size: 1rem; color: var(--slate-900); font-weight: 700; }
.mock-chart { display: flex; align-items: flex-end; gap: .4rem; height: 100px; margin-bottom: 1.25rem; padding: .6rem; background: var(--slate-50); border-radius: var(--radius-sm); }
.mock-chart span { flex: 1; background: linear-gradient(180deg, var(--brand-400), var(--brand-700)); border-radius: 6px 6px 2px 2px; min-height: 10%; animation: grow .9s var(--ease) both; }
.mock-list { display: flex; flex-direction: column; gap: .4rem; }
.mock-row { display: flex; justify-content: space-between; padding: .6rem .85rem; background: var(--slate-50); border-radius: var(--radius-sm); font-size: .85rem; }
.mock-row em { color: var(--brand-600); font-style: normal; font-weight: 700; }

.stats-strip { position: relative; z-index: 2; margin-top: 4rem; display: grid; grid-template-columns: repeat(4,1fr); gap: 1rem; background: #fff; border: 1px solid var(--slate-200); border-radius: var(--radius-lg); padding: 1.75rem; box-shadow: var(--shadow-md); }
@media (max-width: 720px) { .stats-strip { grid-template-columns: repeat(2,1fr); } }
.stat { text-align: center; }
.stat strong { display: block; font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; color: var(--slate-900); }
.stat span { font-size: .82rem; color: var(--slate-500); }

.section { max-width: 1200px; margin: 0 auto; padding: 5rem 1.5rem; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 3rem; }
.section-head .eyebrow { display: inline-block; padding: .35rem .85rem; background: var(--brand-50); color: var(--brand-700); border-radius: 999px; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 1rem; }
.section-head h2 { font-size: clamp(1.6rem, 3.2vw, 2.25rem); letter-spacing: -.025em; margin: 0 0 .75rem; font-weight: 800; }
.section-sub { color: var(--slate-600); margin: 0; }
.section-sub a { color: var(--brand-600); font-weight: 600; }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.feature { background: #fff; border: 1px solid var(--slate-200); border-radius: var(--radius-lg); padding: 1.75rem; transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease); }
.feature:hover { transform: translateY(-6px); border-color: var(--brand-200); box-shadow: var(--shadow-lg); }
.feature-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 1.4rem; margin-bottom: 1.1rem; }
.feature h3 { margin: 0 0 .6rem; font-size: 1.1rem; font-weight: 700; }
.feature p { margin: 0; color: var(--slate-600); font-size: .95rem; line-height: 1.6; }
.icon-bolt  { background: #fef3c7; }
.icon-box   { background: #e0f2fe; }
.icon-users { background: #ede9fe; }
.icon-truck { background: #dcfce7; }
.icon-chart { background: #fee2e2; }
.icon-shield{ background: #e2e8f0; }
.icon-phone { background: #fce7f3; }
.icon-card  { background: #dbeafe; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; }
.step { background: var(--slate-50); border: 1px solid var(--slate-200); border-radius: 16px; padding: 1.5rem; }
.step-num { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: linear-gradient(135deg, var(--brand-500), var(--brand-700)); color: #fff; font-weight: 800; font-size: 1rem; margin-bottom: .85rem; }
.step h3 { margin: 0 0 .4rem; font-size: 1.05rem; }
.step p { margin: 0; color: var(--slate-600); font-size: .94rem; line-height: 1.55; }

.cta-band { padding: clamp(3rem, 7vw, 4.5rem) 0; background: linear-gradient(135deg, var(--brand-700) 0%, #a855f7 50%, var(--accent-600) 100%); color: #fff; text-align: center; margin-top: 5rem; position: relative; overflow: hidden; }
.cta-band-inner { max-width: 720px; margin: 0 auto; position: relative; z-index: 1; }
.cta-band h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); margin: 0 0 .75rem; font-weight: 800; }
.cta-band p { margin: 0 0 2rem; opacity: .95; font-size: 1.1rem; }
.cta-band .btn.primary { background: #fff; color: var(--brand-700); }
.cta-band .cta-row { justify-content: center; margin-top: 1.5rem; }

/* ---------- 8. AUTH ---------- */
.auth-page-split { min-height: 100vh; background: linear-gradient(135deg, var(--slate-900) 0%, var(--brand-700) 100%); padding: 0; position: relative; margin: 0; }
.auth-back { position: absolute; top: 1.25rem; left: 1.25rem; z-index: 10; color: var(--slate-300); font-size: .9rem; font-weight: 600; padding: .5rem .85rem; border-radius: 8px; background: rgba(255,255,255,.08); backdrop-filter: blur(8px); }
.auth-back:hover { background: rgba(255,255,255,.16); color: #fff; }
.auth-split { display: grid; grid-template-columns: 1fr 1.1fr; min-height: 100vh; }
@media (max-width: 900px) { .auth-split { grid-template-columns: 1fr; } .auth-side { display: none; } }
.auth-side { background: radial-gradient(circle at 20% 30%, rgba(255,255,255,.12), transparent 60%), radial-gradient(circle at 80% 70%, rgba(34,211,238,.18), transparent 55%); display: flex; align-items: center; padding: 4rem 3rem; color: #fff; position: relative; overflow: hidden; }
.auth-side-inner { max-width: 480px; position: relative; z-index: 1; }
.auth-brand { display: inline-flex; align-items: center; gap: .55rem; font-weight: 800; font-size: 1.05rem; margin-bottom: 3rem; color: #fff; text-decoration: none; }
.auth-brand .nav-logo-mark { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--brand-500), var(--brand-700)); color: #fff; font-size: .95rem; }
.auth-side h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); line-height: 1.15; letter-spacing: -.03em; margin: 0 0 1rem; font-weight: 800; }
.auth-side > .auth-side-inner > p { font-size: 1.05rem; color: rgba(255,255,255,.85); margin: 0 0 2rem; line-height: 1.6; }
.auth-benefits { list-style: none; padding: 0; margin: 0 0 3rem; display: flex; flex-direction: column; gap: .85rem; }
.auth-benefits li { display: flex; align-items: center; gap: .75rem; color: rgba(255,255,255,.92); font-size: .95rem; }
.auth-benefits .check { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: rgba(255,255,255,.18); color: #fff; font-size: .75rem; font-weight: 800; flex-shrink: 0; }
.auth-side-foot { padding-top: 2rem; border-top: 1px solid rgba(255,255,255,.15); }
.auth-side-foot p { color: rgba(255,255,255,.7); font-size: .85rem; margin: 0; }
.auth-main { background: #fff; display: flex; align-items: center; justify-content: center; padding: 3rem 2rem; overflow-y: auto; }
.auth-form-wrap { width: min(520px, 100%); }
.auth-form-head { margin-bottom: 1.75rem; }
.auth-form-head h1 { font-size: 1.75rem; margin: 0 0 .35rem; letter-spacing: -.03em; font-weight: 800; }
.auth-form-head .muted { font-size: .95rem; }
.auth-form { display: flex; flex-direction: column; gap: 1.5rem; }
.auth-section { display: flex; flex-direction: column; gap: 1rem; padding: 1.25rem; background: var(--slate-50); border: 1px solid var(--slate-200); border-radius: 14px; }
.auth-section-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--brand-600); font-weight: 800; }
.auth-form label { display: block; font-size: .85rem; font-weight: 600; color: var(--slate-700); }
.auth-form input, .auth-form select, .auth-form textarea { display: block; width: 100%; margin-top: .35rem; padding: .7rem .9rem; border: 1px solid var(--slate-300); border-radius: 10px; background: #fff; font-size: .92rem; font-family: inherit; }
.auth-form input:focus, .auth-form select:focus, .auth-form textarea:focus { outline: none; border-color: var(--brand-500); box-shadow: 0 0 0 4px rgba(99,102,241,.12); }
.auth-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 500px) { .auth-grid-2 { grid-template-columns: 1fr; } }
.field-hint { display: block; margin-top: .35rem; font-size: .75rem; color: var(--slate-500); font-weight: 500; }
.auth-terms { font-size: .78rem; color: var(--slate-500); text-align: center; margin: .25rem 0 0; line-height: 1.5; }
.auth-terms a { color: var(--brand-600); font-weight: 600; }
.auth-form-foot { text-align: center; padding-top: 1.5rem; margin-top: 1.5rem; border-top: 1px solid var(--slate-200); font-size: .9rem; color: var(--slate-600); }
.auth-form-foot a { color: var(--brand-600); font-weight: 700; }

/* =========================================================
   9. APP SHELL — SIDEBAR + TOPBAR
   ========================================================= */

body.app { background: var(--slate-100); margin: 0; }

/* -------- Sidebar -------- */
.sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 260px;
    background: linear-gradient(180deg, var(--slate-900) 0%, #1a1f3a 100%);
    color: var(--slate-300);
    display: flex;
    flex-direction: column;
    padding: 1.25rem 1rem;
    z-index: 120;
    transition: transform .28s cubic-bezier(.2,.8,.2,1);
    border-right: 1px solid rgba(255,255,255,.06);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .5rem .35rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
    margin-bottom: 1.25rem;
    position: relative;
}
.sidebar-brand > div { min-width: 0; flex: 1; }
.sidebar-brand strong {
    color: #fff;
    display: block;
    font-size: .95rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-brand small { color: var(--slate-500); font-size: .75rem; }
.sidebar-brand .logo-mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 800;
    display: inline-grid;
    place-items: center;
    background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
    color: #fff;
    flex-shrink: 0;
}
.sidebar-logo-img {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    object-fit: cover;
    background: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 12px -2px rgba(0,0,0,.35);
    border: 1px solid rgba(255,255,255,.08);
}
.sidebar-close {
    display: none;
    position: absolute;
    top: .35rem;
    right: .35rem;
    width: 32px; height: 32px;
    border-radius: 8px;
    background: rgba(255,255,255,.08);
    border: none;
    color: #fff;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}
.sidebar-close:hover { background: rgba(255,255,255,.18); }
.sidebar-nav { display: flex; flex-direction: column; gap: .15rem; flex: 1; }
.sidebar-link {
    display: flex;
    align-items: center;
    gap: .8rem;
    padding: .7rem .85rem;
    border-radius: 8px;
    color: var(--slate-400);
    font-size: .9rem;
    font-weight: 500;
    text-decoration: none;
    transition: background .15s, color .15s;
}
.sidebar-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar-link.active {
    background: linear-gradient(135deg, var(--brand-600), var(--brand-700));
    color: #fff;
    box-shadow: 0 8px 20px -10px rgba(79,70,229,.8);
}
.sidebar-icon { width: 22px; text-align: center; font-size: 1.05rem; flex-shrink: 0; }
.sidebar-foot {
    border-top: 1px solid rgba(255,255,255,.08);
    padding-top: .85rem;
    margin-top: .85rem;
}

/* -------- Main content -------- */
.app-main {
    margin-left: 260px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left .28s cubic-bezier(.2,.8,.2,1);
}

/* -------- Backdrop -------- */
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,.55);
    z-index: 110;
    opacity: 0;
    transition: opacity .28s ease;
    -webkit-tap-highlight-color: transparent;
}
.sidebar-backdrop.open { display: block; opacity: 1; }
body.sidebar-open { overflow: hidden; }

/* -------- Topbar -------- */
.app-topbar {
    background: rgba(255,255,255,.9);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--slate-200);
    padding: .85rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 40;
}
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    width: 40px;
    height: 40px;
    padding: 0;
    background: #fff;
    border: 1px solid var(--slate-200);
    border-radius: 10px;
    cursor: pointer;
    flex-shrink: 0;
}
.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--slate-800);
    border-radius: 2px;
}
.menu-toggle:hover { background: var(--slate-50); }
.menu-toggle:active { transform: scale(.96); }

.topbar-title { font-weight: 700; font-size: 1rem; }
.topbar-user { margin-left: auto; display: flex; align-items: center; gap: .7rem; }
.user-avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-500), #a855f7);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: .9rem;
    box-shadow: 0 4px 12px -2px rgba(99,102,241,.5);
}
.user-avatar.small { width: 30px; height: 30px; font-size: .75rem; }
.user-meta { display: flex; flex-direction: column; line-height: 1.15; }
.user-meta strong { font-size: .85rem; }
.user-meta small { color: var(--slate-500); font-size: .72rem; }

.app-content { padding: 1.75rem; flex: 1; }
.app-footer {
    padding: 1rem 1.75rem;
    border-top: 1px solid var(--slate-200);
    background: #fff;
    display: flex;
    justify-content: space-between;
    font-size: .8rem;
    color: var(--slate-500);
}

/* -------- Page head -------- */
.page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}
.page-head h1 { margin: 0 0 .35rem; font-size: 1.75rem; letter-spacing: -.03em; font-weight: 800; }
.page-head .muted { margin: 0; font-size: .92rem; }
.page-actions { display: flex; gap: .6rem; flex-wrap: wrap; }

/* -------- Impersonate -------- */
.impersonate-banner { background: #f59e0b; color: var(--slate-900); padding: .6rem 1rem; text-align: center; font-weight: 600; font-size: .9rem; }
.impersonate-banner a { color: var(--slate-900); text-decoration: underline; font-weight: 700; margin-left: .5rem; }

/* ---------- MOBILE ---------- */
@media (max-width: 900px) {
    .sidebar { transform: translateX(-100%); width: 80vw; max-width: 300px; box-shadow: none; }
    .sidebar.open { transform: translateX(0); box-shadow: 20px 0 60px rgba(0,0,0,.4); }
    .sidebar-close { display: inline-grid; place-items: center; }
    .app-main { margin-left: 0; }
    .menu-toggle { display: inline-flex; }
    .app-topbar { gap: .65rem; padding: .65rem .85rem; }
    .topbar-title { font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }
    .topbar-user .user-meta { display: none; }
    .topbar-branch { display: none; }
    .topbar-branch-static { display: none; }
    .app-content { padding: 1rem; }
}
@media (max-width: 420px) {
    .topbar-title { font-size: .85rem; }
    .topbar-user .user-avatar { width: 34px; height: 34px; font-size: .8rem; }
}

/* =========================================================
   10. KPI / DASHBOARD
   ========================================================= */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.1rem;
    margin-bottom: 2rem;
}
.kpi-card {
    background: #fff;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.35rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-sm);
    transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.kpi-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.kpi-icon { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; font-size: 1.4rem; flex-shrink: 0; }
.kpi-blue   .kpi-icon { background: var(--brand-100); }
.kpi-green  .kpi-icon { background: var(--success-bg); }
.kpi-purple .kpi-icon { background: #ede9fe; }
.kpi-orange .kpi-icon { background: var(--warning-bg); }
.kpi-red    .kpi-icon { background: var(--danger-bg); }
.kpi-brand { background: linear-gradient(135deg, #eef2ff 0%, #ffffff 60%); border-color: var(--brand-200); box-shadow: 0 10px 24px -18px rgba(79,70,229,.5); }
.kpi-brand .kpi-icon { background: linear-gradient(135deg, var(--brand-500), var(--brand-700)); color: #fff; box-shadow: 0 8px 20px -8px rgba(79,70,229,.6); }
.kpi-brand .kpi-value { color: var(--brand-700); font-size: 1.65rem; }
.kpi-body { display: flex; flex-direction: column; min-width: 0; }
.kpi-label { color: var(--slate-500); font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.kpi-value { font-size: 1.5rem; font-weight: 800; letter-spacing: -.03em; margin: .15rem 0; }
.kpi-meta { color: var(--slate-400); font-size: .78rem; }

.kpi-card.kpi-month { background: linear-gradient(135deg, #f0f9ff 0%, #ffffff 60%); border-color: #bae6fd; }
.kpi-card.kpi-month .kpi-icon { background: linear-gradient(135deg, #38bdf8, #0284c7); color: #fff; }
.kpi-card.kpi-month .kpi-value { color: #0369a1; font-size: 1.55rem; }
.kpi-card.kpi-month-profit { background: linear-gradient(135deg, #ecfdf5 0%, #ffffff 60%); border-color: #bbf7d0; }
.kpi-card.kpi-month-profit .kpi-icon { background: linear-gradient(135deg, #34d399, #059669); color: #fff; }
.kpi-card.kpi-month-profit .kpi-value { color: #065f46; font-size: 1.55rem; }

.dash-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 1.25rem; }
.dash-card-wide { grid-column: 1 / -1; }
@media (max-width: 900px) { .dash-grid { grid-template-columns: 1fr; } }
.dash-card { background: #fff; border: 1px solid var(--slate-200); border-radius: var(--radius-lg); padding: 1.5rem; box-shadow: var(--shadow-sm); }
.dash-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.25rem; }
.dash-card-head h2 { margin: 0; font-size: 1.05rem; font-weight: 700; }

.dash-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 2rem; }
.dash-head-left { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.dash-avatar { width: 52px; height: 52px; border-radius: 16px; background: linear-gradient(135deg, var(--brand-500), var(--brand-700)); color: #fff; display: grid; place-items: center; font-size: 1.25rem; font-weight: 800; flex-shrink: 0; box-shadow: 0 12px 24px -12px rgba(79,70,229,.6); }
.dash-head h1 { margin: 0 0 .25rem; font-size: 1.6rem; letter-spacing: -.03em; }
.dash-head .muted { margin: 0; font-size: .92rem; }
@media (max-width: 600px) { .dash-head h1 { font-size: 1.35rem; } .dash-avatar { width: 44px; height: 44px; font-size: 1.05rem; } }

.week-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; background: #fff; border: 1px solid var(--slate-200); border-radius: 14px; padding: 1.1rem 1.35rem; margin-bottom: 1.5rem; box-shadow: var(--shadow-sm); }
.week-strip-item { display: flex; flex-direction: column; gap: .15rem; text-align: center; }
.week-strip-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--slate-500); }
.week-strip-item strong { font-size: 1.15rem; font-weight: 800; color: var(--slate-900); letter-spacing: -.01em; }
.week-strip-item.week-strip-highlight { background: linear-gradient(135deg, var(--brand-50), #ffffff); border-radius: 10px; padding: .5rem .65rem; border: 1px solid var(--brand-200); }
.week-strip-item.week-strip-highlight .week-strip-label { color: var(--brand-700); }
.week-strip-item.week-strip-highlight strong { color: var(--brand-700); font-size: 1.25rem; }

.sparkline-card { background: #fff; border: 1px solid var(--slate-200); border-radius: 14px; padding: 1rem 1.25rem; margin-bottom: 1.5rem; box-shadow: var(--shadow-sm); }
.sparkline-meta { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .5rem; margin-bottom: .75rem; }
.sparkline-label { display: block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--slate-500); }
.sparkline-value { font-size: 1.35rem; font-weight: 800; color: var(--slate-900); letter-spacing: -.02em; }
.sparkline-compare { display: flex; align-items: center; gap: .5rem; }
.sparkline { display: flex; align-items: flex-end; gap: 2px; height: 48px; }
.sparkline-bar { flex: 1; background: linear-gradient(180deg, var(--brand-400), var(--brand-700)); border-radius: 2px; min-height: 2px; transition: opacity .15s; }
.sparkline-bar:hover { opacity: .7; }

.bar-chart { display: flex; gap: .6rem; align-items: flex-end; height: 200px; padding: .5rem 0; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .35rem; min-width: 0; }
.bar-wrap { flex: 1; width: 100%; display: flex; align-items: flex-end; background: var(--slate-100); border-radius: var(--radius-sm); overflow: hidden; }
.bar { width: 100%; background: linear-gradient(180deg, var(--brand-400), var(--brand-700)); border-radius: var(--radius-sm) var(--radius-sm) 0 0; min-height: 4px; transition: height .6s var(--ease); }
.bar.bar-blue   { background: linear-gradient(180deg, #60a5fa, #1d4ed8); }
.bar.bar-green  { background: linear-gradient(180deg, #34d399, #047857); }
.bar.bar-purple { background: linear-gradient(180deg, #c084fc, #7e22ce); }
.bar.bar-red    { background: linear-gradient(180deg, #f87171, #dc2626); }
.bar-label { font-size: .72rem; color: var(--slate-500); font-weight: 600; }
.bar-value { font-size: .68rem; color: var(--slate-400); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.bar-chart-scroll { overflow-x: auto; scrollbar-width: thin; padding-bottom: .35rem; }
.bar-chart-scroll .bar-col { min-width: calc(100% / var(--bars, 30)); flex: 0 0 auto; }
.bar-chart-scroll::-webkit-scrollbar { height: 8px; }
.bar-chart-scroll::-webkit-scrollbar-thumb { background: var(--slate-300); border-radius: 4px; }

.hourly-chart { display: flex; align-items: flex-end; gap: 3px; height: 140px; padding-top: .5rem; }
.hourly-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; position: relative; }
.hourly-bar { width: 100%; background: linear-gradient(180deg, #22d3ee, #0891b2); border-radius: 3px 3px 0 0; min-height: 2px; }
.hourly-bar:hover { opacity: .7; }
.hourly-label { position: absolute; bottom: -18px; font-size: .65rem; color: var(--slate-400); }

.rank-list { list-style: none; padding: 0; margin: 0; }
.rank-item { display: flex; align-items: center; gap: .75rem; padding: .65rem 0; border-bottom: 1px solid var(--slate-100); }
.rank-item:last-child { border-bottom: none; }
.rank-num { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; background: var(--slate-100); color: var(--slate-600); font-size: .72rem; font-weight: 800; flex-shrink: 0; }
.rank-item:nth-child(1) .rank-num { background: #fef3c7; color: #92400e; }
.rank-item:nth-child(2) .rank-num { background: #e2e8f0; color: #475569; }
.rank-item:nth-child(3) .rank-num { background: #fed7aa; color: #9a3412; }
.rank-body { flex: 1; min-width: 0; }
.rank-name { font-weight: 600; font-size: .88rem; color: var(--slate-900); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-meta { text-align: right; flex-shrink: 0; }
.rank-value { font-weight: 800; color: var(--brand-600); font-size: .9rem; }

.pay-breakdown { list-style: none; padding: 0; margin: 0; }
.pay-row { padding: .6rem 0; border-bottom: 1px solid var(--slate-100); }
.pay-row:last-child { border-bottom: none; }
.pay-row-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .35rem; font-size: .88rem; }
.pay-row-bar { height: 6px; background: var(--slate-100); border-radius: 999px; overflow: hidden; margin-bottom: .25rem; }
.pay-row-fill { height: 100%; background: linear-gradient(90deg, var(--brand-500), var(--brand-700)); border-radius: 999px; }

.mini-list { list-style: none; padding: 0; margin: 0; }
.mini-list li { display: flex; justify-content: space-between; align-items: center; padding: .6rem 0; border-bottom: 1px solid var(--slate-100); font-size: .9rem; }
.mini-list li:last-child { border-bottom: none; }
.mini-name { color: var(--slate-900); }
.mini-badge { display: inline-block; background: var(--danger-bg); color: var(--danger-fg); padding: .15rem .6rem; border-radius: 999px; font-size: .75rem; font-weight: 700; }
.mini-badge.badge-green { background: var(--success-bg); color: var(--success-fg); }
.mini-badge.badge-blue  { background: var(--brand-100); color: var(--brand-700); }
.mini-badge.badge-amber { background: var(--warning-bg); color: var(--warning-fg); }

.activity-feed { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .55rem; }
.activity-item { display: flex; gap: .7rem; padding: .65rem .55rem; background: var(--slate-50); border: 1px solid var(--slate-200); border-radius: 10px; }
.activity-icon { width: 28px; height: 28px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; font-weight: 800; font-size: .82rem; color: #fff; }
.activity-icon.activity-completed { background: #16a34a; }
.activity-icon.activity-refunded  { background: #4338ca; }
.activity-icon.activity-void      { background: #dc2626; }
.activity-body { flex: 1; min-width: 0; }
.activity-line { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; font-size: .88rem; }
.activity-line strong { color: var(--slate-900); }
.activity-time { margin-top: .15rem; font-size: .72rem; }
.pulse-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px rgba(34,197,94,.2); animation: pulse 2s ease-in-out infinite; }

.quick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .5rem; }
@media (max-width: 500px) { .quick-grid { grid-template-columns: repeat(2, 1fr); } }
.quick { display: flex; flex-direction: column; align-items: center; gap: .35rem; padding: .85rem .5rem; background: var(--slate-50); border: 1px solid var(--slate-200); border-radius: 10px; font-size: .8rem; font-weight: 600; color: var(--slate-900); text-align: center; transition: background .15s, border-color .15s, transform .1s; }
.quick:hover { background: var(--brand-50); border-color: var(--brand-200); color: var(--brand-700); transform: translateY(-1px); }
.quick span { font-size: 1.2rem; }

.empty-state { text-align: center; padding: 3rem 1rem; color: var(--slate-500); }
.empty-icon { font-size: 3rem; margin-bottom: .75rem; opacity: .5; }
.empty-state h2 { margin: .5rem 0; font-size: 1.25rem; color: var(--slate-800); }
.empty-state p { margin: 0; font-size: .95rem; }

/* =========================================================
   11. TABLES
   ========================================================= */
.table-wrap { overflow-x: auto; margin: 0 -1.5rem; padding: 0 1.5rem; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { padding: .85rem .75rem; text-align: left; border-bottom: 1px solid var(--slate-100); vertical-align: middle; }
.table th { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--slate-500); font-weight: 700; background: var(--slate-50); border-bottom: 1px solid var(--slate-200); }
.table tbody tr { transition: background .15s var(--ease); }
.table tbody tr:hover { background: var(--slate-50); }
.table .right { text-align: right; }
.table .mono { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: .82rem; }

.filters { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin-bottom: 1.5rem; }
.filters input, .filters select { padding: .5rem .7rem; border: 1px solid var(--slate-300); border-radius: 8px; font-size: .85rem; font-family: inherit; background: #fff; }
.filters .filter-search { flex: 1; min-width: 180px; }
.inline-label { display: inline-flex; flex-direction: column; gap: .2rem; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--slate-500); }
.inline-label input[type="date"] { text-transform: none; letter-spacing: 0; font-size: .85rem; font-weight: 500; padding: .5rem .7rem; border: 1px solid var(--slate-300); border-radius: 8px; background: #fff; color: var(--slate-900); }

.row-actions { display: flex; gap: .35rem; justify-content: flex-end; flex-wrap: wrap; }
.icon-btn { background: #fff; border: 1px solid var(--slate-200); width: 34px; height: 34px; border-radius: var(--radius-sm); cursor: pointer; display: inline-grid; place-items: center; font-size: .9rem; color: var(--slate-700); transition: background .15s, border-color .15s, transform .1s; }
.icon-btn:hover { background: var(--slate-50); border-color: var(--slate-300); }
.icon-btn:active { transform: scale(.95); }
.icon-btn.danger:hover { background: var(--danger-bg); border-color: #fecaca; color: var(--danger-fg); }

.pager { display: flex; justify-content: center; align-items: center; gap: .75rem; padding: 1rem 0 .5rem; border-top: 1px solid var(--slate-100); margin-top: 1rem; flex-wrap: wrap; }

.card { background: #fff; padding: 1rem; border-radius: 10px; margin: 1rem 0; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.card label { display: block; margin: .5rem 0; }
.card input, .card select, .card textarea { width: 100%; padding: .5rem; border: 1px solid var(--slate-300); border-radius: 6px; }
.card button { background: var(--brand-500); color: #fff; border: none; padding: .6rem 1rem; border-radius: 6px; cursor: pointer; margin-top: .5rem; }

.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.inline-form { display: flex; gap: .5rem; align-items: end; margin: 1rem 0; flex-wrap: wrap; }
.inline-form input, .inline-form select { padding: .5rem; border: 1px solid var(--slate-300); border-radius: 6px; }
.inline-form-2 { display: flex; gap: .5rem; align-items: end; flex-wrap: wrap; margin-bottom: .35rem; }
.inline-form-2 label { display: block; font-size: .78rem; font-weight: 600; color: var(--slate-700); }
.inline-form-2 input, .inline-form-2 select { display: block; padding: .5rem .65rem; border: 1px solid var(--slate-300); border-radius: 8px; font-size: .85rem; font-family: inherit; background: #fff; margin-top: .25rem; min-width: 140px; }
.inline-form-2 button { align-self: end; }

.kv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem 1.25rem; }
@media (max-width: 500px) { .kv-grid { grid-template-columns: 1fr; } }
.kv-grid > div { display: flex; flex-direction: column; gap: .15rem; font-size: .88rem; }
.kv-grid span { color: var(--slate-500); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.kv-grid strong { color: var(--slate-900); font-weight: 700; }

/* =========================================================
   12. CHIPS & BADGES
   ========================================================= */
.status-badge { display: inline-block; padding: .25rem .7rem; border-radius: 999px; font-size: .72rem; font-weight: 700; letter-spacing: .02em; }
.status-active    { background: var(--success-bg); color: var(--success-fg); }
.status-inactive  { background: var(--slate-100); color: var(--slate-500); }
.status-trial     { background: var(--brand-100); color: var(--brand-700); }
.status-suspended { background: var(--warning-bg); color: var(--warning-fg); }
.status-expired   { background: var(--danger-bg); color: var(--danger-fg); }
.status-deleted   { background: var(--slate-100); color: var(--slate-500); }
.status-past_due  { background: var(--warning-bg); color: var(--warning-fg); }
.status-cancelled { background: var(--slate-100); color: var(--slate-500); }
.status-completed { background: var(--success-bg); color: var(--success-fg); }
.status-refunded  { background: #e0e7ff; color: #4338ca; }
.status-void      { background: var(--danger-bg); color: var(--danger-fg); }
.status-received  { background: var(--success-bg); color: var(--success-fg); }
.status-pending   { background: var(--warning-bg); color: var(--warning-fg); }
.status-partial   { background: var(--info-bg); color: var(--info-fg); }
.status-paid      { background: var(--success-bg); color: var(--success-fg); }

.plan-chip, .cycle-chip, .method-chip, .movement-chip, .gateway-chip, .pay-status, .cat-chip, .feature-chip {
    display: inline-block;
    padding: .22rem .65rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    background: var(--slate-100);
    color: var(--slate-600);
    text-transform: capitalize;
    white-space: nowrap;
}
.plan-chip.plan-starter      { background: var(--slate-100); color: var(--slate-600); }
.plan-chip.plan-business     { background: var(--brand-100); color: var(--brand-700); }
.plan-chip.plan-professional { background: #ede9fe; color: #6d28d9; }
.plan-chip.plan-enterprise   { background: var(--warning-bg); color: var(--warning-fg); }

.cycle-chip.cycle-monthly { background: var(--info-bg); color: var(--info-fg); }
.cycle-chip.cycle-annual  { background: #ecfccb; color: #4d7c0f; }

.method-chip.method-cash   { background: var(--success-bg); color: var(--success-fg); }
.method-chip.method-momo   { background: var(--warning-bg); color: var(--warning-fg); }
.method-chip.method-bank   { background: var(--brand-100); color: var(--brand-700); }
.method-chip.method-credit { background: #ede9fe; color: #6d28d9; }
.method-chip.method-mixed  { background: var(--slate-100); color: var(--slate-600); }

.movement-chip.movement-in         { background: var(--success-bg); color: var(--success-fg); }
.movement-chip.movement-out        { background: var(--danger-bg); color: var(--danger-fg); }
.movement-chip.movement-adjustment { background: var(--brand-100); color: var(--brand-700); }
.movement-chip.movement-damage     { background: var(--warning-bg); color: var(--warning-fg); }
.movement-chip.movement-return     { background: #e0e7ff; color: #4338ca; }

.pay-status.pay-success  { background: var(--success-bg); color: var(--success-fg); }
.pay-status.pay-pending  { background: var(--warning-bg); color: var(--warning-fg); }
.pay-status.pay-failed   { background: var(--danger-bg); color: var(--danger-fg); }
.pay-status.pay-refunded { background: #e0e7ff; color: #4338ca; }

.gateway-chip.gateway-paystack { background: var(--success-bg); color: var(--success-fg); }
.gateway-chip.gateway-momo     { background: var(--warning-bg); color: var(--warning-fg); }
.gateway-chip.gateway-manual   { background: var(--slate-100); color: var(--slate-600); }

.stock-pill { display: inline-block; min-width: 38px; padding: .22rem .65rem; border-radius: 999px; font-size: .78rem; font-weight: 700; text-align: center; background: var(--success-bg); color: var(--success-fg); }
.stock-pill.stock-low { background: var(--warning-bg); color: var(--warning-fg); }
.stock-pill.stock-out { background: var(--danger-bg); color: var(--danger-fg); }

.tag { display: inline-block; background: var(--brand-100); color: var(--brand-700); font-size: .68rem; font-weight: 700; padding: .12rem .45rem; border-radius: 999px; margin-left: .35rem; vertical-align: middle; }
.save-badge { display: inline-block; padding: .1rem .5rem; border-radius: 999px; background: var(--success-bg); color: var(--success-fg); font-size: .7rem; font-weight: 800; margin-left: .25rem; }

/* =========================================================
   13. POS
   ========================================================= */
.pos-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 1.25rem; height: calc(100vh - 130px); }
@media (max-width: 1100px) { .pos-wrap { grid-template-columns: minmax(0, 1fr) 360px; } }
@media (max-width: 950px)  { .pos-wrap { grid-template-columns: 1fr; height: auto; } }

.pos-products { background: #fff; border: 1px solid var(--slate-200); border-radius: 16px; padding: 1rem; display: flex; flex-direction: column; gap: .85rem; overflow: hidden; min-height: 0; }
.pos-toolbar { display: flex; gap: .5rem; align-items: stretch; }
.pos-search-wrap { position: relative; flex: 1; min-width: 0; }
.pos-search-icon { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); font-size: 1rem; color: var(--slate-400); pointer-events: none; }
.pos-search { width: 100%; height: 46px; padding: 0 .85rem 0 2.4rem; border: 1px solid var(--slate-300); border-radius: 12px; background: var(--slate-50); font-size: .95rem; font-family: inherit; }
.pos-search:focus { outline: none; border-color: var(--brand-500); background: #fff; box-shadow: 0 0 0 4px rgba(99,102,241,.12); }
.pos-clear-btn { position: absolute; right: .55rem; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border-radius: 50%; border: none; background: var(--slate-200); color: var(--slate-600); font-size: 1rem; line-height: 1; cursor: pointer; }
.pos-tool-btn { display: inline-flex; align-items: center; gap: .35rem; height: 46px; padding: 0 1rem; background: var(--brand-50); border: 1px solid var(--brand-200); color: var(--brand-700); border-radius: 12px; font-weight: 600; font-size: .85rem; font-family: inherit; cursor: pointer; white-space: nowrap; }
.pos-tool-btn:hover { background: var(--brand-100); }
@media (max-width: 500px) { .pos-tool-btn .hide-sm { display: none; } .pos-tool-btn { padding: 0 .85rem; } }

.pos-branch-tag { display: flex; align-items: center; gap: .4rem; padding: .5rem .8rem; background: var(--brand-50); border: 1px solid var(--brand-200); border-radius: 10px; font-size: .82rem; color: var(--brand-700); }
.pos-branch-tag .mono { color: var(--brand-600); font-size: .78rem; }

.pos-filter-bar { display: flex; overflow: hidden; }
.chip-row { display: flex; gap: .4rem; overflow-x: auto; padding: .15rem 0; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { display: none; }
.chip { flex-shrink: 0; padding: .4rem .85rem; background: #fff; border: 1px solid var(--slate-200); border-radius: 999px; font-size: .78rem; font-weight: 600; color: var(--slate-600); cursor: pointer; font-family: inherit; white-space: nowrap; transition: background .15s, color .15s, border-color .15s; }
.chip:hover { background: var(--brand-50); border-color: var(--brand-200); color: var(--brand-700); }
.chip.active { background: linear-gradient(135deg, var(--brand-500), var(--brand-700)); border-color: transparent; color: #fff; }

.pos-stock-bar { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.segmented { display: inline-flex; background: var(--slate-100); border-radius: 999px; padding: .2rem; gap: .15rem; }
.seg { background: transparent; border: none; padding: .35rem .85rem; border-radius: 999px; font-size: .78rem; font-weight: 600; color: var(--slate-600); cursor: pointer; font-family: inherit; white-space: nowrap; }
.seg.active { background: #fff; color: var(--slate-900); box-shadow: 0 1px 3px rgba(15,23,42,.12); }

.product-grid { flex: 1; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .65rem; overflow-y: auto; padding: .1rem; align-content: start; min-height: 0; }
@media (max-width: 700px) { .product-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .5rem; } }
@media (max-width: 480px) { .product-grid { grid-template-columns: repeat(2, 1fr); } }

.pos-product-card { background: #fff; border: 1px solid var(--slate-200); border-radius: 12px; padding: 0; overflow: hidden; cursor: pointer; display: flex; flex-direction: column; text-align: left; font-family: inherit; transition: border-color .15s, box-shadow .15s, transform .1s; }
.pos-product-card:hover:not(:disabled) { border-color: var(--brand-500); box-shadow: 0 10px 20px -14px rgba(79,70,229,.5); transform: translateY(-1px); }
.pos-product-card:disabled { opacity: .55; cursor: not-allowed; }
.pos-product-card[hidden] { display: none !important; }
.pos-product-card.is-focused { outline: 3px solid #4f46e5; outline-offset: 2px; border-color: #4f46e5 !important; }

.pos-card-image { position: relative; width: 100%; aspect-ratio: 1 / 1; background: linear-gradient(180deg, var(--slate-50), var(--slate-100)); display: grid; place-items: center; overflow: hidden; }
.pos-card-image > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; z-index: 1; }
.pos-card-image-fallback { font-size: 1.75rem; color: var(--slate-300); user-select: none; line-height: 1; z-index: 0; }
.pos-card-tag { position: absolute; top: .4rem; right: .4rem; padding: .15rem .5rem; border-radius: 999px; font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: #fff; z-index: 2; }
.pos-card-tag.out { background: #dc2626; }
.pos-card-tag.low { background: #f59e0b; }

.pos-card-body { padding: .55rem .65rem .65rem; display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.pos-card-body .product-card-name { font-weight: 700; font-size: .82rem; line-height: 1.25; color: var(--slate-900); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.05em; }
.pos-card-body .product-card-price { font-weight: 800; font-size: .95rem; color: var(--brand-600); }
.pos-card-body .product-card-stock { font-size: .68rem; color: var(--slate-400); }
.pos-card-body .product-card-stock.low { color: #dc2626; font-weight: 700; }

.empty-search { text-align: center; color: var(--slate-500); padding: 2rem 1rem; margin: auto 0; }

.pos-cart { background: #fff; border: 1px solid var(--slate-200); border-radius: 16px; padding: 1rem; display: flex; flex-direction: column; gap: .75rem; overflow: hidden; min-height: 0; }
.cart-head { display: flex; justify-content: space-between; align-items: flex-start; padding-bottom: .65rem; border-bottom: 1px solid var(--slate-100); }
.cart-head h2 { margin: 0; font-size: 1rem; }
.cart-clear { background: transparent; border: none; width: 32px; height: 32px; border-radius: 8px; font-size: 1rem; cursor: pointer; opacity: .55; }
.cart-clear:hover { opacity: 1; background: var(--slate-100); }

.cart-meta { border: 1px solid var(--slate-200); border-radius: 10px; background: var(--slate-50); overflow: hidden; }
.cart-meta > summary { display: flex; align-items: center; gap: .5rem; padding: .55rem .75rem; cursor: pointer; list-style: none; font-size: .82rem; font-weight: 600; color: var(--slate-700); }
.cart-meta > summary::-webkit-details-marker { display: none; }
.cart-meta-chevron { margin-left: auto; color: var(--slate-400); font-size: .8rem; }
.cart-meta[open] .cart-meta-chevron { transform: rotate(180deg); }
.cart-meta-body { padding: .75rem; background: #fff; border-top: 1px solid var(--slate-200); display: flex; flex-direction: column; gap: .65rem; }
#cartMetaSummary { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.cart-label { display: block; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--slate-500); margin-bottom: .3rem; }
.cart-select, .cart-input { width: 100%; height: 40px; padding: 0 .75rem; border: 1px solid var(--slate-300); border-radius: 10px; font-size: .88rem; font-family: inherit; background: #fff; }
.cart-select:focus, .cart-input:focus { outline: none; border-color: var(--brand-500); box-shadow: 0 0 0 4px rgba(99,102,241,.12); }
.cart-balance { display: block; margin-top: .3rem; font-size: .75rem; color: #dc2626; font-weight: 600; }

.cart-items-wrap { flex: 1; min-height: 140px; overflow-y: auto; border: 1px solid var(--slate-100); border-radius: 10px; background: var(--slate-50); }
.cart-items { padding: .5rem; display: flex; flex-direction: column; gap: .4rem; }
.cart-empty { text-align: center; padding: 2rem .75rem; color: var(--slate-500); }
.cart-empty .empty-icon { font-size: 1.75rem; margin-bottom: .35rem; opacity: .5; }
.cart-empty p { margin: 0; font-size: .85rem; }

.cart-line { display: grid; grid-template-columns: 1fr auto; gap: .25rem .5rem; background: #fff; border: 1px solid var(--slate-200); border-radius: 10px; padding: .55rem .65rem; align-items: center; }
.cart-line-name { grid-column: 1 / 2; font-weight: 600; font-size: .82rem; color: var(--slate-900); }
.cart-line-remove { grid-column: 2 / 3; grid-row: 1 / 3; align-self: center; background: transparent; border: none; width: 26px; height: 26px; border-radius: 6px; color: #dc2626; font-size: 1rem; cursor: pointer; }
.cart-line-remove:hover { background: #fee2e2; }
.cart-line-controls { grid-column: 1 / 2; grid-row: 2 / 3; display: flex; align-items: center; gap: .3rem; }
.qty-btn { width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--slate-300); background: #fff; font-weight: 700; font-size: .85rem; cursor: pointer; display: grid; place-items: center; }
.qty-btn:hover { background: var(--slate-100); }
.qty-input { width: 42px; height: 24px; padding: 0 .25rem; text-align: center; border: 1px solid var(--slate-300); border-radius: 6px; font-size: .8rem; font-family: inherit; }
.cart-line-price { margin-left: auto; font-weight: 800; color: var(--brand-600); }

.cart-totals { display: flex; flex-direction: column; gap: .4rem; padding: .5rem 0; border-top: 1px solid var(--slate-100); }
.tot-row { display: flex; justify-content: space-between; align-items: center; font-size: .88rem; color: var(--slate-700); }
.tot-input { width: 92px; height: 32px; text-align: right; padding: 0 .55rem; border: 1px solid var(--slate-300); border-radius: 8px; font-size: .85rem; font-family: inherit; }
.tot-total { font-size: 1.1rem; font-weight: 800; color: var(--slate-900); padding-top: .4rem; margin-top: .2rem; border-top: 2px dashed var(--slate-300); }

.cart-payment { display: flex; flex-direction: column; gap: .55rem; padding-top: .55rem; border-top: 1px solid var(--slate-100); }
.pay-methods { display: grid; grid-template-columns: repeat(4, 1fr); gap: .35rem; }
.pay-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem; padding: .5rem .2rem; background: #fff; border: 1px solid var(--slate-200); border-radius: 10px; font-weight: 600; font-size: .72rem; color: var(--slate-800); cursor: pointer; font-family: inherit; }
.pay-btn span { font-size: .68rem; }
.pay-btn:hover { background: var(--brand-50); border-color: var(--brand-200); }
.pay-btn.active { background: linear-gradient(135deg, var(--brand-500), var(--brand-700)); color: #fff; border-color: transparent; }

.cart-change { display: flex; flex-direction: column; gap: .25rem; }
.change-row { display: flex; justify-content: space-between; align-items: center; font-size: .88rem; }
.change-row strong { font-weight: 800; }

.cart-actions { display: flex; gap: .5rem; padding-top: .55rem; border-top: 1px solid var(--slate-100); }
.cart-actions .btn { height: 48px; padding: 0 1rem; }
.cart-actions .grow { flex: 1; display: flex; justify-content: space-between; align-items: center; }
.cart-actions .amount { font-weight: 800; }

/* Receipt */
.modal-receipt { width: min(560px, 100%); }
.rcpt { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: .82rem; line-height: 1.5; color: #0f172a; padding: .25rem 0; }
.rcpt-head { text-align: center; margin-bottom: .35rem; }
.rcpt-shop-name { margin: 0 0 .35rem; font-size: 1.05rem; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; }
.rcpt-shop-info { font-size: .76rem; color: #475569; line-height: 1.5; }
.rcpt-sep { border-top: 1px dashed #cbd5e1; margin: .5rem 0; }
.rcpt-sep.thin { margin: .35rem 0; border-top-style: dotted; }
.rcpt-meta { display: flex; flex-direction: column; gap: .15rem; }
.rcpt-meta-row { display: flex; justify-content: space-between; gap: .75rem; font-size: .8rem; }
.rcpt-meta-row span:first-child { color: #64748b; }
.rcpt-meta-row span:last-child  { text-align: right; font-weight: 600; }
.rcpt-items { display: flex; flex-direction: column; gap: .55rem; }
.rcpt-item { display: flex; flex-direction: column; gap: .1rem; }
.rcpt-item-name { font-weight: 600; font-size: .84rem; line-height: 1.35; }
.rcpt-item-calc { display: flex; justify-content: space-between; font-size: .75rem; color: #64748b; padding-left: .25rem; }
.rcpt-item-total { font-weight: 700; color: #0f172a; font-size: .8rem; }
.rcpt-totals { display: flex; flex-direction: column; gap: .2rem; }
.rcpt-total-row { display: flex; justify-content: space-between; gap: .75rem; font-size: .82rem; }
.rcpt-total-row span:first-child { color: #475569; }
.rcpt-total-row span:last-child  { font-weight: 600; }
.rcpt-grand { font-size: 1rem !important; font-weight: 800; padding: .35rem 0; }
.rcpt-grand span { color: #0f172a !important; font-weight: 800 !important; }
.rcpt-pay-method span:last-child { color: #16a34a; font-weight: 700; }
.rcpt-change  span:last-child { color: #16a34a; font-weight: 700; }
.rcpt-balance span:last-child { color: #dc2626; font-weight: 700; }
.rcpt-foot { text-align: center; padding-top: .35rem; }
.rcpt-thanks { font-weight: 700; font-size: .85rem; margin-bottom: .25rem; }
.rcpt-note { font-size: .72rem; color: #94a3b8; margin-bottom: .2rem; }
.rcpt-note + .rcpt-note { margin-top: -.1rem; }
.rcpt-powered { font-size: .68rem; color: #cbd5e1; letter-spacing: .06em; text-transform: uppercase; margin-top: .35rem; }

/* =========================================================
   14. MODALS
   ========================================================= */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15,23,42,.55); backdrop-filter: blur(4px); display: grid; place-items: center; z-index: 200; padding: 1rem; animation: fadeIn .15s var(--ease); }
.modal-backdrop[hidden] { display: none; }
.modal { background: #fff; border-radius: var(--radius-lg); width: min(480px, 100%); max-height: 90vh; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 40px 80px -20px rgba(15,23,42,.5); animation: slideUp .2s var(--ease); }
.modal.modal-wide { width: min(760px, 100%); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--slate-100); }
.modal-head h3 { margin: 0; font-size: 1.1rem; }
.modal-close { background: transparent; border: none; font-size: 1.5rem; cursor: pointer; color: var(--slate-400); line-height: 1; }
.modal-close:hover { color: var(--slate-800); }
.modal-body { padding: 1.5rem; overflow-y: auto; display: flex; flex-direction: column; gap: .9rem; }
.modal-body label { display: block; font-size: .85rem; font-weight: 600; color: var(--slate-700); }
.modal-body input, .modal-body textarea, .modal-body select { width: 100%; padding: .65rem .85rem; border: 1px solid var(--slate-300); border-radius: var(--radius-sm); font-size: .9rem; margin-top: .25rem; font-family: inherit; }
.modal-actions { display: flex; justify-content: flex-end; gap: .6rem; padding: 1rem 1.5rem; border-top: 1px solid var(--slate-100); background: var(--slate-50); }

/* =========================================================
   15. PAGE-SPECIFIC
   ========================================================= */

/* Products */
.products-layout { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 1.25rem; align-items: start; }
@media (max-width: 1000px) { .products-layout { grid-template-columns: 1fr; } }
.products-form .form-row { margin-bottom: .65rem; }
.products-form .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; margin-bottom: .65rem; }
@media (max-width: 500px) { .products-form .form-grid { grid-template-columns: 1fr; } }
.products-form label { display: block; font-size: .82rem; font-weight: 600; color: var(--slate-700); }
.products-form input, .products-form select, .products-form textarea { display: block; width: 100%; margin-top: .25rem; padding: .5rem .65rem; border: 1px solid var(--slate-300); border-radius: 8px; font-size: .88rem; font-family: inherit; background: #fff; }
.link-btn { background: transparent; border: none; color: var(--brand-500); font-size: .72rem; font-weight: 600; padding: .15rem 0; cursor: pointer; margin-top: .2rem; }
.link-btn:hover { color: var(--brand-700); text-decoration: underline; }
.products-table td { vertical-align: middle; }
.products-table .row-inactive { opacity: .55; }

/* Sales */
.sale-detail-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 1.25rem; align-items: start; }
.sale-detail-grid .dash-card-wide { grid-column: 1 / -1; }
@media (max-width: 900px) { .sale-detail-grid { grid-template-columns: 1fr; } }

/* Customers */
.cust-statement-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: flex-start; padding-bottom: 1rem; border-bottom: 1px solid var(--slate-100); margin-bottom: 1rem; }
.cust-tables { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1rem; }
@media (max-width: 900px) { .cust-tables { grid-template-columns: 1fr; } }

/* Purchases */
.purchase-lines { background: var(--slate-50); border: 1px solid var(--slate-200); border-radius: 10px; padding: .75rem; margin-top: .75rem; }
.purchase-totals { display: flex; justify-content: space-between; gap: 1rem; padding: .75rem 1rem; background: var(--slate-50); border-radius: 10px; margin-top: .75rem; }

/* Expenses */
.exp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
@media (max-width: 900px) { .exp-grid { grid-template-columns: 1fr; } }
.cat-breakdown { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .65rem; }
.cat-breakdown li { padding: .5rem 0; border-bottom: 1px solid var(--slate-100); }
.cat-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .35rem; font-size: .88rem; }
.cat-bar { height: 6px; background: var(--slate-100); border-radius: 999px; overflow: hidden; }
.cat-fill { height: 100%; background: linear-gradient(90deg, #f87171, #dc2626); border-radius: 999px; }

/* Reports */
.rep-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
@media (max-width: 900px) { .rep-grid { grid-template-columns: 1fr; } }
.report-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.report-charts .dash-card-wide { grid-column: 1 / -1; }
@media (max-width: 900px) { .report-charts { grid-template-columns: 1fr; } }
.snapshot-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; background: #fff; border: 1px solid var(--slate-200); border-radius: 14px; padding: 1rem 1.25rem; margin-bottom: 1.25rem; }
.snapshot-item { display: flex; flex-direction: column; gap: .15rem; text-align: center; }
.snapshot-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; color: var(--slate-500); }
.snapshot-item strong { font-size: 1.15rem; font-weight: 800; color: var(--slate-900); }
.plan-mix-list { list-style: none; padding: 0; margin: 0; }
.plan-mix-list li { padding: .6rem 0; border-bottom: 1px solid var(--slate-100); }
.plan-mix-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .35rem; font-size: .88rem; }
.plan-mix-bar { height: 6px; background: var(--slate-100); border-radius: 999px; overflow: hidden; }
.plan-mix-fill { height: 100%; background: linear-gradient(90deg, var(--brand-500), var(--brand-700)); border-radius: 999px; }

/* Settings */
.settings-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 1.25rem; align-items: start; }
@media (max-width: 1000px) { .settings-layout { grid-template-columns: 1fr; } }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-bottom: .75rem; }
.logo-row { display: flex; gap: 1.25rem; align-items: flex-start; flex-wrap: wrap; }
.logo-preview { width: 96px; height: 96px; border-radius: 14px; background: var(--slate-100); display: grid; place-items: center; overflow: hidden; flex-shrink: 0; border: 1px solid var(--slate-200); }
.logo-preview img { width: 100%; height: 100%; object-fit: cover; }
.logo-placeholder { font-size: 2.5rem; font-weight: 800; color: var(--slate-400); }

/* Subscription */
.sub-current-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--slate-100); margin-bottom: 1rem; }
.sub-plan-block { display: flex; flex-direction: column; gap: .15rem; }
.sub-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; color: var(--slate-500); }
.sub-usage { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 700px) { .sub-usage { grid-template-columns: 1fr; } }
.usage-item { display: flex; flex-direction: column; gap: .35rem; }
.usage-head { display: flex; justify-content: space-between; font-size: .85rem; color: var(--slate-600); }
.usage-bar { height: 8px; background: var(--slate-100); border-radius: 999px; overflow: hidden; }
.usage-fill { height: 100%; background: linear-gradient(90deg, var(--brand-500), var(--brand-700)); border-radius: 999px; }
.usage-fill.warn   { background: linear-gradient(90deg, #f59e0b, #d97706); }
.usage-fill.danger { background: linear-gradient(90deg, #ef4444, #dc2626); }
.sub-note { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--slate-100); }

/* Staff */
.staff-layout { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 1.25rem; align-items: start; }
@media (max-width: 1000px) { .staff-layout { grid-template-columns: 1fr; } }
.staff-form .form-row { margin-bottom: .75rem; }
.staff-form label { display: block; font-size: .85rem; font-weight: 600; color: var(--slate-700); }
.staff-form input, .staff-form select { display: block; width: 100%; margin-top: .25rem; padding: .55rem .7rem; border: 1px solid var(--slate-300); border-radius: 8px; font-size: .9rem; font-family: inherit; background: #fff; }
.staff-form input[readonly] { background: var(--slate-100); color: var(--slate-500); }
.staff-table td { vertical-align: middle; }
.staff-name { display: flex; align-items: center; gap: .6rem; }
.staff-name strong { display: block; font-size: .9rem; }
.staff-name .tag { display: inline-block; background: var(--brand-100); color: var(--brand-700); font-size: .68rem; font-weight: 700; padding: .05rem .4rem; border-radius: 999px; margin-left: .35rem; }
.role-badge { display: inline-block; padding: .15rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 700; background: var(--slate-100); color: var(--slate-600); }
.role-owner       { background: var(--warning-bg); color: var(--warning-fg); }
.role-manager     { background: var(--brand-100); color: var(--brand-700); }
.role-cashier     { background: var(--success-bg); color: var(--success-fg); }
.role-storekeeper { background: #ede9fe; color: #6d28d9; }
.role-accountant  { background: var(--danger-bg); color: var(--danger-fg); }
.role-salesperson { background: #cffafe; color: #155e75; }

/* =========================================================
   16. ADMIN
   ========================================================= */
body.admin { background: var(--slate-100); margin: 0; }
.admin-nav { background: linear-gradient(135deg, var(--slate-900), var(--brand-700)); color: #fff; position: sticky; top: 0; z-index: 100; }
.admin-nav-inner { max-width: 1400px; margin: 0 auto; padding: .9rem 1.5rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.admin-logo { display: inline-flex; align-items: center; gap: .55rem; color: #fff; font-weight: 800; font-size: 1rem; }
.admin-badge { display: inline-block; background: rgba(255,255,255,.2); color: #fff; font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; padding: .2rem .55rem; border-radius: 4px; margin-left: .35rem; }
.admin-nav-links { display: flex; gap: .25rem; flex-wrap: wrap; margin-left: 1.5rem; }
.admin-nav-links a { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem .85rem; border-radius: var(--radius-sm); color: rgba(255,255,255,.75); font-size: .86rem; font-weight: 500; }
.admin-nav-links a:hover { background: rgba(255,255,255,.12); color: #fff; }
.admin-nav-links a.active { background: rgba(255,255,255,.2); color: #fff; }
.admin-nav-user { margin-left: auto; display: flex; gap: .4rem; align-items: center; }
.admin-content { max-width: 1400px; margin: 0 auto; padding: 2rem 1.5rem; }
.admin-footer { max-width: 1400px; margin: 0 auto; padding: 1rem 1.5rem; display: flex; justify-content: space-between; font-size: .8rem; color: var(--slate-500); border-top: 1px solid var(--slate-200); }
@media (max-width: 900px) { .admin-nav-links { margin-left: 0; flex-basis: 100%; } .admin-nav-user { margin-left: 0; flex-basis: 100%; } }
.admin-users-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
@media (max-width: 900px) { .admin-users-layout { grid-template-columns: 1fr; } }
.tip-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 1rem; }
.tip-list li { display: flex; gap: .75rem; padding-bottom: .85rem; border-bottom: 1px solid var(--slate-100); }
.tip-list li:last-child { border-bottom: none; padding-bottom: 0; }
.tip-icon { font-size: 1.2rem; flex-shrink: 0; width: 28px; text-align: center; }
.shop-cell { display: flex; align-items: center; gap: .65rem; }
.shop-logo { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: linear-gradient(135deg, var(--brand-500), var(--brand-700)); color: #fff; font-weight: 800; font-size: .9rem; flex-shrink: 0; }
.plans-layout { display: grid; grid-template-columns: 1fr 320px; gap: 1rem; align-items: start; }
@media (max-width: 900px) { .plans-layout { grid-template-columns: 1fr; } }

/* =========================================================
   17. MULTI-BRANCH
   ========================================================= */
.topbar-branch { margin-left: auto; display: inline-flex; align-items: center; gap: .35rem; }
.branch-select { padding: .45rem .75rem; border: 1px solid var(--slate-200); border-radius: 10px; font-size: .85rem; font-weight: 600; background: #fff; color: var(--slate-800); font-family: inherit; cursor: pointer; }
.branch-select:hover { border-color: var(--brand-400); }
.branch-select:focus { outline: none; border-color: var(--brand-500); box-shadow: 0 0 0 4px rgba(99,102,241,.12); }
.topbar-branch-static { margin-left: auto; font-size: .82rem; font-weight: 600; color: var(--slate-600); padding: .4rem .75rem; background: var(--slate-100); border-radius: 8px; white-space: nowrap; }
.branches-layout { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 1.25rem; align-items: start; }
@media (max-width: 1000px) { .branches-layout { grid-template-columns: 1fr; } }

/* =========================================================
   18. PRICING PAGE
   ========================================================= */
.pricing-hero { padding: 5rem 1.5rem 3rem; background: radial-gradient(circle at 15% 20%, rgba(99,102,241,.08), transparent 55%), radial-gradient(circle at 85% 30%, rgba(6,182,212,.08), transparent 55%), linear-gradient(180deg, #ffffff 0%, #f8fafc 100%); text-align: center; }
.pricing-hero-inner { max-width: 780px; margin: 0 auto; }
.pricing-hero .eyebrow { display: inline-block; padding: .35rem .85rem; background: var(--brand-50); color: var(--brand-700); border-radius: 999px; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 1rem; }
.pricing-hero h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); letter-spacing: -.035em; font-weight: 900; margin: 0 0 1rem; line-height: 1.1; }
.pricing-hero .section-sub { font-size: 1.15rem; color: var(--slate-600); max-width: 620px; margin: 0 auto; }
.pricing-trust { list-style: none; padding: 0; margin: 2rem auto 0; display: flex; gap: 1.75rem; flex-wrap: wrap; justify-content: center; color: var(--slate-600); font-size: .9rem; }
.pricing-trust li { display: inline-flex; align-items: center; gap: .4rem; }

.pricing-plans { max-width: 1200px; margin: 0 auto; padding: 1.5rem 1.5rem 4rem; }
.pricing-plans .plans,
.plans,
.plans-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.25rem; align-items: stretch; }

.plan-card,
.pricing-plans .plan-card,
.plans-grid .plan-card { position: relative; display: flex; flex-direction: column; padding: 1.75rem 1.5rem 1.5rem; border: 1px solid var(--slate-200); border-radius: 16px; background: #fff; box-shadow: 0 1px 2px rgba(15,23,42,.04); transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease); min-height: 100%; }
.plan-card:hover { transform: translateY(-3px); box-shadow: 0 20px 40px -22px rgba(15,23,42,.28); }
.plan-card.featured { border-color: var(--brand-500); box-shadow: 0 24px 48px -20px rgba(79,70,229,.35); transform: translateY(-4px); background: linear-gradient(180deg, #f5f7ff 0%, #ffffff 45%); }
.plan-card.plan-enterprise { background: linear-gradient(180deg, #fffbeb 0%, #ffffff 55%); border-color: #fcd34d; }
.plan-card.current { border-color: #16a34a; background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 80%); }
.plan-card h3 { margin: 0 0 .35rem; font-size: 1.2rem; font-weight: 800; letter-spacing: -.02em; }
.plan-card .plan-tagline { margin: 0; font-size: .85rem; color: var(--slate-500); line-height: 1.45; }
.plan-card .price { margin: .35rem 0 .5rem; font-size: 2.15rem; font-weight: 800; letter-spacing: -.035em; color: var(--slate-900); display: flex; align-items: baseline; gap: .35rem; }
.plan-card .price small { font-size: .85rem; color: var(--slate-500); font-weight: 500; letter-spacing: 0; }
.plan-card .price.is-custom { font-size: 1.85rem; }
.plan-card ul { list-style: none; padding: 0; margin: 1rem 0 1.5rem; display: flex; flex-direction: column; gap: 0; flex: 1; }
.plan-card ul li { display: flex; align-items: flex-start; gap: .55rem; padding: .5rem 0; border-bottom: 1px solid var(--slate-100); font-size: .9rem; color: var(--slate-600); line-height: 1.5; }
.plan-card ul li:last-child { border-bottom: none; }
.plan-card ul li::before { content: "✓"; color: var(--success-fg); font-weight: 800; flex-shrink: 0; line-height: 1.5; }
.plan-card .btn { margin-top: auto; width: 100%; justify-content: center; padding: .85rem 1.25rem; font-size: .95rem; }
.plan-card .badge { position: absolute; top: 1rem; right: 1rem; background: linear-gradient(135deg, var(--brand-500), var(--brand-700)); color: #fff; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: .3rem .7rem; border-radius: 999px; box-shadow: 0 8px 20px -6px rgba(79,70,229,.5); }
.plan-card .badge.badge-trial { background: linear-gradient(135deg, #22c55e, #16a34a); box-shadow: 0 8px 20px -6px rgba(34,197,94,.5); }
.plan-card .badge.badge-custom { background: linear-gradient(135deg, #f59e0b, #d97706); box-shadow: 0 8px 20px -6px rgba(217,119,6,.5); }

.compare-section { max-width: 1200px; margin: 0 auto; padding: 4rem 1.5rem; }
.compare-section .section-head { text-align: center; max-width: 720px; margin: 0 auto 2.5rem; }
.compare-section .eyebrow { display: inline-block; padding: .35rem .85rem; background: var(--brand-50); color: var(--brand-700); border-radius: 999px; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 1rem; }
.compare-section h2 { font-size: clamp(1.6rem, 3.2vw, 2.25rem); letter-spacing: -.025em; margin: 0 0 .6rem; font-weight: 800; }
.compare-wrap { overflow-x: auto; border-radius: 16px; border: 1px solid var(--slate-200); background: #fff; box-shadow: var(--shadow-sm); }
.compare-table { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 640px; }
.compare-table th, .compare-table td { padding: 1rem .85rem; text-align: center; border-bottom: 1px solid var(--slate-100); }
.compare-table th:first-child, .compare-table td:first-child { text-align: left; padding-left: 1.5rem; font-weight: 600; color: var(--slate-700); }
.compare-table thead th { background: var(--slate-50); font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--slate-600); border-bottom: 2px solid var(--slate-200); }
.compare-table tbody tr:hover { background: var(--slate-50); }
.compare-table .featured-col { background: #f0f9ff; font-weight: 700; color: var(--brand-700); }
.compare-table tbody tr:hover .featured-col { background: #e0f2fe; }
.compare-table .yes { color: var(--success-fg); font-weight: 800; }
.compare-table .no  { color: var(--slate-300); font-weight: 700; }
.compare-table tbody tr:last-child td { border-bottom: none; }

.faq-section { max-width: 1200px; margin: 0 auto; padding: 3rem 1.5rem 5rem; }
.faq-section .section-head { text-align: center; max-width: 720px; margin: 0 auto 2.5rem; }
.faq-section .eyebrow { display: inline-block; padding: .35rem .85rem; background: var(--brand-50); color: var(--brand-700); border-radius: 999px; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 1rem; }
.faq-section h2 { font-size: clamp(1.6rem, 3.2vw, 2.25rem); letter-spacing: -.025em; margin: 0 0 .6rem; font-weight: 800; }
.faq-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; max-width: 1000px; margin: 0 auto; }
.faq { background: #fff; border: 1px solid var(--slate-200); border-radius: 14px; padding: 1.15rem 1.35rem; transition: border-color .15s, box-shadow .15s; }
.faq:hover { border-color: var(--brand-200); box-shadow: var(--shadow-sm); }
.faq summary { cursor: pointer; font-weight: 700; color: var(--slate-900); list-style: none; font-size: .95rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brand-500); font-weight: 800; font-size: 1.15rem; flex-shrink: 0; transition: transform .2s ease; }
.faq[open] summary::after { content: "−"; }
.faq p { margin: .75rem 0 0; color: var(--slate-600); font-size: .92rem; line-height: 1.6; }

@media (max-width: 900px) {
    .pricing-hero { padding: 3.5rem 1.25rem 2rem; }
    .pricing-plans { padding: 1rem 1.25rem 3rem; }
    .compare-section { padding: 3rem 1.25rem; }
    .faq-section { padding: 2rem 1.25rem 4rem; }
}
@media (max-width: 640px) {
    .plan-card .price { font-size: 1.85rem; }
    .plan-card { padding: 1.75rem 1.35rem 1.35rem; }
}

/* =========================================================
   19. PRINT
   ========================================================= */
@media print {
    body * { visibility: hidden; }
    #receiptContent, #receiptContent *,
    #saleReceipt, #saleReceipt * { visibility: visible; }
    #receiptContent, #saleReceipt {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        max-width: 80mm;
        padding: 0;
        margin: 0;
        border: none;
        background: #fff;
        font-size: 11pt;
        line-height: 1.35;
    }
    .modal-head, .modal-actions { display: none !important; }
    .modal-backdrop { position: static; background: #fff; padding: 0; }
    .modal { box-shadow: none; width: 100%; max-height: none; border-radius: 0; }
    .sidebar, .app-topbar, .app-footer, .impersonate-banner,
    .page-head, .page-actions, .dash-card-head { display: none !important; }
    .app-main { margin-left: 0; }
    .rcpt { font-size: 11pt; padding: 0; }
    .rcpt-sep { border-top-color: #000; }
    .pos-wrap { display: none; }
    @page { size: 80mm auto; margin: 0; }
}
/* =========================================================
   PRICING PAGE — premium interface
   ========================================================= */

/* ---------- HERO ---------- */
.pricing-hero {
    position: relative;
    padding: 5.5rem 1.5rem 3.5rem;
    overflow: hidden;
    text-align: center;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}
.pricing-hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}
.pricing-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: .55;
}
.pb-1 { width: 440px; height: 440px; background: #a5b4fc; top: -140px; right: -100px; }
.pb-2 { width: 380px; height: 380px; background: #67e8f9; bottom: -160px; left: -120px; opacity: .45; }
.pb-3 { width: 300px; height: 300px; background: #c084fc; top: 30%; left: 50%; transform: translateX(-50%); opacity: .25; }

.pricing-hero-inner {
    max-width: 780px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}
.pricing-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    padding: .45rem .95rem;
    background: rgba(99,102,241,.10);
    color: #4338ca;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 1.25rem;
}
.pricing-eyebrow .dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34,197,94,.2);
    animation: pulse 2s infinite;
}
.pricing-hero h1 {
    font-size: clamp(2.25rem, 5vw, 3.5rem);
    line-height: 1.05;
    letter-spacing: -.035em;
    font-weight: 900;
    margin: 0 0 1rem;
}
.pricing-hero .gradient-text {
    background: linear-gradient(135deg, #4f46e5 0%, #a855f7 50%, #06b6d4 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}
.pricing-hero .section-sub {
    font-size: 1.15rem;
    color: #475569;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}
.pricing-trust {
    list-style: none;
    padding: 0;
    margin: 2rem auto 0;
    display: flex;
    gap: 1.75rem;
    flex-wrap: wrap;
    justify-content: center;
    color: #475569;
    font-size: .92rem;
}
.pricing-trust li {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    background: #fff;
    padding: .45rem .9rem;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.pricing-trust .check {
    background: #dcfce7;
    color: #166534;
    width: 16px; height: 16px;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    font-size: .65rem;
    font-weight: 800;
}

/* ---------- PLAN CARDS ---------- */
.pricing-plans {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem 5rem;
}
.pricing-plans .plans {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    align-items: stretch;
}

.plan-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 2rem 1.75rem 1.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15,23,42,.04);
    transition: transform .25s cubic-bezier(.2,.8,.2,1),
                box-shadow .25s cubic-bezier(.2,.8,.2,1),
                border-color .25s ease;
    min-height: 100%;
}
.plan-card:hover {
    transform: translateY(-4px);
    border-color: #c7d2fe;
    box-shadow: 0 24px 48px -24px rgba(79,70,229,.35);
}
.plan-card.featured {
    border: 2px solid transparent;
    background:
        linear-gradient(#fff, #fff) padding-box,
        linear-gradient(135deg, #6366f1, #a855f7, #06b6d4) border-box;
    box-shadow: 0 24px 48px -20px rgba(99,102,241,.4);
    transform: translateY(-6px);
}
.plan-card.featured:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 60px -22px rgba(99,102,241,.5);
}
.plan-card.plan-enterprise {
    background:
        linear-gradient(180deg, #fffbeb 0%, #ffffff 55%);
    border-color: #fcd34d;
}
.plan-card.plan-enterprise:hover {
    border-color: #f59e0b;
    box-shadow: 0 24px 48px -24px rgba(245,158,11,.35);
}

/* ---------- HEAD ---------- */
.plan-card .plan-head { margin-bottom: 1.25rem; }
.plan-card .plan-head h3 {
    margin: 0 0 .35rem;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -.02em;
    color: #0f172a;
}
.plan-card .plan-tagline {
    margin: 0;
    font-size: .88rem;
    color: #64748b;
    line-height: 1.45;
}

/* ---------- PRICE ---------- */
.plan-card .price {
    margin: .25rem 0 .25rem;
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: -.04em;
    color: #0f172a;
    display: flex;
    align-items: baseline;
    gap: .35rem;
    line-height: 1;
}
.plan-card .price small {
    font-size: .9rem;
    color: #64748b;
    font-weight: 500;
    letter-spacing: 0;
}
.plan-card .price.is-custom {
    font-size: 2.1rem;
}
.plan-card .plan-annual {
    margin: .35rem 0 1rem;
    font-size: .85rem;
    color: #64748b;
}
.plan-card .save-badge {
    display: inline-block;
    padding: .15rem .55rem;
    border-radius: 999px;
    background: #dcfce7;
    color: #166534;
    font-size: .72rem;
    font-weight: 800;
    margin-left: .35rem;
    letter-spacing: .01em;
}

/* ---------- FEATURES ---------- */
.plan-card .plan-limits {
    list-style: none;
    padding: 0;
    margin: .5rem 0 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.plan-card .plan-limits li {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    padding: .55rem 0;
    font-size: .9rem;
    color: #334155;
    line-height: 1.5;
    border-bottom: 1px solid #f1f5f9;
}
.plan-card .plan-limits li:last-child { border-bottom: none; }
.plan-card .plan-limits li::before {
    content: "";
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #dcfce7 url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23166534' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>") center/11px 11px no-repeat;
    margin-top: 3px;
}

/* ---------- CTA ---------- */
.plan-card .plan-cta {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: .6rem;
}
.plan-card .plan-cta .btn {
    justify-content: center;
    padding: .9rem 1.25rem;
    font-size: .95rem;
    font-weight: 700;
    border-radius: 12px;
}
.plan-card .plan-cta .btn.primary {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    box-shadow: 0 10px 22px -10px rgba(79,70,229,.6);
}
.plan-card .plan-cta .btn.primary:hover {
    box-shadow: 0 14px 28px -10px rgba(79,70,229,.75);
}
.plan-card .plan-cta-note {
    margin: 0;
    text-align: center;
    font-size: .78rem;
    color: #94a3b8;
}

/* ---------- BILLING TOGGLE ---------- */
.plan-card .cycle-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #f1f5f9;
    border-radius: 12px;
    padding: .25rem;
    gap: .2rem;
    margin-bottom: .35rem;
}
.plan-card .cycle-opt {
    background: transparent;
    border: none;
    padding: .6rem .4rem;
    border-radius: 10px;
    font-family: inherit;
    font-size: .78rem;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .15rem;
    line-height: 1.15;
    transition: background .15s, color .15s, box-shadow .15s;
}
.plan-card .cycle-opt small {
    font-size: .7rem;
    font-weight: 600;
    color: #94a3b8;
}
.plan-card .cycle-opt:hover { color: #4f46e5; }
.plan-card .cycle-opt.active {
    background: #fff;
    color: #4f46e5;
    box-shadow: 0 2px 6px rgba(15,23,42,.1);
}
.plan-card .cycle-opt.active small { color: #4f46e5; }

/* Cycle link button — "Choose Monthly GHS 100" */
.plan-card .cycle-link {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .45rem;
    flex-wrap: wrap;
}
.plan-card .cycle-link .cycle-label {
    font-weight: 500;
    opacity: .9;
}
.plan-card .cycle-link .cycle-amount {
    font-weight: 800;
}

/* ---------- BADGES ---------- */
.plan-card .badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    font-size: .68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
    padding: .35rem .85rem;
    border-radius: 999px;
    box-shadow: 0 10px 20px -8px rgba(79,70,229,.65);
    white-space: nowrap;
    z-index: 2;
}
.plan-card .badge.badge-trial {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    box-shadow: 0 10px 20px -8px rgba(34,197,94,.6);
}
.plan-card .badge.badge-custom {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 10px 20px -8px rgba(217,119,6,.6);
}

/* Featured card adds top padding so badge clears head */
.plan-card.featured { padding-top: 2.5rem; }
.plan-card.featured .plan-head { margin-top: .25rem; }

/* =========================================================
   COMPARE — modern
   ========================================================= */
.compare-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 1.5rem;
}
.compare-section .section-head { text-align: center; margin-bottom: 2.5rem; }
.compare-section .section-head .eyebrow {
    display: inline-block;
    padding: .35rem .85rem;
    background: rgba(99,102,241,.1);
    color: #4338ca;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 1rem;
}
.compare-section .section-head h2 {
    font-size: clamp(1.6rem, 3.2vw, 2.25rem);
    letter-spacing: -.025em;
    font-weight: 800;
    margin: 0 0 .5rem;
}
.compare-section .section-sub { color: #475569; margin: 0; }

.compare-wrap {
    overflow-x: auto;
    border-radius: 18px;
    border: 1px solid #e2e8f0;
    background: #fff;
    box-shadow: 0 20px 40px -30px rgba(15,23,42,.2);
}
.compare-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .92rem;
    min-width: 680px;
}
.compare-table th,
.compare-table td {
    padding: 1rem .85rem;
    text-align: center;
    border-bottom: 1px solid #f1f5f9;
}
.compare-table th:first-child,
.compare-table td:first-child {
    text-align: left;
    padding-left: 1.5rem;
    color: #334155;
}
.compare-table thead th {
    background: #f8fafc;
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #475569;
    border-bottom: 2px solid #e2e8f0;
}
.compare-table tbody tr:hover { background: #f8fafc; }
.compare-table .featured-col {
    background: #f0f9ff;
    font-weight: 700;
    color: #4338ca;
}
.compare-table tbody tr:hover .featured-col { background: #e0f2fe; }
.compare-table .yes { color: #16a34a; font-weight: 800; }
.compare-table .no  { color: #cbd5e1; font-weight: 700; }
.compare-table tbody tr:last-child td { border-bottom: none; }

/* =========================================================
   FAQ — modern
   ========================================================= */
.faq-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1.5rem 5rem;
}
.faq-section .section-head { text-align: center; margin-bottom: 2.5rem; }
.faq-section .section-head .eyebrow {
    display: inline-block;
    padding: .35rem .85rem;
    background: rgba(99,102,241,.1);
    color: #4338ca;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 1rem;
}
.faq-section .section-head h2 {
    font-size: clamp(1.6rem, 3.2vw, 2.25rem);
    letter-spacing: -.025em;
    font-weight: 800;
    margin: 0;
}
.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    max-width: 1000px;
    margin: 0 auto;
}
.faq {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.25rem 1.4rem;
    transition: border-color .15s, box-shadow .15s, transform .15s;
}
.faq:hover {
    border-color: #c7d2fe;
    box-shadow: 0 12px 28px -20px rgba(79,70,229,.35);
    transform: translateY(-1px);
}
.faq[open] {
    border-color: #c7d2fe;
    box-shadow: 0 12px 28px -20px rgba(79,70,229,.35);
}
.faq summary {
    cursor: pointer;
    font-weight: 700;
    color: #0f172a;
    list-style: none;
    font-size: .95rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: "+";
    display: inline-grid;
    place-items: center;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: #eef2ff;
    color: #4f46e5;
    font-weight: 800;
    font-size: .95rem;
    line-height: 1;
    flex-shrink: 0;
    transition: transform .2s ease, background .2s ease;
}
.faq[open] summary::after {
    content: "−";
    background: #4f46e5;
    color: #fff;
}
.faq p {
    margin: .75rem 0 0;
    color: #475569;
    font-size: .92rem;
    line-height: 1.6;
}

/* =========================================================
   CTA BAND — bottom
   ========================================================= */
.cta-band {
    padding: clamp(3rem, 7vw, 4.5rem) 1.5rem;
    background:
        radial-gradient(circle at 20% 20%, rgba(255,255,255,.15), transparent 55%),
        linear-gradient(135deg, #4f46e5 0%, #a855f7 50%, #06b6d4 100%);
    color: #fff;
    text-align: center;
    margin-top: 4rem;
    position: relative;
    overflow: hidden;
}
.cta-band-inner { max-width: 720px; margin: 0 auto; position: relative; z-index: 1; }
.cta-band h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); margin: 0 0 .75rem; font-weight: 800; letter-spacing: -.03em; }
.cta-band p { margin: 0 0 2rem; opacity: .95; font-size: 1.1rem; }
.cta-band .cta-row { justify-content: center; margin-top: 1.5rem; }
.cta-band .btn.primary {
    background: #fff; color: #4f46e5;
    box-shadow: 0 12px 30px -10px rgba(255,255,255,.4);
}
.cta-band .btn.primary:hover { background: #f1f5f9; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 900px) {
    .pricing-hero { padding: 3.5rem 1.25rem 2rem; }
    .pricing-plans { padding: 1rem 1.25rem 3rem; }
    .compare-section { padding: 3rem 1.25rem; }
    .faq-section { padding: 2rem 1.25rem 4rem; }
}
@media (max-width: 640px) {
    .plan-card { padding: 1.75rem 1.35rem 1.5rem; }
    .plan-card.featured { padding-top: 2.25rem; }
    .plan-card .price { font-size: 2.1rem; }
    .plan-card .price.is-custom { font-size: 1.85rem; }
    .plan-card .plan-head h3 { font-size: 1.2rem; }
    .pricing-trust { gap: .6rem; }
}
.ds-wrap {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.1rem 1.25rem 1rem;
    margin: 1rem 0 1.25rem;
    box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.ds-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: .85rem;
    gap: .5rem;
    flex-wrap: wrap;
}
.ds-head h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -.01em;
}
.ds-head .ds-sub {
    font-size: .78rem;
    color: #64748b;
}
.ds-list {
    display: flex;
    flex-direction: column;
}
.ds-row {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 1rem;
    align-items: center;
    padding: .65rem 0;
    border-top: 1px solid #f1f5f9;
}
.ds-row:first-child { border-top: 0; padding-top: .15rem; }
.ds-row:last-child  { padding-bottom: .15rem; }

.ds-date {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    line-height: 1.2;
}
.ds-date .ds-day {
    font-size: .85rem;
    font-weight: 700;
    color: #0f172a;
}
.ds-date .ds-meta {
    font-size: .72rem;
    color: #94a3b8;
    font-weight: 500;
}

.ds-bars {
    display: flex;
    flex-direction: column;
    gap: .45rem;
}
.ds-bar-line {
    display: grid;
    grid-template-columns: 48px 1fr 120px;
    align-items: center;
    gap: .65rem;
    font-size: .78rem;
}
.ds-bar-line .ds-label {
    color: #64748b;
    font-weight: 500;
}
.ds-track {
    position: relative;
    background: #f1f5f9;
    height: 12px;
    border-radius: 8px;
    overflow: hidden;
    width: 100%;
    min-width: 40px;
}
.ds-fill {
    position: absolute;
    inset: 0 auto 0 0;
    height: 100%;
    border-radius: 8px;
    transition: width .35s ease;
    min-width: 4px;
}
.ds-fill-sales  { background: linear-gradient(90deg,#0ea5e9,#38bdf8); }
.ds-fill-profit { background: linear-gradient(90deg,#16a34a,#4ade80); }
.ds-fill-loss   { background: linear-gradient(90deg,#dc2626,#f87171); }

.ds-value {
    text-align: right;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #0f172a;
    font-size: .82rem;
    white-space: nowrap;
}
.ds-value.pos { color: #16a34a; }
.ds-value.neg { color: #dc2626; }

.ds-total {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 1rem;
    align-items: center;
    padding-top: .85rem;
    margin-top: .35rem;
    border-top: 2px solid #e2e8f0;
}
.ds-total .ds-day  { font-size: .85rem; font-weight: 700; color: #0f172a; }
.ds-total .ds-meta { font-size: .72rem; color: #94a3b8; font-weight: 500; }
.ds-total-values {
    display: flex;
    gap: 1.5rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}
.ds-total-values .ds-tv {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: .1rem;
}
.ds-total-values .ds-tv-label {
    font-size: .68rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-weight: 600;
}
.ds-total-values .ds-tv-value {
    font-size: .95rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: #0f172a;
}
.ds-total-values .ds-tv-value.pos { color: #16a34a; }
.ds-total-values .ds-tv-value.neg { color: #dc2626; }

@media (max-width: 640px) {
    .ds-row,
    .ds-total { grid-template-columns: 1fr; gap: .5rem; }
    .ds-bar-line { grid-template-columns: 44px 1fr 100px; gap: .5rem; }
    .ds-total-values { justify-content: flex-start; gap: 1rem; }
}
/* ===== Nav logo ===== */
.nav-logo {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    text-decoration: none;
    color: inherit;
    font-weight: 700;
    font-size: 1.05rem;
    line-height: 1;
    padding: .25rem 0;
}
.nav-logo:hover { opacity: .9; }

.nav-logo-img {
    display: block;
    height: 32px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
}
.nav-logo-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
}

.nav-logo-mark {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, #0ea5e9, #6366f1);
    color: #fff;
    font-size: 1.1rem;
    line-height: 1;
    box-shadow: 0 1px 3px rgba(15,23,42,.15);
}

@media (max-width: 640px) {
    .nav-logo-img { height: 26px; max-width: 120px; }
    .nav-logo-text { max-width: 130px; font-size: .95rem; }
}
/* ===== Admin nav logo ===== */
.admin-logo {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    text-decoration: none;
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    line-height: 1;
    white-space: nowrap;
}

.admin-logo-img {
    display: block;
    height: 28px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
}

.admin-logo-text {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-logo .logo-mark {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background: linear-gradient(135deg, #0ea5e9, #6366f1);
    color: #fff;
    font-size: 1rem;
    line-height: 1;
    box-shadow: 0 1px 3px rgba(0,0,0,.35);
}

.admin-badge {
    display: inline-block;
    padding: .15rem .45rem;
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    background: #0ea5e9;
    color: #fff;
    border-radius: 999px;
    margin-left: .15rem;
    vertical-align: middle;
}

/* Nav links spacing consistency */
.admin-nav-links { display: flex; gap: .15rem; flex-wrap: wrap; align-items: center; }
.admin-nav-links a {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .4rem .65rem;
    border-radius: 6px;
    color: #cbd5e1;
    font-size: .85rem;
    text-decoration: none;
    transition: background .15s, color .15s;
}
.admin-nav-links a:hover { background: #1e293b; color: #fff; }
.admin-nav-links a.active {
    background: #0ea5e9;
    color: #fff;
    font-weight: 600;
}

/* Responsive tweaks */
@media (max-width: 900px) {
    .admin-nav-links a span:not(:first-child) {
        /* hide label text on small screens, keep emoji */
    }
    .admin-logo-img { height: 24px; max-width: 120px; }
}
@media (max-width: 640px) {
    .admin-nav-links a { padding: .4rem .5rem; font-size: .78rem; }
    .admin-nav-links a { gap: .2rem; }
    .admin-logo-text { display: none; }
    .admin-logo-img { max-width: 100px; }
}