/* =========================================================================
 *  VegasLife Panel — Maison Edition
 *
 *  Direction : magazine d'intérieur × dashboard de pilotage. Fraunces serif
 *  optique en titres, italique en contrepoint, Instrument Sans grotesque
 *  pour le corps, Geist Mono pour les chiffres techniques. Or matiere reserve
 *  aux accents critiques. Decoration Art Deco discrete (lignes verticales,
 *  hairlines architecturales). Asymetries deliberees, vrais espaces blancs.
 * ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;1,9..144,400;1,9..144,500;1,9..144,600&family=Instrument+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Geist+Mono:wght@400;500;600&display=swap');

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

/* =========================================================================
 *  TOKENS
 * ========================================================================= */
:root {
    /* Surfaces — empilées, plus profond → plus haut */
    --bg-base:    #08090d;
    --bg-1:       #0f1117;        /* sidebar, cards */
    --bg-2:       #161823;        /* inputs */
    --bg-3:       #1f2230;        /* hover */
    --bg-4:       #2a2d3d;        /* pressed/selected */

    /* Encres */
    --ink-1:      #f3f1e8;        /* primaire (off-white chaud) */
    --ink-2:      #c4c0b3;        /* secondaire */
    --ink-3:      #837f73;        /* muted */
    --ink-4:      #4f4c43;        /* captions */
    --ink-5:      #34322c;        /* dividers visibles */

    /* Bordures hairlines */
    --line-1:     rgba(243, 241, 232, 0.04);
    --line-2:     rgba(243, 241, 232, 0.08);
    --line-3:     rgba(243, 241, 232, 0.14);

    /* Or matière (chaud, sourd, pas brillant) */
    --gold-1:     #c8a14c;        /* mat */
    --gold-2:     #ddbe7a;        /* clair, hover */
    --gold-3:     #8c6e2f;        /* sombre, pressed */
    --gold-tint:  rgba(200, 161, 76, 0.10);
    --gold-warm:  rgba(200, 161, 76, 0.18);

    /* Etat (sourdines, pas saturees) */
    --green:      #6cae7e;
    --green-tint: rgba(108, 174, 126, 0.12);
    --red:        #d96962;
    --red-tint:   rgba(217, 105, 98, 0.12);
    --orange:     #d99c5a;
    --orange-tint:rgba(217, 156, 90, 0.12);
    --blue:       #7895d4;
    --blue-tint:  rgba(120, 149, 212, 0.12);

    /* Typo */
    --font-display: 'Fraunces', 'Cormorant Garamond', Georgia, serif;
    --font-body:    'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono:    'Geist Mono', 'JetBrains Mono', 'SF Mono', Menlo, monospace;

    /* Echelle */
    --r-sm: 4px;
    --r:    8px;
    --r-lg: 12px;
    --r-xl: 16px;

    /* Ombres */
    --shadow-1: 0 1px 0 0 var(--line-1) inset;
    --shadow-2: 0 6px 24px rgba(0, 0, 0, 0.32), 0 1px 0 0 var(--line-1) inset;
    --shadow-3: 0 18px 60px rgba(0, 0, 0, 0.55), 0 1px 0 0 var(--line-2) inset;

    /* Compatibilite tokens legacy (utilises en inline styles dans les pages) */
    --bg:          var(--bg-base);
    --bg-card:     var(--bg-1);
    --bg-input:    var(--bg-2);
    --bg-elevated: var(--bg-1);
    --border:      var(--line-2);
    --text:        var(--ink-1);
    --text-muted:  var(--ink-3);
    --primary:     var(--gold-1);
    --gold:        var(--gold-1);
    --gold-dark:   var(--gold-3);
}

/* =========================================================================
 *  BASE
 * ========================================================================= */
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    font-feature-settings: "ss01", "cv01", "kern" on;
    background: var(--bg-base);
    color: var(--ink-1);
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* Ambiance — voile lumiere de salon de jeux */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 40% at 8% 0%, rgba(200, 161, 76, 0.045), transparent 70%),
        radial-gradient(ellipse 50% 60% at 100% 80%, rgba(120, 149, 212, 0.03), transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* Grain subtil — texture de papier */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='1' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.95  0 0 0 0 0.93  0 0 0 0 0.88  0 0 0 0.025 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
    pointer-events: none;
    z-index: 0;
    opacity: 0.4;
    mix-blend-mode: overlay;
}

.layout, .auth-wrapper, .toast-container, .confirm-overlay, .modal, .modal-backdrop {
    position: relative;
    z-index: 1;
}

a { color: var(--gold-2); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--gold-1); }

::selection { background: var(--gold-warm); color: var(--ink-1); }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-3); border-radius: 10px; border: 2px solid var(--bg-base); }
::-webkit-scrollbar-thumb:hover { background: var(--bg-4); }

/* =========================================================================
 *  TYPOGRAPHIE — règles editoriales
 * ========================================================================= */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    color: var(--ink-1);
    letter-spacing: -0.015em;
    line-height: 1.1;
    font-weight: 500;
}

h1 { font-size: 44px; font-variation-settings: 'opsz' 144, 'SOFT' 30; }
h2 { font-size: 32px; font-variation-settings: 'opsz' 96; }
h3 { font-size: 18px; font-weight: 600; font-family: var(--font-body); letter-spacing: 0; }
h4 { font-size: 14px; font-weight: 600; font-family: var(--font-body); letter-spacing: 0; }

/* Italique d'accent — pour les nuances editoriales */
.display-italic, em.display { font-style: italic; font-family: var(--font-display); }

.eyebrow {
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 600;
    color: var(--ink-3);
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

.text-mono   { font-family: var(--font-mono); font-feature-settings: "tnum"; }
.text-muted  { color: var(--ink-3); }
.text-sm     { font-size: 13px; }
.text-xs     { font-size: 11px; }
.text-tabular { font-variant-numeric: tabular-nums; }

/* =========================================================================
 *  LAYOUT
 * ========================================================================= */
.layout {
    display: grid;
    grid-template-columns: 252px 1fr;
    min-height: 100vh;
}

/* SIDEBAR — colonne editoriale */
.sidebar {
    background: var(--bg-1);
    border-right: 1px solid var(--line-1);
    padding: 32px 18px 20px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    /* Decoration verticale subtile - colonne dorée derrière */
    background-image: linear-gradient(to bottom, transparent 0%, transparent 100%);
}

/* Logo + nom maison */
.sidebar-brand {
    margin-bottom: 36px;
    text-align: center;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line-1);
}
.sidebar-logo {
    display: block;
    width: 110px;
    margin: 0 auto 10px;
    filter: drop-shadow(0 8px 24px rgba(200, 161, 76, 0.20));
}
.sidebar-brand-name {
    font-family: var(--font-display);
    font-size: 14px;
    font-style: italic;
    font-weight: 500;
    color: var(--ink-3);
    letter-spacing: 0.04em;
}

.sidebar nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.nav-section { display: flex; flex-direction: column; gap: 1px; position: relative; }
.nav-section-title {
    font-size: 9px;
    font-weight: 700;
    color: var(--ink-4);
    text-transform: uppercase;
    letter-spacing: 0.22em;
    padding: 0 14px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}
