/* CivicLens — Dashboard Styles */
:root {
    --bg-primary: #0f1117;
    --bg-secondary: #1a1d27;
    --bg-card: #1e2130;
    --bg-card-hover: #252938;
    --text-primary: #e8eaed;
    --text-secondary: #9aa0b0;
    --text-muted: #6b7280;
    --accent: #4f8cff;
    --accent-hover: #6ba0ff;
    --accent-subtle: rgba(79, 140, 255, 0.1);
    --green: #34d399;
    --yellow: #fbbf24;
    --red: #f87171;
    --border: #2a2d3a;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

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

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 32px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand a {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
}

.nav-links {
    display: flex;
    gap: 24px;
}

.nav-links a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--text-primary);
}

/* Container */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 24px;
}

/* Page Header */
.page-header {
    margin-bottom: 32px;
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 40px;
}

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

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Sections */
.section {
    margin-bottom: 40px;
}

.section h2 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

/* Actions Grid */
.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.action-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: all 0.2s;
    display: block;
}

.action-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent);
    transform: translateY(-2px);
    color: inherit;
}

.action-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

.action-title {
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.action-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Bill List */
.bill-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bill-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: all 0.2s;
    display: block;
}

.bill-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent);
    transform: translateY(-1px);
    color: inherit;
}

.bill-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.bill-number {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--accent);
    font-family: 'SF Mono', 'Fira Code', monospace;
}

.bill-status {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-introduced { background: rgba(79, 140, 255, 0.15); color: var(--accent); }
.status-in_committee { background: rgba(251, 191, 36, 0.15); color: var(--yellow); }
.status-passed_chamber { background: rgba(52, 211, 153, 0.15); color: var(--green); }
.status-passed_both { background: rgba(52, 211, 153, 0.2); color: var(--green); }
.status-signed { background: rgba(52, 211, 153, 0.25); color: var(--green); }
.status-vetoed { background: rgba(248, 113, 113, 0.15); color: var(--red); }
.status-dead { background: rgba(107, 114, 128, 0.15); color: var(--text-muted); }

.bill-title {
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 8px;
    color: var(--text-primary);
    line-height: 1.4;
}

.bill-summary {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 12px;
    line-height: 1.5;
}

.bill-meta {
    display: flex;
    gap: 16px;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.bill-topics {
    font-style: italic;
}

/* Jurisdiction Grid */
.jurisdiction-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.jurisdiction-chip {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.jurisdiction-chip:hover {
    border-color: var(--accent);
    color: var(--text-primary);
    background: var(--bg-card-hover);
}

.chip-level {
    font-size: 0.65rem;
    text-transform: uppercase;
    background: var(--accent-subtle);
    color: var(--accent);
    padding: 1px 6px;
    border-radius: 10px;
}

/* Filters */
.filters-bar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 24px;
}

.filters-form {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-input, .filter-select {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    color: var(--text-primary);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}

.filter-input:focus, .filter-select:focus {
    border-color: var(--accent);
}

.filter-input {
    min-width: 200px;
}

.filter-select {
    min-width: 160px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent);
    color: white;
}
.btn-primary:hover {
    background: var(--accent-hover);
    color: white;
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
}
.btn-secondary:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}
.btn-ghost:hover {
    color: var(--text-primary);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.85rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 32px;
}

.page-info {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Bill Detail */
.bill-detail {
    max-width: 800px;
}

.bill-detail-header {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.bill-detail-meta {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
}

.bill-number-large {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent);
    font-family: 'SF Mono', 'Fira Code', monospace;
}

.bill-detail-header h1 {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 12px;
}

.bill-detail-submeta {
    display: flex;
    gap: 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.bill-section {
    margin-bottom: 28px;
}

.bill-section h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.bill-summary-full {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-primary);
}

.bill-impact {
    background: var(--accent-subtle);
    border-left: 3px solid var(--accent);
    padding: 16px 20px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 1rem;
    line-height: 1.6;
}

.topic-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.topic-tag {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 4px 12px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.bill-action-needed {
    background: rgba(251, 191, 36, 0.08);
    border: 1px solid rgba(251, 191, 36, 0.2);
    border-radius: var(--radius);
    padding: 20px;
}

.bill-action-needed h2 {
    color: var(--yellow);
}

.bill-raw {
    margin-top: 40px;
}

.bill-raw summary {
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.85rem;
}

.bill-raw pre {
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    padding: 16px;
    overflow-x: auto;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 8px;
}

.back-link {
    margin-top: 32px;
}

/* Results info */
.results-info {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 16px;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-secondary);
}

.empty-state p {
    margin-bottom: 8px;
}

.empty-state code {
    background: var(--bg-card);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
}

/* About page */
.about-content {
    max-width: 700px;
}

.about-section {
    margin-bottom: 40px;
}

.about-section h2 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.about-section p, .about-section li {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 8px;
}

.about-section ul {
    padding-left: 20px;
}

.how-it-works {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 16px;
}

.step {
    text-align: center;
    padding: 24px 16px;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-subtle);
    color: var(--accent);
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
}

.step-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.step-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.principles-list li {
    margin-bottom: 12px;
}

.principles-list strong {
    color: var(--text-primary);
}

/* Section footer */
.section-footer {
    margin-top: 16px;
    text-align: right;
}

/* Footer */
.footer {
    text-align: center;
    padding: 32px 24px;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--border);
    margin-top: 40px;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        padding: 12px 16px;
    }
    .nav-links {
        gap: 16px;
    }
    .container {
        padding: 20px 16px;
    }
    .page-header h1 {
        font-size: 1.5rem;
    }
    .stat-number {
        font-size: 2rem;
    }
    .filters-form {
        flex-direction: column;
    }
    .filter-input, .filter-select {
        width: 100%;
    }
}
