﻿/* =========================================================
   THEME / TOKENS
========================================================= */
:root {
    --bg: #F7F7F8; /* page background */
    --ink: #000000; /* headings / primary text */
    --charcoal: #2A2D34; /* brand dark / buttons / header */
    --line: rgba(0,0,0,.08);
    --line-strong: rgba(0,0,0,.10);
    --shadow: 0 12px 32px rgba(0,0,0,.08);
    --shadow-card: 0 12px 32px rgba(0,0,0,.06);
    --radius: 16px;
}

/* =========================================================
   BASE
========================================================= */
* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    background: radial-gradient(1200px 600px at 80% -10%, rgba(42,45,52,.04), transparent 60%), radial-gradient(1000px 500px at -10% 100%, rgba(0,0,0,.04), transparent 55%), var(--bg);
    color: var(--charcoal);
    font-family: system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,"Apple Color Emoji","Segoe UI Emoji";
    margin: 0;
}

/* Utility */
.visually-hidden {
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
    clip: rect(1px,1px,1px,1px);
    white-space: nowrap;
}

/* =========================================================
   LOCATOR BASICS
========================================================= */
.locator-wrap {
    padding: 8px;
}

.searchbar {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.infowin h5 {
    margin: 0 0 6px 0;
}

/* =========================================================
   AUTH (LOGIN)
========================================================= */
.auth-theme {
    min-height: calc(100vh - 2rem);
    display: grid;
    place-items: center;
    padding: clamp(16px,3vw,32px);
}

.auth-card {
    width: min(480px,92vw);
    background: #FFFFFF;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
}

.auth-brand {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 18px;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
}

.brand-copy h1 {
    margin: 0;
    font-size: 1.35rem;
    color: var(--ink);
    letter-spacing: .2px;
}

.brand-copy p {
    margin: .25rem 0 0 0;
    font-size: .9rem;
    opacity: .75;
}

/* Auth fields */
.auth-field {
    margin: 16px 0;
}

    .auth-field label {
        display: block;
        font-size: .9rem;
        margin-bottom: 8px;
        color: var(--charcoal);
    }

.auth-input {
    width: 100%;
    height: 46px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    color: var(--ink);
    padding: 0 14px;
    outline: none;
    transition: border-color .15s, box-shadow .15s, transform .05s;
}

    .auth-input:focus {
        border-color: var(--charcoal);
        box-shadow: 0 0 0 4px rgba(42,45,52,.12);
    }

    .auth-input.is-invalid {
        border-color: #B00020 !important;
        box-shadow: 0 0 0 4px rgba(176,0,32,.12) !important;
    }

.auth-hint {
    display: block;
    margin-top: 6px;
    color: #B00020;
    font-size: .85rem;
}

/* Password group */
.auth-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

    .auth-input-group .auth-input {
        padding-right: 44px;
    }

.auth-toggle {
    position: absolute;
    right: 6px;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
    display: grid;
    place-items: center;
}

    .auth-toggle:hover {
        background: rgba(0,0,0,.04);
    }

/* Auth actions */
.auth-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
}

.auth-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.auth-checkbox {
    width: 18px;
    height: 18px;
}

/* Auth button */
.auth-btn {
    appearance: none;
    border: none;
    height: 46px;
    padding: 0 20px;
    background: var(--charcoal);
    color: #fff;
    border-radius: 12px;
    font-weight: 700;
    letter-spacing: .2px;
    cursor: pointer;
    transition: transform .05s, box-shadow .15s, filter .15s;
}

    .auth-btn:hover {
        box-shadow: 0 8px 24px rgba(42,45,52,.28);
    }

    .auth-btn:active {
        transform: translateY(1px);
    }

    .auth-btn[disabled] {
        opacity: .7;
        cursor: not-allowed;
        box-shadow: none;
    }

    .auth-btn.is-busy {
        position: relative;
    }

        .auth-btn.is-busy::after {
            content: "";
            position: absolute;
            right: 10px;
            top: 50%;
            transform: translateY(-50%);
            width: 16px;
            height: 16px;
            border-radius: 50%;
            border: 2px solid #fff;
            border-top-color: transparent;
            animation: spin .8s linear infinite;
        }

