/* POPPYS — Design system · Dark / Light */

:root,
[data-theme="dark"] {
    --bg-base: #09090b;
    --bg-raised: #111113;
    --bg-surface: #18181b;
    --bg-hover: #1f1f23;
    --bg-input: #0c0c0e;
    --border: #27272a;
    --border-subtle: #1f1f23;
    --text: #fafafa;
    --text-secondary: #a1a1aa;
    --text-tertiary: #71717a;
    --accent: #e30613;
    --accent-hover: #c00510;
    --accent-muted: rgba(227, 6, 19, 0.12);
    --accent-gold: #c9a227;
    --success: #22c55e;
    --success-muted: rgba(34, 197, 94, 0.12);
    --warning: #eab308;
    --warning-muted: rgba(234, 179, 8, 0.12);
    --danger: #ef4444;
    --danger-muted: rgba(239, 68, 68, 0.12);
    --info: #3b82f6;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.55);
    --radius-sm: 6px;
    --radius: 8px;
    --radius-lg: 12px;
    --sidebar-w: 268px;
    --topbar-h: 60px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color-scheme: dark;
}

[data-theme="light"] {
    --bg-base: #f4f4f5;
    --bg-raised: #ffffff;
    --bg-surface: #ffffff;
    --bg-hover: #f4f4f5;
    --bg-input: #ffffff;
    --border: #e4e4e7;
    --border-subtle: #f4f4f5;
    --text: #09090b;
    --text-secondary: #52525b;
    --text-tertiary: #a1a1aa;
    --accent: #e30613;
    --accent-hover: #c00510;
    --accent-muted: rgba(227, 6, 19, 0.08);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.12);
    color-scheme: light;
}

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

html { font-size: 15px; -webkit-font-smoothing: antialiased; }

body {
    font-family: var(--font);
    background: var(--bg-base);
    color: var(--text);
    line-height: 1.55;
    min-height: 100vh;
}

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

/* ── Login ── */
.login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--bg-base);
}

.login-hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem;
    background: var(--bg-raised);
    border-right: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.login-hero::before {
    content: '';
    position: absolute;
    top: -20%; right: -20%;
    width: 60%; height: 60%;
    background: radial-gradient(circle, var(--accent-muted) 0%, transparent 70%);
    pointer-events: none;
}

.login-hero .brand-logo {
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
}

.login-hero h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin-bottom: 0.75rem;
}

.login-hero p { color: var(--text-secondary); font-size: 1rem; max-width: 360px; }
.login-hero .hero-meta {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
    color: var(--text-tertiary);
    letter-spacing: 0.02em;
}

.login-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-box { width: 100%; max-width: 380px; }
.login-box h2 { font-size: 1.35rem; font-weight: 600; margin-bottom: 0.35rem; letter-spacing: -0.02em; }
.login-box .login-sub { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 2rem; }

.login-brand { text-align: center; margin-bottom: 2rem; }

.brand-logo {
    display: block;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
}

.brand-logo--sm { width: 32px; height: 32px; }
.brand-logo--md { width: 40px; height: 40px; margin: 0 auto 1rem; }
.brand-logo--lg { width: 56px; height: 56px; margin: 0 auto 1rem; }
.brand-logo--xl { width: 80px; height: 80px; }

.login-brand .brand-logo { margin-left: auto; margin-right: auto; }
.login-brand h1 { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; }
.login-brand p { color: var(--text-secondary); font-size: 0.875rem; margin-top: 0.25rem; }

.login-form label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin: 1.25rem 0 0.4rem;
}

.login-form input,
.filter-select,
.search-box input,
.modal-field input,
.modal-field textarea,
.modal-field select,
.comment-form textarea {
    width: 100%;
    padding: 0.65rem 0.85rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: inherit;
    font-size: 0.9rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.login-form input:focus,
.filter-select:focus,
.search-box input:focus,
.modal-field input:focus,
.modal-field textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-muted);
}

