﻿:root {
    color-scheme: dark;
    /* Brand Colors - HSL for easy manipulation */
    --primary-h: 250;
    --primary-s: 100%;
    --primary-l: 65%;
    --primary-color: hsl(var(--primary-h), var(--primary-s), var(--primary-l));

    --accent-h: 320;
    --accent-s: 100%;
    --accent-l: 60%;
    --accent-color: hsl(var(--accent-h), var(--accent-s), var(--accent-l));

    /* Neutral Colors / Glassmorphism Bases */
    --bg-dark: #0f111a;
    --bg-dark-secondary: #1a1d2d;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-highlight: rgba(255, 255, 255, 0.15);

    --text-main: #ffffff;
    --text-muted: #a0a0b0;

    /* Semantic Colors */
    --success: #00d26a;
    --warning: #fcd535;
    --danger: #f8312f;
    --info: #00c2ff;

    /* Spacing & Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-xxl: 48px;

    /* Animation */
    --trans-fast: 0.2s ease;
    --trans-med: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Data Piper Brand */
    --brand-datapiper-blue: #61bdef;
    --brand-datapiper-orange: #f5a623;
    --primary-light: hsl(var(--primary-h), var(--primary-s), 80%);
}

/* Base Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Global Loaders */
.loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    gap: var(--space-md);
    color: var(--text-muted);
    font-size: 0.9rem;
    animation: fadeIn 0.3s ease-out;
}

.loader {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s linear infinite;
}

[data-theme="light"] {
    color-scheme: light;
    --bg-dark: #f0f2f5;
    --bg-dark-secondary: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.05);
    --glass-highlight: rgba(0, 0, 0, 0.05);
    --text-main: #1a1c29;
    --text-muted: #64748b;
    --primary-l: 50%;
    /* Darker primary for light mode */
}

/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow: hidden;
    /* App-like feel */
    height: 100vh;
    transition: background-color var(--trans-med);
    /* Subtle mesh gradient background */
    background-image:
        radial-gradient(circle at 10% 20%, rgba(var(--primary-h), 50, 50, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(var(--accent-h), 50, 50, 0.15) 0%, transparent 40%);
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.main-layout {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.sidebar {
    width: 80px;
    display: flex;
    flex-direction: column;
    padding: var(--space-md) 0;
    border-right: 1px solid var(--glass-border);
    z-index: 90;
    transition: width var(--trans-med);
}

.sidebar:hover {
    width: 200px;
}

.sidebar-management-actions {
    margin-top: auto;
    /* Stack at bottom */
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    padding: 0 var(--space-sm);
}

.sidebar-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all var(--trans-fast);
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
}

.sidebar-btn i {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.sidebar-btn span {
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0;
    transition: opacity var(--trans-med);
}

.sidebar:hover .sidebar-btn span {
    opacity: 1;
}

.sidebar-btn:hover {
    background: var(--glass-highlight);
    color: var(--primary-color);
}

/* Header & Glass Panels */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
}

.top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--glass-border);
    z-index: 100;
}

/* Logo */
.logo-section {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--primary-color);
}

.logo-icon {
    font-size: 1.8rem;
    animation: float 6s ease-in-out infinite;
}

.logo-section h1 {
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: -0.5px;
    color: var(--text-main);
}

/* Tabs */
.main-tabs {
    display: flex;
    gap: var(--space-sm);
    background: rgba(0, 0, 0, 0.1);
    padding: 4px;
    border-radius: var(--radius-lg);
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--trans-fast);
}

.tab-btn:hover {
    color: var(--text-main);
    background: var(--glass-highlight);
}

.tab-btn.active {
    background: var(--bg-dark-secondary);
    color: var(--primary-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* User Actions */
.user-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.icon-btn {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--trans-fast);
}

.icon-btn:hover {
    background: var(--glass-highlight);
    border-color: var(--primary-color);
}

.icon-btn i {
    font-size: 1.1rem;
}

.log-time-card-btn,
#modal-log-time-btn {
    color: #888888;
}

.log-time-card-btn:hover,
#modal-log-time-btn:hover {
    color: var(--text-main);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-md);
    transition: var(--trans-fast);
}

.user-profile:hover {
    background: var(--glass-highlight);
}

.dropdown-arrow {
    font-size: 0.8rem;
    opacity: 0.6;
    transition: transform var(--trans-fast);
}

.user-profile:hover .dropdown-arrow {
    opacity: 1;
}

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    background: var(--bg-dark-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    padding: 8px;
    z-index: 200;
    backdrop-filter: blur(12px);
    animation: slideDown var(--trans-fast);
}

.user-dropdown-menu.hidden {
    display: none;
}

.dropdown-item {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-main);
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--trans-fast);
}

.dropdown-item:hover {
    background: var(--glass-highlight);
    color: var(--primary-color);
}

.dropdown-item i {
    font-size: 1rem;
    opacity: 0.8;
}

/* Strength Meter */
.strength-meter {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    width: 0%;
    transition: width 0.3s ease, background-color 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
}

/* Content Area */
.content-area {
    flex: 1;
    overflow: hidden;
    position: relative;
    padding: var(--space-lg);
}

.tab-content {
    display: none;
    height: 100%;
    overflow-y: auto;
}

.tab-content.active {
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.4s ease;
}

/* Controls */
.board-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
    gap: 20px;
    flex-wrap: wrap;
}

.filters-container {
    display: flex;
    gap: 30px;
    align-items: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-group label {
    margin-bottom: 0;
    white-space: nowrap;
    font-weight: 600;
}

.filter-group select {
    width: auto;
    min-width: 150px;
}

.btn {
    padding: 10px 20px;
    border-radius: var(--radius-md);
    border: none;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--trans-fast);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    box-shadow: 0 4px 15px rgba(var(--primary-h), 50, 50, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(var(--primary-h), 50, 50, 0.4);
}

.btn-secondary {
    background: var(--glass-highlight);
    color: var(--text-main);
}

.btn-secondary:hover {
    background: var(--glass-border);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: rgba(248, 49, 47, 0.8);
    box-shadow: 0 4px 15px rgba(248, 49, 47, 0.3);
}

/* Kanban Board Container */
.kanban-board-container {
    display: flex;
    gap: var(--space-md);
    overflow-x: auto;
    height: 100%;
    padding-bottom: var(--space-sm);
    scroll-behavior: smooth;
    /* Custom Scrollbar */
    scrollbar-width: thin;
    scrollbar-color: var(--glass-border) transparent;
}

/* Column */
.kanban-column {
    min-width: 300px;
    max-width: 300px;
    background: var(--bg-dark-secondary);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--glass-border);
    height: 100%;
}

.column-header {
    padding: var(--space-md);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--text-main);
    position: sticky;
    top: 0;
    background: inherit;
    z-index: 10;
    border-top-left-radius: var(--radius-md);
    border-top-right-radius: var(--radius-md);
}

.column-count {
    background: var(--glass-highlight);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Task List Area */
.task-list {
    flex: 1;
    padding: var(--space-sm);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.task-list.drag-over {
    background: rgba(var(--primary-h), 100, 50, 0.05);
}


/* Cards */
.task-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: var(--space-md);
    border-radius: var(--radius-sm);
    cursor: grab;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    user-select: none;
}

.task-card:hover {
    background: var(--bg-dark-secondary);
    border-color: var(--primary-color);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.card-accent-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    border-top-left-radius: inherit;
    border-top-right-radius: inherit;
    z-index: 1;
}

.task-card.dragging {
    opacity: 0.5;
    transform: scale(0.95);
    border: 2px dashed var(--text-muted);
    background: transparent;
    box-shadow: none;
}

/* Card Internals */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-sm);
}

.card-title {
    font-weight: 500;
    color: var(--text-main);
    font-size: 0.95rem;
    line-height: 1.4;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: var(--space-md);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.card-completion-text {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 500;
    opacity: 0.7;
}

.card-assignees {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
}

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--bg-dark-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    background: var(--primary-color);
    text-transform: uppercase;
    user-select: none;
    box-shadow: 0 2px 50px rgba(0, 0, 0, 0.2);
}

