/* ADSBiq — Light theme only */
:root {
    --accent: #0066cc;
    --accent-dark: #004d99;
    --bg: #ffffff;
    --bg-alt: #f5f7fa;
    --text: #1a1a2e;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --card-shadow: 0 1px 3px rgba(0,0,0,0.08);
    --radius: 6px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.35;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navbar */
.navbar {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 38px;
}
.nav-brand {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    color: var(--text);
}
.brand-icon {
    background: var(--accent);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1px;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 14px;
}
.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.2s;
}
.nav-links a:hover { color: var(--accent); }
.nav-admin { color: var(--accent) !important; }
.nav-login {
    background: var(--accent);
    color: white !important;
    padding: 4px 10px;
    border-radius: 4px;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 8px 12px;
    flex: 1;
}

/* Hero */
.hero {
    text-align: center;
    padding: 14px 0 10px;
}
.hero h1 {
    font-size: 30px;
    line-height: 1.15;
    margin-bottom: 4px;
}
.accent { color: var(--accent); }
.hero-sub {
    font-size: 14px;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 8px;
}
.hero-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 14px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-primary {
    background: var(--accent);
    color: white;
}
.btn-primary:hover { background: var(--accent-dark); }
.btn-secondary {
    background: var(--bg-alt);
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-google {
    background: white;
    color: #444;
    border: 1px solid var(--border);
    padding: 8px 24px;
    font-size: 14px;
}
.btn-google:hover { border-color: #4285F4; }

/* Stats bar */
.stats-bar, .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 6px;
    margin: 8px 0;
}
.stat-card {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px;
    text-align: center;
}
.stat-card.large { padding: 12px; }
.stat-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent);
}
.stat-card.large .stat-value { font-size: 24px; }
.stat-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 1px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Feature grid */
.features { margin: 12px 0; }
.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}
.feature-card {
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
}
.feature-card h3 {
    font-size: 14px;
    margin-bottom: 2px;
}
.feature-card p {
    color: var(--text-muted);
    font-size: 13px;
}

/* How it works */
.how-it-works {
    margin: 12px 0;
    text-align: center;
}
.how-it-works h2 { margin-bottom: 8px; }
.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.step { text-align: center; }
.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 3px;
}
.step h4 { margin-bottom: 2px; font-size: 14px; }
.step p { color: var(--text-muted); font-size: 13px; }

/* CTA bottom */
.cta-bottom {
    text-align: center;
    padding: 12px 0;
    margin: 8px 0;
    background: var(--bg-alt);
    border-radius: var(--radius);
}
.cta-bottom h2 { margin-bottom: 3px; font-size: 20px; }
.cta-bottom p { color: var(--text-muted); margin-bottom: 6px; font-size: 14px; }

/* Page header */
.page-header {
    margin-bottom: 8px;
}
.page-header h1 {
    font-size: 22px;
    margin-bottom: 2px;
}
.page-header p { color: var(--text-muted); font-size: 13px; }

/* Code/pre */
pre, code {
    font-family: 'SF Mono', 'Fira Code', monospace;
}
.uuid-display {
    display: block;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px;
    font-size: 14px;
    text-align: center;
    margin: 6px 0;
    word-break: break-all;
    user-select: all;
}
.uuid-small {
    font-family: 'SF Mono', monospace;
    font-size: 12px;
    color: var(--text-muted);
}
.install-cmd {
    background: #1e293b;
    color: #e2e8f0;
    padding: 8px;
    border-radius: var(--radius);
    overflow-x: auto;
    margin: 4px 0;
}
.install-cmd code { color: #e2e8f0; font-size: 13px; }
.code-block {
    background: #1e293b;
    color: #e2e8f0;
    padding: 8px;
    border-radius: var(--radius);
    overflow-x: auto;
    font-size: 12px;
    line-height: 1.4;
}
.code-block code { color: #e2e8f0; }

/* Copy button on code blocks */
.install-cmd-wrap {
    position: relative;
}
.install-cmd-wrap .install-cmd {
    padding-right: 40px;
}
.copy-btn {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 4px;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    transition: all 0.2s;
}
.copy-btn:hover {
    background: rgba(255,255,255,0.1);
    color: white;
    border-color: rgba(255,255,255,0.4);
}

/* Feeding status indicator */
.feed-status {
    position: fixed;
    bottom: 10px;
    left: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.95);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    z-index: 50;
}
.feed-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    50% { opacity: 0.6; box-shadow: 0 0 0 4px rgba(16, 185, 129, 0); }
}

