/* ═══════════════════════════════════════════════════════════════════
   LURE AI — Hook. Build. Reel. — Design System
   ═══════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

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

:root {
    --bg-deep: #06060f;
    --bg-base: #0a0a1a;
    --bg-surface: rgba(15, 15, 35, 0.7);
    --bg-elevated: rgba(25, 25, 55, 0.6);
    --bg-hover: rgba(35, 35, 75, 0.5);
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-shine: rgba(255, 255, 255, 0.03);

    --violet: #7c3aed;
    --violet-glow: rgba(124, 58, 237, 0.25);
    --cyan: #06b6d4;
    --cyan-glow: rgba(6, 182, 212, 0.2);
    --emerald: #10b981;
    --emerald-glow: rgba(16, 185, 129, 0.2);
    --amber: #f59e0b;
    --amber-glow: rgba(245, 158, 11, 0.15);
    --rose: #f43f5e;
    --rose-glow: rgba(244, 63, 94, 0.15);
    --blue: #3b82f6;
    --blue-glow: rgba(59, 130, 246, 0.2);

    --text-primary: #f0f0ff;
    --text-secondary: #8b8bae;
    --text-muted: #5a5a7a;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    --sidebar-w: 72px;
    --sidebar-expanded: 240px;
    --transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

html {
    height: 100%;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg-deep);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Animated background */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 10% 20%, rgba(124, 58, 237, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 90% 80%, rgba(6, 182, 212, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse 50% 40% at 50% 50%, rgba(16, 185, 129, 0.04) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
    animation: bgPulse 12s ease-in-out infinite alternate;
}

@keyframes bgPulse {
    0% {
        opacity: 0.6;
    }

    100% {
        opacity: 1;
    }
}

/* ─── Sidebar ─── */
.sidebar {
    width: var(--sidebar-w);
    background: var(--bg-surface);
    backdrop-filter: blur(24px);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.25rem 0;
    gap: 0.5rem;
    z-index: 100;
    position: relative;
    transition: width var(--transition);
    flex-shrink: 0;
}

.sidebar:hover {
    width: var(--sidebar-expanded);
}

.sidebar:hover .nav-label {
    opacity: 1;
    max-width: 200px;
    margin-left: 0;
}

.sidebar:hover .logo-text {
    opacity: 1;
    max-width: 200px;
    margin-left: 0.75rem;
}

.logo-mark {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #0ea5e9, #06b6d4);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
    cursor: default;
}

.logo-mark::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 14px;
    background: linear-gradient(135deg, #0ea5e9, #06b6d4);
    opacity: 0.35;
    filter: blur(10px);
    z-index: -1;
    animation: logoGlow 3s ease-in-out infinite alternate;
}

@keyframes logoGlow {
    0% {
        opacity: 0.2;
    }

    100% {
        opacity: 0.5;
    }
}

.logo-wrap {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 0 1rem;
    width: 100%;
    justify-content: center;
}

.sidebar:hover .logo-wrap {
    justify-content: flex-start;
}

.logo-text {
    font-weight: 700;
    font-size: 1.1rem;
    background: linear-gradient(135deg, #7dd3fc, #67e8f9);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0;
    max-width: 0;
    overflow: hidden;
    white-space: nowrap;
    transition: opacity 0.35s ease, max-width 0.4s cubic-bezier(0.16, 1, 0.3, 1), margin 0.35s ease;
}

.nav-items {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    width: 100%;
    padding: 0 0.75rem;
    flex: 1;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.85rem;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
    border: none;
    background: none;
    font-size: 0.875rem;
    font-weight: 500;
    width: 100%;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
}

.nav-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-btn.active {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.15), rgba(6, 182, 212, 0.1));
    color: #c4b5fd;
    box-shadow: inset 0 0 0 1px rgba(124, 58, 237, 0.2);
}

