/* ==========================================================================
   TaskFlow Project Manager - Modern Design System
   Inspired by Trello, MeisterTask & Linear
   ========================================================================== */

:root {
    --bg-main: #0b0f19;
    --bg-surface: #111827;
    --bg-card: #1f2937;
    --bg-card-hover: #283548;
    --bg-input: #1a2234;
    --border: #374151;
    --border-light: #2d3748;
    
    --text-primary: #f9fafb;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: rgba(99, 102, 241, 0.15);
    
    --success: #10b981;
    --success-light: rgba(16, 185, 129, 0.15);
    --warning: #f59e0b;
    --warning-light: rgba(245, 158, 11, 0.15);
    --danger: #ef4444;
    --danger-light: rgba(239, 68, 68, 0.15);
    --info: #0ea5e9;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}
::-webkit-scrollbar-thumb {
    background: #374151;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #4b5563;
}

/* Navigation Bar */
.navbar {
    background: rgba(17, 24, 39, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 40;
    height: 64px;
}

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

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.brand-icon {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 900;
    font-size: 1.1rem;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.35);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link {
    padding: 0.5rem 0.85rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
    background: var(--bg-card);
}

.nav-link.badge-link {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.nav-link.badge-link:hover {
    background: rgba(245, 158, 11, 0.2);
}

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

/* User Profile Dropdown */
.user-menu {
    position: relative;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.35rem 0.6rem;
    border-radius: var(--radius-md);
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.15s ease;
}

.user-menu-btn:hover {
    background: var(--bg-card);
    border-color: var(--border);
}

.dropdown-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: 240px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    padding: 0.5rem;
    display: none;
    z-index: 50;
    animation: fadeIn 0.15s ease;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-header {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0.5rem;
}

.dropdown-header-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-header-email {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.75rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.15s ease;
}

.dropdown-item:hover {
    color: var(--text-primary);
    background: var(--bg-card);
}

.dropdown-item.danger:hover {
    color: var(--danger);
    background: var(--danger-light);
}

/* Layout Containers */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.container-app {
    max-width: 1440px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    width: 100%;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid transparent;
    text-decoration: none;
    line-height: 1.2;
    white-space: nowrap;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
}

.btn-lg {
    padding: 0.85rem 1.75rem;
    font-size: 1rem;
    border-radius: var(--radius-md);
}

.btn-primary {
    background: var(--primary);
    color: white;
}
.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.btn-secondary {
    background: var(--bg-card);
    border-color: var(--border);
    color: var(--text-primary);
}
.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: #4b5563;
}

.btn-success {
    background: var(--success);
    color: white;
}
.btn-success:hover {
    background: #059669;
}

.btn-danger {
    background: var(--danger);
    color: white;
}
.btn-danger:hover {
    background: #dc2626;
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}
.btn-ghost:hover {
    color: var(--text-primary);
    background: var(--bg-card);
}

/* Forms & Inputs */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
}

.form-control {
    width: 100%;
    padding: 0.65rem 0.85rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    transition: all 0.15s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

textarea.form-control {
    min-height: 90px;
    resize: vertical;
}

/* Priority & Status Badges */
.priority-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.55rem;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.badge-urgent { background: rgba(239, 68, 68, 0.2); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.badge-high { background: rgba(249, 115, 22, 0.2); color: #fb923c; border: 1px solid rgba(249, 115, 22, 0.3); }
.badge-medium { background: rgba(14, 165, 233, 0.2); color: #38bdf8; border: 1px solid rgba(14, 165, 233, 0.3); }
.badge-low { background: rgba(107, 114, 128, 0.2); color: #9ca3af; border: 1px solid rgba(107, 114, 128, 0.3); }

/* Due Date Tags */
.due-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.15rem 0.45rem;
    border-radius: var(--radius-sm);
}

.due-future { background: rgba(55, 65, 81, 0.6); color: #d1d5db; }
.due-soon { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.due-today { background: rgba(239, 68, 68, 0.2); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); font-weight: 700; }
.due-overdue { background: #ef4444; color: white; font-weight: 700; }
.due-completed { background: rgba(16, 185, 129, 0.2); color: #34d399; }

/* Avatar Badges */
.avatar-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    border-radius: 9999px;
}
.w-6 { width: 1.5rem; height: 1.5rem; font-size: 0.65rem; }
.w-8 { width: 2rem; height: 2rem; font-size: 0.75rem; }
.w-10 { width: 2.5rem; height: 2.5rem; font-size: 0.9rem; }
.w-12 { width: 3rem; height: 3rem; font-size: 1.1rem; }

/* Avatar colors */
.bg-indigo-600 { background-color: #4f46e5; }
.bg-violet-600 { background-color: #7c3aed; }
.bg-sky-600 { background-color: #0284c7; }
.bg-emerald-600 { background-color: #059669; }
.bg-amber-600 { background-color: #d97706; }
.bg-rose-600 { background-color: #e11d48; }
.bg-fuchsia-600 { background-color: #c026d3; }

/* ==========================================================================
   Kanban Board Layout (Trello / Planner Style)
   ========================================================================== */

.board-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 64px);
    overflow: hidden;
}

.board-header {
    background: rgba(17, 24, 39, 0.7);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.board-title-area {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.board-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
}

.board-canvas {
    flex: 1;
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.5rem;
    overflow-x: auto;
    overflow-y: hidden;
    user-select: none;
}

.kanban-column {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 320px;
    min-width: 320px;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-md);
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.column-header {
    padding: 0.85rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-light);
}

.column-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.column-count {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.1rem 0.45rem;
    border-radius: 9999px;
}

.card-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    min-height: 60px;
}

.kanban-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.85rem;
    box-shadow: var(--shadow-sm);
    cursor: grab;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    overflow: hidden;
}

.kanban-card:hover {
    background: var(--bg-card-hover);
    border-color: #4b5563;
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.kanban-card.dragging {
    opacity: 0.4;
    cursor: grabbing;
}

.kanban-card.drop-target {
    border-top: 2px solid var(--primary);
}

.card-header-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.card-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: 0.65rem;
}

.card-footer-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.card-assignees {
    display: flex;
    align-items: center;
    margin-left: 0.25rem;
}

.card-assignees .avatar-badge {
    margin-left: -0.4rem;
    border: 2px solid var(--bg-card);
}

.add-card-btn {
    margin: 0.5rem 0.75rem 0.75rem;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    background: transparent;
    border: 1px dashed var(--border);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s ease;
}

.add-card-btn:hover {
    background: var(--bg-card);
    border-color: var(--primary);
    color: var(--primary);
}

.add-column-box {
    width: 300px;
    min-width: 300px;
    background: rgba(17, 24, 39, 0.4);
    border: 1px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* ==========================================================================
   Modals & Overlays
   ========================================================================== */

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 1.25rem;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
}

.modal-backdrop.show {
    display: flex;
    animation: fadeIn 0.2s ease;
}

.modal-dialog {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 680px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    box-sizing: border-box;
    margin: auto;
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.modal-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.25rem;
    border-radius: var(--radius-sm);
}

.modal-close:hover {
    color: var(--text-primary);
    background: var(--bg-card);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1 1 auto;
    min-height: 0;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: #4b5563 rgba(0, 0, 0, 0.2);
}

/* Card Detail Modal & Anti-Horizontal Scroll Guard */
.card-detail-dialog {
    max-width: 920px !important;
    width: min(920px, 95vw) !important;
    height: 90vh !important;
    max-height: 90vh !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    margin: auto !important;
}

.card-detail-body {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 270px !important;
    gap: 1.5rem !important;
    align-items: start !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #6366f1 rgba(0, 0, 0, 0.2);
}

.card-detail-body::-webkit-scrollbar {
    width: 8px;
}

.card-detail-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.card-detail-body::-webkit-scrollbar-thumb {
    background: #4f46e5;
    border-radius: 4px;
}

.card-detail-body::-webkit-scrollbar-thumb:hover {
    background: #6366f1;
}

.card-detail-body > div:first-child {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: visible !important;
}

.card-detail-sidebar {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    align-self: start !important;
}

.card-detail-sidebar .form-control,
.card-detail-sidebar select,
.card-detail-sidebar input,
.card-detail-sidebar button {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

@media (max-width: 768px) {
    .modal-backdrop {
        padding: 0.5rem;
    }
    .card-detail-dialog {
        width: 100% !important;
        height: 95vh !important;
        max-height: 95vh !important;
    }
    .card-detail-body {
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
        padding: 1rem !important;
    }
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    background: rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   Toasts Notification Center
   ========================================================================== */

.toast-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-lg);
    font-size: 0.9rem;
    color: var(--text-primary);
    min-width: 280px;
    max-width: 420px;
    animation: slideInRight 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    transition: all 0.2s ease;
}

.toast.toast-success { border-left: 4px solid var(--success); }
.toast.toast-error { border-left: 4px solid var(--danger); }
.toast.toast-warning { border-left: 4px solid var(--warning); }
.toast.toast-info { border-left: 4px solid var(--info); }

/* Flash message banner */
.flash-banner {
    padding: 0.85rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    font-size: 0.9rem;
}
.flash-success { background: rgba(16, 185, 129, 0.15); color: #34d399; border-bottom: 1px solid rgba(16, 185, 129, 0.3); }
.flash-error { background: rgba(239, 68, 68, 0.15); color: #f87171; border-bottom: 1px solid rgba(239, 68, 68, 0.3); }

/* Keyframes */
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Utilities */
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }

/* ==========================================================================
   Card Attachments & Image Covers (Trello / Planner Style)
   ========================================================================== */

.card-cover-banner {
    margin: -0.85rem -0.85rem 0.65rem -0.85rem;
    height: 125px;
    background: #111827;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
    position: relative;
}

.card-cover-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.2s ease;
}

.kanban-card:hover .card-cover-banner img {
    transform: scale(1.02);
}

.modal-cover-banner {
    position: relative;
    width: 100%;
    max-width: 100%;
    height: 160px;
    background: #111827;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
    box-sizing: border-box;
}

.modal-cover-banner img {
    width: 100%;
    max-width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.modal-cover-banner .cover-overlay-btn {
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
    background: rgba(17, 24, 39, 0.8);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background 0.15s ease;
}

.modal-cover-banner .cover-overlay-btn:hover {
    background: rgba(239, 68, 68, 0.85);
}

.attachment-dropzone {
    border: 2px dashed var(--border);
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-md);
    padding: 1.25rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.attachment-dropzone:hover,
.attachment-dropzone.dragover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.08);
}

.attachment-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.65rem 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: border-color 0.15s ease, background 0.15s ease;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow: hidden;
    flex-wrap: wrap;
}

.attachment-card:hover {
    border-color: #4b5563;
    background: var(--bg-card-hover);
}

.attachment-thumb {
    width: 68px;
    height: 52px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid var(--border);
    background: #111827;
    flex-shrink: 0;
}

.attachment-icon-badge {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.badge-cover {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.1rem 0.45rem;
    border-radius: 9999px;
}

.inline-attach-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    max-width: 100%;
}

.inline-attach-pill .pill-name {
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.inline-attach-pill .pill-remove {
    cursor: pointer;
    color: var(--text-muted);
    font-weight: 700;
    padding: 0 0.15rem;
}

.inline-attach-pill .pill-remove:hover {
    color: #ef4444;
}

/* ==========================================================================
   Professional SaaS Upgrades: Multi-Views, Labels, Time, Markdown, Analytics
   ========================================================================== */

/* 1. Multi-View Switcher */
.view-switcher-bar {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.2rem;
    gap: 0.2rem;
}

.view-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-radius: calc(var(--radius-md) - 2px);
    cursor: pointer;
    transition: all 0.15s ease;
}

.view-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.view-btn.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* 2. Color-coded Labels */
.card-labels-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-bottom: 0.45rem;
}

.card-label-chip {
    display: inline-flex;
    align-items: center;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.12rem 0.5rem;
    border-radius: 4px;
    letter-spacing: 0.2px;
    line-height: 1.2;
}

.label-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    transition: all 0.15s ease;
}

.label-filter-pill:hover,
.label-filter-pill.active {
    color: #fff;
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.2);
}

/* 3. Calendar View */
.calendar-view-container {
    padding: 1.5rem;
    display: none;
    flex-direction: column;
    height: calc(100vh - 140px);
    overflow-y: auto;
}

.calendar-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.calendar-grid-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    text-align: center;
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--text-muted);
    padding: 0.65rem 0;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: var(--border);
    gap: 1px;
    border: 1px solid var(--border);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    overflow: hidden;
}

.calendar-cell {
    background: var(--bg-surface);
    min-height: 110px;
    padding: 0.45rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    transition: background 0.15s ease;
}

.calendar-cell:hover {
    background: rgba(255, 255, 255, 0.02);
}

.calendar-cell.other-month {
    background: rgba(17, 24, 39, 0.4);
    opacity: 0.4;
}

.calendar-cell.today {
    background: rgba(99, 102, 241, 0.06);
}

.calendar-cell.today .calendar-date-num {
    background: var(--primary);
    color: #fff;
    border-radius: 9999px;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-date-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
}

.calendar-card-pill {
    padding: 0.25rem 0.45rem;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-card);
    border: 1px solid var(--border);
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border-left-width: 3px;
    transition: transform 0.1s ease, border-color 0.15s ease;
}

.calendar-card-pill:hover {
    transform: translateY(-1px);
    border-color: var(--primary);
}

/* 4. Table / Spreadsheet View */
.table-view-container {
    padding: 1.5rem;
    display: none;
    overflow-y: auto;
    height: calc(100vh - 140px);
}

.task-table-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.task-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.task-table th {
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.task-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
}

.task-table tr:hover td {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

/* 5. Project Analytics View */
.analytics-view-container {
    padding: 1.75rem;
    display: none;
    overflow-y: auto;
    height: calc(100vh - 140px);
}

.kpi-stat-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.kpi-icon-circle {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

/* 6. Markdown Formatting Toolbar & Elements */
.md-toolbar {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.35rem 0.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.md-toolbar-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    cursor: pointer;
    line-height: 1;
}

.md-toolbar-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

.md-preview-pane {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    padding: 0.85rem 1rem;
    min-height: 90px;
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--text-primary);
}

.md-code-block {
    background: #0d1117;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.75rem;
    font-family: Consolas, monospace;
    font-size: 0.8rem;
    overflow-x: auto;
    margin: 0.5rem 0;
}

.md-inline-code {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.15rem 0.35rem;
    border-radius: 4px;
    font-family: Consolas, monospace;
    font-size: 0.8rem;
    color: #f43f5e;
}

.md-blockquote {
    border-left: 3px solid var(--primary);
    margin: 0.5rem 0;
    padding-left: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
}

.md-task-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0.25rem 0;
}

.md-task-item.checked {
    color: var(--text-muted);
    text-decoration: line-through;
}

.md-mention {
    background: rgba(99, 102, 241, 0.2);
    color: #818cf8;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.82rem;
}

.md-link {
    color: #60a5fa;
    text-decoration: underline;
}

/* 7. Timer & Work Log Widget */
.timer-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 9999px;
}

.timer-pill.running {
    animation: pulseGlow 1.5s infinite;
}

@keyframes pulseGlow {
    0%, 100% { opacity: 1; border-color: rgba(16, 185, 129, 0.6); }
    50% { opacity: 0.6; border-color: rgba(16, 185, 129, 0.2); }
}

/* 8. Keyboard Shortcuts Modal & Badges */
.kbd-key {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-bottom: 2px solid #374151;
    border-radius: 4px;
    padding: 0.15rem 0.45rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: inherit;
}

/* ==========================================================================
   Enterprise Suite Styles: Themes, Presence, Gantt, Palette & Fields
   ========================================================================== */

/* 1. Clean Light Mode & Accents */
[data-theme="light"] {
    --bg-main: #f8fafc;
    --bg-surface: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --bg-input: #ffffff;
    --border: #e2e8f0;
    --border-light: #edf2f7;
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: rgba(79, 70, 229, 0.1);
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .navbar {
    background: rgba(255, 255, 255, 0.85);
    border-bottom: 1px solid #e2e8f0;
}

[data-theme="light"] .kanban-column {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

[data-theme="light"] .kanban-card {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .kanban-card:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .form-control {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #0f172a;
}

[data-theme="light"] .btn-secondary {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #334155;
}

[data-theme="light"] .btn-secondary:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

[data-theme="light"] .modal-dialog {
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.15);
}

/* 2. Live Presence Indicators */
.presence-tray {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.presence-avatar-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.presence-avatar-wrap .presence-dot {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 9px;
    height: 9px;
    background: #10b981;
    border: 2px solid var(--bg-surface);
    border-radius: 50%;
}

.pulse-ring {
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    border: 2px solid rgba(16, 185, 129, 0.7);
    animation: presencePulse 2s infinite cubic-bezier(0.45, 0, 0.55, 1);
    pointer-events: none;
}

@keyframes presencePulse {
    0% { transform: scale(0.95); opacity: 0.9; }
    50% { transform: scale(1.2); opacity: 0; }
    100% { transform: scale(0.95); opacity: 0.9; }
}

.card-viewer-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.35);
    padding: 0.15rem 0.45rem;
    border-radius: 9999px;
    font-weight: 600;
}

/* 3. Gantt Chart & Timeline View */
.timeline-wrapper {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin: 1.25rem 1.75rem;
    overflow: hidden;
}

.timeline-nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1.25rem;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 0.75rem;
}

.timeline-canvas-scroll {
    overflow-x: auto;
    position: relative;
    max-height: calc(100vh - 240px);
    overflow-y: auto;
}

.timeline-dates-header {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--bg-card);
    border-bottom: 2px solid var(--border);
    min-width: 100%;
}

