/* ETNL panel — design system */
:root {
    --bg-deep: #050508;
    --bg: #0a0a0c;
    --bg-elevated: #121216;
    --bg-hover: #1a1a20;
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.14);
    --text: #f4f4f5;
    --text-muted: #a1a1aa;
    --accent: #3b82f6;
    --accent-hover: #60a5fa;
    --accent-dim: rgba(59, 130, 246, 0.15);
    --success: #22c55e;
    --warning: #eab308;
    --kick: #f97316;
    --ban: #ef4444;
    --info: #38bdf8;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
    --font: "DM Sans", system-ui, -apple-system, sans-serif;
    --mono: "JetBrains Mono", ui-monospace, monospace;
    --header-h: 64px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body.site-body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.55;
    color: var(--text);
    background: var(--bg-deep);
}

a {
    color: var(--info);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Landing (no nav) */
.site-landing {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.25rem;
    text-align: center;
}

.site-landing__card {
    width: min(440px, 100%);
    padding: 2.5rem 2rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) + 4px);
    box-shadow: var(--shadow);
}

.site-landing__brand {
    font-weight: 700;
    font-size: 1.75rem;
    letter-spacing: -0.02em;
    margin: 0 0 0.5rem;
}

.site-landing__tagline {
    color: var(--text-muted);
    margin: 0 0 2rem;
    font-size: 1rem;
}

.site-landing__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent);
    background: var(--accent-dim);
    border: 1px solid rgba(225, 29, 72, 0.35);
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    margin-bottom: 1.25rem;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--header-h);
    background: rgba(11, 13, 18, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.site-header__inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 1.25rem;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.site-logo {
    font-weight: 700;
    font-size: 1.125rem;
    letter-spacing: -0.02em;
    color: var(--text);
    text-decoration: none;
}

.site-logo:hover {
    color: var(--accent-hover);
    text-decoration: none;
}

.site-nav {
    display: flex;
    gap: 0.25rem;
    flex: 1;
}

.site-nav a {
    padding: 0.5rem 0.85rem;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9375rem;
    text-decoration: none;
}

.site-nav a:hover {
    color: var(--text);
    background: var(--bg-hover);
    text-decoration: none;
}

.site-nav a.is-active {
    color: var(--text);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
}

.site-header__user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.site-mono {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .site-mono {
        display: none;
    }
}

/* Main */
.site-main {
    max-width: 1120px;
    margin: 0 auto;
    padding: 2rem 1.25rem 4rem;
}

.site-page-title {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 0.35rem;
}

.site-page-desc {
    color: var(--text-muted);
    margin: 0 0 2rem;
    font-size: 0.95rem;
}

/* Cards & grid */
.site-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}

.site-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.35rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.site-card--stat {
    text-align: center;
}

.site-card__label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 0.5rem;
}

.site-card__value {
    font-size: 1.75rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    margin: 0;
    color: var(--text);
}

.site-section {
    margin-top: 2rem;
}

.site-section h2 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

/* Tabs (staff) */
.site-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.site-tabs a {
    padding: 0.55rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-muted);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    text-decoration: none;
}

.site-tabs a:hover {
    color: var(--text);
    border-color: var(--border-strong);
    text-decoration: none;
}

.site-tabs a.is-active {
    color: var(--text);
    border-color: var(--accent);
    background: var(--accent-dim);
}

/* Forms */
.site-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.site-form--inline {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem;
}

.site-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.site-field label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
}

.site-input,
.site-select,
.site-textarea {
    font-family: var(--font);
    font-size: 1rem;
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-deep);
    color: var(--text);
    outline: none;
    min-width: 0;
}

.site-input:focus,
.site-select:focus,
.site-textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

.site-textarea {
    min-height: 100px;
    resize: vertical;
}

/* Buttons */
.site-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font);
    font-weight: 600;
    font-size: 0.9375rem;
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.site-btn:hover {
    text-decoration: none;
}

.site-btn--primary {
    background: var(--accent);
    color: #fff;
}

.site-btn--primary:hover {
    background: var(--accent-hover);
    color: #fff;
}

