@font-face {
    font-family: 'Yekan';
    src: url('../assets/fonts/Yekan.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.6);
    --bg-card-solid: #1e293b;
    --neon-green: #00e676;
    --electric-blue: #2979ff;
    --warm-orange: #ff9100;
    --danger-red: #ff1744;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-border: 1px solid rgba(255, 255, 255, 0.08);
    --nav-height: 76px;
    --bs-body-font-family: 'Yekan', 'Inter', sans-serif;
}

body {
    background-color: var(--bg-dark);
    font-family: var(--bs-body-font-family);
    color: var(--text-main);
    padding-bottom: calc(var(--nav-height) + 20px);
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
}

/* --- Utilities --- */
.text-neon {
    color: var(--neon-green) !important;
}

.text-blue {
    color: var(--electric-blue) !important;
}

.text-orange {
    color: var(--warm-orange) !important;
}

.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.route-step-item {
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 0.75rem 0.9rem;
}

.route-step-head {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.route-step-index {
    min-width: 1.75rem;
    height: 1.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--neon-green);
    color: #0f172a;
    font-weight: 800;
    font-size: 0.78rem;
    flex-shrink: 0;
}

.route-step-name {
    color: #f8fafc;
    font-size: 0.95rem;
    line-height: 1.5;
    font-weight: 700;
}

.route-step-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.6rem;
    padding-right: 2.5rem;
}

.route-step-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: rgba(41, 121, 255, 0.16);
    color: #dbeafe;
    border: 1px solid rgba(41, 121, 255, 0.28);
    border-radius: 999px;
    padding: 0.28rem 0.7rem;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
}

.route-step-fallback {
    margin-top: 0.55rem;
    padding-right: 2.5rem;
    color: var(--text-muted);
    font-size: 0.78rem;
}

.glass-modal .modal-content {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 20px;
}

.glass-modal .modal-header,
.glass-modal .modal-footer {
    border-color: rgba(255, 255, 255, 0.1);
}

.form-control,
.form-select {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 12px;
}

.form-control:focus,
.form-select:focus {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--electric-blue);
    color: white;
    box-shadow: 0 0 0 0.25rem rgba(41, 121, 255, 0.25);
}

.form-select option {
    background-color: #1e293b;
    color: white;
}

.btn-scale:active {
    transform: scale(0.95);
}

.btn {
    transition: transform 0.1s;
}

.btn-neon {
    background-color: var(--neon-green);
    color: #0f172a;
    font-weight: 600;
    border: none;
}

.btn-neon:hover {
    background-color: #00b35c;
    color: white;
}

.btn-glass-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    transition: background 0.2s;
}

.btn-glass-icon:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-glass-icon.danger {
    color: var(--danger-red);
    background: rgba(255, 23, 68, 0.15);
}

.tab-view {
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.tab-view.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* --- Header --- */
.app-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(30, 41, 59, 0.9);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 15px 20px;
    height: 76px;
}

.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background-color: var(--warm-orange);
    border-radius: 50%;
}

/* --- Hero --- */
.hero-section {
    padding: 20px 0;
    text-align: center;
    position: relative;
}

.liquid-gauge {
    width: 220px;
    height: 220px;
    margin: 0 auto;
    position: relative;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 40px rgba(0, 230, 118, 0.1);
    overflow: hidden;
    border: 4px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.liquid-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: linear-gradient(to top, rgba(0, 230, 118, 0.8), rgba(0, 230, 118, 0.4));
    z-index: 1;
    transition: height 1s ease-in-out;
}

.liquid-fill::before,
.liquid-fill::after {
    content: "";
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: 50%;
    transform: translate(-50%, -75%);
}

.liquid-fill::before {
    border-radius: 45%;
    background: rgba(20, 20, 20, 0.5);
    animation: wave 10s linear infinite;
}

.liquid-fill::after {
    border-radius: 40%;
    background: rgba(20, 20, 20, 0.3);
    animation: wave 15s linear infinite;
}

@keyframes wave {
    0% {
        transform: translate(-50%, -75%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -75%) rotate(360deg);
    }
}

.gauge-content {
    position: relative;
    z-index: 10;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.gauge-cost {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -1px;
}

.gauge-unit {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 5px;
}

.gauge-kwh {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--neon-green);
}

