:root {
    --sb-primary: #1d4ed8;
    --sb-primary-dark: #0f172a;
    --sb-accent: #f59e0b;
    --sb-success: #16a34a;
    --sb-bg: #f4f7fb;
    --sb-card: #ffffff;
    --sb-text: #172033;
    --sb-muted: #64748b;
    --sb-border: #e2e8f0;
    --sb-sidebar: #0f172a;
    --sb-sidebar-soft: rgba(255,255,255,.08);
    --sb-sidebar-border: rgba(255,255,255,.1);
    --sb-shadow: 0 16px 50px rgba(15, 23, 42, .06);
}

[data-bs-theme="dark"] {
    --sb-bg: #0b1120;
    --sb-card: #111827;
    --sb-text: #e5e7eb;
    --sb-muted: #94a3b8;
    --sb-border: #243244;
    --bs-body-bg: #0b1120;
    --bs-body-color: #e5e7eb;
    --bs-dropdown-bg: #111827;
    --bs-dropdown-color: #e5e7eb;
    --bs-dropdown-link-color: #e5e7eb;
    --bs-dropdown-link-hover-bg: #1f2937;
    --bs-dropdown-link-hover-color: #ffffff;
}

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(148,163,184,.65) transparent;
}

body {
    background: var(--sb-bg);
    color: var(--sb-text);
    min-height: 100vh;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    transition: color .2s ease, background .2s ease, border-color .2s ease, transform .2s ease;
}

.app-shell {
    min-height: 100vh;
    display: flex;
}

.sidebar {
    width: 292px;
    background:
        radial-gradient(circle at 25% 0%, rgba(59,130,246,.22), transparent 22rem),
        linear-gradient(180deg, #0f172a 0%, #111827 54%, #172554 100%);
    color: #fff;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    transform: translateX(0);
    transition: transform .25s ease;
    box-shadow: 16px 0 45px rgba(15, 23, 42, .12);
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1035;
    background: rgba(15, 23, 42, .55);
    backdrop-filter: blur(2px);
    display: none;
}

.sidebar-backdrop.show {
    display: block;
}

.brand-block {
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    padding: 1rem 1.15rem;
    border-bottom: 1px solid var(--sb-sidebar-border);
}

.brand-home {
    display: flex;
    align-items: center;
    gap: .8rem;
    color: #fff;
    text-decoration: none;
    min-width: 0;
}

.brand-home:hover {
    color: #fff;
    transform: translateX(2px);
}

.brand-icon {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: #111827;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    box-shadow: 0 10px 30px rgba(245, 158, 11, .35);
}

.brand-title {
    font-weight: 850;
    letter-spacing: .2px;
    line-height: 1;
}

.brand-block small,
.sidebar-footer small,
.sidebar-status small,
.nav-copy small {
    color: rgba(255,255,255,.62);
}

.sidebar-close {
    border-radius: 12px;
    width: 36px;
    height: 36px;
}

.sidebar-status {
    margin: 1rem 1rem .75rem;
    padding: .8rem;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 18px;
    background: rgba(255,255,255,.06);
    display: flex;
    align-items: center;
    gap: .75rem;
}

.sidebar-status strong,
.sidebar-status small {
    display: block;
    line-height: 1.15;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 99px;
    background: #22c55e;
    box-shadow: 0 0 0 6px rgba(34,197,94,.16);
    flex: 0 0 auto;
}

.sidebar-search-wrap {
    margin: 0 1rem .75rem;
    position: relative;
}

.sidebar-search-wrap i {
    position: absolute;
    left: .9rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,.55);
    pointer-events: none;
}

.sidebar-search {
    width: 100%;
    height: 42px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.08);
    color: #fff;
    outline: none;
    padding: .6rem .8rem .6rem 2.4rem;
}

.sidebar-search::placeholder {
    color: rgba(255,255,255,.5);
}

.sidebar-search:focus {
    border-color: rgba(251,191,36,.55);
    box-shadow: 0 0 0 .2rem rgba(251,191,36,.13);
}

