/* SpecForge - Modern High-Tech Studio Design System */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&family=Outfit:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
    --sidebar-width: 260px;
    --header-height: 64px;
    
    /* Studio Color Palette */
    --bg-dark: #0b0f19;
    --bg-dark-surface: #111827;
    --bg-card: rgba(17, 24, 39, 0.75);
    --bg-card-hover: rgba(30, 41, 59, 0.85);
    --bg-input: rgba(15, 23, 42, 0.7);
    
    --primary-blue: #6366f1;
    --primary-blue-hover: #4f46e5;
    --accent-cyan: #06b6d4;
    --accent-violet: #8b5cf6;
    
    --text-main: #f8fafc;
    --text-sub: #cbd5e1;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-glow: rgba(99, 102, 241, 0.4);
    
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #f43f5e;
    --info: #06b6d4;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px -4px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 40px -8px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 25px -5px rgba(99, 102, 241, 0.3);
    
    --font-heading: 'Outfit', 'Plus Jakarta Sans', -apple-system, sans-serif;
    --font-body: 'Plus Jakarta Sans', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background: radial-gradient(circle at 15% 15%, rgba(99, 102, 241, 0.08) 0%, transparent 45%),
                radial-gradient(circle at 85% 85%, rgba(6, 182, 212, 0.06) 0%, transparent 45%),
                var(--bg-dark);
    background-attachment: fixed;
    color: var(--text-main);
    margin: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(11, 15, 25, 0.8);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.5);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
    color: #ffffff;
    font-weight: 700;
    margin-top: 0;
}

/* ===================== PAGE ENTRANCE & LAYOUT ===================== */
.wrapper {
    display: flex;
    min-height: 100vh;
}

.main-content {
    margin-left: var(--sidebar-width);
    padding: 2rem 2.5rem;
    width: calc(100% - var(--sidebar-width));
    max-width: 100%;
    animation: fadeSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.99);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #090d16 0%, #0e1526 100%);
    border-right: 1px solid var(--border-color);
    color: var(--text-muted);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    padding: 1.75rem 0 1.5rem;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    overflow-y: auto;
    backdrop-filter: blur(16px);
}

.sidebar .brand {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: #ffffff;
    padding: 0 1.5rem 1.75rem;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar .brand span {
    background: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

.sidebar .brand::before {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #6366f1;
    box-shadow: 0 0 12px #6366f1;
}

.sidebar .nav {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.25rem;
    padding: 0 0.75rem;
}

.sidebar .nav-link {
    color: var(--text-muted);
    padding: 0.75rem 1rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-radius: 10px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
}

.sidebar .nav-link i {
    width: 20px;
    text-align: center;
    font-size: 1.05rem;
    transition: color 0.2s, transform 0.2s;
    color: var(--text-dim);
}

.sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    transform: translateX(3px);
}

.sidebar .nav-link:hover i {
    color: var(--accent-cyan);
    transform: scale(1.1);
}

.sidebar .nav-link.active {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.2) 0%, rgba(99, 102, 241, 0.05) 100%);
    color: #ffffff;
    font-weight: 600;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.sidebar .nav-link.active i {
    color: var(--primary-blue);
    filter: drop-shadow(0 0 6px rgba(99, 102, 241, 0.6));
}

.sidebar .nav-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin: 0.75rem 0.5rem;
}

/* ===================== CARDS & PANELS ===================== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: var(--shadow-md);
    margin-bottom: 1.5rem;
    backdrop-filter: blur(16px);
    transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
    overflow: hidden;
}

.card-header {
    padding: 1rem 1.5rem;
    font-weight: 600;
    font-family: var(--font-heading);
    border-bottom: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.95rem;
    letter-spacing: -0.01em;
}

.card-body {
    padding: 1.5rem;
}

.card-hover {
    cursor: pointer;
}

.card-hover:hover {
    transform: translateY(-4px);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

/* ===================== KANBAN ===================== */
.kanban-grid {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    padding-bottom: 1.5rem;
    align-items: flex-start;
}

.kanban-col {
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    min-width: 280px;
    max-width: 320px;
    flex: 1;
    padding: 1rem;
    min-height: 450px;
    max-height: 80vh;
    overflow-y: auto;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(12px);
}

.kanban-col.drag-over {
    background: rgba(99, 102, 241, 0.12);
    border-color: var(--primary-blue);
    box-shadow: inset 0 0 20px rgba(99, 102, 241, 0.2);
}

.kanban-col h6 {
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-sub);
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ===================== TICKET CARDS ===================== */
.ticket-card {
    background: rgba(22, 30, 46, 0.95);
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary-blue);
    font-size: 0.875rem;
    cursor: grab;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    animation: cardPop 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
    position: relative;
}

