/* ============================================
   COMPLIANCE MANAGER - ULTRA PREMIUM DESIGN
   Glassmorphism + Micro-interactions + Polish
   ============================================ */

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

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

:root {
    /* Brand Colors */
    --primary: #FA5B35;
    --primary-light: #FF7A5A;
    --primary-dark: #E04420;
    --primary-glow: rgba(250, 91, 53, 0.5);
    
    /* Dark Theme */
    --bg-base: #050506;
    --bg-surface: #0A0A0B;
    --bg-elevated: #111113;
    --bg-hover: #1A1A1D;
    --bg-active: #222225;
    
    /* Text */
    --text-primary: #FAFAFA;
    --text-secondary: #A1A1AA;
    --text-muted: #71717A;
    --text-disabled: #52525B;
    
    /* Borders */
    --border-subtle: rgba(255, 255, 255, 0.04);
    --border-default: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.12);
    --border-active: rgba(250, 91, 53, 0.5);
    
    /* Status */
    --success: #10B981;
    --success-bg: rgba(16, 185, 129, 0.12);
    --warning: #F59E0B;
    --warning-bg: rgba(245, 158, 11, 0.12);
    --error: #EF4444;
    --error-bg: rgba(239, 68, 68, 0.12);
    --info: #3B82F6;
    --info-bg: rgba(59, 130, 246, 0.12);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 40px var(--primary-glow);
    
    /* Layout */
    --sidebar-width: 260px;
    --header-height: 64px;
    
    /* Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --radius-full: 9999px;
    
    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* Base */
html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background Pattern */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: 
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(250, 91, 53, 0.08), transparent),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(59, 130, 246, 0.05), transparent);
    pointer-events: none;
    z-index: -1;
}

a { color: inherit; text-decoration: none; }

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { 
    background: var(--bg-active); 
    border-radius: var(--radius-full);
    border: 2px solid transparent;
    background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* Selection */
::selection {
    background: rgba(250, 91, 53, 0.3);
    color: var(--text-primary);
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-base) 100%);
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    z-index: 100;
    backdrop-filter: blur(20px);
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary) 0%, transparent 50%, var(--primary) 100%);
    opacity: 0.3;
}

.sidebar-logo {
    padding: 24px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    gap: 14px;
}

.sidebar-logo-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    box-shadow: 
        0 4px 16px rgba(250, 91, 53, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
}

.sidebar-logo-icon::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%);
}

.sidebar-logo-text {
    font-size: 1.375rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 0;
    overflow-y: auto;
}

.nav-section { margin-bottom: 24px; }

.nav-section-title {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-disabled);
    padding: 0 24px 10px;
}

.nav-menu {
    list-style: none;
    padding: 0 12px;
}

.nav-menu li { margin-bottom: 4px; }

.nav-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.25s var(--ease-out);
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%) scaleY(0);
    width: 3px;
    height: 24px;
    background: var(--primary);
    border-radius: 0 4px 4px 0;
    transition: transform 0.25s var(--ease-out);
}

.nav-link::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(250, 91, 53, 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.25s;
}

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

.nav-link.active {
    color: var(--primary);
    background: rgba(250, 91, 53, 0.08);
}

.nav-link.active::before { transform: translateY(-50%) scaleY(1); }
.nav-link.active::after { opacity: 1; }

.nav-link i {
    width: 22px;
    text-align: center;
    font-size: 1.0625rem;
    opacity: 0.6;
    transition: all 0.25s var(--ease-out);
}

.nav-link:hover i { opacity: 1; transform: scale(1.1); }
.nav-link.active i { opacity: 1; }

/* Sidebar Footer */
.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-subtle);
}

.status-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 16px;
    transition: all 0.3s var(--ease-out);
}

.status-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

.status-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.status-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--success);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 12px var(--success);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 12px var(--success); }
    50% { opacity: 0.6; box-shadow: 0 0 4px var(--success); }
}

.status-bar {
    height: 6px;
    background: var(--bg-active);
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
}

.status-fill {
    height: 100%;
    width: 99.9%;
    background: linear-gradient(90deg, var(--success), #34D399);
    border-radius: var(--radius-full);
    position: relative;
}

.status-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.4) 50%, transparent 100%);
    animation: shimmer 2.5s ease-in-out infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ============================================
   HEADER
   ============================================ */
.header {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--header-height);
    background: rgba(10, 10, 11, 0.7);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    padding: 0 32px;
    z-index: 50;
}

