@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ============================================================================
   CSS CUSTOM PROPERTIES (Design System)
   ============================================================================ */
:root {
    /* Brand Palette - Lighter Blue Theme */
    --brand-teal: #4BA3FF;
    /* Lighter Dodger Blue (+20%) */
    --brand-navy: #3D7DD4;
    /* Lighter Denim Blue (+20%) */
    --brand-accent-blue: #4BA3FF;
    /* Lighter Dodger Blue */
    --brand-gray-light: #F4F5F7;
    --brand-gray-medium: #6B7280;

    /* Theme-Specific Colors (Default: Dark Modern) */
    --bg-color: #0a0d14;
    /* Dark background */
    --bg-secondary: #3D7DD4;
    /* Lighter Denim Blue for cards */
    --bg-tertiary: #2a5a8c;
    /* Lighter denim tertiary */
    --bg-card: linear-gradient(145deg, rgba(61, 125, 212, 0.9), rgba(10, 13, 20, 0.95));
    --bg-card-solid: #3D7DD4;
    /* Lighter Denim Blue */
    --bg-input: rgba(15, 23, 42, 0.8);
    --bg-nav: rgba(61, 125, 212, 0.85);
    /* Lighter Denim Blue nav */

    /* Functional Colors */
    --primary-teal: #4BA3FF;
    /* Lighter Dodger Blue */
    --primary-teal-dim: rgba(75, 163, 255, 0.15);
    --primary-dark: #3D7DD4;
    /* Lighter Denim Blue */
    --accent-blue: #4BA3FF;
    /* Lighter Dodger Blue */
    --accent-purple: #a855f7;
    --accent-pink: #ec4899;
    --accent-orange: #f97316;
    --accent-yellow: #fbbf24;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #4BA3FF 0%, #3D7DD4 100%);
    --gradient-teal: linear-gradient(135deg, #4BA3FF 0%, #3D7DD4 100%);
    --gradient-purple: linear-gradient(135deg, #a855f7 0%, #6366f1 100%);
    --gradient-blue: linear-gradient(135deg, #3D7DD4 0%, #4BA3FF 100%);
    --gradient-dark: linear-gradient(180deg, #3D7DD4 0%, #0a0d14 100%);

    /* Text */
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-accent: #4BA3FF;
    /* Lighter Dodger Blue */
    --text-on-teal: #ffffff;
    --text-on-dark: #ffffff;

    /* Status */
    --status-success: #22c55e;
    --status-success-dim: rgba(34, 197, 94, 0.15);
    --status-warning: #f59e0b;
    --status-warning-dim: rgba(245, 158, 11, 0.15);
    --status-error: #ef4444;
    --status-error-dim: rgba(239, 68, 68, 0.15);
    --status-info: #4BA3FF;
    /* Lighter Dodger Blue */
    --status-info-dim: rgba(75, 163, 255, 0.15);

    /* Glass & Borders */
    --glass-bg: rgba(61, 125, 212, 0.6);
    /* Lighter Denim Blue glass */
    --glass-border: rgba(75, 163, 255, 0.25);
    --glass-blur: blur(20px);
    --border-color: rgba(75, 163, 255, 0.25);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
    --shadow-glow-teal: 0 0 40px rgba(75, 163, 255, 0.35);

    /* Radius & Transitions */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-2xl: 32px;
    --radius-full: 9999px;
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Theme Overrides */
[data-theme="light"] {
    --bg-color: var(--brand-gray-light);
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --bg-card: linear-gradient(145deg, #ffffff, #f1f5f9);
    --bg-card-solid: #ffffff;
    --bg-input: #ffffff;
    --bg-nav: #ffffff;

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-accent: var(--brand-teal);
    --text-on-teal: #ffffff;

    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(0, 0, 0, 0.1);
    --glass-blur: blur(10px);
    --border-color: #e2e8f0;

    --primary-teal-dim: rgba(0, 128, 128, 0.1);
    --shadow-glow-teal: 0 0 20px rgba(0, 128, 128, 0.15);
}

/* ============================================================================
   BASE STYLES
   ============================================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 20%, var(--primary-teal-dim) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(168, 85, 247, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(0, 26, 114, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
    animation: backgroundPulse 15s ease-in-out infinite;
}

@keyframes backgroundPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-teal), var(--accent-blue));
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-teal);
}

/* Selection Styling */
::selection {
    background: var(--primary-teal);
    color: var(--bg-color);
}

/* ============================================================================
   AUTH PAGE STYLES
   ============================================================================ */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    width: 100%;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.auth-card {
    background: var(--bg-card-solid);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    padding: 3.5rem 3rem;
    border-radius: var(--radius-2xl);
    width: 100%;
    max-width: 480px;
    min-height: 750px;
    overflow-y: auto;
    text-align: center;
    position: relative;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.6s ease-out;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
}

.auth-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 2rem;
    position: relative;
}

.auth-logo img {
    filter: drop-shadow(0 0 20px rgba(0, 245, 196, 0.3));
    animation: float 3s ease-in-out infinite;
    border-radius: var(--radius-lg);
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.auth-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.auth-subtitle {
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 0.75rem;
}

/* ============================================================================
   FORM ELEMENTS
   ============================================================================ */
.input-field {
    width: 100%;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    transition: var(--transition);
}

.input-field::placeholder {
    color: var(--text-muted);
}

.input-field:focus {
    outline: none;
    border-color: var(--primary-teal);
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 0 0 4px var(--primary-teal-dim);
}

.input-field:hover:not(:focus) {
    border-color: rgba(148, 163, 184, 0.3);
}

select.input-field {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.25rem;
    padding-right: 3rem;
}

/* ============================================================================
   BUTTONS
   ============================================================================ */
.btn-primary {
    width: 100%;
    padding: 1rem 1.5rem;
    background: var(--gradient-teal);
    color: var(--text-on-teal);
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 0.5rem;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: var(--transition-slow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow-teal);
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-teal {
    background: var(--gradient-teal);
    color: var(--text-on-teal) !important;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-teal:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow-teal);
    filter: brightness(1.1);
}

.btn-teal i {
    color: var(--text-on-teal);
}

.btn-secondary {
    background: var(--glass-bg);
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid var(--glass-border);
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: rgba(148, 163, 184, 0.1);
    border-color: var(--text-secondary);
}

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.btn-icon:hover {
    background: var(--primary-teal-dim);
    border-color: var(--primary-teal);
    color: var(--primary-teal);
}

/* Google Sign-In Button */
.btn-google {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: #ffffff;
    color: #1f1f1f;
    border: 1px solid #dadce0;
    border-radius: var(--radius-lg);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-family: inherit;
}

.btn-google:hover {
    background: #f8f9fa;
    border-color: #c4c7c9;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.btn-google:active {
    background: #eef0f1;
    transform: translateY(0);
}

[data-theme="light"] .btn-google {
    background: #ffffff;
    border-color: #dadce0;
}

/* ============================================================================
   HEADER & NAVIGATION
   ============================================================================ */
header {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    padding: 0.5rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

@media (min-width: 1024px) {
    header {
        padding: 0.5rem 2rem;
    }
}

.nav-links {
    display: flex;
    gap: 0.5rem;
    background: var(--bg-nav);
    padding: 0.35rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
}

.nav-item {
    padding: 0.35rem 1rem;
    cursor: pointer;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-item i {
    color: var(--primary-teal);
    transition: var(--transition);
}

.nav-item:hover i {
    color: var(--text-accent);
    transform: scale(1.1);
}

.nav-item:hover {
    color: var(--text-primary);
    background: rgba(148, 163, 184, 0.1);
}

.nav-item.active {
    background: var(--gradient-teal);
    color: var(--text-on-teal);
    font-weight: 600;
}

.nav-item svg {
    width: 16px;
    height: 16px;
}

/* ============================================================================
   DASHBOARD CONTENT
   ============================================================================ */
.dashboard-content {
    padding: 1.25rem;
    position: relative;
    z-index: 1;
}

@media (min-width: 1024px) {
    .dashboard-content {
        padding: 1.5rem 2rem;
    }
}

.section-header {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .section-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.section-title {
    font-size: 1.75rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    line-height: 1.1;
}

@media (min-width: 768px) {
    .section-title {
        font-size: 2rem;
    }
}

.section-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* ============================================================================
   STAT CARDS
   ============================================================================ */
.stats-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

@media (min-width: 768px) {
    .stats-row {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.25rem;
    }
}

@media (min-width: 1024px) {
    .stats-row {
        grid-template-columns: repeat(5, 1fr);
        gap: 1.5rem;
    }
}

.stat-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    padding: 1rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-teal);
    opacity: 0;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 128, 128, 0.3);
    box-shadow: var(--shadow-md);
}

.stat-card:hover::before,
.stat-card.active::before {
    opacity: 1;
}

.stat-card.active {
    background: var(--bg-secondary);
    border-color: var(--primary-teal);
    box-shadow: 0 4px 12px rgba(0, 191, 191, 0.15);
}

.stat-card.active {
    border-color: var(--primary-teal);
    box-shadow: var(--shadow-glow-teal);
}

.stat-card.active::before {
    opacity: 1;
}

/* Stat Icon standardized to Teal */
.stat-icon {
    width: 44px;
    height: 44px;
    margin: 0 auto 0.75rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-teal-dim);
    transition: var(--transition);
    border: 1px solid rgba(0, 128, 128, 0.1);
}

.stat-icon svg {
    width: 22px;
    height: 22px;
    stroke: var(--primary-teal);
}

.stat-card:hover .stat-icon {
    background: var(--primary-teal);
    transform: scale(1.1);
}

.stat-card:hover .stat-icon svg {
    stroke: var(--text-on-teal);
}



.stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ============================================================================
   PROJECT CARDS
   ============================================================================ */
.project-list-vertical {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.project-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    padding: 1.5rem;
    border-radius: var(--radius-xl);
    border: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.project-card:hover {
    border-color: rgba(0, 128, 128, 0.3);
    transform: translateX(4px);
}

.project-code {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 0.5rem;
}

.project-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.progress-container {
    margin-top: 1rem;
}

.progress-bar {
    height: 6px;
    background: rgba(148, 163, 184, 0.2);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-teal);
    border-radius: var(--radius-full);
    transition: width 0.5s ease;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: progressShine 2s infinite;
}

@keyframes progressShine {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* ============================================================================
   TAGS & BADGES
   ============================================================================ */
.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tag-sync {
    background: rgba(34, 197, 94, 0.15);
    color: var(--status-success);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.tag-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--status-warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.tag-error {
    background: rgba(239, 68, 68, 0.15);
    color: var(--status-error);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.tag-info {
    background: rgba(0, 26, 114, 0.15);
    color: var(--status-info);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.tag-moderate {
    background: rgba(148, 163, 184, 0.15);
    color: var(--text-secondary);
    border: 1px solid var(--glass-border);
}

/* ============================================================================
   MODAL STYLES
   ============================================================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 1rem;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-2xl);
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    position: relative;
    animation: fadeInUp 0.3s ease-out;
}

.modal-content>div:first-child {
    padding: 2rem;
}

.close-modal {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: rgba(239, 68, 68, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--status-error);
    transition: var(--transition);
    z-index: 10;
}

.close-modal:hover {
    background: var(--status-error);
    color: white;
}

.modal-tabs {
    display: flex;
    gap: 2rem;
    border-bottom: 1px solid var(--glass-border);
    margin-top: 1.5rem;
}

.modal-tab-btn {
    padding: 0.6rem 1.25rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(34, 197, 94, 0.1));
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.modal-tab-btn:hover {
    color: var(--text-secondary);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(34, 197, 94, 0.15));
    border-color: rgba(34, 197, 94, 0.3);
}

.modal-tab-btn.active {
    background: linear-gradient(135deg, #3b82f6, #22c55e);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.modal-tab-btn.active::after {
    display: none;
}

.modal-footer {
    background: rgba(15, 23, 42, 0.6);
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ============================================================================
   TIMELINE STYLES
   ============================================================================ */
.timeline {
    position: relative;
    padding-left: 2.5rem;
    margin-top: 1.5rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--primary-teal), var(--accent-purple));
}

.timeline-item {
    position: relative;
    margin-bottom: 1.5rem;
}

.timeline-dot {
    position: absolute;
    left: -2.5rem;
    width: 18px;
    height: 18px;
    background: var(--bg-color);
    border: 2px solid var(--primary-teal);
    border-radius: 50%;
    z-index: 1;
}

.timeline-content {
    background: var(--glass-bg);
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
}

.timeline-date {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--primary-teal);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    display: block;
}

.timeline-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.timeline-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ============================================================================
   TIP ICON
   ============================================================================ */
.tip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: var(--gradient-teal);
    color: var(--bg-color);
    border-radius: 50%;
    font-size: 12px;
    font-weight: 800;
    cursor: help;
    position: relative;
}

.tip-icon::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card-solid);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    width: 250px;
    text-align: center;
    visibility: hidden;
    opacity: 0;
    transition: var(--transition);
    z-index: 1000;
    font-weight: 400;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-lg);
}

.tip-icon:hover::after {
    visibility: visible;
    opacity: 1;
}

/* ============================================================================
   TLR TRACKER TABLE
   ============================================================================ */
.tlr-container {
    width: 100%;
    background: var(--bg-secondary);
    overflow-x: auto;
    border: 1px solid var(--glass-border);
    margin-top: 1rem;
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-lg);
}

.tlr-title-row {
    background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-secondary));
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--glass-border);
}

