/* ================================================
   GLOBAL STYLES & CSS VARIABLES
   ================================================ */
:root {
    /* Primary Dark Theme Colors */
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-tertiary: rgba(26, 26, 26, 0.8);
    --bg-card: rgba(26, 26, 26, 0.8);
    --bg-card-hover: rgba(26, 26, 26, 0.95);
    /* Accent Colors */
    --accent-primary: #FFC107; /* Yellow */
    --accent-primary-hover: #FFD54F;
    --accent-primary-dark: #F57C00;
    --accent-blue: #00aaff;
    --accent-success: #34c759;
    --accent-danger: #ff3b30;
    --accent-warning: #ff9500;
    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-muted: #888888;
    --text-dim: #666666;
    /* Border Colors */
    --border-color: rgba(255, 255, 255, 0.08);
    --border-subtle: rgba(255, 255, 255, 0.05);
    --border-hover: var(--accent-primary);
    /* Gradients */
    --gradient-dark: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    --gradient-accent: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-primary-dark) 100%);
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.4);
    --shadow-accent: 0 4px 20px rgba(255, 193, 7, 0.3);
}

/* ================================================
   RESET & BASE STYLES
   ================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--gradient-dark);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ================================================
   LAYOUT STRUCTURE
   ================================================ */
.page {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--gradient-dark);
}

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 250px;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-color);
    z-index: 100;
    transition: transform 0.3s ease;
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

        .sidebar.open {
            transform: translateX(0);
        }
}

