:root {
    color-scheme: dark;
    --bg-0: #050506;
    --bg-1: #08090c;
    --bg-2: #0e1116;
    --bg-3: #141a22;
    --bg-4: #1c2430;
    --text-0: #fafafa;
    --text-1: #e4e4e7;
    --text-2: #a1a1aa;
    --text-3: #71717a;
    --text-4: #52525b;
    --accent: #3effa0;
    --accent-hover: #66ffb8;
    --accent-dim: rgba(62, 255, 160, 0.1);
    --accent-glow: rgba(62, 255, 160, 0.35);
    --accent-border: rgba(62, 255, 160, 0.22);
    --on-accent: #041008;
    --red: #fb7185;
    --red-dim: rgba(251, 113, 133, 0.12);
    --amber: #fbbf24;
    --amber-dim: rgba(251, 191, 36, 0.12);
    --border: rgba(255, 255, 255, 0.07);
    --border-subtle: rgba(255, 255, 255, 0.04);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    --display: 'Syne', var(--font);
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --transition: 180ms var(--ease);
    --radius: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    /* Legacy aliases (existing pages) */
    --bg-primary: var(--bg-0);
    --bg-secondary: var(--bg-2);
    --bg-tertiary: var(--bg-3);
    --bg-elevated: var(--bg-4);
    --bg-hover: #22232b;
    --text-primary: var(--text-0);
    --text-secondary: var(--text-2);
    --text-tertiary: var(--text-3);
    --text-muted: var(--text-4);
    --brand: var(--accent);
    --brand-light: var(--accent-hover);
    --brand-glow: var(--accent-dim);
    --success: var(--accent);
    --success-bg: var(--accent-dim);
    --warning: var(--amber);
    --warning-bg: var(--amber-dim);
    --danger: var(--red);
    --danger-bg: var(--red-dim);
    --border-strong: rgba(255, 255, 255, 0.12);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body, #app {
    height: 100%;
    font-family: var(--font);
    background: var(--bg-0);
    color: var(--text-1);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background:
        radial-gradient(ellipse 55% 40% at 15% -5%, rgba(62, 255, 160, 0.08), transparent 55%),
        radial-gradient(ellipse 40% 35% at 90% 10%, rgba(167, 139, 250, 0.05), transparent 50%),
        linear-gradient(180deg, var(--bg-0) 0%, #07080a 100%);
}

.loading-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    height: 100vh;
    color: var(--text-3);
    font-size: 13px;
    font-weight: 500;
}

.loading-screen::before {
    content: "";
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    animation: admin-spin 0.8s linear infinite;
}

@keyframes admin-spin {
    to { transform: rotate(360deg); }
}

/* Admin Layout */
.admin-shell {
    display: flex;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
}
.admin-main-column {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
}
.admin-mobile-bar {
    display: none;
}
.admin-sidebar-backdrop {
    display: none;
}
.sidebar {
    width: 268px;
    flex-shrink: 0;
    background: rgba(14, 17, 22, 0.85);
    backdrop-filter: blur(12px);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 20px 12px;
    min-height: 0;
}
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}
.sidebar-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 8px 12px;
    margin-bottom: 12px;
    flex-shrink: 0;
}
.sidebar-footer {
    flex-shrink: 0;
    padding-top: 12px;
    margin-top: 8px;
    border-top: 1px solid var(--border);
}
.sidebar-item--logout { color: var(--danger) !important; }
.sidebar-item--logout:hover { background: var(--danger-bg); color: var(--red) !important; }
.sidebar-item-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Sidebar groups */
.sidebar-nav-inner { display: flex; flex-direction: column; gap: 4px; }
.sidebar-group { border-radius: 10px; }
.sidebar-group.has-active .sidebar-group-label { color: var(--text-1); }
.sidebar-group-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 8px 12px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 8px;
    transition: background var(--transition);
}
.sidebar-group-toggle:hover { background: var(--bg-tertiary); }
.sidebar-group-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-4);
}
.sidebar-group-chevron {
    transition: transform var(--transition);
    opacity: 0.55;
}
.sidebar-group.is-open .sidebar-group-chevron { transform: rotate(180deg); }
.sidebar-group-items {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 0 6px 4px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 280ms var(--ease), opacity 180ms var(--ease);
}
.sidebar-group.is-open .sidebar-group-items {
    max-height: 480px;
    opacity: 1;
}
.sidebar-group.has-active .sidebar-group-toggle {
    background: rgba(62, 255, 160, 0.04);
}
.admin-brand-logo {
    display: block;
    height: 22px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
}
.admin-brand-role {
    font-size: 11px;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.sidebar-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border-radius: 8px;
    font-size: 13px; font-weight: 500; color: var(--text-secondary);
    text-decoration: none; cursor: pointer; border: none; background: none;
    transition: all var(--transition); width: 100%; text-align: left;
}
.sidebar-item:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.sidebar-item.active {
    background: var(--accent-dim);
    color: var(--accent);
    box-shadow: inset 3px 0 0 var(--accent);
}
.sidebar-item .admin-icon { flex-shrink: 0; }

.admin-icon {
    display: inline-flex;
    width: 20px;
    height: 20px;
    align-items: center;
    justify-content: center;
    color: currentColor;
}

.admin-icon svg { width: 18px; height: 18px; }

.admin-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
}

.admin-status svg { width: 14px; height: 14px; }

.admin-status--ok { color: var(--success, #3effa0); }
.admin-status--fail { color: var(--danger); }
.admin-status--no { color: var(--text-tertiary); }

.admin-default-badge {
    margin-left: 6px;
    font-size: 10px;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.kanban-meta.kanban-owner,
.kanban-card-attach-badge,
.competitor-owner {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.main-content {
    flex: 1;
    min-width: 0;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 28px 32px;
    -webkit-overflow-scrolling: touch;
}
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}
.page-title {
    font-family: var(--display);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text-0);
}

/* Stats grid */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 24px; }
.stat-card {
    background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 20px;
}
.stat-card-label { font-size: 12px; color: var(--text-tertiary); font-weight: 500; margin-bottom: 8px; }
.stat-card-value { font-size: 28px; font-weight: 700; letter-spacing: -0.5px; }

/* Table */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
    text-align: left; font-size: 11px; font-weight: 600; color: var(--text-tertiary);
    text-transform: uppercase; letter-spacing: 0.5px; padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}
.data-table td { padding: 14px 16px; font-size: 13px; border-bottom: 1px solid var(--border); }
.data-table tr:hover td { background: var(--bg-tertiary); }

/* Badges */
.badge {
    display: inline-block; padding: 3px 8px; border-radius: 4px;
    font-size: 11px; font-weight: 600; text-transform: uppercase;
}
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-brand { background: var(--brand-glow); color: var(--brand-light); }

/* Card */
.card { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; margin-bottom: 16px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 8px; font-family: var(--font); font-size: 13px; font-weight: 500; border: none; cursor: pointer; transition: all var(--transition); }
.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, #2ee68a 100%);
    color: var(--on-accent);
    box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-primary:hover {
    filter: brightness(1.05);
    box-shadow: 0 6px 28px var(--accent-glow);
}
.btn-danger { background: var(--danger-bg); color: var(--danger); }
.btn-ghost {
    background: transparent;
    color: var(--text-2);
    border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--bg-tertiary); color: var(--text-0); border-color: var(--border-strong); }
