/* ── custom.css — Elathia Dashboard ─────────────────────────── */

/* Chart panels */
.chart-panel {
    background-color: #fff;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    padding: 1rem;
}

.chart-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.125rem;
}

.chart-subtitle {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-bottom: 0.25rem;
}

.chart-desc {
    font-size: 0.7rem;
    color: #6b7280;
    line-height: 1.4;
    margin-bottom: 0.75rem;
}

.chart-wrapper {
    position: relative;
    height: 280px;
}

@media (min-width: 1024px) {
    .chart-wrapper {
        height: 350px;
    }
}

/* KPI summary cards (FE09-T4) */
.kpi-card {
    background-color: #fff;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    padding: 0.75rem 1rem;
}
.kpi-label {
    font-size: 0.65rem;
    font-weight: 500;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.kpi-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: #374151;
    margin-top: 0.125rem;
}
.kpi-card.kpi-green  { border-left: 3px solid #22c55e; }
.kpi-card.kpi-yellow { border-left: 3px solid #f59e0b; }
.kpi-card.kpi-red    { border-left: 3px solid #ef4444; }

/* Stats Cards (US-017: actual/min/max/avg) */
.stat-card {
    background: #fff;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    padding: 0.75rem 1rem;
}
.stat-label {
    font-size: 0.65rem;
    font-weight: 500;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.stat-current {
    font-size: 1.75rem;
    font-weight: 700;
    margin-top: 0.125rem;
    line-height: 1.1;
}
.stat-row {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.375rem;
    font-size: 0.75rem;
    color: #6b7280;
}
.stat-min, .stat-max, .stat-avg {
    font-weight: 600;
    color: #374151;
}

/* Quick range buttons */
.quick-range.active {
    background-color: #1a5276;
    color: #fff;
    border-color: #1a5276;
}

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #d1d5db;
    border-top-color: #1a5276;
    border-radius: 9999px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ── Weather Widget (Google Weather-style) ────────────────── */
.ww-current {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem 0;
}
.ww-current__main {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.ww-current__icon { font-size: 2.5rem; line-height: 1; }
.ww-current__temp { font-size: 2.5rem; font-weight: 300; color: #1f2937; line-height: 1; }
.ww-current__info { display: flex; flex-direction: column; gap: 0.1rem; }
.ww-current__label { font-size: 0.85rem; color: #374151; font-weight: 500; }
.ww-current__time  { font-size: 0.7rem; color: #9ca3af; text-transform: capitalize; }
.ww-current__metrics {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: #6b7280;
}

.ww-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 0.5rem;
}
.ww-tab {
    flex: 1;
    padding: 0.4rem 0;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 0.75rem;
    color: #9ca3af;
    cursor: pointer;
    font-family: inherit;
    transition: color 0.15s, border-color 0.15s;
}
.ww-tab:hover { color: #374151; }
.ww-tab--active {
    color: #2563eb;
    border-bottom-color: #2563eb;
    font-weight: 500;
}

.ww-daily {
    display: flex;
    overflow-x: auto;
    gap: 0;
    padding: 0.5rem 0 0.25rem;
    -webkit-overflow-scrolling: touch;
}
.ww-day-card {
    flex: 0 0 auto;
    min-width: 4.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    padding: 0.4rem 0.5rem;
    border-right: 1px solid #f3f4f6;
}
.ww-day-card:last-child { border-right: none; }
.ww-day-card__label { font-size: 0.7rem; color: #6b7280; text-transform: capitalize; }
.ww-day-card__icon  { font-size: 1.5rem; line-height: 1; }
.ww-day-card__temps { display: flex; gap: 0.3rem; font-size: 0.75rem; }
.ww-day-card__max   { color: #1f2937; font-weight: 600; }
.ww-day-card__min   { color: #9ca3af; }