.charging-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 25px;
    padding: 0 10px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.detail-item i {
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.detail-value {
    color: white;
    font-weight: 600;
}

/* Stop Button (Relative Layout) */
.simple-stop-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 23, 68, 0.2);
    border: 1px solid rgba(255, 23, 68, 0.3);
    color: #ff1744;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.simple-stop-btn:active {
    transform: scale(0.9);
    background: rgba(255, 23, 68, 0.4);
}

/* --- Lists --- */
.swipe-item-container {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    display: flex;
    scrollbar-width: none;
}

.swipe-item-container::-webkit-scrollbar {
    display: none;
}

.swipe-content {
    flex: 0 0 100%;
    scroll-snap-align: start;
    transition: transform 0.2s;
}

.swipe-actions {
    flex: 0 0 auto;
    scroll-snap-align: end;
    display: flex;
}

.swipe-btn {
    width: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    border: none;
}

.btn-delete {
    background: var(--danger-red);
    border-radius: 20px 0 0 20px;
}

.btn-edit {
    background: var(--warm-orange);
}

.vehicle-card {
    position: relative;
    overflow: hidden;
    min-height: 180px;
}

.vehicle-icon-lg {
    font-size: 5rem;
    opacity: 0.1;
    position: absolute;
    left: -20px;
    bottom: -20px;
    transform: rotate(10deg);
}

/* --- Tariff Views --- */
.tariff-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: background 0.2s;
}

.tariff-list-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.tariff-color-box {
    width: 24px;
    height: 24px;
    border-radius: 6px;
}

.tariff-year-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.7rem;
    text-align: center;
}

.tariff-year-table th {
    color: var(--text-muted);
    padding: 5px;
}

.tariff-year-table td {
    padding: 0;
    height: 25px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
}

.tariff-year-table td:hover {
    opacity: 0.8;
}

/* --- Nav --- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background: rgba(30, 41, 59, 0.9);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1050;
    padding-bottom: env(safe-area-inset-bottom);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.7rem;
    width: 60px;
    transition: color 0.3s;
    background: none;
    border: none;
}

.nav-item i {
    font-size: 1.3rem;
    margin-bottom: 4px;
}

.nav-item.active {
    color: var(--neon-green);
}

.nav-fab {
    width: 56px;
    height: 56px;
    background: var(--neon-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-size: 1.5rem;
    transform: translateY(-25px);
    box-shadow: 0 0 20px rgba(0, 230, 118, 0.4);
    border: 4px solid var(--bg-dark);
    transition: transform 0.2s;
    cursor: pointer;
    text-decoration: none;
}

.nav-fab:active {
    transform: translateY(-20px) scale(0.95);
}

/* --- Toast (High Z-Index & Floating) --- */
.toast-container {
    position: fixed;
    bottom: 100px;
    /* Above nav */
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999 !important;
    /* Force top */
    width: 90%;
    max-width: 400px;
    pointer-events: none;
    /* Allow clicks through container */
}

.glass-toast {
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 12px 20px;
    border-radius: 16px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: slideUpFade 0.3s ease-out;
    pointer-events: auto;
    /* Re-enable clicks on toast */
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pwa-install-toast {
    position: fixed;
    bottom: 90px;
    right: 1rem;
    z-index: 9999;
    background-color: var(--bg-card);
    backdrop-filter: blur(12px);
    color: var(--text-main);
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.3);
    border: var(--glass-border);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 350px;
}

@media (min-width: 576px) {
    .pwa-install-toast {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
    }
}

.chart-container {
    position: relative;
    height: 220px;
    width: 100%;
}

/* --- Animations & Loaders --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.list-item-anim {
    animation: fadeInUp 0.4s ease-out forwards;
    opacity: 0;
    /* Start hidden */
}

.skeleton-loader {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
}

.skeleton-list {
    height: 80px;
}

.skeleton-card {
    height: 180px;
}

.skeleton-loader::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background-image: linear-gradient(90deg, rgba(255, 255, 255, 0) 0, rgba(255, 255, 255, 0.05) 20%, rgba(255, 255, 255, 0.1) 60%, rgba(255, 255, 255, 0));
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

/* --- Pull to Refresh --- */
#app-content {
    position: relative;
}