.card-assignees .user-avatar {
    margin-left: -8px;
}

.card-assignees .user-avatar:first-child {
    margin-left: 0;
}

.header-avatar {
    width: 36px;
    height: 36px;
    border: 2px solid var(--primary-color);
    font-size: 0.9rem;
}

.user-avatar:first-child {
    margin-left: 0;
}

/* Stoplight Badge */
.date-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.load-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
    min-width: 45px;
    text-align: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.load-badge:hover {
    transform: scale(1.1);
}

/* Heatmap Colors - Vibrant & Professional */
.load-low {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.load-moderate {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
}

.load-high {
    background: linear-gradient(135deg, #e67e22, #f39c12);
    color: white;
}

.load-over {
    background: linear-gradient(135deg, #c0392b, #e74c3c);
    color: white;
    box-shadow: 0 0 15px rgba(231, 76, 60, 0.4);
    animation: pulse-danger 2s infinite;
}

@keyframes pulse-danger {
    0% {
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(231, 76, 60, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0);
    }
}

.status-red {
    background: rgba(248, 49, 47, 0.2);
    color: var(--danger);
    border: 1px solid rgba(248, 49, 47, 0.3);
}

.status-yellow {
    background: rgba(252, 213, 53, 0.2);
    color: var(--warning);
    border: 1px solid rgba(252, 213, 53, 0.3);
}

.status-green {
    background: rgba(0, 210, 106, 0.2);
    color: var(--success);
    border: 1px solid rgba(0, 210, 106, 0.3);
}

/* Stoplight Indicator */
.stoplight-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.stoplight-red {
    background-color: var(--danger);
    box-shadow: 0 0 8px rgba(248, 49, 47, 0.5);
}

.stoplight-yellow {
    background-color: var(--warning);
    box-shadow: 0 0 8px rgba(252, 213, 53, 0.5);
}

.stoplight-green {
    background-color: var(--success);
    box-shadow: 0 0 8px rgba(0, 210, 106, 0.5);
}

.stoplight-gray {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Drag Marker */
.drag-marker {
    height: 4px;
    background: var(--primary-color);
    border-radius: 4px;
    margin: 4px 0;
    pointer-events: none;
    box-shadow: 0 0 10px var(--primary-color);
    transition: all 0.1s;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-overlay.hidden {
    display: none;
}

.modal-glass {
    background: var(--bg-dark-secondary);
    border: 1px solid var(--glass-border);
    width: 950px;
    max-width: 95vw;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.modal-header {
    padding: var(--space-lg);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: var(--space-lg);
    overflow-y: auto;
}

.modal-footer {
    padding: var(--space-lg);
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: flex-end;
    gap: var(--space-md);
}

/* Form Styling */
.form-group {
    margin-bottom: var(--space-md);
    flex: 1;
}

.form-row {
    display: flex;
    gap: var(--space-md);
}

.full-width {
    width: 100%;
}

label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

input,
select,
textarea {
    width: 100%;
    padding: 10px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-size: 0.95rem;
}

select option {
    background-color: var(--bg-dark-secondary);
    color: var(--text-main);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.08);
}

/* Placeholder tabs content */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    text-align: center;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: var(--space-md);
    opacity: 0.5;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-3px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* Select Views */
.select-wrapper {
    position: relative;
    display: inline-block;
}

.select-wrapper select {
    padding-right: 30px;
    cursor: pointer;
}

/* --- Auth Pages Specific Styles --- */

.auth-body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: var(--bg-dark);
    /* Vibrant mesh gradient for auth page */
    background-image:
        radial-gradient(circle at 0% 0%, rgba(var(--primary-h), 50, 50, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 100% 100%, rgba(var(--accent-h), 50, 50, 0.2) 0%, transparent 50%);
}

.auth-container {
    display: flex;
    width: 1000px;
    height: 600px;
    max-width: 90vw;
    background: var(--bg-dark-secondary);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

.auth-visual {
    flex: 1;
    background: linear-gradient(135deg, rgba(var(--primary-h), 50, 50, 0.4), rgba(var(--accent-h), 50, 50, 0.2));
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    color: white;
}

/* Glass effect over the visual part */
.auth-visual::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0IiBoZWlnaHQ9IjQiPgo8cmVjdCB3aWR0aD0iNCIgaGVpZ2h0PSI0IiBmaWxsPSIjZmZmIiBmaWxsLW9wYWNpdHk9IjAuMDUiLz4KPC9zdmc+');
    /* Simple noise pattern */
    opacity: 0.3;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    z-index: 10;
}

.brand-icon {
    font-size: 2rem;
}

.visual-content {
    z-index: 10;
}

.visual-content h2 {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: var(--space-md);
}

.text-gradient {
    background: linear-gradient(to right, #fff, var(--primary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.visual-footer {
    z-index: 10;
    font-size: 0.8rem;
    opacity: 0.6;
}

/* Detailed Child Task List */
.child-task-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.child-task-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--trans-fast);
}

.child-task-row:hover {
    background: var(--glass-highlight);
    border-color: var(--primary-color);
    transform: translateX(4px);
}

.child-row-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.child-row-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.child-task-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
}

.child-task-percent {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    min-width: 35px;
    text-align: right;
}

.child-row-assignees {
    display: flex;
    gap: -8px;
    /* overlapping avatars */
}

/* Re-using user-avatar but smaller */
.child-row-assignees .user-avatar {
    width: 20px;
    height: 20px;
    font-size: 0.6rem;
    border-width: 1px;
}

.mini-chip:hover {
    background: var(--glass-highlight);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.mini-chip i {
    font-size: 0.75rem;
    opacity: 0.7;
}

#child-tasks-section {
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--glass-border);
}

/* Forms Side */
.auth-forms {
    flex: 1;
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.auth-view {
    position: absolute;
    width: calc(100% - 120px);
    /* 60px padding * 2 */
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.4s ease;
    pointer-events: none;
}

.auth-view.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
    position: relative;
    width: 100%;
}

.auth-view.hidden {
    display: none;
}

.form-header {
    margin-bottom: var(--space-lg);
}

.form-header h2 {
    font-size: 2rem;
    margin-bottom: var(--space-xs);
}

.btn-block {
    width: 100%;
    justify-content: center;
    padding: 12px;
}

.input-icon-wrapper {
    position: relative;
}

.input-icon-wrapper i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.2rem;
}

.input-icon-wrapper input {
    padding-left: 40px;
}

.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: var(--space-lg) 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--glass-border);
}

.auth-divider span {
    padding: 0 10px;
}

.social-btn {
    border-color: var(--glass-border);
    background: transparent;
    margin-bottom: var(--space-lg);
}

.social-btn i {
    font-size: 1.2rem;
}

.auth-switch {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-switch a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.auth-switch a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .auth-container {
        flex-direction: column;
        height: auto;
    }

    .auth-visual {
        padding: 40px;
        min-height: 200px;
    }

    .visual-content h2 {
        display: none;
    }

    .auth-forms {
        padding: 40px;
    }

    .auth-view {
        width: 100%;
    }
}

/* Project Mgmt Split Layout */
.project-mgmt-split {
    display: flex;
    gap: 30px;
    height: 650px;
}

.project-list-side {
    flex: 0 0 350px;
    border-right: 1px solid var(--glass-border);
    padding-right: 30px;
    display: flex;
    flex-direction: column;
}

.project-form-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-right: 5px;
}

#proj-tab-details,
#proj-tab-activity {
    flex: 1;
    overflow-y: auto;
    padding-right: 15px;
    /* More room for scrollbar */
    display: flex;
    flex-direction: column;
}

.mini-list {
    flex: 1;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-sm);
    padding: 10px;
}

