/* ==========================================================================
   GOUVERNEMENT DE LOS SANTOS — ÉTAT DE SAN ANDREAS
   Système Intranet Officiel & Sécurisé (FiveM RP)
   Aesthétique : Executive Presidential Dark / State Federal Seal
   Palette : Or Impérial (#D4AF37), Bleu Fédéral (#1E3A8A), Noir Obsidienne (#07090E),
             Rouge Patriote (#DC2626), Vert Laurier (#16A34A)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,300;0,400;0,700;0,900;1,300;1,400;1,700&family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

/* ============================================
   Variables & Tokens de Design
   ============================================ */
:root {
    /* Typographies Officielles */
    --font-serif: 'Merriweather', Georgia, serif;
    --font-sans: 'Merriweather', -apple-system, BlinkMacSystemFont, 'Segoe UI', serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;

    /* Palette Sceau Officiel - Or Impérial / Brass */
    --gold-100: #FFF9DB;
    --gold-200: #FFF3B8;
    --gold-300: #FFE27D;
    --gold-400: #FACC15;
    --gold-500: #D4AF37;
    --gold-600: #B79126;
    --gold-700: #8E6F18;
    --gold-800: #68500F;
    --gold-glow: rgba(212, 175, 55, 0.28);
    --gold-border: rgba(212, 175, 55, 0.24);
    --gold-border-bright: rgba(212, 175, 55, 0.55);
    --gold-metallic: linear-gradient(135deg, #FFE89E 0%, #D4AF37 48%, #996515 100%);
    --gold-metallic-hover: linear-gradient(135deg, #FFF1C2 0%, #E2C052 48%, #B47D1C 100%);

    /* Palette Sceau Officiel - Bleu Fédéral / Écusson */
    --gov-blue-50: #eff6ff;
    --gov-blue-100: #dbeafe;
    --gov-blue-300: #93c5fd;
    --gov-blue-400: #60a5fa;
    --gov-blue-500: #2563eb;
    --gov-blue-600: #1d4ed8;
    --gov-blue-700: #1e3a8a;
    --gov-blue-800: #172554;
    --gov-blue-900: #0f172a;
    --gov-blue-glow: rgba(37, 99, 235, 0.25);

    /* Palette Sceau Officiel - Rouge Patriote / Rayures */
    --gov-red-400: #f87171;
    --gov-red-500: #ef4444;
    --gov-red-600: #dc2626;
    --gov-red-700: #991b1b;
    --gov-red-glow: rgba(220, 38, 38, 0.25);

    /* Palette Sceau Officiel - Vert Laurier / Olivier */
    --gov-green-400: #4ade80;
    --gov-green-500: #22c55e;
    --gov-green-600: #16a34a;
    --gov-green-700: #15803d;
    --gov-green-glow: rgba(22, 163, 74, 0.25);

    /* Surfaces & Arrière-plans Noirs Obsidienne */
    --bg-body: #06080D;
    --bg-sidebar: rgba(9, 13, 22, 0.97);
    --bg-card: rgba(13, 18, 30, 0.78);
    --bg-card-hover: rgba(18, 26, 44, 0.88);
    --bg-header: rgba(8, 12, 20, 0.88);
    --bg-input: rgba(6, 10, 17, 0.85);
    --bg-subtle: rgba(212, 175, 55, 0.04);
    --bg-overlay: rgba(3, 5, 8, 0.85);

    /* Bordures & Séparateurs */
    --border-color: rgba(212, 175, 55, 0.14);
    --border-color-hover: rgba(212, 175, 55, 0.38);
    --border-subtle: rgba(255, 255, 255, 0.06);

    /* Textes */
    --text-primary: #F8FAFC;
    --text-secondary: #CBD5E1;
    --text-muted: #64748B;
    --text-gold: #F3CA65;

    /* Status Legacy Aliases */
    --primary-400: var(--gov-blue-400);
    --primary-500: var(--gov-blue-500);
    --primary-600: var(--gov-blue-600);
    --primary-700: var(--gov-blue-700);
    --accent-400: var(--gold-400);
    --accent-500: var(--gold-500);
    --accent-600: var(--gold-600);
    --success: var(--gov-green-500);
    --success-light: rgba(22, 163, 74, 0.15);
    --warning: var(--gold-400);
    --warning-light: rgba(212, 175, 55, 0.15);
    --danger: var(--gov-red-500);
    --danger-light: rgba(220, 38, 38, 0.15);
    --info: var(--gov-blue-400);

    /* Dimensions & Rayons */
    --sidebar-width: 284px;
    --header-height: 72px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;

    /* Ombres */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--border-color);
    --shadow-lg: 0 12px 36px rgba(0, 0, 0, 0.65), 0 0 0 1px var(--border-color);
    --shadow-gold: 0 0 30px rgba(212, 175, 55, 0.22);
    --shadow-blue: 0 0 30px rgba(37, 99, 235, 0.22);

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 240ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   Reset & Base Globale
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 15px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-serif);
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Texture & Atmosphère Gouvernementale Arrière-Plan */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 18% 18%, rgba(212, 175, 55, 0.05) 0%, transparent 45%),
        radial-gradient(circle at 82% 82%, rgba(30, 58, 138, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 50% 0%, rgba(220, 38, 38, 0.03) 0%, transparent 40%),
        linear-gradient(180deg, rgba(6, 8, 13, 0.7) 0%, rgba(6, 8, 13, 0.95) 100%);
    background-attachment: fixed;
    z-index: -2;
    pointer-events: none;
}

