/* ==========================================================================
   DESIGN SYSTEM & CUSTOM VARIABLES
   ========================================================================== */
:root {
    /* Color Palette */
    --bg-dark-base: #080b11;
    --bg-dark-surface: #0f1420;
    --glass-bg: rgba(22, 30, 49, 0.65);
    --glass-border: rgba(255, 255, 255, 0.08);
    
    --primary: #3b82f6;
    --primary-glow: rgba(59, 130, 246, 0.35);
    --primary-light: #60a5fa;
    
    --accent-cyan: #06b6d4;
    --accent-cyan-glow: rgba(6, 182, 212, 0.35);
    
    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.25);
    --success-dark: #047857;
    --success-light: #34d399;
    
    --warning: #f59e0b;
    --warning-glow: rgba(245, 158, 11, 0.25);
    --warning-light: #fbbf24;
    
    --danger: #ef4444;
    --danger-glow: rgba(239, 68, 68, 0.25);
    --danger-light: #f87171;
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    /* Transitions & Shadows */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --card-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    --glow-shadow-blue: 0 0 25px rgba(59, 130, 246, 0.25);
    --glow-shadow-cyan: 0 0 25px rgba(6, 182, 212, 0.25);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-dark-base);
    background-image: 
        radial-gradient(at 0% 0%, rgba(15, 23, 42, 0.9) 0, transparent 50%),
        radial-gradient(at 50% 0%, rgba(17, 24, 39, 0.95) 0, transparent 50%),
        radial-gradient(at 100% 0%, rgba(30, 41, 59, 0.5) 0, transparent 50%);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark-base);
}

::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #334155;
}

h1, h2, h3, h4, .brand-name, .stat-number, .day-number, .circular-value {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* ==========================================================================
   AUTHENTICATION SCREEN (LOGIN)
   ========================================================================== */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 24px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

/* Background glows */
.glow-sphere {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.15;
}

.sphere-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -100px;
    left: -100px;
    animation: float-slow 15s infinite alternate;
}

.sphere-2 {
    width: 300px;
    height: 300px;
    background: var(--accent-cyan);
    bottom: -50px;
    right: -50px;
    animation: float-slow 12s infinite alternate-reverse;
}

@keyframes float-slow {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 30px) scale(1.15); }
}

.login-container {
    width: 100%;
    max-width: 440px;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: fade-in-up 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-brand {
    text-align: center;
    margin-bottom: 24px;
}

.brand-logo {
    width: 64px;
    height: 64px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    box-shadow: var(--card-shadow);
}

.login-brand h1 {
    font-size: 28px;
    background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 4px;
    letter-spacing: -0.03em;
}

.login-brand p {
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-cyan);
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.login-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    width: 100%;
    box-shadow: var(--card-shadow);
    position: relative;
}

.login-card h2 {
    font-size: 20px;
    text-align: center;
    margin-bottom: 12px;
    letter-spacing: 0.05em;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-desc {
    font-size: 13.5px;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.5;
    margin-bottom: 28px;
}

/* Form Input Elements */
.input-group {
    position: relative;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 16px;
    color: var(--text-muted);
    pointer-events: none;
    transition: var(--transition-fast);
}

.login-input {
    width: 100%;
    padding: 14px 48px 14px 46px;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    outline: none;
    transition: var(--transition-fast);
    text-align: center;
}

.login-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    background: rgba(15, 23, 42, 0.6);
}

.login-input:focus ~ .input-icon {
    color: var(--primary-light);
}

.toggle-password {
    position: absolute;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: var(--transition-fast);
}

.toggle-password:hover {
    color: var(--text-primary);
}

/* Buttons */
.login-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary) 0%, #1d4ed8 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition-fast);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
}

.login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3);
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
}

.login-btn:active {
    transform: translateY(1px);
}

/* Shake Animation for incorrect password */
.shaking {
    animation: shake 0.4s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}

.error-msg {
    display: none;
    color: var(--danger-light);
    font-size: 12.5px;
    margin-top: 16px;
    font-weight: 600;
    text-align: center;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 8px;
    padding: 8px 12px;
    animation: fade-in 0.3s;
}