.btn-secondary {
    background: var(--bg-3);
    color: var(--text-1);
    border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--bg-4); border-color: var(--border-strong); }
.btn-sm { padding: 5px 10px; font-size: 12px; }

/* Forms */
.form-input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    background: var(--bg-1);
    border: 1px solid var(--border);
    color: var(--text-0);
    font-family: var(--font);
    font-size: 14px;
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.form-input::placeholder { color: var(--text-4); }

.form-input:focus {
    border-color: var(--accent);
    background: var(--bg-0);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-input:-webkit-autofill,
.form-input:-webkit-autofill:hover,
.form-input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text-0);
    caret-color: var(--text-0);
    transition: background-color 9999s ease-out;
    -webkit-box-shadow: 0 0 0 1000px var(--bg-1) inset;
    box-shadow: 0 0 0 1000px var(--bg-1) inset;
}

/* Log level badges */
.level-badge {
    display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: 0.5px;
    padding: 2px 8px; border-radius: 4px; text-transform: uppercase;
}
.level-badge.information { background: rgba(74,222,128,0.1); color: #4ade80; }
.level-badge.warning { background: rgba(245,158,11,0.1); color: #f59e0b; }
.level-badge.error, .level-badge.fatal { background: rgba(239,68,68,0.1); color: #ef4444; }
.level-badge.debug { background: rgba(148,163,184,0.1); color: #94a3b8; }

/* Log table row highlights */
.row-error td { background: rgba(239,68,68,0.03) !important; }
.row-warning td { background: rgba(245,158,11,0.02) !important; }

/* Auth — Paramatik-aligned login */
.admin-auth-loading {
    min-height: 100vh;
    background: var(--bg-primary, #050810);
}

.admin-auth {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
    overflow: hidden;
}

.admin-auth__glow {
    position: absolute;
    inset: -20% -10%;
    pointer-events: none;
    background:
        radial-gradient(ellipse 50% 45% at 50% 0%, rgba(62, 255, 160, 0.14), transparent 60%),
        radial-gradient(ellipse 35% 30% at 80% 60%, rgba(167, 139, 250, 0.08), transparent 55%);
}

.admin-auth__panel {
    position: relative;
    width: 100%;
    max-width: 420px;
    padding: 32px 28px 28px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    background: rgba(14, 17, 22, 0.92);
    backdrop-filter: blur(20px);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.04) inset,
        0 24px 80px rgba(0, 0, 0, 0.55),
        0 0 60px rgba(62, 255, 160, 0.06);
}

.admin-auth__brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.admin-auth__logo {
    display: block;
    height: 28px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

.admin-auth__badge {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 999px;
    color: var(--accent);
    background: var(--accent-dim);
    border: 1px solid var(--accent-border);
}

.admin-auth__intro {
    text-align: center;
    margin-bottom: 24px;
}

.admin-auth__title {
    font-family: var(--display);
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text-0);
    margin-bottom: 8px;
}

.admin-auth__sub {
    font-size: 14px;
    line-height: 1.55;
    color: var(--text-3);
}

.admin-auth__error {
    font-size: 13px;
    color: var(--red);
    text-align: center;
    margin-bottom: 16px;
    padding: 12px 14px;
    background: var(--red-dim);
    border: 1px solid rgba(251, 113, 133, 0.28);
    border-radius: 10px;
}

.admin-auth__form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.admin-auth__field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-auth__label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-3);
}

.admin-auth__input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 10px;
    background: var(--bg-1);
    border: 1px solid var(--border);
    color: var(--text-0);
    font-family: var(--font);
    font-size: 15px;
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.admin-auth__input::placeholder { color: var(--text-4); }

.admin-auth__input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

.admin-auth__input:-webkit-autofill,
.admin-auth__input:-webkit-autofill:hover,
.admin-auth__input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text-0);
    caret-color: var(--text-0);
    transition: background-color 9999s ease-out;
    -webkit-box-shadow: 0 0 0 1000px var(--bg-1) inset;
    box-shadow: 0 0 0 1000px var(--bg-1) inset;
}

.admin-auth__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-top: 4px;
    min-height: 50px;
    padding: 0 20px;
    border: none;
    border-radius: 12px;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.02em;
    cursor: pointer;
    color: var(--on-accent);
    background: linear-gradient(135deg, var(--accent) 0%, #2ee68a 100%);
    box-shadow: 0 4px 24px var(--accent-glow);
    transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition);
}

.admin-auth__submit:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 8px 32px var(--accent-glow);
}

.admin-auth__submit:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.admin-auth__spinner {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(4, 16, 8, 0.25);
    border-top-color: var(--on-accent);
    animation: admin-spin 0.7s linear infinite;
}

.admin-auth__foot {
    position: relative;
    margin-top: 28px;
    font-size: 12px;
    color: var(--text-4);
    letter-spacing: 0.02em;
}

/* Legacy auth class names (if referenced elsewhere) */
.auth-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.auth-card { width: 100%; max-width: 420px; }
.auth-title { font-family: var(--display); font-size: 1.5rem; font-weight: 700; text-align: center; color: var(--text-0); }
.form-group { margin-bottom: 14px; }
.form-label { display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); margin-bottom: 8px; }
.btn-full { width: 100%; justify-content: center; padding: 14px; font-size: 14px; }
.error-msg { font-size: 13px; color: var(--red); text-align: center; margin-bottom: 12px; padding: 12px; background: var(--red-dim); border-radius: 10px; border: 1px solid rgba(251, 113, 133, 0.25); }

.alert { padding: 12px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 16px; }
.alert-danger { background: var(--danger-bg); color: var(--danger); border: 1px solid rgba(239,68,68,0.25); }

/* Kanban */
.kanban-board { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 16px; min-height: 420px; }
.kanban-column {
    flex: 0 0 260px; background: var(--bg-secondary); border: 1px solid var(--border);
    border-radius: var(--radius-lg); display: flex; flex-direction: column; max-height: 70vh;
}
.kanban-column-head {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 14px; font-size: 12px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.4px; color: var(--text-secondary); border-bottom: 1px solid var(--border);
}
.kanban-count { background: var(--bg-tertiary); padding: 2px 8px; border-radius: 99px; font-size: 11px; }
.kanban-cards { flex: 1; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.kanban-card {
    background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: 10px;
    padding: 12px; cursor: pointer; transition: border-color var(--transition);
}
.kanban-card:hover { border-color: var(--border-strong); }
.kanban-card.priority-critical { border-left: 3px solid var(--danger); }
.kanban-card.priority-high { border-left: 3px solid var(--warning); }
.kanban-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.kanban-type { font-size: 10px; color: var(--text-tertiary); text-transform: uppercase; }
.kanban-card-title { font-size: 13px; font-weight: 600; line-height: 1.35; margin-bottom: 6px; }
.kanban-meta { font-size: 11px; color: var(--text-tertiary); }
.kanban-error-count { font-size: 10px; color: var(--danger); font-weight: 600; }
.kanban-card-actions { display: flex; gap: 6px; margin-top: 10px; }
.kanban-card--dragging { opacity: 0.45; border-style: dashed; cursor: grabbing; }
.kanban-column--over .kanban-cards {
    background: var(--brand-glow);
    border-radius: 8px;
    outline: 2px dashed var(--brand-light);
    outline-offset: -4px;
}
.kanban-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
    margin-bottom: 12px;
}
.kanban-status-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 11px;
    color: var(--text-tertiary);
    font-weight: 600;
}
.kanban-status-select { min-width: 140px; font-size: 13px; }
.kanban-detail-move { display: flex; gap: 6px; flex-wrap: wrap; }
.kanban-correlation { font-size: 11px; color: var(--text-tertiary); align-self: center; }
.kanban-description {
    font-size: 12px; line-height: 1.5; white-space: pre-wrap; color: var(--text-secondary);
    background: var(--bg-tertiary); padding: 12px; border-radius: 8px; max-height: 200px; overflow: auto;
}
.kanban-comment { padding: 10px 0; border-bottom: 1px solid var(--border); }
.modal-backdrop {
    position: fixed; inset: 0; background: rgba(0,0,0,0.65); z-index: 1000;
    display: flex; align-items: center; justify-content: center; padding: 24px;
}
.modal-panel {
    background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 24px; width: 100%; max-width: 440px; max-height: 90vh; overflow-y: auto;
}
.modal-panel--wide { max-width: 640px; }