.mini-list-item {
    padding: 10px;
    margin-bottom: 8px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
}

.mini-list-item:hover,
.mini-list-item.selected {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
}

.color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.links-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.activity-feed {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activity-item {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 15px;
    transition: all 0.2s ease;
    position: relative;
    color: var(--text-main);
    /* Ensure base color is correct */
}

/* Ensure child text remains readable in dark mode even if content has inline dark colors */
[data-theme='dark'] .activity-text,
[data-theme='dark'] .activity-synopsis,
[data-theme='dark'] .activity-content {
    color: var(--text-main) !important;
}

[data-theme='dark'] .activity-text *,
[data-theme='dark'] .activity-synopsis *,
[data-theme='dark'] .activity-content *:not(a) {
    color: inherit !important;
    background-color: transparent !important;
}

.activity-item:hover {
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.05);
}

.activity-item .activity-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 5px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.activity-item:hover .activity-actions {
    opacity: 1;
}

.activity-badge {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* Notification Styles */
.notification-item {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 15px;
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.notification-item:hover {
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.05);
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-type {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
}

.type-info {
    background: var(--info);
    color: white;
}

.type-success {
    background: var(--success);
    color: white;
}

.type-warning {
    background: var(--warning);
    color: white;
}

.type-error {
    background: var(--danger);
    color: white;
}

.notification-time {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.notification-message {
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--text-main);
}

.notification-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
}

.clear-notification-btn {
    background: none;
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.clear-notification-btn:hover {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
}

/* Sidebar Badge Refinement */
.sidebar-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--danger);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    padding: 0 4px;
    border: 2px solid var(--bg-dark);
}


.badge-relevant {
    background: var(--success);
    color: white;
}

.activity-metadata {
    margin-top: 10px;
    font-size: 0.8rem;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.2);
    padding: 8px;
    border-radius: var(--radius-sm);
}

.metadata-row {
    margin-bottom: 4px;
}

.metadata-label {
    font-weight: 600;
    color: var(--primary-color);
    margin-right: 5px;
}

.activity-body-full {
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

[data-theme='dark'] .activity-body-full {
    color: #e2e8f0;
    /* Default light text for dark mode */
}

/* Force readability for potentially hardcoded dark colors in activity content (e.g. from emails) */
[data-theme='dark'] .activity-body-full *:not(a) {
    background-color: transparent !important;
}

[data-theme='dark'] .activity-body-full p,
[data-theme='dark'] .activity-body-full span,
[data-theme='dark'] .activity-body-full div:not(.metadata-row),
[data-theme='dark'] .activity-body-full td,
[data-theme='dark'] .activity-body-full th {
    color: inherit !important;
}

.activity-body-full blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 15px;
    margin: 15px 0;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .project-mgmt-split {
        flex-direction: column;
        height: auto;
    }

    .project-list-side {
        border-right: none;
        border-bottom: 1px solid var(--glass-border);
        padding-right: 0;
        padding-bottom: 20px;
        max-height: 200px;
    }
}

.customer-projects-section h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    opacity: 0.8;
}

/* Task Modal Split Pane */
.task-modal-split {
    display: flex;
    gap: var(--space-lg);
    height: 100%;
    min-height: 500px;
    overflow: hidden;
}

.task-details-pane {
    flex: 1.2;
    overflow-y: auto;
    padding-right: var(--space-md);
    border-right: 1px solid var(--glass-border);
}

.task-comments-pane {
    flex: 0.8;
    display: flex;
    flex-direction: column;
    min-width: 300px;
}

.pane-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.comments-list {
    flex: 1;
    overflow-y: auto;
    padding-right: var(--space-xs);
    margin-bottom: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

/* Comment Item */
.comment-item {
    display: flex;
    gap: var(--space-sm);
}

.comment-bubble {
    background: var(--glass-bg);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    position: relative;
    flex: 1;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.comment-author {
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--primary-color);
}

.comment-time {
    font-size: 0.7rem;
    opacity: 0.5;
}

.comment-body {
    font-size: 0.85rem;
    line-height: 1.5;
    word-break: break-word;
}

.comment-actions {
    position: absolute;
    right: 8px;
    top: 8px;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity var(--trans-fast);
}

.comment-bubble:hover .comment-actions {
    opacity: 1;
}

.comment-action-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.75rem;
    padding: 2px;
}

.comment-action-btn:hover {
    color: var(--text-main);
}

.comment-action-btn.delete:hover {
    color: var(--danger);
}

/* Comment Input */
.comment-input-wrapper {
    display: flex;
    gap: var(--space-sm);
    background: var(--bg-dark);
    padding: var(--space-sm);
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
}

.comment-input-wrapper textarea {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-main);
    resize: none;
    height: 38px;
    font-size: 0.85rem;
    padding: 4px;
}

.comment-input-wrapper textarea:focus {
    outline: none;
}

#submit-comment-btn {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: var(--radius-sm);
}

#submit-comment-btn[disabled] {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Responsive modal split */
@media (max-width: 900px) {
    .modal-glass {
        width: 600px;
    }

    .task-modal-split {
        flex-direction: column;
        overflow-y: auto;
    }

    .task-details-pane {
        border-right: none;
        border-bottom: 1px solid var(--glass-border);
        padding-right: 0;
        padding-bottom: var(--space-lg);
        height: auto;
        overflow-y: visible;
    }

    .task-comments-pane {
        padding-top: var(--space-lg);
        min-height: 300px;
    }
}