.login-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
    font-size: 12px;
    color: var(--text-muted);
}

.login-footer .dot {
    color: var(--text-muted);
    opacity: 0.5;
}

/* ==========================================================================
   MAIN DASHBOARD WRAPPER
   ========================================================================== */
.dashboard-wrapper {
    display: none; /* Controlled by Javascript */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ==========================================================================
   DASHBOARD NAVBAR
   ========================================================================== */
.dashboard-navbar {
    background: rgba(15, 20, 32, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 14px 20px;
}

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

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-avatar {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent-cyan) 100%);
    border-radius: 10px;
    color: white;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
}

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

.brand-name {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--text-primary);
}

.brand-subtitle {
    font-size: 10.5px;
    color: var(--text-secondary);
    font-weight: 600;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-welcome {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.04);
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-light);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.nav-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    color: white;
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-light);
    border-color: rgba(239, 68, 68, 0.2);
}

/* ==========================================================================
   DASHBOARD CONTENT
   ========================================================================== */
.dashboard-content {
    flex: 1;
    padding: 30px 20px;
}

.main-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* ==========================================================================
   HERO PROGRESS CARD
   ========================================================================== */
.progress-hero-card {
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.8) 0%, rgba(15, 23, 42, 0.5) 100%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 32px 40px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    position: relative;
    overflow: hidden;
}

.progress-hero-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 150px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.05) 0%, transparent 70%);
    z-index: 0;
}

.hero-left {
    flex: 1;
    z-index: 1;
}

.hero-tag {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--accent-cyan);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 8px;
    background: rgba(6, 182, 212, 0.1);
    padding: 4px 10px;
    border-radius: 4px;
}