.admin-confirm-panel { max-width: 420px; }
.admin-confirm-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 10px;
    color: var(--text-0);
}
.admin-confirm-message {
    font-size: 13px;
    line-height: 1.55;
    color: var(--text-2);
    margin: 0 0 16px;
}
.admin-confirm-body {
    font-size: 13px;
    margin-bottom: 16px;
    color: var(--text-3);
}
.admin-confirm-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}
@media (max-width: 639px) {
    .admin-confirm-actions {
        flex-direction: column-reverse;
    }
    .admin-confirm-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Attachment dropzone */
.kanban-dropzone {
    border: 2px dashed var(--border-strong);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-top: 12px;
    background: var(--bg-tertiary);
    transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
    outline: none;
}
.kanban-dropzone.is-dragover,
.kanban-dropzone.is-focused {
    border-color: var(--brand-light);
    background: var(--brand-glow);
    box-shadow: 0 0 0 3px var(--brand-glow);
}
.kanban-dropzone-inner { text-align: center; pointer-events: none; }
.kanban-dropzone-icon { font-size: 28px; display: block; margin-bottom: 8px; }
.kanban-dropzone-title { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.kanban-dropzone-hint { font-size: 11px; color: var(--text-tertiary); margin-top: 6px; line-height: 1.5; }
.kanban-dropzone-status { font-size: 11px; margin-top: 10px; min-height: 1.2em; text-align: center; }
.kanban-attach-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 14px;
}
.kanban-attach-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.kanban-attach-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
    background: #000;
}
.kanban-attach-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    aspect-ratio: 1;
    background: var(--bg-tertiary);
}
.kanban-attach-meta { padding: 8px; }
.kanban-attach-name {
    display: block;
    font-size: 10px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.kanban-attach-size { font-size: 9px; color: var(--text-tertiary); }
.kanban-card-attach-badge {
    font-size: 10px;
    color: var(--brand-light);
    font-weight: 600;
}

/* Product analytics dashboard */
.pa-metrics { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.pa-metric { display: flex; flex-direction: column; gap: 6px; padding: 16px; }
.pa-metric-label { font-size: 11px; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.04em; }
.pa-metric-value { font-size: 22px; font-weight: 700; letter-spacing: -0.5px; }
.pa-bar-row { display: grid; grid-template-columns: 100px 1fr 56px; gap: 10px; align-items: center; margin-bottom: 8px; font-size: 12px; }
.pa-bar-row--compact { grid-template-columns: 120px 1fr 72px; }
.pa-bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-secondary); }
.pa-bar-track { height: 8px; background: var(--bg-tertiary); border-radius: 4px; overflow: hidden; }
.pa-bar-fill { height: 100%; background: var(--brand); border-radius: 4px; min-width: 2px; transition: width 0.3s; }
.pa-bar-fill--accent { background: var(--accent, #3effa0); }
.pa-bar-count { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.pa-funnel { display: flex; flex-direction: column; gap: 10px; }
.pa-funnel-step { position: relative; }
.pa-funnel-bar { height: 36px; background: linear-gradient(90deg, var(--brand), var(--brand-light)); border-radius: 6px; min-width: 8%; opacity: 0.85; }
.pa-funnel-meta { display: flex; justify-content: space-between; margin-top: 4px; font-size: 12px; }

/* Product analytics — user detail modal */
.pa-detail-backdrop {
    align-items: flex-end;
    padding: 0;
}
@media (min-width: 640px) {
    .pa-detail-backdrop {
        align-items: center;
        padding: 24px;
    }
}
.pa-detail-panel {
    max-width: 100%;
    width: 100%;
    max-height: 92vh;
    margin: 0;
    border-radius: 16px 16px 0 0;
    border-bottom: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
@media (min-width: 640px) {
    .pa-detail-panel {
        max-width: 560px;
        border-radius: var(--radius-lg);
        border-bottom: 1px solid var(--border);
    }
}
.pa-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-shrink: 0;
}
.pa-detail-identity { min-width: 0; flex: 1; }
.pa-detail-title {
    font-size: 17px;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
    word-break: break-word;
}
.pa-detail-email {
    font-size: 12px;
    color: var(--text-tertiary);
    margin: 4px 0 0;
    word-break: break-all;
}
.pa-detail-summary {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
}
.pa-detail-muted { font-size: 13px; color: var(--text-tertiary); margin: 0; }
.pa-detail-error { margin: 0; }
.pa-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media (max-width: 479px) {
    .pa-detail-grid { grid-template-columns: 1fr; }
}
.pa-detail-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-tertiary);
    margin: 0 0 8px;
}
.pa-detail-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.pa-detail-list li {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 13px;
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
}
.pa-detail-event { color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; }
.pa-detail-count { font-weight: 600; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.pa-detail-timeline { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.pa-detail-timeline-scroll {
    flex: 1;
    min-height: 120px;
    max-height: min(42vh, 320px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-tertiary);
    padding: 4px 0;
}
.pa-detail-timeline-row {
    display: grid;
    grid-template-columns: 88px 1fr auto;
    gap: 8px;
    align-items: baseline;
    font-size: 12px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
}
@media (max-width: 479px) {
    .pa-detail-timeline-row {
        grid-template-columns: 1fr;
        gap: 2px;
    }
}
.pa-detail-time { color: var(--text-tertiary); font-variant-numeric: tabular-nums; }
.pa-detail-event-name { font-weight: 500; color: var(--text-primary); }
.pa-detail-screen {
    font-size: 11px;
    color: var(--brand-light);
    background: var(--brand-glow);
    padding: 2px 8px;
    border-radius: 4px;
}

/* Kanban board tabs */
.kanban-board-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.kanban-tab {
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.kanban-tab.active {
    border-color: var(--accent);
    background: var(--accent-dim);
    color: var(--accent);
}
.kanban-owner { color: var(--amber) !important; font-weight: 600; }
.kanban-assignee { color: var(--brand-light) !important; font-weight: 600; }

/* Competitor analysis */
.competitor-layout {
    display: grid;
    grid-template-columns: minmax(280px, 360px) 1fr;
    gap: 16px;
    align-items: start;
}
@media (max-width: 960px) {
    .competitor-layout { grid-template-columns: 1fr; }
}
.competitor-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: calc(100vh - 220px);
    overflow-y: auto;
}
.competitor-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    cursor: pointer;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.competitor-card:hover { border-color: var(--border-strong); }
.competitor-card.selected {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent-dim);
}
.competitor-card.threat-critical { border-left: 3px solid var(--danger); }
.competitor-card.threat-high { border-left: 3px solid var(--warning); }
.competitor-card-head {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 8px;
    margin-bottom: 6px;
}
.competitor-card-head h3 { font-size: 14px; font-weight: 600; line-height: 1.3; }
.competitor-card-meta { font-size: 11px; color: var(--text-tertiary); margin-bottom: 4px; }
.competitor-card-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: var(--text-tertiary);
    margin-top: 8px;
}
.competitor-detail { padding: 20px; min-height: 400px; }
.competitor-section { margin-bottom: 16px; }
.competitor-section h4 {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    margin-bottom: 8px;
}
.competitor-pre {
    font-family: inherit;
    font-size: 13px;
    line-height: 1.5;
    white-space: pre-wrap;
    color: var(--text-secondary);
    margin: 0;
}
.competitor-links { display: flex; gap: 12px; flex-wrap: wrap; }
.competitor-links a { font-size: 13px; color: var(--accent); }
.competitor-note {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}
.competitor-note-meta { font-size: 11px; color: var(--text-tertiary); margin-bottom: 4px; }
.competitor-note p { font-size: 13px; line-height: 1.45; }

/* Social media planner */
.sm-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}
.sm-filter { max-width: 200px; min-width: 140px; }
.sm-layout {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 360px);
    gap: 16px;
    align-items: start;
}
@media (max-width: 960px) {
    .sm-layout { grid-template-columns: 1fr; }
}
.sm-calendar-card { padding: 16px; }
.sm-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 8px;
    font-size: 11px;
    color: var(--text-tertiary);
    text-align: center;
    font-weight: 600;
}
.sm-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}
.sm-day {
    aspect-ratio: 1;
    min-height: 52px;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 6px 4px;
    position: relative;
    transition: border-color var(--transition), background var(--transition);
}
.sm-day:hover:not(:disabled) { border-color: var(--accent-border); background: var(--bg-4); }
.sm-day.muted { opacity: 0.35; cursor: default; }
.sm-day.selected { border-color: var(--accent); background: var(--accent-dim); }
.sm-day.has-posts .sm-day-num { color: var(--accent); font-weight: 700; }
.sm-day-num { font-size: 13px; }
.sm-day-dots { display: flex; gap: 3px; margin-top: 4px; }
.sm-day-dots .dot { width: 6px; height: 6px; border-radius: 50%; display: block; }
.sm-day-dots .dot.posted { background: var(--accent); }
.sm-day-dots .dot.planned { background: var(--amber); }
.sm-day-count { font-size: 9px; color: var(--text-tertiary); margin-top: 2px; }
.sm-side { padding: 16px; max-height: 520px; overflow-y: auto; }
.sm-post-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    margin-bottom: 10px;
    background: var(--bg-3);
}
.sm-post-card.status-posted { border-color: var(--accent-border); }
.sm-post-card.status-muted { opacity: 0.65; }
.sm-post-head { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 11px; }
.sm-platform { font-weight: 700; color: var(--accent); }
.sm-status { color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.04em; }
.sm-caption { font-size: 12px; color: var(--text-tertiary); margin-top: 4px; line-height: 1.4; }
.sm-post-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.sm-ai-form {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}
.sm-platform-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sm-chip {
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
}
.sm-chip.on { border-color: var(--accent); background: var(--accent-dim); color: var(--accent); }
.sm-prod-badge {
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--accent-dim);
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.sm-studio-backdrop { z-index: 1100; }
.sm-studio-panel {
    max-width: 720px;
    width: 100%;
    max-height: 92vh;
    overflow-y: auto;
}
.sm-studio-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}
.sm-studio-head h3 { font-size: 18px; margin: 0; }
.sm-studio-head p { font-size: 12px; color: var(--text-tertiary); margin: 4px 0 0; }
.sm-studio-config { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.sm-cfg {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid var(--border);
}
.sm-cfg.ok { border-color: var(--accent-border); color: var(--accent); }
.sm-cfg.off { opacity: 0.5; color: var(--text-tertiary); }
.sm-studio-error { color: var(--danger); font-size: 13px; margin-bottom: 8px; }
.sm-studio-steps { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.sm-studio-block {
    font-size: 13px;
    padding: 12px;
    border-radius: 8px;
    background: var(--bg-tertiary);
    margin-bottom: 12px;
    line-height: 1.45;
}
.sm-timeline { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.sm-timeline-row {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 10px;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-4);
}
.sm-timeline-idx {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent-dim);
    color: var(--accent);
    font-weight: 700;
    font-size: 12px;
}
.sm-timeline-meta { font-size: 11px; color: var(--text-tertiary); }
.sm-timeline-narr { font-size: 13px; margin: 0 0 4px; }
.sm-timeline-os { font-size: 12px; color: var(--accent); margin: 0; }
.sm-asset-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 12px;
}
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.modal-panel {
    background: var(--bg-2);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    padding: 24px;
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.email-marketing-studio {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}
@media (max-width: 1100px) {
    .email-marketing-studio { grid-template-columns: 1fr; }
}
.email-html-editor {
    font-family: ui-monospace, monospace;
    font-size: 12px;
    line-height: 1.5;
    min-height: 320px;
}
.email-preview-frame {
    width: 100%;
    min-height: 480px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #0a0e1a;
}

.emkt-templates {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-subtle);
}