/* Forms */
.join-form {
    max-width: 480px;
}
.form-group {
    margin-bottom: 6px;
}
.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 2px;
    color: var(--text);
}
.form-group input {
    width: 100%;
    padding: 5px 8px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 13px;
    background: var(--bg);
}
.form-group input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(0,102,204,0.1);
}
.form-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

/* Join page */
.join-options { margin: 8px 0; }
.join-card {
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin: 6px 0;
}
.join-card h2 { margin-bottom: 4px; font-size: 18px; }
.divider {
    text-align: center;
    margin: 8px 0;
    color: var(--text-muted);
}
.divider span {
    background: var(--bg);
    padding: 0 12px;
    position: relative;
}
.note {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}
.links-row {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}
.success-box {
    border: 2px solid #10b981;
    border-radius: var(--radius);
    padding: 20px;
    background: #f0fdf4;
}
.success-box h2 { color: #059669; }

/* Requirements */
.requirements {
    margin: 8px 0;
    padding: 8px 10px;
    background: var(--bg-alt);
    border-radius: var(--radius);
}
.requirements ul {
    margin: 3px 0 3px 18px;
}
.requirements li {
    margin-bottom: 2px;
    color: var(--text-muted);
    font-size: 13px;
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0;
    font-size: 13px;
}
.data-table th {
    text-align: left;
    padding: 4px 8px;
    background: var(--bg-alt);
    border-bottom: 2px solid var(--border);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}
.data-table td {
    padding: 3px 8px;
    border-bottom: 1px solid var(--border);
}
.data-table tr:hover { background: var(--bg-alt); }
.data-table .empty {
    text-align: center;
    color: var(--text-muted);
    padding: 8px;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}
.badge-active { background: #dcfce7; color: #166534; }
.badge-inactive { background: #fee2e2; color: #991b1b; }

/* API docs */
.endpoint {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}
.endpoint-method {
    background: #10b981;
    color: white;
    padding: 1px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}
.endpoint-path {
    font-family: 'SF Mono', monospace;
    font-size: 13px;
    color: var(--accent);
    flex-shrink: 0;
}
.endpoint p {
    width: 100%;
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 13px;
    padding-left: 54px;
}
.api-auth, .api-endpoints, .api-response, .api-limits,
.api-section, .info-section, .feeder-charts, .link-account {
    margin: 8px 0;
}

/* Map embed */
.map-frame { margin: 8px 0; }

/* Login page */
.login-page {
    text-align: center;
    max-width: 400px;
    margin: 40px auto;
}
.login-page h1 { margin-bottom: 6px; }
.login-page p { color: var(--text-muted); margin-bottom: 8px; font-size: 14px; }
.login-page .btn-google { margin-top: 8px; }

/* Empty state */
.empty-state {
    text-align: center;
    padding: 12px;
    color: var(--text-muted);
    background: var(--bg-alt);
    border-radius: var(--radius);
    font-size: 13px;
}

/* Feeder info */
.feeder-location {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 8px;
}

/* Footer */
.footer {
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    padding: 8px;
    margin-top: auto;
}
.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}
.footer p { color: var(--text-muted); font-size: 12px; }
.footer-links { margin-top: 4px; }
.footer-links a { color: var(--accent); text-decoration: none; font-size: 12px; }

/* Legal pages */
.legal-content {
    max-width: 800px;
    line-height: 1.6;
}
.legal-content h2 {
    font-size: 16px;
    margin: 12px 0 4px;
    padding-top: 6px;
    border-top: 1px solid var(--border);
}
.legal-content h2:first-child {
    border-top: none;
    margin-top: 0;
    padding-top: 0;
}
.legal-content h3 {
    font-size: 14px;
    margin: 8px 0 2px;
}
.legal-content p {
    color: var(--text);
    margin-bottom: 4px;
    font-size: 13px;
}
.legal-content ul {
    margin: 2px 0 6px 18px;
}
.legal-content li {
    margin-bottom: 2px;
    font-size: 13px;
    color: var(--text);
}
.legal-content a {
    color: var(--accent);
}
.footer-legal {
    margin-top: 2px;
    font-size: 11px !important;
}
.footer-legal a {
    color: var(--text-muted) !important;
    font-size: 11px;
}
.footer-legal a:hover {
    color: var(--accent) !important;
}
.footer-attrib {
    margin-top: 4px;
    font-size: 10px !important;
    opacity: 0.7;
}
.footer-attrib a {
    color: var(--text-muted) !important;
    font-size: 10px;
}
.footer-attrib a:hover {
    color: var(--accent) !important;
}

/* Leaderboard */
.leaderboard-table .rank-col {
    font-weight: 700;
    color: var(--accent);
}
.leaderboard-table a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}
.leaderboard-table a:hover {
    text-decoration: underline;
}

/* Ticket status badges */
.badge-ticket-open { background: #dbeafe; color: #1e40af; }
.badge-ticket-in_progress { background: #fef3c7; color: #92400e; }
.badge-ticket-resolved { background: #dcfce7; color: #166534; }
.badge-ticket-closed { background: #f3f4f6; color: #6b7280; }

/* Ticket category badges */
.badge-cat-bug { background: #fee2e2; color: #991b1b; }
.badge-cat-feature { background: #ede9fe; color: #5b21b6; }
.badge-cat-question { background: #dbeafe; color: #1e40af; }

/* Ticket count badge in nav */
.nav-tickets { position: relative; }
.ticket-count-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
}

/* Ticket form */
.ticket-form { max-width: 600px; }
.ticket-form textarea {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
    background: var(--bg);
}
.ticket-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(0,102,204,0.1);
}
.form-select {
    width: 100%;
    padding: 5px 8px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 13px;
    background: var(--bg);
}
.form-select:focus {
    outline: none;
    border-color: var(--accent);
}

/* Ticket thread */
.thread { margin: 12px 0; }
.thread-msg {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 12px;
    margin-bottom: 8px;
}
.thread-author-admin {
    border-left: 3px solid var(--accent);
    background: #f0f7ff;
}
.thread-author-feeder {
    border-left: 3px solid #10b981;
}
.thread-msg-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    font-size: 12px;
}
.thread-msg-header strong { font-size: 13px; }
.thread-time { color: var(--text-muted); font-size: 11px; }
.thread-msg-body {
    font-size: 13px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Ticket meta */
.ticket-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-muted);
}
.ticket-meta-item { display: inline-flex; align-items: center; gap: 4px; }

/* Reply section */
.reply-section {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}
.reply-section h3 { margin-bottom: 6px; font-size: 15px; }

/* Filter tabs */
.filter-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.filter-tab {
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    color: var(--text-muted);
    background: var(--bg-alt);
    border: 1px solid var(--border);
    transition: all 0.2s;
}
.filter-tab:hover { border-color: var(--accent); color: var(--accent); }
.filter-tab.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* Flash messages */
.flash-msg {
    padding: 8px 12px;
    border-radius: var(--radius);
    font-size: 13px;
    margin-bottom: 8px;
}
.flash-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.flash-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

/* Watchlist form */
.watchlist-form .form-select {
    padding: 5px 8px;
    font-size: 13px;
    height: 30px;
}
.watchlist-form input {
    height: 30px;
}

/* Coverage radar container */
#coverageRadar {
    max-height: 350px;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 { font-size: 24px; }
    .feature-grid { grid-template-columns: 1fr; }
    .steps { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .hero-actions { flex-direction: column; align-items: center; }
    .nav-links { gap: 10px; }
    .endpoint p { padding-left: 0; }
}