#pull-to-refresh-indicator {
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: var(--bg-card-solid);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--text-muted);
    z-index: 999;
    transition: top 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

#pull-to-refresh-indicator .fa-spinner {
    display: none;
}

#pull-to-refresh-indicator.refreshing .fa-arrow-down {
    display: none;
}

#pull-to-refresh-indicator.refreshing .fa-spinner {
    display: block;
}

#pull-to-refresh-indicator.ready {
    color: var(--neon-green);
}

/* --- Feature Icons (Dashboard) --- */
.feature-icon-box {
    border-radius: 20px;
    padding: 15px 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    aspect-ratio: 1 / 1;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    border: 1px solid transparent;
}

.feature-icon-box:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.feature-icon-box i {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.feature-icon-box span {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-main);
}

/* Map */
.feature-icon-box.feature-map {
    background: linear-gradient(135deg, #0369a1, #0284c7);
}

.feature-icon-box.feature-map i {
    color: #7dd3fc;
}

.feature-icon-box.feature-map:hover {
    border-color: #7dd3fc;
}

/* Trip Planner */
.feature-icon-box.feature-trip {
    background: linear-gradient(135deg, #c2410c, #ea580c);
}

.feature-icon-box.feature-trip i {
    color: #fdba74;
}

.feature-icon-box.feature-trip:hover {
    border-color: #fdba74;
}

/* Reports */
.feature-icon-box.feature-reports {
    background: linear-gradient(135deg, #166534, #15803d);
}

.feature-icon-box.feature-reports i {
    color: #86efac;
}

.feature-icon-box.feature-reports:hover {
    border-color: #86efac;
}

/* Settings */
.feature-icon-box.feature-settings {
    background: linear-gradient(135deg, #334155, #475569);
}

.feature-icon-box.feature-settings i {
    color: #cbd5e1;
}

.feature-icon-box.feature-settings:hover {
    border-color: #cbd5e1;
}

/* Admin */
.feature-icon-box.feature-admin {
    background: linear-gradient(135deg, #7f1d1d, #b91c1c);
}

.feature-icon-box.feature-admin i {
    color: #fca5a5;
}

.feature-icon-box.feature-admin:hover {
    border-color: #fca5a5;
}

/* --- MAP STYLES --- */
#view-map {
    position: fixed;
    top: 76px;
    /* Header Height */
    bottom: 76px;
    /* Nav Height */
    left: 0;
    right: 0;
    z-index: 900;
    background: #0f172a;
    padding: 0 !important;
    margin: 0 !important;
}

.explorer-layout {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.explorer-content {
    flex: 1;
    min-height: 0;
}

.explorer-pane,
.garage-pane {
    display: none;
}

.explorer-pane.active,
.garage-pane.active {
    display: block;
}

#explorer-map-pane {
    height: 100%;
}

#map-container-wrapper {
    position: relative;
    height: 100%;
}

.explorer-scroll-pane {
    height: 100%;
    overflow-y: auto;
    padding: 0 1rem 1rem;
}

.explorer-tab-btn,
.garage-tab-btn {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text-muted);
    border-radius: 999px;
    padding: 0.6rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 700;
    transition: all 0.2s ease;
}

.explorer-tab-btn.active,
.garage-tab-btn.active {
    background: var(--electric-blue);
    color: #fff;
    box-shadow: 0 6px 18px rgba(41, 121, 255, 0.28);
}

.explorer-tab-btn:not(.active):hover,
.garage-tab-btn:not(.active):hover {
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.05);
}

#map-container {
    height: 100%;
    width: 100%;
    z-index: 1;
    direction: ltr;
    /* CRITICAL: Forces Leaflet to use LTR coordinates */
}

.leaflet-popup-content-wrapper {
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(10px);
    color: white;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.leaflet-popup-tip {
    background: rgba(30, 41, 59, 0.95);
}

.map-fab {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--electric-blue);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: none;
    font-size: 1.2rem;
}

.map-fab:active {
    transform: scale(0.95);
}

.map-overlay-hint {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    z-index: 1000;
    font-size: 0.8rem;
    pointer-events: none;
}

/* UNIFIED ICON & LABEL STYLES */

/* 1. Custom Icon Container (Removes default Leaflet styles) */
.custom-cluster-icon,
.custom-div-icon {
    background: transparent !important;
    border: none !important;
    overflow: visible !important;
    /* Allow label to stick out */
}