/* Petite decoration : ligne fine apres le titre de section */
.nav-section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--line-1);
}

.sidebar nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 14px;
    border-radius: var(--r-sm);
    color: var(--ink-2);
    font-size: 13.5px;
    font-weight: 500;
    transition: all 0.18s ease;
    position: relative;
}
.sidebar nav a:hover {
    background: var(--bg-2);
    color: var(--ink-1);
    text-decoration: none;
    padding-left: 17px;
}
.sidebar nav a.active {
    background: var(--gold-tint);
    color: var(--gold-2);
    padding-left: 17px;
}
.sidebar nav a.active::before {
    content: '';
    position: absolute;
    left: -18px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 22px;
    background: linear-gradient(to bottom, var(--gold-1), var(--gold-3));
    border-radius: 0 2px 2px 0;
    box-shadow: 0 0 12px rgba(200, 161, 76, 0.4);
}
.sidebar nav a .icon {
    font-size: 14px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
    filter: grayscale(0.5) brightness(1.1);
    opacity: 0.75;
    transition: all 0.18s;
}
.sidebar nav a:hover .icon { opacity: 1; filter: grayscale(0.2) brightness(1.15); }
.sidebar nav a.active .icon { filter: grayscale(0); opacity: 1; }

.sidebar-footer {
    border-top: 1px solid var(--line-1);
    padding-top: 16px;
    margin-top: 18px;
}
.sidebar-footer .user-info {
    font-size: 12px;
    color: var(--ink-3);
    margin-bottom: 10px;
    padding: 0 4px;
    line-height: 1.4;
}
.sidebar-footer .user-info strong {
    color: var(--ink-1);
    font-weight: 600;
    font-family: var(--font-display);
    font-style: italic;
    font-size: 13px;
}

/* MAIN */
.main {
    padding: 44px 56px 72px;
    max-width: 1500px;
    margin-inline: auto;
    width: 100%;
}

/* Page header avec mark/eyebrow et action a droite */
.page-title {
    font-family: var(--font-display);
    font-size: 48px;
    font-weight: 400;
    font-variation-settings: 'opsz' 144, 'SOFT' 50;
    color: var(--ink-1);
    margin-bottom: 6px;
    line-height: 1;
    letter-spacing: -0.025em;
}
.page-title em {
    font-style: italic;
    color: var(--gold-2);
    font-weight: 400;
}
.page-subtitle {
    color: var(--ink-3);
    font-size: 14px;
    margin-bottom: 36px;
    max-width: 640px;
    line-height: 1.6;
    font-weight: 400;
}
.page-subtitle em { font-style: italic; color: var(--ink-2); }

/* Eyebrow au-dessus du titre pour donner du contexte */
.page-eyebrow {
    font-size: 10px;
    font-weight: 700;
    color: var(--gold-2);
    text-transform: uppercase;
    letter-spacing: 0.24em;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.page-eyebrow::before {
    content: '';
    width: 24px;
    height: 1px;
    background: var(--gold-1);
}

.page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
    margin-bottom: 36px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--line-1);
}
.page-header > div:first-child { flex: 1; min-width: 0; }
.page-header .page-title, .page-header .page-subtitle { margin-bottom: 0; }
.page-header .page-title { margin-bottom: 8px; }
.page-header-actions { display: flex; gap: 10px; align-items: center; flex-shrink: 0; }

/* =========================================================================
 *  CARDS
 * ========================================================================= */
.card {
    background: var(--bg-1);
    border: 1px solid var(--line-1);
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: var(--shadow-1);
    position: relative;
}

.card-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--line-1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.card-header h3 {
    font-size: 15px;
    font-weight: 600;
    font-family: var(--font-body);
    letter-spacing: 0.005em;
}

.card-body { padding: 20px 24px; }

/* =========================================================================
 *  BUTTONS
 * ========================================================================= */
.btn {
    appearance: none;
    border: 1px solid transparent;
    background: transparent;
    color: var(--ink-1);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    padding: 9px 16px;
    border-radius: var(--r-sm);
    cursor: pointer;
    transition: all 0.18s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    line-height: 1;
    user-select: none;
    white-space: nowrap;
    letter-spacing: 0.005em;
}
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn:focus-visible { outline: 2px solid var(--gold-1); outline-offset: 2px; }

.btn-primary {
    background: linear-gradient(180deg, var(--gold-2) 0%, var(--gold-1) 100%);
    color: #1c1408;
    border-color: var(--gold-3);
    box-shadow:
        0 1px 0 0 rgba(255, 246, 220, 0.35) inset,
        0 -1px 0 0 rgba(0, 0, 0, 0.15) inset,
        0 4px 14px rgba(200, 161, 76, 0.25);
    font-weight: 700;
}
.btn-primary:hover:not(:disabled) {
    background: linear-gradient(180deg, #ecd398 0%, var(--gold-2) 100%);
    transform: translateY(-1px);
    box-shadow:
        0 1px 0 0 rgba(255, 246, 220, 0.45) inset,
        0 -1px 0 0 rgba(0, 0, 0, 0.18) inset,
        0 8px 22px rgba(200, 161, 76, 0.35);
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
    background: var(--bg-2);
    color: var(--ink-2);
    border-color: var(--line-2);
}
.btn-ghost:hover:not(:disabled) {
    color: var(--ink-1);
    border-color: var(--line-3);
    background: var(--bg-3);
}

.btn-red, .btn-danger {
    background: var(--red-tint);
    color: var(--red);
    border-color: rgba(217, 105, 98, 0.3);
}
.btn-red:hover:not(:disabled), .btn-danger:hover:not(:disabled) {
    background: rgba(217, 105, 98, 0.2);
    border-color: rgba(217, 105, 98, 0.5);
}

.btn-green   { background: var(--green-tint);  color: var(--green);  border-color: rgba(108, 174, 126, 0.3); }
.btn-green:hover:not(:disabled)  { background: rgba(108, 174, 126, 0.2); }
.btn-orange  { background: var(--orange-tint); color: var(--orange); border-color: rgba(217, 156, 90, 0.3); }
.btn-orange:hover:not(:disabled) { background: rgba(217, 156, 90, 0.2); }
.btn-blue    { background: var(--blue-tint);   color: var(--blue);   border-color: rgba(120, 149, 212, 0.3); }
.btn-blue:hover:not(:disabled)   { background: rgba(120, 149, 212, 0.2); }

.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 4px; }

#btn-logout {
    width: 100%;
    background: transparent;
    border: 1px solid var(--line-2);
    color: var(--ink-3);
    padding: 9px 12px;
    font-size: 12px;
    border-radius: var(--r-sm);
    transition: all 0.18s;
}
#btn-logout:hover {
    color: var(--red);
    border-color: rgba(217, 105, 98, 0.3);
    background: var(--red-tint);
}

/* =========================================================================
 *  FORMS
 * ========================================================================= */
.form-group { margin-bottom: 18px; }
.form-group:last-child { margin-bottom: 0; }

.form-label, .form-group label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--ink-3);
    margin-bottom: 8px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.form-group input, .form-group select, .form-group textarea,