.emkt-templates-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.emkt-templates-head h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}

.emkt-template-search {
    max-width: 200px;
    padding: 8px 12px;
    font-size: 13px;
}

.emkt-template-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.emkt-filter-pill {
    padding: 5px 11px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-1);
    color: var(--text-3);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font);
}

.emkt-filter-pill.is-active {
    border-color: var(--accent-border);
    background: var(--accent-dim);
    color: var(--accent);
}

.emkt-template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
    gap: 8px;
    max-height: 220px;
    overflow-y: auto;
    padding-right: 4px;
}

.emkt-template-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 10px 12px;
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    background: var(--bg-1);
    cursor: pointer;
    text-align: left;
    font-family: var(--font);
    transition: border-color var(--transition), background var(--transition);
}

.emkt-template-card:hover {
    border-color: var(--border-strong);
    background: var(--bg-hover);
}

.emkt-template-card.is-selected {
    border-color: var(--accent);
    background: var(--accent-dim);
    box-shadow: 0 0 0 1px var(--accent-border);
}

.emkt-template-card-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-0);
    line-height: 1.3;
}

.emkt-template-card-sub {
    font-size: 10px;
    color: var(--text-4);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.emkt-template-badge {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--bg-3);
    color: var(--text-3);
}

.emkt-template-badge--marketing { color: var(--accent); background: var(--accent-dim); }
.emkt-template-badge--transactional { color: #22d3ee; }
.emkt-template-badge--activity { color: var(--amber); }
.emkt-template-badge--admin { color: #a78bfa; }
.email-log-html {
    max-height: 420px;
    overflow: auto;
    font-size: 11px;
    line-height: 1.4;
    background: var(--bg-0);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    white-space: pre-wrap;
    word-break: break-word;
}
.email-log-meta {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
    font-size: 12px;
}
.email-log-meta span { color: var(--text-tertiary); display: block; }
.badge-ok { color: var(--accent); }
.badge-danger { color: var(--red); }
.badge-warn { color: var(--amber); }

.capture-test-banner {
    position: fixed;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100002;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    color: #050506;
    background: #3effa0;
    box-shadow: 0 8px 32px rgba(62, 255, 160, 0.25);
}
.capture-test-banner__btn {
    font: inherit;
    font-size: 10px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(5, 5, 6, 0.2);
    background: rgba(5, 5, 6, 0.12);
    cursor: pointer;
}

/* Infrastructure roadmap (investor view) */
.roadmap-page { max-width: 1280px; }
.roadmap-header { flex-wrap: wrap; align-items: flex-start; gap: 16px; }
.roadmap-header .roadmap-version { margin-left: auto; font-size: 11px; color: var(--text-4); }
@media (max-width: 1023px) {
    .roadmap-header .roadmap-version { margin-left: 0; }
}
.roadmap-eyebrow {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 6px;
}
.roadmap-sub { font-size: 14px; color: var(--text-3); margin-top: 8px; max-width: 640px; line-height: 1.5; }
.roadmap-version { font-size: 11px; color: var(--text-4); margin-left: auto; }
.roadmap-muted { color: var(--text-3); font-size: 13px; }
.roadmap-hero { margin-bottom: 20px; }
.roadmap-headline {
    font-family: var(--display);
    font-size: 18px;
    font-weight: 600;
    color: var(--text-0);
    margin: 12px 0 20px;
    line-height: 1.4;
}
.roadmap-scqa {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}
.roadmap-scqa-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent);
    margin-bottom: 6px;
}
.roadmap-scqa-item p { font-size: 13px; line-height: 1.5; color: var(--text-2); }
.roadmap-thesis { font-size: 13px; color: var(--text-2); border-top: 1px solid var(--border); padding-top: 14px; }
.roadmap-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}
.roadmap-metric { display: flex; flex-direction: column; gap: 4px; }
.roadmap-metric-label { font-size: 11px; color: var(--text-4); text-transform: uppercase; letter-spacing: 0.04em; }
.roadmap-metric-value { font-family: var(--display); font-size: 22px; font-weight: 700; color: var(--text-0); }
.roadmap-metric-sub { font-size: 11px; color: var(--text-3); }
.roadmap-status--ready { color: var(--accent); }
.roadmap-status--partial { color: var(--amber); }
.roadmap-status--early { color: var(--red); }
.roadmap-section { margin-bottom: 20px; }
.roadmap-section-title {
    font-family: var(--display);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}
