/* ── Reset & Base ── */
*, *::before, *::after {
    box-sizing: border-box;
}

/* ─────────────────────────────────────────────────────────────
   THEME  — orange neon primary, deep dark backgrounds, bright text
   ───────────────────────────────────────────────────────────── */
:root {
    --bg: #020304;
    --bg-2: #0e1626;
    --bg-3: #141f33;
    --bg-card: #040406;
    --bg-hover: #182236;
    --bg-secondary: #141f33;
    --border: #212b40;
    --border-2: #2d4060;
    --text: #F8FAFF;
    --text-muted: #d7ebff;
    --text-dim: #93b6db;
    /* Primary: emerald green */
    --teal-rgb: 0, 200, 110;
    --teal: rgb(var(--teal-rgb));
    --teal-light: #30E888;
    --teal-dim: rgba(var(--teal-rgb), 0.13);
    --teal-glow: 0 0 24px rgba(var(--teal-rgb), 0.40);
    /* Secondary: vivid purple */
    --purple-rgb: 145, 90, 255;
    --purple: rgb(var(--purple-rgb));
    --purple-dim: rgba(var(--purple-rgb), 0.12);
    /* Gold: brighter for rankings */
    --gold-rgb: 255, 185, 0;
    --gold: rgb(var(--gold-rgb));
    --gold-dim: rgba(var(--gold-rgb), 0.12);
    --gold-glow: 0 0 0 1px rgba(var(--gold-rgb), 0.4), 0 0 28px rgba(var(--gold-rgb), 0.18);
    --orange: rgb(var(--teal-rgb));
    --orange-dim: var(--teal-dim);
    --green: #2BFF00;
    --red: #F44545;
    --radius: 10px;
    --radius-sm: 6px;
    --radius-lg: 14px;
}

html, body {
    height: 100%;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 16px;
    background: var(--bg);
    background-image: radial-gradient(ellipse 80% 40% at 50% -5%, rgba(var(--teal-rgb), 0.22) 0%, transparent 100%), radial-gradient(ellipse 50% 30% at 100% 100%, rgba(var(--purple-rgb), 0.10) 0%, transparent 100%);
    background-attachment: fixed;
    color: var(--text);
    margin: 0;
    padding: 0;
}

a {
    color: var(--teal);
    text-decoration: none;
}

    a:hover {
        color: var(--teal-light);
    }

/* ── Top Nav ── */
.site-nav {
    background: rgba(8, 12, 20, 0.92);
    border-bottom: 1px solid var(--border);
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 52px;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(16px);
}

.site-nav-inner {
    width: 100%;
    max-width: 1420px;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.5px;
    white-space: nowrap;
    margin-left:-8px;
}
    .brand:hover {
        color: #fff;
    }
    .brand em {
        color: var(--teal);
        font-style: normal;
    }

.nav-tabs-main {
    display: flex;
    gap: 2px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
    justify-content: center;
    overflow-x: auto;
    scrollbar-width: none;
}

    .nav-tabs-main::-webkit-scrollbar {
        display: none;
    }

    .nav-tabs-main .nav-link {
        color: var(--text-muted);
        padding: 6px 16px;
        border-radius: 20px;
        font-size: 1.05rem;
        font-weight: 600;
        transition: color 0.15s;
        white-space: nowrap;
        border: 1px solid transparent;
    }

        .nav-tabs-main .nav-link:hover {
            color: #fff;
        }

        .nav-tabs-main .nav-link.active {
            color: var(--teal);
        }

.nav-auth {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

.nav-social {
    display: flex;
    gap: 4px;
    align-items: center;
    margin-right: 4px;
}

.user-avatar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--teal), var(--purple));
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-decoration: none;
    flex-shrink: 0;
    transition: opacity 0.15s;
}

.user-avatar-btn:hover {
    opacity: 0.85;
}

.nav-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    color: var(--text-dim);
    font-size: 1.05rem;
    transition: color 0.15s, background 0.15s;
}

.nav-social-link:hover {
    color: var(--text);
    background: rgba(255,255,255,0.06);
}

/* ── Buttons ── */
.btn {
    
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.825rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.15s;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, #20D878, #009050);
    color: #fff;
    box-shadow: 0 2px 12px rgba(var(--teal-rgb), 0.30);
}

    .btn-primary:hover {
        background: linear-gradient(135deg, #30E888, #10A860);
        color: #fff;
        box-shadow: 0 0 22px rgba(var(--teal-rgb), 0.55);
    }

.btn-outline {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-2);
}

    .btn-outline:hover {
        background: var(--bg-3);
        color: #fff;
        border-color: var(--teal);
    }