input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="search"], select, textarea {
    width: 100%;
    padding: 11px 14px;
    background: var(--bg-2);
    border: 1px solid var(--line-2);
    border-radius: var(--r-sm);
    color: var(--ink-1);
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}
input:focus, select:focus, textarea:focus,
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--gold-1);
    box-shadow: 0 0 0 3px var(--gold-tint);
    background: var(--bg-2);
}
input::placeholder, textarea::placeholder { color: var(--ink-4); }
.form-group textarea { resize: vertical; min-height: 84px; }

input[type="search"]::-webkit-search-cancel-button { filter: invert(0.4); cursor: pointer; }
input[type="checkbox"], input[type="radio"] { width: auto; accent-color: var(--gold-1); }

/* =========================================================================
 *  TABLES — rangees alternees subtiles
 * ========================================================================= */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
table thead th {
    text-align: left;
    padding: 12px 24px;
    font-size: 10px;
    font-weight: 700;
    color: var(--ink-3);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    background: transparent;
    border-bottom: 1px solid var(--line-2);
}
table tbody td {
    padding: 14px 24px;
    border-bottom: 1px solid var(--line-1);
    color: var(--ink-1);
    vertical-align: middle;
}
table tbody tr:last-child td { border-bottom: none; }
table tbody tr:hover { background: rgba(243, 241, 232, 0.018); }
table tbody tr:hover td:first-child { box-shadow: inset 2px 0 0 var(--gold-1); }

/* Empty state */
.empty-state {
    text-align: center;
    padding: 56px 24px;
    color: var(--ink-4);
    font-size: 14px;
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
}

.toolbar {
    padding: 14px 24px;
    border-bottom: 1px solid var(--line-1);
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}
.toolbar input[type="search"], .toolbar input[type="text"] {
    max-width: 280px;
    padding: 8px 12px;
    font-size: 12px;
}

/* =========================================================================
 *  BADGES
 * ========================================================================= */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 99px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 1px solid var(--line-2);
    background: var(--bg-2);
    color: var(--ink-2);
}
.badge.badge-gold   { color: var(--gold-2); background: var(--gold-tint); border-color: rgba(200, 161, 76, 0.3); }
.badge.badge-green  { color: var(--green); background: var(--green-tint); border-color: rgba(108, 174, 126, 0.3); }
.badge.badge-red    { color: var(--red); background: var(--red-tint); border-color: rgba(217, 105, 98, 0.3); }
.badge.badge-orange { color: var(--orange); background: var(--orange-tint); border-color: rgba(217, 156, 90, 0.3); }
.badge.badge-blue   { color: var(--blue); background: var(--blue-tint); border-color: rgba(120, 149, 212, 0.3); }
.badge.badge-mono   { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.02em; text-transform: none; }

.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* =========================================================================
 *  ACTIONS GROUPS
 * ========================================================================= */
.actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* =========================================================================
 *  STATS — chiffres editoriaux gros caractere
 * ========================================================================= */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-bottom: 36px;
}
.stat-card {
    background: var(--bg-1);
    border: 1px solid var(--line-1);
    border-radius: var(--r-lg);
    padding: 24px 26px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-1);
    transition: border-color 0.25s, transform 0.25s;
}
.stat-card:hover {
    border-color: var(--line-3);
    transform: translateY(-2px);
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 24px;
    width: 28px;
    height: 1px;
    background: var(--gold-1);
    opacity: 0.6;
    transition: opacity 0.25s, width 0.25s;
}
.stat-card:hover::before {
    opacity: 1;
    width: 56px;
}
.stat-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(200, 161, 76, 0.06), transparent 60%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s;
}
.stat-card:hover::after { opacity: 1; }
.stat-card .stat-value {
    font-family: var(--font-display);
    font-size: 52px;
    font-weight: 400;
    font-variation-settings: 'opsz' 144, 'SOFT' 30;
    color: var(--ink-1);
    line-height: 0.95;
    margin-bottom: 12px;
    letter-spacing: -0.035em;
    font-variant-numeric: tabular-nums;
}
.stat-card .stat-label {
    font-size: 10px;
    color: var(--ink-3);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-weight: 700;
}
.stat-card.gold   .stat-value { color: var(--gold-2); }
.stat-card.green  .stat-value { color: var(--green); }
.stat-card.orange .stat-value { color: var(--orange); }
.stat-card.red    .stat-value { color: var(--red); }
.stat-card.blue   .stat-value { color: var(--blue); }

/* =========================================================================
 *  ALERTS
 * ========================================================================= */
.alert {
    padding: 12px 14px;
    border-radius: var(--r-sm);
    margin-bottom: 16px;
    font-size: 13px;
    display: none;
    border: 1px solid;
}
.alert.alert-error { background: var(--red-tint); border-color: rgba(217, 105, 98, 0.3); color: var(--red); }
.alert.alert-success { background: var(--green-tint); border-color: rgba(108, 174, 126, 0.3); color: var(--green); }

/* =========================================================================
 *  MODAL — pattern legacy preserve (.modal-overlay = wrapper fullscreen,
 *  .modal = boite interieure). Le HTML existant utilise ces deux classes
 *  separement ; il faut donc restaurer ce pattern, integralement reporte
 *  plus bas dans la section "STYLES PAGE-SPECIFIQUES".
 * ========================================================================= */
@keyframes modalIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes modalContentIn { from { transform: translateY(12px); opacity: 0 } to { transform: none; opacity: 1 } }

/* Modal generique pour vehicles.html (modal-backdrop / modal-box) */
.modal-backdrop {
    position: fixed; inset: 0;
    background: rgba(8, 9, 13, 0.84);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    z-index: 1500; padding: 20px;
    animation: modalIn 0.2s ease;
}
.modal-backdrop.hidden { display: none; }
.modal-box {
    background: var(--bg-1);
    border: 1px solid var(--line-2);
    border-radius: var(--r-lg);
    padding: 32px;
    max-width: 480px;
    width: 100%;
    box-shadow: var(--shadow-3);
    animation: modalContentIn 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-box h3 {
    margin-bottom: 12px;
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 500;
}
.modal-box p {
    margin-bottom: 22px;
    color: var(--ink-2);
    font-size: 13px;
    line-height: 1.6;
}

/* =========================================================================
 *  TOASTS
 * ========================================================================= */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 5000;
    max-width: 380px;
}
.toast {
    background: var(--bg-1);
    border: 1px solid var(--line-2);
    border-radius: var(--r);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 11px;
    color: var(--ink-1);
    font-size: 13px;
    box-shadow: var(--shadow-3);
    animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes toastIn { from { transform: translateX(20px); opacity: 0 } to { transform: none; opacity: 1 } }
.toast.toast-out { animation: toastOut 0.22s ease forwards; }
@keyframes toastOut { to { transform: translateX(20px); opacity: 0 } }
.toast .toast-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 700;
}
.toast.success .toast-icon { background: var(--green-tint);  color: var(--green);  border: 1px solid rgba(108, 174, 126, 0.3); }
.toast.error   .toast-icon { background: var(--red-tint);    color: var(--red);    border: 1px solid rgba(217, 105, 98, 0.3); }
.toast.warning .toast-icon { background: var(--orange-tint); color: var(--orange); border: 1px solid rgba(217, 156, 90, 0.3); }
.toast.info    .toast-icon { background: var(--blue-tint);   color: var(--blue);   border: 1px solid rgba(120, 149, 212, 0.3); }
.toast .toast-msg { flex: 1; line-height: 1.4; }
.toast .toast-close {
    background: transparent;
    border: none;
    color: var(--ink-4);
    cursor: pointer;
    font-size: 14px;
    padding: 0 4px;
}
.toast .toast-close:hover { color: var(--ink-1); }