.timeline-date-cell {
    min-width: 52px;
    flex: 1;
    text-align: center;
    padding: 0.45rem 0.2rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.timeline-date-cell.today {
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
}

.timeline-date-cell.weekend {
    background: rgba(0, 0, 0, 0.12);
}

.timeline-task-row {
    display: flex;
    align-items: center;
    position: relative;
    height: 44px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.timeline-task-row:hover {
    background: rgba(255, 255, 255, 0.02);
}

.timeline-task-bar {
    position: absolute;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    padding: 0 0.5rem;
    font-size: 0.76rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: transform 0.12s, box-shadow 0.12s;
    user-select: none;
    z-index: 4;
}

.timeline-task-bar:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    z-index: 6;
}

.timeline-today-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #ef4444;
    z-index: 8;
    pointer-events: none;
}

/* 4. Global Command Palette Spotlight */
.command-palette-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 12vh;
    z-index: 99999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease-out;
}

.command-palette-backdrop.show {
    opacity: 1;
    pointer-events: auto;
}

.command-palette-dialog {
    width: 100%;
    max-width: 620px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.command-search-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg-card);
}

.command-search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-size: 1.05rem;
    color: var(--text-primary);
    font-weight: 500;
}

.command-results-list {
    max-height: 420px;
    overflow-y: auto;
    padding: 0.5rem;
}