@keyframes spin {
    to {
        transform: translateY(-50%) rotate(360deg);
    }
}

/* Auth alert / foot */
.auth-alert {
    display: none;
    margin: 8px 0 12px 0;
    padding: 12px 14px;
    border-radius: 12px;
    color: #000;
    background: linear-gradient(180deg,#00000010,#00000005);
    border: 1px solid #00000018;
    font-size: .92rem;
}

    .auth-alert:empty {
        display: none;
    }

    .auth-alert:not(:empty) {
        display: block;
    }

.auth-foot {
    margin-top: 18px;
    text-align: center;
    opacity: .7;
}

/* Centered logo stack (login) */
.auth-center {
    min-height: calc(100vh - 2rem);
    display: grid;
    place-items: center;
    padding: clamp(16px, 3vw, 32px);
}

.auth-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.auth-logo img {
    display: block;
    max-width: 180px;
    max-height: 64px;
    height: auto;
    filter: drop-shadow(0 6px 18px rgba(0,0,0,.08));
    margin: 0;
}

.auth-card {
    width: min(480px, 92vw);
}

/* =========================================================
   ADMIN SHELL (topbar / nav / main)
========================================================= */
.admin-body {
    background: var(--bg);
    color: var(--charcoal);
    min-height: 100vh;
}

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    background: var(--charcoal);
    color: #FFFFFF;
    box-shadow: 0 2px 12px rgba(0,0,0,.18);
}

    .admin-topbar .brand {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        text-decoration: none;
    }

        .admin-topbar .brand img {
            display: block;
            height: 24px;
            width: auto;
            filter: drop-shadow(0 2px 6px rgba(0,0,0,.25));
        }

    .admin-topbar .brand {
        color: #fff;
        font-weight: 800;
        letter-spacing: .2px;
    }

.topbar-actions .logout {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    opacity: .9;
}

    .topbar-actions .logout:hover {
        opacity: 1;
    }

/* Hamburger */
.nav-toggle {
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    cursor: pointer;
}

    .nav-toggle span {
        display: block;
        height: 2px;
        width: 22px;
        background: #fff;
        border-radius: 2px;
    }

/* Sidebar / Drawer */
.admin-nav {
    position: fixed;
    top: 56px;
    left: 0;
    bottom: 0;
    z-index: 40;
    width: 240px;
    transform: translateX(-100%);
    background: #fff;
    border-right: 1px solid var(--line);
    box-shadow: 0 16px 40px rgba(0,0,0,.10);
    transition: transform .2s ease;
}

    .admin-nav.open {
        transform: translateX(0);
    }

    .admin-nav ul {
        list-style: none;
        margin: 0;
        padding: 12px;
    }

    .admin-nav li {
        margin: 2px 0;
    }

    .admin-nav a {
        display: block;
        padding: 12px 14px;
        border-radius: 10px;
        color: var(--charcoal);
        text-decoration: none;
        font-weight: 700;
    }

        .admin-nav a:hover {
            background: rgba(0,0,0,.05);
        }

    .admin-nav li.active > a {
        background: var(--charcoal);
        color: #fff;
    }

/* Backdrop for mobile drawer */
.nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.35);
    z-index: 35;
    display: none;
}

    .nav-backdrop.show {
        display: block;
    }

body.nav-open {
    overflow: hidden;
}

/* Main area */
.admin-main {
    margin: 16px;
    margin-left: 16px;
}

/* Desktop: pin sidebar open */
@media (min-width: 992px) {
    .nav-toggle {
        display: none;
    }

    .admin-nav {
        transform: none;
        top: 56px;
        width: 260px;
    }

    .nav-backdrop {
        display: none !important;
    }

    .admin-main {
        margin: 24px;
        margin-left: 280px;
    }
}

