@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

/* ═══════════════════════════════════════════════
   SMARTFLOW — PREMIUM DESIGN SYSTEM v3.0
   Glassmorphism · Electric Cyan · Deep Space
═══════════════════════════════════════════════ */

:root {
    /* ── Core Palette ── */
    --accent-cyan:    #1d4ed8;
    --accent-blue:    #1e3a8a;
    --accent-purple:  #312e81;
    --accent-teal:    #1e40af;
    --accent-glow:    rgba(29, 78, 216, 0.35);
    --accent-glow-sm: rgba(29, 78, 216, 0.15);

    /* ── Light Theme ── */
    --bg-color:           #f0f4ff;
    --bg-subtle:          #e8eeff;
    --sidebar-bg:         #ffffff;
    --card-bg:            #ffffff;
    --card-bg-glass:      rgba(255, 255, 255, 0.75);
    --topbar-bg:          rgba(255, 255, 255, 0.92);
    --text-primary:       #0d1b2e;
    --text-secondary:     #4a5568;
    --text-muted:         #94a3b8;
    --border-color:       rgba(0, 0, 0, 0.08);
    --border-glow:        rgba(29, 78, 216, 0.4);
    --primary-color:      #1e3a8a;
    --primary-hover:      #1e40af;
    --primary-glow:       rgba(30, 58, 138, 0.3);
    --danger-color:       #ef4444;
    --success-color:      #10b981;
    --warning-color:      #f59e0b;
    --kanban-column-bg:   #f5f7ff;

    /* ── Shadows ── */
    --shadow-sm:  0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md:  0 4px 16px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
    --shadow-lg:  0 20px 40px rgba(0,0,0,0.1), 0 8px 16px rgba(0,0,0,0.06);
    --shadow-glow: 0 0 20px rgba(29, 78, 216, 0.25), 0 4px 16px rgba(30, 58, 138, 0.2);
    --shadow-card: 0 1px 3px rgba(0,0,0,0.05), 0 4px 24px rgba(0,0,0,0.06);

    /* ── Transitions ── */
    --transition-speed: 0.25s;
    --transition-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);

    /* ── Geometry ── */
    --radius-sm:  0px;
    --radius-md:  0px;
    --radius-lg:  0px;
    --radius-xl:  0px;
}

[data-theme="dark"] {
    /* ── Dark Theme — Deep Space ── */
    --bg-color:           #060c18;
    --bg-subtle:          #0a1628;
    --sidebar-bg:         #0a1122;
    --card-bg:            #0d1830;
    --card-bg-glass:      rgba(13, 24, 48, 0.8);
    --topbar-bg:          rgba(10, 17, 34, 0.95);
    --text-primary:       #e8f4ff;
    --text-secondary:     #7fa8cc;
    --text-muted:         #3d5a7a;
    --border-color:       rgba(29, 78, 216, 0.12);
    --border-glow:        rgba(29, 78, 216, 0.35);
    --primary-color:      #3b82f6;
    --primary-hover:      #60a5fa;
    --primary-glow:       rgba(59, 130, 246, 0.25);
    --kanban-column-bg:   #080f1e;
    --shadow-sm:  0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
    --shadow-md:  0 4px 16px rgba(0,0,0,0.4), 0 2px 6px rgba(0,0,0,0.2);
    --shadow-lg:  0 20px 60px rgba(0,0,0,0.6), 0 8px 24px rgba(0,0,0,0.4);
    --shadow-glow: 0 0 30px rgba(29, 78, 216, 0.2), 0 4px 20px rgba(30, 58, 138, 0.15);
    --shadow-card: 0 1px 3px rgba(0,0,0,0.3), 0 4px 24px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.04);
}

/* ═══════════════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════════════ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', 'Outfit', system-ui, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    transition: background-color var(--transition-speed), color var(--transition-speed);
    display: flex;
    height: 100vh;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Animated ambient background (dark mode) ── */
[data-theme="dark"] body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 20% 10%, rgba(0, 212, 255, 0.04) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 80% 80%, rgba(76, 110, 245, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse 40% 40% at 50% 50%, rgba(139, 92, 246, 0.03) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* ═══════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════ */
.btn {
    padding: 0.5rem 1.25rem;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.875rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: 0.01em;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.1);
    opacity: 0;
    transition: opacity 0.2s;
    border-radius: inherit;
}

.btn:hover::after { opacity: 1; }

.btn-primary {
    background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(30, 58, 138, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(30, 58, 138, 0.55), 0 0 0 1px rgba(29, 78, 216, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(30, 58, 138, 0.35);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    backdrop-filter: blur(4px);
}

.btn-outline:hover {
    border-color: var(--border-glow);
    background: rgba(29, 78, 216, 0.06);
    color: var(--accent-cyan);
    transform: translateY(-1px);
}

.btn-outline:active { transform: translateY(0); }

/* ═══════════════════════════════════════════════
   FORM STYLES
═══════════════════════════════════════════════ */
.input-group { margin-bottom: 1rem; }

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.input-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--card-bg);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.input-control:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.12), 0 0 20px rgba(0, 212, 255, 0.08);
}

.input-control::placeholder {
    color: var(--text-muted);
    font-size: 0.875rem;
}

select.input-control {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%2394a3b8' d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 14px;
    padding-right: 2.5rem;
}

[data-theme="dark"] .input-control {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(0, 212, 255, 0.1);
}

[data-theme="dark"] .input-control:focus {
    background: rgba(0, 212, 255, 0.04);
}