/* Time Logs Modal Specifics */
.mini-list-container {
    background: var(--bg-dark);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    max-height: 250px;
    overflow-y: auto;
    padding: var(--space-xs);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Project Link Chips */
.link-chip {
    padding: 6px 12px;
    border-radius: 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    user-select: none;
}

.link-chip:hover {
    background: var(--glass-highlight);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.link-chip .chip-edit-btn {
    opacity: 0;
    font-size: 0.75rem;
    transition: opacity 0.2s ease;
    color: var(--text-muted);
    background: none;
    border: none;
    padding: 2px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.link-chip:hover .chip-edit-btn {
    opacity: 1;
}

.link-chip .chip-edit-btn:hover {
    color: var(--primary-color);
}

.link-chip.internal {
    background: rgba(var(--primary-h), 100, 50, 0.1);
    border-color: rgba(var(--primary-h), 100, 50, 0.2);
}

.link-chip i {
    font-size: 0.8rem;
    opacity: 0.7;
}

.link-chip span {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.link-chip .internal-indicator {
    font-size: 0.7rem;
    opacity: 0.6;
}

/* Executive Dashboard Styling */
.dashboard-container {
    padding: var(--space-xl);
    max-width: 95%;
    margin: 0 auto;
    animation: fadeIn 0.5s ease-out;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-xl);
}

.dashboard-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

#customer-pulse-container {
    grid-template-columns: repeat(auto-fit, minmax(max(300px, 48%), 1fr));
}

.metric-card {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    color: #fff;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
    height: 100%;
    min-height: 120px;
    box-sizing: border-box;
}

.metric-card:hover {
    transform: translateY(-5px);
}

.metric-icon {
    font-size: 2rem;
    opacity: 0.8;
}

.metric-info h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
    margin-bottom: 4px;
}

.metric-value {
    font-size: 1.8rem;
    font-weight: 700;
}

/* Gradients */
.gold-gradient {
    background: linear-gradient(135deg, #f1c40f, #f39c12);
}

.blue-gradient {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.red-gradient {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.green-gradient {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
}

.purple-gradient {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
}

.dashboard-charts-row {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.chart-panel {
    padding: var(--space-xxl);
}

.chart-panel h3 {
    font-size: 1.1rem;
    margin-bottom: var(--space-lg);
    opacity: 0.9;
}

/* Project Health distribution */
.health-distribution-bar {
    display: flex;
    height: 30px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: var(--space-lg);
}

.health-segment {
    height: 100%;
    transition: width 1s ease;
}

.health-legend {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-lg);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.legend-count {
    opacity: 0.6;
    font-weight: 600;
}

.dashboard-two-column.align-stretch .dashboard-column {
    display: flex;
}

.dashboard-two-column.align-stretch .chart-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Customer Mix */
.customer-mix-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.customer-mix-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.customer-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 500;
}

.customer-bar-bg {
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

.customer-bar-fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: 4px;
    transition: width 1s ease;
}

/* Management Digest */
.dashboard-digest-section {
    margin-top: var(--space-xl);
}

.digest-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.ai-badge {
    background: linear-gradient(90deg, #8e44ad, var(--primary-color));
    color: #fff;
    padding: 2px 8px;
    font-size: 0.65rem;
    border-radius: 4px;
    letter-spacing: 1px;
}

.mobile-only-menu {
    display: none;
}

@media (max-width: 850px) {
    .sidebar {
        display: none;
        /* Hide sidebar on mobile */
    }

    .top-nav {
        flex-direction: column;
        align-items: flex-start;
        padding: var(--space-sm) var(--space-md);
        gap: var(--space-md);
    }

    .logo-section h1 {
        font-size: 1.2rem;
    }

    .main-tabs {
        width: 100%;
        overflow-x: auto;
        justify-content: flex-start;
        padding: 4px;
        background: rgba(0, 0, 0, 0.2);
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        /* Hide scrollbar for clean look */
    }

    .main-tabs::-webkit-scrollbar {
        display: none;
    }

    .tab-btn {
        flex-shrink: 0;
        padding: 6px 12px;
        font-size: 0.85rem;
    }

    .user-actions {
        position: absolute;
        top: 12px;
        right: var(--space-md);
    }

    .user-name {
        display: none;
        /* Hide name to save space, keep avatar */
    }

    .content-area {
        padding: var(--space-sm);
    }

    /* Dashboard & Board Controls */
    .board-controls {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-md);
    }

    .filters-container {
        flex-wrap: wrap;
        gap: var(--space-sm);
    }

    .filter-group {
        flex: 1 1 120px;
    }

    .filter-group select {
        width: 100%;
    }

    #add-task-btn {
        width: 100%;
        justify-content: center;
    }

    /* Kanban Board */
    .kanban-board-container {
        gap: var(--space-md);
        padding-bottom: 20px;
    }

    .kanban-column {
        min-width: 280px;
        width: 85vw;
    }

    /* Dashboard Metrics */
    .dashboard-metrics-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-sm);
    }

    .metric-card {
        padding: var(--space-md);
    }

    .metric-value {
        font-size: 1.2rem;
    }

    .dashboard-charts-row {
        flex-direction: column;
    }

    .digest-grid {
        grid-template-columns: 1fr;
    }

    /* Modals */
    .modal-glass,
    .modal-content {
        width: 95%;
        margin: 10px auto;
        max-height: 90vh;
        overflow-y: auto;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    /* Task Modal specific */
    .task-modal-grid {
        grid-template-columns: 1fr;
    }

    /* Gantt Chart Mobile */
    .gantt-chart-container {
        font-size: 0.8rem;
    }

    .gantt-task-label {
        width: 120px !important;
        font-size: 0.75rem;
    }


    .mobile-only-menu {
        display: block !important;
    }
}

/* Portrait Specific refinements */
@media (max-width: 480px) {
    .logo-section h1 {
        display: none;
        /* Only show icon on very small portrait */
    }

    .dashboard-metrics-grid {
        grid-template-columns: 1fr;
    }

    .metric-card {
        flex-direction: row;
        align-items: center;
        gap: var(--space-md);
    }

    .metric-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    /* Ensure action buttons in modals are stacked */
    .modal-footer {
        flex-direction: column-reverse;
        gap: var(--space-sm);
    }

    .modal-footer .btn {
        width: 100%;
    }
}

/* Landscape orientation for iPhone */
@media (max-width: 932px) and (orientation: landscape) {
    .top-nav {
        flex-direction: row;
        padding: 8px 16px;
    }

    .main-tabs {
        width: auto;
        flex: 1;
        margin: 0 20px;
    }

    .user-actions {
        position: static;
    }

    .dashboard-metrics-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* --- Management Digest Markdown Styling --- */
.digest-text {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.digest-text p {
    margin-bottom: 12px;
    line-height: 1.6;
}

.digest-text p:last-child {
    margin-bottom: 0;
}

.digest-text ul,
.digest-text ol {
    margin-bottom: 15px;
    padding-left: 20px;
}

.digest-text li {
    margin-bottom: 6px;
    line-height: 1.5;
}

.digest-text strong {
    color: var(--primary-color);
    font-weight: 600;
}

.digest-text code {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 4px;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
}

.digest-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--space-lg);
}

.digest-card {
    padding: var(--space-xl);
    transition: all 0.3s ease;
}

.digest-card:hover {
    border-color: var(--primary-color);
    background: var(--glass-highlight);
}

.digest-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
}

.digest-card-header h4 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--primary-color);
}

.digest-card-title-group {
    display: flex;
    flex-direction: column;
}

.digest-customer {
    font-size: 0.75rem;
    opacity: 0.7;
    color: var(--text-muted);
}

.ai-icon {
    font-size: 0.8rem;
    opacity: 0.5;
    color: var(--primary-color);
}

.digest-text {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-main);
    opacity: 0.95;
    margin-bottom: var(--space-md);
}

@media (max-width: 900px) {
    .dashboard-charts-row {
        grid-template-columns: 1fr;
    }
}

/* Data Piper Branding (FSR Tab) */
.datapiper-branded {
    border-bottom: 2px solid var(--brand-datapiper-blue) !important;
    padding-bottom: var(--space-md);
    margin-bottom: var(--space-xl);
}

.datapiper-logo-container {
    margin-bottom: var(--space-sm);
}

.datapiper-logo {
    height: 40px;
    width: auto;
    display: block;
}

/* Tab Button Specific Branding */
#tab-btn-fsr.active,
#tab-btn-customer.active {
    color: var(--brand-datapiper-blue) !important;
    border-bottom: 2px solid var(--brand-datapiper-blue);
    background: rgba(97, 189, 239, 0.1) !important;
}

/* Override primary colors in branded tabs to match brand */
#tab-fsr,
#tab-customer {
    --primary-color: var(--brand-datapiper-blue);
}

#tab-fsr .btn-primary,
#tab-customer .btn-primary {
    background: linear-gradient(135deg, var(--brand-datapiper-blue), #4da9e0);
    box-shadow: 0 4px 15px rgba(97, 189, 239, 0.3);
}

#tab-fsr .project-name,
#tab-customer .project-name,
#tab-fsr .fsr-table th,
#tab-fsr .stat-bar-fill,
#tab-customer .stat-bar-fill,
#tab-fsr .fsr-link-tag:hover {
    color: var(--brand-datapiper-blue);
}

#tab-fsr .stat-bar-fill,
#tab-customer .stat-bar-fill {
    background: var(--brand-datapiper-blue);
}

#tab-fsr .fsr-link-tag:hover,
#tab-customer .fsr-link-tag:hover {
    background: var(--brand-datapiper-blue);
    color: white;
}

#tab-fsr .blue-gradient,
#tab-customer .blue-gradient {
    background: linear-gradient(135deg, var(--brand-datapiper-blue), #4da9e0);
}

#tab-fsr .gold-gradient,
#tab-customer .gold-gradient {
    background: linear-gradient(135deg, var(--brand-datapiper-orange), #f58220);
}

/* FSR Dashboard Specific Styling */
.header-right.dashboard-actions {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

#fsr-selector-container {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    background: var(--glass-bg);
    padding: 6px 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
}

#fsr-selector-container label {
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
}

#fsr-filter-select {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
}

/* Critical Blockers */
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
}

.danger-badge {
    background: var(--danger);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 700;
}