/* =========================================================
   CARDS / TABLES / BUTTONS (generic)
========================================================= */
.card {
    background: #fff;
    border: 1px solid var(--line-strong);
    border-radius: 16px;
    box-shadow: var(--shadow-card);
}

.card-header {
    padding: 16px 18px;
    border-bottom: 1px solid rgba(0,0,0,.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.card-title {
    margin: 0;
    font-size: 1.05rem;
    color: var(--ink);
}

.card-body {
    padding: 16px 18px;
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

    .table th, .table td {
        padding: 12px 10px;
        border-bottom: 1px solid rgba(0,0,0,.06);
        vertical-align: middle;
    }

    .table th {
        text-align: left;
        font-weight: 800;
        color: var(--charcoal);
    }

    .table tr:hover td {
        background: rgba(0,0,0,.02);
    }

/* Generic buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 40px;
    padding: 0 14px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-weight: 700;
    letter-spacing: .2px;
}

.btn-primary {
    background: var(--charcoal);
    color: #fff;
}

    .btn-primary:hover {
        box-shadow: 0 8px 24px rgba(42,45,52,.28);
    }

.btn-outline {
    background: #fff;
    color: var(--charcoal);
    border: 1px solid rgba(0,0,0,.12);
}

    .btn-outline:hover {
        background: rgba(0,0,0,.04);
    }

/* Small link-style button in tables */
.table .tcenter {
    text-align: center;
    width: 80px;
}

.table td a.btn {
    height: 32px;
    padding: 0 10px;
    border-radius: 10px;
    font-weight: 700;
}

/* =========================================================
   HIGH-CONTRAST FORM SYSTEM (ADMIN FORMS)
========================================================= */
.form {
    display: block;
    max-width: 880px;
}

.section-title {
    margin: 18px 0 8px 0;
    font-weight: 800;
    color: var(--ink);
    font-size: 1rem;
    letter-spacing: .2px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0,0,0,.06);
}

    .form-row:last-child {
        border-bottom: none;
    }

.form-label {
    color: var(--charcoal);
    font-size: .93rem;
    font-weight: 700;
}

.form-help {
    font-size: .85rem;
    color: rgba(0,0,0,.75);
}

.input, select.input, textarea.input {
    width: 100%;
    min-height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,.14);
    background: rgba(0,0,0,.03);
    color: var(--ink);
    padding: 10px 12px;
    outline: none;
    transition: border-color .15s, box-shadow .15s, background-color .15s;
}

textarea.input {
    min-height: 90px;
    resize: vertical;
}

select.input {
    height: 44px;
}

    .input:focus, select.input:focus, textarea.input:focus {
        border-color: var(--charcoal);
        box-shadow: 0 0 0 4px rgba(42,45,52,.18);
        background: rgba(0,0,0,.02);
    }

.input.is-invalid {
    border-color: #B00020 !important;
    box-shadow: 0 0 0 4px rgba(176,0,32,.12) !important;
}

.chk {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--charcoal);
}

.form-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 6px;
}

/* Responsive helpers (legacy two-column areas if any) */
.grid {
    display: grid;
    gap: 18px;
}

.col {
    display: grid;
    gap: 14px;
}

.field {
    display: block;
}

    .field label {
        display: block;
        font-size: .9rem;
        margin-bottom: 6px;
        color: var(--charcoal);
    }

.field-row {
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr;
}

.actions {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 8px;
}

@media (min-width:768px) {
    .card-body {
        padding: 22px;
    }

    .grid {
        grid-template-columns: 1fr 1fr;
    }

    .field-row {
        grid-template-columns: 1fr 1fr;
    }
}

/* =========================================================
   STATUS (used in locator + grids)
========================================================= */
.status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.status--ok {
    color: #28a745;
}

    .status--ok .status-dot {
        background: #28a745;
    }

.status--busy {
    color: #fd7e14;
}

    .status--busy .status-dot {
        background: #fd7e14;
    }