a {
    color: var(--gold-400);
    text-decoration: none;
    transition: all var(--transition-fast);
}

a:hover {
    color: var(--gold-200);
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
}

img {
    max-width: 100%;
    display: block;
}

/* ============================================
   Scrollbar Haut de Gamme
   ============================================ */
::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}
::-webkit-scrollbar-track {
    background: #080B12;
}
::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.28);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 175, 55, 0.55);
}

/* ============================================
   Layout Principal
   ============================================ */
.app-layout {
    display: flex;
    min-height: 100vh;
    position: relative;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-width: 0;
    transition: margin-left var(--transition-base);
}

.page-content {
    flex: 1;
    padding: 32px 36px 48px;
    max-width: 1560px;
    width: 100%;
    margin: 0 auto;
}

/* ============================================
   Sidebar Gouvernementale
   ============================================ */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-sidebar);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: width var(--transition-base), transform var(--transition-base);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.6);
}

/* Marque / Sceau de la Sidebar */
.sidebar-brand {
    padding: 22px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(180deg, rgba(212, 175, 55, 0.07) 0%, transparent 100%);
    position: relative;
}

.sidebar-brand::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 20px;
    right: 20px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.5), transparent);
}

.sidebar-brand .seal-wrapper {
    position: relative;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.sidebar-brand .brand-logo-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid var(--gold-400);
    box-shadow: 0 0 16px rgba(212, 175, 55, 0.4), inset 0 0 8px rgba(0, 0, 0, 0.5);
    background: #000;
}

.sidebar-brand .brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-brand .brand-name {
    font-family: var(--font-serif);
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.04em;
    background: var(--gold-metallic);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
}

.sidebar-brand .brand-sub {
    font-size: 10px;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    display: flex;
    align-items: center;
    gap: 4px;
}

.sidebar-brand .brand-sub::before {
    content: '★';
    color: var(--gold-400);
    font-size: 8px;
}

/* Navigation de la Sidebar */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 20px 14px;
}

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

.nav-section-title {
    font-family: var(--font-serif);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--gold-500);
    padding: 0 12px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.25), transparent);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 13.5px;
    font-weight: 500;
    transition: all var(--transition-fast);
    cursor: pointer;
    position: relative;
    margin-bottom: 4px;
    border: 1px solid transparent;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: var(--gold-metallic);
    border-radius: 0 3px 3px 0;
    transition: height var(--transition-fast);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.8);
}