.command-group-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    padding: 0.5rem 0.75rem 0.25rem;
}

.command-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 0.75rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background 0.1s;
    color: var(--text-primary);
}

.command-item:hover, .command-item.selected {
    background: var(--primary-light);
    color: var(--primary);
}

.command-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.65rem 1.25rem;
    border-top: 1px solid var(--border);
    background: var(--bg-card);
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* 5. Custom Fields & Subtasks */
.custom-field-chip {
    font-size: 0.72rem;
    background: rgba(99, 102, 241, 0.1);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 4px;
    padding: 0.1rem 0.4rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.subtask-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.6rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.84rem;
}

.subtask-item.completed span.subtask-title {
    text-decoration: line-through;
    color: var(--text-muted);
}

/* ==========================================================================
   6. Multi-Dimensional Filter Toolbar (Linear-Style UX)
   ========================================================================== */
.board-filter-toolbar {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    padding: 0.35rem 1.25rem;
    font-size: 0.78rem;
    position: relative;
    z-index: 10;
}

.filter-toolbar-inner {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
    max-width: 100%;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.filter-group-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-right: 0.15rem;
}

.filter-divider {
    width: 1px;
    height: 16px;
    background: var(--border);
    margin: 0 0.2rem;
}

.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.22rem 0.55rem;
    border-radius: 9999px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.76rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    white-space: nowrap;
    text-decoration: none;
}