.status--off {
    color: #dc3545;
}

    .status--off .status-dot {
        background: #dc3545;
    }

.status--unknown {
    color: #6c757d;
}

    .status--unknown .status-dot {
        background: #6c757d;
    }

/* Simple helpers for ticks/muted & dots (used in Stations list) */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,.12);
    background: #fff;
    font-size: .8rem;
    font-weight: 800;
    color: #2A2D34;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

    .dot.ok {
        background: #28a745;
    }

    .dot.busy {
        background: #fd7e14;
    }

    .dot.off {
        background: #dc3545;
    }

    .dot.unknown {
        background: #6c757d;
    }

.tick {
    color: #28a745;
    font-weight: 800;
}

.muted {
    opacity: .6;
}

/* =========================================================
   ADMIN DATA GRIDS (pretty GridView styling)
   (uses .admin-grid / .admin-grid-card to avoid conflicts with .grid helper)
========================================================= */

/* Top toolbar for filters + add button */
.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin: 0 0 12px 0;
}

    .toolbar .spacer {
        flex: 1;
    }

.input-ghost {
    height: 40px;
    padding: 0 12px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,.12);
    background: #fff;
    color: #000;
    outline: none;
    transition: box-shadow .15s, border-color .15s;
}

    .input-ghost:focus {
        border-color: #2A2D34;
        box-shadow: 0 0 0 4px rgba(42,45,52,.12);
    }

.select-ghost {
    height: 40px;
    padding: 0 10px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,.12);
    background: #fff;
    color: #000;
}