.hero-title {
    font-size: 26px;
    margin-bottom: 10px;
    background: linear-gradient(135deg, white 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    font-size: 14px;
    color: var(--text-secondary);
    max-width: 650px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.hero-dates {
    display: flex;
    align-items: center;
    gap: 16px;
}

.date-badge {
    display: flex;
    flex-direction: column;
}

.date-lbl {
    font-size: 9.5px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.date-val {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.date-divider {
    width: 20px;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.hero-right {
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

/* Circular progress ring */
.progress-circular-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring__circle {
    transition: stroke-dashoffset 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.circular-value-wrapper {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.circular-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--success-light);
    line-height: 1;
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.circular-label {
    font-size: 9px;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    margin-top: 4px;
    text-transform: uppercase;
}

/* ==========================================================================
   STATS GRID
   ========================================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--card-shadow);
    transition: var(--transition-fast);
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.12);
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-completed {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-light);
}

.icon-active {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-light);
}

.icon-remaining {
    background: rgba(6, 182, 212, 0.1);
    color: var(--accent-cyan);
}

.icon-tasks {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-light);
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.stat-number-group {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.stat-number {
    font-size: 20px;
    font-weight: 700;
    color: white;
    line-height: 1.1;
}

.stat-unit {
    font-size: 11.5px;
    color: var(--text-muted);
    font-weight: 600;
}

/* ==========================================================================
   CONTROLS PANEL (SEARCH & FILTERS)
   ========================================================================== */
.controls-panel {
    background: rgba(15, 20, 32, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 290px;
    max-width: 600px;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    pointer-events: none;
    display: flex;
    align-items: center;
}

.search-box input {
    width: 100%;
    padding: 10px 40px 10px 42px;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    color: white;
    font-size: 13.5px;
    font-weight: 500;
    outline: none;
    transition: var(--transition-fast);
}

.search-box input:focus {
    border-color: var(--primary);
    background: rgba(15, 23, 42, 0.6);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-box input:focus ~ .search-icon {
    color: var(--primary-light);
}

.clear-btn {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    border-radius: 50%;
    transition: var(--transition-fast);
}

.clear-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.06);
}

.filter-tabs-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-label {
    font-size: 12.5px;
    color: var(--text-secondary);
    font-weight: 600;
}

.filter-tabs {
    display: flex;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 4px;
    gap: 4px;
}

.filter-tab {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-tab:hover {
    color: white;
}

.filter-tab.active {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

.dot-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.dot-done { background: var(--success); }
.dot-doing { background: var(--warning); }
.dot-todo { background: var(--text-secondary); }

/* ==========================================================================
   LAYOUT GRID: TIMELINE & SIDEBAR
   ========================================================================== */
.timeline-layout-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: start;
}

@media (min-width: 1024px) {
    .timeline-layout-grid {
        grid-template-columns: 3fr 1.1fr;
    }
}

/* ==========================================================================
   TIMELINE (LEFT COLUMN)
   ========================================================================== */
.timeline-container {
    position: relative;
}

.timeline-line-decorator {
    position: absolute;
    top: 30px;
    bottom: 30px;
    left: 28px;
    width: 2px;
    background: linear-gradient(180deg, 
        var(--success) 0%, 
        var(--success) var(--line-height-done, 0%), 
        rgba(255, 255, 255, 0.06) var(--line-height-done, 0%), 
        rgba(255, 255, 255, 0.06) 100%
    );
    z-index: 1;
}

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px;
    color: var(--text-secondary);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.05);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Day Cards */
.day-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--card-shadow);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s, box-shadow 0.25s;
    position: relative;
    z-index: 2;
}

.day-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 12px 35px -10px rgba(0, 0, 0, 0.6);
}

/* Active Day Card Highlights */
.day-card.active-day {
    border: 1.5px solid var(--primary-light);
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.15);
    background: linear-gradient(135deg, rgba(22, 30, 49, 0.8) 0%, rgba(15, 23, 42, 0.75) 100%);
    animation: active-glow 4s infinite alternate;
}

@keyframes active-glow {
    0% { box-shadow: 0 0 20px rgba(59, 130, 246, 0.1); }
    100% { box-shadow: 0 0 35px rgba(59, 130, 246, 0.22); }
}

.day-card.active-day::before {
    content: "⚡ HÔM NAY ĐANG CODE";
    position: absolute;
    top: -11px;
    right: 20px;
    background: linear-gradient(135deg, var(--primary) 0%, #1d4ed8 100%);
    color: white;
    font-size: 10px;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 20px;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
    animation: pulse-border 2s infinite;
}

@keyframes pulse-border {
    0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7); }
    70% { box-shadow: 0 0 0 8px rgba(59, 130, 246, 0); }
    100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}

.day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 12px;
}

.day-number {
    font-size: 17px;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.day-card.active-day .day-number {
    color: var(--primary-light);
}

.day-date {
    font-size: 12.5px;
    color: var(--text-secondary);
    font-weight: 600;
    background: rgba(255, 255, 255, 0.03);
    padding: 3px 10px;
    border-radius: 6px;
}

.day-card.active-day .day-date {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-light);
}

/* Tasks */
.task-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.task-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: rgba(15, 23, 42, 0.3);
    border-radius: 10px;
    border-left: 3px solid var(--text-muted);
    font-size: 13.5px;
    transition: var(--transition-fast);
}

.task-item:hover {
    background: rgba(255, 255, 255, 0.02);
    transform: translateX(3px);
}

.task-item.item-done {
    border-left-color: var(--success);
    background: rgba(16, 185, 129, 0.02);
}

.task-item.item-doing {
    border-left-color: var(--warning);
    background: rgba(245, 158, 11, 0.02);
}

.task-text {
    font-weight: 500;
    color: var(--text-primary);
    width: 78%;
    line-height: 1.45;
}

.badge {
    font-size: 10px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    min-width: 90px;
    text-align: center;
}

.badge.todo {
    background: rgba(148, 163, 184, 0.1);
    color: var(--text-secondary);
    border: 1px solid rgba(148, 163, 184, 0.06);
}

.badge.doing {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning-light);
    border: 1px solid rgba(245, 158, 11, 0.2);
    animation: blink 1.5s infinite;
}

