/* ═══════════════════════════════════════════════════
   DESIGN SYSTEM — Custom Properties
   ═══════════════════════════════════════════════════ */
:root {
    --bg-primary: #fafaf9;
    --bg-surface: #ffffff;
    --bg-surface-hover: #f5f5f4;
    --bg-surface-elevated: rgba(255,255,255,0.7);
    --bg-sidebar: #1c1008;
    --bg-sidebar-hover: rgba(255,255,255,0.08);
    --bg-sidebar-active: rgba(255,255,255,0.12);
    --text-primary: #1c1008;
    --text-secondary: #78716c;
    --text-muted: #a8a29e;
    --text-sidebar: #d6d3d1;
    --text-sidebar-active: #ffffff;
    --accent-primary: #ea580c;
    --accent-primary-hover: #c2410c;
    --accent-primary-light: #fff7ed;
    --accent-primary-glow: rgba(234,88,12,0.35);
    --accent-gradient: linear-gradient(135deg, #f97316, #dc2626);
    --accent-success: #059669;
    --accent-success-light: #d1fae5;
    --accent-warning: #b45309;
    --accent-warning-light: #fef3c7;
    --accent-error: #dc2626;
    --accent-error-light: #fee2e2;
    --border-default: #e7e5e4;
    --border-focus: var(--accent-primary);
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 40px rgba(0,0,0,0.12);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-full: 9999px;
    --space-1: 4px; --space-2: 8px; --space-3: 12px;
    --space-4: 16px; --space-5: 20px; --space-6: 24px;
    --space-8: 32px; --space-10: 40px; --space-12: 48px;
    --space-16: 64px;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    --text-xs: 0.75rem; --text-sm: 0.8125rem; --text-base: 0.875rem;
    --text-lg: 1rem; --text-xl: 1.25rem; --text-2xl: 1.5rem;
    --text-3xl: 2.25rem;
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --bg-primary: #120c07;
    --bg-surface: #1c1410;
    --bg-surface-hover: #292018;
    --bg-surface-elevated: rgba(28,20,16,0.8);
    --bg-sidebar: #0a0704;
    --text-primary: #fafaf9;
    --text-secondary: #a8a29e;
    --text-muted: #78716c;
    --accent-primary: #fb923c;
    --accent-primary-hover: #f97316;
    --accent-primary-light: rgba(251,146,60,0.12);
    --accent-primary-glow: rgba(251,146,60,0.3);
    --accent-gradient: linear-gradient(135deg, #fb923c, #f87171);
    --border-default: #292018;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.3);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.4);
}

/* ═══ RESET & BASE ═══ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: var(--font-family);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ═══ APP LAYOUT ═══ */
.app-layout {
    min-height: 100vh;
}

/* ═══ SIDEBAR ═══ */
.sidebar {
    background: var(--bg-sidebar);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 260px;
    z-index: 100;
    overflow-y: auto;
    transition: transform var(--transition-base);
}
.sidebar-brand {
    padding: var(--space-6) var(--space-6) var(--space-4);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sidebar-brand h1 {
    font-size: var(--text-xl);
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: var(--space-3);
}
.sidebar-brand h1 .brand-icon {
    width: 32px; height: 32px;
    background: var(--accent-gradient);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}
.sidebar-brand p {
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-top: var(--space-1);
}
.sidebar-nav {
    padding: var(--space-3) var(--space-3);
    flex: 1;
}
.sidebar-label {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    padding: var(--space-4) var(--space-3) var(--space-2);
    font-weight: 600;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-sm);
    color: var(--text-sidebar);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: var(--text-sm);
    text-decoration: none;
    user-select: none;
    margin-bottom: 1px;
}
.nav-item:hover {
    background: var(--bg-sidebar-hover);
    color: var(--text-sidebar-active);
}
.nav-item.active {
    background: var(--bg-sidebar-active);
    color: var(--text-sidebar-active);
    font-weight: 500;
}
.nav-item svg { width: 18px; height: 18px; opacity: 0.7; flex-shrink: 0; }
.nav-item.active svg { opacity: 1; }
.nav-badge {
    margin-left: auto;
    font-size: var(--text-xs);
    background: var(--accent-primary);
    color: #fff;
    padding: 1px 7px;
    border-radius: var(--radius-full);
    font-weight: 600;
}
.sidebar-footer {
    padding: var(--space-3);
    border-top: 1px solid rgba(255,255,255,0.06);
}

/* ═══ MAIN CONTENT ═══ */
.main-content {
    margin-left: 260px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4) var(--space-8);
    border-bottom: 1px solid var(--border-default);
    background: var(--bg-surface);
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}
.breadcrumb span { color: var(--text-muted); }
.breadcrumb strong { color: var(--text-primary); font-weight: 600; }
.topbar-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}
.theme-toggle {
    width: 36px; height: 36px;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}
