/* =========================================
   ORKYA OS - PREMIUM DESIGN SYSTEM
   Version: 1.3 (Catering Extensions)
   ========================================= */

/* --- SPACING SCALE (GAP VALUES) ---
   gap: 2px / 0.25rem - Extra tight (special effects, compact indicators)
   gap: 0.5rem         - Tight spacing (badges, chips, small groups)
   gap: 0.75rem        - Medium spacing (form fields, button groups)
   gap: 1rem           - Normal spacing (card content, sections)
   gap: 1.5rem         - Large spacing (major sections)
   gap: 2rem           - Extra large (page-level sections)
   gap: 0              - No gap (seamless grids, special layouts)
   ========================================= */

/* --- 0. GLOBAL RESET & BOX MODEL --- */
*, *::before, *::after {
    box-sizing: border-box;
}

/* Global link reset - no purple! */
a {
    color: inherit;
    text-decoration: none;
}

a:visited {
    color: inherit;
}

/* Global button reset — empêche le fond gris navigateur (spécificité 0 via :where) */
:where(button) {
    background: transparent;
    border: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

:root {
    /* --- COLOR PALETTE --- */
    --bg-app: #0f172a;
    --bg-secondary: #111827;
    --bg-surface: #1e293b;
    --glass-bg: rgba(30, 41, 59, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --bg-glass: rgba(255, 255, 255, 0.03);
    --bg-glass-hover: rgba(255, 255, 255, 0.06);
    
    /* Borders */
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-light: rgba(255, 255, 255, 0.12);
    --border-accent: rgba(245, 158, 11, 0.5);
    
    /* Accents */
    --accent-primary: #6366f1;   /* Indigo 500 */
    --accent-success: #10b981;   /* Emerald 500 */
    --accent-warning: #f59e0b;   /* Amber 500 */
    --accent-danger:  #f43f5e;   /* Rose 500 */
    --accent-purple:  #8b5cf6;
    --accent-cyan:    #06b6d4;
    --accent-info:    #3b82f6;
    --success-light: rgba(16, 185, 129, 0.15);
    --danger-light: rgba(239, 68, 68, 0.15);
    --info-light: rgba(59, 130, 246, 0.15);

    /* Text */
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;   /* Slate 400 */
    --text-muted:     #64748b;   /* Slate 500 */
    --text-disabled:  #475569;

    /* Premium Gradients (Blue to Orange) */
    --premium-gradient: linear-gradient(135deg, #6366f1 0%, #f59e0b 100%);
    --premium-glow: 0 0 20px rgba(99, 102, 241, 0.3);
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 20px rgba(245, 158, 11, 0.3);
    
    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s ease;
}

/* --- UTILITIES --- */
.text-gradient, .text-gradient-span {
    background-image: var(--premium-gradient) !important;
    background-size: 100% !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    color: transparent !important;
    display: inline-block !important;
    padding: 0 2px !important;
    box-decoration-break: clone !important;
    -webkit-box-decoration-break: clone !important;
}

.icon-gradient i, .icon-gradient {
    background-image: var(--premium-gradient) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    color: transparent !important;
}


/* --- LAYOUTS --- */
.dashboard-container {
    padding: 4rem 0;
    max-width: 1400px;
    margin: 0 auto;
    width: 95%; /* Responsive safety */
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 340px; /* Main vs Sidebar */
    gap: 2rem;
}

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

/* --- COMPONENTS: HEADER --- */
.haiku-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 3rem;
}

.haiku-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #94a3b8;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 100px;
    padding: 0.4rem 1rem;
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
    letter-spacing: 0.3px;
}
.haiku-back:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
    color: #e2e8f0;
}
.haiku-back i { font-size: 0.6rem; }

/* PREMIUM BRANDING HEADER (LOGO REPLACEMENT) */
.orkya-brand-header {
    font-size: 2.25rem;
    font-weight: 900;
    letter-spacing: -2px;
    background: var(--premium-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-bottom: 1.5rem;
    line-height: 1;
    filter: drop-shadow(0 4px 12px rgba(99, 102, 241, 0.2));
}

.orkya-brand-header span {
    font-size: 0.5em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 0.5rem;
}

.orkya-brand-header-sm {
    font-size: 1.5rem;
}

.user-welcome-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.3;
    letter-spacing: -1px;
    overflow: visible;
}

.user-welcome-title .text-gradient {
    padding: 10px 14px !important;
    margin: -10px 0 !important;
}

.user-welcome-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.org-badge {
    background: rgba(255,255,255,0.1);
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid var(--glass-border);
}

/* --- CONFIG BOXES (Equal Size) --- */
.config-box {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 220px;
    background: rgba(30, 41, 59, 0.3);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: 1.5rem;
    transition: transform 0.2s, border-color 0.2s;
}

.config-box:hover {
    border-color: var(--accent-primary);
}

/* --- SAFE CENTERING UTILITY --- */
.orkya-flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* --- COMPONENTS: BUTTONS --- */
.action-deck {
    display: flex;
    gap: 1rem;
}

.btn-action-glass {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 100px; /* Pill */
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem; /* Standardized gap */
    min-height: 44px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    text-align: center;
}

.btn-action-glass i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    line-height: 1;
    flex-shrink: 0; /* Prevent icon from shrinking */
}

/* Ensure text in span wraps properly when needed */
.btn-action-glass > span {
    flex-shrink: 1;
    min-width: 0; /* Allow text to shrink if needed */
}

.btn-action-glass:hover {
    background: rgba(255,255,255,0.15);
    transform: translateY(-2px);
    border-color: rgba(255,255,255,0.3);
    color: white;
}

/* OS BUTTON — Primary action button (gradient indigo) */
.os-button {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}
.os-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
    filter: brightness(1.1);
}
.os-button:disabled, .os-button[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* OS BUTTON SUBTLE — Secondary / ghost button */
.os-button-subtle {
    background: rgba(255,255,255,0.05);
    color: #cbd5e1;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
}
.os-button-subtle:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
    color: white;
}