.roadmap-phases { display: flex; flex-direction: column; gap: 14px; }
.roadmap-phase {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    background: var(--bg-2);
}
.roadmap-phase--current {
    border-color: var(--accent-border);
    box-shadow: 0 0 0 1px var(--accent-dim);
}
.roadmap-phase-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.roadmap-phase-badge {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 4px;
}
.roadmap-phase-badge--current { background: var(--accent-dim); color: var(--accent); }
.roadmap-phase-badge--next { background: rgba(167, 139, 250, 0.15); color: #c4b5fd; }
.roadmap-phase-badge--planned { background: var(--amber-dim); color: var(--amber); }
.roadmap-phase-badge--vision { background: var(--bg-4); color: var(--text-3); }
.roadmap-phase-current { font-size: 11px; color: var(--accent); font-weight: 600; }
.roadmap-phase h3 { font-size: 15px; margin-bottom: 6px; }
.roadmap-phase h4 { font-size: 11px; text-transform: uppercase; color: var(--text-4); margin-bottom: 6px; }
.roadmap-phase-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 12px 0;
    font-size: 12px;
}
.roadmap-phase-cols ul { padding-left: 18px; color: var(--text-2); }
.roadmap-cost-band { font-size: 12px; color: var(--amber); margin-top: 8px; }
.roadmap-table { font-size: 12px; }
.roadmap-table th { white-space: nowrap; }
.roadmap-row-warn { background: var(--red-dim); }
.roadmap-positive { color: var(--accent); }
.roadmap-negative { color: var(--red); }
.roadmap-priority {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
}
.roadmap-priority--now { background: var(--accent-dim); color: var(--accent); }
.roadmap-priority--high { background: var(--amber-dim); color: var(--amber); }
.roadmap-priority--medium { background: var(--bg-4); color: var(--text-3); }
.roadmap-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}
@media (max-width: 900px) {
    .roadmap-two-col { grid-template-columns: 1fr; }
    .roadmap-phase-cols { grid-template-columns: 1fr; }
}
.roadmap-note { font-size: 11px; color: var(--text-3); max-width: 220px; }
.roadmap-stack-list { display: flex; flex-direction: column; gap: 10px; }
.roadmap-stack-item {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    font-size: 12px;
}
.roadmap-stack--recommended { border-color: var(--accent-border); }
.roadmap-stack--avoid-now { opacity: 0.65; }
.roadmap-stack-head { display: flex; justify-content: space-between; margin-bottom: 4px; }
.roadmap-stack-status { font-size: 10px; color: var(--text-4); text-transform: uppercase; }
.roadmap-severity {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}
.roadmap-severity--high { color: var(--red); }
.roadmap-severity--medium { color: var(--amber); }
.roadmap-severity--low { color: var(--text-3); }
.roadmap-checklist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}
.roadmap-check-cat { font-size: 12px; font-weight: 600; margin-bottom: 8px; color: var(--text-2); }
.roadmap-checklist { list-style: none; font-size: 12px; }
.roadmap-check { display: flex; gap: 8px; align-items: flex-start; padding: 4px 0; }
.roadmap-check-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 4px;
    flex-shrink: 0;
}
.roadmap-check--ready .roadmap-check-dot { background: var(--accent); }
.roadmap-check--partial .roadmap-check-dot { background: var(--amber); }
.roadmap-check--planned .roadmap-check-dot { background: var(--text-4); }
.roadmap-readiness-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 10px;
}
.roadmap-readiness-item {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 12px;
    font-size: 12px;
}
.roadmap-readiness--ready { border-color: var(--accent-border); }
.roadmap-readiness--not_ready { border-color: rgba(251, 113, 133, 0.25); }
.roadmap-readiness-label { display: block; font-weight: 600; margin-bottom: 4px; }
.roadmap-readiness-detail { color: var(--text-3); font-size: 11px; }
.roadmap-code {
    display: block;
    margin-top: 6px;
    font-size: 10px;
    color: var(--text-4);
    word-break: break-all;
}
.roadmap-footer-note {
    font-size: 12px;
    color: var(--text-4);
    padding: 16px 0 32px;
    border-top: 1px solid var(--border);
    line-height: 1.5;
}

/* Dashboard hub */
.dash-hub { max-width: 1400px; }
.dash-hub-loading, .dash-hub-error {
    padding: 48px 24px;
    text-align: center;
    color: var(--text-3);
    font-size: 14px;
}
.dash-hub-error { color: var(--danger); }

