/* ═══════════════════════════════════════════════════════════
   FigBoard — CSS
   Dark, editorial aesthetic with warm accent
   ═══════════════════════════════════════════════════════════ */

:root {
    --bg: #0f0f13;
    --bg-surface: #16161d;
    --bg-raised: #1e1e28;
    --bg-hover: #252530;
    --bg-input: #1a1a24;
    --border: #2a2a38;
    --border-focus: #e94560;
    --text: #e8e8ed;
    --text-muted: #8888a0;
    --text-dim: #5a5a72;
    --accent: #e94560;
    --accent-hover: #ff5a78;
    --accent-soft: rgba(233, 69, 96, 0.12);
    --green: #22c55e;
    --yellow: #f59e0b;
    --blue: #3b82f6;
    --purple: #8b5cf6;
    --red: #ef4444;
    --radius: 8px;
    --radius-sm: 5px;
    --radius-lg: 14px;
    --font: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --shadow: 0 4px 24px rgba(0,0,0,.35);
    --shadow-lg: 0 12px 48px rgba(0,0,0,.5);
    --transition: 180ms ease;
}

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

html { font-size: 14px; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* ── Top Nav ──────────────────────────────────────────── */

.topnav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    height: 64px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.topnav-left, .topnav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text);
    letter-spacing: -0.02em;
    margin-right: 1.75rem;
}
.logo:hover { color: var(--text); }

.board-switcher {
    display: flex;
    gap: 3px;
}

.board-tab {
    padding: 0.5rem 1.1rem;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
}
.board-tab:hover { background: var(--bg-hover); color: var(--text); }
.board-tab.active {
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
}
.board-tab .board-name {
    font-size: 0.82rem;
    opacity: 0.6;
    margin-left: 0.3rem;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
}

.nav-btn {
    padding: 0.45rem 0.9rem;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    transition: var(--transition);
}
.nav-btn:hover { background: var(--bg-hover); color: var(--text); }
.nav-btn--ghost { opacity: 0.7; }

/* ── User Menu Dropdown ───────────────────────────────── */

.user-menu {
    position: relative;
}
.user-menu__toggle {
    background: none;
    border: 2px solid transparent;
    border-radius: 50%;
    padding: 2px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.user-menu__toggle:hover {
    border-color: var(--accent);
}
.user-menu__avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}
.user-menu__avatar--placeholder {
    background: var(--accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
}
.user-menu__dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 200px;
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(0,0,0,0.45);
    z-index: 1000;
    padding: 0.35rem 0;
}
.user-menu__dropdown.open {
    display: block;
}
.user-menu__header {
    padding: 0.6rem 0.9rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.88rem;
    color: var(--text);
}
.user-menu__divider {
    height: 1px;
    background: var(--border);
    margin: 0.25rem 0;
}
.user-menu__item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.9rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
}
.user-menu__item:hover {
    background: var(--bg-hover);
    color: var(--text);
}
.user-menu__item--danger:hover {
    color: var(--danger);
}

/* ── Bug Report Button ─────────────────────────────────── */

.nav-btn--bug {
    background: none;
    border: 1px solid var(--accent);
    color: var(--accent);
    cursor: pointer;
    font-family: inherit;
}
.nav-btn--bug:hover {
    background: var(--accent-soft);
    color: var(--accent-hover);
}

/* ── Bug Report Modal ─────────────────────────────────── */

.bug-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 2000;
}
.bug-modal-overlay.open { display: block; }

.bug-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    width: 480px;
    max-width: 92vw;
    max-height: 80vh;
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 16px 48px rgba(0,0,0,0.5);
    z-index: 2001;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.15s, transform 0.15s;
}
.bug-modal.open {
    display: block;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}
.bug-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
}
.bug-modal__header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}
.bug-modal__header h3 svg { color: var(--accent); }
.bug-modal__close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.25rem;
}
.bug-modal__close:hover { color: var(--text); }
.bug-modal__body { padding: 1.25rem; }
.bug-modal__hint {
    font-size: 0.82rem;
    color: var(--text-dim);
    margin: 0 0 0.75rem;
}
.bug-modal__textarea {
    width: 100%;
    resize: vertical;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: inherit;
    font-size: 0.88rem;
    padding: 0.75rem;
    line-height: 1.5;
    transition: border-color 0.15s;
    box-sizing: border-box;
}
.bug-modal__textarea:focus {
    outline: none;
    border-color: var(--accent);
}
.bug-modal__footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--border);
}
.bug-modal__footer .btn { display: flex; align-items: center; gap: 0.35rem; }

/* ── Bugs Page ────────────────────────────────────────── */

.bugs-wrapper {
    max-width: 960px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}
