/* ==========================================================================
   Social Growth Platform — design system
   Built on Bootstrap 5 RTL. Everything here is token-driven so light and dark
   themes stay in step and no component hard-codes a colour.
   ========================================================================== */

:root {
    /* Brand: a deep indigo that reads as considered rather than promotional. */
    --sg-brand-50: #eef2ff;
    --sg-brand-100: #e0e7ff;
    --sg-brand-200: #c7d2fe;
    --sg-brand-300: #a5b4fc;
    --sg-brand-400: #818cf8;
    --sg-brand-500: #6366f1;
    --sg-brand-600: #4f46e5;
    --sg-brand-700: #4338ca;
    --sg-brand-800: #3730a3;
    --sg-brand-900: #312e81;

    /* Secondary: a digital blue that pairs with the indigo without competing. */
    --sg-blue-50: #eff6ff;
    --sg-blue-500: #3b82f6;
    --sg-blue-600: #2563eb;

    /* Accent kept as a calm teal/cyan drawn from the logo mark. */
    --sg-accent-500: #06b6d4;
    --sg-accent-600: #0891b2;

    /* Success: a calm green, not neon. */
    --sg-success: #16a34a;
    --sg-success-bg: #ecfdf5;
    --sg-warning: #d97706;
    --sg-warning-bg: #fffbeb;
    --sg-danger: #dc2626;
    --sg-danger-bg: #fef2f2;

    --sg-surface: #ffffff;
    --sg-surface-raised: #ffffff;
    --sg-surface-sunken: #f6f8fc;
    --sg-page: #f4f6fb;
    --sg-border: #e6e9f0;
    --sg-border-strong: #d3d8e3;
    /* Text: dark navy rather than pure black — softer, more premium. */
    --sg-text: #111a34;
    --sg-text-muted: #5b6478;
    --sg-text-subtle: #949cb0;

    --sg-radius-sm: .625rem;
    --sg-radius: 1rem;
    --sg-radius-lg: 1.5rem;
    --sg-radius-pill: 999px;

    /* Softer, layered shadows for a modern app feel. */
    --sg-shadow-xs: 0 1px 2px rgba(17, 26, 52, .05);
    --sg-shadow-sm: 0 2px 6px rgba(17, 26, 52, .06), 0 1px 2px rgba(17, 26, 52, .04);
    --sg-shadow: 0 8px 24px rgba(17, 26, 52, .08);
    --sg-shadow-lg: 0 18px 44px rgba(17, 26, 52, .12);

    --sg-header-height: 4rem;
    --sg-bottomnav-height: 4rem;
    /* iPhone safe areas. */
    --sg-safe-top: env(safe-area-inset-top, 0px);
    --sg-safe-bottom: env(safe-area-inset-bottom, 0px);
    --sg-gutter: 1rem;

    --bs-primary: var(--sg-brand-600);
    --bs-primary-rgb: 79, 70, 229;
    --bs-body-bg: var(--sg-page);
    --bs-body-color: var(--sg-text);
    --bs-border-color: var(--sg-border);
    --bs-link-color: var(--sg-brand-600);
    --bs-link-hover-color: var(--sg-brand-700);
    --bs-border-radius: var(--sg-radius);
}

[data-bs-theme="dark"] {
    --sg-surface: #151a26;
    --sg-surface-raised: #1b2231;
    --sg-surface-sunken: #10141d;
    --sg-page: #0b0f17;
    --sg-border: #262f40;
    --sg-border-strong: #354154;
    --sg-text: #e8ecf4;
    --sg-text-muted: #9aa6bb;
    --sg-text-subtle: #6b7789;

    --sg-shadow-xs: 0 1px 2px rgba(0, 0, 0, .3);
    --sg-shadow-sm: 0 1px 3px rgba(0, 0, 0, .4);
    --sg-shadow: 0 4px 16px rgba(0, 0, 0, .45);
    --sg-shadow-lg: 0 12px 32px rgba(0, 0, 0, .55);

    --bs-primary: var(--sg-brand-400);
    --bs-primary-rgb: 129, 140, 248;
    --bs-body-bg: var(--sg-page);
    --bs-body-color: var(--sg-text);
    --bs-border-color: var(--sg-border);
    --bs-link-color: var(--sg-brand-300);
    --bs-link-hover-color: var(--sg-brand-200);
}

