/* ==========================================================================
   SNOW OPERATIONS COMMAND DASHBOARD THEME
   Targeting: #snow-dispatcher-fullwidth-wrapper
   ========================================================================== */

/* Global Dashboard Box Model & Dark Canvas Reset */
#snow-dispatcher-fullwidth-wrapper {
    box-sizing: border-box;
    background-color: #090d16;
    color: #000000;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    min-height: 100vh;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 0;
}

#snow-dispatcher-fullwidth-wrapper * {
    box-sizing: border-box;
}

/* Header & Controls Bar */
.dispatcher-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 14px 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.dashboard-title {
    font-size: 20px;
    font-weight: 700;
    color: #f8fafc;
    margin: 0;
    letter-spacing: -0.02em;
}

.dashboard-subtitle {
    font-size: 12px;
    color: #64748b;
    margin-top: 3px;
}

/* Snow Depth Override Controls */
.snow-control-card {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 6px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.snow-control-card label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    font-weight: 600;
}

.snow-control-card input[type="number"] {
    width: 60px;
    background: #0f172a;
    border: 1px solid #334155;
    color: #38bdf8;
    font-weight: bold;
    border-radius: 4px;
    padding: 4px 6px;
    font-size: 13px;
    text-align: center;
}

.snow-control-card button {
    background: #0284c7;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.snow-control-card button:hover {
    background: #0369a1;
}

/* KPI Metric Summary Cards */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.kpi-card {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #0284c7;
}

.kpi-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    font-weight: 600;
    margin-bottom: 6px;
}

.kpi-value {
    font-size: 28px;
    font-weight: 800;
    color: #f8fafc;
    line-height: 1;
}