.ticket-card:hover {
    box-shadow: 0 10px 25px -4px rgba(0, 0, 0, 0.5), 0 0 15px -3px rgba(99, 102, 241, 0.25);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.18);
}

.ticket-card.bug-card { border-left-color: var(--danger); }
.ticket-card.feature-card { border-left-color: var(--primary-blue); }
.ticket-card.validation-card { border-left-color: var(--warning); }

.ticket-card.dragging {
    opacity: 0.4;
    transform: scale(0.96) rotate(2deg);
    cursor: grabbing;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
}

.ticket-card:active {
    cursor: grabbing;
}

@keyframes cardPop {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ===================== LOADING SPINNER ===================== */
.spinner-overlay {
    position: fixed;
    inset: 0;
    background: rgba(11, 15, 25, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    animation: fadeIn 0.2s ease-out;
}

.spinner {
    width: 46px;
    height: 46px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary-blue);
    border-right-color: var(--accent-cyan);
    border-radius: 50%;
    animation: spin 0.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ===================== TOAST NOTIFICATIONS ===================== */
.toast-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
    max-width: 420px;
}

.toast {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    background: #1e293b;
    color: #ffffff;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5), 0 0 1px 1px rgba(255, 255, 255, 0.1);
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
    border-left: 4px solid var(--primary-blue);
    font-size: 0.9rem;
    min-width: 300px;
}

.toast.toast-visible {
    transform: translateX(0);
    opacity: 1;
}

.toast.toast-leaving {
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.25s ease-in, opacity 0.25s ease-in;
}

.toast-icon { font-size: 1.3rem; flex-shrink: 0; }
.toast-msg { flex: 1; line-height: 1.4; font-weight: 500; }
.toast-close {
    background: none; border: none; font-size: 1.2rem; cursor: pointer;
    color: var(--text-muted); padding: 0 0 0 0.5rem; transition: color 0.15s;
}
.toast-close:hover { color: #ffffff; }

.toast-success { border-left-color: var(--success); }
.toast-success .toast-icon { color: var(--success); }
.toast-error { border-left-color: var(--danger); }
.toast-error .toast-icon { color: var(--danger); }
.toast-warning { border-left-color: var(--warning); }
.toast-warning .toast-icon { color: var(--warning); }
.toast-info { border-left-color: var(--accent-cyan); }
.toast-info .toast-icon { color: var(--accent-cyan); }

/* ===================== MODALS ===================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(9, 13, 22, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: modalFadeIn 0.2s ease-out;
}

.modal-box {
    background: #111827;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.75rem;
    width: 90%;
    max-width: 620px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), var(--shadow-glow);
    animation: modalScaleIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    color: var(--text-main);
}

@keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalScaleIn {
    from { opacity: 0; transform: scale(0.92) translateY(12px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    font-size: 1.2rem;
    font-weight: 700;
    font-family: var(--font-heading);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.15s, transform 0.15s;
}
.modal-close:hover { color: var(--danger); transform: scale(1.2); }

.modal-body { padding: 0.25rem 0.25rem 0.5rem; max-height: 80vh; overflow-y: auto; }

/* ===================== EXPORT / WARNING BUTTONS ===================== */
.btn-warning { background: var(--warning); color: #1f1300; border-color: var(--warning); }
.btn-warning:hover { filter: brightness(1.08); }
.btn-block { display: block; width: 100%; margin-bottom: 0.35rem; text-align: left; }
.text-warning { color: var(--warning); }
.text-sm { font-size: 0.82rem; }
.dropdown { position: relative; display: inline-block; }

/* ===================== TOGGLE SWITCH ===================== */
.switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; cursor: pointer; inset: 0; background: #cbd5e1; transition: 0.2s; border-radius: 24px; }
.switch .slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; top: 3px; background: #fff; transition: 0.2s; border-radius: 50%; }
.switch input:checked + .slider { background: var(--primary-blue); }
.switch input:checked + .slider:before { transform: translateX(20px); }

/* ===================== TABLES ===================== */
table.table { width: 100%; border-collapse: collapse; margin: 0.5rem 0; }
table.table th, table.table td { border: 1px solid var(--border-color); padding: 0.5rem 0.7rem; text-align: left; font-size: 0.85rem; }
table.table th { background: var(--bg-input); color: var(--text-main); font-weight: 600; }
table.table tbody tr:nth-child(even) { background: rgba(255,255,255,0.02); }

/* ===================== BADGES & PILLS ===================== */
.status-badge {
    padding: 0.35rem 0.75rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* ===================== BUTTONS ===================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.875rem;
    font-family: var(--font-body);
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    line-height: 1.2;
}

.btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.15);
}
.btn-primary:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
    color: #ffffff;
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}
.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
    color: #ffffff;
}