/* ═══════════════════════════════════════════════
   SIDEBAR — PREMIUM DARK NAVY
═══════════════════════════════════════════════ */
.sidebar {
    width: 260px;
    background: linear-gradient(180deg, #060d1f 0%, #07101e 50%, #050a17 100%);
    border-right: 1px solid rgba(29, 78, 216, 0.12);
    display: flex;
    flex-direction: column;
    height: 100vh;
    flex-shrink: 0;
    position: relative;
    z-index: 10;
}

.sidebar::after {
    content: '';
    position: absolute;
    top: 20%;
    right: -1px;
    width: 2px;
    height: 30%;
    background: linear-gradient(to bottom, transparent, rgba(29, 78, 216, 0.6), transparent);
    pointer-events: none;
}

.sidebar-header {
    padding: 1.25rem 1.5rem;
    height: 68px;
    display: flex;
    align-items: center;
    gap: 0.875rem;
    border-bottom: 1px solid rgba(29, 78, 216, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

.sidebar-header .logo-box {
    background: linear-gradient(135deg, #1e3a8a, #1d4ed8);
    color: white;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    border-radius: var(--radius-sm);
    box-shadow: 0 0 16px rgba(30, 58, 138, 0.55), 0 4px 8px rgba(0,0,0,0.3);
    flex-shrink: 0;
    transition: box-shadow 0.3s, transform 0.3s;
}

.sidebar-header .logo-box:hover {
    box-shadow: 0 0 24px rgba(29, 78, 216, 0.75), 0 4px 12px rgba(0,0,0,0.4);
    transform: scale(1.05) rotate(-2deg);
}

.sidebar-header .logo-text {
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #e8f4ff;
    text-transform: uppercase;
}

.sidebar-header .logo-accent {
    color: #3b82f6;
    text-shadow: 0 0 12px rgba(59, 130, 246, 0.6);
}

.sidebar-menu-wrapper {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem 0;
}

.sidebar-menu-wrapper::-webkit-scrollbar { width: 3px; }
.sidebar-menu-wrapper::-webkit-scrollbar-thumb {
    background: rgba(29, 78, 216, 0.3);
    border-radius: 99px;
}
.sidebar-menu-wrapper::-webkit-scrollbar-track { background: transparent; }

.nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.menu-section {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(59, 130, 246, 0.5);
    padding: 1.5rem 1.5rem 0.5rem 1.5rem;
}

.nav-item {
    padding: 0.6rem 1.25rem 0.6rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #a8c4e0;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s var(--transition-smooth);
    cursor: pointer;
    position: relative;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin-right: 0.75rem;
}

.nav-item i {
    width: 18px;
    font-size: 0.95rem;
    text-align: center;
    color: #7aaacf;
    transition: color 0.2s ease, transform 0.2s ease;
    flex-shrink: 0;
}

.nav-item:hover {
    background: rgba(29, 78, 216, 0.08);
    color: #93c5fd;
    padding-left: 1.625rem;
}

.nav-item:hover i {
    color: #3b82f6;
    transform: scale(1.1);
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(29, 78, 216, 0.15), rgba(29, 78, 216, 0.05));
    color: #e8f4ff;
    font-weight: 600;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: linear-gradient(to bottom, #1d4ed8, #1e40af);
    border-radius: 0 3px 3px 0;
    box-shadow: 0 0 8px rgba(29, 78, 216, 0.7);
}

.nav-item.active i {
    color: #3b82f6;
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

.sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(29, 78, 216, 0.1);
    background: rgba(0, 0, 0, 0.25);
}

.footer-user-panel {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-user-panel .user-avatar {
    background: linear-gradient(135deg, #1e3a8a, #1d4ed8);
    color: white;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
    box-shadow: 0 0 12px rgba(30, 58, 138, 0.45);
    flex-shrink: 0;
    letter-spacing: 0.05em;
}

.footer-user-panel .user-info-text { flex: 1; min-width: 0; }

.footer-user-panel .user-name {
    color: #c8e0f0;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.footer-user-panel .user-role {
    color: rgba(59, 130, 246, 0.65);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 1px;
}

.footer-user-panel .logout-icon-btn {
    background: transparent;
    border: none;
    color: #3d6080;
    font-size: 1rem;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease, background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.375rem;
    border-radius: var(--radius-sm);
}

.footer-user-panel .logout-icon-btn:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    transform: scale(1.1);
}

/* ═══════════════════════════════════════════════
   MAIN CONTENT AREA
═══════════════════════════════════════════════ */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.topbar {
    height: 68px;
    background: var(--topbar-bg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: relative;
    z-index: 5;
}

[data-theme="dark"] .topbar {
    border-bottom-color: rgba(29, 78, 216, 0.1);
    box-shadow: 0 1px 0 rgba(29, 78, 216, 0.07), 0 4px 24px rgba(0,0,0,0.2);
}

.content-area {
    flex: 1;
    padding: 1.75rem 2rem;
    overflow-y: auto;
    position: relative;
}

.content-area::-webkit-scrollbar { width: 5px; }
.content-area::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 99px;
}
[data-theme="dark"] .content-area::-webkit-scrollbar-thumb {
    background: rgba(29, 78, 216, 0.25);
}

/* ═══════════════════════════════════════════════
   PAGE TITLE
═══════════════════════════════════════════════ */
.page-title {
    padding-left: 1rem;
    line-height: 1.1;
    display: inline-block;
    position: relative;
}

.page-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--accent-cyan), var(--accent-blue));
    border-radius: 99px;
    box-shadow: 0 0 8px rgba(29, 78, 216, 0.55);
}

/* ═══════════════════════════════════════════════
   STAT CARDS — GLASSMORPHISM
═══════════════════════════════════════════════ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: transform 0.25s var(--transition-bounce), box-shadow 0.25s, border-color 0.25s;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

[data-theme="dark"] .stat-card {
    background: var(--card-bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-color: rgba(29, 78, 216, 0.12);
}

.stat-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: var(--shadow-glow);
    border-color: var(--border-glow);
}

.stat-card:hover::before { opacity: 1; }

.stat-title {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.stat-value {
    font-family: 'Outfit', sans-serif;
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ═══════════════════════════════════════════════
   KANBAN BOARD
═══════════════════════════════════════════════ */
.kanban-board {
    display: flex;
    gap: 1.25rem;
    height: 100%;
    overflow-x: auto;
    padding-bottom: 1rem;
}

.kanban-board::-webkit-scrollbar { height: 5px; }
.kanban-board::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 99px;
}

.kanban-column {
    background: var(--kanban-column-bg);
    border-radius: var(--radius-md);
    min-width: 300px;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    transition: border-color 0.2s;
}

[data-theme="dark"] .kanban-column {
    background: rgba(8, 15, 30, 0.8);
    border-color: rgba(29, 78, 216, 0.1);
    backdrop-filter: blur(8px);
}

.kanban-column:hover { border-color: var(--border-glow); }

.kanban-header {
    padding: 1rem 1.125rem;
    font-weight: 700;
    font-size: 0.875rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    letter-spacing: 0.03em;
}

.kanban-badge {
    background: rgba(29, 78, 216, 0.12);
    color: var(--accent-cyan);
    padding: 0.15rem 0.55rem;
    border-radius: 99px;
    font-size: 0.7rem;
    font-weight: 700;
    border: 1px solid rgba(29, 78, 216, 0.25);
}

.kanban-tasks {
    padding: 0.875rem;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-height: 100px;
}

.task-card {
    background: var(--card-bg);
    padding: 1rem;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    cursor: grab;
    border: 1px solid var(--border-color);
    transition: transform 0.2s var(--transition-bounce), box-shadow 0.2s, border-color 0.2s;
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .task-card {
    background: rgba(13, 24, 48, 0.9);
    border-color: rgba(29, 78, 216, 0.1);
}

.task-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 0;
    background: linear-gradient(to bottom, var(--accent-cyan), var(--accent-blue));
    transition: height 0.25s var(--transition-smooth);
    border-radius: 0 0 3px 0;
}

.task-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
    border-color: var(--border-glow);
}