.blocker-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.blocker-item {
    padding: var(--space-md);
    border-radius: var(--radius-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.2s ease;
}

.blocker-item:hover {
    transform: scale(1.02);
}

.danger-border {
    border-left: 4px solid var(--danger);
}

.blocker-project {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--danger);
}

.blocker-task {
    font-size: 0.85rem;
    opacity: 0.8;
}

.blocker-date {
    font-size: 0.75rem;
    opacity: 0.6;
}

.blocker-customer {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

/* Health Grid */
.health-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-lg);
}

.health-card {
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
}

.health-card-header {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 2px;
    margin-bottom: var(--space-md);
}

.customer-name {
    font-weight: 500;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.project-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary-color);
}

.health-stats {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.7;
}

.stat-bar-bg {
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

.stat-bar-fill {
    height: 100%;
    background: var(--primary-color);
    transition: width 1s ease;
}

.stat-value {
    font-size: 0.85rem;
    font-weight: 600;
    text-align: right;
}

.status-chip {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    font-weight: 700;
}

.status-doing {
    background: rgba(52, 152, 219, 0.2);
    color: #3498db;
}

#tab-fsr .status-doing,
#tab-customer .status-doing {
    background: rgba(97, 189, 239, 0.2);
    color: var(--brand-datapiper-blue);
}

.status-todo {
    background: rgba(149, 165, 166, 0.2);
    color: #95a5a6;
}

.status-done {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
}

.status-blocked {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

/* FSR Project List Table */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    margin-top: var(--space-md);
}

.fsr-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    text-align: left;
    font-size: 0.9rem;
}

.fsr-table th {
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 2px solid var(--glass-border);
    font-weight: 600;
    color: var(--primary-color);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
}

.fsr-table td {
    padding: 16px;
    border-bottom: 1px solid var(--glass-border);
    vertical-align: middle;
}

.fsr-table tr:last-child td {
    border-bottom: none;
}

.fsr-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.fsr-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
}

.fsr-badge.badge-blocked {
    background: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.fsr-badge.badge-doing {
    background: rgba(52, 152, 219, 0.15);
    color: #3498db;
    border: 1px solid rgba(52, 152, 219, 0.3);
}

.fsr-badge.badge-todo {
    background: rgba(149, 165, 166, 0.15);
    color: #95a5a6;
    border: 1px solid rgba(149, 165, 166, 0.3);
}

.fsr-link-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.fsr-link-tag {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    text-decoration: none;
    border: 1px solid var(--glass-border);
    transition: all 0.2s ease;
}

.fsr-link-tag:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.fsr-value {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    color: var(--success);
}

.fsr-project-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Customer Dashboard Styling */
.dashboard-two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    margin-top: var(--space-xl);
}

.roadmap-timeline {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    padding: var(--space-md) 0;
}

.roadmap-item {
    display: flex;
    gap: var(--space-md);
    position: relative;
    padding-left: 20px;
}

.roadmap-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: -24px;
    width: 2px;
    background: var(--glass-border);
}

.roadmap-item:last-child::before {
    display: none;
}

.roadmap-dot {
    position: absolute;
    left: -4px;
    top: 8px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color);
}

.roadmap-content h4 {
    margin: 0 0 4px 0;
    font-size: 0.95rem;
}

.roadmap-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.activity-stream {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.activity-item {
    padding: var(--space-md);
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--primary-color);
}

.activity-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
    font-size: 0.75rem;
    opacity: 0.6;
}

.activity-text {
    font-size: 0.85rem;
    line-height: 1.4;
}

.alert-card {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-lg);
    margin-bottom: var(--space-xl);
    border-left: 4px solid var(--warning);
    background: rgba(252, 213, 53, 0.05) !important;
}

.alert-icon {
    color: var(--warning);
    font-size: 1.5rem;
}

.alert-content h4 {
    margin: 0 0 4px 0;
    color: var(--warning);
}

@media (max-width: 1100px) {
    .dashboard-two-column {
        grid-template-columns: 1fr;
    }
}

/* Enhanced Spacing */
.dashboard-section {
    margin-bottom: var(--space-xxl);
    padding: 0 var(--space-md);
}

.section-title {
    margin-bottom: var(--space-xl);
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: var(--space-sm);
}

.section-title h3 {
    margin-bottom: 4px;
    font-size: 1.25rem;
}

/* Manager Dashboard Styling */
.throughput-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    flex: 1;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 8px;
}

.throughput-list::-webkit-scrollbar {
    width: 6px;
}

.throughput-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.throughput-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.throughput-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

.throughput-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md);
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-md);
}

.throughput-user {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.throughput-stats {
    display: flex;
    gap: var(--space-lg);
    font-size: 0.85rem;
}

.stat-box {
    text-align: right;
}

.stat-label {
    display: block;
    opacity: 0.6;
    font-size: 0.7rem;
    text-transform: uppercase;
}

.stat-value {
    font-weight: 600;
    color: var(--primary-color);
}

.overdue-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    flex: 1;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 8px;
}

.overdue-list::-webkit-scrollbar {
    width: 6px;
}

.overdue-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.overdue-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.overdue-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

.overdue-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    background: rgba(231, 76, 60, 0.05);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--danger);
}

.overdue-info h4 {
    margin: 0;
    font-size: 0.9rem;
}

.overdue-date {
    font-size: 0.75rem;
    color: var(--danger);
    font-weight: 600;
}

.velocity-container {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 120px;
    padding: var(--space-xl) 0 var(--space-md) 0;
}

.velocity-bar {
    flex: 1;
    background: var(--primary-color);
    border-radius: 4px 4px 0 0;
    position: relative;
    min-width: 20px;
    transition: height 1s ease-out;
}

.velocity-bar::after {
    content: attr(data-value);
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    font-weight: 700;
}

/* Manager Dashboard Layout Refinements */
#tab-manager .dashboard-charts-row,
#tab-manager .dashboard-two-column {
    gap: var(--space-xxl);
    margin-bottom: var(--space-xxl);
}

#tab-manager .dashboard-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-xxl);
}

/* Burndown Chart */
.burndown-panel {
    min-height: 400px;
}

.burndown-chart-wrapper {
    width: 100%;
    margin-top: 20px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 10px;
    position: relative;
}

.burndown-svg {
    width: 100%;
    height: auto;
    display: block;
}

.chart-placeholder {
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-full-width {
    grid-column: 1 / -1;
    width: 100%;
}

/* Audit Log Styling */
.audit-item {
    padding: 10px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.audit-item:last-child {
    border-bottom: none;
}

.audit-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    opacity: 0.6;
}

.audit-user {
    font-weight: 600;
    color: var(--primary-color);
}

.audit-change {
    font-size: 0.85rem;
    line-height: 1.4;
}

.audit-field {
    font-weight: 700;
    color: var(--text-main);
}

.audit-old {
    text-decoration: line-through;
    opacity: 0.5;
    background: rgba(231, 76, 60, 0.1);
    padding: 0 4px;
    border-radius: 2px;
}

.audit-new {
    color: var(--success);
    background: rgba(46, 204, 113, 0.1);
    padding: 0 4px;
    border-radius: 2px;
    font-weight: 500;
}

/* --- Gantt Chart Styles --- */
.gantt-chart-container {
    margin-top: 20px;
    padding: 24px;
    overflow-x: auto;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.gantt-timeline-header {
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 20;
    box-sizing: border-box;
}

.gantt-month-row {
    display: flex;
    border-bottom: 1px solid var(--glass-border);
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.2);
}

.gantt-month-cell {
    flex-shrink: 0;
    padding: 6px 12px;
    font-weight: 700;
    font-size: 0.75rem;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    border-right: 1px solid var(--glass-border);
    box-sizing: border-box;
    display: flex;
    align-items: center;
}

.gantt-day-row {
    display: flex;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.1);
}

.gantt-timeline-cell {
    flex-shrink: 0;
    text-align: center;
    font-size: 0.7rem;
    color: var(--text-muted);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 6px 0;
    box-sizing: border-box;
}

