/* ACA Professional Design System - High Clarity Dark Theme */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&family=Outfit:wght@300;400;500;600&display=swap');

:root {
    /* High Clarity Palette */
    --color-base-bg: #050505;
    /* Deepest Black */
    --color-surface-bg: #121212;
    /* Distinct Surface */
    --color-surface-hover: #1E1E1E;
    /* Lighter Surface for interaction */

    /* Brand Accents - Kept Vivid but Readable */
    --color-accent: #38bdf8;
    /* Sky Blue */
    --color-accent-hover: #0ea5e9;
    --color-brand-gold: #fbbf24;
    /* Warn/Highlight */

    /* Text Colors - Strict Palette (White, Blue, Gold) */
    --color-text-primary: #FFFFFF;
    /* Pure White */
    --color-text-secondary: #E5E5E5;
    /* Slightly off-white for body */
    --color-text-muted: #A0A0A0;
    /* Brightened Grey for readability */

    /* Structural Separation */
    --color-border: #262626;
    /* Visible dark border */
    --color-border-hover: #404040;

    /* Functional */
    --bg-body: var(--color-base-bg);
    --bg-card: var(--color-surface-bg);
    --bg-input: #000000;

    /* Shadows & Effects */
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --border-radius: 8px;

    /* Transitions */
    --transition-base: 0.2s ease-in-out;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-body);
    color: var(--color-text-secondary) !important;
    font-family: 'Outfit', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

.dashboard-main {
    margin-left: 0;
    width: 100%;
    padding: 2rem;
    /* Ensure padding on mobile */
}

@media (min-width: 993px) {
    .dashboard-main {
        margin-left: 260px;
        width: calc(100% - 260px);
        padding: 4rem;
        /* Increased padding on desktop for better breathing room */
    }
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Montserrat', sans-serif;
    color: var(--color-text-primary);
    font-weight: 600;
    margin-bottom: 1rem;
    line-height: 1.3;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-base);
}

ul {
    list-style: none;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.text-gold {
    color: var(--color-brand-gold);
}

.text-blue {
    color: var(--color-accent);
}

.text-muted {
    color: var(--color-text-muted) !important;
}

.text-white {
    color: var(--color-text-primary) !important;
}

.text-white-50 {
    color: rgba(255, 255, 255, 0.5) !important;
}

.text-center {
    text-align: center;
}

/* Section Headers */
.section-title {
    font-size: 2.25rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--color-text-primary);
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--color-accent);
    border-radius: 2px;
}

/* Header */
header {
    background: rgba(5, 5, 5, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    height: 45px;
    width: auto;
    border-radius: 4px;
}

.logo-brand {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    color: var(--color-text-primary);
    letter-spacing: -0.5px;
}

.logo-motto {
    display: block;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    font-weight: 400;
    margin-top: 2px;
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-links li a {
    color: var(--color-text-secondary);
    /* High visibility off-white */
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.2s;
}

.nav-links li a:hover,
.nav-links li a.active {
    color: var(--color-accent);
}

.nav-links li a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--color-accent);
}

/* Hero Section */
.hero {
    min-height: 85vh;
    display: flex;
    align-items: center;
    padding: 80px 0;
    background: linear-gradient(rgba(5, 5, 5, 0.85), rgba(5, 5, 5, 0.95)), url('https://images.unsplash.com/photo-1523050854058-8df90110c9f1?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80') center/cover no-repeat fixed;
    border-bottom: 1px solid var(--color-border);
}

.hero-content {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    font-weight: 700;
    color: var(--color-text-primary);
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--color-text-secondary);
    /* Ensure readability against background */
    max-width: 700px;
    margin: 0 auto 2.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.btn-primary {
    background-color: var(--color-accent);
    color: #000000;
    /* Max contrast on blue */
}

.btn-primary:hover {
    background-color: var(--color-accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.4);
}

.btn-secondary {
    background-color: transparent;
    border-color: var(--color-text-secondary);
    color: var(--color-text-primary);
}

.btn-secondary:hover {
    border-color: var(--color-text-primary);
    background-color: rgba(255, 255, 255, 0.1);
}

/* Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    /* Reduced from 350px for mobile */
    gap: 40px;
    margin-top: 3rem;
    margin-bottom: 3rem;
}

/* ... existing styles ... */

/* Mobile Responsiveness Overrides */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
        /* Reduce side padding */
    }

    .dashboard-main {
        padding: 1.5rem !important;
        /* Reduce dashboard padding */
    }

    .hero-content h1 {
        font-size: 2.5rem;
        /* Smaller hero title */
    }

    .section-title {
        font-size: 1.75rem;
        margin-bottom: 2rem;
    }

    /* Force single column for grids on very small screens if needed, 
       though 280px minmax handles most. 
       Let's ensure cards fit nicely. */

    .glass-card {
        padding: 1.5rem !important;
        /* Reduce card padding */
    }

    .card.glass-card .card-body {
        padding: 1.5rem !important;
    }

    .footer-grid {
        gap: 30px;
    }

    /* Ensure flex containers wrap */
    .d-flex,
    .nav-links,
    .hero-content>div {
        flex-wrap: wrap;
    }

    /* Adjust button sizes if needed */
    .btn {
        padding: 10px 20px;
        font-size: 0.95rem;
        width: 100%;
        /* Full width buttons on mobile often look better */
        margin-bottom: 10px;
    }

    /* Prevent horizontal overflow */
    body,
    html {
        overflow-x: hidden;
    }
}

