/* ============================================
   BAMC Plateforme V2 - Styles principaux
   Design professionnel, responsive, PWA
   ============================================ */

:root {
    /* Couleurs principales */
    --primary: #1a73e8;
    --primary-dark: #1557b0;
    --primary-light: #4a9af5;
    --secondary: #5f6368;
    --accent: #fbbc04;
    --success: #34a853;
    --warning: #f9ab00;
    --danger: #ea4335;
    --info: #4285f4;
    
    /* Fonds */
    --bg-dark: #1a1a2e;
    --bg-medium: #16213e;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --bg-card: #ffffff;
    
    /* Textes */
    --text-primary: #202124;
    --text-secondary: #5f6368;
    --text-muted: #9aa0a6;
    --text-white: #ffffff;
    --text-link: #1a73e8;
    
    /* Bordures */
    --border: #dadce0;
    --border-light: #e8eaed;
    
    /* Ombres */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.1);
    --shadow-md: 0 2px 8px rgba(0,0,0,0.12);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.15);
    --shadow-xl: 0 8px 32px rgba(0,0,0,0.2);
    
    /* Layout */
    --sidebar-width: 260px;
    --sidebar-collapsed: 64px;
    --topbar-height: 56px;
    --border-radius: 8px;
    --border-radius-lg: 12px;
    
    /* Transitions */
    --transition: all 0.2s ease;
    --transition-slow: all 0.3s ease;
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 14px; -webkit-text-size-adjust: 100%; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-light);
    color: var(--text-primary);
    line-height: 1.5;
    overflow: hidden;
    height: 100vh;
}

a { color: var(--text-link); text-decoration: none; }
a:hover { text-decoration: underline; }

input, textarea, select, button { font-family: inherit; font-size: inherit; }

/* ============================================
   ECRAN DE CONNEXION
   ============================================ */
.login-screen {
    position: fixed; inset: 0;
    display: flex; align-items: center; justify-content: center;
    z-index: 10000;
}

.login-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-medium) 50%, #0a0a1a 100%);
}

.login-container {
    position: relative; z-index: 1;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--border-radius-lg);
    padding: 48px 40px;
    width: 100%; max-width: 420px;
    box-shadow: var(--shadow-xl);
}

.login-logo { text-align: center; margin-bottom: 32px; }
.login-logo-img { width: 80px; height: auto; margin-bottom: 16px; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3)); }
.login-logo h1 { color: var(--text-white); font-size: 1.5rem; font-weight: 600; }
.login-subtitle { color: rgba(255,255,255,0.6); font-size: 0.9rem; margin-top: 4px; }

.login-form .form-group { margin-bottom: 20px; }
.login-form label { display: block; color: rgba(255,255,255,0.7); font-size: 0.85rem; margin-bottom: 6px; }
.login-form label i { width: 20px; }

.login-form input {
    width: 100%; padding: 12px 16px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--border-radius);
    color: var(--text-white); font-size: 1rem;
    transition: var(--transition);
}
.login-form input:focus {
    outline: none;
    border-color: var(--primary-light);
    background: rgba(255,255,255,0.15);
    box-shadow: 0 0 0 3px rgba(26,115,232,0.3);
}
.login-form input::placeholder { color: rgba(255,255,255,0.3); }

.login-error { color: var(--danger); font-size: 0.85rem; min-height: 20px; text-align: center; margin-bottom: 8px; }

.login-footer { text-align: center; color: rgba(255,255,255,0.3); font-size: 0.75rem; margin-top: 24px; }

/* ============================================
   BOUTONS
   ============================================ */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 20px; border: none; border-radius: var(--border-radius);
    font-weight: 500; cursor: pointer; transition: var(--transition);
    text-decoration: none; white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); text-decoration: none; }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }

.btn-success { background: var(--success); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-warning { background: var(--warning); color: var(--text-primary); }
.btn-secondary { background: var(--secondary); color: white; }

.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text-primary); }
.btn-outline:hover { background: var(--bg-light); }

.btn-sm { padding: 6px 12px; font-size: 0.85rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; width: 100%; justify-content: center; }