.gantt-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-sizing: border-box;
    position: relative;
}

.gantt-row {
    display: flex;
    align-items: center;
    height: 40px;
    position: relative;
    box-sizing: border-box;
}

.project-header-row {
    margin-top: 15px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 5px;
    height: auto;
}

.gantt-task-label {
    width: 200px;
    flex-shrink: 0;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 12px;
    display: flex;
    align-items: center;
}

.gantt-row-parent {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.gantt-row-parent .gantt-task-label {
    font-weight: 700;
}

.gantt-row-child .gantt-task-label {
    padding-left: 24px;
    opacity: 0.9;
}

.gantt-row-child .gantt-task-label::before {
    content: '\f105';
    /* fa-chevron-right */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-right: 8px;
    font-size: 0.7rem;
    opacity: 0.5;
}

.gantt-bar-wrapper {
    flex-grow: 1;
    position: relative;
    height: 100%;
}

.gantt-bar {
    position: absolute;
    height: 24px;
    top: 8px;
    border-radius: 12px;
    background: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    padding: 0 12px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-size: 0.75rem;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    min-width: 40px;
    z-index: 10;
}

.gantt-bar-parent {
    height: 12px;
    top: 14px;
    border-radius: 2px;
    clip-path: polygon(0% 0%, 100% 0%, 100% 70%, 95% 100%, 5% 100%, 0% 70%);
    box-shadow: none;
    background: var(--primary-color) !important;
    border-left: none !important;
}

.gantt-bar-parent .gantt-bar-progress {
    border-radius: 2px;
    background: rgba(0, 0, 0, 0.3);
}

.gantt-bar-parent .gantt-bar-content {
    display: none;
    /* Hide text inside parent bars as they are thin */
}

.gantt-bar:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
    filter: brightness(1.1);
}

.gantt-bar-progress {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
}

.gantt-bar-content {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.gantt-bar-title {
    font-weight: 500;
}

.gantt-bar-pct {
    opacity: 0.8;
    margin-left: 8px;
}

.gantt-chart-container.loading {
    opacity: 0.6;
    pointer-events: none;
}

.error-msg {
    color: var(--danger);
    padding: 20px;
    text-align: center;
    font-weight: 500;
}

.gantt-grid-line {
    position: absolute;
    top: 0;
    bottom: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.03);
    z-index: 0;
}

.gantt-weekend {
    background: rgba(255, 255, 255, 0.02);
}

.gantt-today-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--danger);
    z-index: 2;
    box-shadow: 0 0 8px var(--danger);
}

.gantt-today-line::after {
    content: 'TODAY';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.6rem;
    color: var(--danger);
    font-weight: bold;
    letter-spacing: 1px;
}

/* Custom Rich Dropdown */
.custom-dropdown {
    position: relative;
    min-width: 250px;
    user-select: none;
}

.custom-dropdown-trigger {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 8px 16px;
    border-radius: var(--radius-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: var(--trans-fast);
    font-size: 0.9rem;
    color: var(--text-main);
    gap: 12px;
}

.custom-dropdown-trigger:hover {
    background: var(--glass-highlight);
    border-color: var(--primary-color);
}

.custom-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    max-height: 400px;
    overflow-y: auto;
    background: var(--bg-dark-secondary);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    z-index: 1000;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
    animation: fadeInDown 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-dropdown-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: var(--trans-fast);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.custom-dropdown-item:last-child {
    border-bottom: none;
}

.custom-dropdown-item:hover {
    background: var(--glass-highlight);
}

.custom-dropdown-item.active {
    background: rgba(var(--primary-h), 100, 50, 0.15);
    border-left: 4px solid var(--primary-color);
}

.custom-dropdown-item .project-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-main);
}

.custom-dropdown-item .customer-name {
    font-size: 0.75rem;
    opacity: 0.7;
    color: var(--text-muted);
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Task List View Styles */
.list-view-container {
    flex: 1;
    overflow-y: auto;
    border-radius: var(--radius-lg);
    margin-top: var(--space-md);
    padding: 0;
}

.task-list-table {
    width: 100%;
    border-collapse: collapse;
    color: var(--text-main);
    font-size: 0.95rem;
}

.task-list-table th {
    text-align: left;
    padding: var(--space-md) var(--space-lg);
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.task-list-table td {
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--glass-border);
    vertical-align: middle;
}

.task-list-row {
    transition: all var(--trans-fast);
    cursor: pointer;
}

.task-list-row:hover {
    background: var(--glass-highlight);
}

.task-title-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.parent-task-title {
    font-size: 0.75rem;
    color: var(--text-muted);
    opacity: 0.8;
}

.task-title-text {
    font-weight: 500;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    text-transform: capitalize;
}

.project-group-header {
    background: rgba(0, 0, 0, 0.4);
}

.project-group-header td {
    padding: var(--space-md) var(--space-lg) !important;
    border-bottom: 2px solid var(--primary-color) !important;
}

.project-header-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.group-customer {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1;
}

.group-project {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
}

.parent-header-row {
    background: rgba(var(--primary-h), 100, 50, 0.05);
}

.parent-header-row .task-title-text {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--primary-color);
}

.parent-header-row td {
    border-top: 1px solid var(--glass-border);
}

.list-child-row .task-title-cell {
    padding-left: 24px;
    position: relative;
}

.list-child-row .task-title-cell::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 50%;
    width: 8px;
    height: 1px;
    background: var(--text-muted);
    opacity: 0.5;
}

.list-child-row .task-title-cell::after {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    width: 1px;
    height: 50%;
    background: var(--text-muted);
    opacity: 0.5;
}

.project-tag {
    padding-left: 10px;
    font-weight: 500;
    color: var(--text-main);
}

.list-assignees {
    display: flex;
    gap: 4px;
}

.user-avatar-mini {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.due-date-cell {
    font-family: monospace;
    font-weight: 500;
}

.due-date-cell.overdue {
    color: var(--danger);
}

.loe-cell {
    font-family: monospace;
    font-weight: 600;
}

/* Activity Table Styles */
.activity-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.activity-table th {
    text-align: left;
    padding: 12px 15px;
    border-bottom: 1px solid var(--glass-border);
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.activity-table td {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
    vertical-align: middle;
}

.activity-table tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.activity-row-top {
    background: rgba(79, 70, 229, 0.08);
}

.activity-user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.activity-count-cell {
    text-align: center;
}

.activity-bar-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 60px;
    margin: 4px auto;
}

.activity-mini-bar {
    height: 4px;
    border-radius: 2px;
    background: var(--glass-border);
    overflow: hidden;
}

.activity-mini-fill {
    height: 100%;
    background: var(--primary-color);
}

.total-activity-cell {
    text-align: right;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.activity-highlight {
    color: var(--primary-light);
}

/* Table Sort Styles */
.sortable-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

.sortable-header i {
    margin-left: 8px;
    opacity: 0.3;
    transition: all 0.2s ease;
}

.sortable-header:hover i,
.active-sort i {
    opacity: 1;
    color: var(--primary-color);
}

.active-sort {
    color: var(--primary-color) !important;
}

/* Project Portfolio Table Styles */
.portfolio-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.portfolio-table th {
    text-align: center;
    padding: 12px 15px;
    border-bottom: 1px solid var(--glass-border);
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.portfolio-table th:first-child {
    text-align: left;
}

.portfolio-table th:last-child {
    text-align: right;
}

.portfolio-table td {
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
    vertical-align: middle;
}

.portfolio-table tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.project-customer-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.customer-small {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.project-bold {
    font-weight: 700;
    font-size: 1rem;
    color: var(--primary-color);
}

.portfolio-value {
    font-weight: 600;
    color: var(--success);
    text-align: center;
}

.portfolio-timeline {
    text-align: center;
    font-size: 0.8rem;
    font-family: monospace;
    color: var(--text-muted);
}

.portfolio-user-icon {
    text-align: center;
}

/* Team Icon Stack */
.team-icon-stack {
    display: flex;
    justify-content: center;
    padding-left: 10px;
}

.stack-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--bg-dark-secondary);
    margin-left: -10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s;
    cursor: default;
}

.stack-avatar:hover {
    transform: translateY(-4px);
    z-index: 10;
}

.avatar-more {
    background: var(--glass-highlight);
    color: var(--text-muted);
    font-size: 0.6rem;
}

/* Status Stoplights */
.status-stoplight-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.status-stoplight {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    box-shadow: 0 0 10px currentColor;
}

.stoplight-red {
    background-color: var(--danger);
    color: var(--danger);
}

.stoplight-yellow {
    background-color: var(--warning);
    color: var(--warning);
}

.stoplight-green {
    background-color: var(--success);
    color: var(--success);
}

/* Customer Contact Management Styles */
.section-header-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
}

.contacts-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    max-height: 250px;
    overflow-y: auto;
    padding-right: 5px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: var(--space-sm);
    background: rgba(0, 0, 0, 0.1);
}