.checkbox-row {
    display: flex; align-items: center; gap: 0.5rem;
    margin-top: 1rem; font-size: 0.85rem; color: var(--text-secondary);
    cursor: pointer;
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    font-size: 0.875rem;
    border: 1px solid;
}
.alert-error { background: var(--danger-muted); border-color: rgba(239,68,68,0.3); color: var(--danger); }
.alert-success { background: var(--success-muted); border-color: rgba(34,197,94,0.3); color: var(--success); }

/* ── Buttons ── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
    padding: 0.55rem 1rem;
    border: none; border-radius: var(--radius-sm);
    font-family: inherit; font-size: 0.875rem; font-weight: 500;
    cursor: pointer; transition: background 0.15s, transform 0.1s;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-block { width: 100%; padding: 0.7rem; margin-top: 0.5rem; }
.btn-ghost { background: transparent; color: var(--text-secondary); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg-hover); color: var(--text); }
.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.8rem; }

.theme-toggle {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer; padding: 0;
    transition: background 0.15s, color 0.15s;
}
.theme-toggle:hover { background: var(--bg-hover); color: var(--text); }
.theme-toggle svg { width: 16px; height: 16px; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

/* ── App shell ── */
.app { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-w);
    background: var(--bg-raised);
    border-right: 1px solid var(--border);
    display: flex; flex-direction: column;
    position: fixed; top: 0; left: 0; bottom: 0;
    z-index: 100;
}

.sidebar-brand {
    padding: 1.25rem 1.125rem;
    border-bottom: 1px solid var(--border);
}

.sidebar-brand a {
    display: flex; align-items: center; gap: 0.75rem;
    color: var(--text); text-decoration: none;
}
.sidebar-brand a:hover { color: var(--text); }

.sidebar-brand .brand-logo {
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}

.sidebar-brand strong { font-size: 0.95rem; font-weight: 600; letter-spacing: -0.01em; }
.sidebar-brand small { display: block; color: var(--text-tertiary); font-size: 0.7rem; margin-top: 1px; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 0.75rem 0.625rem; }

.nav-section {
    padding: 1rem 0.625rem 0.35rem;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
}

.nav-item {
    display: flex; align-items: center; gap: 0.625rem;
    padding: 0.5rem 0.625rem;
    margin-bottom: 1px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.12s, color 0.12s;
}

.nav-item:hover { background: var(--bg-hover); color: var(--text); text-decoration: none; }
.nav-item.active { background: var(--accent-muted); color: var(--accent); }
.nav-item-sm { font-size: 0.78rem; padding: 0.4rem 0.625rem; }

.nav-icon {
    width: 18px; height: 18px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; opacity: 0.7;
}
.nav-item.active .nav-icon { opacity: 1; }
.nav-icon svg { width: 16px; height: 16px; }

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

.sidebar-footer {
    padding: 0.875rem 1rem;
    border-top: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.8125rem;
}

.sidebar-user { display: flex; align-items: center; gap: 0.5rem; min-width: 0; }
.sidebar-user-name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.logout-link {
    display: flex; align-items: center; gap: 0.25rem;
    color: var(--text-tertiary); font-size: 0.75rem; white-space: nowrap;
}
.logout-link:hover { color: var(--accent); text-decoration: none; }
.logout-link svg { width: 14px; height: 14px; }

.main-content {
    margin-left: var(--sidebar-w);
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg-base);
}

/* ── Topbar ── */
.topbar {
    height: var(--topbar-h);
    padding: 0 1.5rem;
    display: flex; align-items: center; justify-content: space-between;
    background: var(--bg-raised);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 50;
}

.topbar h1 { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.02em; }
.topbar-sub { font-size: 0.8125rem; color: var(--text-secondary); margin-top: 2px; }
.topbar-actions { display: flex; align-items: center; gap: 0.625rem; }

.user-badge {
    width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: 0.75rem; color: #fff;
}

.search-box { position: relative; }
.search-box input { width: 240px; padding-left: 2.25rem; }
.search-box .search-icon {
    position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%);
    width: 14px; height: 14px; color: var(--text-tertiary); pointer-events: none;
}
.search-box .search-icon svg { width: 14px; height: 14px; }