.dash-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 32px;
    padding: 28px 32px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    background: linear-gradient(135deg, rgba(62, 255, 160, 0.06) 0%, rgba(14, 17, 22, 0.9) 45%, rgba(167, 139, 250, 0.04) 100%);
    position: relative;
    overflow: hidden;
}
.dash-hero::before {
    content: "";
    position: absolute;
    top: -40%;
    right: -10%;
    width: 50%;
    height: 120%;
    background: radial-gradient(ellipse, var(--accent-glow), transparent 70%);
    pointer-events: none;
    opacity: 0.5;
}
.dash-hero-text { position: relative; z-index: 1; }
.dash-hero-eyebrow {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 8px;
}
.dash-hero-title {
    font-family: var(--display);
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text-0);
    line-height: 1.1;
    margin-bottom: 6px;
}
.dash-hero-sub { font-size: 13px; color: var(--text-3); }

.dash-kpi-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    position: relative;
    z-index: 1;
}
.dash-kpi {
    min-width: 120px;
    padding: 14px 18px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: rgba(8, 9, 12, 0.6);
    backdrop-filter: blur(8px);
}
.dash-kpi-label { display: block; font-size: 11px; color: var(--text-3); font-weight: 500; margin-bottom: 4px; }
.dash-kpi-value { display: block; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.dash-kpi-hint { display: block; font-size: 10px; color: var(--text-4); margin-top: 4px; }
.dash-kpi--good .dash-kpi-value { color: var(--accent); }
.dash-kpi--warn .dash-kpi-value { color: var(--amber); }
.dash-kpi--bad .dash-kpi-value { color: var(--red); }

.dash-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}
.dash-widget {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--bg-2);
    padding: 18px 20px;
    cursor: pointer;
    transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
    text-align: left;
}
.dash-widget:hover {
    border-color: var(--border-strong);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}
.dash-widget:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.dash-widget--green { --widget-accent: var(--accent); }
.dash-widget--violet { --widget-accent: #a78bfa; }
.dash-widget--cyan { --widget-accent: #22d3ee; }
.dash-widget--amber { --widget-accent: var(--amber); }
.dash-widget--red { --widget-accent: var(--red); }
.dash-widget--slate { --widget-accent: var(--text-2); }
.dash-widget:hover { border-color: color-mix(in srgb, var(--widget-accent) 35%, var(--border)); }

.dash-widget-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}
.dash-widget-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--widget-accent) 12%, transparent);
    color: var(--widget-accent);
    flex-shrink: 0;
}
.dash-widget-icon .admin-icon { width: 20px; height: 20px; }
.dash-widget-titles { flex: 1; min-width: 0; }
.dash-widget-title { font-size: 15px; font-weight: 600; color: var(--text-0); margin-bottom: 2px; }
.dash-widget-sub { font-size: 11px; color: var(--text-3); line-height: 1.35; }
.dash-widget-arrow {
    font-size: 14px;
    color: var(--text-4);
    transition: color var(--transition), transform var(--transition);
}
.dash-widget:hover .dash-widget-arrow { color: var(--widget-accent); transform: translateX(3px); }

.dash-widget-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}
.dash-metric {
    flex: 1;
    min-width: 72px;
    padding: 10px 12px;
    border-radius: var(--radius);
    background: var(--bg-3);
    border: 1px solid var(--border-subtle);
}
.dash-metric-val { display: block; font-size: 16px; font-weight: 700; letter-spacing: -0.02em; }
.dash-metric-lbl { display: block; font-size: 10px; color: var(--text-4); margin-top: 2px; }
.dash-metric--good .dash-metric-val { color: var(--accent); }
.dash-metric--warn .dash-metric-val { color: var(--amber); }
.dash-metric--bad .dash-metric-val { color: var(--red); }

.dash-widget-preview {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--border-subtle);
    padding-top: 10px;
}
.dash-widget-preview li {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 10px;
    font-size: 12px;
    padding: 6px 0;
    border-bottom: 1px solid var(--border-subtle);
}
.dash-widget-preview li:last-child { border-bottom: none; }
.dash-preview-primary { font-weight: 500; color: var(--text-1); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-preview-secondary { color: var(--text-3); font-size: 11px; }
.dash-preview-meta {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-4);
    margin-left: auto;
}

/* Dashboard — SQL panel */
.dash-sql {
    margin-bottom: 24px;
    padding: 20px 22px;
    border-color: color-mix(in srgb, var(--accent) 25%, var(--border));
    background: linear-gradient(135deg, var(--bg-3) 0%, var(--bg-2) 100%);
}
.dash-sql-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.dash-sql-title-row {
    display: flex;
    align-items: center;
    gap: 14px;
}
.dash-sql-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-dim);
    color: var(--accent);
}
.dash-sql-icon .admin-icon { width: 22px; height: 22px; }
.dash-sql-title {
    font-family: var(--display);
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 4px;
    color: var(--text-0);
}
.dash-sql-sub { margin: 0; font-size: 12px; color: var(--text-4); }
.dash-sql-kpis {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}
.dash-sql-kpi {
    min-width: 100px;
    padding: 12px 14px;
    border-radius: var(--radius);
    background: var(--bg-1);
    border: 1px solid var(--border-subtle);
}
.dash-sql-kpi-val {
    display: block;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-0);
}
.dash-sql-kpi-lbl {
    display: block;
    font-size: 10px;
    color: var(--text-4);
    margin-top: 2px;
}
.dash-sql-kpi--bad .dash-sql-kpi-val { color: var(--red); }
.dash-sql-kpi--warn .dash-sql-kpi-val { color: var(--amber); }
.dash-sql-warn {
    font-size: 12px;
    color: var(--amber);
    margin: 0 0 12px;
}
.dash-sql-bars-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-4);
    margin: 0 0 8px;
}
.dash-sql-bars { margin-top: 4px; }

.dash-recent { margin-bottom: 32px; }
.dash-recent-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.dash-recent-head h3 { font-size: 15px; font-weight: 600; }
.dash-recent-row { cursor: pointer; }
.dash-recent-row:hover td { background: var(--bg-hover); }

@media (max-width: 640px) {
    .dash-hero { padding: 20px; }
    .dash-kpi-row { width: 100%; }
    .dash-widgets { grid-template-columns: 1fr; }
    .dash-sql-kpis { display: grid; grid-template-columns: 1fr 1fr; }
}

/* API degraded + error boundary */
.admin-degraded-banner {
    margin: 0 0 16px;
    padding: 10px 14px;
    border-radius: var(--radius);
    border: 1px solid var(--amber-dim);
    background: var(--amber-dim);
    color: var(--amber);
    font-size: 12px;
    font-weight: 500;
}
.admin-error-boundary {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    padding: 32px 24px;
    text-align: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-2);
}
.admin-error-boundary__title { font-size: 18px; font-weight: 600; margin-bottom: 10px; }
.admin-error-boundary__hint { font-size: 13px; color: var(--text-3); max-width: 360px; margin-bottom: 20px; line-height: 1.5; }

/* Hata yönetimi */
.errors-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.errors-tab {
    padding: 8px 14px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-2);
    color: var(--text-2);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.errors-tab.active { border-color: var(--accent-border); background: var(--accent-dim); color: var(--accent); }