.kpi-value.text-success { color: #4ade80; }
.kpi-value.text-muted { color: #a1a1aa; }
.kpi-value.text-primary { color: #38bdf8; }

/* Dashboard Main Layout Body Grid */
.dispatcher-grid-body {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 16px;
    align-items: start;
}

.left-column-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Card Panel Styling */
.dashboard-panel {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #1e293b;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.panel-header h3 {
    font-size: 14px;
    font-weight: 700;
    color: #f1f5f9;
    margin: 0;
}

.panel-badge {
    font-size: 11px;
    background: #334155;
    color: #cbd5e1;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
}

.panel-badge.badge-live {
    background: rgba(14, 165, 233, 0.2);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

/* NWS Weather Panel Widget */
/* NWS Weather Panel Widget */
.weather-body {
    padding: 8px;              /* Reduced container padding */
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;                  /* Reduced gap between cards */
}

.weather-loading {
    grid-column: span 2;
    text-align: center;
    color: #64748b;
    font-size: 12px;
    padding: 8px;
}

.weather-stat-box {
    background: transparent;   /* Removes the dark background (or set to #ffffff for solid white) */
    border: 1px solid rgba(255, 255, 255, 0.15); /* Slightly clearer border for contrast */
    border-radius: 4px;        /* Slightly tighter corners */
    padding: 6px 8px;          /* Reduced card padding */
}

.weather-stat-label {
    font-size: 10px;           /* Slightly smaller label */
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.weather-stat-value {
    font-size: 14px;           /* Reduced value font size */
    font-weight: 700;
    color: #f8fafc;
    margin-top: 1px;
}

/* Equipment Legend Widget */
.legend-grid {
    padding: 12px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.legend-item {
    font-size: 12px;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.legend-item .swatch {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    display: inline-block;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
}

/* Fleet Activity Data Table */
.table-responsive {
    max-height: 320px;
    overflow-y: auto;
}

.table-responsive::-webkit-scrollbar {
    width: 6px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 3px;
}

#equipment-status-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    text-align: left;
}

#equipment-status-table th {
    background: #0f172a;
    color: #000000;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 10px 12px;
    position: sticky;
    top: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 2;
}

#equipment-status-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #e2e8f0;
    vertical-align: middle;
}

#equipment-status-table tr:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

.table-empty {
    text-align: center;
    color: #000000;
    padding: 20px !important;
}

/* Dynamic Geofence Zone Pills */
.status-pill {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
}

.status-pill-in {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.status-pill-out {
    background: rgba(148, 163, 184, 0.15);
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

/* Interactive Leaflet Map Container Panel */
.map-panel {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 165px);
    min-height: 600px;
}

#dispatcher-map {
    width: 100%;
    height: 100%;
    background: #020617;
    z-index: 1;
}

/* Custom Overrides for Leaflet Dark Controls */
.leaflet-bar a {
    background-color: #0f172a !important;
    color: #f8fafc !important;
    border-bottom-color: #1e293b !important;
}

.leaflet-bar a:hover {
    background-color: #1e293b !important;
}

.leaflet-container {
    background-color: #090d16 !important;
}

/* Responsive Breakpoints */
@media (max-width: 1200px) {
    .dispatcher-grid-body {
        grid-template-columns: 1fr;
    }
    .map-panel {
        height: 500px;
    }
}

@media (max-width: 768px) {
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
.btn-back {
    display: inline-block;
    padding: 8px 14px;
    background-color: #3b82f6; /* Blue background */
    color: #ffffff;            /* Text color */
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

.btn-back:hover {
    background-color: #2563eb; /* Darker blue on hover */
}
	 /* --- NWS WEATHER CARD COMPACT & DAY/NIGHT THEMING FIXES --- */
            .weather-panel-container {
                background: #0f172a !important;
                border: 1px solid #1e293b !important;
                color: #f8fafc !important;
                padding: 6px !important;
                width: 100% !important;
                max-width: 100% !important;
                box-sizing: border-box !important;
                overflow: hidden !important;
            }
            .weather-body {
                background: #1e293b !important;
                border: 1px solid #334155 !important;
                color: #f8fafc !important;
                padding: 6px !important;
                font-size: 11px !important;
                width: 100% !important;
                max-width: 100% !important;
                box-sizing: border-box !important;
                overflow: hidden !important;
            }
            .wx-card-item {
                background: #0f172a !important;
                border: 1px solid #334155 !important;
                color: #f8fafc !important;
                border-radius: 0 !important;
                padding: 4px !important;
                box-sizing: border-box !important;
                max-width: 100% !important;
                min-width: 0 !important;
                overflow: hidden !important;
                word-break: break-word !important;
            }
            .wx-subtext { color: #94a3b8 !important; }
            .wx-temp-main { color: #38bdf8 !important; }

            /* Grid/Flex containment inside weather panels */
            .weather-panel-container *, 
            .weather-body * {
                max-width: 100% !important;
                box-sizing: border-box !important;
            }
			
			
			
			  /* --- ANIMATED WEATHER ICON KEYFRAMES --- */
            @keyframes wxSunSpin {
                0% { transform: rotate(0deg); }
                100% { transform: rotate(360deg); }
            }
            @keyframes wxCloudDrift {
                0%, 100% { transform: translateY(0px); }
                50% { transform: translateY(-2px); }
            }
            @keyframes wxRainDrop {
                0% { transform: translateY(-2px); opacity: 0.2; }
                50% { opacity: 1; }
                100% { transform: translateY(5px); opacity: 0.2; }
            }
            @keyframes wxSnowFlake {
                0% { transform: translateY(-2px) rotate(0deg); opacity: 0.3; }
                50% { opacity: 1; }
                100% { transform: translateY(4px) rotate(180deg); opacity: 0.3; }
            }

            .wx-anim-sun { animation: wxSunSpin 12s linear infinite; transform-origin: center; }
            .wx-anim-cloud { animation: wxCloudDrift 3s ease-in-out infinite; }
            .wx-anim-rain { animation: wxRainDrop 1.2s ease-in-out infinite; }
            .wx-anim-snow { animation: wxSnowFlake 2s linear infinite; }
