/* =================================================
   Mantra Force — Task Manager
   style.css
   ================================================= */

/* ── Variables ── */
:root {
    --bg: #09090c;
    --bg2: #0f1014;
    --bg3: #14151a;
    --bg4: #1a1b22;
    --border: #1e2030;
    --border2: #2a2c3e;
    --accent: #7c6af4;
    --accent2: #4f3de8;
    --green: #22c55e;
    --orange: #f97316;
    --red: #ef4444;
    --yellow: #eab308;
    --blue: #3b82f6;
    --text: #e8eaf0;
    --text2: #8b90a7;
    --text3: #4a4e68;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    --picker-bg: #1a1b22;
}

body.light-mode {
    --bg: #f8f9fc;
    --bg2: #ffffff;
    --bg3: #f1f3f9;
    --bg4: #e8ebf5;
    --border: #e2e8f0;
    --border2: #cbd5e1;
    --text: #0f172a;
    --text2: #475569;
    --text3: #94a3b8;
    --shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
    --picker-bg: #f1f3f9;
}

/* ── Visibility Toggles ── */
.mobile-only {
    display: none !important;
}

.desktop-only {
    display: revert !important;
}

.menu-btn {
    display: none;
}

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

html,
body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px;
    background: var(--bg);
    color: var(--text);
    display: flex;
    line-height: 1.5;
    transition: background 0.3s, color 0.3s;
}

button {
    cursor: pointer;
    font-family: inherit;
}

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

::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border2);
    border-radius: 2px;
}

/* ── Layout ── */
.sidebar {
    width: 200px;
    flex-shrink: 0;
    background: var(--bg2);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    min-width: 0;
}

/* ── Sidebar Brand ── */
.sidebar-brand {
    padding: 16px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--border);
}

.brand-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.brand-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}

.brand-sub {
    font-size: 10px;
    color: var(--text3);
}

/* ── Sidebar Nav ── */
.sidebar-nav {
    flex: 1;
    padding: 10px 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: var(--radius);
    border: none;
    background: transparent;
    color: var(--text2);
    font-size: 12px;
    font-weight: 500;
    text-align: left;
    transition: all 0.12s;
    position: relative;
}

.nav-item:hover {
    background: var(--bg3);
    color: var(--text);
}

.nav-item.active {
    background: rgba(124, 106, 244, 0.12);
    color: var(--accent);
}

.nav-item.sprint {
    color: var(--orange);
}

.nav-item.sprint.active {
    background: rgba(249, 115, 22, 0.1);
}

.nav-badge {
    margin-left: auto;
    background: var(--bg4);
    color: var(--text2);
    font-size: 9px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.nav-badge.orange {
    background: rgba(249, 115, 22, 0.15);
    color: var(--orange);
}

.nav-divider {
    height: 1px;
    background: var(--border);
    margin: 6px 0;
}

.sidebar-footer {
    padding: 12px 14px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.week-chip {
    background: rgba(124, 106, 244, 0.12);
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    text-align: center;
    letter-spacing: 0.04em;
}

.sidebar-time {
    font-size: 10px;
    color: var(--text3);
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
}

/* ── Topbar ── */
.topbar {
    height: 54px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    flex-shrink: 0;
    background: var(--bg2);
}

.topbar-left {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.page-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

.page-sub {
    font-size: 11px;
    color: var(--text3);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
}

.user-av {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
}

/* ── Screens ── */
.screen {
    display: none;
    flex-direction: column;
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    gap: 14px;
    min-height: 0;
}

.screen.active {
    display: flex;
}

/* ── KPI Bar ── */
.kpi-bar {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.kpi-card {
    flex: 1;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.kpi-card.sm {
    padding: 10px 12px;
}

.kpi-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text2);
}

.kpi-val {
    font-size: 22px;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text);
}

.kpi-val.sm {
    font-size: 18px;
}

.kpi-val.accent {
    color: var(--accent);
}

.kpi-val.green {
    color: var(--green);
}

.kpi-val.orange {
    color: var(--orange);
}

.kpi-val.blue {
    color: var(--blue);
}

/* ── Filter Row ── */
.filter-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.search-box {
    flex: 1;
    min-width: 200px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0 14px;
    height: 38px;
    color: var(--text);
    font-size: 13px;
    outline: none;
    transition: all 0.2s;
}

.search-box:focus {
    border-color: var(--border2);
}

.filter-sel {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0 12px;
    height: 38px;
    color: var(--text);
    font-size: 13px;
    outline: none;
    cursor: pointer;
    transition: all 0.2s;
}

.view-toggle {
    display: flex;
    gap: 2px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 3px;
    height: 38px;
    align-items: center;
}

.vt-btn {
    width: 28px;
    height: 28px;
    border-radius: 5px;
    border: none;
    background: transparent;
    color: var(--text2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.12s;
}

.vt-btn.active {
    background: var(--bg4);
    color: var(--accent);
}

/* ── Task Grid ── */
.task-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 10px;
    align-content: start;
}

.task-grid.list-view {
    grid-template-columns: 1fr;
}

.task-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    cursor: pointer;
    transition: border-color 0.15s, transform 0.1s;
    position: relative;
    overflow: hidden;
}

.task-card:hover {
    border-color: var(--border2);
    transform: translateY(-1px);
}

.task-card.carry-over {
    border-left: 2px solid var(--orange);
}

.task-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 7px;
}

