/* ==========================================================================
   TERMINAL RAISEGI • SHINOBI POLICE & ARCHIVE DESIGN SYSTEM
   Elite Dark Theme (Obsidian Zinc #0a0d14 • Cards #111726 • Elevated #172033)
   Naruto Shinobi Lore • Linear/Vercel/Supabase Grade Interface Architecture
   ========================================================================== */

/* ==========================================================================
   1. DESIGN SYSTEM ROOT & TOKENS
   ========================================================================== */

:root {
    /* Obsidian Zinc Surface Color Hierarchy */
    --bg-main: #0a0d14;
    --bg-surface: #0e131f;
    --bg-card: #111726;
    --bg-card-hover: #151f33;
    --bg-card-elevated: #172033;
    --bg-card-nested: #0b101b;

    /* Glassmorphism & High-Precision Borders */
    --border-color: #1e293b;
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-highlight: #334155;
    --border-hover: rgba(255, 255, 255, 0.18);
    --border-glow: rgba(255, 255, 255, 0.04);

    /* Typography Color Palette */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-subtle: #475569;

    /* Typography Font Stacks */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    --font-heading: 'Cinzel', serif;
    --font-mono: 'JetBrains Mono', "SFMono-Regular", Consolas, monospace;

    /* Default Village: Kumogakure (Cloud & Lightning) */
    --village-id: "kumogakure";
    --village-name: "Kumogakure";
    --accent-village: #00f0ff;          /* Electric Blue */
    --accent-village-hover: #38bdf8;
    --accent-village-dim: rgba(0, 240, 255, 0.12);
    --accent-gold: #f59e0b;             /* Thunder Gold */
    --accent-gold-hover: #fbbf24;
    --accent-glow: rgba(0, 240, 255, 0.25);
    --accent-glow-subtle: rgba(0, 240, 255, 0.08);
    --accent-glow-strong: rgba(0, 240, 255, 0.55);
    --village-kanji: "雷";
    --village-ambient-1: rgba(0, 240, 255, 0.07);
    --village-ambient-2: rgba(245, 158, 11, 0.05);

    /* Threat Rank Colors (Shinobi Bingo Scale) */
    --color-s: #ef4444;                 /* Crimson Red (Kage / Catastrophic) */
    --color-s-glow: rgba(239, 68, 68, 0.35);
    --color-a: #f43f5e;                 /* Rose Red (Jōnin Danger) */
    --color-a-glow: rgba(244, 63, 94, 0.3);
    --color-b: #f97316;                 /* Amber Orange (Chūnin Risk) */
    --color-b-glow: rgba(249, 115, 22, 0.3);
    --color-c: #eab308;                 /* Chakra Yellow (Genin Delict) */
    --color-c-glow: rgba(234, 179, 8, 0.25);
    --color-d: #10b981;                 /* Jade Green (Civil / Minor) */
    --color-d-glow: rgba(16, 185, 129, 0.25);

    /* Operational Status Signals */
    --status-urgent: #ef4444;
    --status-warning: #f59e0b;
    --status-success: #10b981;
    --status-info: #00f0ff;
    --status-muted: #64748b;

    /* Discord Identity */
    --discord-blurple: #5865f2;
    --discord-blurple-hover: #4752c4;
    --discord-bg: #313338;
    --discord-sidebar: #2b2d31;

    /* Radii & Elevation Tokens */
    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-pill: 9999px;

    /* Ambient Depth Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
    --shadow-main: 0 8px 24px -4px rgba(0, 0, 0, 0.55), 0 0 0 1px var(--border-glass);
    --shadow-hover: 0 14px 32px -4px rgba(0, 0, 0, 0.65), 0 0 0 1px var(--border-hover), 0 0 24px var(--accent-glow-subtle);
    --shadow-elevated: 0 20px 48px -8px rgba(0, 0, 0, 0.75), 0 0 0 1px var(--border-glass);
    --shadow-neon: 0 0 16px var(--accent-glow);
}

/* ==========================================================================
   2. SHINOBI VILLAGE THEME ENGINE (DYNAMIC CSS VARIABLES)
   ========================================================================== */

/* Kumogakure (Village Caché des Nuages) - Electric Blue & Thunder Gold */
body[data-village="kumogakure"] {
    --village-id: "kumogakure";
    --village-name: "Kumogakure";
    --accent-village: #00f0ff;
    --accent-village-hover: #38bdf8;
    --accent-village-dim: rgba(0, 240, 255, 0.12);
    --accent-gold: #f59e0b;
    --accent-gold-hover: #fbbf24;
    --accent-glow: rgba(0, 240, 255, 0.28);
    --accent-glow-subtle: rgba(0, 240, 255, 0.08);
    --accent-glow-strong: rgba(0, 240, 255, 0.55);
    --village-kanji: "雷";
    --village-ambient-1: rgba(0, 240, 255, 0.08);
    --village-ambient-2: rgba(245, 158, 11, 0.06);
}

/* Konohagakure (Village Caché de la Feuille) - Jade Emerald & Will of Fire Gold */
body[data-village="konohagakure"] {
    --village-id: "konohagakure";
    --village-name: "Konohagakure";
    --accent-village: #10b981;
    --accent-village-hover: #34d399;
    --accent-village-dim: rgba(16, 185, 129, 0.12);
    --accent-gold: #f97316;
    --accent-gold-hover: #fb923c;
    --accent-glow: rgba(16, 185, 129, 0.28);
    --accent-glow-subtle: rgba(16, 185, 129, 0.08);
    --accent-glow-strong: rgba(16, 185, 129, 0.55);
    --village-kanji: "木";
    --village-ambient-1: rgba(16, 185, 129, 0.08);
    --village-ambient-2: rgba(249, 115, 22, 0.05);
}

/* Kirigakure (Village Caché de la Brume) - Mist Cyan & Abyss Blue */
body[data-village="kirigakure"] {
    --village-id: "kirigakure";
    --village-name: "Kirigakure";
    --accent-village: #06b6d4;
    --accent-village-hover: #22d3ee;
    --accent-village-dim: rgba(6, 182, 212, 0.12);
    --accent-gold: #38bdf8;
    --accent-gold-hover: #7dd3fc;
    --accent-glow: rgba(6, 182, 212, 0.28);
    --accent-glow-subtle: rgba(6, 182, 212, 0.08);
    --accent-glow-strong: rgba(6, 182, 212, 0.55);
    --village-kanji: "霧";
    --village-ambient-1: rgba(6, 182, 212, 0.08);
    --village-ambient-2: rgba(56, 189, 248, 0.05);
}

/* Sunagakure (Village Caché du Sable) - Desert Gold & Red Dune Amber */
body[data-village="sunagakure"] {
    --village-id: "sunagakure";
    --village-name: "Sunagakure";
    --accent-village: #f59e0b;
    --accent-village-hover: #fbbf24;
    --accent-village-dim: rgba(245, 158, 11, 0.12);
    --accent-gold: #d97706;
    --accent-gold-hover: #b45309;
    --accent-glow: rgba(245, 158, 11, 0.28);
    --accent-glow-subtle: rgba(245, 158, 11, 0.08);
    --accent-glow-strong: rgba(245, 158, 11, 0.55);
    --village-kanji: "砂";
    --village-ambient-1: rgba(245, 158, 11, 0.08);
    --village-ambient-2: rgba(239, 68, 68, 0.05);
}

/* Iwagakure (Village Caché de la Roche) - Granite Slate & Earth Ore */
body[data-village="iwagakure"] {
    --village-id: "iwagakure";
    --village-name: "Iwagakure";
    --accent-village: #94a3b8;
    --accent-village-hover: #cbd5e1;
    --accent-village-dim: rgba(148, 163, 184, 0.12);
    --accent-gold: #d97706;
    --accent-gold-hover: #f59e0b;
    --accent-glow: rgba(148, 163, 184, 0.28);
    --accent-glow-subtle: rgba(148, 163, 184, 0.08);
    --accent-glow-strong: rgba(148, 163, 184, 0.55);
    --village-kanji: "岩";
    --village-ambient-1: rgba(148, 163, 184, 0.08);
    --village-ambient-2: rgba(217, 119, 6, 0.05);
}

/* Neutre / Shinobi Indépendant */
body[data-village="shinobi"] {
    --village-id: "shinobi";
    --village-name: "Shinobi";
    --accent-village: #a855f7;
    --accent-village-hover: #c084fc;
    --accent-village-dim: rgba(168, 85, 247, 0.12);
    --accent-gold: #f59e0b;
    --accent-glow: rgba(168, 85, 247, 0.28);
    --accent-glow-subtle: rgba(168, 85, 247, 0.08);
    --accent-glow-strong: rgba(168, 85, 247, 0.55);
    --village-kanji: "忍";
    --village-ambient-1: rgba(168, 85, 247, 0.08);
    --village-ambient-2: rgba(245, 158, 11, 0.05);
}

/* ==========================================================================
   3. BASE STYLES, SLEEK SCROLLBARS & AMBIENT RADIAL LIGHTING
   ========================================================================== */

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    transition: background-color 0.35s ease, color 0.25s ease;

    /* Ambient Radial Mesh Lighting + Developer-Grade SaaS Micro Grid */
    background-image:
        radial-gradient(circle at 14% 12%, var(--village-ambient-1), transparent 42%),
        radial-gradient(circle at 86% 88%, var(--village-ambient-2), transparent 45%),
        linear-gradient(rgba(255, 255, 255, 0.016) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.016) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 32px 32px, 32px 32px;
    background-attachment: fixed;
}