.theme-toggle:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: var(--accent-primary-light);
}
.theme-toggle svg { width: 18px; height: 18px; transition: transform 0.4s ease; }
.theme-toggle:hover svg { transform: rotate(30deg); }
.content-area {
    flex: 1;
    padding: var(--space-8);
    max-width: 1200px;
    width: 100%;
}

/* ═══ MOBILE HAMBURGER ═══ */
.mobile-toggle {
    display: none;
    width: 40px; height: 40px;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--text-primary);
}
.mobile-toggle svg { width: 24px; height: 24px; }
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99;
    backdrop-filter: blur(4px);
}
.sidebar-overlay.active { display: block; }

/* ═══ VIEWS ═══ */
.view { display: none; }
.view.active {
    display: block;
    animation: viewEnter var(--transition-slow) forwards;
}
@keyframes viewEnter {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ═══ CARDS ═══ */
.card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-default);
    padding: var(--space-6);
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
}
.card:hover {
    border-color: var(--border-hover, var(--accent-primary));
    box-shadow: var(--shadow-md);
}
.card-glass {
    background: var(--bg-surface-elevated);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
}
.card-title {
    font-size: var(--text-lg);
    font-weight: 600;
    margin-bottom: var(--space-4);
    color: var(--text-primary);
}
.card-subtitle {
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: var(--space-3);
}

/* ═══ CATALOG VIEW ═══ */
.catalog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
    flex-wrap: wrap;
}
.catalog-header h2 {
    font-size: var(--text-2xl);
    font-weight: 700;
}
.search-box {
    position: relative;
    flex: 1;
    max-width: 320px;
    min-width: 200px;
}
.search-box input {
    width: 100%;
    padding: var(--space-2) 60px var(--space-2) 36px;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    background: var(--bg-surface);
    color: var(--text-primary);
    transition: all var(--transition-fast);
}
.search-box input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-primary-light);
}
.search-box input::placeholder { color: var(--text-muted); }
.search-box svg {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px; height: 16px;
    color: var(--text-muted);
    pointer-events: none;
}
.search-box .kbd-hint {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.6875rem;
    color: var(--text-muted);
    border: 1px solid var(--border-default);
    border-radius: 4px;
    padding: 1px 5px;
    font-family: var(--font-mono);
    pointer-events: none;
}

/* Category pills */
.category-pills {
    display: flex;
    gap: var(--space-2);
    overflow-x: auto;
    padding-bottom: var(--space-2);
    margin-bottom: var(--space-6);
    scrollbar-width: none;
}
.category-pills::-webkit-scrollbar { display: none; }
.pill {
    flex-shrink: 0;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: 500;
    cursor: pointer;
    border: 1px solid var(--border-default);
    background: var(--bg-surface);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    user-select: none;
}
.pill:hover { border-color: var(--accent-primary); color: var(--accent-primary); }
.pill.active {
    background: var(--accent-primary);
    color: #fff;
    border-color: var(--accent-primary);
}

/* Skill cards grid */
.cycle-section { margin-bottom: var(--space-8); }
.cycle-title {
    font-size: var(--text-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: var(--space-4);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}
.cycle-title .count {
    font-size: var(--text-xs);
    background: var(--bg-surface-hover);
    padding: 2px 8px;
    border-radius: var(--radius-full);
}
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--space-4);
}
.skill-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    cursor: pointer;
    transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
    will-change: transform;
    opacity: 0;
    animation: cardEnter 0.4s var(--transition-base) forwards;
    position: relative;
    overflow: hidden;
}
.skill-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity var(--transition-fast);
}
.skill-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-primary);
}
.skill-card:hover::before { opacity: 1; }
.skill-card-icon {
    width: 40px; height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-3);
    font-size: 1.2rem;
}
.skill-card-name {
    font-size: var(--text-base);
    font-weight: 600;
    margin-bottom: var(--space-2);
    color: var(--text-primary);
}
.skill-card-desc {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: var(--space-3);
}
.skill-card-action {
    font-size: var(--text-xs);
    color: var(--accent-primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--space-1);
}
.skill-card-action svg { width: 14px; height: 14px; transition: transform var(--transition-fast); }
.skill-card:hover .skill-card-action svg { transform: translateX(3px); }

