﻿/* =========================================
   FSH Modern Design System
   ========================================= */

/* ---------- Active nav link ---------- */
.mud-navmenu.mud-navmenu-default .mud-nav-link.active:not(.mud-nav-link-disabled) {
    color: var(--mud-palette-primary);
    background: linear-gradient(90deg, var(--mud-palette-primary-lighten) 0%, transparent 100%);
    border-left: 3px solid var(--mud-palette-primary);
    border-radius: 0 8px 8px 0;
    font-weight: 600;
}

/* ---------- List borders ---------- */
.mud-list {
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 8px;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--mud-palette-lines-default); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--mud-palette-primary); }

/* ---------- Global smooth transitions ---------- */
*, *::before, *::after {
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

/* ---------- AppBar glass effect ---------- */
.fsh-appbar-glass {
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    background: color-mix(in srgb, var(--mud-palette-surface) 88%, transparent) !important;
    border-bottom: 1px solid var(--mud-palette-lines-default) !important;
    box-shadow: 0 2px 24px 0 rgba(0,0,0,0.06) !important;
}

/* ---------- Brand text gradient ---------- */
.fsh-brand {
    background: linear-gradient(135deg, var(--mud-palette-primary) 0%, var(--mud-palette-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: -0.5px;
}

/* ---------- Sidebar modern look ---------- */
.fsh-drawer {
    border-right: 1px solid var(--mud-palette-lines-default) !important;
    box-shadow: 4px 0 24px 0 rgba(0,0,0,0.06) !important;
}

/* ---------- Nav section label ---------- */
.fsh-nav-section {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    opacity: 0.5;
    padding: 16px 20px 4px;
}

/* ---------- Nav link pill hover ---------- */
.mud-nav-link {
    border-radius: 0 8px 8px 0 !important;
    margin-right: 12px !important;
    transition: all 0.18s ease !important;
}
.mud-nav-link:hover:not(.mud-nav-link-disabled) {
    transform: translateX(2px);
}

/* ---------- Person card in sidebar ---------- */
.fsh-person-card {
    border-bottom: 1px solid var(--mud-palette-lines-default);
    padding: 16px 12px !important;
    margin-bottom: 4px;
}
.fsh-person-card .mud-avatar {
    background: linear-gradient(135deg, var(--mud-palette-primary) 0%, var(--mud-palette-secondary) 100%) !important;
    box-shadow: 0 4px 12px rgba(var(--mud-palette-primary-rgb, 99,102,241), 0.4);
    font-weight: 700;
}

/* ---------- Hero section ---------- */
.fsh-hero {
    background: linear-gradient(135deg, var(--mud-palette-primary-lighten) 0%, var(--mud-palette-secondary-lighten) 100%);
    border-radius: 20px;
    padding: 48px 32px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.fsh-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.07'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

/* ---------- Feature cards ---------- */
.fsh-feature-card {
    border-radius: 16px !important;
    border: 1px solid var(--mud-palette-lines-default) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
    overflow: hidden;
}
.fsh-feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px 0 rgba(0,0,0,0.1) !important;
}

/* ---------- Stat cards ---------- */
.fsh-stat-card {
    border-radius: 16px !important;
    padding: 24px !important;
    text-align: center;
    background: linear-gradient(135deg, var(--mud-palette-primary) 0%, var(--mud-palette-secondary) 100%) !important;
    color: #fff !important;
}
.fsh-stat-number {
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1;
    color: #fff;
}
.fsh-stat-label {
    font-size: 0.8rem;
    opacity: 0.85;
    margin-top: 4px;
    color: #fff;
    letter-spacing: 0.5px;
}

/* ---------- Badge chip ---------- */
.fsh-badge {
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 10px;
    background: var(--mud-palette-primary-lighten);
    color: var(--mud-palette-primary-darken);
    display: inline-block;
    letter-spacing: 0.3px;
}

/* ---------- Section expansion panels ---------- */
.mud-expand-panel {
    border-radius: 12px !important;
    overflow: hidden;
    margin-bottom: 8px !important;
}

/* ---------- Loading screen ---------- */
.fsh-loading-brand {
    font-family: 'Roboto', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
    color: #fff;
    opacity: 0.9;
}

/* ---------- Page transitions ---------- */
.mud-main-content {
    animation: fsh-fadeIn 0.3s ease;
}
@keyframes fsh-fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Gradient border card ---------- */
.fsh-gradient-border {
    position: relative;
    border-radius: 16px;
    background: var(--mud-palette-surface);
}
.fsh-gradient-border::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 17px;
    background: linear-gradient(135deg, var(--mud-palette-primary), var(--mud-palette-secondary));
    z-index: -1;
}

/* ---------- User avatar menu button ---------- */
.fsh-user-avatar {
    border: 2px solid var(--mud-palette-primary);
    border-radius: 50%;
    transition: box-shadow 0.2s ease;
}
.fsh-user-avatar:hover {
    box-shadow: 0 0 0 4px rgba(var(--mud-palette-primary-rgb, 99,102,241), 0.2);
}

/* ---------- Global card radius ---------- */
.mud-card { border-radius: 14px !important; }
.mud-paper { border-radius: 14px !important; }
.mud-table-container { border-radius: 14px !important; }
.mud-chip { border-radius: 8px !important; }

/* ---------- MudBlazor table enhancements ---------- */
.mud-table-head .mud-table-cell {
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    opacity: 0.65;
}

/* ---------- Buttons ---------- */
.mud-button-root {
    border-radius: 10px !important;
    font-weight: 600 !important;
}
.mud-fab { border-radius: 14px !important; }

/* ---------- Drawer clip fix ---------- */
.mud-drawer-content { overflow-x: hidden; }

/* =========================================
   Electric Distribution Utility (EDU) Styles
   ========================================= */

/* ---------- EDU Hero ---------- */
.edu-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0f2922 100%);
    border-radius: 20px;
    padding: 40px 32px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.edu-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 80%, rgba(250,204,21,0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(56,189,248,0.06) 0%, transparent 50%),
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}
.edu-hero-content {
    position: relative;
    z-index: 1;
}