/* OS DROPDOWN — Context menu premium (teleported to body) */
.os-dropdown {
    background: #1e293b;
    border: 1px solid rgba(99,102,241,0.25);
    border-radius: 12px;
    padding: 0.375rem 0;
    box-shadow: 0 12px 40px rgba(0,0,0,0.9), inset 0 1px 0 rgba(255,255,255,0.06);
    color: #e2e8f0;
    min-width: 13rem;
}
.os-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    width: 100%;
    text-align: left;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    color: #e2e8f0;
    transition: background 0.15s ease, color 0.15s ease;
    border-radius: 0;
}
.os-dropdown-item:hover {
    background: rgba(99,102,241,0.12);
    color: #c7d2fe;
}
.os-dropdown-item.danger:hover {
    background: rgba(239,68,68,0.1);
    color: #fca5a5;
}
.os-dropdown-item.disabled {
    color: #475569;
    cursor: not-allowed;
    pointer-events: none;
}
/* OS CHECKBOX — Premium styled checkbox */
.os-checkbox {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(148,163,184,0.3);
    border-radius: 5px;
    background: rgba(15,23,42,0.6);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    flex-shrink: 0;
}
.os-checkbox:hover {
    border-color: rgba(99,102,241,0.6);
    background: rgba(99,102,241,0.1);
}
.os-checkbox:checked {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-color: #6366f1;
    box-shadow: 0 0 8px rgba(99,102,241,0.4);
}
.os-checkbox:checked::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 5px;
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.os-dropdown-divider {
    height: 1px;
    margin: 0.25rem 0.75rem;
    background: rgba(255,255,255,0.08);
}

/* PRIMARY / MAGIC (Blue-to-Orange) */
.btn-action-primary, .btn-action-magic {
    background: linear-gradient(135deg, #6366f1 0%, #f59e0b 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-action-primary:hover, .btn-action-magic:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(245, 158, 11, 0.5);
    filter: brightness(1.1);
    color: white;
}

/* VIVID MAGIC BUTTON (Refined: Indigo to Cyan) */
.orkya-btn-magic-vivid {
    background: linear-gradient(135deg, #6366f1 0%, #3b82f6 50%, #06b6d4 100%);
    color: white;
    border: none;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
    position: relative;
    overflow: hidden;
}

.orkya-btn-magic-vivid::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
}

.orkya-btn-magic-vivid:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(6, 182, 212, 0.5);
    filter: brightness(1.1);
    color: white;
}

.orkya-btn-magic-vivid:hover::after {
    opacity: 1;
}

/* SUCCESS (Emerald-Teal) */
.btn-action-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.btn-action-success:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(5, 150, 105, 0.5);
    filter: brightness(1.1);
}

/* WARNING (Amber-Orange) */
.btn-action-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.btn-action-warning:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(217, 119, 6, 0.5);
    filter: brightness(1.1);
}

/* DANGER (Rose-Red) */
.btn-action-danger {
    background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(244, 63, 94, 0.3);
}

.btn-action-danger:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(225, 29, 72, 0.4);
    filter: brightness(1.1);
}

/* INFO (Sky-Blue) */
.btn-action-info {
    background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
}

.btn-action-info:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(37, 99, 235, 0.4);
    filter: brightness(1.1);
}

/* --- COMPONENTS: CARDS --- */
.glass-panel {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    backdrop-filter: blur(12px);
    padding: 1.5rem;
}

/* HERO CARD */
.hero-card {
    background: linear-gradient(145deg, rgba(30,41,59,0.8), rgba(15,23,42,0.95));
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    margin-bottom: 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.hero-bg-glow {
    position: absolute;
    top: -50%;
    left: -20%;
    width: 80%;
    height: 200%;
    background: radial-gradient(circle, rgba(99,102,241,0.15) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.hero-content { position: relative; z-index: 1; }

.hero-label {
    color: var(--accent-success); /* Default Emerald */
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.8rem;
    margin-bottom: 1rem;
    display: block;
}

.hero-title {
    font-size: 2rem; 
    font-weight: 800; 
    color: white; 
    margin-bottom: 0.5rem;
}

.hero-meta {
    color: var(--text-secondary);
    font-size: 1rem;
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.hero-action {
    position: relative; 
    z-index: 1;
}

/* APP GRID */
.app-grid-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.app-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 28px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(16px);
}

.app-card:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.2);
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.app-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1rem;
}

/* HUB/RING SPECIFIC */
.ring-kpi-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    background: rgba(0,0,0,0.2);
    border-radius: 20px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.ring-kpi-item {
    display: flex;
    flex-direction: column;
}

.ring-kpi-label {
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 2px;
}

.ring-kpi-value {
    font-size: 1.25rem;
    font-weight: 900;
    color: white;
}

.app-icon {
    width: 50px;
    height: 50px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.app-name {
    color: white;
    font-weight: 700;
    font-size: 1rem;
    margin: 0;
}

.app-desc {
    color: var(--text-muted);
    font-size: 0.75rem;
    line-height: 1.4;
    margin: 0;
}

/* SIDEBAR */
.sidebar-panel {
    background: rgba(15, 23, 42, 0.4);
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    padding: 1.5rem;
    height: fit-content;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.stat-row:last-child { border-bottom: none; }

.stat-val { color: white; font-weight: 700; font-size: 1.1rem; }
.stat-key { color: var(--text-secondary); font-size: 0.9rem; }


/* --- EXTENSIONS (From Event Hub) --- */

/* TABS */
.tab-group {
    display: flex;
    gap: 0.5rem;
    background: rgba(0,0,0,0.2);
    padding: 6px;
    border-radius: 24px;
    width: fit-content;
    margin-bottom: 2.5rem;
    border: 1px solid var(--glass-border);
}
.tab-item {
    padding: 0.75rem 1.5rem;
    border-radius: 18px;
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.tab-item.active {
    background: white;
    color: black;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* --- COMPONENTS: MODALS (ORKYA OS PREMIUM) --- */
.orkya-modal-backdrop, .os-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    z-index: 2000;
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    animation: fadeIn 0.3s ease-out;
}

.orkya-modal-content, .os-modal-card {
    background: #1e293b;
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    width: 100%;
    max-width: 500px;
    padding: 2.5rem;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 40px rgba(99, 102, 241, 0.1);
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Modal Wide Variant - Pour formulaires complexes (Staff, etc.) */
.orkya-modal-content-wide {
    background: #1e293b;
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    width: 100%;
    max-width: 900px;
    padding: 3rem;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 40px rgba(99, 102, 241, 0.1);
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}


.orkya-form-group {
    margin-bottom: 1.5rem;
}

.orkya-label {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    display: block;
}

.orkya-input, .orkya-select {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 0.8rem 1.2rem;
    color: white;
    width: 100%;
    font-size: 0.95rem;
    font-weight: 500;
    outline: none;
    transition: all 0.2s;
}

.orkya-input:focus, .orkya-select:focus {
    border-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.2);
}

/* AUTH SPECIFIC DENSITY */
.orkya-input-auth {
    padding: 0.7rem 1.1rem !important;
    font-size: 0.9rem !important;
    border-radius: 14px !important;
    height: 48px !important; /* Fixed but professional height */
    box-sizing: border-box !important;
}

.orkya-label-auth {
    font-size: 0.7rem !important;
    margin-bottom: 0.4rem !important;
    opacity: 0.8;
}

/* --- ANIMATIONS --- */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

/* --- DATA TABLES & LISTS --- */
.table-os {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.5rem;
    margin-top: 1rem;
}
.table-os thead th {
    text-align: left;
    padding: 1rem;
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}
.table-os tbody tr {
    background: rgba(30, 41, 59, 0.4);
    transition: all 0.2s;
}
.table-os tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: scale(1.005);
}
.table-os td {
    padding: 1rem;
    color: white;
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
}
.table-os td:first-child {
    border-left: 1px solid var(--glass-border);
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}
.table-os td:last-child {
    border-right: 1px solid var(--glass-border);
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

/* --- BADGES --- */
.badge-os {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.badge-success {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.2);
}
.badge-warning {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.2);
}
.badge-neutral {
    background: rgba(148, 163, 184, 0.2);
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

/* --- MEDIA CARDS (Recipes) --- */
.card-media {
    background: linear-gradient(180deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.01) 100%);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}
.card-media:hover {
    transform: translateY(-6px);
    border-color: var(--accent-primary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}
.card-media-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
}
.card-media-content {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* --- FILTERS --- */
.filter-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    align-items: center;
}
.filter-input {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.8rem 1rem;
    color: var(--text-primary);
    min-width: 200px;
}
/* --- HUB LAYOUTS --- */
.haiku-header-xl h1 { 
    font-size: 5rem; 
    letter-spacing: -3px; 
    line-height: 0.9; 
    font-weight: 900; 
    margin-bottom: 2rem;
}

.hub-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); 
    gap: 2rem; 
}

.meal-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
}