@keyframes cardEnter {
    from { opacity: 0; transform: translateY(16px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Skeleton */
.skeleton {
    background: linear-gradient(90deg, var(--bg-surface-hover) 25%, var(--bg-surface) 50%, var(--bg-surface-hover) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-sm);
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ═══ WIZARD VIEW ═══ */
.wizard-back {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--text-secondary);
    font-size: var(--text-sm);
    cursor: pointer;
    margin-bottom: var(--space-6);
    transition: color var(--transition-fast);
    background: none;
    border: none;
    font-family: inherit;
}
.wizard-back:hover { color: var(--accent-primary); }
.wizard-back svg { width: 16px; height: 16px; }

.wizard-title {
    font-size: var(--text-2xl);
    font-weight: 700;
    margin-bottom: var(--space-6);
}

/* Stepper */
.stepper {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--space-8);
    position: relative;
}
.stepper::before {
    content: '';
    position: absolute;
    top: 16px;
    left: 40px;
    right: 40px;
    height: 2px;
    background: var(--border-default);
}
.stepper-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    position: relative;
    z-index: 1;
}
.stepper-circle {
    width: 32px; height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-sm);
    font-weight: 600;
    border: 2px solid var(--border-default);
    color: var(--text-muted);
    background: var(--bg-surface);
    transition: all var(--transition-base);
    flex-shrink: 0;
}
.stepper-step.active .stepper-circle {
    border-color: var(--accent-primary);
    background: var(--accent-primary);
    color: #fff;
    box-shadow: 0 0 0 4px var(--accent-primary-light);
}
.stepper-step.done .stepper-circle {
    border-color: var(--accent-primary);
    background: var(--accent-primary);
    color: #fff;
}
.stepper-label {
    font-size: var(--text-sm);
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
}
.stepper-step.active .stepper-label { color: var(--text-primary); }
.stepper-step.done .stepper-label { color: var(--accent-primary); }

/* Wizard steps */
.wizard-step { display: none; }
.wizard-step.active {
    display: block;
    animation: viewEnter var(--transition-slow) forwards;
}

/* Form elements */
.form-group { margin-bottom: var(--space-5); }
.form-label {
    display: block;
    font-size: var(--text-sm);
    font-weight: 500;
    margin-bottom: var(--space-2);
    color: var(--text-primary);
}
.form-input, .form-select {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    font-size: var(--text-base);
    font-family: inherit;
    background: var(--bg-surface);
    color: var(--text-primary);
    transition: all var(--transition-fast);
}
.form-input:focus, .form-select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-primary-light);
}
.form-input::placeholder { color: var(--text-muted); }
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}
.form-hint {
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-top: var(--space-1);
}

/* Test info panel */
.test-info-panel {
    border-left: 3px solid var(--accent-primary);
    background: var(--accent-primary-light);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: var(--space-5);
    margin-top: var(--space-4);
}
.test-info-panel h4 {
    font-size: var(--text-sm);
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
    margin-bottom: var(--space-2);
}
.test-info-panel .info-content {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.7;
}
.test-info-panel .info-content ul {
    margin: var(--space-1) 0;
    padding-left: var(--space-5);
}
.test-info-panel .info-content li { margin-bottom: var(--space-1); }
.test-info-panel .info-content p { margin-bottom: var(--space-2); }
.test-info-panel .info-content code {
    background: rgba(0,0,0,0.06);
    padding: 1px 5px;
    border-radius: 3px;
    font-family: var(--font-mono);
    font-size: 0.8em;
}