/* Custom Sleek Scrollbars (Pro Developer SaaS Standard) */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #0a0d14;
}

::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: var(--radius-pill);
    transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

* {
    scrollbar-width: thin;
    scrollbar-color: #334155 #0a0d14;
}

a {
    color: var(--accent-village);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: var(--accent-village-hover);
}

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

/* ==========================================================================
   4. APP HEADER & INSTANT VILLAGE SWITCHER PILLS
   ========================================================================== */

.app-header {
    background: rgba(10, 13, 20, 0.82);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 1px 0 0 rgba(255, 255, 255, 0.04);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0.75rem 1.5rem;
    transition: border-color 0.3s ease;
}

.header-inner {
    max-width: 1480px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.25rem;
}

/* Brand Section */
.brand-section {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-shrink: 0;
}

.brand-crest {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--bg-card-elevated), var(--bg-card));
    border: 1px solid var(--border-highlight);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    box-shadow: 0 0 16px var(--accent-glow-subtle), inset 0 1px 0 0 rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
}

.brand-crest:hover {
    transform: translateY(-1px) scale(1.04);
    box-shadow: 0 0 20px var(--accent-glow);
    border-color: var(--accent-village);
}

.brand-text h1 {
    font-family: var(--font-heading);
    font-size: 1.12rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--text-primary);
    line-height: 1.2;
}

