/* ==========================================================================
   AIRDEX Dashboard Theme
   ASP.NET Core MVC Application Styles
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Custom Properties (Theme Variables)
   -------------------------------------------------------------------------- */

:root {
    /* Dark mode (default) */
    --bg-page: #050a0f;
    --bg-gradient-center: #0a1a24;
    --bg-gradient-edge: #030508;
    --bg-card: #0c1820;
    --bg-header: #0a1418;
    --border-color: rgba(0, 180, 180, 0.2);
    --corner-glow: rgba(0, 200, 200, 0.6);
    --label-color: #3dd9d9;
    --value-color: #00d4d4;
    /*--subtext-color: #7a9ab0;*/
    --subtext-color: #ffffff;
    --icon-bg: rgba(0, 180, 180, 0.15);
    --icon-color: #3dd9d9;
    --icon-bg-active: rgba(0, 200, 200, 0.25);
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
    --hover-bg: rgba(0, 180, 180, 0.08);
    --accent-bar: #00d4d4;
}

    :root.light {
        /* Light mode */
        --bg-page: #c8dce8;
        --bg-gradient-center: #f5fafc;
        --bg-gradient-edge: #b8d0e0;
        --bg-card: #ffffff;
        --bg-header: #ffffff;
        --border-color: rgba(100, 160, 200, 0.3);
        --corner-glow: transparent;
        --label-color: #4a5568;
        --value-color: #2b7a9b;
        /*--subtext-color: #718096;*/
        --subtext-color: #1a202c;
        --icon-bg: rgba(43, 122, 155, 0.1);
        --icon-color: #2b7a9b;
        --icon-bg-active: rgba(43, 122, 155, 0.2);
        --shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
        --hover-bg: rgba(43, 122, 155, 0.05);
        --accent-bar: #2b7a9b;
    }

/* --------------------------------------------------------------------------
   Base Reset & Body
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: radial-gradient(ellipse at 50% 50%, var(--bg-gradient-center) 0%, var(--bg-gradient-edge) 100%);
    background-color: var(--bg-page);
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background 0.3s ease;
}

/* --------------------------------------------------------------------------
   Header Bar
   -------------------------------------------------------------------------- */

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: var(--bg-header);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.header-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

    .header-title::before {
        content: '';
        width: 4px;
        height: 28px;
        background: var(--accent-bar);
        border-radius: 2px;
        margin-right: 4px;
    }

    .header-logo {
        height: 32px;
        width: auto;
        object-fit: contain;
        order: -1;
    }

    .header-title h1 {
        font-size: 20px;
        font-weight: 600;
        letter-spacing: 2px;
        color: var(--value-color);
        text-transform: uppercase;
        transition: color 0.3s ease;
    }

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-timestamp {
    font-size: 13px;
    color: var(--subtext-color);
    transition: color 0.3s ease;
}

.header-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--icon-bg);
    color: var(--icon-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 18px;
}

    .header-btn:hover {
        background: var(--icon-bg-active);
    }

    .header-btn svg {
        width: 20px;
        height: 20px;
    }

/* --------------------------------------------------------------------------
   Main Layout Container
   -------------------------------------------------------------------------- */

.layout {
    display: flex;
    flex: 1;
    padding: 16px;
    gap: 16px;
}

/* --------------------------------------------------------------------------
   Navigation Sidebar
   -------------------------------------------------------------------------- */

.nav-sidebar {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 100px;
    height: calc(100vh - 73px - 32px);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

    /* Corner accent styling */
    .nav-sidebar::before,
    .nav-sidebar::after {
        content: '';
        position: absolute;
        width: 40px;
        height: 40px;
        transition: all 0.3s ease;
        pointer-events: none;
    }

    .nav-sidebar::before {
        top: -1px;
        left: -1px;
        border-top: 2px solid var(--corner-glow);
        border-left: 2px solid var(--corner-glow);
        border-top-left-radius: 8px;
    }

    .nav-sidebar::after {
        bottom: -1px;
        right: -1px;
        border-bottom: 2px solid var(--corner-glow);
        border-right: 2px solid var(--corner-glow);
        border-bottom-right-radius: 8px;
    }

/* Navigation sections */
.nav-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 16px 12px;
    gap: 8px;
    overflow-y: auto;
}

.nav-bottom {
    display: flex;
    flex-direction: column;
    padding: 16px 12px;
    gap: 8px;
    border-top: 1px solid var(--border-color);
}

/* Navigation item */
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

    .nav-item:hover {
        background: var(--hover-bg);
    }

    .nav-item.active {
        background: var(--hover-bg);
    }

        .nav-item.active .nav-icon {
            background: var(--icon-bg-active);
        }