.tlr-logo-mini {
    width: 40px;
    height: 40px;
    background: var(--gradient-teal);
    color: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    font-weight: 900;
    font-size: 1.25rem;
}

.tlr-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    color: var(--text-primary);
}

.tlr-table th {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    padding: 12px 10px;
    border: 1px solid var(--glass-border);
    text-align: center;
    white-space: nowrap;
    letter-spacing: 0.5px;
    font-size: 0.7rem;
}

.tlr-table td {
    border: 1px solid var(--glass-border);
    padding: 10px 12px;
    font-weight: 400;
    background: var(--bg-secondary);
}

.tlr-table tr:hover td {
    background: rgba(0, 245, 196, 0.05);
}

.tlr-header-sub {
    font-size: 0.65rem !important;
    font-weight: 600;
    background: var(--bg-tertiary) !important;
}

.linked-row td {
    background: rgba(0, 245, 196, 0.08) !important;
    position: relative;
}

/* ============================================================================
   EMPTY STATE
   ============================================================================ */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-teal-dim);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.empty-state-icon svg {
    width: 40px;
    height: 40px;
    stroke: var(--primary-teal);
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.empty-state-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    max-width: 400px;
}

/* ============================================================================
   UTILITY CLASSES
   ============================================================================ */
.close-btn-hover:hover {
    background: rgba(239, 68, 68, 0.1) !important;
    color: var(--status-error) !important;
}