.brand-meta {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.74rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.badge-village {
    background: var(--accent-village-dim);
    color: var(--accent-village);
    border: 1px solid var(--accent-village);
    padding: 1px 7px;
    border-radius: var(--radius-xs);
    font-size: 0.68rem;
    font-weight: 700;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    box-shadow: 0 0 8px var(--accent-glow-subtle);
    transition: all 0.3s ease;
}

/* Sélecteur Instantané de Village (Header Switcher Pills) */
.header-village-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(17, 23, 38, 0.75);
    border: 1px solid var(--border-color);
    padding: 3px 6px;
    border-radius: var(--radius-pill);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.switcher-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-muted);
    padding-left: 6px;
    user-select: none;
}

.village-pills {
    display: flex;
    align-items: center;
    gap: 3px;
}

.village-pill {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    padding: 4px 10px;
    font-size: 0.76rem;
    font-weight: 600;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    user-select: none;
    white-space: nowrap;
}

.village-pill:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

/* Active Neon Pill Indicator */
.village-pill.active {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    border-color: var(--accent-village);
    box-shadow: 0 0 14px var(--accent-glow), inset 0 0 8px var(--accent-glow-subtle);
    font-weight: 700;
}

/* ==========================================================================
   5. MAIN NAVIGATION & USER SIGNALS
   ========================================================================== */

.main-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: rgba(17, 23, 38, 0.85);
    padding: 3px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
}

.nav-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    padding: 0.45rem 0.85rem;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    gap: 0.45rem;
    user-select: none;
    white-space: nowrap;
}

.nav-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}

.nav-btn.active {
    color: #ffffff;
    background: var(--bg-card-elevated);
    border-color: var(--border-highlight);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.nav-btn.nav-btn-discord {
    color: #c9cdfb;
}

.nav-btn.nav-btn-discord.active {
    background: var(--discord-blurple);
    border-color: var(--discord-blurple);
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(88, 101, 242, 0.4);
}

/* Statut Connexion Header */
.header-user-status {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    background: rgba(255, 255, 255, 0.025);
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-color);
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
    user-select: none;
}

/* ==========================================================================
   6. CONTENEUR PRINCIPAL & HERO DASHBOARD BANNER
   ========================================================================== */

.app-main-content {
    max-width: 1480px;
    margin: 1.5rem auto;
    padding: 0 1.5rem 3.5rem 1.5rem;
}

.tab-pane {
    display: none;
    animation: fadeInView 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.tab-pane.active {
    display: block;
}

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

/* Hero Dashboard Banner */
.dashboard-banner {
    background: linear-gradient(135deg, rgba(23, 32, 51, 0.85) 0%, rgba(17, 23, 38, 0.95) 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-main);
    transition: border-color 0.3s ease;
}

.dashboard-banner::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
}

.dashboard-banner::after {
    content: var(--village-kanji, "雷");
    position: absolute;
    right: 2.5%;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--font-heading);
    font-size: 9rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.035);
    pointer-events: none;
    line-height: 1;
    user-select: none;
    transition: all 0.4s ease;
}

.banner-title {
    font-family: var(--font-heading);
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    margin-bottom: 0.45rem;
    color: var(--text-primary);
}

.banner-subtitle {
    color: var(--text-secondary);
    font-size: 0.92rem;
    max-width: 680px;
    line-height: 1.55;
}

.banner-actions {
    display: flex;
    gap: 0.85rem;
    z-index: 2;
    flex-shrink: 0;
}

/* ==========================================================================
   7. STATS METRICS GRID & GLOWING HUD CARDS
   ========================================================================== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2.25rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.35rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.22s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1),
                background-color 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.stat-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

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

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--bg-card-elevated);
    border: 1px solid var(--border-highlight);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    flex-shrink: 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.stat-info .stat-value {
    font-family: var(--font-mono);
    font-size: 1.85rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.stat-info .stat-label {
    font-size: 0.76rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    margin-top: 0.25rem;
}

/* ==========================================================================
   8. RECENT ACTIVITY FEED & INTERACTIVE CARDS
   ========================================================================== */

.recent-feed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.activity-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.22s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.activity-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
}

.activity-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-hover);
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--bg-card-elevated);
    border: 1px solid var(--border-highlight);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.activity-details {
    flex-grow: 1;
    min-width: 0;
}

.activity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.activity-code {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--accent-village);
}