.bugs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}
.bugs-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}
.bugs-filter-group {
    display: flex;
    gap: 0.35rem;
}
.bugs-count {
    font-size: 0.72rem;
    background: rgba(255,255,255,0.08);
    padding: 0.1rem 0.4rem;
    border-radius: 8px;
    margin-left: 0.2rem;
}
.bugs-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-dim);
}
.bugs-empty svg { margin-bottom: 1rem; opacity: 0.4; }
.bugs-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.bug-card {
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.15s;
}
.bug-card:hover { border-color: var(--border-focus); }
.bug-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg-surface);
}
.bug-card__meta {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    font-size: 0.82rem;
}
.bug-card__id {
    font-weight: 700;
    color: var(--accent);
    font-family: 'JetBrains Mono', monospace;
}
.bug-card__status {
    padding: 0.15rem 0.55rem;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.bug-card__status--open { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.bug-card__status--resolved { background: rgba(34, 197, 94, 0.15); color: #22c55e; }
.bug-card__reporter { color: var(--text-muted); }
.bug-card__time { color: var(--text-dim); font-size: 0.78rem; }
.bug-card__actions { display: flex; gap: 0.35rem; align-items: center; }
.bug-card__body { padding: 1rem; }
.bug-card__description {
    font-size: 0.9rem;
    color: var(--text);
    line-height: 1.6;
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
}
.bug-card__url {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.78rem;
    color: var(--accent);
    word-break: break-all;
}
.bug-card__url:hover { text-decoration: underline; }
.bug-card__resolved {
    padding: 0.4rem 1rem;
    font-size: 0.78rem;
    color: var(--green);
    border-top: 1px solid var(--border);
}
.bug-card__note-section {
    padding: 0.5rem 1rem 0.75rem;
    border-top: 1px solid var(--border);
}
.bug-card__note {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.82rem;
    padding: 0.5rem;
    resize: vertical;
    min-height: 2rem;
    box-sizing: border-box;
}
.bug-card__note:focus {
    outline: none;
    border-color: var(--accent);
    color: var(--text);
}

/* ── Flash ────────────────────────────────────────────── */

.flash-container { padding: 0.75rem 1.5rem; }
.flash {
    padding: 0.65rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    animation: slideDown 0.25s ease;
}
.flash--success { background: rgba(34,197,94,.12); color: var(--green); border: 1px solid rgba(34,197,94,.2); }
.flash--danger { background: rgba(239,68,68,.12); color: var(--red); border: 1px solid rgba(239,68,68,.2); }
.flash--warning { background: rgba(245,158,11,.12); color: var(--yellow); border: 1px solid rgba(245,158,11,.2); }
.flash-close {
    background: none; border: none; color: inherit; font-size: 1.2rem; cursor: pointer;
    opacity: 0.6; padding: 0 0.3rem;
}
.flash-close:hover { opacity: 1; }

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

@keyframes slideUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Toast Notifications ─────────────────────────────── */
#toast-container {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    pointer-events: none;
}
.toast {
    background: #1e1e28;
    border: 1px solid #2a2a38;
    color: #e8e8ed;
    padding: 0.85rem 1.4rem;
    border-radius: 10px;
    font-size: 0.93rem;
    font-family: 'DM Sans', sans-serif;
    box-shadow: 0 4px 24px rgba(0,0,0,.45);
    line-height: 1.5;
    word-break: break-word;
    pointer-events: all;
    cursor: pointer;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.6s ease, transform 0.25s ease;
}
.toast--visible {
    opacity: 1;
    transform: translateY(0);
}
.toast--hiding {
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.5s ease, transform 0.4s ease;
}
.toast--success { border-color: #22c55e; }
.toast--danger  { border-color: #ef4444; }
.toast--warning { border-color: #f59e0b; }

/* ── Main Content ─────────────────────────────────────── */

.main-content { padding: 1.5rem; max-width: 1600px; margin: 0 auto; }

.site-footer {
    text-align: center;
    padding: 1.5rem 1rem;
    font-size: .75rem;
    color: var(--text-muted);
    letter-spacing: .03em;
    opacity: .6;
}

.board-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    margin-bottom: 1.25rem;
}

.board-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-self: start;
}

/* Planning board identity card */
.board-id-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(135deg, var(--bg-surface) 0%, rgba(233,69,96,0.08) 100%);
    border: 1px solid rgba(233,69,96,0.25);
    border-radius: var(--radius-lg);
    padding: 0.9rem 1.4rem;
    position: relative;
    overflow: hidden;
}
.board-id-card::before {
    content: '';
    position: absolute;
    top: -30px;
    left: -30px;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(233,69,96,0.18) 0%, transparent 70%);
    pointer-events: none;
}

.board-id-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--accent) 0%, #f472b6 100%);
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(233,69,96,0.35);
}

.board-id-card__body {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.board-id-card__label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    opacity: 0.85;
}

.board-id-card__name {
    font-size: 1.7rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text);
    line-height: 1.15;
}

/* ── Done Progress Bars ──────────────────────────────── */

.progress-group {
    display: flex;
    align-items: stretch;
    gap: 1rem;
    justify-self: center;
}

.progress-box {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 0.75rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 280px;
}

.progress-box-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border);
}

.progress-box-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.progress-box-total {
    font-size: 1.15rem;
    font-weight: 800;
    color: #4ade80;
}

.progress-box-items {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.figma-progress {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.figma-progress-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
    min-width: 110px;
}

.figma-progress-bar {
    width: 120px;
    height: 8px;
    background: var(--bg-input);
    border-radius: 99px;
    overflow: hidden;
}

.figma-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #22c55e, #4ade80);
    border-radius: 99px;
    transition: width 0.4s ease;
}

.figma-progress-pct {
    font-size: 0.95rem;
    font-weight: 700;
    color: #4ade80;
    min-width: 3rem;
    text-align: right;
}

.empty-state {
    text-align: center;
    padding: 6rem 2rem;
}
.empty-state h2 { margin-top: 1rem; font-size: 1.4rem; }
.empty-state p { color: var(--text-muted); margin-top: 0.5rem; }

/* ── Filters ──────────────────────────────────────────── */

.toolbar-row {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    margin-bottom: 1rem;
}

.filters-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    align-items: center;
}

.filter-input {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.75rem;
    color: var(--text);
    font-family: var(--font);
    font-size: 0.85rem;
    width: 240px;
    transition: var(--transition);
}
.filter-input:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 2px var(--accent-soft);
}

.filter-select {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.75rem;
    color: var(--text);
    font-family: var(--font);
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
}
.filter-select:focus {
    outline: none;
    border-color: var(--border-focus);
}

/* ── Column Filter Icon + Dropdown ─────────────────────── */

.filter-wrap {
    position: relative;
    display: inline-block;
    vertical-align: middle;
    margin-left: 0.2rem;
}

.filter-icon-btn {
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    padding: 0 0.15rem;
    line-height: 1;
    opacity: 0.7;
    transition: var(--transition);
    vertical-align: middle;
}
.filter-icon-btn svg {
    width: 13px;
    height: 13px;
    fill: currentColor;
}
.filter-icon-btn:hover {
    opacity: 1;
    color: #ffffff;
}
.filter-icon-btn.active {
    opacity: 1;
    color: var(--accent);
}

.filter-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.35rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    min-width: 120px;
    margin-top: 0.25rem;
}
.filter-dropdown.open {
    display: block;
}

.col-filter-select {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.25rem 0.4rem;
    color: var(--text);
    font-family: var(--font);
    font-size: 0.75rem;
    transition: var(--transition);
}
.col-filter-select:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 2px var(--accent-soft);
}

/* ── Table ────────────────────────────────────────────── */

.table-wrapper {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow-x: auto;
    background: var(--bg-surface);
}

.feature-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.feature-table thead {
    background: var(--bg-raised);
    position: sticky;
    top: 0;
    z-index: 10;
}

.feature-table th {
    padding: 0.7rem 0.75rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--border);
    border-right: 1px solid var(--border);
    white-space: nowrap;
    user-select: none;
}
.feature-table th:last-child {
    border-right: none;
}

.feature-table th.sortable {
    cursor: pointer;
    transition: var(--transition);
}
.feature-table th.sortable:hover {
    color: var(--text);
    background: var(--bg-hover);
}

.feature-table th .sort-icon::after { content: '↕'; font-size: 0.7rem; margin-left: 0.3rem; opacity: 0.7; color: #ffffff; }
.feature-table th.sort-asc .sort-icon::after { content: '↑'; opacity: 1; color: var(--accent); }
.feature-table th.sort-desc .sort-icon::after { content: '↓'; opacity: 1; color: var(--accent); }

.feature-table td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--border);
    border-right: 1px solid var(--border);
    vertical-align: middle;
}
.feature-table td:last-child {
    border-right: none;
}

.feature-row {
    transition: background var(--transition);
}
.feature-row:hover {
    background: var(--bg-hover);
}