.contact-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    padding: 10px 15px;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.contact-row:hover {
    background: rgba(255, 255, 255, 0.06);
}

.contact-main {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.contact-name-text {
    font-weight: 600;
    font-size: 0.95rem;
}

.contact-title-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.contact-email-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    opacity: 0.8;
}

.contact-actions {
    display: flex;
    gap: 8px;
}

.contact-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.contact-btn:hover {
    background: var(--glass-highlight);
    color: white;
}

.contact-btn.delete:hover {
    color: var(--danger);
    border-color: var(--danger);
}

.contact-btn.copy:hover {
    color: var(--info);
    border-color: var(--info);
}

.contact-btn.edit:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Project List Search Box */
.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-wrapper .search-icon {
    position: absolute;
    left: 12px;
    font-size: 0.85rem;
    color: var(--text-muted);
    pointer-events: none;
    opacity: 0.6;
}

.search-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 8px 12px 8px 32px;
    color: var(--text-color);
    font-size: 0.85rem;
    transition: all 0.2s;
    outline: none;
}

.search-input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.search-input::placeholder {
    color: var(--text-muted);
    opacity: 0.5;
}

/* Sidebar Notification Badge */
.sidebar-badge {
    position: absolute;
    top: -5px;
    right: -8px;
    background-color: var(--danger, #ef4444);
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    border: 1.5px solid var(--bg-dark-secondary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    z-index: 5;
    opacity: 1 !important;
    /* Ensure visibility even when sidebar spans are hidden */
}

.sidebar-badge.hidden {
    display: none;
}

/* Stylish Slide Toggle */
.status-toggle-container {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    margin: 15px 0;
    width: fit-content;
}

.toggle-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: all var(--trans-fast);
}

.toggle-label.label-active-on {
    color: var(--success);
}

.toggle-label.label-inactive-on {
    color: var(--danger);
}

.status-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 22px;
}

.status-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.status-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .4s;
    border-radius: 22px;
    border: 1px solid var(--glass-border);
}

.status-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

input:checked+.status-slider {
    background-color: var(--success);
    border-color: transparent;
}

input:not(:checked)+.status-slider {
    background-color: rgba(248, 49, 47, 0.2);
}

input:checked+.status-slider:before {
    transform: translateX(24px);
}

/* Generate Project Modal & AI Tooltip */
.generate-project-container {
    padding: 20px;
}

.sow-textarea {
    width: 100%;
    min-height: 200px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-color);
    padding: 12px;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 20px;
    transition: border-color var(--trans-fast);
}

.sow-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.08);
}

/* AI Confidence Tooltip */
.ai-confidence-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.2), rgba(147, 51, 234, 0.2));
    border: 1px solid rgba(147, 51, 234, 0.3);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #e0d7ff;
    margin-left: 10px;
    opacity: 0;
    transform: translateY(5px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ai-confidence-badge.show {
    opacity: 1;
    transform: translateY(0);
}

.ai-confidence-badge i {
    font-size: 0.8rem;
    background: linear-gradient(135deg, #818cf8, #c084fc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Loading Overlay */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
    border-radius: var(--radius-lg);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-text {
    font-size: 0.9rem;
    color: var(--text-color);
    letter-spacing: 0.5px;

}

/* Project Maintenance Color Input Enhancement */
#proj-color {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    height: 42px;
    padding: 2px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all var(--trans-fast);
}

#proj-color:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

#proj-color::-webkit-color-swatch-wrapper {
    padding: 0;
}

#proj-color::-webkit-color-swatch {
    border: none;
    border-radius: calc(var(--radius-md) - 2px);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

#proj-color::-moz-color-swatch {
    border: none;
    border-radius: calc(var(--radius-md) - 2px);
}

/* --- Resource Allocation Map --- */
.resource-map-container {
    margin-top: 20px;
    background: rgba(15, 23, 42, 0.4);
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    overflow: hidden;
    position: relative;
    min-height: 300px;
    display: flex;
    flex-direction: column;
}

.allocation-grid-scroll {
    overflow-x: auto;
    width: 100%;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) rgba(0, 0, 0, 0.2);
}

.allocation-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    table-layout: fixed;
}

.allocation-table th,
.allocation-table td {
    padding: 12px 8px;
    border-bottom: 1px solid var(--glass-border);
    text-align: center;
    min-width: 80px;
}

.allocation-table th:first-child,
.allocation-table td:first-child {
    width: 240px;
    min-width: 240px;
    text-align: left;
}

.allocation-table .sticky-col {
    position: sticky;
    left: 0;
    background: var(--bg-dark-secondary);
    z-index: 10;
    border-right: 1px solid var(--glass-border);
}

.allocation-table th {
    background: rgba(30, 41, 59, 0.8);
    font-weight: 600;
    color: var(--text-color);
    position: sticky;
    top: 0;
    z-index: 2;
}

.allocation-user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    min-width: 200px;
}

.allocation-user-info {
    display: flex;
    flex-direction: column;
}

.allocation-user-name {
    font-weight: 600;
    color: white;
}

.allocation-user-title {
    font-size: 0.7rem;
    opacity: 0.6;
}

.allocation-cell {
    cursor: pointer;
    transition: background 0.2s ease;
}

.allocation-cell:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Timeline Components */
.allocation-timeline-cell {
    min-width: 500px;
    padding: 10px !important;
}

.task-timeline-container {
    position: relative;
    height: 24px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.timeline-task-bar {
    position: absolute;
    height: 12px;
    border-radius: 6px;
    min-width: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Drilldown Task List */
.drilldown-task-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 5px;
}

.drilldown-task-item {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all var(--trans-med);
    position: relative;
    overflow: hidden;
}

.drilldown-task-item:hover {
    background: var(--glass-highlight);
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.drilldown-task-info h4 {
    margin: 0 0 4px 0;
    font-size: 0.95rem;
}

.drilldown-task-meta {
    display: flex;
    gap: 15px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.drilldown-task-meta i {
    margin-right: 4px;
}

.drilldown-task-effort {
    font-weight: 700;
    color: var(--primary-light);
    font-size: 1rem;
}

/* --- AI Optimization Styling --- */
.btn-magic {
    background: linear-gradient(135deg, #7c3aed, #db2777);
    border: none;
    color: white;
    padding: 6px 14px;
    font-size: 0.85rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-magic:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4);
}

.btn-magic i {
    margin-right: 6px;
}

.magic-wand-container {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.2), rgba(219, 39, 119, 0.2));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a78bfa;
    font-size: 1.5rem;
}

.suggestion-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 18px;
    margin-bottom: 12px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 15px;
    transition: all 0.2s ease;
}

.suggestion-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: #a78bfa;
}

.suggestion-details h4 {
    margin: 0 0 8px 0;
    color: white;
    font-size: 1rem;
}

