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

:root {
    --tiffany: #0abab5;
    --tiffany-light: #14e8e2;
    --tiffany-dark: #089b97;
    --tiffany-deep: #067a77;
    --neon-cyan: #00fff7;
    --neon-mint: #00ffb3;
    --neon-pink: #ff2d95;
    --neon-purple: #b94dff;
    --primary: var(--tiffany);
    --primary-dark: var(--tiffany-dark);
    --danger: #ff2d55;
    --success: #00e676;
    --warning: #ffab00;
    --info: var(--neon-cyan);
    --dark-bg: #060a12;
    --dark-surface: #0c1220;
    --dark-card: #111c2e;
    --dark-card-hover: #162236;
    --dark-border: #0abab533;
    --dark-border-light: #0abab544;
    --text-primary: #e0f0f0;
    --text-secondary: #7fb8b5;
    --text-muted: #4a8a87;
    --sidebar-width: 250px;
    --radius: 8px;
    --glow-xs: 0 0 6px rgba(0,255,247,0.25);
    --glow-sm: 0 0 10px rgba(0,255,247,0.35);
    --glow-md: 0 0 20px rgba(0,255,247,0.35), 0 0 40px rgba(0,255,247,0.15);
    --glow-lg: 0 0 30px rgba(0,255,247,0.3), 0 0 60px rgba(0,255,247,0.15);
    --glow-neon: 0 0 8px rgba(0,255,247,0.6), 0 0 20px rgba(0,255,247,0.3);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    background: var(--dark-bg);
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(10,186,181,0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(0,255,247,0.03) 0%, transparent 40%);
}

a { color: var(--neon-cyan); text-decoration: none; transition: all 0.2s; text-shadow: 0 0 6px rgba(0,255,247,0.2); }
a:hover { color: #fff; text-shadow: var(--glow-neon); text-decoration: none; }

::selection { background: rgba(0,255,247,0.3); color: #fff; }

/* === Scrollbar === */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--dark-bg); }
::-webkit-scrollbar-thumb { background: var(--tiffany-dark); border-radius: 3px; box-shadow: 0 0 6px rgba(0,255,247,0.3); }
::-webkit-scrollbar-thumb:hover { background: var(--tiffany); box-shadow: 0 0 10px rgba(0,255,247,0.5); }

/* === Layout === */
body.has-sidebar { display: flex; min-height: 100vh; }
body.no-sidebar .main-content { max-width: 100%; }
.main-content { flex: 1; padding: 28px; min-width: 0; }

/* === Sidebar === */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #080e1a 0%, #060a12 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    border-right: 1px solid var(--dark-border);
    box-shadow: 2px 0 30px rgba(0,255,247,0.06), 1px 0 0 rgba(0,255,247,0.15);
}

body.has-sidebar .main-content { margin-left: var(--sidebar-width); }

.sidebar-header {
    padding: 20px 22px;
    border-bottom: 1px solid var(--dark-border);
    background: rgba(0,255,247,0.02);
}

.sidebar-brand {
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-logo {
    height: 36px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(0,255,247,0.5));
    transition: filter 0.2s, transform 0.2s;
}

.sidebar-brand:hover .sidebar-logo {
    filter: drop-shadow(0 0 14px rgba(0,255,247,0.8)) drop-shadow(0 0 30px rgba(0,255,247,0.4));
    transform: scale(1.05);
}

.sidebar-nav { flex: 1; padding: 16px 0; overflow-y: auto; }

.sidebar-section {
    padding: 20px 22px 8px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--neon-cyan);
    font-weight: 600;
    text-shadow: 0 0 10px rgba(0,255,247,0.4);
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 22px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.25s;
    border-left: 3px solid transparent;
    font-size: 14px;
}

.sidebar-link:hover {
    background: rgba(0,255,247,0.06);
    color: var(--neon-cyan);
    border-left-color: var(--tiffany);
    text-shadow: 0 0 8px rgba(0,255,247,0.3);
    text-decoration: none;
}

.sidebar-link.active {
    background: linear-gradient(90deg, rgba(0,255,247,0.1) 0%, transparent 100%);
    color: var(--neon-cyan);
    border-left-color: var(--neon-cyan);
    text-shadow: 0 0 12px rgba(0,255,247,0.5);
    box-shadow: inset 0 0 20px rgba(0,255,247,0.03);
}

.sidebar-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    opacity: 0.6;
    transition: all 0.25s;
    filter: drop-shadow(0 0 2px rgba(0,255,247,0.2));
}

.sidebar-link:hover .sidebar-icon {
    opacity: 1;
    filter: drop-shadow(0 0 6px rgba(0,255,247,0.6));
}

.sidebar-link.active .sidebar-icon {
    opacity: 1;
    filter: drop-shadow(0 0 8px rgba(0,255,247,0.7));
}

.sidebar-footer {
    padding: 16px 22px;
    border-top: 1px solid var(--dark-border);
    background: rgba(0,255,247,0.02);
}

.sidebar-user { display: flex; flex-direction: column; margin-bottom: 10px; }
.sidebar-user span { color: var(--text-primary); font-weight: 500; }
.sidebar-user small { color: var(--neon-cyan); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; text-shadow: 0 0 8px rgba(0,255,247,0.3); }

.sidebar-logout { font-size: 13px; color: var(--text-muted) !important; margin-top: 10px; }
.sidebar-logout:hover { color: var(--neon-pink) !important; text-shadow: 0 0 10px rgba(255,45,149,0.5) !important; }

/* === Auth Pages === */
.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background:
        radial-gradient(ellipse at 50% 30%, rgba(0,255,247,0.07) 0%, transparent 60%),
        radial-gradient(ellipse at 20% 80%, rgba(10,186,181,0.05) 0%, transparent 50%);
}

.auth-card {
    background: var(--dark-card);
    border-radius: 12px;
    box-shadow: var(--glow-lg), 0 8px 40px rgba(0,0,0,0.5);
    padding: 44px;
    width: 100%;
    max-width: 440px;
    border: 1px solid var(--dark-border);
}

.auth-title {
    text-align: center;
    margin-bottom: 8px;
}
.auth-logo {
    height: auto;
    width: 120px;
    max-width: 50%;
    object-fit: contain;
    filter: drop-shadow(0 0 12px rgba(0,255,247,0.5));
}

.auth-card h2 { font-size: 15px; color: var(--text-secondary); margin-bottom: 28px; font-weight: 400; }

/* === Forms === */
.form-group { margin-bottom: 18px; }
.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 13px;
    color: var(--text-secondary);
    letter-spacing: 0.03em;
}
.form-value {
    padding: 8px 10px;
    font-size: 14px;
    color: var(--text-primary);
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="color"],
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--dark-border);
    border-radius: var(--radius);
    font-size: 14px;
    transition: all 0.25s;
    background: var(--dark-surface);
    color: var(--text-primary);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--neon-cyan);
    box-shadow: 0 0 0 3px rgba(0,255,247,0.1), var(--glow-sm);
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); }
.form-group textarea { resize: vertical; min-height: 80px; }
.form-group input[type="color"] { padding: 4px; height: 40px; cursor: pointer; border-radius: var(--radius); }

/* === ALL selects globally === */
select {
    width: 100%;
    padding: 10px 40px 10px 14px;
    border: 1px solid var(--dark-border);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: inherit;
    transition: all 0.25s;
    background-color: var(--dark-surface);
    color: var(--text-primary);
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%2300fff7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px 8px;
}

select:hover {
    border-color: var(--tiffany);
    box-shadow: var(--glow-xs);
}

select:focus {
    outline: none;
    border-color: var(--neon-cyan);
    box-shadow: 0 0 0 3px rgba(0,255,247,0.1), var(--glow-sm);
}

select option { background: var(--dark-card); color: var(--text-primary); padding: 10px; }
select option:checked { background: rgba(0,255,247,0.2); color: var(--neon-cyan); }
select[multiple] { padding-right: 14px; min-height: 120px; background-image: none; }
select[multiple] option { padding: 8px 12px; border-radius: 4px; margin: 2px 0; }

.select-wrap { position: relative; width: 100%; }
.filters-bar select { padding: 7px 34px 7px 12px; font-size: 13px; }

/* === Color Picker Large === */
.color-picker-lg {
    width: 52px !important; height: 38px !important; padding: 3px !important;
    border: 2px solid var(--dark-border) !important;
    border-radius: var(--radius) !important;
    cursor: pointer !important;
    background: var(--dark-surface) !important;
    transition: all 0.25s; flex-shrink: 0;
}
.color-picker-lg:hover { border-color: var(--neon-cyan) !important; box-shadow: var(--glow-sm); }
.color-picker-lg:focus { border-color: var(--neon-cyan) !important; box-shadow: 0 0 0 3px rgba(0,255,247,0.15), var(--glow-md); outline: none; }

/* === Status Row Inputs === */
.status-input-name {
    width: 160px; padding: 6px 10px;
    border: 1px solid var(--dark-border);
    border-radius: var(--radius);
    background: var(--dark-surface);
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.25s;
}
.status-input-name:focus { outline: none; border-color: var(--neon-cyan); box-shadow: 0 0 0 3px rgba(0,255,247,0.1), var(--glow-sm); }

.checkbox-group label { display: flex; align-items: center; gap: 8px; font-weight: 400; cursor: pointer; color: var(--text-primary); }
.form-row { display: flex; gap: 16px; }
.form-row .form-group { flex: 1; }
.form-inline { display: flex; gap: 8px; align-items: flex-end; }
.form-inline .form-group { margin-bottom: 0; }

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 18px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s;
    text-decoration: none;
    line-height: 1.4;
    letter-spacing: 0.03em;
}

.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-sm { padding: 5px 12px; font-size: 13px; }
.btn-xs { padding: 3px 8px; font-size: 11px; }
.btn-block { display: flex; width: 100%; text-align: center; justify-content: center; }