.client-tag {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 2px 7px;
    border-radius: 3px;
    background: rgba(124, 106, 244, 0.12);
    color: var(--accent);
}

.week-tag {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 2px 6px;
    border-radius: 3px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--blue);
}

.carry-tag {
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 3px;
    background: rgba(249, 115, 22, 0.12);
    color: var(--orange);
}

.task-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.task-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
}

.task-assignee {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: var(--text2);
}

.av-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.task-due {
    font-size: 10px;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text3);
}

.task-due.overdue {
    color: var(--red);
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-dot.pending {
    background: var(--yellow);
}

.status-dot.inprogress {
    background: var(--blue);
}

.status-dot.waiting {
    background: var(--orange);
}

.status-dot.done {
    background: var(--green);
}

.status-dot.carryover {
    background: var(--orange);
}

/* list view card */
.task-grid.list-view .task-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
}

.task-grid.list-view .task-title {
    margin: 0;
    font-size: 12px;
    flex: 1;
    -webkit-line-clamp: 1;
    line-clamp: 1;
}

.task-grid.list-view .task-card-top {
    margin: 0;
}

.task-grid.list-view .task-meta {
    margin: 0;
}

/* ── Buttons ── */
.btn-primary {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 600;
    transition: opacity 0.15s;
}

.btn-primary:hover {
    opacity: 0.88;
}

.btn-ghost {
    display: flex;
    align-items: center;
    gap: 5px;
    background: transparent;
    border: 1px solid var(--border2);
    border-radius: var(--radius);
    color: var(--text2);
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.12s;
}

.btn-ghost:hover {
    color: var(--text);
    border-color: var(--border2);
    background: var(--bg3);
}

.btn-ghost.sm {
    padding: 5px 10px;
    font-size: 11px;
}

.btn-ghost.lg {
    padding: 10px 20px;
    font-size: 13px;
}

.btn-danger {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--red);
    border-radius: var(--radius);
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.15s;
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.18);
}

.btn-sm {
    background: var(--bg4);
    border: 1px solid var(--border2);
    color: var(--text2);
    border-radius: 5px;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 500;
    transition: all 0.12s;
    white-space: nowrap;
}

.btn-sm:hover {
    color: var(--text);
    border-color: var(--accent);
}