.search-results {
    position: absolute; top: calc(100% + 6px); right: 0;
    width: 360px; max-height: 400px; overflow-y: auto;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 200;
}

.search-result-item {
    display: block; padding: 0.7rem 1rem;
    color: var(--text); border-bottom: 1px solid var(--border-subtle);
    text-decoration: none; font-size: 0.8125rem;
}
.search-result-item:hover { background: var(--bg-hover); text-decoration: none; color: var(--text); }
.search-result-item small { display: block; color: var(--text-tertiary); margin-top: 2px; font-size: 0.75rem; }

.filter-select { width: auto; padding: 0.45rem 0.75rem; font-size: 0.8125rem; cursor: pointer; }

/* ── Dashboard ── */
.dashboard, .my-tasks-page, .team-page { padding: 1.5rem 1.75rem 2.5rem; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.125rem 1.25rem;
}

.stat-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1;
    color: var(--text);
}

.stat-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-tertiary);
    margin-top: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.stat-done .stat-value { color: var(--success); }
.stat-doing .stat-value { color: var(--warning); }
.stat-hiring .stat-value { color: var(--accent); }
.stat-progress .stat-value { color: var(--info); }

.dash-section { margin-bottom: 2.25rem; }
.dash-section h2 {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-tertiary);
    margin-bottom: 0.875rem;
}

.bastao-timeline {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 0.625rem;
}

.bastao-step {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.125rem;
    border-left: 2px solid var(--accent);
}

.bastao-step strong {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.bastao-step span { font-size: 0.78rem; color: var(--text-secondary); line-height: 1.45; }

.board-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.625rem;
}

.board-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.125rem;
    text-decoration: none;
    color: var(--text);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.board-card:hover {
    border-color: var(--text-tertiary);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: var(--text);
}

.board-card h3 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
    padding-left: 0.625rem;
    border-left: 3px solid var(--board-color, var(--accent));
}

.board-progress {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.625rem;
}

.board-progress-bar { height: 100%; background: var(--success); border-radius: 2px; transition: width 0.4s ease; }

.board-stats {
    display: flex; gap: 0.875rem;
    font-size: 0.72rem; font-weight: 500;
    color: var(--text-tertiary);
}

.hiring-list { display: flex; flex-direction: column; gap: 0.375rem; }

.hiring-item {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    text-decoration: none; color: var(--text);
    font-size: 0.875rem;
    transition: background 0.12s;
}

.hiring-item:hover { background: var(--bg-hover); text-decoration: none; color: var(--text); }
.hiring-item small { color: var(--text-tertiary); font-size: 0.75rem; white-space: nowrap; }

/* ── Kanban ── */
.board-page .board-topbar {
    background: var(--bg-raised);
    border-bottom: 1px solid var(--border);
}

.board-header { display: flex; align-items: center; gap: 0.875rem; }

.back-link {
    display: inline-flex; align-items: center; gap: 0.25rem;
    color: var(--text-tertiary); font-size: 0.8125rem; font-weight: 500;
}
.back-link svg { width: 16px; height: 16px; }
.back-link:hover { color: var(--text); text-decoration: none; }

.board-type-badge {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: var(--bg-hover);
    border: 1px solid var(--border);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    color: var(--text-tertiary);
}

.kanban-wrapper { flex: 1; overflow-x: auto; padding: 1.25rem 1.5rem 2rem; }
.kanban { display: flex; gap: 0.75rem; align-items: flex-start; min-height: calc(100vh - var(--topbar-h) - 2rem); }
.kanban-loading { color: var(--text-tertiary); padding: 2rem; font-size: 0.875rem; }

.kanban-column {
    flex: 0 0 292px;
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    max-height: calc(100vh - var(--topbar-h) - 3rem);
    display: flex; flex-direction: column;
}

.column-header {
    padding: 0.75rem 1rem;
    display: flex; align-items: center; justify-content: space-between;
    font-weight: 600; font-size: 0.8125rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}