.nav-btn svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.nav-label {
    opacity: 0;
    max-width: 0;
    overflow: hidden;
    transition: opacity 0.3s ease 0.05s, max-width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

.nav-divider {
    height: 1px;
    background: var(--glass-border);
    margin: 0.75rem 0;
    width: calc(100% - 1.5rem);
    align-self: center;
}

/* ─── Main Content ─── */
.main {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 2rem 2.5rem;
    position: relative;
    z-index: 1;
    scroll-behavior: smooth;
    min-width: 0;
    /* Prevent flex blowout */
}

.main::-webkit-scrollbar {
    width: 6px;
}

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

.main::-webkit-scrollbar-thumb {
    background: rgba(124, 58, 237, 0.3);
    border-radius: 3px;
}

/* ─── Page Header ─── */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page-header .subtitle {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.header-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* ─── Metric Cards ─── */
.metrics-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.metric-card {
    background: var(--bg-surface);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: all var(--transition);
    cursor: default;
}

.metric-card:hover {
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.metric-card.violet::before {
    background: linear-gradient(90deg, var(--violet), transparent);
}

.metric-card.cyan::before {
    background: linear-gradient(90deg, var(--cyan), transparent);
}

.metric-card.emerald::before {
    background: linear-gradient(90deg, var(--emerald), transparent);
}

.metric-card.amber::before {
    background: linear-gradient(90deg, var(--amber), transparent);
}

.metric-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.metric-icon.violet {
    background: var(--violet-glow);
    color: var(--violet);
}

.metric-icon.cyan {
    background: var(--cyan-glow);
    color: var(--cyan);
}

.metric-icon.emerald {
    background: var(--emerald-glow);
    color: var(--emerald);
}

.metric-icon.amber {
    background: var(--amber-glow);
    color: var(--amber);
}

.metric-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.metric-value {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.metric-trend {
    font-size: 0.75rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.metric-trend.up {
    color: var(--emerald);
}

.metric-trend.neutral {
    color: var(--text-muted);
}

/* ─── Glass Panel ─── */
.glass-panel {
    background: var(--bg-surface);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 1.5rem;
    min-width: 0;
    /* Prevent grid blowout */
}

.panel-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h2 {
    font-size: 1rem;
    font-weight: 600;
}

.panel-body {
    padding: 1.5rem;
}

/* ─── Pipeline Funnel ─── */
.funnel-container {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 2rem 1.5rem;
    position: relative;
    overflow: hidden;
}

.funnel-stage {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
}

.funnel-bubble {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    font-size: 1.25rem;
    font-weight: 800;
    position: relative;
    transition: all 0.3s;
}

.funnel-bubble::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    opacity: 0.25;
    filter: blur(10px);
    z-index: -1;
}

.funnel-stage:hover .funnel-bubble {
    transform: scale(1.12);
}

.funnel-stage-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.funnel-stage-count {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.funnel-arrow {
    color: var(--text-muted);
    flex-shrink: 0;
    opacity: 0.3;
    margin: 0 -0.25rem;
    z-index: 0;
}

.funnel-line {
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg, var(--amber), var(--blue), var(--emerald), var(--violet), var(--cyan));
    opacity: 0.12;
    z-index: 0;
    transform: translateY(-1rem);
}

/* ─── Table ─── */
.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    padding: 0.85rem 1.25rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.15);
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    transition: color var(--transition);
}

th:hover {
    color: var(--text-secondary);
}

th.sorted {
    color: var(--violet);
}

td {
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    font-size: 0.875rem;
    vertical-align: middle;
    white-space: nowrap;
}

th:first-child,
td:first-child {
    padding-left: 1.5rem;
}

th:last-child,
td:last-child {
    padding-right: 1.5rem;
}

tr {
    transition: background var(--transition);
}

tr:hover td {
    background: rgba(124, 58, 237, 0.04);
}

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

.lead-name {
    font-weight: 600;
    color: var(--text-primary);
}

.lead-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.15rem;
}

/* Score chip */
.score-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.65rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 700;
    min-width: 42px;
}

.score-chip.high {
    background: var(--emerald-glow);
    color: var(--emerald);
}

.score-chip.mid {
    background: var(--amber-glow);
    color: var(--amber);
}

.score-chip.low {
    background: var(--rose-glow);
    color: var(--rose);
}