/* ── Designer Board ── */
.designer-tabs {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.dtab {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    border-radius: var(--radius);
    background: var(--bg2);
    border: 1px solid var(--border);
    color: var(--text2);
    font-size: 12px;
    font-weight: 500;
    transition: all 0.12s;
    position: relative;
}

.dtab.active {
    border-color: var(--accent);
    background: rgba(124, 106, 244, 0.1);
    color: var(--text);
}

.dtab-av {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.dtab-av.sm {
    width: 28px;
    height: 28px;
    font-size: 11px;
}

.dtab-count {
    background: var(--bg4);
    color: var(--text3);
    font-size: 9px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 8px;
    min-width: 16px;
    text-align: center;
}

.board-cols {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    flex: 1;
    min-height: 0;
}

.board-col {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.board-col-hdr {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 10px 12px;
    font-size: 11px;
    font-weight: 600;
    border-bottom: 1px solid var(--border);
}

.col-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.col-dot.yellow {
    background: var(--yellow);
}

.col-dot.blue {
    background: var(--blue);
}

.col-dot.orange {
    background: var(--orange);
}

.col-dot.green {
    background: var(--green);
}

.col-cnt {
    margin-left: auto;
    background: var(--bg4);
    color: var(--text3);
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 8px;
}

.board-col-body {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.board-card {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 10px;
    cursor: pointer;
    transition: border-color 0.12s;
}

.board-card:hover {
    border-color: var(--border2);
}

.board-card.dragging {
    opacity: 0.5;
    border: 1px dashed var(--accent);
}

.board-card.locked {
    opacity: 0.7;
    filter: grayscale(0.4);
    cursor: default;
}

.locked-status {
    font-size: 10px;
    font-weight: 700;
    color: var(--text3);
    text-transform: uppercase;
    background: var(--bg4);
    padding: 2px 8px;
    border-radius: 4px;
}

.board-card-client {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text3);
    margin-bottom: 4px;
}

.board-card-title {
    font-size: 11px;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 8px;
}

.board-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.board-card-due {
    font-size: 10px;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text3);
}

.status-sel {
    background: var(--bg4);
    border: 1px solid var(--border2);
    border-radius: 4px;
    color: var(--text2);
    font-size: 10px;
    padding: 3px 6px;
    cursor: pointer;
}

/* ── Weekly Tracker ── */
.weekly-header {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.week-selector {
    display: flex;
    align-items: center;
    gap: 8px;
}

.week-label {
    font-size: 14px;
    font-weight: 700;
    min-width: 70px;
    text-align: center;
}

.designer-pills,
.kpi-designer-sel {
    display: flex;
    gap: 6px;
}

.pill {
    padding: 5px 14px;
    border-radius: 20px;
    background: var(--bg2);
    border: 1px solid var(--border);
    color: var(--text2);
    font-size: 11px;
    font-weight: 500;
    transition: all 0.12s;
}

.pill.active {
    background: rgba(124, 106, 244, 0.12);
    border-color: var(--accent);
    color: var(--accent);
}

.weekly-stats {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.weekly-table-wrap {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: auto;
    flex: 1;
}

.weekly-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.weekly-table th {
    padding: 10px 12px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text2);
    text-align: left;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    background: var(--bg3);
}

.weekly-table td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
    font-size: 12px;
    color: var(--text);
}

.weekly-table tr:last-child td {
    border-bottom: none;
}

.weekly-table input,
.weekly-table select {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
    font-size: 11px;
    padding: 4px 7px;
    width: 100%;
    outline: none;
}

.weekly-table input:focus,
.weekly-table select:focus {
    border-color: var(--accent);
}

.weekly-total-row td {
    font-weight: 700;
    background: var(--bg3);
}

.mono {
    font-family: 'JetBrains Mono', monospace;
}

.accent {
    color: var(--accent);
}

.green {
    color: var(--green);
}

.orange {
    color: var(--orange);
}

.total-h {
    font-size: 14px;
    font-weight: 700;
}

/* ── KPI Screen ── */
.kpi-lb-wrap {
    flex-shrink: 0;
}

.panel {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.panel-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    font-weight: 600;
}

.panel-tag {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text3);
    background: var(--bg3);
    padding: 3px 8px;
    border-radius: 4px;
}

.lb-header {
    display: grid;
    grid-template-columns: 2.5fr 1fr 1fr 1fr 1fr 1fr;
    gap: 12px;
    padding: 12px 16px;
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text3);
    border-bottom: 1px solid var(--border);
    background: var(--bg3);
    align-items: center;
    line-height: 1.2;
}

.lb-row.month-mode,
.lb-header.month-mode {
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr 0.8fr 1.2fr;
    font-size: 8px;
}

.lb-week-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 0;
}

.lb-week-stats {
    font-size: 8px;
    color: var(--text3);
    white-space: nowrap;
}

.lb-week-score {
    font-weight: 700;
    color: var(--text);
    font-size: 11px;
}

.lb-row {
    display: grid;
    grid-template-columns: 2.5fr 1fr 1fr 1fr 1fr 1fr;
    gap: 12px;
    padding: 15px 16px;
    border-bottom: 1px solid var(--border);
    align-items: center;
    transition: background 0.12s;
}

.lb-row:hover {
    background: var(--bg3);
}

.lb-row:last-child {
    border-bottom: none;
}

.lb-name {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 14px;
    min-width: 0;
}

.lb-rank {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 800;
    background: var(--bg4);
    color: var(--text3);
}

.lb-rank.gold {
    background: rgba(234, 179, 8, 0.2);
    color: var(--yellow);
}

.lb-rank.silver {
    background: rgba(148, 163, 184, 0.18);
    color: #94a3b8;
}

.lb-rank.bronze {
    background: rgba(180, 83, 9, 0.15);
    color: #b45309;
}

.lb-val {
    font-size: 12px;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text2);
}

.lb-val.hi {
    color: var(--accent);
    font-weight: 700;
    font-size: 14px;
}

.kpi-designer-sel {
    flex-shrink: 0;
}

.kpi-table-wrap {
    overflow-x: auto;
}

.kpi-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1000px;
}

.kpi-table th {
    padding: 10px 12px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text2);
    text-align: left;
    border-bottom: 1px solid var(--border);
    background: var(--bg3);
    white-space: nowrap;
}

.kpi-table th small {
    display: block;
    font-size: 8px;
    opacity: 0.6;
    text-transform: none;
}

.kpi-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    font-size: 12px;
}

.kpi-table tr:last-child td {
    border-bottom: none;
}

.kpi-table tr:hover td {
    background: var(--bg3);
}

.kpi-input {
    width: 60px;
    text-align: center;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
    font-size: 12px;
    padding: 4px 6px;
    outline: none;
    transition: border-color 0.15s;
}

.kpi-input:focus {
    border-color: var(--accent);
}

.total-score-cell {
    font-size: 14px;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent);
}

/* ── Sprint Close ── */
.sprint-hero {
    text-align: center;
    padding: 24px 0 12px;
    flex-shrink: 0;
}

.sprint-week-label {
    font-size: 28px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 10px;
}