@media (max-width: 1024px) {
    .haiku-header-xl h1 { font-size: 3.5rem; }
}

.filter-input:focus {
    border-color: var(--accent-primary);
    outline: none;
}

/* === MOBILE RESPONSIVENESS (B-MAD Approved) === */
@media (max-width: 768px) {
    /* Layout */
    .dashboard-container { padding: 1rem; width: 100%; }
    .dashboard-grid { grid-template-columns: 1fr; gap: 1rem; }
    
    /* Header */
    .haiku-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        margin-bottom: 1.5rem;
    }
    .haiku-header-xl {
        flex-direction: column !important;
        gap: 1.5rem !important;
        align-items: flex-start !important;
        margin-bottom: 2rem !important;
    }
    .haiku-header-xl h1 {
        font-size: 2rem !important;
        letter-spacing: -1px !important;
        line-height: 1.1 !important;
        margin-bottom: 0.5rem !important;
    }
    .haiku-header-xl > div:last-child {
        width: 100% !important;
        align-items: flex-start !important;
        padding: 0 !important;
        border: none !important;
    }

    /* Header text — empêcher débordement */
    .user-welcome-title {
        font-size: 1.75rem;
        word-break: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
    }
    .user-welcome-title .text-gradient {
        padding: 4px 6px !important;
        margin: -4px 0 !important;
    }
    .user-welcome-subtitle {
        flex-wrap: wrap;
        gap: 0.4rem;
        font-size: 0.875rem;
    }
    .org-badge {
        max-width: 200px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .orkya-brand-header {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    /* Breadcrumbs — wrap sur mobile */
    .haiku-back {
        min-height: 36px;
        font-size: 0.75rem;
    }

    /* Action buttons */
    .action-deck { width: 100%; flex-wrap: wrap; gap: 0.5rem; }
    .btn-action-glass { flex: 1 1 45%; font-size: 0.8rem; }

    /* Hub Card Internal Layouts */
    .finance-card-body {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 2rem !important;
    }
    .finance-card-body > div {
        width: 100% !important;
    }
    .finance-stats-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    .finance-actions {
        width: 100% !important;
    }
    
    /* Hub Grid */
    .hub-grid { grid-template-columns: 1fr !important; gap: 1.5rem !important; }
    .col-span-2, .col-span-3 { grid-column: span 1 !important; }

    .meal-grid { 
        grid-template-columns: 1fr !important; 
    }
    .meal-slot-card {
        border-right: none !important;
        border-bottom: 1px solid var(--border-subtle) !important;
    }
    .meal-slot-card:last-child {
        border-bottom: none !important;
    }
    
    /* Hero */
    .hero-card { 
        flex-direction: column; 
        padding: 1.5rem; 
        border-radius: 20px; 
        text-align: center; 
    }
    .hero-title { font-size: 1.5rem; }
    .hero-meta { flex-wrap: wrap; justify-content: center; gap: 0.75rem; }
    
    /* App/Hub Grid */
    .app-grid { grid-template-columns: 1fr; gap: 1rem; }
    .app-card { padding: 1.25rem; border-radius: 20px; }
    
    /* Tabs - Horizontal scroll */
    .tab-group { overflow-x: auto; width: 100%; -webkit-overflow-scrolling: touch; }
    .tab-item { padding: 0.5rem 1rem; font-size: 0.75rem; white-space: nowrap; }
    
    /* Tables → Card Layout */
    .table-os { display: block; }
    .table-os thead { display: none; }
    .table-os tbody tr { 
        display: flex; 
        flex-direction: column; 
        margin-bottom: 1rem; 
        border-radius: 12px; 
        background: rgba(30, 41, 59, 0.6);
        padding: 1rem;
    }
    .table-os td { 
        display: flex; 
        justify-content: space-between; 
        padding: 0.5rem 0;
        border: none !important;
        border-radius: 0 !important;
    }
    .table-os td::before { 
        content: attr(data-label); 
        font-weight: 700; 
        color: var(--text-muted); 
        margin-right: 1rem;
    }
    
    /* Modals */
    .orkya-modal-content, .os-modal-card { 
        max-width: 95%; 
        padding: 1.5rem; 
        border-radius: 24px; 
        max-height: 90vh;
        overflow-y: auto;
    }
    
    /* Filters */
    .filter-bar { flex-direction: column; }
    .filter-input { width: 100%; min-width: unset; }
    
    /* Sidebar panel */
    .sidebar-panel { border-radius: 16px; margin-top: 1rem; }
    
    /* Ring KPI Grid */
    .ring-kpi-grid { grid-template-columns: 1fr; gap: 0.75rem; }

    /* Form Groups - Tighter on mobile */
    .orkya-form-group { margin-bottom: 1rem; }

    /* Name Row - Stack on mobile */
    .name-row { flex-direction: column; }
}

/* Small phones */
@media (max-width: 480px) {
    .hero-title { font-size: 1.25rem; }
    .user-welcome-title { font-size: 1.35rem; letter-spacing: -0.5px; }
    .haiku-header-xl h1 { font-size: 1.6rem !important; }
    .btn-action-glass { flex: 1 1 100%; }
    .app-card { padding: 1rem; }
    .haiku-header { margin-bottom: 1rem; }
    .orkya-brand-header { font-size: 1.25rem; }
    .org-badge { max-width: 150px; }
}

/* Touch Optimization (Sally's recommendation) */
@media (pointer: coarse) {
    .btn-action-glass, .orkya-btn { min-height: 44px; }
    .tab-item { min-height: 44px; display: flex; align-items: center; }
    .orkya-sidebar-link { padding: 0.75rem; }
    .filter-input, .orkya-input, .orkya-select { min-height: 44px; }
}

/* --- NAV BUBBLES (Standardized) --- */
.orkya-nav-bubbles {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.nav-card {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: rgba(30, 41, 59, 0.4); /* fallback for bg-surface */
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.nav-card i {
    font-size: 1rem;
    opacity: 0.7;
}

.nav-card:hover {
    background: var(--bg-glass-hover);
    border-color: var(--accent-primary);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.nav-card:hover i {
    opacity: 1;
    color: var(--accent-primary);
}

.nav-card.active {
    background: var(--premium-gradient);
    border-color: transparent;
    color: white;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.nav-card.active i {
    opacity: 1;
    color: white;
}

/* =========================================
   VOLUNTEER HUB - EVENT DETAIL (Party Mode #8)
   ========================================= */

/* --- EVENT HERO --- */
.event-hero {
    background: linear-gradient(145deg, rgba(30,41,59,0.8), rgba(15,23,42,0.95));
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
}

.event-hero .glow {
    position: absolute;
    top: -50%;
    left: -20%;
    width: 80%;
    height: 200%;
    background: radial-gradient(circle, rgba(99,102,241,0.15) 0%, transparent 70%);
    pointer-events: none;
}

/* --- COUNTDOWN BADGES --- */
.countdown-badge {
    background: var(--premium-gradient);
    padding: 0.5rem 1.25rem;
    border-radius: 100px;
    font-weight: 800;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
}

.countdown-badge.dday-badge {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0%, 100% { opacity: 1; box-shadow: 0 0 15px rgba(16, 185, 129, 0.3); }
    50% { opacity: 0.85; box-shadow: 0 0 25px rgba(16, 185, 129, 0.5); }
}

/* --- INFO CARDS --- */
.info-card {
    background: rgba(30, 41, 59, 0.7); /* Slightly more solid */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.info-card:hover {
    border-color: var(--accent-primary);
    background: rgba(30, 41, 59, 0.9);
}

/* --- SHIFT ITEMS --- */
.shift-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
}

.shift-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(4px);
}

/* --- QR CONTAINER --- */
.qr-container {
    background: white;
    padding: 1rem;
    border-radius: 20px;
    display: inline-block;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    transition: transform 0.2s ease;
}

.qr-container:hover {
    transform: scale(1.05);
}

/* --- PASS STATES --- */
.pass-locked {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
}

.pass-active {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
}

.pass-suspended {
    background: rgba(244, 63, 94, 0.15);
    border: 1px solid rgba(244, 63, 94, 0.3);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
}

/* --- AVAILABILITY SLOTS (Ultra Robust Visibility) --- */
.slot-toggle {
    display: flex !important;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 48px;
    background: rgba(30, 41, 59, 0.5) !important;
    color: #cbd5e1;
    position: relative;
    user-select: none;
}

.slot-toggle:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

.slot-toggle.active {
    background: #6366f1 !important; /* solid Indigo 500 */
    border-color: #818cf8 !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.5) !important;
}

.slot-check {
    margin-left: auto;
    display: none !important; /* Force hide */
    font-size: 0.9rem;
    color: white !important;
}

.slot-toggle.active .slot-check {
    display: block !important; /* Force show when active */
    animation: bounceScale 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes bounceScale {
    from { transform: scale(0.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Day Card Refinement */
.day-card {
    background: rgba(30, 41, 59, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 20px;
    overflow: hidden;
}

.day-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.day-card-header {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.875rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.day-card-body {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Day Tags */
.day-tag {
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    text-transform: uppercase;
    border: 1px solid transparent; /* For borders to work */
}

.day-tag-event {
    background: rgba(99, 102, 241, 0.2); /* Indigo 500/20 */
    color: #818cf8; /* Indigo 400 */
    border-color: rgba(99, 102, 241, 0.3);
}

.day-tag-montage {
    background: rgba(245, 158, 11, 0.2); /* Amber 500/20 */
    color: #fbbf24; /* Amber 400 */
    border-color: rgba(245, 158, 11, 0.3);
}

.day-tag-demontage {
    background: rgba(100, 116, 139, 0.2); /* Slate 500/20 */
    color: #94a3b8; /* Slate 400 */
    border-color: rgba(100, 116, 139, 0.3);
}

.day-tag-prep {
    background: rgba(30, 41, 59, 0.5); /* Slate 800 */
    color: #64748b; /* Slate 500 */
    border-color: rgba(255, 255, 255, 0.05);
}

/* --- ENGAGEMENT CARD --- */
.engagement-card {
    background: rgba(99, 102, 241, 0.05);
    border: 1px dashed rgba(99, 102, 241, 0.3);
    border-radius: 20px;
    padding: 1.25rem;
}

.engagement-input {
    width: 5rem;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 0.75rem 1rem;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 900;
    color: white;
    min-height: 48px; /* Touch target */
}

.engagement-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.2);
}

/* Motivational Message Animation */
.motivation-msg {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- BUDDY SYSTEM --- */
.buddy-card {
    background: linear-gradient(145deg, rgba(139, 92, 246, 0.05), rgba(99, 102, 241, 0.05));
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.buddy-tabs {
    display: flex;
    background: rgba(0,0,0,0.4);
    padding: 0.25rem;
    border-radius: 14px;
}

.buddy-tab {
    flex: 1;
    padding: 0.75rem;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-secondary);
    min-height: 44px; /* Touch target */
    display: flex;
    align-items: center;
    justify-content: center;
}

.buddy-tab.active {
    background: var(--accent-purple);
    color: white;
}

.buddy-code-display {
    background: rgba(139, 92, 246, 0.1);
    padding: 0.875rem;
    border-radius: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.buddy-code {
    font-size: 1.25rem;
    font-weight: 900;
    color: white;
    letter-spacing: 0.15em;
}

/* Member Avatars */
.member-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.member-chip {
    background: rgba(255,255,255,0.05);
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: fadeInUp 0.3s ease-out backwards;
}

.member-chip:nth-child(1) { animation-delay: 0ms; }
.member-chip:nth-child(2) { animation-delay: 50ms; }
.member-chip:nth-child(3) { animation-delay: 100ms; }
.member-chip:nth-child(4) { animation-delay: 150ms; }
.member-chip:nth-child(5) { animation-delay: 200ms; }

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

.member-avatar {
    width: 24px;
    height: 24px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-purple));
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.65rem;
    font-weight: 800;
    color: white;
}

.member-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-success);
}

/* --- SAVED INDICATOR --- */
.saved-indicator {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--accent-success);
    font-size: 0.75rem;
    font-weight: 700;
    animation: fadeInScale 0.3s ease-out;
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

/* --- TOP BAR (Event Detail) --- */
.event-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
}

.event-topbar-back {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 700;
    transition: color 0.2s ease;
    min-height: 44px; /* Touch target */
    min-width: 44px;
}

.event-topbar-back:hover {
    color: white;
}

.event-topbar-title {
    font-size: 1.125rem;
    font-weight: 900;
    background: linear-gradient(135deg, #818cf8, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- MOBILE OPTIMIZATIONS (Volunteer Hub) --- */
@media (max-width: 768px) {
    .event-hero {
        padding: 1.5rem;
        border-radius: 24px;
    }
    
    .event-hero h1 {
        font-size: 1.75rem !important;
    }
    
    .info-card {
        padding: 1.25rem;
        border-radius: 20px;
    }
    
    .day-card-header {
        padding: 0.75rem;
    }
    
    .slot-toggle {
        padding: 1rem;
    }
    
    .buddy-code {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .event-topbar-title {
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .countdown-badge {
        font-size: 0.75rem;
        padding: 0.4rem 1rem;
    }
}

/* Touch devices - ensure 48px targets */
@media (pointer: coarse) {
    .slot-toggle {
        min-height: 52px;
        padding: 1rem 1.25rem;
    }
    
    .buddy-tab {
        min-height: 48px;
    }
    
    .event-topbar-back {
        min-height: 48px;
        padding: 0 0.5rem;
    }
}

/* Hide x-cloak elements until Alpine loads */
[x-cloak] { display: none !important; }

/* =========================================
   ORKYA LEGACY EXTENSIONS (Merged from orkya.css)
   ========================================= */

/* --- NAVBAR --- */
.orkya-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem 2rem;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    position: sticky;
    top: 0;
    z-index: 100;
}

.orkya-nav-brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent-warning);
    text-decoration: none;
}

.orkya-nav-links {
    display: flex;
    gap: 1rem;
    margin-left: auto;
}

.orkya-nav-link {
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

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

.orkya-nav-link.active {
    color: var(--accent-primary);
}

/* --- ORKYA CARDS --- */
.orkya-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: all var(--transition-normal);
}

.orkya-card:hover {
    background: var(--bg-glass-hover);
    border-color: var(--border-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.orkya-card-glass {
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.orkya-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-subtle);
}

.orkya-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* --- ORKYA BUTTONS --- */
.orkya-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    /* Rigorous sizing */
    box-sizing: border-box;
    line-height: 1.2;
}

.orkya-btn-primary {
    background: linear-gradient(135deg, var(--accent-warning) 0%, #d97706 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.orkya-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.4);
    color: white;
}

.orkya-btn-secondary {
    background: var(--bg-glass);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
}

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

.orkya-btn-ghost {
    background: transparent;
    color: var(--text-muted);
    padding: 0.5rem 1rem;
}

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

.orkya-btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.orkya-btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--radius-sm);
}

/* --- ORKYA TABLES --- */
.orkya-table {
    width: 100%;
    border-collapse: collapse;
}

.orkya-table thead {
    background: rgba(255, 255, 255, 0.03);
}

.orkya-table th {
    text-align: left;
    padding: 1rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-subtle);
}

.orkya-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-secondary);
}

.orkya-table tbody tr {
    transition: background var(--transition-fast);
}

.orkya-table tbody tr:hover {
    background: var(--bg-glass);
}

.orkya-table tbody tr:last-child td {
    border-bottom: none;
}

/* --- ORKYA TABS (Glass style) --- */
.orkya-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 0.25rem;
    background: rgba(15, 23, 42, 0.4);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.orkya-tab {
    display: inline-flex;
    align-items: center;
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    color: rgba(148, 163, 184, 0.8);
    text-decoration: none;
    transition: all 0.25s ease;
    cursor: pointer;
}

.orkya-tab:hover {
    color: #e2e8f0;
    background: rgba(99, 102, 241, 0.1);
}

.orkya-tab.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(139, 92, 246, 0.2));
    border: 1px solid rgba(99, 102, 241, 0.3);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.15);
}

