:root {
    --primary-color: #1b6ec2;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --sidebar-width: 280px;
    --navbar-height: 60px;
    --transition-speed: 0.3s;
}

[data-theme="dark"] {
    --bg-color: #1a1a1a;
    --surface-color: #2d2d2d;
    --text-color: #ffffff;
    --text-secondary: #b3b3b3;
    --border-color: #404040;
    --hover-color: #404040;
}

/* Theme-based body backgrounds - matching auth pages */
body[data-theme="light"] {
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
}

body[data-theme="dark"] {
    background:
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.15) 0%, transparent 50%),
        linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
}

.app-container {
    background-color: transparent;
}

[data-theme="light"] {
    --bg-color: #ffffff;
    --surface-color: #f8f9fa;
    --text-color: #212529;
    --text-secondary: #6c757d;
    --border-color: #dee2e6;
    --hover-color: #e9ecef;
}

* {
    box-sizing: border-box;
}

/* Remove unwanted focus outlines that cause black boxes */
h1,
h2,
h3,
h4,
h5,
h6 {
    outline: none;
}

h1:focus,
h2:focus,
h3:focus,
h4:focus,
h5:focus,
h6:focus {
    outline: none;
}

/* Ensure proper focus styles for interactive elements only */
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Remove default focus outline for non-interactive elements */
div:focus,
span:focus,
p:focus {
    outline: none;
}

html,
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    height: 100%;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* Top Navigation Bar - Enhanced for gradient backgrounds */
.top-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--navbar-height);
    background: rgba(112, 184, 243, 0.152);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    padding: 0 1rem;
    z-index: 1000;
    transition: all var(--transition-speed);
}

[data-theme="dark"] .top-navbar {
    background: rgba(26, 26, 46, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
    text-decoration: none;
}

.navbar-brand:hover {
    color: rgba(255, 255, 255, 0.8);
}

[data-theme="dark"] .navbar-brand {
    color: white;
}

[data-theme="dark"] .navbar-brand:hover {
    color: rgba(255, 255, 255, 0.8);
}

.brand-logo {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

.site-name {
    color: white;
}

[data-theme="dark"] .site-name {
    color: white;
}

.navbar-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.menu-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.75rem;
    border-radius: 4px;
    transition: background-color var(--transition-speed);
    position: relative;
    z-index: 1001;
    pointer-events: auto;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.menu-toggle:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Mobile-specific styles for better touch interaction */
@media (max-width: 768px) {
    .menu-toggle {
        padding: 1rem;
        min-width: 48px;
        min-height: 48px;
        font-size: 1.5rem;
    }

    .menu-toggle:active {
        background-color: rgba(255, 255, 255, 0.3);
        transform: scale(0.95);
    }
}

[data-theme="dark"] .menu-toggle {
    color: white;
}

[data-theme="dark"] .menu-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.theme-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color var(--transition-speed);
}

.theme-toggle:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .theme-toggle {
    color: white;
}

[data-theme="dark"] .theme-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.user-menu {
    position: relative;
}

.user-menu-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color var(--transition-speed);
}

.user-menu-toggle:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .user-menu-toggle {
    color: white;
}

[data-theme="dark"] .user-menu-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.user-menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-speed);
}

.user-menu-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    transition: background-color var(--transition-speed);
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    justify-content: flex-start;
    box-sizing: border-box;
}

.user-menu-item:hover {
    background-color: var(--hover-color);
}

.user-menu-item:first-child {
    border-radius: 6px 6px 0 0;
}

.user-menu-item:last-child {
    border-radius: 0 0 6px 6px;
}

/* Main Content Area */
.main-content {
    display: flex;
    margin-top: var(--navbar-height);
    height: calc(100vh - var(--navbar-height));
}

/* Sidebar - Enhanced for gradient backgrounds */
.sidebar {
    width: var(--sidebar-width);
    backdrop-filter: blur(10px);
    background: rgba(112, 184, 243, 0.152);
    transform: translateX(0);
    transition: transform var(--transition-speed);
    overflow-y: auto;
    position: fixed;
    height: calc(100vh - var(--navbar-height));
    z-index: 999;
}