.sprint-desc {
    font-size: 13px;
    color: var(--text2);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.6;
}

.sprint-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    flex-shrink: 0;
}

.sprint-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
}

.sprint-card-hdr {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.sprint-card-name {
    font-size: 13px;
    font-weight: 700;
}

.sprint-card-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sc-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}

.sc-label {
    color: var(--text2);
}

.sc-val {
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

.sprint-summary {
    flex-shrink: 0;
}

.sprint-summary-stats {
    display: flex;
    gap: 0;
    padding: 16px;
}

.ss-stat {
    flex: 1;
    text-align: center;
    border-right: 1px solid var(--border);
}

.ss-stat:last-child {
    border-right: none;
}

.ss-val {
    display: block;
    font-size: 32px;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
}

.ss-label {
    font-size: 11px;
    color: var(--text2);
}

.sprint-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-shrink: 0;
    padding-top: 4px;
}

/* ── History ── */
.history-timeline {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.history-week-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
}

.hwc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.hwc-title {
    font-size: 15px;
    font-weight: 700;
}

.hwc-date {
    font-size: 11px;
    color: var(--text3);
    font-family: 'JetBrains Mono', monospace;
}

.hwc-designers {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.hwc-d {
    padding: 10px;
    background: var(--bg3);
    border-radius: 6px;
    border: 1px solid var(--border);
}

.hwc-d-name {
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 8px;
}

.hwc-d-rate {
    font-size: 22px;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
}

.hwc-d-rate.good {
    color: var(--green);
}

.hwc-d-rate.medium {
    color: var(--yellow);
}

.hwc-d-rate.poor {
    color: var(--red);
}

.hwc-d-sub {
    font-size: 10px;
    color: var(--text3);
    margin-top: 3px;
}

.carry-over-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 3px;
    background: rgba(249, 115, 22, 0.1);
    color: var(--orange);
    font-weight: 600;
}

.incomplete-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 3px;
    background: rgba(239, 68, 68, 0.1);
    color: var(--red);
    font-weight: 600;
}

/* ── Slide-in Panel (New Task) ── */
.panel-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.panel-overlay.open {
    opacity: 1;
    pointer-events: all;
}

/* ── Segmented Control (History) ── */
.segment-wrap {
    background: var(--bg3);
    padding: 4px;
    border-radius: 12px;
    display: inline-flex;
    gap: 4px;
    border: 1px solid var(--border);
    margin-bottom: 24px;
}

.segment-btn {
    padding: 8px 24px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--text2);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.light-mode .segment-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.segment-btn.active {
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 12px rgba(124, 106, 244, 0.3);
}

/* ── Theme Toggle ── */
.theme-toggle {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--border2);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg3);
    color: var(--text2);
    transition: all 0.2s;
    margin-right: 4px;
}

.theme-toggle:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--bg4);
}

.theme-toggle svg {
    width: 16px;
    height: 16px;
}


/* ── Suggestions List ── */
.suggestions-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg4);
    border: 1px solid var(--border2);
    border-radius: var(--radius);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: var(--shadow);
    margin-top: 4px;
}

.suggestions-list.open {
    display: block;
}

.suggestion-item {
    padding: 10px 12px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid var(--border);
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background: var(--accent);
    color: white;
}

.suggestion-item .name {
    font-weight: 600;
    display: block;
}

.suggestion-item .category {
    font-size: 10px;
    color: var(--text3);
}

.suggestion-item:hover .category {
    color: rgba(255, 255, 255, 0.7);
}


.slide-panel {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    width: 380px;
    background: var(--bg2);
    border-left: 1px solid var(--border);
    z-index: 101;
    transform: translateX(100%);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.slide-panel.open {
    transform: translateX(0);
}

.slide-panel-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.slide-panel-title {
    font-size: 15px;
    font-weight: 700;
}

.slide-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.slide-panel-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 14px 20px;
    border-top: 1px solid var(--border);
}

/* ── Form ── */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text2);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-input {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 13px;
    padding: 9px 12px;
    outline: none;
    transition: border-color 0.15s;
    resize: vertical;
}

.form-input:focus {
    border-color: var(--accent);
}

.form-input::placeholder {
    color: var(--text3);
}

.form-row {
    display: flex;
    gap: 10px;
}

.form-row .form-group {
    flex: 1;
}

.assign-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.assign-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: var(--radius);
    background: var(--bg3);
    border: 1px solid var(--border);
    color: var(--text2);
    font-size: 12px;
    font-weight: 500;
    transition: all 0.12s;
}

.assign-btn:hover {
    border-color: var(--border2);
    color: var(--text);
}

.assign-btn.selected {
    border-color: var(--accent);
    background: rgba(124, 106, 244, 0.1);
    color: var(--accent);
}