.filter-pill:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--border-light);
}

.filter-pill.active {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--primary);
    color: #818cf8;
    font-weight: 700;
}

[data-theme="light"] .filter-pill.active {
    background: rgba(79, 70, 229, 0.12);
    border-color: var(--primary);
    color: var(--primary);
}

.filter-pill-mytasks.active {
    background: rgba(16, 185, 129, 0.2);
    border-color: #10b981;
    color: #34d399;
}

[data-theme="light"] .filter-pill-mytasks.active {
    background: rgba(16, 185, 129, 0.15);
    border-color: #059669;
    color: #059669;
}

.filter-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-radius: 9999px;
    padding: 0.1rem 0.35rem;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 16px;
    line-height: 1;
}

.filter-hotkey {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 0.05rem 0.3rem;
    font-size: 0.68rem;
    font-family: inherit;
    color: var(--text-muted);
}

.dot-indicator {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.filter-clear-btn {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.3);
    color: #f87171;
    font-weight: 600;
}

.filter-clear-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.filter-toolbar-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.filter-action-btn {
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.25);
    color: #818cf8;
}

.filter-action-btn:hover {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
}

/* ==========================================================================
   7. Interactive Calendar Drag-and-Drop & Week Mode
   ========================================================================== */
.calendar-cell.drag-over {
    background: rgba(99, 102, 241, 0.15) !important;
    border: 2px dashed #6366f1 !important;
}