.col-feature { min-width: 220px; max-width: 320px; }
.col-owners { text-align: left; }
.col-ux { text-align: center; }
.col-status-combined { min-width: 150px; text-align: center; }
.col-figma-combined { min-width: 150px; text-align: center; }
.col-ux-status { min-width: 120px; text-align: center; }
.col-teams { min-width: 70px; text-align: center; }
.col-notes { min-width: 50px; text-align: center; }
.col-links { min-width: 50px; text-align: center; }
.col-chat { min-width: 60px; text-align: center; }
.col-todo { min-width: 70px; text-align: center; }
.col-actions { width: 60px; text-align: center; }

/* Status stack (combined QBR+PI in one column) */
.status-stack { display: flex; flex-direction: column; gap: 3px; }
.status-stack-row {
    display: grid;
    grid-template-columns: 26px 1fr 28px;
    align-items: center;
    gap: 0;
}
/* QBR/PI conditional visibility: each column responds to its own status */
.feature-row:not(.feature-qbr-passed) .col-status-combined .status-stack-row--pi { display: none; }
.feature-row.feature-qbr-passed .col-status-combined .status-stack-row--qbr { display: none; }
.feature-row:not(.figma-qbr-passed) .col-figma-combined .status-stack-row--pi { display: none; }
.feature-row.figma-qbr-passed .col-figma-combined .status-stack-row--qbr { display: none; }
.status-stack-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    text-align: left;
    letter-spacing: 0.03em;
    padding-right: 4px;
}
/* The status-with-link inside a stack row fills its grid cell */
.status-stack-row .status-with-link {
    display: contents;
}
.status-stack-row .status-with-link .status-badge {
    /* occupies the middle grid column */
    width: 100%;
    min-width: 0;
}
.status-stack-row .status-with-link .status-icons {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    flex-shrink: 0;
}
.status-stack-row .status-with-link .status-icons:not(:has(*)) {
    visibility: hidden;
    pointer-events: none;
}
.status-stack-row .status-with-link .status-icons .status-icon-btn {
    width: 19px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Filter sub-labels */
.filter-sub-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: 6px;
    margin-bottom: 2px;
    letter-spacing: 0.03em;
}

/* Team toggle buttons */
.team-toggles { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.team-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 3px 8px;
    font-size: 0.7rem;
    font-weight: 700;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--bg-input);
    color: var(--text-dim);
    cursor: pointer;
    transition: var(--transition);
    line-height: 1.4;
    width: 64px;
    text-align: center;
}
.team-btn svg { flex-shrink: 0; }
.team-btn:hover { opacity: 0.85; }
.team-btn--active {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    border-color: rgba(34, 197, 94, 0.4);
}
.team-btn:disabled { cursor: not-allowed; opacity: 0.5; }

/* Board count box — matches planning board card style */
.board-count-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-surface) 0%, rgba(233,69,96,0.08) 100%);
    border: 1px solid rgba(233,69,96,0.25);
    border-radius: var(--radius-lg);
    padding: 0.7rem 1.4rem;
    min-width: 90px;
    position: relative;
    overflow: hidden;
}
.board-count-box::before {
    content: '';
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 70px;
    height: 70px;
    background: radial-gradient(circle, rgba(233,69,96,0.15) 0%, transparent 70%);
    pointer-events: none;
}
.board-count-box__number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
    position: relative;
}
.board-count-box__label {
    font-size: 0.62rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-weight: 700;
    margin-top: 0.15rem;
    position: relative;
}

/* Editable cells */
.cell-text {
    cursor: text;
    padding: 0.15rem 0.3rem;
    border-radius: 3px;
    transition: var(--transition);
    display: block;
    word-break: break-word;
    white-space: normal;
    line-height: 1.4;
}
.cell-text:hover { background: var(--bg-input); }

.notes-btn {
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-dim);
    cursor: pointer;
    padding: 0.25rem 0.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.notes-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
}
.notes-btn.has-notes {
    border-color: #60a5fa;
    color: #60a5fa;
}
.notes-textarea {
    width: 100%;
    min-height: 120px;
    resize: vertical;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Notes rich-text editor */
.notes-toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0.4rem 0.5rem;
    background: #1a1a24;
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.notes-tool-btn {
    background: none;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.2rem 0.5rem;
    font-size: 0.85rem;
    line-height: 1;
    transition: var(--transition);
}
.notes-tool-btn:hover {
    border-color: var(--border);
    color: var(--text);
    background: var(--bg-hover);
}
.notes-tool-sep {
    width: 1px;
    height: 18px;
    background: var(--border);
    margin: 0 4px;
}
.notes-color-swatch {
    width: 20px;
    height: 20px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 50%;
    background: var(--swatch);
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}
.notes-color-swatch:hover {
    border-color: #fff;
    transform: scale(1.15);
}
.notes-editor {
    width: 100%;
    min-height: 150px;
    max-height: 400px;
    overflow-y: auto;
    padding: 0.75rem;
    background: #000;
    color: #fff;
    border: 1px solid var(--border);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    font-size: 0.9rem;
    line-height: 1.6;
    outline: none;
}
.notes-editor:focus {
    border-color: var(--accent);
}
.notes-editor:empty::before {
    content: attr(data-placeholder);
    color: var(--text-dim);
    pointer-events: none;
}
.notes-editor[contenteditable="false"] {
    opacity: 0.7;
    cursor: default;
}
/* When no toolbar (viewer), round all corners */
.modal-body > .notes-editor:first-child {
    border-radius: var(--radius-sm);
}
.notes-last-edited {
    font-size: 0.75rem;
    color: var(--text-dim);
    padding: 0.35rem 0.5rem 0;
    text-align: right;
    min-height: 1.2em;
}

/* Links */
.link-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.55rem;
    border-radius: 99px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 500;
    white-space: nowrap;
    transition: var(--transition);
}
.link-pill:hover { background: rgba(233,69,96,.2); color: var(--accent-hover); }
.link-pill--small { font-size: 0.74rem; padding: 0.15rem 0.45rem; }
.link-pill--figma { background: rgba(162,89,255,.12); color: #a259ff; }
.link-pill--figma:hover { background: rgba(162,89,255,.22); color: #b77aff; }

.edit-link-btn {
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 0.8rem;
    padding: 0.1rem 0.25rem;
    border-radius: 3px;
    opacity: 0;
    transition: var(--transition);
}
.feature-row:hover .edit-link-btn { opacity: 1; }
.edit-link-btn:hover { color: var(--accent); background: var(--accent-soft); }

/* Status badges (select dropdowns) */
.status-badge {
    -webkit-appearance: none;
    appearance: none;
    background: color-mix(in srgb, var(--badge-color) 15%, transparent);
    color: var(--badge-color);
    border: 1px solid color-mix(in srgb, var(--badge-color) 25%, transparent);
    border-radius: 99px;
    padding: 0.25rem 0.65rem;
    font-family: var(--font);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    text-align-last: center;
}
.status-badge:hover {
    background: color-mix(in srgb, var(--badge-color) 25%, transparent);
}
.status-badge:focus {
    outline: none;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--badge-color) 20%, transparent);
}