.btn-primary {
    background: linear-gradient(135deg, var(--tiffany-light) 0%, var(--tiffany-dark) 100%);
    color: #fff;
    box-shadow: var(--glow-sm);
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.btn-primary:hover {
    background: linear-gradient(135deg, var(--neon-cyan) 0%, var(--tiffany) 100%);
    box-shadow: var(--glow-md);
    color: #fff;
}

.btn-danger {
    background: linear-gradient(135deg, #ff2d55, #d4234a);
    color: #fff;
    box-shadow: 0 0 10px rgba(255,45,85,0.35);
}
.btn-danger:hover { box-shadow: 0 0 20px rgba(255,45,85,0.5), 0 0 40px rgba(255,45,85,0.2); color: #fff; }

.btn-success {
    background: linear-gradient(135deg, #00e676, #00c853);
    color: #0a0e17; font-weight: 600;
    box-shadow: 0 0 10px rgba(0,230,118,0.35);
}
.btn-success:hover { box-shadow: 0 0 20px rgba(0,230,118,0.5), 0 0 40px rgba(0,230,118,0.2); color: #0a0e17; }

.btn-warning {
    background: linear-gradient(135deg, #ffab00, #e69900);
    color: #0a0e17; font-weight: 600;
    box-shadow: 0 0 10px rgba(255,171,0,0.35);
}
.btn-warning:hover { box-shadow: 0 0 20px rgba(255,171,0,0.5), 0 0 40px rgba(255,171,0,0.2); color: #0a0e17; }

.btn-secondary {
    background: var(--dark-card);
    color: var(--text-secondary);
    border: 1px solid var(--dark-border);
}
.btn-secondary:hover { background: var(--dark-card-hover); color: var(--neon-cyan); border-color: var(--tiffany); box-shadow: var(--glow-xs); }

.btn-outline { background: transparent; color: var(--neon-cyan); border: 1px solid var(--neon-cyan); box-shadow: var(--glow-xs); }
.btn-outline:hover { background: rgba(0,255,247,0.1); color: #fff; box-shadow: var(--glow-md); }

.btn-group { display: flex; gap: 8px; }

/* === Alerts === */
.alert { padding: 14px 18px; border-radius: var(--radius); margin-bottom: 18px; font-size: 14px; border: 1px solid; }
.alert-danger { background: rgba(255,45,85,0.08); color: #ff6b8a; border-color: rgba(255,45,85,0.3); box-shadow: 0 0 15px rgba(255,45,85,0.1); }
.alert-success { background: rgba(0,230,118,0.08); color: #4dff9f; border-color: rgba(0,230,118,0.3); box-shadow: 0 0 15px rgba(0,230,118,0.1); }
.alert-info { background: rgba(0,255,247,0.06); color: var(--neon-cyan); border-color: rgba(0,255,247,0.25); box-shadow: 0 0 15px rgba(0,255,247,0.08); }
.alert-warning { background: rgba(255,171,0,0.08); color: #ffc44d; border-color: rgba(255,171,0,0.3); box-shadow: 0 0 15px rgba(255,171,0,0.1); }

/* === Tables === */
.table-container { overflow-x: auto; }
.user-name-cell { display: inline-flex; align-items: center; gap: 8px; }

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--dark-card);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--dark-border);
    box-shadow: 0 0 20px rgba(0,255,247,0.03);
}

th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid rgba(0,255,247,0.08); }

th {
    background: rgba(0,255,247,0.05);
    font-weight: 600;
    font-size: 12px;
    color: var(--neon-cyan);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-shadow: 0 0 8px rgba(0,255,247,0.3);
}

tr:hover { background: rgba(0,255,247,0.03); }
tr:last-child td { border-bottom: none; }

/* Task title in table */
.table-container td a[href^="/tasks/"] { font-size: 16px !important; font-weight: 600; }

/* === Cards === */
.card {
    background: var(--dark-card);
    border-radius: var(--radius);
    border: 1px solid var(--dark-border);
    box-shadow: 0 2px 12px rgba(0,0,0,0.2), 0 0 20px rgba(0,255,247,0.02);
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--dark-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0,255,247,0.02);
}

.card-header h2 { font-size: 16px; margin: 0; color: var(--text-primary); }
.card-body { padding: 20px; }

/* === Page Header === */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.page-header h1 {
    font-size: 24px;
    color: var(--neon-cyan);
    text-shadow: 0 0 15px rgba(0,255,247,0.4), 0 0 40px rgba(0,255,247,0.15);
    letter-spacing: 0.5px;
}

.page-header__actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Search box */
.search-box {
    position: relative;
    display: flex;
    align-items: center;
}
.search-box__icon {
    position: absolute;
    left: 10px;
    color: var(--text-muted);
    pointer-events: none;
}
.search-box__input {
    padding: 8px 12px 8px 34px;
    background: var(--dark-surface);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 13px;
    width: 220px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.search-box__input:focus {
    outline: none;
    border-color: var(--neon-cyan);
    box-shadow: 0 0 0 3px rgba(0,255,247,0.1);
}
.search-box__input::placeholder { color: var(--text-muted); }

/* Empty state */
.empty-state { text-align: center; padding: 32px 16px; }

/* === Badges === */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}
.badge--inline {
    padding: 2px 8px;
    font-size: 11px;
    width: auto;
    max-width: fit-content;
    line-height: 1.6;
}

.badge-role {
    background: rgba(0,255,247,0.1);
    color: var(--neon-cyan);
    border: 1px solid rgba(0,255,247,0.2);
    text-shadow: 0 0 6px rgba(0,255,247,0.3);
    transition: all 0.2s;
    cursor: default;
}
.badge-role:hover {
    background: rgba(0,255,247,0.25);
    border-color: var(--neon-cyan);
    box-shadow: var(--glow-sm);
    color: #fff;
}

.badge-active {
    background: rgba(0,230,118,0.1);
    color: #4dff9f;
    border: 1px solid rgba(0,230,118,0.25);
    box-shadow: 0 0 8px rgba(0,230,118,0.15);
}
.badge-inactive {
    background: rgba(255,45,85,0.1);
    color: #ff6b8a;
    border: 1px solid rgba(255,45,85,0.25);
    box-shadow: 0 0 8px rgba(255,45,85,0.15);
}
.badge-online {
    background: rgba(0,230,118,0.15);
    color: #4dff9f;
    border: 1px solid rgba(0,230,118,0.3);
    box-shadow: 0 0 10px rgba(0,230,118,0.25);
}

.badge-priority-improvement {
    background: rgba(52,211,153,0.1);
    color: #34d399;
    border: 1px solid rgba(52,211,153,0.25);
    box-shadow: 0 0 6px rgba(52,211,153,0.1);
}
.badge-priority-low {
    background: rgba(0,255,247,0.08);
    color: var(--neon-cyan);
    border: 1px solid rgba(0,255,247,0.2);
    box-shadow: 0 0 6px rgba(0,255,247,0.1);
}
.badge-priority-medium {
    background: rgba(255,171,0,0.1);
    color: #ffc44d;
    border: 1px solid rgba(255,171,0,0.25);
    box-shadow: 0 0 6px rgba(255,171,0,0.15);
}
.badge-priority-high {
    background: rgba(255,165,0,0.12);
    color: #ff9500;
    border: 1px solid rgba(255,165,0,0.3);
    box-shadow: 0 0 8px rgba(255,165,0,0.15);
}
.badge-priority-critical {
    background: rgba(255,45,85,0.12);
    color: #ff4d7a;
    border: 1px solid rgba(255,45,85,0.3);
    animation: pulse-critical 2s ease-in-out infinite;
}

@keyframes pulse-critical {
    0%, 100% { box-shadow: 0 0 6px rgba(255,45,85,0.2); }
    50% { box-shadow: 0 0 16px rgba(255,45,85,0.5), 0 0 30px rgba(255,45,85,0.2); }
}

.status-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
    box-shadow: 0 0 8px rgba(0,0,0,0.2);
}

/* === Kanban === */
.kanban-board {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 16px;
    min-height: 400px;
}

.kanban-column {
    min-width: 280px;
    max-width: 320px;
    flex: 1;
    background: var(--dark-surface);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--dark-border);
    box-shadow: 0 0 15px rgba(0,255,247,0.02);
}

.kanban-column-header {
    padding: 14px 16px;
    font-weight: 600;
    font-size: 14px;
    border-bottom: 2px solid var(--tiffany);
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-primary);
    background: rgba(0,255,247,0.03);
}

.kanban-column-header .count {
    background: rgba(0,255,247,0.12);
    color: var(--neon-cyan);
    font-size: 12px;
    padding: 2px 10px;
    border-radius: 10px;
    font-weight: 600;
    text-shadow: 0 0 6px rgba(0,255,247,0.3);
}

.kanban-cards { padding: 8px; flex: 1; min-height: 100px; }

.kanban-card {
    background: var(--dark-card);
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 8px;
    cursor: grab;
    border: 1px solid var(--dark-border);
    transition: all 0.25s;
}

.kanban-card:hover {
    border-color: var(--tiffany);
    box-shadow: var(--glow-sm), 0 4px 12px rgba(0,0,0,0.2);
    transform: translateY(-2px);
}

.kanban-card.dragging { opacity: 0.5; box-shadow: var(--glow-md); }

.kanban-card-title { font-weight: 600; margin-bottom: 10px; font-size: 16px; line-height: 1.4; }
.kanban-card-title a { color: var(--text-primary); text-shadow: none; }
.kanban-card-title a:hover { color: var(--neon-cyan); text-shadow: 0 0 10px rgba(0,255,247,0.4); }

.kanban-card-meta { display: flex; flex-direction: column; gap: 8px; font-size: 12px; color: var(--text-muted); }
.kanban-card-assignees { display: flex; flex-direction: column; gap: 4px; margin-bottom: 2px; }
.kanban-card-assignees__row { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-secondary); }
.kanban-card-assignees__label { color: var(--text-muted); font-size: 10px; text-transform: uppercase; letter-spacing: 0.3px; }
.kanban-card-priority { }

/* === Pin button === */
.pin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 4px;
    padding: 0;
    transition: all 0.2s;
    opacity: 0.4;
    vertical-align: middle;
    flex-shrink: 0;
}
.pin-btn:hover { opacity: 1; color: var(--neon-cyan); background: rgba(0,255,247,0.08); }
.pin-btn.active {
    opacity: 1;
    color: var(--neon-cyan);
    filter: drop-shadow(0 0 4px rgba(0,255,247,0.5));
}

/* Pinned row highlight */
.task-row--pinned {
    background: rgba(0,255,247,0.04);
    border-left: 3px solid var(--neon-cyan);
}
.task-row--pinned td:first-child { padding-left: 13px; }

/* Pinned kanban card highlight */
.kanban-card--pinned {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 8px rgba(0,255,247,0.15);
    background: linear-gradient(135deg, rgba(0,255,247,0.04), var(--dark-card));
}

/* Kanban card title with pin */
.kanban-card-title { display: flex; align-items: flex-start; gap: 4px; }
.kanban-card-title a { flex: 1; min-width: 0; }
.kanban-card-btns { display: flex; flex-direction: column; gap: 2px; flex-shrink: 0; }

/* Kanban toggle button */
.kanban-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 4px;
    padding: 0;
    transition: all 0.2s;
    opacity: 0.4;
    flex-shrink: 0;
}
.kanban-toggle-btn:hover { opacity: 1; color: var(--neon-cyan); background: rgba(0,255,247,0.08); }
.kanban-toggle-btn.active { opacity: 0.8; transform: rotate(180deg); }

