:root {
    --bg-color: #121212;
    --text-color: #f1f1f1;
    --hint-color: #a0a0a0;
    --link-color: #38bdf8;
    --button-color: #0284c7;
    --button-text-color: #ffffff;
    --secondary-bg-color: #1e1e24;
    --border-color: rgba(255, 255, 255, 0.15);
}
body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
}
.main-content {
    height: calc(100vh - 65px);
    overflow-y: auto;
    padding: 16px;
    padding-bottom: 20px;
    -webkit-overflow-scrolling: touch;
}
.card, .modal-content {
    background-color: var(--secondary-bg-color);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    border-radius: 12px;
}
.text-muted { color: var(--hint-color) !important; }
.text-info { color: #38bdf8 !important; }
.text-success { color: #4ade80 !important; }
.text-warning { color: #facc15 !important; }
.form-label, label { color: var(--text-color) !important; font-weight: 500; }
.form-control, .form-select {
    background-color: #18181b;
    border: 1px solid var(--border-color);
    color: #f1f1f1 !important;
    border-radius: 8px;
    min-height: 44px;
}
.form-control:focus, .form-select:focus {
    background-color: #18181b;
    color: #ffffff !important;
    border-color: var(--button-color);
    box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.3);
}
.form-select option {
    background-color: #1e1e24;
    color: #f1f1f1;
}
.modal-header, .modal-footer { border-color: var(--border-color); }
.btn-close { filter: invert(1) grayscale(100%) brightness(200%); }
.btn-primary { background-color: #0284c7; color: #ffffff; border: none; }
.btn-primary:hover { background-color: #0369a1; }
.btn-info { background-color: #0ea5e9; color: #ffffff; border: none; }
.btn-info:hover { background-color: #0284c7; }
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 65px;
    background-color: var(--secondary-bg-color);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
}
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--hint-color);
    text-decoration: none;
    font-size: 0.75rem;
    background: none;
    border: none;
    padding: 8px 12px;
    transition: color 0.2s;
}
.nav-item.active { color: #38bdf8; font-weight: bold; }
.nav-item span.icon { font-size: 1.25rem; margin-bottom: 2px; }
.table { color: var(--text-color); }
.table th, .table td { border-color: var(--border-color); background-color: transparent; color: var(--text-color); }
.login-card {
    max-width: 360px;
    margin: 16px auto;
    text-align: center;
    margin-top: 20vh;
}
.gps-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 16px;
}
.gps-tab {
    flex: 1;
    text-align: center;
    padding: 12px 10px;
    font-weight: 600;
    cursor: pointer;
    color: var(--hint-color);
    transition: all 0.2s;
    font-size: 0.9rem;
}
.gps-tab.active {
    border-bottom: 3px solid var(--button-color);
    color: var(--button-color);
}
.gps-content {
    display: none;
    animation: fadeIn 0.3s;
}
.gps-content.active {
    display: block;
}
.map-container {
    height: calc(100vh - 280px);
    min-height: 350px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background-color: #1e1e24;
}
#map {
    height: 100%;
    width: 100%;
    z-index: 1;
}
.leaflet-popup-content-wrapper, .leaflet-popup-tip {
    background-color: var(--secondary-bg-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}
@media (min-width: 900px) {
    body { display: flex; align-items: stretch; }
    .bottom-nav {
        position: static;
        order: -1;
        flex: 0 0 210px;
        width: 210px;
        height: 100vh;
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        gap: 4px;
        padding: 18px 10px;
        border-top: 0;
        border-right: 1px solid var(--border-color);
    }
    .nav-item {
        flex-direction: row;
        justify-content: flex-start;
        gap: 10px;
        font-size: 0.95rem;
        padding: 10px 14px;
        border-radius: 8px;
    }
    .nav-item.active { background-color: rgba(56, 189, 248, 0.12); }
    .nav-item span.icon { font-size: 1.15rem; margin-bottom: 0; }
    body .main-content {
        flex: 1 1 auto;
        min-width: 0;
        height: 100vh;
        padding: 24px 32px;
    }
    .main-content > * {
        max-width: 1500px;
        margin-left: auto;
        margin-right: auto;
    }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.install-offer { position: fixed; left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 2000;
    background: #262c22; color: #e8e4d0; border: 1px solid rgba(163,176,107,.55); border-radius: 14px; padding: 14px 14px 12px;
    box-shadow: 0 8px 28px rgba(0,0,0,.45); font-size: .92rem; line-height: 1.4; }
.install-offer.no-nav { bottom: calc(16px + env(safe-area-inset-bottom)); }
.install-offer .io-title { font-weight: 700; margin-bottom: 4px; }
.install-offer .io-text { color: #c9c6b3; }
.install-offer .io-step { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.install-offer .io-n { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%;
    background: #a3b06b; color: #1b1f18; font-weight: 700; font-size: .75rem; }
.install-offer .io-ic { width: 20px; height: 20px; color: #7fb4ff; vertical-align: middle; }
.install-offer .io-actions { display: flex; gap: 8px; margin-top: 12px; }
.install-offer button { flex: 1; border: 0; border-radius: 10px; padding: 10px 12px; font-weight: 600; }
.install-offer .io-main { background: #a3b06b; color: #1b1f18; }
.install-offer .io-later { background: rgba(255,255,255,.08); color: #e8e4d0; }
@media (min-width: 900px) {
    .install-offer { left: auto; right: 20px; bottom: 20px; width: 380px; }
}