.activity-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.activity-sub {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.activity-actions {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex-shrink: 0;
}

/* ==========================================================================
   9. SEARCH TOOLBAR & SAAS FILTER CONTROLS
   ========================================================================== */

.section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.section-title-wrap h2 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title-wrap p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.toolbar-filter-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.9rem 1.25rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.75rem;
    box-shadow: var(--shadow-sm);
}

.search-input-group {
    flex: 1;
    min-width: 270px;
    position: relative;
}

.search-input-group input {
    width: 100%;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    padding: 0.6rem 0.9rem 0.6rem 2.3rem;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.86rem;
    transition: all 0.2s ease;
}

.search-input-group input:focus {
    outline: none;
    border-color: var(--accent-village);
    box-shadow: 0 0 0 3px var(--accent-glow-subtle);
}

.search-icon-fixed {
    position: absolute;
    left: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.88rem;
    pointer-events: none;
}

.filter-select {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    padding: 0.6rem 0.9rem;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.84rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-select:focus {
    outline: none;
    border-color: var(--accent-village);
    box-shadow: 0 0 0 3px var(--accent-glow-subtle);
}

/* ==========================================================================
   10. DOSSIER CARDS (REPORTS & CRIMINALS) WITH HOVER DEPTH
   ========================================================================== */

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

.dossier-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.4rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--shadow-main);
    position: relative;
    overflow: hidden;
    transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.24s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.24s cubic-bezier(0.16, 1, 0.3, 1),
                background-color 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.dossier-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
}

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

.dossier-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.85rem;
}

.dossier-code {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--accent-village);
    background: var(--accent-village-dim);
    padding: 3px 8px;
    border-radius: var(--radius-xs);
    border: 1px solid rgba(255, 255, 255, 0.05);
    letter-spacing: 0.04em;
}

.dossier-card-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    margin-bottom: 0.75rem;
    line-height: 1.35;
    color: var(--text-primary);
}

.dossier-meta {
    font-size: 0.82rem;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 0.95rem;
    background: rgba(11, 16, 27, 0.6);
    padding: 0.75rem 0.9rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-glass);
}

.dossier-meta span {
    color: var(--text-muted);
}

.status-tag {
    font-weight: 600;
    color: var(--accent-gold);
}

.dossier-summary {
    font-size: 0.86rem;
    color: #cbd5e1;
    line-height: 1.5;
    margin-bottom: 1.25rem;
    flex-grow: 1;
}

.dossier-card-footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-top: 1px solid var(--border-color);
    padding-top: 0.9rem;
}

/* Casier Spécifique (Bingo / Criminel) */
.criminal-card-top {
    display: flex;
    gap: 1.1rem;
    margin-bottom: 0.95rem;
}

.criminal-avatar-container {
    width: 76px;
    height: 76px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-highlight);
    background: #000000;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.criminal-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.criminal-main-info {
    flex-grow: 1;
    min-width: 0;
}

.criminal-name {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.25;
}

.criminal-alias {
    font-size: 0.84rem;
    font-style: italic;
    color: var(--accent-gold);
    margin-bottom: 0.35rem;
}

.criminal-crimes-summary {
    font-size: 0.8rem;
    background: rgba(11, 16, 27, 0.75);
    border-radius: var(--radius-sm);
    padding: 0.75rem 0.9rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-glass);
}

.section-micro-title {
    font-weight: 700;
    color: var(--text-muted);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.45rem;
}

.criminal-crimes-summary ul {
    list-style: none;
    padding-left: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.crime-date {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-family: var(--font-mono);
}

.more-crimes {
    font-style: italic;
    color: var(--accent-village);
    margin-top: 0.25rem;
    font-size: 0.78rem;
}

/* ==========================================================================
   11. STATE-OF-THE-ART STATUS BADGES & PULSATING STATUS DOTS
   ========================================================================== */

/* Status Dots & Pulsating Animations */
.status-dot,
.status-indicator-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
}

/* Pulsating Animations */
@keyframes pulse-dot-red {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.65), 0 0 6px rgba(239, 68, 68, 0.8);
    }
    50% {
        transform: scale(1.2);
        box-shadow: 0 0 0 4px rgba(239, 68, 68, 0), 0 0 10px rgba(239, 68, 68, 0.9);
    }
}

@keyframes pulse-dot-amber {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.6), 0 0 6px rgba(245, 158, 11, 0.8);
    }
    50% {
        transform: scale(1.15);
        box-shadow: 0 0 0 4px rgba(245, 158, 11, 0), 0 0 10px rgba(245, 158, 11, 0.9);
    }
}

@keyframes pulse-dot-green {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6), 0 0 6px rgba(16, 185, 129, 0.8);
    }
    50% {
        transform: scale(1.15);
        box-shadow: 0 0 0 4px rgba(16, 185, 129, 0), 0 0 10px rgba(16, 185, 129, 0.9);
    }
}

@keyframes pulse-dot-blue {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(0, 240, 255, 0.6), 0 0 6px rgba(0, 240, 255, 0.8);
    }
    50% {
        transform: scale(1.15);
        box-shadow: 0 0 0 4px rgba(0, 240, 255, 0), 0 0 10px rgba(0, 240, 255, 0.9);
    }
}