/* Kanban card collapsible details */
.kanban-card-details {
    overflow: hidden;
    transition: max-height 0.25s ease, opacity 0.25s ease;
    max-height: 500px;
    opacity: 1;
}
.kanban-card-details.hidden {
    max-height: 0;
    opacity: 0;
    margin: 0;
    padding: 0;
}

/* Kanban card footer — tags left, priority right */
.kanban-card-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px;
    margin-top: 8px;
}
.kanban-card-footer__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    flex: 1;
    min-width: 0;
}
.kanban-card-footer > .badge {
    flex-shrink: 0;
}

/* === Searchable Select === */
.searchable-select { position: relative; }
.ss-wrapper { position: relative; }
.ss-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 6px 8px;
    min-height: 42px;
    background: var(--dark-surface);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius);
    cursor: text;
    align-items: center;
    transition: border-color 0.2s;
}
.ss-chips:focus-within {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 0 3px rgba(0,255,247,0.1);
}
.ss-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px 2px 10px;
    background: rgba(0,255,247,0.1);
    border: 1px solid rgba(0,255,247,0.2);
    border-radius: 14px;
    font-size: 12px;
    color: var(--text-primary);
    white-space: nowrap;
}
.ss-chip-label { max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
.ss-chip-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    padding: 0;
    border-radius: 50%;
    transition: all 0.15s;
}
.ss-chip-remove:hover { background: rgba(255,45,85,0.2); color: var(--danger); }
.ss-search {
    flex: 1;
    min-width: 60px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
    padding: 2px 4px;
}
.ss-search::placeholder { color: var(--text-muted); }
.ss-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--dark-card);
    border: 1px solid var(--dark-border-light);
    border-radius: var(--radius);
    box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 0 1px rgba(0,255,247,0.06);
    z-index: 50;
    max-height: 220px;
    overflow-y: auto;
}
.ss-dropdown--open { display: block; animation: dropdownFadeIn 0.15s ease; }
.ss-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    transition: background 0.15s;
}
.ss-option:hover { background: rgba(0,255,247,0.06); color: var(--text-primary); }
.ss-option--selected { color: var(--neon-cyan); font-weight: 500; }
.ss-option-check {
    width: 16px;
    height: 16px;
    accent-color: var(--tiffany);
    cursor: pointer;
    flex-shrink: 0;
}
.ss-option-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ss-empty { padding: 12px; text-align: center; color: var(--text-muted); font-size: 13px; }

/* Compact variant (sidebar) */
.searchable-select--compact .ss-chips { min-height: 34px; padding: 4px 6px; }
.searchable-select--compact .ss-chip { font-size: 11px; padding: 1px 4px 1px 8px; }
.searchable-select--compact .ss-search { font-size: 12px; }
.searchable-select--compact .ss-option { padding: 6px 10px; font-size: 12px; }

/* === Editor images === */
.ql-editor img { max-width: 100%; height: auto; border-radius: 4px; margin: 8px 0; cursor: pointer; transition: outline 0.15s; }
.ql-editor img:hover { outline: 2px solid var(--neon-cyan); outline-offset: 2px; }
.ql-editor img.img-dragging-source { opacity: 0.6; }
.task-description-content img { max-width: 100%; height: auto; border-radius: 4px; margin: 8px 0; }
.comment-item__body img { max-width: 100%; height: auto; border-radius: 4px; margin: 4px 0; }

/* Image resize overlay */
.img-resize-overlay {
    position: absolute;
    border: 2px solid var(--neon-cyan);
    box-shadow: 0 0 12px rgba(0,255,247,0.3);
    pointer-events: none;
    z-index: 10;
    border-radius: 4px;
}

.img-resize-handle {
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--neon-cyan);
    border: 2px solid var(--dark-card);
    border-radius: 2px;
    pointer-events: all;
    cursor: nwse-resize;
    z-index: 11;
    box-shadow: 0 0 6px rgba(0,255,247,0.5);
}
.img-resize-handle--nw { top: -6px; left: -6px; cursor: nwse-resize; }
.img-resize-handle--ne { top: -6px; right: -6px; cursor: nesw-resize; }
.img-resize-handle--sw { bottom: -6px; left: -6px; cursor: nesw-resize; }
.img-resize-handle--se { bottom: -6px; right: -6px; cursor: nwse-resize; }

.img-resize-size {
    position: absolute;
    bottom: -28px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark-card);
    color: var(--text-secondary);
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid var(--dark-border);
    white-space: nowrap;
    pointer-events: none;
}

.img-resize-toolbar {
    position: absolute;
    top: -38px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 2px;
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: 6px;
    padding: 3px;
    pointer-events: all;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
    white-space: nowrap;
}

.img-resize-btn {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    padding: 4px 10px;
    font-size: 12px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.15s;
    font-family: inherit;
}
.img-resize-btn:hover {
    background: rgba(0,255,247,0.1);
    color: var(--neon-cyan);
}
.img-resize-btn--delete {
    color: var(--text-muted);
    font-size: 14px;
    padding: 4px 8px;
}
.img-resize-btn--delete:hover {
    background: rgba(255,45,85,0.15);
    color: var(--danger);
}

/* Light theme image resize */
[data-theme="light"] .img-resize-overlay { border-color: var(--tiffany); box-shadow: 0 0 8px rgba(13,148,136,0.3); }
[data-theme="light"] .img-resize-handle { background: var(--tiffany); border-color: #fff; box-shadow: 0 0 4px rgba(13,148,136,0.4); }
[data-theme="light"] .img-resize-toolbar { background: #fff; border-color: #d1d5db; box-shadow: 0 4px 12px rgba(0,0,0,0.12); }
[data-theme="light"] .img-resize-size { background: #fff; border-color: #d1d5db; }
[data-theme="light"] .img-resize-btn:hover { background: rgba(13,148,136,0.08); color: var(--tiffany); }
[data-theme="light"] .ql-editor img:hover { outline-color: var(--tiffany); }

/* === Filters Bar === */
.filters-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: flex-end;
    padding: 16px;
    background: var(--dark-card);
    border-radius: var(--radius);
    border: 1px solid var(--dark-border);
    box-shadow: 0 0 15px rgba(0,255,247,0.02);
}

.filters-bar .form-group { margin-bottom: 0; min-width: 150px; }

/* === View Toggle === */
.view-toggle {
    display: flex;
    position: relative;
    border: 1px solid var(--dark-border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--dark-card);
}

.view-toggle .view-toggle__slider {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(135deg, var(--tiffany) 0%, var(--tiffany-dark) 100%);
    box-shadow: var(--glow-sm);
    border-radius: var(--radius);
    transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1), width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
}

.view-toggle button,
.view-toggle__btn {
    padding: 7px 16px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    transition: color 0.3s;
    position: relative;
    z-index: 1;
    text-decoration: none;
    white-space: nowrap;
}

.view-toggle button:hover,
.view-toggle__btn:hover { color: var(--neon-cyan); }

.view-toggle button.active,
.view-toggle__btn.active {
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.view-content {
    animation: viewFadeIn 0.3s ease;
}
.view-content.view-hiding {
    animation: viewFadeOut 0.2s ease forwards;
}
@keyframes viewFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes viewFadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-10px); }
}

/* === Task Detail === */
.task-detail { max-width: 900px; }
.task-detail .task-title {
    font-size: 24px;
    margin-bottom: 18px;
    color: var(--text-primary);
}

.task-description {
    background: var(--dark-surface);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius);
    padding: 18px;
    margin-bottom: 20px;
    min-height: 60px;
    color: var(--text-primary);
}
.task-description img { max-width: 100%; }

.task-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.task-meta-item label {
    display: block;
    font-size: 11px;
    color: var(--neon-cyan);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    text-shadow: 0 0 8px rgba(0,255,247,0.3);
}

.task-history { margin-top: 28px; }
.task-history h3 {
    font-size: 16px;
    margin-bottom: 14px;
    color: var(--neon-cyan);
    text-shadow: 0 0 8px rgba(0,255,247,0.2);
}

.history-item {
    padding: 10px 0;
    border-bottom: 1px solid rgba(0,255,247,0.08);
    font-size: 13px;
    color: var(--text-secondary);
}

/* === Multi-select checkboxes === */
.checkbox-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--dark-border);
    border-radius: var(--radius);
    padding: 8px;
    background: var(--dark-surface);
}

.checkbox-list label {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 4px;
    font-weight: 400;
    cursor: pointer;
    color: var(--text-primary);
    border-radius: 4px;
    transition: all 0.2s;
}
.checkbox-list label:hover { background: rgba(0,255,247,0.06); color: var(--neon-cyan); }

/* === Modal === */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(6px);
    z-index: 200;
    align-items: center;
    justify-content: center;
}
.modal-overlay.active { display: flex; }

.modal {
    background: var(--dark-card);
    border-radius: 12px;
    box-shadow: var(--glow-lg), 0 8px 40px rgba(0,0,0,0.5);
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid var(--dark-border);
}

.modal-header { padding: 18px 22px; border-bottom: 1px solid var(--dark-border); display: flex; align-items: center; justify-content: space-between; }
.modal-header h3 { margin: 0; font-size: 16px; color: var(--text-primary); }
.modal-close { background: none; border: none; font-size: 22px; cursor: pointer; color: var(--text-muted); padding: 0; line-height: 1; transition: all 0.2s; }
.modal-close:hover { color: var(--neon-pink); text-shadow: 0 0 10px rgba(255,45,149,0.5); }
.modal-body { padding: 22px; }
.modal-footer { padding: 14px 22px; border-top: 1px solid var(--dark-border); display: flex; gap: 8px; justify-content: flex-end; }