.header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0.2;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.header-left { display: flex; align-items: center; }

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.breadcrumb-item { color: var(--text-muted); }
.breadcrumb-separator { color: var(--text-disabled); }
.breadcrumb-current { 
    color: var(--text-primary); 
    font-weight: 600;
    position: relative;
}

.breadcrumb-current::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
    border-radius: var(--radius-full);
}

.logo { display: none; }

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.25s var(--ease-out);
}

.user-info:hover {
    border-color: var(--border-hover);
    background: var(--bg-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.user-info i {
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   MAIN LAYOUT
   ============================================ */
.main-layout { display: flex; min-height: 100vh; }

.content {
    flex: 1;
    margin-left: var(--sidebar-width);
    margin-top: var(--header-height);
    padding: 32px;
    min-height: calc(100vh - var(--header-height));
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
    display: none;
    animation: fadeSlideIn 0.4s var(--ease-out);
}

.section.active { display: block; }

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

.section-header { margin-bottom: 32px; }

.section-header h1 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-header p {
    font-size: 1rem;
    color: var(--text-muted);
}

/* ============================================
   PRIORITY ALERTS
   ============================================ */
.priority-alerts {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.02) 100%);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-xl);
    padding: 20px 24px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.priority-alerts::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--error), #F87171);
}

.priority-alerts::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(239, 68, 68, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.priority-alerts h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--error);
    margin-bottom: 16px;
}

.priority-alerts h3 i {
    animation: alertPulse 1s ease-in-out infinite;
}

@keyframes alertPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.alerts-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.alert-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: var(--radius-md);
    border: 1px solid rgba(239, 68, 68, 0.15);
    transition: all 0.25s var(--ease-out);
    backdrop-filter: blur(10px);
}

.alert-item:hover {
    background: rgba(0, 0, 0, 0.6);
    border-color: rgba(239, 68, 68, 0.3);
    transform: translateX(4px);
}

.alert-content { flex: 1; }
.alert-title { font-size: 0.9rem; font-weight: 600; }
.alert-description { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }
.alert-actions { display: flex; gap: 8px; }

/* ============================================
   METRICS GRID
   ============================================ */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}

.metric-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.35s var(--ease-out);
    position: relative;
    overflow: hidden;
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    opacity: 0;
    transition: opacity 0.35s;
}

.metric-card::after {
    content: '';
    position: absolute;
    top: -100%;
    left: -100%;
    width: 300%;
    height: 300%;
    background: radial-gradient(circle at center, rgba(250, 91, 53, 0.08) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.35s;
    pointer-events: none;
}

.metric-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.metric-card:hover::before,
.metric-card:hover::after { opacity: 1; }

.metric-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.375rem;
    position: relative;
    flex-shrink: 0;
}

.metric-icon::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    background: inherit;
    filter: blur(16px);
    opacity: 0.5;
    z-index: -1;
}

.metric-icon::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 50%);
}

.metric-icon.bg-1 { background: var(--info-bg); color: var(--info); }
.metric-icon.bg-2 { background: rgba(250, 91, 53, 0.15); color: var(--primary); }
.metric-icon.bg-3 { background: var(--success-bg); color: var(--success); }
.metric-icon.bg-4 { background: var(--error-bg); color: var(--error); }

.metric-info h3 {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 6px;
    letter-spacing: -0.03em;
}

.metric-info p {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ============================================
   FORMS METRICS
   ============================================ */
.forms-metrics {
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    padding: 24px;
    margin-bottom: 28px;
}

.forms-metrics h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.forms-metrics h3::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(180deg, var(--primary), var(--primary-dark));
    border-radius: 2px;
}

.forms-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.form-metric-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    transition: all 0.25s var(--ease-out);
}

.form-metric-card:hover {
    border-color: var(--border-hover);
    background: var(--bg-hover);
    transform: translateY(-2px);
}

.form-metric-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
}

.form-metric-info h4 {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
}

.form-metric-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ============================================
   CHARTS
   ============================================ */
.charts-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}

.chart-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    padding: 24px;
    transition: all 0.25s var(--ease-out);
}

.chart-card:hover { border-color: var(--border-hover); }

.chart-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.chart-card h3::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(180deg, var(--primary), var(--primary-dark));
    border-radius: 2px;
}

/* ============================================
   TABLES
   ============================================ */
.cases-table-container,
.table-container {
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-elevated);
}

.table-header h3 {
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.table-header h3::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(180deg, var(--primary), var(--primary-dark));
    border-radius: 2px;
}