.task-card:hover::before { height: 100%; }
.task-card:active { cursor: grabbing; }

.task-title {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.625rem;
    line-height: 1.35;
}

.task-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.priority-high    { color: #ef4444; }
.priority-medium  { color: #f59e0b; }
.priority-low     { color: #10b981; }
.priority-urgent  { color: #dc2626; font-weight: 700; }

/* ═══════════════════════════════════════════════
   LOGIN PAGE — SPECTACULAR GLASSMORPHISM
═══════════════════════════════════════════════ */
.login-container {
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        linear-gradient(135deg, rgba(4, 8, 20, 0.75) 0%, rgba(6, 16, 40, 0.65) 100%),
        url('../images/login_bg.jpg') no-repeat center center / cover;
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: -20%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(29, 78, 216, 0.1) 0%, transparent 70%);
    animation: orbFloat 8s ease-in-out infinite;
    pointer-events: none;
}

.login-container::after {
    content: '';
    position: absolute;
    bottom: -20%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(30, 58, 138, 0.12) 0%, transparent 70%);
    animation: orbFloat 10s ease-in-out infinite reverse;
    pointer-events: none;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%       { transform: translate(30px, -20px) scale(1.05); }
    66%       { transform: translate(-20px, 30px) scale(0.97); }
}

[data-theme="dark"] .login-container {
    background:
        linear-gradient(135deg, rgba(2, 5, 14, 0.85) 0%, rgba(6, 12, 28, 0.8) 100%),
        url('../images/login_bg.jpg') no-repeat center center / cover;
}

.login-card {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(32px) saturate(1.8);
    -webkit-backdrop-filter: blur(32px) saturate(1.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 3rem;
    border-radius: var(--radius-xl);
    box-shadow:
        0 32px 80px rgba(0, 0, 0, 0.4),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    width: 100%;
    max-width: 420px;
    animation: loginReveal 0.6s var(--transition-bounce) both;
    position: relative;
    z-index: 10;
}

[data-theme="dark"] .login-card {
    background: rgba(8, 15, 35, 0.75);
    border-color: rgba(0, 212, 255, 0.15);
    box-shadow:
        0 32px 80px rgba(0, 0, 0, 0.7),
        0 0 60px rgba(0, 212, 255, 0.06),
        inset 0 1px 0 rgba(0, 212, 255, 0.1);
}

.login-card::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 20%;
    right: 20%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.8), transparent);
    border-radius: 99px;
}

@keyframes loginReveal {
    from { opacity: 0; transform: translateY(30px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-header h1 {
    font-family: 'Outfit', sans-serif;
    color: #ffffff;
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-shadow: 0 0 30px rgba(0, 212, 255, 0.4);
}

.login-card .input-control {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.login-card .input-control::placeholder { color: rgba(255, 255, 255, 0.4); }

.login-card .input-control:focus {
    background: rgba(0, 212, 255, 0.08);
    border-color: rgba(0, 212, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.12), 0 0 30px rgba(0, 212, 255, 0.1);
    color: #ffffff;
}

[data-theme="dark"] .login-card .input-control {
    background: rgba(0, 20, 40, 0.6);
    border-color: rgba(0, 212, 255, 0.15);
    color: #e0f0ff;
}

.login-card .input-group label { color: rgba(255, 255, 255, 0.65); }

/* ═══════════════════════════════════════════════
   MODAL
═══════════════════════════════════════════════ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 8, 20, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--card-bg);
    padding: 2rem 2.25rem;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 620px;
    box-shadow: var(--shadow-lg), 0 0 60px rgba(0, 212, 255, 0.05);
    transform: translateY(20px) scale(0.98);
    transition: transform 0.3s var(--transition-bounce);
    border: 1px solid var(--border-color);
    max-height: 92vh;
    overflow-y: auto;
    position: relative;
}

/* Task details modal: fixed height, internal scroll only */
.modal-content.large {
    max-height: none;
    overflow-y: hidden;
}

[data-theme="dark"] .modal-content {
    background: linear-gradient(145deg, #0d1830, #080f1e);
    border-color: rgba(0, 212, 255, 0.12);
    box-shadow:
        0 32px 80px rgba(0,0,0,0.7),
        0 0 60px rgba(0,212,255,0.04),
        inset 0 1px 0 rgba(0,212,255,0.06);
}

.modal-overlay.active .modal-content {
    transform: translateY(0) scale(1);
}

.modal-content.large { max-width: 1020px; }

.modal-content::-webkit-scrollbar { width: 4px; }
.modal-content::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 255, 0.2);
    border-radius: 99px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.modal-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-cyan), transparent);
}

[data-theme="dark"] .modal-header {
    border-bottom-color: rgba(0, 212, 255, 0.08);
}

.modal-header h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.3rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.close-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

.modal-grid {
    display: grid;
    grid-template-columns: 1.75fr 1fr;
    gap: 0;
    margin-top: 1.5rem;
}

.modal-grid > div:last-child {
    border-left: 1px solid var(--border-color);
    padding-left: 1.75rem;
}

[data-theme="dark"] .modal-grid > div:last-child {
    border-left-color: rgba(0, 212, 255, 0.08);
}

.modal-grid > div:first-child {
    padding-right: 1.75rem;
}

@media (max-width: 768px) {
    .modal-grid { grid-template-columns: 1fr; gap: 1rem; margin-top: 1rem; }
    .modal-grid > div { border-left: none !important; padding-left: 0 !important; padding-right: 0 !important; }
    .modal-content { padding: 1.25rem; width: 95%; }
}

.modal-section-title {
    font-size: 0.68rem;
    font-weight: 800;
    color: var(--text-muted);
    margin-bottom: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-section-title::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 2px;
    background: var(--accent-cyan);
    flex-shrink: 0;
}

/* Modal Tabs */
.modal-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.75rem;
    gap: 0;
    overflow: visible;
    padding: 0;
    background: transparent;
}