/* Status badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.7rem;
    border-radius: 99px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: capitalize;
    white-space: nowrap;
    border: 1px solid;
}

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

.status-discovered {
    border-color: rgba(251, 191, 36, 0.3);
    color: var(--amber);
    background: rgba(251, 191, 36, 0.06);
}

.status-qualified {
    border-color: rgba(59, 130, 246, 0.3);
    color: var(--blue);
    background: rgba(59, 130, 246, 0.06);
}

.status-website_generated {
    border-color: rgba(16, 185, 129, 0.3);
    color: var(--emerald);
    background: rgba(16, 185, 129, 0.06);
}

.status-contacted {
    border-color: rgba(139, 92, 246, 0.3);
    color: var(--violet);
    background: rgba(139, 92, 246, 0.06);
}

.status-converted {
    border-color: rgba(6, 182, 212, 0.3);
    color: var(--cyan);
    background: rgba(6, 182, 212, 0.06);
}

.status-rejected {
    border-color: rgba(244, 63, 94, 0.3);
    color: var(--rose);
    background: rgba(244, 63, 94, 0.06);
}

/* ─── Buttons ─── */
.btn-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: nowrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.15rem;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--violet), #6d28d9);
    color: white;
    box-shadow: 0 2px 12px var(--violet-glow);
}

.btn-primary:hover {
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4);
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
}

.btn-ghost:hover {
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    background: var(--bg-hover);
}

.btn-sm {
    padding: 0.35rem 0.7rem;
    font-size: 0.75rem;
    border-radius: 6px;
}

.btn-icon {
    padding: 0.5rem;
    border-radius: var(--radius-sm);
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
}

.btn-group {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

/* ─── Search / Filters Bar ─── */
.toolbar {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    flex-wrap: wrap;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 0 0.75rem;
    flex: 1;
    min-width: 200px;
    transition: border-color var(--transition);
}

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

.search-box svg {
    flex-shrink: 0;
    color: var(--text-muted);
}

.search-box input {
    background: none;
    border: none;
    color: var(--text-primary);
    padding: 0.6rem 0.5rem;
    font-size: 0.85rem;
    outline: none;
    width: 100%;
    font-family: inherit;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.filter-select {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.75rem;
    color: var(--text-primary);
    font-size: 0.85rem;
    outline: none;
    font-family: inherit;
    cursor: pointer;
    transition: border-color var(--transition);
    -webkit-appearance: none;
    appearance: none;
}

.filter-select:focus {
    border-color: var(--violet);
}

.filter-select option {
    background: var(--bg-deep);
}

/* ─── Terminal ─── */
.terminal {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    font-family: 'SF Mono', 'Cascadia Code', 'JetBrains Mono', Consolas, monospace;
    font-size: 0.78rem;
    line-height: 1.6;
    color: var(--emerald);
    max-height: 220px;
    overflow-y: auto;
    white-space: pre-wrap;
    margin-bottom: 1.5rem;
}

.terminal::-webkit-scrollbar {
    width: 4px;
}

.terminal::-webkit-scrollbar-thumb {
    background: rgba(16, 185, 129, 0.3);
    border-radius: 2px;
}

.terminal .t-time {
    color: var(--text-muted);
}

.terminal .t-error {
    color: var(--rose);
}

.terminal .t-success {
    color: var(--emerald);
}

.terminal .t-info {
    color: var(--cyan);
}

/* ─── Activity Feed ─── */
.activity-item {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

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

.activity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 0.35rem;
    flex-shrink: 0;
}

.activity-dot.success {
    background: var(--emerald);
    box-shadow: 0 0 8px var(--emerald-glow);
}

.activity-dot.error {
    background: var(--rose);
    box-shadow: 0 0 8px var(--rose-glow);
}

.activity-dot.info {
    background: var(--blue);
    box-shadow: 0 0 8px var(--blue-glow);
}

.activity-dot.warning {
    background: var(--amber);
    box-shadow: 0 0 8px var(--amber-glow);
}

.activity-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.activity-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

/* ─── Modal ─── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeIn 0.2s;
}

.modal-overlay.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal {
    background: var(--bg-base);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    width: 860px;
    max-width: 92vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(124, 58, 237, 0.1);
    animation: modalIn 0.25s ease-out;
}

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

    to {
        transform: none;
        opacity: 1;
    }
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
    font-family: 'SF Mono', Consolas, monospace;
    font-size: 0.82rem;
    color: var(--text-secondary);
    white-space: pre-wrap;
    background: rgba(0, 0, 0, 0.2);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 6px;
    transition: all var(--transition);
}

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

/* ─── Toast ─── */
.toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    background: var(--bg-surface);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-md);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transform: translateY(150%);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 10000;
    font-size: 0.85rem;
}