/* =========================================================================
 *  CONFIRM DIALOG
 * ========================================================================= */
.confirm-overlay {
    position: fixed; inset: 0;
    background: rgba(8, 9, 13, 0.84);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    animation: modalIn 0.2s ease;
}
.confirm-box {
    background: var(--bg-1);
    border: 1px solid var(--line-2);
    border-radius: var(--r-lg);
    padding: 32px;
    max-width: 440px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-3);
}
.confirm-icon { font-size: 38px; margin-bottom: 10px; }
.confirm-title {
    font-family: var(--font-display);
    font-size: 22px;
    margin-bottom: 10px;
    color: var(--ink-1);
    font-weight: 500;
}
.confirm-msg {
    font-size: 13px;
    color: var(--ink-2);
    line-height: 1.6;
    margin-bottom: 24px;
}
.confirm-btns { display: flex; gap: 10px; justify-content: center; }

/* =========================================================================
 *  AUTH PAGES
 * ========================================================================= */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(ellipse at 20% 10%, rgba(200, 161, 76, 0.10), transparent 50%),
        radial-gradient(ellipse at 80% 90%, rgba(120, 149, 212, 0.06), transparent 50%),
        var(--bg-base);
}
.auth-box {
    background: var(--bg-1);
    border: 1px solid var(--line-2);
    border-radius: var(--r-xl);
    padding: 48px 44px;
    width: 100%;
    max-width: 420px;
    text-align: center;
    box-shadow: var(--shadow-3);
    animation: modalContentIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}
/* Decoration : double hairline en haut + or */
.auth-box::before {
    content: '';
    position: absolute;
    top: -1px; left: 32px; right: 32px;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--gold-1), transparent);
}
.auth-box .logo-img {
    width: 124px;
    margin: 0 auto 16px;
    filter: drop-shadow(0 10px 28px rgba(200, 161, 76, 0.32));
}
.auth-box .logo {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 600;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}
.auth-box .logo span { color: var(--gold-1); font-style: italic; }
.auth-box .tagline {
    color: var(--ink-3);
    font-size: 13px;
    font-family: var(--font-display);
    font-style: italic;
    margin-bottom: 36px;
    font-weight: 400;
    letter-spacing: 0.02em;
}
.auth-box form { text-align: left; }
.auth-box .btn-primary {
    width: 100%;
    margin-top: 14px;
    padding: 13px;
    font-size: 14px;
    letter-spacing: 0.02em;
}
.auth-box .auth-footer {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--line-1);
    font-size: 12px;
    color: var(--ink-3);
}

/* =========================================================================
 *  ENTREE — animations subtiles au load (staggered)
 *  IMPORTANT : on exclut les modals/overlays qui peuvent etre dans .main
 *  pour eviter qu'ils heritent d'une opacity:0 a la mauvaise frame.
 * ========================================================================= */
.main > *:not(.modal-overlay):not(.confirm-overlay):not(.modal) { animation: fadeUp 0.45s cubic-bezier(0.16, 1, 0.3, 1) backwards; }
.main > *:not(.modal-overlay):not(.confirm-overlay):not(.modal):nth-child(1) { animation-delay: 0.05s; }
.main > *:not(.modal-overlay):not(.confirm-overlay):not(.modal):nth-child(2) { animation-delay: 0.10s; }
.main > *:not(.modal-overlay):not(.confirm-overlay):not(.modal):nth-child(3) { animation-delay: 0.15s; }
.main > *:not(.modal-overlay):not(.confirm-overlay):not(.modal):nth-child(4) { animation-delay: 0.20s; }
.main > *:not(.modal-overlay):not(.confirm-overlay):not(.modal):nth-child(5) { animation-delay: 0.25s; }
.main > *:not(.modal-overlay):not(.confirm-overlay):not(.modal):nth-child(6) { animation-delay: 0.30s; }
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: none; }
}

/* =========================================================================
 *  UTILITAIRES
 * ========================================================================= */
.hidden { display: none !important; }
.flex { display: flex; }
.flex-1 { flex: 1; }
.gap-1 { gap: 4px; }  .gap-2 { gap: 8px; }  .gap-3 { gap: 12px; }  .gap-4 { gap: 16px; }
.mt-1 { margin-top: 4px; }  .mt-2 { margin-top: 8px; }  .mt-3 { margin-top: 12px; }  .mt-4 { margin-top: 16px; }

/* =========================================================================
 *  RESPONSIVE
 * ========================================================================= */
@media (max-width: 1100px) {
    .layout { grid-template-columns: 220px 1fr; }
    .main { padding: 32px 32px 56px; }
    .page-title { font-size: 38px; }
    .stat-card .stat-value { font-size: 44px; }
}
@media (max-width: 860px) {
    .layout { grid-template-columns: 1fr; }
    .sidebar {
        position: relative;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--line-1);
        padding: 16px;
    }
    .sidebar-brand { margin-bottom: 16px; padding-bottom: 12px; }
    .sidebar-brand-name { display: none; }
    .sidebar nav { flex-direction: row; flex-wrap: wrap; gap: 6px; }
    .nav-section { flex-direction: row; flex-wrap: wrap; gap: 4px; }
    .nav-section-title { display: none; }
    .sidebar-logo { width: 80px; margin: 0 auto 8px; }
    .sidebar-footer { border-top: 1px solid var(--line-1); margin-top: 12px; }
    .main { padding: 24px 18px 48px; }
    .page-title { font-size: 32px; }
    .page-header { flex-direction: column; align-items: stretch; }
    .stat-card { padding: 20px 22px; }
    .stat-card .stat-value { font-size: 38px; }
}

/* =========================================================================
 *  STYLES PAGE-SPECIFIQUES (legacy preserves) — adaptes aux nouveaux tokens.
 * ========================================================================= */