.sidebar-nav {
    padding: .3rem .85rem 1rem;
    overflow-y: auto;
    flex: 1 1 auto;
}

.nav-section {
    margin-bottom: .95rem;
}

.nav-section-title {
    padding: .35rem .5rem .45rem;
    color: rgba(255,255,255,.42);
    font-size: .7rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.nav-section-links {
    display: grid;
    gap: .22rem;
}

.sidebar .nav-link {
    color: rgba(255,255,255,.82);
    display: flex;
    align-items: center;
    gap: .72rem;
    padding: .72rem .78rem;
    border-radius: 16px;
    font-weight: 700;
    border: 1px solid transparent;
    min-height: 58px;
}

.nav-icon {
    width: 36px;
    height: 36px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,.08);
    color: rgba(255,255,255,.9);
    flex: 0 0 36px;
}

.nav-copy {
    min-width: 0;
}

.nav-title,
.nav-copy small {
    display: block;
    line-height: 1.1;
}

.nav-copy small {
    font-size: .72rem;
    font-weight: 600;
    margin-top: .16rem;
}

.sidebar .nav-link:hover {
    color: #fff;
    background: rgba(255,255,255,.1);
    transform: translateX(3px);
}

.sidebar .nav-link:hover .nav-icon,
.sidebar .nav-link.active .nav-icon {
    background: rgba(255,255,255,.18);
    color: #fff;
}

.sidebar .nav-link.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(29,78,216,.88), rgba(37,99,235,.58));
    border-color: rgba(255,255,255,.14);
    box-shadow: 0 14px 28px rgba(29,78,216,.25);
}

.nav-empty-state {
    display: none;
    margin: .75rem .5rem;
    padding: .9rem;
    border: 1px dashed rgba(255,255,255,.2);
    color: rgba(255,255,255,.62);
    border-radius: 16px;
    text-align: center;
    font-size: .88rem;
}

.sidebar-footer {
    margin-top: auto;
    padding: 1rem;
    border-top: 1px solid rgba(255,255,255,.1);
    background: rgba(15,23,42,.18);
}

.mini-user {
    display: flex;
    gap: .68rem;
    align-items: center;
    min-width: 0;
}

.mini-user strong,
.mini-user small {
    display: block;
    line-height: 1.1;
}

.main-content {
    margin-left: 292px;
    width: calc(100% - 292px);
    min-height: 100vh;
}

.topbar {
    min-height: 86px;
    background: rgba(255,255,255,.88);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--sb-border);
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .85rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 1030;
}

[data-bs-theme="dark"] .topbar {
    background: rgba(15,23,42,.88);
}

.page-heading {
    min-width: 0;
}

.top-breadcrumb .breadcrumb {
    --bs-breadcrumb-divider-color: var(--sb-muted);
    font-size: .78rem;
}

.top-breadcrumb a {
    color: var(--sb-muted);
    text-decoration: none;
}

.top-breadcrumb a:hover {
    color: var(--sb-primary);
}

.topbar h1 {
    font-size: 1.42rem;
    margin: 0;
    font-weight: 850;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--sb-text);
}

.topbar small,
.breadcrumb-item.active {
    color: var(--sb-muted);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: .65rem;
}

.quick-actions {
    gap: .45rem;
}

.icon-btn {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--sb-border);
}

.btn-light {
    background: var(--sb-card);
    border-color: var(--sb-border);
    color: var(--sb-text);
}

.btn-light:hover,
.btn-light:focus {
    background: rgba(29,78,216,.08);
    border-color: rgba(29,78,216,.24);
    color: var(--sb-primary);
}

.user-pill {
    border: 1px solid var(--sb-border);
    border-radius: 18px;
    padding: .4rem .7rem .4rem .45rem;
    display: flex;
    gap: .65rem;
    align-items: center;
    background: var(--sb-card);
}

.user-pill strong,
.user-pill small {
    display: block;
    line-height: 1.1;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    background: #dbeafe;
    color: #1d4ed8;
    font-weight: 850;
}

.avatar-sm {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    flex: 0 0 34px;
}

.content-area {
    padding: 1.5rem;
}