[data-theme="dark"] .sidebar {
    background: rgba(22, 33, 62, 0.95);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar.hidden {
    transform: translateX(-100%);
}

.sidebar.show {
    transform: translateX(0);
}

.sidebar-nav {
    padding: 1rem 0;
}

.nav-item {
    margin: 0.25rem 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: white;
    text-decoration: none;
    transition: all var(--transition-speed);
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    border-left: 4px solid transparent;
    position: relative;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

[data-theme="dark"] .nav-link {
    color: white;
}

[data-theme="dark"] .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-link.active {
    background-color: rgba(255, 255, 255, 0.3);
    color: white;
    font-weight: 600;
    border-left: 4px solid white;
    padding-left: calc(1.5rem - 4px);
}

.nav-submenu .nav-link.active {
    background-color: rgba(255, 255, 255, 0.3);
    color: white;
    font-weight: 500;
    border-left: 4px solid white;
    padding-left: calc(3rem - 4px);
}

[data-theme="dark"] .nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

[data-theme="dark"] .nav-submenu .nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.nav-link .icon {
    width: 20px;
    text-align: center;
}

.nav-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-speed);
    background: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .nav-submenu {
    background: rgba(0, 0, 0, 0.2);
}

.nav-submenu.expanded {
    max-height: 500px;
}

.nav-submenu .nav-link {
    padding-left: 3rem;
    font-size: 0.9rem;
}

.nav-toggle {
    margin-left: auto;
    transition: transform var(--transition-speed);
}

.nav-toggle.expanded {
    transform: rotate(90deg);
}

/* Content Area */
.content-area {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 2rem;
    overflow-y: auto;
    transition: margin-left var(--transition-speed);
}

.content-area.sidebar-hidden {
    margin-left: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        background: rgba(27, 110, 194, 0.95) !important;
        backdrop-filter: blur(15px);
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    }

    [data-theme="dark"] .sidebar {
        background: rgba(22, 33, 62, 0.98) !important;
        backdrop-filter: blur(15px);
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.4);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .content-area {
        margin-left: 0;
    }

    .navbar-brand .site-name {
        display: none;
    }
}

@media (max-width: 480px) {
    .content-area {
        padding: 1rem;
    }

    .navbar-actions {
        gap: 0.5rem;
    }
}

/* Form Styles */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-color);
    transition: border-color var(--transition-speed);
}

[data-theme="dark"] .form-control {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-color);
}

[data-theme="dark"] .form-control:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-color);
}

[data-theme="dark"] .form-control::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(27, 110, 194, 0.25);
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all var(--transition-speed);
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #155a9c;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #545b62;
}

.btn-outline-primary {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Card Styles - Enhanced for gradient backgrounds */
.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .card {
    background: rgba(45, 45, 45, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-color);
}

.card-header {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
}

/* Chart Styles */
.chart-container {
    position: relative;
    height: 400px;
    margin: 1rem 0;
}

.chart-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background-color: var(--surface-color);
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mt-3 {
    margin-top: 1rem;
}

.p-3 {
    padding: 1rem;
}

.d-flex {
    display: flex;
}

.align-items-center {
    align-items: center;
}

.justify-content-between {
    justify-content: space-between;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 1rem;
}

/* Error Handling */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid var(--success-color);
}

.invalid {
    outline: 1px solid var(--danger-color);
}

.validation-message {
    color: var(--danger-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

.loading-progress circle {
    fill: none;
    stroke: #e0e0e0;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: #1b6ec2;
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Loading");
}

code {
    color: #c02d76;
}

.form-floating>.form-control-plaintext::placeholder,
.form-floating>.form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating>.form-control-plaintext:focus::placeholder,
.form-floating>.form-control:focus::placeholder {
    text-align: start;
}

/ * Authentication Layout */ .auth-container {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
}

.auth-content {
    width: 100%;
    max-width: 400px;
    z-index: 1;
}

.auth-theme-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.75rem;
    border-radius: 50%;
    backdrop-filter: blur(10px);
    transition: all var(--transition-speed);
    z-index: 1000;
}

.auth-theme-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Auth page specific card styling */
.auth-container .card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .auth-container .card {
    background: rgba(45, 45, 45, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-color);
}

[data-theme="dark"] .auth-container .form-control {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-color);
}

