:root {
    --primary-teal: #14b8a6;
    --bg-light: #f8fafc;
    --text-main: #334155;
    --text-muted: #64748b;
    --white: #ffffff;
    --border-color: #e2e8f0;
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
}

/* Reusable full-page processing overlay (see Views/Shared/_FormProcessingOverlay.cshtml
   and wwwroot/js/formOverlay.js) */
.form-processing-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.75);
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-processing-overlay .form-processing-overlay-content {
    text-align: center;
}

.form-processing-overlay .spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Header & Nav */
.main-header {
    background-color: var(--white);
    border-bottom: 1px solid var(--border-color);
    padding: 0 20px;
    min-height: 60px;
    display: flex;
    align-items: center;
}

.nav-container {
    display: flex;
    align-items: center;
    width: 100%;
    flex-wrap: nowrap;
}

.brand {
    display: flex;
    align-items: center;
    margin-right: 40px;
    flex-shrink: 0;
}

.nav-toggle {
    display: none;
    margin-left: auto;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 1.1rem;
    color: var(--text-main);
    cursor: pointer;
}

.main-nav {
    flex: 1 1 auto;
    min-width: 0;
    overflow: visible;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
    margin-left: 15px;
}

    .user-menu .nav-link {
        text-decoration: none;
        color: var(--text-muted);
        font-size: 0.9rem;
        font-weight: 500;
        display: flex;
        align-items: center;
        gap: 8px;
        white-space: nowrap;
    }

        .user-menu .nav-link:hover {
            color: var(--text-main);
        }

.user-menu-signout-form {
    margin: 0;
}

.user-menu-signout-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.brand-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: #1e293b;
    text-decoration: none;
    transition: color 0.3s ease;
}

    .brand-name:hover {
        color: #3b82f6;
    }

.nav-list {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
    padding: 18px 15px;
}

    .nav-item a {
        text-decoration: none;
        color: var(--text-muted);
        font-size: 0.9rem;
        font-weight: 500;
        display: flex;
        align-items: center;
        gap: 8px;
        transition: color 0.2s;
    }

    .nav-item i {
        font-size: 0.85rem;
    }

    .nav-item a:hover, .nav-item a.active {
        color: var(--text-main);
    }

        /* Active Highlight (Bottom border) */
        .nav-item a.active::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 15px;
            right: 15px;
            height: 3px;
            background-color: var(--primary-teal);
            border-radius: 3px 3px 0 0;
        }

/* Dropdown Logic */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    min-width: 220px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 0;
    z-index: 1000;
}

.nav-item:hover .dropdown-menu {
    display: block;
}

.dropdown-link {
    display: flex !important;
    justify-content: space-between;
    padding: 10px 20px !important;
    color: var(--text-main) !important;
}

    .dropdown-link:hover {
        background-color: #f1f5f9;
        color: var(--primary-teal) !important;
    }

    .dropdown-link i {
        font-size: 0.7rem;
        color: var(--text-muted);
    }

/* Page Content */
.content-wrapper {
    padding: 30px;
}

/* Responsive nav for small / minimized screens */
@media (max-width: 992px) {
    .main-header {
        position: relative;
        flex-wrap: nowrap;
        padding: 10px 20px;
    }

    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        order: 2;
    }

    .brand {
        margin-right: auto;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: auto;
        max-height: calc(100vh - 60px);
        overflow-y: auto;
        background: var(--white);
        border-top: 1px solid var(--border-color);
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
        z-index: 999;
    }

        .main-nav.open {
            display: block;
        }

    .nav-list {
        flex-direction: column;
        width: 100%;
    }

    .nav-item {
        padding: 0;
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }

        .nav-item a {
            padding: 14px 20px;
            width: 100%;
            box-sizing: border-box;
        }

        .nav-item a.active::after {
            display: none;
        }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        border-radius: 0;
        padding: 0;
        background: var(--bg-light);
    }

        .dropdown-menu .dropdown-link {
            padding: 12px 20px 12px 40px !important;
        }

    .nav-item:hover .dropdown-menu {
        display: none;
    }

    .nav-item.open .dropdown-menu,
    .nav-item:focus-within .dropdown-menu {
        display: block;
    }

    .user-menu {
        order: 1;
        margin-left: 0;
        gap: 10px;
    }
}