.column-count {
    font-size: 0.7rem; font-weight: 600;
    background: var(--bg-hover);
    color: var(--text-tertiary);
    padding: 0.1rem 0.45rem;
    border-radius: 4px;
}

.column-cards { flex: 1; overflow-y: auto; padding: 0.5rem; min-height: 60px; }

.kanban-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.75rem 0.875rem;
    margin-bottom: 0.375rem;
    cursor: grab;
    transition: border-color 0.12s, box-shadow 0.12s;
    user-select: none;
}

.kanban-card:hover {
    border-color: var(--text-tertiary);
    box-shadow: var(--shadow-sm);
}

.kanban-card.sortable-ghost { opacity: 0.35; }
.kanban-card.sortable-drag { cursor: grabbing; box-shadow: var(--shadow-md); }
.kanban-card.hidden { display: none; }

.card-title {
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.45;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.card-meta { display: flex; flex-wrap: wrap; gap: 0.3rem; }

.card-badge {
    font-size: 0.625rem;
    font-weight: 600;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: var(--bg-hover);
    color: var(--text-tertiary);
    border: 1px solid var(--border);
}

.card-badge.priority-urgent { background: var(--danger-muted); color: var(--danger); border-color: transparent; }
.card-badge.priority-high { background: var(--warning-muted); color: var(--warning); border-color: transparent; }
.card-badge.hiring { background: var(--accent-muted); color: var(--accent); border-color: transparent; }
.card-badge.when { background: rgba(59,130,246,0.1); color: var(--info); border-color: transparent; }
.card-badge.person { background: var(--success-muted); color: var(--success); border-color: transparent; }

.add-card-btn {
    width: calc(100% - 1rem);
    margin: 0.25rem 0.5rem 0.5rem;
    padding: 0.45rem 0.625rem;
    background: transparent;
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-tertiary);
    font-family: inherit;
    font-size: 0.8125rem;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.12s, color 0.12s;
}

.add-card-btn:hover { border-color: var(--text-tertiary); color: var(--text-secondary); }

.card-avatars { display: flex; margin-top: 0.5rem; }
.card-avatar {
    width: 22px; height: 22px; border-radius: 50%;
    font-size: 0.6rem; font-weight: 600;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    border: 2px solid var(--bg-surface);
    margin-left: -4px;
}
.card-avatar:first-child { margin-left: 0; }

/* ── Modal ── */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    display: flex; align-items: flex-start; justify-content: center;
    padding: 2rem 1rem;
    z-index: 1000;
    overflow-y: auto;
}

[data-theme="light"] .modal-overlay { background: rgba(0, 0, 0, 0.4); }
.modal-overlay[hidden] { display: none; }

.modal {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 100%; max-width: 680px;
    box-shadow: var(--shadow-lg);
    position: relative;
    margin-top: 2vh;
}

.modal-close {
    position: absolute; top: 0.875rem; right: 0.875rem;
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-hover);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 1.25rem; cursor: pointer; line-height: 1; z-index: 1;
}

.modal-close:hover { color: var(--text); background: var(--bg-base); }
.modal-body { padding: 1.5rem 1.75rem 1.75rem; }

.modal-title {
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 1.25rem;
    padding-right: 2.5rem;
    line-height: 1.35;
}

.modal-section { margin-bottom: 1.25rem; }
.modal-section h4 {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-tertiary);
    margin-bottom: 0.5rem;
}

.modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.875rem; }
.modal-field label { display: block; font-size: 0.75rem; font-weight: 500; color: var(--text-secondary); margin-bottom: 0.35rem; }
.modal-field textarea { min-height: 80px; resize: vertical; }

.checklist { list-style: none; }
.checklist li { display: flex; align-items: flex-start; gap: 0.5rem; padding: 0.35rem 0; font-size: 0.875rem; }
.checklist input[type=checkbox] { margin-top: 0.2rem; accent-color: var(--accent); }
.checklist .done { text-decoration: line-through; color: var(--text-tertiary); }