/* Icon container */
.nav-icon {
    width: 44px;
    height: 44px;
    background: var(--icon-bg);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 18px;
    color: var(--icon-color);
}

/* Label styling */
.nav-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--label-color);
    text-align: center;
    transition: color 0.3s ease;
}

/* --------------------------------------------------------------------------
   Main Content Area
   -------------------------------------------------------------------------- */

.main-content {
    flex: 1;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    overflow-y: auto;
}

/* --------------------------------------------------------------------------
   Widget Card Component
   -------------------------------------------------------------------------- */

.widget {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 24px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

    /* Corner accent styling for widgets */
    .widget::before,
    .widget::after {
        content: '';
        position: absolute;
        width: 40px;
        height: 40px;
        transition: all 0.3s ease;
    }

    .widget::before {
        top: -1px;
        left: -1px;
        border-top: 2px solid var(--corner-glow);
        border-left: 2px solid var(--corner-glow);
        border-top-left-radius: 8px;
    }

    .widget::after {
        bottom: -1px;
        right: -1px;
        border-bottom: 2px solid var(--corner-glow);
        border-right: 2px solid var(--corner-glow);
        border-bottom-right-radius: 8px;
    }

.widget-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.widget-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--label-color);
    transition: color 0.3s ease;
}

.widget-value {
    font-size: 42px;
    font-weight: 300;
    color: var(--value-color);
    line-height: 1.1;
    transition: color 0.3s ease;
}

.widget-subtext {
    font-size: 13px;
    color: var(--subtext-color);
    margin-top: 4px;
    transition: color 0.3s ease;
}

.widget-icon {
    width: 52px;
    height: 52px;
    background: var(--icon-bg);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 24px;
    color: var(--icon-color);
}

/* --------------------------------------------------------------------------
   Section Headers
   -------------------------------------------------------------------------- */

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

    .section-header::before {
        content: '';
        width: 4px;
        height: 24px;
        background: var(--accent-bar);
        border-radius: 2px;
    }

    .section-header h2 {
        font-size: 18px;
        font-weight: 600;
        color: var(--value-color);
        transition: color 0.3s ease;
    }

.section-subtext {
    font-size: 13px;
    color: var(--subtext-color);
    margin-bottom: 16px;
}

/* --------------------------------------------------------------------------
   Grid Layouts
   -------------------------------------------------------------------------- */

.widget-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

/* --------------------------------------------------------------------------
   Utility Classes
   -------------------------------------------------------------------------- */

.text-muted {
    color: var(--subtext-color);
}

.text-accent {
    color: var(--value-color);
}

.text-label {
    color: var(--label-color);
}

/* --------------------------------------------------------------------------
   Scrollbar Styling
   -------------------------------------------------------------------------- */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: var(--icon-bg-active);
    }


/* --------------------------------------------------------------------------
   Panel Component (Expandable Container with Corner Accents)
   -------------------------------------------------------------------------- */

.panel {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 24px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

    .panel::before,
    .panel::after {
        content: '';
        position: absolute;
        width: 40px;
        height: 40px;
        transition: all 0.3s ease;
        pointer-events: none;
    }

    .panel::before {
        top: -1px;
        left: -1px;
        border-top: 2px solid var(--corner-glow);
        border-left: 2px solid var(--corner-glow);
        border-top-left-radius: 8px;
    }

    .panel::after {
        bottom: -1px;
        right: -1px;
        border-bottom: 2px solid var(--corner-glow);
        border-right: 2px solid var(--corner-glow);
        border-bottom-right-radius: 8px;
    }

/* --------------------------------------------------------------------------
   Welcome / Section Text
   -------------------------------------------------------------------------- */

.welcome-text {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 600;
    color: var(--subtext-color);
    transition: color 0.3s ease;
}

    .welcome-text::before {
        content: '';
        width: 4px;
        height: 24px;
        background: var(--accent-bar);
        border-radius: 2px;
    }

.welcome-subtext {
    display: block;
    font-size: 13px;
    color: var(--subtext-color);
    margin-left: 16px;
    margin-top: 4px;
    transition: color 0.3s ease;
}

/* --------------------------------------------------------------------------
   Breadcrumbs
   -------------------------------------------------------------------------- */

.breadcrumb-wrapper {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 14px;
}

.crumb-separator {
    color: var(--subtext-color);
    opacity: 0.5;
    font-weight: 300;
    user-select: none;
}

.active-crumb a {
    color: var(--value-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

    .active-crumb a:hover {
        color: var(--label-color);
        text-decoration: underline;
    }

.inactive-crumb {
    color: var(--subtext-color);
    font-weight: 500;
}