/* ── Modal ── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.modal {
    background: var(--bg2);
    border: 1px solid var(--border2);
    border-radius: var(--radius-lg);
    width: 520px;
    max-width: 90vw;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow);
}

.modal.sm {
    width: 400px;
}

.modal-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.modal-title {
    font-size: 15px;
    font-weight: 700;
}

.modal-close {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: transparent;
    border: none;
    color: var(--text2);
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.12s;
}

.modal-close:hover {
    background: var(--bg4);
    color: var(--text);
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 14px 20px;
    border-top: 1px solid var(--border);
}

.modal-row {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
}

.modal-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text3);
    width: 120px;
    flex-shrink: 0;
    padding-top: 1px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.modal-val {
    font-size: 12px;
    color: var(--text);
    flex: 1;
}

.confirm-stats {
    display: flex;
    gap: 16px;
    margin-top: 16px;
    padding: 14px;
    background: var(--bg3);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.cs-item {
    flex: 1;
    text-align: center;
}

.cs-val {
    font-size: 24px;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    display: block;
}

.cs-label {
    font-size: 10px;
    color: var(--text2);
}

/* ── Settings ── */
.settings-wrap {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.settings-list {
    display: flex;
    flex-direction: column;
}

.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}

.setting-row:last-child {
    border-bottom: none;
}

.sn {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
}

.sd {
    display: block;
    font-size: 11px;
    color: var(--text3);
}

.sc {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.setting-inp {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 11px;
    padding: 7px 10px;
    width: 220px;
    outline: none;
}

.setting-inp.short {
    width: 80px;
}

.conn-badge {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 4px;
    background: var(--bg4);
    color: var(--text2);
    font-weight: 600;
}

.conn-badge.ok {
    background: rgba(34, 197, 94, 0.12);
    color: var(--green);
}

.setup-steps {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.setup-step {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 12px;
    color: var(--text2);
    line-height: 1.5;
}

.step-num {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(124, 106, 244, 0.15);
    color: var(--accent);
    font-size: 10px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}

code {
    background: var(--bg4);
    color: var(--accent);
    padding: 1px 5px;
    border-radius: 3px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
}

/* ── Toast ── */
.toast-wrap {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 500;
}

.toast {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg3);
    border: 1px solid var(--border2);
    border-radius: var(--radius);
    padding: 10px 14px;
    font-size: 12px;
    color: var(--text);
    box-shadow: var(--shadow);
    animation: toastIn 0.2s ease;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Empty State ── */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 60px 20px;
    color: var(--text3);
    text-align: center;
}

/* ── Utility ── */
.blue {
    color: var(--blue);
}

.green {
    color: var(--green);
}

.orange {
    color: var(--orange);
}

.red {
    color: var(--red);
}

.accent {
    color: var(--accent);
}

.mono {
    font-family: 'JetBrains Mono', monospace;
}

/* ── KPI Controls ── */
.kpi-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    row-gap: 8px;
}

/* Make the vt-btn wider so text fits comfortably */
#kv-week,
#kv-month {
    width: auto !important;
    padding: 5px 14px;
    font-size: 11px;
    font-weight: 600;
}

.month-selector {
    display: flex;
    align-items: center;
    gap: 6px;
}

.week-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    min-width: 120px;
    text-align: center;
}


/* ── Client Cards ── */
.client-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 10px;
    align-content: start;
}

.client-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    transition: border-color 0.12s;
}

.client-card:hover {
    border-color: var(--border2);
}

.client-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.client-name {
    font-size: 14px;
    font-weight: 700;
}

.client-contact {
    font-size: 11px;
    color: var(--text2);
    margin-bottom: 4px;
}

.client-notes {
    font-size: 11px;
    color: var(--text3);
    line-height: 1.4;
}

.client-actions {
    display: flex;
    gap: 6px;
    margin-top: 10px;
}

.status-badge {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 3px 8px;
    border-radius: 3px;
}

.status-badge.active {
    background: rgba(34, 197, 94, 0.12);
    color: var(--green);
}

.status-badge.hold {
    background: rgba(234, 179, 8, 0.12);
    color: var(--yellow);
}

.btn-icon-del {
    background: transparent;
    border: none;
    color: var(--text3);
    cursor: pointer;
    font-size: 14px;
    padding: 2px 8px;
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon-del:hover {
    color: var(--red);
    background: rgba(239, 68, 68, 0.1);
}

.status-badge.completed {
    background: rgba(139, 144, 167, 0.12);
    color: var(--text2);
}

.status-badge.new {
    background: rgba(59, 130, 246, 0.12);
    color: var(--blue);
}

/* ── Team Management ── */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
    padding: 14px;
}