[data-theme="dark"] .modal-tabs {
    border-bottom-color: rgba(0, 212, 255, 0.1);
}

.modal-tab-btn {
    flex: 1;
    height: 2.75rem;
    padding: 0 0.75rem;
    background: transparent;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
    box-sizing: border-box;
    position: relative;
    transition: color 0.2s ease, background 0.2s ease;
}

/* Active indicator via pseudo-element — more reliable than border-bottom on <button> */
.modal-tab-btn::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: transparent;
    transition: background 0.2s ease;
}

.modal-tab-btn:hover:not(.active) {
    color: var(--text-secondary);
    background: rgba(0, 212, 255, 0.04);
}

.modal-tab-btn.active {
    color: var(--primary-color);
}

.modal-tab-btn.active::after {
    background: var(--primary-color);
}

[data-theme="dark"] .modal-tab-btn.active {
    color: var(--accent-cyan);
}

[data-theme="dark"] .modal-tab-btn.active::after {
    background: var(--accent-cyan);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }


/* Form group zone — visual grouping box for related fields */
.form-group-zone {
    border: 1px solid var(--border-color);
    padding: 1.125rem 1.25rem;
    margin-bottom: 1.25rem;
    position: relative;
}

[data-theme="dark"] .form-group-zone {
    border-color: rgba(0, 212, 255, 0.07);
    background: rgba(0, 212, 255, 0.015);
}

.form-group-zone > .form-zone-label {
    position: absolute;
    top: -0.55rem;
    left: 0.75rem;
    background: var(--card-bg);
    padding: 0 0.375rem;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

[data-theme="dark"] .form-group-zone > .form-zone-label {
    background: #0d1830;
}
/* ═══════════════════════════════════════════════
   AVATAR GROUPS
═══════════════════════════════════════════════ */
.avatar-group {
    display: flex;
    align-items: center;
    padding-left: 6px;
}

.avatar-circle {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--card-bg);
    margin-left: -8px;
    transition: all 0.2s var(--transition-bounce);
    cursor: default;
    user-select: none;
    letter-spacing: 0.03em;
}

.avatar-circle:first-child { margin-left: 0; }

.avatar-circle:hover {
    transform: translateY(-4px) scale(1.1);
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.4);
}

/* ═══════════════════════════════════════════════
   CHECKLIST & PROGRESS
═══════════════════════════════════════════════ */
.checklist-container { margin-top: 1.5rem; }

.checklist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    margin-bottom: 0.625rem;
    font-size: 0.95rem;
}

.progress-bar-bg {
    background: var(--border-color);
    height: 6px;
    border-radius: 0;
    overflow: hidden;
    margin-bottom: 1rem;
    width: 100%;
}

.progress-bar-fill {
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan));
    height: 100%;
    width: 0%;
    transition: width 0.5s var(--transition-smooth);
    border-radius: 0;
    box-shadow: 0 0 8px rgba(0, 212, 255, 0.4);
}

.checklist-items {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.625rem;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.checklist-item:hover { background: rgba(0, 212, 255, 0.04); }

.checklist-item-checkbox {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--accent-cyan);
    border-radius: 4px;
    flex-shrink: 0;
}

.checklist-item-text {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 0.875rem;
    outline: none;
    padding: 0.125rem;
    font-family: inherit;
}

.checklist-item-text.completed {
    text-decoration: line-through;
    color: var(--text-muted);
    opacity: 0.7;
}

.checklist-item-delete {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.8rem;
    opacity: 0;
    transition: opacity 0.2s, color 0.2s;
    padding: 0.25rem;
    border-radius: 4px;
}

.checklist-item:hover .checklist-item-delete { opacity: 1; }
.checklist-item-delete:hover {
    color: var(--danger-color);
    background: rgba(239, 68, 68, 0.08);
}

.add-checklist-item-form { display: flex; gap: 0.5rem; }

/* ═══════════════════════════════════════════════
   BOARD TABS
═══════════════════════════════════════════════ */
.board-tabs {
    display: inline-flex;
    background: var(--bg-subtle);
    padding: 3px;
    gap: 0;
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .board-tabs {
    background: rgba(0, 212, 255, 0.03);
    border-color: rgba(0, 212, 255, 0.1);
}

.board-tab-btn {
    padding: 0.35rem 0.9rem;
    border: none;
    background: transparent;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    transition: all 0.18s var(--transition-smooth);
    color: var(--text-muted);
    font-family: inherit;
    white-space: nowrap;
}

.board-tab-btn:hover {
    color: var(--text-secondary);
    background: rgba(0, 212, 255, 0.06);
}

.board-tab-btn.active {
    background: var(--card-bg);
    color: var(--accent-cyan);
    box-shadow: 0 0 0 1px rgba(0, 212, 255, 0.2), 0 2px 12px rgba(0, 212, 255, 0.1);
    font-weight: 700;
}

[data-theme="dark"] .board-tab-btn.active {
    background: rgba(0, 212, 255, 0.08);
    box-shadow: 0 0 0 1px rgba(0, 212, 255, 0.25), 0 0 16px rgba(0, 212, 255, 0.08);
}

.kb-view-btn {
    transition: background 0.18s ease, color 0.18s ease;
    font-family: inherit;
}

.kb-view-btn:hover { opacity: 0.85; }

/* ═══════════════════════════════════════════════
   NOTIFICATION DROPDOWN
═══════════════════════════════════════════════ */
.notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.75rem;
    width: 340px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: dropdownReveal 0.2s var(--transition-bounce);
}

[data-theme="dark"] .notification-dropdown {
    background: rgba(10, 17, 34, 0.95);
    border-color: rgba(0, 212, 255, 0.12);
    box-shadow: var(--shadow-lg), 0 0 40px rgba(0,212,255,0.05);
    backdrop-filter: blur(16px);
}