/* Upload zone */
.upload-zone {
    border: 2px dashed var(--border-default);
    border-radius: var(--radius-lg);
    padding: var(--space-10) var(--space-6);
    text-align: center;
    cursor: pointer;
    transition: border-color var(--transition-base), background var(--transition-base), transform var(--transition-base), box-shadow var(--transition-base);
    background: var(--bg-surface);
    position: relative;
}
.upload-zone:hover {
    border-color: var(--accent-primary);
    background: var(--accent-primary-light);
}
.upload-zone.dragover {
    border-color: var(--accent-primary);
    background: var(--accent-primary-light);
    transform: scale(1.01);
    box-shadow: 0 0 0 4px rgba(79,70,229,0.1);
}
.upload-icon {
    width: 48px; height: 48px;
    border-radius: var(--radius-lg);
    background: var(--accent-primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-4);
    color: var(--accent-primary);
}
.upload-icon svg { width: 24px; height: 24px; }
.upload-text { font-size: var(--text-base); color: var(--text-primary); margin-bottom: var(--space-1); }
.upload-text span { color: var(--accent-primary); font-weight: 600; }
.upload-hint { font-size: var(--text-xs); color: var(--text-muted); }

/* File list */
.file-list { margin-top: var(--space-4); }
.file-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: var(--bg-surface-hover);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-2);
    animation: cardEnter 0.3s ease forwards;
}
.file-icon {
    width: 32px; height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-xs);
    font-weight: 700;
    flex-shrink: 0;
}
.file-icon.pdf { background: #fee2e2; color: #dc2626; }
.file-icon.xlsx { background: #d1fae5; color: #059669; }
.file-icon.csv { background: #dbeafe; color: #2563eb; }
.file-icon.other { background: var(--bg-surface-hover); color: var(--text-muted); }
.file-info { flex: 1; min-width: 0; }
.file-type-select {
    margin-top: var(--space-1);
    padding: 2px 6px;
    font-size: var(--text-xs);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    color: var(--text-primary);
    max-width: 100%;
}
.file-name {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.file-size { font-size: var(--text-xs); color: var(--text-muted); }
.file-remove {
    width: 28px; height: 28px;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}
.file-remove:hover { background: var(--accent-error-light); color: var(--accent-error); }
.file-remove svg { width: 16px; height: 16px; }

/* Summary card */
.summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}
.summary-item {
    padding: var(--space-4);
    background: var(--bg-surface-hover);
    border-radius: var(--radius-md);
}
.summary-label {
    font-size: var(--text-xs);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
    margin-bottom: var(--space-1);
}
.summary-value {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--text-primary);
}

/* ═══ BUTTONS ═══ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    position: relative;
    overflow: hidden;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: 0 4px 14px var(--accent-primary-glow);
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--accent-primary-glow);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}
.btn-secondary {
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border-default);
}
.btn-secondary:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: var(--accent-primary-light);
}
.btn-ghost {
    background: none;
    color: var(--text-secondary);
}
.btn-ghost:hover { color: var(--accent-primary); background: var(--accent-primary-light); }
.btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-base);
    border-radius: var(--radius-lg);
}
.btn-full { width: 100%; }
.btn-loading .btn-text { opacity: 0; }
.btn-loading::after {
    content: '';
    width: 18px; height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    position: absolute;
}
.btn-loading { position: relative; pointer-events: none; }

/* ═══ STATUS VIEW ═══ */
.status-container {
    max-width: 640px;
    margin: 0 auto;
}
.status-header {
    text-align: center;
    margin-bottom: var(--space-8);
}
.status-header h2 {
    font-size: var(--text-2xl);
    font-weight: 700;
    margin-bottom: var(--space-2);
}
.status-header p {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}
.status-tracker {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--space-8);
    position: relative;
}
.status-tracker::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 40px;
    right: 40px;
    height: 2px;
    background: var(--border-default);
}
.tracker-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    position: relative;
    z-index: 1;
    flex: 1;
}
.tracker-dot {
    width: 40px; height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-surface);
    border: 2px solid var(--border-default);
    color: var(--text-muted);
    transition: all var(--transition-base);
}
.tracker-dot svg { width: 18px; height: 18px; }
.tracker-step.active .tracker-dot {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    box-shadow: 0 0 0 4px var(--accent-primary-light);
    animation: pulse 2s ease-in-out infinite;
}
.tracker-step.done .tracker-dot {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #fff;
}
.tracker-step.error .tracker-dot {
    background: var(--accent-error);
    border-color: var(--accent-error);
    color: #fff;
}
.tracker-label {
    font-size: var(--text-xs);
    color: var(--text-muted);
    font-weight: 500;
    text-align: center;
}
.tracker-step.active .tracker-label { color: var(--accent-primary); font-weight: 600; }
.tracker-step.done .tracker-label { color: var(--accent-primary); }

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 4px var(--accent-primary-light); }
    50% { box-shadow: 0 0 0 8px rgba(79,70,229,0.08); }
}

.elapsed-time {
    text-align: center;
    font-size: var(--text-sm);
    color: var(--text-muted);
    font-family: var(--font-mono);
    margin-bottom: var(--space-6);
}

/* Success animation */
.success-animation {
    display: none;
    text-align: center;
    margin-bottom: var(--space-6);
}
.success-animation.active { display: block; }
.success-checkmark {
    width: 80px; height: 80px;
    margin: 0 auto var(--space-4);
}
.success-checkmark circle {
    stroke: var(--accent-success);
    stroke-width: 2;
    fill: none;
    stroke-dasharray: 226;
    stroke-dashoffset: 226;
    animation: circleIn 0.6s ease-out 0.2s forwards;
}
.success-checkmark path {
    stroke: var(--accent-success);
    stroke-width: 3;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 50;
    stroke-dashoffset: 50;
    animation: checkIn 0.4s ease-out 0.7s forwards;
}
@keyframes circleIn {
    to { stroke-dashoffset: 0; }
}
@keyframes checkIn {
    to { stroke-dashoffset: 0; }
}
.success-text {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--accent-success);
    margin-bottom: var(--space-2);
}

/* Download buttons */
.download-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}
.download-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4);
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}
.download-item:hover {
    border-color: var(--accent-primary);
    background: var(--accent-primary-light);
}
.download-item .file-icon { flex-shrink: 0; }
.download-item .file-info { flex: 1; }
.download-item .dl-btn {
    color: var(--accent-primary);
    font-weight: 600;
    font-size: var(--text-sm);
}

/* Error state */
.error-state {
    text-align: center;
    padding: var(--space-8);
}
.error-icon {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: var(--accent-error-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-4);
    color: var(--accent-error);
}
.error-icon svg { width: 32px; height: 32px; }
.error-title {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--accent-error);
    margin-bottom: var(--space-2);
}
.error-desc {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-bottom: var(--space-6);
}

/* ═══ HISTORY VIEW ═══ */
.history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-6);
    flex-wrap: wrap;
    gap: var(--space-4);
}
.history-header h2 { font-size: var(--text-2xl); font-weight: 700; }
.history-filters {
    display: flex;
    gap: var(--space-2);
}
.mission-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}
.mission-card {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-5);
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
    cursor: default;
    opacity: 0;
    animation: cardEnter 0.3s ease forwards;
}
.mission-card:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-md);
}
.mission-status-icon {
    width: 40px; height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.mission-status-icon.termine { background: var(--accent-success-light); color: var(--accent-success); }
.mission-status-icon.en_cours { background: var(--accent-warning-light); color: var(--accent-warning); }
.mission-status-icon.erreur { background: var(--accent-error-light); color: var(--accent-error); }
.mission-status-icon svg { width: 20px; height: 20px; }
.mission-info { flex: 1; min-width: 0; }
.mission-title {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-1);
}
.mission-meta {
    font-size: var(--text-xs);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: var(--space-3);
}
.mission-actions {
    display: flex;
    gap: var(--space-2);
    flex-shrink: 0;
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 600;
}
.badge.termine { background: var(--accent-success-light); color: var(--accent-success); }
.badge.en_cours { background: var(--accent-warning-light); color: var(--accent-warning); }
.badge.erreur { background: var(--accent-error-light); color: var(--accent-error); }

/* ═══ EMPTY STATE ═══ */
.empty-state {
    text-align: center;
    padding: var(--space-16) var(--space-8);
    color: var(--text-muted);
}
.empty-state svg {
    width: 80px; height: 80px;
    margin-bottom: var(--space-4);
    opacity: 0.4;
}
.empty-state h3 {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
}
.empty-state p { font-size: var(--text-sm); }

/* ═══ TOAST ═══ */
.toast-container {
    position: fixed;
    bottom: var(--space-6);
    right: var(--space-6);
    z-index: 1000;
    display: flex;
    flex-direction: column-reverse;
    gap: var(--space-2);
}
.toast {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    font-size: var(--text-sm);
    min-width: 280px;
    max-width: 420px;
    animation: toastIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.toast.dismissing { animation: toastOut 0.25s ease forwards; }
.toast-icon { flex-shrink: 0; }
.toast-icon svg { width: 18px; height: 18px; }
.toast.success .toast-icon { color: var(--accent-success); }
.toast.error .toast-icon { color: var(--accent-error); }
.toast.warning .toast-icon { color: var(--accent-warning); }
.toast.info .toast-icon { color: var(--accent-primary); }
.toast-msg { flex: 1; color: var(--text-primary); }
.toast-close {
    cursor: pointer;
    color: var(--text-muted);
    background: none;
    border: none;
    padding: var(--space-1);
}
.toast-close:hover { color: var(--text-primary); }
@keyframes toastIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes toastOut {
    to { transform: translateX(100%); opacity: 0; }
}

/* ═══ SPINNER ═══ */
@keyframes spin { to { transform: rotate(360deg); } }
.spinner-sm {
    width: 18px; height: 18px;
    border: 2px solid var(--border-default);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        box-shadow: var(--shadow-xl);
    }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .mobile-toggle { display: flex; align-items: center; justify-content: center; }
    .content-area { padding: var(--space-4); }
    .catalog-header { flex-direction: column; align-items: stretch; }
    .search-box { width: 100%; }
    .form-row { grid-template-columns: 1fr; }
    .summary-grid { grid-template-columns: 1fr; }
    .stepper-label { display: none; }
    .status-tracker { gap: 0; }
    .tracker-label { font-size: 0.625rem; }
    .mission-card { flex-direction: column; align-items: stretch; }
    .mission-actions { justify-content: flex-end; }
}

@media (max-width: 480px) {
    .skills-grid { grid-template-columns: 1fr; }
}

/* ═══ REDUCED MOTION ═══ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ═══ CYCLE COLORS ═══ */
.cycle-tresorerie { background: #eff6ff; color: #1d4ed8; }
.cycle-achats-fournisseurs { background: #fef3c7; color: #b45309; }
.cycle-clients-ventes { background: #fce7f3; color: #be185d; }
.cycle-immobilisations { background: #f0fdf4; color: #15803d; }
.cycle-social { background: #f5f3ff; color: #6d28d9; }
.cycle-fiscal { background: #fff7ed; color: #c2410c; }
.cycle-regularisation { background: #ecfeff; color: #0e7490; }
.cycle-general { background: #f8fafc; color: #475569; }

/* ═══ DOSSIER CARDS ═══ */
.dossiers-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
    flex-wrap: wrap;
}
.dossiers-header h2 { font-size: var(--text-2xl); font-weight: 700; }
/* Dossier toolbar */
.dossier-toolbar {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
    flex-wrap: wrap;
}
.dossier-search {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: var(--space-2) var(--space-3);
    flex: 1;
    min-width: 200px;
}
.dossier-search input {
    border: none;
    background: none;
    outline: none;
    font-size: var(--text-sm);
    color: var(--text-primary);
    width: 100%;
}
.dossier-search:focus-within {
    border-color: var(--accent-primary);
}
.dossier-filters {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
}
.pill-count {
    font-size: 0.65rem;
    background: var(--bg-surface-hover);
    padding: 0 5px;
    border-radius: var(--radius-full);
    margin-left: 2px;
}

/* Dossier list */
.dossier-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}
.dossier-row {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-4) var(--space-5);
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
    opacity: 0;
    animation: cardEnter 0.3s ease forwards;
}
.dossier-row:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-md);
}
.dossier-row-main {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    min-width: 0;
    flex: 1;
}
.dossier-row-client {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dossier-row-exercice {
    font-size: var(--text-xs);
    color: var(--accent-primary);
    font-weight: 600;
    background: var(--accent-primary-light);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    white-space: nowrap;
}
.dossier-row-stats {
    display: flex;
    gap: var(--space-3);
    font-size: var(--text-xs);
    color: var(--text-muted);
    white-space: nowrap;
}
.dossier-row-stats span { display: flex; align-items: center; gap: var(--space-1); }
.dossier-row-meta {
    display: flex;
    gap: var(--space-3);
    font-size: var(--text-xs);
    color: var(--text-muted);
    white-space: nowrap;
}
.dossier-row-actions {
    display: flex;
    align-items: center;
    gap: var(--space-1);
}
.btn-icon {
    padding: var(--space-1);
    border-radius: var(--radius-sm);
}

@media (max-width: 768px) {
    .dossier-row {
        flex-wrap: wrap;
        gap: var(--space-2);
    }
    .dossier-row-meta,
    .dossier-row-stats {
        flex-basis: 100%;
    }
}

/* Dossier context bar */
.dossier-context {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: var(--accent-primary-light);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-4);
    font-size: var(--text-sm);
}
.dossier-context-name {
    font-weight: 600;
    color: var(--accent-primary);
}
.dossier-context-close {
    margin-left: auto;
    cursor: pointer;
    color: var(--text-muted);
    background: none;
    border: none;
    padding: var(--space-1);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}
.dossier-context-close:hover { color: var(--accent-error); background: var(--accent-error-light); }

/* ═══ MODAL ═══ */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 200;
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal {
    background: var(--bg-surface);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    max-width: 480px;
    width: 90%;
    box-shadow: var(--shadow-xl);
    animation: viewEnter var(--transition-slow) forwards;
}
.modal-title {
    font-size: var(--text-xl);
    font-weight: 700;
    margin-bottom: var(--space-6);
}
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-3);
    margin-top: var(--space-6);
}

/* ═══ HISTORY DOSSIER SECTIONS ═══ */
.history-dossier-section {
    margin-bottom: var(--space-6);
}
.history-dossier-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: var(--bg-surface-hover);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-3);
    cursor: pointer;
    transition: all var(--transition-fast);
    user-select: none;
}
.history-dossier-header:hover { background: var(--accent-primary-light); }
.history-dossier-header .dossier-name {
    font-weight: 600;
    font-size: var(--text-sm);
}
.history-dossier-header .dossier-info {
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-left: auto;
}
.history-dossier-content { padding-left: var(--space-2); }
.history-dossier-content.collapsed { display: none; }

@media (max-width: 768px) {
}

/* ═══ LOGIN VIEW ═══ */
.login-view {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg-primary);
}
.login-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    padding: var(--space-10);
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
}
.login-card .brand {
    text-align: center;
    margin-bottom: var(--space-8);
}
.login-card .brand h1 {
    font-size: var(--text-2xl);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
}
.login-card .brand p {
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin-top: var(--space-2);
}
.login-error {
    display: none;
    background: var(--accent-error-light);
    color: var(--accent-error);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    margin-bottom: var(--space-4);
}
.login-error.active { display: block; }

/* ═══ USER MENU (topbar) ═══ */
.user-menu {
    position: relative;
}
.user-menu-trigger {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-1) var(--space-3);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-full);
    background: var(--bg-surface);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: inherit;
}
.user-menu-trigger:hover {
    border-color: var(--accent-primary);
    background: var(--accent-primary-light);
}
.user-avatar {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: var(--text-xs);
    font-weight: 700;
}
.user-menu-name {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-primary);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.user-menu-role {
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: var(--radius-full);
}
.role-admin { background: #fef3c7; color: #b45309; }
.role-chef_de_mission { background: #dbeafe; color: #2563eb; }
.role-collaborateur { background: #f0fdf4; color: #15803d; }
.user-menu-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 180px;
    z-index: 200;
    overflow: hidden;
}
.user-menu-dropdown.active { display: block; }
.user-menu-dropdown a {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-sm);
    color: var(--text-primary);
    cursor: pointer;
    transition: background var(--transition-fast);
    text-decoration: none;
    border: none;
    background: none;
    width: 100%;
    font-family: inherit;
}
.user-menu-dropdown a:hover { background: var(--bg-surface-hover); }
.user-menu-dropdown a svg { width: 16px; height: 16px; color: var(--text-muted); }
.user-menu-dropdown .divider {
    height: 1px;
    background: var(--border-default);
    margin: var(--space-1) 0;
}

/* ═══ USERS ADMIN VIEW ═══ */
.users-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}
.users-header h2 { font-size: var(--text-2xl); font-weight: 700; }
.users-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.users-table th {
    text-align: left;
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    font-weight: 600;
    background: var(--bg-surface-hover);
    border-bottom: 1px solid var(--border-default);
}
.users-table td {
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-sm);
    border-bottom: 1px solid var(--border-default);
}
.users-table tr:last-child td { border-bottom: none; }
.users-table tr:hover td { background: var(--bg-surface-hover); }
.user-status {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    font-size: var(--text-xs);
    font-weight: 600;
}
.user-status.active { color: var(--accent-success); }
.user-status.inactive { color: var(--accent-error); }
.user-status::before {
    content: '';
    width: 6px; height: 6px;
    border-radius: 50%;
    background: currentColor;
}

/* ═══ MEMBERS SECTION IN DOSSIER ═══ */
.members-section {
    margin-top: var(--space-6);
    padding-top: var(--space-4);
    border-top: 1px solid var(--border-default);
}
.members-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    margin-top: var(--space-3);
}
.member-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-3);
    background: var(--bg-surface-hover);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
}
.member-item .member-name { font-weight: 500; flex: 1; }
.member-item .member-badge {
    font-size: var(--text-xs);
    color: var(--text-muted);
}

/* ═══ ROLE VISIBILITY ═══ */
[data-min-role] { display: none !important; }
[data-min-role].role-visible { display: flex !important; }
button[data-min-role].role-visible { display: inline-flex !important; }
div[data-min-role].role-visible { display: block !important; }
tr[data-min-role].role-visible { display: table-row !important; }
a[data-min-role].role-visible { display: flex !important; }

/* ═══ DOSSIER DETAIL VIEW ═══ */
.dossier-detail-header {
    margin-bottom: var(--space-4);
}
.dossier-detail-header .dossier-detail-title {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-2);
}
.dossier-detail-header .dossier-detail-title h2 {
    font-size: var(--text-2xl);
    font-weight: 700;
}
.dossier-detail-header .dossier-detail-title .exercice-badge {
    background: var(--accent-primary-light);
    color: var(--accent-primary);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: 600;
}
.dossier-detail-meta {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    color: var(--text-secondary);
    font-size: var(--text-sm);
    flex-wrap: wrap;
}
.dossier-detail-meta .members-list {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}
.dossier-detail-meta .member-avatar {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    background: var(--accent-gradient);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
}
.dossier-detail-actions {
    display: flex;
    gap: var(--space-2);
    margin-top: var(--space-3);
}
.dossier-detail-stats {
    display: flex;
    gap: var(--space-3);
    margin-bottom: var(--space-5);
    flex-wrap: wrap;
}
.dossier-stat-badge {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: 600;
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
}
.dossier-stat-badge.success { color: var(--accent-success); border-color: var(--accent-success-light); background: var(--accent-success-light); }
.dossier-stat-badge.warning { color: var(--accent-warning); border-color: var(--accent-warning-light); background: var(--accent-warning-light); }
.dossier-stat-badge.error { color: var(--accent-error); border-color: var(--accent-error-light); background: var(--accent-error-light); }
.dossier-tabs {
    display: flex;
    gap: var(--space-1);
    border-bottom: 2px solid var(--border-default);
    margin-bottom: var(--space-5);
}
.dossier-tab {
    padding: var(--space-3) var(--space-5);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    color: var(--text-secondary);
    font-size: var(--text-base);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
}
.dossier-tab:hover { color: var(--text-primary); }
.dossier-tab.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
}
.dossier-missions-group {
    margin-bottom: var(--space-6);
}
.dossier-missions-group-title {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-3);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}
.dossier-missions-group-title .count {
    font-size: var(--text-xs);
    background: var(--bg-surface-hover);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    color: var(--text-secondary);
}

/* ═══ MISSION IN-PROGRESS BANNER ═══ */
.mission-banner {
    position: fixed;
    bottom: var(--space-4);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-5);
    background: var(--bg-surface-elevated);
    border: 1px solid var(--accent-primary);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    z-index: 1000;
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
    animation: bannerSlideUp 0.3s ease forwards;
}
.mission-banner:hover {
    box-shadow: 0 8px 32px var(--accent-primary-glow, rgba(0,0,0,0.15));
}
.mission-banner-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-primary);
    animation: bannerPulse 1.5s ease-in-out infinite;
}
.mission-banner-text {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-primary);
}
.mission-banner-elapsed {
    font-size: var(--text-xs);
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}
.mission-banner-action {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    gap: 2px;
}
@keyframes bannerSlideUp {
    from { opacity: 0; transform: translateX(-50%) translateY(16px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@keyframes bannerPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
