/* Blazor Boilerplate Core Styles */
h1:focus {
    outline: none;
}
.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}
.invalid {
    outline: 1px solid #e50000;
}
.validation-message {
    color: #e50000;
}
.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI5MC4xODUgOTIuMTgzMSAyOTAuNTQ1IDkyLjc5NSAyOTAuNjU2IDkyLjk5NiBaIiBmaWxsPSIjRkZFNTAwIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L2c+PC9zdmc+) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}
.blazor-error-boundary::after {
    content: "An error has occurred."
}

/* V-Guard Dashboard Design Variables (Black and Dark Yellow/Gold) */
:root {
    --navy: #0f0f0f; /* Primary dark/black for sidebar, headers */
    --navy2: #1e1e1e; /* Secondary dark for card blocks */
    --blue: #f39200; /* Dark yellow/gold primary brand color */
    --blue2: #e6bd00; /* Darker shade of yellow for hover highlights */
    --text: #1a1a1e; /* Main text color */
    --muted: #64748b; /* Muted/secondary text color */
    --line: #e2e8f0; /* Light border lines */
    --bg: #f5f6f9; /* Main workspace background */
    --green: #1aa260;
    --orange: #f5a623;
    --red: #e34d59;
    --purple: #6650d9;
    --cyan: #30a9c5;
}

body {
    font-family: Inter, Segoe UI, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 12px;
    margin: 0;
    padding: 0;
}

.app-container {
    min-height: 100vh;
    display: flex;
}

.sidebar {
    width: 195px;
    flex: 0 0 195px;
    background: linear-gradient(180deg, #06275d, #052252);
    color: #fff;
    padding: 18px 10px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.brand {
    height: 42px;
    background: #0d55bd;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 10px;
    margin: 0 7px 30px;
    font-weight: 800;
    font-size: 17px;
    letter-spacing: .3px;
    color: #fff;
    text-decoration: none;
}

.brand .star {
    width: 30px;
    height: 30px;
    background: #fff;
    color: #1453a9;
    display: grid;
    place-items: center;
    font-size: 21px;
    clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 56%, 79% 92%, 50% 70%, 21% 92%, 32% 56%, 2% 35%, 39% 35%);
}

.nav-title {
    font-size: 10px;
    color: #9eb4d7;
    letter-spacing: .6px;
    margin: 20px 10px 9px;
    text-transform: uppercase;
    font-weight: bold;
}

.nav {
    display: flex;
    flex-direction: column;
}

.nav a {
    height: 38px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #eaf1ff;
    text-decoration: none;
    padding: 0 10px;
    border-radius: 6px;
    margin: 2px 0;
    font-size: 12px;
    transition: all 0.2s ease;
}

.nav a i {
    width: 16px;
    text-align: center;
    color: #d8e6ff;
    font-size: 14px;
}

.nav a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.nav a.active {
    background: linear-gradient(90deg, #1458bb, #0e4aa3);
    box-shadow: inset 3px 0 #4aa0ff;
    color: #fff;
}

/* Main Content Workspace */
.main {
    min-width: 0;
    flex: 1;
    padding: 16px 18px 22px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    min-height: 52px;
}

.title h1 {
    font-size: 20px;
    line-height: 1.2;
    color: #102756;
    font-weight: 750;
    margin: 0;
}

.title p {
    margin-top: 4px;
    color: #42577d;
    font-size: 12px;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    color: #102756;
}

.updated {
    font-size: 10px;
}

.icon-btn {
    font-size: 14px;
    position: relative;
    cursor: pointer;
}

.badge {
    position: absolute;
    right: -6px;
    top: -6px;
    background: #e8495c;
    color: #fff;
    border-radius: 9px;
    font-size: 7px;
    min-width: 12px;
    height: 12px;
    text-align: center;
    line-height: 12px;
}

/* Filter Bar Styling */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 12px;
}

.select {
    background: #fff;
    border: 1px solid #dfe5ee;
    border-radius: 5px;
    height: 43px;
    padding: 7px 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    cursor: pointer;
    flex: 1 1 115px; /* Responsive resizing with min-width base */
    box-sizing: border-box;
}

.select label {
    font-size: 9px;
    color: #7c8ba4;
    margin-bottom: 3px;
}

.select strong {
    font-size: 11px;
    font-weight: 500;
    color: #263a62;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 12px; /* Prevent text overlapping with the arrow */
}

.select i {
    position: absolute;
    right: 9px;
    bottom: 12px;
    color: #607493;
    font-size: 9px;
}

.btn-custom {
    height: 43px;
    border-radius: 5px;
    border: 1px solid #d9e1ee;
    background: #fff;
    color: #17356c;
    font-weight: 700;
    cursor: pointer;
    align-self: center;
    flex: 0 0 85px; /* Keep button widths fixed */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    transition: all 0.2s ease;
}

.btn-custom.apply {
    background: #0d3e88;
    color: #fff;
    border-color: #0d3e88;
}

.btn-custom:hover {
    opacity: 0.9;
}

/* KPI Cards Layout */
.grid-kpi {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}

.kpi {
    background: #fff;
    border: 1px solid #e0e7f0;
    border-radius: 8px;
    min-height: 96px;
    padding: 12px 9px;
    display: grid;
    grid-template-columns: 34px 1fr;
    column-gap: 8px;
    align-items: start;
    box-shadow: 0 1px 4px rgba(24,49,90,0.035);
}

.kpi-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 15px;
}