/* --- ORKYA BADGES --- */
.orkya-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.orkya-badge-success {
    background: var(--success-light);
    color: var(--accent-success);
}

.orkya-badge-danger {
    background: var(--danger-light);
    color: var(--accent-danger);
}

.orkya-badge-info {
    background: var(--info-light);
    color: var(--accent-info);
}

.orkya-badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-warning);
}

.orkya-badge-neutral {
    background: rgba(148, 163, 184, 0.15);
    color: var(--text-muted);
}

/* --- ALERTS --- */
.orkya-alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.orkya-alert-success {
    background: var(--success-light);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--accent-success);
}

.orkya-alert-danger {
    background: var(--danger-light);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--accent-danger);
}

.orkya-alert-info {
    background: var(--info-light);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: var(--accent-info);
}

/* --- UTILITIES (Tailwind-like) --- */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.w-full { width: 100%; }

/* --- COLOR UTILITIES --- */
.text-primary { color: var(--text-primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-accent { color: var(--accent-warning) !important; }

/* --- SPACING UTILITIES --- */
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-4 { margin-bottom: 1rem !important; }
.mb-6 { margin-bottom: 1.5rem !important; }
.mb-8 { margin-bottom: 2rem !important; }
.mb-10 { margin-bottom: 2.5rem !important; }
.mb-12 { margin-bottom: 3rem !important; }
.mt-4 { margin-top: 1rem !important; }
.mt-8 { margin-top: 2rem !important; }
.py-4 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
.py-6 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
.px-6 { padding-left: 1.5rem !important; padding-right: 1.5rem !important; }

/* --- ICON CIRCLES --- */
.orkya-icon-circle {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.orkya-icon-circle.success {
    background: linear-gradient(135deg, var(--accent-success) 0%, #059669 100%);
}

.orkya-icon-circle.danger {
    background: linear-gradient(135deg, var(--accent-danger) 0%, #dc2626 100%);
}

.orkya-icon-circle.info {
    background: linear-gradient(135deg, var(--accent-info) 0%, #2563eb 100%);
}

.orkya-icon-circle.accent {
    background: linear-gradient(135deg, var(--accent-warning) 0%, #d97706 100%);
}

.orkya-icon-circle.purple {
    background: linear-gradient(135deg, var(--accent-purple) 0%, #7c3aed 100%);
}

/* --- SECTION TITLE --- */
.orkya-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-subtle);
}

/* --- BACK LINK --- */
.orkya-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary); /* Plus clair que muted */
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.orkya-back-link:hover {
    color: white;
    transform: translateX(-4px);
}

/* --- EMPTY STATE --- */
.orkya-empty {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

.orkya-empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

/* --- GRIDS --- */
.orkya-grid {
    display: grid;
    gap: 1.5rem;
}

.orkya-grid-2 { grid-template-columns: repeat(2, 1fr); }
.orkya-grid-3 { grid-template-columns: repeat(3, 1fr); }
.orkya-grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
    .orkya-grid-4, .orkya-grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .orkya-grid-4, .orkya-grid-3, .orkya-grid-2 { grid-template-columns: 1fr; }
}

/* --- RADIO/CHECKBOX CARDS --- */
.radio-card-label {
    cursor: pointer;
    display: block;
    position: relative;
}

.radio-card-label input[type="radio"],
.radio-card-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-card-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-weight: 500;
    transition: all var(--transition-fast);
}

.radio-card-label:hover .radio-card-content {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-light);
    color: var(--text-primary);
}

.radio-card-label input:checked + .radio-card-content {
    background: rgba(245, 158, 11, 0.15);
    border-color: var(--accent-warning);
    color: var(--accent-warning);
    box-shadow: 0 0 0 1px var(--accent-warning);
}

.yes-no-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* --- MOVED FROM ADMIN LIST --- */
.volunteer-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-success) 0%, #059669 100%);
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

/* =========================================
   UTILITY CLASSES (Tailwind-style)
   ========================================= */

/* Margin utilities */
.mr-1 { margin-right: 0.25rem !important; }
.mr-2 { margin-right: 0.5rem !important; }
.mr-3 { margin-right: 0.75rem !important; }
.mr-4 { margin-right: 1rem !important; }

.ml-1 { margin-left: 0.25rem !important; }
.ml-2 { margin-left: 0.5rem !important; }
.ml-3 { margin-left: 0.75rem !important; }
.ml-4 { margin-left: 1rem !important; }

.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 0.75rem !important; }
.mt-4 { margin-top: 1rem !important; }

.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 0.75rem !important; }
.mb-4 { margin-bottom: 1rem !important; }

