/* === EUROPEAN ROBOTAXI MAP — STYLE.CSS === */
/* Fixed: separate vars for text vs surfaces, proper section contrast, working dark mode */

:root {
    /* Text colors — never used as backgrounds */
    --text: #1e293b;
    --text-muted: #64748b;
    --text-light: #94a3b8;

    /* Surface colors — backgrounds only */
    --surface: #ffffff;
    --surface-alt: #f1f5f9;
    --surface-card: #ffffff;
    --header-bg: #1e293b;
    --footer-bg: #1e293b;

    /* Brand */
    --blue: #2563eb;
    --blue-light: #dbeafe;
    --green: #16a34a;
    --green-light: #dcfce7;
    --red: #dc2626;
    --red-light: #fee2e2;
    --amber: #f59e0b;
    --amber-light: #fef3c7;
    --gray: #64748b;

    /* Misc */
    --border: #e2e8f0;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --radius: 8px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --text: #e2e8f0;
        --text-muted: #94a3b8;
        --text-light: #64748b;
        --surface: #0f172a;
        --surface-alt: #1e293b;
        --surface-card: #1e293b;
        --header-bg: #0f172a;
        --footer-bg: #0a0a16;
        --border: #334155;
        --shadow: 0 2px 8px rgba(0,0,0,0.3);
    }
    body { background: var(--surface); color: var(--text); }
    .hero { background: linear-gradient(135deg, #0f172a, #1e293b); }
    input, select, textarea {
        background: #334155; color: var(--text); border-color: #475569;
    }
    .hero-search input { background: #334155; color: var(--text); }
    .data-table th { background: var(--surface-alt); }
    .data-table tr:nth-child(even) { background: var(--surface-alt); }
    .map-section { background: var(--surface-alt); }
    .section.bg-alt { background: var(--surface-alt); }
    footer { background: var(--footer-bg); }
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--surface);
    color: var(--text);
    line-height: 1.6;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }

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

/* === HEADER === */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--header-bg);
    box-shadow: var(--shadow);
}
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
}
.logo {
    font-size: 1.3rem;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
}
.logo-accent { color: var(--blue); }
nav { display: flex; gap: 1.25rem; }
.nav-link {
    text-decoration: none;
    color: #cbd5e1;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}
.nav-link:hover { color: var(--blue); }

@media (max-width: 768px) { nav { display: none; } }

/* === BUTTONS === */
.btn {
    padding: 0.6rem 1.4rem;
    border: none;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: #1d4ed8; }
.btn-secondary { background: transparent; color: var(--blue); border: 1px solid var(--blue); }
.btn-secondary:hover { background: var(--blue-light); }
.btn-full { width: 100%; padding: 0.75rem; }

/* === HERO === */
.hero {
    background: linear-gradient(135deg, var(--header-bg), #334155);
    color: #fff;
    padding: 3rem 1rem 2.5rem;
    text-align: center;
}
.hero h1 { font-size: 2.2rem; font-weight: 700; margin-bottom: 0.5rem; }
.highlight { color: var(--blue); }
.version {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(255,255,255,0.1);
    padding: 0.1em 0.4em;
    border-radius: 3px;
    margin-left: 0.2em;
    vertical-align: middle;
    display: inline-flex;
    align-items: center;
}
.hero-sub { font-size: 1.1rem; color: #cbd5e1; margin-bottom: 1.5rem; }
/* === VERSION BADGE === */
.version-badge {
    position: fixed;
    top: 1rem;
    left: 1rem;
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(255,255,255,0.15);
    color: #fff;
    padding: 0.15em 0.4em;
    border-radius: 3px;
    z-index: 1000;
    pointer-events: none;
}
.hero-search { display: flex; gap: 0.5rem; max-width: 500px; margin: 0 auto 2rem; }
.hero-search input {
    flex: 1; padding: 0.7rem 1rem; border: 1px solid #475569;
    border-radius: var(--radius); font-size: 1rem; background: #334155; color: #fff;
}
.hero-search input::placeholder { color: #94a3b8; }
.hero-stats { display: flex; justify-content: center; gap: 2.5rem; flex-wrap: wrap; }
.stat { text-align: center; }
.stat-num { display: block; font-size: 1.8rem; font-weight: 700; color: var(--blue); }
.stat-label { font-size: 0.85rem; color: #94a3b8; }

@media (max-width: 600px) {
    .hero h1 { font-size: 1.6rem; }
    .hero-search { flex-direction: column; }
    .hero-stats { gap: 1.5rem; }
}

/* === MONITOR === */
.monitor-widget {
    background: var(--surface-alt);
    padding: 2rem 1rem;
    border-bottom: 1px solid var(--border);
}
.monitor-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.monitor-card {
    background: var(--surface-card);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
}
.monitor-card h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}
.monitor-big-num { font-size: 2.5rem; font-weight: 700; color: var(--blue); }
.monitor-desc { font-size: 0.85rem; color: var(--text-muted); }
.monitor-list { text-align: left; }
.monitor-list-item {
    display: flex;
    justify-content: space-between;
    padding: 0.35rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}
.monitor-list-item:last-child { border-bottom: none; }
.monitor-updated { text-align: center; font-size: 0.8rem; color: var(--text-muted); margin-top: 1rem; }

@media (max-width: 768px) { .monitor-grid { grid-template-columns: 1fr; } }

/* === SECTIONS === */
.section { padding: 2.5rem 1rem; }
.section.bg-alt { background: var(--surface-alt); }
.section h2 { font-size: 1.6rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--text); }
.section-sub { color: var(--text-muted); margin-bottom: 1.5rem; font-size: 0.95rem; }
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.link-more { color: var(--blue); text-decoration: none; font-size: 0.9rem; font-weight: 600; }
.link-more:hover { text-decoration: underline; }

/* === MAP === */
.map-section { padding: 2rem 1rem; background: var(--surface); }
.map-section h2 { margin-bottom: 1rem; color: var(--text); }
.map-controls {
    display: flex; gap: 0.75rem; margin-bottom: 1rem; flex-wrap: wrap; align-items: center;
}
.map-controls select {
    padding: 0.5rem 0.8rem; border: 1px solid var(--border);
    border-radius: var(--radius); font-size: 0.9rem; background: var(--surface-card); color: var(--text);
}
.result-count { font-size: 0.85rem; color: var(--text-muted); }
.leaflet-map {
    height: 500px; width: 100%; border-radius: var(--radius);
    box-shadow: var(--shadow); z-index: 1;
}

@media (max-width: 600px) { .leaflet-map { height: 350px; } }

/* === DEPLOYMENTS GRID === */
.deals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}
.deal-card {
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    transition: box-shadow 0.2s;
}
.deal-card:hover { box-shadow: var(--shadow); }
.deal-status {
    display: inline-block; font-size: 0.75rem; font-weight: 600;
    color: #fff; padding: 0.15rem 0.5rem; border-radius: 4px; margin-bottom: 0.5rem;
}
.deal-status.testing { background: var(--blue); }
.deal-status.deployed { background: var(--green); }
.deal-status.commercial { background: var(--red); }
.deal-status.planning { background: var(--amber); }
.deal-company { font-size: 1rem; font-weight: 600; margin-bottom: 0.25rem; color: var(--text); }
.deal-location { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.25rem; }
.deal-vehicle { font-size: 0.85rem; color: var(--text); margin-bottom: 0.5rem; }
.deal-link { font-size: 0.85rem; color: var(--blue); text-decoration: none; font-weight: 600; }
.deal-link:hover { text-decoration: underline; }

/* === FILTER BAR === */
.filter-bar { margin-bottom: 1.5rem; }
.filter-bar input {
    width: 100%; padding: 0.7rem 1rem; border: 1px solid var(--border);
    border-radius: var(--radius); font-size: 1rem; margin-bottom: 0.75rem;
    background: var(--surface-card); color: var(--text);
}
.filter-bar input::placeholder { color: var(--text-light); }
.filter-controls { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.filter-controls select {
    padding: 0.5rem 0.8rem; border: 1px solid var(--border);
    border-radius: var(--radius); font-size: 0.9rem; background: var(--surface-card); color: var(--text);
}

/* === DATA TABLE === */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.data-table th {
    background: var(--surface-alt); padding: 0.6rem 0.5rem; text-align: left;
    font-weight: 600; border-bottom: 2px solid var(--border); white-space: nowrap;
    color: var(--text);
}
.data-table td { padding: 0.5rem; border-bottom: 1px solid var(--border); white-space: nowrap; color: var(--text); }
.data-table tr:nth-child(even) { background: var(--surface-alt); }
.data-table tr:hover { background: var(--blue-light); }
.data-table .company-cell { font-weight: 600; color: var(--blue); }
.status-badge {
    display: inline-block; font-size: 0.75rem; font-weight: 600;
    padding: 0.1rem 0.4rem; border-radius: 4px;
}
.status-badge.testing { background: var(--blue-light); color: var(--blue); }
.status-badge.deployed { background: var(--green-light); color: var(--green); }
.status-badge.commercial { background: var(--red-light); color: var(--red); }
.status-badge.planning { background: var(--amber-light); color: var(--amber); }
.status-badge.suspended { background: #f1f5f9; color: var(--gray); }

.no-results { text-align: center; padding: 2rem; color: var(--text-muted); }
.reg-note { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.5rem; }

/* === SUBMIT FORM === */
.submit-form {
    max-width: 600px; background: var(--surface-card);
    padding: 1.5rem; border-radius: var(--radius); box-shadow: var(--shadow);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.3rem; color: var(--text); }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 0.6rem 0.8rem; border: 1px solid var(--border);
    border-radius: var(--radius); font-size: 0.95rem; font-family: inherit;
    background: var(--surface); color: var(--text);
}
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--text-light); }
.form-status { margin-top: 0.75rem; font-size: 0.9rem; font-weight: 600; }
.form-status.success { color: var(--green); }
.form-status.error { color: var(--red); }

/* === PAGINATION === */
.pagination-controls {
    display: flex; flex-direction: column; align-items: center; gap: 0.75rem;
    margin-top: 1.25rem; padding-bottom: 0.5rem;
}
.page-info { font-size: 0.85rem; color: var(--text-muted); }
.page-buttons { display: flex; gap: 0.5rem; }
.btn-sm { padding: 0.4rem 1rem; font-size: 0.85rem; }

/* === CAPTCHA === */
.captcha-group { margin-top: 0.5rem; }
.captcha-group label { font-weight: 600; }
#mathQuestion { color: var(--blue); font-weight: 700; font-size: 1.05rem; }

/* === ABOUT === */
.about-content { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
@media (max-width: 768px) { .about-content { grid-template-columns: 1fr; } }
.about-card {
    background: var(--surface-card); padding: 1.5rem;
    border-radius: var(--radius); box-shadow: var(--shadow);
}
.about-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; color: var(--blue); }
.about-card p { font-size: 0.9rem; color: var(--text-muted); }

/* === FOOTER === */
footer { background: var(--footer-bg); color: #cbd5e1; padding: 2rem 1rem 1rem; margin-top: 2rem; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; margin-bottom: 1.5rem; }
@media (max-width: 768px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
.footer-col h4 {
    font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.5px;
    margin-bottom: 0.75rem; color: #fff;
}
.footer-col a {
    display: block; color: #94a3b8; text-decoration: none;
    font-size: 0.85rem; padding: 0.2rem 0; transition: color 0.2s;
}
.footer-col a:hover { color: #fff; }
.footer-bottom {
    border-top: 1px solid #475569; padding-top: 1rem;
    font-size: 0.8rem; color: #64748b; text-align: center;
}