.badge.done {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success-light);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Filter Alert State */
.filter-empty-state {
    text-align: center;
    padding: 48px;
    background: var(--glass-bg);
    border: 1px dashed var(--glass-border);
    border-radius: 16px;
    color: var(--text-secondary);
}

.filter-empty-state svg {
    margin-bottom: 12px;
    color: var(--text-muted);
}

.filter-empty-state h4 {
    font-size: 16px;
    color: white;
    margin-bottom: 4px;
}

/* ==========================================================================
   SIDEBAR DAYS NAVIGATION (RIGHT COLUMN)
   ========================================================================== */
.sidebar-nav {
    display: none; /* Mobile first hidden */
}

@media (min-width: 1024px) {
    .sidebar-nav {
        display: block;
    }
}

.sidebar-sticky-box {
    position: sticky;
    top: 90px;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    padding: 20px;
    box-shadow: var(--card-shadow);
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 10px;
}

.sidebar-header h3 {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
}

.nav-jump-today-btn {
    background: rgba(59, 130, 246, 0.12);
    color: var(--primary-light);
    border: 1px solid rgba(59, 130, 246, 0.2);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-fast);
}

.nav-jump-today-btn:hover {
    background: var(--primary);
    color: white;
}

.sidebar-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    max-height: 380px;
    overflow-y: auto;
    padding-right: 4px;
}

/* Days index cells */
.sidebar-day-cell {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-fast);
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.sidebar-day-cell .day-num-lbl {
    font-size: 12px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

/* States in Calendar Index Grid */
.cell-todo {
    background: rgba(148, 163, 184, 0.03);
    color: var(--text-secondary);
    border-color: rgba(148, 163, 184, 0.08);
}

.cell-doing {
    background: rgba(245, 158, 11, 0.12);
    color: var(--warning-light);
    border-color: rgba(245, 158, 11, 0.3);
    position: relative;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.15);
}

.cell-doing::after {
    content: '';
    position: absolute;
    top: 2px;
    right: 2px;
    width: 6px;
    height: 6px;
    background-color: var(--warning);
    border-radius: 50%;
    animation: blink 1.5s infinite;
}

.cell-done {
    background: rgba(16, 185, 129, 0.12);
    color: var(--success-light);
    border-color: rgba(16, 185, 129, 0.25);
}