.team-card {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

.team-card-info {
    flex: 1;
    min-width: 0;
}

.team-card-name {
    font-size: 12px;
    font-weight: 700;
}

.team-card-role {
    font-size: 10px;
    color: var(--text2);
    margin-top: 2px;
}

.team-card-match {
    font-size: 9px;
    color: var(--text3);
    font-family: 'JetBrains Mono', monospace;
    margin-top: 3px;
}

.role-badge {
    font-size: 9px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.role-badge.designer {
    background: rgba(124, 106, 244, 0.12);
    color: var(--accent);
}

.role-badge.video {
    background: rgba(249, 115, 22, 0.12);
    color: var(--orange);
}

.role-badge.cd {
    background: rgba(34, 197, 94, 0.12);
    color: var(--green);
}

.role-badge.senior_designer {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.25), rgba(202, 138, 4, 0.35));
    color: var(--yellow);
    border: 1px solid rgba(234, 179, 8, 0.5);
    box-shadow: 0 0 8px rgba(234, 179, 8, 0.2);
    font-weight: 800;
    position: relative;
}

.team-add-form {
    padding: 14px 16px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 8px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.team-add-form .form-group {
    flex: 1;
    min-width: 120px;
}

/* ── Monthly KPI Records ── */
.monthly-record {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}

.monthly-record:last-child {
    border-bottom: none;
}

.monthly-record-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.monthly-record-title {
    font-size: 14px;
    font-weight: 700;
}

.monthly-record-date {
    font-size: 11px;
    color: var(--text3);
    font-family: 'JetBrains Mono', monospace;
}

.history-group {
    margin-top: 16px;
}

.history-group-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text3);
    border-bottom: 1px solid var(--border);
    padding-bottom: 6px;
    margin-bottom: 10px;
}

.monthly-designer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
}

.mds-card {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 10px;
}

.mds-name {
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mds-score {
    font-size: 22px;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
}

.mds-score.good {
    color: var(--green);
}

.mds-score.medium {
    color: var(--yellow);
}

.mds-score.poor {
    color: var(--red);
}

.mds-details {
    font-size: 10px;
    color: var(--text2);
    line-height: 1.7;
    margin-top: 4px;
}

/* ── vt-btn text variant ── */
.vt-btn.text {
    width: auto;
    padding: 5px 12px;
    font-size: 11px;
    font-weight: 600;
}

.vt-btn.text.active {
    background: rgba(124, 106, 244, 0.12);
    color: var(--accent);
}

/* ── Bottom Navigation (Mobile Only) ── */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65px;
    background: rgba(15, 16, 20, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    z-index: 1000;
    justify-content: space-around;
    align-items: center;
    padding: 0 10px;
}

.bn-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: var(--text2);
    font-size: 10px;
    font-weight: 500;
    padding: 8px 0;
    transition: color 0.2s;
}

.bn-item.active {
    color: var(--accent);
}

.bn-item svg {
    width: 20px;
    height: 20px;
}