.nav-item:hover {
    background: rgba(212, 175, 55, 0.08);
    border-color: rgba(212, 175, 55, 0.18);
    color: #fff;
    transform: translateX(2px);
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.16) 0%, rgba(30, 58, 138, 0.15) 100%);
    border-color: rgba(212, 175, 55, 0.35);
    color: #FFF;
    font-weight: 600;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.nav-item.active::before {
    height: 22px;
}

.nav-item .nav-icon {
    font-size: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.nav-item .nav-badge {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    box-shadow: 0 0 10px rgba(22, 163, 74, 0.4);
}

/* Utilisateur en bas de Sidebar */
.sidebar-user {
    padding: 16px 18px;
    border-top: 1px solid var(--border-color);
    background: linear-gradient(180deg, transparent 0%, rgba(13, 18, 30, 0.9) 100%);
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.sidebar-user .user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1E3A8A 0%, #0F172A 100%);
    border: 1.5px solid var(--gold-400);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-serif);
    font-size: 15px;
    font-weight: 800;
    color: var(--gold-300);
    flex-shrink: 0;
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.25);
}

.sidebar-user .user-info {
    flex: 1;
    min-width: 0;
}

.sidebar-user .user-name {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user .user-grade {
    font-size: 10.5px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
    border: 1px solid rgba(212, 175, 55, 0.3);
    margin-top: 2px;
}

.sidebar-user .logout-btn {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(220, 38, 38, 0.3);
    background: rgba(220, 38, 38, 0.08);
    color: #f87171;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all var(--transition-fast);
}

.sidebar-user .logout-btn:hover {
    background: var(--gov-red-600);
    color: #fff;
    border-color: var(--gov-red-500);
    box-shadow: 0 0 16px rgba(220, 38, 38, 0.5);
    transform: scale(1.05);
}

/* ============================================
   Top Bar Officielle
   ============================================ */
.top-bar {
    height: var(--header-height);
    background: var(--bg-header);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 36px;
    position: sticky;
    top: 0;
    z-index: 90;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.top-bar .page-title-section {
    display: flex;
    align-items: center;
    gap: 16px;
}

.top-bar .page-title {
    font-family: var(--font-serif);
    font-size: 21px;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 12px;
}

.top-bar .page-subtitle {
    font-size: 12.5px;
    color: var(--text-muted);
    font-weight: 500;
}

.top-bar-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.top-bar-telemetry {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-secondary);
    background: rgba(6, 10, 18, 0.7);
    border: 1px solid var(--border-color);
    padding: 7px 14px;
    border-radius: var(--radius-md);
}

.top-bar-telemetry .badge-matricule {
    color: var(--gold-400);
    font-weight: 700;
}

.top-bar-telemetry .clock-time {
    color: #fff;
    font-weight: 600;
}

/* ============================================
   Bannière Gouverneur / Bienvenue Executive
   ============================================ */
.executive-banner {
    position: relative;
    background: linear-gradient(135deg, rgba(16, 24, 40, 0.95) 0%, rgba(10, 14, 26, 0.95) 100%);
    border: 1px solid var(--gold-border-bright);
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    margin-bottom: 28px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(212, 175, 55, 0.3);
}

.executive-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gold-metallic);
}

.executive-banner .banner-watermark {
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 220px;
    height: 220px;
    opacity: 0.12;
    pointer-events: none;
    filter: drop-shadow(0 0 20px rgba(212, 175, 55, 0.5));
}