/* --- PROFILE / BIO LAYOUTS (ORKYA OS) --- */
.bio-grid {
    display: grid;
    grid-template-columns: 300px 1fr 340px;
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 1280px) {
    .bio-grid { grid-template-columns: 280px 1fr; }
    .bio-col-command { grid-column: 2; grid-row: 1; }
    .bio-col-intel { grid-column: 1 / -1; grid-row: 2; }
}

@media (max-width: 900px) {
    .bio-grid { grid-template-columns: 1fr; }
    .bio-col-command { grid-column: 1; grid-row: 1; margin-bottom: 2rem; }
    .bio-col-identity { grid-column: 1; margin-bottom: 2rem; }
    .bio-col-intel { grid-column: 1; }
}

.sticky-card { position: sticky; top: 2rem; }

.avatar-ring { 
    width: 120px; height: 120px; 
    border-radius: 50%; 
    padding: 4px; 
    border: 1px solid var(--glass-border);
    margin: 0 auto 1.5rem;
    overflow: hidden;
    background: rgba(255,255,255,0.03);
}

.avatar-ring img { 
    width: 100%; height: 100%; 
    object-fit: cover; 
    border-radius: 50%; 
}

.initials { 
    display: flex; align-items: center; justify-content: center; 
    width: 100%; height: 100%; 
    font-size: 2.5rem; 
    color: rgba(255,255,255,0.2); 
    background: rgba(255,255,255,0.05); 
    border-radius: 50%; 
}