.btn-icon { padding: 8px; border-radius: 50%; width: 36px; height: 36px; justify-content: center; }

/* ============================================
   LAYOUT PRINCIPAL
   ============================================ */
.app { display: flex; height: 100vh; overflow: hidden; }

/* SIDEBAR */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-dark);
    color: var(--text-white);
    display: flex; flex-direction: column;
    transition: var(--transition-slow);
    z-index: 100;
    flex-shrink: 0;
}

.sidebar.collapsed { width: var(--sidebar-collapsed); }
.sidebar.collapsed .sidebar-title,
.sidebar.collapsed .user-info,
.sidebar.collapsed .nav-text,
.sidebar.collapsed .nav-badge,
.sidebar.collapsed .btn-sidebar-logout span { display: none; }

.sidebar-header {
    display: flex; align-items: center; gap: 12px;
    padding: 16px; border-bottom: 1px solid rgba(255,255,255,0.1);
}
.sidebar-logo { width: 32px; height: auto; }
.sidebar-title { font-weight: 600; font-size: 1.1rem; }
.sidebar-toggle {
    margin-left: auto; background: none; border: none;
    color: rgba(255,255,255,0.6); cursor: pointer; font-size: 1.1rem;
    padding: 4px 8px;
}
.sidebar-toggle:hover { color: white; }

.sidebar-user {
    display: flex; align-items: center; gap: 12px;
    padding: 16px; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.user-avatar {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--primary); display: flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: 1rem; flex-shrink: 0;
    background-size: cover; background-position: center;
}
.user-name { font-weight: 500; font-size: 0.9rem; }
.user-role { color: rgba(255,255,255,0.5); font-size: 0.75rem; display: block; }

.sidebar-nav {
    list-style: none; flex: 1; overflow-y: auto;
    padding: 8px 0; scrollbar-width: thin;
}
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 2px; }

.nav-section { padding: 12px 16px 6px; color: rgba(255,255,255,0.4); font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.sidebar.collapsed .nav-section { display: none; }

.nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 16px; cursor: pointer;
    color: rgba(255,255,255,0.7); transition: var(--transition);
    border-left: 3px solid transparent;
}
.nav-item:hover { background: rgba(255,255,255,0.05); color: white; }
.nav-item.active { background: rgba(26,115,232,0.2); color: var(--primary-light); border-left-color: var(--primary-light); }
.nav-item i { width: 20px; text-align: center; font-size: 1rem; flex-shrink: 0; }
.nav-text { flex: 1; font-size: 0.9rem; }
.nav-badge {
    background: var(--danger); color: white; font-size: 0.7rem;
    padding: 2px 6px; border-radius: 10px; font-weight: 600;
}

.sidebar-footer {
    padding: 12px 16px; border-top: 1px solid rgba(255,255,255,0.1);
}
.btn-sidebar-logout {
    display: flex; align-items: center; gap: 10px;
    width: 100%; padding: 10px;
    background: rgba(234,67,53,0.1); border: none; border-radius: var(--border-radius);
    color: var(--danger); cursor: pointer; transition: var(--transition);
    font-size: 0.9rem;
}
.btn-sidebar-logout:hover { background: rgba(234,67,53,0.2); }

/* MAIN CONTENT */
.main-content {
    flex: 1; display: flex; flex-direction: column;
    overflow: hidden; min-width: 0;
}

/* TOPBAR */
.topbar {
    height: var(--topbar-height);
    background: var(--bg-white); border-bottom: 1px solid var(--border-light);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 20px; flex-shrink: 0;
}
.topbar-left { display: flex; align-items: center; gap: 16px; }
.topbar-right { display: flex; align-items: center; gap: 8px; }

.sidebar-toggle-mobile { display: none; background: none; border: none; font-size: 1.2rem; cursor: pointer; color: var(--text-secondary); }

.breadcrumb { color: var(--text-secondary); font-size: 0.9rem; }
.breadcrumb .bc-separator { margin: 0 8px; color: var(--text-muted); }
.breadcrumb .bc-current { color: var(--text-primary); font-weight: 500; }