.executive-banner-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.banner-left-info .banner-state-tag {
    font-family: var(--font-serif);
    font-size: 11px;
    font-weight: 800;
    color: var(--gold-400);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.banner-left-info h2 {
    font-family: var(--font-serif);
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.01em;
    margin-bottom: 4px;
}

.banner-left-info p {
    color: var(--text-secondary);
    font-size: 13.5px;
}

.banner-chips {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.gov-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-family: var(--font-mono);
    background: rgba(8, 12, 20, 0.8);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.gov-chip.gold {
    border-color: rgba(212, 175, 55, 0.4);
    color: var(--gold-300);
    background: rgba(212, 175, 55, 0.08);
}

.gov-chip.green {
    border-color: rgba(22, 163, 74, 0.4);
    color: #86efac;
    background: rgba(22, 163, 74, 0.08);
}

/* ============================================
   Cartes & Conteneurs
   ============================================ */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-top: 1.5px solid rgba(212, 175, 55, 0.28);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-md);
    position: relative;
}

.card:hover {
    border-color: var(--border-color-hover);
    border-top-color: var(--gold-400);
    box-shadow: var(--shadow-lg), 0 0 20px rgba(212, 175, 55, 0.08);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.card-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 60px;
    height: 1px;
    background: var(--gold-metallic);
}

.card-header h2,
.card-header h3 {
    font-family: var(--font-serif);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-header .card-badge {
    font-size: 11px;
    color: var(--gold-300);
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.25);
    padding: 3px 10px;
    border-radius: 20px;
    font-family: var(--font-mono);
}

/* ============================================
   Cartes Statistiques (Stat Cards)
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 22px 24px;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-md);
}

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

.stat-card.blue::before { background: linear-gradient(90deg, #2563EB, #60A5FA); }
.stat-card.gold::before { background: var(--gold-metallic); }
.stat-card.green::before { background: linear-gradient(90deg, #16A34A, #4ADE80); }
.stat-card.red::before { background: linear-gradient(90deg, #DC2626, #F87171); }

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

.stat-card .stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 14px;
    border: 1px solid transparent;
}

.stat-card.blue .stat-icon { 
    background: rgba(37, 99, 235, 0.15); 
    border-color: rgba(37, 99, 235, 0.3);
    color: var(--gov-blue-400); 
}
.stat-card.gold .stat-icon { 
    background: rgba(212, 175, 55, 0.15); 
    border-color: rgba(212, 175, 55, 0.3);
    color: var(--gold-400); 
}
.stat-card.green .stat-icon { 
    background: rgba(22, 163, 74, 0.15); 
    border-color: rgba(22, 163, 74, 0.3);
    color: var(--gov-green-400); 
}
.stat-card.red .stat-icon { 
    background: rgba(220, 38, 38, 0.15); 
    border-color: rgba(220, 38, 38, 0.3);
    color: var(--gov-red-400); 
}

.stat-card .stat-value {
    font-size: 32px;
    font-weight: 800;
    font-family: var(--font-mono);
    color: #fff;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}

.stat-card .stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ============================================
   Boutons d'État & Officiels
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-family: var(--font-sans);
    font-size: 13.5px;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    text-decoration: none;
    line-height: 1.4;
    position: relative;
    overflow: hidden;
}

.btn:active {
    transform: scale(0.97);
}

/* Bouton Or Officiel */
.btn-gold {
    background: var(--gold-metallic);
    color: #06090E !important;
    font-weight: 700;
    border-color: var(--gold-300);
    box-shadow: 0 4px 14px rgba(212, 175, 55, 0.35);
    letter-spacing: 0.02em;
}

.btn-gold:hover {
    background: var(--gold-metallic-hover);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.55);
    color: #000 !important;
    transform: translateY(-1px);
}