/* Card container */
.admin-grid-card {
    background: #FFFFFF;
    border: 1px solid var(--line-strong);
    border-radius: 16px;
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

/* Table */
.admin-grid {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

    .admin-grid thead th {
        position: sticky;
        top: 0;
        background: linear-gradient(180deg,#fff,#fafafa);
        color: #000;
        font-weight: 800;
        text-align: left;
        padding: 12px 14px;
        border-bottom: 1px solid rgba(0,0,0,.08);
        user-select: none;
    }

    .admin-grid .sortable {
        cursor: pointer;
    }

    .admin-grid .sort-glyph {
        opacity: .6;
        margin-left: 6px;
        font-size: .9em;
    }

    .admin-grid tbody td {
        padding: 12px 14px;
        border-bottom: 1px solid rgba(0,0,0,.06);
        vertical-align: middle;
    }

    .admin-grid tbody tr:hover td {
        background: rgba(0,0,0,.02);
    }

    .admin-grid tbody tr.alt td {
        background: rgba(0,0,0,.015);
    }

/* Pager */
.grid-pager {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #fff;
    border-top: 1px solid rgba(0,0,0,.08);
}

    .grid-pager .pager-buttons a,
    .grid-pager .pager-buttons span {
        margin: 0 4px;
        padding: 4px 10px;
        border-radius: 10px;
        text-decoration: none;
        color: #2A2D34;
        border: 1px solid rgba(0,0,0,.12);
        background: #fff;
    }

    .grid-pager .pager-buttons span {
        background: #2A2D34;
        color: #fff;
        border-color: #2A2D34;
    }

.page-size {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

    .page-size select {
        height: 34px;
        border-radius: 10px;
        border: 1px solid rgba(0,0,0,.12);
        padding: 0 8px;
    }
/* =========================
   BEAUTIFUL DATA GRID
========================= */
.data-card {
    background: #fff;
    border: 1px solid var(--line-strong);
    border-radius: 16px;
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

/* Toolbar above grid */
.dg-toolbar {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(0,0,0,.06);
}

    .dg-toolbar .grow {
        flex: 1
    }

.dg-search {
    display: flex;
    gap: 8px;
    align-items: center;
    background: rgba(0,0,0,.03);
    border: 1px solid rgba(0,0,0,.14);
    border-radius: 12px;
    padding: 6px 8px;
    width: 100%;
    max-width: 420px;
}

    .dg-search input {
        border: none;
        background: transparent;
        outline: none;
        width: 100%;
        height: 34px;
    }

.dg-toolbar .btn {
    height: 38px;
    border-radius: 10px;
    padding: 0 12px;
}

/* GridView table */
.data-grid {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

    .data-grid th {
        position: sticky;
        top: 0;
        z-index: 1;
        background: #fafafa;
        color: var(--charcoal);
        font-weight: 800;
        text-align: left;
        padding: 12px 14px;
        border-bottom: 1px solid rgba(0,0,0,.08);
    }

    .data-grid td {
        padding: 12px 14px;
        border-bottom: 1px solid rgba(0,0,0,.06);
        vertical-align: middle;
    }

.dg-row:hover td {
    background: rgba(0,0,0,.02);
}

.dg-alt td {
    background: rgba(0,0,0,.015);
}

/* Small helper cells */
.dg-compact {
    width: 60px;
    text-align: center
}

.dg-actions {
    white-space: nowrap;
    display: flex;
    gap: 8px;
}

/* Badges / pills */
.badge-soft {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 800;
    font-size: .83rem;
    border: 1px solid rgba(0,0,0,.12);
    background: #fff;
    color: #2A2D34;
}

.badge-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 800;
    font-size: .83rem;
    border: 1px solid rgba(0,0,0,.12);
    background: #fff;
    color: #2A2D34;
    text-decoration: none;
}

    .badge-link:hover {
        background: rgba(0,0,0,.04);
    }

/* Status coloring (reuse your status classes) */
.badge-soft.status--ok {
    color: #28a745;
    border-color: #28a74533;
}

.badge-soft.status--busy {
    color: #fd7e14;
    border-color: #fd7e1433;
}

.badge-soft.status--off {
    color: #dc3545;
    border-color: #dc354533;
}

.badge-soft.status--unknown {
    color: #6c757d;
    border-color: #6c757d33;
}

/* Pager */
.dg-pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 16px;
    background: #fafafa;
    border-top: 1px solid rgba(0,0,0,.06);
}

    .dg-pager .pages {
        display: flex;
        gap: 6px;
        flex-wrap: wrap;
    }

    .dg-pager a, .dg-pager span {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        height: 34px;
        min-width: 34px;
        padding: 0 10px;
        border-radius: 10px;
        border: 1px solid rgba(0,0,0,.12);
        text-decoration: none;
        color: var(--charcoal);
        font-weight: 700;
    }

        .dg-pager a:hover {
            background: rgba(0,0,0,.05);
        }

    .dg-pager .current {
        background: var(--charcoal);
        color: #fff;
        border-color: var(--charcoal);
    }

.station-photo {
    width: 100%;
    max-height: 280px;
    object-fit: cover;
    border-radius: 16px 16px 0 0;
}

.station-title {
    margin: 0 0 8px 0;
    font-size: 1.6rem;
}

.station-address {
    margin: 6px 0 14px 0;
    opacity: .8;
}

.station-particulars {
    display: block;
    margin-bottom: 12px;
    font-style: italic;
}

.inf-block {
    margin: 6px 0;
}

.station-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}
.admin-section {
    margin: 0 0 20px 0;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    background: #fff;
    border: 1px solid var(--line-strong);
}

.admin-section__header {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--charcoal);
    color: #fff;
    padding: 14px 16px;
}

    .admin-section__header h2 {
        margin: 0;
        font-size: 1.05rem; /* matches your card-title scale */
        font-weight: 800;
        letter-spacing: .2px;
    }

    .admin-section__header .badge {
        font-size: 11px;
        line-height: 1;
        padding: 6px 8px;
        border-radius: 999px;
        background: rgba(255,255,255,.18);
        border: 1px solid rgba(255,255,255,.25);
    }

.admin-section__body {
    /* subtle grey → white vibe for the container area */
    background: linear-gradient(#fff, #fff) padding-box, linear-gradient(180deg, #F3F4F6, #fff) border-box;
    padding: 14px;
}

.content-panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 8px;
}

/* Keep grids usable on mobile */
.grid-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* =========================================================
   TELERIK GRID POLISH (non-invasive)
========================================================= */
.RadGrid .rgHeader, .RadGrid th.rgHeader {
    background: #fafafa;
    border-bottom: 1px solid var(--line) !important;
    text-transform: none;
}

.RadGrid .rgCommandRow {
    background: #f7f7f8;
    border-bottom: 1px solid var(--line);
}

.RadGrid .rgRow:hover, .RadGrid .rgAltRow:hover {
    background: #f5f7fb;
}



/* Responsive tweaks */
@media (max-width: 768px) {
    .admin-section__header {
        padding: 12px 14px;
    }

        .admin-section__header h2 {
            font-size: 1rem;
        }

    .admin-section__body {
        padding: 10px;
    }

    .content-panel {
        padding: 6px;
    }

    .RadGrid .rgFilterBox {
        max-width: 110px;
    }
}

/* =========================================================
   DARK CARD HEADERS (inside Overview)
========================================================= */
.card.elevated {
    box-shadow: var(--shadow-card);
    border-radius: var(--radius);
    overflow: hidden; /* ensures header rounding is clean */
}

.card-header.dark {
    background: var(--charcoal);
    color: #fff;
    border-bottom: 1px solid rgba(0,0,0,.1);
    border-top-left-radius: var(--radius);
    border-top-right-radius: var(--radius);
}

    .card-header.dark .card-title {
        color: #fff;
        margin: 0;
        font-size: 1rem;
        font-weight: 700;
        letter-spacing: .2px;
    }

/* Keep body flush below the rounded header */
.card-body {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

/* KPI values */
.metric-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--ink);
    line-height: 1.2;
}

    .metric-value.small {
        font-size: 1.6rem;
    }

.metric-sub {
    opacity: .7;
}

/* Map iframe wrapper */
.iframe-wrapper {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,.08);
    box-shadow: 0 8px 24px rgba(0,0,0,.06);
}

    .iframe-wrapper iframe {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        border: 0;
        background: #fff;
    }