.table-row-hover:hover {
    background: rgba(0, 245, 196, 0.05) !important;
}

/* Request List */
.request-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Pending Approvals Section */
#pending-approvals-section {
    background: var(--glass-bg) !important;
    border: 1px solid rgba(245, 158, 11, 0.3) !important;
}

/* Analytics Grid */
.analytics-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .analytics-grid {
        grid-template-columns: 1fr 2fr;
    }
}

.analytics-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
}

.analytics-card h3 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

/* Capabilities Grid */
.capabilities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.cap-item {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 1.5rem;
    border-radius: var(--radius-xl);
    text-align: center;
    transition: var(--transition);
}

.cap-item:hover {
    border-color: rgba(0, 245, 196, 0.3);
    transform: translateY(-4px);
}

.cap-item h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

/* Tab Controls */
.tab-controls {
    background: var(--bg-nav);
    padding: 0.35rem;
    border-radius: var(--radius-full);
    display: inline-flex;
    gap: 0.25rem;
    border: 1px solid var(--border-color);
}

/* Theme Toggle Icon Overrides */
[data-theme="light"] .sun-icon {
    display: none;
}

[data-theme="light"] .moon-icon {
    display: block !important;
}

[data-theme="dark"] .sun-icon {
    display: block !important;
}

[data-theme="dark"] .moon-icon {
    display: none;
}