/* 2. The Circle (Used for both Single and Cluster) */
.cluster-circle,
.single-station-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    color: #0f172a;
    font-weight: bold;
    font-size: 14px;
    margin: 0 auto;
    /* Center in the divIcon */
}

/* 3. The Label Box (Unified) */
.cluster-label-box {
    position: absolute;
    top: 34px;
    /* 30px icon + 4px gap */
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 6px;
    padding: 4px 8px;
    font-family: 'Yekan';
    font-size: 0.75rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
    direction: rtl;
    z-index: 1000;
    pointer-events: none;
    /* Let clicks pass through to map if needed, though icon catches them */
}

/* Arrow for Label */
.cluster-label-box::after {
    content: "";
    position: absolute;
    top: -6px;
    left: 50%;
    margin-left: -6px;
    border-width: 6px;
    border-style: solid;
    border-color: transparent transparent rgba(15, 23, 42, 0.9) transparent;
}

/* Leaflet Tooltip Override (For Single Stations using bindTooltip) */
.leaflet-tooltip-custom {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 6px;
    padding: 4px 8px;
    font-family: 'Yekan';
    font-size: 0.75rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
    direction: rtl;
}

.leaflet-tooltip-bottom.leaflet-tooltip-custom::before {
    border-bottom-color: rgba(15, 23, 42, 0.9);
    border-top-color: transparent;
    margin-left: -6px;
    margin-bottom: 0px;
}

/* Active Tariff Row */
.active-tariff-row {
    background-color: rgba(0, 230, 118, 0.15) !important;
    border: 1px solid var(--neon-green) !important;
    color: white !important;
}

.active-tariff-row .text-neon {
    font-weight: bold;
    text-shadow: 0 0 5px rgba(0, 230, 118, 0.5);
}

/* --- Persian Datepicker Dark Theme Overrides --- */
.datepicker-plot-area {
    background: rgba(15, 23, 42, 0.95) !important;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: white !important;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
    font-family: var(--bs-body-font-family);
}

.datepicker-plot-area * {
    color: white !important;
}

/* Day/Month/Year Cells Background Reset */
.datepicker-plot-area .datepicker-day-view .table-days td span,
.datepicker-plot-area .datepicker-month-view .month-item,
.datepicker-plot-area .datepicker-year-view .year-item {
    background-color: transparent !important;
    border-radius: 8px;
}

