/* ================================================================
   CSS RESET & BASE STYLES
   ================================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

*::before,
*::after {
    box-sizing: border-box;
}

/* ================================================================
   CSS CUSTOM PROPERTIES (DESIGN TOKENS)
   ================================================================ */
:root {
    /* Color Palette */
    --primary: #1e40af;
    --primary-light: #3b82f6;
    --primary-dark: #1e3a8a;
    --secondary: #0f172a;
    --accent: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;

    /* Neutral Colors */
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    /* Spacing & Dimensions */
    --radius: 12px;
    --radius-sm: 8px;
    --radius-full: 50px;

    /* Shadows */
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 10px 10px -5px rgb(0 0 0 / 0.04);
    --shadow-xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);

    /* Typography */
    --font-family-base: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    --line-height-base: 1.6;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Z-Index Scale */
    --z-background: 0;
    --z-base: 1;
    --z-footer: 10;
    --z-modal: 100;
    --z-notification: 1000;
}

/* ================================================================
   BASE TYPOGRAPHY & LAYOUT
   ================================================================ */
body {
    font-family: var(--font-family-base);
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 35%, #334155 100%);
    min-height: 100vh;
    color: var(--gray-800);
    line-height: var(--line-height-base);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

* {
  scrollbar-width: thin;
  /* Transparent track and thumb by default */
  scrollbar-color: transparent transparent;
  transition: scrollbar-color 0.3s ease;
}

*:hover {
  /* Show thumb color on hover (e.g., gray thumb on transparent track) */
  scrollbar-color: var(--primary-light) transparent;
}

*::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

*::-webkit-scrollbar-track {
  background: transparent;      /* Color of the track */
  border-radius: 10px;
}

*::-webkit-scrollbar-thumb {
  background: transparent;        /* Color of the draggable thumb */
  border-radius: 10px;      /* Roundness of the thumb */
}

*:hover::-webkit-scrollbar-thumb {
  background: var(--primary-light);  /* Color of the thumb on hover */
  border: 1px solid var(--gray-100); /* Optional: creates space around the thumb */
  background-clip: content-box;
}

/* ================================================================
   LAYOUT COMPONENTS
   ================================================================ */
.bg-overlay {
    position: fixed;
    inset: 0;
    background: url('data:image/svg+xml,<svg width="80" height="80" viewBox="0 0 80 80" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="smallGrid" width="8" height="8" patternUnits="userSpaceOnUse"><path d="M 8 0 L 0 0 0 8" fill="none" stroke="%23334155" stroke-width="0.5" opacity="0.1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23smallGrid)"/></svg>') repeat;
    pointer-events: none;
    z-index: var(--z-background);
}

.container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: var(--z-base);
    padding: 2rem;
    gap: 2rem;
}


/* ================================================================
   NAVIGATION HEADER - ENHANCED MODERN DESIGN
   ================================================================ */
.nav-header {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
    position: sticky;
    top: 0;
    z-index: var(--z-modal);
    border-bottom: 2px solid var(--gray-100);
    backdrop-filter: blur(10px);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.15rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.nav-brand:hover {
    transform: scale(1.02);
}

.nav-logo {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: var(--white);
    font-size: 1.1rem;
    box-shadow: 0 6px 16px rgba(30, 64, 175, 0.3);
    transition: all 0.3s ease;
}

.nav-brand:hover .nav-logo {
    transform: rotate(5deg) scale(1.1);
    box-shadow: 0 8px 20px rgba(30, 64, 175, 0.4);
}

.nav-info {
    display: flex;
    flex-direction: column;
}

.nav-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--gray-900);
    margin: 0;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.nav-subtitle {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin: 0;
    line-height: 1.2;
    font-weight: 500;
}

.nav-menu {
    display: flex;
    gap: 0.625rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.65rem 1.25rem;
    border-radius: 12px;
    text-decoration: none;
    color: var(--gray-700);
    font-size: 0.925rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.nav-link:hover::before {
    left: 100%;
}

.nav-link:hover {
    background: var(--gray-100);
    color: var(--primary);
    transform: translateY(-2px);
}

.nav-link.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
}

.nav-link.active:hover {
    box-shadow: 0 6px 16px rgba(30, 64, 175, 0.4);
    transform: translateY(-2px);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    color: var(--gray-700);
    font-size: 0.925rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    background: var(--gray-50);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.user-info:hover {
    background: var(--gray-100);
    transform: scale(1.05);
}

.btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
    color: var(--white);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-logout:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-3px) rotate(5deg) scale(1.1);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
}

/* ================================================================
   MAIN CONTENT LAYOUT
   ================================================================ */
.main-content {
    flex: 1;
    padding: 2rem;
    min-height: calc(100vh - 200px);
}

.content-container {
    max-width: 1400px;
    margin: 0 auto;
}

/* ================================================================
   PAGE HEADER - ENHANCED DESIGN
   ================================================================ */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.page-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 150px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-light) 0%, transparent 100%);
}

.page-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--white);
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.page-subtitle {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    font-weight: 500;
}

.page-actions-group {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.page-actions .btn-primary,
.page-actions-group .btn-primary,
.page-actions-group .btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.85rem 1.75rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 2px solid;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.page-actions .btn-primary::before,
.page-actions-group .btn-primary::before,
.page-actions-group .btn-secondary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
}

.page-actions .btn-primary:hover::before,
.page-actions-group .btn-primary:hover::before,
.page-actions-group .btn-secondary:hover::before {
    width: 300px;
    height: 300px;
}

.page-actions .btn-primary,
.page-actions-group .btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
    border-color: var(--primary);
}

.page-actions .btn-primary:hover,
.page-actions-group .btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    border-color: var(--primary-dark);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 24px rgba(30, 64, 175, 0.35);
}

.page-actions-group .btn-secondary {
    background: var(--white);
    color: var(--primary);
    border-color: rgba(255, 255, 255, 0.9);
}

.page-actions-group .btn-secondary:hover {
    background: var(--gray-50);
    border-color: var(--primary);
    color: var(--primary-dark);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.3);
}

/* ================================================================
   MESSAGES
   ================================================================ */
.messages-container {
    margin-bottom: 2rem;
}

.alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: 0.875rem;
    border: 1px solid;
    position: relative;
    animation: slideInDown 5s ease;
}

.alert-success {
    background: #f0fdf4;
    color: #166534;
    border-color: #bbf7d0;
}

.alert-error {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}

.alert-info {
    background: #f0f9ff;
    color: #1e40af;
    border-color: #bfdbfe;
}

.alert-close {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: var(--radius-sm);
    transition: background var(--transition-base);
}

.alert-close:hover {
    background: rgba(0, 0, 0, 0.1);
}

/* ================================================================
   FOOTER
   ================================================================ */
.footer {
    background: var(--white);
    border-top: 1px solid var(--gray-200);
    box-shadow: 0 -1px 3px 0 rgb(0 0 0 / 0.1);
    margin-top: auto;
    position: relative;
    z-index: var(--z-footer);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.footer-links a {
    color: var(--gray-600);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition-base);
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-copyright {
    color: var(--gray-500);
    font-size: 0.875rem;
    text-align: right;
}

/* ================================================================
   FOOTER RESPONSIVE
   ================================================================ */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        padding: 1.5rem;
    }

    .footer-links {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .footer-copyright {
        text-align: center;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .footer-content {
        padding: 1rem;
        gap: 1rem;
    }

    .footer-links {
        gap: 1rem;
    }

    .footer-links a {
        font-size: 0.8rem;
    }

    .footer-copyright {
        font-size: 0.8rem;
    }
}

/* ================================================================
   ANIMATIONS
   ================================================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