/* --------------------------------------------------------------- base */

html {
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: var(--sg-page);
    color: var(--sg-text);
    /* IBM Plex Sans Arabic leads for both scripts; the system stack is fallback only. */
    font-family: "IBM Plex Sans Arabic", "Tajawal", -apple-system, BlinkMacSystemFont, "Noto Kufi Arabic", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

[dir="rtl"] body {
    letter-spacing: 0;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.35;
    color: var(--sg-text);
    letter-spacing: -.01em;
}

/* Arabic reads better with a hair more line-height and no negative tracking. */
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3 {
    letter-spacing: 0;
    line-height: 1.5;
}

a {
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Visible focus for every interactive element — required for WCAG 2.1 AA. */
:focus-visible {
    outline: 2px solid var(--sg-brand-500);
    outline-offset: 2px;
    border-radius: var(--sg-radius-sm);
}

.skip-link {
    position: absolute;
    inset-inline-start: 1rem;
    top: .5rem;
    z-index: 1080;
    background: var(--sg-brand-600);
    color: #fff;
    padding: .5rem 1rem;
    border-radius: var(--sg-radius-sm);
}

.icon {
    width: 1.15rem;
    height: 1.15rem;
    flex-shrink: 0;
}

.icon-sm { width: .95rem; height: .95rem; flex-shrink: 0; }
.icon-lg { width: 1.5rem; height: 1.5rem; flex-shrink: 0; }
.icon-xl { width: 2rem; height: 2rem; flex-shrink: 0; }

/* --------------------------------------------------------------- header */

.site-header {
    background: color-mix(in srgb, var(--sg-surface) 88%, transparent);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--sg-border);
    z-index: 1030;
}

.site-header .navbar {
    min-height: var(--sg-header-height);
    padding-block: .5rem;
}

.site-header .nav-link {
    color: var(--sg-text-muted);
    font-weight: 500;
    border-radius: var(--sg-radius-sm);
    padding-inline: .75rem;
}

.site-header .nav-link:hover,
.site-header .nav-link.active {
    color: var(--sg-brand-600);
    background: var(--sg-brand-50);
    text-decoration: none;
}

[data-bs-theme="dark"] .site-header .nav-link:hover,
[data-bs-theme="dark"] .site-header .nav-link.active {
    color: var(--sg-brand-300);
    background: rgba(99, 102, 241, .12);
}

/* followers4u brand mark + wordmark */
.brand-logo {
    width: 2.25rem;
    height: 2.25rem;
    display: block;
    flex-shrink: 0;
}

.brand-logo-lg {
    width: 3.25rem;
    height: 3.25rem;
}

.brand-wordmark {
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: -.02em;
    line-height: 1;
    white-space: nowrap;
}

.brand-wordmark .wm-main { color: var(--sg-text); }
.brand-wordmark .wm-4 { color: var(--sg-brand-600); }
.brand-wordmark .wm-u { color: #06b6d4; }
.brand-wordmark .wm-tld {
    color: var(--sg-text-subtle);
    font-weight: 700;
    font-size: .72em;
}

[data-bs-theme="dark"] .brand-wordmark .wm-4 { color: var(--sg-brand-300); }

.navbar-brand:hover {
    text-decoration: none;
}

.navbar-brand:hover .brand-wordmark .wm-main { color: var(--sg-brand-600); }

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: 1px solid var(--sg-border);
    border-radius: var(--sg-radius-sm);
    background: var(--sg-surface);
    color: var(--sg-text-muted);
}

.btn-icon:hover {
    color: var(--sg-brand-600);
    border-color: var(--sg-brand-300);
    background: var(--sg-brand-50);
}

[data-bs-theme="dark"] .btn-icon:hover {
    background: rgba(99, 102, 241, .12);
    border-color: var(--sg-brand-500);
    color: var(--sg-brand-300);
}

/* --------------------------------------------------------------- surfaces */

.card,
.sg-card {
    background: var(--sg-surface-raised);
    border: 1px solid var(--sg-border);
    border-radius: var(--sg-radius);
    box-shadow: var(--sg-shadow-xs);
}

.sg-card {
    padding: 1.25rem;
}

.card {
    --bs-card-bg: var(--sg-surface-raised);
    --bs-card-border-color: var(--sg-border);
    --bs-card-cap-bg: transparent;
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--sg-border);
    font-weight: 600;
    padding: 1rem 1.25rem;
}