.site-btn--ghost {
    background: transparent;
    border-color: var(--border-strong);
    color: var(--text);
}

.site-btn--ghost:hover {
    background: var(--bg-hover);
    color: var(--text);
}

.site-btn--sm {
    padding: 0.45rem 0.85rem;
    font-size: 0.8125rem;
}

.site-btn--danger {
    background: rgba(225, 29, 72, 0.25);
    color: #fb7185;
    border: 1px solid rgba(225, 29, 72, 0.45);
}

.site-btn--danger:hover {
    background: rgba(225, 29, 72, 0.4);
    color: #fff;
}

.site-btn--block {
    width: 100%;
}

.site-logout-form {
    display: inline;
    margin: 0;
}

/* Tables */
.site-table-wrap {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.site-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.site-table th,
.site-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.site-table th {
    background: var(--bg);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.site-table tr:last-child td {
    border-bottom: none;
}

.site-table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* Lists (logs, warns) */
.site-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-list li {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.site-list li:last-child {
    border-bottom: none;
}

.site-list-meta {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    vertical-align: middle;
}

.badge-site {
    background: rgba(56, 189, 248, 0.2);
    color: var(--info);
}

.badge-warn {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.badge-ban {
    background: rgba(225, 29, 72, 0.2);
    color: var(--accent-hover);
}

.badge-kick {
    background: rgba(248, 113, 113, 0.2);
    color: #f87171;
}

.badge-jail {
    background: rgba(167, 139, 250, 0.2);
    color: #a78bfa;
}

.badge-mute {
    background: rgba(56, 189, 248, 0.2);
    color: var(--info);
}

.badge-gag {
    background: rgba(148, 163, 184, 0.25);
    color: var(--text-muted);
}

.badge-recent {
    background: rgba(34, 197, 94, 0.2);
    color: var(--success);
}

/* Alerts */
.site-alert {
    padding: 1rem 1.15rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.site-alert--success {
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.35);
    color: #86efac;
}

.site-alert--error {
    background: rgba(225, 29, 72, 0.12);
    border: 1px solid rgba(225, 29, 72, 0.35);
    color: #fda4af;
}

/* Narrow form (sanction) */
.site-panel-narrow {
    max-width: 480px;
    margin: 0 auto;
}

/* Footer */
.site-footer {
    max-width: 1120px;
    margin: 0 auto;
    padding: 1.5rem 1.25rem 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.site-footer p {
    margin: 0;
}

/* Legacy helpers used in content */
.container {
    max-width: 1120px;
    margin: 0 auto;
}

.card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.35rem;
    margin-bottom: 1rem;
}

.add-sanction,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius-sm);
    background: var(--accent);
    color: #fff;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.add-sanction:hover,
.btn:hover {
    background: var(--accent-hover);
    color: #fff;
    text-decoration: none;
}

.badge--ok {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.badge--warn {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.badge--muted {
    background: rgba(148, 163, 184, 0.15);
    color: var(--text-muted);
}

/* Staff — presets sanctions */
.site-presets-layout {
    display: grid;
    grid-template-columns: minmax(260px, 340px) 1fr;
    gap: 1.25rem;
    align-items: start;
}

@media (max-width: 900px) {
    .site-presets-layout {
        grid-template-columns: 1fr;
    }
}

.site-presets-sidebar__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.site-presets-row--current td {
    background: rgba(56, 189, 248, 0.08);
}

.site-presets-row--inactive td {
    opacity: 0.65;
}

.site-table--compact th,
.site-table--compact td {
    padding: 0.55rem 0.75rem;
    font-size: 0.85rem;
}

.site-presets-hint {
    margin: 0.75rem 0 0;
    font-size: 0.8125rem;
}

.site-presets-empty {
    min-height: 12rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.site-presets-levels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.site-presets-level {
    margin-bottom: 0;
    padding: 1rem;
}

.site-presets-level--ok {
    border-color: rgba(34, 197, 94, 0.35);
}

.site-presets-level--pending {
    border-color: rgba(245, 158, 11, 0.35);
}

.site-presets-effect-row {
    display: grid;
    grid-template-columns: 7rem 1fr 5rem;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    align-items: center;
}

.site-input--narrow {
    max-width: 5rem;
}

/* ——— Sanctions dashboard ——— */
.san-dash-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.san-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.san-stat-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
    min-height: 5.5rem;
}

.san-stat-card__icon {
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 0.65rem;
}

.san-stat-card--warn .san-stat-card__icon { background: rgba(234, 179, 8, 0.2); color: var(--warning); }
.san-stat-card--kick .san-stat-card__icon { background: rgba(249, 115, 22, 0.2); color: var(--kick); }
.san-stat-card--ban .san-stat-card__icon { background: rgba(239, 68, 68, 0.2); color: var(--ban); }
.san-stat-card--active .san-stat-card__icon { background: rgba(239, 68, 68, 0.12); color: #f87171; }

.san-stat-card__label {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.san-stat-card__value {
    font-size: 1.65rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

.san-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
    margin-bottom: 1rem;
}

.san-toolbar .site-input {
    flex: 1;
    min-width: 220px;
}

.san-record-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.san-record-row {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    gap: 0.85rem;
    align-items: center;
    padding: 0.85rem 1rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

@media (max-width: 720px) {
    .san-record-row {
        grid-template-columns: auto 1fr;
    }
    .san-record-row__sid,
    .san-record-row__actions {
        grid-column: 2;
    }
}

.san-record-row__icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.san-record-row__icon--warn { background: rgba(234, 179, 8, 0.18); color: var(--warning); }
.san-record-row__icon--kick { background: rgba(249, 115, 22, 0.18); color: var(--kick); }
.san-record-row__icon--ban { background: rgba(239, 68, 68, 0.18); color: var(--ban); }
.san-record-row__icon--jail { background: rgba(167, 139, 250, 0.18); color: #a78bfa; }
.san-record-row__icon--mute { background: rgba(56, 189, 248, 0.18); color: var(--info); }
.san-record-row__icon--gag { background: rgba(148, 163, 184, 0.18); color: var(--text-muted); }
.san-record-row__icon--unban { background: rgba(34, 197, 94, 0.18); color: var(--success); }

.san-record-row__top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.25rem;
}

.san-record-row__player {
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
}

.san-record-row__player:hover {
    color: var(--accent-hover);
    text-decoration: none;
}

.san-record-row__reason {
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
}

.san-record-row__meta {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.san-record-row__sid {
    font-size: 0.75rem;
    color: var(--text-muted);
    max-width: 180px;
    text-align: right;
}

.san-template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.85rem;
}

.san-template-card,
.san-fact-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, background 0.15s;
}

.san-template-card--link:hover {
    border-color: var(--accent);
    text-decoration: none;
    color: inherit;
}

.san-template-card.is-current {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent-dim);
}

.san-template-card.is-inactive {
    opacity: 0.55;
}

.san-fact-card {
    cursor: pointer;
    text-align: left;
    width: 100%;
}

.san-fact-card.is-selected {
    border-color: var(--accent);
    background: rgba(59, 130, 246, 0.08);
    box-shadow: 0 0 0 1px var(--accent-dim);
}

.san-template-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.san-template-card__title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1rem;
}

.san-template-card__icon {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.45rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.san-template-card__icon--warn { background: rgba(234, 179, 8, 0.2); color: var(--warning); }
.san-template-card__icon--kick { background: rgba(249, 115, 22, 0.2); color: var(--kick); }
.san-template-card__icon--ban { background: rgba(239, 68, 68, 0.2); color: var(--ban); }
.san-template-card__icon--jail { background: rgba(167, 139, 250, 0.2); color: #a78bfa; }
.san-template-card__icon--mute { background: rgba(56, 189, 248, 0.2); color: var(--info); }
.san-template-card__icon--gag { background: rgba(148, 163, 184, 0.2); color: var(--text-muted); }

.san-template-card__pill {
    font-size: 0.75rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    border: 1px solid var(--border-strong);
    color: var(--text-muted);
    white-space: nowrap;
}

.san-template-card__type {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}

.san-template-card__desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    line-height: 1.45;
    min-height: 2.5rem;
}

.san-template-card__severity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.san-severity-dots {
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
}

.san-severity-dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 999px;
    border: none;
    padding: 0;
    background: var(--border-strong);
    cursor: pointer;
}

.san-severity-dot.is-on {
    background: var(--ban);
}

.san-presets-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.san-presets-head__meta {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.site-panel-wide {
    max-width: 960px;
    margin: 0 auto;
}

/* Membres panel */
.san-members-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 0.5rem; flex-wrap: wrap; }
.san-members-list { display: flex; flex-direction: column; gap: 0.65rem; padding: 1rem; }
.san-member-row { border: 1px solid var(--border); border-radius: var(--radius); background: rgba(255,255,255,0.02); }
.san-member-row--owner { display: flex; align-items: center; gap: 1rem; padding: 1rem; }
.san-member-row__summary { display: flex; align-items: center; gap: 1rem; padding: 1rem; cursor: pointer; list-style: none; }
.san-member-row__summary::-webkit-details-marker { display: none; }
.san-member-row__avatar { width: 2.5rem; height: 2.5rem; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.75rem; flex-shrink: 0; }
.san-member-row__body { flex: 1; min-width: 0; }
.san-member-row__top { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.san-member-row__meta { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.2rem; }
.san-member-badge { font-size: 0.7rem; padding: 0.15rem 0.5rem; border-radius: 999px; background: rgba(59,130,246,0.15); color: var(--accent); border: 1px solid rgba(59,130,246,0.25); }
.san-member-badge--owner { background: rgba(234,179,8,0.12); color: #eab308; border-color: rgba(234,179,8,0.3); }
.san-member-row__panel { padding: 0 1rem 1rem 4.5rem; border-top: 1px solid var(--border); margin-top: -0.25rem; padding-top: 0.75rem; }
.san-member-perms { margin: 0 0 0.75rem; padding-left: 1.1rem; font-size: 0.85rem; color: var(--text-muted); }
.san-member-row__actions { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.san-member-perm-grid { max-height: 280px; overflow: auto; border: 1px solid var(--border); border-radius: var(--radius); padding: 0.75rem; margin-bottom: 1rem; }
.san-member-perm-group { border: none; margin: 0 0 0.75rem; padding: 0; }
.san-member-perm-group legend { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); margin-bottom: 0.35rem; }
.san-member-perm-check { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; margin: 0.25rem 0; cursor: pointer; }
.san-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.san-modal[hidden] { display: none !important; }
.san-modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.65); }
.san-modal__dialog { position: relative; width: min(480px, 100%); max-height: 90vh; overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: calc(var(--radius) + 4px); padding: 1.25rem; box-shadow: 0 24px 48px rgba(0,0,0,0.45); }
.san-modal__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }
.san-modal__head h2 { margin: 0; font-size: 1.15rem; }
.san-modal__close { background: none; border: none; color: var(--text-muted); font-size: 1.5rem; line-height: 1; cursor: pointer; padding: 0; }
.san-modal__foot { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 0.5rem; }
body.san-modal-open { overflow: hidden; }
.san-modal__dialog--wide { width: min(640px, 100%); }
.san-modal__sub { margin: 0.25rem 0 0; font-size: 0.85rem; color: var(--text-muted); }

/* ——— Dossiers staff ——— */
.san-dossier-breadcrumb { margin: 0 0 1rem; font-size: 0.9rem; }
.san-dossier-breadcrumb a { color: var(--text-muted); text-decoration: none; }
.san-dossier-breadcrumb a:hover { color: var(--accent); text-decoration: none; }

.san-dossier-empty {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-muted);
}
.san-dossier-empty p { margin: 0 0 1.25rem; }

.san-dossier-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.san-dossier-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    width: 100%;
    padding: 1.25rem 1.5rem;
    text-decoration: none;
    color: inherit;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.2s, background 0.2s, transform 0.15s;
}
.san-dossier-card:hover {
    border-color: rgba(59, 130, 246, 0.45);
    background: var(--bg-hover);
    text-decoration: none;
    transform: translateY(-1px);
}
.san-dossier-card__avatar {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent) 0%, #6366f1 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}
.san-dossier-card__main { flex: 1; min-width: 0; }
.san-dossier-card__head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    margin-bottom: 0.65rem;
}
.san-dossier-card__name {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.san-dossier-card__poles { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.san-dossier-pill {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: var(--accent-dim);
    color: var(--accent-hover);
    border: 1px solid rgba(59, 130, 246, 0.3);
}
.san-dossier-card__meta {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.5rem 1.25rem;
    margin: 0;
}
.san-dossier-card__meta-item { margin: 0; }
.san-dossier-card__meta dt {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin: 0 0 0.15rem;
}
.san-dossier-card__meta dd {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text);
    word-break: break-word;
}
.san-dossier-card__chevron {
    flex-shrink: 0;
    font-size: 1.75rem;
    line-height: 1;
    color: var(--text-muted);
    opacity: 0.5;
    transition: opacity 0.2s, transform 0.2s;
}
.san-dossier-card:hover .san-dossier-card__chevron {
    opacity: 1;
    color: var(--accent);
    transform: translateX(3px);
}

/* Détail dossier */
.san-dossier-hero {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.5rem 1.75rem;
    margin-bottom: 1.25rem;
}
.san-dossier-hero__avatar {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent) 0%, #6366f1 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.35);
}
.san-dossier-hero__content { flex: 1; min-width: 0; }
.san-dossier-hero__name {
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.san-dossier-hero__poles {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 1rem;
}
.san-dossier-hero__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin: 0;
}
.san-dossier-hero__chips > div {
    padding: 0.45rem 0.75rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
}
.san-dossier-hero__chips dt {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin: 0 0 0.1rem;
}
.san-dossier-hero__chips dd {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 500;
}

.san-dossier-detail {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}
@media (max-width: 900px) {
    .san-dossier-detail { grid-template-columns: 1fr; }
}

.san-dossier-panel { padding: 1.5rem 1.75rem; }
.san-dossier-panel__title {
    margin: 0 0 1.25rem;
    font-size: 1.05rem;
    font-weight: 700;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}
.san-dossier-panel__actions { margin-top: 0.5rem; }
.san-dossier-danger {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.san-dossier-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.san-dossier-form__grid {
    display: grid;
    gap: 1rem;
}
.san-dossier-form__grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 560px) {
    .san-dossier-form__grid--2 { grid-template-columns: 1fr; }
}
.san-dossier-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin: 0;
}
.san-dossier-field--full { grid-column: 1 / -1; }
.san-dossier-field__label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}
.san-dossier-field .site-input,
.san-dossier-field .site-select {
    width: 100%;
    min-width: 0;
}
.san-dossier-textarea {
    min-height: 7rem;
    resize: vertical;
    font-family: var(--font);
    line-height: 1.5;
}
.site-select--full { width: 100%; }
.site-btn--full { width: 100%; justify-content: center; }