/* === QCM PAGE === */
.qcm-list { display: flex; flex-direction: column; }
.qcm-item { padding: 18px 24px; border-bottom: 1px solid var(--line-1); }
.qcm-item:last-child { border-bottom: none; }
.qcm-item h4 { color: var(--ink-1); margin-bottom: 8px; font-size: 14px; font-weight: 600; }
.qcm-meta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; font-size: 12px; color: var(--ink-3); margin-bottom: 8px; }
.qcm-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.qcm-answer { background: var(--bg-2); padding: 9px 14px; border-radius: var(--r-sm); margin-bottom: 4px; display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.qcm-answer.correct { border-left: 3px solid var(--green); }
.qcm-answer.wrong { border-left: 3px solid var(--red); }
.qcm-form-card { padding: 24px; }
.answers-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.answer-row { display: flex; gap: 8px; align-items: center; }
.answer-row input[type="text"] { flex: 1; }
.btn-remove-answer {
    background: var(--red-tint); border: 1px solid rgba(217, 105, 98, 0.3); color: var(--red);
    padding: 6px 10px; border-radius: 4px; cursor: pointer; font-size: 12px;
}

/* === SERVER PAGE === */
.server-status-card { padding: 24px; display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.status-indicator { width: 14px; height: 14px; border-radius: 50%; background: var(--ink-4); }
.status-indicator.online {
    background: var(--green);
    box-shadow: 0 0 16px rgba(108, 174, 126, 0.6);
    animation: pulseGreen 2.5s ease-in-out infinite;
}
@keyframes pulseGreen {
    0%, 100% { box-shadow: 0 0 12px rgba(108, 174, 126, 0.4); }
    50%      { box-shadow: 0 0 20px rgba(108, 174, 126, 0.8); }
}
.status-indicator.offline { background: var(--red); }
.status-text { flex: 1; }
.status-text h3 { margin-bottom: 4px; }
.status-text .meta { font-size: 12px; color: var(--ink-3); }
.server-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
.server-info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.info-tile { padding: 16px 18px; background: var(--bg-2); border-radius: var(--r-sm); border: 1px solid var(--line-1); }
.info-tile .tile-label { font-size: 10px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.14em; margin-bottom: 4px; font-weight: 700; }
.info-tile .tile-value { font-size: 16px; color: var(--ink-1); font-weight: 600; font-family: var(--font-mono); }

/* === CONSOLE === */
.console-card { padding: 0; overflow: hidden; }
.console-header { padding: 12px 18px; border-bottom: 1px solid var(--line-1); display: flex; justify-content: space-between; align-items: center; }
.console-output {
    background: #050609;
    color: #c8c8c8;
    font-family: var(--font-mono);
    font-size: 12px;
    padding: 16px;
    height: 380px;
    overflow-y: auto;
    line-height: 1.55;
    white-space: pre-wrap;
}
.console-output .log-info    { color: #a0c8ff; }
.console-output .log-warn    { color: var(--orange); }
.console-output .log-error   { color: var(--red); }
.console-output .log-success { color: var(--green); }
.console-input { padding: 10px 14px; border-top: 1px solid var(--line-1); background: var(--bg-2); display: flex; gap: 8px; }
.console-input input {
    flex: 1; padding: 9px 12px; background: var(--bg-3); border: 1px solid var(--line-2);
    border-radius: 4px; color: var(--ink-1); font-family: var(--font-mono); font-size: 12px;
}

/* === ITEMS PAGE — forms specifics === */
.item-full-form { padding: 24px; }
.item-form-top { display: flex; gap: 24px; flex-wrap: wrap; margin-bottom: 16px; }
.form-left { flex: 0 0 200px; }
.form-right { flex: 1; min-width: 240px; }
.item-form-section { padding: 16px 0; border-top: 1px solid var(--line-1); }
.item-form-section:first-of-type { border-top: none; padding-top: 0; }
.section-title { font-size: 10px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.14em; margin-bottom: 10px; }
.storage-checkboxes { display: flex; flex-wrap: wrap; gap: 8px; }
.storage-check {
    display: flex; align-items: center; gap: 8px;
    padding: 7px 12px;
    border-radius: var(--r-sm);
    background: var(--bg-2);
    border: 1px solid var(--line-2);
    cursor: pointer;
    font-size: 13px;
    transition: all 0.18s;
    user-select: none;
}
.storage-check:hover { border-color: var(--line-3); }
.storage-check input:checked + span { color: var(--gold-2); font-weight: 600; }
.toggle-switch { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.toggle-label { font-size: 13px; color: var(--ink-1); }
.toggle-desc { font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.sub-config {
    margin-top: 10px;
    padding: 14px;
    border-radius: var(--r-sm);
    background: var(--bg-2);
    border: 1px solid var(--line-1);
    animation: fadeUp 0.2s ease;
}
.sub-config.hidden { display: none !important; }
.config-row { display: flex; gap: 10px; align-items: flex-end; }
.config-row .form-group { flex: 1; }
.config-row .form-group.small { max-width: 110px; }

/* === FILE UPLOAD === */
.file-upload-zone {
    background: var(--bg-2);
    border: 2px dashed var(--line-3);
    border-radius: var(--r);
    padding: 28px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.file-upload-zone:hover { border-color: var(--gold-1); background: var(--bg-3); }
.file-upload-zone input[type="file"] { position: absolute; opacity: 0; cursor: pointer; inset: 0; width: 100%; height: 100%; }
.file-upload-icon { font-size: 28px; opacity: 0.6; margin-bottom: 8px; }
.file-upload-text { font-size: 12px; color: var(--ink-3); }
.file-preview { max-width: 100%; max-height: 140px; border-radius: var(--r-sm); }

/* === Inventory grid === */
.inventory-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.inv-slot {
    aspect-ratio: 1; background: var(--bg-2); border: 1px solid var(--line-1);
    border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center;
    position: relative; cursor: pointer; transition: all 0.18s;
}
.inv-slot.occupied { border-color: var(--line-3); }
.inv-slot:hover { border-color: var(--gold-1); }
.inv-slot img { max-width: 80%; max-height: 80%; }
.inv-slot .slot-qty {
    position: absolute; bottom: 4px; right: 4px; font-size: 10px;
    background: rgba(0, 0, 0, 0.6); padding: 1px 5px; border-radius: 3px; font-weight: 600;
    font-family: var(--font-mono);
}
.inv-slot .slot-empty-num { color: var(--ink-4); font-size: 11px; font-family: var(--font-mono); }

/* === Status pills === */
.status-actions { display: flex; gap: 8px; }
.status-pending  { color: var(--orange); }
.status-approved { color: var(--green); }
.status-failed   { color: var(--red); }

/* === PROPERTIES grid === */
.properties-grid {
    display: grid; gap: 16px;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.property-card {
    background: var(--bg-1);
    border: 1px solid var(--line-1);
    border-radius: var(--r-lg);
    padding: 20px;
    transition: border-color 0.2s, transform 0.2s;
}
.property-card:hover { border-color: var(--line-3); transform: translateY(-2px); }

/* =========================================================================
 *  RESTAURATION CRITIQUE — modals, items, qcm, banks, properties
 *  Toutes ces regles utilisent les alias de compat (--bg-card, --border, etc.)
 *  et restent visuellement coherentes avec le redesign editorial.
 * ========================================================================= */

/* === MODAL OVERLAY (wrapper fullscreen) === */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(8, 9, 13, 0.78);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    cursor: pointer;
    padding: 20px;
    animation: modalIn 0.2s ease;
}
.modal-overlay.hidden { display: none; }
.modal-overlay > .modal { cursor: default; }

/* === MODAL (boite centrale) === */
.modal {
    background: var(--bg-1);
    border: 1px solid var(--line-2);
    border-radius: var(--r-lg);
    padding: 32px;
    width: 660px;
    max-width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    scrollbar-width: thin;
    box-shadow: var(--shadow-3);
    animation: modalContentIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal h2, .modal h3 {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 500;
    margin-bottom: 18px;
}
.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 22px 26px 16px;
    border-bottom: 1px solid var(--line-1);
}
.modal-header h2, .modal-header h3 { margin: 0; }
.modal-body { padding: 22px 26px; }
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--line-1);
}
.modal-close {
    background: transparent;
    border: none;
    color: var(--ink-3);
    font-size: 18px;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: var(--r-sm);
    transition: all 0.15s;
}
.modal-close:hover { color: var(--ink-1); background: var(--bg-2); }
.modal-answers { margin-bottom: 16px; }
.modal-answer-row {
    display: flex; align-items: center; gap: 10px; margin-bottom: 8px;
}
.modal-answer-row input[type="text"] { flex: 1; }
.modal-answer-row label {
    display: flex; align-items: center; gap: 4px;
    font-size: 12px; color: var(--green); white-space: nowrap; cursor: pointer;
}

/* === QCM PAGE === */
.qcm-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 24px; gap: 14px; flex-wrap: wrap;
}
.setting-inline {
    display: flex; align-items: center; gap: 12px;
    background: var(--bg-1);
    border: 1px solid var(--line-1);
    border-radius: var(--r);
    padding: 12px 18px;
}
.setting-inline label { font-size: 12px; color: var(--ink-3); white-space: nowrap; font-weight: 600; }
.setting-inline input {
    width: 70px; padding: 7px 10px;
    background: var(--bg-2); border: 1px solid var(--line-2);
    border-radius: var(--r-sm); color: var(--ink-1);
    font-size: 13px; text-align: center; outline: none;
    font-family: var(--font-mono);
}
.setting-inline input:focus { border-color: var(--gold-1); box-shadow: 0 0 0 3px var(--gold-tint); }

.question-item {
    padding: 18px 22px;
    border-bottom: 1px solid var(--line-1);
}
.question-item:last-child { border-bottom: none; }
.q-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 10px; gap: 10px;
}
.q-text {
    font-family: var(--font-display);
    font-size: 16px; font-weight: 500;
    color: var(--ink-1); flex: 1;
    line-height: 1.35;
}
.q-actions { display: flex; gap: 6px; flex-shrink: 0; }
.answer-list { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.answer-item {
    background: var(--bg-2);
    padding: 9px 14px;
    border-radius: var(--r-sm);
    font-size: 13px;
    color: var(--ink-2);
    display: flex; align-items: center; justify-content: space-between;
}
.answer-item.correct { border-left: 3px solid var(--green); color: var(--ink-1); }

/* === BANKS PAGE === */
.bank-tabs {
    display: flex; gap: 4px;
    border-bottom: 1px solid var(--line-2);
    margin-bottom: 18px;
}
.bank-tab {
    background: transparent; border: none;
    color: var(--ink-3); font-family: inherit;
    font-size: 13px; font-weight: 600;
    padding: 11px 18px 13px;
    cursor: pointer; position: relative;
    transition: color 0.18s;
}
.bank-tab:hover { color: var(--ink-2); }
.bank-tab.active { color: var(--gold-2); }
.bank-tab.active::after {
    content: ''; position: absolute; bottom: -1px; left: 0; right: 0;
    height: 2px; background: var(--gold-1); border-radius: 1px 1px 0 0;
}
.bank-tab-content { display: none; }
.bank-tab-content.active { display: block; }

.bank-card {
    background: var(--bg-1);
    border: 1px solid var(--line-1);
    border-radius: var(--r-lg);
    padding: 18px 22px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: border-color 0.18s, transform 0.18s;
}
.bank-card:hover { border-color: var(--line-3); transform: translateY(-1px); }
.bank-header {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; margin-bottom: 8px;
}
.bank-name {
    font-family: var(--font-display);
    font-size: 19px; font-weight: 500;
    color: var(--ink-1); letter-spacing: -0.01em;
}
.bank-balance {
    font-family: var(--font-display);
    font-size: 19px; font-weight: 500;
    color: var(--gold-2); font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
}
.bank-meta {
    font-size: 12px; color: var(--ink-3);
    display: flex; gap: 12px; flex-wrap: wrap;
}
.bank-form {
    display: grid; grid-template-columns: 2fr 1fr; gap: 14px;
    align-items: end;
}

.balance-amount {
    font-family: var(--font-display);
    font-size: 36px; font-weight: 500;
    color: var(--gold-2); font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}
.balance-label { font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.12em; font-weight: 600; }
.balance-edit {
    background: transparent; border: 1px solid var(--line-2);
    color: var(--ink-3); padding: 5px 10px;
    border-radius: var(--r-sm); cursor: pointer;
    font-size: 11px; transition: all 0.15s;
}
.balance-edit:hover { border-color: var(--gold-1); color: var(--gold-2); }

.person-row {
    display: flex; align-items: center; gap: 14px;
    padding: 12px 14px;
    background: var(--bg-2);
    border: 1px solid var(--line-1);
    border-radius: var(--r-sm); margin-bottom: 8px;
}
.person-name { flex: 1; font-weight: 600; color: var(--ink-1); }
.person-role { font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.08em; }
.person-balance {
    font-family: var(--font-mono); font-size: 13px;
    color: var(--gold-2); font-variant-numeric: tabular-nums;
}
.person-actions { display: flex; gap: 6px; }
.add-person { display: grid; grid-template-columns: 2fr 1fr auto; gap: 10px; margin-top: 12px; }

.sub-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 12px; align-items: center;
    padding: 12px 14px;
    background: var(--bg-2);
    border: 1px solid var(--line-1);
    border-radius: var(--r-sm); margin-bottom: 8px;
    font-size: 13px;
}

/* === ITEMS PAGE === */
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 14px;
    padding: 22px;
}

.item-card {
    background: var(--bg-2);
    border: 1px solid var(--line-1);
    border-radius: var(--r);
    padding: 18px 14px 14px;
    display: flex; flex-direction: column;
    align-items: center; gap: 10px;
    position: relative;
    transition: border-color 0.18s, transform 0.18s, background 0.18s;
    overflow: hidden;
}
.item-card:hover {
    border-color: var(--gold-1);
    transform: translateY(-2px);
    background: var(--bg-3);
}
.item-card .item-img {
    width: 72px; height: 72px;
    border-radius: var(--r-sm);
    background: rgba(255, 253, 240, 0.025);
    border: 1px solid var(--line-1);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; flex-shrink: 0;
    transition: border-color 0.18s;
}
.item-card:hover .item-img { border-color: var(--line-3); }
.item-card .item-img img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.item-card .item-img .no-img { font-size: 32px; opacity: 0.4; }
.item-card .item-name {
    font-size: 13px; font-weight: 600;
    color: var(--ink-1); text-align: center;
    line-height: 1.3;
    word-break: break-word;
    letter-spacing: -0.005em;
    max-width: 100%;
}
.item-card .item-tags {
    display: flex; flex-wrap: wrap; gap: 4px; justify-content: center;
    font-size: 9px; margin-top: 2px;
    min-height: 14px;
}
.item-tags .tag-usable {
    color: var(--green); font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.08em;
    background: var(--green-tint);
    padding: 2px 6px; border-radius: 99px;
    border: 1px solid rgba(108,174,126,0.25);
}
.item-tags .tag-bag {
    color: var(--orange); font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.08em;
    background: var(--orange-tint);
    padding: 2px 6px; border-radius: 99px;
    border: 1px solid rgba(217,156,90,0.25);
}

/* Boutons d'action overlay (CRITIQUE — bug edit/delete items) */
.item-actions-overlay {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex; gap: 4px;
    opacity: 0;
    transition: opacity 0.18s;
    z-index: 2;
}
.item-card:hover .item-actions-overlay { opacity: 1; }
.item-action-btn {
    width: 28px; height: 28px;
    border-radius: var(--r-sm);
    border: 1px solid var(--line-2);
    background: var(--bg-1);
    color: var(--ink-2);
    font-size: 13px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.15s;
    padding: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.item-action-btn:hover { transform: scale(1.08); }
.item-action-btn.edit:hover {
    color: var(--blue); border-color: rgba(120,149,212,0.5); background: var(--blue-tint);
}
.item-action-btn.delete:hover {
    color: var(--red); border-color: rgba(217,105,98,0.5); background: var(--red-tint);
}

/* === ITEMS PAGE — items.html section-specific === */
.add-item-card {
    background: var(--bg-1);
    border: 1px solid var(--line-1);
    border-radius: var(--r-lg);
    overflow: hidden;
    margin-bottom: 24px;
}

/* === PROPERTIES PAGE === */
.prop-list-card {
    background: var(--bg-1);
    border: 1px solid var(--line-1);
    border-radius: var(--r-lg);
    overflow: hidden;
    margin-bottom: 14px;
    transition: border-color 0.18s, transform 0.18s;
}
.prop-list-card:hover { border-color: var(--line-3); transform: translateY(-1px); }
.prop-list-card.prop-restricted { border-color: rgba(217, 156, 90, 0.3); background: linear-gradient(180deg, var(--orange-tint), var(--bg-1)); }

.prop-list-card-img {
    width: 100%;
    height: 140px;
    background: var(--bg-2);
    background-size: cover;
    background-position: center;
}

.prop-list-info {
    padding: 16px 18px;
    display: flex; flex-direction: column; gap: 8px;
}
.prop-list-name {
    font-family: var(--font-display);
    font-size: 18px; font-weight: 500;
    color: var(--ink-1); letter-spacing: -0.01em;
    line-height: 1.2;
}
.prop-list-header {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px;
}
.prop-list-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 9px; border-radius: 99px;
    font-size: 10px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.1em;
    border: 1px solid var(--line-2);
}
.prop-status-available { background: var(--green-tint); color: var(--green); border-color: rgba(108,174,126,0.3); }
.prop-status-occupied { background: var(--gold-tint); color: var(--gold-2); border-color: rgba(200,161,76,0.3); }
.prop-status-restricted { background: var(--orange-tint); color: var(--orange); border-color: rgba(217,156,90,0.3); }

.prop-list-members {
    display: flex; flex-wrap: wrap; gap: 5px;
    font-size: 11px;
}
.prop-member-tag {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 8px; border-radius: 99px;
    background: var(--bg-2); border: 1px solid var(--line-1);
    color: var(--ink-2);
}
.prop-member-remove {
    background: transparent; border: none; color: var(--red);
    cursor: pointer; padding: 0; font-size: 12px; line-height: 1;
}

.prop-list-actions {
    display: flex; gap: 6px; padding: 0 18px 16px;
}

.prop-empty {
    text-align: center; padding: 60px 20px;
    color: var(--ink-4); font-style: italic;
    font-family: var(--font-display); font-size: 14px;
}

.coords-section {
    padding: 14px 0;
    border-top: 1px solid var(--line-1);
    margin-top: 14px;
}
.coords-section-title {
    font-size: 11px; font-weight: 700;
    color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.12em;
    margin-bottom: 10px;
}
.coords-hint { font-size: 11px; color: var(--ink-4); margin-top: 4px; }
.coords-list { display: flex; flex-direction: column; gap: 6px; }
.coords-empty { font-size: 12px; color: var(--ink-4); padding: 10px; text-align: center; font-style: italic; }
.coord-row {
    display: grid;
    grid-template-columns: 28px 1fr 1fr 1fr auto;
    gap: 8px; align-items: center;
}
.coord-row-num { font-family: var(--font-mono); font-size: 11px; color: var(--ink-4); text-align: center; }
.coord-field input {
    padding: 7px 10px; font-size: 12px;
    font-family: var(--font-mono);
}
.coord-row-val { font-family: var(--font-mono); font-size: 12px; color: var(--ink-2); }
.coord-row-remove {
    background: transparent; border: 1px solid var(--line-2);
    color: var(--red); cursor: pointer;
    width: 28px; height: 28px; border-radius: var(--r-sm);
    font-size: 12px; padding: 0;
    display: flex; align-items: center; justify-content: center;
}
.coords-add-row { display: flex; justify-content: flex-start; margin-top: 8px; }

/* === IMG UPLOAD ZONES (properties + items) === */
.img-upload-zone {
    background: var(--bg-2);
    border: 2px dashed var(--line-3);
    border-radius: var(--r);
    padding: 18px;
    text-align: center;
    cursor: pointer;
    position: relative;
    min-height: 120px;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.18s;
}
.img-upload-zone:hover { border-color: var(--gold-1); background: var(--bg-3); }
.img-upload-zone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.img-upload-preview { max-width: 100%; max-height: 200px; border-radius: var(--r-sm); }
.upload-icon { font-size: 24px; opacity: 0.6; }
.upload-text { font-size: 11px; color: var(--ink-3); margin-top: 6px; }

.img-gallery {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 6px; margin-top: 8px;
}
.img-gallery img {
    width: 100%; aspect-ratio: 1;
    object-fit: cover; border-radius: var(--r-sm);
    border: 1px solid var(--line-2);
}
.img-gallery-remove {
    position: absolute; top: 2px; right: 2px;
    background: rgba(0,0,0,0.7); color: white;
    border: none; border-radius: 50%;
    width: 18px; height: 18px; font-size: 10px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
}

/* === DOORS PAGE === */
.door-card {
    background: var(--bg-1);
    border: 1px solid var(--line-1);
    border-radius: var(--r-lg);
    padding: 16px 18px;
    margin-bottom: 12px;
    transition: border-color 0.18s, transform 0.18s;
}
.door-card:hover { border-color: var(--line-3); transform: translateY(-1px); }
.door-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.door-info {
    font-family: var(--font-mono); font-size: 11px;
    color: var(--ink-3);
    display: flex; gap: 10px; flex-wrap: wrap;
}
.door-uid { color: var(--gold-2); font-weight: 600; }
.door-actions { display: flex; gap: 6px; }
.door-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 8px; border-radius: 99px;
    font-size: 10px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.1em;
}
.badge-locked { background: var(--red-tint); color: var(--red); border: 1px solid rgba(217,105,98,0.3); }
.badge-unlocked { background: var(--green-tint); color: var(--green); border: 1px solid rgba(108,174,126,0.3); }
.badge-double { background: var(--blue-tint); color: var(--blue); border: 1px solid rgba(120,149,212,0.3); }
.badge-static { background: var(--bg-3); color: var(--ink-3); border: 1px solid var(--line-2); }
.badge-armored { background: var(--gold-tint); color: var(--gold-2); border: 1px solid rgba(200,161,76,0.3); }
.door-form {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px; align-items: end;
}
.door-cb {
    display: flex; align-items: center; gap: 6px;
    padding: 8px 12px;
    border: 1px solid var(--line-2);
    border-radius: var(--r-sm); background: var(--bg-2);
    font-size: 12px; cursor: pointer; user-select: none;
}
.door-cb:hover { border-color: var(--line-3); }