/* === Drag reorder handle === */
.drag-handle { cursor: grab; color: var(--text-muted); padding: 4px 8px; user-select: none; transition: all 0.2s; touch-action: none; }
.drag-handle:hover { color: var(--neon-cyan); text-shadow: 0 0 8px rgba(0,255,247,0.5); }
.drag-handle:active { cursor: grabbing; }
.drag-chosen { opacity: 0.8; background: var(--dark-card-hover); }
.drag-active { opacity: 0.5; }

/* === Status row in settings === */
.status-row { border-bottom-color: rgba(0,255,247,0.1) !important; }
.status-row input[type="text"] {
    background: var(--dark-surface);
    color: var(--text-primary);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius);
}
.status-row input[type="text"]:focus { border-color: var(--neon-cyan); outline: none; box-shadow: var(--glow-xs); }

/* === Utility === */
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-small { font-size: 13px; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.hidden { display: none !important; }

/* === Responsive === */

/* Sidebar backdrop */
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(3px);
    z-index: 99;
    opacity: 0;
    transition: opacity 0.3s;
}
.sidebar-backdrop.active { display: block; opacity: 1; }

@media (min-width: 769px) {
    .mobile-menu-toggle { display: none; }
    .sidebar-backdrop { display: none !important; }
}

/* === Statistics Page === */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.stat-card:hover {
    border-color: rgba(0,255,247,0.3);
    box-shadow: 0 0 16px rgba(0,255,247,0.08);
}
.stat-card__icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.stat-card__icon--cyan { background: rgba(0,255,247,0.1); color: var(--neon-cyan); }
.stat-card__icon--green { background: rgba(0,230,118,0.1); color: #4dff9f; }
.stat-card__icon--purple { background: rgba(139,92,246,0.1); color: #a78bfa; }
.stat-card__icon--orange { background: rgba(255,171,0,0.1); color: #ffc44d; }

.stat-card__number {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}
.stat-card__label {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

.stats-section { margin-bottom: 24px; }

.stats-row {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.stat-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.stat-row:last-child { border-bottom: none; }

.stat-row__label {
    min-width: 140px;
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.stat-row__label--user { min-width: 180px; }

.stat-row__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.stat-row__bar-wrap {
    flex: 1;
    height: 8px;
    background: rgba(255,255,255,0.04);
    border-radius: 4px;
    overflow: hidden;
    min-width: 60px;
}
.stat-row__bar {
    height: 100%;
    border-radius: 4px;
    background: var(--neon-cyan);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 8px rgba(0,255,247,0.2);
    min-width: 2px;
}

.stat-row__pct {
    min-width: 42px;
    font-size: 12px;
    font-weight: 600;
    color: var(--neon-cyan);
}
.stat-row__value {
    min-width: 36px;
    text-align: right;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

/* Stats chart (bar chart) */
.stats-chart {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 160px;
    padding-top: 10px;
}
.stats-chart__col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}
.stats-chart__bar-wrap {
    flex: 1;
    width: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.stats-chart__bar {
    width: 70%;
    max-width: 32px;
    min-height: 2px;
    background: linear-gradient(180deg, var(--neon-cyan), var(--tiffany-dark));
    border-radius: 4px 4px 0 0;
    box-shadow: 0 0 8px rgba(0,255,247,0.15);
    transition: height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.stats-chart__label {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 6px;
    white-space: nowrap;
}
.stats-chart__value {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* Clickable stat rows */
.stat-row--clickable {
    cursor: pointer;
    border-radius: 8px;
    padding: 10px 12px;
    margin: 0 -12px;
    transition: background 0.2s;
}
.stat-row--clickable:hover {
    background: rgba(255,255,255,0.04);
}
.stat-row--clickable.active {
    background: rgba(0,255,247,0.06);
    border-color: rgba(0,255,247,0.15);
}

/* Stats detail panel */
.stats-detail {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: 12px;
    padding: 20px;
    margin-top: 16px;
    animation: viewFadeIn 0.3s ease;
}
.stats-detail__header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.stats-detail__header h3,
.stats-detail__header h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}
.stats-detail__total {
    display: flex;
    justify-content: flex-end;
    padding-top: 10px;
    margin-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.06);
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    gap: 12px;
}

/* Stats filters row */
.stats-filters-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.stats-filters-row input[type="date"],
.stats-filters-row select {
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid var(--dark-border);
    background: var(--dark-card);
    color: var(--text-primary);
    font-size: 13px;
    height: 34px;
    color-scheme: dark;
}
.stats-filters-row .select-wrap select {
    height: 34px;
    padding: 6px 10px;
}
.stats-filters-row .btn {
    height: 34px;
    padding: 0 14px;
    font-size: 13px;
}
.stats-filters-row label {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
}
.stats-filters-row--inline {
    align-items: flex-end;
}
.stats-filters-row--inline .form-group {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 0;
}
.stats-header-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}
.stats-header-filters label {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
}
.stats-header-filters input[type="date"] {
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid var(--dark-border);
    background: var(--dark-card);
    color: var(--text-primary);
    font-size: 12px;
    height: 30px;
    color-scheme: dark;
}
.stats-header-filters select {
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid var(--dark-border);
    background: var(--dark-card);
    color: var(--text-primary);
    font-size: 12px;
    height: 30px;
}
.stats-header-filters .btn {
    height: 30px;
    padding: 0 12px;
    font-size: 12px;
}

/* Stats comparison cards */
.stats-compare-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}
.stats-compare-card {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.stats-compare-card__title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.stats-compare-card__row {
    display: flex;
    align-items: center;
    gap: 14px;
}
.stats-compare-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}
.stats-compare-circle--up {
    background: rgba(0, 200, 83, 0.1);
    border: 2.5px solid rgba(0, 200, 83, 0.5);
    box-shadow: 0 0 12px rgba(0, 200, 83, 0.15);
}
.stats-compare-circle--down {
    background: rgba(255, 45, 85, 0.1);
    border: 2.5px solid rgba(255, 45, 85, 0.5);
    box-shadow: 0 0 12px rgba(255, 45, 85, 0.15);
}
.stats-compare-circle--same {
    background: rgba(255, 255, 255, 0.04);
    border: 2.5px solid rgba(255, 255, 255, 0.15);
}
.stats-compare-circle__pct {
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
}
.stats-compare-circle--up .stats-compare-circle__pct { color: #00c853; }
.stats-compare-circle--down .stats-compare-circle__pct { color: #ff2d55; }
.stats-compare-circle--same .stats-compare-circle__pct { color: var(--text-muted); }

.stats-compare-card__data {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.stats-compare-card__current {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}
.stats-compare-card__current small,
.stats-compare-card__prev small {
    font-size: 11px;
    font-weight: 400;
    color: var(--text-muted);
    margin-left: 2px;
}
.stats-compare-card__prev {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    line-height: 1.2;
}

/* Status comparison */
.stats-status-compare {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.stats-status-compare__title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.stats-status-compare__nums {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    margin-left: auto;
    min-width: 80px;
    justify-content: center;
}
.stats-status-compare__cur {
    font-weight: 700;
    color: var(--text-primary);
}
.stats-status-compare__sep {
    font-size: 11px;
    color: var(--text-muted);
}
.stats-status-compare__prev {
    color: var(--text-secondary);
}
.stats-compare-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}
.stats-compare-badge--up {
    background: rgba(0, 200, 83, 0.12);
    color: #00c853;
}
.stats-compare-badge--down {
    background: rgba(255, 45, 85, 0.12);
    color: #ff2d55;
}
.stats-compare-badge--same {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
}

/* Donut chart */
.stats-donut-wrap {
    display: flex;
    align-items: center;
    gap: 40px;
    padding: 10px 0;
}
.stats-donut {
    width: 200px;
    height: 200px;
    flex-shrink: 0;
}
.stats-donut__svg {
    width: 100%;
    height: 100%;
}
.stats-donut__total-num {
    font-size: 28px;
    font-weight: 800;
    fill: var(--text-primary);
}
.stats-donut__total-label {
    font-size: 12px;
    fill: var(--text-muted);
}
.stats-donut-legend {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}
.stats-donut-legend__item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}
.stats-donut-legend__dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}
.stats-donut-legend__name {
    color: var(--text-secondary);
    margin-right: auto;
}
.stats-donut-legend__pct {
    font-weight: 600;
    color: var(--neon-cyan);
}
.stats-donut-legend__value {
    font-weight: 700;
    color: var(--text-primary);
    min-width: 24px;
    text-align: right;
}

/* Light theme stats */
[data-theme="light"] .stat-card { background: #fff; border-color: #e5e7eb; }
[data-theme="light"] .stat-card:hover { border-color: var(--tiffany); box-shadow: 0 0 12px rgba(13,148,136,0.1); }
[data-theme="light"] .stat-card__icon--cyan { background: rgba(13,148,136,0.08); color: var(--tiffany); }
[data-theme="light"] .stat-card__icon--green { background: rgba(0,200,83,0.08); color: #059669; }
[data-theme="light"] .stat-card__icon--purple { background: rgba(139,92,246,0.08); color: #7c3aed; }
[data-theme="light"] .stat-card__icon--orange { background: rgba(245,158,11,0.08); color: #d97706; }
[data-theme="light"] .stat-card__number { color: #1f2937; }
[data-theme="light"] .stat-card__label { color: #6b7280; }
[data-theme="light"] .stat-row { border-bottom-color: #f3f4f6; }
[data-theme="light"] .stat-row__label { color: #374151; }
[data-theme="light"] .stat-row__value { color: #1f2937; }
[data-theme="light"] .stat-row__bar-wrap { background: #f3f4f6; }
[data-theme="light"] .stat-row__bar { box-shadow: none; }
[data-theme="light"] .stats-chart__bar { background: linear-gradient(180deg, var(--tiffany), var(--tiffany-dark)); box-shadow: none; }
[data-theme="light"] .stats-chart__label { color: #9ca3af; }
[data-theme="light"] .stats-chart__value { color: #374151; }
[data-theme="light"] .stat-row--clickable:hover { background: rgba(0,0,0,0.03); }
[data-theme="light"] .stat-row--clickable.active { background: rgba(13,148,136,0.06); border-color: rgba(13,148,136,0.15); }
[data-theme="light"] .stats-detail { background: #fff; border-color: #e5e7eb; }
[data-theme="light"] .stats-detail__header { border-bottom-color: #f3f4f6; }
[data-theme="light"] .stats-detail__total { border-top-color: #f3f4f6; }
[data-theme="light"] .stats-filters-row input[type="date"],
[data-theme="light"] .stats-filters-row select { background: #f9fafb; border-color: #e5e7eb; color: #1f2937; color-scheme: light; }
[data-theme="light"] .stats-compare-card { background: #fff; border-color: #e5e7eb; }
[data-theme="light"] .stats-compare-circle--up { background: rgba(0,200,83,0.06); border-color: rgba(0,200,83,0.4); box-shadow: none; }
[data-theme="light"] .stats-compare-circle--down { background: rgba(255,45,85,0.06); border-color: rgba(255,45,85,0.4); box-shadow: none; }
[data-theme="light"] .stats-compare-circle--same { background: #f9fafb; border-color: #e5e7eb; }
[data-theme="light"] .stats-compare-badge--up { background: rgba(0,200,83,0.08); }
[data-theme="light"] .stats-compare-badge--down { background: rgba(255,45,85,0.08); }
[data-theme="light"] .stats-compare-badge--same { background: #f3f4f6; color: #9ca3af; }
[data-theme="light"] .stats-header-filters input[type="date"],
[data-theme="light"] .stats-header-filters select { background: #f9fafb; border-color: #e5e7eb; color: #1f2937; color-scheme: light; }
[data-theme="light"] .stats-donut-legend__pct { color: var(--tiffany-dark); }
[data-theme="light"] .stat-row__pct { color: var(--tiffany-dark); }

@media (max-width: 768px) {
    /* Sidebar off-canvas */
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        width: 280px;
    }
    .sidebar.open { transform: translateX(0); }
    body.has-sidebar .main-content { margin-left: 0; }
    body.sidebar-open { overflow: hidden; }

    /* Mobile menu toggle */
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        top: 10px;
        left: 10px;
        z-index: 101;
        background: var(--dark-card);
        color: var(--neon-cyan);
        border: 1px solid var(--tiffany);
        padding: 10px;
        border-radius: var(--radius);
        cursor: pointer;
        box-shadow: var(--glow-sm);
        width: 44px;
        height: 44px;
    }

    /* Main content */
    .main-content {
        padding: 60px 12px 16px 12px;
    }

    /* Page header */
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .page-header h1 { font-size: 20px; }
    .page-header__actions {
        width: 100%;
        flex-wrap: wrap;
    }
    .search-box__input { width: 100%; }
    .search-box { flex: 1; min-width: 0; }
    .page-header .btn-group {
        width: 100%;
        flex-wrap: wrap;
    }

    /* Filters bar */
    .filters-bar {
        flex-direction: column;
        gap: 8px;
        padding: 12px;
    }
    .filters-bar .form-group {
        min-width: 100%;
    }
    .filters-bar .form-group label {
        font-size: 12px;
        margin-bottom: 4px;
    }
    .filters-bar .btn-secondary {
        width: 100%;
        text-align: center;
    }

    /* Form rows */
    .form-row { flex-direction: column; gap: 0; }
    .form-inline { flex-direction: column; align-items: stretch; }

    /* Tables — horizontal scroll */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -12px;
        padding: 0 12px;
    }
    table { font-size: 13px; }
    th, td { padding: 10px 12px; white-space: nowrap; }
    .table-container td a[href^="/tasks/"] { font-size: 14px !important; }

    /* Kanban */
    .kanban-board {
        flex-direction: column;
        gap: 12px;
        min-height: auto;
    }
    .kanban-column {
        min-width: 100%;
        max-width: 100%;
    }
    .kanban-card { padding: 12px; }
    .kanban-card:hover { transform: none; }
    .kanban-card-title { font-size: 14px; }

    /* Task detail page */
    .task-page {
        display: flex;
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    .task-page__main {
        width: 100%;
        order: 2;
    }
    .task-page__sidebar {
        width: 100%;
        position: static !important;
        top: auto !important;
        order: 1;
    }
    .task-sidebar-toggle {
        display: flex;
    }
    .task-sidebar {
        padding: 12px;
        border-top-left-radius: 0;
        border-top-right-radius: 0;
        margin-top: -1px;
    }
    .task-sidebar--collapsed {
        display: none;
    }
    .task-page-title__text { font-size: 18px; }
    .task-page-title__input { font-size: 18px; }
    .task-section { padding: 14px; margin-bottom: 14px; }
    .task-section__header { margin-bottom: 12px; padding-bottom: 10px; }

    /* Custom dropdown — full width, larger touch area */
    .custom-dropdown__trigger { padding: 10px 8px; font-size: 14px; }
    .custom-dropdown__item { padding: 12px; font-size: 14px; min-height: 44px; }
    .custom-dropdown__menu { max-height: 300px; }

    /* Prevent sidebar blocks from overlapping on mobile */
    .task-sidebar-block { position: relative; z-index: 1; }
    .task-sidebar-block.dropdown-active,
    .task-sidebar-block:has(.custom-dropdown__menu.open),
    .task-sidebar-block:has(.ss-dropdown--open) {
        z-index: 60;
    }
    .custom-dropdown__menu { z-index: 70; }
    .ss-dropdown { z-index: 70; }

    /* Comments */
    .comment-new { gap: 8px; }
    .comment-new__avatar { display: none; }
    .comment-item { gap: 8px; }
    .comment-item__avatar .avatar-circle { width: 28px; height: 28px; font-size: 12px; }
    .comment-item__actions { opacity: 1; }
    .comment-item__header { gap: 6px; }
    .ql-editor { min-height: 100px; }
    .comment-new .ql-editor { min-height: 60px; }

    /* Activity timeline */
    .timeline-item { gap: 8px; }
    .timeline-item__content { font-size: 12px; }

    /* Profile page */
    .profile-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .profile-avatar {
        width: 90px;
        height: 90px;
        font-size: 36px;
    }
    .profile-info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    .theme-picker { gap: 10px; }
    .theme-option { padding: 8px; }

    /* Cards */
    .card-body { padding: 14px; }
    .card-header { padding: 12px 14px; }
    .card-header h2 { font-size: 15px; }

    /* Meta grid */
    .task-meta-grid { grid-template-columns: 1fr; }

    /* Buttons — larger tap targets */
    .btn { padding: 10px 18px; min-height: 44px; }
    .btn-sm { padding: 8px 14px; min-height: 38px; }
    .btn-icon { width: 38px; height: 38px; }
    .btn-ghost { padding: 8px 14px; min-height: 38px; }
    .btn-group { flex-wrap: wrap; }

    /* Assignee chips */
    .assignee-chip { font-size: 12px; padding: 4px 8px 4px 4px; }
    .assignee-list { gap: 4px; }

    /* Select multi compact */
    .select-multi--compact { min-height: 50px; }
    .checkbox-list { max-height: 160px; }
    .checkbox-list label { padding: 8px 6px; min-height: 40px; }

    /* Modal */
    .modal {
        width: 95%;
        max-height: 90vh;
        margin: 20px auto;
    }

    /* View toggle */
    .view-toggle button,
    .view-toggle__btn { padding: 8px 14px; font-size: 12px; }

    /* Alerts */
    .alert { padding: 12px 14px; font-size: 13px; }

    /* Auth card (login) */
    .auth-wrapper { padding: 16px; }
    .auth-card { padding: 24px 20px; }
    .auth-logo { width: 100px; }

    /* Sidebar footer — smaller text */
    .sidebar-user-link .sidebar-user div small { font-size: 11px; }

    /* Statistics page mobile */
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .stat-card { padding: 14px; gap: 12px; }
    .stat-card__icon { width: 40px; height: 40px; border-radius: 10px; }
    .stat-card__icon svg { width: 20px; height: 20px; }
    .stat-card__number { font-size: 22px; }
    .stat-card__label { font-size: 12px; }
    .stats-row { flex-direction: column; }
    .stats-row .card { flex: 1 1 auto !important; }
    .stat-row__label { min-width: 100px; font-size: 12px; }
    .stat-row__label--user { min-width: 130px; }
    .stats-chart { height: 120px; gap: 3px; }
    .stats-chart__label { font-size: 8px; }
    .stats-chart__value { font-size: 9px; }
    .stats-filters-row { gap: 6px; }
    .stats-filters-row input[type="date"],
    .stats-filters-row select { font-size: 12px; padding: 4px 6px; height: 30px; }
    .stats-filters-row--inline { flex-wrap: wrap; }
    .stats-filters-row--inline .form-group { flex-direction: column; align-items: flex-start; }
    .stats-header-filters { flex-wrap: wrap; gap: 6px; }
    .stats-detail { padding: 14px; }
    .stat-row--clickable { padding: 8px 8px; margin: 0 -8px; }
    .stats-compare-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .stats-compare-card { padding: 12px; gap: 10px; }
    .stats-compare-circle { width: 52px; height: 52px; }
    .stats-compare-circle__pct { font-size: 12px; }
    .stats-compare-card__current { font-size: 15px; }
    .stats-compare-card__prev { font-size: 12px; }
    .stats-compare-card__title { font-size: 11px; }
    .stats-status-compare { grid-template-columns: 1fr; gap: 16px; }
    .stats-status-compare__nums { min-width: 60px; font-size: 12px; }
    .stats-compare-badge { min-width: 44px; font-size: 11px; padding: 2px 6px; }
    .stats-donut-wrap { flex-direction: column; gap: 20px; }
    .stats-donut { width: 160px; height: 160px; }
    .stats-donut-legend__item { font-size: 13px; }

    /* Status settings page — make rows responsive */
    .status-input-name { width: 100%; }

    /* Hide non-essential columns on very small screens */
    .hide-mobile { display: none; }

    /* Quill toolbar — compact, wrap on mobile */
    .ql-toolbar.ql-snow { padding: 4px 4px; flex-wrap: wrap; }
    .ql-toolbar .ql-formats { margin-right: 6px; margin-bottom: 2px; }
    .ql-toolbar button { width: 28px; height: 28px; padding: 3px; }
    .ql-editor { min-height: 100px; font-size: 14px; }

    /* Searchable select mobile */
    .ss-chips { min-height: 44px; padding: 6px; }
    .ss-chip { font-size: 11px; max-width: calc(100% - 8px); }
    .ss-chip-label { max-width: none; }
    .ss-chip-remove { width: 20px; height: 20px; font-size: 16px; }
    .ss-search { font-size: 14px; min-width: 80px; padding: 4px; }
    .ss-dropdown { max-height: 200px; }
    .ss-option { padding: 12px; min-height: 44px; font-size: 14px; }
    .ss-option-check { width: 18px; height: 18px; }

    /* Quill images mobile */
    .ql-editor img { max-width: 100%; height: auto; }
    .img-resize-handle { width: 18px; height: 18px; }
    .img-resize-handle--nw { top: -9px; left: -9px; }
    .img-resize-handle--ne { top: -9px; right: -9px; }
    .img-resize-handle--sw { bottom: -9px; left: -9px; }
    .img-resize-handle--se { bottom: -9px; right: -9px; }
    .img-resize-btn { padding: 6px 10px; font-size: 12px; min-height: 32px; }
    .img-resize-toolbar { top: -42px; padding: 4px; }

    /* Form row searchable selects stack */
    .form-row .searchable-select { width: 100%; }

    /* Sidebar links — bigger touch targets */
    .sidebar-link { padding: 14px 22px; min-height: 48px; }
    .sidebar-nav { padding: 8px 0; }
    .sidebar-footer { padding: 12px 16px; }

    /* Card header — stack vertically */
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .card-header .btn-group {
        width: 100%;
        flex-wrap: wrap;
    }
    .card-header .btn-group .btn { flex: 1; text-align: center; }

    /* Teams page — add member form wrap */
    .card-header form[action*="/members"] {
        width: 100%;
        flex-wrap: wrap;
    }
    .card-header form[action*="/members"] select {
        min-width: 0 !important;
        flex: 1;
    }

    /* Statuses page — wrap rows */
    .status-row {
        flex-wrap: wrap !important;
        gap: 8px !important;
    }
    .status-row form {
        flex-wrap: wrap;
        width: 100%;
        margin-left: 0 !important;
    }
    .status-row .status-input-name {
        width: 100% !important;
        flex: 1;
    }
    .status-row .color-picker-lg {
        flex-shrink: 0;
    }
}

/* === Quill editor overrides (dark neon) === */
.ql-toolbar.ql-snow {
    background: var(--dark-surface);
    border-color: var(--dark-border) !important;
    border-radius: var(--radius) var(--radius) 0 0;
}
.ql-toolbar .ql-stroke { stroke: var(--text-secondary) !important; }
.ql-toolbar .ql-fill { fill: var(--text-secondary) !important; }
.ql-toolbar .ql-picker-label { color: var(--text-secondary) !important; }
.ql-toolbar button:hover .ql-stroke,
.ql-toolbar button.ql-active .ql-stroke { stroke: var(--neon-cyan) !important; filter: drop-shadow(0 0 4px rgba(0,255,247,0.5)); }
.ql-toolbar button:hover .ql-fill,
.ql-toolbar button.ql-active .ql-fill { fill: var(--neon-cyan) !important; }
.ql-container.ql-snow {
    border-color: var(--dark-border) !important;
    border-radius: 0 0 var(--radius) var(--radius);
    background: var(--dark-surface);
    color: var(--text-primary);
    font-size: 14px;
}
#editor-container { min-height: 150px; }
#editor-container .ql-editor { min-height: 150px; max-height: none; height: auto; overflow-y: visible; }
.ql-container.ql-snow { height: auto !important; }
.ql-editor.ql-blank::before { color: var(--text-muted) !important; }
.ql-snow .ql-picker-options { background: var(--dark-card) !important; border-color: var(--dark-border) !important; }
.ql-snow .ql-picker-item { color: var(--text-primary) !important; }
.ql-snow .ql-picker-item:hover { color: var(--neon-cyan) !important; }

/* === Neon line accents === */
.page-header::after {
    content: '';
    display: block;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, var(--neon-cyan), transparent 80%);
    box-shadow: 0 0 8px rgba(0,255,247,0.3);
    position: absolute;
    bottom: -4px;
    left: 0;
}

.page-header { position: relative; padding-bottom: 16px; }

/* ============================= */
/* === Task Page (show.php) === */
/* ============================= */

/* Breadcrumb */
.task-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
}
.task-breadcrumb a { color: var(--text-secondary); }
.task-breadcrumb a:hover { color: var(--neon-cyan); }
.task-breadcrumb__sep { color: var(--dark-border-light); }

/* Title */
.task-page-title { margin-bottom: 24px; }
.task-page-title__text {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
    padding: 6px 8px;
    margin: -6px -8px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    transition: all 0.2s;
    line-height: 1.3;
}
.task-page-title__text:hover {
    border-color: var(--dark-border);
    background: rgba(0,255,247,0.03);
}
.task-page-title__input {
    width: 100%;
    font-size: 26px;
    font-weight: 700;
    background: var(--dark-surface);
    color: var(--text-primary);
    border: 1px solid var(--neon-cyan);
    border-radius: var(--radius);
    padding: 6px 8px;
    outline: none;
    box-shadow: var(--glow-sm);
}
.task-page-title__actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

/* Two-column layout */
.task-page {
    display: flex;
    gap: 28px;
    align-items: flex-start;
}
.task-page__main {
    flex: 1;
    min-width: 0;
}
.task-page__sidebar {
    width: 300px;
    flex-shrink: 0;
    position: sticky;
    top: 28px;
}

/* Sections */
.task-section {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
}
.task-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0,255,247,0.08);
}
.task-section__title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}
.task-section__title svg {
    color: var(--neon-cyan);
    flex-shrink: 0;
}
.task-section__count {
    background: rgba(0,255,247,0.1);
    color: var(--neon-cyan);
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

/* Description content */
.task-description-content {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 14px;
}
.task-description-content p { margin-bottom: 8px; }
.task-description-content p:last-child { margin-bottom: 0; }

.task-description-editor__actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

/* Sidebar toggle (mobile only) */
.task-sidebar-toggle {
    display: none;
    width: 100%;
    padding: 12px 16px;
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s;
    margin-bottom: 0;
}
.task-sidebar-toggle:hover {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
}
.task-sidebar-toggle__icon {
    transition: transform 0.2s;
}
.task-sidebar-toggle.active .task-sidebar-toggle__icon {
    transform: rotate(180deg);
}

/* Sidebar */
.task-sidebar {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius);
    padding: 16px;
}
.task-sidebar-block {
    margin-bottom: 16px;
}
.task-sidebar-block__label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    font-weight: 600;
}
.task-sidebar-block__value {
    font-size: 14px;
    color: var(--text-primary);
}
.task-sidebar-block__value--muted {
    color: var(--text-muted);
    font-size: 13px;
}
.task-sidebar-divider {
    height: 1px;
    background: var(--dark-border);
    margin: 16px 0;
}

/* Custom dropdown */
.custom-dropdown { position: relative; }
.custom-dropdown__trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 10px;
    background: rgba(0,255,247,0.04);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-primary);
    font-size: 13px;
}
.custom-dropdown__trigger:hover {
    background: rgba(0,255,247,0.08);
    border-color: var(--neon-cyan);
}
.custom-dropdown__arrow {
    color: var(--text-muted);
    margin-left: auto;
    flex-shrink: 0;
    transition: transform 0.2s;
}
.custom-dropdown__menu.open + .custom-dropdown__arrow,
.custom-dropdown__menu.open ~ .custom-dropdown__trigger .custom-dropdown__arrow { transform: rotate(180deg); }

.custom-dropdown__menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--dark-card);
    border: 1px solid var(--dark-border-light);
    border-radius: var(--radius);
    box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 0 1px rgba(0,255,247,0.06);
    z-index: 50;
    padding: 4px;
    max-height: 240px;
    overflow-y: auto;
}
.custom-dropdown__menu.open { display: block; animation: dropdownFadeIn 0.15s ease; }

@keyframes dropdownFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.custom-dropdown__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    transition: all 0.15s;
}
.custom-dropdown__item:hover {
    background: rgba(0,255,247,0.08);
    color: var(--text-primary);
}
.custom-dropdown__item.active {
    background: rgba(0,255,247,0.12);
    color: var(--neon-cyan);
    font-weight: 600;
}

/* Status dot in dropdown */
.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 6px rgba(0,0,0,0.3);
}

/* Priority badge */
.priority-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
}
.priority-badge__icon { font-size: 14px; }
.priority-badge--low {
    background: rgba(74,158,255,0.12);
    color: #4a9eff;
    border: 1px solid rgba(74,158,255,0.2);
}
.priority-badge--medium {
    background: rgba(255,171,0,0.12);
    color: #ffab00;
    border: 1px solid rgba(255,171,0,0.2);
}
.priority-badge--high {
    background: rgba(255,107,53,0.12);
    color: #ff6b35;
    border: 1px solid rgba(255,107,53,0.2);
}
.priority-badge--critical {
    background: rgba(255,45,85,0.15);
    color: #ff2d55;
    border: 1px solid rgba(255,45,85,0.25);
    text-shadow: 0 0 8px rgba(255,45,85,0.3);
}

/* Priority dot in dropdown */
.priority-dot {
    font-size: 15px;
    font-weight: 700;
    flex-shrink: 0;
    width: 18px;
    text-align: center;
}

/* Avatar circle */
.avatar-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--tiffany-dark), var(--tiffany));
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 0 8px rgba(10,186,181,0.3);
}
.avatar-circle--sm {
    width: 26px;
    height: 26px;
    font-size: 12px;
}
.avatar-circle--xs {
    width: 20px;
    height: 20px;
    font-size: 10px;
}

/* Assignee list & chips */
.assignee-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.assignee-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px 3px 3px;
    background: rgba(0,255,247,0.05);
    border: 1px solid var(--dark-border);
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-primary);
}

/* Compact select for sidebar */
.select-multi--compact {
    width: 100%;
    min-height: 60px;
    font-size: 12px;
    padding: 4px;
    background: var(--dark-surface);
    color: var(--text-primary);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius);
}

/* === Comments === */
.comment-new {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}
.comment-new__avatar { flex-shrink: 0; padding-top: 4px; }
.comment-new__body { flex: 1; min-width: 0; }
.comment-new__actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.comment-list { }
.comment-empty { padding: 20px 0; text-align: center; }

.comment-item {
    display: flex;
    gap: 12px;
    padding: 16px 0;
    border-top: 1px solid rgba(0,255,247,0.06);
}
.comment-item:first-child { border-top: none; }
.comment-item__avatar { flex-shrink: 0; padding-top: 2px; }
.comment-item__content { flex: 1; min-width: 0; }
.comment-item__header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}
.comment-item__author {
    color: var(--text-primary);
    font-size: 13px;
}
.comment-item__time {
    color: var(--text-muted);
    font-size: 12px;
}
.comment-item__edited {
    color: var(--text-muted);
    font-size: 11px;
    font-style: italic;
}
.comment-item__actions {
    display: flex;
    gap: 4px;
    margin-left: auto;
    opacity: 0;
    transition: opacity 0.2s;
}
.comment-item:hover .comment-item__actions { opacity: 1; }

.comment-item__body {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}
.comment-item__body p { margin-bottom: 4px; }
.comment-item__body p:last-child { margin-bottom: 0; }

.comment-edit__actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

/* Icon button */
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: var(--radius);
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
}
.btn-icon:hover {
    background: rgba(0,255,247,0.1);
    color: var(--neon-cyan);
}
.btn-icon--danger:hover {
    background: rgba(255,45,85,0.1);
    color: var(--danger);
}

/* Ghost button */
.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--dark-border);
    padding: 5px 14px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}
.btn-ghost:hover {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    background: rgba(0,255,247,0.05);
}

.btn-block { display: block; width: 100%; text-align: center; }

/* Activity timeline */
.activity-timeline { }
.timeline-item {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    position: relative;
}
.timeline-item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 28px;
    bottom: 0;
    width: 1px;
    background: rgba(0,255,247,0.12);
}
.timeline-item__dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--tiffany);
    flex-shrink: 0;
    margin-top: 5px;
    box-shadow: 0 0 6px rgba(10,186,181,0.4);
}
.timeline-item__content {
    flex: 1;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}