.btn-firm {
    background: linear-gradient(135deg, #20D878, #009050);
    color: #fff;
    padding: 10px 20px !important;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    letter-spacing: 0.2px;
    box-shadow: 0 2px 10px rgba(var(--teal-rgb), 0.28);
    transition: all 0.15s;
}

    .btn-firm:hover {
        background: linear-gradient(135deg, #30E888, #10A860);
        color: #fff;
        box-shadow: 0 4px 22px rgba(var(--teal-rgb), 0.55);
        transform: translateY(-1px);
    }

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: none;
    padding: 6px 10px;
}

    .btn-ghost:hover {
        color: #fff;
        background: var(--bg-3);
    }

.btn-sm {
    padding: 5px 12px;
    font-size: 0.82rem;
}

.btn-danger {
    background: var(--red);
    color: #fff;
}

    .btn-danger:hover {
        background: #dc2626;
        color: #fff;
    }

.btn-success {
    background: var(--green);
    color: #000;
}

    .btn-success:hover {
        background: #16a34a;
        color: #000;
    }

.btn-buy {
    background: linear-gradient(135deg, #20D878, #009050);
    color: #fff;
    font-weight: 700;
}

    .btn-buy:hover {
        box-shadow: 0 0 22px rgba(var(--teal-rgb), 0.5);
        color: #fff;
    }

/* ── Layout ── */
.main-content {
    min-height: calc(100vh - 52px - 44px);
    background: radial-gradient(ellipse at 50% 0%, rgba(var(--teal-rgb), 0.14) 0%, transparent 50%), radial-gradient(ellipse at 85% 60%, rgba(var(--purple-rgb), 0.08) 0%, transparent 50%), radial-gradient(ellipse at 10% 85%, rgba(var(--gold-rgb), 0.06) 0%, transparent 45%);
}

.container {
    max-width: 1420px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.container-md {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.container-sm {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ── Featured bar ── */
.featured-bar {
    background: linear-gradient(135deg, #06090f 0%, #0a1020 50%, #060810 100%);
    border-bottom: 1px solid var(--border);
    padding: 10px 1.5rem;
    position: relative;
    overflow: hidden;
}

    .featured-bar::before {
        content: '';
        position: absolute;
        inset: 0;
        background: radial-gradient(ellipse at 20% 50%, rgba(var(--teal-rgb), 0.08) 0%, transparent 60%), radial-gradient(ellipse at 80% 50%, rgba(var(--purple-rgb), 0.06) 0%, transparent 60%);
        pointer-events: none;
    }

.featured-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
    position: relative;
}

    .featured-scroll::-webkit-scrollbar {
        display: none;
    }

.featured-card {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-2);
    border-radius: var(--radius);
    padding: 8px 14px 8px 10px;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 200px;
    text-decoration: none;
}

    .featured-card:hover {
        background: rgba(var(--teal-rgb), 0.08);
        border-color: rgba(var(--teal-rgb), 0.35);
        box-shadow: 0 0 14px rgba(var(--teal-rgb), 0.15);
    }

.featured-firm-logo {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
    color: #fff;
    flex-shrink: 0;
}

.featured-info {
    flex: 1;
    min-width: 0;
}

    .featured-info .name {
        font-size: 0.85rem;
        font-weight: 600;
        color: #fff;
    }

    .featured-info .sub {
        font-size: 0.82rem;
        color: var(--text-muted);
        margin-top: 1px;
    }

.discount-badge {
    background: linear-gradient(135deg, #20D878, #009050);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 800;
    padding: 3px 7px;
    border-radius: 5px;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 0 8px rgba(var(--teal-rgb), 0.3);
}

/* ── Sub-tabs ── */
.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 12px 0 0;
    margin-bottom: 4px;
}

.category-tab {
    padding: 7px 20px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    background: transparent;
}

    .category-tab:hover { color: #fff; background: var(--bg-3); }
    .category-tab.active {
        color: #fff;
        background: var(--bg-3);
        border-color: var(--teal);
        box-shadow: 0 0 0 1px rgba(var(--teal-rgb), 0.3) inset, 0 0 10px rgba(var(--teal-rgb), 0.15);
    }

.sub-tabs {
    display: flex;
    gap: 4px;
    padding: 12px 0 0;
    margin-bottom: 12px;
}

.sub-tab {
    padding: 7px 20px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    background: transparent;
}

    .sub-tab:hover {
        color: #fff;
        background: var(--bg-3);
    }

    .sub-tab.active {
        color: #fff;
        background: var(--bg-3);
        border-color: var(--teal);
        box-shadow: 0 0 0 1px rgba(var(--teal-rgb), 0.3) inset, 0 0 10px rgba(var(--teal-rgb), 0.15);
    }

/* ── Filter bar ── */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin-bottom: 14px;
}

.filter-chip {
    background: var(--bg-2);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

    .filter-chip:hover {
        border-color: var(--border-2);
        color: #fff;
    }

    .filter-chip.active {
        background: rgba(var(--teal-rgb), 0.12);
        border-color: var(--teal);
        color: var(--teal);
        box-shadow: 0 0 8px rgba(var(--teal-rgb), 0.18);
    }

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

    .filter-btn:hover {
        border-color: var(--border-2);
        color: #fff;
    }

.filter-select {
    background: var(--bg-2);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 5px 28px 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%236b84a3' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

    .filter-select:focus {
        outline: none;
        border-color: var(--teal);
    }

/* ── Live badge ── */
.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: var(--text-muted);
    background: var(--bg-2);
    border: 1px solid var(--border);
    padding: 4px 10px;
    border-radius: 20px;
}

.live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--teal);
    flex-shrink: 0;
    box-shadow: 0 0 0 2px rgba(var(--teal-rgb), 0.25), 0 0 8px rgba(var(--teal-rgb), 0.5);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%,100% {
        opacity: 1;
    }

    50% {
        opacity: .4;
    }
}

/* ── Data Table ── */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 4px;
}

    .data-table th {
        padding: 10px 12px;
        color: var(--text);
        font-weight: 600;
        font-size: 0.9rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        border-bottom: 1px solid var(--border);
        text-align: left;
        white-space: nowrap;
    }

        .data-table th svg {
            vertical-align: middle;
        }

.sort-th {
    cursor: pointer;
    user-select: none;
}

    .sort-th:hover {
        color: #fff !important;
    }

.sort-icon {
    display: inline-block;
    margin-left: 4px;
    font-size: 0.9rem;
    opacity: 0.35;
    vertical-align: middle;
    transition: opacity 0.15s, color 0.15s;
}

    .sort-icon.active {
        opacity: 1;
        color: var(--teal);
    }
    .data-table .tdcenter{
        text-align:center;
    }

.data-table td {
    padding: 13px 12px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    font-size: 1rem;
    color: var(--text);
    background: var(--bg-card);
    transition: background 0.12s;
}

    .data-table td:first-child {
        border-left: 1px solid var(--border);
        border-radius: 12px 0 0 12px;
    }

    .data-table td:last-child {
        border-right: 1px solid var(--border);
        border-radius: 0 12px 12px 0;
    }

.data-table tbody tr:hover td {
    background: var(--bg-hover);
    border-color: rgba(var(--teal-rgb), 0.15);
}

/* ── Top 3 row highlights ── */

/* #1 — Gold */
.row-rank-1 {
    background: linear-gradient(90deg, rgba(255,185,0,0.13) 0%, rgba(255,185,0,0.05) 35%, transparent 100%);
}
.row-rank-1 td {
    background: transparent !important;
    border-top-color: rgba(255,185,0,0.18);
    border-bottom-color: rgba(255,185,0,0.18);
}
.row-rank-1 td:first-child { border-left: 3px solid rgba(255,185,0,0.9); }
.row-rank-1:hover {
    background: linear-gradient(90deg, rgba(255,185,0,0.20) 0%, rgba(255,185,0,0.08) 35%, transparent 100%);
}

/* #2 — Silver#b4c8dc3d */
.row-rank-2 {
    background: linear-gradient(90deg, rgba(180,200,220,0.11) 0%, rgba(180,200,220,0.04) 35%, transparent 100%);
}
.row-rank-2 td {
    background: transparent !important;
    border-top-color: rgba(180,200,220,0.14);
    border-bottom-color: rgba(180,200,220,0.14);
}
.row-rank-2 td:first-child { border-left: 3px solid rgba(200,210,220,0.75); }
.row-rank-2:hover {
    background: linear-gradient(90deg, rgba(180,200,220,0.17) 0%, rgba(180,200,220,0.07) 35%, transparent 100%);
}

/* #3 — Bronze */
.row-rank-3 {
    background: linear-gradient(90deg, rgba(205,128,64,0.12) 0%, rgba(205,128,64,0.04) 35%, transparent 100%);
}
.row-rank-3 td {
    background: transparent !important;
    border-top-color: rgba(205,128,64,0.16);
    border-bottom-color: rgba(205,128,64,0.16);
}
.row-rank-3 td:first-child { border-left: 3px solid rgba(205,128,64,0.80); }
.row-rank-3:hover {
    background: linear-gradient(90deg, rgba(205,128,64,0.18) 0%, rgba(205,128,64,0.07) 35%, transparent 100%);
}

/* ── Firm name cell ── */
.firm-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.firm-logo {
    width: 42px;
    height: 42px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.7rem;
    color: #fff;
    flex-shrink: 0;
    overflow: hidden;
}

    .firm-logo img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.firm-logo-img {
    width: 42px;
    height: 42px;
    border-radius: 9px;
    object-fit: contain;
    flex-shrink: 0;
    background: rgba(255,255,255,0.04);
}

.firm-name-info .name {
    font-weight: 600;
    color: #fff;
    font-size: 0.9rem;
}

.firm-name-info .likes {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 3px;
    margin-top: 2px;
}

/* ── Rank trophy ── */
.rank-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
}

    .rank-icon.gold {
        color: var(--gold);
        font-size: 1rem;
    }

    .rank-icon.silver {
        color: #9ca3af;
        font-size: 1rem;
    }

    .rank-icon.bronze {
        color: #cd7c3d;
        font-size: 1rem;
    }

.rank-num {
    font-size: 0.8rem;
    color: var(--text-dim);
    font-weight: 600;
}

/* ── Rating pill ── */
.rating-pill {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    background: rgba(var(--gold-rgb), 0.08);
    border: 1px solid rgba(var(--gold-rgb), 0.22);
    border-radius: 8px;
    padding: 4px 8px;
    min-width: 52px;
    text-align: center;
}

    .rating-pill .score {
        font-size: 0.9rem;
        font-weight: 800;
        line-height: 1;
        color: #fff;
    }

    .rating-pill .stars-row {
        display: flex;
        gap: 1px;
        margin-top: 2px;
    }

        .rating-pill .stars-row span {
            font-size: 0.72rem;
            color: #FFB800;
        }

    .rating-pill .review-count {
        font-size: 0.78rem;
        color: var(--text-muted);
        margin-top: 1px;
    }

/* ── Platform badges ── */
.platform-icons {
    display: flex;
    gap: 4px;
    align-items: center;
    flex-wrap: wrap;
}

.platform-badge {
    background: var(--bg-3);
    border: 1px solid var(--border-2);
    color: var(--text-muted);
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.platform-more {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-left: 2px;
}

/* ── Allocation bar ── */
.allocation-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.allocation-amount {
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
}

.allocation-bar {
    height: 4px;
    border-radius: 2px;
    background: var(--border);
    width: 80px;
    overflow: hidden;
}

.allocation-bar-fill {
    height: 100%;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--purple), var(--teal));
}