/* ---------- EDU Stat Cards ---------- */
.edu-stat-card {
    border-radius: 16px !important;
    padding: 20px 24px !important;
    border: 1px solid var(--mud-palette-lines-default) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}
.edu-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.08) !important;
}
.edu-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.edu-stat-icon--bill { background: rgba(76,175,80,0.12); color: #4CAF50; }
.edu-stat-icon--due { background: rgba(250,204,21,0.12); color: #eab308; }
.edu-stat-icon--usage { background: rgba(33,150,243,0.12); color: #2196F3; }
.edu-stat-icon--status { background: rgba(34,197,94,0.12); color: #22c55e; }

/* ---------- EDU Large Cards ---------- */
.edu-card-lg {
    border-radius: 16px !important;
    padding: 24px !important;
    border: 1px solid var(--mud-palette-lines-default) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}
.edu-card-lg:hover {
    box-shadow: 0 8px 32px rgba(0,0,0,0.06) !important;
}

/* ---------- EDU Quick Actions ---------- */
.edu-action-btn {
    transition: background 0.15s ease !important;
}
.edu-action-btn:hover {
    background: var(--mud-palette-primary-lighten) !important;
}

/* ---------- EDU History Items ---------- */
.edu-history-item {
    padding: 10px 0;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}
.edu-history-item:last-child {
    border-bottom: none;
}

/* ---------- EDU Emergency Card ---------- */
.edu-emergency-card {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
    border-color: transparent !important;
}

/* ---------- EDU Usage Chart ---------- */
.edu-usage-chart {
    padding: 8px 0;
}
.edu-chart-bars {
    display: flex;
    flex-direction: row-reverse;
    align-items: flex-end;
    gap: 12px;
    height: 160px;
}
.edu-chart-bar-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}
.edu-chart-value {
    font-size: 0.6rem;
    font-weight: 700;
    opacity: 0.5;
    margin-bottom: 4px;
}
.edu-chart-bar-track {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
.edu-chart-bar {
    width: 100%;
    max-width: 32px;
    margin: 0 auto;
    border-radius: 6px 6px 0 0;
    background: var(--mud-palette-primary);
    opacity: 0.6;
    transition: opacity 0.2s ease, transform 0.2s ease;
    min-height: 4px;
}
.edu-chart-bar:hover {
    opacity: 1;
    transform: scaleY(1.02);
    transform-origin: bottom;
}
.edu-chart-bar--current {
    background: linear-gradient(180deg, #facc15 0%, #f59e0b 100%);
    opacity: 1;
    box-shadow: 0 0 12px rgba(250,204,21,0.4);
}
.edu-chart-label {
    font-size: 0.65rem;
    font-weight: 600;
    opacity: 0.5;
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

/* ---------- EDU Pulse Animation ---------- */
@keyframes edu-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ---------- EDU Table ---------- */
.edu-table-wrapper {
    overflow-x: auto;
    border-radius: 12px;
}
.edu-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}
.edu-table thead th {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.5;
    padding: 12px 8px 12px 0;
    text-align: left;
    border-bottom: 1px solid var(--mud-palette-lines-default);
    white-space: nowrap;
}
.edu-table tbody tr {
    border-bottom: 1px solid var(--mud-palette-lines-default);
    transition: background 0.15s ease;
}
.edu-table tbody tr:last-child {
    border-bottom: none;
}
.edu-table tbody tr:hover {
    background: var(--mud-palette-primary-lighten);
}
.edu-table tbody td {
    padding: 12px 8px 12px 0;
    vertical-align: middle;
}

/* ---------- EDU Status Chips ---------- */
.edu-status-chip {
    display: inline-block;
    border-radius: 999px;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 10px;
    height: 20px;
    line-height: 16px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.edu-status-chip--paid {
    background: transparent;
    border: 1px solid var(--mud-palette-primary);
    color: var(--mud-palette-primary);
}
.edu-status-chip--unpaid {
    background: var(--mud-palette-warning);
    color: #fff;
    border: 1px solid var(--mud-palette-warning);
}
.edu-status-chip--overdue {
    background: var(--mud-palette-error);
    color: #fff;
    border: 1px solid var(--mud-palette-error);
}

/* ---------- EDU Table tweaks ---------- */
.text-right { text-align: right; }
.text-center { text-align: center; }

/* ---------- EDU Responsive Usage Chart ---------- */
/* Small screens (xs) - Mobile */
@media (max-width: 599px) {
    .edu-chart-bars-responsive {
        height: 120px;
        gap: 6px;
    }
    .edu-chart-value {
        font-size: 0.5rem;
        margin-bottom: 2px;
    }
    .edu-chart-bar {
        max-width: 20px;
    }
    .edu-chart-label {
        font-size: 0.55rem;
        margin-top: 4px;
    }
    .edu-spline-chart {
        min-height: 280px;
        height: 280px;
    }
}

/* Small to medium screens (sm) - Tablet */
@media (min-width: 600px) and (max-width: 959px) {
    .edu-chart-bars-responsive {
        height: 140px;
        gap: 8px;
    }
    .edu-chart-value {
        font-size: 0.55rem;
        margin-bottom: 3px;
    }
    .edu-chart-bar {
        max-width: 26px;
    }
    .edu-chart-label {
        font-size: 0.6rem;
        margin-top: 5px;
    }
    .edu-spline-chart {
        min-height: 260px;
        height: 260px;
    }
}

/* Medium screens (md) and up - Desktop */
@media (min-width: 960px) {
    .edu-chart-bars-responsive {
        height: 160px;
        gap: 12px;
    }
    .edu-chart-value {
        font-size: 0.6rem;
        margin-bottom: 4px;
    }
    .edu-chart-bar {
        max-width: 32px;
    }
    .edu-chart-label {
        font-size: 0.65rem;
        margin-top: 6px;
    }
    .edu-spline-chart {
        min-height: 220px;
        height: 220px;
    }
}

/* Large screens (lg) - Wide Desktop */
@media (min-width: 1264px) {
    .edu-chart-bars-responsive {
        height: 180px;
        gap: 14px;
    }
    .edu-chart-value {
        font-size: 0.65rem;
        margin-bottom: 4px;
    }
    .edu-chart-bar {
        max-width: 36px;
    }
    .edu-chart-label {
        font-size: 0.7rem;
        margin-top: 7px;
    }
    .edu-spline-chart {
        min-height: 200px;
        height: 200px;
    }
}

