/* Giao diện "xanh đậm" (hydro theme) trên nền Bootstrap 5 */

:root {
    --hydro-navy: #0a3d62;
    --hydro-navy-dark: #072a44;
    --hydro-blue: #1e6fb0;
    --hydro-accent: #22a6d9;
    --bs-primary: var(--hydro-navy);
    --bs-primary-rgb: 10, 61, 98;
}

body {
    background: #eef3f8;
}

/* Navbar */
.navbar.bg-dark {
    background: linear-gradient(135deg, var(--hydro-navy-dark), var(--hydro-navy) 55%, var(--hydro-blue)) !important;
}

/* Nút / badge / link chính dùng tông xanh đậm */
.btn-primary {
    background-color: var(--hydro-navy);
    border-color: var(--hydro-navy);
}
.btn-primary:hover, .btn-primary:focus {
    background-color: var(--hydro-navy-dark);
    border-color: var(--hydro-navy-dark);
}
a, .link-secondary {
    color: var(--hydro-blue);
}
.text-bg-info {
    background-color: var(--hydro-accent) !important;
}

/* Card: viền nhấn xanh phía trên, tiêu đề đậm */
.card {
    border-top: 3px solid var(--hydro-blue);
    border-radius: 0.6rem;
}
.card.station-card, .card#stationPanel {
    border-top: 3px solid var(--hydro-accent);
}
.card-title, h1, h2 {
    color: var(--hydro-navy-dark);
}

/* Widget tổng quan (overview stat cards) */
.stat-card {
    border-top: 3px solid var(--hydro-accent);
    border-radius: 0.6rem;
    background: #fff;
    height: 100%;
}
.stat-card .stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--hydro-navy), var(--hydro-accent));
    color: #fff;
    font-size: 20px;
    flex: 0 0 auto;
}
.stat-card .stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--hydro-navy-dark);
}
.stat-card .stat-label {
    font-size: 0.78rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.stat-trend-up { color: #dc2626; }
.stat-trend-down { color: #16a34a; }

@media (min-width: 992px) {
    .col-lg-2p4 {
        flex: 0 0 auto;
        width: 20%;
    }
}

/* Ticker trực tiếp (map.php side panel) */
.ticker-live-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #dc2626;
    margin-right: 6px;
    animation: ticker-blink 1.2s infinite;
}
@keyframes ticker-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.15; }
}
.ticker-value {
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--hydro-navy-dark);
}
.ticker-flash-up { animation: ticker-flash-up 1.2s ease-out; }
.ticker-flash-down { animation: ticker-flash-down 1.2s ease-out; }
@keyframes ticker-flash-up {
    0% { color: #16a34a; text-shadow: 0 0 8px rgba(22, 163, 74, 0.5); }
    100% { color: var(--hydro-navy-dark); text-shadow: none; }
}
@keyframes ticker-flash-down {
    0% { color: #dc2626; text-shadow: 0 0 8px rgba(220, 38, 38, 0.5); }
    100% { color: var(--hydro-navy-dark); text-shadow: none; }
}

.text-purple {
    color: #7c3aed;
}

.tbl-scroll {
    max-height: 280px;
    overflow-y: auto;
}
.tbl-scroll table thead th {
    position: sticky;
    top: 0;
    background: #fff;
}

.station-card {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.15s, transform 0.15s;
}
.station-card:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
    color: inherit;
}

.auth-card {
    max-width: 380px;
    width: 100%;
}

/* Bản đồ (map.php) */
#map {
    height: 640px;
    border-radius: 0.5rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}
#stationPanel {
    max-height: 640px;
    overflow-y: auto;
}
.map-legend {
    background: #fff;
    padding: 8px 10px;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    font-size: 12px;
    line-height: 1.6;
}
.map-legend .dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
}