.notification-dropdown.active { display: flex; }

@keyframes dropdownReveal {
    from { opacity: 0; transform: translateY(-8px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--border-color);
    font-weight: 700;
    font-size: 0.85rem;
}

[data-theme="dark"] .notification-header {
    border-bottom-color: rgba(0, 212, 255, 0.08);
}

.mark-all-read-btn {
    background: transparent;
    border: none;
    color: var(--accent-cyan);
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: inherit;
    transition: opacity 0.2s;
}

.mark-all-read-btn:hover { opacity: 0.75; text-decoration: underline; }

.notification-list {
    list-style: none;
    max-height: 300px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.2s;
    align-items: flex-start;
}

[data-theme="dark"] .notification-item {
    border-bottom-color: rgba(0, 212, 255, 0.05);
}

.notification-item:hover { background: rgba(0, 212, 255, 0.04); }
.notification-item:last-child { border-bottom: none; }

.notification-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    flex-shrink: 0;
}

.notification-icon.overdue  { background: rgba(239, 68, 68, 0.12);  color: var(--danger-color); }
.notification-icon.due-soon { background: rgba(245, 158, 11, 0.12); color: var(--warning-color); }
.notification-icon.urgent   { background: rgba(16, 185, 129, 0.12); color: var(--success-color); }

.notification-info  { display: flex; flex-direction: column; gap: 0.2rem; }
.notification-text  { font-size: 0.8rem; color: var(--text-primary); line-height: 1.35; }
.notification-time  { font-size: 0.7rem; color: var(--text-muted); }
.notification-empty { padding: 2rem 1rem; text-align: center; color: var(--text-muted); font-size: 0.875rem; }

/* Assignee Dropdown */
.assignee-dropdown-container { position: relative; }

.assignee-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    display: none;
    margin-top: 0.375rem;
    animation: dropdownReveal 0.15s ease;
}

[data-theme="dark"] .assignee-dropdown {
    background: rgba(10, 17, 34, 0.98);
    border-color: rgba(0, 212, 255, 0.12);
    backdrop-filter: blur(16px);
}

.assignee-dropdown.active { display: block; }

.assignee-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.875rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background 0.15s;
}

.assignee-dropdown-item:hover { background: rgba(0, 212, 255, 0.06); }
.assignee-dropdown-item.selected { font-weight: 600; color: var(--accent-cyan); }
.assignee-dropdown-item.disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

/* ═══════════════════════════════════════════════
   ANIMATIONS
═══════════════════════════════════════════════ */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(15px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes bellShake {
    0%, 100% { transform: rotate(0); }
    15%       { transform: rotate(15deg); }
    30%       { transform: rotate(-15deg); }
    45%       { transform: rotate(10deg); }
    60%       { transform: rotate(-10deg); }
    75%       { transform: rotate(5deg); }
    85%       { transform: rotate(-5deg); }
}

.fade-in { animation: slideUp 0.3s var(--transition-smooth) forwards; }

#notificationBellContainer:hover i { animation: bellShake 0.6s ease; }

/* ═══════════════════════════════════════════════
   GANTT CHART — MODERN ELEVATED DESIGN
═══════════════════════════════════════════════ */
.gantt-wrapper {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 120px);
    margin-top: 1rem;
    animation: fadeIn var(--transition-speed) ease;
    gap: 0;
}

.gantt-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-bottom: none;
    border-radius: 0;
    padding: 0.85rem 1.25rem;
    gap: 1rem;
    flex-wrap: wrap;
    box-shadow: var(--shadow-sm);
    z-index: 10;
}

[data-theme="dark"] .gantt-toolbar {
    background: var(--card-bg-glass);
    backdrop-filter: blur(14px);
    border-color: rgba(29, 78, 216, 0.2);
    border-bottom: none;
}

.gantt-controls { 
    display: flex; 
    align-items: center; 
    gap: 0.6rem; 
}

.gantt-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    background: linear-gradient(135deg, var(--text-primary), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    min-width: 140px;
    text-align: center;
}

.gantt-main {
    display: flex;
    flex-grow: 1;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    position: relative;
}

[data-theme="dark"] .gantt-main {
    background: var(--card-bg-glass);
    border-color: rgba(29, 78, 216, 0.2);
}

.gantt-sidebar {
    width: 320px;
    flex-shrink: 0;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow-y: hidden;
    overflow-x: hidden;
    background: var(--bg-subtle);
    z-index: 8;
}

[data-theme="dark"] .gantt-sidebar {
    background: rgba(6, 12, 28, 0.7);
    border-right-color: rgba(29, 78, 216, 0.2);
}

.gantt-sidebar-content {
    overflow-y: auto;
    flex: 1;
}
.gantt-sidebar-content::-webkit-scrollbar { width: 4px; }
.gantt-sidebar-content::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.1); border-radius: 4px; }
[data-theme="dark"] .gantt-sidebar-content::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); }

.gantt-timeline-pane {
    flex-grow: 1;
    overflow: auto;
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    position: relative;
}

.gantt-timeline-pane::-webkit-scrollbar { width: 6px; height: 6px; }
.gantt-timeline-pane::-webkit-scrollbar-thumb {
    background: rgba(29, 78, 216, 0.25);
    border-radius: 99px;
}
.gantt-timeline-pane::-webkit-scrollbar-track { background: transparent; }

.gantt-header-row {
    height: 52px;
    min-height: 52px;
    background: var(--bg-subtle);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: stretch;
    position: sticky;
    top: 0;
    z-index: 9;
}

[data-theme="dark"] .gantt-header-row {
    background: rgba(8, 16, 36, 0.95);
    border-bottom-color: rgba(29, 78, 216, 0.25);
    backdrop-filter: blur(8px);
}

.gantt-sidebar-header {
    height: 52px;
    min-height: 52px;
    padding: 0 1.25rem;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-subtle);
    position: sticky;
    top: 0;
    z-index: 9;
}

[data-theme="dark"] .gantt-sidebar-header {
    background: rgba(8, 16, 36, 0.95);
    border-bottom-color: rgba(29, 78, 216, 0.25);
    color: #93c5fd;
}

.gantt-row {
    height: 44px;
    min-height: 44px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    transition: background 0.15s ease;
    box-sizing: border-box;
}

[data-theme="dark"] .gantt-row { 
    border-bottom-color: rgba(255, 255, 255, 0.04); 
}