.i-blue { background: #2f73db; }
.i-green { background: #63b65b; }
.i-purple { background: #7356dc; }
.i-orange { background: #f2a522; }
.i-teal { background: #1aa8a8; }
.i-yellow { background: #dca10d; }
.i-cyan { background: #30a9c5; }

.kpi .label {
    font-size: 9px;
    color: #3c5278;
    line-height: 1.15;
    font-weight: 600;
}

.kpi .value {
    font-size: 18px;
    font-weight: 750;
    color: #10285d;
    margin-top: 6px;
    line-height: 1;
}

.kpi .sub {
    grid-column: 2;
    font-size: 9px;
    margin-top: 7px;
    color: #73819a;
    white-space: nowrap;
}

.up {
    color: #159b5b;
    font-weight: 650;
}

.up i {
    font-size: 8px;
    margin-right: 3px;
}

.down {
    color: #e34d59;
    font-weight: 650;
}

.down i {
    font-size: 8px;
    margin-right: 3px;
}

/* Card Styling */
.card {
    background: #fff;
    border: 1px solid #e0e7f0;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(24, 49, 90, 0.035);
}

.card-title {
    font-size: 12px;
    font-weight: 700;
    color: #10295e;
    padding: 12px 14px 8px;
    border-bottom: none;
    background: transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Dashboard Row Structuring */
.row-main {
    display: grid;
    grid-template-columns: 1.02fr 1.5fr;
    gap: 9px;
    margin-bottom: 9px;
}

.compare {
    padding-bottom: 9px;
}

.compare-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 0 8px 5px;
}

.compare-box {
    border: 1px solid #e6ebf2;
    border-radius: 5px;
    margin: 0 4px;
    padding: 11px 9px 9px;
    min-height: 175px;
}

.compare-box h4 {
    font-size: 10px;
    color: #27406b;
    text-align: center;
    margin-bottom: 8px;
}

.compare-box .line {
    height: 5px;
    background: #edf1f6;
    border-radius: 5px;
    margin: 0 0 13px;
}

.compare-box .line:before {
    content: "";
    display: block;
    width: 100%;
    height: 5px;
    border-radius: 5px;
    background: #edf1f6;
}

.compare-box .small {
    font-size: 9px;
    color: #71819d;
    margin-bottom: 7px;
}

.compare-box .big {
    font-size: 16px;
    font-weight: 750;
    color: #112c66;
    margin-bottom: 15px;
}

.compare-box .delta {
    font-size: 10px;
    font-weight: 700;
}

/* Region styling */
.region-card {
    padding-bottom: 8px;
}

.region-layout {
    display: grid;
    grid-template-columns: 1.18fr 0.9fr;
    gap: 8px;
    padding: 0 10px 6px;
}

.region-table {
    width: 100%;
    border-collapse: collapse;
}

.region-table th {
    font-size: 8px;
    color: #60708b;
    text-align: left;
    padding: 6px 4px;
    border-bottom: 1px solid #edf0f5;
}

.region-table td {
    font-size: 9px;
    color: #20365f;
    padding: 7px 4px;
    border-bottom: 1px solid #f0f2f6;
    white-space: nowrap;
}

.bar-bg {
    display: inline-block;
    width: 66px;
    height: 6px;
    background: #edf1f6;
    border-radius: 6px;
    vertical-align: middle;
    margin-right: 4px;
    overflow: hidden;
}

.bar-bg span {
    display: block;
    height: 100%;
    background: #2374dc;
}

.greenbar {
    background: #63b957 !important;
}

.map-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 205px;
    position: relative;
}

.map-svg {
    width: 145px;
    height: 205px;
    object-fit: contain;
    display: block;
}

.legend {
    font-size: 8px;
    color: #4c5e7a;
    display: grid;
    gap: 7px;
    margin-left: 5px;
}

.legend span {
    display: flex;
    gap: 6px;
    align-items: center;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 2px;
}

/* Charts Grid */
.row-charts {
    display: grid;
    grid-template-columns: 1.12fr 1.12fr 1.25fr;
    gap: 9px;
    margin-bottom: 9px;
}

.chart-card {
    height: 258px;
    overflow: hidden;
}

.chart-area {
    height: 202px;
    padding: 0 10px 8px;
}

.chart-area canvas {
    width: 100% !important;
    height: 100% !important;
}

/* Table Card Formatting */
.product-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 2px;
}

.product-table th {
    font-size: 8px;
    text-align: left;
    color: #586a87;
    padding: 6px 10px;
    border-bottom: 1px solid #e8edf4;
    white-space: nowrap;
}

.product-table td {
    font-size: 9px;
    padding: 7px 10px;
    border-bottom: 1px solid #f0f2f6;
    white-space: nowrap;
}

.product-table tr:last-child td {
    border-bottom: 0;
}

.rank {
    font-weight: 750;
    color: #172f62;
}

.view {
    color: #1769d5;
    font-size: 9px;
    padding: 8px 10px;
    display: block;
    text-decoration: none;
    font-weight: bold;
}

.view:hover {
    text-decoration: underline;
}

/* Bottom Grid Layout */
.bottom-grid {
    display: grid;
    grid-template-columns: 1.12fr 1.12fr 1.25fr;
    gap: 9px;
}

.bottom-card {
    min-height: 235px;
}

.simple-table {
    width: 100%;
    border-collapse: collapse;
}

.simple-table th {
    font-size: 8px;
    text-align: left;
    color: #5c6d88;
    padding: 5px 10px;
    border-bottom: 1px solid #e8edf4;
    white-space: nowrap;
}

.simple-table td {
    font-size: 9px;
    padding: 7px 10px;
    border-bottom: 1px solid #f0f2f6;
    white-space: nowrap;
}

.simple-table tr:last-child td {
    border-bottom: 0;
}

.insights {
    padding-bottom: 8px;
}

/* Custom Alert Styling matching mockup */
.alert-box {
    margin: 5px 9px;
    padding: 8px 9px;
    border: 1px solid #e5ebf3;
    border-radius: 5px;
    display: flex;
    gap: 9px;
    align-items: center;
    font-size: 9px;
    color: #354a70;
}

.alert-box i {
    font-size: 12px;
}

.alert-box.ok i {
    color: #1ba568;
}

.alert-box.warn i {
    color: #f0a51d;
}

.alert-box.bad i {
    color: #e34d59;
}

/* Release Timeline styling */
.release-timeline {
    position: relative;
    padding: 20px 0;
}

.release-item {
    border-left: 2px solid var(--line);
    margin-left: 20px;
    padding-left: 20px;
    position: relative;
    padding-bottom: 20px;
}

.release-item:last-child {
    border-left: none;
    padding-bottom: 0;
}

.release-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--blue);
    position: absolute;
    left: -7px;
    top: 3px;
    border: 2px solid #fff;
}

.release-item.latest .release-dot {
    background: var(--green);
}

.release-header {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 5px;
}

.release-version {
    font-weight: 750;
    font-size: 13px;
    color: var(--navy);
}

.release-date {
    font-style: italic;
}

.release-desc {
    font-size: 11px;
    color: var(--text);
    line-height: 1.4;
}

.release-changes {
    margin-top: 5px;
    padding-left: 15px;
}

.release-changes li {
    margin-bottom: 3px;
}

/* Login styling */
.login-body {
    background: #06275d;
    height: 100vh;
    display: grid;
    place-items: center;
}

.login-card {
    background: #fff;
    border-radius: 8px;
    padding: 30px 25px;
    width: 320px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 25px;
    font-weight: bold;
    font-size: 20px;
    color: var(--navy);
}

.login-logo .star {
    width: 34px;
    height: 34px;
    background: var(--navy);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 23px;
    clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 56%, 79% 92%, 50% 70%, 21% 92%, 32% 56%, 2% 35%, 39% 35%);
}

.login-title {
    font-size: 15px;
    font-weight: bold;
    color: #102756;
    margin-bottom: 18px;
    text-align: center;
}

.login-field {
    margin-bottom: 12px;
}

.login-field label {
    display: block;
    font-size: 10px;
    color: var(--muted);
    margin-bottom: 4px;
    text-transform: uppercase;
}

.login-input {
    width: 100%;
    height: 38px;
    border: 1px solid #dfe5ee;
    border-radius: 4px;
    padding: 0 10px;
    font-size: 11px;
    color: var(--text);
    outline: none;
}

.login-input:focus {
    border-color: var(--blue);
}

.login-error {
    color: var(--red);
    font-size: 10px;
    margin-bottom: 12px;
    text-align: center;
}

/* Media Query Adaptations matching mockup */
@media(max-width: 1350px) {
    .filters {
        grid-template-columns: repeat(5, 1fr);
    }
    .filters .btn-custom {
        grid-column: span 1;
    }
    .grid-kpi {
        grid-template-columns: repeat(4, 1fr);
    }
    .row-charts, .bottom-grid {
        grid-template-columns: 1fr 1fr;
    }
    .row-charts .product-card {
        grid-column: span 2;
    }
}

/* Sidebar Mobile Close Button styling */
.sidebar-close-btn-container {
    display: none;
}

@media(max-width: 950px) {
    .sidebar-close-btn-container {
        display: flex;
        justify-content: flex-end;
        padding: 4px 10px 0;
        width: 100%;
        box-sizing: border-box;
    }
    .btn-close-sidebar {
        background: transparent;
        border: none;
        color: #9eb4d7;
        font-size: 18px;
        cursor: pointer;
        outline: none;
        padding: 4px;
        transition: color 0.2s ease;
    }
    .btn-close-sidebar:hover {
        color: #ffffff;
    }

    .sidebar {
        display: none;
    }
    .sidebar-collapsed .sidebar {
        display: none !important;
    }
    .app-container:not(.sidebar-collapsed) .sidebar {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 1050;
        width: 195px;
        box-shadow: 4px 0 15px rgba(0,0,0,0.15);
    }
    .row-main, .row-charts, .bottom-grid {
        grid-template-columns: 1fr;
    }
    .row-charts .product-card {
        grid-column: auto;
    }
    .region-layout {
        grid-template-columns: 1fr;
    }
    .filters {
        grid-template-columns: repeat(3, 1fr);
    }
    .grid-kpi {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Day/Night (Dark Mode) Custom Variable Overrides */
body.dark-theme {
    --bg: #0d0d0e;
    --text: #f3f4f6;
    --line: #27272a;
    --navy: #18181b;
    --navy2: #27272a;
    --muted: #a1a1aa;
}

body.dark-theme .card,
body.dark-theme .select,
body.dark-theme .compare-box,
body.dark-theme .btn-custom {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}

body.dark-theme .kpi {
    background-color: #1e293b !important;
    border-color: #334155 !important;
}

body.dark-theme .kpi .value,
body.dark-theme .compare-box .big,
body.dark-theme .title h1,
body.dark-theme .card-title,
body.dark-theme .select strong,
body.dark-theme .top-actions {
    color: #f8fafc !important;
}

body.dark-theme .region-table th,
body.dark-theme .product-table th,
body.dark-theme .simple-table th {
    color: #94a3b8 !important;
    border-bottom-color: #334155 !important;
}

body.dark-theme .region-table td,
body.dark-theme .product-table td,
body.dark-theme .simple-table td {
    color: #cbd5e1 !important;
    border-bottom-color: #334155 !important;
}

body.dark-theme .alert-box {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #cbd5e1 !important;
}

body.dark-theme .sidebar {
    background: linear-gradient(180deg, #090d16, #04060b);
}

/* Modern Refactored Login Styling */
.login-container {
    min-height: 100vh;
    display: flex;
    background: radial-gradient(circle at 0% 0%, #0d1e3d 0%, #050f24 100%);
    font-family: 'Inter', sans-serif;
    width: 100%;
}

.login-aside {
    flex: 1;
    background: linear-gradient(135deg, rgba(13, 85, 189, 0.9), rgba(6, 39, 93, 0.95)), url('https://images.unsplash.com/photo-1551836022-d5d88e9218df?q=80&w=1000') no-repeat center center;
    background-size: cover;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px;
    color: #fff;
}

@media (max-width: 768px) {
    .login-aside {
        display: none;
    }
}

.login-aside h2 {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 20px;
}

.login-aside p {
    font-size: 14px;
    color: #d1e2ff;
    line-height: 1.6;
    max-width: 420px;
}

.login-form-section {
    width: 460px;
    flex: 0 0 460px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 50px 60px;
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    position: relative;
}

@media (max-width: 768px) {
    .login-form-section {
        width: 100%;
        flex: 1;
        padding: 40px 30px;
    }
}

.login-brand-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 40px;
}

.login-brand-header .star {
    width: 38px;
    height: 38px;
    background: #0d55bd;
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 24px;
    clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 56%, 79% 92%, 50% 70%, 21% 92%, 32% 56%, 2% 35%, 39% 35%);
}

.login-brand-header span {
    font-weight: 800;
    font-size: 20px;
    color: #06275d;
    letter-spacing: 0.5px;
}

.login-form-section h3 {
    font-size: 22px;
    font-weight: 850;
    color: #0c1c38;
    margin-bottom: 8px;
}

.login-form-section .subtitle {
    color: #64748b;
    font-size: 12px;
    margin-bottom: 30px;
}

.form-group-custom {
    position: relative;
    margin-bottom: 24px;
}

.form-group-custom i {
    position: absolute;
    left: 14px;
    top: 15px;
    color: #94a3b8;
    font-size: 14px;
}

.input-custom {
    width: 100%;
    height: 44px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 0 16px 0 42px;
    font-size: 12px;
    color: #0f172a;
    outline: none;
    transition: all 0.2s ease;
}

.input-custom:focus {
    border-color: #0d55bd;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(13, 85, 189, 0.15);
}

.login-form-section .btn-login {
    width: 100%;
    height: 44px;
    background: #0d55bd;
    border: none;
    border-radius: 6px;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 10px;
    box-shadow: 0 4px 12px rgba(13, 85, 189, 0.25);
}

.login-form-section .btn-login:hover {
    background: #0b49a3;
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(13, 85, 189, 0.35);
}

.login-form-section .btn-login:active {
    transform: translateY(0);
}

.login-footer-info {
    margin-top: auto;
    font-size: 10px;
    color: #94a3b8;
    display: flex;
    justify-content: space-between;
    padding-top: 20px;
}

/* Toast styling for beautiful Success and Error notifications at the bottom */
.toast-container-bottom {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    pointer-events: none;
}

.toast-custom {
    background: #ffffff;
    border-radius: 8px;
    padding: 16px 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    gap: 14px;
    pointer-events: auto;
    min-width: 320px;
    max-width: 400px;
    animation: slideUpFade 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    border-left: 4px solid var(--blue);
}

.toast-custom.success {
    border-left-color: #1aa260;
}

.toast-custom.error {
    border-left-color: #e34d59;
}

.toast-custom i {
    font-size: 18px;
}

.toast-custom.success i {
    color: #1aa260;
}

.toast-custom.error i {
    color: #e34d59;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 700;
    font-size: 12px;
    color: #0f172a;
    margin-bottom: 2px;
}

.toast-msg {
    font-size: 11px;
    color: #64748b;
}

.toast-close {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
}

.toast-close:hover {
    color: #475569;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 3-Level Collapsible Sidebar Navigation Menu */
.nav-lvl1-header {
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #eaf1ff;
    padding: 0 10px;
    border-radius: 6px;
    margin: 2px 0;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}
.nav-lvl1-header:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}
.nav-lvl1-container {
    margin-left: 8px;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    padding-left: 6px;
    margin-bottom: 4px;
}

.nav-lvl2-header {
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #cbdcf7;
    padding: 0 8px;
    border-radius: 4px;
    margin: 2px 0;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}
.nav-lvl2-header:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}
.nav-lvl2-container {
    margin-left: 10px;
    border-left: 1px solid rgba(255, 255, 255, 0.06);
    padding-left: 6px;
    margin-bottom: 2px;
}

.nav-lvl3-item {
    height: 28px;
    display: flex;
    align-items: center;
    color: #a3c2f0;
    text-decoration: none;
    padding: 0 8px;
    border-radius: 4px;
    margin: 1px 0;
    font-size: 10.5px;
    transition: all 0.2s ease;
}
.nav-lvl3-item:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.04);
}
.nav-lvl3-item.active {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-weight: 600;
}

.nav-angle-icon {
    font-size: 8px;
    transition: transform 0.2s ease;
    color: rgba(255, 255, 255, 0.5);
}
.nav-angle-icon.rotated {
    transform: rotate(90deg);
}

/* Interactive Theme Toggle Circle Button */
.theme-toggle-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.theme-toggle-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

.theme-toggle-btn i {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-toggle-btn:hover i {
    transform: rotate(35deg);
}

/* Dark Mode Overrides for Theme Toggle */
body.dark-theme .theme-toggle-btn {
    background: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
}

body.dark-theme .theme-toggle-btn:hover {
    background: #334155;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

/* Collapsible Sidebar Styles & Hamburger Toggle */
.btn-toggle-sidebar {
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 15px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    outline: none;
}

.btn-toggle-sidebar:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--blue2);
}

body.dark-theme .btn-toggle-sidebar:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* Collapsed State Layout Classes */
.sidebar-collapsed .sidebar {
    width: 64px;
    flex: 0 0 64px;
    padding: 18px 4px;
    align-items: center;
}

.sidebar-collapsed .brand {
    margin: 0 4px 30px;
    padding: 0;
    justify-content: center;
    width: 44px;
}

.sidebar-collapsed .brand span:not(.star) {
    display: none !important;
}

.sidebar-collapsed .nav a span,
.sidebar-collapsed .nav-lvl1-header span span,
.sidebar-collapsed .nav-lvl1-header .nav-angle-icon,
.sidebar-collapsed .nav-lvl1-container,
.sidebar-collapsed .version-bottom {
    display: none !important;
}

.sidebar-collapsed .nav a,
.sidebar-collapsed .nav-lvl1-header {
    justify-content: center;
    padding: 0;
    width: 44px;
    height: 38px;
    margin: 6px auto;
}

.sidebar-collapsed .nav a i,
.sidebar-collapsed .nav-lvl1-header i {
    margin: 0;
    font-size: 15px;
    width: 100%;
    text-align: center;
}

/* V-Guard Branding Overrides (Black and Dark Yellow theme) */
.sidebar {
    background: linear-gradient(180deg, #090909, #121212) !important;
    border-right: 1px solid #1c1c1c;
}

.brand {
    background: #090909 !important;
    border: 1px solid #1c1c1c !important;
}

.brand .star {
    background: var(--blue) !important; /* V-Guard Yellow */
    color: #000000 !important; /* Black text */
}

/* Button & Active Link Contrast Controls */
.btn-login, .btn-custom {
    background: var(--blue) !important;
    color: #000000 !important;
    font-weight: 700 !important;
}

.btn-login:hover, .btn-custom:hover {
    background: var(--blue2) !important;
    color: #000000 !important;
}

.nav a.active {
    background: linear-gradient(90deg, var(--blue), var(--blue2)) !important;
    box-shadow: inset 3px 0 #000000 !important;
    color: #000000 !important;
    font-weight: 700;
}

.nav a.active i {
    color: #000000 !important;
}

body.dark-theme .nav a.active {
    box-shadow: inset 3px 0 #ffffff !important;
}

.nav-lvl3-item.active {
    color: var(--blue) !important;
    font-weight: 700 !important;
    background: rgba(255, 210, 0, 0.08) !important;
}

/* Custom Dropdown styling for filters */
.dropdown-menu-custom {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #dfe5ee;
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    z-index: 1050;
    max-height: 180px;
    overflow-y: auto;
    padding: 4px 0;
    display: flex;
    flex-direction: column;
}

.dropdown-item-custom {
    padding: 8px 12px;
    font-size: 11px;
    color: #263a62;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-item-custom:hover {
    background: #f1f5f9;
    color: #102756;
}

.dropdown-item-custom.active {
    background: var(--blue);
    color: #000000;
    font-weight: 600;
}

body.dark-theme .dropdown-menu-custom {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

body.dark-theme .dropdown-item-custom {
    color: #cbd5e1;
}

body.dark-theme .dropdown-item-custom:hover {
    background: #334155;
    color: #ffffff;
}

body.dark-theme .dropdown-item-custom.active {
    background: var(--blue);
    color: #000000;
}

/* Beautiful Count Card Component Styling */
.count-card {
    background: #fff;
    border: 1px solid #dfe5ee;
    border-radius: 8px;
    padding: 12px 14px;
    box-shadow: 0 1px 3px rgba(16, 39, 86, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 105px;
    box-sizing: border-box;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.count-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 39, 86, 0.1);
}

body.dark-theme .count-card {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.count-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.count-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 13px;
    flex-shrink: 0;
}

.count-label {
    font-size: 10px;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1.2;
}

body.dark-theme .count-label {
    color: #94a3b8;
}

.count-value {
    font-size: 18px;
    font-weight: 800;
    color: #102756;
    line-height: 1.15;
    margin-bottom: 6px;
}

body.dark-theme .count-value {
    color: #f8fafc;
}

.count-sub {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 10px;
    font-weight: 600;
    border-top: 1px solid #f1f5f9;
    padding-top: 6px;
    margin-top: auto;
}

body.dark-theme .count-sub {
    border-top-color: #27272a;
}

.count-sub .trend-up {
    color: #169b5b;
    display: flex;
    align-items: center;
    gap: 2px;
}

.count-sub .trend-down {
    color: #e34d59;
    display: flex;
    align-items: center;
    gap: 2px;
}

.count-sub .subtext {
    color: #64748b;
    font-weight: 400;
}

body.dark-theme .count-sub .subtext {
    color: #94a3b8;
}

/* Dark theme overrides for Toast messages */
body.dark-theme .toast-custom {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

body.dark-theme .toast-title {
    color: #f8fafc;
}

body.dark-theme .toast-msg {
    color: #94a3b8;
}