.timeline-item__time {
    color: var(--text-muted);
    font-size: 12px;
    margin-left: 6px;
}

/* Small status badge */
.status-badge--sm {
    font-size: 11px;
    padding: 1px 8px;
    border-radius: 4px;
}

/* Quill mini (for comments) */
.comment-new .ql-toolbar.ql-snow {
    padding: 4px 6px;
}
.comment-new .ql-editor {
    min-height: 60px;
    font-size: 13px;
}
.comment-edit-quill .ql-editor {
    min-height: 60px;
    font-size: 13px;
}

/* === Task page responsive (tablet) === */
@media (min-width: 769px) and (max-width: 900px) {
    .task-page {
        display: flex;
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    .task-page__main {
        width: 100%;
        order: 2;
    }
    .task-page__sidebar {
        width: 100%;
        position: static !important;
        top: auto !important;
        order: 1;
    }
    .task-sidebar-toggle {
        display: flex;
    }
    .task-sidebar {
        border-top-left-radius: 0;
        border-top-right-radius: 0;
        margin-top: -1px;
    }
    .task-sidebar--collapsed {
        display: none;
    }
    .task-page-title__text { font-size: 22px; }
    .task-page-title__input { font-size: 22px; }
}

/* === Avatar image support === */
img.avatar-circle {
    object-fit: cover;
    border: 2px solid var(--dark-border);
}

/* === Profile page === */
.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 20px;
    max-width: 1000px;
}
.profile-avatar-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}
.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    font-size: 48px;
    box-shadow: 0 0 20px rgba(10,186,181,0.3);
}
img.profile-avatar {
    object-fit: cover;
    border: 3px solid var(--tiffany);
}
.profile-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--dark-border);
}
.profile-info-row:last-child { border-bottom: none; }
.profile-info-row label {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Theme picker */
.theme-picker {
    display: flex;
    gap: 16px;
}
.theme-option {
    cursor: pointer;
    text-align: center;
    padding: 12px;
    border: 2px solid var(--dark-border);
    border-radius: var(--radius);
    transition: all 0.2s;
    flex: 1;
}
.theme-option:hover {
    border-color: var(--tiffany);
}
.theme-option.active {
    border-color: var(--neon-cyan);
    box-shadow: var(--glow-sm);
}
.theme-option span {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}
.theme-preview {
    width: 100%;
    height: 70px;
    border-radius: 6px;
    display: flex;
    overflow: hidden;
}
.theme-preview--dark {
    background: #060a12;
    border: 1px solid #1a2a3a;
}
.theme-preview--light {
    background: #f0f2f5;
    border: 1px solid #d0d7de;
}
.theme-preview__sidebar {
    width: 25%;
}
.theme-preview--dark .theme-preview__sidebar { background: #0c1220; }
.theme-preview--light .theme-preview__sidebar { background: #ffffff; border-right: 1px solid #d0d7de; }
.theme-preview__content {
    flex: 1;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.theme-preview__line {
    height: 6px;
    border-radius: 3px;
    width: 80%;
}
.theme-preview__line.short { width: 50%; }
.theme-preview--dark .theme-preview__line { background: #1a3040; }
.theme-preview--light .theme-preview__line { background: #d0d7de; }
.theme-preview__card {
    flex: 1;
    border-radius: 3px;
    margin-top: 2px;
}
.theme-preview--dark .theme-preview__card { background: #111c2e; }
.theme-preview--light .theme-preview__card { background: #ffffff; border: 1px solid #d0d7de; }

/* Sidebar user link */
.sidebar-user-link {
    text-decoration: none !important;
    color: inherit !important;
    text-shadow: none !important;
}
.sidebar-user-link:hover { color: inherit !important; }
.sidebar-user-link .sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-direction: row;
    padding: 6px 8px;
    margin: -6px -8px;
    transition: background 0.2s;
}
.sidebar-user-link .sidebar-user div {
    display: flex;
    flex-direction: column;
}
.sidebar-user-link:hover .sidebar-user {
    background: rgba(0,255,247,0.05);
    border-radius: var(--radius);
}

/* =============================== */
/* === LIGHT THEME === */
/* =============================== */
[data-theme="light"] {
    --dark-bg: #f0f2f5;
    --dark-surface: #ffffff;
    --dark-card: #ffffff;
    --dark-card-hover: #f8f9fa;
    --dark-border: rgba(0,0,0,0.12);
    --dark-border-light: rgba(0,0,0,0.08);
    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;
    --primary: #0d9488;
    --primary-dark: #0f766e;
    --tiffany: #0d9488;
    --tiffany-light: #14b8a6;
    --tiffany-dark: #0f766e;
    --tiffany-deep: #115e59;
    --neon-cyan: #0891b2;
    --neon-mint: #059669;
    --neon-pink: #db2777;
    --neon-purple: #7c3aed;
    --danger: #dc2626;
    --success: #16a34a;
    --warning: #d97706;
    --info: #0891b2;
    --glow-xs: 0 1px 2px rgba(0,0,0,0.05);
    --glow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --glow-md: 0 4px 12px rgba(0,0,0,0.08);
    --glow-lg: 0 8px 24px rgba(0,0,0,0.1);
    --glow-neon: 0 1px 3px rgba(0,0,0,0.1);
}

[data-theme="light"] body {
    background: var(--dark-bg);
    background-image: none;
    color: var(--text-primary);
}

[data-theme="light"] a {
    color: var(--tiffany);
    text-shadow: none;
}
[data-theme="light"] a:hover {
    color: var(--tiffany-dark);
    text-shadow: none;
}
[data-theme="light"] a.btn-primary,
[data-theme="light"] a.btn-danger,
[data-theme="light"] a.btn-success,
[data-theme="light"] a.btn-warning {
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
[data-theme="light"] a.btn-primary:hover,
[data-theme="light"] a.btn-danger:hover {
    color: #fff;
}

[data-theme="light"] ::selection {
    background: rgba(13,148,136,0.2);
    color: #1f2937;
}

/* Light scrollbar */
[data-theme="light"] ::-webkit-scrollbar-track { background: #f0f2f5; }
[data-theme="light"] ::-webkit-scrollbar-thumb { background: #c4c4c4; box-shadow: none; }
[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: #a0a0a0; box-shadow: none; }

/* Light sidebar */
[data-theme="light"] .sidebar {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafa 100%);
    border-right: 1px solid var(--dark-border);
    box-shadow: 2px 0 8px rgba(0,0,0,0.05);
}
[data-theme="light"] .sidebar-logo {
    filter: drop-shadow(0 0 4px rgba(0,128,128,0.3));
}
[data-theme="light"] .sidebar-brand:hover .sidebar-logo {
    filter: drop-shadow(0 0 10px rgba(0,128,128,0.5));
}
[data-theme="light"] .sidebar-header {
    border-bottom-color: var(--dark-border);
    background: transparent;
}
[data-theme="light"] .sidebar-link {
    color: var(--text-secondary);
}
[data-theme="light"] .sidebar-link:hover {
    background: rgba(13,148,136,0.06);
    color: var(--tiffany);
    text-shadow: none;
}
[data-theme="light"] .sidebar-link.active {
    background: rgba(13,148,136,0.1);
    color: var(--tiffany);
    text-shadow: none;
    box-shadow: none;
}
[data-theme="light"] .sidebar-link.active::before {
    box-shadow: none;
}
[data-theme="light"] .sidebar-section {
    color: var(--text-muted);
    text-shadow: none;
}
[data-theme="light"] .sidebar-footer {
    border-top-color: var(--dark-border);
    background: transparent;
}

/* Light cards, tables */
[data-theme="light"] .card {
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border-color: var(--dark-border);
}
[data-theme="light"] .card-header {
    background: #f8fafb;
}
[data-theme="light"] table {
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
[data-theme="light"] th {
    background: #f3f4f6;
    color: var(--tiffany);
    text-shadow: none;
}
[data-theme="light"] tr:hover {
    background: #f9fafb;
}

/* Light pin */
[data-theme="light"] .pin-btn.active {
    color: var(--tiffany);
    filter: none;
}
[data-theme="light"] .task-row--pinned {
    background: rgba(13,148,136,0.04);
    border-left-color: var(--tiffany);
}
[data-theme="light"] .kanban-card--pinned {
    border-color: var(--tiffany);
    box-shadow: 0 0 8px rgba(13,148,136,0.15);
    background: linear-gradient(135deg, rgba(13,148,136,0.03), #ffffff);
}

/* Light searchable select */
[data-theme="light"] .ss-chips { background: #ffffff; border-color: #d1d5db; }
[data-theme="light"] .ss-chips:focus-within { border-color: var(--tiffany); box-shadow: 0 0 0 3px rgba(13,148,136,0.1); }
[data-theme="light"] .ss-chip { background: rgba(13,148,136,0.08); border-color: rgba(13,148,136,0.2); }
[data-theme="light"] .ss-dropdown { background: #ffffff; border-color: #d1d5db; box-shadow: 0 4px 16px rgba(0,0,0,0.12); }
[data-theme="light"] .ss-option:hover { background: rgba(13,148,136,0.06); }
[data-theme="light"] .ss-option--selected { color: var(--tiffany); }

/* Light forms */
[data-theme="light"] input[type="text"],
[data-theme="light"] input[type="email"],
[data-theme="light"] input[type="password"],
[data-theme="light"] input[type="search"],
[data-theme="light"] select,
[data-theme="light"] textarea {
    background: #ffffff;
    color: var(--text-primary);
    border-color: #d1d5db;
}
[data-theme="light"] input:focus,
[data-theme="light"] select:focus,
[data-theme="light"] textarea:focus {
    border-color: var(--tiffany);
    box-shadow: 0 0 0 3px rgba(13,148,136,0.1);
}

/* Light buttons */
[data-theme="light"] .btn-secondary {
    background: #f3f4f6;
    border-color: #d1d5db;
    color: var(--text-primary);
}
[data-theme="light"] .btn-secondary:hover {
    background: #e5e7eb;
}
[data-theme="light"] .btn-ghost {
    border-color: #d1d5db;
    color: var(--text-secondary);
}
[data-theme="light"] .btn-ghost:hover {
    border-color: var(--tiffany);
    color: var(--tiffany);
    background: rgba(13,148,136,0.04);
}

/* Light kanban */
[data-theme="light"] .kanban-column {
    background: #f3f4f6;
}
[data-theme="light"] .kanban-card {
    background: #ffffff;
    border-color: #e5e7eb;
}
[data-theme="light"] .kanban-card:hover {
    border-color: var(--tiffany);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
[data-theme="light"] .kanban-toggle-btn:hover { color: var(--tiffany); background: rgba(13,148,136,0.08); }

/* Light badges */
[data-theme="light"] .badge-role {
    background: rgba(13,148,136,0.08);
    color: var(--tiffany);
    border-color: rgba(13,148,136,0.2);
    text-shadow: none;
}
[data-theme="light"] .badge-role:hover {
    background: rgba(13,148,136,0.15);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Light status badge */
[data-theme="light"] .status-badge {
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Light avatar */
[data-theme="light"] .avatar-circle {
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Light task page */
[data-theme="light"] .task-section {
    background: #ffffff;
    border-color: var(--dark-border);
}
[data-theme="light"] .task-sidebar {
    background: #ffffff;
    border-color: var(--dark-border);
}
[data-theme="light"] .task-sidebar-toggle {
    background: #ffffff;
    border-color: var(--dark-border);
}
[data-theme="light"] .task-page-title__text:hover {
    background: rgba(13,148,136,0.04);
}

/* Light alerts */
[data-theme="light"] .alert {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Light neon accents → subtle */
[data-theme="light"] .page-header::after {
    background: linear-gradient(90deg, var(--tiffany), transparent 80%);
    box-shadow: none;
}

/* Light custom dropdown */
[data-theme="light"] .custom-dropdown__trigger {
    background: rgba(13,148,136,0.04);
    border-color: #d1d5db;
}
[data-theme="light"] .custom-dropdown__trigger:hover {
    background: rgba(13,148,136,0.08);
    border-color: var(--tiffany);
}
[data-theme="light"] .custom-dropdown__menu {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    border-color: #d1d5db;
}
[data-theme="light"] .custom-dropdown__item:hover {
    background: rgba(13,148,136,0.06);
}
[data-theme="light"] .custom-dropdown__item.active {
    background: rgba(13,148,136,0.1);
    color: var(--tiffany);
}

/* Light Quill */
[data-theme="light"] .ql-toolbar.ql-snow {
    background: #f9fafb;
    border-color: #d1d5db !important;
}
[data-theme="light"] .ql-container.ql-snow {
    background: #ffffff;
    border-color: #d1d5db !important;
    color: var(--text-primary);
}
[data-theme="light"] .ql-toolbar .ql-stroke { stroke: #6b7280 !important; }
[data-theme="light"] .ql-toolbar .ql-fill { fill: #6b7280 !important; }
[data-theme="light"] .ql-toolbar .ql-picker-label { color: #6b7280 !important; }
[data-theme="light"] .ql-toolbar button:hover .ql-stroke,
[data-theme="light"] .ql-toolbar button.ql-active .ql-stroke { stroke: var(--tiffany) !important; filter: none; }
[data-theme="light"] .ql-toolbar button:hover .ql-fill,
[data-theme="light"] .ql-toolbar button.ql-active .ql-fill { fill: var(--tiffany) !important; }
[data-theme="light"] .ql-snow .ql-picker-options { background: #ffffff !important; border-color: #d1d5db !important; }
[data-theme="light"] .ql-editor.ql-blank::before { color: #9ca3af !important; }

/* Light mobile toggle */
[data-theme="light"] .mobile-menu-toggle {
    background: #ffffff;
    color: var(--tiffany);
    border-color: var(--tiffany);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
[data-theme="light"] .sidebar-backdrop {
    background: rgba(0,0,0,0.35);
}

/* Light filters */
[data-theme="light"] .filters-bar {
    background: #ffffff;
    border-color: var(--dark-border);
}
[data-theme="light"] .search-box__input {
    background: #ffffff;
    border-color: var(--dark-border);
}

/* Light timeline */
[data-theme="light"] .timeline-item__dot {
    box-shadow: 0 0 4px rgba(13,148,136,0.3);
}

/* Light comment item actions always visible */
[data-theme="light"] .btn-icon:hover {
    background: rgba(13,148,136,0.08);
    color: var(--tiffany);
}

/* === Tags === */
.tag-badge {
    display: inline-block;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 12px;
    background: rgba(139,92,246,0.12);
    color: #a78bfa;
    border: 1px solid rgba(139,92,246,0.25);
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s;
    line-height: 1.4;
}
.tag-badge:hover {
    background: rgba(139,92,246,0.25);
    color: #c4b5fd;
}
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.kanban-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    padding: 4px 0 0;
}
[data-theme="light"] .tag-badge {
    background: rgba(109,40,217,0.08);
    color: #7c3aed;
    border-color: rgba(109,40,217,0.2);
}
[data-theme="light"] .tag-badge:hover {
    background: rgba(109,40,217,0.15);
    color: #6d28d9;
}

/* === Subtasks === */
.subtask-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-primary);
    transition: background 0.15s;
}
.subtask-row:hover {
    background: rgba(0,255,247,0.05);
}
.subtask-row__title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.subtask-list .subtask-row + .subtask-row {
    border-top: 1px solid rgba(255,255,255,0.04);
}
.subtask-progress__bar {
    height: 4px;
    background: rgba(255,255,255,0.08);
    border-radius: 2px;
    overflow: hidden;
}
.subtask-progress__fill {
    height: 100%;
    background: var(--neon-cyan);
    border-radius: 2px;
    transition: width 0.3s;
}
/* Subtask link search */
.subtask-link-search {
    margin-bottom: 12px;
}
.subtask-search-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--dark-border);
    border-radius: 6px;
    background: var(--dark-bg);
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
}
.subtask-search-input:focus {
    border-color: var(--neon-cyan);
}
.subtask-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: 6px;
    margin-top: 4px;
    max-height: 240px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.subtask-search-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: background 0.15s;
}
.subtask-search-item:hover {
    background: rgba(0,255,247,0.08);
}
.subtask-search-item__id {
    color: var(--text-muted);
    font-size: 12px;
    flex-shrink: 0;
}
.subtask-search-item__title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.subtask-search-empty {
    padding: 12px;
    text-align: center;
    color: var(--text-muted);
}
.subtask-unlink-btn {
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.15s;
}
.subtask-row:hover .subtask-unlink-btn {
    opacity: 0.6;
}
.subtask-unlink-btn:hover {
    opacity: 1 !important;
}

[data-theme="light"] .subtask-search-input {
    background: var(--light-bg);
    border-color: var(--light-border);
}
[data-theme="light"] .subtask-search-input:focus {
    border-color: var(--tiffany);
}
[data-theme="light"] .subtask-search-results {
    background: var(--light-card);
    border-color: var(--light-border);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
[data-theme="light"] .subtask-search-item:hover {
    background: rgba(13,148,136,0.06);
}
[data-theme="light"] .subtask-row:hover {
    background: rgba(13,148,136,0.05);
}
[data-theme="light"] .subtask-list .subtask-row + .subtask-row {
    border-top-color: rgba(0,0,0,0.06);
}
[data-theme="light"] .subtask-progress__bar {
    background: rgba(0,0,0,0.08);
}
[data-theme="light"] .subtask-progress__fill {
    background: var(--tiffany);
}

/* === Extra small screens (phones < 400px) === */
@media (max-width: 400px) {
    .main-content { padding: 56px 8px 12px 8px; }
    .filters-bar { padding: 10px; }
    .page-header h1 { font-size: 18px; }
    .kanban-card-title { font-size: 13px; }
    .task-page-title__text { font-size: 16px; }
    .task-page-title__input { font-size: 16px; }
    .task-section { padding: 10px; }
    .task-sidebar { padding: 10px; }
    .theme-picker { flex-direction: column; }
    .btn { font-size: 13px; padding: 9px 14px; }
    .card-body { padding: 10px; }

    /* Searchable select xs */
    .ss-chips { padding: 4px; gap: 3px; }
    .ss-chip { font-size: 10px; padding: 2px 4px 2px 6px; }
    .ss-search { font-size: 13px; }
    .ss-dropdown { max-height: 180px; }
    .ss-option { padding: 10px 8px; font-size: 13px; }
}