.sg-card-hover {
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.sg-card-hover:hover {
    transform: translateY(-2px);
    box-shadow: var(--sg-shadow);
    border-color: var(--sg-brand-200);
}

@media (prefers-reduced-motion: reduce) {
    .sg-card-hover:hover { transform: none; }
    * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* --------------------------------------------------------------- hero */

.hero {
    position: relative;
    padding-block: clamp(3rem, 8vw, 6rem);
    background:
        radial-gradient(900px 400px at 85% -10%, rgba(99, 102, 241, .16), transparent 60%),
        radial-gradient(700px 350px at 5% 10%, rgba(20, 184, 166, .12), transparent 60%),
        var(--sg-surface);
    border-bottom: 1px solid var(--sg-border);
}

.hero h1 {
    font-size: clamp(1.85rem, 5vw, 3.1rem);
    letter-spacing: -.02em;
}

.hero-lede {
    font-size: clamp(1rem, 2.2vw, 1.15rem);
    color: var(--sg-text-muted);
    max-width: 46ch;
}

.trust-pill {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .4rem .85rem;
    border-radius: var(--sg-radius-pill);
    background: rgba(16, 185, 129, .1);
    color: #047857;
    border: 1px solid rgba(16, 185, 129, .25);
    font-size: .85rem;
    font-weight: 600;
}

[data-bs-theme="dark"] .trust-pill {
    background: rgba(16, 185, 129, .12);
    color: #6ee7b7;
}

/* --------------------------------------------------------------- sections */

.section {
    padding-block: clamp(2.5rem, 6vw, 4.5rem);
}

.section-sunken {
    background: var(--sg-surface-sunken);
}

.section-title {
    font-size: clamp(1.4rem, 3.5vw, 2rem);
    margin-bottom: .5rem;
}

.section-lede {
    color: var(--sg-text-muted);
    max-width: 60ch;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: .75rem;
    font-weight: 700;
    color: var(--sg-brand-600);
}

/* --------------------------------------------------------------- network & service cards */

.network-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .6rem;
    padding: 1.1rem .75rem;
    border: 1px solid var(--sg-border);
    border-radius: var(--sg-radius);
    background: var(--sg-surface-raised);
    color: var(--sg-text);
    text-align: center;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.network-tile:hover {
    text-decoration: none;
    transform: translateY(-2px);
    border-color: var(--sg-brand-300);
    box-shadow: var(--sg-shadow-sm);
}

.network-tile .network-glyph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: var(--sg-radius-sm);
    background: var(--sg-surface-sunken);
    border: 1px solid var(--sg-border);
    color: var(--sg-text-muted);
}

.network-tile:hover .network-glyph {
    color: var(--sg-brand-600);
    border-color: var(--sg-brand-200);
}

.service-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.service-card .service-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    font-size: .78rem;
}

.meta-chip {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .2rem .55rem;
    border-radius: var(--sg-radius-pill);
    background: var(--sg-surface-sunken);
    border: 1px solid var(--sg-border);
    color: var(--sg-text-muted);
    white-space: nowrap;
}

.price-tag {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--sg-brand-600);
    letter-spacing: -.01em;
}

[data-bs-theme="dark"] .price-tag {
    color: var(--sg-brand-300);
}

.price-unit {
    font-size: .78rem;
    font-weight: 500;
    color: var(--sg-text-muted);
}

/* --------------------------------------------------------------- badges & status */

.badge {
    font-weight: 600;
    border-radius: var(--sg-radius-pill);
    padding: .35em .7em;
}

.status-dot {
    display: inline-block;
    width: .5rem;
    height: .5rem;
    border-radius: 50%;
    margin-inline-end: .35rem;
}

/* --------------------------------------------------------------- stats */

