:root {
  --bg: #05020a;
  --surface: #0d0a14;
  --surface-2: #130f1d;
  --surface-3: #1a1428;
  --line: rgba(226, 196, 255, .10);
  --line-strong: rgba(181, 82, 255, .36);
  --text: #f8f2ff;
  --muted: #a79cb7;
  --accent: #b534ff;
  --legacy-nocturnal-accent-reference: #EB5CE2;
  --legacy-nocturnal-accent-light-reference: #F6B2F1;
  --legacy-nocturnal-accent-dark-reference: #74106F;
  --accent-light: #e7b4ff;
  --accent-dark: #4d0d73;
  --success: #72e3d1;
  --warning: #c98cff;
  --danger: #ef8eb6;
  --info: #9588ff;
  --sidebar-width: 248px;
  --radius: 16px;
  --radius-small: 10px;
  --shadow: 0 24px 60px rgba(0, 0, 0, .24);
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; color: var(--text); background: radial-gradient(circle at 85% -10%, rgba(181, 82, 255, .12), transparent 34rem), radial-gradient(circle at 12% 10%, rgba(109, 40, 217, .08), transparent 26rem), var(--bg); }
body.nav-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: .55rem; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.05; font-weight: 500; letter-spacing: -.035em; }
h2 { margin-bottom: .35rem; font-size: 1.08rem; }
h3 { margin-bottom: .3rem; font-size: .95rem; }
p { line-height: 1.6; }
small { line-height: 1.45; }
code, pre, .technical-value { font-family: "SFMono-Regular", Consolas, monospace; }
code { padding: .12rem .38rem; border: 1px solid var(--line); border-radius: 6px; background: #090909; color: var(--accent-light); }
pre { max-width: 100%; overflow: auto; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius-small); background: #070707; color: #d7d4cd; white-space: pre-wrap; overflow-wrap: anywhere; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 40; width: var(--sidebar-width); display: flex; flex-direction: column; padding: 1rem; border-right: 1px solid var(--line); background: rgba(10, 10, 10, .98); }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.brand { min-width: 0; display: flex; align-items: center; gap: .8rem; padding: .4rem .35rem 1rem; }
.brand img { width: 54px; height: 54px; object-fit: contain; filter: drop-shadow(0 8px 16px rgba(181, 82, 255, .12)); }
.brand > span { display: flex; flex-direction: column; min-width: 0; }
.brand strong { color: var(--accent-light); font-family: Georgia, "Times New Roman", serif; font-size: 1rem; letter-spacing: .16em; }
.brand small { margin-top: .15rem; color: var(--muted); font-size: .72rem; }
.nav-close { display: none; width: 38px; height: 38px; border: 0; border-radius: 10px; color: var(--text); background: transparent; font-size: 1.6rem; cursor: pointer; }
.nav { min-height: 0; flex: 1; overflow-y: auto; padding: .2rem 0 1rem; scrollbar-width: thin; }
.nav-section { margin: 1.15rem .7rem .45rem; color: #77736c; font-size: .67rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.nav a { display: flex; align-items: center; gap: .7rem; min-height: 42px; margin: .18rem 0; padding: .6rem .7rem; border: 1px solid transparent; border-radius: 10px; color: #c7c3ba; font-size: .87rem; font-weight: 650; transition: background .16s ease, border-color .16s ease, color .16s ease; }
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, .035); }
.nav a.active { border-color: rgba(181, 82, 255, .22); color: var(--accent-light); background: linear-gradient(90deg, rgba(181, 82, 255, .14), rgba(181, 82, 255, .04)); }
.nav-icon { width: 25px; height: 25px; flex: 0 0 25px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; color: #aaa69e; font-size: .72rem; font-weight: 900; }
.nav a.active .nav-icon { border-color: rgba(181, 82, 255, .34); color: var(--accent-light); background: rgba(181, 82, 255, .09); }
.sidebar-account { display: flex; align-items: center; gap: .65rem; padding: .8rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.sidebar-account > div { min-width: 0; display: flex; flex-direction: column; }
.sidebar-account strong, .sidebar-account small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-account strong { font-size: .82rem; }
.sidebar-account small { margin-top: .15rem; color: var(--accent); font-size: .68rem; }
.avatar { width: 36px; height: 36px; flex: 0 0 36px; border: 1px solid var(--line-strong); border-radius: 50%; object-fit: cover; background: var(--surface-2); }
.avatar-large { width: 52px; height: 52px; flex-basis: 52px; }
.avatar-fallback { display: grid; place-items: center; color: var(--accent); font-family: Georgia, serif; }
.sidebar-backdrop { display: none; }

.main-shell { grid-column: 2; min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 30; min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem clamp(1rem, 3vw, 2.2rem); border-bottom: 1px solid var(--line); background: rgba(8, 8, 8, .88); backdrop-filter: blur(16px); }
.topbar-title { min-width: 0; display: flex; flex-direction: column; }
.topbar-title span { color: var(--accent); font-size: .65rem; font-weight: 850; letter-spacing: .15em; text-transform: uppercase; }
.topbar-title strong { overflow: hidden; margin-top: .1rem; text-overflow: ellipsis; white-space: nowrap; font-size: .92rem; }
.nav-toggle { display: none; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); background: var(--surface); cursor: pointer; }
.content-shell { width: min(100%, 1460px); margin: 0 auto; padding: clamp(1rem, 3vw, 2.2rem); }

.section-tabs { display: flex; gap: .35rem; margin-bottom: 1.2rem; padding: .35rem; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); scrollbar-width: none; }
.section-tabs::-webkit-scrollbar { display: none; }
.section-tabs a { flex: 0 0 auto; padding: .58rem .85rem; border-radius: 8px; color: var(--muted); font-size: .78rem; font-weight: 750; white-space: nowrap; }
.section-tabs a:hover { color: var(--text); background: var(--surface-2); }
.section-tabs a.active { color: #120e06; background: var(--accent-light); }

.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.25rem; margin-bottom: 1.25rem; }
.page-heading > div { max-width: 850px; }
.page-heading p { max-width: 760px; margin-bottom: 0; color: var(--muted); }
.eyebrow { display: block; margin-bottom: .4rem; color: var(--accent); font-size: .68rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.muted { color: var(--muted); }
.clamp { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.back-link, .text-link { color: var(--accent-light); font-weight: 750; }
.back-link { display: inline-flex; margin-bottom: 1rem; }
.text-link:hover, .back-link:hover { text-decoration: underline; }

.panel, .showcase-card, .metric, .message-card { border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(180deg, rgba(255,255,255,.012), transparent), var(--surface); box-shadow: var(--shadow); }
.panel { min-width: 0; padding: 1.15rem; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-bottom: 1rem; }
.panel-heading h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 1.25rem; font-weight: 500; }
.panel-heading .eyebrow { margin-bottom: .2rem; }
.subpanel { margin-top: 1rem; padding: 1rem; border: 1px solid var(--line); border-radius: 12px; background: #0c0c0c; }
.settings-panel { max-width: 820px; }
.reservation-page-stack { display: grid; gap: 1rem; }

.btn { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .6rem .9rem; border: 1px solid var(--line); border-radius: 10px; color: var(--text); background: var(--surface-2); font-size: .78rem; font-weight: 800; cursor: pointer; transition: transform .14s ease, border-color .14s ease, background .14s ease; }
.btn:hover:not(:disabled) { transform: translateY(-1px); border-color: rgba(181, 82, 255, .28); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { border-color: rgba(181, 82, 255, .45); color: #15061f; background: linear-gradient(180deg, #e9beff, #9b2bff); }
.btn-primary:hover:not(:disabled) { background: linear-gradient(180deg, #f3d6ff, #b534ff); }
.btn-ghost { background: transparent; }
.btn-danger { border-color: rgba(223, 115, 115, .35); color: #ffd2d2; background: rgba(223, 115, 115, .09); }
.btn-small { min-height: 34px; padding: .45rem .7rem; font-size: .72rem; }
.btn-wide { width: 100%; }
.button-row, .action-row, .action-stack, .inline-fields, .inline-action { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; }
.action-stack { align-items: stretch; flex-direction: column; }
.inline-form { margin: 0; }

.metric-grid { display: grid; gap: .8rem; margin-bottom: 1rem; }
.metric-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.metric-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metric-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.metric { min-width: 0; min-height: 128px; display: flex; flex-direction: column; justify-content: space-between; padding: 1rem; box-shadow: none; }
.metric span { color: var(--muted); font-size: .72rem; font-weight: 700; }
.metric strong { margin: .45rem 0 .2rem; overflow-wrap: anywhere; color: var(--text); font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.55rem, 3vw, 2.15rem); font-weight: 500; }
.metric small { color: #77746d; font-size: .69rem; }
.metric.featured { border-color: rgba(181, 82, 255, .28); background: linear-gradient(145deg, rgba(181, 82, 255, .12), rgba(181, 82, 255, .025)), var(--surface); }
.metric.featured strong { color: var(--accent-light); }
.metric-card { display: block; padding: 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.metric-card:hover { border-color: rgba(181, 82, 255, .3); }
.big-value { margin: .65rem 0 1rem; color: var(--accent-light); font-family: Georgia, serif; font-size: 2.2rem; }

.dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.panel-wide { grid-column: 1 / -1; }
.two-column-layout { display: grid; grid-template-columns: minmax(300px, .8fr) minmax(0, 1.4fr); gap: 1rem; align-items: start; }
.sync-grid, .employee-grid, .review-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.admin-card-list, .message-list { display: grid; gap: .8rem; }

.stat-list { display: grid; gap: .15rem; margin-bottom: 1rem; }
.stat-list > div { display: flex; justify-content: space-between; gap: 1rem; padding: .62rem 0; border-bottom: 1px solid var(--line); }
.stat-list span, .detail-list dt, .detail-list > div > span { color: var(--muted); }
.detail-list { display: grid; gap: 0; margin: .5rem 0 0; }
.detail-list > div { min-width: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: .68rem 0; border-bottom: 1px solid var(--line); }
.detail-list > div:last-child { border-bottom: 0; }
.detail-list dt, .detail-list dd { margin: 0; }
.detail-list dd, .detail-list strong { max-width: 65%; text-align: right; overflow-wrap: anywhere; }
.detail-list.compact > div { padding: .48rem 0; }
.technical-block { margin-top: 1rem; padding-top: .5rem; border-top: 1px solid var(--line); }

.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { padding: .76rem .8rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: .76rem; }
th { position: sticky; top: 0; z-index: 1; color: #858179; background: #101010; font-size: .65rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(255, 255, 255, .018); }
td strong { color: #f2eee5; }
.empty-cell { padding: 2rem !important; color: var(--muted); text-align: center !important; }

form { min-width: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.form-grid label, .period-filter label { min-width: 0; display: flex; flex-direction: column; gap: .35rem; color: #d4d0c7; font-size: .73rem; font-weight: 720; }
.full-span { grid-column: 1 / -1; }
input, select, textarea { width: 100%; min-height: 42px; padding: .66rem .72rem; border: 1px solid var(--line); border-radius: 9px; outline: none; color: var(--text); background: #0b0b0b; transition: border-color .15s ease, box-shadow .15s ease, background .15s ease; }
select { appearance: none; padding-right: 2.6rem; cursor: pointer; background-color: #0b0b0b; background-image: linear-gradient(45deg, transparent 50%, var(--accent) 50%), linear-gradient(135deg, var(--accent) 50%, transparent 50%), linear-gradient(to right, rgba(181, 82, 255, .18), rgba(181, 82, 255, .18)); background-position: calc(100% - 17px) 18px, calc(100% - 11px) 18px, calc(100% - 2.4rem) 50%; background-size: 6px 6px, 6px 6px, 1px 22px; background-repeat: no-repeat; }
select:hover { border-color: rgba(181, 82, 255, .34); background-color: #10100f; }
select option { color: var(--text); background: #111111; }
textarea { min-height: 100px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #69665f; }
input:focus, select:focus, textarea:focus { border-color: rgba(181, 82, 255, .55); box-shadow: 0 0 0 3px rgba(181, 82, 255, .08); }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--danger); }
label > small { color: #77746d; font-weight: 450; }
.required-mark { color: var(--accent); }
.field-error { color: #ffaaaa; font-size: .68rem; }
.check-row { display: grid !important; grid-template-columns: auto 1fr; align-items: start; gap: .55rem !important; }
.check-row input { width: 18px; min-height: 18px; margin-top: .08rem; accent-color: var(--accent); }
.search-bar, .period-filter { display: flex; align-items: end; flex-wrap: wrap; gap: .65rem; margin-bottom: 1rem; padding: .75rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.search-bar input { min-width: 220px; flex: 1; }
.search-bar select { max-width: 260px; }
.showcase-filters { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: end; }
.showcase-filters label { min-width: 0; grid-column: span 2; display: flex; flex-direction: column; gap: .35rem; color: #d4d0c7; font-size: .73rem; font-weight: 720; }
.showcase-filters label > small { max-width: 320px; color: #77746d; font-weight: 450; line-height: 1.35; }
.showcase-filters input, .showcase-filters select { min-width: 0; max-width: none; }
.showcase-filters .showcase-search-field { grid-column: span 4; }
.showcase-filters .showcase-sort-field { grid-column: span 3; }
.showcase-filter-actions { min-height: 42px; grid-column: span 3; display: flex; align-items: center; align-self: end; flex-wrap: wrap; gap: .55rem; }
.showcase-status-quick-form { display:grid; grid-template-columns:minmax(220px, 1fr) auto; align-items:end; gap:.7rem; margin:.8rem 0; padding:.75rem; border:1px solid var(--line); border-radius:10px; background:rgba(255,255,255,.018); }
.showcase-status-quick-form label { min-width:0; }
.showcase-status-only-layout { grid-template-columns:1fr; }
.showcase-results-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin: 1.15rem 0 .8rem; }
.showcase-results-heading h2 { margin: .15rem 0 0; font-size: 1.35rem; }
.showcase-results-heading > small { color: var(--muted); }
.showcase-empty-state { grid-column: 1 / -1; }
.period-filter label { min-width: 180px; }
.period-filter .custom-period-field { min-width: 150px; }
.period-filter [hidden] { display: none !important; }
.inline-fields input, .inline-fields select, .action-row input { width: auto; min-width: 150px; }
.danger-row { display: flex; align-items: end; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; padding: .8rem; border: 1px solid rgba(223, 115, 115, .22); border-radius: 10px; background: rgba(223, 115, 115, .045); }
.danger-row input { flex: 1; min-width: 220px; }
.danger-panel { border-color: rgba(223, 115, 115, .24); }

.alert { display: flex; align-items: flex-start; gap: .55rem; margin-bottom: 1rem; padding: .78rem .9rem; border: 1px solid var(--line); border-radius: 10px; color: #d9d5cc; background: var(--surface); font-size: .78rem; line-height: 1.5; }
.alert-success { border-color: rgba(105, 201, 153, .26); background: rgba(105, 201, 153, .07); }
.alert-warning { border-color: rgba(201, 140, 255, .30); background: rgba(201, 140, 255, .08); }
.alert-danger { border-color: rgba(223, 115, 115, .30); background: rgba(223, 115, 115, .08); }
.alert-info { border-color: rgba(124, 167, 223, .28); background: rgba(124, 167, 223, .08); }

.status { display: inline-flex; align-items: center; justify-content: center; gap: .3rem; padding: .3rem .52rem; border: 1px solid var(--line); border-radius: 999px; color: #c7c3ba; background: rgba(255,255,255,.025); font-size: .65rem; font-weight: 800; white-space: nowrap; }
.status-processed, .status-complete, .status-in, .status-manual, .status-validated { border-color: rgba(105, 201, 153, .26); color: #aee5c9; background: rgba(105, 201, 153, .07); }
.status-pending, .status-partial, .status-open { border-color: rgba(201, 140, 255, .30); color: #e6c5ff; background: rgba(201, 140, 255, .08); }
.status-error, .status-conflict, .status-incomplete, .status-out { border-color: rgba(223, 115, 115, .28); color: #f1aaaa; background: rgba(223, 115, 115, .07); }
.status-ignored, .status-cancelled, .status-reversal { color: #8e8a82; }
.status-discord { color: #b8b0ff; border-color: rgba(151, 137, 255, .25); }

.ranking-list { list-style: none; display: grid; gap: .45rem; margin: 0; padding: 0; }
.ranking-list li { display: flex; align-items: center; gap: .7rem; padding: .68rem; border: 1px solid var(--line); border-radius: 10px; background: #0c0c0c; }
.ranking-list li > span, .rank-number { width: 30px; height: 30px; flex: 0 0 30px; display: grid; place-items: center; border: 1px solid rgba(181, 82, 255, .25); border-radius: 50%; color: var(--accent-light); font-size: .72rem; font-weight: 850; }
.ranking-list li > div { min-width: 0; display: flex; flex-direction: column; }
.ranking-list strong, .ranking-list small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ranking-list small { margin-top: .15rem; color: var(--muted); }

.split-preview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; }
.split-preview-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.split-preview div { padding: .72rem; border: 1px solid var(--line); border-radius: 9px; background: #0b0b0b; }
.split-preview span, .split-preview strong { display: block; }
.split-preview span { color: var(--muted); font-size: .68rem; }
.split-preview strong { margin-top: .2rem; color: var(--accent-light); }

.message-card { padding: 1rem; box-shadow: none; }
.message-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: .85rem; }
.message-card-head h2 { margin: 0; font-family: Georgia, serif; font-size: 1.1rem; font-weight: 500; }
.message-normalized { margin: .8rem 0; padding: .85rem; border: 1px solid var(--line); border-radius: 10px; background: #0b0b0b; }
.message-normalized h3 { color: var(--accent-light); }
.message-normalized dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; margin: .7rem 0 0; }
.message-normalized dl div { min-width: 0; padding: .62rem; border: 1px solid var(--line); border-radius: 8px; background: #0e0e0e; }
.message-normalized dt { color: var(--muted); font-size: .66rem; overflow-wrap: anywhere; }
.message-normalized dd { margin: .2rem 0 0; overflow-wrap: anywhere; }
.technical-history { margin-top: .8rem; }
.nested-detail { margin-top: .5rem; }
.comparison-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.comparison-grid > div { padding: .8rem; border: 1px solid var(--line); border-radius: 9px; background: #0b0b0b; }
.reason-list { color: var(--muted); }
.instruction-list { display: grid; gap: .55rem; margin: .6rem 0 0; padding-left: 1.25rem; color: var(--muted); }

.employee-card, .role-card { min-width: 0; }
.employee-profile { display: flex; align-items: center; gap: .7rem; }
.employee-profile h2 { margin: 0; }
.employee-profile p { margin: .1rem 0 0; color: var(--accent); font-size: .72rem; }
.role-card { display: grid; grid-template-columns: minmax(220px, .7fr) minmax(0, 1.3fr); gap: 1rem; padding: 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.permission-groups { display: grid; gap: .65rem; }
.permission-groups fieldset { display: grid; gap: .25rem; padding: .75rem; border: 1px solid var(--line); border-radius: 9px; }
.permission-groups legend { color: var(--accent); font-size: .7rem; font-weight: 850; }
.permission-row { display: grid !important; grid-template-columns: auto 1fr; gap: .55rem !important; align-items: start; padding: .28rem 0; }
.permission-row input { width: 17px; min-height: 17px; }
.permission-row span { display: flex; flex-direction: column; }
.permission-row small { color: var(--muted); font-weight: 450; }

.edit-card { padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
details > summary { cursor: pointer; }
.edit-card > summary { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem; list-style: none; }
.edit-card > summary::-webkit-details-marker { display: none; }
.edit-card > summary::after { content: "+"; width: 28px; height: 28px; flex: 0 0 28px; display: grid; place-items: center; order: 3; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); }
.edit-card[open] > summary::after { content: "−"; color: var(--accent-light); }
.edit-card > summary > div { min-width: 0; display: flex; align-items: center; gap: .7rem; }
.edit-card > summary > div > div { min-width: 0; display: flex; flex-direction: column; }
.edit-card > summary strong, .edit-card > summary small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.edit-card > summary small { color: var(--muted); }
.edit-card > form, .edit-card > .detail-list, .edit-card > .subpanel, .edit-card > .danger-row { margin: 0; padding: 1rem; border-top: 1px solid var(--line); }
.edit-card summary img, .mini-logo { width: 48px; height: 48px; flex: 0 0 48px; border-radius: 9px; object-fit: cover; background: var(--surface-2); }
.mini-logo { display: grid; place-items: center; color: var(--accent); font-family: Georgia, serif; }

.empty-state { grid-column: 1 / -1; padding: 2.5rem 1rem; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); text-align: center; }
.empty-state h2 { color: var(--text); }

.inventory-preview { display: grid; gap: .45rem; margin-bottom: 1rem; }
.inventory-preview > div { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .62rem .7rem; border: 1px solid var(--line); border-radius: 9px; background: #0b0b0b; }
.inventory-preview span { color: #d8d4ca; font-size: .78rem; }
.inventory-preview strong { color: var(--accent-light); }
.inventory-panel { margin-bottom: 1rem; }
.inventory-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7rem; }
.inventory-card { min-width: 0; display: grid; grid-template-columns: 1fr auto; gap: .2rem .7rem; padding: .85rem; border: 1px solid var(--line); border-radius: 11px; background: #0b0b0b; }
.inventory-card span { grid-column: 1 / -1; color: var(--muted); font-size: .65rem; text-transform: uppercase; letter-spacing: .06em; }
.inventory-card strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inventory-card b { color: var(--accent-light); font-family: Georgia, serif; font-size: 1.25rem; font-weight: 500; }
.inventory-card-warning { border-color: rgba(223, 115, 115, .34); }
.text-danger { color: var(--danger) !important; }
.page-divider { height: 1px; margin: 1.5rem 0; background: var(--line); }
.compact-heading { align-items: flex-start; margin-bottom: .8rem; }
.form-help { margin: 0; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: #0b0b0b; font-size: .75rem; }
.employee-summary-card { display: flex; flex-direction: column; gap: 1rem; }
.employee-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .8rem; }
.employee-period-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.employee-period-grid > div { min-width: 0; padding: .75rem; border: 1px solid var(--line); border-radius: 10px; background: #0b0b0b; }
.employee-period-grid > div.featured { border-color: rgba(181, 82, 255, .28); background: rgba(181, 82, 255, .07); }
.employee-period-grid span, .employee-period-grid strong, .employee-period-grid small { display: block; }
.employee-period-grid span { color: var(--muted); font-size: .66rem; text-transform: uppercase; letter-spacing: .05em; }
.employee-period-grid strong { margin-top: .28rem; color: var(--text); }
.employee-period-grid small { margin-top: .18rem; color: #77746d; }
.employee-detail-heading { display: flex; align-items: center; gap: 1rem; }
.employee-detail-avatar { width: 76px; height: 76px; flex-basis: 76px; }
.lifetime-panel .employee-period-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.chest-period-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.chest-period-summary > div { padding: .85rem; border: 1px solid var(--line); border-radius: 10px; background: #0b0b0b; }
.chest-period-summary span, .chest-period-summary strong, .chest-period-summary small { display: block; }
.chest-period-summary span { color: var(--muted); font-size: .66rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.chest-period-summary strong { margin-top: .35rem; color: var(--accent-light); font-size: 1.05rem; }
.chest-period-summary small { margin-top: .18rem; color: #8f8b82; }
.simple-details { margin-top: 1rem; border-top: 1px solid var(--line); }
.simple-details > summary { padding: .85rem 0; color: var(--accent-light); cursor: pointer; font-weight: 750; }

.public-header { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem clamp(1rem, 5vw, 4rem); border-bottom: 1px solid var(--line); background: rgba(8,8,8,.9); backdrop-filter: blur(14px); }
.public-brand { display: flex; align-items: center; gap: .7rem; color: var(--accent-light); font-family: Georgia, serif; letter-spacing: .16em; }
.public-brand img { width: 50px; height: 50px; object-fit: contain; }
.public-header nav { display: flex; align-items: center; gap: 1rem; }
.public-main { width: min(100%, 1460px); margin: 0 auto; padding: clamp(1rem, 4vw, 3rem); }
.hero { min-height: 320px; display: flex; align-items: center; justify-content: space-between; gap: 2rem; margin-bottom: 1rem; padding: clamp(1.5rem, 4vw, 3.5rem); overflow: hidden; border: 1px solid var(--line); border-radius: 24px; background: radial-gradient(circle at 85% 50%, rgba(181,82,255,.13), transparent 22rem), linear-gradient(135deg, #151515, #0a0a0a); }
.hero > div { max-width: 720px; }
.hero h1 { font-size: clamp(2.5rem, 6vw, 5rem); }
.hero p { color: var(--muted); font-size: 1rem; }
.hero img { width: min(32vw, 340px); max-height: 290px; object-fit: contain; filter: drop-shadow(0 25px 45px rgba(181,82,255,.14)); }
.showcase-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.showcase-card { min-width: 0; overflow: hidden; display: flex; flex-direction: column; height: 100%; box-shadow: none; transition: transform .16s ease, border-color .16s ease; }
.showcase-card:hover { transform: translateY(-2px); border-color: rgba(181, 82, 255, .28); }
.showcase-image { min-height: 230px; display: grid; place-items: center; overflow: hidden; background: radial-gradient(circle, rgba(181,82,255,.07), transparent 60%), #0b0b0b; }
.showcase-image img { width: 100%; height: 230px; object-fit: cover; }
.showcase-image img.showcase-placeholder-image { object-fit: contain; background: #050505; }
.showcase-detail-image img.showcase-placeholder-image { object-fit: contain; background: #050505; }
.edit-card summary img.showcase-placeholder-image { object-fit: contain; background: #050505; }
.showcase-image span { color: rgba(181,82,255,.34); font-family: Georgia, serif; letter-spacing: .25em; }
.showcase-card-body { padding: 1rem; display: flex; flex: 1 1 auto; flex-direction: column; }
.showcase-card-head { display: flex; align-items: center; justify-content: space-between; gap: .7rem; color: var(--accent); font-size: .68rem; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; }
.showcase-card-head strong { color: var(--accent-light); font-family: Georgia, serif; font-size: 1.05rem; letter-spacing: 0; }
.showcase-card h2 { margin: .85rem 0 .08rem; font-family: Georgia, serif; font-size: 1.45rem; font-weight: 500; }
.showcase-name { margin-bottom: .75rem; color: #cac6bd; }
.showcase-detail { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr); gap: 1.25rem; align-items: center; }
.showcase-detail-image { min-height: 500px; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: radial-gradient(circle, rgba(181,82,255,.09), transparent 55%), var(--surface); }
.showcase-detail-image img { width: 100%; height: 500px; object-fit: contain; }
.showcase-detail-copy { padding: 1rem; }
.showcase-detail-copy h1 span { color: var(--accent-light); }
.price-display { margin: 1rem 0; color: var(--accent-light); font-family: Georgia, serif; font-size: 2.5rem; }

.login-layout { min-height: calc(100vh - 120px); display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 1.5rem; }
.login-visual { min-height: 520px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 24px; background: radial-gradient(circle, rgba(181,82,255,.12), transparent 55%), #0b0b0b; }
.login-visual img { width: min(80%, 460px); max-height: 460px; object-fit: contain; }
.login-panel { max-width: 520px; padding: 2rem; }
.login-panel p { color: var(--muted); }

.site-modal[hidden] { display: none; }
.site-modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 1rem; }
.site-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.78); backdrop-filter: blur(5px); }
.site-modal-panel { position: relative; width: min(100%, 440px); padding: 1.35rem; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); box-shadow: 0 30px 100px rgba(0,0,0,.55); }
.site-modal-icon { width: 42px; height: 42px; display: grid; place-items: center; margin-bottom: .9rem; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--accent); }
.site-modal-actions { display: flex; justify-content: flex-end; gap: .55rem; }
.modal-open { overflow: hidden; }

.error-page { min-height: 60vh; display: grid; place-content: center; justify-items: start; max-width: 680px; }
.cef-body { overflow: auto; background: transparent; }
.cef-shell { min-height: 100vh; padding: 1rem; background: rgba(8,8,8,.97); }
.cef-header { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; padding: .65rem .8rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.cef-header img { width: 54px; height: 54px; object-fit: contain; }
.cef-header div { display: flex; flex: 1; flex-direction: column; }
.cef-header span { color: var(--accent); font-size: .65rem; letter-spacing: .15em; text-transform: uppercase; }
.cef-header strong { font-family: Georgia, serif; font-size: 1.15rem; }

@media (max-width: 1180px) {
  :root { --sidebar-width: 225px; }
  .metric-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .showcase-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two-column-layout { grid-template-columns: 1fr; }
  .panel-wide { grid-column: auto; }
}

@media (max-width: 860px) {
  .app-shell { display: block; }
  .sidebar { transform: translateX(-105%); transition: transform .2s ease; box-shadow: 20px 0 60px rgba(0,0,0,.5); }
  .nav-open .sidebar { transform: translateX(0); }
  .nav-close, .nav-toggle { display: grid; place-items: center; }
  .sidebar-backdrop { position: fixed; inset: 0; z-index: 35; display: block; pointer-events: none; opacity: 0; background: rgba(0,0,0,.68); transition: opacity .2s ease; }
  .nav-open .sidebar-backdrop { pointer-events: auto; opacity: 1; }
  .main-shell { grid-column: auto; }
  .topbar { min-height: 64px; }
  .content-shell { padding: 1rem; }
  .dashboard-grid, .sync-grid, .employee-grid, .review-grid, .role-card { grid-template-columns: 1fr; }
  .message-normalized dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .showcase-detail { grid-template-columns: 1fr; }
  .showcase-detail-image { min-height: 350px; }
  .showcase-detail-image img { height: 350px; }
  .login-layout { grid-template-columns: 1fr; }
  .login-visual { min-height: 320px; }
  .login-visual img { max-height: 300px; }
  .hero { min-height: 280px; }
  .hero img { width: 220px; }
}


@media (max-width: 1100px) {
  .showcase-filters { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .showcase-filters .showcase-search-field { grid-column: span 6; }
  .showcase-filters label { grid-column: span 2; }
  .showcase-filters .showcase-sort-field { grid-column: span 3; }
  .showcase-filter-actions { grid-column: span 3; }
}
@media (max-width: 620px) {
  h1 { font-size: 2rem; }
  .topbar { padding: .7rem .8rem; }
  .topbar-title span { display: none; }
  .page-heading { align-items: stretch; flex-direction: column; }
  .page-heading > .btn, .page-heading > form { width: 100%; }
  .metric-grid-2, .metric-grid-3, .metric-grid-4 { grid-template-columns: 1fr 1fr; }
  .metric { min-height: 112px; }
  .metric strong { font-size: 1.55rem; }
  .form-grid { grid-template-columns: 1fr; }
  .full-span { grid-column: auto; }
  .search-bar, .period-filter { align-items: stretch; flex-direction: column; }
  .showcase-filters { display:grid; grid-template-columns:1fr; }
  .search-bar input, .search-bar select, .period-filter label { width: 100%; max-width: none; min-width: 0; }
  .showcase-filters label, .showcase-filters .showcase-search-field, .showcase-filters .showcase-price-field, .showcase-filters .showcase-capacity-filter, .showcase-filters .showcase-sort-field { width: 100%; max-width: none; min-width: 0; grid-column:1; }
  .showcase-filter-actions { width: 100%; grid-column:1; align-self: stretch; }
  .showcase-status-quick-form { grid-template-columns:1fr; }
  .showcase-filter-actions .btn { flex: 1; }
  .showcase-results-heading { align-items: flex-start; flex-direction: column; gap: .25rem; }
  .button-row, .action-row, .inline-fields, .danger-row { align-items: stretch; flex-direction: column; }
  .button-row .btn, .action-row .btn, .inline-fields .btn, .danger-row .btn, .inline-fields input, .inline-fields select, .action-row input, .danger-row input { width: 100%; min-width: 0; }
  .split-preview, .split-preview-2 { grid-template-columns: 1fr; }
  .message-normalized dl { grid-template-columns: 1fr; }
  .comparison-grid { grid-template-columns: 1fr; }
  .showcase-grid { grid-template-columns: 1fr; }
  .inventory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .employee-period-grid, .lifetime-panel .employee-period-grid, .chest-period-summary { grid-template-columns: 1fr; }
  .hero { min-height: 0; align-items: flex-start; flex-direction: column; }
  .hero img { align-self: center; width: 180px; }
  .public-header { padding: .65rem .8rem; }
  .public-brand span, .public-header nav > a:first-child { display: none; }
  .showcase-detail-image { min-height: 280px; }
  .showcase-detail-image img { height: 280px; }
  .edit-card > summary { align-items: flex-start; }
  .edit-card > summary .status { display: none; }
  .detail-list > div { flex-direction: column; gap: .22rem; }
  .detail-list dd, .detail-list strong { max-width: 100%; text-align: left; }
  table { min-width: 650px; }
}

@media (max-width: 420px) {
  .metric-grid-2, .metric-grid-3, .metric-grid-4 { grid-template-columns: 1fr; }
  .topbar .btn { padding-inline: .6rem; }
}
.inventory-card-positive { border-color: rgba(105, 201, 153, .34); background: rgba(105, 201, 153, .045); }
.inventory-row-positive { border-color: rgba(105, 201, 153, .2) !important; background: rgba(105, 201, 153, .035) !important; }
.inventory-row-warning { border-color: rgba(223, 115, 115, .25) !important; background: rgba(223, 115, 115, .045) !important; }
.text-success { color: var(--success) !important; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.2rem; }
.alert-list { display: grid; gap: .55rem; }
.alert-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem .85rem; border: 1px solid rgba(223, 115, 115, .24); border-radius: 10px; background: rgba(223, 115, 115, .055); }
.alert-row > div { min-width: 0; display: flex; flex-direction: column; }
.alert-row small { color: var(--muted); }
.alert-row > span { color: #f2b1b1; font-size: .76rem; font-weight: 750; text-align: right; }
.allowance-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; margin-bottom: .8rem; }
.allowance-grid > div { padding: .8rem; border: 1px solid var(--line); border-radius: 10px; background: #0b0b0b; }
.allowance-grid span, .allowance-grid strong, .allowance-grid small { display: block; }
.allowance-grid span { color: var(--muted); font-size: .67rem; text-transform: uppercase; letter-spacing: .05em; }
.allowance-grid strong { margin-top: .25rem; color: var(--accent-light); font-size: 1.15rem; }
.allowance-grid small { margin-top: .18rem; color: #858178; }
.role-create-panel, .roles-list-panel { width: 100%; margin-bottom: 1rem; }
.role-create-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.role-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem; padding: .8rem; border: 1px solid var(--line); border-radius: 10px; background: #0b0b0b; }
.permission-groups-wide { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
.tax-bracket-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; }
.tax-bracket { padding: .85rem; border: 1px solid var(--line); border-radius: 10px; background: #0b0b0b; }
.tax-bracket span, .tax-bracket strong, .tax-bracket small { display: block; }
.tax-bracket span { color: var(--muted); font-size: .68rem; }
.tax-bracket strong { margin-top: .25rem; color: var(--accent-light); font-size: 1.05rem; }
.tax-bracket small { margin-top: .2rem; color: #858178; }
.tax-lines { display: grid; gap: .45rem; }
.tax-line { display: grid; grid-template-columns: 1fr auto auto; gap: .8rem; align-items: center; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 9px; background: #0b0b0b; }
.tax-line small { color: var(--muted); }
@media (max-width: 900px) {
  .permission-groups-wide, .tax-bracket-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .role-options { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .role-create-form, .permission-groups-wide, .tax-bracket-grid, .allowance-grid { grid-template-columns: 1fr; }
  .alert-row { align-items: flex-start; flex-direction: column; }
  .alert-row > span { text-align: left; }
  .tax-line { grid-template-columns: 1fr; }
}
.status-to_pay { border-color: rgba(201, 140, 255, .30); color: #e6c5ff; background: rgba(201, 140, 255, .08); }
.status-overdue { border-color: rgba(223, 115, 115, .3); color: #f1aaaa; background: rgba(223, 115, 115, .08); }
.status-paid { border-color: rgba(105, 201, 153, .28); color: #aee5c9; background: rgba(105, 201, 153, .07); }

.nav-section { position: relative; padding-left: .7rem; }
.nav-section::before { content: ""; position: absolute; left: 0; top: .08rem; bottom: .08rem; width: 3px; border-radius: 99px; background: currentColor; opacity: .85; }
.nav-section-personal { color: #7eb7e8; }
.nav-section-management { color: var(--accent-light); }
.nav-section-admin { color: #bd91e6; }

.custom-select { position: relative; width: 100%; min-width: 0; }
.custom-select-native { position: absolute !important; width: 1px !important; height: 1px !important; min-height: 0 !important; padding: 0 !important; opacity: 0; pointer-events: none; overflow: hidden; }
.custom-select-button { width: 100%; min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .7rem .78rem; border: 1px solid var(--line); border-radius: 10px; color: var(--text); background: linear-gradient(180deg, #11110f, #0b0b0b); cursor: pointer; text-align: left; transition: border-color .15s ease, box-shadow .15s ease, background .15s ease; }
.custom-select-button:hover, .custom-select.open .custom-select-button { border-color: rgba(181, 82, 255, .46); background: #121210; }
.custom-select-button:focus-visible { outline: none; border-color: rgba(181, 82, 255, .62); box-shadow: 0 0 0 3px rgba(181, 82, 255, .09); }
.custom-select-button.placeholder { color: #827e76; }
.custom-select-arrow { flex: 0 0 auto; color: var(--accent); font-size: 1rem; transition: transform .15s ease; }
.custom-select.open .custom-select-arrow { transform: rotate(180deg); }
.custom-select-menu { position: absolute; z-index: 80; top: calc(100% + .4rem); left: 0; right: 0; max-height: 280px; display: none; overflow-y: auto; padding: .35rem; border: 1px solid rgba(181, 82, 255, .3); border-radius: 11px; background: #12101a; box-shadow: 0 18px 48px rgba(0, 0, 0, .55); }
.custom-select.open .custom-select-menu { display: grid; gap: .18rem; }
.custom-select-option { width: 100%; padding: .62rem .7rem; border: 0; border-radius: 8px; color: #d9d5cc; background: transparent; cursor: pointer; text-align: left; }
.custom-select-option:hover, .custom-select-option:focus-visible { outline: none; color: #fff; background: rgba(181, 82, 255, .1); }
.custom-select-option.selected { color: var(--accent-light); background: rgba(181, 82, 255, .13); font-weight: 750; }
.custom-select-option:disabled { opacity: .45; cursor: not-allowed; }
.custom-select + .field-error, .custom-select[aria-invalid="true"] { margin-top: .3rem; }
.inline-fields .custom-select, .action-row .custom-select, .danger-row .custom-select { width: auto; min-width: 180px; }

.settings-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; align-items: start; max-width: 900px; }

.contract-list { display: grid; gap: 1rem; }
.contract-card { overflow: hidden; }
.contract-pending { border-color: rgba(181, 82, 255, .35); }
.contract-content { margin: 1rem 0; padding: 1rem; border: 1px solid var(--line); border-radius: 12px; background: #0b0b0b; color: #d7d3cb; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.contract-upload { position: relative; display: grid; gap: .35rem; padding: 1rem; border: 1px dashed rgba(181, 82, 255, .38); border-radius: 12px; background: rgba(181, 82, 255, .035); cursor: pointer; }
.contract-upload:hover, .contract-upload:focus-within { border-color: rgba(181, 82, 255, .72); background: rgba(181, 82, 255, .065); }
.contract-upload > span { color: var(--accent); font-size: .72rem; font-weight: 800; text-transform: uppercase; }
.contract-upload > strong { color: #e1ddd4; font-size: .88rem; }
.contract-upload > small { color: var(--muted); }
.contract-upload input[type="file"] { width: 100%; min-height: 42px; padding: .5rem; border: 1px solid var(--line); border-radius: 9px; background: #0b0b0b; color: var(--muted); cursor: pointer; }
.contract-upload input[type="file"]::file-selector-button { margin-right: .65rem; padding: .45rem .65rem; border: 1px solid rgba(181, 82, 255, .28); border-radius: 7px; color: var(--accent-light); background: rgba(181, 82, 255, .08); cursor: pointer; }
.contract-file-summary { display: grid; gap: .65rem; padding: .8rem; border: 1px solid rgba(126, 183, 232, .24); border-radius: 11px; background: rgba(126, 183, 232, .045); }
.contract-file-summary > div { display: flex; min-width: 0; flex-direction: column; }
.contract-file-summary > div span { color: #9dcaf0; font-size: .68rem; font-weight: 800; text-transform: uppercase; }
.contract-file-summary > div strong { overflow-wrap: anywhere; }
.contract-file-summary > div small { margin-top: .15rem; color: var(--muted); }
.contract-pdf-preview > summary { width: max-content; list-style: none; }
.contract-pdf-preview > summary::-webkit-details-marker { display: none; }
.contract-pdf-preview iframe { width: 100%; height: min(70vh, 720px); margin-top: .65rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.contract-pdf-reader { margin: 1rem 0; overflow: hidden; border: 1px solid rgba(126, 183, 232, .26); border-radius: 12px; background: #090909; }
.contract-pdf-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem .9rem; border-bottom: 1px solid var(--line); background: rgba(126, 183, 232, .045); }
.contract-pdf-heading > div { display: flex; min-width: 0; flex-direction: column; }
.contract-pdf-heading span { color: #9dcaf0; font-size: .66rem; font-weight: 800; text-transform: uppercase; }
.contract-pdf-heading strong { overflow-wrap: anywhere; }
.contract-pdf-heading small { color: var(--muted); text-align: right; }
.contract-pdf-reader iframe { display: block; width: 100%; height: min(78vh, 900px); border: 0; background: #fff; }
.contract-sign-form { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: .9rem; border-top: 1px solid var(--line); }
.contract-accept { padding: .75rem .9rem; border: 1px solid rgba(181, 82, 255, .24); border-radius: 10px; background: rgba(181, 82, 255, .05); }
.signature-proof { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem .9rem; border: 1px solid rgba(105, 201, 153, .25); border-radius: 10px; background: rgba(105, 201, 153, .055); }
.signature-proof strong { color: #aee5c9; }
.signature-proof span { color: var(--muted); }
.contracts-admin-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.contract-template-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.contract-template-card { margin: 0; }
.contract-template-card > summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.contract-template-card > summary > span:first-child { display: flex; min-width: 0; flex-direction: column; }
.contract-template-card > summary small { margin-top: .18rem; color: var(--muted); }
.details-form { margin-top: .8rem; }
.info-card { margin-top: 1rem; padding: .85rem; border: 1px solid rgba(126, 183, 232, .2); border-radius: 10px; background: rgba(126, 183, 232, .045); }
.info-card p { margin: .3rem 0 0; color: var(--muted); }

.absence-layout { grid-template-columns: minmax(300px, .72fr) minmax(0, 1.28fr); }
.absence-list { display: grid; gap: .55rem; max-height: 430px; overflow-y: auto; }
.absence-list-item { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .75rem; border: 1px solid var(--line); border-radius: 10px; background: #0b0b0b; }
.absence-list-item > div:first-child { min-width: 0; display: flex; flex-direction: column; }
.absence-list-item span { margin-top: .12rem; color: var(--accent-light); font-size: .76rem; }
.absence-list-item small { margin-top: .18rem; color: var(--muted); overflow-wrap: anywhere; }
.calendar-panel { overflow: hidden; }
.calendar-toolbar { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.calendar-toolbar > div { text-align: center; }
.calendar-toolbar h2 { margin: .15rem 0 0; }
.absence-calendar { display: grid; grid-template-columns: repeat(7, minmax(110px, 1fr)); min-width: 820px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.calendar-panel { overflow-x: auto; }
.calendar-weekday { padding: .6rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--accent); font-size: .7rem; font-weight: 850; text-align: center; text-transform: uppercase; }
.calendar-day { min-height: 125px; padding: .55rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #0b0b0b; }
.calendar-day.outside-month { opacity: .38; background: #080808; }
.calendar-date { display: inline-grid; width: 26px; height: 26px; place-items: center; border-radius: 50%; color: #bdb8ae; font-size: .74rem; }
.calendar-events { display: grid; gap: .3rem; margin-top: .35rem; }
.calendar-event { padding: .38rem .45rem; border: 1px solid rgba(126, 183, 232, .24); border-radius: 7px; background: rgba(126, 183, 232, .08); overflow: hidden; }
.calendar-event strong, .calendar-event span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calendar-event strong { color: #b9dcfa; font-size: .68rem; }
.calendar-event span { margin-top: .08rem; color: #8e9eab; font-size: .61rem; }

.warning-form { margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.warning-list { display: grid; gap: .65rem; }
.warning-card { padding: .85rem; border: 1px solid rgba(201, 140, 255, .26); border-radius: 11px; background: rgba(201, 140, 255, .055); }
.warning-card-notice { border-color: rgba(126, 183, 232, .25); background: rgba(126, 183, 232, .045); }
.warning-card-serious { border-color: rgba(223, 115, 115, .3); background: rgba(223, 115, 115, .06); }
.warning-card.warning-resolved { opacity: .65; border-color: var(--line); background: #0b0b0b; }
.warning-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.warning-card-head > div { display: flex; flex-direction: column; }
.warning-card-head > div span { margin-top: .15rem; color: var(--muted); font-size: .68rem; }
.warning-card p { margin: .65rem 0; color: #d4d0c7; }
.warning-card small { color: var(--muted); }
.resolution-note { display: flex; gap: .45rem; margin-top: .65rem; color: var(--muted); font-size: .74rem; }
.personal-notices-panel { display: grid; gap: .6rem; }
.notice-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem; border: 1px solid var(--line); border-radius: 10px; background: #0b0b0b; }
.notice-row > div { min-width: 0; display: flex; flex-direction: column; }
.notice-row span, .notice-row small { margin-top: .15rem; color: var(--muted); }
.notice-contract { border-color: rgba(181, 82, 255, .28); }
.notice-warning { border-color: rgba(201, 140, 255, .28); }
.notice-warning-serious { border-color: rgba(223, 115, 115, .32); }

.treasury-total-panel { display: grid; grid-template-columns: minmax(240px, .8fr) minmax(0, 1.2fr) auto; gap: 1rem; align-items: center; margin-bottom: 1rem; border-color: rgba(181, 82, 255, .3); background: radial-gradient(circle at left, rgba(181, 82, 255, .08), transparent 45%), var(--surface); }
.treasury-total-main { display: flex; flex-direction: column; }
.treasury-total-main > span { color: var(--accent); font-size: .72rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.treasury-total-main > strong { margin-top: .25rem; color: var(--accent-light); font-family: Georgia, serif; font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 500; }
.treasury-total-main > small { color: var(--muted); }
.treasury-breakdown { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; }
.treasury-breakdown > div { padding: .7rem; border: 1px solid var(--line); border-radius: 9px; background: rgba(8,8,8,.65); }
.treasury-breakdown span, .treasury-breakdown strong { display: block; }
.treasury-breakdown span { color: var(--muted); font-size: .65rem; }
.treasury-breakdown strong { margin-top: .2rem; color: #ddd8ce; }
.treasury-form { grid-column: 1 / -1; padding-top: 1rem; border-top: 1px solid var(--line); }

@media (max-width: 1000px) {
  .settings-grid, .contracts-admin-grid, .absence-layout, .treasury-total-panel { grid-template-columns: 1fr; }
  .treasury-breakdown { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .contract-template-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .contract-sign-form, .signature-proof, .notice-row, .absence-list-item, .contract-pdf-heading { align-items: stretch; flex-direction: column; }
  .contract-pdf-heading small { text-align: left; }
  .contract-pdf-reader iframe { height: 72vh; }
  .calendar-toolbar { grid-template-columns: 1fr 1fr; }
  .calendar-toolbar > div { grid-column: 1 / -1; grid-row: 1; }
  .treasury-breakdown { grid-template-columns: 1fr; }
  .inline-fields .custom-select, .action-row .custom-select, .danger-row .custom-select { width: 100%; min-width: 0; }
}
.cef-hidden { display: none !important; }

.treasury-overview-panel { display: grid; grid-template-columns: minmax(230px, .8fr) minmax(320px, 1.25fr) minmax(190px, .6fr); gap: .8rem; align-items: stretch; margin-bottom: 1rem; border-color: rgba(181, 82, 255, .28); background: radial-gradient(circle at 8% 20%, rgba(181, 82, 255, .075), transparent 35%), var(--surface); }
.treasury-current { display: flex; min-height: 170px; flex-direction: column; justify-content: center; padding: .85rem; border: 1px solid rgba(181, 82, 255, .2); border-radius: 12px; background: rgba(8, 8, 8, .62); }
.treasury-current > span { color: var(--accent); font-size: .7rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.treasury-current > strong { margin: .25rem 0; color: var(--accent-light); font-family: Georgia, serif; font-size: clamp(1.9rem, 3.5vw, 2.9rem); font-weight: 500; }
.treasury-current > small { color: var(--muted); line-height: 1.45; }
.treasury-flow-list { display: grid; align-content: center; gap: .38rem; }
.treasury-flow-row { display: flex; align-items: center; justify-content: space-between; gap: .8rem; min-height: 34px; padding: .42rem .62rem; border: 1px solid var(--line); border-radius: 9px; background: rgba(8, 8, 8, .58); }
.treasury-flow-row span { color: var(--muted); font-size: .72rem; }
.treasury-flow-row strong { color: #ded9cf; font-size: .78rem; white-space: nowrap; }
.treasury-flow-row.positive { border-color: rgba(105, 201, 153, .2); background: rgba(105, 201, 153, .045); }
.treasury-flow-row.positive strong { color: #aee5c9; }
.treasury-flow-row.negative { border-color: rgba(223, 115, 115, .2); background: rgba(223, 115, 115, .045); }
.treasury-flow-row.negative strong { color: #efb0b0; }
.treasury-side { display: flex; flex-direction: column; justify-content: space-between; gap: .7rem; }
.treasury-payment-check { display: flex; flex: 1; flex-direction: column; padding: .75rem; border: 1px solid rgba(126, 183, 232, .2); border-radius: 10px; background: rgba(126, 183, 232, .045); }
.treasury-payment-check span { color: #9dcaf0; font-size: .68rem; font-weight: 800; text-transform: uppercase; }
.treasury-payment-check strong { margin: .25rem 0; color: #d8e9f8; font-size: 1.15rem; }
.treasury-payment-check small { margin-top: .18rem; color: var(--muted); line-height: 1.35; }
.btn-small { min-height: 34px; padding: .48rem .7rem; font-size: .72rem; }
.treasury-opening-form { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(150px, .65fr) minmax(210px, 1fr) minmax(220px, 1.2fr) auto; gap: .65rem; align-items: end; max-width: 980px; padding: .8rem; border: 1px solid var(--line); border-radius: 11px; background: rgba(8, 8, 8, .68); }
.treasury-opening-form label { margin: 0; }
.treasury-opening-form > small { grid-column: 1 / -1; color: var(--muted); font-size: .7rem; }
.treasury-period-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }

@media (max-width: 1120px) {
  .treasury-overview-panel { grid-template-columns: minmax(220px, .8fr) minmax(0, 1.2fr); }
  .treasury-side { grid-column: 1 / -1; flex-direction: row; align-items: stretch; }
  .treasury-payment-check { min-width: 0; }
  .treasury-side .btn { align-self: center; }
  .treasury-period-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .treasury-overview-panel { grid-template-columns: 1fr; }
  .treasury-side { grid-column: auto; flex-direction: column; }
  .treasury-opening-form { grid-template-columns: 1fr 1fr; }
  .treasury-opening-form label:nth-of-type(3), .treasury-opening-form > small { grid-column: 1 / -1; }
  .treasury-opening-form .btn { width: 100%; }
  .treasury-period-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .treasury-opening-form, .treasury-period-grid { grid-template-columns: 1fr; }
  .treasury-opening-form label, .treasury-opening-form label:nth-of-type(3), .treasury-opening-form > small { grid-column: auto; }
}
.treasury-opening-form[hidden] { display: none; }

/* Accès tablette */
.tablet-login-shell { min-height: 100vh; display: grid; place-items: center; padding: 1rem; background: radial-gradient(circle at 50% 0, rgba(181, 82, 255, .12), transparent 40%), rgba(8, 8, 8, .98); }
.tablet-login-card { width: min(100%, 520px); padding: clamp(1rem, 3vw, 1.6rem); border: 1px solid var(--line-strong); border-radius: 18px; background: rgba(18, 18, 18, .98); box-shadow: 0 30px 90px rgba(0, 0, 0, .55); }
.tablet-login-brand { display: flex; align-items: center; gap: .85rem; margin-bottom: 1.25rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.tablet-login-brand img { width: 68px; height: 68px; object-fit: contain; }
.tablet-login-brand div { display: flex; flex-direction: column; }
.tablet-login-brand span { color: var(--accent); font-size: .68rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.tablet-login-brand strong { font-family: Georgia, serif; font-size: 1.45rem; letter-spacing: .08em; }
.tablet-login-copy h1 { margin-bottom: .45rem; }
.tablet-login-copy p { color: var(--muted); line-height: 1.55; }
.tablet-login-form { display: grid; gap: .85rem; margin-top: 1.1rem; }
.tablet-login-help { display: flex; flex-direction: column; gap: .2rem; margin: 1rem 0; padding: .8rem; border: 1px solid rgba(126, 183, 232, .18); border-radius: 10px; background: rgba(126, 183, 232, .045); }
.tablet-login-help strong { color: #c9e1f5; font-size: .78rem; }
.tablet-login-help span { color: var(--muted); font-size: .72rem; line-height: 1.45; }
.tablet-access-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr); gap: 1rem; align-items: start; }
.tablet-access-summary { position: sticky; top: 82px; }
.tablet-security-list { display: grid; gap: .55rem; }
.tablet-security-list > div { display: flex; flex-direction: column; gap: .15rem; padding: .75rem; border: 1px solid var(--line); border-radius: 10px; background: rgba(8, 8, 8, .52); }
.tablet-security-list strong { color: #ddd8ce; font-size: .78rem; }
.tablet-security-list span { color: var(--muted); font-size: .71rem; line-height: 1.4; }
.tablet-access-details { display: grid; gap: .45rem; margin: 1rem 0 0; }
.tablet-access-details > div { display: flex; justify-content: space-between; gap: .8rem; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.tablet-access-details dt { color: var(--muted); font-size: .7rem; }
.tablet-access-details dd { margin: 0; color: #ded9cf; font-size: .72rem; text-align: right; }
.tablet-url-box { display: flex; flex-direction: column; gap: .25rem; margin-top: 1rem; padding: .8rem; border: 1px solid rgba(181, 82, 255, .22); border-radius: 10px; background: rgba(181, 82, 255, .045); overflow-wrap: anywhere; }
.tablet-url-box span { color: var(--accent); font-size: .66rem; font-weight: 800; text-transform: uppercase; }
.tablet-url-box strong { color: var(--accent-light); font-size: .78rem; }
.tablet-session-badge { padding: .35rem .55rem; border: 1px solid rgba(181, 82, 255, .28); border-radius: 999px; color: var(--accent); background: rgba(181, 82, 255, .06); font-size: .65rem; font-weight: 850; text-transform: uppercase; }
.tablet-admin-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; margin-bottom: 1rem; }
.tablet-admin-summary > div { display: flex; flex-direction: column; gap: .2rem; padding: .75rem; border: 1px solid var(--line); border-radius: 10px; background: rgba(8, 8, 8, .52); }
.tablet-admin-summary span { color: var(--muted); font-size: .68rem; }
.tablet-admin-summary strong { color: #ded9cf; font-size: .78rem; overflow-wrap: anywhere; }
.compact-empty { min-height: 0; padding: 1rem; }
.tablet-session .topbar { gap: .55rem; }

@media (max-width: 900px) {
  .tablet-access-grid { grid-template-columns: 1fr; }
  .tablet-access-summary { position: static; }
}

@media (max-width: 620px) {
  .tablet-admin-summary { grid-template-columns: 1fr; }
  .tablet-session-badge { display: none; }
  .tablet-login-card { border-radius: 13px; }
}

/* Weekly tax proof */
.tax-proof-launcher { margin: 1rem 0; }
.tax-proof-form { align-items: end; grid-template-columns: minmax(240px, 420px) auto; }
.tax-proof-form .btn { min-height: 46px; }
.tax-proof-actions { margin-top: 1rem; }
.tax-proof-preview-panel { overflow: hidden; }
.tax-proof-preview { background: #050505; border-radius: 14px; padding: 1.25rem; overflow: auto; max-height: 84vh; }
.tax-proof-preview img { display: block; width: 100%; min-width: 1100px; height: auto; margin: 0 auto; background: #080808; box-shadow: 0 12px 35px rgba(0,0,0,.18); }
@media (max-width: 760px) {
  .tax-proof-form { grid-template-columns: 1fr; }
  .tax-proof-preview { padding: .5rem; }
}

/* Public tax-proof links */
.tax-proof-public-panel { margin-bottom: 1rem; border-color: rgba(181, 82, 255, .24); }
.public-link-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: .6rem; align-items: center; margin: 1rem 0 .7rem; }
.public-link-row input { color: var(--accent-light); font-family: "SFMono-Regular", Consolas, monospace; }
.tax-proof-revoke-form { margin-top: 1rem; }
@media (max-width: 760px) {
  .public-link-row { grid-template-columns: 1fr; }
  .public-link-row .btn { width: 100%; }
}

/* Recruitment form: intentionally isolated from the présentation and internal navigation. */
.recruitment-body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% 8%, rgba(105,201,153,.16), transparent 25rem),
    radial-gradient(circle at 88% 5%, rgba(124,167,223,.16), transparent 27rem),
    radial-gradient(circle at 50% -8%, rgba(181,82,255,.22), transparent 35rem),
    linear-gradient(180deg, #11100d 0%, #090909 30%, #070707 100%);
  color: var(--text);
}
.recruitment-body::before,
.recruitment-body::after {
  content: "";
  position: fixed;
  z-index: -1;
  width: 22rem;
  height: 22rem;
  border: 1px solid rgba(181,82,255,.08);
  border-radius: 50%;
  pointer-events: none;
}
.recruitment-body::before { top: 8rem; left: -11rem; box-shadow: 0 0 0 3rem rgba(181,82,255,.018), 0 0 0 7rem rgba(181,82,255,.012); }
.recruitment-body::after { right: -12rem; bottom: 8rem; box-shadow: 0 0 0 4rem rgba(124,167,223,.018), 0 0 0 8rem rgba(105,201,153,.012); }
.recruitment-shell { width: min(980px, calc(100% - 2rem)); margin: 0 auto; padding: clamp(1.25rem, 5vw, 4rem) 0; }
.recruitment-form,
.recruitment-message {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(181,82,255,.24);
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(27,27,25,.98), rgba(10,10,10,.99));
  box-shadow: 0 34px 100px rgba(0,0,0,.48), inset 0 1px rgba(255,255,255,.025);
  padding: clamp(1.2rem, 4vw, 3rem);
}
.recruitment-form::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  background: linear-gradient(90deg, var(--success), var(--accent-light) 45%, var(--info));
}

.recruitment-top-actions {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: flex-start;
  margin: .15rem 0 1.15rem;
}
.recruitment-back-button {
  min-height: 42px;
  gap: .55rem;
  border-color: rgba(181,82,255,.25);
  background: rgba(5,5,5,.46);
}
.recruitment-back-button:hover { border-color: rgba(181,82,255,.5); }
.recruitment-form::after {
  content: "";
  position: absolute;
  top: -11rem;
  right: -10rem;
  width: 28rem;
  height: 28rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(181,82,255,.10), transparent 68%);
  pointer-events: none;
}
.recruitment-heading {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.8rem;
  padding: .35rem 0 1.5rem;
  border-bottom: 1px solid var(--line);
}
.recruitment-heading h1,
.recruitment-message h1 { margin: .2rem 0 .55rem; font-size: clamp(2rem, 6vw, 3.6rem); }
.recruitment-heading p { max-width: 720px; margin: 0; color: var(--muted); }
.recruitment-logo {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(181,82,255,.28);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(181,82,255,.14), rgba(255,255,255,.02));
  box-shadow: 0 16px 34px rgba(0,0,0,.28);
}
.recruitment-logo img { width: 64px; height: 64px; object-fit: contain; filter: drop-shadow(0 10px 18px rgba(181,82,255,.18)); }
.recruitment-section {
  position: relative;
  z-index: 1;
  margin-top: 1rem;
  padding: 1.15rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.018), transparent), rgba(10,10,10,.64);
}
.recruitment-section-identity { border-color: rgba(181,82,255,.22); }
.recruitment-section-availability { border-color: rgba(149,136,255,.24); background: linear-gradient(145deg, rgba(149,136,255,.08), rgba(10,10,10,.72)); }
.recruitment-section-profile { border-color: rgba(105,201,153,.21); }
.recruitment-section-title { display: flex; align-items: flex-start; gap: .8rem; margin-bottom: 1rem; }
.recruitment-section-title h2 { margin: .08rem 0 .18rem; font-family: Georgia, "Times New Roman", serif; font-size: 1.35rem; font-weight: 500; }
.recruitment-section-title p { margin: 0; color: var(--muted); font-size: .82rem; }
.recruitment-section-number {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(181,82,255,.28);
  border-radius: 12px;
  color: var(--accent-light);
  background: rgba(181,82,255,.08);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .08em;
}
.recruitment-grid textarea { min-height: 128px; resize: vertical; }
.recruitment-grid input,
.recruitment-grid textarea,
.availability-time input {
  border-color: rgba(255,255,255,.13);
  background: rgba(5,5,5,.78);
}
.recruitment-grid input:focus,
.recruitment-grid textarea:focus,
.availability-time input:focus { background: #080808; }
.availability-planner { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: rgba(5,5,5,.58); }
.availability-header,
.availability-row { display: grid; grid-template-columns: minmax(170px, 1fr) minmax(120px, .72fr) minmax(120px, .72fr); gap: .75rem; align-items: center; }
.availability-header { padding: .65rem .9rem; color: var(--muted); background: rgba(255,255,255,.035); font-size: .66rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.availability-row { min-height: 62px; padding: .65rem .9rem; border-top: 1px solid var(--line); transition: background .16s ease, border-color .16s ease; }
.availability-row.is-selected { background: linear-gradient(90deg, rgba(149,136,255,.12), rgba(181,82,255,.07)); }
.availability-day { display: flex; align-items: center; gap: .72rem; color: var(--text); font-size: .9rem; font-weight: 780; cursor: pointer; }
.availability-day input { width: 20px; min-height: 20px; flex: 0 0 20px; accent-color: var(--accent); }
.availability-time { display: block; }
.availability-time input { min-height: 42px; }
.availability-time input:disabled { opacity: .34; cursor: not-allowed; }
.availability-mobile-label { display: none; }
.availability-overnight-note {
  grid-column: 2 / -1;
  margin-top: -.35rem;
  color: var(--accent-soft, #e7b4ff);
  font-size: .72rem;
  font-weight: 750;
}
.availability-overnight-note[hidden] { display: none; }
.recruitment-confirmation {
  position: relative;
  z-index: 1;
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid rgba(181,82,255,.18);
  border-radius: 14px;
  color: #ddd8ce;
  background: rgba(181,82,255,.045);
  font-size: .82rem;
  font-weight: 700;
}
.recruitment-submit {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 58px;
  justify-content: space-between;
  padding-inline: 1.25rem;
  border-radius: 14px;
  font-size: 1rem;
  box-shadow: 0 14px 30px rgba(181,82,255,.12);
}
.recruitment-submit span:last-child { font-size: 1.4rem; }
.recruitment-honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.recruitment-message-shell { min-height: 100vh; display: grid; place-items: center; padding-top: 0; padding-bottom: 0; }
.recruitment-message { width: min(620px, 100%); text-align: center; }
.recruitment-message p { color: var(--muted); font-size: 1.05rem; }
.recruitment-message-error { border-color: rgba(228,138,138,.45); }
.recruitment-message-success { border-color: rgba(181,82,255,.34); }
.recruitment-success-icon {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  margin: 0 auto 1rem;
  border: 1px solid rgba(181,82,255,.42);
  border-radius: 50%;
  color: #190624;
  background: linear-gradient(145deg, #e2b7ff, #9f31ff);
  font-size: 2rem;
  font-weight: 900;
  box-shadow: 0 15px 35px rgba(181,82,255,.20);
}
.recruitment-return { min-height: 48px; margin-top: .7rem; padding-inline: 1.2rem; }
@media (max-width: 700px) {
  .recruitment-shell { width: min(100% - 1rem, 980px); }
  .recruitment-form { border-radius: 20px; padding: 1rem; }
  .recruitment-heading { grid-template-columns: 1fr; text-align: center; }
  .recruitment-logo { margin: 0 auto; }
  .recruitment-heading p { margin-inline: auto; }
  .recruitment-section { padding: .9rem; }
  .availability-header { display: none; }
  .availability-row { grid-template-columns: 1fr 1fr; gap: .6rem; padding: .8rem; }
  .availability-day { grid-column: 1 / -1; }
  .availability-time { display: flex; flex-direction: column; gap: .3rem; }
  .availability-overnight-note { grid-column: 1 / -1; margin-top: 0; }
  .availability-mobile-label { display: block; color: var(--muted); font-size: .66rem; font-weight: 800; text-transform: uppercase; }
}


/* Présentation commercial statuses and recruitment callout */
.showcase-recruitment-callout {
  width: min(100%, 760px);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  margin-top: 1.15rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(181, 82, 255, .38);
  border-radius: 16px;
  background:
    radial-gradient(circle at 8% 10%, rgba(181, 82, 255, .18), transparent 12rem),
    linear-gradient(135deg, rgba(28, 12, 48, .96), rgba(12, 10, 18, .98));
  box-shadow: 0 18px 45px rgba(0, 0, 0, .28), inset 0 1px rgba(255, 255, 255, .035);
}
.showcase-recruitment-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(181, 82, 255, .45);
  border-radius: 50%;
  color: var(--accent-light);
  background: rgba(181, 82, 255, .11);
  box-shadow: 0 0 24px rgba(181, 82, 255, .13);
  font-size: 1.15rem;
}
.showcase-recruitment-callout strong {
  display: block;
  color: var(--accent-light);
  font-family: Georgia, serif;
  font-size: 1.15rem;
}
.showcase-recruitment-callout p {
  max-width: 560px;
  margin: .28rem 0 0;
  color: #d2c5e2;
  font-size: .82rem;
  line-height: 1.5;
}
.showcase-recruitment-button {
  min-height: 46px;
  padding-inline: 1rem;
  border-color: #cf85ff;
  color: #130414;
  background: linear-gradient(135deg, #efc9ff, #a72fff);
  box-shadow: 0 10px 28px rgba(181, 82, 255, .22);
  font-weight: 900;
  white-space: nowrap;
}
.showcase-recruitment-button:hover {
  border-color: #edd2ff;
  color: #120418;
  background: linear-gradient(135deg, #f5deff, #bf55ff);
  transform: translateY(-1px);
}

.showcase-image { position: relative; }
.showcase-status-badge {
  --showcase-status-color: #c9a0ff;
  --showcase-status-bg: rgba(181, 82, 255, .13);
  --showcase-status-border: rgba(181, 82, 255, .40);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .48rem;
  min-height: 30px;
  padding: .34rem .65rem;
  border: 1px solid var(--showcase-status-border);
  border-radius: 999px;
  color: var(--showcase-status-color);
  background: color-mix(in srgb, var(--showcase-status-bg) 88%, #090909 12%);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .3), 0 0 18px color-mix(in srgb, var(--showcase-status-color) 12%, transparent);
  font-size: .68rem;
  font-weight: 850;
  line-height: 1;
  letter-spacing: .025em;
  text-transform: none;
  white-space: nowrap;
}
.showcase-image .showcase-status-badge {
  position: absolute;
  z-index: 2;
  top: .75rem;
  left: .75rem;
  width: auto;
  height: auto;
  color: var(--showcase-status-color);
  font-family: inherit;
  letter-spacing: .025em;
  backdrop-filter: blur(8px);
}
.showcase-status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  display: inline-block;
  border-radius: 50%;
  background: var(--showcase-status-color);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--showcase-status-color) 55%, transparent), 0 0 10px var(--showcase-status-color);
  animation: showcase-status-pulse 1.9s ease-out infinite;
}
.showcase-status-available {
  --showcase-status-color: #c9a0ff;
  --showcase-status-bg: rgba(181, 82, 255, .13);
  --showcase-status-border: rgba(105, 201, 153, .36);
}
.showcase-status-unavailable {
  --showcase-status-color: #ef9b9b;
  --showcase-status-bg: rgba(223, 115, 115, .12);
  --showcase-status-border: rgba(223, 115, 115, .36);
}
.showcase-status-boutique {
  --showcase-status-color: #e7b4ff;
  --showcase-status-bg: rgba(181, 82, 255, .13);
  --showcase-status-border: rgba(181, 82, 255, .4);
}
.showcase-status-used {
  --showcase-status-color: #8db9f1;
  --showcase-status-bg: rgba(124, 167, 223, .13);
  --showcase-status-border: rgba(124, 167, 223, .38);
}
.showcase-status-on_order {
  --showcase-status-color: #e9b27d;
  --showcase-status-bg: rgba(220, 145, 78, .13);
  --showcase-status-border: rgba(220, 145, 78, .38);
}
.showcase-status-reservation {
  --showcase-status-color: #c6a8f4;
  --showcase-status-bg: rgba(169, 128, 227, .13);
  --showcase-status-border: rgba(169, 128, 227, .38);
}
@keyframes showcase-status-pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--showcase-status-color) 60%, transparent), 0 0 10px var(--showcase-status-color); }
  58%, 100% { box-shadow: 0 0 0 7px transparent, 0 0 12px color-mix(in srgb, var(--showcase-status-color) 72%, transparent); }
}
.showcase-detail-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .65rem;
}

.showcase-status-picker {
  min-width: 0;
  margin: 0;
  padding: .85rem;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, .014);
}
.showcase-status-picker legend {
  padding: 0 .35rem;
  color: #d4d0c7;
  font-size: .73rem;
  font-weight: 760;
}
.showcase-status-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem;
}
.showcase-status-choice {
  min-width: 0;
  display: grid !important;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: .48rem !important;
  min-height: 46px;
  padding: .62rem .7rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: #c9c4ba;
  background: #0b0b0b;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.showcase-status-choice:hover {
  border-color: var(--showcase-status-border);
  background: var(--showcase-status-bg);
  transform: translateY(-1px);
}
.showcase-status-choice:has(input:checked) {
  border-color: var(--showcase-status-border);
  color: var(--showcase-status-color);
  background: var(--showcase-status-bg);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--showcase-status-color) 18%, transparent);
}
.showcase-status-choice input {
  width: 17px;
  min-height: 17px;
  margin: 0;
  accent-color: var(--showcase-status-color);
}
.showcase-status-choice span { min-width: 0; line-height: 1.25; white-space: normal; }
.showcase-status-picker > small {
  display: block;
  margin-top: .65rem;
  color: #77746d;
  font-size: .68rem;
}
.showcase-admin-summary-statuses {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: .45rem;
}

@media (max-width: 860px) {
  .showcase-recruitment-callout { grid-template-columns: auto minmax(0, 1fr); }
  .showcase-recruitment-button { grid-column: 1 / -1; width: 100%; }
}
@media (max-width: 540px) {
  .showcase-recruitment-callout { grid-template-columns: 1fr; text-align: center; }
  .showcase-recruitment-icon { margin-inline: auto; }
  .showcase-status-choice-grid { grid-template-columns: 1fr; }
  .showcase-admin-summary-statuses { align-items: flex-end; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  .showcase-status-dot { animation: none; }
}


.searchable-select { position: relative; width: 100%; }
.searchable-select-native { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0 !important; pointer-events: none !important; }
.searchable-select-input { width: 100%; padding-right: 2.6rem; }
.searchable-select::after { content: "⌄"; position: absolute; top: .72rem; right: 1rem; color: var(--accent); pointer-events: none; }
.searchable-select-menu { display: none; position: absolute; z-index: 80; top: calc(100% + .35rem); left: 0; right: 0; max-height: 18rem; overflow: auto; padding: .35rem; border: 1px solid var(--line); border-radius: .8rem; background: #151515; box-shadow: 0 18px 45px rgba(0,0,0,.48); }
.searchable-select.open .searchable-select-menu { display: grid; gap: .2rem; }
.searchable-select-option { width: 100%; border: 0; border-radius: .55rem; background: transparent; color: var(--text); padding: .7rem .8rem; text-align: left; cursor: pointer; }
.searchable-select-option:hover, .searchable-select-option:focus, .searchable-select-option.selected { outline: 0; background: rgba(181,82,255,.13); color: var(--accent-light); }
.searchable-select-empty { padding: .8rem; color: var(--muted); }
/* Dans les cartes repliables, le menu absolu peut être rogné par overflow:hidden.
   Ce sélecteur reste dans le flux afin que tous les résultats restent visibles. */
.reservation-source-select-field .searchable-select-menu { position: static; margin-top: .35rem; max-height: 20rem; }
.reservation-source-select-field .searchable-select-input { padding-right: 2.6rem; }
.compact-action-details { position: relative; }
.compact-action-details > summary { list-style: none; cursor: pointer; }
.compact-action-details > summary::-webkit-details-marker { display: none; }
.compact-action-popover { min-width: 34rem; margin-top: .6rem; padding: 1rem; border: 1px solid var(--line); border-radius: .9rem; background: var(--surface-2, #171717); }
@media (max-width: 760px) { .compact-action-popover { min-width: 0; width: min(86vw, 34rem); } }
.dashboard-panel-filter { margin: .65rem 0 1rem; padding: .65rem; background: rgba(255,255,255,.02); border-radius: .8rem; }
.dashboard-panel-filter label { min-width: 9rem; }
.dashboard-panel-filter .btn { align-self: end; }

.employee-key-details { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; margin: .85rem 0 .45rem; }
.employee-key-details > div { padding: .65rem .7rem; border: 1px solid var(--line); border-radius: .7rem; background: rgba(255,255,255,.018); }
.employee-key-details span, .employee-key-details strong { display: block; }
.employee-key-details span { color: var(--muted); font-size: .72rem; }
.employee-key-details strong { margin-top: .2rem; color: var(--accent-light); }
.employee-key-details .employee-detail-alert { border-color: rgba(220,92,92,.38); background: rgba(220,92,92,.08); }
.employee-card-foot { margin-bottom: .7rem; color: var(--muted); }
@media (max-width: 620px) { .employee-key-details { grid-template-columns: 1fr; } }

.reminder-layout { grid-template-columns: minmax(300px,.75fr) minmax(0,1.35fr); }
.reminder-create-panel { position: sticky; top: 1rem; }
.reminder-list { display: grid; gap: .85rem; }
.reminder-card { padding: 1rem; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(145deg, rgba(181,82,255,.08), transparent 45%), var(--surface-2); }
.reminder-card-disabled { opacity: .7; }
.reminder-card-head { display:flex; align-items:flex-start; justify-content:space-between; gap:.8rem; }
.reminder-card-head div { display:grid; gap:.2rem; }
.reminder-card-head small { color:var(--accent-light); }
.reminder-card > p { white-space:pre-wrap; color:var(--text); }
.reminder-card .inline-details { margin-top:.8rem; }
.reminder-edit-form { margin-top:.8rem; }
@media (max-width: 900px) { .reminder-layout { grid-template-columns:1fr; } .reminder-create-panel { position:static; } }

.notice-outfit { border-color: rgba(223,115,115,.35); background: rgba(223,115,115,.08); }
.employee-outfit-alert-panel { margin-bottom: 1rem; }
.showcase-capacity-meta { display:flex; flex-wrap:wrap; gap:.55rem; margin:.65rem 0 .35rem; }
.showcase-capacity-meta span { display:inline-flex; align-items:center; gap:.22rem; padding:.42rem .7rem; border:1px solid rgba(181,82,255,.22); border-radius:999px; color:var(--accent-light); background:rgba(181,82,255,.075); font-size:.82rem; font-weight:800; line-height:1; }
.showcase-card-body > .btn-wide { margin-top: auto; }
.showcase-card-body > .muted.clamp { margin-bottom: .85rem; }
.reminder-schedule-help { display: grid; gap: .25rem; margin: 0; }
.reminder-schedule-help span { color: var(--muted); }

/* Company contract library */
.company-contract-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.company-contract-stat { display: grid; gap: .35rem; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(145deg, rgba(181, 82, 255, .075), rgba(14, 14, 13, .92)); }
.company-contract-stat span { color: var(--muted); font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.company-contract-stat strong { color: var(--accent-light); font-size: 1.35rem; }
.company-contract-layout { align-items: stretch; }
.company-contract-upload-panel, .company-contract-help { min-width: 0; }
.company-contract-guidance { display: grid; gap: .9rem; }
.company-contract-guidance > div { display: grid; grid-template-columns: 38px 1fr; align-items: start; gap: .8rem; padding: .85rem; border: 1px solid rgba(181, 82, 255, .18); border-radius: 12px; background: rgba(181, 82, 255, .035); }
.company-contract-guidance > div > span { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid rgba(181, 82, 255, .38); border-radius: 50%; color: var(--accent-light); background: rgba(181, 82, 255, .08); font-weight: 900; }
.company-contract-guidance p { margin: 0; color: var(--muted); line-height: 1.55; }
.company-contract-guidance strong { color: #f2ede4; }
.company-contract-filters { grid-template-columns: minmax(240px, 2fr) minmax(180px, 1fr) minmax(150px, .7fr) auto; align-items: end; margin-bottom: 1rem; }
.company-contract-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.company-contract-card { display: flex; min-width: 0; flex-direction: column; gap: .9rem; padding: 1rem; border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(160deg, rgba(181, 82, 255, .04), rgba(11, 11, 11, .96) 42%); }
.company-contract-card-archived { opacity: .78; }
.company-contract-card-head { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: .8rem; }
.company-contract-card-head h3 { margin: .15rem 0 .1rem; overflow-wrap: anywhere; }
.company-contract-card-head small { display: block; color: var(--muted); overflow-wrap: anywhere; }
.company-contract-file-icon { display: grid; width: 50px; height: 58px; place-items: center; border: 1px solid rgba(181, 82, 255, .34); border-radius: 10px 10px 14px 10px; color: var(--accent-light); background: rgba(181, 82, 255, .08); font-size: .78rem; font-weight: 900; letter-spacing: .06em; }
.company-contract-note { margin: 0; padding: .75rem .85rem; border-left: 3px solid rgba(181, 82, 255, .46); border-radius: 0 10px 10px 0; color: #d2ccc1; background: rgba(181, 82, 255, .035); line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.company-contract-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.company-contract-meta > div { display: grid; gap: .15rem; min-width: 0; padding: .65rem .7rem; border: 1px solid rgba(255, 255, 255, .065); border-radius: 10px; background: rgba(255, 255, 255, .018); }
.company-contract-meta span { color: var(--muted); font-size: .66rem; font-weight: 800; text-transform: uppercase; }
.company-contract-meta strong { overflow-wrap: anywhere; }
.company-contract-actions { margin-top: auto; }
.company-contract-edit { border-top: 1px solid var(--line); padding-top: .75rem; }
.company-contract-edit > summary { color: var(--accent-light); cursor: pointer; font-weight: 800; }
.company-contract-delete { display: flex; justify-content: flex-end; margin-top: .8rem; padding-top: .8rem; border-top: 1px solid rgba(214, 84, 84, .18); }
@media (max-width: 1000px) {
  .company-contract-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .company-contract-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .company-contract-summary { grid-template-columns: 1fr; }
  .company-contract-filters { grid-template-columns: 1fr; }
  .company-contract-card-head { grid-template-columns: 46px minmax(0, 1fr); }
  .company-contract-card-head > .status { grid-column: 1 / -1; width: max-content; }
  .company-contract-meta { grid-template-columns: 1fr; }
  .company-contract-actions { display: grid; grid-template-columns: 1fr; }
}

/* Recruitment HRP declaration */
.recruitment-section-hrp {
  border-color: rgba(181,82,255,.34);
  background:
    radial-gradient(circle at 100% 0, rgba(181,82,255,.1), transparent 17rem),
    linear-gradient(145deg, rgba(181,82,255,.075), rgba(10,10,10,.82));
}
.recruitment-rule-notice {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: start;
  gap: .85rem;
  margin-bottom: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(181,82,255,.3);
  border-radius: 16px;
  background: rgba(181,82,255,.075);
}
.recruitment-rule-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(181,82,255,.5);
  border-radius: 13px;
  color: #171108;
  background: linear-gradient(145deg, #f2d58f, #c99b3f);
  font-size: 1.05rem;
  font-weight: 950;
  box-shadow: 0 10px 22px rgba(181,82,255,.12);
}
.recruitment-rule-notice strong { color: var(--accent-light); }
.recruitment-rule-notice p { margin: .35rem 0 0; color: var(--muted); line-height: 1.55; }
.recruitment-choice-fieldset { margin: 0; padding: 0; border: 0; }
.recruitment-choice-fieldset legend { margin-bottom: .75rem; font-weight: 800; }
.recruitment-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; }
.recruitment-choice {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: .85rem;
  min-height: 104px;
  padding: 1rem 3.25rem 1rem 1rem;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255,255,255,.035), rgba(255,255,255,.012));
  cursor: pointer;
  transition: border-color .2s ease, transform .2s ease, background .2s ease, box-shadow .2s ease;
}
.recruitment-choice:hover {
  transform: translateY(-2px);
  border-color: rgba(181,82,255,.46);
  box-shadow: 0 14px 28px rgba(0,0,0,.18);
}
.recruitment-choice:focus-within {
  outline: 2px solid rgba(181,82,255,.58);
  outline-offset: 3px;
}
.recruitment-choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}
.recruitment-choice-indicator {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border: 2px solid rgba(255,255,255,.24);
  border-radius: 50%;
  background: rgba(0,0,0,.25);
}
.recruitment-choice-indicator::after {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: transparent;
  transform: scale(.35);
  transition: background .18s ease, transform .18s ease;
}
.recruitment-choice-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 15px;
  color: #d8d2c7;
  background: rgba(0,0,0,.24);
  font-size: 1.15rem;
  font-weight: 950;
}
.recruitment-choice-copy { display: grid; gap: .3rem; }
.recruitment-choice strong { font-size: 1.08rem; }
.recruitment-choice small { color: var(--muted); line-height: 1.45; }
.recruitment-choice-safe:has(input:checked) {
  border-color: rgba(105,201,153,.7);
  background: linear-gradient(145deg, rgba(105,201,153,.14), rgba(105,201,153,.045));
  box-shadow: inset 0 0 0 1px rgba(105,201,153,.08), 0 15px 30px rgba(105,201,153,.08);
}
.recruitment-choice-safe:has(input:checked) .recruitment-choice-icon {
  border-color: rgba(105,201,153,.5);
  color: #0a2718;
  background: linear-gradient(145deg, #e3bbff, #a03aff);
}
.recruitment-choice-safe:has(input:checked) .recruitment-choice-indicator { border-color: #a03aff; }
.recruitment-choice-safe:has(input:checked) .recruitment-choice-indicator::after { background: #a03aff; transform: scale(1); }
.recruitment-choice-warning:has(input:checked) {
  border-color: rgba(228,138,138,.75);
  background: linear-gradient(145deg, rgba(228,138,138,.14), rgba(228,138,138,.045));
  box-shadow: inset 0 0 0 1px rgba(228,138,138,.08), 0 15px 30px rgba(228,138,138,.07);
}
.recruitment-choice-warning:has(input:checked) .recruitment-choice-icon {
  border-color: rgba(228,138,138,.55);
  color: #2b0b0b;
  background: linear-gradient(145deg, #f1b0b0, #df7d7d);
}
.recruitment-choice-warning:has(input:checked) .recruitment-choice-indicator { border-color: #e48a8a; }
.recruitment-choice-warning:has(input:checked) .recruitment-choice-indicator::after { background: #e48a8a; transform: scale(1); }
@media (max-width: 640px) {
  .recruitment-choice-grid { grid-template-columns: 1fr; }
  .recruitment-rule-notice { grid-template-columns: 36px minmax(0, 1fr); padding: .9rem; }
  .recruitment-rule-icon { width: 36px; height: 36px; border-radius: 11px; }
  .recruitment-choice { min-height: 94px; }
  .recruitment-back-button { width: 100%; justify-content: center; }
}


/* Calcul fiscal explicite : total des factures clients moins dépenses validées. */
.tax-calculation-panel {
  border-color: rgba(181, 82, 255, .3);
  background:
    radial-gradient(circle at 100% 0, rgba(181, 82, 255, .09), transparent 24rem),
    linear-gradient(180deg, rgba(255,255,255,.012), transparent),
    var(--surface);
}
.tax-calculation-layout { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(360px, 1.15fr); gap: 1rem; align-items: stretch; }
.tax-calculation-breakdown { margin: 0; padding: .2rem .9rem; border: 1px solid var(--line); border-radius: 12px; background: rgba(0,0,0,.16); }
.tax-calculation-breakdown .tax-calculation-total { margin-top: .15rem; border-bottom: 0; border-top: 1px solid rgba(181, 82, 255, .24); }
.tax-calculation-total span, .tax-calculation-total strong { color: var(--accent-light); font-weight: 900; }
.tax-calculation-equation { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: .65rem; align-items: center; padding: 1rem; border: 1px solid rgba(181, 82, 255, .25); border-radius: 12px; background: rgba(181, 82, 255, .045); }
.tax-calculation-equation > div { min-width: 0; display: grid; gap: .3rem; padding: .75rem; border: 1px solid rgba(255,255,255,.07); border-radius: 10px; background: rgba(0,0,0,.18); }
.tax-calculation-equation > div span { color: var(--muted); font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .035em; }
.tax-calculation-equation > div strong { overflow-wrap: anywhere; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.1rem, 2vw, 1.55rem); font-weight: 500; }
.tax-calculation-equation > b { color: var(--accent-light); font-size: 1.45rem; }
.tax-calculation-equation .tax-calculation-result { grid-column: 1 / -1; text-align: center; border-color: rgba(181, 82, 255, .32); background: rgba(181, 82, 255, .085); }
.tax-calculation-equation .tax-calculation-result strong { color: var(--accent-light); font-size: clamp(1.45rem, 3vw, 2rem); }
.tax-period-direct-calculation { margin: .25rem 0; padding: .7rem !important; border: 1px solid rgba(181, 82, 255, .22) !important; border-radius: 9px; background: rgba(181, 82, 255, .05); }
.tax-period-direct-calculation span, .tax-period-direct-calculation strong { color: var(--accent-light) !important; }
@media (max-width: 900px) {
  .tax-calculation-layout { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .tax-calculation-equation { grid-template-columns: 1fr; text-align: left; }
  .tax-calculation-equation > b { justify-self: center; }
  .tax-calculation-equation .tax-calculation-result { grid-column: auto; text-align: left; }
}

/* Paginated histories and Discord imports */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .8rem;
  margin-top: 1rem;
  padding: .75rem .85rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.pagination-summary { margin: 0; color: var(--muted); font-size: .72rem; }
.pagination-links { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem; }
.pagination-link {
  min-width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  padding: 0 .5rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: #d7d2c8;
  background: rgba(255,255,255,.02);
  font-size: .73rem;
  font-weight: 850;
}
a.pagination-link:hover { border-color: rgba(181,82,255,.42); color: var(--accent-light); background: rgba(181,82,255,.07); }
.pagination-link.is-current { border-color: rgba(181,82,255,.48); color: #180717; background: linear-gradient(145deg, #f0d28a, #d9aa45); }
.pagination-link.is-disabled { color: #5d5a54; cursor: default; opacity: .55; }
.pagination-ellipsis { min-width: 24px; color: var(--muted); text-align: center; }

/* Direction-controlled recruitment status */
.recruitment-control-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 16px 36px rgba(0,0,0,.16);
}
.recruitment-control-panel.is-open { border-color: rgba(181,82,255,.34); background: linear-gradient(135deg, rgba(105,201,153,.11), rgba(105,201,153,.025)), var(--surface); }
.recruitment-control-panel.is-closed { border-color: rgba(223,115,115,.32); background: linear-gradient(135deg, rgba(223,115,115,.095), rgba(223,115,115,.02)), var(--surface); }
.recruitment-control-icon { width: 50px; height: 50px; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-size: 1.25rem; font-weight: 950; }
.recruitment-control-panel.is-open .recruitment-control-icon { color: #9cddb9; background: rgba(105,201,153,.09); }
.recruitment-control-panel.is-closed .recruitment-control-icon { color: #efa3a3; background: rgba(223,115,115,.08); }
.recruitment-control-copy { min-width: 0; }
.recruitment-control-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem; margin-top: .1rem; }
.recruitment-control-title-row h2 { margin: 0; font-family: Georgia, serif; font-size: 1.35rem; font-weight: 500; }
.recruitment-control-copy p { margin: .4rem 0 0; color: var(--muted); font-size: .78rem; line-height: 1.5; }
.recruitment-state-badge { display: inline-flex; padding: .28rem .52rem; border: 1px solid var(--line); border-radius: 999px; font-size: .63rem; font-weight: 850; }
.recruitment-state-badge.is-open { border-color: rgba(105,201,153,.3); color: #aee5c9; background: rgba(105,201,153,.075); }
.recruitment-state-badge.is-closed { border-color: rgba(223,115,115,.3); color: #f1aaaa; background: rgba(223,115,115,.075); }

.showcase-recruitment-status { display: inline-flex; margin-bottom: .28rem; padding: .22rem .48rem; border: 1px solid currentColor; border-radius: 999px; font-size: .61rem; font-weight: 900; letter-spacing: .055em; text-transform: uppercase; }
.showcase-recruitment-callout.is-open .showcase-recruitment-status { color: #aee5c9; background: rgba(105,201,153,.075); }
.showcase-recruitment-callout.is-closed { border-color: rgba(223,115,115,.34); background: radial-gradient(circle at 8% 10%, rgba(223,115,115,.11), transparent 12rem), linear-gradient(135deg, rgba(31,18,18,.96), rgba(16,16,16,.96)); }
.showcase-recruitment-callout.is-closed .showcase-recruitment-icon { border-color: rgba(223,115,115,.42); color: #efa3a3; background: rgba(223,115,115,.09); box-shadow: 0 0 24px rgba(223,115,115,.1); }
.showcase-recruitment-callout.is-closed .showcase-recruitment-status { color: #efa3a3; background: rgba(223,115,115,.075); }
.showcase-recruitment-callout.is-closed strong { color: #f1c0c0; }
.showcase-recruitment-button.is-disabled { border-color: rgba(255,255,255,.12); color: #77736c; background: #171717; box-shadow: none; cursor: not-allowed; pointer-events: none; user-select: none; }

@media (max-width: 760px) {
  .recruitment-control-panel { grid-template-columns: auto minmax(0, 1fr); }
  .recruitment-control-panel form { grid-column: 1 / -1; }
  .recruitment-control-panel form .btn { width: 100%; }
  .pagination { align-items: stretch; flex-direction: column; }
  .pagination-links { justify-content: center; }
}

.status-returned { border-color: rgba(105, 201, 153, .28); color: #aee5c9; background: rgba(105, 201, 153, .07); }
.reservation-overdue-panel { border-color: rgba(223, 115, 115, .34); box-shadow: inset 0 0 0 1px rgba(223, 115, 115, .04); }
.reservation-overdue-panel .panel-heading > strong { color: #f1aaaa; }


/* Menu public Nocturnal */
.nightclub-menu-section { margin: 1.2rem 0; padding: clamp(1rem, 3vw, 1.5rem); border: 1px solid var(--line); border-radius: 22px; background: radial-gradient(circle at 50% 0, rgba(181,82,255,.1), transparent 45%), var(--surface); }
.nightclub-menu-heading { max-width: 760px; margin: 0 auto 1rem; text-align: center; }
.nightclub-menu-heading h2 { margin: .25rem 0; font-family: Georgia, serif; font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 500; }
.nightclub-menu-heading p { margin: 0; color: var(--muted); }
.nightclub-menu-frame { display: grid; place-items: center; overflow: hidden; border: 1px solid rgba(181,82,255,.2); border-radius: 18px; background: #070707; }
.nightclub-menu-frame img { display: block; width: auto; max-width: 100%; height: auto; max-height: 1200px; object-fit: contain; }
.direction-menu-panel { margin: 1rem 0; }
.direction-menu-panel .panel-heading p { margin: .25rem 0 0; color: var(--muted); }
.direction-menu-layout { display: grid; grid-template-columns: minmax(280px, .8fr) minmax(300px, 1.2fr); gap: 1rem; align-items: start; }
.direction-menu-preview { min-height: 260px; max-height: 520px; display: grid; place-items: center; overflow: auto; border: 1px solid var(--line); border-radius: 14px; background: #090909; }
.direction-menu-preview img { display: block; width: auto; max-width: 100%; height: auto; max-height: 500px; object-fit: contain; }
.direction-menu-empty { display: grid; gap: .35rem; max-width: 360px; padding: 2rem; text-align: center; }
.direction-menu-empty strong { color: var(--accent-light); font-family: Georgia, serif; font-size: 1.15rem; }
.direction-menu-empty span { color: var(--muted); }
.direction-menu-controls { display: grid; gap: .85rem; }
.direction-menu-controls .stack-form { margin: 0; }
.direction-menu-controls input[type="file"] { width: 100%; padding: .75rem; border: 1px dashed var(--line-strong); border-radius: .75rem; background: #0b0b0b; color: var(--text); }
.direction-menu-controls label small { display: block; margin-top: .35rem; color: var(--muted); }
@media (max-width: 900px) { .direction-menu-layout { grid-template-columns: 1fr; } }

/* Accueil Nocturnal — mise en page nightclub cohérente avec l’espace de gestion. */
.nocturnal-home-heading { margin-bottom: 1rem; }
.nocturnal-home-hero { position: relative; min-height: 360px; margin-bottom: 1rem; border-color: rgba(181,82,255,.22); background: radial-gradient(circle at 84% 48%, rgba(181,82,255,.16), transparent 22rem), radial-gradient(circle at 12% 0, rgba(116,16,111,.12), transparent 18rem), linear-gradient(135deg, #171217, #0a0a0a 68%); }
.nocturnal-home-copy { position: relative; z-index: 2; }
.nocturnal-home-hero h2 { max-width: 720px; margin: .2rem 0 .8rem; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.1rem, 4.4vw, 4rem); font-weight: 500; line-height: 1.02; }
.nocturnal-home-hero p { max-width: 690px; }
.nocturnal-home-actions { margin-top: 1.1rem; }
.nocturnal-home-tags { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1.1rem; }
.nocturnal-home-tags span { padding: .38rem .62rem; border: 1px solid rgba(181,82,255,.2); border-radius: 999px; color: #c9c3c6; background: rgba(181,82,255,.045); font-size: .66rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.nocturnal-home-logo-stage { position: relative; width: min(30vw, 360px); min-width: 230px; aspect-ratio: 1; display: grid; place-items: center; flex: 0 0 auto; }
.nocturnal-home-logo-stage img { position: relative; z-index: 2; width: min(92%, 340px); max-height: none; filter: drop-shadow(0 24px 50px rgba(181,82,255,.24)); }
.nocturnal-home-glow { position: absolute; inset: 15%; border-radius: 50%; background: radial-gradient(circle, rgba(181,82,255,.18), rgba(116,16,111,.04) 50%, transparent 72%); filter: blur(8px); }
.nocturnal-home-grid .metric-card { min-height: 170px; display: flex; flex-direction: column; align-items: flex-start; }
.nocturnal-home-grid .metric-card > strong { margin: .15rem 0 .55rem; color: var(--text); font-family: Georgia, "Times New Roman", serif; font-size: 1.4rem; font-weight: 500; }
.nocturnal-home-grid .metric-card > p { margin: 0; color: var(--muted); }
.nocturnal-home-grid .metric-card .eyebrow { margin-bottom: .3rem; }
.nocturnal-recruitment-open { border-color: rgba(105,201,153,.28); background: linear-gradient(145deg, rgba(105,201,153,.075), rgba(255,255,255,.01)), var(--surface-2); }
.nocturnal-public-hero { min-height: 470px; margin-bottom: 1.2rem; padding: clamp(2rem, 5vw, 4.5rem); border-color: rgba(181,82,255,.2); background: radial-gradient(circle at 82% 48%, rgba(181,82,255,.19), transparent 26rem), radial-gradient(circle at 10% 0, rgba(116,16,111,.14), transparent 22rem), linear-gradient(135deg, #171217, #080808 68%); }
.nocturnal-public-hero > div:first-child { position: relative; z-index: 2; }
.nocturnal-public-hero h1 { margin-bottom: .55rem; letter-spacing: -.035em; }
.nocturnal-public-hero p { max-width: 680px; font-size: 1.04rem; }
.nocturnal-public-intro { display: grid; grid-template-columns: minmax(280px,.75fr) minmax(0,1.25fr); gap: 2rem; align-items: end; margin: 2rem 0 1rem; padding: 1.35rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.nocturnal-public-intro h2 { margin: .1rem 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.8rem,3vw,2.8rem); font-weight: 500; }
.nocturnal-public-intro p { margin: 0; color: var(--muted); }
.nightclub-menu-section-public { margin-top: 1.5rem; }
.nightclub-menu-section-public .nightclub-menu-frame { padding: clamp(.5rem, 2vw, 1.2rem); }
.nightclub-menu-section-public .nightclub-menu-frame img { max-height: 1500px; }
input[readonly] { color: var(--accent-light); background: #0e0b0e; cursor: not-allowed; }

@media (max-width: 860px) {
  .nocturnal-home-hero, .nocturnal-public-hero { align-items: center; flex-direction: column-reverse; text-align: left; }
  .nocturnal-home-logo-stage { width: 230px; min-width: 0; }
  .nocturnal-home-logo-stage img { width: 210px; }
  .nocturnal-public-intro { grid-template-columns: 1fr; gap: .6rem; }
}
@media (max-width: 620px) {
  .public-header { align-items: flex-start; flex-direction: column; }
  .public-header nav { width: 100%; overflow-x: auto; padding-bottom: .15rem; }
  .nocturnal-home-hero, .nocturnal-public-hero { min-height: 0; padding: 1.25rem; }
  .nocturnal-home-hero h2 { font-size: 2.35rem; }
  .nocturnal-home-actions .btn { width: 100%; }
  .nocturnal-home-logo-stage { width: 190px; }
  .nocturnal-home-logo-stage img { width: 175px; }
}
.nocturnal-home-logo-stage img { border-radius: 50%; clip-path: circle(49% at 50% 50%); }

/* Nocturnal 3.0.7 — identité visuelle et comptabilité sur le montant total des factures clients. */
:root {
  --nocturnal-neon: #b72cff;
  --nocturnal-neon-light: #efb8ff;
  --nocturnal-neon-deep: #5d0b8e;
}

/* Logo carré officiel Nocturnal : affichage complet sans recadrage. */
.brand-logo-only {
  width: 100%;
  justify-content: center;
  padding: .05rem .15rem .8rem;
}
.brand-logo-only img {
  width: 92px;
  height: 92px;
  object-fit: contain;
  border-radius: 16px;
  filter: drop-shadow(0 10px 24px rgba(183,44,255,.20));
}
.public-brand { min-width: 72px; }
.public-brand img {
  width: 62px;
  height: 62px;
  object-fit: contain;
  border-radius: 12px;
  filter: drop-shadow(0 8px 20px rgba(183,44,255,.18));
}
.login-visual img {
  width: min(92%, 540px);
  max-height: 540px;
  object-fit: contain;
  border-radius: 28px;
  filter: drop-shadow(0 30px 70px rgba(183,44,255,.22));
}
.recruitment-logo {
  width: 104px;
  height: 104px;
  border-color: rgba(183,44,255,.34);
  border-radius: 22px;
  background: radial-gradient(circle at 50% 48%, rgba(183,44,255,.14), transparent 68%), linear-gradient(145deg, rgba(116,16,111,.12), rgba(255,255,255,.015));
}
.recruitment-logo img {
  width: 90px;
  height: 90px;
  object-fit: contain;
  border-radius: 16px;
  filter: drop-shadow(0 12px 26px rgba(183,44,255,.22));
}
.tablet-login-brand img {
  width: 92px;
  height: 92px;
  object-fit: contain;
  border-radius: 16px;
}

/* Encadré recrutement : structure conservée, palette alignée sur le nouveau logo. */
.showcase-recruitment-callout {
  border-color: rgba(183,44,255,.38);
  background:
    radial-gradient(circle at 8% 10%, rgba(183,44,255,.17), transparent 12rem),
    radial-gradient(circle at 82% 80%, rgba(181,82,255,.08), transparent 14rem),
    linear-gradient(135deg, rgba(25,12,31,.96), rgba(14,12,16,.96));
}
.showcase-recruitment-icon {
  border-color: rgba(183,44,255,.48);
  color: var(--nocturnal-neon-light);
  background: rgba(183,44,255,.12);
  box-shadow: 0 0 26px rgba(183,44,255,.18);
}
.showcase-recruitment-callout strong { color: var(--nocturnal-neon-light); }
.showcase-recruitment-button {
  border-color: rgba(227,139,255,.78);
  color: #130719;
  background: linear-gradient(135deg, #efb8ff, #b72cff);
  box-shadow: 0 10px 30px rgba(183,44,255,.25);
}
.showcase-recruitment-button:hover {
  border-color: #f3c7ff;
  color: #0b040e;
  background: linear-gradient(135deg, #f6d8ff, #d05cff);
}

/* Accueil : grand panneau unique, logo à droite et recrutement directement dans le hero. */
.nocturnal-showcase-hero {
  position: relative;
  min-height: 540px;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 4rem);
  margin-bottom: 1.2rem;
  padding: clamp(2rem, 4vw, 3.8rem);
  border-color: rgba(183,44,255,.24);
  background:
    radial-gradient(circle at 82% 48%, rgba(183,44,255,.15), transparent 25rem),
    radial-gradient(circle at 60% 88%, rgba(181,82,255,.08), transparent 22rem),
    linear-gradient(135deg, #151018, #090909 68%);
  box-shadow: 0 28px 80px rgba(0,0,0,.28), inset 0 1px rgba(255,255,255,.025);
}
.nocturnal-showcase-copy {
  position: relative;
  z-index: 2;
  width: min(100%, 790px);
  max-width: 790px !important;
}
.nocturnal-showcase-hero .eyebrow { color: var(--nocturnal-neon-light); }
.nocturnal-showcase-hero h1 {
  max-width: 760px;
  margin: .2rem 0 .75rem;
  font-size: clamp(3rem, 5.4vw, 5rem);
  line-height: .98;
  letter-spacing: -.045em;
}
.nocturnal-showcase-hero p {
  max-width: 690px;
  margin-bottom: 0;
  color: #aaa69d;
  font-size: 1rem;
}
.nocturnal-showcase-hero .hero-actions { margin-top: 1.15rem; }
.nocturnal-showcase-logo-stage {
  position: relative;
  z-index: 1;
  width: min(39vw, 510px);
  min-width: 330px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: visible;
}
.nocturnal-showcase-logo-stage img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
  border-radius: 28px;
  clip-path: none;
  filter: drop-shadow(0 30px 70px rgba(183,44,255,.24));
}
.nocturnal-showcase-glow {
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(183,44,255,.18), rgba(116,16,111,.07) 48%, transparent 74%);
  filter: blur(18px);
}
.nocturnal-home-features { margin-top: 1rem; }
.nocturnal-home-features .metric-card {
  min-height: 160px;
  background: linear-gradient(145deg, rgba(183,44,255,.035), rgba(181,82,255,.018)), var(--surface-2);
}
.nocturnal-home-features .metric-card:hover { border-color: rgba(183,44,255,.28); }
.nocturnal-home-features .eyebrow { color: var(--nocturnal-neon-light); }

@media (max-width: 1100px) {
  .nocturnal-showcase-hero { min-height: 0; }
  .nocturnal-showcase-logo-stage { width: min(38vw, 440px); min-width: 290px; }
}
@media (max-width: 900px) {
  .nocturnal-showcase-hero {
    align-items: stretch;
    flex-direction: column-reverse;
    gap: .5rem;
  }
  .nocturnal-showcase-logo-stage {
    width: min(100%, 430px);
    min-width: 0;
    margin: -1rem auto -1rem;
  }
  .nocturnal-showcase-copy { max-width: none !important; }
  .nocturnal-showcase-hero h1 { font-size: clamp(2.7rem, 8vw, 4.2rem); }
}
@media (max-width: 700px) {
  .brand-logo-only { justify-content: flex-start; }
  .brand-logo-only img { width: 74px; height: 74px; }
  .public-brand img { width: 56px; height: 56px; }
  .nocturnal-showcase-hero { padding: 1.2rem; border-radius: 18px; }
  .nocturnal-showcase-logo-stage { width: min(100%, 340px); margin: -.75rem auto -1rem; }
  .nocturnal-showcase-hero h1 { font-size: clamp(2.35rem, 12vw, 3.45rem); }
  .nocturnal-showcase-hero .hero-actions { display: grid; grid-template-columns: 1fr; }
  .showcase-recruitment-callout { grid-template-columns: 1fr; text-align: center; }
  .showcase-recruitment-icon { margin-inline: auto; }
  .showcase-recruitment-button { width: 100%; }
}

/* Ajustement desktop : conserver la largeur du bandeau recrutement comme sur la référence visuelle. */
@media (min-width: 1101px) {
  .nocturnal-showcase-hero { gap: clamp(1.2rem, 2.4vw, 2.2rem); }
  .nocturnal-showcase-copy { width: min(100%, 760px); max-width: 760px !important; }
  .nocturnal-showcase-logo-stage { width: min(34vw, 470px); min-width: 320px; }
}


/* Organisation Nocturnal: To-do, agenda et couleurs personnelles */
.todo-page-stack { gap: .85rem; }
.todo-overview { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .55rem; }
.todo-overview-item { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: .7rem; min-height: 58px; padding: .72rem .85rem; border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(180deg, rgba(255,255,255,.015), transparent), var(--surface); }
.todo-overview-item span { color: var(--muted); font-size: .7rem; font-weight: 760; }
.todo-overview-item strong { color: var(--text); font-family: Georgia, "Times New Roman", serif; font-size: 1.35rem; font-weight: 500; }
.todo-overview-open { border-color: rgba(181,82,255,.22); }
.todo-overview-progress { border-color: rgba(124,167,223,.22); }
.todo-overview-done { border-color: rgba(105,201,153,.2); }
.todo-overview-alert { border-color: rgba(223,115,115,.34); background: rgba(223,115,115,.055); }
.todo-overview-alert strong { color: #f1aaaa; }

.todo-toolbar-panel { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .8rem; align-items: end; padding: .85rem; }
.todo-compact-filters { min-width: 0; display: grid; grid-template-columns: minmax(190px, 1.4fr) repeat(3, minmax(125px, .72fr)) auto; gap: .55rem; align-items: end; }
.todo-compact-filters label { min-width: 0; display: grid; gap: .25rem; color: #cfcac1; font-size: .66rem; font-weight: 760; }
.todo-compact-filters input, .todo-compact-filters select { min-width: 0; min-height: 36px; padding-top: .48rem; padding-bottom: .48rem; font-size: .73rem; }
.todo-filter-actions { min-height: 36px; display: flex; align-items: center; gap: .4rem; }
.todo-create-drawer { position: relative; align-self: end; }
.todo-create-drawer > summary { list-style: none; white-space: nowrap; }
.todo-create-drawer > summary::-webkit-details-marker { display: none; }
.todo-create-drawer[open] { grid-column: 1 / -1; width: 100%; padding-top: .85rem; border-top: 1px solid var(--line); }
.todo-create-drawer[open] > summary { margin-left: auto; }
.todo-create-form { margin-top: .85rem; padding: .85rem; border: 1px solid var(--line); border-radius: 11px; background: rgba(0,0,0,.18); }
.todo-create-form textarea, .todo-edit-form textarea { min-height: 78px; }

.todo-board-section { min-width: 0; }
.todo-board-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: .65rem; padding: 0 .1rem; }
.todo-board-heading h2 { margin: .12rem 0 0; font-family: Georgia, "Times New Roman", serif; font-size: 1.22rem; font-weight: 500; }
.todo-board-heading .eyebrow { margin-bottom: 0; }
.todo-board-heading small { color: var(--muted); font-size: .68rem; }
.todo-kanban { min-width: 0; display: grid; grid-template-columns: repeat(4, minmax(230px, 1fr)); gap: .65rem; align-items: start; }
.todo-kanban-columns-1 { grid-template-columns: minmax(280px, 560px); }
.todo-kanban-column { min-width: 0; overflow: visible; border: 1px solid var(--line); border-radius: 13px; background: #0d0d0d; }
.todo-kanban-column-head { min-height: 46px; display: flex; align-items: center; justify-content: space-between; gap: .55rem; padding: .62rem .7rem; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.018); }
.todo-kanban-column-head > div { min-width: 0; display: flex; align-items: center; gap: .48rem; }
.todo-kanban-column-head strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .76rem; }
.todo-column-dot { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: #aaa69d; box-shadow: 0 0 0 3px rgba(170,166,157,.08); }
.todo-column-in_progress .todo-column-dot { background: var(--info); box-shadow: 0 0 0 3px rgba(124,167,223,.09); }
.todo-column-done .todo-column-dot { background: var(--success); box-shadow: 0 0 0 3px rgba(105,201,153,.09); }
.todo-column-cancelled .todo-column-dot { background: #77736c; }
.todo-column-count { min-width: 25px; height: 25px; display: grid; place-items: center; padding: 0 .35rem; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: #090909; font-size: .65rem; font-weight: 850; }
.todo-kanban-column-body { display: grid; gap: .5rem; padding: .5rem; }
.todo-column-empty { padding: 1.3rem .6rem; color: #6e6a63; font-size: .7rem; text-align: center; }

.todo-kanban-card { min-width: 0; display: grid; gap: .52rem; padding: .7rem; border: 1px solid rgba(255,255,255,.075); border-radius: 10px; background: #121212; transition: border-color .15s ease, transform .15s ease, background .15s ease; }
.todo-kanban-card:hover { transform: translateY(-1px); border-color: rgba(181,82,255,.2); background: #141414; }
.todo-card-overdue { border-color: rgba(223,115,115,.36); background: linear-gradient(145deg, rgba(223,115,115,.055), transparent 58%), #121212; }
.todo-card-closed { opacity: .76; }
.todo-kanban-card-top { min-width: 0; display: flex; align-items: center; gap: .38rem; }
.todo-priority-marker { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: #a5a198; }
.todo-priority-marker-low { background: var(--success); }
.todo-priority-marker-high { background: var(--warning); }
.todo-priority-marker-urgent { background: var(--danger); box-shadow: 0 0 0 3px rgba(223,115,115,.1); }
.todo-kanban-priority { color: var(--muted); font-size: .6rem; font-weight: 760; text-transform: uppercase; letter-spacing: .04em; }
.todo-overdue-chip { margin-left: auto; padding: .18rem .38rem; border: 1px solid rgba(223,115,115,.28); border-radius: 999px; color: #f1aaaa; background: rgba(223,115,115,.06); font-size: .58rem; font-weight: 850; }
.todo-kanban-card h3 { margin: 0; color: #f2eee5; font-size: .83rem; line-height: 1.28; overflow-wrap: anywhere; }
.todo-kanban-description { display: -webkit-box; margin: -.05rem 0 0; overflow: hidden; color: #96928a; font-size: .68rem; line-height: 1.42; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.todo-kanban-meta { display: grid; gap: .32rem; padding-top: .15rem; }
.todo-kanban-person, .todo-kanban-due { min-width: 0; display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: center; gap: .32rem; }
.todo-meta-icon { width: 18px; height: 18px; display: grid; place-items: center; color: #77736c; font-size: .65rem; }
.todo-kanban-meta div > div { min-width: 0; display: flex; align-items: baseline; justify-content: space-between; gap: .45rem; }
.todo-kanban-meta small { color: #6f6b64; font-size: .56rem; font-weight: 800; text-transform: uppercase; }
.todo-kanban-meta strong { overflow: hidden; color: #bcb7ad; font-size: .64rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.todo-kanban-due.is-overdue .todo-meta-icon, .todo-kanban-due.is-overdue strong { color: #ef9d9d; }
.todo-kanban-completed { padding-top: .4rem; border-top: 1px solid rgba(255,255,255,.055); color: #7da98f; font-size: .6rem; line-height: 1.35; }

.todo-kanban-actions { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: .35rem; padding-top: .48rem; border-top: 1px solid rgba(255,255,255,.06); }
.todo-quick-actions { min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: .3rem; }
.todo-quick-actions .btn { min-height: 30px; padding: .34rem .5rem; font-size: .62rem; }
.todo-card-menu { position: relative; flex: 0 0 auto; }
.todo-card-menu > summary { list-style: none; }
.todo-card-menu > summary::-webkit-details-marker { display: none; }
.todo-menu-trigger { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; color: #aaa69d; background: #0b0b0b; cursor: pointer; font-size: .68rem; font-weight: 900; letter-spacing: .08em; }
.todo-card-menu[open] { z-index: 2400; }
.todo-card-menu[open] .todo-menu-trigger { position: relative; z-index: 2402; border-color: rgba(181,82,255,.3); color: var(--accent-light); }
.todo-kanban-card:has(.todo-card-menu[open]) { position: relative; z-index: 2300; transform: none; }
.todo-card-menu-panel { position: fixed; z-index: 2401; left: var(--todo-menu-left, 50%); top: var(--todo-menu-top, 50%); right: auto; width: min(520px, calc(100vw - 1.5rem)); max-height: calc(100vh - 1.5rem); overflow-y: auto; overscroll-behavior: contain; padding: .8rem; border: 1px solid rgba(181,82,255,.24); border-radius: 12px; background: #101010; box-shadow: 0 24px 60px rgba(0,0,0,.62); }
.todo-card-menu-heading { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-bottom: .65rem; padding-bottom: .55rem; border-bottom: 1px solid var(--line); }
.todo-card-menu-heading > div { min-width: 0; display: grid; gap: .08rem; }
.todo-card-menu-heading small { color: var(--muted); font-size: .58rem; text-transform: uppercase; }
.todo-card-menu-heading strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .7rem; }
.todo-card-menu-heading > span { color: #68645d; font-size: .62rem; }
.todo-edit-form { gap: .55rem; }
.todo-edit-form label { font-size: .65rem; }
.todo-edit-form input, .todo-edit-form select, .todo-edit-form textarea { min-height: 36px; padding-top: .48rem; padding-bottom: .48rem; font-size: .7rem; }
.todo-menu-cancel, .todo-menu-delete { margin-top: .55rem; padding-top: .55rem; border-top: 1px solid var(--line); }
.todo-menu-delete .btn { width: 100%; }

@media (max-width: 1260px) {
  .todo-toolbar-panel { grid-template-columns: 1fr; }
  .todo-compact-filters { grid-template-columns: minmax(190px, 1.4fr) repeat(2, minmax(130px, .8fr)); }
  .todo-filter-actions { grid-column: auto; }
  .todo-create-drawer { justify-self: end; }
  .todo-kanban { grid-template-columns: repeat(2, minmax(250px, 1fr)); }
  .todo-kanban-columns-1 { grid-template-columns: minmax(280px, 560px); }
}
@media (max-width: 760px) {
  .todo-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .todo-compact-filters { grid-template-columns: 1fr 1fr; }
  .todo-filter-search, .todo-filter-actions { grid-column: 1 / -1; }
  .todo-kanban, .todo-kanban-columns-1 { grid-template-columns: 1fr; }
  .todo-board-heading { align-items: flex-start; flex-direction: column; gap: .25rem; }
  .todo-card-menu-panel { width: min(520px, calc(100vw - 1rem)); max-height: calc(100vh - 1rem); }
}
@media (max-width: 480px) {
  .todo-overview { grid-template-columns: 1fr 1fr; }
  .todo-compact-filters { grid-template-columns: 1fr; }
  .todo-filter-search, .todo-filter-actions { grid-column: auto; }
  .todo-filter-actions { align-items: stretch; flex-direction: column; }
  .todo-filter-actions .btn { width: 100%; }
  .todo-kanban-actions { align-items: stretch; }
}

/* Agenda d'équipe */
.agenda-layout { grid-template-columns: minmax(320px, .8fr) minmax(0, 1.2fr); }
.agenda-my-list { display: grid; gap: .6rem; max-height: 460px; overflow-y: auto; }
.agenda-my-item { display: flex; align-items: flex-start; justify-content: space-between; gap: .8rem; padding: .78rem; border: 1px solid var(--line); border-radius: 10px; background: #0b0b0b; }
.agenda-my-item > div:first-child { min-width: 0; display: flex; flex-direction: column; }
.agenda-my-item span { margin-top: .16rem; color: var(--accent-light); font-size: .74rem; }
.agenda-my-item small { margin-top: .22rem; color: var(--muted); overflow-wrap: anywhere; }
.agenda-calendar-panel { overflow-x: auto; }
.agenda-toolbar { min-width: 900px; }
.agenda-week { display: grid; grid-template-columns: repeat(7, minmax(180px, 1fr)); gap: .6rem; min-width: 1320px; }
.agenda-day { min-height: 300px; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: #0a0a0a; }
.agenda-day-heading { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .68rem .72rem; border-bottom: 1px solid var(--line); background: rgba(181, 82, 255, .045); }
.agenda-day-heading span { color: var(--accent); font-size: .7rem; font-weight: 850; text-transform: uppercase; }
.agenda-day-heading strong { color: #d7d1c5; font-size: .76rem; }
.agenda-day-events { display: grid; gap: .5rem; padding: .55rem; }
.agenda-day-empty { padding: .7rem .3rem; color: var(--muted); font-size: .72rem; text-align: center; }
.agenda-event { display: grid; gap: .42rem; padding: .6rem; border: 1px solid rgba(126, 183, 232, .22); border-radius: 9px; background: rgba(126, 183, 232, .055); }
.agenda-event-mine { border-color: rgba(181, 82, 255, .3); background: rgba(181, 82, 255, .055); }
.agenda-event-time { display: flex; align-items: baseline; justify-content: space-between; gap: .4rem; }
.agenda-event-time strong { color: #b9dcfa; font-size: .69rem; }
.agenda-event-mine .agenda-event-time strong { color: var(--accent-light); }
.agenda-event-time span { color: var(--muted); font-size: .6rem; text-align: right; }
.agenda-event-body { min-width: 0; }
.agenda-event-body > span { display: block; color: var(--muted); font-size: .62rem; font-weight: 750; text-transform: uppercase; }
.agenda-event-body > strong { display: block; margin-top: .16rem; color: #e2ddd3; font-size: .78rem; overflow-wrap: anywhere; }
.agenda-event-body p { margin: .28rem 0 0; color: #a9a49b; font-size: .67rem; line-height: 1.4; overflow-wrap: anywhere; }
.agenda-admin-actions > summary { width: max-content; list-style: none; }
.agenda-admin-actions > summary::-webkit-details-marker { display: none; }
.agenda-admin-actions .details-form { min-width: 310px; }

@media (max-width: 1000px) {
  .agenda-layout { grid-template-columns: 1fr; }
}

/* Shared employee color identity for Agenda + Absences */
.planning-color-picker {
  padding: 1rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(181, 82, 255, .055), rgba(12, 12, 12, .96));
}
.planning-color-picker-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .8rem; }
.planning-color-picker-head h3 { margin: .16rem 0 0; color: #ece7dc; font-size: 1rem; }
.planning-current-color,
.planning-author-badge {
  --employee-color: #475569;
  display: inline-flex !important;
  align-items: center;
  width: max-content;
  max-width: 100%;
  gap: .42rem;
  margin: 0 !important;
  padding: .3rem .55rem;
  border: 1px solid color-mix(in srgb, var(--employee-color) 72%, #fff 8%);
  border-radius: 999px;
  color: #fff !important;
  background: var(--employee-color);
  box-shadow: 0 5px 16px color-mix(in srgb, var(--employee-color) 24%, transparent);
  font-size: .66rem !important;
  font-weight: 850;
  line-height: 1.15;
  text-transform: none !important;
  overflow: hidden;
}
.planning-current-color i,
.planning-author-badge i { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px rgba(255,255,255,.2); }
.planning-current-color strong,
.planning-author-badge strong { min-width: 0; color: #fff !important; font-size: inherit !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.planning-color-palette { display: flex; flex-wrap: wrap; gap: .55rem; }
.planning-color-form { margin: 0; }
.planning-color-choice {
  --employee-color: #475569;
  position: relative;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 2px solid rgba(255,255,255,.13);
  border-radius: 50%;
  background: #0b0b0b;
  cursor: pointer;
  transition: transform .12s ease, border-color .12s ease, opacity .12s ease;
}
.planning-color-choice > span { position: absolute; inset: 5px; border-radius: 50%; background: var(--employee-color); box-shadow: 0 4px 12px color-mix(in srgb, var(--employee-color) 30%, transparent); }
.planning-color-choice > b { position: absolute; z-index: 2; inset: 0; display: grid; place-items: center; color: #fff; font-size: .8rem; text-shadow: 0 1px 3px #000; }
.planning-color-choice:hover:not(:disabled) { transform: translateY(-2px) scale(1.04); border-color: rgba(255,255,255,.5); }
.planning-color-choice.selected { border-color: var(--accent-light); box-shadow: 0 0 0 2px rgba(181,82,255,.18); }
.planning-color-choice:disabled { opacity: .22; cursor: not-allowed; filter: grayscale(.65); }
.planning-color-required { margin: .75rem 0 0; color: #efb1a9; }

/* Current day highlight shared by Agenda + Absences */
.calendar-day-today {
  position: relative;
  background: linear-gradient(145deg, rgba(181, 82, 255, .12), rgba(11, 11, 11, .96));
  box-shadow: inset 0 0 0 2px rgba(181, 82, 255, .58), 0 0 24px rgba(181, 82, 255, .06);
}
.calendar-day-today .calendar-date { color: #171008; background: var(--accent-light); font-weight: 900; box-shadow: 0 0 0 3px rgba(181,82,255,.14); }
.calendar-day-today.outside-month { opacity: .8; }

/* Employee-colored calendar cards */
.calendar-event,
.agenda-my-item,
.absence-list-item { --employee-color: #475569; }
.agenda-calendar-event,
.absence-calendar-event {
  border-color: color-mix(in srgb, var(--employee-color) 58%, transparent);
  border-left: 3px solid var(--employee-color);
  background: color-mix(in srgb, var(--employee-color) 11%, #0b0b0b 89%);
  overflow: visible;
}
.absence-calendar-event > span:last-child { margin-top: .24rem; color: #b9b4aa; font-size: .62rem; }
.absence-list-item { border-left: 3px solid var(--employee-color); background: color-mix(in srgb, var(--employee-color) 5%, #0b0b0b 95%); }
.absence-list-item .planning-author-badge { margin-bottom: .16rem !important; }

/* Monthly Agenda */
.agenda-calendar-panel { overflow-x: auto; }
.agenda-toolbar { min-width: 820px; }
.agenda-month-calendar { min-width: 980px; }
.agenda-month-calendar .calendar-day { min-height: 165px; }
.agenda-calendar-event { display: grid; gap: .24rem; }
.agenda-calendar-time { color: color-mix(in srgb, var(--employee-color) 52%, #fff 48%) !important; font-size: .61rem !important; font-weight: 800; }
.agenda-calendar-title { display: block; color: #eee8dd; font-size: .68rem; line-height: 1.25; overflow-wrap: anywhere; }
.agenda-calendar-description { display: block !important; color: #9f9a91 !important; font-size: .59rem !important; line-height: 1.3; white-space: normal !important; overflow-wrap: anywhere; }
.agenda-my-item { border-left: 3px solid var(--employee-color); background: color-mix(in srgb, var(--employee-color) 5%, #0b0b0b 95%); }
.calendar-admin-actions { margin-top: .18rem; }
.calendar-admin-actions > summary { font-size: .58rem; min-height: 26px; padding: .2rem .4rem; }
.calendar-admin-actions .details-form { min-width: 300px; margin-top: .45rem; padding: .65rem; border: 1px solid var(--line); border-radius: 9px; background: #111; }

@media (max-width: 700px) {
  .planning-color-picker-head { align-items: flex-start; flex-direction: column; }
  .planning-color-choice { width: 36px; height: 36px; }
}