.btn-danger {
    background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(244, 63, 94, 0.3);
}
.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(244, 63, 94, 0.45);
    color: #ffffff;
}

.btn-outline-primary {
    background: rgba(99, 102, 241, 0.08);
    color: #a5b4fc;
    border-color: rgba(99, 102, 241, 0.4);
}
.btn-outline-primary:hover {
    background: rgba(99, 102, 241, 0.2);
    color: #ffffff;
    border-color: var(--primary-blue);
    transform: translateY(-1px);
}

.btn-outline-danger {
    background: rgba(244, 63, 94, 0.08);
    color: #fda4af;
    border-color: rgba(244, 63, 94, 0.4);
}
.btn-outline-danger:hover {
    background: rgba(244, 63, 94, 0.2);
    color: #ffffff;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.775rem;
    border-radius: 8px;
}

.btn-dark {
    background: rgba(30, 41, 59, 0.8);
    color: #f1f5f9;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.btn-dark:hover {
    background: rgba(51, 65, 85, 0.9);
    color: #ffffff;
}

/* ===================== FORMS & INPUTS ===================== */
.form-group {
    margin-bottom: 1.25rem;
}

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

.form-control {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.9rem;
    font-family: var(--font-body);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg-input);
    color: var(--text-main);
}

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

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

select.form-control {
    background-color: var(--bg-input);
    color: var(--text-main);
}
select.form-control option {
    background-color: #111827;
    color: #ffffff;
}

/* ===================== ALERTS ===================== */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.alert-info {
    background: rgba(6, 182, 212, 0.12);
    border: 1px solid rgba(6, 182, 212, 0.3);
    color: #67e8f9;
}
.alert-success {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
}
.alert-danger {
    background: rgba(244, 63, 94, 0.12);
    border: 1px solid rgba(244, 63, 94, 0.3);
    color: #fca5a5;
}
.alert-warning {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #fde047;
}

/* Health Bar */
.health-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
}
.health-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ===================== LANDING PAGE ===================== */
.landing-hero {
    background: radial-gradient(circle at 50% 20%, rgba(99, 102, 241, 0.2) 0%, transparent 60%),
                radial-gradient(circle at 80% 80%, rgba(6, 182, 212, 0.15) 0%, transparent 50%),
                linear-gradient(180deg, #090d16 0%, #0f172a 100%);
    color: #ffffff;
    padding: 6rem 2rem 5rem;
    text-align: center;
    position: relative;
}

.landing-hero h1 {
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    margin-bottom: 1.25rem;
    line-height: 1.15;
    font-weight: 800;
}

.landing-hero h1 span {
    background: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.landing-hero p {
    font-size: 1.2rem;
    color: var(--text-sub);
    max-width: 720px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}

.landing-section {
    padding: 5rem 2rem;
    max-width: 1180px;
    margin: 0 auto;
}

.landing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.75rem;
}

.landing-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid var(--border-color);
    text-align: left;
    transition: all 0.3s ease;
    backdrop-filter: blur(16px);
}