.san-dossier-poles-fieldset {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
    margin: 0;
}
.san-dossier-poles-fieldset legend { padding: 0 0.25rem; }
.san-dossier-poles {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}
.san-dossier-pole {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.85rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    font-size: 0.875rem;
    transition: border-color 0.15s, background 0.15s;
}
.san-dossier-pole:has(input:checked) {
    border-color: var(--accent);
    background: var(--accent-dim);
    color: var(--accent-hover);
}
.san-dossier-pole input { accent-color: var(--accent); }

.san-dossier-note-fields { display: flex; flex-direction: column; gap: 1rem; }
.san-dossier-note-fields[hidden] { display: none !important; }

.san-dossier-history { padding: 1.5rem 1.75rem; }
.san-dossier-history__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    height: 1.5rem;
    padding: 0 0.4rem;
    margin-left: 0.35rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 999px;
    background: var(--accent-dim);
    color: var(--accent);
    vertical-align: middle;
}
.san-dossier-history__empty {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.san-dossier-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}
.san-dossier-note {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.1rem 1.25rem;
    background: rgba(255, 255, 255, 0.02);
    border-left: 4px solid var(--border-strong);
}
.san-dossier-note--sanction { border-left-color: var(--ban); background: rgba(239, 68, 68, 0.04); }
.san-dossier-note--promotion { border-left-color: var(--success); background: rgba(34, 197, 94, 0.04); }
.san-dossier-note--info { border-left-color: var(--accent); background: rgba(59, 130, 246, 0.05); }
.san-dossier-note__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}
.san-dossier-note__badge {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
}
.san-dossier-note--sanction .san-dossier-note__badge { color: #fca5a5; background: rgba(239, 68, 68, 0.15); }
.san-dossier-note--promotion .san-dossier-note__badge { color: #86efac; background: rgba(34, 197, 94, 0.15); }
.san-dossier-note--info .san-dossier-note__badge { color: var(--accent-hover); background: var(--accent-dim); }
.san-dossier-note__date { font-size: 0.8rem; color: var(--text-muted); }
.san-dossier-note__summary {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    font-weight: 600;
}
.san-dossier-note__body {
    margin: 0 0 0.75rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.55;
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.2);
}
.san-dossier-note__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
}
.san-dossier-note__author { font-size: 0.75rem; color: var(--text-muted); }
.san-dossier-note__foot form { margin: 0; }