.card,
.table-card,
.stat-card {
    background: var(--sb-card);
    border: 1px solid var(--sb-border);
    border-radius: 22px;
    box-shadow: var(--sb-shadow);
}

.card-header,
.card-footer {
    background: transparent;
    border-color: var(--sb-border);
}

.stat-card {
    padding: 1.2rem;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.stat-card:after {
    content: "";
    position: absolute;
    right: -25px;
    top: -25px;
    width: 90px;
    height: 90px;
    background: rgba(29,78,216,.08);
    border-radius: 50%;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: #dbeafe;
    color: #1d4ed8;
    margin-bottom: 1rem;
}

.stat-label {
    color: var(--sb-muted);
    font-size: .88rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.stat-value {
    font-size: 1.6rem;
    font-weight: 850;
    margin: .25rem 0 0;
}

.table > :not(caption) > * > * {
    background: transparent;
    color: var(--sb-text);
    border-color: var(--sb-border);
    vertical-align: middle;
}

.table thead th {
    color: var(--sb-muted);
    font-size: .78rem;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.badge-soft {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

.badge-low {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.btn-primary {
    background: var(--sb-primary);
    border-color: var(--sb-primary);
}

.form-control,
.form-select {
    border-radius: 14px;
    border-color: var(--sb-border);
    padding: .72rem .9rem;
}

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
    background-color: #0f172a;
    color: var(--sb-text);
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.25rem;
    background:
        radial-gradient(circle at top left, rgba(59,130,246,.24), transparent 28rem),
        radial-gradient(circle at bottom right, rgba(245,158,11,.2), transparent 28rem),
        var(--sb-bg);
}

.login-card {
    max-width: 980px;
    width: 100%;
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid var(--sb-border);
    background: var(--sb-card);
    box-shadow: 0 25px 80px rgba(15, 23, 42, .15);
}

.login-hero {
    background: linear-gradient(135deg, #0f172a, #1d4ed8);
    color: #fff;
    min-height: 100%;
    padding: 2rem;
    position: relative;
}

.login-hero:after {
    content: "";
    position: absolute;
    inset: auto -50px -70px auto;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(251,191,36,.25);
}

.quick-action {
    text-decoration: none;
    color: var(--sb-text);
    border: 1px solid var(--sb-border);
    border-radius: 18px;
    padding: 1rem;
    display: block;
    height: 100%;
    background: var(--sb-card);
}

.quick-action:hover {
    border-color: var(--sb-primary);
    transform: translateY(-2px);
}

@media (max-width: 1199.98px) {
    .topbar h1 {
        font-size: 1.22rem;
    }
}

@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.show {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    .content-area {
        padding: 1rem;
    }
    .topbar {
        padding-inline: 1rem;
    }
    body.sidebar-open {
        overflow: hidden;
    }
}

@media (max-width: 575.98px) {
    .topbar {
        min-height: 76px;
        gap: .65rem;
    }
    .top-breadcrumb,
    .page-heading small {
        display: none;
    }
    .user-pill {
        padding: .28rem;
    }
    .icon-btn {
        width: 40px;
        height: 40px;
        border-radius: 13px;
    }
    .content-area {
        padding: .85rem;
    }
    .sidebar {
        width: min(90vw, 292px);
    }
}

.app-footer {
    border-top: 1px solid var(--sb-border);
    color: var(--sb-muted);
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.5rem;
    font-size: .85rem;
}

.codebase-card {
    border: 1px solid var(--sb-border);
    border-radius: 18px;
    padding: 1rem;
    background: var(--sb-card);
}

.list-group-item {
    background: transparent;
    color: var(--sb-text);
    border-color: var(--sb-border);
}

[data-bs-theme="dark"] .alert-warning {
    background: rgba(245,158,11,.12);
    border-color: rgba(245,158,11,.35);
    color: #fde68a;
}

[data-bs-theme="dark"] .alert-success {
    background: rgba(34,197,94,.12);
    border-color: rgba(34,197,94,.35);
    color: #bbf7d0;
}

.table-toolbar {
    display: flex;
    gap: .75rem;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.table-search {
    max-width: 320px;
}

@media (max-width: 575.98px) {
    .app-footer {
        display: block;
        padding: .85rem;
    }
    .app-footer span {
        display: block;
    }
}

/* v3.1 Robust Home Page */
.home-hero {
    position: relative;
    overflow: hidden;
    border-radius: 34px;
    padding: 1.25rem;
    background:
        radial-gradient(circle at 18% 12%, rgba(251, 191, 36, .36), transparent 24rem),
        radial-gradient(circle at 88% 2%, rgba(96, 165, 250, .35), transparent 26rem),
        linear-gradient(135deg, #0f172a 0%, #1d4ed8 58%, #0f766e 100%);
    box-shadow: 0 28px 90px rgba(15, 23, 42, .20);
    isolation: isolate;
}

.home-hero-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
    background-size: 36px 36px;
    mask-image: linear-gradient(135deg, rgba(0,0,0,.9), rgba(0,0,0,.15));
    z-index: -1;
}

.hero-copy,
.live-card {
    border: 1px solid rgba(255,255,255,.16);
    background: rgba(255,255,255,.10);
    border-radius: 28px;
    padding: clamp(1.25rem, 3vw, 2.25rem);
    backdrop-filter: blur(20px);
}

.hero-copy h2 {
    margin: .9rem 0 1rem;
    max-width: 780px;
    color: #fff;
    font-size: clamp(2rem, 4vw, 4.25rem);
    line-height: .96;
    font-weight: 900;
    letter-spacing: -.065em;
}

.hero-copy p {
    max-width: 680px;
    color: rgba(255,255,255,.76);
    font-size: 1.04rem;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    padding: .48rem .8rem;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 999px;
    color: #fff;
    background: rgba(255,255,255,.10);
    font-weight: 750;
    font-size: .82rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-top: 1.6rem;
}

.btn-ghost-light {
    color: #fff;
    border: 1px solid rgba(255,255,255,.18);
    background: rgba(255,255,255,.10);
}

.btn-ghost-light:hover {
    color: #0f172a;
    border-color: rgba(255,255,255,.65);
    background: rgba(255,255,255,.92);
    transform: translateY(-2px);
}

.hero-mini-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
    margin-top: 1.6rem;
}

.hero-mini-grid div {
    padding: 1rem;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 20px;
    background: rgba(255,255,255,.09);
}

.hero-mini-grid strong,
.hero-mini-grid span {
    display: block;
}

.hero-mini-grid strong {
    color: #fff;
    font-size: 1.45rem;
    line-height: 1;
}

.hero-mini-grid span {
    margin-top: .35rem;
    color: rgba(255,255,255,.62);
    font-size: .82rem;
}

.live-card {
    color: #fff;
    background: linear-gradient(160deg, rgba(255,255,255,.18), rgba(255,255,255,.07));
}

.live-badge {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    color: #dcfce7;
    border: 1px solid rgba(187,247,208,.24);
    background: rgba(34,197,94,.18);
    padding: .4rem .65rem;
    border-radius: 999px;
    font-weight: 800;
    font-size: .78rem;
}

.live-badge span {
    width: .55rem;
    height: .55rem;
    border-radius: 99px;
    background: #22c55e;
    box-shadow: 0 0 0 .35rem rgba(34,197,94,.16);
}

.live-clock {
    font-size: clamp(3.2rem, 9vw, 6.2rem);
    font-weight: 950;
    line-height: .9;
    letter-spacing: -.07em;
}

.glass-metric {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 20px;
    background: rgba(255,255,255,.10);
}

.glass-metric + .glass-metric {
    margin-top: .8rem;
}

.glass-metric small,
.glass-metric strong {
    display: block;
}

.glass-metric small {
    color: rgba(255,255,255,.64);
    font-weight: 700;
}

.glass-metric strong {
    color: #fff;
    font-size: 1.35rem;
}

.trend-pill {
    padding: .4rem .6rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 850;
    background: rgba(255,255,255,.12);
    color: #fff;
}

.trend-up {
    color: #bbf7d0;
    background: rgba(34,197,94,.18);
}

.trend-down {
    color: #fecaca;
    background: rgba(239,68,68,.18);
}

.trend-neutral {
    color: #e2e8f0;
}

.stat-card-modern {
    position: relative;
    overflow: hidden;
    min-height: 178px;
}

.stat-card-modern::after {
    content: "";
    position: absolute;
    width: 110px;
    height: 110px;
    right: -42px;
    top: -42px;
    border-radius: 999px;
    background: rgba(29,78,216,.08);
}

.stat-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .95rem;
}

.trend-text {
    font-size: .78rem;
    font-weight: 850;
}

.stat-subtitle {
    color: var(--sb-muted);
    font-size: .84rem;
    margin-top: .35rem;
}

.feature-tile {
    position: relative;
    display: block;
    height: 100%;
    min-height: 190px;
    padding: 1.2rem;
    border: 1px solid var(--sb-border);
    border-radius: 28px;
    background: var(--sb-card);
    box-shadow: var(--sb-shadow);
    text-decoration: none;
    overflow: hidden;
}

.feature-tile::before {
    content: "";
    position: absolute;
    inset: auto -28px -54px auto;
    width: 140px;
    height: 140px;
    border-radius: 999px;
    background: rgba(29,78,216,.08);
    transition: transform .25s ease;
}

.feature-tile:hover {
    transform: translateY(-5px);
    border-color: rgba(29,78,216,.34);
}

.feature-tile:hover::before {
    transform: scale(1.25);
}

.feature-icon {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 14px 32px rgba(29,78,216,.25);
    margin-bottom: 1rem;
}

.feature-tile strong,
.feature-tile small,
.feature-tile em {
    position: relative;
    display: block;
}

.feature-tile strong {
    color: var(--sb-text);
    font-size: 1.05rem;
}

.feature-tile small {
    color: var(--sb-muted);
    margin-top: .35rem;
    max-width: 95%;
}

.feature-tile em {
    color: var(--sb-primary);
    font-style: normal;
    font-weight: 850;
    margin-top: 1rem;
    font-size: .86rem;
}

.feature-success .feature-icon { background: linear-gradient(135deg, #22c55e, #15803d); box-shadow: 0 14px 32px rgba(22,163,74,.24); }
.feature-warning .feature-icon { background: linear-gradient(135deg, #f59e0b, #b45309); box-shadow: 0 14px 32px rgba(245,158,11,.24); }
.feature-info .feature-icon { background: linear-gradient(135deg, #06b6d4, #0369a1); box-shadow: 0 14px 32px rgba(6,182,212,.24); }

.card-elevated {
    border-radius: 28px;
    box-shadow: var(--sb-shadow);
}

.pulse-chart {
    height: 290px;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    align-items: end;
    gap: .8rem;
    padding: .5rem .25rem 0;
}

.pulse-bar-wrap {
    height: 100%;
    display: flex;
    align-items: stretch;
    flex-direction: column;
    justify-content: end;
    gap: .6rem;
    min-width: 0;
}

.pulse-bar {
    position: relative;
    min-height: 12px;
    border-radius: 18px 18px 8px 8px;
    background: linear-gradient(180deg, #60a5fa, #1d4ed8);
    box-shadow: 0 15px 30px rgba(29,78,216,.20);
    transition: height .35s ease, transform .2s ease;
}

.pulse-bar:hover {
    transform: translateY(-3px);
}

.pulse-bar span {
    position: absolute;
    left: 50%;
    bottom: calc(100% + .5rem);
    transform: translateX(-50%);
    padding: .25rem .45rem;
    border-radius: 999px;
    background: var(--sb-card);
    border: 1px solid var(--sb-border);
    color: var(--sb-text);
    font-size: .68rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    box-shadow: var(--sb-shadow);
}

.pulse-bar-wrap:hover .pulse-bar span {
    opacity: 1;
}

.pulse-bar-wrap small {
    color: var(--sb-muted);
    font-weight: 800;
    text-align: center;
}

.check-row {
    display: flex;
    align-items: center;
    gap: .8rem;
    padding: .9rem;
    border: 1px solid var(--sb-border);
    border-radius: 18px;
    background: rgba(148,163,184,.07);
}

.check-row span {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: var(--sb-muted);
    background: var(--sb-card);
    border: 1px solid var(--sb-border);
    flex: 0 0 30px;
}

.check-row strong {
    font-size: .92rem;
}

.check-row.done {
    background: rgba(22,163,74,.08);
    border-color: rgba(22,163,74,.20);
}

.check-row.done span {
    color: #fff;
    background: var(--sb-success);
    border-color: var(--sb-success);
}

.mix-row + .mix-row {
    margin-top: 1rem;
}

.mix-track {
    height: 9px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(148,163,184,.20);
}

.mix-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #f59e0b, #1d4ed8);
}

.rank-row,
.stock-alert-row,
.activity-item {
    display: flex;
    align-items: center;
    gap: .9rem;
}

.rank-row > span {
    width: 34px;
    height: 34px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    background: rgba(245,158,11,.14);
    color: #b45309;
    font-weight: 900;
    flex: 0 0 34px;
}

.rank-row strong,
.rank-row small {
    display: block;
}

.rank-row small {
    color: var(--sb-muted);
}

.rank-row em {
    margin-left: auto;
    font-style: normal;
    font-weight: 900;
    color: var(--sb-text);
    white-space: nowrap;
}

.snapshot-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: var(--sb-border);
    border-radius: 0 0 28px 28px;
    overflow: hidden;
}

.snapshot-grid a {
    min-height: 126px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1.25rem;
    text-decoration: none;
    background: var(--sb-card);
}

.snapshot-grid a:hover {
    background: rgba(29,78,216,.06);
}

.snapshot-grid strong,
.snapshot-grid span {
    display: block;
}

.snapshot-grid strong {
    color: var(--sb-text);
    font-size: 2rem;
    line-height: 1;
    font-weight: 950;
}

.snapshot-grid span {
    color: var(--sb-muted);
    font-size: .82rem;
    margin-top: .35rem;
    font-weight: 750;
}

.stock-alert-row {
    justify-content: space-between;
    padding: .85rem 0;
    border-bottom: 1px solid var(--sb-border);
}

.stock-alert-row:first-child {
    padding-top: 0;
}

.stock-alert-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.stock-alert-row strong,
.stock-alert-row small {
    display: block;
}

.stock-alert-row small {
    color: var(--sb-muted);
}

.stock-alert-row span {
    padding: .35rem .55rem;
    border-radius: 999px;
    background: rgba(239,68,68,.10);
    color: #dc2626;
    font-weight: 850;
    white-space: nowrap;
}

.activity-feed {
    position: relative;
}

.activity-item {
    align-items: flex-start;
    padding: .75rem 0;
}

.activity-item + .activity-item {
    border-top: 1px solid var(--sb-border);
}

.activity-item > span {
    width: 12px;
    height: 12px;
    margin-top: .35rem;
    border-radius: 999px;
    background: var(--sb-primary);
    box-shadow: 0 0 0 5px rgba(29,78,216,.12);
    flex: 0 0 12px;
}

.activity-item strong,
.activity-item small {
    display: block;
}

.activity-item strong {
    text-transform: capitalize;
}

.activity-item small {
    color: var(--sb-muted);
}

.min-w-0 {
    min-width: 0;
}

@media (max-width: 767.98px) {
    .home-hero {
        padding: .75rem;
        border-radius: 24px;
    }

    .hero-copy,
    .live-card {
        border-radius: 22px;
    }

    .hero-mini-grid,
    .snapshot-grid {
        grid-template-columns: 1fr;
    }

    .pulse-chart {
        height: 230px;
        gap: .45rem;
    }

    .pulse-bar span {
        display: none;
    }
}

.reveal-ready {
    opacity: 0;
    transform: translateY(14px);
}

.reveal-in {
    opacity: 1;
    transform: translateY(0);
    transition: opacity .45s ease, transform .45s ease;
}

@media (prefers-reduced-motion: reduce) {
    .reveal-ready,
    .reveal-in {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
