:root {
    --primary-color: #4a6fa5;
    --secondary-color: #6c757d;
    --accent-color: #5cb85c;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --header-height: 70px;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    padding-top: var(--header-height);
}

/* ==================== FIXED HEADER ==================== */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: var(--box-shadow);
    z-index: 1000;
    transition: var(--transition);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: white !important;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #667eea;
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: var(--transition);
    position: relative;
}

.navbar-nav .nav-link:hover {
    color: white !important;
    transform: translateY(-2px);
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: white;
    transition: var(--transition);
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after {
    width: 80%;
}

.profile-dropdown .dropdown-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    padding: 0.4rem 1.2rem;
    color: white !important;
    font-weight: 600;
    transition: var(--transition);
}

.profile-dropdown .dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: white;
}

.profile-dropdown .dropdown-toggle::after {
    margin-left: 0.5rem;
}

.dropdown-menu {
    border: none;
    box-shadow: var(--box-shadow);
    border-radius: 10px;
    margin-top: 10px;
}

.dropdown-item {
    padding: 0.7rem 1.5rem;
    transition: var(--transition);
    font-weight: 500;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: var(--primary-color);
    transform: translateX(5px);
}

.dropdown-item i {
    margin-right: 10px;
    width: 20px;
}

/* ==================== NAVIGATION DROPDOWNS ==================== */
.navbar-nav .dropdown-menu {
    min-width: 220px;
}

.navbar-nav .nav-item.dropdown .nav-link.dropdown-toggle::after {
    transition: var(--transition);
}

.navbar-nav .nav-item.dropdown.show .nav-link.dropdown-toggle::after {
    transform: rotate(180deg);
}

/* Mobile dropdown styling */
@media (max-width: 991px) {
    .navbar-nav .dropdown-menu {
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        margin-left: 1rem;
        margin-top: 0.5rem;
    }

    .navbar-nav .dropdown-item {
        color: rgba(255, 255, 255, 0.9) !important;
    }

    .navbar-nav .dropdown-item:hover {
        background: rgba(255, 255, 255, 0.2);
        color: white !important;
        transform: translateX(5px);
    }
}

/* ==================== MAIN CONTENT ==================== */
.main-content {
    padding: 2rem 0;
    min-height: calc(100vh - var(--header-height));
}

/* ==================== WELCOME SECTION ==================== */
.welcome-section {
    background: white;
    padding: 1rem;
    border-radius: 15px;
    box-shadow: var(--box-shadow);
    margin-bottom: 2rem;
}

.welcome-text {
    font-size: 2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 15px;
}

.welcome-text i {
    color: var(--primary-color);
}

.separator {
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 2px;
    margin-top: 1rem;
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 991px) {
    .navbar-collapse {
        background: rgba(102, 126, 234, 0.95);
        padding: 1rem;
        border-radius: 10px;
        margin-top: 1rem;
    }

    .navbar-nav .nav-link::after {
        display: none;
    }

    .profile-dropdown .dropdown-menu {
        background: rgba(255, 255, 255, 0.98);
    }
}

@media (max-width: 768px) {
    .welcome-text {
        font-size: 1.5rem;
    }

    .main-content {
        padding: 1rem 0;
    }
}

@media (max-width: 576px) {
    .welcome-text {
        font-size: 1.3rem;
        flex-direction: column;
        text-align: center;
    }
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* ==================== ACCESSIBILITY ==================== */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ==================== MODAL STYLES ==================== */
/* ==================== MODAL STYLES - MOVED TO modal.css ====================
   Modal styling has been extracted to assets/modal.css for better maintainability.
   Include modal.css in your page head: <link rel="stylesheet" href="assets/modal.css?v=1.0">
*/

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    width: 75%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s ease-out;
    position: relative;
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.modal-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.modal-icon.warning {
    background: rgba(255, 193, 7, 0.2);
    color: var(--warning-color);
}

.modal-icon.danger {
    background: rgba(220, 53, 69, 0.2);
    color: var(--danger-color);
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d3748;
    margin: 0;
}

.modal-body {
    color: #4a5568;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.modal-footer {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.modal-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
}

.modal-btn-cancel {
    background: #e2e8f0;
    color: #4a5568;
}

.modal-btn-cancel:hover {
    background: #cbd5e0;
}

.modal-btn-confirm {
    background: var(--danger-color);
    color: white;
}

.modal-btn-confirm:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}