.tab-btn {
    padding: 0.6rem 1.5rem;
    border-radius: var(--radius-full);
    border: none;
    background: transparent;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.tab-btn:hover {
    color: var(--text-secondary);
}

.tab-btn.active {
    background: var(--gradient-teal);
    color: var(--text-on-teal);
}

/* ============================================================================
   RESPONSIVE ADJUSTMENTS
   ============================================================================ */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .nav-links {
        width: 100%;
        justify-content: center;
    }

    .dashboard-content {
        padding: 1.5rem 1rem;
    }

    .stat-value {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.5rem;
    }
}

/* ============================================================================
   ANIMATIONS
   ============================================================================ */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes wave {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, var(--glass-bg) 0%, rgba(148, 163, 184, 0.1) 50%, var(--glass-bg) 100%);
    background-size: 200% 100%;
    animation: skeleton 1.5s ease-in-out infinite;
    border-radius: var(--radius-md);
}

@keyframes skeleton {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* File List Compact Scrollbar */
.file-list-compact::-webkit-scrollbar {
    width: 6px;
}

.file-list-compact::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
}

.file-list-compact::-webkit-scrollbar-thumb {
    background: var(--gradient-teal);
    border-radius: var(--radius-full);
}

/* Role View Container */
.role-view {
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* User Info in Header */
header>div:last-child {
    text-align: right;
}

header>div:last-child>div:first-child {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--primary-teal);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

header>div:last-child>div:last-child {
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--text-muted);
    transition: var(--transition);
}