/* ── Custom Status Dropdown ───────────────────────────── */

.status-dropdown {
    position: relative;
    display: inline-block;
}
.status-dropdown__trigger {
    display: inline-block;
    background: color-mix(in srgb, var(--badge-color) 15%, transparent);
    color: var(--badge-color);
    border: 1px solid color-mix(in srgb, var(--badge-color) 25%, transparent);
    border-radius: 99px;
    padding: 0.25rem 0.65rem;
    font-family: var(--font);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    line-height: 1.4;
    white-space: nowrap;
    user-select: none;
}
.status-dropdown__trigger:hover {
    background: color-mix(in srgb, var(--badge-color) 25%, transparent);
}
.status-dropdown__trigger--open {
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--badge-color) 20%, transparent);
}
.status-dropdown__trigger--disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}
.status-dropdown__menu {
    display: none;
    position: fixed;
    min-width: 140px;
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.3rem;
    z-index: 10000;
    box-shadow: 0 8px 24px rgba(0,0,0,.4);
    animation: modalIn 0.12s ease;
}
.status-dropdown__menu--open {
    display: block;
}
.status-dropdown__option {
    display: block;
    width: 100%;
    padding: 0.35rem 0.6rem;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--opt-color);
    font-family: var(--font);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: background 0.1s;
    white-space: nowrap;
}
.status-dropdown__option:hover {
    background: color-mix(in srgb, var(--opt-color) 15%, transparent);
}
.status-dropdown__option--selected {
    background: color-mix(in srgb, var(--opt-color) 12%, transparent);
}
.status-dropdown__option::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--opt-color);
    margin-right: 0.5rem;
    vertical-align: middle;
}

/* Chat button */
.chat-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    padding: 0.3rem 0.55rem;
    cursor: pointer;
    font-family: var(--font);
    font-size: 0.8rem;
    transition: var(--transition);
}
.chat-btn:hover {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent);
}
.chat-btn--active {
    border-color: #f59e0b;
    color: #f59e0b;
}
.chat-btn--active:hover {
    background: rgba(245,158,11,.12);
    border-color: #d97706;
    color: #d97706;
}

.comment-count {
    font-weight: 700;
    font-size: 0.75rem;
    min-width: 1.2em;
    text-align: center;
}

/* Comment preview tooltip */
.comment-preview {
    display: none;
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-right: 8px;
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.6rem 0.8rem;
    width: 280px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 200;
    box-shadow: var(--shadow);
    font-size: 0.8rem;
}
.comment-preview.show { display: block; }
.comment-preview .cp-item {
    padding: 0.35rem 0;
    border-bottom: 1px solid var(--border);
}
.comment-preview .cp-item:last-child { border-bottom: none; }
.comment-preview .cp-author { color: var(--accent); font-weight: 600; font-size: 0.75rem; }
.comment-preview .cp-text { color: var(--text-muted); margin-top: 0.1rem; }
.comment-preview .cp-time { color: var(--text-dim); font-size: 0.7rem; }
.comment-preview .cp-empty { color: var(--text-dim); font-style: italic; }

/* Delete action */
.action-btn {
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    padding: 0.3rem;
    border-radius: var(--radius-sm);
    opacity: 0.7;
    transition: var(--transition);
}
.action-btn:hover { opacity: 1; }
.action-btn--delete:hover { color: var(--red); background: rgba(239,68,68,.1); }
.action-btn--move:hover { color: var(--blue); background: rgba(59,130,246,.1); }
.action-btn--backlog:hover { color: #a78bfa; background: rgba(167,139,250,.1); }
.action-btn--restore:hover { color: #34d399; background: rgba(52,211,153,.1); }

/* Backlog page */
.col-backlogged-at { width: 80px; text-align: center; }
.toggle-group { display: flex; gap: 0.25rem; }

/* Backlog picker */
.backlog-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.backlog-item-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    width: 100%;
    background: var(--bg-input);
    border: none;
    color: var(--text);
    padding: 0.55rem 0.75rem;
    font-size: 0.88rem;
    text-align: left;
    cursor: pointer;
    transition: var(--transition);
}
.backlog-item-btn:hover { background: var(--accent-soft); color: var(--accent); }
.backlog-item-name { font-weight: 600; }
.backlog-item-meta { font-size: 0.75rem; color: var(--text-muted); }
.backlog-restore-confirm {
    background: var(--bg-raised);
    border-top: 1px solid var(--border);
    padding: 0.6rem 0.75rem;
}
.action-btn--disabled {
    display: inline-flex;
    align-items: center;
    background: none;
    border: none;
    padding: 0.3rem;
    border-radius: var(--radius-sm);
    color: var(--text-dim);
    opacity: 0.2;
    cursor: not-allowed;
    pointer-events: none;
}

/* ── Buttons ──────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    font-family: var(--font);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-hover); }

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border-color: var(--border);
}
.btn-ghost:hover { background: var(--bg-hover); color: var(--text); }

.btn-secondary {
    background: rgba(167,139,250,.12);
    color: #a78bfa;
    border-color: rgba(167,139,250,.25);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.btn-secondary:hover { background: rgba(167,139,250,.22); }

.btn-danger {
    background: rgba(239,68,68,.15);
    color: var(--red);
    border-color: rgba(239,68,68,.25);
}
.btn-danger:hover { background: rgba(239,68,68,.25); }

.btn-sm { padding: 0.3rem 0.6rem; font-size: 0.78rem; }
.btn-full { width: 100%; justify-content: center; }

/* ── Modals ───────────────────────────────────────────── */

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    backdrop-filter: blur(4px);
    z-index: 1100;
    align-items: center;
    justify-content: center;
}
.modal-overlay.open { display: flex; }

.modal {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 560px;
    max-width: 95vw;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.2s ease;
}
.modal--small { width: 400px; }

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

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

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0 0.3rem;
    line-height: 1;
}
.modal-close:hover { color: var(--text); }

.modal-body { padding: 1.25rem; }
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--border);
}

/* ── Forms ────────────────────────────────────────────── */

.form-group { margin-bottom: 0.9rem; }
.form-group label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group input[type="url"],
.form-group input[type="number"],
.form-group textarea,
.form-group select {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.55rem 0.75rem;
    color: var(--text);
    font-family: var(--font);
    font-size: 0.88rem;
    transition: var(--transition);
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 2px var(--accent-soft);
}

.form-group textarea { resize: vertical; }

.form-row {
    display: flex;
    gap: 0.75rem;
}
.form-row .form-group { flex: 1; }

.links-details {
    margin-top: 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.8rem;
}
.links-details summary {
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 500;
}
.links-details[open] summary { margin-bottom: 0.6rem; }

/* ── Comments Panel (slide-in) ────────────────────────── */

.comments-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    z-index: 400;
}
.comments-overlay.open { display: block; z-index: 950; }