.stat-card {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    padding: 1.1rem 1.25rem;
    background: var(--sg-surface-raised);
    border: 1px solid var(--sg-border);
    border-radius: var(--sg-radius);
    box-shadow: var(--sg-shadow-xs);
    height: 100%;
}

.stat-label {
    font-size: .8rem;
    color: var(--sg-text-muted);
    font-weight: 500;
}

.stat-value {
    font-size: clamp(1.35rem, 3vw, 1.75rem);
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.1;
}

.stat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--sg-radius-sm);
    background: var(--sg-brand-50);
    color: var(--sg-brand-600);
}

[data-bs-theme="dark"] .stat-icon {
    background: rgba(99, 102, 241, .14);
    color: var(--sg-brand-300);
}

/* --------------------------------------------------------------- dashboard shell */

.dashboard-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
    padding-block: 1.5rem;
}

@media (min-width: 992px) {
    .dashboard-shell {
        grid-template-columns: 16rem minmax(0, 1fr);
        align-items: start;
    }
}

.side-nav {
    background: var(--sg-surface-raised);
    border: 1px solid var(--sg-border);
    border-radius: var(--sg-radius);
    padding: .75rem;
    position: sticky;
    top: calc(var(--sg-header-height) + 1rem);
    box-shadow: var(--sg-shadow-xs);
}

.side-nav .nav-link {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .6rem .75rem;
    border-radius: var(--sg-radius-sm);
    color: var(--sg-text-muted);
    font-weight: 500;
    font-size: .9rem;
}

.side-nav .nav-link:hover {
    background: var(--sg-surface-sunken);
    color: var(--sg-text);
    text-decoration: none;
}

.side-nav .nav-link.active {
    background: var(--sg-brand-600);
    color: #fff;
}

.side-nav .nav-heading {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--sg-text-subtle);
    font-weight: 700;
    padding: .75rem .75rem .35rem;
}

/* Mobile: the sidebar becomes a horizontally scrollable strip. */
@media (max-width: 991.98px) {
    .side-nav {
        position: static;
        display: flex;
        gap: .4rem;
        overflow-x: auto;
        padding: .5rem;
        scrollbar-width: thin;
    }

    .side-nav .nav-heading { display: none; }
    .side-nav .nav-link { white-space: nowrap; }
}

/* --------------------------------------------------------------- tables */

.table-wrap {
    background: var(--sg-surface-raised);
    border: 1px solid var(--sg-border);
    border-radius: var(--sg-radius);
    overflow: hidden;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--sg-text);
    margin-bottom: 0;
    font-size: .88rem;
}

.table > thead {
    background: var(--sg-surface-sunken);
}

.table > thead th {
    font-weight: 600;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--sg-text-muted);
    border-bottom: 1px solid var(--sg-border);
    white-space: nowrap;
    padding: .75rem 1rem;
}

.table > tbody td {
    padding: .75rem 1rem;
    vertical-align: middle;
    border-color: var(--sg-border);
}

.table-hover > tbody > tr:hover > * {
    --bs-table-accent-bg: var(--sg-surface-sunken);
    background-color: var(--sg-surface-sunken);
}

.numeric {
    font-variant-numeric: tabular-nums;
    direction: ltr;
    text-align: start;
    unicode-bidi: plaintext;
}

/* --------------------------------------------------------------- forms */

.form-label {
    font-weight: 600;
    font-size: .85rem;
    margin-bottom: .35rem;
    color: var(--sg-text);
}

.form-control,
.form-select {
    background: var(--sg-surface);
    border: 1px solid var(--sg-border-strong);
    border-radius: var(--sg-radius-sm);
    color: var(--sg-text);
    padding: .6rem .85rem;
    /* 16px on mobile stops iOS Safari from zooming when a field is focused. */
    font-size: 16px;
    min-height: 2.9rem;
}

@media (min-width: 768px) {
    .form-control, .form-select { font-size: .95rem; min-height: 2.75rem; }
}

.form-control:focus,
.form-select:focus {
    background: var(--sg-surface);
    color: var(--sg-text);
    border-color: var(--sg-brand-400);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .16);
}