.table-controls { display: flex; gap: 12px; }
.table-wrapper { overflow-x: auto; }

.cases-table,
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.cases-table th,
.data-table th {
    padding: 14px 20px;
    text-align: left;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-disabled);
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-subtle);
    white-space: nowrap;
}

.cases-table td,
.data-table td {
    padding: 16px 20px;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border-subtle);
    transition: background 0.15s;
}

.cases-table tbody tr,
.data-table tbody tr { transition: all 0.15s; }

.cases-table tbody tr:hover,
.data-table tbody tr:hover { 
    background: rgba(250, 91, 53, 0.04); 
}

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

/* ============================================
   BADGES
   ============================================ */
.status-badge,
.risk-badge,
.priority-badge,
.sla-indicator {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.risk-badge { border-radius: var(--radius-sm); }
.priority-badge { border-radius: var(--radius-sm); }

.risk-badge.low { background: var(--success-bg); color: var(--success); }
.risk-badge.medium { background: var(--warning-bg); color: var(--warning); }
.risk-badge.high { background: var(--error-bg); color: var(--error); }

.priority-badge.haute { background: var(--error-bg); color: var(--error); }
.priority-badge.moyenne { background: var(--warning-bg); color: var(--warning); }
.priority-badge.basse { background: var(--info-bg); color: var(--info); }

.sla-indicator.on-time { background: var(--success-bg); color: var(--success); }
.sla-indicator.warning { background: var(--warning-bg); color: var(--warning); }
.sla-indicator.overdue { background: var(--error-bg); color: var(--error); }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 44px;
    padding: 0 24px;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all 0.25s var(--ease-out);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.25s;
}

.btn:hover::before { opacity: 1; }

.btn--primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(250, 91, 53, 0.4);
}

.btn--primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(250, 91, 53, 0.5);
}

.btn--primary:active { transform: translateY(-1px); }

.btn--secondary {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border-default);
}

.btn--secondary:hover {
    background: var(--bg-hover);
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.btn--success {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

.btn--success:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(16, 185, 129, 0.5); }

.btn--warning {
    background: linear-gradient(135deg, var(--warning) 0%, #D97706 100%);
    color: var(--bg-base);
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
}

.btn--warning:hover { transform: translateY(-3px); }

.btn--error {
    background: linear-gradient(135deg, var(--error) 0%, #DC2626 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
}

.btn--error:hover { transform: translateY(-3px); }

.btn--sm {
    height: 36px;
    padding: 0 16px;
    font-size: 0.8125rem;
}

.action-buttons { display: flex; gap: 8px; }

.action-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.25s var(--ease-out);
    font-size: 0.875rem;
}

.action-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(250, 91, 53, 0.1);
    transform: scale(1.1);
}

/* ============================================
   FORM CONTROLS
   ============================================ */
.form-group { margin-bottom: 20px; }

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    height: 46px;
    padding: 0 16px;
    font-family: inherit;
    font-size: 0.9375rem;
    color: var(--text-primary);
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    transition: all 0.25s var(--ease-out);
}

.form-control:hover { border-color: var(--border-hover); background: var(--bg-hover); }

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(250, 91, 53, 0.15);
    background: var(--bg-active);
}

.form-control::placeholder { color: var(--text-disabled); }

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23A1A1AA' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 48px;
}

textarea.form-control {
    height: auto;
    padding: 14px 16px;
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--border-subtle);
}

/* ============================================
   MODALS
   ============================================ */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px) saturate(180%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 24px;
    animation: modalFadeIn 0.25s var(--ease-out);
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal.hidden { display: none; }

.modal-content {
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
    animation: modalSlideUp 0.35s var(--ease-out);
}

@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(24px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-elevated);
}

.modal-header h2 { font-size: 1.125rem; font-weight: 700; }

.modal-close {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.25s var(--ease-out);
}

.modal-close:hover {
    border-color: var(--error);
    color: var(--error);
    background: var(--error-bg);
    transform: rotate(90deg);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
}

/* ============================================
   TEAM GRID
   ============================================ */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

.team-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    padding: 24px;
    transition: all 0.35s var(--ease-out);
    position: relative;
    overflow: hidden;
}

.team-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light), var(--primary));
    opacity: 0;
    transition: opacity 0.35s;
}

.team-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.team-card:hover::before { opacity: 1; }

.team-card-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 20px;
}