.errors-tab-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 999px;
    background: var(--red-dim);
    color: var(--red);
}
.errors-state { text-align: center; padding: 28px; color: var(--text-3); font-size: 13px; }
.errors-state--ok { color: var(--accent); font-weight: 500; }
.errors-state--bad { color: var(--danger); }
.errors-row {
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
    background: rgba(239, 68, 68, 0.03);
    cursor: pointer;
}
.errors-row-time { font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.errors-row-msg { font-size: 13px; font-weight: 500; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; }
.errors-pre {
    margin-top: 10px;
    font-size: 11px;
    white-space: pre-wrap;
    word-break: break-all;
    font-family: ui-monospace, monospace;
    max-height: 280px;
    overflow: auto;
    padding: 10px;
    border-radius: 6px;
    background: var(--bg-3);
    color: var(--text-2);
}
.errors-pre--stack { background: #0d0404; border: 1px solid rgba(239, 68, 68, 0.3); color: #ff6b6b; }
.errors-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 13px;
    z-index: 100;
    max-width: 320px;
}

/* Table horizontal scroll (mobile) */
.admin-table-wrap,
.card--table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0;
}
.card--table-scroll .data-table,
.admin-table-wrap .admin-table {
    min-width: 560px;
}
.admin-page > .admin-table-wrap {
    margin-bottom: 16px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--bg-secondary);
}

/* Sidebar mobile drawer head */
.sidebar-mobile-head {
    display: none;
}
.sidebar-close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-3);
    color: var(--text-0);
    cursor: pointer;
    flex-shrink: 0;
}
.sidebar-close-btn:hover {
    border-color: var(--border-strong);
    background: var(--bg-4);
}
.sidebar-mobile-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    min-width: 0;
}

/* ── Responsive shell (mobile / tablet) ── */
@media (max-width: 1023px) {
    .admin-shell--nav-open {
        overflow: hidden;
    }
    .admin-mobile-bar {
        display: flex;
        align-items: center;
        gap: 12px;
        flex-shrink: 0;
        padding: 10px 14px;
        padding-top: max(10px, env(safe-area-inset-top));
        border-bottom: 1px solid var(--border);
        background: rgba(8, 9, 12, 0.92);
        backdrop-filter: blur(12px);
        position: sticky;
        top: 0;
        z-index: 120;
    }
    .admin-menu-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        padding: 0;
        border: 1px solid var(--border);
        border-radius: 10px;
        background: var(--bg-3);
        color: var(--text-0);
        cursor: pointer;
        flex-shrink: 0;
    }
    .admin-menu-btn:hover { border-color: var(--border-strong); background: var(--bg-4); }
    .admin-mobile-brand {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
        min-width: 0;
    }
    .admin-mobile-brand .admin-brand-logo { height: 18px; }
    .admin-sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 280;
        border: none;
        padding: 0;
        margin: 0;
        background: rgba(0, 0, 0, 0.55);
        cursor: pointer;
        animation: admin-fade-in 200ms var(--ease);
    }
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 300;
        width: min(288px, 88vw);
        max-width: 100%;
        transform: translateX(-105%);
        transition: transform 240ms var(--ease);
        box-shadow: 8px 0 40px rgba(0, 0, 0, 0.45);
    }
    .sidebar.sidebar--open { transform: translateX(0); }
    .sidebar-mobile-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 12px 8px 10px;
        margin-bottom: 4px;
        border-bottom: 1px solid var(--border);
        flex-shrink: 0;
    }
    .sidebar-brand { display: none; }
    .sidebar-group-items {
        max-height: none;
    }
    .sidebar-group-toggle,
    .sidebar-item {
        min-height: 44px;
    }
    .sidebar-item {
        padding-top: 11px;
        padding-bottom: 11px;
    }
    .admin-shell--nav-open .main-content { overflow: hidden; touch-action: none; }
    .main-content {
        padding: 16px;
        padding-bottom: max(16px, env(safe-area-inset-bottom));
    }
    .page-title { font-size: 1.25rem; }
    .page-header { align-items: flex-start; }
    .page-header .btn,
    .page-header .form-input,
    .page-header select { width: 100%; max-width: 100%; }
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .stat-card { padding: 14px; }
    .stat-card-value { font-size: 22px; }
    .main-content .card:has(.data-table),
    .main-content .admin-card:has(.admin-table),
    .main-content .admin-page > .admin-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .main-content .card:has(> .data-table) {
        padding: 0;
    }
    .data-table,
    .admin-table {
        min-width: 560px;
    }
    .data-table th,
    .data-table td,
    .admin-table th,
    .admin-table td {
        padding: 10px 12px;
        font-size: 12px;
    }
    .admin-page-header {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }
    .admin-page-header__actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }
    .admin-page-header__actions .btn,
    .admin-page-header__actions .form-input,
    .admin-page-header__actions select {
        width: 100%;
        max-width: none;
    }
    .admin-toolbar-search {
        width: 100%;
        max-width: none;
    }
    .admin-toolbar-btns {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        width: 100%;
    }
    .admin-toolbar-btns .btn {
        flex: 1 1 calc(33.333% - 6px);
        min-width: 72px;
        justify-content: center;
    }
    .sm-toolbar .btn-primary {
        margin-left: 0 !important;
        width: 100%;
    }
    .sm-toolbar .btn,
    .sm-toolbar .form-input,
    .sm-toolbar strong {
        flex: 1 1 auto;
    }
    .kanban-board {
        scroll-snap-type: x proximity;
        padding-left: 4px;
        padding-right: 4px;
        -webkit-overflow-scrolling: touch;
    }
    .kanban-column {
        scroll-snap-align: start;
    }
    .kanban-board { min-height: 320px; }
    .kanban-column { min-width: 260px; max-width: 280px; }
    .kanban-board-tabs { flex-wrap: wrap; }
    .sm-calendar-card { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .sm-weekdays,
    .sm-calendar-grid { min-width: 520px; }
    .sm-toolbar { flex-direction: column; align-items: stretch; }
    .sm-filter { max-width: none; width: 100%; }
    .roadmap-header { flex-direction: column; }
    .roadmap-version { margin-left: 0; }
    .roadmap-metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .roadmap-headline { font-size: 16px; }
    .roadmap-scqa { grid-template-columns: 1fr; }
    .dash-hero { padding: 20px 16px; flex-direction: column; align-items: stretch; }
    .dash-kpi-row { width: 100%; }
    .dash-kpi { flex: 1 1 calc(50% - 6px); min-width: 0; }
    .dash-widgets { grid-template-columns: 1fr; }
    .dash-recent-head { flex-wrap: wrap; gap: 8px; }
    .errors-toast {
        left: 12px;
        right: 12px;
        bottom: 12px;
        max-width: none;
    }
    .modal-panel { max-height: 85dvh; padding: 18px; }
    .capture-test-banner {
        left: 12px;
        right: 12px;
        transform: none;
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 639px) {
    .stats-grid { grid-template-columns: 1fr; }
    .dash-kpi { flex: 1 1 100%; }
    .roadmap-metrics-grid { grid-template-columns: 1fr; }
    .pa-metrics { grid-template-columns: 1fr 1fr; }
    .btn { justify-content: center; }
    .form-row { flex-direction: column; }
    .form-row .form-group { width: 100%; }
    .errors-tabs { flex-wrap: wrap; }
    .kanban-column {
        min-width: min(88vw, 300px);
        max-width: 88vw;
    }
    .kanban-tab {
        flex: 1 1 auto;
        text-align: center;
        min-height: 44px;
    }
    .ui-capture-kpis { grid-template-columns: 1fr 1fr; }
    .ui-capture-steps { grid-template-columns: 1fr; }
    .ui-capture-run-stats { grid-template-columns: 1fr 1fr; }
    .ui-capture-runs { grid-template-columns: 1fr; }
    .ui-capture-run-actions .btn { flex: 1 1 calc(50% - 4px); }
    .admin-toolbar-btns .btn { flex: 1 1 100%; }
    .form-input,
    .admin-input,
    .admin-auth__input {
        font-size: 16px;
    }
}

@keyframes admin-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ── Shared admin page primitives (admin-card / admin-table were unstyled) ── */
.admin-page { max-width: 1200px; }
.admin-page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
}
.admin-page-header__text { min-width: 0; flex: 1 1 280px; }
.admin-page-header__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.admin-page-eyebrow {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 6px;
}
.admin-page-subtitle {
    font-size: 13px;
    color: var(--text-3);
    margin-top: 6px;
    line-height: 1.5;
}
.admin-toolbar-search {
    min-width: 160px;
    max-width: 240px;
}
.admin-toolbar-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.admin-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 16px;
}
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.admin-table th {
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}
.admin-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}
.admin-table tbody tr:hover td { background: var(--bg-tertiary); }
.admin-table tbody tr.active td { background: var(--accent-dim); }
.admin-input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-3);
    color: var(--text-0);
    font-family: var(--font);
    font-size: 13px;
}