/* Cell hover animations */
.sidebar-day-cell:hover {
    transform: scale(1.08);
    filter: brightness(1.2);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.sidebar-day-cell.cell-done:hover {
    box-shadow: 0 0 12px var(--success-glow);
    border-color: var(--success-light);
}

.sidebar-day-cell.cell-doing:hover {
    box-shadow: 0 0 12px var(--warning-glow);
    border-color: var(--warning-light);
}

.sidebar-day-cell.cell-todo:hover {
    box-shadow: 0 0 12px var(--primary-glow);
    border-color: var(--primary-light);
    color: white;
}

.sidebar-legend {
    margin-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11.5px;
    color: var(--text-secondary);
    font-weight: 500;
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.legend-todo {
    background: rgba(148, 163, 184, 0.2);
    border: 1px solid rgba(148, 163, 184, 0.4);
}

.legend-doing {
    background: var(--warning);
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
}

.legend-done {
    background: var(--success);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

/* ==========================================================================
   MODAL DIALOG (CONTRACT DETAIL)
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(5, 7, 12, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-box {
    width: 100%;
    max-width: 580px;
    background: var(--bg-dark-surface);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
    transform: scale(0.95) translateY(10px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-overlay.open .modal-box {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-header h3 {
    font-size: 15px;
    letter-spacing: 0.05em;
    color: white;
}

.modal-close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    border-radius: 6px;
    transition: var(--transition-fast);
}

.modal-close-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.06);
}

.modal-body {
    padding: 24px;
    max-height: 480px;
    overflow-y: auto;
}

.contract-info-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contract-row {
    display: flex;
    flex-direction: column;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
    padding-bottom: 12px;
}

.contract-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.contract-lbl {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 4px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.contract-val {
    font-size: 14.5px;
    font-weight: 600;
    color: white;
}

.contract-val strong {
    color: white;
    font-weight: 700;
}

.contract-val .sub-text {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.highlight-blue {
    color: var(--primary-light);
}

.highlight-warning {
    color: var(--warning-light);
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: flex-end;
}

.modal-btn-confirm {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 13px;
    font-weight: 700;
    padding: 10px 24px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.modal-btn-confirm:hover {
    background: white;
    color: var(--bg-dark-base);
}

/* ==========================================================================
   RESPONSIVE STYLES
   ========================================================================== */
@media (max-width: 768px) {
    .progress-hero-card {
        flex-direction: column;
        padding: 24px;
        text-align: center;
        gap: 24px;
    }
    
    .hero-dates {
        justify-content: center;
    }
    
    .controls-panel {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-tabs-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .filter-tabs {
        width: 100%;
        overflow-x: auto;
    }
    
    .filter-tab {
        flex: 1;
        justify-content: center;
        white-space: nowrap;
    }
    
    .nav-container {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .nav-actions {
        justify-content: space-between;
    }
    
    .user-welcome {
        max-width: 160px;
    }
    
    .task-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .task-text {
        width: 100%;
    }
    
    .badge {
        align-self: flex-end;
    }
    
    .timeline-line-decorator {
        left: 14px;
    }
    
    .day-card {
        padding: 16px;
    }
}

/* Base fade-in transitions */
@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* ==========================================================================
   GLACIER LIGHT THEME SUPPORT
   ========================================================================== */
body.light-theme {
    --bg-dark-base: #f1f5f9;
    --bg-dark-surface: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(15, 23, 42, 0.08);
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    
    --primary: #2563eb;
    --primary-light: #3b82f6;
    
    --card-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.05);
    background-image: 
        radial-gradient(at 0% 0%, rgba(219, 234, 254, 0.7) 0, transparent 50%),
        radial-gradient(at 50% 0%, rgba(243, 244, 246, 0.8) 0, transparent 50%),
        radial-gradient(at 100% 0%, rgba(229, 231, 235, 0.5) 0, transparent 50%);
}

body.light-theme .login-brand h1 {
    background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.light-theme .login-card {
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.06);
}

body.light-theme .login-input {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(15, 23, 42, 0.12);
    color: #0f172a;
}

body.light-theme .login-input:focus {
    background: white;
}

body.light-theme .dashboard-navbar {
    background: rgba(255, 255, 255, 0.85);
}

body.light-theme .user-welcome {
    background: rgba(0, 0, 0, 0.03);
    color: var(--text-secondary);
}

body.light-theme .progress-hero-card {
    background: linear-gradient(135deg, #1e3a8a 0%, #172554 100%);
    box-shadow: 0 10px 30px rgba(30, 58, 138, 0.15);
}

body.light-theme .progress-hero-card .hero-title {
    background: linear-gradient(135deg, white 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.light-theme .progress-hero-card .hero-desc {
    color: rgba(255, 255, 255, 0.8);
}

body.light-theme .progress-hero-card .date-val {
    color: white;
}

body.light-theme .progress-hero-card .time-num {
    color: #34d399;
}

body.light-theme .progress-hero-card .time-lbl {
    color: rgba(255, 255, 255, 0.7);
}

body.light-theme .stat-card {
    background: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

body.light-theme .stat-number {
    color: #0f172a;
}

body.light-theme .controls-panel {
    background: rgba(255, 255, 255, 0.7);
}

body.light-theme .search-box input {
    background: white;
    border-color: rgba(15, 23, 42, 0.08);
    color: #0f172a;
}

body.light-theme .search-box input:focus {
    background: white;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

body.light-theme .filter-tabs {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.04);
}

body.light-theme .filter-tab.active {
    background: white;
    color: #0f172a;
}

body.light-theme .day-card {
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

body.light-theme .day-number {
    color: #0f172a;
}

body.light-theme .day-date {
    background: rgba(0, 0, 0, 0.03);
    color: var(--text-secondary);
}

body.light-theme .task-item {
    background: rgba(241, 245, 249, 0.6);
}

body.light-theme .task-item:hover {
    background: rgba(241, 245, 249, 0.9);
}

body.light-theme .task-text {
    color: #334155;
}

body.light-theme .sidebar-sticky-box {
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

body.light-theme .cell-todo {
    background: rgba(0, 0, 0, 0.02);
    color: var(--text-secondary);
    border-color: rgba(0, 0, 0, 0.05);
}

body.light-theme .diagram-card {
    background: white;
}

body.light-theme .diagram-node {
    background: rgba(248, 250, 252, 0.8);
    border-color: rgba(15, 23, 42, 0.08);
}

body.light-theme .diagram-node:hover {
    background: white;
}

body.light-theme .node-title {
    color: #0f172a;
}

body.light-theme .node-detail-panel {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.04);
}

body.light-theme .connector-line,
body.light-theme .connector-fork-y,
body.light-theme .diagram-connector-h {
    background: rgba(15, 23, 42, 0.1);
}

body.light-theme .connector-arrow {
    border-left-color: rgba(15, 23, 42, 0.2);
}

body.light-theme .diagram-connector-h::after {
    border-left-color: rgba(15, 23, 42, 0.2);
}

/* ==========================================================================
   GO-LIVE COUNTDOWN TIMER STYLES
   ========================================================================== */
.countdown-container {
    margin-top: 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 10px 16px;
    display: inline-block;
    text-align: left;
}

.countdown-title {
    font-size: 10px;
    font-weight: 800;
    color: var(--accent-cyan);
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.countdown-timer {
    display: flex;
    align-items: center;
    gap: 10px;
}

.time-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 40px;
}

.time-num {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: var(--success-light);
    line-height: 1;
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.time-lbl {
    font-size: 8px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-top: 2px;
}

.time-colon {
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.3);
    line-height: 1;
    margin-top: -12px;
}

body.light-theme .time-colon {
    color: rgba(255, 255, 255, 0.4);
}

/* ==========================================================================
   PROJECT PHASES BAR STYLES
   ========================================================================== */
.phases-section {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    padding: 18px 20px;
    margin-bottom: 24px;
    box-shadow: var(--card-shadow);
}

.phases-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 10px;
}

body.light-theme .phases-header-title {
    border-bottom-color: rgba(15, 23, 42, 0.05);
}

.phases-header-title h3 {
    font-size: 13px;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    text-transform: uppercase;
}

.phases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 8px;
}

.phase-btn {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: var(--transition-fast);
    text-align: left;
}

body.light-theme .phase-btn {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(15, 23, 42, 0.05);
}

.phase-badge-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

body.light-theme .phase-badge-num {
    background: rgba(15, 23, 42, 0.05);
    color: var(--text-secondary);
}

.phase-btn-content {
    display: flex;
    flex-direction: column;
}

.phase-btn-name {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.phase-btn-days {
    font-size: 9px;
    color: var(--text-muted);
    margin-top: 2px;
}

.phase-btn:hover {
    background: rgba(59, 130, 246, 0.06);
    border-color: rgba(59, 130, 246, 0.2);
    transform: translateY(-1px);
}

.phase-btn.active {
    background: rgba(59, 130, 246, 0.15);
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.12);
}

body.light-theme .phase-btn.active {
    background: rgba(37, 99, 235, 0.08);
}

.phase-btn.active .phase-badge-num {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}

.phase-btn.active .phase-btn-name {
    color: var(--primary-light);
}

/* ==========================================================================
   DYNAMIC ARCHITECTURE DIAGRAM STYLES
   ========================================================================== */
.diagram-section {
    margin-bottom: 24px;
    animation: fade-in-up 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.diagram-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 24px;
}

.diagram-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 12px;
}

body.light-theme .diagram-header {
    border-bottom-color: rgba(15, 23, 42, 0.05);
}

.diagram-header h4 {
    font-size: 13.5px;
    letter-spacing: 0.05em;
    color: white;
    text-transform: uppercase;
}

body.light-theme .diagram-header h4 {
    color: #0f172a;
}

.diagram-tag {
    font-size: 9px;
    font-weight: 800;
    color: var(--accent-cyan);
    background: rgba(6, 182, 212, 0.1);
    padding: 3px 8px;
    border-radius: 4px;
}

.diagram-nodes-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    position: relative;
    padding: 20px 0;
}

.diagram-node {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 16px;
    width: 200px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-fast);
    box-shadow: var(--card-shadow);
    z-index: 5;
}

.diagram-node:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15);
}

.node-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    transition: var(--transition-fast);
}

body.light-theme .node-icon {
    background: rgba(0, 0, 0, 0.02);
}

.diagram-node:hover .node-icon {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-light);
}