/* Bouton Bleu Fédéral */
.btn-primary {
    background: linear-gradient(135deg, #1D4ED8 0%, #1E3A8A 100%);
    color: #fff !important;
    border: 1px solid rgba(96, 165, 250, 0.4);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
    transform: translateY(-1px);
}

/* Bouton Vert Prise de Service */
.btn-success {
    background: linear-gradient(135deg, #16A34A 0%, #14532D 100%);
    color: #fff !important;
    border: 1px solid rgba(74, 222, 128, 0.4);
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.35);
}

.btn-success:hover {
    background: linear-gradient(135deg, #22C55E 0%, #16A34A 100%);
    box-shadow: 0 6px 20px rgba(22, 163, 74, 0.5);
    transform: translateY(-1px);
}

/* Bouton Rouge Fin de Service / Alerte */
.btn-danger {
    background: linear-gradient(135deg, #DC2626 0%, #7F1D1D 100%);
    color: #fff !important;
    border: 1px solid rgba(248, 113, 113, 0.4);
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.5);
    transform: translateY(-1px);
}

/* Boutons secondaires */
.btn-outline {
    background: rgba(13, 18, 30, 0.6);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.btn-outline:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: var(--gold-400);
    color: #fff;
}

.btn-ghost {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 8px 12px;
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 12.5px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 15px;
}

/* ============================================
   Formulaires Gouvernementaux
   ============================================ */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--gold-300);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-family: var(--font-serif);
}

.form-control {
    width: 100%;
    padding: 11px 16px;
    font-family: var(--font-sans);
    font-size: 14px;
    color: #fff;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    outline: none;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

.form-control:focus {
    border-color: var(--gold-400);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2), inset 0 2px 4px rgba(0, 0, 0, 0.5);
    background: rgba(10, 15, 24, 0.95);
}

.form-control::placeholder {
    color: #475569;
}

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

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23D4AF37' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

select.form-control option {
    background: #0B0F19;
    color: #fff;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.form-help {
    font-size: 11.5px;
    color: var(--text-muted);
    margin-top: 5px;
}

/* ============================================
   Tableaux de Données (Data Tables)
   ============================================ */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    background: rgba(10, 14, 24, 0.5);
    box-shadow: var(--shadow-sm);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

.data-table thead {
    background: linear-gradient(180deg, rgba(20, 28, 46, 0.8) 0%, rgba(13, 18, 30, 0.8) 100%);
}

.data-table th {
    padding: 14px 18px;
    text-align: left;
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gold-400);
    border-bottom: 1px solid var(--gold-border);
    white-space: nowrap;
}

.data-table td {
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    vertical-align: middle;
}

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

.data-table tbody tr:hover {
    background: rgba(212, 175, 55, 0.04);
}

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

/* ============================================
   Badges & Statuts Gouvernementaux
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border: 1px solid transparent;
}

.badge-draft {
    background: rgba(100, 116, 139, 0.15);
    border-color: rgba(100, 116, 139, 0.4);
    color: #94a3b8;
}

.badge-pending {
    background: rgba(212, 175, 55, 0.15);
    border-color: rgba(212, 175, 55, 0.5);
    color: var(--gold-300);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
}

.badge-success {
    background: rgba(22, 163, 74, 0.15);
    border-color: rgba(22, 163, 74, 0.5);
    color: #86efac;
    box-shadow: 0 0 10px rgba(22, 163, 74, 0.2);
}

.badge-danger {
    background: rgba(220, 38, 38, 0.15);
    border-color: rgba(220, 38, 38, 0.5);
    color: #fca5a5;
    box-shadow: 0 0 10px rgba(220, 38, 38, 0.2);
}

.badge-info {
    background: rgba(37, 99, 235, 0.15);
    border-color: rgba(37, 99, 235, 0.5);
    color: #93c5fd;
}

.badge-grade {
    font-family: var(--font-serif);
    font-size: 11px;
    letter-spacing: 0.04em;
    font-weight: 700;
}

/* Pastilles Quota Hebdomadaire (14h/semaine) */
.quota-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    font-family: var(--font-mono);
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.quota-pill .quota-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.quota-green {
    background: rgba(22, 163, 74, 0.15);
    border: 1px solid rgba(22, 163, 74, 0.5);
    color: #4ade80;
    box-shadow: 0 0 10px rgba(22, 163, 74, 0.2);
}
.quota-green .quota-dot {
    background: #22c55e;
    box-shadow: 0 0 8px #22c55e;
    animation: pulseGlow 2s infinite;
}