.toast.show {
    transform: translateY(0);
}

.spinner {
    border: 2px solid rgba(124, 58, 237, 0.2);
    border-left-color: var(--violet);
    border-radius: 50%;
    width: 18px;
    height: 18px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

/* ─── Pagination ─── */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--glass-border);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.pagination-btns {
    display: flex;
    gap: 0.35rem;
}

.page-btn {
    padding: 0.35rem 0.7rem;
    border-radius: 6px;
    border: 1px solid var(--glass-border);
    background: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.78rem;
    transition: all var(--transition);
}

.page-btn:hover {
    border-color: var(--violet);
    color: var(--text-primary);
}

.page-btn.active {
    background: var(--violet);
    border-color: var(--violet);
    color: white;
}

.page-btn:disabled {
    opacity: 0.3;
    cursor: default;
}

/* ─── Views (page switching) ─── */
.view {
    display: none;
}

.view.active {
    display: block;
    animation: viewFade 0.3s ease;
}

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

    to {
        opacity: 1;
        transform: none;
    }
}

/* ─── Two-column layout ─── */
.split-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 1.5rem;
}

.split-layout>* {
    min-width: 0;
    /* Prevent flex/grid blowout */
}

.split-layout .full-width {
    grid-column: 1 / -1;
}

/* ─── Stats bar ─── */
.stats-bar {
    display: flex;
    gap: 2rem;
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    font-size: 0.8rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
}

.stat-item strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* ─── Mobile Navigation ─── */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    backdrop-filter: blur(24px);
    border-top: 1px solid var(--glass-border);
    z-index: 1000;
    padding: 0.5rem 0;
    padding-bottom: env(safe-area-inset-bottom, 0.5rem);
    justify-content: space-around;
    align-items: center;
}

.mobile-nav .nav-btn {
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem;
    width: auto;
    border-radius: var(--radius-sm);
    flex: 1;
}

.mobile-nav .nav-btn svg {
    width: 20px;
    height: 20px;
    margin: 0 auto;
}

.mobile-nav .nav-label {
    opacity: 1;
    max-width: 100%;
    font-size: 0.65rem;
    text-align: center;
    transition: none;
}

/* ─── Responsive ─── */
@media (max-width: 1200px) {
    .split-layout {
        grid-template-columns: 1fr;
    }

    .metrics-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .metrics-row {
        grid-template-columns: 1fr;
    }

    .main {
        padding: 1rem;
        padding-bottom: 90px;
    }

    .sidebar {
        display: none;
    }

    .mobile-nav {
        display: flex;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .header-actions {
        width: 100%;
    }

    .header-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box,
    .filter-select {
        width: 100%;
    }

    .modal {
        max-height: 90vh;
        width: 95vw;
    }
}

/* ─── Checkbox ─── */
.custom-check {
    width: 16px;
    height: 16px;
    border: 1.5px solid var(--text-muted);
    border-radius: 4px;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    appearance: none;
    -webkit-appearance: none;
    background: none;
}

.custom-check:checked {
    background: var(--violet);
    border-color: var(--violet);
}

.custom-check:checked::after {
    content: '✓';
    color: white;
    font-size: 10px;
    font-weight: 700;
}

/* ─── Empty State ─── */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

.empty-state svg {
    opacity: 0.2;
    margin-bottom: 1rem;
}

.empty-state p {
    font-size: 0.9rem;
}