.comments-panel {
    position: fixed;
    top: 0;
    right: -420px;
    width: 400px;
    max-width: 90vw;
    height: 100vh;
    background: var(--bg-surface);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 450;
    transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-lg);
}
.comments-panel.open { right: 0; z-index: 1000; }

.comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.comments-header h2 {
    font-size: 0.95rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 280px;
}

.comments-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.comments-loading {
    color: var(--text-dim);
    text-align: center;
    padding: 2rem;
}

.comment-item {
    padding: 0.75rem;
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
    background: var(--bg-raised);
    animation: commentIn 0.2s ease;
}
@keyframes commentIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}
.comment-item.mine { border-left: 3px solid var(--accent); }

.comment-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.35rem;
}
.comment-author { font-weight: 600; font-size: 0.82rem; color: var(--accent); }
.comment-time { font-size: 0.72rem; color: var(--text-dim); }
.comment-text { font-size: 0.85rem; color: var(--text-muted); line-height: 1.45; white-space: pre-wrap; }
.comment-delete {
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 0.7rem;
    opacity: 0;
    transition: var(--transition);
    padding: 0.15rem 0.3rem;
    border-radius: 3px;
}
.comment-item:hover .comment-delete { opacity: 1; }
.todo-item:hover .comment-delete { opacity: 1; }
.comment-delete:hover { color: var(--red); background: rgba(239,68,68,.1); }

.todo-delete-btn {
    background: none;
    border: 1px solid rgba(239,68,68,.35);
    color: var(--red);
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    flex-shrink: 0;
    transition: var(--transition);
}
.todo-delete-btn:hover { background: rgba(239,68,68,.12); border-color: var(--red); }

.comments-empty {
    text-align: center;
    color: var(--text-dim);
    padding: 3rem 1rem;
    font-size: 0.88rem;
}
.comments-empty svg { margin-bottom: 0.5rem; opacity: 0.3; }

.comments-input {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
    align-items: flex-end;
}
.comments-input textarea {
    flex: 1;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.7rem;
    color: var(--text);
    font-family: var(--font);
    font-size: 0.85rem;
    resize: none;
    transition: var(--transition);
}
.comments-input textarea:focus {
    outline: none;
    border-color: var(--border-focus);
}

/* ── Jira Badge ──────────────────────────────────────── */

.field-error {
    color: #ef4444;
    font-size: 0.78rem;
    margin-top: 0.3rem;
    min-height: 0;
}

.jira-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.1rem 0.4rem;
    margin-left: 0.4rem;
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 4px;
    text-decoration: none;
    letter-spacing: 0.02em;
    vertical-align: middle;
    transition: var(--transition);
    white-space: nowrap;
}
.jira-badge:hover {
    background: rgba(59, 130, 246, 0.25);
    color: #93bbfc;
    border-color: rgba(59, 130, 246, 0.5);
}

.figma-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.1rem 0.4rem;
    margin-left: 0.4rem;
    background: rgba(162, 89, 255, 0.12);
    color: #c084fc;
    border: 1px solid rgba(162, 89, 255, 0.3);
    border-radius: 4px;
    text-decoration: none;
    letter-spacing: 0.02em;
    vertical-align: middle;
    transition: var(--transition);
    white-space: nowrap;
}
.figma-badge:hover {
    background: rgba(162, 89, 255, 0.22);
    color: #d8b4fe;
    border-color: rgba(162, 89, 255, 0.5);
}

/* ── Login ────────────────────────────────────────────── */

.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 52px);
}

.login-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    width: 380px;
    max-width: 95vw;
    box-shadow: var(--shadow-lg);
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}
.login-logo h1 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-top: 0.75rem;
    letter-spacing: -0.03em;
}
.login-subtitle {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-top: 0.25rem;
}

/* ── Profile ──────────────────────────────────────────── */

.profile-wrapper {
    display: flex;
    justify-content: center;
    padding-top: 2rem;
}

.profile-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    width: 450px;
    max-width: 95vw;
    text-align: center;
}

.profile-avatar-large {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 auto 1rem;
}

.profile-role { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 1.5rem; }
.profile-form { text-align: left; }
.profile-form hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 1.5rem 0;
}
.profile-form h3 {
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

/* ── Admin ────────────────────────────────────────────── */

.admin-wrapper { max-width: 1100px; margin: 0 auto; }

.admin-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    letter-spacing: -0.03em;
}

.admin-tabs {
    display: flex;
    gap: 2px;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0;
}

.admin-tab {
    padding: 0.6rem 1.2rem;
    border: none;
    background: none;
    color: var(--text-muted);
    font-family: var(--font);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: var(--transition);
}
.admin-tab:hover { color: var(--text); }
.admin-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.admin-section.hidden { display: none; }

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}
.section-header h2 { font-size: 1.1rem; }

.admin-form-inline {
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
}
.admin-form-inline h3 { font-size: 0.88rem; margin-bottom: 0.75rem; color: var(--text-muted); }
.admin-form-inline .form-row { flex-wrap: wrap; }
.admin-form-inline .form-group { min-width: 140px; }
.form-group--action { display: flex; align-items: flex-end; }

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.admin-table th {
    background: var(--bg-raised);
    padding: 0.6rem 0.8rem;
    text-align: left;
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-bottom: 1px solid var(--border);
}
.admin-table td {
    padding: 0.5rem 0.8rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.table-input {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.35rem 0.5rem;
    color: var(--text);
    font-family: var(--font);
    font-size: 0.82rem;
    width: 100%;
}
.table-input:focus { outline: none; border-color: var(--border-focus); }
.table-input--small { width: 100px; }

.table-select {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.3rem 0.4rem;
    color: var(--text);
    font-size: 0.82rem;
}

.actions-cell {
    display: flex;
    gap: 0.3rem;
    align-items: center;
    flex-wrap: wrap;
}

/* Toggle switch */
.toggle {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--bg-hover);
    border-radius: 20px;
    transition: var(--transition);
}
.toggle-slider::before {
    content: '';
    position: absolute;
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: var(--transition);
}
.toggle input:checked + .toggle-slider { background: var(--accent-soft); }
.toggle input:checked + .toggle-slider::before { transform: translateX(16px); background: var(--accent); }

.toggle-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    cursor: pointer;
}

/* Status options */
.status-columns { display: flex; gap: 2rem; }
.status-col { flex: 1; }
.status-col h3 { font-size: 0.95rem; margin-bottom: 0.75rem; }

.status-list {
    list-style: none;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.status-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
}
.status-list li:last-child { border-bottom: none; }

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

/* Owner list drag-and-drop + inline edit */
.owner-list-item,
.status-sortable-item {
    cursor: default;
}
.drag-handle {
    cursor: grab;
    color: var(--text-dim);
    padding: 0 0.2rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}