@media (max-width: 640px) {
    .san-dossier-card {
        flex-wrap: wrap;
        padding: 1rem 1.15rem;
    }
    .san-dossier-card__chevron { display: none; }
    .san-dossier-card__meta { grid-template-columns: 1fr 1fr; }
    .san-dossier-hero { flex-direction: column; align-items: center; text-align: center; }
    .san-dossier-hero__chips { justify-content: center; }
}
.san-escalation-form { display: flex; flex-direction: column; gap: 1rem; }
.san-escalation-section h2 { margin: 0 0 1rem; font-size: 1.1rem; }
.san-escalation-section__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.san-escalation-section__head h2 { margin: 0; }
.san-toggle { display: inline-flex; align-items: center; gap: 0.65rem; cursor: pointer; user-select: none; font-size: 0.9rem; }
.san-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.san-toggle__ui { width: 2.75rem; height: 1.5rem; border-radius: 999px; background: var(--border-strong); position: relative; transition: background 0.2s; flex-shrink: 0; }
.san-toggle__ui::after { content: ""; position: absolute; top: 0.15rem; left: 0.15rem; width: 1.2rem; height: 1.2rem; border-radius: 50%; background: #fff; transition: transform 0.2s; }
.san-toggle input:checked + .san-toggle__ui { background: var(--accent); }
.san-toggle input:checked + .san-toggle__ui::after { transform: translateX(1.25rem); }
.san-escalation-sliders { display: flex; flex-direction: column; gap: 1rem; }
.san-escalation-slider label { display: block; font-size: 0.875rem; color: var(--text-muted); margin-bottom: 0.35rem; }
.san-escalation-slider__row { display: flex; align-items: center; gap: 1rem; }
.san-escalation-slider input[type=range] { flex: 1; accent-color: var(--accent); }
.san-escalation-slider output { min-width: 5.5rem; text-align: right; font-weight: 600; color: var(--accent); }
.san-escalation-progress { display: flex; align-items: center; flex-wrap: wrap; gap: 0.35rem 0.5rem; margin-top: 1.25rem; padding: 0.75rem 1rem; border-radius: var(--radius); background: rgba(59, 130, 246, 0.08); border: 1px solid rgba(59, 130, 246, 0.2); font-size: 0.85rem; }
.san-esc-node { color: var(--accent); font-weight: 700; }
.san-esc-arrow { color: var(--text-muted); }
.san-escalation-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.san-escalation-field { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 0.75rem; }
.san-escalation-field span { font-size: 0.875rem; color: var(--text-muted); }
.san-escalation-field small { color: var(--text-muted); font-size: 0.8rem; }
.san-escalation-toggles { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.san-escalation-actions { display: flex; justify-content: flex-end; }