.gantt-row:hover { 
    background: rgba(29, 78, 216, 0.04); 
}
[data-theme="dark"] .gantt-row:hover {
    background: rgba(59, 130, 246, 0.07);
}

.gantt-sidebar-row {
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    font-size: 0.825rem;
    font-weight: 500;
}

.gantt-item-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    color: var(--text-primary);
}

.gantt-project-row {
    background: rgba(29, 78, 216, 0.05);
    font-weight: 700;
    border-left: 3px solid var(--accent-cyan);
}

[data-theme="dark"] .gantt-project-row {
    background: rgba(30, 58, 138, 0.2);
    border-left-color: var(--primary-color);
}

.gantt-project-toggle {
    cursor: pointer;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    border-radius: 0;
    background: rgba(29, 78, 216, 0.08);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), background 0.2s;
    font-size: 0.7rem;
    flex-shrink: 0;
}

.gantt-project-toggle:hover {
    background: rgba(29, 78, 216, 0.2);
}

.gantt-project-toggle.collapsed { 
    transform: rotate(-90deg); 
}

.gantt-timeline-header-grid { 
    display: flex; 
    width: 100%; 
    height: 100%; 
}

.gantt-header-day {
    flex-grow: 1;
    flex-basis: 0;
    min-width: 38px;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    user-select: none;
    transition: background 0.15s;
}

[data-theme="dark"] .gantt-header-day { 
    border-right-color: rgba(255, 255, 255, 0.05); 
}

.gantt-header-day.today { 
    background: rgba(29, 78, 216, 0.12); 
    border-bottom: 2px solid var(--accent-cyan);
}
[data-theme="dark"] .gantt-header-day.today {
    background: rgba(59, 130, 246, 0.2);
    border-bottom: 2px solid #60a5fa;
}

.gantt-timeline-row {
    position: relative;
    width: 100%;
    height: 44px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.15s ease;
}

[data-theme="dark"] .gantt-timeline-row { 
    border-bottom-color: rgba(255, 255, 255, 0.04); 
}

.gantt-timeline-row:hover {
    background: rgba(29, 78, 216, 0.025);
}
[data-theme="dark"] .gantt-timeline-row:hover {
    background: rgba(59, 130, 246, 0.05);
}

.gantt-day-grid {
    position: absolute;
    inset: 0;
    display: flex;
    pointer-events: none;
    z-index: 1;
}

.gantt-day-cell {
    flex-grow: 1;
    flex-basis: 0;
    min-width: 38px;
    border-right: 1px solid rgba(0, 0, 0, 0.035);
    height: 100%;
}

[data-theme="dark"] .gantt-day-cell { 
    border-right-color: rgba(255, 255, 255, 0.03); 
}

.gantt-day-cell.today { 
    background: rgba(29, 78, 216, 0.04); 
    border-right: 1px dashed rgba(29, 78, 216, 0.3);
}
[data-theme="dark"] .gantt-day-cell.today {
    background: rgba(59, 130, 246, 0.06);
    border-right: 1px dashed rgba(59, 130, 246, 0.4);
}

.gantt-bars-container {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 2;
    display: flex;
    align-items: center;
}

.gantt-bar {
    position: absolute;
    height: 28px;
    display: flex;
    align-items: center;
    padding: 0 0.75rem;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border-radius: 0 !important;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, filter 0.2s ease;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    letter-spacing: 0.01em;
}

.gantt-bar:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25), 0 0 12px rgba(29, 78, 216, 0.3);
    z-index: 10;
    filter: brightness(1.08);
}

/* Color palettes for bars */
.gantt-bar-project { 
    background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 100%); 
    border-left: 3.5px solid #60a5fa;
    height: 30px;
}

.gantt-bar-task-todo { 
    background: linear-gradient(135deg, #475569 0%, #64748b 100%); 
    border-left: 3.5px solid #94a3b8; 
}

.gantt-bar-task-in_progress { 
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%); 
    border-left: 3.5px solid #fde68a; 
}

.gantt-bar-task-review { 
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%); 
    border-left: 3.5px solid #e9d5ff; 
}

.gantt-bar-task-done { 
    background: linear-gradient(135deg, #059669 0%, #10b981 100%); 
    border-left: 3.5px solid #a7f3d0; 
}

.gantt-row-collapsed { 
    display: none !important; 
}

.gantt-tooltip {
    position: absolute;
    background: var(--card-bg);
    color: var(--text-primary);
    padding: 0.85rem 1.1rem;
    font-size: 0.78rem;
    border-radius: 0;
    border: 1px solid var(--border-color);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18), 0 2px 6px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease-in-out, transform 0.15s ease-in-out;
    max-width: 280px;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

[data-theme="dark"] .gantt-tooltip {
    background: rgba(10, 17, 34, 0.96);
    border-color: rgba(59, 130, 246, 0.25);
    backdrop-filter: blur(14px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

.gantt-tooltip-title {
    font-weight: 700;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.4rem;
    margin-bottom: 0.2rem;
    color: var(--accent-cyan);
}
[data-theme="dark"] .gantt-tooltip-title {
    color: #60a5fa;
}

.gantt-bar.interactive { 
    cursor: grab; 
    user-select: none; 
}
.gantt-bar.interactive:active { 
    cursor: grabbing; 
}

.gantt-resize-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 10px;
    cursor: ew-resize;
    z-index: 10;
    background: rgba(255, 255, 255, 0.2);
    transition: background 0.2s;
}

.gantt-resize-handle:hover { 
    background: rgba(255, 255, 255, 0.5) !important; 
}
.gantt-resize-handle.left-handle  { 
    left: 0; 
    border-radius: 0; 
}
.gantt-resize-handle.right-handle { 
    right: 0; 
    border-radius: 0; 
}

.gantt-svg-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 6;
    overflow: visible;
}

.gantt-dependency-line {
    fill: none;
    stroke: #1d4ed8;
    stroke-width: 2px;
    opacity: 0.75;
    transition: opacity 0.2s, stroke-width 0.2s, stroke 0.2s;
}

[data-theme="dark"] .gantt-dependency-line {
    stroke: #60a5fa;
    opacity: 0.85;
}

.gantt-dependency-line:hover { 
    opacity: 1; 
    stroke-width: 3px; 
    stroke: #2563eb;
}

.gantt-dependency-arrow { 
    fill: #1d4ed8; 
    opacity: 0.9; 
}

[data-theme="dark"] .gantt-dependency-arrow {
    fill: #60a5fa;
    opacity: 1;
}

/* ═══════════════════════════════════════════════
   THEME TOGGLE (Login Page)
═══════════════════════════════════════════════ */
.theme-toggle-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    padding: 0.5rem;
    width: 40px;
    height: 40px;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    color: #ffffff;
    cursor: pointer;
    z-index: 100;
    display: flex;
    align-items: center;
    transition: all 0.2s;
}

.theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05) rotate(10deg);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

[data-theme="dark"] .theme-toggle-btn {
    background: rgba(0, 30, 60, 0.5);
    border-color: rgba(0, 212, 255, 0.2);
    color: #38bdf8;
}

/* ═══════════════════════════════════════════════
   AUTOFILL OVERRIDES
═══════════════════════════════════════════════ */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px var(--card-bg) inset !important;
    -webkit-text-fill-color: var(--text-primary) !important;
    transition: background-color 5000s ease-in-out 0s;
}

.login-card input:-webkit-autofill,
.login-card input:-webkit-autofill:hover,
.login-card input:-webkit-autofill:focus,
.login-card input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px rgba(0, 20, 50, 0.8) inset !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* ═══════════════════════════════════════════════
   GLOBAL OVERVIEW
═══════════════════════════════════════════════ */
.overview-card {
    transition: transform var(--transition-speed) var(--transition-bounce), box-shadow var(--transition-speed), border-color var(--transition-speed) !important;
}

.overview-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: var(--shadow-glow) !important;
    border-color: var(--border-glow) !important;
}

.overview-status-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 99px;
    display: inline-block;
    letter-spacing: 0.04em;
}

.overview-status-badge.badge-success {
    background: rgba(16, 185, 129, 0.12);
    color: var(--success-color);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.overview-status-badge.badge-danger {
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger-color);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn.active-toggle {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan)) !important;
    color: white !important;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(76, 110, 245, 0.35);
}

/* ═══════════════════════════════════════════════
   MAP ANIMATIONS
═══════════════════════════════════════════════ */
@keyframes mapPulse {
    0%   { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 212, 255, 0.5); }
    70%  { transform: scale(1);    box-shadow: 0 0 0 8px rgba(0, 212, 255, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 212, 255, 0); }
}

.map-pulse-ring { animation: mapPulse 2s infinite ease-in-out; }

@keyframes mapPulseHealth {
    0%   { transform: scale(0.95); box-shadow: 0 0 0 0 var(--pulse-color-alpha, rgba(16, 185, 129, 0.5)); }
    70%  { transform: scale(1);    box-shadow: 0 0 0 8px rgba(0, 0, 0, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 0, 0, 0); }
}

.map-pulse-ring-health { animation: mapPulseHealth 2s infinite ease-in-out; }

.leaflet-popup-content-wrapper {
    background: var(--card-bg) !important;
    color: var(--text-primary) !important;
    border-radius: var(--radius-md) !important;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg) !important;
    padding: 0.5rem;
}

.leaflet-popup-tip { background: var(--card-bg) !important; }

.map-overlay-toggles {
    border-radius: var(--radius-sm);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

[data-theme="dark"] .map-overlay-toggles { background: rgba(10, 17, 34, 0.9) !important; }

[data-theme="dark"] .leaflet-popup-content-wrapper {
    background: rgba(10, 17, 34, 0.98) !important;
    border-color: rgba(0, 212, 255, 0.15);
}

[data-theme="dark"] .leaflet-bar {
    border: 1px solid rgba(0, 212, 255, 0.12) !important;
    background: rgba(10, 17, 34, 0.9) !important;
    border-radius: var(--radius-sm) !important;
}

[data-theme="dark"] .leaflet-bar a {
    background: rgba(10, 17, 34, 0.9) !important;
    color: var(--text-primary) !important;
    border-bottom: 1px solid rgba(0, 212, 255, 0.08) !important;
}

[data-theme="dark"] .leaflet-bar a:hover { background: rgba(0, 212, 255, 0.06) !important; }

/* ═══════════════════════════════════════════════
   STOPWATCH / TIMER
═══════════════════════════════════════════════ */
@keyframes timerPulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}

.stopwatch-running { animation: timerPulse 1.2s infinite; color: var(--danger-color) !important; }

.stopwatch-running-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
    padding: 0.2rem 0.6rem;
    font-size: 0.72rem;
    font-weight: 700;
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 99px;
}

.stopwatch-running-badge::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--danger-color);
    border-radius: 50%;
    animation: timerPulse 1s infinite;
}

/* ═══════════════════════════════════════════════
   WORKLOAD HEATMAP
═══════════════════════════════════════════════ */
#workloadTable { width: 100%; border-collapse: collapse; margin-top: 1rem; }

#workloadTable th,
#workloadTable td {
    border: 1px solid var(--border-color);
    padding: 0.6rem 0.4rem;
    text-align: center;
    font-size: 0.85rem;
}

[data-theme="dark"] #workloadTable th,
[data-theme="dark"] #workloadTable td { border-color: rgba(0, 212, 255, 0.06); }

#workloadTable th {
    background: var(--bg-subtle);
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

#workloadTable td.user-name-col {
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-subtle);
    padding: 0.5rem 1rem;
    position: sticky;
    left: 0;
    z-index: 5;
    width: 260px;
    min-width: 260px;
}

.workload-cell { transition: all 0.15s ease; }
.workload-cell:hover { filter: brightness(0.9); }
.workload-cell.free { background: var(--card-bg); }
.workload-cell.healthy { background: rgba(16, 185, 129, 0.12); color: var(--success-color); font-weight: 700; }
.workload-cell.healthy:hover { background: rgba(16, 185, 129, 0.22); }
.workload-cell.over { background: rgba(239, 68, 68, 0.15); color: var(--danger-color); font-weight: 800; }
.workload-cell.over:hover { background: rgba(239, 68, 68, 0.25); }

/* ═══════════════════════════════════════════════
   COMMENTS CHAT
═══════════════════════════════════════════════ */
.comment-bubble {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--card-bg);
    max-width: 90%;
    align-self: flex-start;
}

