/* ============================================================
   EAZYDEV STOCK MANAGER — Glassmorphism Theme
   Brand palette preserved from existing login (#6366f1 indigo)
   ============================================================ */

:root {
    --brand-50:   #eef2ff;
    --brand-100:  #e0e7ff;
    --brand-200:  #c7d2fe;
    --brand-500:  #6366f1;
    --brand-600:  #4f46e5;
    --brand-700:  #4338ca;
    --accent-500: #8b5cf6;
    --accent-600: #7c3aed;

    --success: #10b981;
    --success-soft: rgba(16, 185, 129, 0.12);
    --danger:  #ef4444;
    --danger-soft: rgba(239, 68, 68, 0.12);
    --warning: #f59e0b;
    --warning-soft: rgba(245, 158, 11, 0.14);
    --info:    #0ea5e9;

    --ink-900: #0f172a;
    --ink-700: #334155;
    --ink-500: #64748b;
    --ink-400: #94a3b8;
    --ink-200: #e2e8f0;
    --ink-100: #f1f5f9;
    --ink-50:  #f8fafc;

    --glass-bg:        rgba(255, 255, 255, 0.55);
    --glass-bg-strong: rgba(255, 255, 255, 0.78);
    --glass-border:    rgba(255, 255, 255, 0.65);
    --glass-shadow:    0 12px 40px rgba(31, 38, 135, 0.12);
    --glass-shadow-lg: 0 20px 60px rgba(31, 38, 135, 0.18);

    --radius-sm: 10px;
    --radius:    14px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --sidebar-w: 248px;

    /* ---------- v3.3 — Ultrawide containment system ---------- */
    --dashboard-max-width: 1500px;   /* authenticated app content cap */
    --public-max-width:    1180px;   /* marketing / public pages cap */
    --content-padding:     clamp(16px, 3vw, 32px);
}

* { box-sizing: border-box; }

html, body {
    font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--ink-900);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: #eef1ff;
    max-width: 100%;
    /* `clip` (NOT `hidden`) kills horizontal scroll WITHOUT turning body into
       its own scroll container — `overflow-x:hidden` forces overflow-y to
       compute to `auto`, which silently breaks `position:sticky` on the
       sidebar + topbar. Keep this as `clip`. */
    overflow-x: clip;
}

/* Form controls must never force their container wider than the viewport. */
input, select, textarea, .form-control, .form-select, .premium-form-control { min-width: 0; }
/* Long unbroken strings (SKUs, emails) wrap instead of overflowing. */
.product-cell, .sku-pill, td, .cc-primary { overflow-wrap: anywhere; }

/* ---------- Aurora animated background ---------- */
body.app-shell {
    min-height: 100vh;
    background:
        radial-gradient(1100px 600px at 80% -10%, rgba(139, 92, 246, 0.28), transparent 60%),
        radial-gradient(900px 500px at -10% 20%, rgba(99, 102, 241, 0.30), transparent 60%),
        radial-gradient(800px 500px at 50% 110%, rgba(14, 165, 233, 0.22), transparent 60%),
        linear-gradient(135deg, #f5f7ff 0%, #eef2ff 50%, #fdf4ff 100%);
    background-attachment: fixed;
}

body.auth-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;                 /* horizontal centering (cross-axis, scroll-safe) */
    padding: clamp(20px, 4vw, 56px);
    overflow-y: auto;                    /* tall forms scroll instead of clipping */
    background:
        radial-gradient(800px 500px at 80% 10%, rgba(139, 92, 246, 0.40), transparent 60%),
        radial-gradient(800px 500px at 10% 90%, rgba(99, 102, 241, 0.45), transparent 60%),
        linear-gradient(135deg, #6366f1 0%, #8b5cf6 60%, #ec4899 100%);
}
/* Vertical-center the card with auto margins — this keeps the top reachable
   when the form is taller than the viewport (the classic flex-center clip fix). */
body.auth-shell > * { margin-top: auto; margin-bottom: auto; width: 100%; }
body.auth-shell > .auth-split { max-width: 1080px; }

/* ---------- Layout shell ---------- */
.app-layout {
    display: grid;
    grid-template-columns: var(--sidebar-w) 1fr;
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 22px 16px;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(22px) saturate(160%);
    -webkit-backdrop-filter: blur(22px) saturate(160%);
    border-right: 1px solid var(--glass-border);
    box-shadow: 4px 0 30px rgba(31, 38, 135, 0.06);
    z-index: 50;
    display: flex;
    flex-direction: column;
    overflow: hidden;            /* nav scrolls internally, not the whole sidebar */
}

.sidebar .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 6px 22px 6px;
    border-bottom: 1px solid var(--ink-200);
    margin-bottom: 16px;
    flex-shrink: 0;              /* brand stays fixed at top */
}

/* Scrollable nav region — fills space between brand and footer */
.sidebar-nav {
    flex: 1 1 auto;
    overflow-y: auto;
    min-height: 0;               /* critical: lets a flex child actually scroll */
    margin: 0 -6px;              /* let scrollbar sit at the edge */
    padding: 0 6px;
    scrollbar-width: thin;
    scrollbar-color: rgba(99,102,241,0.35) transparent;
}
.sidebar-nav::-webkit-scrollbar { width: 6px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(99,102,241,0.30); border-radius: 999px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar .brand img { width: 100%; max-width: 200px; height: auto; }

.nav-section-label {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--ink-400);
    text-transform: uppercase;
    letter-spacing: 1.4px;
    padding: 16px 12px 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 12px;
    color: var(--ink-700);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
    transition: all 0.2s ease;
    position: relative;
}
.nav-item i { font-size: 18px; width: 20px; text-align: center; }
.nav-item:hover {
    background: rgba(99, 102, 241, 0.08);
    color: var(--brand-700);
    transform: translateX(2px);
}
.nav-item.active {
    background: linear-gradient(135deg, var(--brand-500), var(--accent-500));
    color: #fff;
    box-shadow: 0 8px 22px rgba(99, 102, 241, 0.32);
}
.nav-item.active i { color: #fff; }

/* ---------- Collapsible nav groups (v3.48) ---------- */
.nav-group { margin-bottom: 2px; }
.nav-group__head {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 12px;
    border: none;
    background: transparent;
    color: var(--ink-500);
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease;
}
.nav-group__head:hover { background: rgba(99, 102, 241, 0.06); color: var(--brand-700); }
.nav-group__head:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
    color: var(--brand-700);
}
.nav-group__head > .ez-ico:first-child { color: var(--brand-500); flex: 0 0 auto; }
.nav-group.open > .nav-group__head { color: var(--ink-700); }

/* The group that holds the current page reads as "selected" even at a glance:
   brand-tinted header + a soft brand wash, so the active SECTION is obvious
   (v3.49). Pairs with the single-open accordion in ez-nav.js. */
.nav-group:has(.nav-item.active) > .nav-group__head {
    color: var(--brand-700);
    background: rgba(99, 102, 241, 0.07);
}
.nav-group:has(.nav-item.active) > .nav-group__head > .ez-ico:first-child { color: var(--brand-600); }
.nav-group__label {
    flex: 1 1 auto; text-align: left; min-width: 0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nav-group__chev {
    flex: 0 0 auto; display: inline-flex; color: var(--ink-400);
    transition: transform 0.24s ease;
}
.nav-group.open > .nav-group__head .nav-group__chev { transform: rotate(180deg); }

/* Smooth height collapse via the grid 0fr→1fr trick (no JS height measuring).
   `visibility:hidden` on the closed panel removes its links from tab order +
   pointer events; it stays visible through the close animation via the
   visibility transition delay. */
.nav-group__panel {
    display: grid;
    grid-template-rows: 0fr;
    visibility: hidden;
    transition: grid-template-rows 0.26s ease, visibility 0.26s;
}
.nav-group.open > .nav-group__panel {
    grid-template-rows: 1fr;
    visibility: visible;
    transition: grid-template-rows 0.26s ease;
}
.nav-group__inner { overflow: hidden; min-height: 0; padding-left: 4px; }
.nav-group__inner .nav-item { font-size: 13.5px; padding: 9px 12px; }

/* Count badges (e.g. pending approvals). */
.nav-badge {
    flex: 0 0 auto;
    min-width: 18px; height: 18px; padding: 0 5px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 10.5px; font-weight: 800; line-height: 1;
    color: #fff; background: linear-gradient(135deg, #ef4444, #f97316);
    border-radius: 999px;
}
.nav-badge--inline { margin-left: auto; }
.nav-item.active .nav-badge { background: rgba(255, 255, 255, 0.28); }

@media (prefers-reduced-motion: reduce) {
    .nav-group__panel, .nav-group__chev { transition: none; }
}

.sidebar-footer {
    flex-shrink: 0;              /* footer stays fixed at the bottom */
    margin-top: 12px;
    padding: 14px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--glass-border);
    font-size: 12px;
    color: var(--ink-500);
    text-align: center;
}
.business-pill { flex-shrink: 0; }

/* ---------- Topbar ---------- */
.main-area {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 100vh;   /* so .content can grow and pin the footer to the bottom */
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 45;
    /* Visual chrome stays edge-to-edge; inner contents are width-capped. */
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 6px 24px rgba(31, 38, 135, 0.06);
}
.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px var(--content-padding);
    max-width: var(--dashboard-max-width);
    margin: 0 auto;
    width: 100%;
}
.topbar .page-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--ink-900);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}
.topbar .page-title i { color: var(--brand-600); }

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--glass-border);
    padding: 6px 12px 6px 6px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-700);
}
.user-chip .avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-500), var(--accent-500));
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
}

.mobile-nav-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 8px 10px;
    color: var(--ink-700);
}

.content {
    padding: 28px var(--content-padding);
    flex: 1 0 auto;             /* grow to fill the main area; never shrink below content */
    min-height: 60vh;           /* short pages still feel substantial, footer stays low */
    width: 100%;
    max-width: var(--dashboard-max-width);
    margin: 0 auto;
}

/* ---------- Glass card ---------- */
.glass {
    background: var(--glass-bg-strong);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.glass:hover { box-shadow: var(--glass-shadow-lg); }

.glass-soft {
    background: var(--glass-bg);
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
}

.card-pad { padding: 22px; }
.card-pad-lg { padding: 28px; }

.card-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}
.card-title-row h5 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--ink-900);
    display: flex;
    align-items: center;
    gap: 8px;
}
.card-title-row h5 i { color: var(--brand-600); }

/* ---------- Stat cards ---------- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}
/* Reusable column-count modifiers (use these instead of inline
   grid-template-columns, which can't carry the responsive breakpoints and
   left cards squeezed into thin strips on phones). */
.stat-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 640px; }
.stat-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

@media (max-width: 1199.98px) {
    .stat-grid,
    .stat-grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Phones: a clean 2-up grid (never 4 thin strips). Cards keep real width so
   labels wrap by word and numbers stay on one line. */
@media (max-width: 575.98px) {
    .stat-grid,
    .stat-grid.cols-2,
    .stat-grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}
/* Ultra-narrow (≤360px): one column so nothing is cramped. */
@media (max-width: 360px) {
    .stat-grid,
    .stat-grid.cols-2,
    .stat-grid.cols-3 { grid-template-columns: 1fr; }
}

.stat-card {
    position: relative;
    padding: 22px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--glass-bg-strong);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--glass-shadow-lg);
}
.stat-card .stat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.stat-card .label {
    font-size: 12.5px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--ink-500);
    letter-spacing: 0.8px;
}
.stat-card .icon-pill {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}
.stat-card .value {
    font-size: 30px;
    font-weight: 800;
    color: var(--ink-900);
    letter-spacing: -0.5px;
    line-height: 1.1;
}
.stat-card .sub {
    margin-top: 6px;
    font-size: 12.5px;
    color: var(--ink-500);
}