/* ── Promo badge ── */
.promo-badge {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    background: rgba(var(--teal-rgb), 0.10);
    border: 1px solid rgba(var(--teal-rgb), 0.28);
    border-radius: 8px;
    padding: 4px 10px;
    min-width: 72px;
    text-align: center;
    gap: 2px;
}

    .promo-badge .pct {
        font-size: 0.85rem;
        font-weight: 800;
        color: var(--teal);
    }

    .promo-badge .match {
        font-size: 0.78rem;
        color: var(--text-muted);
    }

/* ── Badges ── */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.badge-new {
    background: var(--teal-dim);
    color: var(--teal);
    border: 1px solid rgba(var(--teal-rgb), 0.28);
}

.firm-logo-wrap {
    position: relative;
    flex-shrink: 0;
}
.badge-new-fancy {
    position: absolute;
    top: -29px;
    left: -40px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: linear-gradient(135deg, rgba(var(--teal-rgb), 0.28), rgba(var(--purple-rgb), 0.20));
    border: 1px solid rgba(var(--teal-rgb), 0.55);
    color: var(--teal-light);
    font-size: 0.8rem;
    /* font-weight: 800; */
    letter-spacing: 0.9px;
    padding: 4px 10px;
    border-radius: 10px;
    text-transform: uppercase;
    box-shadow: 0 0 10px rgba(var(--teal-rgb), 0.30), inset 0 0 6px rgba(var(--teal-rgb), 0.08);
    white-space: nowrap;
    z-index: 2;
    pointer-events: none;
}
/*.badge-new-fancy::before {
    content: '';
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--teal);
    box-shadow: 0 0 5px var(--teal);
    flex-shrink: 0;*/
    /*animation: badge-pulse 1.8s ease-in-out infinite;*/
/*}*/
@keyframes badge-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.65); }
}

.badge-approved {
    background: rgba(45,217,94,0.12);
    color: var(--green);
}

.badge-pending {
    background: rgba(var(--gold-rgb), 0.12);
    color: var(--gold);
}

.badge-rejected {
    background: rgba(244,69,69,0.12);
    color: var(--red);
}

.badge-assets {
    background: var(--purple-dim);
    color: var(--purple);
    border: 1px solid rgba(var(--purple-rgb), 0.22);
}

/* ── Heart icon ── */
.heart-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-dim);
    font-size: 1.2rem;
    padding: 4px;
    transition: color 0.15s;
}

    .heart-btn:hover {
        color: #f43f5e;
    }

/* ── Card ── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
}

    .card:hover {
        border-color: rgba(var(--teal-rgb), 0.18);
        transition: border-color 0.2s;
    }

/* ── Table wrapper ── */
.table-card {
    /*  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: var(--radius);*/
    overflow: hidden;
    position: relative;
}

    .table-card::before {
        content: '';
        display: block;
        height: 2px;
        background: linear-gradient(90deg, var(--teal), var(--purple), transparent 80%);
        box-shadow: 0 0 18px rgba(var(--teal-rgb), 0.65);
    }

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

.table-scroll-top {
    overflow-x: scroll;
    overflow-y: hidden;
    height: 12px;
    margin-bottom: 2px;
}

.table-scroll-top-inner {
    height: 1px;
}

/* ── Section header ── */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
}

.section-count {
    color: var(--teal);
    font-weight: 700;
    margin-left: 6px;
}

/* ── Sidebar layout ── */
.page-with-sidebar {
    display: grid;
    grid-template-columns: 210px 1fr;
    gap: 1.25rem;
    align-items: start;
}

.sidebar {
    position: sticky;
    top: 68px;
}

.sidebar-section {
    margin-bottom: 1rem;
}

.sidebar-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.sidebar-options {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.sidebar-chip {
    background: var(--bg-2);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    display: inline-block;
}

    .sidebar-chip:hover {
        border-color: rgba(var(--teal-rgb), 0.3);
        color: #fff;
    }

    .sidebar-chip.active {
        background: rgba(var(--teal-rgb), 0.14);
        border-color: var(--teal);
        color: var(--teal);
        font-weight: 600;
        box-shadow: 0 0 8px rgba(var(--teal-rgb), 0.18);
    }

/* ── Toggleable sidebar ── */
.sidebar-collapsed {
    grid-template-columns: 1fr !important;
}

.sidebar-collapsed .sidebar {
    display: none !important;
}

.sidebar-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--border-2);
    background: var(--bg-3);
    color: var(--text-muted);
    transition: all 0.15s;
    white-space: nowrap;
}

.sidebar-toggle-btn:hover {
    border-color: var(--teal);
    color: var(--teal);
    background: var(--teal-dim);
}

.sidebar-toggle-btn.active {
    border-color: var(--teal);
    color: var(--teal);
    background: var(--teal-dim);
}

/* ── Account nav (profile sidebar) ── */
.account-nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.15s;
}

.account-nav-link:hover {
    background: var(--bg-hover);
    color: #fff;
}

.account-nav-link.active {
    background: var(--teal-dim);
    color: var(--teal);
    font-weight: 600;
}

.account-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    font-size: 0.82rem;
    border-bottom: 1px solid var(--border);
}

.account-stat-row:last-child {
    border-bottom: none;
}

.account-stat-label {
    color: var(--text-dim);
}

.account-stat-value {
    font-weight: 600;
    color: var(--text);
}

/* ── Admin sidebar ── */
.admin-layout {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 1.25rem;
    min-height: calc(100vh - 96px);
}

.admin-sidebar {
    padding: 0.5rem 0;
}

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.85rem;
    transition: all 0.15s;
    margin-bottom: 2px;
    text-decoration: none;
}

    .admin-nav-link:hover, .admin-nav-link.active {
        background: var(--bg-3);
        color: #fff;
    }

    .admin-nav-link.active {
        color: var(--teal);
    }

/* ── Forms ── */
.form-group {
    margin-bottom: 1.1rem;
}

.form-label {
    display: block;
    font-size: 0.86rem;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.form-control {
    width: 100%;
    background: var(--bg-2);
    border: 1px solid var(--border-2);
    color: #fff;
    padding: 9px 13px;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: border-color 0.15s;
}

    .form-control:focus {
        outline: none;
        border-color: var(--teal);
        background: var(--bg-3);
        box-shadow: 0 0 0 3px rgba(var(--teal-rgb), 0.12);
    }

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

.form-control.is-invalid {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(244, 69, 69, 0.12);
}

.chip-group.is-invalid {
    border: 1px solid var(--red);
    border-radius: var(--radius-sm);
    padding: 5px;
    box-shadow: 0 0 0 2px rgba(244, 69, 69, 0.10);
}

.upload-area.is-invalid {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(244, 69, 69, 0.10);
}

.ratings-section.is-invalid {
    border: 1px solid var(--red);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 0 0 2px rgba(244, 69, 69, 0.10);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%236b84a3' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.form-error {
    color: var(--red);
    font-size: 0.78rem;
    margin-top: 4px;
}

.form-hint {
    color: var(--text-dim);
    font-size: 0.78rem;
    margin-top: 4px;
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* ── Toggle ── */
.toggle {
    position: relative;
    display: inline-block;
    width: 34px;
    height: 19px;
}

    .toggle input {
        opacity: 0;
        width: 0;
        height: 0;
    }

.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--border-2);
    border-radius: 20px;
    transition: 0.2s;
    cursor: pointer;
}

    .toggle-slider::before {
        content: '';
        position: absolute;
        width: 13px;
        height: 13px;
        left: 3px;
        bottom: 3px;
        background: #fff;
        border-radius: 50%;
        transition: 0.2s;
    }

.toggle input:checked + .toggle-slider {
    background: var(--teal);
}

    .toggle input:checked + .toggle-slider::before {
        transform: translateX(15px);
    }

/* ── Wizard progress ── */
.wizard-steps {
    display: flex;
    gap: 4px;
    margin-bottom: 2rem;
}

.wizard-step {
    flex: 1;
    height: 3px;
    border-radius: 2px;
    background: var(--border);
    transition: background 0.3s;
}

    .wizard-step.done {
        background: var(--teal);
    }

    .wizard-step.active {
        background: linear-gradient(90deg, var(--teal), var(--purple));
    }

/* ── Alerts ── */
.alert {
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.alert-danger {
    background: rgba(244,69,69,0.08);
    border: 1px solid rgba(244,69,69,0.28);
    color: #FCA5A5;
}

.alert-success {
    background: rgba(45,217,94,0.08);
    border: 1px solid rgba(45,217,94,0.28);
    color: #86EFAC;
}

.alert-info {
    background: var(--teal-dim);
    border: 1px solid rgba(var(--teal-rgb), 0.28);
    color: var(--teal);
}

.alert-warning {
    background: rgba(var(--gold-rgb), 0.08);
    border: 1px solid rgba(var(--gold-rgb), 0.28);
    color: #FCD34D;
}

/* ── Upload area ── */
.upload-area {
    border: 2px dashed var(--border-2);
    border-radius: var(--radius);
    padding: 2.5rem;
    transition: border-color 0.2s, box-shadow 0.2s, color 0.2s;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-muted);
}

    .upload-area:hover {
        border-color: var(--teal);
        color: #fff;
        box-shadow: 0 0 16px rgba(var(--teal-rgb), 0.12);
    }

    .upload-area.uploaded {
        border-color: var(--green);
        background: rgba(45, 217, 94, 0.06);
        color: var(--green);
        box-shadow: 0 0 16px rgba(45, 217, 94, 0.12);
    }

/* ── Pagination ── */
.pagination {
    display: flex;
    gap: 4px;
    align-items: center;
    justify-content: center;
    padding: 1rem 0;
}

.page-link {
    background: var(--bg-2);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 5px 11px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    transition: all 0.15s;
    text-decoration: none;
}

    .page-link:hover, .page-link.active {
        background: var(--teal);
        border-color: var(--teal);
        color: #fff;
        box-shadow: 0 0 12px rgba(var(--teal-rgb), 0.4);
    }

/* ── Legal pages (Terms / Privacy) ── */
.legal-body {
    color: var(--text-muted);
    font-size: 0.925rem;
    line-height: 1.8;
}

.legal-section {
    margin-bottom: 2.5rem;
}

.legal-section h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border);
}

.legal-section h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    margin: 1.25rem 0 0.5rem;
}

.legal-section p {
    margin-bottom: 0.85rem;
}

.legal-section ul {
    padding-left: 1.5rem;
    margin-bottom: 0.85rem;
}

.legal-section ul li {
    margin-bottom: 0.4rem;
}

.legal-section a {
    color: var(--teal);
}

/* ── Global site loader overlay ── */
#siteLoader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(2, 3, 4, 0.82);
    backdrop-filter: blur(6px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}
#siteLoader.visible {
    opacity: 1;
    pointer-events: all;
}
.site-loader-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    background: linear-gradient(145deg, #0d1b2e, #0a1220);
    border: 1px solid var(--border-2);
    border-radius: 20px;
    padding: 36px 48px;
    box-shadow: 0 0 0 1px rgba(0,200,110,0.08), 0 24px 60px rgba(0,0,0,0.7), 0 0 40px rgba(0,200,110,0.06);
    min-width: 260px;
    text-align: center;
}
.site-loader-ring {
    width: 56px;
    height: 56px;
    filter: drop-shadow(0 0 10px rgba(0,200,110,0.4));
}
.site-loader-arc {
    transform-origin: 24px 24px;
    animation: loaderSpin 0.9s linear infinite;
}
@keyframes loaderSpin {
    to { transform: rotate(360deg); }
}
.site-loader-title {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.1px;
}
.site-loader-sub {
    font-size: 0.78rem;
    color: var(--text-dim);
    line-height: 1.5;
    max-width: 240px;
    min-height: 0;
}
.site-loader-sub:empty { display: none; }

/* ── Footer ── */
.site-footer {
    background: var(--bg-2);
    border-top: 1px solid var(--border);
    padding: 12px 0;
    margin-top: auto;
}

    .site-footer .inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        font-size: 0.78rem;
        color: var(--text-dim);
    }

/* ── Mobile nav ── */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    flex-shrink: 0;
}

.mobile-nav {
    display: none;
    background: var(--bg-2);
    border-top: 1px solid var(--border);
    padding: 0.75rem 1rem;
}

    .mobile-nav.open {
        display: block;
    }

    .mobile-nav a, .mobile-nav button {
        display: block;
        padding: 10px 0;
        color: var(--text-muted);
        font-size: 0.95rem;
        border-bottom: 1px solid var(--border);
        background: none;
        border-left: none;
        border-right: none;
        border-top: none;
        width: 100%;
        text-align: left;
        cursor: pointer;
    }

        .mobile-nav a:last-child,
        .mobile-nav form:last-child button {
            border-bottom: none;
        }

        .mobile-nav a.active {
            color: var(--teal);
        }

/* ── Scrollbar ── */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border-2);
    border-radius: 5px;
}

/* ── Firm mobile cards ── */
.firm-cards {
    display: none;
}

@media (max-width: 768px) {
    .firm-table-view {
        display: none;
    }

    .firm-cards {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    /* Show sidebar when filter toggle is active */
    .page-with-sidebar:not(.sidebar-collapsed) .sidebar {
        display: block;
    }
}

.firm-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.18s, box-shadow 0.18s;
}

.firm-card:hover {
    border-color: rgba(var(--teal-rgb), 0.4);
    box-shadow: 0 0 16px rgba(var(--teal-rgb), 0.10);
}

.firm-card-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0.9rem 1rem;
    text-decoration: none;
    color: inherit;
}

.firm-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.firm-card-logo-wrap {
    position: relative;
    flex-shrink: 0;
}

.firm-card-title-block {
    flex: 1;
    min-width: 0;
}

.firm-name-bold {
    font-weight: 700;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.firm-card-rating-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    margin-left: auto;
    text-align: center;
    gap: 1px;
    width:70px;
}

.firm-card-rating-score {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
}

.firm-card-rating-label {
    font-size: 0.6rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.firm-card-changes {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    background: var(--bg-2);
    border-radius: 6px;
    padding: 5px 10px;
}

.firm-card-change-label {
    color: var(--text-dim);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.firm-card-change-sep {
    color: var(--border-2);
}

.firm-card-icon-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 26px;
}

.firm-card-icon-label {
    font-size: 0.7rem;
    color: var(--text-dim);
    width: 68px;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.firm-card-payout-timing {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: 2px;
}

.firm-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.firm-card-meta span {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 2px 7px;
}

.firm-card-action {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 8px 1rem;
    border-top: 1px solid var(--border);
    background: rgba(255,255,255,0.02);
}

/* ── Home: top-firms table ── */
.home-table {
    width: 100%;
    min-width: 1100px;
}

/* ══════════════════════════════════════════════
   RESPONSIVE  — mobile-first breakpoint system
   320 · 480 · 640 · 768 · 900 · 1024 · 1280+
   ══════════════════════════════════════════════ */

/* Desktop-only utility (hidden on mobile) */
.show-mobile { display: none !important; }

/* ── 1280px + : wide desktop — loosen spacing ── */
@media (min-width: 1280px) {
    .data-table th,
    .data-table td { padding: 12px 12px; }
}

/* ── ≤ 1024px : tablet landscape / small laptop ── */
@media (max-width: 1024px) {
    .page-with-sidebar { grid-template-columns: 1fr; }
    .sidebar { position: static; display: none; }
    .page-with-sidebar:not(.sidebar-collapsed) .sidebar { display: block; }

    .home-table { min-width: 900px; }

    .hero-title { font-size: clamp(1.75rem, 4vw, 2.8rem); }
    .hero-subtitle { font-size: 0.97rem; }

    .section-title { font-size: 1.25rem; }
}

/* ── ≤ 900px : tablet portrait / admin layout ── */
@media (max-width: 900px) {
    .admin-layout { grid-template-columns: 1fr; }
    .admin-sidebar { display: none; }

    /* admin form grids collapse to single column */
    .admin-form-grid-2,
    .admin-form-grid-3 { grid-template-columns: 1fr; }

    .dash-charts-row { grid-template-columns: 1fr; }

    .dash-summary-row { gap: 6px; }
    .dash-kpi-card { min-width: 90px; padding: 8px 10px; }
    .dash-kpi-value { font-size: 1.15rem; }
}

/* ── ≤ 768px : tablet portrait / large phone ── */
@media (max-width: 768px) {
    /* Nav */
    .nav-tabs-main { display: none; }
    .mobile-menu-btn { display: flex !important; }
    .nav-auth { margin-left: auto; }
    .site-nav { padding: 0 1rem; }

    /* Visibility utilities */
    .hide-mobile { display: none !important; }
    .show-mobile { display: table-cell !important; }

    /* Spacing */
    .container { padding: 0 1rem; }
    .page-pad { padding-top: 1rem; padding-bottom: 1.5rem; }
    .page-pad-sm { padding-top: 0.75rem; padding-bottom: 1.25rem; }
    .page-pad-auth { padding-top: 2rem; padding-bottom: 2rem; }
    .featured-bar { padding: 8px 1rem; }

    /* Typography scale */
    html { font-size: 15px; }
    .hero-title { font-size: clamp(1.6rem, 6vw, 2.4rem); line-height: 1.2; }
    .hero-subtitle { font-size: 0.92rem; line-height: 1.6; margin-bottom: 1.5rem; }
    .section-title { font-size: 1.1rem; }
    .firm-name-primary { font-size: 0.95rem; }

    /* Tables */
    .data-table th,
    .data-table td { padding: 10px 8px; font-size: 0.82rem; }
    .home-table { min-width: 340px; }

    /* Rating box */
    .rating-box { width: 68px; padding: 3px 5px; }
    .rating-box-score { font-size: 1rem; }
    .rating-box-label { font-size: 0.62rem; }
    .rating-box-reviews { font-size: 0.6rem; }

    /* Change / price text */
    .change-text { font-size: 0.85rem; }
    .lowest-price { font-size: 0.85rem; }

    /* Cards */
    .card { padding: 1rem; }

    /* Admin */
    .admin-stats-grid { flex-wrap: wrap; gap: 6px; }
    .admin-stat-card { padding: 5px 10px; min-width: 120px; }
    .admin-stat-value { font-size: 1rem; }
    .admin-tabs { overflow-x: auto; gap: 2px; }
    .admin-tab { padding: 7px 12px; font-size: 0.82rem; white-space: nowrap; }

    /* Forms */
    .form-control { font-size: 0.92rem; padding: 7px 10px; }

    /* Sub-tabs */
    .sub-tabs { overflow-x: auto; padding-bottom: 4px; }

    /* Discount copy button */
    .discount-code-btn {
        max-width: 130px;
        padding: 7px !important;
    }
    .discount-pct { font-size: 0.72rem; }
}

/* ── ≤ 640px : large phone landscape / small phone portrait ── */
@media (max-width: 640px) {
    html { font-size: 14.5px; }

    .hero { padding: 2rem 0 0.75rem; }
    .hero-title { font-size: clamp(1.4rem, 7vw, 2rem); }
    .hero-subtitle { font-size: 0.88rem; }
    .hero-features { gap: 8px; }
    .hero-feature { padding: 0.85rem 1rem; gap: 12px; }
    .hero-feature-icon { width: 38px; height: 38px; font-size: 1rem; }
    .hero-feature-title { font-size: 0.88rem; }
    .hero-feature-desc { font-size: 0.75rem; }

    .section-title { font-size: 1rem; }

    /* Tighter table cells */
    .data-table th,
    .data-table td { padding: 8px 6px; font-size: 0.78rem; }
    .td-rank-medal { font-size: 1.1rem !important; }
    .td-rank-num { font-size: 0.85rem; }

    /* Rating box — compact */
    .rating-box { width: 58px; padding: 2px 4px; }
    .rating-box-score { font-size: 0.9rem; }
    .stars-row { font-size: 0.6rem; }

    /* AI insights popup */
    .ai-insights-popup { border-radius: 12px; }
    .ai-popup-body { padding: 12px 14px; }

    /* Admin stat chips wrap to 2-per-row */
    .admin-stat-card { flex: 1 1 calc(50% - 6px); }

    /* Buttons */
    .btn { padding: 6px 11px; font-size: 0.8rem; }
    .btn-firm { padding: 8px 14px !important; font-size: 0.88rem; }

    /* Loader card */
    .site-loader-card { padding: 28px 32px; min-width: 200px; }
}

/* ── ≤ 480px : standard phone ── */
@media (max-width: 480px) {
    html { font-size: 14px; }

    .container { padding: 0 0.75rem; }
    .site-nav { padding: 0 0.75rem; }

    .hero-title { font-size: clamp(1.25rem, 8vw, 1.75rem); }
    .brand { font-size: 1.2rem; }

    /* Collapse filter bar */
    .filter-bar { gap: 4px; flex-wrap: wrap; }
    .filter-chip { font-size: 0.75rem; padding: 4px 10px; }

    /* Table — ultra compact */
    .data-table th,
    .data-table td { padding: 7px 5px; font-size: 0.75rem; }

    /* Firm cell */
    .firm-img-sm { max-width: 30px; max-height: 30px; }
    .firm-logo { width: 30px; height: 30px; font-size: 0.75rem; }
    .firm-review-count { font-size: 0.68rem; }

    /* Rating box */
    .rating-box { width: 52px; }
    .rating-box-score { font-size: 0.82rem; }
    .rating-box-label, .rating-box-reviews { display: none; }

    /* Buttons */
    .btn-sm { padding: 4px 9px; font-size: 0.75rem; }
    .btn-firm { padding: 7px 11px !important; font-size: 0.82rem; }

    /* Admin form */
    .admin-form-grid-2,
    .admin-form-grid-3 { grid-template-columns: 1fr; }
    .admin-tab { padding: 6px 10px; font-size: 0.78rem; }

    /* Loader */
    .site-loader-card { padding: 24px 24px; min-width: 180px; }
    .site-loader-ring { width: 44px; height: 44px; }
    .site-loader-title { font-size: 0.88rem; }
    .site-loader-sub { font-size: 0.72rem; }
}

/* ── ≤ 375px : small phones (iPhone SE, older Android) ── */
@media (max-width: 375px) {
    html { font-size: 13.5px; }
    .container { padding: 0 0.625rem; }

    .hero-title { font-size: 1.25rem; }
    .firm-name-primary { font-size: 0.85rem; }

    .data-table th,
    .data-table td { padding: 6px 4px; font-size: 0.72rem; }

    .admin-stat-card { flex: 1 1 100%; }
}

/* ── Firm logo color seeds ── */
.logo-teal {
    background: linear-gradient(135deg, #0d9488, #00c4aa);
}

.logo-purple {
    background: linear-gradient(135deg, #7c3aed, #a855f7);
}

.logo-blue {
    background: linear-gradient(135deg, #1d4ed8, #3b82f6);
}

.logo-orange {
    background: linear-gradient(135deg, #c2410c, #f97316);
}

.logo-green {
    background: linear-gradient(135deg, #15803d, #22c55e);
}

.logo-pink {
    background: linear-gradient(135deg, #be185d, #ec4899);
}

.logo-gold {
    background: linear-gradient(135deg, #b45309, #f59e0b);
}

/* ── Review star picker ── */
.star-picker .star-pick {
    transition: color 0.1s;
    cursor: pointer;
    color: rgba(255,255,255,0.15);
    font-size: 2rem;
}

.star-picker-lg .star-pick {
    font-size: 2.2rem;
}

/* ── Firm content (WYSIWYG output) ── */
.firm-content {
    color: var(--text-muted);
    line-height: 1.75;
    font-size: 1rem;
}

    .firm-content h2 {
        color: #fff;
        font-size: 1.15rem;
        font-weight: 700;
        margin: 1.25rem 0 0.5rem;
    }

    .firm-content h3 {
        color: #E8EEF8;
        font-size: 1rem;
        font-weight: 600;
        margin: 1rem 0 0.4rem;
    }

    .firm-content p {
        margin: 0 0 0.75rem;
    }

    .firm-content ul, .firm-content ol {
        padding-left: 1.4rem;
        margin: 0 0 0.75rem;
    }

    .firm-content li {
        margin-bottom: 0.3rem;
    }

    .firm-content a {
        color: var(--teal);
        text-decoration: underline;
    }

    .firm-content strong {
        color: #DCE8F4;
    }

.rating-chip {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    background: rgba(34, 211, 165, 0.08);
    border: 1px solid rgba(34, 211, 165, 0.2);
    border-radius: 8px;
    padding: 5px 10px;
}

/* ═══════════════════════════════════════════
   COMPONENT CLASSES — replaces inline styles
   ═══════════════════════════════════════════ */

/* ── Color utilities (dynamic values) ── */
.text-white {
    color: #fff;
}

.text-dim {
    color: var(--text-dim);
}

.text-teal {
    color: var(--teal);
}

.text-gold {
    color: var(--gold);
}

.text-green {
    color: var(--green);
}

.text-red {
    color: var(--red);
}

.text-purple {
    color: var(--purple);
}

.text-unch {
    font-size: 0.6rem !important;
    opacity: 0.6;
    color: var(--text-dim);
}

.fw-600 {
    font-weight: 600;
}

.fw-700 {
    font-weight: 700;
}

.ml-auto {
    margin-left: auto;
}

.form-inline {
    display: inline;
}

/* ── Page padding helpers ── */
.page-pad {
    padding-top: 1.5rem;
    padding-bottom: 2rem;
}

.page-pad-sm {
    padding-top: 1rem;
    padding-bottom: 2rem;
}

.page-pad-auth {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.page-pad-xl {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.pb-3 {
    padding-bottom: 3rem;
}

.section-header-mb {
    margin-bottom: 1rem;
}

.card-mb {
    margin-bottom: 1.5rem;
}

.card-mb-sm {
    margin-bottom: 1.25rem;
}

.card-no-pad {
    padding: 0;
    overflow: hidden;
}

/* ── Hero ── */
.hero {
    position: relative;
    overflow: hidden;
    /*padding: 5rem 0 3.5rem;*/
    padding:3rem 0 1rem;
    text-align: center;
}

.hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-inner {
    position: relative;
}

.hero-eyebrow {
    display: inline-block;
    background: var(--teal-dim);
    border: 1px solid rgba(255,106,0,0.25);
    border-radius: 20px;
    padding: 4px 14px;
    font-size: 0.78rem;
    color: var(--teal);
    margin-bottom: 1.25rem;
    font-weight: 600;
}

.hero-title {
    font-size: clamp(2rem,5vw,3.25rem);
    font-weight: 800;
    margin: 0 0 1rem;
    line-height: 1.15;
    letter-spacing: -0.5px;
}

.hero-title-gradient {
    background: linear-gradient(90deg,var(--teal),var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 625px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-lg {
    padding: 11px 28px;
    font-size: 0.95rem;
}

/* ── Stats / feature card grid ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(190px,1fr));
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    text-align: center;
    padding: 0.875rem 1.25rem;
    border-color: var(--border);
    background: linear-gradient(135deg,var(--bg-card) 0%,var(--bg) 100%);
}

.stat-card-icon {
    font-size: 1.4rem;
    margin-bottom: 6px;
    color: var(--teal);
}

.stat-card-title {
    font-weight: 700;
    margin-bottom: 4px;
    color: #fff;
}

.stat-card-desc {
    color: var(--text-muted);
    font-size: 0.82rem;
}

.td-rank {
    font-weight: 700;
    text-align: center;
}

.td-rank-medal {
    font-size: 1.5rem !important;
}

.td-rank-num {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.rank-gold   { color: #FFD700; filter: drop-shadow(0 0 6px rgba(255,215,0,0.5)); }
.rank-silver { color: #C8D0D8; filter: drop-shadow(0 0 6px rgba(200,208,216,0.4)); }
.rank-bronze { color: #CD8040; filter: drop-shadow(0 0 6px rgba(205,128,64,0.4)); }

.td-firm-min {
    position:relative;
    min-width: 160px;
    max-width:250px;
}

.firm-img-sm {
    max-width: 42px;
    max-height: 42px;
    border-radius: 6px;
    object-fit: contain;
    background: var(--bg-secondary);
    
    flex-shrink: 0;
}

.firm-logo-sm {
    width: 34px;
    height: 34px;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.firm-name-primary {
    font-weight: 600;
    color: #fff;
    font-size: 1.1rem;
    /*white-space: nowrap;*/
}

a.firm-name-primary:hover,
.firm-name-info a.name:hover {
    color: var(--teal);
}

.firm-review-count {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Rating box (home table) */
.rating-box {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    background: rgb(34 211 165 / 17%);
    border: 1px solid rgba(34, 211, 165, 0.2);
    border-radius: 8px;
    padding: 4px 10px;
    width: 88px;
    text-align:center;
}

.rating-box-score {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--green);
}

.rating-box-label {
    font-size: 0.78rem;
    color: var(--text-dim);
    line-height: 1;
}

.rating-box .stars-row {
    font-size: 0.78rem;
    color: var(--gold);
}

.rating-box-reviews {
    font-size: 0.72rem;
    color: var(--text-dim);
    margin-top: 1px;
}

.rating-box-lg {
    padding: 8px 16px;
    gap: 4px;
}

.rating-box-lg .rating-box-score {
    font-size: 1.6rem;
}

.no-rating-yet {
    font-size: 0.75rem !important;
    font-weight: 500 !important;
    color: var(--text-dim) !important;
}

.rating-box-lg .stars-row {
    font-size: 1rem;
}

/* Weekly change / price */
.change-text {
    font-weight: 700;
    font-size: 1.1rem;
    white-space: nowrap;
}

.lowest-price {
    color: white;
    font-size: 1.1rem;
    white-space: nowrap;
}

/* AI bullet lists */
.bullets-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.bullet-item-posneg {
    font-size: 0.85rem !important;
}
.bullet-item {
    font-size: 1rem;
    color: white;
    display: flex;
    gap: 5px;
    line-height: 1.3;
    overflow-wrap: break-word;
    word-break: break-word;
    min-width: 0;
}

.bullet-pos-icon {
    color: var(--green);
    flex-shrink: 0;
    margin-top: 1px;
}

.bullet-neg-icon {
    color: var(--red);
    flex-shrink: 0;
    margin-top: 1px;
}

.no-data-dim {
    color: var(--text-dim);
    font-size: 0.82rem;
}

/* Discount cell */
.td-discount {
    min-width: 110px;
}

.discount-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.discount-pct
 {
    background: rgb(116 0 240 / 18%);
    border: 1px solid rgb(185 111 255 / 45%);
    border-radius: 8px;
    padding: 4px 12px;
    font-size: 1rem;
    font-weight: 900;
    color: rgb(199 171 255);
    white-space: nowrap;
    letter-spacing: 0.3px;
    width:100%;
    text-align:center;
}

.discount-code-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--teal);
    border-radius: 6px;
    padding: 4px 10px;
    /*font-size: 0.88rem;*/
    color: var(--green);
    cursor: pointer;
    /*font-family: monospace;*/
    font-weight: 300;
    white-space: nowrap;
    width: 100%;
}

.no-data-em {
    color: var(--text-dim);
    font-size: 0.85rem;
}

/* ── Firm detail page ── */
.firm-header-card {
    margin-bottom: 1.25rem;
    border-color: var(--border-2);
    background: linear-gradient(135deg,var(--bg-card) 0%,var(--bg-2) 100%);
}

.firm-header-row {
    display: flex;
    /*align-items: center;*/
    gap: 16px;
    flex-wrap: wrap;
}

.firm-logo-xl {
    width: 64px;
    height: 64px;
    font-size: 1.6rem;
    border-radius: 14px;
}

.firm-info-block {
    flex: 1;
    min-width: 0;
}

.firm-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.firm-page-h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
}

.firm-meta {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    font-size: 0.83rem;
    color: var(--text-muted);
}

.firm-alloc {
    color: var(--teal);
    font-weight: 700;
}

.firm-rating-col {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.rating-pill-lg {
    transform: scale(1.2);
    transform-origin: right;
}

.firm-platforms-bar {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.badge-platform {
    background: var(--bg-2);
    color: var(--text-muted);
    border: 1px solid var(--border-2);
}

/* ── Global has-tip tooltip ── */
.has-tip { position: relative; display: inline-block; cursor: default; }
.tip-icon { font-size: 0.65rem; color: var(--teal); vertical-align: middle; }
.has-tip::after {
    content: attr(data-tip);
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #0e1626;
    border: 1px solid var(--border-2);
    color: var(--text-muted);
    font-size: 0.76rem;
    font-weight: 400;
    line-height: 1.5;
    padding: 8px 12px;
    border-radius: 8px;
    white-space: normal;
    width: 260px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    z-index: 50;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
}
.has-tip:hover::after { opacity: 1; }

/* Icon-only display for table cells (firms listing) — stacked avatar style */
.icon-solo-wrap {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
}
.icon-solo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-2);
    border: 2px solid var(--bg-card);
    overflow: visible;
    cursor: default;
    position: relative;
    margin-left: -8px;
    transition: transform 0.15s ease;
    z-index: 1;
}
.icon-solo:first-child { margin-left: 0; }
.icon-solo:hover { transform: translateY(-4px); z-index: 20; }
.icon-solo img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    border-radius: 50%;
    display: block;
}
.icon-solo-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 28px;
    min-width: 28px;
    border-radius: 14px;
    background: var(--bg-2);
    border: 2px solid var(--bg-card);
    font-size: 0.6rem;
    color: var(--text-muted);
    padding: 0 5px;
    cursor: default;
    position: relative;
    margin-left: -8px;
    transition: transform 0.15s ease;
    z-index: 1;
}
.icon-solo-text:first-child { margin-left: 0; }
.icon-solo-text:hover { transform: translateY(-4px); z-index: 20; }
/* Tooltip for stacked icons — needs z-index boost to clear siblings */
.icon-solo.has-tip::after,
.icon-solo-text.has-tip::after {
    width: auto;
    white-space: nowrap;
    min-width: 60px;
    font-size: 0.72rem;
    padding: 5px 9px;
    top: calc(100% + 8px);
    z-index: 50;
}

/* Icon chip — used for platforms, data feeds, payout methods */
.icon-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--bg-2);
    border: 1px solid var(--border-2);
    border-radius: 6px;
    padding: 3px 8px 3px 4px;
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
}
.icon-chip-img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    border-radius: 3px;
    flex-shrink: 0;
}
.icon-chip-label {
    line-height: 1;
}
.icon-chips-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
/* Larger variant for detail page */
.icon-chip-lg {
    padding: 4px 10px 4px 6px;
    font-size: 0.82rem;
    gap: 6px;
}
.icon-chip-lg .icon-chip-img {
    width: 22px;
    height: 22px;
}
/* Admin checkbox with icon */
.checkbox-item-icon {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.checkbox-item-icon img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    border-radius: 3px;
}

.card-spaced {
    margin-bottom: 1.25rem;
}

.card-padded {
    padding: 1.5rem;
}

/* Challenge table cells */
.td-size {
    font-weight: 700;
    color: #fff;
}

.td-muted {
    color: var(--text-muted);
}

.td-center-muted {
    color: var(--text-muted);
    text-align: center;
}

.td-sep {
    color: var(--border-2);
}

.td-profit-target {
    color: var(--teal);
    font-weight: 700;
}

.td-max-loss {
    color: var(--red);
    font-weight: 600;
}

.td-loss-type {
    font-size: 0.72rem;
    color: var(--text-dim);
}

.td-profit-split {
    font-weight: 700;
    color: #fff;
}

.td-price {
    font-weight: 700;
    color: #fff;
}

.td-price-orig {
    text-decoration: line-through;
    color: var(--text-dim);
    font-size: 0.72rem;
}

.th-sub-label {
    font-size: 0.65rem;
}

/* Review cards */
.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.review-card {
    border-color: var(--border-2);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.reviewer-name {
    font-weight: 600;
    color: #fff;
}

.reviewer-meta {
    font-size: 1rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.review-sub-ratings {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 1rem;
    color: var(--text-muted);
    ;
}

.review-sub-value {
    color: #fff;
}

.review-body {
    margin: 0;
    color: white;
    font-size: 1rem;
    line-height: 1.65;
}

.card-empty {
    text-align: center;
    padding: 2.5rem;
    color: var(--text-muted);
}

/* ── PropFirms/Index sidebar ── */
.sidebar-filters-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.sidebar-active-label {
    font-size: 0.72rem;
    color: var(--teal);
    font-weight: 600;
}

.sidebar-clear {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.sidebar-divider {
    border-color: var(--border);
    margin: 10px 0;
}

.live-badge-update {
    color: var(--teal);
    font-size: 0.7rem;
}

.filter-bar-end {
    margin-left: auto;
}

.firm-logo-mobile {
    width: 40px;
    height: 40px;
}

.firm-name-bold {
    font-weight: 600;
    color: #fff;
}

.mobile-info {
    flex: 1;
    min-width: 0;
}

.rating-pill-mobile {
    display: inline-flex;
    margin-top: 4px;
    transform: scale(0.9);
    transform-origin: left;
}

/* Firm logo as link */
.firm-logo-link {
    display: inline-flex;
    flex-shrink: 0;
}

/* Frozen first + last columns */
.table-col-frozen th:first-child,
.table-col-frozen td:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background: #08110b;
    box-shadow: 3px 0 8px -3px rgba(0,0,0,0.7);
}
.table-col-frozen th:last-child,
.table-col-frozen td:last-child {
    position: sticky;
    right: 0;
    z-index: 1;
    background: #08110b;
    box-shadow: -3px 0 8px -3px rgba(0,0,0,0.7);
}
.table-col-frozen thead th:first-child,
.table-col-frozen thead th:last-child {
    z-index: 2;
}
.data-table.table-col-frozen tbody tr:hover td:first-child,
.data-table.table-col-frozen tbody tr:hover td:last-child {
    background: var(--bg-hover);
}
.data-table.table-col-frozen .row-rank-1 td:first-child,
.data-table.table-col-frozen .row-rank-1 td:last-child {
    background: #09080a;
}

.firm-card-alloc {
    color: var(--teal);
    font-weight: 700;
}

/* ── Challenges page ── */
.firm-logo-sm-tbl {
    width: 34px;
    height: 34px;
    font-size: 0.78rem;
    flex-shrink: 0;
}

.rating-pill-sm {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 5px;
    margin-top: 3px;
    background: none;
    border: none;
    padding: 0;
    min-width: unset;
}
.rating-pill-sm .score { font-size: 0.78rem; font-weight: 700; color: var(--gold); line-height: 1; }
.rating-pill-sm .stars-row { font-size: 0.65rem; margin-top: 0; }
.rating-pill-sm .review-count { font-size: 0.72rem; color: var(--text-dim); margin-top: 0; }

.loss-type-badge {
    background: rgba(240,165,0,0.1);
    color: var(--gold);
}

.discount-avail {
    font-size: 0.7rem;
    color: var(--teal);
}

.price-strikethrough {
    text-decoration: line-through;
    color: var(--text-muted);
    font-size: 0.72rem;
}

/* ── Password eye toggle ── */
.input-eye-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.input-eye-wrap .form-control {
    padding-right: 2.5rem;
}

.eye-toggle {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-dim);
    padding: 0;
    display: flex;
    align-items: center;
    transition: color 0.15s;
}

.eye-toggle:hover {
    color: var(--text-muted);
}

/* ── Auth pages ── */
.auth-card {
    max-width: 420px;
    margin: 0 auto;
}

.auth-card-wide {
    max-width: 440px;
    margin: 0 auto;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.auth-subtitle {
    color: var(--text-muted);
    margin-top: 6px;
    font-size: 0.9rem;
}

.auth-remember {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.auth-remember-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--text-muted);
    cursor: pointer;
}

.auth-footer {
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.label-hint {
    color: var(--text-dim);
    font-size: 0.8rem;
    font-weight: 400;
}

.btn-full {
    width: 100%;
    justify-content: center;
    padding: 11px;
}

.btn-submit {
    width: 100%;
    justify-content: center;
    padding: 13px;
    font-size: 1rem;
}

/* ── Admin dashboard ── */
.admin-stats-grid {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 0.25rem;
}

.admin-stat-card {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px;
    border-color: var(--border);
    transition: border-color .15s;
}

.admin-stat-card:hover { border-color: var(--border-2); }

.score-badge { display:inline-block; padding:2px 7px; border-radius:4px; font-size:0.78rem; font-weight:700; }
.score-green { background:rgba(0,200,110,0.15); color:#00C86E; }
.score-gold  { background:rgba(255,185,0,0.15);  color:#FFB900; }
.score-red   { background:rgba(244,69,69,0.15);  color:#F44545; }

.admin-stat-label {
    font-size: 0.72rem;
    color: var(--text-dim);
}

.admin-stat-value {
    font-size: 1.15rem;
    font-weight: 700;
}

.admin-page-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

/* ── Admin reviews ── */
.admin-reviews-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.review-admin-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.reviewer-email-dim {
    color: var(--text-dim);
    font-weight: 400;
    font-size: 1rem;
}

.reviewer-admin-meta {
    font-size: 1rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.review-admin-sub {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 1rem;
    color: var(--text-muted);
}

.review-admin-body {
    margin: 0 0 12px;

    font-size: 1rem;
    line-height: 1.6;
}

.review-admin-actions {
    display: flex;
    gap: 8px;
}

/* ── Admin pagination ── */
.admin-pagination {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 600;
    background: var(--bg-3);
    border: 1px solid var(--border);
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.15s;
    white-space: nowrap;
}

.page-btn:hover {
    background: var(--bg-hover);
    border-color: var(--teal);
    color: var(--teal);
}

.page-btn-active {
    background: var(--teal-dim);
    border-color: var(--teal);
    color: var(--teal);
}

.page-btn-disabled {
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
}

.page-ellipsis {
    color: var(--text-dim);
    padding: 0 4px;
    font-size: 0.82rem;
}

.page-info {
    margin-left: 8px;
    color: var(--text-dim);
    font-size: 0.78rem;
}

.admin-filter-bar {
    display: flex;
    gap: 6px;
}

/* ── Admin form layouts ── */
.admin-form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.admin-form-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
}

.admin-form-mt {
    margin-top: 0.5rem;
}

.admin-form-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 1rem;
}

.checkbox-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    cursor: pointer;
    background: var(--bg-2);
    border: 1px solid var(--border);
    padding: 5px 10px;
    border-radius: 6px;
}

.badge-purple {
    background: rgba(124,92,252,0.1);
    color: var(--purple);
}

.logo-preview-row {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-preview-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 6px;
    background: var(--bg-secondary);
    padding: 4px;
}

.logo-preview-img-sm {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 4px;
    background: var(--bg-secondary);
    padding: 2px;
}

.firm-logo-xs {
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
}

.firm-slug-dim {
    font-size: 0.75rem;
    color: var(--text-dim);
}

.quill-editor {
    min-height: 180px;
    background: #0d1b2e;
    color: #c8d8eb;
    border-radius: 0 0 var(--radius) var(--radius);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 1rem;
    cursor: pointer;
    font-size: 0.875rem;
}

.admin-form-btn-mt {
    margin-top: 0.5rem;
}

.mv-change-row {
    font-size: 0.75rem;
}

/* ── Review Submit page ── */
.review-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 700px) {
    .review-layout {
        grid-template-columns: 1fr;
    }

    .notes-card {
        position: static;
        order: -1;
    }
}

.review-page-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.review-page-sub {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.firm-search-wrap {
    position: relative;
}

.firm-dropdown {
    display: none;
    position: absolute;
    z-index: 200;
    width: 100%;
    top: calc(100% + 4px);
    left: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    max-height: 230px;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0,0,0,0.45);
}

.firm-selected {
    display: none;
    margin-top: 8px;
    padding: 10px 14px;
    background: rgba(124,92,252,0.08);
    border: 1px solid rgba(124,92,252,0.3);
    border-radius: var(--radius);
    align-items: center;
    gap: 10px;
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-row-2-lg {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.form-group-0 {
    margin-bottom: 0;
}

.chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.ratings-section {
    margin-bottom: 1.5rem;
}

.ratings-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.ratings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.rating-input-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 14px;
}

.rating-input-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.rating-overall-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    text-align: center;
}

.rating-overall-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 8px;
}

.upload-hint {
    font-size: 0.78rem;
    color: var(--text-dim);
    margin-top: 4px;
}

.upload-filename {
    margin-top: 6px;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
}

.required-star {
    color: var(--red);
}

.form-mb-lg {
    margin-bottom: 1.5rem;
}

.form-mb-xl {
    margin-bottom: 2rem;
}

/* Review notes sidebar */
.notes-card {
    border: 1px solid rgba(252,107,92,0.3) !important;
    background: black !important;
    position: sticky;
    top: 80px;
}

.notes-title {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--gold);
    font-weight: 600;
    margin-bottom: 10px;
}

.notes-text {
    color: white;
    font-size: 1rem;
    line-height: 1.6;
    margin: 0 0 12px;
}

.notes-edit-box {
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    padding: 12px;
    font-size: 1rem;
    color: var(--text-dim);
    line-height: 1.6;
}

    .notes-edit-box strong {
        color: var(--text-muted);
    }

.notes-help {
    margin-top: 1rem;
    font-size: 1rem;
    color: var(--text-muted);
}

/* ── Thank You page ── */
.thankyou-wrap {
    padding-top: 4rem;
    padding-bottom: 4rem;
    text-align: center;
}

.thankyou-emoji {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.thankyou-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.thankyou-msg {
    color: var(--text-muted);
    max-width: 460px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

.cta-row {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* ── Partial star ratings ── */
.star-rating { position: relative; display: inline-block; line-height: 1; white-space: nowrap; }
.star-rating-bg { display: block; color: rgba(var(--gold-rgb), 0.25); }
.star-rating-fg { position: absolute; top: 0; left: 0; overflow: hidden; white-space: nowrap; color: var(--gold); display: block; }
/* Override context color rules so bg stars are always dimmed */
.rating-pill .stars-row .star-rating-bg,
.rating-pill-sm .stars-row .star-rating-bg,
.rating-box .stars-row .star-rating-bg { color: rgba(var(--gold-rgb), 0.25); }
.rating-pill .stars-row .star-rating-fg,
.rating-pill-sm .stars-row .star-rating-fg,
.rating-box .stars-row .star-rating-fg { color: var(--gold); }

#summaryField{
    font-size:1rem;
}

.blue-card {
    background: linear-gradient(135deg, #060a10 0%, #0b1425 100%) !important;
    border: 1px solid var(--border-2) !important;
}