.team-avatar {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.375rem;
    font-weight: 800;
    color: white;
    box-shadow: 0 6px 20px rgba(250, 91, 53, 0.4);
    position: relative;
}

.team-avatar::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255,255,255,0.25) 0%, transparent 50%);
}

.team-info h4 { font-size: 1.0625rem; font-weight: 700; }
.team-info p { font-size: 0.875rem; color: var(--text-muted); }

.team-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 18px;
    background: var(--bg-elevated);
    border-radius: var(--radius-lg);
    margin-bottom: 18px;
}

.team-stat { text-align: center; }

.team-stat-value { 
    font-size: 1.5rem; 
    font-weight: 800; 
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.team-stat-label { 
    font-size: 0.6875rem; 
    color: var(--text-muted); 
    text-transform: uppercase; 
    letter-spacing: 0.08em;
    font-weight: 600;
}

.team-specialties {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.specialty-tag {
    padding: 6px 14px;
    background: rgba(250, 91, 53, 0.1);
    border: 1px solid rgba(250, 91, 53, 0.2);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    transition: all 0.2s;
}

.specialty-tag:hover {
    background: rgba(250, 91, 53, 0.15);
    transform: translateY(-2px);
}

.team-actions { display: flex; gap: 10px; }

/* ============================================
   PROGRESS BAR
   ============================================ */
.progress-bar {
    height: 8px;
    background: var(--bg-active);
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: var(--radius-full);
    transition: width 0.5s var(--ease-out);
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.4) 50%, transparent 100%);
    animation: shimmer 2s linear infinite;
}

.progress-fill.warning { background: linear-gradient(90deg, var(--warning), #FBBF24); }
.progress-fill.danger { background: linear-gradient(90deg, var(--error), #F87171); }

.workload-bar { display: flex; flex-direction: column; gap: 8px; }
.workload-info { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--text-muted); font-weight: 500; }

/* ============================================
   UPLOAD ZONE
   ============================================ */
.upload-zone {
    border: 2px dashed var(--border-default);
    border-radius: var(--radius-xl);
    padding: 48px;
    text-align: center;
    transition: all 0.35s var(--ease-out);
    cursor: pointer;
    background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-elevated) 100%);
    position: relative;
    overflow: hidden;
}

.upload-zone::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(250, 91, 53, 0.05) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.35s;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--primary);
    transform: translateY(-4px);
}

.upload-zone:hover::before,
.upload-zone.dragover::before { opacity: 1; }

.upload-zone i { 
    font-size: 64px; 
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 24px; 
    display: block; 
}

.upload-zone h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 8px; }
.upload-zone p { font-size: 0.9375rem; color: var(--text-muted); }

/* ============================================
   LIST ITEMS
   ============================================ */
.forms-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    gap: 16px;
}

.form-filters { display: flex; gap: 12px; }

.forms-list,
.cases-list,
.clarifications-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-item,
.case-card,
.clarification-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    padding: 24px;
    cursor: pointer;
    transition: all 0.35s var(--ease-out);
    position: relative;
    overflow: hidden;
}

.form-item::before,
.case-card::before,
.clarification-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--primary), var(--primary-dark));
    transform: scaleY(0);
    transition: transform 0.35s var(--ease-out);
}

.form-item:hover,
.case-card:hover,
.clarification-card:hover {
    border-color: var(--border-hover);
    transform: translateX(8px);
    box-shadow: var(--shadow-md);
}

.form-item:hover::before,
.case-card:hover::before,
.clarification-card:hover::before { transform: scaleY(1); }

.form-header,
.case-header,
.clarification-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 18px;
}

.form-title,
.case-title,
.clarification-title { font-size: 1.0625rem; font-weight: 700; }
.form-id,
.case-id { font-size: 0.875rem; color: var(--text-muted); margin-top: 4px; }
.form-badges,
.case-badges { display: flex; gap: 10px; }