header>div:last-child>div:last-child:hover {
    color: var(--status-error);
}

/* Project Grid */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* ============================================================================
   NEW ASSIGNMENT HIGHLIGHTS
   ============================================================================ */
@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(45, 212, 191, 0.4);
        border: 1px solid var(--primary-teal);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(45, 212, 191, 0);
        border: 1px solid #5eead4;
        transform: scale(1.02);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(45, 212, 191, 0);
        border: 1px solid var(--primary-teal);
    }
}

.pulse-glow {
    animation: pulse-glow 2s infinite;
    color: var(--primary-teal) !important;
    background: var(--primary-teal-dim) !important;
    border: 1px solid var(--primary-teal) !important;
    border-radius: 8px;
    padding: 0.4rem 0.8rem;
    margin: -0.4rem -0.8rem;
}

.pulse-glow i {
    color: var(--primary-teal) !important;
}

/* ============================================================================
   MODE SELECTION STYLES
   ============================================================================ */
.mode-select-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 2.5rem 1.5rem;
    border-radius: var(--radius-2xl);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
    height: 100%;
    /* Ensure equal height in grid */
}

.mode-select-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s;
}

.mode-select-card:hover::before {
    opacity: 1;
}

.mode-select-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-teal);
    background: var(--bg-card-solid);
    box-shadow: 0 20px 40px rgba(0, 128, 128, 0.15);
}

.mode-select-card .mode-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-teal-dim);
    color: var(--primary-teal);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: all 0.4s;
}

.mode-select-card .mode-icon i {
    width: 36px;
    height: 36px;
}

.mode-select-card:hover .mode-icon {
    background: var(--primary-teal);
    color: white;
    transform: rotate(10deg) scale(1.1);
}

.mode-select-card h3 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.mode-select-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    max-width: 200px;
}