.drag-handle:active { cursor: grabbing; }
.owner-editable-name {
    flex: 1;
    border-radius: 3px;
    padding: 0.1rem 0.3rem;
    outline: none;
    cursor: text;
    transition: background var(--transition);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.owner-editable-name:focus {
    background: var(--bg-hover);
    box-shadow: 0 0 0 1px var(--border-focus);
}
.owner-list-item.dragging,
.status-sortable-item.dragging {
    opacity: 0.4;
}
.owner-list-item.drag-over,
.status-sortable-item.drag-over {
    border-top: 2px solid var(--accent);
}

.btn-icon-delete {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0 0.3rem;
    line-height: 1;
}
.btn-icon-delete:hover { color: var(--red); }

.color-input {
    width: 40px !important;
    height: 34px;
    padding: 2px !important;
    border: 1px solid var(--border) !important;
    border-radius: 4px !important;
    cursor: pointer;
    background: var(--bg-input) !important;
}

.color-input--sm {
    width: 26px !important;
    height: 26px;
    padding: 1px !important;
    flex-shrink: 0;
}

.status-edit-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
}

.status-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sort-order-input {
    width: 48px;
    padding: 2px 4px;
    font-size: 0.8rem;
    text-align: center;
    background: var(--bg-input);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 4px;
    flex-shrink: 0;
}

/* Settings */
.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.settings-card {
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
}
.settings-card h3 { font-size: 0.95rem; margin-bottom: 1rem; }

/* ── Permissions Tab ──────────────────────────────────── */

.perm-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}
.perm-card {
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    overflow-x: auto;
}
.perm-card__title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.85rem;
    color: var(--text);
}
.perm-card .admin-table td.perm-yes {
    color: #4ade80;
    font-weight: 600;
    text-align: center;
}
.perm-card .admin-table td.perm-no {
    color: var(--text-dim);
    text-align: center;
}
.perm-card .admin-table td:first-child { text-align: left; }
.perm-card .admin-table th { text-align: center; }
.perm-card .admin-table th:first-child { text-align: left; }

/* ── Responsive ───────────────────────────────────────── */

@media (max-width: 900px) {
    .settings-grid { grid-template-columns: 1fr; }
    .status-columns { flex-direction: column; }
    .board-switcher { display: none; }
    .filters-row { flex-wrap: wrap; }
    .filter-input { width: 100%; }
}

/* ── Scrollbar ────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

/* ── Nav Avatar & Role Tag ────────────────────────────── */

.nav-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border);
}

.role-tag {
    font-size: 0.7rem;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

/* ── Owners / UX Columns ───────────────────────────────── */

.col-owners { min-width: 140px; }
.col-ux { min-width: 100px; }

.owners-stack {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.owner-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.owner-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    min-width: 28px;
    letter-spacing: 0.03em;
}

.owner-value {
    display: inline-block;
    background: color-mix(in srgb, var(--text-muted) 12%, transparent);
    color: var(--text-muted);
    border: 1px solid color-mix(in srgb, var(--text-muted) 20%, transparent);
    border-radius: 99px;
    padding: 0.25rem 0.65rem;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
    opacity: 0.7;
}

.owner-select {
    flex: 1;
    min-width: 0;
    font-size: 0.78rem !important;
    padding: 0.15rem 0.3rem !important;
}

.user-select {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font);
    font-size: 0.8rem;
    padding: 0.25rem 0.4rem;
    width: 100%;
    cursor: pointer;
    transition: var(--transition);
}
.user-select:hover { border-color: var(--text-dim); }
.user-select:focus { border-color: var(--border-focus); outline: none; }

.user-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.user-pill-avatar {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border);
}

.ux-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    justify-content: center;
}

.ux-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.72rem;
    padding: 0.15rem 0.45rem;
    background: #2a2d3e;
    border: 1px solid #5c6bc0;
    border-radius: 12px;
    color: #c5cae9;
    white-space: nowrap;
}

.ux-assign-btn {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    min-height: 28px;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-align: center;
    cursor: pointer;
    border: none;
    background: transparent;
}
.ux-assign-btn:hover { background: var(--bg-hover); border-radius: var(--radius-sm); }

.text-muted { color: var(--text-dim); font-size: 0.8rem; }

/* ── Checkbox Grid (UX assignment modals) ─────────────── */

.checkbox-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text);
    padding: 0.35rem 0.5rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}
.checkbox-label:hover { background: var(--bg-hover); }
.checkbox-label input[type="checkbox"] {
    accent-color: var(--accent);
    width: 16px;
    height: 16px;
}
.checkbox-label--sm {
    font-size: 0.72rem;
    padding: 0.2rem 0.3rem;
    gap: 0.3rem;
    white-space: nowrap;
    color: var(--text-muted);
}

/* ── Profile Avatar ───────────────────────────────────── */

.profile-avatar-section {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.profile-avatar-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent);
}

.file-input {
    display: block;
    width: 100%;
    padding: 0.5rem;
    background: var(--bg-input);
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font);
    font-size: 0.85rem;
    cursor: pointer;
}
.file-input:hover { border-color: var(--text-dim); }

.form-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-top: 0.25rem;
}

/* ── Links Details Accordion ──────────────────────────── */

.links-details {
    margin-top: 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.75rem;
}
.links-details summary {
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
}
.links-details[open] summary { margin-bottom: 0.75rem; }

/* ── Small Modal Variant ──────────────────────────────── */

.modal--small {
    max-width: 400px;
}

/* ── To-Do Items ──────────────────────────────────────── */

.todo-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: none;
    border: none;
    color: var(--text-dim);
    font: inherit;
    cursor: pointer;
    padding: 0.3rem 0.5rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.todo-btn:hover { background: var(--bg-hover); color: var(--text); }