.landing-card:hover {
    transform: translateY(-5px);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.landing-card .icon {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    display: inline-block;
}

/* UTILITY CLASSES */
.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.gap-2 { gap: 0.75rem; }
.flex-wrap { flex-wrap: wrap; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.75rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.me-2 { margin-right: 0.5rem; }
.ms-auto { margin-left: auto; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-sm { font-size: 0.825rem; }
.text-xs { font-size: 0.72rem; }
.gap-3 { gap: 1rem; }
.fw-bold { font-weight: 600; }
.w-full { width: 100%; }
.hidden { display: none !important; }

.pref-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.88rem;
    cursor: pointer;
}
.pref-row:last-of-type { border-bottom: none; }
.pref-row input[type="checkbox"] {
    width: 18px; height: 18px;
    accent-color: var(--primary-blue);
    cursor: pointer;
}

/* ===================== LIGHT THEME ===================== */
[data-theme="light"] {
    --bg-dark: #eef2f7;
    --bg-dark-surface: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fafc;
    --bg-input: #ffffff;
    --text-main: #0f172a;
    --text-sub: #334155;
    --text-muted: #64748b;
    --text-dim: #94a3b8;
    --border-color: rgba(15, 23, 42, 0.1);
    --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 8px 24px -4px rgba(15, 23, 42, 0.1);
    --shadow-lg: 0 16px 40px -8px rgba(15, 23, 42, 0.15);
}
[data-theme="light"] .sidebar { background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%); }
[data-theme="light"] ::-webkit-scrollbar-track { background: rgba(15, 23, 42, 0.06); }
[data-theme="light"] ::-webkit-scrollbar-thumb { background: rgba(15, 23, 42, 0.2); }
[data-theme="light"] .nav-link { color: var(--text-sub); }
[data-theme="light"] .nav-link i { color: var(--text-dim); }

/* Drag Ghost & Bulk Bar & Roadmap */
.drag-ghost { cursor: grabbing !important; pointer-events: none; z-index: 5000; }
.drag-ghost * { pointer-events: none; }

.bulk-action-bar {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(calc(-50% + var(--sidebar-width)/2));
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 0.85rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6), var(--shadow-glow);
    z-index: 1500;
    backdrop-filter: blur(16px);
    animation: slideUpBar 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes slideUpBar {
    from { opacity: 0; transform: translateX(calc(-50% + var(--sidebar-width)/2)) translateY(20px); }
    to { opacity: 1; transform: translateX(calc(-50% + var(--sidebar-width)/2)) translateY(0); }
}

.roadmap-timeline-wrap { position: relative; padding: 2rem 0 1rem; overflow-x: auto; }
.roadmap-timeline-axis { position: relative; height: 60px; margin-bottom: 1rem; border-bottom: 2px solid var(--border-color); }
.roadmap-timeline-axis .tick { position: absolute; top: 0; font-size: 0.75rem; color: var(--text-muted); transform: translateX(-50%); }
.roadmap-timeline-axis .tick::before { content: ''; position: absolute; top: 16px; left: 50%; width: 1px; height: 10px; background: var(--border-color); }
.roadmap-timeline-bars { position: relative; min-height: 90px; }
.roadmap-bar {
    position: absolute; height: 38px; border-radius: 8px; display: flex; align-items: center; justify-content: space-between;
    padding: 0 12px; font-size: 0.775rem; font-weight: 600; color: #fff; cursor: grab; transition: all 0.2s; min-width: 70px; z-index: 2;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.roadmap-bar:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.4), 0 0 15px rgba(99,102,241,0.4); z-index: 3; }
.roadmap-bar.dragging { opacity: 0.7; z-index: 10; cursor: grabbing; box-shadow: 0 12px 35px rgba(0,0,0,0.5); }
.roadmap-bar .rm-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; }
.roadmap-bar .rm-date-label { font-weight: 400; opacity: 0.85; font-size: 0.68rem; }
.roadmap-bar .rm-epic-count { background: rgba(255,255,255,0.2); border-radius: 10px; padding: 0 8px; font-size: 0.68rem; }
.roadmap-empty { text-align: center; padding: 4rem; color: var(--text-muted); }

.attachment-item { display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0; border-bottom: 1px solid var(--border-color); }
.attachment-item a { color: var(--accent-cyan); text-decoration: none; font-weight: 500; }
.attachment-item a:hover { text-decoration: underline; }

/* Responsive adjustments */
@media (max-width: 768px) {
    .sidebar { width: 68px; padding: 1.25rem 0; }
    .sidebar .brand { font-size: 0; padding: 0 0.5rem 1.25rem; justify-content: center; }
    .sidebar .brand::before { display: none; }
    .sidebar .brand::after { content: "SF"; font-size: 1.3rem; font-weight: 800; background: linear-gradient(135deg, #6366f1, #06b6d4); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
    .sidebar .nav-link span { display: none; }
    .sidebar .nav-link { justify-content: center; padding: 0.8rem; }
    .main-content { margin-left: 68px; width: calc(100% - 68px); padding: 1.25rem; }
    .kanban-grid { flex-wrap: wrap; }
    .kanban-col { min-width: 100%; max-width: 100%; }
}

/* ===================== Mobile top navigation (hamburger) ===================== */
.nav-toggle {
    display: none;
    background: transparent;
    border: 0;
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.3rem 0.5rem;
}
@media (max-width: 860px) {
    .navbar { padding: 0.9rem 1.1rem !important; flex-wrap: wrap; }
    .nav-toggle { display: block !important; }
    .navbar .nav-links {
        display: none !important;
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        right: 0 !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.9rem !important;
        background: #0b0f19 !important;
        border-bottom: 1px solid rgba(255,255,255,0.08) !important;
        box-shadow: 0 16px 30px rgba(0,0,0,0.55) !important;
        padding: 1rem 1.25rem !important;
    }
    .navbar .nav-links.open { display: flex !important; }
    .navbar .nav-links a { font-size: 1rem !important; }
}