.calendar-card-pill[draggable="true"] {
    cursor: grab;
}

.calendar-card-pill[draggable="true"]:active {
    cursor: grabbing;
    opacity: 0.5;
}

.calendar-days-grid.hide-weekends {
    grid-template-columns: repeat(5, 1fr) !important;
}

.calendar-grid-header.hide-weekends {
    grid-template-columns: repeat(5, 1fr) !important;
}

/* ==========================================================================
   8. Sprint Burndown Chart & Heatmap Capacity Badges
   ========================================================================== */
.burndown-chart-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.burndown-svg {
    width: 100%;
    height: 240px;
    overflow: visible;
}

.workload-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.15rem 0.45rem;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 700;
}

.workload-badge-overloaded {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.workload-badge-balanced {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.workload-badge-available {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

/* ==========================================================================
   9. Rich Markdown Callouts & Tables
   ========================================================================== */
.md-callout {
    padding: 0.65rem 0.9rem;
    border-radius: 6px;
    margin: 0.5rem 0;
    font-size: 0.84rem;
    border-left: 4px solid;
}

.md-callout-note {
    background: rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
    color: #93c5fd;
}

.md-callout-tip {
    background: rgba(16, 185, 129, 0.1);
    border-color: #10b981;
    color: #6ee7b7;
}

.md-callout-warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: #f59e0b;
    color: #fcd34d;
}

.md-callout-important {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
    color: #fca5a5;
}

.md-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.65rem 0;
    font-size: 0.82rem;
}

.md-table th, .md-table td {
    border: 1px solid var(--border);
    padding: 0.4rem 0.6rem;
    text-align: left;
}

.md-table th {
    background: var(--bg-surface);
    font-weight: 700;
}

.md-embedded-img {
    max-width: 100%;
    border-radius: 6px;
    margin: 0.5rem 0;
}

/* ==========================================================================
   Board Menu Right Sidebar Drawer
   ========================================================================== */
.board-menu-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.board-menu-drawer-backdrop.open {
    opacity: 1;
    visibility: visible;
}

.board-menu-drawer {
    position: fixed;
    top: 0;
    right: -380px;
    width: 360px;
    max-width: 90vw;
    height: 100vh;
    background: var(--bg-surface);
    border-left: 1px solid var(--border);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: flex;
    flex-direction: column;
    transition: right 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.board-menu-drawer.open {
    right: 0;
}

.board-menu-header {
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(17, 24, 39, 0.7);
}

.board-menu-header h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.board-menu-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    scrollbar-width: thin;
    scrollbar-color: #4b5563 transparent;
}

.board-menu-section {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.board-menu-section-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
    padding-left: 0.25rem;
}

.board-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.65rem 0.85rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
    text-align: left;
    box-sizing: border-box;
}

.board-menu-item:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-light);
    color: var(--primary);
    transform: translateX(-3px);
}

.board-menu-item-icon {
    font-size: 1.15rem;
    width: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.board-menu-item-content {
    flex: 1;
    min-width: 0;
}

.board-menu-item-title {
    font-weight: 600;
    font-size: 0.86rem;
    line-height: 1.25;
}

.board-menu-item-desc {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.board-menu-item-danger {
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.3);
}

.board-menu-item-danger:hover {
    background: rgba(239, 68, 68, 0.12);
    border-color: var(--danger);
    color: var(--danger);
}