/* Header Status Dot */
.header-user-status .status-dot {
    background: #10b981;
    animation: pulse-dot-green 2s infinite ease-in-out;
}

/* Priority & Threat Pills */
.priority-pill, .threat-pill {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: var(--radius-pill);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.priority-urgence-absolue, .threat-rang-s {
    background: rgba(239, 68, 68, 0.16);
    color: #fca5a5;
    border: 1px solid var(--color-s);
    box-shadow: 0 0 10px var(--color-s-glow);
}

.priority-urgence-absolue::before, .threat-rang-s::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ef4444;
    animation: pulse-dot-red 1.4s infinite ease-in-out;
}

.priority-haute, .threat-rang-a {
    background: rgba(244, 63, 94, 0.16);
    color: #fda4af;
    border: 1px solid var(--color-a);
    box-shadow: 0 0 8px var(--color-a-glow);
}

.priority-haute::before, .threat-rang-a::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #f43f5e;
    animation: pulse-dot-red 1.8s infinite ease-in-out;
}

.priority-moyenne, .threat-rang-b {
    background: rgba(249, 115, 22, 0.16);
    color: #fdba74;
    border: 1px solid var(--color-b);
    box-shadow: 0 0 8px var(--color-b-glow);
}

.priority-moyenne::before, .threat-rang-b::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #f97316;
    animation: pulse-dot-amber 2s infinite ease-in-out;
}

.priority-basse, .threat-rang-c {
    background: rgba(234, 179, 8, 0.16);
    color: #fde047;
    border: 1px solid var(--color-c);
    box-shadow: 0 0 8px var(--color-c-glow);
}

.priority-basse::before, .threat-rang-c::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #eab308;
    animation: pulse-dot-amber 2.4s infinite ease-in-out;
}

.threat-rang-d {
    background: rgba(16, 185, 129, 0.16);
    color: #86efac;
    border: 1px solid var(--color-d);
    box-shadow: 0 0 8px var(--color-d-glow);
}

.threat-rang-d::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
    animation: pulse-dot-green 2.4s infinite ease-in-out;
}

/* Criminal Status Badge with Pulsating Dot */
.criminal-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    margin-top: 4px;
}

.criminal-status-badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ef4444;
    animation: pulse-dot-red 1.5s infinite ease-in-out;
    flex-shrink: 0;
}

/* Badges génériques et Activity Feed Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 7px;
    border-radius: var(--radius-pill);
    font-size: 0.72rem;
    font-weight: 600;
}

.badge-report {
    background: rgba(0, 240, 255, 0.12);
    color: var(--accent-village);
    border: 1px solid rgba(0, 240, 255, 0.25);
}

.badge-criminal {
    background: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ==========================================================================
   12. DISCORD EXPORT STUDIO & LIVE COUNTER
   ========================================================================== */

.discord-studio-container {
    display: grid;
    grid-template-columns: 430px 1fr;
    gap: 1.75rem;
    align-items: start;
}

.discord-controls-sidebar {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.6rem;
    display: flex;
    flex-direction: column;
    gap: 1.35rem;
    box-shadow: var(--shadow-main);
}

.sidebar-heading {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.85rem;
}

.sidebar-heading h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
}

.sidebar-heading p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.current-item-indicator {
    background: rgba(88, 101, 242, 0.14);
    border: 1px solid rgba(88, 101, 242, 0.35);
    padding: 0.6rem 0.95rem;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    color: #c9cdfb;
    font-weight: 600;
    box-shadow: 0 0 12px rgba(88, 101, 242, 0.15);
}

/* Presets Rapides */
.preset-buttons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.preset-btn {
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.5rem 0.6rem;
    white-space: nowrap;
}

.option-group-title {
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
}