.search-global { position: relative; }
.search-input {
    width: 280px; padding: 8px 12px 8px 36px;
    border: 1px solid var(--border); border-radius: 20px;
    background: var(--bg-light); font-size: 0.9rem;
    transition: var(--transition);
}
.search-input:focus { outline: none; border-color: var(--primary); width: 360px; background: white; box-shadow: var(--shadow-sm); }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }

.topbar-btn {
    position: relative; background: none; border: none;
    width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: var(--text-secondary);
    transition: var(--transition); font-size: 1.1rem;
}
.topbar-btn:hover { background: var(--bg-light); color: var(--text-primary); }
.topbar-btn .badge {
    position: absolute; top: 4px; right: 4px;
    background: var(--danger); color: white;
    font-size: 0.65rem; min-width: 18px; height: 18px;
    border-radius: 9px; display: flex; align-items: center; justify-content: center;
    font-weight: 600;
}
.btn-ia { color: var(--primary); }
.btn-ia:hover { background: rgba(26,115,232,0.1); }

/* CONTENT AREA */
.content-area {
    flex: 1; overflow-y: auto; padding: 24px;
    scrollbar-width: thin;
}
.content-area::-webkit-scrollbar { width: 6px; }
.content-area::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ============================================
   CARDS & WIDGETS
   ============================================ */
.card {
    background: var(--bg-card); border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-light); box-shadow: var(--shadow-sm);
    overflow: hidden; transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); }
.card-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; border-bottom: 1px solid var(--border-light);
}
.card-header h3 { font-size: 1rem; font-weight: 600; }
.card-body { padding: 20px; }
.card-footer { padding: 12px 20px; border-top: 1px solid var(--border-light); background: var(--bg-light); }

.widget-grid {
    display: grid; gap: 20px;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.stat-card {
    background: var(--bg-card); border-radius: var(--border-radius-lg);
    padding: 20px; border: 1px solid var(--border-light);
    display: flex; align-items: center; gap: 16px;
}
.stat-icon {
    width: 48px; height: 48px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem;
}
.stat-icon.blue { background: rgba(26,115,232,0.1); color: var(--primary); }
.stat-icon.green { background: rgba(52,168,83,0.1); color: var(--success); }
.stat-icon.orange { background: rgba(249,171,0,0.1); color: var(--warning); }
.stat-icon.red { background: rgba(234,67,53,0.1); color: var(--danger); }
.stat-value { font-size: 1.8rem; font-weight: 700; line-height: 1; }
.stat-label { color: var(--text-secondary); font-size: 0.85rem; margin-top: 2px; }

/* ============================================
   TABLEAUX
   ============================================ */
.table-container { overflow-x: auto; }
table.data-table {
    width: 100%; border-collapse: collapse;
}
.data-table th {
    background: var(--bg-light); padding: 10px 16px;
    text-align: left; font-weight: 600; font-size: 0.85rem;
    color: var(--text-secondary); border-bottom: 2px solid var(--border);
    position: sticky; top: 0; z-index: 1; cursor: pointer;
    user-select: none; white-space: nowrap;
}
.data-table th:hover { background: var(--border-light); }
.data-table td {
    padding: 10px 16px; border-bottom: 1px solid var(--border-light);
    font-size: 0.9rem;
}
.data-table tr:hover td { background: rgba(26,115,232,0.03); }

/* Status badges */
.status { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 12px; font-size: 0.8rem; font-weight: 500; }
.status-green { background: rgba(52,168,83,0.1); color: var(--success); }
.status-orange { background: rgba(249,171,0,0.1); color: var(--warning); }
.status-red { background: rgba(234,67,53,0.1); color: var(--danger); }
.status-blue { background: rgba(26,115,232,0.1); color: var(--primary); }
.status-gray { background: rgba(95,99,104,0.1); color: var(--secondary); }

/* ============================================
   FORMULAIRES
   ============================================ */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 500; margin-bottom: 6px; font-size: 0.9rem; }

.form-control {
    width: 100%; padding: 10px 14px;
    border: 1px solid var(--border); border-radius: var(--border-radius);
    font-size: 0.95rem; transition: var(--transition);
    background: white;
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,115,232,0.15); }