[data-theme="dark"] .comment-bubble {
    background: rgba(13, 24, 48, 0.6);
    border-color: rgba(0, 212, 255, 0.07);
}

.comment-bubble.my-comment {
    align-self: flex-end;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.05), rgba(76, 110, 245, 0.05));
    border-color: rgba(0, 212, 255, 0.15);
}

.comment-meta { display: flex; justify-content: space-between; font-size: 0.7rem; color: var(--text-muted); gap: 1rem; }
.comment-author { font-weight: 700; color: var(--accent-cyan); }
.comment-text { font-size: 0.85rem; color: var(--text-primary); line-height: 1.5; word-break: break-word; }
.comment-delete-btn { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 0; font-size: 0.75rem; transition: color 0.2s; }
.comment-delete-btn:hover { color: var(--danger-color); text-decoration: underline; }

/* ═══════════════════════════════════════════════
   ATTACHMENTS
═══════════════════════════════════════════════ */
.attachment-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--card-bg);
    font-size: 0.85rem;
    transition: all 0.2s;
    margin-bottom: 0.5rem;
}

.attachment-item:hover { background: var(--bg-subtle); border-color: var(--border-glow); }

.attachment-info {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--text-primary);
}

.attachment-name { text-decoration: none; color: var(--text-primary); font-weight: 500; }
.attachment-name:hover { color: var(--accent-cyan); text-decoration: underline; }
.attachment-size { font-size: 0.7rem; color: var(--text-muted); }
.attachment-actions { display: flex; gap: 0.375rem; }

/* ═══════════════════════════════════════════════
   PROJECTS GRID
═══════════════════════════════════════════════ */
#projectsList { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }

@media (max-width: 1400px) { #projectsList { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 1000px) { #projectsList { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 650px)  { #projectsList { grid-template-columns: 1fr; } }

/* ═══════════════════════════════════════════════
   SIDEBAR OVERLAY & MOBILE
═══════════════════════════════════════════════ */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 8, 20, 0.7);
    z-index: 99;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.sidebar-overlay.active { opacity: 1; pointer-events: auto; }

.mobile-toggle-btn {
    display: none;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
    border-radius: var(--radius-sm);
}

.mobile-toggle-btn:hover {
    background: rgba(0, 212, 255, 0.06);
    border-color: var(--border-glow);
    color: var(--accent-cyan);
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 100;
        transform: translateX(-100%);
        transition: transform 0.3s var(--transition-smooth);
        box-shadow: none;
    }

    .sidebar.sidebar-open {
        transform: translateX(0);
        box-shadow: 24px 0 60px rgba(0, 0, 0, 0.5);
    }

    .mobile-toggle-btn { display: inline-flex; }
    .topbar { padding: 0 1rem !important; }
    .content-area { padding: 1rem !important; }

    .content-area table,
    .modal-content table { min-width: 750px; }

    .gantt-sidebar { width: 140px !important; }
    .gantt-sidebar-row { padding: 0 0.5rem !important; font-size: 0.75rem !important; }
    .gantt-item-title { font-size: 0.75rem !important; }
    .stats-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important; gap: 1rem !important; }
}

@media (max-width: 480px) {
    .login-card { padding: 2rem 1.5rem !important; max-width: 92% !important; border-radius: var(--radius-lg) !important; }
}

/* ═══════════════════════════════════════════════
   UTILITIES
═══════════════════════════════════════════════ */
.hidden       { display: none !important; }
.flex         { display: flex; }
.items-center { align-items: center; }
.gap-2        { gap: 0.5rem; }
.text-sm      { font-size: 0.875rem; }

/* ═══════════════════════════════════════════════
   TYPING ANIMATION (AGI Agent)
═══════════════════════════════════════════════ */
@keyframes typingDots {
    0%   { opacity: .2; transform: translateY(0); }
    50%  { opacity: 1;  transform: translateY(-3px); }
    100% { opacity: .2; transform: translateY(0); }
}

.typing-dots {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0.25rem 0.5rem;
}

.typing-dot {
    animation: typingDots 1.4s infinite both;
    width: 6px;
    height: 6px;
    background: var(--accent-cyan);
    border-radius: 50%;
    display: inline-block;
}

.typing-dot:nth-child(2) { animation-delay: .2s; }
.typing-dot:nth-child(3) { animation-delay: .4s; }

/* ═══════════════════════════════════════════════
   AGI AGENT STATUS PULSE
═══════════════════════════════════════════════ */
@keyframes statusPulse {
    0%   { opacity: 0.35; transform: scale(0.92); }
    50%  { opacity: 1;    transform: scale(1.08); }
    100% { opacity: 0.35; transform: scale(0.92); }
}

#agiAgentStatusDot { animation: statusPulse 2s infinite ease-in-out; }

@keyframes agiLivePulse {
    0%   { opacity: 1;   transform: scale(1); }
    50%  { opacity: 0.4; transform: scale(0.75); }
    100% { opacity: 1;   transform: scale(1); }
}

/* ═══════════════════════════════════════════════
   TABLES (generic)
═══════════════════════════════════════════════ */
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }

thead th {
    background: var(--bg-subtle);
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
    white-space: nowrap;
}

[data-theme="dark"] thead th {
    background: rgba(0, 212, 255, 0.03);
    border-bottom-color: rgba(0, 212, 255, 0.08);
}

tbody tr { border-bottom: 1px solid var(--border-color); transition: background 0.15s; }
[data-theme="dark"] tbody tr { border-bottom-color: rgba(0, 212, 255, 0.05); }
tbody tr:hover { background: rgba(0, 212, 255, 0.025); }
tbody td { padding: 0.75rem 1rem; color: var(--text-primary); vertical-align: middle; }

/* ═══════════════════════════════════════════════
   SCROLLBARS (Global)
═══════════════════════════════════════════════ */
* { scrollbar-width: thin; scrollbar-color: rgba(0, 212, 255, 0.15) transparent; }
*::-webkit-scrollbar { width: 5px; height: 5px; }
*::-webkit-scrollbar-thumb { background: rgba(0, 212, 255, 0.15); border-radius: 99px; }
*::-webkit-scrollbar-track { background: transparent; }

/* ═══════════════════════════════════════════════
   SELECTION COLOR
═══════════════════════════════════════════════ */
::selection { background: rgba(0, 212, 255, 0.2); color: var(--text-primary); }