@media (max-width: 850px) {

    body,
    .main {
        overflow-x: hidden !important;
        width: 100% !important;
        position: relative;
    }

    .screen {
        overflow-x: hidden !important;
        width: 100% !important;
        box-sizing: border-box;
        padding: 16px 12px !important;
    }

    body.sidebar-open {
        overflow: hidden !important;
    }

    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: revert !important;
    }

    .bottom-nav {
        display: flex;
        background: #09090c;
        border-top: 1px solid #1e2030;
        height: 65px;
        padding-bottom: env(safe-area-inset-bottom);
        z-index: 5000;
    }

    .bn-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        color: #4a4e68;
        background: none;
        border: none;
        font-size: 10px;
        font-weight: 600;
        transition: all 0.2s;
        text-decoration: none;
        cursor: pointer;
    }

    .bn-item.active {
        color: #7c6af4 !important;
    }

    .bn-item svg {
        width: 22px;
        height: 22px;
        stroke: currentColor;
    }

    .bn-item.active svg {
        stroke: #7c6af4;
    }

    .sidebar {
        position: fixed !important;
        left: 0;
        top: 0;
        bottom: 0;
        width: 280px !important;
        background: #0f1014;
        z-index: 3000;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex !important;
        border-right: 1px solid #1e2030;
        box-shadow: 20px 0 50px rgba(0, 0, 0, 0.5);
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    body.sidebar-open::after {
        content: '';
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(4px);
        z-index: 2500;
    }

    .main {
        width: 100% !important;
        margin-left: 0 !important;
    }

    .topbar {
        padding: 0 12px;
        background: #09090c;
        height: 60px;
        border-bottom: 1px solid #1e2030;
        position: sticky;
        top: 0;
        z-index: 2000;
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100% !important;
        box-sizing: border-box;
    }

    .topbar-left {
        display: flex;
        align-items: center;
        flex: 1;
        overflow: hidden;
    }

    .menu-btn {
        display: flex !important;
        background: none;
        border: none;
        color: white;
        padding: 5px;
        margin-right: 8px;
        flex-shrink: 0;
    }

    .page-title {
        font-size: 18px !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .page-sub,
    .topbar-right .btn-ghost span,
    .topbar-right .topbar-user {
        display: none !important;
    }

    .topbar-right {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    /* ── Designer Board Mobile Fix ── */
    .board-cols {
        display: flex !important;
        flex-direction: row !important;
        overflow-x: auto !important;
        gap: 12px;
        padding: 16px !important;
        width: 100% !important;
        box-sizing: border-box !important;
        margin: 0 !important;
    }

    .board-col {
        min-width: 280px !important;
        max-width: 280px !important;
        background: #0f1014;
        border: 1px solid #1e2030;
        border-radius: 12px;
        flex-shrink: 0;
    }

    #screen-board .panel-header {
        padding: 12px 0;
    }

    #screen-board>div:first-of-type {
        gap: 12px !important;
        justify-content: space-between !important;
    }

    .board-controls {
        margin-left: 0 !important;
        gap: 8px !important;
    }

    .custom-designer-selector {
        position: relative;
        flex: 1;
        min-width: 140px;
        max-width: 180px;
        cursor: pointer;
        z-index: 1000;
    }

    .selected-pill-wrap {
        background: #0f1014;
        border: 1px solid #1e2030;
        border-radius: 12px;
        padding: 6px 30px 6px 6px;
        display: flex;
        align-items: center;
        gap: 10px;
        position: relative;
    }

    .selected-pill-wrap::after {
        content: '';
        width: 0;
        height: 0;
        border-left: 5px solid transparent;
        border-right: 5px solid transparent;
        border-top: 5px solid var(--text3);
        position: absolute;
        right: 12px;
        top: 50%;
        transform: translateY(-50%);
    }

    .designer-dropdown-list {
        display: none;
        position: absolute;
        top: calc(100% + 8px);
        left: 0;
        right: 0;
        background: #1a1b26;
        border: 1px solid #2e3047;
        border-radius: 12px;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
        overflow: hidden;
        z-index: 1001;
        padding: 6px;
    }

    .designer-dropdown-list.open {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .designer-dropdown-list .dtab {
        border: none !important;
        background: transparent !important;
        width: 100%;
        justify-content: flex-start;
        padding: 8px 10px;
        border-radius: 8px;
    }

    .designer-dropdown-list .dtab:hover {
        background: rgba(124, 106, 244, 0.1) !important;
    }

    .designer-dropdown-list .dtab.active {
        background: var(--bg4) !important;
        color: var(--accent) !important;
    }

    .designer-tabs {
        display: none !important;
    }

    /* Forms & Modals */
    .modal,
    .slide-panel {
        width: 100% !important;
        height: 100% !important;
        margin: 0 !important;
        border-radius: 0 !important;
        max-width: 100% !important;
        z-index: 4000;
    }

    .modal-overlay {
        padding: 0;
        z-index: 3500;
    }

    /* Tables to Cards */
    .weekly-table,
    .kpi-table,
    .works-table,
    .weekly-table-wrap,
    .kpi-table-wrap,
    .weekly-body,
    tbody,
    tfoot {
        display: block !important;
        width: 100% !important;
        border: none;
        background: none;
        box-sizing: border-box !important;
        margin: 0 !important;
        padding: 0 !important;
        min-width: 0 !important;
    }

    .weekly-table thead,
    .kpi-table thead,
    .works-table thead {
        display: none;
    }

    .weekly-table tr,
    .kpi-table tr,
    .works-table tr,
    .weekly-total-row {
        display: block !important;
        background: #0f1014;
        border: 1px solid #1e2030;
        border-radius: 12px;
        margin-bottom: 16px;
        padding: 15px;
        width: 100% !important;
        box-sizing: border-box !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .weekly-table td,
    .kpi-table td,
    .works-table td,
    .weekly-total-row td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.03);
        min-height: 44px;
    }

    .weekly-table td:last-child {
        border-bottom: none;
    }

    .weekly-table td::before,
    .kpi-table td::before,
    .works-table td::before {
        content: attr(data-label);
        font-weight: 700;
        color: #4a4e68;
        font-size: 10px;
        text-transform: uppercase;
    }

    /* Stats Grids & Selection Bars - Swipe Ready */
    .kpi-bar,
    .weekly-stats,
    .sprint-grid,
    .designer-pills,
    .kpi-designer-sel,
    .filter-row {
        display: flex !important;
        flex-direction: row !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        gap: 12px;
        padding: 5px 16px 15px !important;
        margin: 0 -16px 10px !important;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
        align-items: center;
        scrollbar-width: none;
    }

    .weekly-header {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0 !important;
    }

    .pill-scroll-wrap {
        order: 1 !important;
        overflow: visible !important;
        margin-bottom: 5px !important;
    }

    .week-selector {
        order: 2 !important;
        background: var(--bg3);
        border: 1px solid var(--border);
        border-radius: 10px;
        padding: 4px;
        margin-bottom: 15px !important;
        width: 100% !important;
        justify-content: space-between !important;
        display: flex !important;
        align-items: center;
    }

    .weekly-header>button {
        order: 3 !important;
        width: 100% !important;
        margin-bottom: 10px !important;
    }

    .kpi-bar::-webkit-scrollbar,
    .weekly-stats::-webkit-scrollbar {
        display: none;
    }

    .kpi-card,
    .sprint-card {
        min-width: 150px;
        flex-shrink: 0;
        background: #0f1014;
        border: 1px solid #1e2030;
        border-radius: 12px;
        padding: 16px;
    }

    /* Specific Elements */
    .kpi-task-title {
        color: #7c6af4 !important;
        font-size: 18px !important;
        font-weight: 800;
        text-align: center;
        width: 100%;
        display: block;
        padding-top: 10px;
    }

    .auto-row {
        border-left: 3px solid #3b82f6 !important;
        background: rgba(59, 130, 246, 0.03) !important;
    }

    /* Settings Revert */
    .setting-row {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 12px 16px !important;
        gap: 10px;
    }

    .setting-inp {
        width: 140px !important;
        margin-top: 0 !important;
    }

    .sc {
        width: auto;
    }

    /* arrangement fix */
    .weekly-table td,
    .kpi-table td {
        padding: 10px 16px !important;
    }

    .weekly-table td::before,
    .kpi-table td::before {
        width: 40% !important;
        text-align: left;
    }

    /* History Fix */
    #screen-history .dashboard-stats,
    .kpi-bar {
        display: flex !important;
        flex-direction: row !important;
        overflow-x: auto !important;
        padding: 16px !important;
        gap: 12px;
        margin: 0 -16px !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    #screen-history .dashboard-stats::-webkit-scrollbar {
        display: none;
    }

    .av-dot,
    .dtab-av,
    .user-av {
        width: 32px !important;
        height: 32px !important;
        border-radius: 16px !important;
        font-size: 11px !important;
    }
}