.main {
    margin-left: 250px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

@media (max-width: 768px) {
    .main {
        margin-left: 0;
    }
}

.top-row {
    background: rgba(26, 26, 26, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    height: 60px;
    display: flex;
    align-items: center;
    padding: 0 2rem;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 99;
}

    .top-row a, .top-row .btn-link {
        color: var(--text-primary);
        text-decoration: none;
        transition: color 0.3s ease;
    }

        .top-row a:hover {
            color: var(--accent-primary);
        }

.content {
    flex: 1;
    padding: 2rem;
}

/* ================================================
   NAVIGATION MENU
   ================================================ */
.nav-menu, .navbar {
    padding: 1.5rem 0;
    background: transparent !important;
}

.navbar-brand {
    color: var(--text-primary) !important;
    font-weight: 700;
    font-size: 1.25rem;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    display: block;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.nav-item {
    position: relative;
}

    .nav-item a, .nav-link {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 0.875rem 1.5rem;
        color: var(--text-secondary) !important;
        text-decoration: none;
        transition: all 0.3s ease;
        border: none;
        background: transparent;
        width: 100%;
        text-align: left;
        font-size: 0.95rem;
        position: relative;
        overflow: hidden;
    }

        .nav-item a::before {
            content: '';
            position: absolute;
            left: 0;
            top: 0;
            bottom: 0;
            width: 3px;
            background: var(--accent-primary);
            transform: translateX(-100%);
            transition: transform 0.3s ease;
        }

        .nav-item a:hover {
            color: var(--text-primary);
            background: rgba(255, 193, 7, 0.1);
        }

            .nav-item a:hover::before {
                transform: translateX(0);
            }

        .nav-item a.active {
            color: var(--accent-primary);
            background: rgba(255, 193, 7, 0.15);
        }

            .nav-item a.active::before {
                transform: translateX(0);
            }

    /* Nav Icons */
    .nav-item .bi, .nav-item .oi {
        font-size: 1.2rem;
        width: 24px;
        text-align: center;
        flex-shrink: 0;
    }

/* ================================================
   TYPOGRAPHY
   ================================================ */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.75rem;
}

h4 {
    font-size: 1.5rem;
}

h5 {
    font-size: 1.25rem;
}

h6 {
    font-size: 1rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

    a:hover {
        color: var(--accent-primary-hover);
        text-decoration: none;
    }

/* ================================================
   BUTTONS
   ================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    border: none;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-accent);
    color: #000;
}

    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-accent);
    }

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

    .btn-secondary:hover {
        background: rgba(255, 255, 255, 0.15);
        border-color: var(--border-hover);
        transform: translateY(-2px);
    }

.btn-success {
    background: var(--accent-success);
    color: white;
}

.btn-danger {
    background: var(--accent-danger);
    color: white;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* ================================================
   FORMS
   ================================================ */
.form-control, .form-select, input[type="text"], input[type="email"], input[type="password"], select, textarea {
    width: 100%;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

    .form-control:focus, .form-select:focus, input:focus, select:focus, textarea:focus {
        outline: none;
        border-color: var(--accent-primary);
        background: rgba(255, 255, 255, 0.08);
        box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.1);
    }

    .form-control::placeholder, input::placeholder, textarea::placeholder {
        color: var(--text-muted);
    }

.form-label, label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
}

/* ================================================
   CARDS
   ================================================ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

    .card:hover {
        transform: translateY(-4px);
        background: var(--bg-card-hover);
        box-shadow: var(--shadow-lg);
        border-color: var(--accent-primary);
    }

.card-header {
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border-color);
}

.card-body {
    padding: 1.25rem;
}

.card-footer {
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid var(--border-color);
}

/* ================================================
   ALERTS
   ================================================ */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid transparent;
}

.alert-success {
    background: rgba(52, 199, 89, 0.1);
    border-color: rgba(52, 199, 89, 0.3);
    color: var(--accent-success);
}

.alert-warning {
    background: rgba(255, 193, 7, 0.1);
    border-color: rgba(255, 193, 7, 0.3);
    color: var(--accent-primary);
}

.alert-danger {
    background: rgba(255, 59, 48, 0.1);
    border-color: rgba(255, 59, 48, 0.3);
    color: var(--accent-danger);
}

.alert-info {
    background: rgba(0, 170, 255, 0.1);
    border-color: rgba(0, 170, 255, 0.3);
    color: var(--accent-blue);
}

/* ================================================
   LOADING & SPINNERS
   ================================================ */
.spinner-border {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    border: 0.25em solid rgba(255, 193, 7, 0.2);
    border-right-color: var(--accent-primary);
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

@keyframes spinner-border {
    to {
        transform: rotate(360deg);
    }
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    color: var(--text-muted);
}

/* ================================================
   SCROLLBAR STYLING
   ================================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: #666;
    }

/* ================================================
   UTILITY CLASSES
   ================================================ */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mt-1 {
    margin-top: 0.25rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-3 {
    margin-top: 1rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

.mt-5 {
    margin-top: 3rem;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.mb-5 {
    margin-bottom: 3rem;
}

.p-1 {
    padding: 0.25rem;
}

.p-2 {
    padding: 0.5rem;
}

.p-3 {
    padding: 1rem;
}

.p-4 {
    padding: 1.5rem;
}

.p-5 {
    padding: 3rem;
}

.gap-1 {
    gap: 0.25rem;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 1rem;
}

.gap-4 {
    gap: 1.5rem;
}

.gap-5 {
    gap: 3rem;
}

.d-none {
    display: none;
}

.d-block {
    display: block;
}

.d-flex {
    display: flex;
}

.d-grid {
    display: grid;
}

.align-items-center {
    align-items: center;
}

.justify-content-center {
    justify-content: center;
}

.justify-content-between {
    justify-content: space-between;
}

/* ================================================
   ANIMATIONS
   ================================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ================================================
   RESPONSIVE UTILITIES
   ================================================ */
@media (max-width: 768px) {
    .content {
        padding: 1rem;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.5rem;
    }
}

/* ================================================
   ACCESSIBILITY
   ================================================ */
*:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}


/* ================================================
   BLAZOR LAYOUT OVERRIDES - Add this to app.css or create as separate file
   ================================================ */

/* Remove default Blazor purple gradients */
.navbar-dark,
.bg-dark,
.navbar {
    background: rgba(26, 26, 26, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: none !important;
}

/* Sidebar Override */
.sidebar,
.navbar-nav {
    background: rgba(26, 26, 26, 0.95) !important;
    background-image: none !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
}

    /* Remove all gradient backgrounds */
    .sidebar .top-row,
    .navbar-brand,
    .nav-item {
        background: transparent !important;
        background-image: none !important;
    }

/* Top row / header bar */
.top-row,
.navbar-light,
.bg-light {
    background: rgba(26, 26, 26, 0.85) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: none !important;
}

/* Brand/Logo text */
.navbar-brand,
.sidebar .navbar-brand {
    color: #ffffff !important;
    font-weight: 700;
    font-size: 1.25rem;
    padding: 1rem 1.5rem !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 1rem;
    background: transparent !important;
}

/* Navigation Links */
.nav-item a,
.nav-link,
.navbar-nav .nav-link {
    color: #cccccc !important;
    background: transparent !important;
    border: none !important;
    position: relative;
    transition: all 0.3s ease;
    padding: 0.875rem 1.5rem !important;
}

    /* Navigation Link Hover */
    .nav-item a:hover,
    .nav-link:hover,
    .navbar-nav .nav-link:hover {
        color: #FFC107 !important;
        background: rgba(255, 193, 7, 0.1) !important;
        text-decoration: none !important;
    }

    /* Active Navigation Link */
    .nav-item a.active,
    .nav-link.active,
    .navbar-nav .nav-link.active {
        color: #FFC107 !important;
        background: rgba(255, 193, 7, 0.15) !important;
        position: relative;
    }

        /* Yellow accent indicator for active nav */
        .nav-item a.active::before,
        .nav-link.active::before {
            content: '';
            position: absolute;
            left: 0;
            top: 0;
            bottom: 0;
            width: 3px;
            background: #FFC107;
        }

    /* Icons in navigation */
    .nav-item .oi,
    .nav-item .bi,
    .nav-link .oi,
    .nav-link .bi {
        color: currentColor !important;
        margin-right: 0.75rem;
        width: 20px;
        display: inline-block;
        text-align: center;
    }

/* Top row links */
.top-row a,
.top-row .btn-link {
    color: #ffffff !important;
    text-decoration: none;
    transition: color 0.3s ease;
}

    .top-row a:hover {
        color: #FFC107 !important;
    }

/* Remove box shadows */
.sidebar,
.navbar,
.top-row {
    box-shadow: none !important;
}

/* Responsive sidebar toggle */
.navbar-toggler {
    background: rgba(255, 193, 7, 0.1) !important;
    border: 1px solid rgba(255, 193, 7, 0.3) !important;
    color: #FFC107 !important;
}

    .navbar-toggler:hover {
        background: rgba(255, 193, 7, 0.2) !important;
    }

/* Make sure all text is visible */
* {
    color-scheme: dark;
}

/* Override any default white backgrounds */
.bg-white {
    background: #1a1a1a !important;
}

/* Override any light colors */
.text-dark {
    color: #ffffff !important;
}

.text-muted {
    color: #888888 !important;
}

/* Ensure content area has proper background */
.main .content {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

/* Remove any bootstrap default link colors */
a {
    color: #FFC107;
}

    a:hover {
        color: #FFD54F;
    }