.icon-brand    { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.icon-success  { background: linear-gradient(135deg, #10b981, #34d399); }
.icon-danger   { background: linear-gradient(135deg, #ef4444, #f87171); }
.icon-warning  { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.icon-info     { background: linear-gradient(135deg, #0ea5e9, #38bdf8); }
.icon-rose     { background: linear-gradient(135deg, #ec4899, #f472b6); }

/* ---------- Buttons ---------- */
.btn {
    border-radius: 12px !important;
    font-weight: 600;
    font-size: 14px;
    transition: transform 0.12s ease, box-shadow 0.2s ease, background 0.2s ease;
    border: 1px solid transparent;
    padding: 9px 16px;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-brand {
    background: linear-gradient(135deg, var(--brand-500), var(--accent-500));
    color: #fff;
    box-shadow: 0 10px 24px rgba(99, 102, 241, 0.32);
}
.btn-brand:hover { color: #fff; box-shadow: 0 14px 30px rgba(99, 102, 241, 0.42); }

.btn-ghost {
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid var(--glass-border);
    color: var(--ink-700);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.9); color: var(--brand-700); }

/* Square icon-only button (v3.51). Fixed touch target, centred glyph, no
   text — used for secondary actions like the business-card Settings gear.
   Keep an aria-label + title on the element for accessibility. */
.btn-icon {
    width: 42px;
    height: 42px;
    padding: 0 !important;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.btn-icon .ez-ico { margin: 0; }

.btn-soft-danger {
    background: var(--danger-soft);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #b91c1c;
}
.btn-soft-danger:hover { background: rgba(239, 68, 68, 0.18); color: #991b1b; }

.btn-soft-success {
    background: var(--success-soft);
    border: 1px solid rgba(16, 185, 129, 0.28);
    color: #047857;
}
.btn-soft-success:hover { background: rgba(16, 185, 129, 0.20); color: #065f46; }

/* ---------- Forms / inputs ---------- */
.form-control, .form-select {
    width: 100%;                 /* full-width even on pages that don't load Bootstrap */
    border-radius: 11px !important;
    border: 1px solid var(--ink-200);
    padding: 10px 14px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.85);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
/* Custom brand focus ring everywhere — and kill the ugly default browser
   outline (it must be replaced by the visible box-shadow ring, never just
   removed, for accessibility). Covers .form-control, .form-select, and the
   bare native inputs used inside auth cards. */
.form-control:focus, .form-select:focus, textarea:focus {
    outline: none;
    border-color: var(--brand-500);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}
.auth-shell input:focus,
.auth-shell select:focus,
.auth-shell textarea:focus { outline: none; }

/* ---------- Premium native <select> (v3.27) ----------
   One reusable look for every dropdown in the app shell: hides the default
   browser arrow, draws a brand-tinted chevron, keeps a consistent height, soft
   background, clean border and the same focus ring as inputs. Works for bare
   <select>, Bootstrap .form-select, and the small variants — no JS, no markup
   change, so form submission / AJAX filters / selected values are untouched.
   (The platform-admin dark shell uses its own .pa-select — styled separately.) */
select,
.form-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: rgba(255, 255, 255, 0.85);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236366f1' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 13px center;
    background-size: 14px 14px;
    padding-right: 38px;
    cursor: pointer;
    color: var(--ink-800);
}
select:hover,
.form-select:hover { border-color: rgba(99, 102, 241, 0.45); }
select:disabled,
.form-select:disabled {
    background-color: var(--ink-100);
    color: var(--ink-400);
    cursor: not-allowed;
    opacity: 0.8;
}
/* Dropdown list items — limited cross-browser control, but Chrome/Firefox honor
   these so the open list matches the theme instead of stark system white. */
select option,
.form-select option {
    color: var(--ink-800);
    background: #fff;
    padding: 8px;
}
select option:checked,
.form-select option:checked { color: var(--brand-700); font-weight: 600; }
/* Compact selects keep a tighter chevron inset. */
.form-select-sm { background-position: right 10px center; padding-right: 32px; }

/* ============================================================
   Premium star rating (v3.37)
   Real radio inputs (keyboard + a11y) styled as interactive stars.
   DOM order is 5→1 with flex-row-reverse so it reads 1→5 visually and
   the classic `:checked ~ label` fill works left-to-right.
   ============================================================ */
.ez-stars {
    display: inline-flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 2px;
    margin-top: 2px;
}
.ez-stars input {
    position: absolute;
    width: 1px; height: 1px;
    opacity: 0;
    pointer-events: none;
}
.ez-stars label {
    font-size: 34px;
    line-height: 1;
    color: #d7dce5;
    cursor: pointer;
    padding: 2px 3px;
    transition: color .12s ease, transform .12s ease;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}
/* Selected: the checked star + all following-in-DOM (lower numbers, to the
   left visually) fill brand-amber. */
.ez-stars input:checked ~ label { color: #f59e0b; }
/* Hover preview: reset the group, then fill up to the hovered star. */
.ez-stars:hover label { color: #d7dce5; }
.ez-stars label:hover,
.ez-stars label:hover ~ label { color: #fbbf24; }
.ez-stars label:hover { transform: scale(1.12); }
/* Keyboard focus ring on the active star (brand). */
.ez-stars input:focus-visible + label {
    outline: none;
    border-radius: 6px;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.30);
    color: #f59e0b;
}
.ez-stars-caption {
    margin-top: 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--brand-700);
    letter-spacing: .3px;
}
@media (max-width: 575px) {
    .ez-stars label { font-size: 30px; padding: 4px 4px; }  /* bigger tap target */
}
@media (prefers-reduced-motion: reduce) {
    .ez-stars label { transition: none; }
    .ez-stars label:hover { transform: none; }
}

.form-label, label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink-700);
    margin-bottom: 6px;
}

.input-icon {
    position: relative;
    display: block;
}
/* Position the leading icon — supports both legacy <i> glyphs and the
   v3.21 {% ez_icon %} inline SVGs (the icon migration left the SVG case
   unhandled, so the icon used to render above the input). */
.input-icon > i,
.input-icon > svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ink-400);
    font-size: 16px;
    width: 16px;
    height: 16px;
    pointer-events: none;
    z-index: 2;
}
.input-icon .form-control { padding-left: 40px; }

/* ---------- Tables ---------- */
.table-wrap { padding: 0; overflow: hidden; }
.table-wrap .table {
    margin: 0;
    color: var(--ink-700);
    font-size: 14px;
}
.table-wrap thead th {
    background: rgba(241, 245, 249, 0.7);
    color: var(--ink-500);
    text-transform: uppercase;
    font-size: 11.5px;
    letter-spacing: 0.8px;
    font-weight: 700;
    border-bottom: 1px solid var(--ink-200);
    padding: 14px 16px;
}
.table-wrap tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
    vertical-align: middle;
}
.table-wrap tbody tr:last-child td { border-bottom: none; }
.table-wrap tbody tr {
    transition: background-color 0.15s ease;
}
.table-wrap tbody tr:hover { background: rgba(99, 102, 241, 0.05); }

/* Compact variant: tighter row padding so long tables don't dominate the page */
.table-wrap .table.compact thead th { padding: 10px 14px; }
.table-wrap .table.compact tbody td { padding: 8px 14px; }
.table-wrap .table.compact .product-cell { font-size: 13.5px; }

/* Scrollable wrap (cap a long table's height; sticky header) */
.table-wrap.table-scroll {
    overflow-y: auto;
    max-height: 520px;
    border-radius: inherit;
}
.table-wrap.table-scroll thead th {
    position: sticky; top: 0; z-index: 2;
    background: rgba(241, 245, 249, 0.96);
    backdrop-filter: blur(4px);
}

/* Row action button group — keep tight + horizontal */
.row-actions {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    flex-wrap: nowrap;
}
.row-action {
    width: 30px; height: 30px;
    min-width: 30px;
    flex-shrink: 0;
    border-radius: 8px;
    border: 1px solid transparent;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 15px; line-height: 1;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
    padding: 0;
}
/* Make sure the Actions column has space for 3 inline buttons */
.table-wrap .table.compact thead th:last-child,
.table-wrap .table.compact tbody td:last-child {
    min-width: 130px;
    white-space: nowrap;
}
.row-action:hover  { transform: translateY(-1px); }
.row-action:active { transform: translateY(0); }
.row-action.in {
    background: var(--success-soft);
    color: #047857;
    border-color: rgba(16,185,129,0.25);
}
.row-action.in:hover  { background: rgba(16,185,129,0.20); color: #065f46; }
.row-action.out {
    background: var(--danger-soft);
    color: #b91c1c;
    border-color: rgba(239,68,68,0.22);
}
.row-action.out:hover { background: rgba(239,68,68,0.18); color: #991b1b; }
.row-action.edit,
.row-action.view {
    background: rgba(255,255,255,0.7);
    color: var(--ink-500);
    border-color: var(--ink-200);
}
.row-action.edit:hover,
.row-action.view:hover { background: rgba(99,102,241,0.10); color: var(--brand-700); border-color: rgba(99,102,241,0.25); }

.product-cell { font-weight: 600; color: var(--ink-900); }
.sku-pill {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--ink-100);
    color: var(--ink-500);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.qty-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 13px;
    background: var(--ink-100);
    color: var(--ink-700);
    white-space: nowrap;
    line-height: 1.2;
}
.qty-pill.low {
    background: var(--danger-soft);
    color: #b91c1c;
}
.qty-pill.warn {
    background: var(--warning-soft);
    color: #b45309;
}
.qty-pill.ok {
    background: var(--success-soft);
    color: #047857;
}

.badge-soft {
    padding: 5px 10px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 11.5px;
    letter-spacing: 0.3px;
    /* Stop multi-word badges (e.g. "Out of Stock", "Needs pricing")
       from wrapping into two lines inside narrow table columns. */
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    line-height: 1.2;
}
.badge-in  { background: var(--success-soft); color: #047857; }
.badge-out { background: var(--danger-soft);  color: #b91c1c; }

/* ---------- Empty state ---------- */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--ink-500);
}
.empty-state .icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    border-radius: 18px;
    background: var(--brand-50);
    color: var(--brand-600);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}
.empty-state h6 { color: var(--ink-700); font-weight: 700; margin-bottom: 4px; }

/* ---------- Toast ---------- */
.toast-stack {
    position: fixed;
    top: 22px;
    right: 22px;
    z-index: 1080;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 360px;
}
.toast-item {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    border: 1px solid var(--glass-border);
    border-left: 4px solid var(--brand-500);
    padding: 12px 14px;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(31, 38, 135, 0.18);
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13.5px;
    color: var(--ink-700);
    animation: toastIn 0.3s ease;
}
.toast-item.success { border-left-color: var(--success); }
.toast-item.danger  { border-left-color: var(--danger); }
.toast-item.warning { border-left-color: var(--warning); }
.toast-item i {
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}
.toast-item.success i { color: var(--success); }
.toast-item.danger i  { color: var(--danger); }
.toast-item.warning i { color: var(--warning); }
.toast-item.info i    { color: var(--info); }
.toast-item .close {
    margin-left: auto;
    cursor: pointer;
    background: transparent;
    border: none;
    color: var(--ink-400);
    font-size: 18px;
    line-height: 1;
}
@keyframes toastIn {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ---------- Modal restyle ---------- */
.modal-content {
    background: var(--glass-bg-strong);
    backdrop-filter: blur(22px) saturate(160%);
    -webkit-backdrop-filter: blur(22px) saturate(160%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--glass-shadow-lg);
}
.modal-header {
    border-bottom: 1px solid var(--ink-200);
    padding: 18px 22px;
}
.modal-title {
    font-weight: 700;
    color: var(--ink-900);
    display: flex;
    align-items: center;
    gap: 8px;
}
.modal-title i { color: var(--brand-600); }
.modal-body { padding: 22px; }
.modal-footer {
    border-top: 1px solid var(--ink-200);
    padding: 14px 22px;
}

/* ---------- Movement row UI in modal ---------- */
.movement-row {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 12px;
    margin-bottom: 10px;
}

/* ---------- Type toggle (IN/OUT) ---------- */
.type-toggle {
    display: inline-flex;
    background: var(--ink-100);
    border-radius: 10px;
    padding: 3px;
    width: 100%;
}
.type-toggle label {
    flex: 1;
    text-align: center;
    padding: 7px 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    color: var(--ink-500);
    margin: 0;
    transition: all 0.2s ease;
}
.type-toggle input[type=radio] { display: none; }
.type-toggle input[type=radio]:checked + label.in {
    background: linear-gradient(135deg, #10b981, #34d399);
    color: #fff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}
.type-toggle input[type=radio]:checked + label.out {
    background: linear-gradient(135deg, #ef4444, #f87171);
    color: #fff;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* ---------- Loading overlay ---------- */
.loader-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 5;
    border-radius: inherit;
}
.loader-overlay.show { display: flex; }
.loader-spinner {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 3px solid rgba(99, 102, 241, 0.25);
    border-top-color: var(--brand-600);
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Section heading ---------- */
.page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
    gap: 14px;
    flex-wrap: wrap;
}
.page-heading h1 {
    font-size: 26px;
    font-weight: 800;
    color: var(--ink-900);
    margin: 0;
    letter-spacing: -0.6px;
}
.page-heading p {
    color: var(--ink-500);
    margin: 4px 0 0;
    font-size: 14px;
}

/* ---------- Footer ---------- */
.app-footer {
    text-align: center;
    color: var(--ink-500);
    font-size: 12.5px;
    border-top: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}
.app-footer-inner {
    padding: 18px var(--content-padding);
    max-width: var(--dashboard-max-width);
    margin: 0 auto;
}
.app-footer a { color: var(--brand-600); text-decoration: none; font-weight: 600; }

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .app-layout { grid-template-columns: 1fr; }
    .sidebar {
        position: fixed;
        top: 0; left: 0;
        width: 280px;
        max-width: 86vw;            /* never wider than the phone viewport */
        height: 100vh;              /* fallback for browsers without dvh */
        height: 100dvh;             /* fit the *visible* viewport — no bottom cut-off */
        /* keep the footer card clear of the phone's home-indicator / nav bar */
        padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 60;                /* above the FAB (1000 is hidden when open) */
    }
    .sidebar.open { transform: translateX(0); }
    .sidebar-backdrop {
        position: fixed; inset: 0;
        background: rgba(15, 23, 42, 0.4);
        backdrop-filter: blur(3px);
        -webkit-backdrop-filter: blur(3px);
        z-index: 55;
        display: none;
    }
    .sidebar-backdrop.show { display: block; }

    /* v3.55 — while the mobile drawer is open: lock the background page scroll
       and hide the floating action button (+ any WhatsApp float) so they never
       overlap or clutter the open sidebar. The class is removed on close. */
    body.nav-open { overflow: hidden; }
    body.nav-open .ez-fab,
    body.nav-open .wa-fab {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }
    .mobile-nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
    .content { padding: 18px; }
    /* v3.30 — slimmer mobile header. The .topbar wrapper adds NO padding so
       vertical space is never doubled (the inner row is the only padder); the
       inner row's vertical padding shrinks. This alone takes the mobile header
       from ~103px down to ~62px without squeezing icons. */
    .topbar { padding: 0; }
    .topbar-inner { padding: 10px var(--content-padding); }
    .topbar .page-title { font-size: 17px; }
    .user-chip .name { display: none; }
}

@media (max-width: 575.98px) {
    .page-heading h1 { font-size: 22px; }
    .stat-card { padding: 15px 14px; }
    .stat-card .stat-head { margin-bottom: 8px; }
    .stat-card .value { font-size: 22px; }
    /* Labels wrap by word (never letter-by-letter) and ease the tracking so
       two-word labels like "Approved total" read cleanly in a 2-up card. */
    .stat-card .label { letter-spacing: 0.4px; overflow-wrap: normal; word-break: keep-all; }
    .stat-card .value { overflow-wrap: normal; word-break: keep-all; }
    .stat-card .sub { font-size: 11.5px; }
    .stat-card .icon-pill { width: 34px; height: 34px; font-size: 16px; }
    .card-pad, .card-pad-lg { padding: 16px; }
    .topbar-actions .btn .label-md { display: none; }

    /* v3.32.4 — topbar density on phones: keep every control reachable but
       compact (icon-only, no caret) and let the page title truncate so the
       user-chip / switchers are never clipped off the right edge.
       v3.30 — header is slimmer still: tighter vertical padding + a fixed 40px
       toggle (a comfortable tap target) make the bar ~52px without squeezing. */
    .topbar-inner { gap: 8px; padding: 7px 14px; }
    .topbar-inner > .d-flex { min-width: 0; flex: 1 1 auto; }
    .topbar .page-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; gap: 8px; }
    .topbar-actions { gap: 6px; flex-shrink: 0; }
    .topbar-actions .dropdown-toggle::after { display: none; }
    .topbar-actions .btn-sm { padding: 7px 9px; }
    .topbar-actions .user-chip { padding: 5px 7px; }     /* ~40px tall tap target */
    .mobile-nav-toggle { width: 40px; height: 40px; padding: 0; }

    /* v3.32.4 — header search forms (list pages) wrap to their own full-width
       line on phones instead of poking past the card edge. The inline
       min-width:240px is overridden here so the input never overflows. */
    .card-title-row { flex-wrap: wrap; row-gap: 10px; }
    .card-title-row > form { min-width: 0 !important; max-width: 100% !important; width: 100%; flex: 1 1 100% !important; }
}

/* ---------- Business pill in sidebar ---------- */
.business-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, rgba(99,102,241,0.10), rgba(139,92,246,0.12));
    border: 1px solid rgba(99,102,241,0.18);
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--brand-700);
}
.business-pill i { color: var(--brand-600); font-size: 16px; flex-shrink: 0; }
.business-pill > span:first-of-type {
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1;
}
.business-pill .role-tag {
    margin-left: auto;
    background: rgba(255,255,255,0.7);
    color: var(--brand-700);
    border-radius: 999px;
    padding: 2px 9px;
    font-size: 10.5px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

/* ---------- Glass dropdown ---------- */
.glass-dropdown {
    background: var(--glass-bg-strong);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--glass-shadow-lg);
    padding: 6px;
    min-width: 240px;
}
.glass-dropdown .dropdown-header {
    color: var(--ink-400);
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    font-weight: 700;
    padding: 8px 12px 6px;
}
.glass-dropdown .dropdown-item {
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 13.5px;
    color: var(--ink-700);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background-color 0.15s ease;
}
.glass-dropdown .dropdown-item:hover,
.glass-dropdown .dropdown-item.active {
    background: rgba(99, 102, 241, 0.10);
    color: var(--brand-700);
}
.glass-dropdown .dropdown-item.text-danger:hover {
    background: rgba(239, 68, 68, 0.10);
}
.glass-dropdown .dropdown-divider {
    margin: 6px 8px;
    border-color: var(--ink-200);
}
.user-chip.dropdown-toggle::after { margin-left: 6px; }
.user-chip { cursor: pointer; border: 1px solid var(--glass-border); background: rgba(255,255,255,0.7); }

/* ---------- Role badge ---------- */
.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.role-badge.OWNER   { background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff; }
.role-badge.MANAGER { background: var(--brand-50); color: var(--brand-700); border: 1px solid rgba(99,102,241,0.25); }
.role-badge.STAFF   { background: var(--success-soft); color: #047857; }
.role-badge.VIEWER  { background: var(--ink-100); color: var(--ink-500); }

/* Current business highlight on the "Choose a business" cards (v3.18) */
.biz-card-current {
    border: 1.5px solid var(--brand-500) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.16), var(--glass-shadow) !important;
}

/* ---------- Auth pages secondary text ---------- */
.auth-link {
    color: var(--brand-600);
    font-weight: 600;
    text-decoration: none;
}
.auth-link:hover { color: var(--brand-700); text-decoration: underline; }

/* ---------- Plan card ---------- */
.plan-card {
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    background: var(--glass-bg-strong);
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    padding: 22px;
    transition: transform .2s ease, box-shadow .2s ease;
    cursor: pointer;
    position: relative;
}
.plan-card:hover { transform: translateY(-3px); box-shadow: var(--glass-shadow-lg); }
.plan-card.active {
    border: 2px solid var(--brand-500);
    box-shadow: 0 12px 30px rgba(99,102,241,0.22);
}
.plan-card .price { font-size: 28px; font-weight: 800; color: var(--ink-900); margin: 6px 0; }
.plan-card .price small { font-size: 13px; color: var(--ink-500); font-weight: 500; }
.plan-card .plan-name {
    font-size: 13px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 1.2px; color: var(--brand-700);
}

/* ---------- Utilities ---------- */
.text-brand { color: var(--brand-600) !important; }
.text-muted-soft { color: var(--ink-500) !important; }
.divider {
    height: 1px;
    background: var(--ink-200);
    margin: 18px 0;
}
.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--brand-50);
    color: var(--brand-700);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
}

/* =================================================================
   PREMIUM POLISH — v3.2 UI redesign pass
   Additive only. Nothing above this line was changed.
   ================================================================= */

/* ---------- Scroll-reveal entrance animation ---------- */
@keyframes ezFadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes ezFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes ezShimmer {
    0%   { background-position: -300px 0; }
    100% { background-position: 300px 0; }
}
@keyframes ezPulse {
    0%   { box-shadow: 0 0 0 0 rgba(99,102,241,0.45); }
    70%  { box-shadow: 0 0 0 14px rgba(99,102,241,0); }
    100% { box-shadow: 0 0 0 0 rgba(99,102,241,0); }
}

.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.shown { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }

/* ---------- Subtle attention pulse (use on a CTA you want noticed) ---------- */
.pulse-dot {
    display: inline-block; width: 8px; height: 8px;
    border-radius: 50%; background: var(--brand-500);
    animation: ezPulse 2s infinite;
    margin-right: 6px; vertical-align: middle;
}

/* ---------- Skeleton shimmer (for loading states) ---------- */
.skeleton {
    background: linear-gradient(90deg, var(--ink-100) 0px, var(--ink-50) 60px, var(--ink-100) 120px);
    background-size: 600px;
    animation: ezShimmer 1.6s linear infinite;
    border-radius: 8px;
    color: transparent;
    user-select: none;
}

/* ---------- Section dividers (decorative blob backgrounds) ---------- */
.section-soft {
    position: relative;
    background: rgba(255,255,255,0.55);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-radius: 32px;
    overflow: hidden;
}
.section-soft::before {
    content: ""; position: absolute; inset: 0;
    background:
        radial-gradient(500px 240px at 90% 10%, rgba(139,92,246,0.18), transparent 60%),
        radial-gradient(500px 240px at 10% 90%, rgba(14,165,233,0.16), transparent 60%);
    pointer-events: none;
}

/* ---------- Glass card upgrade — animated border on hover ---------- */
.glass-hover {
    position: relative;
    transition: transform .3s ease, box-shadow .3s ease;
}
.glass-hover::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(99,102,241,0), rgba(139,92,246,0));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
    transition: background .35s ease;
}
.glass-hover:hover {
    transform: translateY(-4px);
    box-shadow: var(--glass-shadow-lg);
}
.glass-hover:hover::after {
    background: linear-gradient(135deg, rgba(99,102,241,0.65), rgba(139,92,246,0.65));
}

/* ---------- Animated underline links (used on public nav) ---------- */
.link-underline {
    position: relative; padding-bottom: 2px;
}
.link-underline::after {
    content: ""; position: absolute; left: 0; right: 100%; bottom: 0;
    height: 2px; border-radius: 2px;
    background: linear-gradient(90deg, var(--brand-500), var(--accent-500));
    transition: right .25s ease;
}
.link-underline:hover::after { right: 0; }

/* ---------- Gradient text utility ---------- */
.gradient-text {
    background: linear-gradient(135deg, #0f172a 0%, var(--brand-700) 55%, var(--accent-500) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ---------- Premium "feature media" — number + accent line ---------- */
.feature-media {
    display: flex; align-items: center; gap: 14px; padding: 14px 16px;
    border-radius: 14px;
    background: rgba(255,255,255,0.6);
    border: 1px solid var(--glass-border);
    transition: background .2s ease, transform .2s ease;
}
.feature-media:hover { background: rgba(255,255,255,0.85); transform: translateX(2px); }
.feature-media .num {
    flex-shrink: 0; width: 40px; height: 40px;
    border-radius: 11px; font-weight: 800; font-size: 16px;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--brand-500), var(--accent-500));
    color: #fff; box-shadow: 0 8px 16px rgba(99,102,241,0.22);
}

/* ---------- Status dot (use on row to show online/active/pending) ---------- */
.status-dot {
    display: inline-block; width: 8px; height: 8px; border-radius: 50%;
    margin-right: 6px;
}
.status-dot.ok       { background: var(--success); box-shadow: 0 0 0 3px rgba(16,185,129,0.18); }
.status-dot.warn     { background: var(--warning); box-shadow: 0 0 0 3px rgba(245,158,11,0.18); }
.status-dot.danger   { background: var(--danger);  box-shadow: 0 0 0 3px rgba(239,68,68,0.18); }
.status-dot.muted    { background: var(--ink-400); }

/* ---------- Count-up target (kept readable while animating) ---------- */
[data-count-target] {
    font-variant-numeric: tabular-nums;
}

/* ---------- Premium hero kit (used by public + error pages) ---------- */
.hero-kit {
    position: relative;
    padding: 96px 24px 60px;
    text-align: center; max-width: 1200px; margin: 0 auto;
}
.hero-kit .eyebrow {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px; border-radius: 999px;
    background: rgba(255,255,255,0.7);
    border: 1px solid var(--glass-border);
    color: var(--brand-700);
    font-size: 12px; font-weight: 600; letter-spacing: 0.6px;
    backdrop-filter: blur(10px);
}
.hero-kit h1 {
    font-size: clamp(34px, 5vw, 56px); font-weight: 900;
    letter-spacing: -1.5px; margin: 16px auto 14px;
    line-height: 1.04; max-width: 920px;
}
.hero-kit p.lead {
    color: var(--ink-500); font-size: clamp(15px, 1.6vw, 18px);
    line-height: 1.65; max-width: 720px; margin: 0 auto 24px;
}
.hero-kit .cta {
    display: inline-flex; gap: 10px; flex-wrap: wrap; justify-content: center;
}
.hero-kit .floating {
    margin: 40px auto 0; max-width: 980px; padding: 0 12px;
}

/* ---------- Animated background blobs (decorative) ---------- */
.bg-blobs::before, .bg-blobs::after {
    content: ""; position: fixed; pointer-events: none; z-index: -1;
    border-radius: 50%; filter: blur(80px); opacity: 0.55;
}
.bg-blobs::before {
    top: -160px; left: -160px; width: 360px; height: 360px;
    background: radial-gradient(closest-side, rgba(99,102,241,0.55), transparent);
    animation: ezBlobA 14s ease-in-out infinite alternate;
}
.bg-blobs::after {
    bottom: -180px; right: -160px; width: 420px; height: 420px;
    background: radial-gradient(closest-side, rgba(139,92,246,0.45), transparent);
    animation: ezBlobB 18s ease-in-out infinite alternate;
}
@keyframes ezBlobA { from { transform: translate(0,0); } to { transform: translate(60px, 40px); } }
@keyframes ezBlobB { from { transform: translate(0,0); } to { transform: translate(-50px, -40px); } }

/* ---------- Pricing-card "popular" ribbon ---------- */
.plan-card.popular {
    border: 2px solid var(--brand-500);
    position: relative; overflow: visible;
    box-shadow: 0 18px 42px rgba(99,102,241,0.20);
}
.plan-card.popular::before {
    content: "Most popular";
    position: absolute; top: -14px; right: 16px;
    background: linear-gradient(135deg, var(--brand-500), var(--accent-500));
    color: #fff; font-size: 11px; font-weight: 700; letter-spacing: 0.8px;
    text-transform: uppercase;
    padding: 6px 12px; border-radius: 999px;
    box-shadow: 0 8px 18px rgba(99,102,241,0.32);
}

/* ---------- Premium accordion (FAQ) ---------- */
.ez-accordion details {
    background: var(--glass-bg-strong);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 18px 22px;
    margin-bottom: 12px;
    transition: box-shadow .2s ease, transform .2s ease;
}
.ez-accordion details[open] {
    box-shadow: var(--glass-shadow-lg);
    border-color: rgba(99,102,241,0.32);
}
.ez-accordion summary {
    cursor: pointer; list-style: none;
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; font-weight: 700; color: var(--ink-900);
    font-size: 15px;
}
.ez-accordion summary::-webkit-details-marker { display: none; }
.ez-accordion summary::after {
    content: "+"; width: 28px; height: 28px;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(99,102,241,0.1); color: var(--brand-700);
    border-radius: 999px; font-weight: 700; font-size: 18px;
    transition: transform .25s ease, background .25s ease;
}
.ez-accordion details[open] summary::after {
    transform: rotate(45deg);
    background: linear-gradient(135deg, var(--brand-500), var(--accent-500));
    color: #fff;
}
.ez-accordion details > div, .ez-accordion details > p {
    margin-top: 12px; color: var(--ink-700); font-size: 14px; line-height: 1.65;
}

/* ---------- TOC (table of contents) sidebar for legal pages ---------- */
.legal-layout {
    display: grid; grid-template-columns: 240px 1fr; gap: 32px;
}
.legal-toc {
    position: sticky; top: 90px; align-self: start;
    background: var(--glass-bg-strong);
    backdrop-filter: blur(18px) saturate(160%);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 16px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}
.legal-toc h6 {
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 1.2px; color: var(--ink-500); margin-bottom: 10px;
}
.legal-toc a {
    display: block; padding: 7px 10px; border-radius: 8px;
    color: var(--ink-700); text-decoration: none; font-size: 13.5px;
    margin-bottom: 2px; transition: all .18s ease;
}
.legal-toc a:hover, .legal-toc a.active {
    background: rgba(99,102,241,0.10); color: var(--brand-700);
}
@media (max-width: 880px) {
    .legal-layout { grid-template-columns: 1fr; }
    .legal-toc { position: static; max-height: none; }
}

/* ---------- Premium info card ---------- */
.info-card {
    padding: 22px;
    background: linear-gradient(135deg,
        rgba(99,102,241,0.10), rgba(139,92,246,0.10));
    border-radius: var(--radius-lg);
    border: 1px solid rgba(99,102,241,0.22);
}
.info-card h6 {
    color: var(--brand-700); font-weight: 800;
    display: flex; align-items: center; gap: 8px; margin: 0 0 8px;
}
.info-card p { font-size: 14px; color: var(--ink-700); margin: 0; }

/* =========================================================
 * v3.28 — Premium branded 3D error pages (400/403/404/500)
 *   One reusable system. The shell locks to the viewport
 *   (position:fixed + overflow:hidden) so an error page NEVER
 *   scrolls; everything is clamp()-sized to fit one screen.
 *   The "3D" is pure CSS: an extruded error code, a floating
 *   icon badge, drifting orbs + tilted isometric glass chips.
 *   All motion is transform/opacity only (no layout shift) and
 *   is fully disabled under prefers-reduced-motion.
 * ========================================================= */
.err-shell {
    position: fixed; inset: 0;
    height: 100vh; height: 100dvh; width: 100vw;
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    padding: clamp(14px, 3.5vh, 40px) 18px;
    perspective: 1200px;
    color: #fff;
    background:
        radial-gradient(820px 460px at 82% 8%, rgba(139,92,246,0.42), transparent 60%),
        radial-gradient(760px 460px at 10% 92%, rgba(99,102,241,0.46), transparent 60%),
        linear-gradient(135deg, #4f46e5 0%, #7c3aed 55%, #ec4899 120%);
}

/* ---- ambient 3D background: drifting orbs + isometric chips ---- */
.err-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; transform-style: preserve-3d; }
.err-orb { position: absolute; border-radius: 50%; filter: blur(46px); opacity: 0.55; animation: err-drift 16s ease-in-out infinite; }
.err-orb.o1 { width: 340px; height: 340px; left: -70px; top: -50px; background: rgba(167,139,250,0.75); }
.err-orb.o2 { width: 300px; height: 300px; right: -60px; bottom: -60px; background: rgba(99,102,241,0.8); animation-delay: -6s; }
.err-orb.o3 { width: 170px; height: 170px; right: 16%; top: 12%; background: rgba(236,72,153,0.5); animation-delay: -11s; }
.err-chip {
    position: absolute;
    width: clamp(52px, 9vmin, 94px); height: clamp(52px, 9vmin, 94px);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(255,255,255,0.24), rgba(255,255,255,0.05));
    border: 1px solid rgba(255,255,255,0.30);
    box-shadow: 0 22px 44px rgba(15,23,42,0.25), inset 0 1px 0 rgba(255,255,255,0.45);
    -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
    transform: rotateX(54deg) rotateZ(-38deg);
    animation: err-bob 9s ease-in-out infinite;
}
.err-chip.c1 { left: 7%;  top: 16%; animation-delay: -1s; }
.err-chip.c2 { right: 9%; bottom: 18%; animation-delay: -4s; }
.err-chip.c3 { left: 14%; bottom: 12%; width: clamp(40px,6vmin,64px); height: clamp(40px,6vmin,64px); animation-delay: -7s; opacity: 0.85; }
.err-chip.c4 { right: 13%; top: 14%; width: clamp(40px,6vmin,64px); height: clamp(40px,6vmin,64px); animation-delay: -2.5s; opacity: 0.85; }

/* ---- centered content stack ---- */
.err-content {
    position: relative; z-index: 3;
    width: min(540px, 94vw);
    display: flex; flex-direction: column; align-items: center;
    gap: clamp(10px, 2vh, 18px);
    text-align: center;
    transform-style: preserve-3d;
    animation: err-in 0.7s cubic-bezier(0.2,0.8,0.2,1) both;
}
.err-brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.err-brand img { width: 34px; height: 34px; filter: drop-shadow(0 6px 14px rgba(15,23,42,0.3)); }
.err-brand b { color: #fff; font-weight: 800; letter-spacing: 0.3px; font-size: 16px; }

/* Floating 3D icon badge (state-coloured). */
.err-badge {
    width: clamp(60px, 11vh, 80px); height: clamp(60px, 11vh, 80px);
    border-radius: 22px;
    display: grid; place-items: center; color: #fff;
    box-shadow: 0 22px 44px rgba(15,23,42,0.35), inset 0 2px 0 rgba(255,255,255,0.45);
    background: linear-gradient(145deg, var(--brand-400, #818cf8), var(--accent-500, #8b5cf6));
    transform-style: preserve-3d;
    animation: err-bob 5s ease-in-out infinite;
}
.err-badge svg { width: 40%; height: 40%; }

/* Extruded 3D error code (the hero). */
.err-code {
    font-size: clamp(70px, 15vh, 128px);
    font-weight: 900; line-height: 0.9; letter-spacing: -5px;
    color: #fff;
    transform-style: preserve-3d;
    animation: err-tilt 7s ease-in-out infinite;
    text-shadow:
        1px 1px 0 rgba(79,70,229,0.9), 2px 2px 0 rgba(76,67,222,0.9),
        3px 3px 0 rgba(72,64,215,0.9), 4px 4px 0 rgba(68,60,208,0.9),
        5px 5px 0 rgba(64,57,201,0.9), 6px 6px 0 rgba(60,53,194,0.9),
        7px 8px 18px rgba(15,23,42,0.45);
}

/* Readable glass info card. */
.err-glass {
    width: 100%;
    background: rgba(255,255,255,0.95);
    -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid rgba(255,255,255,0.7);
    border-radius: 22px;
    padding: clamp(18px, 3vh, 28px) clamp(20px, 4vw, 34px);
    box-shadow: 0 30px 70px rgba(15,23,42,0.34);
}
.err-glass h1 {
    font-size: clamp(18px, 3.2vh, 24px); font-weight: 800;
    color: var(--ink-900); margin: 0 0 6px; letter-spacing: -0.3px;
}
.err-glass p {
    font-size: clamp(13px, 1.9vh, 14.5px); color: var(--ink-500);
    margin: 0 0 clamp(14px, 2.2vh, 18px); line-height: 1.5;
}
.err-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.err-actions .btn { min-width: 138px; }
.err-help { margin-top: clamp(12px, 1.8vh, 16px); font-size: 12px; color: var(--ink-400); }
.err-help a { color: var(--brand-700); font-weight: 700; text-decoration: none; }
.err-help a:hover { text-decoration: underline; }

/* ---- per-state accent (badge + lowest extrusion tint) ---- */
.err-shell.is-403 .err-badge { background: linear-gradient(145deg, #fbbf24, #f59e0b); }
.err-shell.is-500 .err-badge { background: linear-gradient(145deg, #fb7185, #ef4444); }
.err-shell.is-400 .err-badge { background: linear-gradient(145deg, #38bdf8, #6366f1); }

/* ---- keyframes (transform/opacity only — no layout shift) ---- */
@keyframes err-in {
    from { opacity: 0; transform: translateY(22px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes err-bob {
    0%, 100% { transform: translateY(0) rotateX(54deg) rotateZ(-38deg); }
    50%      { transform: translateY(-14px) rotateX(54deg) rotateZ(-38deg); }
}
.err-badge { /* badge bobs without the isometric tilt */ }
@keyframes err-tilt {
    0%, 100% { transform: rotateY(-9deg) rotateX(5deg) translateY(0); }
    50%      { transform: rotateY(9deg) rotateX(-3deg) translateY(-6px); }
}
@keyframes err-drift {
    0%, 100% { transform: translate(0, 0); }
    50%      { transform: translate(26px, -22px); }
}
/* The badge keyframe override (no isometric tilt for the badge). */
@keyframes err-badge-bob {
    0%, 100% { transform: translateY(0) rotateX(6deg); }
    50%      { transform: translateY(-12px) rotateX(-4deg); }
}
.err-badge { animation-name: err-badge-bob; }

@media (max-width: 575.98px) {
    .err-chip.c3, .err-chip.c4 { display: none; }   /* keep the scene calm on phones */
    .err-actions .btn { min-width: 0; flex: 1 1 46%; }
}

/* Short viewports (landscape phones): compress so it still fits one screen. */
@media (max-height: 520px) {
    .err-content { gap: 8px; }
    .err-brand { display: none; }
    .err-badge { width: 48px; height: 48px; border-radius: 16px; }
    .err-badge svg { width: 44%; height: 44%; }
    .err-code { font-size: clamp(44px, 13vh, 78px); letter-spacing: -3px; }
    .err-glass { padding: 12px 18px; }
    .err-glass h1 { font-size: 16px; }
    .err-glass p { font-size: 12.5px; margin-bottom: 10px; }
    .err-help { margin-top: 8px; }
}

@media (prefers-reduced-motion: reduce) {
    .err-orb, .err-chip, .err-badge, .err-code, .err-content { animation: none !important; }
    .err-code { transform: none; }
    .err-chip { transform: rotateX(54deg) rotateZ(-38deg); }
}

/* ---------- Trust strip / partner logos placeholder ---------- */
.trust-strip {
    display: flex; align-items: center; justify-content: center;
    gap: 28px; flex-wrap: wrap; padding: 16px 0; opacity: 0.7;
}
.trust-strip span {
    font-weight: 800; letter-spacing: 1.4px; font-size: 12.5px;
    color: var(--ink-400); text-transform: uppercase;
}

/* ---------- Premium form input enhancer ---------- */
.form-floating-glass {
    position: relative;
}
.form-floating-glass input.form-control,
.form-floating-glass textarea.form-control {
    background: rgba(255,255,255,0.92);
    border: 1px solid var(--glass-border);
    padding: 18px 16px 8px;
}
.form-floating-glass label {
    position: absolute; top: 14px; left: 16px;
    color: var(--ink-400); pointer-events: none;
    transition: all .15s ease; font-size: 14px; font-weight: 500;
}
.form-floating-glass input:focus + label,
.form-floating-glass input:not(:placeholder-shown) + label,
.form-floating-glass textarea:focus + label,
.form-floating-glass textarea:not(:placeholder-shown) + label {
    top: 4px; font-size: 10.5px; font-weight: 700;
    color: var(--brand-600); letter-spacing: 0.6px; text-transform: uppercase;
}

/* ---------- Sticky in-page sub-nav ---------- */
.subnav {
    position: sticky; top: 64px; z-index: 30;
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(18px) saturate(160%);
    border-bottom: 1px solid var(--glass-border);
    padding: 10px 0;
    display: flex; gap: 12px; flex-wrap: wrap;
    margin-bottom: 24px;
}
.subnav a {
    padding: 8px 14px; border-radius: 10px;
    color: var(--ink-700); text-decoration: none;
    font-size: 13.5px; font-weight: 600;
    transition: all .18s ease;
}
.subnav a:hover, .subnav a.active {
    background: linear-gradient(135deg, var(--brand-500), var(--accent-500));
    color: #fff;
    box-shadow: 0 4px 12px rgba(99,102,241,0.32);
}

/* v3.29 / v3.31 — duration/range tab rows scroll horizontally on mobile instead
   of wrapping into rough multi-row stacks. Applies to the P&L range presets
   (.subnav), the dashboard AI range pills (.ai-range), the business-health
   range (.health-range) and the supplier-analytics range button group. Labels
   are short abbreviations (7D / 30D / 3M / 6M / 1Y) so they never wrap; the
   active tab stays highlighted and the first + last tabs are fully reachable. */
@media (max-width: 767.98px) {
    .subnav {
        flex-wrap: nowrap;
        overflow-x: auto; overflow-y: hidden;
        -webkit-overflow-scrolling: touch; scroll-behavior: smooth;
        scrollbar-width: none; -ms-overflow-style: none;
        gap: 8px;
    }
    .subnav::-webkit-scrollbar { display: none; }
    .subnav > a, .subnav > * { flex: 0 0 auto; white-space: nowrap; }

    .ai-range,
    .health-range {
        display: flex; flex-wrap: nowrap; max-width: 100%;
        overflow-x: auto; overflow-y: hidden;
        -webkit-overflow-scrolling: touch; scroll-behavior: smooth;
        scrollbar-width: none; -ms-overflow-style: none;
    }
    .ai-range::-webkit-scrollbar,
    .health-range::-webkit-scrollbar { display: none; }
    .ai-range-btn,
    .health-range-btn { flex: 0 0 auto; white-space: nowrap; }

    /* Supplier-analytics range (Bootstrap .btn-group): keep each abbreviated
       label on one line and let the group scroll if it ever overflows. */
    .btn-group .btn.btn-ghost { white-space: nowrap; }
}

/* Range labels never break onto two lines, at any width. */
.subnav > a, .ai-range-btn, .health-range-btn { white-space: nowrap; }

/* ---------- Brand mark (avatar-sized for headings/cards) ---------- */
.brand-pill {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 12px; border-radius: 999px;
    background: linear-gradient(135deg, rgba(99,102,241,0.10), rgba(139,92,246,0.10));
    border: 1px solid rgba(99,102,241,0.22);
    color: var(--brand-700); font-size: 12px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.8px;
}

/* ---------- Premium contact / info card ---------- */
.contact-card {
    position: relative;
    padding: 20px 22px;
    background: var(--glass-bg-strong);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    box-shadow: var(--glass-shadow);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
    overflow: hidden;
}
.contact-card::before {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--brand-500), var(--accent-500));
    opacity: 0.45; transition: opacity .25s ease, width .25s ease;
}
.contact-card:hover {
    transform: translateX(2px) translateY(-2px);
    box-shadow: var(--glass-shadow-lg);
    border-color: rgba(99,102,241,0.30);
}
.contact-card:hover::before { opacity: 1; width: 5px; }

.contact-card .cc-row {
    display: flex; align-items: flex-start; gap: 14px;
}
.contact-card .cc-icon {
    flex-shrink: 0;
    width: 48px; height: 48px; border-radius: 14px;
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff; font-size: 20px;
    background: linear-gradient(135deg, var(--brand-500), var(--accent-500));
    box-shadow: 0 10px 20px rgba(99,102,241,0.22);
}
.contact-card .cc-icon.success { background: linear-gradient(135deg, #10b981, #34d399); box-shadow: 0 10px 20px rgba(16,185,129,0.22); }
.contact-card .cc-icon.info    { background: linear-gradient(135deg, #0ea5e9, #38bdf8); box-shadow: 0 10px 20px rgba(14,165,233,0.22); }
.contact-card .cc-icon.warning { background: linear-gradient(135deg, #f59e0b, #fbbf24); box-shadow: 0 10px 20px rgba(245,158,11,0.22); }

.contact-card h6 {
    font-size: 15px; font-weight: 800; color: var(--ink-900);
    margin: 0 0 4px;
}
.contact-card .cc-primary {
    font-size: 14px; color: var(--ink-700); font-weight: 600;
}
.contact-card .cc-primary a { color: var(--brand-600); text-decoration: none; }
.contact-card .cc-primary a:hover { text-decoration: underline; }
.contact-card .cc-sub {
    font-size: 12.5px; color: var(--ink-500); margin-top: 4px;
}

/* =================================================================
   v3.4 — DASHBOARD ROW SPACING + TABLE LAYOUT POLISH
   Fixes:
     1. "Needs pricing" was visually overlapping the next dashboard row
        because Bootstrap g-4 sets ONLY in-row gutters, not row-to-row.
     2. "Out of Stock" / "Needs pricing" badges wrapped to 2 lines in
        narrow table columns.
     3. Action buttons crammed next to the status badge column.
   ================================================================= */

/* Vertical breathing room between sibling rows inside dashboard pages.
   Bootstrap `g-4` controls in-row gutters, not row-to-row gaps. */
.content > .row { margin-bottom: 1.5rem; }
.content > .row:last-of-type { margin-bottom: 0; }
.content > .stat-grid + .row { margin-top: 0; }

/* Optional explicit wrapper if a page wants to opt in */
.dashboard-section { margin-bottom: 1.5rem; }
.dashboard-section:last-child { margin-bottom: 0; }

/* Status column needs to stay roomy enough that badges don't shrink-wrap. */
.table-wrap .table.compact td .badge-soft,
.table-wrap .table .badge-soft { white-space: nowrap; }
.table-wrap .table thead th:nth-last-child(2),  /* status column */
.table-wrap .table tbody td:nth-last-child(2) {
    /* Only applies tightly when the last column is actions — gives the
       status column breathing room without forcing a fixed width. */
}

/* Action button column needs both horizontal AND vertical breathing room
   from the previous (status/qty) column. */
.row-actions { gap: 6px !important; padding-left: 4px; }
.table-wrap td.text-end > .row-actions { justify-content: flex-end; }

/* Make sure rows don't collapse to a too-small status column when there
   are short labels in front of long ones. */
.qty-pill, .badge-soft { min-height: 24px; }

/* Cards should size to their own content. Forcing min-height:100% on
   every column-wrapped glass card caused the Recent Movements card
   (which has an internal max-height scroll) to stretch and show a
   large empty area when its row sibling was much taller.
   If a page wants explicit equal-height columns, opt in with
   Bootstrap's `h-100` on the specific element. */
.row > [class*="col-"] > .glass { height: auto; }
.row > [class*="col-"] > .glass.h-100 { min-height: 100%; }

/* =================================================================
   v3.3 — CONTAINMENT + PREMIUM FEATURE CARDS
   ================================================================= */

/* ---------- Page-level containers ---------- */
.dashboard-container,
.public-container,
.contained-section {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--content-padding);
    padding-right: var(--content-padding);
}
.dashboard-container { max-width: var(--dashboard-max-width); }
.public-container,
.contained-section { max-width: var(--public-max-width); }

/* Premium grid layouts (deterministic, capped) */
.premium-grid {
    display: grid;
    gap: 22px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 991.98px) { .premium-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575.98px) { .premium-grid { grid-template-columns: 1fr; gap: 16px; } }

.dashboard-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(12, minmax(0, 1fr));
}

/* ---------- Premium feature card (services / home highlights) ---------- */
.feature-card {
    position: relative;
    padding: 26px 24px 22px;
    background: var(--glass-bg-strong);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--glass-shadow);
    transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
    overflow: hidden;
}
.feature-card::before {
    /* gradient accent rail along the top */
    content: ""; position: absolute; left: 22px; right: 22px; top: 0;
    height: 3px; border-radius: 0 0 3px 3px;
    background: linear-gradient(90deg, var(--brand-500), var(--accent-500));
    opacity: 0.85;
    transition: left .28s ease, right .28s ease;
}
.feature-card::after {
    /* soft brand glow that reveals on hover */
    content: ""; position: absolute; inset: -1px;
    border-radius: inherit; pointer-events: none;
    background: radial-gradient(420px 180px at 90% 0%, rgba(99,102,241,0.10), transparent 70%);
    opacity: 0; transition: opacity .28s ease;
}
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--glass-shadow-lg);
    border-color: rgba(99,102,241,0.30);
}
.feature-card:hover::before { left: 0; right: 0; opacity: 1; }
.feature-card:hover::after  { opacity: 1; }

.feature-card .fc-icon {
    width: 52px; height: 52px;
    border-radius: 14px;
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff; font-size: 22px;
    margin-bottom: 14px;
    box-shadow: 0 12px 22px rgba(15,23,42,0.10);
    background: linear-gradient(135deg, var(--brand-500), var(--accent-500));
    transition: transform .28s ease;
}
.feature-card:hover .fc-icon { transform: rotate(-4deg) scale(1.05); }
.feature-card .fc-icon.success  { background: linear-gradient(135deg, #10b981, #34d399); }
.feature-card .fc-icon.danger   { background: linear-gradient(135deg, #ef4444, #f87171); }
.feature-card .fc-icon.warning  { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.feature-card .fc-icon.info     { background: linear-gradient(135deg, #0ea5e9, #38bdf8); }
.feature-card .fc-icon.rose     { background: linear-gradient(135deg, #ec4899, #f472b6); }

.feature-card h5 {
    font-size: 17px; font-weight: 800; color: var(--ink-900);
    margin: 0 0 8px; letter-spacing: -0.2px;
    display: flex; align-items: center; gap: 8px;
}
.feature-card h5 .fc-chip {
    display: inline-flex; align-items: center;
    background: var(--brand-50); color: var(--brand-700);
    border: 1px solid rgba(99,102,241,0.18);
    padding: 2px 8px; border-radius: 999px;
    font-size: 10.5px; font-weight: 700;
    letter-spacing: 0.6px; text-transform: uppercase;
}
.feature-card p {
    color: var(--ink-500); font-size: 14px; line-height: 1.62; margin: 0;
}
.feature-card .fc-meta {
    display: flex; gap: 16px; flex-wrap: wrap;
    margin-top: 14px; padding-top: 14px;
    border-top: 1px dashed var(--ink-200);
    font-size: 12px; color: var(--ink-500);
}
.feature-card .fc-meta span {
    display: inline-flex; align-items: center; gap: 5px;
}

/* ---------- Section header with eyebrow ---------- */
.section-header {
    text-align: center; max-width: 720px; margin: 0 auto 40px;
}
.section-header .eyebrow {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 12px; border-radius: 999px;
    background: rgba(99,102,241,0.10); color: var(--brand-700);
    font-size: 12px; font-weight: 700;
    letter-spacing: 0.8px; text-transform: uppercase;
    margin-bottom: 12px;
}
.section-header h2 {
    font-size: clamp(26px, 3.4vw, 36px);
    font-weight: 800; letter-spacing: -0.6px; color: var(--ink-900);
    margin: 0 0 8px;
}
.section-header p {
    color: var(--ink-500); font-size: 15.5px; line-height: 1.65; margin: 0;
}

/* =================================================================
   v3.8 — "Why EAZYDEV" executive split section (classic / premium)
   Replaces the repeated card grid with a sticky intro panel + an
   elegant column of glass feature rows. Mature, brand-consistent
   icon treatment (no rainbow fills).
   ================================================================= */
.why-section { padding-top: 64px; padding-bottom: 64px; }
.why-split {
    display: grid;
    grid-template-columns: 0.92fr 1.08fr;
    gap: clamp(28px, 4vw, 64px);
    align-items: start;
}

/* Left — sticky executive intro */
.why-intro { position: sticky; top: 92px; }
.why-intro .eyebrow {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 6px 14px; border-radius: 999px;
    background: rgba(99,102,241,0.10); color: var(--brand-700);
    font-size: 12px; font-weight: 700;
    letter-spacing: 0.6px; text-transform: uppercase;
    margin-bottom: 18px;
}
.why-intro h2 {
    font-size: clamp(28px, 3.4vw, 40px);
    font-weight: 800; letter-spacing: -0.8px; color: var(--ink-900);
    line-height: 1.12; margin: 0 0 16px;
}
.why-intro h2 .why-grad {
    background: linear-gradient(120deg, var(--brand-600), var(--accent-500));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.why-intro p {
    color: var(--ink-500); font-size: 16px; line-height: 1.7;
    margin: 0 0 26px; max-width: 460px;
}
.why-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.why-trust {
    list-style: none; padding: 0; margin: 0;
    display: flex; flex-wrap: wrap; gap: 10px 22px;
}
.why-trust li {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 13.5px; font-weight: 600; color: var(--ink-700);
}
.why-trust li i { color: var(--brand-500); font-size: 15px; }

/* Right — elegant feature rows */
.why-list { display: flex; flex-direction: column; gap: 14px; }
.why-row {
    position: relative;
    display: flex; align-items: flex-start; gap: 18px;
    padding: 20px 22px;
    background: var(--glass-bg-strong);
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    box-shadow: 0 6px 20px rgba(31,38,135,0.05);
    transition: transform .26s ease, box-shadow .26s ease, border-color .26s ease;
    overflow: hidden;
}
.why-row::before {
    content: ""; position: absolute; left: 0; top: 14px; bottom: 14px;
    width: 3px; border-radius: 0 3px 3px 0;
    background: linear-gradient(180deg, var(--brand-500), var(--accent-500));
    transform: scaleY(0); transform-origin: top; transition: transform .26s ease;
}
.why-row:hover {
    transform: translateX(4px);
    box-shadow: 0 14px 34px rgba(99,102,241,0.14);
    border-color: rgba(99,102,241,0.28);
}
.why-row:hover::before { transform: scaleY(1); }
.why-ico {
    flex-shrink: 0;
    width: 52px; height: 52px; border-radius: 14px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 22px; color: #fff;
    background: linear-gradient(135deg, var(--brand-500), var(--accent-500));
    box-shadow: 0 12px 22px rgba(15,23,42,0.12);
    border: 0;
    transition: transform .26s ease, box-shadow .26s ease;
}
.why-ico i { color: #fff; line-height: 1; }
.why-ico--brand   { background: linear-gradient(135deg, var(--brand-500), var(--accent-500)); }
.why-ico--success { background: linear-gradient(135deg, #10b981, #34d399); }
.why-ico--danger  { background: linear-gradient(135deg, #ef4444, #f87171); }
.why-ico--warning { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.why-ico--info    { background: linear-gradient(135deg, #0ea5e9, #38bdf8); }
.why-ico--rose    { background: linear-gradient(135deg, #ec4899, #f472b6); }
.why-row:hover .why-ico { transform: rotate(-4deg) scale(1.06); }
.why-body h5 {
    font-size: 16.5px; font-weight: 800; color: var(--ink-900);
    margin: 2px 0 5px; letter-spacing: -0.2px;
}
.why-body p { color: var(--ink-500); font-size: 14px; line-height: 1.6; margin: 0; }

@media (max-width: 991.98px) {
    .why-split { grid-template-columns: 1fr; gap: 30px; }
    .why-intro { position: static; text-align: center; }
    .why-intro p { margin-left: auto; margin-right: auto; }
    .why-actions, .why-trust { justify-content: center; }
}
@media (max-width: 575.98px) {
    .why-row { padding: 16px; gap: 14px; }
    .why-ico { width: 44px; height: 44px; font-size: 19px; }
    .why-body h5 { font-size: 15.5px; }
}

/* ---------- Tighten public .section to use the public container ---------- */
.section {
    width: 100% !important;
    max-width: var(--public-max-width) !important;
    margin-left: auto; margin-right: auto;
    padding-left: var(--content-padding);
    padding-right: var(--content-padding);
}

/* ---------- Premium "stat" tile (used outside dashboard) ---------- */
.tile {
    padding: 20px;
    background: var(--glass-bg-strong);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    transition: transform .25s ease, box-shadow .25s ease;
}
.tile:hover { transform: translateY(-2px); box-shadow: var(--glass-shadow); }
.tile .num {
    font-size: 30px; font-weight: 800; color: var(--ink-900);
    letter-spacing: -0.5px;
}
.tile .lbl {
    font-size: 11px; font-weight: 700; letter-spacing: 1.2px;
    text-transform: uppercase; color: var(--ink-500); margin-top: 2px;
}

/* =================================================================
   v3.6 — Reusable AUTH / FORM / EMPTY-STATE component classes
   ================================================================= */

/* ---------- v3.9 — Single-column auth card (reset / verify / 2FA) ----------
   A centered premium glass card, never clipped, always full-width inputs.
   Pair with .field / .premium-form-control / .premium-btn / .auth-alert. */
.auth-card {
    width: 100%;
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(22px) saturate(160%);
    -webkit-backdrop-filter: blur(22px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 24px;
    padding: clamp(26px, 5vw, 40px) clamp(20px, 4vw, 32px);
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.28);
}
/* Cap width + keep centered inside the auth shell (mirrors the .auth-split rule). */
body.auth-shell > .auth-card { max-width: 480px; }

.auth-card .ac-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.auth-card .ac-brand img { width: 40px; height: 40px; }
.auth-card .ac-brand .wm { font-weight: 800; letter-spacing: 1.2px; font-size: 17px; color: var(--ink-900); }

.auth-card .ac-icon {
    width: 72px; height: 72px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 32px; color: #fff; margin: 0 auto 16px;
    background: linear-gradient(135deg, var(--brand-500), var(--accent-500));
}
.auth-card .ac-icon.success { background: linear-gradient(135deg, #10b981, #34d399); }

.auth-card h1, .auth-card .ac-title {
    font-size: 22px; font-weight: 800; color: var(--ink-900);
    letter-spacing: -0.3px; margin: 0 0 6px;
}
.auth-card .ac-sub { color: var(--ink-500); font-size: 14px; line-height: 1.6; margin: 0 0 20px; }
.auth-card.text-center .ac-sub { margin-bottom: 22px; }
.auth-card .ac-foot { margin-top: 18px; text-align: center; font-size: 13.5px; color: var(--ink-500); }
.auth-card .premium-btn { text-decoration: none; }   /* when rendered as an <a> */

/* ---------- Auth split-screen shell ---------- */
.auth-split {
    width: 100%; max-width: 1080px;
    display: grid; grid-template-columns: 1.05fr 1fr;
    border-radius: 28px; overflow: hidden;
    background: rgba(255,255,255,0.16);
    border: 1px solid rgba(255,255,255,0.32);
    backdrop-filter: blur(28px) saturate(160%);
    -webkit-backdrop-filter: blur(28px) saturate(160%);
    box-shadow: 0 30px 80px rgba(15,23,42,0.32);
}
.auth-hero-panel {
    position: relative; padding: 52px 46px; color: #fff;
    display: flex; flex-direction: column; justify-content: space-between;
    min-height: 600px;
    background:
        radial-gradient(600px 400px at 100% 0%, rgba(255,255,255,0.20), transparent 60%),
        radial-gradient(500px 300px at 0% 100%, rgba(255,255,255,0.16), transparent 60%),
        linear-gradient(135deg, rgba(99,102,241,0.92), rgba(139,92,246,0.92));
}
.auth-hero-panel::before {
    content: ""; position: absolute; inset: 0; opacity: 0.5;
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'><path fill='none' stroke='%23ffffff' stroke-opacity='0.06' stroke-width='1' d='M0 40 L80 40 M40 0 L40 80'/></svg>");
}
.auth-hero-panel > * { position: relative; z-index: 1; }
.auth-hero-panel .ah-logo { display: inline-flex; align-items: center; gap: 12px; }
.auth-hero-panel .ah-logo img { width: 52px; height: 52px; }
.auth-hero-panel .ah-logo .wm { font-weight: 800; letter-spacing: 1.4px; font-size: 19px; line-height: 1; }
.auth-hero-panel .ah-logo .tag { font-size: 10px; letter-spacing: 3px; font-weight: 600; color: rgba(255,255,255,0.85); margin-top: 4px; }
.auth-hero-panel h2 { font-size: 30px; font-weight: 800; line-height: 1.15; letter-spacing: -0.6px; margin: 30px 0 10px; }
.auth-hero-panel .ah-sub { font-size: 14.5px; line-height: 1.6; color: rgba(255,255,255,0.86); max-width: 380px; }
.auth-bullets { display: grid; gap: 11px; margin-top: 26px; }
.auth-bullets .ab {
    display: flex; align-items: flex-start; gap: 12px;
    background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.18);
    padding: 11px 14px; border-radius: 13px; font-size: 13.5px;
    backdrop-filter: blur(8px);
}
.auth-bullets .ab i {
    flex-shrink: 0; width: 30px; height: 30px; border-radius: 9px;
    background: rgba(255,255,255,0.22);
    display: inline-flex; align-items: center; justify-content: center; font-size: 15px;
}
.auth-bullets .ab b { display: block; font-weight: 700; }
.auth-bullets .ab span { color: rgba(255,255,255,0.82); font-size: 12.5px; }
.auth-hero-foot { font-size: 12px; color: rgba(255,255,255,0.7); }

.auth-form-panel {
    padding: 52px 46px;
    background: rgba(255,255,255,0.82);
    backdrop-filter: blur(20px) saturate(160%);
    display: flex; flex-direction: column; justify-content: center;
}
.auth-form-panel h1 { font-size: 25px; font-weight: 800; color: var(--ink-900); letter-spacing: -0.4px; margin: 0 0 6px; }
.auth-form-panel .lead { color: var(--ink-500); font-size: 14.5px; margin-bottom: 22px; }

@media (max-width: 880px) {
    .auth-split { grid-template-columns: 1fr; max-width: 480px; }
    .auth-hero-panel { min-height: auto; padding: 30px 26px; }
    .auth-hero-panel h2 { font-size: 23px; margin-top: 18px; }
    .auth-bullets, .auth-hero-foot { display: none; }
    .auth-form-panel { padding: 32px 26px; }
}

/* ---------- Premium form field (icon + input) ---------- */
.field { position: relative; margin-bottom: 15px; }
.field > label {
    display: block; font-size: 12.5px; font-weight: 600;
    color: var(--ink-700); margin-bottom: 6px;
}
.field .field-icon {
    position: absolute; left: 14px; top: 38px;
    color: var(--ink-400); font-size: 16px; pointer-events: none;
}
/* Standalone base so .premium-form-control works anywhere (e.g. 2FA code box) */
.premium-form-control {
    width: 100%; padding: 12px 14px;
    border-radius: 12px; border: 1px solid var(--ink-200);
    font-size: 14px; background: #fff;
    transition: border-color .18s ease, box-shadow .18s ease;
}
.premium-form-control:focus {
    outline: none; border-color: var(--brand-500);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.18);
}
/* Inside a .field, leave room for the left icon + right toggle */
.field .premium-form-control { padding: 12px 44px 12px 42px; }
.field .field-toggle {
    position: absolute; right: 14px; top: 38px;
    cursor: pointer; color: var(--ink-400); font-size: 16px;
}
.field .field-toggle:hover { color: var(--brand-600); }
.field .field-help { font-size: 11.5px; color: var(--ink-400); margin-top: 5px; }

/* password strength meter */
.pw-meter { height: 5px; border-radius: 999px; background: var(--ink-100); margin-top: 8px; overflow: hidden; }
.pw-meter > span { display:block; height:100%; width:0; border-radius:999px; transition: width .25s ease, background .25s ease; }
.pw-meter.weak   > span { width:33%;  background: var(--danger); }
.pw-meter.medium > span { width:66%;  background: var(--warning); }
.pw-meter.strong > span { width:100%; background: var(--success); }
.pw-label { font-size: 11px; font-weight: 600; margin-top: 4px; }
.pw-label.weak { color:#b91c1c; } .pw-label.medium { color:#b45309; } .pw-label.strong { color:#047857; }

/* ---------- Premium button ---------- */
.premium-btn {
    width: 100%; padding: 13px; border-radius: 12px; border: none;
    background: linear-gradient(135deg, var(--brand-500), var(--accent-500));
    color: #fff; font-size: 15px; font-weight: 700; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    box-shadow: 0 14px 30px rgba(99,102,241,0.32);
    transition: transform .12s ease, box-shadow .2s ease, opacity .2s ease;
}
.premium-btn:hover { transform: translateY(-1px); box-shadow: 0 18px 40px rgba(99,102,241,0.42); }
.premium-btn:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }
.premium-btn .spin {
    width: 16px; height: 16px; border: 2.5px solid rgba(255,255,255,0.45);
    border-top-color: #fff; border-radius: 50%;
    animation: spin .8s linear infinite; display: none;
}

/* ---------- Auth message / alert ---------- */
.auth-alert {
    padding: 10px 13px; border-radius: 11px; font-size: 13px;
    display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
    border-left: 3px solid;
}
.auth-alert.error, .auth-alert.danger { background: rgba(239,68,68,0.10); color: #991b1b; border-left-color: var(--danger); }
.auth-alert.success { background: rgba(16,185,129,0.10); color: #047857; border-left-color: var(--success); }
.auth-alert.info, .auth-alert.warning { background: rgba(245,158,11,0.12); color: #b45309; border-left-color: var(--warning); }

/* ---------- Generic form glass card (for in-app forms) ---------- */
.form-glass-card {
    background: var(--glass-bg-strong);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
    padding: 28px;
}

/* ---------- Page header card (for in-app pages) ---------- */
.page-header-card {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; flex-wrap: wrap;
    background: linear-gradient(135deg, rgba(99,102,241,0.08), rgba(139,92,246,0.08));
    border: 1px solid rgba(99,102,241,0.16);
    border-radius: var(--radius-lg);
    padding: 20px 24px; margin-bottom: 22px;
}
.page-header-card h1 { font-size: 22px; font-weight: 800; color: var(--ink-900); margin: 0; letter-spacing: -0.4px; }
.page-header-card p { color: var(--ink-500); margin: 4px 0 0; font-size: 13.5px; }

/* ---------- Premium empty-state card ---------- */
.empty-state-card {
    background: var(--glass-bg-strong);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
    padding: 56px 28px; text-align: center;
}
.empty-state-card .es-icon {
    width: 84px; height: 84px; margin: 0 auto 18px;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--brand-50), #fff);
    border: 1px solid var(--glass-border);
    color: var(--brand-600); font-size: 36px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 12px 28px rgba(99,102,241,0.14);
}
.empty-state-card h5 { font-weight: 800; color: var(--ink-900); margin: 0 0 6px; font-size: 18px; }
.empty-state-card p { color: var(--ink-500); font-size: 14px; max-width: 460px; margin: 0 auto 20px; }

/* ---------- Dashboard content shell (min-height guard) ---------- */
.dashboard-content-shell { min-height: 60vh; }

/* =================================================================
   v3.10 — Owner/Manager dashboard summary widget
   ================================================================= */
.approval-mini-grid {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px;
}
.approval-mini-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
/* Phones: 2-up so money values never get squeezed into overlapping strips. */
@media (max-width: 575.98px) {
    .approval-mini-grid,
    .approval-mini-grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}
.approval-mini {
    display: block; text-decoration: none; text-align: center; min-width: 0;
    padding: 16px 10px; border-radius: 14px;
    background: var(--glass-bg); border: 1px solid var(--glass-border);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.approval-mini:hover {
    transform: translateY(-2px); box-shadow: var(--glass-shadow);
    border-color: rgba(99,102,241,0.28);
}
/* Fluid value type that stays on ONE line and never spills outside the card. */
.approval-mini .num {
    font-size: clamp(17px, 4.6vw, 26px); font-weight: 800; color: var(--ink-900);
    line-height: 1.05; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.approval-mini .lbl { font-size: 11px; font-weight: 600; color: var(--ink-500); margin-top: 6px;
    text-transform: uppercase; letter-spacing: 0.5px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.pnl-mini {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px;
}
@media (max-width: 575.98px) { .pnl-mini { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pnl-cell {
    padding: 14px; border-radius: 14px;
    background: var(--glass-bg); border: 1px solid var(--glass-border);
}
.pnl-cell .lbl { font-size: 11px; font-weight: 700; color: var(--ink-500);
    text-transform: uppercase; letter-spacing: 0.6px; }
.pnl-cell .val { font-size: 20px; font-weight: 800; color: var(--ink-900); margin-top: 4px; letter-spacing: -0.3px; }
.pnl-cell.pnl-net.profit { background: var(--success-soft); border-color: rgba(16,185,129,0.30); }
.pnl-cell.pnl-net.profit .val { color: #047857; }
.pnl-cell.pnl-net.loss { background: var(--danger-soft); border-color: rgba(239,68,68,0.30); }
.pnl-cell.pnl-net.loss .val { color: #b91c1c; }

.pnl-warn {
    margin-top: 14px; padding: 10px 13px; border-radius: 11px; font-size: 13px;
    display: flex; align-items: center; gap: 8px;
    background: var(--warning-soft); color: #b45309; border-left: 3px solid var(--warning);
}
.pnl-warn.loss { background: var(--danger-soft); color: #b91c1c; border-left-color: var(--danger); }
.pnl-warn a { color: inherit; font-weight: 700; text-decoration: underline; }

/* =================================================================
   v3.11 — AI Business Assistant card
   ================================================================= */
.ai-card { position: relative; overflow: hidden; }
/* v3.32 — top-bar (::before) removed for the same reason as the billing card:
   a 3px square-cornered gradient line over a 20px-rounded card reads as a rough
   detached line. The card keeps its glass border + brand avatar for identity. */
.ai-head {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 16px; flex-wrap: wrap; margin-bottom: 12px;
}
.ai-head-left { display: flex; align-items: center; gap: 14px; }
.ai-avatar {
    flex-shrink: 0; width: 46px; height: 46px; border-radius: 14px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 22px; color: #fff;
    background: linear-gradient(135deg, var(--brand-500), var(--accent-500));
    box-shadow: 0 10px 22px rgba(99,102,241,0.32);
}
.ai-card-title { margin: 0; font-size: 17px; font-weight: 800; color: var(--ink-900); letter-spacing: -0.3px; }
.ai-card-sub { margin: 2px 0 0; font-size: 13px; color: var(--ink-500); }
.ai-head-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.ai-range { display: inline-flex; background: var(--glass-bg); border: 1px solid var(--glass-border);
    border-radius: 999px; padding: 3px; }
.ai-range-btn {
    border: none; background: transparent; cursor: pointer;
    padding: 6px 12px; border-radius: 999px;
    font-size: 12.5px; font-weight: 600; color: var(--ink-500);
    transition: background .18s ease, color .18s ease;
}
.ai-range-btn:hover { color: var(--brand-700); }
.ai-range-btn.active {
    background: linear-gradient(135deg, var(--brand-500), var(--accent-500));
    color: #fff; box-shadow: 0 6px 16px rgba(99,102,241,0.30);
}

.ai-meta {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    font-size: 12px; color: var(--ink-400); margin-bottom: 14px; flex-wrap: wrap;
}
.ai-meta .ai-range-label { font-weight: 700; color: var(--brand-600); }

/* Insight rows */
.ai-insight-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 767.98px) { .ai-insight-list { grid-template-columns: 1fr; } }
.ai-insight {
    display: flex; align-items: flex-start; gap: 13px;
    padding: 15px 16px; border-radius: 16px;
    background: var(--glass-bg); border: 1px solid var(--glass-border);
    border-left: 3px solid var(--brand-500);
    transition: transform .2s ease, box-shadow .2s ease;
}
.ai-insight:hover { transform: translateY(-2px); box-shadow: var(--glass-shadow); }
.ai-insight.positive { border-left-color: var(--success); }
.ai-insight.warning  { border-left-color: var(--warning); }
.ai-insight.danger   { border-left-color: var(--danger); }
.ai-insight.info     { border-left-color: var(--brand-500); }
.ai-ico {
    flex-shrink: 0; width: 38px; height: 38px; border-radius: 11px;
    display: inline-flex; align-items: center; justify-content: center; font-size: 18px;
}
.ai-insight.positive .ai-ico { background: var(--success-soft); color: #047857; }
.ai-insight.warning  .ai-ico { background: var(--warning-soft); color: #b45309; }
.ai-insight.danger   .ai-ico { background: var(--danger-soft);  color: #b91c1c; }
.ai-insight.info     .ai-ico { background: rgba(99,102,241,0.12); color: var(--brand-600); }
.ai-body { min-width: 0; flex: 1; }
.ai-insight-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ai-title { font-size: 13.5px; font-weight: 800; color: var(--ink-900); }
.ai-value { font-size: 12px; font-weight: 700; color: var(--ink-500); white-space: nowrap; }
.ai-msg { font-size: 13px; color: var(--ink-700); line-height: 1.55; margin-top: 3px; overflow-wrap: anywhere; }
.ai-link {
    display: inline-flex; align-items: center; gap: 5px; margin-top: 8px;
    font-size: 12px; font-weight: 700; color: var(--brand-600); text-decoration: none;
}
.ai-link:hover { color: var(--accent-600); }

/* States */
.ai-quiet, .ai-error-state, .ai-loading-state {
    display: flex; align-items: center; gap: 10px;
    padding: 16px 18px; border-radius: 14px; font-size: 14px;
    background: var(--glass-bg); border: 1px solid var(--glass-border); color: var(--ink-700);
}
.ai-quiet i { color: var(--success); font-size: 18px; }
.ai-error-state { background: var(--danger-soft); color: #b91c1c; border-color: rgba(239,68,68,0.3); }
.ai-loading-state { color: var(--ink-500); }
.ai-spin {
    width: 16px; height: 16px; border: 2.5px solid rgba(99,102,241,0.25);
    border-top-color: var(--brand-500); border-radius: 50%;
    display: inline-block; animation: spin .8s linear infinite;
}
.ai-card.ai-loading { opacity: 0.85; }
.ai-empty { text-align: center; padding: 36px 18px; }
.ai-empty-ico {
    width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 22px;
    display: flex; align-items: center; justify-content: center; font-size: 32px;
    color: var(--brand-600); background: linear-gradient(135deg, var(--brand-50), #fff);
    border: 1px solid var(--glass-border); box-shadow: 0 12px 28px rgba(99,102,241,0.14);
}
.ai-empty h6 { font-weight: 800; color: var(--ink-900); margin: 0 0 6px; font-size: 16px; }
.ai-empty p { color: var(--ink-500); font-size: 13.5px; max-width: 440px; margin: 0 auto 16px; }

/* =================================================================
   v3.13 — Smart Business Health Score
   ================================================================= */
.health-grid {
    display: grid; grid-template-columns: 240px 1fr; gap: 24px; align-items: start;
}
@media (max-width: 767.98px) { .health-grid { grid-template-columns: 1fr; gap: 20px; } }

.health-meter-col { text-align: center; }
.health-ring {
    --ring-track: var(--ink-100);
    width: 150px; height: 150px; border-radius: 50%; margin: 0 auto;
    display: grid; place-items: center;
    background: conic-gradient(var(--meter) calc(var(--pct) * 1%), var(--ring-track) 0);
}
.health-ring.health-excellent { --meter: #10b981; }
.health-ring.health-good       { --meter: #6366f1; }
.health-ring.health-attention  { --meter: #f59e0b; }
.health-ring.health-critical   { --meter: #ef4444; }
.health-ring-inner {
    width: 116px; height: 116px; border-radius: 50%; background: #fff;
    /* flex column centring keeps the score + "/100" as one block, perfectly
       centred in the ring (grid place-items split them across two stretched
       rows, pushing the number into the top half). */
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; line-height: 1;
    box-shadow: inset 0 0 0 1px var(--glass-border);
}
.health-score-num { font-size: 40px; font-weight: 800; color: var(--ink-900); line-height: 1; letter-spacing: -1px; }
.health-score-of { font-size: 12px; font-weight: 700; color: var(--ink-400); margin-top: 3px; line-height: 1; }

.health-badge {
    display: inline-block; margin-top: 14px; padding: 5px 16px; border-radius: 999px;
    font-weight: 800; font-size: 13px; letter-spacing: 0.3px;
}
.health-badge.health-excellent { background: var(--success-soft); color: #047857; }
.health-badge.health-good       { background: rgba(99,102,241,0.12); color: var(--brand-700); }
.health-badge.health-attention  { background: var(--warning-soft); color: #b45309; }
.health-badge.health-critical   { background: var(--danger-soft); color: #b91c1c; }
.health-summary { font-size: 13.5px; color: var(--ink-700); line-height: 1.55; margin: 12px 0 8px; }
.health-confidence { font-size: 12px; color: var(--ink-500); }
.health-confidence i { color: var(--brand-500); }

.health-breakdown { display: grid; gap: 12px; }
.health-cat-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; }
.health-cat-label { font-weight: 600; color: var(--ink-700); }
.health-cat-label i { color: var(--brand-600); margin-right: 4px; }
.health-cat-score { font-weight: 800; color: var(--ink-900); white-space: nowrap; }
.health-bar { height: 8px; border-radius: 999px; background: var(--ink-100); overflow: hidden; margin: 5px 0 3px; }
.health-bar-fill { display: block; height: 100%; border-radius: 999px; transition: width .4s ease; }
.health-bar-fill.health-good { background: linear-gradient(90deg, #10b981, #34d399); }
.health-bar-fill.health-warn { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.health-bar-fill.health-bad  { background: linear-gradient(90deg, #ef4444, #f87171); }
.health-cat-note { font-size: 11.5px; color: var(--ink-500); }

/* v3.36 — layman explanation per category + intro */
.health-explainer { font-size: 12.5px; color: var(--ink-600); line-height: 1.55;
    background: rgba(99,102,241,0.06); border: 1px solid rgba(99,102,241,0.16);
    border-radius: 12px; padding: 10px 12px; margin-bottom: 14px; }
.health-cat-explain { margin-top: 6px; }
.health-cat-explain > summary { list-style: none; cursor: pointer; display: inline-flex;
    align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; color: var(--brand-700);
    user-select: none; }
.health-cat-explain > summary::-webkit-details-marker { display: none; }
.health-cat-explain[open] > summary { margin-bottom: 6px; }
.health-cat-explain-body { font-size: 12.5px; color: var(--ink-700); line-height: 1.6;
    background: rgba(255,255,255,0.6); border-left: 3px solid var(--brand-300, #a5b4fc);
    border-radius: 8px; padding: 8px 11px; }
.health-cat-explain-body i { color: var(--ink-500); }

.health-block { margin-top: 16px; padding: 12px 14px; border-radius: 13px; border: 1px solid var(--glass-border); }
.health-block-title { font-weight: 800; font-size: 12.5px; margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.health-block ul { margin: 0; padding-left: 18px; }
.health-block li { font-size: 13px; color: var(--ink-700); margin: 3px 0; }
.health-warnings { background: var(--warning-soft); border-color: rgba(245,158,11,0.25); }
.health-warnings .health-block-title { color: #b45309; }
.health-actions { background: rgba(99,102,241,0.08); border-color: rgba(99,102,241,0.18); }
.health-actions .health-block-title { color: var(--brand-700); }

.health-range { display: inline-flex; flex-wrap: wrap; background: var(--glass-bg);
    border: 1px solid var(--glass-border); border-radius: 999px; padding: 3px; }
.health-range-btn { text-decoration: none; padding: 6px 12px; border-radius: 999px;
    font-size: 12.5px; font-weight: 600; color: var(--ink-500); transition: background .18s ease, color .18s ease; }
.health-range-btn:hover { color: var(--brand-700); }
.health-range-btn.active { background: linear-gradient(135deg, var(--brand-500), var(--accent-500)); color: #fff; }
.health-links { display: flex; flex-wrap: wrap; gap: 8px; }

.health-empty { text-align: center; padding: 36px 18px; }
.health-empty-ico {
    width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 22px;
    display: flex; align-items: center; justify-content: center; font-size: 32px;
    color: var(--brand-600); background: linear-gradient(135deg, var(--brand-50), #fff);
    border: 1px solid var(--glass-border); box-shadow: 0 12px 28px rgba(99,102,241,0.14);
}
.health-empty h6 { font-weight: 800; color: var(--ink-900); margin: 0 0 6px; font-size: 16px; }
.health-empty p { color: var(--ink-500); font-size: 13.5px; max-width: 460px; margin: 0 auto 16px; }

/* =================================================================
   v3.14 — Billing current-plan card + usage bars
   ================================================================= */
.current-plan-card { position: relative; }
/* v3.32 — the 3px gradient top-bar (::before) was removed: it read as a rough
   detached purple line above the card on the Billing page. The card's own
   glass border + shadow are enough. */

/* Owner-only danger zone (business settings). */
.danger-zone {
    border: 1px solid rgba(220, 38, 38, 0.28) !important;
    background: linear-gradient(180deg, rgba(254, 242, 242, 0.6), var(--glass-bg-strong));
}
.danger-zone h5 .ez-ico { color: #dc2626; }
.cp-main { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.cp-label { font-size: 11px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--ink-500); }
.cp-name { font-size: 26px; font-weight: 800; color: var(--ink-900); letter-spacing: -0.5px; display: flex; align-items: center; gap: 10px; }
.cp-sub { font-size: 13.5px; color: var(--ink-500); margin-top: 4px; }
.cp-status { text-align: right; }
.cp-dates { font-size: 12px; color: var(--ink-400); margin-top: 6px; }
.cp-usage { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 20px; }
@media (max-width: 767.98px) { .cp-usage { grid-template-columns: 1fr; } }
.usage-head { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 600; color: var(--ink-700); }
.usage-count { font-weight: 800; color: var(--ink-900); }
.usage-count.near { color: #b45309; }
.usage-count.over { color: #b91c1c; }
.usage-bar { height: 8px; border-radius: 999px; background: var(--ink-100); overflow: hidden; margin: 6px 0 3px; }
.usage-bar-fill { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand-500), var(--accent-500)); transition: width .4s ease; }
.usage-bar-fill.near { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.usage-bar-fill.over { background: linear-gradient(90deg, #ef4444, #f87171); }
.usage-warn { font-size: 11.5px; color: #b91c1c; margin-top: 4px; display: flex; align-items: center; gap: 5px; }
.usage-warn.near { color: #b45309; }
.cp-cancel { margin-top: 16px; }

/* Platform admin sub-nav */
.platform-nav { display: flex; flex-wrap: wrap; gap: 6px; }

/* Plan downgrade lock */
.plan-card.plan-disabled { opacity: 0.62; filter: grayscale(0.35); }
.plan-card.plan-disabled .price { color: var(--ink-500); }
.downgrade-note {
    display: flex; align-items: flex-start; gap: 8px;
    background: rgba(99,102,241,0.07); border: 1px solid rgba(99,102,241,0.16);
    color: var(--ink-700); border-radius: 12px; padding: 11px 14px;
    font-size: 12.5px; margin-bottom: 16px;
}
.downgrade-note i { color: var(--brand-600); margin-top: 1px; }
.downgrade-note a { color: var(--brand-700); font-weight: 700; }

/* =========================================================================
   v3.20.2 — Long-text wrap utilities (Phase 2 of invoice/PDF fix)

   Shared text-wrap helpers for HTML surfaces. Mirrors the PDF rule
   (every long-text cell becomes a wrap()ed Paragraph) for tables and
   invoice/receipt views rendered in the browser. Additive — do not
   remove or override existing layout rules.
   ===================================================================== */
.text-wrap-safe {
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
}

/* Apply inside a table cell. ``max-width: 0`` is the canonical CSS trick
   that lets a <td> shrink to its column width so overflow-wrap kicks in. */
.cell-wrap {
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
    max-width: 0;
}

/* Long product titles inside invoice/receipt line-item lists. Keeps a
   comfortable line-height so two-line names don't feel cramped. */
.invoice-item-name {
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.35;
}

/* Two-line clamp for product cards / list previews where horizontal space
   is limited and the full text lives on a detail page. */
.truncate-2-lines {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========================================================================
   First-login dashboard tutorial (v3.24)
   Driven by static/js/ez-tutorial.js. Premium glass card with brand
   progress bar. Renders above everything (z-index 90) but below the
   ez-notify toast container (which is higher).
   ======================================================================== */
.ez-tutorial-modal[hidden] { display: none !important; }
.ez-tutorial-modal {
    position: fixed; inset: 0; z-index: 90;
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
    animation: ezTutorialIn 220ms ease both;
}
@keyframes ezTutorialIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.ez-tutorial-backdrop {
    position: absolute; inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.ez-tutorial-card {
    position: relative; z-index: 1;
    max-width: 560px; width: 100%;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(99, 102, 241, 0.18);
    border-radius: 18px; padding: 22px 22px 18px;
    box-shadow: 0 30px 80px rgba(67, 56, 202, 0.22);
    max-height: calc(100vh - 32px);
    display: flex; flex-direction: column;
}
.ez-tutorial-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 10px;
}
.ez-tutorial-step {
    font-size: 12.5px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 1.1px;
    color: var(--brand-700, #4338ca);
}
.ez-tutorial-close {
    background: rgba(99, 102, 241, 0.08);
    color: var(--brand-700, #4338ca);
    border: 0; padding: 6px; border-radius: 8px;
    line-height: 0; cursor: pointer;
    transition: background 0.18s ease, transform 0.18s ease;
}
.ez-tutorial-close:hover { background: rgba(99, 102, 241, 0.16); transform: rotate(90deg); }
.ez-tutorial-bar {
    height: 6px; border-radius: 999px;
    background: rgba(99, 102, 241, 0.14);
    overflow: hidden; margin: 4px 0 18px;
}
.ez-tutorial-bar [data-bar] {
    display: block; height: 100%;
    background: linear-gradient(90deg, var(--brand-500, #6366f1), var(--brand-700, #4338ca));
    transition: width 0.3s ease;
}
.ez-tutorial-slides { overflow-y: auto; padding-right: 4px; }
.ez-tutorial-slides article {
    animation: ezTutorialSlide 220ms ease both;
}
.ez-tutorial-slides article[hidden] { display: none !important; }
@keyframes ezTutorialSlide {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.ez-tutorial-icon {
    width: 56px; height: 56px;
    background: linear-gradient(135deg, var(--brand-500, #6366f1), #8b5cf6);
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 22px rgba(99, 102, 241, 0.32);
    margin-bottom: 14px;
}
.ez-tutorial-slides h2 {
    font-size: 20px; font-weight: 800;
    margin: 0 0 8px; color: var(--ink-900, #0f172a);
    letter-spacing: -0.4px;
}
.ez-tutorial-slides p {
    font-size: 14px; line-height: 1.55;
    color: var(--ink-700, #334155);
    margin: 0 0 10px;
}
.ez-tutorial-slides ul {
    font-size: 13.5px; line-height: 1.55;
    color: var(--ink-700, #334155);
    padding-left: 18px; margin: 4px 0 12px;
}
.ez-tutorial-foot {
    display: flex; gap: 8px;
    justify-content: flex-end; align-items: center;
    margin-top: 16px; padding-top: 12px;
    border-top: 1px solid rgba(99, 102, 241, 0.10);
}
.ez-tutorial-foot [data-action="back"]:disabled { opacity: 0.4; pointer-events: none; }

@media (max-width: 540px) {
    .ez-tutorial-card { padding: 18px; }
    .ez-tutorial-slides h2 { font-size: 18px; }
    .ez-tutorial-foot { flex-wrap: wrap; }
    .ez-tutorial-foot .btn { flex: 1 1 auto; min-width: 80px; }
}

/* ================================================================
   v3.26 — Services page premium redesign (svc-* namespace)
   ================================================================ */

/* ---- Shared tokens / safety ---- */
:where(.svc-hero,
       .svc-core,
       .svc-flow-section,
       .svc-features,
       .svc-reports-section,
       .svc-cta-banner) {
    max-width: var(--public-max-width);
    margin: 0 auto;
    padding-left: var(--content-padding);
    padding-right: var(--content-padding);
    overflow-wrap: anywhere;
}
:where(.svc-hero h1,
       .svc-hero p,
       .svc-card-title,
       .svc-card-lead,
       .svc-card-body,
       .svc-card-title-sm,
       .svc-card-sub,
       .svc-card-text,
       .svc-flow-title,
       .svc-flow-text,
       .svc-h2,
       .svc-sub,
       .svc-tile-title,
       .svc-tile-text,
       .svc-report-title,
       .svc-report-text,
       .svc-cta-title,
       .svc-cta-lead) {
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* ---- Section header shared bits ---- */
.svc-section-header {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 36px;
}
.svc-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.10);
    border: 1px solid rgba(99, 102, 241, 0.25);
    color: var(--brand-600);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 14px;
}
.svc-h2 {
    font-size: clamp(24px, 3.4vw, 36px);
    font-weight: 800;
    line-height: 1.18;
    color: var(--ink-900, #0f172a);
    margin: 0 0 10px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.svc-sub {
    font-size: 15px;
    line-height: 1.7;
    color: var(--ink-500, #64748b);
    margin: 0;
}

/* ---- Shared buttons ---- */
.svc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid transparent;
    transition: transform 0.2s ease, box-shadow 0.25s ease,
                background 0.25s ease, color 0.25s ease,
                border-color 0.25s ease;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
}
.svc-btn:hover { transform: translateY(-2px); }
.svc-btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--brand-500), #8b5cf6);
    box-shadow: 0 12px 28px rgba(99, 102, 241, 0.32);
}
.svc-btn-primary:hover {
    color: #fff;
    box-shadow: 0 18px 36px rgba(99, 102, 241, 0.42);
}
.svc-btn-ghost {
    color: var(--brand-600);
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(99, 102, 241, 0.30);
    backdrop-filter: blur(10px);
}
.svc-btn-ghost:hover {
    color: var(--brand-600);
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(99, 102, 241, 0.55);
}
.svc-btn-light {
    color: var(--brand-600);
    background: #fff;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.18);
}
.svc-btn-light:hover { color: var(--brand-600); }
.svc-btn-outline-light {
    color: #fff;
    background: rgba(255, 255, 255, 0.10);
    border-color: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(8px);
}
.svc-btn-outline-light:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.85);
}

/* ---- 1. HERO ---- */
.svc-hero {
    position: relative;
    padding-top: clamp(40px, 6vw, 72px);
    padding-bottom: clamp(40px, 6vw, 72px);
    text-align: center;
    isolation: isolate;
}
.svc-hero-glow {
    position: absolute;
    inset: -10% 10% auto 10%;
    height: 70%;
    background: radial-gradient(60% 60% at 50% 30%,
                                rgba(139, 92, 246, 0.22) 0%,
                                rgba(99, 102, 241, 0.15) 35%,
                                rgba(99, 102, 241, 0.00) 70%);
    filter: blur(40px);
    z-index: -1;
    pointer-events: none;
}
.svc-hero-inner {
    max-width: 820px;
    margin: 0 auto;
}
.svc-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(99, 102, 241, 0.30);
    color: var(--brand-600);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    backdrop-filter: blur(10px);
    margin-bottom: 22px;
}
.svc-hero-title {
    font-size: clamp(32px, 5.4vw, 60px);
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: -0.015em;
    margin: 0 0 18px;
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 45%, #8b5cf6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.svc-hero-lead {
    font-size: clamp(15px, 1.5vw, 18px);
    line-height: 1.7;
    color: var(--ink-700, #334155);
    max-width: 640px;
    margin: 0 auto 28px;
}
.svc-hero-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 22px;
}
.svc-hero-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}
.svc-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(15, 23, 42, 0.08);
    color: var(--ink-700, #334155);
    font-size: 12.5px;
    font-weight: 600;
    backdrop-filter: blur(8px);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.04);
}

/* ---- 2. CORE SERVICES ---- */
.svc-core {
    padding-top: clamp(40px, 5vw, 64px);
    padding-bottom: clamp(40px, 5vw, 64px);
}
.svc-core-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}
@media (min-width: 992px) {
    .svc-core-grid {
        grid-template-columns: 1.15fr 1fr;
        gap: 28px;
    }
}
.svc-card {
    position: relative;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 22px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.svc-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 44px rgba(15, 23, 42, 0.12);
}
.svc-card-lg {
    padding: 32px 30px 30px;
    overflow: hidden;
}
.svc-card-lg-rail {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 5px;
    background: linear-gradient(180deg, var(--brand-500), #8b5cf6);
    border-radius: 22px 0 0 22px;
}
.svc-card-lg-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, var(--brand-500), #8b5cf6);
    box-shadow: 0 16px 28px rgba(99, 102, 241, 0.30);
    margin-bottom: 18px;
}
.svc-card-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--ink-900, #0f172a);
    margin: 0 0 4px;
}
.svc-card-lead {
    font-size: 15px;
    font-weight: 700;
    color: var(--brand-600);
    margin: 0 0 14px;
}
.svc-card-body {
    font-size: 14.5px;
    line-height: 1.7;
    color: var(--ink-500, #64748b);
    margin: 0 0 18px;
}
.svc-card-points {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}
.svc-card-points li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: var(--ink-700, #334155);
}
.svc-bullet { color: var(--brand-600); flex-shrink: 0; margin-top: 2px; }

.svc-core-supporting {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    align-content: start;
}
.svc-card-sm {
    padding: 20px 22px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
}
.svc-card-sm-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.10);
}
.svc-card-sm-body { flex: 1 1 auto; min-width: 0; }
.svc-card-title-sm {
    font-size: 16px;
    font-weight: 800;
    color: var(--ink-900, #0f172a);
    margin: 0 0 2px;
}
.svc-card-sub {
    font-size: 13px;
    font-weight: 700;
    color: var(--brand-600);
    margin: 0 0 8px;
}
.svc-card-text {
    font-size: 13.5px;
    line-height: 1.65;
    color: var(--ink-500, #64748b);
    margin: 0;
}

/* ---- Tone variants (shared) ---- */
.svc-tone-brand   { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.svc-tone-success { background: linear-gradient(135deg, #10b981, #059669); }
.svc-tone-danger  { background: linear-gradient(135deg, #ef4444, #dc2626); }
.svc-tone-info    { background: linear-gradient(135deg, #0ea5e9, #2563eb); }
.svc-tone-warning { background: linear-gradient(135deg, #f59e0b, #ea580c); }
.svc-tone-rose    { background: linear-gradient(135deg, #f43f5e, #db2777); }

/* ---- 3. FLOW STRIP ---- */
.svc-flow-section {
    padding-top: clamp(36px, 5vw, 60px);
    padding-bottom: clamp(36px, 5vw, 60px);
}
.svc-flow {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    counter-reset: svcflow;
}
@media (min-width: 768px) {
    .svc-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
}
@media (min-width: 1200px) {
    .svc-flow { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
}
.svc-flow-step {
    position: relative;
    padding: 22px 18px 20px;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 18px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
    text-align: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.svc-flow-step:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.10);
}
.svc-flow-badge {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 12px 22px rgba(15, 23, 42, 0.14);
    margin-bottom: 12px;
}
.svc-flow-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.10);
    color: var(--brand-600);
    font-size: 11px;
    font-weight: 800;
    margin-bottom: 6px;
}
.svc-flow-title {
    font-size: 14.5px;
    font-weight: 800;
    color: var(--ink-900, #0f172a);
    margin: 0 0 4px;
}
.svc-flow-text {
    font-size: 12.5px;
    line-height: 1.55;
    color: var(--ink-500, #64748b);
    margin: 0;
}
.svc-flow-line {
    display: none;
}
@media (min-width: 1200px) {
    .svc-flow-line {
        display: block;
        position: absolute;
        top: 48px;
        right: -14px;
        width: 14px;
        height: 2px;
        background: linear-gradient(90deg, rgba(99,102,241,0.55), rgba(139,92,246,0.55));
        border-radius: 2px;
    }
    .svc-flow-step:last-child .svc-flow-line { display: none; }
}

/* ---- 4. PREMIUM FEATURES — SPLIT ---- */
.svc-features {
    padding-top: clamp(40px, 5vw, 64px);
    padding-bottom: clamp(40px, 5vw, 64px);
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
}
@media (min-width: 1024px) {
    .svc-features {
        grid-template-columns: 0.85fr 1.15fr;
        gap: 40px;
        align-items: start;
    }
}
.svc-features-intro {
    position: relative;
}
@media (min-width: 1024px) {
    .svc-features-intro {
        position: sticky;
        top: 90px;
        align-self: start;
    }
}
.svc-features-intro .svc-h2 {
    text-align: left;
}
.svc-features-intro .svc-sub {
    text-align: left;
    margin-bottom: 22px;
}
.svc-features-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.svc-features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}
@media (min-width: 600px) {
    .svc-features-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
}
.svc-tile {
    position: relative;
    padding: 20px 20px 18px;
    background: rgba(255, 255, 255, 0.74);
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 18px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease,
                border-color 0.25s ease;
}
.svc-tile::before {
    content: "";
    position: absolute;
    left: 18px;
    right: 18px;
    top: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--brand-500), #8b5cf6);
    opacity: 0;
    transition: opacity 0.25s ease;
    border-radius: 2px;
}
.svc-tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
    border-color: rgba(99, 102, 241, 0.30);
}
.svc-tile:hover::before { opacity: 1; }
@media (min-width: 600px) {
    .svc-tile:nth-child(odd) {
        transform: translateY(0);
    }
    .svc-tile:nth-child(even) {
        transform: translateY(14px);
    }
    .svc-tile:nth-child(odd):hover  { transform: translateY(-4px); }
    .svc-tile:nth-child(even):hover { transform: translateY(10px); }
}
.svc-tile-icon {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.10);
    margin-bottom: 12px;
}
.svc-tile-title {
    font-size: 15.5px;
    font-weight: 800;
    color: var(--ink-900, #0f172a);
    margin: 0 0 4px;
}
.svc-tile-text {
    font-size: 13px;
    line-height: 1.55;
    color: var(--ink-500, #64748b);
    margin: 0;
}

/* ---- 5. REPORTS ---- */
.svc-reports-section {
    padding-top: clamp(40px, 5vw, 64px);
    padding-bottom: clamp(40px, 5vw, 64px);
}
.svc-reports {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}
@media (min-width: 768px) {
    .svc-reports { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
}
@media (min-width: 1200px) {
    .svc-reports { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.svc-report-card {
    position: relative;
    padding: 26px 24px 24px;
    background: rgba(255, 255, 255, 0.74);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 20px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.svc-report-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
}
.svc-report-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
    margin-bottom: 14px;
}
.svc-report-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--ink-900, #0f172a);
    margin: 0 0 8px;
}
.svc-report-text {
    font-size: 13.5px;
    line-height: 1.65;
    color: var(--ink-500, #64748b);
    margin: 0 0 14px;
}
.svc-report-points {
    list-style: none;
    margin: 0;
    padding: 14px 0 0;
    border-top: 1px dashed rgba(15, 23, 42, 0.10);
    display: grid;
    gap: 8px;
}
.svc-report-points li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink-700, #334155);
}

/* ---- 6. CTA BANNER ---- */
.svc-cta-banner {
    position: relative;
    margin-top: clamp(32px, 4vw, 56px);
    margin-bottom: clamp(40px, 5vw, 72px);
    padding-top: clamp(48px, 6vw, 80px);
    padding-bottom: clamp(48px, 6vw, 80px);
    border-radius: 28px;
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 50%, #8b5cf6 100%);
    color: #fff;
    isolation: isolate;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(79, 70, 229, 0.32);
}
.svc-cta-glow {
    position: absolute;
    inset: -40% -10% auto auto;
    width: 60%;
    height: 120%;
    background: radial-gradient(50% 50% at 50% 50%,
                                rgba(255, 255, 255, 0.30) 0%,
                                rgba(255, 255, 255, 0.00) 70%);
    filter: blur(40px);
    z-index: 0;
    pointer-events: none;
}
.svc-cta-inner {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}
.svc-cta-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.40);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    backdrop-filter: blur(8px);
    margin-bottom: 18px;
}
.svc-cta-title {
    font-size: clamp(26px, 4vw, 42px);
    font-weight: 900;
    line-height: 1.12;
    color: #fff;
    margin: 0 0 14px;
}
.svc-cta-lead {
    font-size: clamp(14px, 1.4vw, 17px);
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.92);
    margin: 0 0 26px;
}
.svc-cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

/* ---- Mobile niceties ---- */
@media (max-width: 575.98px) {
    .svc-card-lg { padding: 24px 22px; }
    .svc-card-sm { flex-direction: row; }
    .svc-hero-ctas .svc-btn,
    .svc-cta-actions .svc-btn,
    .svc-features-cta .svc-btn {
        flex: 1 1 auto;
        min-width: 0;
    }
    .svc-cta-banner { border-radius: 22px; }
}


/* =========================================================
 * v3.32.5 — Preloader splash (available on EVERY shell)
 *   base.html (dashboard/app) loads eazydev.css but NOT
 *   public-premium.css, so the #ez-preloader markup used to
 *   render unstyled (broken "EZ"/label text). These rules make
 *   the branded splash work on dashboard, reports + admin pages.
 *   The hide logic lives in ez-premium.js (already loaded by
 *   base.html); CSS only handles the look + transition.
 * ========================================================= */
.ez-preloader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 50% 50%,
                rgba(99, 102, 241, 0.18) 0%,
                rgba(255, 255, 255, 0.96) 70%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: opacity 500ms ease, visibility 500ms ease;
}
.ez-preloader.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.ez-preloader__inner {
    display: flex;
    flex-direction: column;
    gap: 22px;
    align-items: center;
}
.ez-preloader__mark {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    font-weight: 800;
    letter-spacing: 1px;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 14px 30px rgba(99, 102, 241, 0.36);
    animation: ezPreBreathe 2s ease-in-out infinite;
    will-change: transform;
}
@keyframes ezPreBreathe {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.05); }
}
.ez-preloader__bar {
    position: relative;
    width: 220px;
    max-width: 60vw;
    height: 4px;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.15);
    overflow: hidden;
}
.ez-preloader__bar::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 80px;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 100%);
    animation: ezPreBarSlide 1.4s ease-in-out infinite;
}
@keyframes ezPreBarSlide {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(280%); }
}
.ez-preloader__label {
    color: #475569;
    font-size: 14px;
    font-weight: 500;
    opacity: 0.85;
    letter-spacing: 0.2px;
}
@media (prefers-reduced-motion: reduce) {
    .ez-preloader__mark,
    .ez-preloader__bar::before {
        animation: none !important;
    }
    .ez-preloader__bar::before {
        width: 100%;
        background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 100%);
    }
}
/* end v3.32.5 preloader */

/* v3.32.5 — "More options" topbar dropdown: hide the control entirely when
   its menu has no real items (no switchers + no page-supplied extras), so
   single-business users never see an empty button. :has() is supported in
   all current browsers; if absent the button simply shows (still functional). */
.topbar-more:not(:has(.dropdown-menu .dropdown-item)) { display: none; }
.topbar-more-btn .ez-ico { opacity: 0.9; }

/* =========================================================
 * v3.32.6 — Floating action menu (FAB)
 *   WhatsApp-style bottom-right button that holds secondary
 *   page actions + the branch/business switchers so the top
 *   action bar stays clean. Behaviour in static/js/ez-fab.js.
 * ========================================================= */
.ez-fab {
    position: fixed;
    right: clamp(16px, 2.5vw, 28px);
    bottom: clamp(16px, 2.5vw, 28px);
    z-index: 1000;                 /* above content, below modals (1050+) + toasts */
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    pointer-events: none;          /* only the button + open menu catch clicks */
}
/* Hide the whole control when its menu has no real items. */
.ez-fab:not(:has(.ez-fab__item)) { display: none; }

.ez-fab__toggle {
    pointer-events: auto;
    width: 56px; height: 56px;
    border: none; border-radius: 50%;
    cursor: pointer;
    background: linear-gradient(135deg, var(--brand-500), var(--accent-500));
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    position: relative;
    box-shadow: 0 14px 30px rgba(99, 102, 241, 0.42);
    transition: transform .2s ease, box-shadow .2s ease;
    order: 2;                      /* button below the menu (menu opens upward) */
}
.ez-fab__toggle:hover { transform: translateY(-2px); box-shadow: 0 18px 42px rgba(99, 102, 241, 0.55); }
.ez-fab__toggle:focus-visible { outline: 3px solid rgba(99, 102, 241, 0.45); outline-offset: 3px; }
.ez-fab__toggle:active { transform: translateY(0); }

.ez-fab__ico {
    position: absolute;
    display: flex; align-items: center; justify-content: center;
    transition: opacity .2s ease, transform .25s ease;
}
.ez-fab__ico svg { width: 24px; height: 24px; }
.ez-fab__ico--close { opacity: 0; transform: rotate(-90deg) scale(0.5); }
.ez-fab.is-open .ez-fab__ico--more  { opacity: 0; transform: rotate(90deg) scale(0.5); }
.ez-fab.is-open .ez-fab__ico--close { opacity: 1; transform: rotate(0) scale(1); }

.ez-fab__menu {
    order: 1;
    display: flex; flex-direction: column; align-items: flex-end; gap: 9px;
    max-height: 0; opacity: 0; overflow: hidden;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity .22s ease, transform .22s ease, max-height .24s ease;
    padding-right: 2px;
}
.ez-fab.is-open .ez-fab__menu {
    max-height: 78vh; opacity: 1; pointer-events: auto;
    transform: translateY(0);
    overflow: visible;
}

/* v3.32.10 — panels: only one is visible at a time (main vs. sub-panels). */
.ez-fab__panel { display: none; flex-direction: column; align-items: flex-end; gap: 9px; }
.ez-fab__panel.is-active { display: flex; }

.ez-fab__item {
    display: inline-flex; align-items: center; gap: 10px;
    max-width: min(78vw, 320px);
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border: 1px solid transparent;          /* clean: no outline unless active/hover */
    color: var(--ink-800);
    font-size: 14px; font-weight: 600; line-height: 1;
    text-decoration: none; white-space: nowrap; cursor: pointer;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.14);
    transition: transform .15s ease, box-shadow .2s ease, background .15s ease, color .15s ease;
}
.ez-fab__item > span {
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
}
.ez-fab__item:hover {
    transform: translateX(-3px);
    background: #fff; color: var(--brand-700);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.20);
}
.ez-fab__item:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 2px; }
.ez-fab__item .ez-ico, .ez-fab__item svg { color: var(--brand-600); flex: 0 0 auto; }
/* Trailing chevron on "Switch …" items sits after the label, faintly tinted. */
.ez-fab__chev { margin-left: 2px; opacity: 0.55; }

.ez-fab__form { margin: 0; display: block; width: 100%; }

/* ---- Sub-panel sheet (business / branch switcher) ---- */
.ez-fab__sheet {
    width: clamp(244px, 82vw, 320px);
    display: flex; flex-direction: column;
    max-height: min(64vh, 460px);
    background: #fff;
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.22);
}
.ez-fab__sheet-head {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--ink-100);
    flex: 0 0 auto;
}
.ez-fab__sheet-title { font-size: 14px; font-weight: 700; color: var(--ink-800); }
.ez-fab__back {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; flex: 0 0 auto;
    border: none; border-radius: 9px; cursor: pointer;
    background: rgba(99, 102, 241, 0.08); color: var(--brand-600);
    transition: background .15s ease, color .15s ease;
}
.ez-fab__back:hover { background: rgba(99, 102, 241, 0.16); color: var(--brand-700); }
.ez-fab__back:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 2px; }

.ez-fab__search {
    position: relative; flex: 0 0 auto;
    padding: 10px 12px 6px;
}
.ez-fab__search > .ez-ico, .ez-fab__search > svg {
    position: absolute; left: 22px; top: 50%; transform: translateY(-30%);
    color: var(--ink-400); pointer-events: none;
}
.ez-fab__search input {
    width: 100%; height: 38px;
    padding: 0 12px 0 34px;
    border: 1px solid var(--ink-200); border-radius: 10px;
    background: var(--ink-50, #f8fafc); color: var(--ink-800);
    font-size: 13px; outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.ez-fab__search input:focus {
    border-color: var(--brand-500);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.16);
}

.ez-fab__list {
    flex: 1 1 auto; min-height: 0; overflow-y: auto;
    padding: 6px; display: flex; flex-direction: column; gap: 4px;
}
.ez-fab__row {
    display: flex; align-items: center; gap: 10px; width: 100%;
    padding: 10px 12px;
    border: 1px solid transparent; border-radius: 10px;
    background: transparent; color: var(--ink-800);
    font-size: 13px; font-weight: 600; text-align: left;
    text-decoration: none; cursor: pointer;
    transition: background .14s ease, color .14s ease, border-color .14s ease;
}
.ez-fab__row > span {
    flex: 1 1 auto; min-width: 0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ez-fab__row .ez-ico, .ez-fab__row svg { flex: 0 0 auto; color: var(--ink-500); }
.ez-fab__row:hover { background: rgba(99, 102, 241, 0.07); color: var(--brand-700); }
.ez-fab__row:focus-visible { outline: 2px solid var(--brand-500); outline-offset: -2px; }
.ez-fab__row.is-active {
    background: rgba(99, 102, 241, 0.10);
    border-color: rgba(99, 102, 241, 0.35);
    color: var(--brand-700);
}
.ez-fab__row.is-active .ez-ico, .ez-fab__row.is-active svg { color: var(--brand-600); }
.ez-fab__row-on { margin-left: auto; color: var(--brand-600) !important; }

.ez-fab__empty {
    padding: 16px 12px; text-align: center;
    font-size: 12.5px; color: var(--ink-500);
}

.ez-fab__sheet-foot {
    display: flex; align-items: center; gap: 8px;
    padding: 12px 14px; flex: 0 0 auto;
    border-top: 1px solid var(--ink-100);
    background: rgba(99, 102, 241, 0.04);
    color: var(--brand-700); font-size: 13px; font-weight: 700;
    text-decoration: none; cursor: pointer;
    transition: background .14s ease;
}
.ez-fab__sheet-foot:hover { background: rgba(99, 102, 241, 0.10); color: var(--brand-700); }
.ez-fab__sheet-foot .ez-ico, .ez-fab__sheet-foot svg { color: var(--brand-600); }

/* If a WhatsApp (or other) floating button is ever added bottom-right, give the
   body class .has-wa-fab to lift this menu above it so they never overlap. */
body.has-wa-fab .ez-fab { bottom: calc(clamp(16px, 2.5vw, 28px) + 70px); }

@media (max-width: 575.98px) {
    .ez-fab { right: 14px; bottom: 14px; gap: 10px; }
    .ez-fab__toggle { width: 52px; height: 52px; }
    .ez-fab__item { max-width: 76vw; }
    .ez-fab__sheet { width: min(84vw, 320px); max-height: 62vh; }
}

@media (prefers-reduced-motion: reduce) {
    .ez-fab__toggle, .ez-fab__ico, .ez-fab__menu, .ez-fab__item,
    .ez-fab__row, .ez-fab__back, .ez-fab__sheet-foot { transition: none; }
}

/* Never print the floating action menu or the cursor-glow effect. */
@media print {
    .ez-fab, .ez-cursor-glow { display: none !important; }
}
/* end v3.32.6 / v3.32.10 FAB */

/* =========================================================
 * v3.32.7 — Small-screen responsiveness: tables + tab rows
 * ========================================================= */

/* --- Tables scroll horizontally instead of squeezing --------------------
 * The old `.table-wrap { overflow: hidden }` clipped wide tables, so columns
 * compressed and SKUs/codes broke one character per line. Allow horizontal
 * scroll; keep data columns on one line; let free-text columns wrap by word. */
.table-wrap {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}
.table-wrap.table-scroll {
    overflow-x: auto;
    overflow-y: auto;
}
/* v3.32.8 — Premium reusable table scrollbar (horizontal + vertical).
   Slim, rounded, brand indigo→violet thumb with a soft track + hover state.
   Apply to any scroll container via the `.ez-scrollbar` utility class too. */
.table-wrap,
.ez-scrollbar,
.table-responsive {
    /* Firefox */
    scrollbar-width: thin;
    scrollbar-color: rgba(99, 102, 241, 0.55) rgba(99, 102, 241, 0.08);
}
/* WebKit / Blink (Chrome, Edge, Safari) */
.table-wrap::-webkit-scrollbar,
.ez-scrollbar::-webkit-scrollbar,
.table-responsive::-webkit-scrollbar {
    width: 11px;
    height: 11px;
}
.table-wrap::-webkit-scrollbar-track,
.ez-scrollbar::-webkit-scrollbar-track,
.table-responsive::-webkit-scrollbar-track {
    background: rgba(99, 102, 241, 0.07);
    border-radius: 999px;
    margin: 4px;
}
.table-wrap::-webkit-scrollbar-thumb,
.ez-scrollbar::-webkit-scrollbar-thumb,
.table-responsive::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.55), rgba(139, 92, 246, 0.55));
    border-radius: 999px;
    border: 2px solid transparent;        /* inset = slim floating thumb */
    background-clip: padding-box;
    transition: background-color 0.18s ease;
}
.table-wrap::-webkit-scrollbar-thumb:hover,
.ez-scrollbar::-webkit-scrollbar-thumb:hover,
.table-responsive::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.9), rgba(139, 92, 246, 0.9));
    background-clip: padding-box;
}
.table-wrap::-webkit-scrollbar-thumb:active,
.ez-scrollbar::-webkit-scrollbar-thumb:active,
.table-responsive::-webkit-scrollbar-thumb:active {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    background-clip: padding-box;
}
.table-wrap::-webkit-scrollbar-corner,
.ez-scrollbar::-webkit-scrollbar-corner,
.table-responsive::-webkit-scrollbar-corner {
    background: transparent;
}

/* Default: one line per cell so the table scrolls rather than breaks codes. */
.table-wrap td,
.table-wrap th { white-space: nowrap; }

/* Opt-in wrapping for free-text columns — wrap by WORD, never letter-by-letter. */
.table-wrap .product-cell,
.table-wrap td.cell-wrap,
.table-wrap .cell-wrap,
.table-wrap .text-wrap-safe,
.table-wrap .invoice-item-name {
    white-space: normal;
    overflow-wrap: break-word;
    word-break: normal;
    min-width: 130px;
}
/* SKU / product code never breaks apart. */
.sku-pill { white-space: nowrap; }

/* --- Reusable premium tab / filter row (v3.32.9) ----------------------------
 * Desktop/tablet: soft pills that wrap normally. Phones: a single nowrap row
 * that scrolls horizontally with a hidden scrollbar, balanced end padding (so
 * the first + last pills are always fully reachable) and a soft edge fade that
 * only appears over genuinely cut-off pills — a clean mobile-app filter bar. */
.ez-scroll-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.ez-scroll-tabs > * { flex: 0 0 auto; white-space: nowrap; }

/* Premium pill look — soft, readable inactive; obvious brand-gradient active. */
.ez-scroll-tabs > .btn,
.ez-scroll-tabs .filter-btn {
    border-radius: 999px;
    padding: 7px 16px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    border: 1px solid var(--ink-200);
    background: #fff;
    color: var(--ink-600);
    box-shadow: none;
    transition: background .16s ease, color .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.ez-scroll-tabs > .btn:hover,
.ez-scroll-tabs .filter-btn:hover {
    background: rgba(99, 102, 241, 0.06);
    border-color: rgba(99, 102, 241, 0.30);
    color: var(--brand-700);
}
.ez-scroll-tabs > .btn.active,
.ez-scroll-tabs .filter-btn.active {
    background: linear-gradient(135deg, var(--brand-500), var(--accent-500));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 6px 16px -5px rgba(99, 102, 241, 0.5);
}
.ez-scroll-tabs > .btn.active:hover,
.ez-scroll-tabs .filter-btn.active:hover {
    color: #fff;
    background: linear-gradient(135deg, var(--brand-600), var(--accent-500));
}

@media (max-width: 767.98px) {
    .ez-scroll-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
        scrollbar-width: none;          /* Firefox */
        -ms-overflow-style: none;       /* IE/Edge */
        /* End padding gives the first + last pills breathing room and lets them
           clear the edge fade; the fade (12px) is narrower than the padding
           (16px), so a pill is NEVER clipped at the scroll ends — the fade only
           appears over pills that are genuinely scrolled off-screen. */
        padding: 4px 16px;
        scroll-padding-inline: 16px;
        -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 12px), transparent 100%);
                mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 12px), transparent 100%);
    }
    /* Trailing spacer flex-item: guarantees the last pill fully clears the
       container edge even where scroll-container padding-right is not honoured
       at the scroll extreme. */
    .ez-scroll-tabs::after { content: ""; flex: 0 0 8px; align-self: stretch; }
    .ez-scroll-tabs::-webkit-scrollbar { display: none; }  /* Chrome/Safari */
}
/* end v3.32.9 premium tab row */

/* =========================================================
 * v3.26 — Premium payment-method selector + current-plan polish
 * ========================================================= */
/* ---- Radio-card payment method picker ---- */
.pay-methods { margin: 2px 0 14px; }
.pay-methods__label {
    font-size: 12px; font-weight: 600; color: var(--ink-600);
    margin-bottom: 7px;
}
.pay-method { display: block; margin-bottom: 8px; cursor: pointer; }
.pay-method:last-child { margin-bottom: 0; }
.pay-method > input {
    position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none;
}
.pay-method__body {
    display: flex; align-items: center; gap: 11px;
    padding: 11px 13px;
    border: 1.5px solid var(--ink-200); border-radius: 13px;
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.pay-method__ico {
    flex: 0 0 auto;
    width: 34px; height: 34px; border-radius: 9px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--brand-50); color: var(--brand-600);
}
.pay-method__text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pay-method__name { font-size: 13.5px; font-weight: 700; color: var(--ink-900); }
.pay-method__sub {
    font-size: 11.5px; color: var(--ink-500);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pay-method__check {
    flex: 0 0 auto;
    width: 22px; height: 22px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1.5px solid var(--ink-200); color: #fff; background: transparent;
    transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.pay-method__check svg { opacity: 0; transition: opacity .15s ease; }
.pay-method:hover .pay-method__body { border-color: rgba(99,102,241,0.4); }
.pay-method > input:focus-visible + .pay-method__body {
    border-color: var(--brand-500); box-shadow: 0 0 0 3px rgba(99,102,241,0.16);
}
/* Selected state */
.pay-method > input:checked + .pay-method__body {
    border-color: var(--brand-500);
    background: linear-gradient(135deg, rgba(99,102,241,0.06), rgba(139,92,246,0.05));
    box-shadow: 0 4px 14px rgba(99,102,241,0.14);
}
.pay-method > input:checked + .pay-method__body .pay-method__check {
    background: linear-gradient(135deg, var(--brand-500), var(--accent-500));
    border-color: transparent;
}
.pay-method > input:checked + .pay-method__body .pay-method__check svg { opacity: 1; }

.pay-unavailable {
    margin-top: 8px; font-size: 11.5px; color: #b45309;
    display: flex; gap: 5px; align-items: flex-start;
    line-height: 1.4;
}
.pay-unavailable a { color: var(--brand-700); font-weight: 700; }

/* ---- Current-plan / usage polish ---- */
.cp-usage { gap: 14px; }
.usage-row {
    background: rgba(99,102,241,0.035);
    border: 1px solid var(--ink-100);
    border-radius: 13px;
    padding: 13px 15px;
}
.usage-head { font-size: 12.5px; }
.usage-bar { height: 9px; margin: 9px 0 0; background: rgba(15,23,42,0.06); }
.usage-warn {
    margin-top: 9px; font-size: 11.5px; font-weight: 600;
    background: rgba(185,28,28,0.07);
    border: 1px solid rgba(185,28,28,0.18);
    color: #b91c1c; border-radius: 9px;
    padding: 6px 9px; line-height: 1.35;
    align-items: flex-start;
}
.usage-warn.near {
    background: rgba(180,83,9,0.08);
    border-color: rgba(180,83,9,0.20);
    color: #b45309;
}
@media (max-width: 575.98px) {
    .cp-main { gap: 10px; }
    .cp-status { text-align: left; }
    .cp-name { font-size: 22px; }
    .pay-method__sub { white-space: normal; }
}
/* end v3.26 payment selector + current-plan polish */

/* =========================================================
 * v3.32.11 — Reusable premium filter toolbar (.ez-filter)
 *   A clean SaaS filter panel: a header (title + a small
 *   "Filter …" hint chip) above a responsive grid of labelled
 *   fields, with a trailing actions cluster. Fixes the old
 *   .card-title-row form where .form-control's width:100% made
 *   every input stack full-width. Desktop = balanced flex grid;
 *   tablet wraps; mobile stacks full-width.
 * ========================================================= */
.ez-filter { margin-bottom: 18px; }

.ez-filter__head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; flex-wrap: wrap; margin-bottom: 14px;
}
.ez-filter__title {
    margin: 0; font-size: 16px; font-weight: 700; color: var(--ink-900);
    display: flex; align-items: center; gap: 8px;
}
.ez-filter__title .ez-ico, .ez-filter__title svg { color: var(--brand-600); }
.ez-filter__hint {
    font-size: 11px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase;
    color: var(--brand-700);
    background: rgba(99, 102, 241, 0.07);
    border: 1px solid rgba(99, 102, 241, 0.18);
    padding: 5px 12px; border-radius: 999px; white-space: nowrap;
}

/* The field grid — flexible & balanced. Search is double-weight, the
   date-range field is a touch wider; everything else shares evenly. */
.ez-filter__grid {
    display: flex; flex-wrap: wrap; align-items: flex-end;
    gap: 12px 14px;
}
.ez-filter__field {
    flex: 1 1 160px; min-width: 0;
    display: flex; flex-direction: column; gap: 6px;
}
.ez-filter__field--search { flex: 2 1 220px; }
.ez-filter__field--dates  { flex: 1.5 1 250px; }
.ez-filter__field > label {
    font-size: 12px; font-weight: 600; color: var(--ink-600);
    padding-left: 2px; letter-spacing: 0.1px;
}

/* Consistent control height + soft premium chrome for every field type. */
.ez-filter .form-control,
.ez-filter .form-select {
    height: 40px; min-width: 0; width: 100%;
    border-radius: 11px;
    border: 1px solid var(--ink-200);
    /* background-color only (NOT the shorthand) so the global select chevron
       background-image survives on .ez-filter selects. */
    background-color: var(--ink-50, #f8fafc);
    font-size: 13.5px; color: var(--ink-800);
    box-shadow: none;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
/* Keep the brand chevron + arrow-clearance on filter selects. */
.ez-filter .form-select { padding-right: 36px; }
.ez-filter .form-control::placeholder { color: var(--ink-400); }
.ez-filter .form-control:focus,
.ez-filter .form-select:focus {
    background: #fff;
    border-color: var(--brand-500);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.16);
}

/* Leading-icon search input. */
.ez-filter__search { position: relative; }
.ez-filter__search > .ez-ico,
.ez-filter__search > svg {
    position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
    color: var(--ink-400); pointer-events: none;
}
.ez-filter__search .form-control { padding-left: 38px; }

/* Date range: two date inputs sharing a row with a separator. */
.ez-filter__dates { display: flex; align-items: center; gap: 8px; }
.ez-filter__dates .form-control { flex: 1 1 0; }
.ez-filter__dates .sep { color: var(--ink-400); flex: 0 0 auto; font-weight: 600; }

/* Actions cluster sits at the end, baseline-aligned with the fields. */
.ez-filter__actions {
    flex: 0 0 auto; display: flex; align-items: center; gap: 8px;
    margin-left: auto;
}
.ez-filter__actions .btn { height: 40px; display: inline-flex; align-items: center; gap: 6px; }

/* Hairline that visually connects the toolbar to the table below it. */
.ez-filter-card .table-wrap { border-top: 1px solid var(--ink-100); }
.ez-filter-card .table-wrap > table { margin-top: 2px; }

/* Tablet: let the actions wrap onto their own full line, fields stay 2-up. */
@media (max-width: 991.98px) {
    .ez-filter__field { flex: 1 1 200px; }
    .ez-filter__actions { margin-left: 0; flex: 1 1 100%; }
    .ez-filter__actions .btn { flex: 1 1 auto; justify-content: center; }
}

/* Mobile: stack every field full-width; dates keep side-by-side. */
@media (max-width: 575.98px) {
    .ez-filter__field,
    .ez-filter__field--search,
    .ez-filter__field--dates { flex: 1 1 100%; }
    .ez-filter__hint { display: none; }   /* keep the header tidy on phones */
}

@media (prefers-reduced-motion: reduce) {
    .ez-filter .form-control, .ez-filter .form-select { transition: none; }
}
/* end v3.32.11 filter toolbar */