.quota-orange {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.5);
    color: #fbbf24;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
}
.quota-orange .quota-dot {
    background: #f59e0b;
    box-shadow: 0 0 8px #f59e0b;
}

.quota-red {
    background: rgba(220, 38, 38, 0.15);
    border: 1px solid rgba(220, 38, 38, 0.5);
    color: #fca5a5;
    box-shadow: 0 0 10px rgba(220, 38, 38, 0.2);
}
.quota-red .quota-dot {
    background: #ef4444;
    box-shadow: 0 0 8px #ef4444;
}

/* ============================================
   Chronographe de Service (HUD Militaire / État)
   ============================================ */
.service-timer {
    background: linear-gradient(135deg, rgba(10, 15, 26, 0.95) 0%, rgba(13, 22, 38, 0.95) 100%);
    border: 1px solid rgba(22, 163, 74, 0.4);
    border-radius: var(--radius-lg);
    padding: 28px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(22, 163, 74, 0.15);
}

.service-timer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #22C55E, transparent);
}

.service-timer .timer-display {
    font-size: 46px;
    font-weight: 800;
    font-family: var(--font-mono);
    color: #4ade80;
    letter-spacing: 0.08em;
    text-shadow: 0 0 25px rgba(74, 222, 128, 0.45);
    margin: 12px 0 16px;
}

.service-timer .timer-label {
    font-family: var(--font-serif);
    font-size: 11px;
    color: var(--gold-400);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-weight: 700;
}

.service-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: var(--font-mono);
}

.service-status.en-service {
    background: rgba(22, 163, 74, 0.15);
    border: 1px solid rgba(22, 163, 74, 0.5);
    color: #4ade80;
}

.service-status.hors-service {
    background: rgba(100, 116, 139, 0.15);
    border: 1px solid rgba(100, 116, 139, 0.4);
    color: #94a3b8;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.en-service .status-dot {
    background: #22c55e;
    box-shadow: 0 0 10px #22c55e;
    animation: pulseGlow 2s infinite;
}

.hors-service .status-dot {
    background: #64748b;
}

@keyframes pulseGlow {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.3); }
}

/* ============================================
   Page de Connexion Officielle (Executive Portal)
   ============================================ */
.login-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    position: relative;
    overflow: hidden;
    background-color: #05070B;
}

.login-page::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.08) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 0;
}

.login-container {
    width: 100%;
    max-width: 460px;
    position: relative;
    z-index: 2;
}

.login-card {
    background: rgba(11, 16, 28, 0.92);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: 1.5px solid var(--gold-border-bright);
    border-radius: var(--radius-xl);
    padding: 44px 38px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(212, 175, 55, 0.15);
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gold-metallic);
}

.login-seal-container {
    text-align: center;
    margin-bottom: 28px;
}

.login-seal-glow {
    width: 108px;
    height: 108px;
    margin: 0 auto 16px;
    position: relative;
}

.login-seal-glow img {
    width: 108px;
    height: 108px;
    border-radius: 50%;
    border: 2px solid var(--gold-400);
    box-shadow: 0 0 24px rgba(212, 175, 55, 0.5), inset 0 0 10px rgba(0, 0, 0, 0.8);
    background: #000;
}