select.form-control { appearance: auto; }

textarea.form-control { resize: vertical; min-height: 80px; }

.form-row { display: flex; gap: 16px; }
.form-row .form-group { flex: 1; }

/* Rich text mini-toolbar */
.rich-text-toolbar {
    display: flex; align-items: center; gap: 2px;
    padding: 6px 8px; background: var(--bg-light);
    border: 1px solid var(--border); border-bottom: none;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    flex-wrap: wrap;
}
.rich-text-toolbar button {
    background: none; border: none; padding: 4px 8px;
    cursor: pointer; border-radius: 4px; color: var(--text-secondary);
    font-size: 0.85rem;
}
.rich-text-toolbar button:hover { background: var(--border-light); color: var(--text-primary); }
.rich-text-toolbar button.active { background: var(--primary); color: white; }
.rich-text-toolbar select { padding: 2px 4px; border: 1px solid var(--border); border-radius: 4px; font-size: 0.8rem; }

.rich-text-editor {
    min-height: 120px; padding: 12px;
    border: 1px solid var(--border);
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    outline: none; background: white;
    font-size: 0.95rem; line-height: 1.6;
}
.rich-text-editor:focus { border-color: var(--primary); }
.rich-text-editor ul, .rich-text-editor ol { padding-left: 24px; }

/* ============================================
   PANNEAUX LATERAUX
   ============================================ */
.panel-right {
    position: fixed; right: 0; top: 0; bottom: 0;
    width: 380px; background: var(--bg-white);
    box-shadow: var(--shadow-xl); z-index: 200;
    display: flex; flex-direction: column;
    animation: slideInRight 0.2s ease;
}
@keyframes slideInRight { from { transform: translateX(100%); } to { transform: translateX(0); } }
.panel-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; border-bottom: 1px solid var(--border-light);
}
.panel-header button { background: none; border: none; cursor: pointer; font-size: 1.1rem; color: var(--text-secondary); }
.panel-body { flex: 1; overflow-y: auto; padding: 16px; }

/* ============================================
   CHAT IA
   ============================================ */
.ia-chat-panel {
    position: fixed; right: 20px; bottom: 20px;
    width: 400px; height: 500px;
    background: var(--bg-white); border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl); z-index: 300;
    display: flex; flex-direction: column;
    border: 1px solid var(--border);
    animation: slideUp 0.2s ease;
}
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.ia-chat-header {
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white; border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    display: flex; align-items: center; gap: 8px;
}
.ia-chat-header h3 { flex: 1; font-size: 0.95rem; }
.ia-chat-header button { background: none; border: none; color: white; cursor: pointer; font-size: 1rem; }
.ia-chat-context { font-size: 0.75rem; opacity: 0.8; }

.ia-chat-messages { flex: 1; overflow-y: auto; padding: 16px; }
.ia-msg { margin-bottom: 12px; max-width: 85%; }
.ia-msg.user { margin-left: auto; }
.ia-msg-bubble {
    padding: 10px 14px; border-radius: 12px;
    font-size: 0.9rem; line-height: 1.5;
}
.ia-msg.user .ia-msg-bubble { background: var(--primary); color: white; border-bottom-right-radius: 4px; }
.ia-msg.assistant .ia-msg-bubble { background: var(--bg-light); border-bottom-left-radius: 4px; }

.ia-chat-input {
    display: flex; gap: 8px; padding: 12px;
    border-top: 1px solid var(--border-light);
}
.ia-chat-input textarea {
    flex: 1; resize: none; border: 1px solid var(--border);
    border-radius: var(--border-radius); padding: 8px 12px;
    font-size: 0.9rem; outline: none;
}
.ia-chat-input textarea:focus { border-color: var(--primary); }