.todo-btn--green { color: #22c55e; }
.todo-btn--green .todo-counter { color: #22c55e; }
.todo-btn--green:hover { color: #16a34a; }
.todo-btn--red { color: #f87171; }
.todo-btn--red .todo-counter { color: #f87171; }
.todo-btn--red:hover { color: #ef4444; }

.todo-counter {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
}

.todo-item {
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}
.todo-item:hover { background: var(--bg-hover); }

.todo-item-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
}

.todo-title {
    font-size: 0.88rem;
    color: var(--text);
    line-height: 1.4;
    word-break: break-word;
}

.todo-item-footer {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.4rem;
}

.todo-status-select {
    display: none;
}

.todo-meta {
    font-size: 0.72rem;
    color: var(--text-dim);
}

.todo-add-input {
    flex: 1;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.65rem;
    color: var(--text);
    font: inherit;
    font-size: 0.88rem;
    outline: none;
    transition: var(--transition);
}
.todo-add-input:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.todos-panel .comments-input {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* ─── Status with inline link icon ────────────────────── */

.status-with-link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
}

.status-with-link .status-badge {
    flex: 1;
    min-width: 0;
}

.status-with-link .status-icons {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-left: auto;
    width: 38px;  /* fixed: pen slot (19px) + redirect slot (19px) */
}

.status-with-link .status-icons .status-icon-btn {
    width: 19px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.status-link-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.15rem;
    border-radius: var(--radius-sm);
    color: var(--text-dim);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    opacity: 0.5;
}
.status-link-btn:hover {
    opacity: 1;
    color: var(--accent);
    background: var(--accent-soft);
}

.status-icons {
    display: inline-flex;
    gap: 0.15rem;
    align-items: center;
}

.status-icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.2rem;
    border-radius: var(--radius-sm);
    color: #ffffff;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    opacity: 0.7;
    text-decoration: none;
}
.status-icon-btn:hover {
    opacity: 1;
    color: var(--accent);
    background: var(--accent-soft);
}
.status-icon-btn--go {
    opacity: 0.8;
    color: var(--accent);
}
.status-icon-btn--go:hover {
    opacity: 1;
    background: var(--accent-soft);
}
.status-icon-btn--figma {
    color: #a78bfa;
}
.status-icon-btn--figma:hover {
    background: rgba(167, 139, 250, 0.15);
}
.status-icon-btn--disabled {
    opacity: 0.2;
    cursor: default;
    pointer-events: none;
}

/* Reset-to-QBR button */
.reset-qbr-btn {
    color: #f59e0b;
}
.reset-qbr-btn:hover {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.15);
}

/* Reset-to-QBR popup (positioned fixed via JS on document.body) */
.reset-qbr-popup {
    z-index: 1000;
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 6px 0;
    min-width: 160px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6);
}
.reset-qbr-popup__title {
    padding: 4px 12px 6px;
    font-size: 0.7rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.reset-qbr-popup__item {
    display: block;
    width: 100%;
    padding: 5px 12px;
    text-align: left;
    background: none;
    border: none;
    color: var(--text);
    font-size: 0.8rem;
    cursor: pointer;
    border-left: 3px solid var(--badge-color, #94a3b8);
    transition: background 0.15s;
}
.reset-qbr-popup__item:hover {
    background: var(--hover);
}

.status-link-icon {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem;
    border-radius: var(--radius-sm);
    color: var(--accent);
    opacity: 0.7;
    transition: var(--transition);
}
.status-link-icon:hover {
    opacity: 1;
    background: var(--accent-soft);
}
.status-link-icon--figma {
    color: #a78bfa;
}
.status-link-icon--figma:hover {
    background: rgba(167, 139, 250, 0.15);
}

/* ─── Links button (single column) ───────────────────── */

.links-btn {
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-dim);
    cursor: pointer;
    padding: 0.25rem 0.4rem;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    transition: var(--transition);
    font-size: 0.75rem;
}
.links-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
}
.links-btn.has-links {
    border-color: #60a5fa;
    color: #60a5fa;
}

.links-count {
    font-size: 0.68rem;
    font-weight: 700;
    background: var(--accent);
    color: #fff;
    border-radius: 99px;
    min-width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* ─── Links Popup Table ──────────────────────────────── */

.modal--medium {
    max-width: 600px;
}

.links-popup-table {
    width: 100%;
    border-collapse: collapse;
}
.links-popup-table th {
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-dim);
    padding: 0.4rem 0.5rem;
    border-bottom: 1px solid var(--border);
}
.links-popup-table td {
    padding: 0.4rem 0.5rem;
}
.links-popup-table input.form-input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.35rem 0.5rem;
    color: var(--text);
    font: inherit;
    font-size: 0.85rem;
    outline: none;
    transition: var(--transition);
}
.links-popup-table input.form-input:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.link-open-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem;
    border-radius: var(--radius-sm);
    color: var(--accent);
    opacity: 0.7;
    transition: var(--transition);
}
.link-open-btn:hover {
    opacity: 1;
    background: var(--accent-soft);
}

/* ─── Todo Notes ─────────────────────────────────────── */

.todo-note {
    margin-top: 0.4rem;
    padding: 0.35rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
}
.todo-note--pm {
    background: rgba(59, 130, 246, 0.08);
    border-left: 2px solid #3b82f6;
}
.todo-note--ux {
    background: rgba(167, 139, 250, 0.08);
    border-left: 2px solid #a78bfa;
}
.todo-note-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-dim);
    margin-bottom: 0.15rem;
    display: block;
}
.todo-note-text {
    min-height: 1.2em;
    outline: none;
    padding: 0.15rem 0;
    color: var(--text);
    cursor: text;
    border-radius: 2px;
    transition: background var(--transition);
}
.todo-note-text:focus {
    background: var(--bg-input);
}
.todo-note-text:empty::before {
    content: 'Add a note…';
    color: var(--text-dim);
    font-style: italic;
}

/* ─── Todo clickable links ───────────────────────────── */

.todo-link {
    color: var(--accent);
    text-decoration: underline;
    word-break: break-all;
}
.todo-link:hover {
    color: #93c5fd;
}

/* ─── Todo Link Row ──────────────────────────────────── */

.todo-link-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.3rem;
    font-size: 0.78rem;
    color: var(--text-muted);
}
.todo-link-row svg {
    flex-shrink: 0;
    opacity: 0.5;
}
.todo-link-row .todo-link {
    font-size: 0.78rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 280px;
}
.todo-link-edit {
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: 0;
    opacity: 0.5;
    transition: var(--transition);
    flex-shrink: 0;
}
.todo-link-edit:hover { opacity: 1; color: var(--accent); }

.todo-link-add {
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0;
    opacity: 0.7;
    transition: var(--transition);
}
.todo-link-add:hover { opacity: 1; }

/* ─── Notification Bell ──────────────────────────────── */

.notif-bell {
    position: relative;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.45rem;
    height: 44px;
    margin-left: 0.25rem;
}
.notif-bell:hover {
    color: var(--text);
    background: var(--bg-hover);
    border-color: var(--accent);
}
.notif-bell.has-unread {
    border-color: var(--accent);
    color: var(--accent);
}
.notif-bell__label {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.notif-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--accent);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
}

/* ─── Notification Panel ─────────────────────────────── */

.notif-overlay {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: transparent;
}
.notif-panel {
    position: fixed;
    top: 64px;
    right: -420px;
    width: 400px;
    max-width: calc(100vw - 2rem);
    height: calc(100vh - 64px);
    background: var(--bg-surface);
    border-left: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: right 250ms ease;
}
.notif-panel.open { right: 0; }

.notif-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.2rem;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.notif-panel-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}
.notif-panel-actions {
    display: flex;
    gap: 0.4rem;
}
.notif-panel-actions .btn {
    font-size: 0.72rem;
    padding: 0.25rem 0.5rem;
    gap: 0.3rem;
}

.notif-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 0;
}
.notif-empty {
    padding: 2rem 1.2rem;
    text-align: center;
    color: var(--text-dim);
    font-size: 0.85rem;
}

/* ─── Notification Item ──────────────────────────────── */