[data-theme="dark"] .auth-container .form-control:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-color);
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mt-3 {
    margin-top: 1rem;
}

.p-3 {
    padding: 1rem;
}

.d-flex {
    display: flex;
}

.align-items-center {
    align-items: center;
}

.justify-content-between {
    justify-content: space-between;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 1rem;
}

/* A
uthentication Layout */
.auth-container {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
}

.auth-logo {
    text-align: center;
    margin-bottom: 2rem;
    z-index: 1;
}

.auth-brand-logo {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 2rem;
    margin: 0 auto 1rem;
    backdrop-filter: blur(10px);
}

.auth-brand-title {
    color: white;
    font-size: 2rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.auth-brand-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.auth-content {
    width: 100%;
    max-width: 400px;
    z-index: 1;
}

.auth-theme-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.75rem;
    border-radius: 50%;
    backdrop-filter: blur(10px);
    transition: all var(--transition-speed);
    z-index: 1000;
}

.auth-theme-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Auth page specific card styling */
.auth-container .card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .auth-container .card {
    background: rgba(45, 45, 45, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-color);
}

[data-theme="dark"] .auth-container .form-control {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-color);
}

[data-theme="dark"] .auth-container .form-control:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-color);
}

[data-theme="dark"] .auth-container .form-control::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

/* Responsive auth layout */
@media (max-width: 480px) {
    .auth-container {
        padding: 1rem;
    }

    .auth-brand-logo {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .auth-brand-title {
        font-size: 1.5rem;
    }

    .auth-brand-subtitle {
        font-size: 0.9rem;
    }
}

/*
 Authentication Layout Styles */
.auth-container {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
}

.auth-logo {
    text-align: center;
    margin-bottom: 2rem;
    z-index: 1;
}

.auth-brand-logo {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 2rem;
    margin: 0 auto 1rem;
    backdrop-filter: blur(10px);
}

.auth-brand-title {
    color: white;
    font-size: 2rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.auth-brand-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.auth-content {
    width: 100%;
    max-width: 400px;
    z-index: 1;
}

.auth-theme-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.75rem;
    border-radius: 50%;
    backdrop-filter: blur(10px);
    transition: all var(--transition-speed);
    z-index: 1000;
}

.auth-theme-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Auth page specific card styling */
.auth-container .card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

[data-theme="dark"] .auth-container .card {
    background: rgba(45, 45, 45, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-color);
}

[data-theme="dark"] .auth-container .form-control {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-color);
}

[data-theme="dark"] .auth-container .form-control:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-color);
}

[data-theme="dark"] .auth-container .form-control::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

[data-theme="dark"] .auth-container .text-secondary {
    color: rgba(255, 255, 255, 0.7) !important;
}

[data-theme="dark"] .auth-container .card-title {
    color: var(--text-color);
}

/* Responsive auth layout */
@media (max-width: 480px) {
    .auth-container {
        padding: 1rem;
    }

    .auth-brand-logo {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .auth-brand-title {
        font-size: 1.5rem;
    }

    .auth-brand-subtitle {
        font-size: 0.9rem;
    }

    .auth-content {
        max-width: 100%;
    }
}

/ * PWA Install Menu Item Styling */ .user-menu-item.install-app {
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    color: white !important;
    font-weight: 500;
}

.user-menu-item.install-app:hover {
    background: linear-gradient(135deg, #155a9c, #138496);
}

[data-theme="dark"] .user-menu-item.install-app {
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
}

[data-theme="dark"] .user-menu-item.install-app:hover {
    background: linear-gradient(135deg, #2080d0, #20b2c4);
}

/* Addit
ional focus and outline fixes */
.card-title:focus,
.card-header:focus,
.navbar-brand:focus {
    outline: none;
}

/* Prevent text selection issues that might cause visual artifacts */
.card-title,
.navbar-brand,
.auth-brand-title {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Ensure smooth rendering and prevent visual glitches */
.card,
.auth-container,
.top-navbar {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Fix any potential z-index issues */
.auth-theme-toggle {
    pointer-events: auto;
}

/* Ensure proper stacking context */
.auth-container {
    isolation: isolate;
}

/* E
nhanced Loading Screen Styles */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background: linear-gradient(135deg, #1b6ec2, #17a2b8);
    padding: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Animated background elements */
.loading-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    animation: float 6s ease-in-out infinite;
    z-index: 1;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

.loading-logo {
    margin-bottom: 2rem;
    z-index: 2;
    position: relative;
}

.logo-icon {
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.2);
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 3rem;
    backdrop-filter: blur(10px);
    animation: pulse 2s ease-in-out infinite;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.loading-title {
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 2;
    position: relative;
    animation: fadeInUp 1s ease-out;
}

.loading-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin: 0 0 3rem 0;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
    z-index: 2;
    position: relative;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.loading-progress-wrapper {
    margin-bottom: 2rem;
    z-index: 2;
    position: relative;
    animation: fadeInUp 1s ease-out 0.4s both;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-progress {
    width: 120px;
    height: 120px;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.3));
    position: relative;
}

.loading-percentage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    z-index: 3;
}

.loading-progress circle {
    fill: none;
    stroke: rgba(255, 255, 255, 0.2);
    stroke-width: 0.3rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: white;
    stroke-width: 0.3rem;
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.1s ease-in-out;
    stroke-linecap: round;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.5));
}

/* Enhanced loading progress with glow effect */
.loading-progress circle:last-child {
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        stroke: rgba(255, 255, 255, 0.9);
        filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.3));
    }

    to {
        stroke: rgba(255, 255, 255, 1);
        filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.6));
    }
}