/* === SERVER PAGE — additions === */
.server-controls {
    display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
    margin-bottom: 22px;
}
.server-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.server-uptime, .server-status-info { font-family: var(--font-mono); font-size: 12px; color: var(--ink-2); }
.server-status-text {
    font-family: var(--font-display); font-size: 18px; font-weight: 500;
    color: var(--ink-1);
}
.server-indicator { display: inline-block; }

.console-input-bar { display: flex; gap: 8px; padding: 10px; }
.console-wrapper { display: flex; flex-direction: column; height: 480px; }

/* === ACTION MODAL (players page) === */
.action-modal { z-index: 1100; }
.action-tabs {
    display: flex; gap: 4px;
    padding: 0 26px;
    border-bottom: 1px solid var(--line-1);
}
.action-tab {
    background: transparent; border: none;
    color: var(--ink-3); font-family: inherit;
    font-size: 12px; font-weight: 600;
    padding: 10px 14px 12px;
    cursor: pointer; position: relative;
    transition: color 0.18s;
}
.action-tab:hover { color: var(--ink-2); }
.action-tab.active { color: var(--gold-2); }
.action-tab.active::after {
    content: ''; position: absolute; bottom: -1px; left: 0; right: 0;
    height: 2px; background: var(--gold-1);
}
.action-tab-content { display: none; padding: 22px 26px; }
.action-tab-content.active { display: block; }
.action-quick-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }

.action-header {
    padding: 22px 26px 18px;
    border-bottom: 1px solid var(--line-1);
}
.action-header-left {
    display: flex; align-items: center; gap: 14px; margin-bottom: 8px;
}
.action-header-status {
    font-size: 11px; color: var(--ink-3);
    text-transform: uppercase; letter-spacing: 0.1em;
    font-weight: 600;
}

/* === ADD ITEM ROW (action modal: give item) === */
.add-item-body { padding: 16px; }
.add-item-fields { display: grid; grid-template-columns: 2fr 100px auto; gap: 10px; align-items: end; }
.add-item-bottom { padding: 12px 16px; border-top: 1px solid var(--line-1); display: flex; justify-content: flex-end; }
.add-item-title { font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 8px; }
.add-item-preview {
    width: 36px; height: 36px;
    border-radius: var(--r-sm); background: var(--bg-3);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; flex-shrink: 0;
}
.add-item-preview img { width: 100%; height: 100%; object-fit: contain; }
.add-item-select {
    display: flex; align-items: center; gap: 8px;
    padding: 8px; background: var(--bg-2);
    border: 1px solid var(--line-2); border-radius: var(--r-sm);
}
.add-item-dest { display: flex; gap: 4px; flex-wrap: wrap; }
.dest-btn {
    padding: 5px 10px; font-size: 11px;
    background: var(--bg-2); border: 1px solid var(--line-2);
    border-radius: var(--r-sm); color: var(--ink-3);
    cursor: pointer; transition: all 0.15s;
    font-family: inherit; font-weight: 600;
}
.dest-btn:hover { color: var(--ink-1); border-color: var(--line-3); }
.dest-btn.active { background: var(--gold-tint); color: var(--gold-2); border-color: rgba(200,161,76,0.3); }