.card {
    background-color: var(--bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: 3rem;
    /* Increased spacing */
    transition: var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-border-hover);
    background-color: var(--color-surface-hover);
}

.card h3 {
    margin-bottom: 1rem;
    font-size: 1.35rem;
    color: var(--color-text-primary);
}

.card p {
    color: var(--color-text-secondary);
}

.card-icon {
    font-size: 2.5rem;
    color: var(--color-accent);
    margin-bottom: 1.5rem;
    display: inline-block;
}

/* Forms */
input,
select {
    width: 100%;
    height: 50px;
    /* Explicit fixed height */
    padding: 10px 18px;
    /* Adjusted padding */
    background-color: var(--bg-input);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    color: var(--color-text-primary);
    font-size: 1rem;
    font-family: inherit;
    margin-bottom: 1.5rem;
    transition: var(--transition-base);
}

textarea {
    width: 100%;
    padding: 14px 18px;
    background-color: var(--bg-input);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    color: var(--color-text-primary);
    font-size: 1rem;
    font-family: inherit;
    margin-bottom: 1.5rem;
    transition: var(--transition-base);
}

/* Toggle Password Button */
.input-group .toggle-password {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--color-border);
    border-left: none;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all 0.3s;
    z-index: 5;
    height: 50px;
    /* Match Input Height Exactly */
    width: 50px;
    /* Square creates a nice touch target */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    /* Remove padding to center icon */
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

input::placeholder,
textarea::placeholder {
    color: var(--color-text-muted);
}

label {
    display: block;
    margin-bottom: 0.75rem;
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
}

/* Glass Input & Autofill Fixes */
.glass-input {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid var(--color-border);
    color: white !important;
    transition: all 0.3s ease;
}

.glass-input:focus {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

/* Force dark background for autofill */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #121212 inset !important;
    -webkit-text-fill-color: white !important;
    caret-color: white !important;
}

/* Toggle Password Button */
.input-group .toggle-password {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--color-border);
    border-left: none;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all 0.3s;
    z-index: 5;
    padding: 14px 18px;
    /* Match Input Padding Exactly */
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-group .toggle-password:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Ensure glass-input in groups meshes well */
.input-group .glass-input {
    border-right: none;
}

/* Custom Checkbox */
.form-check {
    display: flex;
    align-items: center;
    gap: 12px;
    /* Consistent gap between box and text */
    padding-left: 0;
    margin-bottom: 1.5rem;
}

.form-check-input {
    appearance: none;
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border: 1px solid #404040;
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.08);
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
    margin-top: 0;
    /* Remove default margin */
    flex-shrink: 0;
    /* Prevent shrinking */
}

.form-check-label {
    margin-bottom: 0;
    /* Remove bottom margin to center align */
    cursor: pointer;
    line-height: 1.4;
    padding-top: 2px;
    /* Fine-tune vertical alignment */
}

.form-check-input:checked {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e");
}

/* Footer */
footer {
    background-color: #000000;
    padding: 60px 0 24px;
    margin-top: 80px;
    border-top: 1px solid var(--color-border);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: var(--color-text-primary);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.footer-col ul li {
    margin-bottom: 0.75rem;
}

.footer-col ul li a {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    transition: color 0.2s;
}

.footer-col ul li a:hover {
    color: var(--color-accent);
    padding-left: 4px;
}

.copyright {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid var(--color-border);
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    color: var(--color-text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--bg-card);
        padding: 1.5rem;
        border-bottom: 1px solid var(--color-border);
        box-shadow: var(--shadow-lg);
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-toggle {
        display: block;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }
}

/* Glass Alerts */
.glass-alert {
    padding: 15px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid;
    display: flex;
    align-items: center;
    gap: 10px;
}

.glass-alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
}

.glass-alert-error {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ffffff;
    /* Adjusted to White for strict palette */
}