.suggestion-transfer {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.transfer-arrow {
    color: var(--primary-color);
    animation: bounceRight 2s infinite;
}

@keyframes bounceRight {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(0);
    }

    40% {
        transform: translateX(4px);
    }

    60% {
        transform: translateX(2px);
    }
}

.suggestion-reason {
    font-size: 0.85rem;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.2);
    padding: 10px;
    border-radius: var(--radius-sm);
    border-left: 2px solid #db2777;
}

.suggestion-action {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.user-tag {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
}

/* Utility for sections that should feel wider or more significant */
.section-full-width {
    width: 100%;
}

.section-full-width .chart-panel {
    width: 100%;
}

/* Time Log History Report Styling */
.report-summary-ribbon {
    display: flex;
    gap: var(--space-xl);
    margin-bottom: var(--space-lg);
    padding: var(--space-md) var(--space-lg);
    background: var(--glass-bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    animation: fadeIn 0.4s ease-out;
}

.summary-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.summary-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 600;
}

.summary-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.summary-value small {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-left: 4px;
}

.report-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}

.report-table th {
    padding: 12px 16px;
    text-align: left;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.report-table tbody tr {
    transition: transform var(--trans-fast);
}

.report-table tbody tr:hover {
    transform: scale(1.01);
}

.report-table td {
    padding: 16px;
    background: var(--bg-dark-secondary);
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    transition: background var(--trans-fast);
}

.report-table tr:hover td {
    background: var(--glass-highlight);
    border-color: var(--primary-color);
}

.report-table td:first-child {
    border-left: 1px solid var(--glass-border);
    border-top-left-radius: var(--radius-md);
    border-bottom-left-radius: var(--radius-md);
}

.report-table td:last-child {
    border-right: 1px solid var(--glass-border);
    border-top-right-radius: var(--radius-md);
    border-bottom-right-radius: var(--radius-md);
}

.report-date-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.date-main {
    font-weight: 600;
    color: var(--text-main);
    font-size: 0.95rem;
}

.date-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.report-info-cell {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.report-project-tag {
    font-size: 0.65rem;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 4px;
    width: fit-content;
    color: var(--primary-color);
    font-weight: 700;
}

.report-task-title {
    font-weight: 500;
    color: var(--text-main);
    font-size: 0.9rem;
}

.report-hours-badge {
    background: linear-gradient(135deg, var(--primary-color), var(--info));
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 700;
    color: white;
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: inline-block;
}

.report-customer-name {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: -4px;
    display: block;
}

/* Table Sort Styles */
.sortable-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

.sortable-header i {
    margin-left: 8px;
    opacity: 0.3;
    transition: all 0.2s ease;
}

.sortable-header:hover i,
.active-sort i {
    opacity: 1;
    color: var(--primary-color);
}

.active-sort {
    color: var(--primary-color) !important;
}

/* Customer Portal Refinements */
.velocity-chart-mock {
    height: 150px;
    display: flex;
    align-items: flex-end;
    gap: 15px;
    padding: 20px 0;
    justify-content: space-around;
}

.velocity-bar-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.velocity-bar-container {
    width: 60%;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    height: 100px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.velocity-bar-fill {
    width: 100%;
    background: linear-gradient(to top, var(--primary-color), var(--primary-light));
    border-radius: 4px;
    transition: height 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.velocity-bar-label {
    font-size: 0.6rem;
    color: var(--text-muted);
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
    margin-top: 4px;
}

/* Activity Timeline */
.activity-timeline {
    position: relative;
    padding-left: 20px;
}

.activity-timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 5px;
    bottom: 5px;
    width: 2px;
    background: var(--glass-border);
    opacity: 0.3;
}

.timeline-activity-item {
    position: relative;
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
    transition: all 0.3s ease;
}

.timeline-activity-item:last-child {
    margin-bottom: 0;
}

.timeline-icon {
    width: 16px;
    height: 16px;
    background: var(--bg-dark);
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    color: var(--primary-color);
    z-index: 2;
    flex-shrink: 0;
    margin-top: 2px;
}

.timeline-content {
    flex: 1;
}

.timeline-title {
    font-size: 0.85rem;
    color: var(--text-main);
    line-height: 1.4;
}

.timeline-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.timeline-activity-item:hover .timeline-icon {
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(var(--primary-h), 100, 255, 0.3);
}

.timeline-activity-item:hover .timeline-title {
    color: var(--primary-light);
}

.mini-list-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mini-focus-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    padding: 10px 15px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
    transition: transform 0.2s ease;
}

.mini-focus-item:hover {
    transform: translateX(5px);
    background: rgba(255, 255, 255, 0.05);
}

.mini-focus-icon {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: var(--primary-light);
}

.mini-focus-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mini-focus-title {
    font-weight: 600;
    font-size: 0.9rem;
}

.mini-focus-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.health-traffic-light {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    position: relative;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
}

.health-red {
    background: #ef4444;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
    border: none;
}

.health-amber {
    background: #f59e0b;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
    border: none;
}

.health-green {
    background: #22c55e;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.4);
    border: none;
}

.team-avatar-stack {
    display: flex;
    margin-left: 5px;
}

.team-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--bg-dark-secondary);
    margin-left: -8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: 700;
    background: var(--primary-color);
    color: white;
}

.team-avatar:first-child {
    margin-left: 0;
}

.ai-badge {
    background: linear-gradient(135deg, #818cf8, #c084fc);
    color: white;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.digest-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.digest-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.digest-card-title-group h4 {
    margin: 0;
    font-size: 1rem;
    color: var(--text-color);
}

.digest-customer {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.digest-text {
    font-size: 0.85rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
}

.digest-text p {
    margin-bottom: 10px;
}

.digest-text ul {
    padding-left: 20px;
    margin-bottom: 10px;
}

.digest-text li {
    margin-bottom: 4px;
}

.blocked-card {
    background: rgba(239, 68, 68, 0.05);
    border: 1.5px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-md);
    padding: 15px 20px;
    margin-bottom: var(--space-xl);
    display: flex;
    align-items: center;
    gap: 20px;
    animation: pulseBorder 2s infinite ease-in-out;
}

@keyframes pulseBorder {
    0% {
        border-color: rgba(239, 68, 68, 0.3);
    }

    50% {
        border-color: rgba(239, 68, 68, 0.6);
    }

    100% {
        border-color: rgba(239, 68, 68, 0.3);
    }
}

.blocked-card-icon {
    font-size: 2rem;
    color: #f87171;
}

.blocked-card-content h4 {
    margin: 0 0 5px 0;
    color: #f87171;
}

.blocked-card-content p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.9;
}

/* Roadmap Stylishness */
.roadmap-container {
    position: relative;
    padding-left: 30px;
    margin-top: 10px;
}

.roadmap-container::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 5px;
    bottom: 5px;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary-color), var(--glass-border));
    opacity: 0.3;
}

.roadmap-item {
    position: relative;
    margin-bottom: 25px;
    transition: all 0.3s ease;
}

.roadmap-item:last-child {
    margin-bottom: 0;
}

.milestone-status-icon {
    position: absolute;
    left: -30px;
    top: 2px;
    width: 16px;
    height: 16px;
    background: var(--bg-dark);
    border: 2px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    color: var(--text-muted);
    z-index: 2;
    transition: all 0.3s ease;
}

.milestone-reached .milestone-status-icon {
    background: var(--success);
    border-color: var(--success);
    color: white;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.4);
}

.milestone-info {
    padding-left: 5px;
}

.milestone-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.milestone-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-main);
}

.milestone-date {
    font-size: 0.75rem;
    color: var(--primary-light);
    font-weight: 700;
    background: rgba(129, 140, 248, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
}

.milestone-reached .milestone-title {
    opacity: 0.7;
    text-decoration: line-through;
}

.roadmap-item:hover .milestone-status-icon {
    transform: scale(1.2);
    border-color: var(--primary-color);
}