/* ── UI Capture hub ── */
.ui-capture-hub { max-width: 1280px; }
.ui-capture-toast {
    margin-bottom: 20px;
    padding: 12px 16px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--accent-border);
    background: var(--accent-dim);
    color: var(--accent);
    font-size: 13px;
}
.ui-capture-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 28px;
}
.ui-capture-kpi {
    padding: 16px 18px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--bg-2);
}
.ui-capture-kpi--good .ui-capture-kpi-value { color: var(--accent); }
.ui-capture-kpi-label {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-3);
    margin-bottom: 6px;
}
.ui-capture-kpi-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.02em;
    font-family: var(--display);
}
.ui-capture-kpi-value--sm {
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font);
    word-break: break-all;
}
.ui-capture-section-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-3);
    margin: 0 0 14px;
}
.ui-capture-flow { margin-bottom: 32px; }
.ui-capture-steps {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}
.ui-capture-step {
    display: flex;
    gap: 14px;
    padding: 16px 18px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: linear-gradient(145deg, var(--bg-2) 0%, rgba(14, 17, 22, 0.95) 100%);
}
.ui-capture-step-num {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--accent-dim);
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
}
.ui-capture-step h3 {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 6px;
    color: var(--text-0);
}
.ui-capture-step p {
    margin: 0;
    font-size: 12px;
    line-height: 1.55;
    color: var(--text-3);
}
.ui-capture-step code {
    font-size: 11px;
    word-break: break-all;
}
.ui-capture-flow-hint { font-size: 12px; margin-top: 12px; }
.ui-capture-loading,
.ui-capture-empty {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-3);
}
.ui-capture-empty-icon {
    display: inline-flex;
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    color: var(--text-4);
    opacity: 0.6;
}
.ui-capture-empty h2 {
    font-size: 1.1rem;
    color: var(--text-1);
    margin-bottom: 8px;
}
.ui-capture-runs-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}
.ui-capture-runs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}
.ui-capture-run {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--bg-2);
    padding: 16px 18px;
    cursor: pointer;
    transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
    text-align: left;
}
.ui-capture-run:hover {
    border-color: var(--border-strong);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.28);
}
.ui-capture-run--selected {
    border-color: var(--accent-border);
    box-shadow: 0 0 0 1px var(--accent-border), 0 12px 40px rgba(62, 255, 160, 0.08);
}
.ui-capture-run--default {
    background: linear-gradient(135deg, rgba(62, 255, 160, 0.04) 0%, var(--bg-2) 55%);
}
.ui-capture-run-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}
.ui-capture-run-id-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    min-width: 0;
}
.ui-capture-run-id {
    font-size: 14px;
    font-weight: 700;
    font-family: var(--mono, ui-monospace, monospace);
    margin: 0;
    word-break: break-all;
}
.ui-capture-run-desc {
    font-size: 13px;
    line-height: 1.45;
    margin: 0 0 12px;
    color: var(--text-2);
}
.ui-capture-chip {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.ui-capture-chip--default {
    background: var(--accent-dim);
    color: var(--accent);
    border: 1px solid var(--accent-border);
}
.ui-capture-chip--live {
    background: rgba(62, 255, 160, 0.12);
    color: var(--accent);
}
.ui-capture-run-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px 12px;
    margin: 0 0 14px;
    font-size: 12px;
}
.ui-capture-run-stats dt {
    color: var(--text-4);
    font-weight: 500;
    margin-bottom: 2px;
}
.ui-capture-run-stats dd {
    margin: 0;
    font-weight: 600;
    color: var(--text-1);
}
.ui-capture-run-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.ui-capture-detail {
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    padding: 22px 24px;
    margin-bottom: 20px;
}
.ui-capture-detail-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}
.ui-capture-detail-eyebrow {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-4);
    margin-bottom: 4px;
}
.ui-capture-detail-title {
    font-family: var(--display);
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    word-break: break-all;
}
.ui-capture-meta-grid {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 10px 20px;
    font-size: 13px;
    margin-bottom: 12px;
}
.ui-capture-meta-grid dt { color: var(--text-4); font-weight: 500; }
.ui-capture-meta-grid dd { margin: 0; color: var(--text-1); }
.ui-capture-meta-pre { white-space: pre-wrap; }
.ui-capture-detail-hint { font-size: 12px; }
.ui-capture-form {
    display: grid;
    gap: 12px;
    max-width: 520px;
    margin-bottom: 16px;
}
.ui-capture-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-3);
}
.ui-capture-screens-title {
    font-size: 13px;
    font-weight: 600;
    margin: 20px 0 10px;
}
.ui-capture-screen-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 280px;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}
.ui-capture-screen-list li {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 14px;
    font-size: 13px;
    border-bottom: 1px solid var(--border);
}
.ui-capture-screen-list li:last-child { border-bottom: none; }
.ui-capture-advanced {
    border: 1px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 14px 18px;
    font-size: 13px;
    color: var(--text-3);
}
.ui-capture-advanced summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--text-2);
}
.ui-capture-danger {
    position: fixed;
    inset: 0;
    z-index: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
}
.ui-capture-danger-inner {
    width: min(440px, 100%);
    padding: 24px;
    border-radius: var(--radius-xl);
    border: 1px solid rgba(251, 113, 133, 0.35);
    background: var(--bg-2);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}
.ui-capture-danger-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 10px;
    color: var(--danger);
}
.ui-capture-danger-body {
    font-size: 13px;
    color: var(--text-2);
    line-height: 1.5;
    margin: 0 0 14px;
}
.ui-capture-danger-check {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 13px;
    margin-bottom: 18px;
    cursor: pointer;
}
.ui-capture-danger-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