.comments-list { max-height: 220px; overflow-y: auto; margin-bottom: 0.75rem; }
.comment {
    padding: 0.75rem;
    background: var(--bg-raised);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    margin-bottom: 0.375rem;
    font-size: 0.8125rem;
}
.comment-meta { font-size: 0.72rem; color: var(--text-tertiary); margin-bottom: 0.25rem; }
.comment-form { display: flex; gap: 0.5rem; align-items: flex-end; }

.attachments-list { display: flex; flex-wrap: wrap; gap: 0.375rem; margin-bottom: 0.75rem; }
.attachment-chip {
    display: inline-flex; align-items: center; gap: 0.35rem;
    padding: 0.35rem 0.65rem;
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.78rem; color: var(--text-secondary);
}

.modal-actions {
    display: flex; gap: 0.5rem;
    margin-top: 1.5rem; padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

/* ── Tasks / Team ── */
.task-list, .task-list-compact { display: flex; flex-direction: column; gap: 0.375rem; }

.task-row {
    display: flex; align-items: center; gap: 0.875rem;
    padding: 0.8rem 1rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-decoration: none; color: var(--text);
    transition: border-color 0.12s, background 0.12s;
}

.task-row:hover { border-color: var(--text-tertiary); background: var(--bg-hover); text-decoration: none; color: var(--text); }

.task-status-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.task-row.status-todo .task-status-dot { background: var(--text-tertiary); }
.task-row.status-doing .task-status-dot { background: var(--warning); }
.task-row.status-done .task-status-dot { background: var(--success); }
.task-row.status-blocked .task-status-dot { background: var(--danger); }

.task-info { flex: 1; min-width: 0; }
.task-info strong { display: block; font-size: 0.875rem; font-weight: 500; }
.task-info small { color: var(--text-tertiary); font-size: 0.75rem; }

.task-role-badge {
    font-size: 0.65rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.05em;
    padding: 0.2rem 0.45rem;
    background: var(--bg-hover);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-tertiary);
}

.empty-msg { color: var(--text-tertiary); font-size: 0.875rem; padding: 0.5rem 0; }
.page-desc { color: var(--text-secondary); font-size: 0.875rem; margin-bottom: 1.25rem; line-height: 1.55; }
.page-desc code { font-size: 0.8rem; background: var(--bg-hover); padding: 0.1rem 0.35rem; border-radius: 4px; color: var(--text); }

.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0.625rem; }

.team-card {
    display: flex; gap: 0.875rem;
    padding: 1rem 1.125rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none; color: var(--text);
    transition: border-color 0.12s, box-shadow 0.12s;
}

.team-card:hover { border-color: var(--text-tertiary); box-shadow: var(--shadow-sm); text-decoration: none; color: var(--text); }

.team-avatar {
    width: 44px; height: 44px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: 0.875rem; color: #fff; flex-shrink: 0;
}

.team-info strong { display: block; font-size: 0.875rem; font-weight: 600; }
.team-info small { color: var(--text-tertiary); font-size: 0.75rem; }

.logins-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.logins-table { width: 100%; border-collapse: collapse; font-size: 0.8125rem; }
.logins-table th, .logins-table td { padding: 0.7rem 1rem; text-align: left; border-bottom: 1px solid var(--border); }
.logins-table tr:last-child td { border-bottom: none; }
.logins-table th { background: var(--bg-raised); color: var(--text-tertiary); font-weight: 600; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; }
.logins-table code { font-size: 0.78rem; color: var(--accent); font-family: ui-monospace, monospace; }

.stats-grid-sm { margin-bottom: 1.5rem; }

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

/* ── Responsive ── */
@media (max-width: 900px) {
    .login-page { grid-template-columns: 1fr; }
    .login-hero { display: none; }
    .login-brand--compact { display: block; margin-bottom: 1.25rem; }
}

@media (min-width: 901px) {
    .login-brand--compact { display: none; }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.2s;
    }
    .main-content { margin-left: 0; }
    .kanban-column { flex: 0 0 260px; }
    .modal-grid { grid-template-columns: 1fr; }
    .search-box input { width: 160px; }
    .dashboard, .my-tasks-page, .team-page { padding: 1rem; }
}