.notif-item {
    display: flex;
    gap: 0.6rem;
    padding: 0.7rem 1.2rem;
    cursor: pointer;
    transition: background var(--transition);
    border-bottom: 1px solid var(--border);
}
.notif-item:hover { background: var(--bg-hover); }
.notif-item.unread { background: rgba(233, 69, 96, 0.04); }

.notif-item-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 6px;
    background: transparent;
    transition: var(--transition);
}
.notif-item-dot.active { background: var(--accent); }

.notif-item-body { flex: 1; min-width: 0; }

.notif-item-top {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.2rem;
}
.notif-item-icon { font-size: 1.1rem; flex-shrink: 0; }
.notif-item-action {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.notif-item-time {
    font-size: 0.72rem;
    color: var(--text-dim);
    margin-left: auto;
    flex-shrink: 0;
    font-family: var(--font-mono);
}

.notif-item-detail {
    font-size: 0.87rem;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 0.25rem;
}

.notif-item-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
}
.notif-item-actor { color: var(--accent); font-weight: 600; }
.notif-item-feature { color: var(--blue); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }

.notif-item.read .notif-item-action { color: var(--text-muted); font-weight: 500; }
.notif-item.read .notif-item-detail { color: var(--text-dim); }
.notif-item.read .notif-item-actor { color: var(--text-dim); }

/* ─── UX Team Cards (Admin) ─────────────────────────── */

.ux-team-card {
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 0.75rem;
}
.ux-team-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.ux-team-card-header select {
    flex: 1;
    max-width: 240px;
}
.ux-team-members {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    align-items: center;
}
.ux-team-member {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
    color: var(--text);
    cursor: pointer;
}
.ux-team-member input[type="checkbox"] {
    accent-color: var(--accent);
}

/* ─── Todo Reopen ────────────────────────────────────── */

.todo-reopen-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    margin-top: 0.35rem;
    padding: 0.35rem 0.55rem;
    background: rgba(251, 146, 60, 0.10);
    border-left: 2px solid #fb923c;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    color: #fdba74;
    line-height: 1.35;
}
.todo-reopen-banner svg {
    flex-shrink: 0;
    margin-top: 0.05rem;
    color: #fb923c;
}
.todo-reopen-banner strong {
    color: #fb923c;
    font-weight: 700;
}

.todo-reopen-btn {
    background: none;
    border: 1px solid rgba(251, 146, 60, 0.3);
    color: #fb923c;
    cursor: pointer;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.1rem 0.45rem;
    border-radius: 99px;
    transition: var(--transition);
    white-space: nowrap;
}
.todo-reopen-btn:hover {
    background: rgba(251, 146, 60, 0.15);
    border-color: #fb923c;
}

/* Todo dropdown - smaller variant */
.todo-item .status-dropdown__trigger {
    font-size: 0.72rem;
    padding: 0.15rem 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.todo-item .status-dropdown__menu {
    min-width: 120px;
}
.todo-item .status-dropdown__option {
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.todo-status-select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ═══════════════════════════════════════════════════════════
   Event Viewer Drawer
   ═══════════════════════════════════════════════════════════ */

.event-drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 900;
    transform: translateY(calc(100% - 36px));
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.event-drawer.open {
    transform: translateY(0);
}

.event-drawer-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: var(--radius) var(--radius) 0 0;
    padding: 0.45rem 1.2rem;
    color: var(--text-muted);
    font-family: var(--font);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    margin-left: 1.5rem;
    width: auto;
    display: inline-flex;
    transition: var(--transition);
}
.event-drawer-tab:hover {
    color: var(--text);
    background: var(--bg-hover);
}

.event-drawer-chevron {
    transition: transform 0.3s ease;
}
.event-drawer.open .event-drawer-chevron {
    transform: rotate(180deg);
}

.event-drawer-body {
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
    height: 260px;
    display: flex;
    flex-direction: column;
}

.event-drawer-toolbar {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid var(--border);
    align-items: center;
    flex-shrink: 0;
}

.event-filter-input {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.35rem 0.65rem;
    color: var(--text);
    font-family: var(--font);
    font-size: 0.8rem;
    width: 280px;
    transition: var(--transition);
}
.event-filter-input:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 2px var(--accent-soft);
}

.event-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.25rem 0;
    font-size: 0.8rem;
    font-family: var(--font-mono);
}

.event-empty {
    text-align: center;
    color: var(--text-dim);
    padding: 2rem;
    font-family: var(--font);
}

.event-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.3rem 1rem;
    border-bottom: 1px solid rgba(42, 42, 56, 0.4);
    transition: background var(--transition);
}
.event-row:hover {
    background: var(--bg-hover);
}

.event-icon {
    font-size: 0.85rem;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

.event-time {
    color: var(--text-dim);
    flex-shrink: 0;
    width: 90px;
    font-size: 0.75rem;
}

.event-user {
    color: var(--accent);
    font-weight: 600;
    flex-shrink: 0;
    min-width: 80px;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: var(--font);
    font-size: 0.78rem;
}

.event-action {
    color: var(--text);
    font-weight: 500;
    flex-shrink: 0;
    min-width: 120px;
    font-family: var(--font);
    font-size: 0.78rem;
}

.event-detail {
    color: var(--text-muted);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.75rem;
}

.event-feature {
    color: var(--blue);
    font-size: 0.72rem;
    flex-shrink: 0;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: var(--font);
    font-weight: 500;
}

/* Adjust main-content to leave space for drawer tab */
body { padding-bottom: 40px; }

/* ── UX Management Page ───────────────────────────────── */
.ux-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.ux-widget {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1rem 1.2rem;
}
.ux-widget__title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.75rem;
}
.ux-widget__body { padding: 0; }

.ux-member-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 1.25rem;
    overflow: hidden;
}
.ux-member-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1.2rem;
    background: linear-gradient(135deg, var(--bg-surface) 0%, rgba(233,69,96,0.06) 100%);
    border-bottom: 1px solid var(--border);
}
.ux-member-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.ux-member-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}
.ux-member-avatar--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 700;
    font-size: 0.95rem;
}
.ux-member-name {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}
.ux-member-stats {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.ux-mgmt-table th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    padding: 0.5rem 0.75rem;
    background: var(--bg-raised);
    border-bottom: 1px solid var(--border);
}
.ux-mgmt-table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
}
.ux-mgmt-feature-name {
    font-weight: 500;
    color: var(--text);
}

.status-badge-static {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    font-weight: 500;
    background: color-mix(in srgb, var(--badge-color) 18%, transparent);
    color: var(--badge-color);
    white-space: nowrap;
}

.effort-select {
    width: 60px;
    padding: 0.25rem 0.4rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-input);
    color: var(--text);
    font-size: 0.85rem;
    font-family: var(--font);
    cursor: pointer;
    text-align: center;
}
.effort-select:focus {
    border-color: var(--border-focus);
    outline: none;
}
