:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --accent-color: #4895ef;
    --background-color: #f8f9fa;
    --card-bg: #ffffff;
    --text-color: #2b2d42;
    --text-muted: #8d99ae;
    --border-radius: 12px;
    --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --font-family: 'Outfit', sans-serif;
}

body {
    font-family: var(--font-family);
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    color: #1a1a1a;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s;
}

a:hover {
    color: var(--secondary-color);
}

/* Layout */
.wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Navbar Container */
.navbar {
    background: #04034F;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    width: 90%;
}

.navbar-brand {
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #fff;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.navbar-toggle:hover {
    transform: scale(1.1);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-group {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    position: relative;
    padding: 0.5rem 0;
    transition: color 0.3s;
}

.nav-link:hover,
.nav-link:focus {
    color: #fff;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #fff;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Dropdown */
.nav-item.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    flex-direction: column;
    padding: 0.5rem 0;
    margin-top: 1rem;
    animation: slideDown 0.3s ease;
    z-index: 1001;
}

.nav-item.dropdown.active .dropdown-menu {
    display: flex;
}

.dropdown-item {
    padding: 0.75rem 1.5rem;
    color: var(--text-color);
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
    display: block;
}

.dropdown-item:hover {
    background: #f0f7ff;
    color: var(--primary-color);
}

.dropdown-item-form {
    margin: 0;
}

.logout-btn {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
}

.plus-minus {
    font-size: 0.8em;
    margin-left: 5px;
    display: inline-block;
    transition: transform 0.3s;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .navbar-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--card-bg);
        flex-direction: column;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease-out, box-shadow 0.3s;
        box-shadow: none;
        gap: 0;
    }

    .nav-links.active {
        max-height: 80vh;
        /* Allow longer menus and scrolling */
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        padding: 1rem 0;
        overflow-y: auto;
    }

    .nav-group {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }

    .nav-link {
        color: var(--text-color);
        padding: 1rem 2rem;
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    .nav-link:hover {
        background-color: #f8f9fa;
        color: var(--primary-color);
    }

    .nav-link::after {
        display: none;
    }

    /* Mobile Dropdown */
    .dropdown-menu {
        position: static;
        box-shadow: none;
        background: #f8f9fa;
        margin: 0;
        border-radius: 0;
        padding-left: 1rem;
        display: none;
        animation: none;
    }

    .nav-item.dropdown.active .dropdown-menu {
        display: flex;
    }

    .dropdown-item {
        padding: 0.75rem 2rem;
    }

    /* Fix for mobile header right-side gap - REVERTED */

    .main-content {
        padding: 1rem;
        /* Reduce padding on mobile */
        display: flex;
        /* Use flex to center content vertically/horizontally if needed */
        justify-content: center;
    }

    .auth-card {
        padding: 1.5rem;
        /* Reduce internal padding from 3rem */
        margin: 0 auto;
        /* Ensure centering */
        width: 100%;
        /* Full width of container */
        max-width: 100%;
        /* Prevent overflow */
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.main-content {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.footer {
    background: #1a1a1a;
    color: #fff;
    padding: 0rem;
    text-align: center;
    margin-top: auto;
}

/* Footer Buttons */
/* Beautiful Animated Footer (Icon Only) */
.animated-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #050426;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.5);
    padding: 10px 0;
    display: flex;
    justify-content: center;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
    z-index: 1000;
}

.footer-icons {
    display: flex;
    justify-content: space-evenly;
    width: 100%;
    max-width: 500px;
    align-items: center;
}

.footer-icon-link {
    text-decoration: none;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    -webkit-tap-highlight-color: transparent;
}

.icon-wrapper {
    /* width: 45px; height: 45px; border-radius: 50%; */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    /* Increased size slightly */
    color: white;
    /* box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); */
    transition: all 0.3s ease;
    padding: 10px;
    /* Add some padding for click area */
}

.footer-icon-link:hover .icon-wrapper {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.25);
}

/* Specific Icon Colors - Removed backgrounds for transparency */
.help-icon-wrapper {
    /* background: linear-gradient(135deg, #00b09b, #96c93d); */
}

.contact-icon-wrapper {
    /* background: linear-gradient(135deg, #ff9966, #ff5e62); */
}

.dashboard-icon-wrapper {
    /* background: linear-gradient(135deg, #4facfe, #00f2fe); */
}

.logout-icon-wrapper {
    /* background: linear-gradient(135deg, #ff416c, #ff4b2b); */
}

.main-content {
    padding-bottom: 80px;
    /* Space for footer */
}

/* Auth Pages */
.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 80px);
    /* Adjust for navbar */
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.auth-card {
    background: var(--card-bg);
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 450px;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.auth-title {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-muted);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
    box-sizing: border-box;
    font-family: var(--font-family);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
    outline: none;
}

.btn-primary {
    width: 100%;
    padding: 0.9rem;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.3);
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Dashboard */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.stat-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.alert-error {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

.alert-success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

/* Mega Menu Improvements */
@media (min-width: 993px) {
    .nav-item.mega-menu {
        position: static;
        position: relative;
    }

    .nav-item.mega-menu .dropdown-menu {
        width: 600px;
        right: -150px;
        display: none;
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
        padding: 20px;
        background-color: #1e293b !important;
        border: 1px solid #334155;
    }

    .nav-item.mega-menu.active .dropdown-menu {
        display: grid;
    }
}

@media (max-width: 992px) {
    .nav-item.mega-menu .dropdown-menu {
        width: 100%;
        position: static;
        box-shadow: none;
        background-color: #1e293b !important;
        border: none;
        padding: 15px 20px;
        margin-top: 10px;
        border-radius: 8px;
    }

    .nav-item.mega-menu.active .dropdown-menu {
        display: flex;
        flex-direction: column;
    }
}

.nav-item.mega-menu .dropdown-header {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94a3b8 !important;
    padding: 0.5rem 1.5rem;
    margin-bottom: 0.5rem;
    display: block;
    border-bottom: 1px solid #334155;
}

.nav-item.mega-menu .dropdown-item {
    color: #f8f9fa !important;
    padding: 0.5rem 1.5rem;
}

.nav-item.mega-menu .dropdown-item:hover {
    background-color: #334155 !important;
    color: #38bdf8 !important;
    border-radius: 4px;
}