.datepicker-plot-area .datepicker-day-view .table-days td.today span {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

.datepicker-plot-area .datepicker-day-view .table-days td.selected span,
.datepicker-plot-area .datepicker-month-view .month-item.selected,
.datepicker-plot-area .datepicker-year-view .year-item.selected {
    background-color: var(--neon-green) !important;
    color: #0f172a !important;
    font-weight: bold;
}

.datepicker-plot-area .datepicker-day-view .table-days td span:hover,
.datepicker-plot-area .datepicker-month-view .month-item:hover,
.datepicker-plot-area .datepicker-year-view .year-item:hover {
    background-color: rgba(41, 121, 255, 0.5) !important;
}

.datepicker-plot-area .datepicker-navigator {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.datepicker-plot-area .datepicker-time-view,
.datepicker-plot-area .toolbox {
    background-color: transparent !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.datepicker-plot-area .datepicker-time-view input {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 6px;
    text-align: center;
    color: white !important;
}

.datepicker-plot-area .toolbox .btn-today,
.datepicker-plot-area .toolbox .btn-submit {
    color: var(--neon-green) !important;
    font-weight: bold;
    background-color: rgba(0, 230, 118, 0.1) !important;
    border-radius: 6px;
}

.datepicker-plot-area .toolbox .btn-today:hover,
.datepicker-plot-area .toolbox .btn-submit:hover {
    background-color: rgba(0, 230, 118, 0.2) !important;
}

/* --- History Redesign V2 --- */
.glass-card-v2 {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 14px;
    transition: all 0.3s ease;
}

.glass-card-v2:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
}

.icon-box-v2 {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(0, 230, 118, 0.15), rgba(41, 121, 255, 0.15));
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.icon-box-v2 i {
    font-size: 1.25rem;
    color: var(--neon-green);
}

.stats-grid-v2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-label-v2 {
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.stat-value-v2 {
    font-size: 0.95rem;
    font-weight: 700;
    font-family: 'Yekan', sans-serif;
}

.font-monospace-en {
    font-family: monospace;
}

.mini-liquid-gauge {
    width: 140px;
    height: 140px;
}

.liquid-fill.blue {
    background: linear-gradient(to top, rgba(41, 121, 255, 0.8), rgba(41, 121, 255, 0.4));
}

#history-summary { cursor: pointer; transition: transform 0.2s; }
#history-summary:active { transform: scale(0.98); }

.badge-status-v2 {
    font-size: 0.6rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 100px;
    background: rgba(0, 230, 118, 0.1);
    color: var(--neon-green);
    display: flex;
    align-items: center;
    gap: 4px;
}

.summary-panel-v2 {
    position: relative;
    z-index: 10;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(0, 230, 118, 0.2);
    border-radius: 24px;
    padding: 20px;
    box-shadow: 0 0 20px rgba(0, 230, 118, 0.15);
    margin-top: 20px;
}

.summary-bar-container {
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 100px;
    margin-top: 8px;
    overflow: hidden;
}

.summary-bar-fill {
    height: 100%;
    border-radius: 100px;
    transition: width 1s ease-out;
}

.summary-bar-fill.blue { background: var(--electric-blue); }
.summary-bar-fill.green { background: var(--neon-green); }

.filter-btn-v2 {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn-v2.active {
    background: rgba(41, 121, 255, 0.15);
    border-color: rgba(41, 121, 255, 0.4);
    color: var(--electric-blue);
}

/* --- Report Redesign V3 (Grid Cards) --- */
.report-grid-v3 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.report-stat-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.2s;
}

.report-stat-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.report-stat-card i {
    font-size: 1.2rem;
    margin-bottom: 8px;
    opacity: 0.8;
}

.report-stat-card .label {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.report-stat-card .value {
    font-size: 1.05rem;
    font-weight: 800;
}

/* --- Ticketing & Notifications --- */
.ticket-card {
    transition: transform 0.2s, background 0.2s;
    border-right: 4px solid transparent;
    cursor: pointer;
}

.ticket-card.status-open {
    border-right-color: var(--neon-green);
}

.ticket-card.status-closed {
    opacity: 0.7;
    filter: grayscale(0.5);
}

.ticket-card:active {
    transform: scale(0.98);
    background: rgba(255, 255, 255, 0.05);
}

.chat-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 10px;
    max-height: 50vh;
    overflow-y: auto;
}

.chat-bubble {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 18px;
    position: relative;
    font-size: 0.9rem;
    line-height: 1.5;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.chat-bubble.user {
    align-self: flex-start;
    background: rgba(41, 121, 255, 0.15);
    border: 1px solid rgba(41, 121, 255, 0.2);
    border-bottom-right-radius: 4px;
    color: #e2e8f0;
}

.chat-bubble.admin {
    align-self: flex-end;
    background: rgba(0, 230, 118, 0.1);
    border: 1px solid rgba(0, 230, 118, 0.15);
    border-bottom-left-radius: 4px;
    color: #f8fafc;
    text-align: right;
}

.chat-time {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 4px;
    display: block;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger-red);
    color: white;
    font-size: 0.65rem;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid #0f172a;
    display: none;
    z-index: 10;
}

.notification-badge.active {
    display: flex;
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 23, 68, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 10px rgba(255, 23, 68, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 23, 68, 0); }
}

.broadcast-card {
    background: linear-gradient(135deg, rgba(255, 145, 0, 0.1), rgba(255, 145, 0, 0.05));
    border: 1px solid rgba(255, 145, 0, 0.2);
    border-radius: 16px;
    padding: 15px;
    margin-bottom: 15px;
    position: relative;
    overflow: hidden;
}

.broadcast-card::before {
    content: '\f0a1';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: -10px;
    top: -10px;
    font-size: 4.5rem;
    opacity: 0.05;
    color: var(--warm-orange);
    transform: rotate(-15deg);
}

.unread-dot {
    width: 8px;
    height: 8px;
    background: var(--electric-blue);
    border-radius: 50%;
    display: inline-block;
    margin-left: 6px;
}