/* Strict Brand Utilities */
.text-gradient {
    background: linear-gradient(135deg, var(--color-brand-gold), var(--color-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.float-anim {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* === PREMIUM DASHBOARD GLASS UTILITIES === */

/* Glass Base for Cards */
.glass-card {
    background: linear-gradient(145deg, rgba(18, 18, 18, 0.9), rgba(18, 18, 18, 0.6));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border-radius: 24px;
    padding: 3rem;
    /* Increased padding for "air" */
    transition: all 0.4sease-out;
    position: relative;
    overflow: hidden;
    margin-bottom: 24px;
    height: 100%;
    /* Ensure equal height in grids */
    display: flex;
    flex-direction: column;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(115deg, transparent, rgba(255, 255, 255, 0.03), transparent);
    transform: skewX(-20deg);
    transition: 0.6s;
    pointer-events: none;
}

.glass-card:hover {
    transform: translateY(-8px);
    background: linear-gradient(145deg, rgba(25, 25, 25, 0.95), rgba(25, 25, 25, 0.7));
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(56, 189, 248, 0.1);
    /* Subtle blue glow */
}

.glass-card:hover::before {
    left: 100%;
}

.glass-card .card-body {
    padding: 0;
    /* Clear padding if used inside */
    background: transparent;
    border: none;
    box-shadow: none;
}

/* If glass-card IS a card (bootstrap), force padding on body or container */
.card.glass-card {
    padding: 0 !important;
    /* Bootstrap cards handle padding in body usually, but we want our own */
}

.card.glass-card .card-body {
    padding: 2.5rem !important;
    /* Force padding inside bootstrap cards designated as glass-cards */
}

.glass-panel-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
}

/* Premium Buttons */
.btn-glass {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--color-text-secondary);
    backdrop-filter: blur(4px);
    border-radius: 12px;
    padding: 1rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--color-accent);
    color: #fff;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.2);
    transform: translateY(-2px);
}

.btn-glass i {
    transition: transform 0.3s ease;
}

.btn-glass:hover i {
    transform: scale(1.2);
}

/* Typography Enhancements */
.text-label {
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1.2px;
    opacity: 0.8;
}

.stat-value {
    font-weight: 700;
    font-size: 2.5rem;
    line-height: 1;
    margin-top: 0.5rem;
    color: #fff;
    /* Fallback for browsers that don't support clip */
    background: linear-gradient(180deg, #fff, rgba(255, 255, 255, 0.7));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* === DASHBOARD SIDEBAR LAYOUT === */

.dashboard-layout {
    display: flex;
    min-height: 100vh;
    background: var(--color-base-bg);
}

.dashboard-sidebar {
    width: 280px;
    height: 100vh;
    height: 100dvh;
    /* Dynamic viewport height for mobile browsers */
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1060;
    /* Higher than mobile toggle (1050) so it covers it */
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    /* Glass Effect */
    background: rgba(12, 12, 12, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

/* Sidebar Navigation Area */
.dashboard-nav {
    flex: 1;
    /* Take up remaining vertical space */
    overflow-y: auto;
    /* Enable scrolling if content overflows */
    min-height: 0;
    /* fix for firefox flex scrolling */
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    scrollbar-width: thin;
    /* Firefox scrollbar */
    scrollbar-color: var(--color-accent) transparent;
}

/* Custom Scrollbar for Sidebar */
.dashboard-nav::-webkit-scrollbar {
    width: 4px;
}

.dashboard-nav::-webkit-scrollbar-track {
    background: transparent;
}

.dashboard-nav::-webkit-scrollbar-thumb {
    background-color: var(--color-accent);
    border-radius: 4px;
}

.dashboard-main {
    flex: 1;
    margin-left: 280px;
    /* Width of sidebar */
    padding: 2rem;
    min-height: 100vh;
    width: calc(100% - 280px);
    position: relative;
    overflow-x: hidden;
    isolation: auto;
}



/* Sidebar Logo */
.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 3rem;
    padding: 0 0.5rem;
    text-decoration: none;
}

.sidebar-logo img {
    height: 36px;
    border-radius: 6px;
}

.sidebar-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
}

/* Sidebar Navigation */
.dashboard-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.nav-item-glass {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 12px;
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    font-weight: 500;
}

.nav-item-glass i {
    width: 20px;
    text-align: center;
    transition: transform 0.3s ease;
}

.nav-item-glass:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    transform: translateX(4px);
}

.nav-item-glass.active {
    background: rgba(56, 189, 248, 0.15);
    /* Accent tint */
    color: #fff;
    border-color: rgba(56, 189, 248, 0.3);
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.1);
}

.nav-item-glass.active i {
    color: var(--color-accent);
}

.nav-item-glass.text-danger:hover {
    background: rgba(220, 38, 38, 0.1);
    color: #f87171;
}

/* Responsive Dashboard */
@media (max-width: 991px) {
    .dashboard-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .dashboard-sidebar.active {
        transform: translateX(0);
    }

    .dashboard-main {
        margin-left: 0;
        width: 100%;
        padding: 1rem;
        padding-top: 80px;
        /* Accounts for fixed mobile header */
    }

    .dashboard-toggle {
        display: block;
        position: fixed;
        bottom: 20px;
        right: 20px;
        z-index: 1001;
        width: 50px;
        height: 50px;
        border-radius: 50%;
        background: var(--color-accent);
        color: #000;
        border: none;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    }
}

@media (min-width: 992px) {
    .dashboard-toggle {
        display: none;
    }
}