.map-tip {
    margin-top: 8px;
    font-size: .9rem;
    opacity: .75;
}

/* Responsive tweaks */
@media (max-width: 768px) {
    .grid {
        grid-template-columns: 1fr !important;
    }

    .metric-value {
        font-size: 1.6rem;
    }
}

/* Map host used on SitesEdit (Google Map container) */
.mapHost {
    height: 520px;
    border: 1px solid var(--line);
    border-radius: 12px;
}

@media (max-width: 992px) {
    .mapHost {
        height: 520px;
    }
}

/* Two-column admin form grid: label left, input right */
.form-grid {
    display: grid;
    grid-template-columns: 220px 1fr; /* label | field */
    gap: 12px 16px; /* row | column */
    align-items: center;
}

    .form-grid .form-row {
        display: contents;
    }

    .form-grid .form-label {
        justify-self: end;
        font-weight: 700;
        color: var(--charcoal);
    }

    .form-grid .form-field {
        width: 100%;
    }

    .form-grid .form-spacer {
        grid-column: 1 / 2;
    }
    /* empty label cell */
    .form-grid .form-actions {
        grid-column: 2 / 3;
    }
/* button-only rows */

/* Stack on mobile */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

        .form-grid .form-label {
            justify-self: start;
        }

        .form-grid .form-spacer {
            display: none;
        }

        .form-grid .form-actions {
            grid-column: 1 / -1;
        }
}

.form-grid #pwdWrap {
    display: contents;
}

.connector-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    align-items: center;
}

.connector-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

    .connector-pill .dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
    }

.connector-ok .dot {
    background: #22c55e;
}

.connector-busy .dot {
    background: #f59e0b;
}

.connector-off .dot {
    background: #ef4444;
}

.connector-unknown .dot {
    background: #94a3b8;
}