/* === INVENTORY PANEL (action modal: see player inventory) === */
.inv-panel-grid {
    display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px;
    padding: 14px;
}
.inv-panel-slot {
    aspect-ratio: 1;
    background: var(--bg-2);
    border: 1px solid var(--line-1);
    border-radius: var(--r-sm);
    display: flex; align-items: center; justify-content: center;
    position: relative; cursor: pointer; transition: all 0.15s;
}
.inv-panel-slot.occupied { border-color: var(--line-3); }
.inv-panel-slot:hover { border-color: var(--gold-1); }
.inv-panel-slot-img { max-width: 70%; max-height: 70%; }
.inv-panel-slot-num {
    position: absolute; top: 2px; left: 4px;
    font-family: var(--font-mono); font-size: 9px;
    color: var(--ink-4);
}
.inv-panel-slot-name {
    position: absolute; bottom: 2px; left: 4px; right: 4px;
    font-size: 9px; color: var(--ink-2);
    text-align: center; overflow: hidden;
    text-overflow: ellipsis; white-space: nowrap;
}
.inv-panel-slot-dura {
    position: absolute; bottom: 0; left: 0; right: 0;
    height: 3px; background: var(--bg-3);
    border-radius: 0 0 var(--r-sm) var(--r-sm);
    overflow: hidden;
}
.inv-panel-slot-dura-fill { height: 100%; background: var(--green); }
.inv-panel-slot-tooltip {
    position: absolute; bottom: 100%; left: 50%;
    transform: translateX(-50%);
    background: var(--bg-3); color: var(--ink-1);
    border: 1px solid var(--line-3); border-radius: var(--r-sm);
    padding: 6px 10px; font-size: 11px;
    white-space: nowrap; pointer-events: none;
    opacity: 0; transition: opacity 0.15s;
    z-index: 10;
}
.inv-panel-slot:hover .inv-panel-slot-tooltip { opacity: 1; }
.inv-panel-slot-remove {
    position: absolute; top: 1px; right: 1px;
    width: 14px; height: 14px;
    background: var(--red); color: white;
    border: none; border-radius: 50%;
    font-size: 9px; cursor: pointer;
    display: none; align-items: center; justify-content: center;
}
.inv-panel-slot.occupied:hover .inv-panel-slot-remove { display: flex; }

/* === FORMS layout === */
.form-row { display: flex; gap: 12px; }
.form-row > * { flex: 1; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-1); }
.form-select {
    width: 100%; padding: 11px 14px;
    background: var(--bg-2); border: 1px solid var(--line-2);
    border-radius: var(--r-sm); color: var(--ink-1);
    font-size: 13px; font-family: inherit; outline: none;
}
.form-select:focus { border-color: var(--gold-1); box-shadow: 0 0 0 3px var(--gold-tint); }

.form-grid.small > * { max-width: 110px; }

.toggle-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--line-1);
}
.toggle-row:last-child { border-bottom: none; }

/* === AUTH LOGO PATCH === */
.tagline { color: var(--ink-3); }


/* === PLAYER STATUS BADGES === */
.badge-approved  { background: var(--green-tint); color: var(--green); border: 1px solid rgba(108,174,126,0.3); }
.badge-pending   { background: var(--gold-tint); color: var(--gold-2); border: 1px solid rgba(200,161,76,0.3); }
.badge-qcm_retry { background: var(--orange-tint); color: var(--orange); border: 1px solid rgba(217,156,90,0.3); }
.badge-qcm_failed{ background: var(--red-tint); color: var(--red); border: 1px solid rgba(217,105,98,0.3); }
.badge-banned    { background: var(--red-tint); color: #ff6b6b; border: 1px solid rgba(217,105,98,0.45); font-weight: 700; }

/* === MODAL-ACTIONS (was deleted, restore for vehicles modal-box) === */
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }
