/* =============================================================================
   CHAMBERTRADES — MAIN STYLESHEET
   assets/css/main.css
   ============================================================================= */

/* -----------------------------------------------------------------------------
   1. CSS VARIABLES (design tokens)
   ----------------------------------------------------------------------------- */
:root {
    /* Colors */
    --bg-base:         #0a0c10;   /* page background */
    --bg-surface:      #0f1318;   /* card / panel background */
    --bg-elevated:     #161b24;   /* elevated surfaces, table rows */
    --bg-hover:        #1c2330;   /* hover state */
    --border:          #1e2533;   /* subtle borders */
    --border-bright:   #2a3447;   /* more visible borders */

    /* Text */
    --text-primary:    #e8edf5;   /* headings, important content */
    --text-secondary:  #8a95a8;   /* labels, secondary info */
    --text-muted:      #4a5568;   /* placeholder, disabled */

    /* Accents */
    --accent:          #00d4ff;   /* primary accent — electric cyan */
    --accent-dim:      #0099bb;   /* darker cyan for hover */
    --accent-glow:     rgba(0, 212, 255, 0.15);
    --amber:           #f59e0b;   /* conflict flag, warnings */
    --amber-dim:       rgba(245, 158, 11, 0.12);
    --green:           #10b981;   /* positive returns, buy */
    --green-dim:       rgba(16, 185, 129, 0.12);
    --red:             #ef4444;   /* negative returns, sell */
    --red-dim:         rgba(239, 68, 68, 0.12);

    /* Typography */
    --font-mono:       'Space Mono', 'Courier New', monospace;
    --font-sans:       'DM Sans', system-ui, sans-serif;

    /* Sizing */
    --header-height:   60px;
    --max-width:       1280px;
    --radius-sm:       4px;
    --radius-md:       8px;
    --radius-lg:       12px;

    /* Transitions */
    --transition:      150ms ease;
}

/* -----------------------------------------------------------------------------
   2. RESET & BASE
   ----------------------------------------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    line-height: 1.6;
    min-height: 100vh;
    /* Subtle grid texture */
    background-image:
        linear-gradient(rgba(0, 212, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.02) 1px, transparent 1px);
    background-size: 40px 40px;
}

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

a:hover { color: var(--accent-dim); }

img { max-width: 100%; display: block; }

/* -----------------------------------------------------------------------------
   3. TYPOGRAPHY
   ----------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-sans);
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; }

.mono { font-family: var(--font-mono); }

.text-accent   { color: var(--accent); }
.text-amber    { color: var(--amber); }
.text-green    { color: var(--green); }
.text-red      { color: var(--red); }
.text-muted    { color: var(--text-muted); }
.text-secondary{ color: var(--text-secondary); }

/* -----------------------------------------------------------------------------
   4. LAYOUT
   ----------------------------------------------------------------------------- */
.site-main {
    min-height: calc(100vh - var(--header-height));
    padding-top: var(--header-height);
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.page-header {
    padding: 48px 0 32px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 32px;
}

.page-header h1 {
    font-family: var(--font-mono);
    font-size: 1.75rem;
    letter-spacing: -0.02em;
}

.page-header h1 .accent { color: var(--accent); }

.page-header p {
    color: var(--text-secondary);
    margin-top: 8px;
    font-size: 0.9375rem;
}

/* -----------------------------------------------------------------------------
   5. SITE HEADER / NAV
   ----------------------------------------------------------------------------- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(10, 12, 16, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 32px;
}

/* Logo */
.logo {
    font-family: var(--font-mono);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    white-space: nowrap;
    letter-spacing: -0.01em;
    flex-shrink: 0;
}

.logo:hover { color: var(--text-primary); }

.logo-bracket { color: var(--text-muted); }
.logo-accent  { color: var(--accent); }
.logo-sm      { font-size: 0.9rem; }

/* Primary nav */
.primary-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.nav-link {
    padding: 6px 12px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: color var(--transition), background var(--transition);
    text-decoration: none;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.nav-link.active {
    color: var(--accent);
    background: var(--accent-glow);
}

/* Auth controls */
.header-auth {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Mobile toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    margin-left: auto;
}

.mobile-menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-secondary);
    border-radius: 2px;
    transition: var(--transition);
}

/* Mobile nav */
.mobile-nav {
    display: none;
    flex-direction: column;
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
    padding: 12px 0;
}

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

.mobile-nav-link {
    padding: 10px 24px;
    font-size: 0.9375rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition), background var(--transition);
}

.mobile-nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.mobile-nav-divider {
    height: 1px;
    background: var(--border);
    margin: 8px 0;
}

/* -----------------------------------------------------------------------------
   6. BUTTONS
   ----------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    font-family: var(--font-sans);
    font-size: 0.8125rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition);
    white-space: nowrap;
    line-height: 1;
}

/* Primary — filled cyan */
.btn-primary {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
}

.btn-primary:hover {
    background: var(--accent-dim);
    border-color: var(--accent-dim);
    color: #000;
}

/* Ghost — outlined */
.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--border-bright);
}

.btn-ghost:hover {
    color: var(--text-primary);
    border-color: var(--text-muted);
    background: var(--bg-hover);
}

/* Upgrade — amber */
.btn-upgrade {
    background: var(--amber-dim);
    color: var(--amber);
    border-color: rgba(245, 158, 11, 0.3);
}

.btn-upgrade:hover {
    background: rgba(245, 158, 11, 0.2);
    color: var(--amber);
}

/* Large button variant */
.btn-lg {
    padding: 12px 28px;
    font-size: 0.9375rem;
    border-radius: var(--radius-md);
}

/* Full width */
.btn-block {
    width: 100%;
    justify-content: center;
}

/* -----------------------------------------------------------------------------
   7. CARDS & PANELS
   ----------------------------------------------------------------------------- */
.card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.card-title {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Stat card */
.stat-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
}

.stat-value {
    font-family: var(--font-mono);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.stat-sub {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-top: 6px;
}

/* -----------------------------------------------------------------------------
   8. DATA TABLES
   ----------------------------------------------------------------------------- */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-surface);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

thead tr {
    border-bottom: 1px solid var(--border-bright);
    background: var(--bg-elevated);
}

thead th {
    padding: 12px 16px;
    text-align: left;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

/* Sticky header clone — injected by JS, floats above the table on scroll */
#stickyHeader {
    display: none;
    position: fixed;
    z-index: 100;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-bright);
    border-top: 1px solid var(--border);
    overflow: hidden;
    pointer-events: none;
}

#stickyHeader table {
    border-collapse: collapse;
    table-layout: fixed;
}

#stickyHeader th {
    padding: 12px 16px;
    text-align: left;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    white-space: nowrap;
    background: var(--bg-elevated);
}

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

thead th.sortable:hover { color: var(--text-secondary); }

tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
}

tbody tr:last-child { border-bottom: none; }

tbody tr:hover { background: var(--bg-hover); }

tbody td {
    padding: 11px 16px;
    color: var(--text-primary);
    white-space: nowrap;
}

/* Locked/upgrade row */
.row-locked {
    position: relative;
    pointer-events: none;
}

.row-locked td {
    filter: blur(4px);
    user-select: none;
    opacity: 0.4;
}

.upgrade-row-banner {
    text-align: center;
    padding: 20px;
    background: linear-gradient(to bottom, transparent, var(--bg-surface) 40%);
    border-top: 1px solid var(--border));
}

.upgrade-row-banner p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 12px;
}

/* Ticker cell */
.ticker {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.04em;
}

/* Transaction type badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    font-size: 0.6875rem;
    font-weight: 600;
    font-family: var(--font-mono);
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.badge-buy  { background: var(--green-dim); color: var(--green); }
.badge-sell { background: var(--red-dim);   color: var(--red);   }
.badge-exchange { background: var(--accent-glow); color: var(--accent); }

/* Conflict flag */
.conflict-flag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.6875rem;
    font-weight: 600;
    font-family: var(--font-mono);
    color: var(--amber);
    background: var(--amber-dim);
    border: 1px solid rgba(245, 158, 11, 0.2);
    padding: 3px 7px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Party indicators */
.party-d { color: #60a5fa; }
.party-r { color: #f87171; }
.party-i { color: var(--text-secondary); }

/* Score cells */
.score-positive { color: var(--green); font-family: var(--font-mono); }
.score-negative { color: var(--red);   font-family: var(--font-mono); }
.score-neutral  { color: var(--text-secondary); font-family: var(--font-mono); }

/* -----------------------------------------------------------------------------
   9. FILTERS BAR
   ----------------------------------------------------------------------------- */
.filters-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    padding: 16px 20px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

/* Form controls */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
select,
textarea {
    background: var(--bg-elevated);
    border: 1px solid var(--border-bright);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.875rem;
    padding: 8px 12px;
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
    width: 100%;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%234a5568' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 32px;
}

/* Locked filter (free tier) */
.filter-locked {
    position: relative;
    opacity: 0.5;
    pointer-events: none;
}

.filter-locked::after {
    content: '🔒';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
}

/* -----------------------------------------------------------------------------
   10. PAGINATION
   ----------------------------------------------------------------------------- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    margin-top: 0;
}

.pagination-info {
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 4px;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    font-size: 0.8125rem;
    font-family: var(--font-mono);
    color: var(--text-secondary);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition);
}

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

.page-btn.active {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-glow);
}

.page-btn:disabled,
.page-btn.disabled {
    opacity: 0.3;
    pointer-events: none;
}

/* Upgrade gate on pagination */
.pagination-gate {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.pagination-gate .btn { font-size: 0.75rem; }

/* -----------------------------------------------------------------------------
   11. AUTH PAGES (login / signup)
   ----------------------------------------------------------------------------- */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - var(--header-height));
    padding: 40px 24px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
}

.auth-card h1 {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    margin-bottom: 6px;
}

.auth-card .auth-sub {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 32px;
}

.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

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

.form-success {
    font-size: 0.8125rem;
    color: var(--green);
    margin-top: 6px;
}

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

/* Alert boxes */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    margin-bottom: 20px;
    border: 1px solid transparent;
}

.alert-error   { background: var(--red-dim);   color: var(--red);   border-color: rgba(239,68,68,0.2); }
.alert-success { background: var(--green-dim); color: var(--green); border-color: rgba(16,185,129,0.2); }
.alert-info    { background: var(--accent-glow); color: var(--accent); border-color: rgba(0,212,255,0.2); }
.alert-warning { background: var(--amber-dim); color: var(--amber); border-color: rgba(245,158,11,0.2); }

/* -----------------------------------------------------------------------------
   12. TIER GATE BANNER
   ----------------------------------------------------------------------------- */
.tier-gate {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 48px 24px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin: 24px 0;
}

.tier-gate-icon {
    font-size: 2rem;
    margin-bottom: 16px;
}

.tier-gate h3 {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.tier-gate p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    max-width: 380px;
    margin-bottom: 24px;
}

/* -----------------------------------------------------------------------------
   13. POLITICIAN CARDS
   ----------------------------------------------------------------------------- */
.politician-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.politician-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    transition: border-color var(--transition), background var(--transition);
}

.politician-card:hover {
    border-color: var(--border-bright);
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.politician-photo {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--bg-elevated);
    border: 2px solid var(--border);
    flex-shrink: 0;
}

.politician-photo-placeholder {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--bg-elevated);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

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

.politician-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.politician-meta {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* -----------------------------------------------------------------------------
   14. PRICING PAGE
   ----------------------------------------------------------------------------- */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 960px;
    margin: 0 auto;
}

.pricing-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    display: flex;
    flex-direction: column;
}

.pricing-card.featured {
    border-color: var(--accent);
    background: linear-gradient(180deg, rgba(0,212,255,0.05) 0%, var(--bg-surface) 100%);
    position: relative;
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: #000;
    font-size: 0.6875rem;
    font-weight: 700;
    font-family: var(--font-mono);
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

.pricing-tier {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.pricing-price {
    font-family: var(--font-mono);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 4px;
}

.pricing-price span {
    font-size: 1rem;
    color: var(--text-secondary);
}

.pricing-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.pricing-features {
    list-style: none;
    margin-bottom: 32px;
    flex: 1;
}

.pricing-features li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    padding: 6px 0;
}

.pricing-features li::before {
    content: '✓';
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 2px;
}

.pricing-features li.locked {
    opacity: 0.4;
}

.pricing-features li.locked::before {
    content: '—';
    color: var(--text-muted);
}

/* -----------------------------------------------------------------------------
   15. SITE FOOTER
   ----------------------------------------------------------------------------- */
.site-footer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
    margin-top: 80px;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 48px 24px 40px;
    display: flex;
    gap: 48px;
    justify-content: space-between;
}

.footer-brand {
    max-width: 220px;
}

.footer-tagline {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 10px;
    line-height: 1.5;
}

.footer-nav {
    display: flex;
    gap: 48px;
}

.footer-nav-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-nav-heading {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 4px;
}

.footer-nav-link {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition);
}

.footer-nav-link:hover { color: var(--text-primary); }

.footer-bottom {
    border-top: 1px solid var(--border);
    padding: 16px 24px;
}

.footer-bottom-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-copy {
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.footer-disclaimer {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: right;
}

/* -----------------------------------------------------------------------------
   16. UTILITY CLASSES
   ----------------------------------------------------------------------------- */
.flex         { display: flex; }
.flex-center  { display: flex; align-items: center; justify-content: center; }
.items-center { align-items: center; }
.gap-8        { gap: 8px; }
.gap-16       { gap: 16px; }
.gap-24       { gap: 24px; }
.mt-8         { margin-top: 8px; }
.mt-16        { margin-top: 16px; }
.mt-24        { margin-top: 24px; }
.mt-32        { margin-top: 32px; }
.mb-16        { margin-bottom: 16px; }
.mb-24        { margin-bottom: 24px; }
.w-full       { width: 100%; }
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.truncate     { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hidden       { display: none; }

/* Divider */
.divider {
    height: 1px;
    background: var(--border);
    margin: 24px 0;
}

/* Loading spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-bright);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Empty state */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.875rem;
}

/* Locked column — blurred with upgrade overlay */
.col-locked {
    position: relative;
    user-select: none;
    pointer-events: none;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.8125rem;
}

.col-locked-inner {
    filter: blur(5px);
    display: inline-block;
}

th.col-locked-header {
    position: relative;
    color: var(--text-muted);
    white-space: nowrap;
}

th.col-locked-header .lock-icon {
    font-size: 0.625rem;
    margin-left: 4px;
    opacity: 0.6;
}

/* Upgrade gate on last visible row */
.table-upgrade-gate {
    position: relative;
    text-align: center;
    padding: 0;
    border-top: 1px solid var(--border);
}

.table-upgrade-gate td {
    padding: 0 !important;
}

.table-upgrade-gate-inner {
    padding: 36px 24px 40px;
    background: linear-gradient(to bottom, transparent, var(--bg-surface) 50%);
}

/* -----------------------------------------------------------------------------
   17. RESPONSIVE
   ----------------------------------------------------------------------------- */
@media (max-width: 1024px) {
    .pricing-grid { grid-template-columns: 1fr 1fr; }
    .pricing-card:last-child { grid-column: 1 / -1; max-width: 400px; margin: 0 auto; width: 100%; }
}

@media (max-width: 768px) {
    .primary-nav  { display: none; }
    .header-auth  { display: none; }
    .mobile-menu-toggle { display: flex; }

    .footer-inner { flex-direction: column; gap: 32px; }
    .footer-nav   { flex-wrap: wrap; gap: 32px; }

    .pricing-grid { grid-template-columns: 1fr; }
    .pricing-card:last-child { grid-column: auto; max-width: 100%; }

    .politician-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

    .pagination { flex-direction: column; gap: 12px; text-align: center; }

    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }
}

@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .auth-card  { padding: 28px 20px; }
    .filters-bar { padding: 12px 16px; }
}
/* Top scrollbar — synced horizontal scroll mirror above the table */
#topScrollbar {
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    border: 1px solid var(--border);
}

#topScrollbar::-webkit-scrollbar {
    height: 8px;
}

#topScrollbar::-webkit-scrollbar-track {
    background: var(--bg-surface);
    border-radius: var(--radius-sm);
}

#topScrollbar::-webkit-scrollbar-thumb {
    background: var(--border-bright);
    border-radius: var(--radius-sm);
}

#topScrollbar::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}