.form-control::placeholder {
    color: var(--sg-text-subtle);
}

.form-text {
    color: var(--sg-text-muted);
    font-size: .8rem;
}

.input-group-text {
    background: var(--sg-surface-sunken);
    border-color: var(--sg-border-strong);
    color: var(--sg-text-muted);
}

.btn {
    border-radius: var(--sg-radius-sm);
    font-weight: 600;
    padding: .55rem 1.1rem;
}

.btn-primary {
    background: var(--sg-brand-600);
    border-color: var(--sg-brand-600);
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--sg-brand-700);
    border-color: var(--sg-brand-700);
}

.btn-lg {
    padding: .75rem 1.6rem;
    font-size: 1rem;
}

/* --------------------------------------------------------------- wizard */

.wizard-steps {
    display: flex;
    gap: .5rem;
    list-style: none;
    padding: 0;
    margin-bottom: 1.5rem;
    overflow-x: auto;
}

.wizard-step {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem .9rem;
    border-radius: var(--sg-radius-pill);
    background: var(--sg-surface-sunken);
    border: 1px solid var(--sg-border);
    color: var(--sg-text-muted);
    font-size: .85rem;
    font-weight: 600;
    white-space: nowrap;
}

.wizard-step .step-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 50%;
    background: var(--sg-border);
    color: var(--sg-text-muted);
    font-size: .75rem;
}

.wizard-step.is-active {
    background: var(--sg-brand-600);
    border-color: var(--sg-brand-600);
    color: #fff;
}

.wizard-step.is-active .step-index {
    background: rgba(255, 255, 255, .25);
    color: #fff;
}

.wizard-step.is-done {
    border-color: var(--sg-accent-500);
    color: var(--sg-accent-600);
}

.wizard-step.is-done .step-index {
    background: var(--sg-accent-500);
    color: #fff;
}

/* --------------------------------------------------------------- timeline */

.timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
}

.timeline::before {
    content: "";
    position: absolute;
    inset-inline-start: .6rem;
    top: .5rem;
    bottom: .5rem;
    width: 2px;
    background: var(--sg-border);
}

.timeline-item {
    position: relative;
    padding-inline-start: 2rem;
    padding-block: .6rem;
}

.timeline-marker {
    position: absolute;
    inset-inline-start: 0;
    top: .9rem;
    width: 1.2rem;
    height: 1.2rem;
    border-radius: 50%;
    background: var(--sg-surface-raised);
    border: 2px solid var(--sg-border-strong);
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline-item.is-current .timeline-marker {
    border-color: var(--sg-brand-600);
    background: var(--sg-brand-600);
}

/* --------------------------------------------------------------- kanban */

.kanban {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    -webkit-overflow-scrolling: touch;
}

.kanban-column {
    flex: 0 0 19rem;
    min-width: 19rem;
    background: var(--sg-surface-sunken);
    border: 1px solid var(--sg-border);
    border-radius: var(--sg-radius);
    display: flex;
    flex-direction: column;
    max-height: 75vh;
}

.kanban-column-header {
    padding: .75rem 1rem;
    border-bottom: 1px solid var(--sg-border);
    font-weight: 600;
    font-size: .85rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    position: sticky;
    top: 0;
    background: var(--sg-surface-sunken);
    border-radius: var(--sg-radius) var(--sg-radius) 0 0;
    z-index: 1;
}

.kanban-column-body {
    padding: .75rem;
    display: flex;
    flex-direction: column;
    gap: .6rem;
    overflow-y: auto;
}

.kanban-card {
    background: var(--sg-surface-raised);
    border: 1px solid var(--sg-border);
    border-radius: var(--sg-radius-sm);
    padding: .75rem;
    font-size: .85rem;
    box-shadow: var(--sg-shadow-xs);
    color: inherit;
}

.kanban-card:hover {
    text-decoration: none;
    border-color: var(--sg-brand-300);
    box-shadow: var(--sg-shadow-sm);
}

/* --------------------------------------------------------------- payment options */

.pay-option {
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}

.pay-option:hover {
    border-color: var(--sg-brand-300) !important;
    background: var(--sg-surface-sunken);
}

.pay-option:has(input:checked) {
    border-color: var(--sg-brand-500) !important;
    background: var(--sg-brand-50);
}

[data-bs-theme="dark"] .pay-option:has(input:checked) {
    background: rgba(99, 102, 241, .12);
}

/* --------------------------------------------------------------- states */

.empty-state {
    text-align: center;
    padding: clamp(2rem, 6vw, 3.5rem) 1.5rem;
    color: var(--sg-text-muted);
}

.empty-state .empty-glyph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: var(--sg-surface-sunken);
    border: 1px solid var(--sg-border);
    color: var(--sg-text-subtle);
    margin-bottom: 1rem;
}