.loading-progress-text {
    color: white;
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 2rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    z-index: 2;
    position: relative;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Loading");
}

.loading-version {
    position: absolute;
    bottom: 2rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    z-index: 2;
    animation: fadeInUp 1s ease-out 0.8s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive loading screen */
@media (max-width: 480px) {
    .loading-container {
        padding: 1rem;
    }

    .logo-icon {
        width: 80px;
        height: 80px;
        font-size: 2rem;
        border-radius: 20px;
    }

    .loading-title {
        font-size: 2rem;
    }

    .loading-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .loading-progress {
        width: 90px;
        height: 90px;
    }

    .loading-percentage {
        font-size: 1rem;
    }
}

/* Enhanc
ed Loading Screen Styles */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background: linear-gradient(135deg, #1b6ec2, #17a2b8);
    padding: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Animated background elements */
.loading-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    animation: float 6s ease-in-out infinite;
    z-index: 1;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

.loading-logo {
    margin-bottom: 2rem;
    z-index: 2;
    position: relative;
}

.logo-icon {
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.2);
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 3rem;
    backdrop-filter: blur(10px);
    animation: pulse 2s ease-in-out infinite;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.loading-title {
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 2;
    position: relative;
    animation: fadeInUp 1s ease-out;
}

.loading-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin: 0 0 3rem 0;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
    z-index: 2;
    position: relative;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.loading-progress-wrapper {
    margin-bottom: 2rem;
    z-index: 2;
    position: relative;
    animation: fadeInUp 1s ease-out 0.4s both;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-progress {
    width: 120px;
    height: 120px;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.3));
    position: relative;
}

.loading-percentage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.4rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    z-index: 3;
    pointer-events: none;
}

.loading-progress circle {
    fill: none;
    stroke: rgba(255, 255, 255, 0.2);
    stroke-width: 0.3rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: white;
    stroke-width: 0.3rem;
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.1s ease-in-out;
    stroke-linecap: round;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.5));
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        stroke: rgba(255, 255, 255, 0.9);
        filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.3));
    }

    to {
        stroke: rgba(255, 255, 255, 1);
        filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.6));
    }
}

.loading-progress-text {
    color: white;
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 2rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    z-index: 2;
    position: relative;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Loading");
}

.loading-version {
    position: absolute;
    bottom: 2rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    z-index: 2;
    animation: fadeInUp 1s ease-out 0.8s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive loading screen */
@media (max-width: 480px) {
    .loading-container {
        padding: 1rem;
    }

    .logo-icon {
        width: 80px;
        height: 80px;
        font-size: 2rem;
        border-radius: 20px;
    }

    .loading-title {
        font-size: 2rem;
    }

    .loading-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .loading-progress {
        width: 90px;
        height: 90px;
    }

    .loading-percentage {
        font-size: 1.1rem;
    }
}