.node-title {
    font-size: 11px;
    font-weight: 800;
    color: white;
    letter-spacing: 0.03em;
    margin-bottom: 4px;
}

.node-desc {
    font-size: 10px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    line-height: 1.3;
}

.node-badge {
    font-size: 8.5px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
}

.status-check {
    background: rgba(16, 185, 129, 0.12);
    color: var(--success-light);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-doing {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning-light);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.status-todo {
    background: rgba(148, 163, 184, 0.1);
    color: var(--text-secondary);
    border: 1px solid rgba(148, 163, 184, 0.06);
}

.diagram-connector {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 2px;
    position: relative;
}

.connector-line {
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.08);
}

.connector-arrow {
    position: absolute;
    right: 0;
    width: 0;
    height: 0;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 6px solid rgba(255, 255, 255, 0.2);
}

/* Fork connector mapping */
.diagram-fork-container {
    display: flex;
    align-items: stretch;
    width: 100%;
    margin-top: 10px;
    padding-left: 200px;
    position: relative;
}

.connector-fork-y {
    width: 2px;
    background: rgba(255, 255, 255, 0.08);
    position: absolute;
    top: -24px;
    bottom: 50px;
    left: 450px;
}

@media (max-width: 1024px) {
    .diagram-fork-container {
        padding-left: 0;
        margin-top: 20px;
    }
    .connector-fork-y {
        display: none;
    }
    .fork-destinations {
        margin-left: 0 !important;
        align-items: center;
    }
    .diagram-connector-h {
        display: none;
    }
}

