﻿:root {
    --sb-bg: #1F2A3D;
    --sb-bg-hover: rgba(255,255,255,0.10);
    --sb-bg-active: rgba(255,255,255,0.16);
    --sb-border: rgba(255,255,255,0.12);
    --sb-text: rgba(255,255,255,0.75);
    --sb-text-active: #FFFFFF;
    --sb-label: rgba(255,255,255,0.40);
    --bg: #F5F4F0;
    --surface: #FFFFFF;
    --border: rgba(0,0,0,0.07);
    --text-1: #1E1D1A;
    --text-2: #4A4843;
    --text-3: #8C8880;
    --teal-50: #E8F5F1;
    --teal-100: #C5E8DC;
    --teal-500: #2FA882;
    --teal-700: #354D65;
    --teal-900: #0D4A38;
    --navy-50: #EEF1F6; /* very light navy-tinted white — panels, subtle backgrounds */
    --navy-100: #D7DEEA; /* light navy tint — borders, hover states */
    --navy-500: #3B5B85; /* vivid mid navy-blue — buttons, links, active states */
    --navy-700: #1F2A3D; /* your anchor — main panel/sidebar background */
    --navy-900: #121721; /* near-black navy — darkest text, high-contrast surfaces */
    --warm-100: #F2F1EE;
    --r-md: 12px;
    --r-lg: 16px;
    --r-xl: 20px;
    --shadow-sm: 0 1px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 3px 16px rgba(0,0,0,0.09);
    --red-700: #A83030;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    font-family: 'Nunito Sans', sans-serif;
    background: var(--bg);
    color: var(--text-1);
    margin: 0;
    padding: 0;
    height: 100%;
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ── APP SHELL ── */
.page {
    display: flex;
    min-height: 100vh;
}

/* ── SIDEBAR ── */
.sidebar {
    width: 234px;
    flex-shrink: 0;
    background: #1F2A3D !important;
    display: flex;
    flex-direction: column;
    padding: 28px 0 24px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

/* ── MAIN CONTENT ── */
main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    unicode-bidi: normal;
}

.top-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    padding: 10px 28px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-2);
    min-height: 48px;
}

    .top-row a {
        color: var(--text-3);
        text-decoration: none;
        font-size: 13px;
    }

        .top-row a:hover {
            color: var(--text-1);
        }

.content {
    flex: 1;
    padding: 32px 36px 48px;
    max-width: 1280px;
    width: 100%;
}

/* ── NAV MENU ── */
.nav-brand {
    padding: 0 22px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
    margin-bottom: 18px;
}

.nav-brand-name {
    font-family: 'Nunito', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: #FFFFFF;
    letter-spacing: -0.02em;
    line-height: 1;
    text-decoration: none;
    display: block;
}

.nav-brand-sub {
    font-size: 12px;
    color: var(--sb-label);
    margin-top: 6px;
    font-weight: 400;
    text-align:center;
}

.nav-section {
    padding: 0 14px;
    margin-bottom: 10px;
}

.nav-section-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--sb-label);
    padding: 0 8px;
    margin-bottom: 5px;
    display: block;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 11px;
    border-radius: var(--r-md);
    font-size: 14px;
    color: var(--sb-text);
    text-decoration: none;
    transition: all 0.15s;
    font-weight: 500;
    margin-bottom: 2px;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

    .nav-item:hover {
        background: var(--sb-bg-hover);
        color: #fff;
    }

    .nav-item.active {
        background: var(--sb-bg-active);
        color: var(--sb-text-active);
        font-weight: 700;
    }

.nav-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.nav-badge {
    margin-left: auto;
    font-size: 10px;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 999px;
    background: rgba(255,255,255,0.25);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}

.nav-footer {
    margin-top: auto;
    padding: 18px 22px 0;
    border-top: 1px solid rgba(255,255,255,0.12);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px;
    border-radius: var(--r-md);
    cursor: pointer;
    transition: background 0.15s;
    text-decoration: none;
}

    .nav-user:hover {
        background: var(--sb-bg-hover);
    }

.nav-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.20);
    border: 1.5px solid rgba(255,255,255,0.30);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.nav-user-name {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.nav-user-plan {
    font-size: 12px;
    color: var(--sb-label);
}

/* ── CARDS ── */
.hb-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: 20px 22px;
    box-shadow: var(--shadow-sm);
}

/* ── ERROR UI ── */
#blazor-error-ui {
    background: #FEF0F0;
    border-top: 1px solid #FACECE;
    bottom: 0;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.08);
    display: none;
    left: 0;
    padding: 12px 20px;
    position: fixed;
    width: 100%;
    z-index: 1000;
    font-size: 13px;
    color: #A83030;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 16px;
        top: 12px;
        font-weight: 700;
    }

.blazor-error-boundary {
    background: #FEF0F0;
    border-radius: var(--r-md);
    padding: 16px;
    color: #A83030;
}

    .blazor-error-boundary::after {
        content: "An error has occurred.";
    }

/* ── UTILITIES ── */
.page-title {
    font-family: 'Nunito', sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: var(--text-1);
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.page-sub {
    font-size: 14px;
    color: var(--text-3);
    margin-bottom: 28px;
}

.hb-btn-danger {
    background: var(--red-700);
    color: #fff;
    border: none;
    border-radius: var(--r-md);
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 700;
    font-family: 'Nunito Sans', sans-serif;
    cursor: pointer;
    transition: background 0.15s;
}

.hb-btn-danger:hover {
    background: #8a2020;
}


.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2147483647;
}

.modal-card {
    background: var(--surface-1);
    border-radius: 12px;
    padding: 28px;
    max-width: 440px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

.modal-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-1);
    margin-bottom: 12px;
}

.modal-body {
    margin-bottom: 20px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}