/* ───── Premium Styles (Weekly Tracker) ───── */
.toggle-check {
    appearance: none;
    -webkit-appearance: none;
    width: 38px;
    height: 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border2);
    border-radius: 100px;
    position: relative;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    vertical-align: middle;
}

.toggle-check:checked {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.5);
}

.toggle-check::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 3px;
    width: 12px;
    height: 12px;
    background: #ef4444;
    border-radius: 50%;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.toggle-check:checked::after {
    left: 21px;
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.4);
}

.toggle-check:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    filter: grayscale(1);
}

.seg-picker {
    display: inline-flex;
    background: var(--bg4);
    border: 1px solid var(--border2);
    border-radius: 40px;
    padding: 2px;
    gap: 1px;
}

.seg-btn {
    background: transparent;
    border: none;
    padding: 2px 8px;
    font-size: 9px;
    font-weight: 700;
    color: var(--text3);
    border-radius: 40px;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 24px;
    text-transform: uppercase;
}

.seg-btn.active.no {
    background: #ef4444;
    color: white;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
}

.seg-btn.active.half {
    background: var(--orange);
    color: white;
    box-shadow: 0 2px 6px rgba(251, 146, 60, 0.4);
}

.seg-btn.active.yes {
    background: #22c55e;
    color: white;
    box-shadow: 0 2px 6px rgba(34, 197, 94, 0.4);
}

.seg-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

/* 🔐 Login Screen */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    backdrop-filter: blur(10px);
}

.login-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 20px;
    width: 100%;
    max-width: 380px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.brand-icon.lg {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    background: rgba(124, 106, 244, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
}

.brand-icon.lg svg {
    width: 30px;
    height: 30px;
}

.login-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text);
}

.login-sub {
    font-size: 14px;
    color: var(--text2);
    margin-bottom: 30px;
}

.w-full {
    width: 100%;
}

.login-error {
    margin-top: 15px;
    color: #ef4444;
    font-size: 12px;
    font-weight: 500;
    min-height: 18px;
}

/* Password Toggle */
.pass-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.pass-wrap input {
    width: 100%;
    flex: 1;
}

.pass-wrap .form-input,
.pass-wrap .setting-inp {
    padding-right: 40px;
}

.pass-toggle {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--text3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.5;
    transition: all 0.2s ease;
    z-index: 5;
}

.pass-toggle:hover {
    opacity: 1;
    color: var(--accent);
}

.pass-toggle svg {
    width: 16px;
    height: 16px;
    display: block;
}

/* Login Specific Fixes */
.login-card .form-group {
    text-align: left;
    margin-bottom: 20px;
}

.login-card .form-group label {
    margin-left: 2px;
    margin-bottom: 8px;
    color: var(--text2);
    font-size: 11px;
    font-weight: 600;
}

.login-card .form-input {
    width: 100%;
    height: 44px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border2);
    border-radius: 12px;
    font-size: 14px;
}

.login-card .form-input:focus {
    border-color: var(--accent);
    background: rgba(124, 106, 244, 0.05);
}

.login-card .btn-primary {
    height: 48px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    margin-top: 10px;
    background: var(--accent);
    box-shadow: 0 8px 20px rgba(124, 106, 244, 0.3);
    transition: all 0.2s ease;
}

.login-card .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(124, 106, 244, 0.4);
    background: var(--accent2);
}