.fork-destinations {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-left: 140px;
    width: 100%;
}

.fork-branch {
    display: flex;
    align-items: center;
}

.diagram-connector-h {
    width: 108px;
    height: 2px;
    background: rgba(255, 255, 255, 0.08);
    position: relative;
}

.diagram-connector-h::after {
    content: '';
    position: absolute;
    right: 0;
    top: -3px;
    width: 0;
    height: 0;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 6px solid rgba(255, 255, 255, 0.2);
}

.node-detail-panel {
    margin-top: 24px;
    background: rgba(15, 23, 42, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 18px 24px;
    font-size: 13.5px;
    animation: fade-in 0.3s;
}

.node-detail-panel h5 {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-light);
    margin-bottom: 10px;
    text-transform: uppercase;
}

.checklist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.chk-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12.5px;
    color: var(--text-secondary);
}

.chk-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.chk-icon-done { color: var(--success); }
.chk-icon-doing { color: var(--warning); }
.chk-icon-todo { color: var(--text-muted); }

/* ==========================================================================
   ADDITIONAL RESPONSIVE OVERRIDES
   ========================================================================== */
@media (max-width: 1024px) {
    .diagram-nodes-wrapper {
        flex-direction: column;
        align-items: center;
        gap: 30px; /* Space for vertical connector arrows */
    }
    
    .diagram-connector {
        display: none;
    }
    
    .diagram-fork-container {
        padding-left: 0;
        margin-top: 0;
        width: auto;
        display: flex;
        justify-content: center;
    }
    
    .connector-fork-y {
        display: none;
    }
    
    .fork-destinations {
        margin-left: 0 !important;
        align-items: center;
        gap: 30px; /* Space for vertical connectors */
    }
    
    .fork-branch {
        flex-direction: column;
        align-items: center;
        width: auto;
    }
    
    .diagram-connector-h {
        display: none;
    }
    
    /* Connect nodes vertically on tablet/mobile */
    .diagram-node {
        position: relative;
    }
    
    .diagram-node:not(#node-momo)::after {
        content: '';
        position: absolute;
        bottom: -22px;
        left: 50%;
        transform: translateX(-50%);
        width: 2px;
        height: 22px;
        background: rgba(255, 255, 255, 0.15);
        z-index: 1;
    }
    
    .diagram-node:not(#node-momo)::before {
        content: '';
        position: absolute;
        bottom: -25px;
        left: 50%;
        transform: translateX(-50%);
        width: 0;
        height: 0;
        border-left: 5px solid transparent;
        border-right: 5px solid transparent;
        border-top: 6px solid rgba(255, 255, 255, 0.3);
        z-index: 2;
    }
    
    body.light-theme .diagram-node:not(#node-momo)::after {
        background: rgba(15, 23, 42, 0.15);
    }
    
    body.light-theme .diagram-node:not(#node-momo)::before {
        border-top-color: rgba(15, 23, 42, 0.3);
    }
}