.data-item {
    display: flex; justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 0.9rem;
}

.data-item:last-child { border-bottom: none; }
.data-item .label { color: var(--text-secondary); }
.data-item .value { color: white; font-weight: 500; }

.availability-grid {
    display: flex; flex-wrap: wrap; gap: 0.5rem;
}

.avail-item {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    font-size: 0.85rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
}

.avail-true { border-color: rgba(16, 185, 129, 0.3); background: rgba(16, 185, 129, 0.1); }
.avail-false { opacity: 0.5; }
.avail-item .slot-name { color: white; font-weight: 600; }

.dynamic-info-tiny {
    background: rgba(255,255,255,0.03);
    padding: 0.5rem;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.05);
}

.stream-feed .msg-pair {
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 0.5rem;
}
.stream-feed .msg-pair:last-child { border-bottom: none; }
.msg-system { font-size: 0.7rem; text-transform: uppercase; color: var(--text-muted); font-weight: 700; margin-bottom: 0.25rem; }
.msg-user { background: rgba(255,255,255,0.03); padding: 0.75rem; border-radius: 0 12px 12px 12px; border-left: 2px solid var(--accent-primary); }

.bg-warning-low { background: rgba(245, 158, 11, 0.1); border: 1px solid rgba(245, 158, 11, 0.2); }
.text-accent { color: var(--accent-primary); }
.border-accent { border-color: var(--accent-primary) !important; }

.mb-4 { margin-bottom: 1rem !important; }

/* =========================================
   RECOVERY & COMPATIBILITY SHIMS
   Restoring functionality for Admin Hub & Login
   ========================================= */

/* 1. Missing KPI Cards (for Admin Hub) */
.kpi-card {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: transform 0.2s;
    height: 100%;
    min-height: 140px;
}
.kpi-card:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.2); }
.kpi-value { font-size: 2.5rem; font-weight: 800; color: white; line-height: 1.1; margin-bottom: 0.5rem; }
.kpi-label { font-size: 0.85rem; color: var(--text-secondary); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }

.kpi-card.success .kpi-value { color: var(--accent-success); }
.kpi-card.warning .kpi-value { color: var(--accent-warning); }
.kpi-card.info .kpi-value { color: var(--accent-info); }

/* 2. Legacy Grid System Shim (Bootstrap-like for Admin Hub) */
.row { display: flex; flex-wrap: wrap; margin-left: -1rem; margin-right: -1rem; width: calc(100% + 2rem); }
.col-md-3, .col-md-4, .col-md-2, .col-md-6, .col-md-8, .col-md-12 {
    padding-left: 1rem; padding-right: 1rem; box-sizing: border-box;
}
@media (min-width: 768px) {
    .col-md-3 { width: 25%; }
    .col-md-4 { width: 33.3333%; }
    .col-md-2 { width: 16.6666%; }
    .col-md-6 { width: 50%; }
    .col-md-8 { width: 66.6666%; }
    .col-md-12 { width: 100%; }
}
@media (max-width: 767px) {
    .col-md-3, .col-md-4, .col-md-2, .col-md-6, .col-md-8 { width: 100%; margin-bottom: 1rem; }
    .row { margin-left: 0; margin-right: 0; width: 100%; }
}

/* 3. Bootstrap Compat Shims (For Legacy Templates) */
.d-flex { display: flex !important; }
.justify-content-between { justify-content: space-between !important; }
.align-items-center { align-items: center !important; }
.w-100 { width: 100% !important; }
.text-center { text-align: center !important; }
.ms-1 { margin-left: 0.25rem !important; }