.login-seal-container h1 {
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.06em;
    background: var(--gold-metallic);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.login-seal-container .state-subtitle {
    font-family: var(--font-serif);
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.login-security-tag {
    display: inline-block;
    background: rgba(220, 38, 38, 0.15);
    border: 1px solid rgba(220, 38, 38, 0.4);
    color: #fca5a5;
    font-family: var(--font-mono);
    font-size: 10px;
    padding: 3px 10px;
    border-radius: 4px;
    letter-spacing: 0.08em;
}

.login-notice {
    background: rgba(6, 10, 18, 0.7);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px;
    margin-top: 24px;
    text-align: center;
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ============================================
   Alertes & Notifications
   ============================================ */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13.5px;
    border: 1px solid transparent;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.alert-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.alert-success {
    background: rgba(22, 163, 74, 0.12);
    border-color: rgba(22, 163, 74, 0.4);
    color: #bbf7d0;
}

.alert-error {
    background: rgba(220, 38, 38, 0.12);
    border-color: rgba(220, 38, 38, 0.4);
    color: #fecaca;
}

.alert-warning {
    background: rgba(212, 175, 55, 0.12);
    border-color: rgba(212, 175, 55, 0.4);
    color: #fef08a;
}

.alert-info {
    background: rgba(37, 99, 235, 0.12);
    border-color: rgba(37, 99, 235, 0.4);
    color: #bfdbfe;
}

/* ============================================
   Onglets (Tabs)
   ============================================ */
.tabs {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
    overflow-x: auto;
}

.tab-btn {
    padding: 10px 18px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-family: var(--font-serif);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.tab-btn:hover {
    color: #fff;
}

.tab-btn.active {
    color: var(--gold-300);
    border-bottom-color: var(--gold-400);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* ============================================
   Stats Hebdomadaires (stats-services.php)
   ============================================ */
.weekly-stats {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    margin-bottom: 24px;
}

.day-stat {
    text-align: center;
    padding: 14px 10px;
    border-radius: var(--radius-md);
    background: rgba(13, 18, 30, 0.7);
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
}

.day-stat:hover {
    border-color: var(--gold-border-bright);
    background: rgba(212, 175, 55, 0.05);
}

.day-stat .day-name {
    font-family: var(--font-serif);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--gold-400);
    margin-bottom: 8px;
}

.day-stat .day-hours {
    font-size: 18px;
    font-weight: 800;
    font-family: var(--font-mono);
    color: #fff;
}

.day-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    margin-top: 8px;
    overflow: hidden;
}

.day-bar-fill {
    height: 100%;
    background: var(--gold-metallic);
    border-radius: 3px;
    transition: width 0.4s ease;
}

.font-mono {
    font-family: var(--font-mono) !important;
}

.dynamic-item-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}

.item-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.item-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.25);
    color: var(--text-primary);
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 12px;
}

.item-qty {
    color: var(--gold-400);
    font-weight: 700;
    font-family: var(--font-mono);
}

.flex { display: flex; }
.justify-between { justify-content: space-between; }
.items-center { align-items: center; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 16px; }

/* ============================================
   Pagination
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 24px;
}

.page-btn {
    padding: 8px 14px;
    border-radius: var(--radius-md);
    background: rgba(13, 18, 30, 0.8);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    transition: all var(--transition-fast);
}

.page-btn:hover {
    border-color: var(--gold-400);
    color: #fff;
    background: rgba(212, 175, 55, 0.1);
}

.page-btn.active {
    background: var(--gold-metallic);
    color: #000;
    border-color: var(--gold-300);
    font-weight: 700;
}

/* ============================================
   Empty States
   ============================================ */
.empty-state {
    text-align: center;
    padding: 50px 20px;
}

.empty-state .empty-icon {
    font-size: 44px;
    margin-bottom: 14px;
    opacity: 0.5;
    filter: grayscale(40%);
}

.empty-state h3 {
    font-family: var(--font-serif);
    font-size: 17px;
    color: #fff;
    margin-bottom: 6px;
}

.empty-state p {
    font-size: 13.5px;
    color: var(--text-muted);
    max-width: 380px;
    margin: 0 auto 18px;
}

/* ============================================
   Utilitaires d'Espacement
   ============================================ */
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-gold { color: var(--gold-text); }

/* ============================================
   Responsive (Mobiles & Tablettes)
   ============================================ */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
    .weekly-stats {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 640px) {
    .top-bar {
        padding: 0 16px;
    }
    .page-content {
        padding: 20px 16px;
    }
    .weekly-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .login-card {
        padding: 30px 20px;
    }
}