@media (max-width: 768px) {
    /* Navbar buttons to compact icons */
    .nav-container {
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }
    
    .nav-actions {
        width: 100%;
        justify-content: center;
        gap: 8px;
    }
    
    .user-welcome {
        display: none !important;
    }
    
    .nav-actions button span {
        display: none !important;
    }
    
    .nav-btn, .logout-btn {
        padding: 10px;
        aspect-ratio: 1;
        width: 42px;
        height: 42px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 10px;
        flex: unset;
    }
    
    /* Horizontal Scrollable Phases Grid */
    .phases-grid {
        display: flex !important;
        grid-template-columns: none !important;
        overflow-x: auto !important;
        gap: 10px !important;
        padding: 4px 4px 12px !important;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
    }
    
    .phases-grid::-webkit-scrollbar {
        display: none; /* Safari/Chrome */
    }
    
    .phase-btn {
        flex: 0 0 160px;
        scroll-snap-align: start;
    }
    
    /* Diagram header layout */
    .diagram-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* ==========================================================================
   MOBILE CALENDAR DRAWER & FAB TRIGGER
   ========================================================================== */
.mobile-nav-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: linear-gradient(135deg, var(--primary) 0%, #1d4ed8 100%);
    color: white;
    border: none;
    border-radius: 30px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: none; /* Desktop hidden */
    align-items: center;
    gap: 8px;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
    z-index: 999;
    transition: var(--transition-fast);
}

.mobile-nav-fab:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.5);
}

.mobile-nav-fab:active {
    transform: translateY(1px);
}

.mobile-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(5, 7, 12, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end; /* Bottom sheet style */
}

.mobile-drawer-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.mobile-drawer-box {
    width: 100%;
    background: var(--bg-dark-surface);
    border-top: 1px solid var(--glass-border);
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    max-height: 80vh;
}

.mobile-drawer-overlay.open .mobile-drawer-box {
    transform: translateY(0);
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

body.light-theme .drawer-header {
    border-bottom-color: rgba(15, 23, 42, 0.05);
}

.drawer-header h3 {
    font-size: 14px;
    letter-spacing: 0.05em;
    color: var(--text-primary);
}

.drawer-close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    border-radius: 6px;
    transition: var(--transition-fast);
}

.drawer-close-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
}

body.light-theme .drawer-close-btn:hover {
    background: rgba(0, 0, 0, 0.04);
}

.drawer-body {
    padding: 20px 24px 30px;
    overflow-y: auto;
}

.drawer-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr); /* 6 columns fits beautifully on mobile screens */
    gap: 8px;
    margin-bottom: 20px;
}

@media (max-width: 480px) {
    .drawer-grid {
        grid-template-columns: repeat(5, 1fr); /* 5 columns for extra narrow screens */
    }
}

/* Show FAB on mobile/tablet viewports */
@media (max-width: 1023px) {
    .mobile-nav-fab {
        display: flex;
    }
}