.skeleton {
    background: linear-gradient(90deg, var(--sg-surface-sunken) 25%, var(--sg-border) 37%, var(--sg-surface-sunken) 63%);
    background-size: 400% 100%;
    animation: sg-shimmer 1.4s ease infinite;
    border-radius: var(--sg-radius-sm);
}

@keyframes sg-shimmer {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

.toast-stack {
    position: fixed;
    inset-block-start: calc(var(--sg-header-height) + 1rem);
    inset-inline-end: 1rem;
    z-index: 1090;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    max-width: min(24rem, calc(100vw - 2rem));
}

/* --------------------------------------------------------------- chart */

.chart-bars {
    display: flex;
    align-items: flex-end;
    gap: .25rem;
    height: 10rem;
    padding-top: .5rem;
}

.chart-bar {
    flex: 1;
    min-width: .25rem;
    background: linear-gradient(180deg, var(--sg-brand-400), var(--sg-brand-600));
    border-radius: var(--sg-radius-sm) var(--sg-radius-sm) 0 0;
    min-height: 2px;
    position: relative;
}

.chart-bar:hover {
    background: linear-gradient(180deg, var(--sg-accent-500), var(--sg-accent-600));
}

/* --------------------------------------------------------------- footer */

.site-footer {
    background: var(--sg-surface);
    border-top: 1px solid var(--sg-border);
}

.footer-heading {
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--sg-text-subtle);
    font-weight: 700;
    margin-bottom: .75rem;
}

.site-footer ul li {
    margin-bottom: .4rem;
}

.site-footer a {
    color: var(--sg-text-muted);
}

.site-footer a:hover {
    color: var(--sg-brand-600);
}

/* --------------------------------------------------------------- utilities */

.text-secondary {
    color: var(--sg-text-muted) !important;
}

.border-subtle {
    border-color: var(--sg-border) !important;
}

.bg-surface {
    background-color: var(--sg-surface-raised) !important;
}

.bg-sunken {
    background-color: var(--sg-surface-sunken) !important;
}

.fs-tiny {
    font-size: .75rem;
}

.stack-sm > * + * { margin-top: .5rem; }
.stack > * + * { margin-top: 1rem; }
.stack-lg > * + * { margin-top: 1.5rem; }

/* Mobile-first: give tap targets room and stop tables blowing out the viewport. */
@media (max-width: 575.98px) {
    .btn { padding: .6rem 1rem; }
    .btn-sm { padding: .45rem .8rem; }
    .stat-value { font-size: 1.25rem; }
    .table > thead th,
    .table > tbody td { padding: .6rem .75rem; }
    .section { padding-block: 2rem; }
}

/* ==========================================================================
   Redesign additions — mobile-first app components
   ========================================================================== */

.container { padding-inline: var(--sg-gutter); }

@media (min-width: 768px) {
    :root { --sg-gutter: 1.25rem; }
}

/* --------------------------------------------------------------- header polish */

.site-header {
    transition: background .2s ease, box-shadow .2s ease, border-color .2s ease;
}

/* Transparent at the very top of the landing page, solid once scrolled. */
.site-header.is-top {
    background: transparent;
    border-bottom-color: transparent;
    box-shadow: none;
    backdrop-filter: none;
}

.site-header.is-scrolled {
    box-shadow: var(--sg-shadow-sm);
}

.navbar-brand .brand-wordmark { font-size: 1.05rem; }

@media (max-width: 991.98px) {
    .site-header .navbar { min-height: 3.5rem; }
    .navbar-brand .brand-logo { width: 2rem; height: 2rem; }
    .navbar-brand .brand-wordmark { font-size: .95rem; }
}

