:root {
    --primary: #f59e0b;
    /* Amber 500 */
    --primary-hover: #d97706;
    /* Amber 600 */
    --secondary: #78350f;
    /* Amber 900 */
    --accent: #fbbf24;
    --bg-light: #fffcf2;
    /* Warm White */
    --bg-sidebar: #252422;
    /* Very Dark Brown/Grey */
    --bg-card: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(120, 53, 15, 0.1);
    --text-main: #252422;
    --text-muted: #403d39;
    --sidebar-text: #ccc5b9;
}

body {
    background-color: var(--bg-light);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    background-image:
        radial-gradient(at 0% 0%, rgba(245, 158, 11, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(251, 191, 36, 0.03) 0px, transparent 50%);
    background-attachment: fixed;
}

.navbar {
    background: transparent !important;
    backdrop-filter: none;
    border-bottom: none !important;
}

.navbar-brand {
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(to right, var(--primary), var(--primary-hover));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.card {
    background: var(--bg-card);
    backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(120, 53, 15, 0.05);
    color: var(--text-main);
}

.btn-primary {
    background-color: var(--primary);
    border: none;
    border-radius: 12px;
    padding: 10px 24px;
    font-weight: 600;
    color: #fff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

.btn-outline-primary {
    border-color: var(--primary);
    color: var(--primary);
    border-radius: 12px;
}

.btn-outline-primary:hover {
    background-color: var(--primary);
    border-color: var(--primary);
}

footer {
    background: transparent !important;
    border-top: 1px solid var(--glass-border) !important;
    color: var(--text-muted) !important;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.main-content {
    margin-left: 260px;
    padding-top: 5px;
    padding-bottom: 20px;
    animation: fadeIn 0.6s ease-out forwards;
}

.no-sidebar .main-header,
.no-sidebar .main-content {
    margin-left: 0 !important;
}

/* Authentication Page Styles */
.no-sidebar {
    background: radial-gradient(at 0% 0%, rgba(245, 158, 11, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(217, 119, 6, 0.05) 0px, transparent 50%),
        #faf9f6;
    height: 100vh;
}

.auth-wrapper {
    min-height: calc(100vh - 48px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(245, 158, 11, 0.1);
    border-radius: 24px;
    padding: 3rem;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.05);
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-card h1,
.auth-card h2 {
    font-weight: 800;
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--dark-blue);
}

.auth-card .form-floating>.form-control {
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 1rem;
}

.auth-card .form-floating>.form-control:focus {
    border-color: var(--primary-gold);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.1);
}

.auth-card .btn-primary {
    border-radius: 12px;
    padding: 0.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-gold), var(--primary-dark));
    border: none;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 260px;
    background: var(--bg-sidebar);
    border-right: 1px solid rgba(245, 158, 11, 0.1);
    z-index: 1000;
    padding: 2rem 1.25rem;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.sidebar::-webkit-scrollbar {
    width: 5px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(245, 158, 11, 0.2);
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

.sidebar-brand {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 3rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    background: linear-gradient(to right, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
}

.sidebar-item {
    margin-bottom: 0.5rem;
}

.sidebar-header {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #fff !important;
    /* Brighter */
    font-weight: 800;
    margin: 0;
    /* Reset margin for accordion button */
    padding: 1rem 1rem !important;
    /* Add padding for click area */
    opacity: 1 !important;
    /* Full opacity */
    display: flex;
    align-items: center;
}

.accordion-button::after {
    filter: invert(1);
    /* Make caret white */
    transform: scale(0.7);
}

.accordion-button:not(.collapsed) {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--primary) !important;
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: none;
    border-color: transparent;
}

.sidebar-header i {
    font-size: 0.9rem;
    margin-right: 8px;
    width: 20px;
    color: var(--primary);
    /* Highlight icon */
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.8rem 1rem;
    color: rgba(255, 255, 255, 0.7);
    /* Brighter initial state */
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
}

.sidebar-link i {
    width: 28px;
    font-size: 1.2rem;
    margin-right: 8px;
    transition: transform 0.3s ease;
}

.sidebar-link:hover {
    background: rgba(245, 158, 11, 0.1);
    color: #fff;
    transform: translateX(5px);
}

.sidebar-link:hover i {
    transform: scale(1.1);
    color: var(--primary);
}

.sidebar-link.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: white !important;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.sidebar-footer {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}


.main-header {
    margin-left: 260px;
    height: 48px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(255, 252, 242, 0.5);
    /* Matches --bg-light with transparency */
    backdrop-filter: blur(10px);
    z-index: 999;
}

/* Responsive sidebar */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .main-content,
    .main-header {
        margin-left: 0;
    }

    .sidebar.show {
        transform: translateX(0);
    }
}

.form-container {
    max-width: 800px;
    margin: 0 auto;
}

.form-control {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 12px;
    color: var(--text-main);
    transition: all 0.3s ease;
}

.form-control:focus {
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 0.25rem rgba(245, 158, 11, 0.1);
    color: var(--text-main);
}

/* Dashboard Density Optimization */
.dashboard-header {
    margin-top: -20px;
    margin-bottom: 1rem !important;
}

.dashboard-header h1 {
    font-size: 2.5rem !important;
}

.stat-card {
    padding: 1rem !important;
}

.stat-icon {
    width: 48px !important;
    height: 48px !important;
    font-size: 1.25rem !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.module-card {
    padding: 1.5rem !important;
}

.module-card i {
    font-size: 2.25rem !important;
    margin-bottom: 0.75rem !important;
}

.module-card h3 {
    font-size: 1.25rem !important;
    margin-bottom: 0.5rem !important;
}

.module-card p {
    font-size: 0.85rem !important;
    margin-bottom: 1rem !important;
}

.clickable-card {
    cursor: pointer;
    transition: all 0.3s ease;
}

.clickable-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(245, 158, 11, 0.15);
}

.clickable-card:hover .btn-primary {
    background-color: var(--primary-hover);
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.3);
}

.form-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

/* Identity & Account Theming */
.account-container {
    max-width: 500px;
    margin: 3rem auto;
    padding: 2rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(120, 53, 15, 0.05);
}

#account input,
#account select {
    border-radius: 10px;
}

.login-page,
.register-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
}