.format-radio-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.radio-card {
    cursor: pointer;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.65rem 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.84rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.radio-card:has(input:checked) {
    border-color: var(--discord-blurple);
    background: rgba(88, 101, 242, 0.14);
    color: #ffffff;
    box-shadow: 0 0 10px rgba(88, 101, 242, 0.2);
}

/* Compteur de Caractères Live */
.char-counter-container {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.75rem 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.char-counter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.counter-badge {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.78rem;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
}

.counter-green {
    background: rgba(16, 185, 129, 0.15);
    color: #4ade80;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

.counter-yellow {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.counter-red {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.5);
    animation: pulse-danger 1.8s infinite;
}

@keyframes pulse-danger {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.char-counter-bar {
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #10b981;
    transition: width 0.25s ease, background-color 0.25s ease;
    border-radius: 3px;
}

.char-warning-msg {
    font-size: 0.76rem;
    color: #fca5a5;
    line-height: 1.35;
    background: rgba(239, 68, 68, 0.1);
    padding: 0.4rem 0.6rem;
    border-radius: var(--radius-xs);
    border: 1px solid rgba(239, 68, 68, 0.25);
}

/* Checkbox Toggle List */
.toggles-checklist {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    background: var(--bg-main);
    padding: 0.95rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.checkbox-toggle-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.84rem;
    cursor: pointer;
    user-select: none;
    transition: color 0.15s ease;
}

.checkbox-toggle-item:hover {
    color: #ffffff;
}

.checkbox-toggle-item input[type="checkbox"] {
    accent-color: var(--discord-blurple);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.checkbox-toggle-item.danger-toggle {
    color: #fca5a5;
}

/* Zone d'Aperçu & Éditeur */
.discord-editor-pane {
    display: flex;
    flex-direction: column;
    gap: 1.35rem;
}

.manual-edit-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
}

.manual-edit-box textarea {
    width: 100%;
    min-height: 190px;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.9rem;
    font-family: var(--font-mono);
    font-size: 0.84rem;
    color: #e2e8f0;
    line-height: 1.5;
    resize: vertical;
    transition: border-color 0.2s ease;
}

.manual-edit-box textarea:focus {
    outline: none;
    border-color: var(--discord-blurple);
    box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.2);
}

/* Découpeur Multi-Parties Splitter */
.splitter-parts-grid {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.splitter-part-card {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.75rem 0.9rem;
}

/* ==========================================================================
   13. BOUTONS & FORMULAIRES (SAAS DESIGN LANGUAGE)
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.58rem 1.15rem;
    font-size: 0.86rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    user-select: none;
}

.btn-sm {
    padding: 0.38rem 0.75rem;
    font-size: 0.78rem;
}

.btn-primary {
    background: var(--accent-village);
    color: #080c14;
    border-color: var(--accent-village);
    font-weight: 700;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 0 12px var(--accent-glow-subtle);
}

.btn-primary:hover {
    filter: brightness(1.12);
    box-shadow: 0 0 16px var(--accent-glow);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border-color: var(--border-highlight);
    color: var(--text-primary);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--text-primary);
    transform: translateY(-1px);
}

.btn-discord {
    background: var(--discord-blurple);
    color: #ffffff;
    border-color: var(--discord-blurple);
    box-shadow: 0 0 12px rgba(88, 101, 242, 0.25);
}

.btn-discord:hover {
    background: var(--discord-blurple-hover);
    box-shadow: 0 0 16px rgba(88, 101, 242, 0.45);
    transform: translateY(-1px);
}

.btn-danger-ghost {
    background: transparent;
    color: #f87171;
    border-color: transparent;
}

.btn-danger-ghost:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
}

/* Form Controls */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1.1rem;
}

.form-group label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-control {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.62rem 0.85rem;
    color: var(--text-primary);
    font-size: 0.88rem;
    font-family: inherit;
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-village);
    box-shadow: 0 0 0 3px var(--accent-glow-subtle);
}

textarea.form-control {
    resize: vertical;
    min-height: 85px;
    line-height: 1.5;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
}

/* Lignes d'infractions dynamiques dans la modale */
.crime-input-row {
    background: rgba(11, 16, 27, 0.8);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.85rem;
    margin-bottom: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.crime-input-row .row-fields {
    display: flex;
    gap: 0.5rem;
}

.crime-input-row .crime-date-input {
    width: 170px;
}

.crime-input-row .crime-charge-input {
    flex-grow: 1;
}

/* ==========================================================================
   14. MODALES ET DIALOGUES
   ========================================================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(6, 9, 14, 0.82);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.modal-overlay.active {
    display: flex;
}

.modal-window {
    background: var(--bg-card-elevated);
    border: 1px solid var(--border-highlight);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 860px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-elevated);
    animation: modalPop 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.modal-window::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.16), transparent);
}

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

.modal-header {
    padding: 1.25rem 1.75rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.btn-close-modal {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.6rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
    transition: color 0.15s ease;
}

.btn-close-modal:hover {
    color: #ffffff;
}

.modal-body {
    padding: 1.75rem;
    overflow-y: auto;
}

.modal-footer {
    padding: 1.25rem 1.75rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    background: rgba(11, 16, 27, 0.4);
}

/* ==========================================================================
   15. MAKIMONO PARCHEMIN VIEW (AUTHENTIC SHINOBI SCROLL & ARCHIVES)
   ========================================================================== */

.modal-parchment-overlay {
    background: rgba(5, 7, 12, 0.9);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.parchment-modal-window {
    max-width: 960px;
    background: #0e131d;
    border: 1px solid var(--border-highlight);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 50px rgba(0, 0, 0, 0.6);
}

.parchment-modal-header {
    background: rgba(14, 19, 29, 0.95);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
}

.parchment-header-info h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    color: #f1f5f9;
}

.parchment-classification {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    color: #f59e0b;
    letter-spacing: 0.08em;
    margin-top: 2px;
}

.parchment-modal-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-parchment-print {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #0b0f19;
    font-weight: 700;
    border-color: #f59e0b;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.35);
}

.btn-parchment-print:hover {
    filter: brightness(1.15);
    box-shadow: 0 0 18px rgba(245, 158, 11, 0.6);
}

.parchment-modal-body {
    padding: 1.5rem;
    background: radial-gradient(circle at 50% 50%, #151b27 0%, #0a0d14 100%);
    overflow-y: auto;
}

/* Scroll Container */
.parchment-scroll-container {
    max-width: 840px;
    margin: 0.5rem auto 1.5rem auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

/* Wooden Roller Ends (3D Lacquered Rosewood / Brass Caps) */
.parchment-roller {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 5;
}

.roller-top {
    margin-bottom: -6px;
}

.roller-bottom {
    margin-top: -6px;
}

.roller-wood {
    height: 22px;
    width: calc(100% - 48px);
    background: linear-gradient(180deg, #452413 0%, #1b0e07 38%, #2e170c 70%, #100804 100%);
    border-radius: 4px;
    box-shadow: inset 0 2px 3px rgba(255, 255, 255, 0.2),
                inset 0 -2px 3px rgba(0, 0, 0, 0.8),
                0 4px 10px rgba(0, 0, 0, 0.65);
    position: relative;
}

.roller-cap {
    width: 26px;
    height: 30px;
    border-radius: 4px;
    background: linear-gradient(135deg, #fae084 0%, #c6952b 35%, #f5d36e 65%, #7a5511 100%);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6),
                inset 0 1px 2px rgba(255, 255, 255, 0.4),
                inset 0 -1px 2px rgba(0, 0, 0, 0.6);
    border: 1px solid #785210;
    flex-shrink: 0;
    position: relative;
    z-index: 6;
}

.cap-left {
    margin-right: -2px;
}

.cap-right {
    margin-left: -2px;
}

/* Warm Aged Scroll Sheet (Washi Parchemin Texture) */
.parchment-sheet {
    width: calc(100% - 24px);
    background-color: #fbf6e9;
    background-image:
        radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.7) 0%, transparent 60%),
        radial-gradient(circle at 10% 90%, rgba(180, 140, 90, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 90% 10%, rgba(180, 140, 90, 0.08) 0%, transparent 40%),
        linear-gradient(180deg, #f3e6ca 0%, #fbf6e9 12%, #f8f1df 88%, #eedebc 100%);
    color: #1e242b;
    border-left: 2px solid rgba(139, 90, 43, 0.35);
    border-right: 2px solid rgba(139, 90, 43, 0.35);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6),
                inset 0 0 40px rgba(180, 130, 70, 0.12),
                inset 0 0 90px rgba(130, 90, 40, 0.06);
    padding: 3rem 3.5rem;
    position: relative;
    overflow: hidden;
    z-index: 3;
}

/* Kanji Watermark */
.parchment-content-wrapper {
    position: relative;
    z-index: 2;
}

.parchment-content-wrapper::before {
    content: var(--village-kanji, "忍");
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-heading);
    font-size: 18rem;
    font-weight: 900;
    color: rgba(139, 90, 43, 0.045);
    pointer-events: none;
    z-index: -1;
    line-height: 1;
    user-select: none;
}

/* Authentic Vermilion Hanko Seal Stamp */
.hanko-seal-stamp {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    border: 3px solid #b91c1c;
    color: #b91c1c;
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: 0.15em;
    padding: 6px 14px;
    border-radius: 4px;
    transform: rotate(-6deg);
    box-shadow: 0 0 0 1px rgba(185, 28, 28, 0.3),
                inset 0 0 8px rgba(185, 28, 28, 0.12);
    text-shadow: 0 0 1px rgba(185, 28, 28, 0.4);
    opacity: 0.92;
    user-select: none;
    background: rgba(254, 242, 242, 0.25);
}

/* En-tête Parchemin */
.parchment-header-crest-block {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.parchment-kamon-symbol {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid #854d0e;
    background: rgba(255, 255, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #854d0e;
    box-shadow: inset 0 0 8px rgba(133, 77, 14, 0.2);
    flex-shrink: 0;
}

.parchment-main-title-block {
    flex-grow: 1;
}

.parchment-institution-name {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #78350f;
    text-transform: uppercase;
}

.parchment-document-title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #1c1917;
    line-height: 1.25;
    margin: 0.25rem 0;
}

.parchment-reference-strip {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: #57534e;
    background: rgba(217, 119, 6, 0.08);
    padding: 3px 8px;
    border-radius: 3px;
    display: inline-block;
    border: 1px solid rgba(217, 119, 6, 0.2);
}

/* Sumi-e Brush Divider Line */
.parchment-divider-line {
    height: 2px;
    background: linear-gradient(90deg, transparent, #854d0e 15%, #292524 50%, #854d0e 85%, transparent);
    margin: 1.5rem 0;
    opacity: 0.65;
}

/* Grille de Métadonnées Parchemin */
.parchment-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem 1.25rem;
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(139, 90, 43, 0.25);
    border-radius: var(--radius-sm);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.p-meta-cell {
    font-size: 0.88rem;
    color: #292524;
}

.p-meta-cell strong {
    color: #78350f;
    font-weight: 700;
}

.p-meta-cell.full-width {
    grid-column: 1 / -1;
}

/* Sections du Document */
.parchment-section {
    margin-bottom: 1.5rem;
}

.parchment-section-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: #78350f;
    letter-spacing: 0.04em;
    border-bottom: 1px dashed rgba(120, 53, 15, 0.35);
    padding-bottom: 0.35rem;
    margin-bottom: 0.65rem;
}

.parchment-body-text {
    font-size: 0.92rem;
    line-height: 1.65;
    color: #292524;
}

.parchment-pre-text {
    font-family: var(--font-mono);
    font-size: 0.84rem;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(139, 90, 43, 0.2);
    border-radius: 4px;
    padding: 0.9rem;
    color: #1c1917;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Profil Casier Parchemin */
.parchment-criminal-hero {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    align-items: flex-start;
}

.parchment-criminal-photo {
    width: 110px;
    height: 110px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 3px solid #854d0e;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
    filter: sepia(0.12) contrast(1.05);
}

.parchment-criminal-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.parchment-criminal-info {
    flex-grow: 1;
}

.parchment-crimes-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.p-crime-item {
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(139, 90, 43, 0.2);
    border-radius: 4px;
    padding: 0.75rem 0.9rem;
    font-size: 0.88rem;
}

.p-crime-item strong {
    color: #991b1b;
}

.p-crime-item p {
    color: #44403c;
    margin-top: 0.25rem;
    line-height: 1.45;
}

/* Signature & Official Wax Seal Strip */
.parchment-signature-strip {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(120, 53, 15, 0.3);
}

.p-sign-box {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.p-sign-role {
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #78350f;
    text-transform: uppercase;
}

.p-sign-name {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: #1c1917;
}

.p-sign-mat {
    font-family: var(--font-mono);
    font-size: 0.76rem;
    color: #78716c;
}

.p-sign-box.stamp-box {
    align-items: center;
}

.red-wax-seal {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #dc2626 0%, #991b1b 70%, #7f1d1d 100%);
    color: #fee2e2;
    border: 3px double rgba(254, 202, 202, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 900;
    font-family: var(--font-heading);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35),
                inset 0 2px 4px rgba(255, 255, 255, 0.35);
    transform: rotate(5deg);
    user-select: none;
    margin-top: 0.35rem;
}

/* ==========================================================================
   16. IMPRESSION PARCHEMIN HAUTE DÉFINITION (@MEDIA PRINT)
   ========================================================================== */

@media print {
    body {
        background: #ffffff !important;
        color: #000000 !important;
        background-image: none !important;
    }

    /* Masquer le chrome de l'interface */
    .app-header,
    .main-nav,
    .dashboard-banner,
    .stats-grid,
    .toolbar-filter-box,
    .parchment-modal-header,
    .parchment-modal-actions,
    .btn-close-modal,
    #toast-container {
        display: none !important;
    }

    /* Révéler uniquement le parchemin sans fenêtre modale */
    .modal-overlay,
    .modal-window,
    .parchment-modal-window,
    .parchment-modal-body {
        position: static !important;
        width: 100% !important;
        height: auto !important;
        background: transparent !important;
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
        display: block !important;
    }

    .parchment-scroll-container {
        max-width: 100% !important;
        margin: 0 !important;
    }

    .parchment-roller {
        display: none !important; /* Pas de rouleaux 3D à l'impression papier */
    }

    .parchment-sheet {
        width: 100% !important;
        border: none !important;
        box-shadow: none !important;
        background: #ffffff !important;
        color: #111827 !important;
        padding: 1rem !important;
        page-break-inside: avoid;
    }

    .parchment-section,
    .parchment-meta-grid,
    .parchment-signature-strip {
        page-break-inside: avoid;
    }
}

/* ==========================================================================
   17. TOAST NOTIFICATIONS & MICRO-INTERACTIONS
   ========================================================================== */

#toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.toast {
    background: var(--bg-card-elevated);
    border: 1px solid var(--border-highlight);
    padding: 0.85rem 1.35rem;
    border-radius: var(--radius-md);
    color: #ffffff;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.65);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.88rem;
    font-weight: 600;
    pointer-events: auto;
    animation: toastSlideIn 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.toast-success {
    border-left: 4px solid #10b981;
}

.toast.toast-error {
    border-left: 4px solid #ef4444;
}

.toast.toast-info {
    border-left: 4px solid var(--accent-village);
}

.toast.fade-out {
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.35s ease;
}

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

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3.5rem 2rem;
    background: var(--bg-card);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-muted);
}

.empty-state p {
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

/* ==========================================================================
   18. RESPONSIVE DESIGN & MOBILE OPTIMIZATIONS
   ========================================================================== */

@media (max-width: 1180px) {
    .header-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 0.9rem;
    }
    .header-village-switcher {
        justify-content: center;
    }
    .main-nav {
        justify-content: center;
        overflow-x: auto;
    }
    .header-user-status {
        align-self: center;
    }
    .discord-studio-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .dashboard-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.25rem;
        padding: 1.5rem;
    }
    .dashboard-banner::after {
        font-size: 6rem;
    }
    .banner-actions {
        width: 100%;
        flex-direction: column;
    }
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    .form-row, .form-row-3 {
        grid-template-columns: 1fr;
    }
    .dossier-grid {
        grid-template-columns: 1fr;
    }
    .parchment-sheet {
        padding: 2rem 1.5rem;
    }
    .parchment-meta-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .village-pills {
        overflow-x: auto;
        padding-bottom: 2px;
    }
    .parchment-header-crest-block {
        flex-direction: column;
        align-items: flex-start;
    }
    .parchment-criminal-hero {
        flex-direction: column;
    }
}