.table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
.table th { padding: 1rem; text-align: left; border-bottom: 1px solid var(--border-subtle); color: var(--text-muted); font-weight: 600; text-transform: uppercase; font-size: 0.8rem; }
.table td { padding: 1rem; border-bottom: 1px solid var(--border-subtle); color: var(--text-secondary); }
.table-hover tbody tr:hover { background: rgba(255, 255, 255, 0.03); }

.badge { padding: 0.35em 0.65em; font-size: 0.75em; font-weight: 700; border-radius: 9999px; text-transform: uppercase; }
.bg-success { background-color: rgba(16, 185, 129, 0.2); color: #34d399; }
.bg-warning { background-color: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.bg-info { background-color: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.text-dark { color: inherit !important; } /* Override bootstrap dark text on warning badges */

.btn { display: inline-flex; align-items: center; justify-content: center; padding: 0.5rem 1rem; border-radius: 8px; border: none; cursor: pointer; text-decoration: none; font-weight: 600; transition: all 0.2s; font-size: 0.9rem; }
.btn-primary { background: var(--accent-primary); color: white; box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 15px rgba(99, 102, 241, 0.4); color: white; }
.btn-secondary { background: var(--bg-surface); border: 1px solid var(--border-light); color: var(--text-secondary); }
.btn-outline-primary { border: 1px solid var(--accent-primary); color: var(--accent-primary); background: transparent; }
.btn-outline-primary:hover { background: var(--accent-primary); color: white; }
.btn-sm { padding: 0.25rem 0.5rem; font-size: 0.8rem; }

.form-control { background: rgba(255,255,255,0.05); border: 1px solid var(--border-subtle); color: white; padding: 0.75rem 1rem; border-radius: 12px; width: 100%; transition: all 0.2s; }
.form-control:focus { border-color: var(--accent-primary); outline: none; background: rgba(255,255,255,0.08); }
.form-select { background: rgba(255,255,255,0.05); border: 1px solid var(--border-subtle); color: white; padding: 0.75rem 1rem; border-radius: 12px; width: 100%; }

/* 4. Login Page Recovery */
/* Force input background to be dark/glassy even if base overrides it */
.orkya-input-auth {
    background-color: rgba(30, 41, 59, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: white !important;
    backdrop-filter: blur(10px);
}
.orkya-input-auth:focus {
    background-color: rgba(30, 41, 59, 0.8) !important;
    border-color: var(--accent-primary) !important;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2) !important;
}

/* Ensure glass panel works and has padding */
.glass-panel {
    background: rgba(30, 41, 59, 0.7) !important;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Ensure Vivid Button is visible and premium */
.orkya-btn-magic-vivid {
    background: linear-gradient(135deg, #8b5cf6 0%, #d946ef 50%, #06b6d4 100%) !important;
    color: white !important;
    border: none;
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.3);
    font-weight: 700;
}
.orkya-btn-magic-vivid:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(139, 92, 246, 0.5);
}

/* Shadow Util */
.shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5); }
.text-gradient {
    background: linear-gradient(135deg, #ffffff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}
/* --- QUANTUM ACTION CARDS --- */
.action-grid-quantum {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.action-card-quantum {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem;
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1.25rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none !important;
    position: relative;
    overflow: hidden;
}

.action-card-quantum::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.4s;
}

.action-card-quantum:hover {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(99, 102, 241, 0.05);
}

.action-card-quantum:hover::before {
    opacity: 1;
}

.action-card-quantum .icon-orbit {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.action-card-quantum:hover .icon-orbit {
    transform: scale(1.1) rotate(5deg);
}

.action-card-quantum .card-content {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.action-card-quantum .card-content h4 {
    margin-bottom: 0.25rem;
    transition: color 0.3s;
}

.action-card-quantum .card-action-hint {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.2);
    transition: all 0.3s;
    position: relative;
    z-index: 1;
}

.action-card-quantum:hover .card-action-hint {
    color: var(--accent-primary);
    transform: translateX(4px);
}

/* ========================================
   MODALE DE COMPLÉTUDE DE PROFIL
   ======================================== */

/* Overlay de la modale */
.orkya-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.2s ease-out;
}

/* Contenu de la modale */
.orkya-modal-content {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(51, 65, 85, 0.95) 100%);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease-out;
    max-height: 90vh;
    overflow-y: auto;
}

/* Bouton de fermeture */
.orkya-close-btn:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    transform: scale(1.1);
}

/* Bouton primaire */
.orkya-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.4);
}

/* Bouton secondaire */
.orkya-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* === GLOBAL SCROLLBAR (CLAUDE.md Compliant - Dark/Violet) === */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: rgba(15, 23, 42, 0.3); }
::-webkit-scrollbar-thumb { background: rgba(139, 92, 246, 0.5); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(139, 92, 246, 0.7); }
* { scrollbar-width: thin; scrollbar-color: rgba(139, 92, 246, 0.5) rgba(15, 23, 42, 0.3); }

/* Scrollbar stylisée pour la modale */
.orkya-modal-content::-webkit-scrollbar {
    width: 8px;
}

.orkya-modal-content::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.3);
}

.orkya-modal-content::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.5);
    border-radius: 4px;
}

.orkya-modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 92, 246, 0.7);
}

/* Firefox scrollbar */
.orkya-modal-content {
    scrollbar-width: thin;
    scrollbar-color: rgba(139, 92, 246, 0.5) rgba(15, 23, 42, 0.3);
}

/* ============================================
   PROFILE PAGE - Custom Classes (2026)
   ============================================ */