.form-details {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.form-detail { font-size: 0.875rem; color: var(--text-muted); }
.form-detail strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: 4px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ============================================
   CONFIG CARDS
   ============================================ */
.attribution-config {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.config-card,
.preview-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    padding: 28px;
    transition: all 0.25s var(--ease-out);
}

.config-card:hover,
.preview-card:hover { border-color: var(--border-hover); }

.config-card h3,
.preview-card h3 {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 1.0625rem;
    font-weight: 700;
    margin-bottom: 24px;
}

.config-card h3 i,
.preview-card h3 i { 
    color: var(--primary); 
    font-size: 1.25rem;
}

/* ============================================
   RISK SELECTION
   ============================================ */
.risk-level-selection {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.risk-card {
    padding: 28px;
    background: var(--bg-elevated);
    border: 2px solid var(--border-default);
    border-radius: var(--radius-xl);
    text-align: center;
    cursor: pointer;
    transition: all 0.35s var(--ease-out);
}

.risk-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
}

.risk-card.selected {
    border-color: var(--primary);
    background: rgba(250, 91, 53, 0.08);
    box-shadow: 0 0 0 4px rgba(250, 91, 53, 0.15);
}

.risk-icon { font-size: 36px; margin-bottom: 18px; }
.risk-card h4 { font-size: 1.0625rem; font-weight: 700; margin-bottom: 8px; }
.risk-card p { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 18px; }

.risk-label {
    display: inline-block;
    padding: 8px 18px;
    background: rgba(250, 91, 53, 0.12);
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--primary);
}

/* ============================================
   TOAST
   ============================================ */
.toast-container {
    position: fixed;
    top: 88px;
    right: 28px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.toast {
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 18px 22px;
    min-width: 340px;
    display: flex;
    align-items: center;
    gap: 14px;
    animation: toastSlideIn 0.4s var(--ease-out);
    box-shadow: var(--shadow-xl);
}

.toast.success { border-color: var(--success); }
.toast.success .toast-icon { color: var(--success); }
.toast.error { border-color: var(--error); }
.toast.error .toast-icon { color: var(--error); }
.toast.warning { border-color: var(--warning); }
.toast.warning .toast-icon { color: var(--warning); }

.toast-icon { font-size: 1.25rem; }
.toast-message { flex: 1; font-size: 0.9375rem; font-weight: 500; }
.toast-close { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 1.125rem; transition: color 0.2s; }
.toast-close:hover { color: var(--text-primary); }

@keyframes toastSlideIn {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state { text-align: center; padding: 48px; color: var(--text-muted); }
.empty-state i { font-size: 56px; color: var(--text-disabled); margin-bottom: 20px; opacity: 0.5; }
.empty-state h3 { font-size: 1.125rem; color: var(--text-primary); margin-bottom: 8px; }

/* ============================================
   UTILITIES
   ============================================ */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-16 { margin-top: 16px; }
.mb-0 { margin-bottom: 0; }

.dynamic-form { display: flex; flex-direction: column; gap: 20px; }
.form-section { background: var(--bg-elevated); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: 24px; }
.form-section h4 { font-size: 1rem; font-weight: 700; color: var(--primary); margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border-subtle); }
.form-section-fields { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }

.review-container { display: grid; grid-template-columns: 1fr 340px; gap: 24px; }
.review-form-view, .review-sidebar { display: flex; flex-direction: column; gap: 18px; }
.review-info, .review-comments { background: var(--bg-elevated); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: 20px; }
.review-info h3, .review-comments h3 { font-size: 0.9375rem; font-weight: 700; margin-bottom: 16px; }
.review-actions { display: flex; gap: 14px; margin-top: 24px; }

.comments-section { max-height: 220px; overflow-y: auto; margin-bottom: 14px; }
.comment-item { padding: 14px; background: var(--bg-active); border-radius: var(--radius-md); margin-bottom: 10px; }
.comment-author { font-size: 0.8125rem; font-weight: 700; color: var(--primary); }
.comment-text { font-size: 0.875rem; margin-top: 6px; line-height: 1.5; }
.comment-date { font-size: 0.75rem; color: var(--text-disabled); margin-top: 6px; }
.add-comment { display: flex; flex-direction: column; gap: 10px; }

.specialties-checkboxes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.specialty-checkbox { display: flex; align-items: center; gap: 10px; font-size: 0.875rem; cursor: pointer; }
.specialty-checkbox input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--primary); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1200px) {
    .metrics-grid { grid-template-columns: repeat(2, 1fr); }
    .charts-container { grid-template-columns: 1fr; }
    .attribution-config { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); transition: transform 0.35s var(--ease-out); }
    .sidebar.open { transform: translateX(0); }
    .header { left: 0; }
    .content { margin-left: 0; padding: 24px; }
    .metrics-grid, .forms-grid, .team-grid, .risk-level-selection { grid-template-columns: 1fr; }
    .form-details { grid-template-columns: repeat(2, 1fr); }
    .review-container { grid-template-columns: 1fr; }
    .forms-controls { flex-direction: column; align-items: stretch; }
    .form-filters { flex-wrap: wrap; }
}