/* --------------------------------------------------------------- mobile menu (bottom sheet) */

.mobile-menu-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(17, 26, 52, .5);
    z-index: 1045;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s ease;
}

.mobile-menu-backdrop.is-open { opacity: 1; visibility: visible; }

.mobile-menu {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 1046;
    background: var(--sg-surface-raised);
    border-radius: var(--sg-radius-lg) var(--sg-radius-lg) 0 0;
    box-shadow: var(--sg-shadow-lg);
    padding: .5rem 1rem calc(1rem + var(--sg-safe-bottom));
    transform: translateY(100%);
    transition: transform .28s cubic-bezier(.32, .72, 0, 1);
    max-height: 88vh;
    overflow-y: auto;
}

.mobile-menu.is-open { transform: translateY(0); }

.mobile-menu-handle {
    width: 2.75rem;
    height: .3rem;
    border-radius: 999px;
    background: var(--sg-border-strong);
    margin: .35rem auto .75rem;
}

.mobile-menu .m-link {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .9rem .5rem;
    border-radius: var(--sg-radius-sm);
    color: var(--sg-text);
    font-weight: 600;
    font-size: 1.02rem;
    min-height: 3rem;
}

.mobile-menu .m-link:hover,
.mobile-menu .m-link:active {
    background: var(--sg-surface-sunken);
    text-decoration: none;
}

.mobile-menu .m-link .icon { color: var(--sg-brand-600); }
.mobile-menu hr { border-color: var(--sg-border); margin: .5rem 0; }

/* --------------------------------------------------------------- bottom navigation (customer app) */

.bottom-nav {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 1035;
    display: none;
    background: color-mix(in srgb, var(--sg-surface-raised) 92%, transparent);
    backdrop-filter: saturate(180%) blur(12px);
    border-top: 1px solid var(--sg-border);
    padding-bottom: var(--sg-safe-bottom);
}

.bottom-nav-inner {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    align-items: stretch;
    height: var(--sg-bottomnav-height);
    max-width: 40rem;
    margin: 0 auto;
}

.bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .15rem;
    color: var(--sg-text-muted);
    font-size: .68rem;
    font-weight: 600;
    text-decoration: none;
    position: relative;
}

.bottom-nav a .icon { width: 1.35rem; height: 1.35rem; }
.bottom-nav a.active { color: var(--sg-brand-600); }

.bottom-nav a.active::before {
    content: "";
    position: absolute;
    top: 0;
    width: 2rem;
    height: 3px;
    border-radius: 0 0 3px 3px;
    background: var(--sg-brand-600);
}

.bottom-nav .fab {
    color: #fff;
}

.bottom-nav .fab .fab-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    margin-top: -1.25rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--sg-brand-600), var(--sg-accent-500));
    box-shadow: var(--sg-shadow);
    color: #fff;
}

@media (max-width: 991.98px) {
    .bottom-nav.is-enabled { display: block; }
    /* leave room so content isn't hidden behind the bar */
    body.has-bottom-nav { padding-bottom: calc(var(--sg-bottomnav-height) + var(--sg-safe-bottom)); }
}

/* --------------------------------------------------------------- sticky bottom CTA */

.sticky-cta {
    position: sticky;
    bottom: 0;
    z-index: 1020;
    background: color-mix(in srgb, var(--sg-surface-raised) 94%, transparent);
    backdrop-filter: saturate(180%) blur(10px);
    border-top: 1px solid var(--sg-border);
    padding: .75rem var(--sg-gutter) calc(.75rem + var(--sg-safe-bottom));
    box-shadow: 0 -6px 20px rgba(17, 26, 52, .06);
}

/* --------------------------------------------------------------- trust bar */

.trust-bar {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem .5rem;
    justify-content: center;
    padding: .85rem var(--sg-gutter);
}

.trust-item {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .45rem .8rem;
    border-radius: var(--sg-radius-pill);
    background: var(--sg-surface-raised);
    border: 1px solid var(--sg-border);
    color: var(--sg-text-muted);
    font-size: .82rem;
    font-weight: 600;
    white-space: nowrap;
}

.trust-item .icon { color: var(--sg-success); width: 1rem; height: 1rem; }

/* --------------------------------------------------------------- quick order */

.quick-order {
    background: var(--sg-surface-raised);
    border: 1px solid var(--sg-border);
    border-radius: var(--sg-radius-lg);
    box-shadow: var(--sg-shadow);
    padding: 1.1rem;
}

.quick-order .qo-price {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--sg-brand-600);
}

[data-bs-theme="dark"] .quick-order .qo-price { color: var(--sg-brand-300); }

/* --------------------------------------------------------------- filter chips */

.chip-row {
    display: flex;
    gap: .5rem;
    overflow-x: auto;
    padding-bottom: .35rem;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.chip-row::-webkit-scrollbar { display: none; }

.chip {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .5rem .95rem;
    border-radius: var(--sg-radius-pill);
    background: var(--sg-surface-raised);
    border: 1px solid var(--sg-border);
    color: var(--sg-text-muted);
    font-size: .85rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    min-height: 2.4rem;
}

.chip:hover { text-decoration: none; border-color: var(--sg-brand-300); color: var(--sg-text); }
.chip.is-active { background: var(--sg-brand-600); border-color: var(--sg-brand-600); color: #fff; }

/* --------------------------------------------------------------- hero refinements */

.hero {
    padding-block: clamp(2.25rem, 8vw, 5.5rem);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .4rem .9rem;
    border-radius: var(--sg-radius-pill);
    background: var(--sg-success-bg);
    color: var(--sg-success);
    border: 1px solid color-mix(in srgb, var(--sg-success) 25%, transparent);
    font-size: .82rem;
    font-weight: 700;
}

/* Full-width primary buttons on small screens for comfortable tapping. */
@media (max-width: 575.98px) {
    .hero .btn-lg { width: 100%; }
    .hero .hero-actions { flex-direction: column; }
}

/* --------------------------------------------------------------- how it works timeline (mobile) */

.steps-timeline { position: relative; }

@media (max-width: 767.98px) {
    .steps-timeline::before {
        content: "";
        position: absolute;
        inset-inline-start: 1.35rem;
        top: 1.5rem;
        bottom: 1.5rem;
        width: 2px;
        background: var(--sg-border);
    }
    .step-row { display: flex; gap: 1rem; align-items: flex-start; }
    .step-num {
        flex-shrink: 0;
        width: 2.7rem;
        height: 2.7rem;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: var(--sg-brand-600);
        color: #fff;
        font-weight: 800;
        position: relative;
        z-index: 1;
    }
}

/* --------------------------------------------------------------- section headings */

.section-eyebrow {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: .1em;
    font-size: .72rem;
    font-weight: 800;
    color: var(--sg-brand-600);
    margin-bottom: .4rem;
}

[dir="rtl"] .section-eyebrow { letter-spacing: 0; }

/* --------------------------------------------------------------- buttons: bigger touch targets */

.btn { min-height: 2.75rem; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; }
.btn-sm { min-height: 2.2rem; }
.btn-icon { min-height: auto; }

.btn-primary {
    box-shadow: 0 6px 16px rgba(79, 70, 229, .22);
}

.btn-primary:hover { box-shadow: 0 8px 20px rgba(79, 70, 229, .28); }

[data-bs-theme="dark"] .btn-primary { box-shadow: none; }

/* --------------------------------------------------------------- network tiles: press + count */

.network-tile { min-height: 6.5rem; -webkit-tap-highlight-color: transparent; }
.network-tile:active { transform: scale(.97); }

.network-count {
    font-size: .72rem;
    color: var(--sg-text-muted);
    background: var(--sg-surface-sunken);
    border-radius: var(--sg-radius-pill);
    padding: .1rem .55rem;
}

@media print {
    .site-header, .site-footer, .btn, .toast-stack, .side-nav,
    .bottom-nav, .sticky-cta, .mobile-menu, .mobile-menu-backdrop { display: none !important; }
    body { background: #fff; padding-bottom: 0; }
    .card, .table-wrap { border: 1px solid #ccc; box-shadow: none; }
}