/* Orkya Textarea */
.orkya-textarea {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: white;
    font-size: 0.875rem;
    border-radius: 1rem;
    padding: 1rem;
    resize: vertical;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.orkya-textarea:hover {
    background: rgba(15, 23, 42, 0.7);
    border-color: rgba(255, 255, 255, 0.08);
}

.orkya-textarea:focus {
    outline: none;
    ring: 2px;
    ring-color: rgba(99, 102, 241, 0.5);
    border-color: rgba(99, 102, 241, 0.5);
    background: rgba(15, 23, 42, 0.8);
}

.orkya-textarea::placeholder {
    color: rgba(148, 163, 184, 0.6);
}

/* Button Danger */
.btn-danger {
    padding: 0.75rem 1.5rem;
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: rgb(252, 165, 165);
    border-radius: 1rem;
    font-weight: 700;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    display: inline-block;
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: rgba(239, 68, 68, 0.5);
    color: rgb(254, 202, 202);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-danger:active {
    transform: translateY(0);
}

/* Glass Panel Inner (for nested cards) */
.glass-panel-inner {
    background: rgba(30, 41, 59, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 0.75rem;
    transition: all 0.3s ease;
}

.glass-panel-inner:hover {
    background: rgba(30, 41, 59, 0.4);
    border-color: rgba(255, 255, 255, 0.05);
}

/* Skill Card (custom) */
.skill-card {
    cursor: pointer;
    position: relative;
    display: block;
}

.skill-card input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.skill-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 0.75rem;
    transition: all 0.3s ease;
}

.skill-card:hover .skill-card-content {
    background: rgba(30, 41, 59, 0.7);
    border-color: rgba(255, 255, 255, 0.08);
}

.skill-card input:checked ~ .skill-card-content {
    background: rgba(99, 102, 241, 0.3);
    border-color: rgb(129, 140, 248);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

/* Animate Fade In Up */
@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fade-in-up 0.3s ease-out;
}

/* Alert Messages */
.alert-success {
    padding: 1rem 1.5rem;
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 1rem;
    color: rgb(167, 243, 208);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-error {
    padding: 1rem 1.5rem;
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 1rem;
    color: rgb(252, 165, 165);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-warning {
    padding: 1rem 1.5rem;
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 1rem;
    color: rgb(253, 230, 138);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-info {
    padding: 1rem 1.5rem;
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 1rem;
    color: rgb(191, 219, 254);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}



/* ========================================
   WIZARD & GENERATOR SYSTEM
   ======================================== */

.wizard-container { max-width: 1200px; margin: 0 auto; }
.wizard-step { background: var(--bg-glass); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: 2.5rem; margin-bottom: 2rem; position: relative; overflow: hidden; }
.wizard-step::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary)); }
.wizard-step-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border-subtle); }
.wizard-step-number { width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary)); color: white; font-size: 1.5rem; font-weight: 900; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.wizard-step-title { font-size: 1.5rem; font-weight: 800; color: white; margin: 0; }
.wizard-step-subtitle { font-size: 0.9rem; color: var(--text-secondary); margin-top: 0.25rem; }
.phases-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.phase-card { position: relative; background: var(--bg-card); border: 2px solid var(--border-subtle); border-radius: var(--radius-md); padding: 1.5rem; cursor: pointer; transition: all var(--transition-fast); }
.phase-card:hover { border-color: var(--accent-primary); transform: translateY(-2px); box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3); }
.phase-card input[type="checkbox"] { position: absolute; top: 1rem; right: 1rem; width: 24px; height: 24px; accent-color: var(--accent-primary); cursor: pointer; }
.phase-card:has(input:checked) { border-color: var(--accent-primary); background: rgba(99, 102, 241, 0.1); }
.phase-card-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.phase-icon { width: 40px; height: 40px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; font-size: 1.25rem; }
.phase-icon.montage { background: rgba(245, 158, 11, 0.15); color: var(--accent-primary); }
.phase-icon.event { background: rgba(139, 92, 246, 0.15); color: var(--accent-secondary); }
.phase-icon.demontage { background: rgba(99, 102, 241, 0.15); color: var(--accent-info); }
.phase-title { font-size: 1.1rem; font-weight: 700; color: white; margin: 0; }
.phase-time { font-size: 0.85rem; color: var(--text-secondary); margin-top: 0.5rem; display: flex; align-items: center; gap: 0.5rem; }
.phase-meta { display: flex; gap: 1rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border-subtle); }
.phase-meta-item { display: flex; flex-direction: column; gap: 0.25rem; }
.phase-meta-label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; color: var(--text-muted); }
.phase-meta-value { font-size: 1.25rem; font-weight: 800; color: white; }
.poles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.pole-item { display: flex; align-items: center; gap: 1rem; padding: 1.25rem; background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); transition: all var(--transition-fast); }
.pole-item:hover { border-color: var(--accent-primary); background: rgba(99, 102, 241, 0.05); }
.pole-item:has(input:checked) { border-color: var(--accent-primary); background: rgba(99, 102, 241, 0.1); }
.pole-item input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--accent-primary); cursor: pointer; }
.pole-info { flex: 1; }
.pole-name { font-weight: 700; font-size: 0.95rem; color: white; margin-bottom: 0.25rem; }
.pole-count { font-size: 0.75rem; color: var(--text-secondary); }
.pole-nb input { width: 60px; height: 36px; text-align: center; background: rgba(15, 23, 42, 0.5); border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); color: white; font-weight: 700; }
.preview-section { background: rgba(16, 185, 129, 0.05); border: 1px solid rgba(16, 185, 129, 0.2); border-radius: var(--radius-lg); padding: 2rem; margin-top: 2rem; }
.preview-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.preview-icon { width: 48px; height: 48px; border-radius: var(--radius-md); background: rgba(16, 185, 129, 0.15); color: var(--accent-success); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }
.preview-title { font-size: 1.25rem; font-weight: 800; color: white; }
.preview-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; }
.preview-stat { background: rgba(15, 23, 42, 0.5); border: 1px solid rgba(255, 255, 255, 0.05); border-radius: var(--radius-md); padding: 1.5rem; text-align: center; }
.preview-stat-value { font-size: 2.5rem; font-weight: 900; color: var(--accent-success); line-height: 1; margin-bottom: 0.5rem; }
.preview-stat-label { font-size: 0.85rem; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em; }
.info-box { background: rgba(59, 130, 246, 0.1); border: 1px solid rgba(59, 130, 246, 0.2); border-radius: var(--radius-md); padding: 1.5rem; margin-bottom: 2rem; display: flex; gap: 1rem; }
.info-box-icon { width: 40px; height: 40px; border-radius: var(--radius-sm); background: rgba(59, 130, 246, 0.2); color: var(--accent-info); display: flex; align-items: center; justify-content: center; font-size: 1.25rem; flex-shrink: 0; }
.info-box-content { flex: 1; }
.info-box-title { font-weight: 700; color: white; margin-bottom: 0.5rem; }
.info-box-text { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.6; }
.warning-box { background: rgba(245, 158, 11, 0.1); border-color: rgba(245, 158, 11, 0.3); }
.warning-box .info-box-icon { background: rgba(245, 158, 11, 0.2); color: var(--accent-primary); }
.wizard-actions { display: flex; gap: 1rem; justify-content: flex-end; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border-subtle); }
.btn-wizard-primary { padding: 1rem 2.5rem; font-size: 1.1rem; font-weight: 700; background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary)); color: white; border: none; border-radius: var(--radius-md); cursor: pointer; transition: all var(--transition-fast); display: flex; align-items: center; gap: 0.75rem; }
.btn-wizard-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(245, 158, 11, 0.4); }
.btn-wizard-secondary { padding: 1rem 2rem; font-size: 1rem; font-weight: 600; background: transparent; color: var(--text-secondary); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); cursor: pointer; transition: all var(--transition-fast); text-decoration: none; display: inline-flex; align-items: center; }
.btn-wizard-secondary:hover { border-color: var(--accent-primary); color: white; }

