/* WaterWorksPro Premium Dark Theme Overrides */

/* ─── Page fade-in ─── */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.mud-main-content {
    animation: fadeIn 0.25s ease-out;
}

/* ─── Glassmorphism cards ─── */
.mud-paper {
    background: rgba(255, 255, 255, 0.03) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 12px !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mud-paper:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
}

/* Don't lift the app bar or drawer */
.mud-appbar,
.mud-drawer,
.mud-drawer .mud-paper,
.mud-appbar .mud-paper {
    transform: none !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* ─── Gradient heading text ─── */
.gradient-text {
    background: linear-gradient(135deg, #7C3AED 0%, #0EA5E9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

/* ─── Page header layout ─── */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.page-header-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin: 0;
    line-height: 1.2;
}

.page-subtitle {
    font-size: 0.875rem;
    opacity: 0.7;
    margin: 0;
}

.page-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* ─── Active nav item ─── */
.mud-nav-item.active > .mud-nav-link,
.mud-nav-link.active {
    background: linear-gradient(90deg, rgba(124, 58, 237, 0.08) 0%, rgba(14, 165, 233, 0.08) 100%) !important;
    border-left: 3px solid #7C3AED !important;
    padding-left: calc(1rem - 3px) !important;
}

/* ─── Stat card variants ─── */
.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 12px 12px 0 0;
}

.stat-card--purple::before { background: linear-gradient(90deg, #7C3AED, #9B6DF5); }
.stat-card--blue::before   { background: linear-gradient(90deg, #0EA5E9, #38BDF8); }
.stat-card--teal::before   { background: linear-gradient(90deg, #14B8A6, #34D399); }
.stat-card--amber::before  { background: linear-gradient(90deg, #F59E0B, #FBBF24); }

.stat-card--purple .stat-icon { color: #9B6DF5; }
.stat-card--blue   .stat-icon { color: #38BDF8; }
.stat-card--teal   .stat-icon { color: #34D399; }
.stat-card--amber  .stat-icon { color: #FBBF24; }

.stat-icon {
    font-size: 2.5rem !important;
    width: 2.5rem !important;
    height: 2.5rem !important;
    opacity: 0.9;
}

/* ─── Thin dark scrollbar ─── */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(124, 58, 237, 0.3) transparent;
}

*::-webkit-scrollbar { width: 6px; height: 6px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
    background: rgba(124, 58, 237, 0.3);
    border-radius: 3px;
}
*::-webkit-scrollbar-thumb:hover { background: rgba(124, 58, 237, 0.5); }

/* ─── Table refinements ─── */
.mud-table-head .mud-table-cell {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.6;
}

/* ─── Chip sizing ─── */
.mud-chip.mud-chip-size-small {
    height: 20px;
    font-size: 0.68rem;
}