/* IA Selection Toolbar */
.ia-selection-toolbar {
    position: fixed; top: 70px; left: 50%; transform: translateX(-50%);
    background: var(--bg-dark); color: white; padding: 8px 12px;
    border-radius: 24px; display: flex; gap: 4px; z-index: 500;
    box-shadow: var(--shadow-xl);
}
.ia-sel-btn {
    background: rgba(255,255,255,0.1); border: none; color: white;
    padding: 8px 16px; border-radius: 16px; cursor: pointer;
    font-size: 0.85rem; transition: var(--transition);
    display: flex; align-items: center; gap: 6px;
}
.ia-sel-btn:hover, .ia-sel-btn.active { background: var(--primary); }

/* ============================================
   SESSION WARNING
   ============================================ */
.session-warning {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: var(--warning); padding: 8px 20px; z-index: 1000;
    animation: slideUp 0.3s ease;
}
.session-warning-content {
    display: flex; align-items: center; gap: 12px;
    max-width: 800px; margin: 0 auto;
    font-weight: 500;
}

/* ============================================
   AUTOSAVE INDICATOR
   ============================================ */
.autosave-indicator {
    position: fixed; bottom: 20px; left: 20px;
    background: var(--success); color: white;
    padding: 6px 14px; border-radius: 20px;
    font-size: 0.8rem; font-weight: 500;
    animation: fadeInOut 2s ease forwards;
    z-index: 100;
}
@keyframes fadeInOut { 0% { opacity:0; } 20% { opacity:1; } 80% { opacity:1; } 100% { opacity:0; } }

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000; animation: fadeIn 0.15s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-container {
    background: white; border-radius: var(--border-radius-lg);
    width: 90%; max-width: 640px; max-height: 85vh;
    display: flex; flex-direction: column;
    box-shadow: var(--shadow-xl);
    animation: scaleIn 0.15s ease;
}
@keyframes scaleIn { from { transform: scale(0.95); } to { transform: scale(1); } }

.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 24px; border-bottom: 1px solid var(--border-light);
}
.modal-header h3 { font-size: 1.1rem; }
.modal-header button { background: none; border: none; cursor: pointer; font-size: 1.2rem; color: var(--text-secondary); }
.modal-body { flex: 1; overflow-y: auto; padding: 24px; }
.modal-footer {
    display: flex; justify-content: flex-end; gap: 8px;
    padding: 16px 24px; border-top: 1px solid var(--border-light);
}

/* ============================================
   TOAST
   ============================================ */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 2000; display: flex; flex-direction: column; gap: 8px; }
.toast {
    padding: 12px 20px; border-radius: var(--border-radius);
    color: white; font-weight: 500; font-size: 0.9rem;
    animation: slideInRight 0.2s ease;
    display: flex; align-items: center; gap: 8px;
    box-shadow: var(--shadow-lg);
}
.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }
.toast-warning { background: var(--warning); color: var(--text-primary); }
.toast-info { background: var(--info); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .sidebar { position: fixed; left: -100%; z-index: 500; width: 280px; height: 100vh; }
    .sidebar.open { left: 0; box-shadow: var(--shadow-xl); }
    .sidebar-toggle-mobile { display: block; }
    .search-input { width: 200px; }
    .search-input:focus { width: 240px; }
    .panel-right { width: 100%; }
    .ia-chat-panel { right: 10px; bottom: 10px; width: calc(100% - 20px); max-width: 400px; }
}

@media (max-width: 768px) {
    .content-area { padding: 16px; }
    .widget-grid { grid-template-columns: 1fr; }
    .search-global { display: none; }
    .form-row { flex-direction: column; gap: 0; }
    .topbar { padding: 0 12px; }
    .stat-card { padding: 16px; }
    .stat-value { font-size: 1.5rem; }
    .modal-container { width: 95%; }
    .login-container { margin: 16px; padding: 32px 24px; }
}

/* ============================================
   UTILITAIRES
   ============================================ */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.p-16 { padding: 16px; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.85rem; }
.text-lg { font-size: 1.2rem; }
.font-bold { font-weight: 600; }
.hidden { display: none !important; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cursor-pointer { cursor: pointer; }
.w-full { width: 100%; }

/* Loading spinner */
.spinner { display: inline-block; width: 20px; height: 20px; border: 2px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-overlay { position: absolute; inset: 0; background: rgba(255,255,255,0.8); display: flex; align-items: center; justify-content: center; z-index: 10; }
