:root {
  --bg: #080808;
  --surface: #111111;
  --surface-2: #171717;
  --surface-3: #1d1d1d;
  --line: rgba(255, 255, 255, .10);
  --line-strong: rgba(180, 150, 83, .34);
  --text: #f7f4ec;
  --muted: #aaa69d;
  --gold: #b49653;
  --gold-light: #d8c18a;
  --gold-dark: #463011;
  --success: #69c999;
  --warning: #e7b25b;
  --danger: #df7373;
  --info: #7ca7df;
  --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(180, 150, 83, .08), transparent 34rem), 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(--gold-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(180, 150, 83, .12)); }
.brand > span { display: flex; flex-direction: column; min-width: 0; }
.brand strong { color: var(--gold-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(180, 150, 83, .22); color: var(--gold-light); background: linear-gradient(90deg, rgba(180, 150, 83, .14), rgba(180, 150, 83, .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(180, 150, 83, .34); color: var(--gold-light); background: rgba(180, 150, 83, .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(--gold); 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(--gold); 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(--gold); 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(--gold-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(--gold); 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(--gold-light); font-weight: 750; }
.back-link { display: inline-flex; margin-bottom: 1rem; }
.text-link:hover, .back-link:hover { text-decoration: underline; }

.panel, .vehicle-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; }
.rental-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(180, 150, 83, .28); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { border-color: rgba(180, 150, 83, .45); color: #171006; background: linear-gradient(180deg, #d8c18a, #a98543); }
.btn-primary:hover:not(:disabled) { background: linear-gradient(180deg, #e7d6ac, #b49653); }
.btn-ghost { background: transparent; }
.btn-secondary { border-color: rgba(124, 167, 223, .30); color: #c9def8; background: rgba(124, 167, 223, .075); }
.btn-secondary:hover:not(:disabled) { border-color: rgba(124, 167, 223, .48); background: rgba(124, 167, 223, .12); }
.btn-warning { border-color: rgba(231, 178, 91, .38); color: #f5d79e; background: rgba(231, 178, 91, .09); }
.btn-warning:hover:not(:disabled) { border-color: rgba(231, 178, 91, .56); background: rgba(231, 178, 91, .14); }
.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(180, 150, 83, .28); background: linear-gradient(145deg, rgba(180, 150, 83, .12), rgba(180, 150, 83, .025)), var(--surface); }
.metric.featured strong { color: var(--gold-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(180, 150, 83, .3); }
.export-grid { align-items: stretch; }
.export-card { min-height: 190px; display: flex; flex-direction: column; gap: .45rem; }
.export-card > span { color: var(--muted); font-size: .72rem; font-weight: 780; }
.export-card > strong { color: var(--gold-light); font-family: Georgia, "Times New Roman", serif; font-size: 1.45rem; font-weight: 500; }
.export-card > p { margin: 0 0 1rem; color: var(--muted); font-size: .8rem; line-height: 1.55; }
.export-card > .btn { align-self: flex-start; margin-top: auto; }
.big-value { margin: .65rem 0 1rem; color: var(--gold-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; }
input[type="checkbox"] { width: 18px; height: 18px; min-height: 18px; padding: 0; border-radius: 5px; accent-color: var(--gold); box-shadow: none; }
select { appearance: none; padding-right: 2.6rem; cursor: pointer; background-color: #0b0b0b; background-image: linear-gradient(45deg, transparent 50%, #b49653 50%), linear-gradient(135deg, #b49653 50%, transparent 50%), linear-gradient(to right, rgba(180, 150, 83, .18), rgba(180, 150, 83, .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(180, 150, 83, .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(180, 150, 83, .55); box-shadow: 0 0 0 3px rgba(180, 150, 83, .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(--gold); }
.field-error { color: #ffaaaa; font-size: .68rem; }
.check-row { display: grid !important; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: .55rem !important; }
.check-row input { grid-column: 1; grid-row: 1; width: 18px; min-height: 18px; margin-top: .08rem; accent-color: var(--gold); }
.check-row > span { grid-column: 2; grid-row: 1; }
.check-row > small { grid-column: 2; grid-row: 2; }
.checkbox-card { padding: .72rem .82rem; border: 1px solid rgba(180, 150, 83, .18); border-radius: 10px; background: rgba(180, 150, 83, .035); }
.checkbox-card-label { margin: 0; }
.checkbox-card-label > span strong { color: #e3ded4; font-size: .78rem; line-height: 1.25; }
.checkbox-card-label > small { margin-top: .06rem; }
.checkbox-card-compact { padding: .58rem .68rem; }
.settings-subsection { margin-top: .3rem; padding-top: .2rem; border-top: 1px solid rgba(255,255,255,.04); }
.settings-subsection h3 { margin: .2rem 0 .35rem; font-size: 1.05rem; }
.settings-inline-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; margin-bottom: .8rem; }
.settings-card-form { display: grid; gap: 1rem; }
.settings-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.settings-card { height: 100%; max-width: none; }
.settings-card-wide { grid-column: 1 / -1; }
.settings-card-featured { border-color: rgba(180, 150, 83, .3); background: linear-gradient(145deg, rgba(180,150,83,.09), rgba(180,150,83,.018)), var(--surface); }
.settings-card-value { color: var(--gold-light); font-family: Georgia, "Times New Roman", serif; font-size: 1.4rem; font-weight: 500; white-space: nowrap; }
.settings-card-fields { margin-top: .8rem; }
.settings-card-note { margin-top: .85rem; margin-bottom: 0; }
.settings-food-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; margin-top: .85rem; }
.settings-food-grid > label, .settings-items-grid > label { min-width: 0; display: flex; flex-direction: column; gap: .35rem; color: #d4d0c7; font-size: .73rem; font-weight: 720; }
.settings-items-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; margin-top: .8rem; }
.settings-save-bar { position: sticky; bottom: .75rem; z-index: 4; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem .9rem; border: 1px solid rgba(180,150,83,.22); border-radius: 12px; background: rgba(14,14,14,.96); box-shadow: 0 14px 36px rgba(0,0,0,.35); backdrop-filter: blur(12px); }
.settings-save-bar .btn { min-width: 230px; }
.tax-declaration-reference { color: var(--gold-light) !important; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .015em; }
.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; }
.catalog-filters { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: end; }
.catalog-filters label { min-width: 0; grid-column: span 2; display: flex; flex-direction: column; gap: .35rem; color: #d4d0c7; font-size: .73rem; font-weight: 720; }
.catalog-filters label > small { max-width: 320px; color: #77746d; font-weight: 450; line-height: 1.35; }
.catalog-filters input, .catalog-filters select { min-width: 0; max-width: none; }
.catalog-filters .catalog-search-field { grid-column: span 4; }
.catalog-filters .catalog-sort-field { grid-column: span 3; }
.catalog-filter-actions { min-height: 42px; grid-column: span 3; display: flex; align-items: center; align-self: end; flex-wrap: wrap; gap: .55rem; }
.catalog-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); }
.catalog-status-quick-form label { min-width:0; }
.catalog-status-only-layout { grid-template-columns:1fr; }
.catalog-results-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin: 1.15rem 0 .8rem; }
.catalog-results-heading h2 { margin: .15rem 0 0; font-size: 1.35rem; }
.catalog-results-heading > small { color: var(--muted); }
.catalog-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(231, 178, 91, .28); background: rgba(231, 178, 91, .075); }
.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, .status-active { border-color: rgba(105, 201, 153, .26); color: #aee5c9; background: rgba(105, 201, 153, .07); }
.status-pending, .status-partial, .status-open, .status-to_review { border-color: rgba(231, 178, 91, .28); color: #f0cf91; background: rgba(231, 178, 91, .07); }
.status-planned, .status-corrected { border-color: rgba(124, 167, 223, .30); color: #b9d5f7; background: rgba(124, 167, 223, .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(180, 150, 83, .25); border-radius: 50%; color: var(--gold-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(--gold-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(--gold-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(--gold); 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(--gold); 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(--gold-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(--gold); 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(--gold-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(--gold-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(180, 150, 83, .28); background: rgba(180, 150, 83, .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(--gold-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(--gold-light); cursor: pointer; font-weight: 750; }
.inline-details { min-width: 0; }
.inline-details > summary { width: max-content; list-style: none; }
.inline-details > summary::-webkit-details-marker { display: none; }
.inline-details[open] > summary { border-color: rgba(180, 150, 83, .32); color: var(--gold-light); background: rgba(180, 150, 83, .055); }
.mini-form { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; margin-top: .55rem; padding: .62rem; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.018); }
.mini-form input, .mini-form select { width: auto; min-width: 180px; flex: 1 1 180px; }
.section-spaced { margin-top: 1rem; }

.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(--gold-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(180,150,83,.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(180,150,83,.14)); }
.catalog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.vehicle-card { min-width: 0; overflow: hidden; display: flex; flex-direction: column; height: 100%; box-shadow: none; transition: transform .16s ease, border-color .16s ease; }
.vehicle-card:hover { transform: translateY(-2px); border-color: rgba(180, 150, 83, .28); }
.vehicle-image { min-height: 230px; display: grid; place-items: center; overflow: hidden; background: radial-gradient(circle, rgba(180,150,83,.07), transparent 60%), #0b0b0b; }
.vehicle-image img { width: 100%; height: 230px; object-fit: cover; }
.catalog-vehicle-image { color: transparent; }
.vehicle-image img.vehicle-placeholder-image { object-fit: contain; background: #050505; }
.vehicle-detail-image img.vehicle-placeholder-image { object-fit: contain; background: #050505; }
.edit-card summary img.vehicle-placeholder-image { object-fit: contain; background: #050505; }
.vehicle-image span { color: rgba(180,150,83,.34); font-family: Georgia, serif; letter-spacing: .25em; }
.vehicle-card-body { padding: 1rem; display: flex; flex: 1 1 auto; flex-direction: column; }
.vehicle-card-body > .btn-wide:last-child { margin-top: auto; }
.catalog-capacity-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .55rem; min-height: 1.35rem; color: #f0ede6; line-height: 1.35; }
.catalog-capacity-meta span { white-space: nowrap; }
.vehicle-card .muted.clamp { margin: .35rem 0 .8rem; line-height: 1.35; }
.vehicle-card-head { display: flex; align-items: center; justify-content: space-between; gap: .7rem; color: var(--gold); font-size: .68rem; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; }
.vehicle-card-head strong { color: var(--gold-light); font-family: Georgia, serif; font-size: 1.05rem; letter-spacing: 0; }
.vehicle-card h2 { margin: .85rem 0 .08rem; font-family: Georgia, serif; font-size: 1.45rem; font-weight: 500; }
.vehicle-name { margin-bottom: .75rem; color: #cac6bd; }
.vehicle-detail { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr); gap: 1.25rem; align-items: center; }
.vehicle-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(180,150,83,.09), transparent 55%), var(--surface); }
.vehicle-detail-image img { width: 100%; height: 500px; object-fit: contain; }
.vehicle-detail-copy { padding: 1rem; }
.vehicle-detail-copy h1 span { color: var(--gold-light); }
.price-display { margin: 1rem 0; color: var(--gold-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(180,150,83,.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(--gold); }
.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(--gold); 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)); }
  .catalog-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)); }
  .vehicle-detail { grid-template-columns: 1fr; }
  .vehicle-detail-image { min-height: 350px; }
  .vehicle-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) {
  .catalog-filters { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .catalog-filters .catalog-search-field { grid-column: span 6; }
  .catalog-filters label { grid-column: span 2; }
  .catalog-filters .catalog-sort-field { grid-column: span 3; }
  .catalog-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; }
  .catalog-filters { display:grid; grid-template-columns:1fr; }
  .search-bar input, .search-bar select, .period-filter label { width: 100%; max-width: none; min-width: 0; }
  .catalog-filters label, .catalog-filters .catalog-search-field, .catalog-filters .catalog-price-field, .catalog-filters .catalog-capacity-filter, .catalog-filters .catalog-sort-field { width: 100%; max-width: none; min-width: 0; grid-column:1; }
  .catalog-filter-actions { width: 100%; grid-column:1; align-self: stretch; }
  .catalog-status-quick-form { grid-template-columns:1fr; }
  .catalog-filter-actions .btn { flex: 1; }
  .catalog-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; }
  .mini-form { align-items: stretch; flex-direction: column; }
  .mini-form input, .mini-form select, .mini-form .btn { width: 100%; min-width: 0; }
  .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; }
  .catalog-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; }
  .vehicle-detail-image { min-height: 280px; }
  .vehicle-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(--gold-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(--gold-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(231, 178, 91, .28); color: #f0cf91; background: rgba(231, 178, 91, .07); }
.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(--gold-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(180, 150, 83, .46); background: #121210; }
.custom-select-button:focus-visible { outline: none; border-color: rgba(180, 150, 83, .62); box-shadow: 0 0 0 3px rgba(180, 150, 83, .09); }
.custom-select-button.placeholder { color: #827e76; }
.custom-select-arrow { flex: 0 0 auto; color: var(--gold); 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(180, 150, 83, .3); border-radius: 11px; background: #10100f; 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(180, 150, 83, .1); }
.custom-select-option.selected { color: var(--gold-light); background: rgba(180, 150, 83, .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(180, 150, 83, .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(180, 150, 83, .38); border-radius: 12px; background: rgba(180, 150, 83, .035); cursor: pointer; }
.contract-upload:hover, .contract-upload:focus-within { border-color: rgba(180, 150, 83, .72); background: rgba(180, 150, 83, .065); }
.contract-upload > span { color: var(--gold); 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(180, 150, 83, .28); border-radius: 7px; color: var(--gold-light); background: rgba(180, 150, 83, .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(180, 150, 83, .24); border-radius: 10px; background: rgba(180, 150, 83, .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(--gold-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(--gold); 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(231, 178, 91, .24); border-radius: 11px; background: rgba(231, 178, 91, .045); }
.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(180, 150, 83, .28); }
.notice-warning { border-color: rgba(231, 178, 91, .25); }
.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(180, 150, 83, .3); background: radial-gradient(circle at left, rgba(180, 150, 83, .08), transparent 45%), var(--surface); }
.treasury-total-main { display: flex; flex-direction: column; }
.treasury-total-main > span { color: var(--gold); font-size: .72rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.treasury-total-main > strong { margin-top: .25rem; color: var(--gold-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, .settings-inline-grid, .settings-card-grid, .settings-food-grid, .settings-items-grid { grid-template-columns: 1fr; }
  .settings-card-wide { grid-column: auto; }
  .settings-save-bar { position: static; align-items: stretch; flex-direction: column; }
  .settings-save-bar .btn { width: 100%; min-width: 0; }
  .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(180, 150, 83, .28); background: radial-gradient(circle at 8% 20%, rgba(180, 150, 83, .075), transparent 35%), var(--surface); }
.treasury-current { display: flex; min-height: 170px; flex-direction: column; justify-content: center; padding: .85rem; border: 1px solid rgba(180, 150, 83, .2); border-radius: 12px; background: rgba(8, 8, 8, .62); }
.treasury-current > span { color: var(--gold); font-size: .7rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.treasury-current > strong { margin: .25rem 0; color: var(--gold-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(180, 150, 83, .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(--gold); 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(180, 150, 83, .22); border-radius: 10px; background: rgba(180, 150, 83, .045); overflow-wrap: anywhere; }
.tablet-url-box span { color: var(--gold); font-size: .66rem; font-weight: 800; text-transform: uppercase; }
.tablet-url-box strong { color: var(--gold-light); font-size: .78rem; }
.tablet-session-badge { padding: .35rem .55rem; border: 1px solid rgba(180, 150, 83, .28); border-radius: 999px; color: var(--gold); background: rgba(180, 150, 83, .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-submission-panel { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem 1.25rem; align-items: center; }
.tax-proof-submission-copy { min-width: 0; }
.tax-proof-submission-copy .panel-heading { margin-bottom: .7rem; }
.tax-proof-submission-copy > p { margin: 0; }
.tax-proof-submission-button { justify-self: end; white-space: nowrap; }
.tax-proof-form { display: block; }
.tax-proof-date-field { display: grid; gap: .35rem; }
.tax-proof-date-field > label { color: #d4d0c7; font-size: .73rem; font-weight: 720; }
.tax-proof-date-field > small { color: #77746d; font-size: .68rem; font-weight: 450; }
.tax-proof-date-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .75rem; align-items: center; }
.tax-proof-generate-button { align-self: center; justify-self: end; white-space: nowrap; }
.tax-proof-page-stack { gap: 1rem; }
.tax-proof-page-heading p strong { color: var(--gold-light); }
.tax-proof-controls { overflow: visible; }
.tax-proof-control-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; }
.tax-proof-control-card { min-width: 0; display: flex; flex-direction: column; gap: .85rem; padding: .95rem; border: 1px solid var(--line); border-radius: 12px; background: #0c0c0c; }
.tax-proof-control-copy { display: grid; gap: .28rem; }
.tax-proof-control-copy > strong { color: #ece7dc; font-size: .92rem; }
.tax-proof-control-copy > small { color: var(--muted); line-height: 1.45; }
.tax-proof-period-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .65rem; align-items: end; margin-top: auto; }
.tax-proof-period-form label { min-width: 0; display: grid; gap: .35rem; color: #d4d0c7; font-size: .73rem; font-weight: 720; }
.tax-proof-period-form .btn, .tax-proof-publish-form .btn { min-height: 42px; }
.tax-proof-publish-form { margin-top: auto; }
.tax-proof-publish-form .btn { width: 100%; }
.tax-proof-inline-alert { margin-top: .9rem; margin-bottom: 0; }
.tax-proof-preview-panel { overflow: hidden; }
.tax-proof-preview { display: block; padding: 1rem; border: 1px solid rgba(255,255,255,.035); border-radius: 14px; background: #050505; overflow: hidden; }
.tax-proof-preview img { display: block; width: 100%; max-width: 1240px; min-width: 0; height: auto; margin: 0 auto; background: #080808; box-shadow: 0 12px 35px rgba(0,0,0,.18); }
.tax-proof-public-link-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: .55rem; align-items: center; }
.tax-proof-public-link-row input { min-width: 0; }
.tax-proof-public-meta { display: flex; flex-wrap: wrap; gap: .45rem 1rem; margin-top: .65rem; }
@media (max-width: 760px) {
  .tax-proof-submission-panel, .tax-proof-date-row, .tax-proof-control-grid, .tax-proof-period-form, .tax-proof-public-link-row { grid-template-columns: 1fr; }
  .tax-proof-submission-button, .tax-proof-generate-button { width: 100%; justify-self: stretch; }
  .tax-proof-preview { padding: .45rem; }
}

/* Public tax-proof links */
.tax-proof-public-panel { margin-bottom: 1rem; border-color: rgba(180, 150, 83, .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(--gold-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 catalogue 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(180,150,83,.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(180,150,83,.08);
  border-radius: 50%;
  pointer-events: none;
}
.recruitment-body::before { top: 8rem; left: -11rem; box-shadow: 0 0 0 3rem rgba(180,150,83,.018), 0 0 0 7rem rgba(180,150,83,.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(180,150,83,.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(--gold-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(180,150,83,.25);
  background: rgba(5,5,5,.46);
}
.recruitment-back-button:hover { border-color: rgba(180,150,83,.5); }
.recruitment-form::after {
  content: "";
  position: absolute;
  top: -11rem;
  right: -10rem;
  width: 28rem;
  height: 28rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(180,150,83,.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(180,150,83,.28);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(180,150,83,.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(180,150,83,.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(180,150,83,.22); }
.recruitment-section-availability { border-color: rgba(124,167,223,.23); background: linear-gradient(145deg, rgba(124,167,223,.06), 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(180,150,83,.28);
  border-radius: 12px;
  color: var(--gold-light);
  background: rgba(180,150,83,.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(124,167,223,.10), rgba(180,150,83,.055)); }
.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(--gold); }
.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(--gold-soft, #d8c18a);
  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(180,150,83,.18);
  border-radius: 14px;
  color: #ddd8ce;
  background: rgba(180,150,83,.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(180,150,83,.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(105,201,153,.34); }
.recruitment-success-icon {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  margin: 0 auto 1rem;
  border: 1px solid rgba(105,201,153,.42);
  border-radius: 50%;
  color: #092417;
  background: linear-gradient(145deg, #9fe0bd, #69c999);
  font-size: 2rem;
  font-weight: 900;
  box-shadow: 0 15px 35px rgba(105,201,153,.16);
}
.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; }
}


/* Catalogue commercial statuses and recruitment callout */
.catalog-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(180, 150, 83, .38);
  border-radius: 16px;
  background:
    radial-gradient(circle at 8% 10%, rgba(180, 150, 83, .16), transparent 12rem),
    linear-gradient(135deg, rgba(34, 26, 12, .96), rgba(16, 16, 16, .96));
  box-shadow: 0 18px 45px rgba(0, 0, 0, .28), inset 0 1px rgba(255, 255, 255, .035);
}
.catalog-recruitment-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(180, 150, 83, .45);
  border-radius: 50%;
  color: var(--gold-light);
  background: rgba(180, 150, 83, .11);
  box-shadow: 0 0 24px rgba(180, 150, 83, .13);
  font-size: 1.15rem;
}
.catalog-recruitment-callout strong {
  display: block;
  color: var(--gold-light);
  font-family: Georgia, serif;
  font-size: 1.15rem;
}
.catalog-recruitment-callout p {
  max-width: 560px;
  margin: .28rem 0 0;
  color: #c8c2b7;
  font-size: .82rem;
  line-height: 1.5;
}
.catalog-recruitment-button {
  min-height: 46px;
  padding-inline: 1rem;
  border-color: #e8bd61;
  color: #161006;
  background: linear-gradient(135deg, #f2d48e, #d9a73f);
  box-shadow: 0 10px 28px rgba(180, 150, 83, .22);
  font-weight: 900;
  white-space: nowrap;
}
.catalog-recruitment-button:hover {
  border-color: #f4d995;
  color: #0b0803;
  background: linear-gradient(135deg, #f6dda3, #e2b552);
  transform: translateY(-1px);
}

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

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

@media (max-width: 860px) {
  .catalog-recruitment-callout { grid-template-columns: auto minmax(0, 1fr); }
  .catalog-recruitment-button { grid-column: 1 / -1; width: 100%; }
}
@media (max-width: 540px) {
  .catalog-recruitment-callout { grid-template-columns: 1fr; text-align: center; }
  .catalog-recruitment-icon { margin-inline: auto; }
  .catalog-status-choice-grid { grid-template-columns: 1fr; }
  .catalog-admin-summary-statuses { align-items: flex-end; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  .catalog-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(--gold); 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(180,150,83,.13); color: var(--gold-light); }
.searchable-select-empty { padding: .8rem; color: var(--muted); }
/* Dans les cartes repliables, le menu absolu est rogné par overflow:hidden.
   Pour le choix du véhicule Location, le menu reste dans le flux afin que
   toutes les fiches et les résultats de recherche restent visibles. */
.rental-source-select-field .searchable-select-menu { position: static; margin-top: .35rem; max-height: 20rem; }
.rental-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(--gold-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-page-heading { align-items: flex-end; }
.reminder-page-heading > div:first-child { max-width: 780px; }
.reminder-page-heading p { max-width: 720px; margin-bottom: 0; }
.reminder-heading-badge { display: inline-flex; align-items: center; gap: .55rem; min-height: 38px; padding: .55rem .8rem; border: 1px solid rgba(105, 201, 153, .22); border-radius: 999px; color: #bfe7d1; background: rgba(105, 201, 153, .055); font-size: .72rem; font-weight: 800; white-space: nowrap; }
.reminder-heading-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px rgba(105, 201, 153, .08); }

.reminder-layout { grid-template-columns: minmax(360px, .9fr) minmax(0, 1.18fr); gap: 1.15rem; align-items: start; }
.reminder-layout-single { grid-template-columns: 1fr; }
.reminder-create-panel { position: sticky; top: 1rem; overflow: hidden; border-color: rgba(180, 150, 83, .18); background: linear-gradient(165deg, rgba(180, 150, 83, .035), rgba(17, 17, 17, .98) 26%); }
.reminder-saved-panel { min-width: 0; }
.reminder-panel-heading { align-items: flex-start; margin-bottom: 1.05rem; }
.reminder-panel-heading > div { min-width: 0; }
.reminder-panel-heading p { margin: .3rem 0 0; color: var(--muted); font-size: .78rem; line-height: 1.5; }

.reminder-create-form { display: grid; gap: .9rem; }
.reminder-form-section { display: grid; gap: .85rem; padding: .95rem; border: 1px solid rgba(255, 255, 255, .075); border-radius: 14px; background: rgba(255, 255, 255, .018); }
.reminder-form-section-head { display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: start; gap: .7rem; }
.reminder-form-section-head > div { display: grid; gap: .12rem; }
.reminder-form-section-head strong { color: #f2eee5; font-size: .82rem; }
.reminder-form-section-head small { color: var(--muted); font-size: .69rem; line-height: 1.45; }
.reminder-step { display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid rgba(180, 150, 83, .34); border-radius: 10px; color: var(--gold-light); background: rgba(180, 150, 83, .075); font-size: .72rem; font-weight: 900; }
.reminder-form-fields { gap: .72rem; }
.reminder-form-fields label > span { color: #dcd7cd; }
.reminder-form-fields textarea { min-height: 145px; line-height: 1.55; }
.reminder-field-hint { margin-top: -.08rem; color: #77736c; font-size: .64rem; font-weight: 600; }
.reminder-schedule-fields { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
.reminder-schedule-help { display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: start; gap: .65rem; margin: 0; padding: .72rem .78rem; border: 1px solid rgba(124, 167, 223, .20); border-radius: 10px; background: rgba(124, 167, 223, .055); }
.reminder-schedule-help > div { display: grid; gap: .14rem; }
.reminder-schedule-help strong { color: #dbe8f7; font-size: .71rem; }
.reminder-schedule-help span:not(.reminder-help-icon) { color: #aaaeb4; font-size: .68rem; line-height: 1.45; }
.reminder-help-icon { display: grid; width: 28px; height: 28px; place-items: center; border: 1px solid rgba(124, 167, 223, .28); border-radius: 9px; color: #b9d0ed; background: rgba(124, 167, 223, .07); font-family: Georgia, "Times New Roman", serif; font-size: .85rem; font-weight: 700; }
.reminder-submit-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .9rem; padding: .9rem .95rem; border: 1px solid rgba(180, 150, 83, .20); border-radius: 14px; background: linear-gradient(100deg, rgba(180, 150, 83, .08), rgba(180, 150, 83, .025)); }
.reminder-submit-copy { display: grid; gap: .12rem; min-width: 0; }
.reminder-submit-copy strong { color: var(--gold-light); font-size: .77rem; }
.reminder-submit-copy span { color: var(--muted); font-size: .66rem; line-height: 1.42; }
.reminder-submit-button { min-width: 172px; }

.reminder-saved-heading { padding-bottom: .95rem; border-bottom: 1px solid var(--line); }
.reminder-count { display: grid; min-width: 60px; min-height: 54px; place-items: center; align-content: center; gap: .05rem; padding: .4rem .6rem; border: 1px solid rgba(180, 150, 83, .22); border-radius: 12px; background: rgba(180, 150, 83, .055); }
.reminder-count strong { color: var(--gold-light); font-family: Georgia, "Times New Roman", serif; font-size: 1.15rem; font-weight: 500; line-height: 1; }
.reminder-count small { color: var(--muted); font-size: .58rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.reminder-list { display: grid; gap: .9rem; }
.reminder-card { position: relative; overflow: hidden; padding: 1rem; border: 1px solid var(--line); border-radius: 15px; background: linear-gradient(145deg, rgba(180,150,83,.06), transparent 38%), var(--surface-2); transition: border-color .14s ease, transform .14s ease; }
.reminder-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: linear-gradient(180deg, var(--gold), rgba(180, 150, 83, .12)); }
.reminder-card:hover { border-color: rgba(180, 150, 83, .20); }
.reminder-card-disabled { opacity: .68; }
.reminder-card-disabled::before { background: rgba(255, 255, 255, .12); }
.reminder-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .9rem; padding-left: .2rem; }
.reminder-card-title { min-width: 0; display: grid; gap: .35rem; }
.reminder-card-title > strong { color: #f4f0e8; font-family: Georgia, "Times New Roman", serif; font-size: 1.08rem; font-weight: 500; line-height: 1.22; overflow-wrap: anywhere; }
.reminder-card-kicker { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; }
.reminder-recurrence { color: var(--gold-light); font-size: .65rem; font-weight: 850; text-transform: uppercase; letter-spacing: .035em; }
.reminder-card-id { color: #6f6b64; font-size: .62rem; font-weight: 800; }
.reminder-status-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .9; }
.reminder-message { margin: .85rem 0 .8rem .2rem; padding: .75rem .8rem; border: 1px solid rgba(255, 255, 255, .055); border-radius: 11px; color: #d9d5cd; background: rgba(0, 0, 0, .16); font-size: .78rem; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.reminder-meta-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; margin-left: .2rem; }
.reminder-meta-grid > div { min-width: 0; display: grid; gap: .18rem; padding: .58rem .62rem; border: 1px solid rgba(255,255,255,.055); border-radius: 10px; background: rgba(255,255,255,.016); }
.reminder-meta-grid span { color: #807c74; font-size: .58rem; font-weight: 800; text-transform: uppercase; letter-spacing: .035em; }
.reminder-meta-grid strong { color: #dcd7ce; font-size: .68rem; line-height: 1.38; overflow-wrap: anywhere; }
.reminder-error { display: grid; gap: .18rem; margin: .75rem 0 0 .2rem; }
.reminder-error strong { color: #f1aaaa; }
.reminder-error span { color: #cfbcbc; }
.reminder-card-actions { display: flex; align-items: flex-start; justify-content: space-between; gap: .65rem; margin: .8rem 0 0 .2rem; padding-top: .75rem; border-top: 1px solid var(--line); }
.reminder-edit-details { min-width: 0; flex: 1; }
.reminder-edit-details > summary { width: max-content; list-style: none; }
.reminder-edit-details > summary::-webkit-details-marker { display: none; }
.reminder-edit-details[open] > summary { border-color: rgba(180,150,83,.28); color: var(--gold-light); background: rgba(180,150,83,.055); }
.reminder-edit-shell { margin-top: .75rem; padding: .8rem; border: 1px solid rgba(180, 150, 83, .13); border-radius: 12px; background: rgba(0,0,0,.18); }
.reminder-edit-heading { display: grid; gap: .12rem; margin-bottom: .7rem; }
.reminder-edit-heading strong { color: #eee9df; font-size: .77rem; }
.reminder-edit-heading small { color: var(--muted); font-size: .65rem; line-height: 1.4; }
.reminder-edit-form { margin: 0; }
.reminder-edit-form textarea { min-height: 112px; }
.reminder-edit-submit { display: flex; justify-content: flex-end; }
.reminder-edit-submit .btn { min-width: 190px; }
.reminder-empty-state { display: grid; justify-items: center; gap: .2rem; padding: 3.4rem 1.2rem; }
.reminder-empty-state h2 { margin: .6rem 0 .1rem; font-family: Georgia, "Times New Roman", serif; font-size: 1.2rem; font-weight: 500; }
.reminder-empty-state p { max-width: 390px; margin: 0; }
.reminder-empty-icon { display: grid; width: 48px; height: 48px; place-items: center; border: 1px solid rgba(180, 150, 83, .28); border-radius: 15px; color: var(--gold-light); background: rgba(180, 150, 83, .07); font-family: Georgia, "Times New Roman", serif; font-size: 1.1rem; }

@media (max-width: 1100px) {
  .reminder-layout { grid-template-columns: minmax(330px, .95fr) minmax(0, 1.05fr); }
  .reminder-meta-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .reminder-page-heading { align-items: flex-start; }
  .reminder-heading-badge { align-self: flex-start; }
  .reminder-layout { grid-template-columns: 1fr; }
  .reminder-create-panel { position: static; }
  .reminder-meta-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .reminder-heading-badge { width: 100%; justify-content: center; }
  .reminder-panel-heading { gap: .6rem; }
  .reminder-schedule-fields { grid-template-columns: 1fr; }
  .reminder-submit-row { grid-template-columns: 1fr; }
  .reminder-submit-button { width: 100%; min-width: 0; }
  .reminder-meta-grid { grid-template-columns: 1fr; }
  .reminder-card-head { align-items: flex-start; }
  .reminder-card-actions { align-items: stretch; flex-direction: column; }
  .reminder-card-actions > form .btn, .reminder-edit-details > summary { width: 100%; }
  .reminder-edit-submit .btn { width: 100%; min-width: 0; }
}

/* 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(180, 150, 83, .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(--gold-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(180, 150, 83, .18); border-radius: 12px; background: rgba(180, 150, 83, .035); }
.company-contract-guidance > div > span { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid rgba(180, 150, 83, .38); border-radius: 50%; color: var(--gold-light); background: rgba(180, 150, 83, .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(180, 150, 83, .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(180, 150, 83, .34); border-radius: 10px 10px 14px 10px; color: var(--gold-light); background: rgba(180, 150, 83, .08); font-size: .78rem; font-weight: 900; letter-spacing: .06em; }
.company-contract-note { margin: 0; padding: .75rem .85rem; border-left: 3px solid rgba(180, 150, 83, .46); border-radius: 0 10px 10px 0; color: #d2ccc1; background: rgba(180, 150, 83, .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(--gold-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(180,150,83,.34);
  background:
    radial-gradient(circle at 100% 0, rgba(180,150,83,.1), transparent 17rem),
    linear-gradient(145deg, rgba(180,150,83,.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(180,150,83,.3);
  border-radius: 16px;
  background: rgba(180,150,83,.075);
}
.recruitment-rule-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(180,150,83,.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(180,150,83,.12);
}
.recruitment-rule-notice strong { color: var(--gold-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(180,150,83,.46);
  box-shadow: 0 14px 28px rgba(0,0,0,.18);
}
.recruitment-choice:focus-within {
  outline: 2px solid rgba(180,150,83,.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, #a8e4c3, #69c999);
}
.recruitment-choice-safe:has(input:checked) .recruitment-choice-indicator { border-color: #69c999; }
.recruitment-choice-safe:has(input:checked) .recruitment-choice-indicator::after { background: #69c999; 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; }
}


/* Explicit tax calculation: company sales share minus validated expenses. */
.tax-calculation-panel {
  border-color: rgba(180, 150, 83, .3);
  background:
    radial-gradient(circle at 100% 0, rgba(180, 150, 83, .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(180, 150, 83, .24); }
.tax-calculation-total span, .tax-calculation-total strong { color: var(--gold-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(180, 150, 83, .25); border-radius: 12px; background: rgba(180, 150, 83, .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(--gold-light); font-size: 1.45rem; }
.tax-calculation-equation .tax-calculation-result { grid-column: 1 / -1; text-align: center; border-color: rgba(180, 150, 83, .32); background: rgba(180, 150, 83, .085); }
.tax-calculation-equation .tax-calculation-result strong { color: var(--gold-light); font-size: clamp(1.45rem, 3vw, 2rem); }
.tax-period-direct-calculation { margin: .25rem 0; padding: .7rem !important; border: 1px solid rgba(180, 150, 83, .22) !important; border-radius: 9px; background: rgba(180, 150, 83, .05); }
.tax-period-direct-calculation span, .tax-period-direct-calculation strong { color: var(--gold-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(180,150,83,.42); color: var(--gold-light); background: rgba(180,150,83,.07); }
.pagination-link.is-current { border-color: rgba(180,150,83,.48); color: #171006; background: linear-gradient(145deg, #d6bf86, #a98543); }
.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(105,201,153,.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); }

.catalog-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; }
.catalog-recruitment-callout.is-open .catalog-recruitment-status { color: #aee5c9; background: rgba(105,201,153,.075); }
.catalog-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)); }
.catalog-recruitment-callout.is-closed .catalog-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); }
.catalog-recruitment-callout.is-closed .catalog-recruitment-status { color: #efa3a3; background: rgba(223,115,115,.075); }
.catalog-recruitment-callout.is-closed strong { color: #f1c0c0; }
.catalog-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); }
.rental-overdue-panel { border-color: rgba(223, 115, 115, .34); box-shadow: inset 0 0 0 1px rgba(223, 115, 115, .04); }
.rental-overdue-panel .panel-heading > strong { color: #f1aaaa; }

/* Consistent vertical spacing between top-level page panels. */
.page-section-stack { display: grid; gap: 1rem; }
.page-section-stack > * { margin-top: 0; margin-bottom: 0; }

/* Management to-do list */
.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(180,150,83,.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(180,150,83,.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(180,150,83,.3); color: var(--gold-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(180,150,83,.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(--gold-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(180, 150, 83, .045); }
.agenda-day-heading span { color: var(--gold); 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(180, 150, 83, .3); background: rgba(180, 150, 83, .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(--gold-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(180, 150, 83, .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(--gold-light); box-shadow: 0 0 0 2px rgba(180,150,83,.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(180, 150, 83, .12), rgba(11, 11, 11, .96));
  box-shadow: inset 0 0 0 2px rgba(180, 150, 83, .58), 0 0 24px rgba(180, 150, 83, .06);
}
.calendar-day-today .calendar-date { color: #171008; background: var(--gold-light); font-weight: 900; box-shadow: 0 0 0 3px rgba(180,150,83,.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; }
}

/* Dépenses : garder toutes les informations visibles sans défilement horizontal. */
.expenses-table-wrap { overflow: visible; }
.expenses-table { min-width: 0; table-layout: fixed; }
.expenses-table col.expenses-col-date { width: 8.5%; }
.expenses-table col.expenses-col-accounting { width: 8.5%; }
.expenses-table col.expenses-col-type { width: 8%; }
.expenses-table col.expenses-col-amount { width: 8%; }
.expenses-table col.expenses-col-tax { width: 11%; }
.expenses-table col.expenses-col-employee { width: 12%; }
.expenses-table col.expenses-col-author { width: 13%; }
.expenses-table col.expenses-col-reason { width: 14%; }
.expenses-table col.expenses-col-state { width: 8%; }
.expenses-table col.expenses-col-actions { width: 9%; }
.expenses-table th,
.expenses-table td { padding: .68rem .55rem; overflow-wrap: anywhere; line-height: 1.32; }
.expenses-table th { white-space: normal; }
.expenses-table .expense-reason-cell { word-break: normal; }
.expenses-table .expense-actions-cell { overflow: visible; }

.tax-status { display: inline-flex; align-items: center; gap: .32rem; max-width: 100%; padding: .28rem .48rem; border: 1px solid; border-radius: 999px; font-size: .68rem; font-weight: 850; line-height: 1.15; }
.tax-status > span { flex: 0 0 auto; font-size: .72rem; }
.tax-status-deductible { border-color: rgba(105, 201, 153, .36); color: #aee5c9; background: rgba(105, 201, 153, .09); }
.tax-status-non-deductible { border-color: rgba(223, 115, 115, .38); color: #f2aaaa; background: rgba(223, 115, 115, .09); }

/* Le panneau Modifier flotte au-dessus du tableau au lieu d'élargir sa colonne. */
.expenses-table .compact-action-details { position: relative; }
.expenses-table .compact-action-popover { position: absolute; top: calc(100% + .45rem); right: 0; z-index: 20; width: min(34rem, 76vw); min-width: 0; margin-top: 0; box-shadow: 0 18px 48px rgba(0, 0, 0, .52); }

@media (max-width: 900px) {
  .expenses-table-wrap { border: 0; border-radius: 0; }
  .expenses-table,
  .expenses-table tbody,
  .expenses-table tr,
  .expenses-table td { display: block; width: 100%; }
  .expenses-table colgroup,
  .expenses-table thead { display: none; }
  .expenses-table tbody { display: grid; gap: .75rem; }
  .expenses-table tr { overflow: visible; border: 1px solid var(--line); border-radius: 12px; background: #0d0d0d; }
  .expenses-table td { min-height: 0; display: grid; grid-template-columns: minmax(108px, .38fr) minmax(0, .62fr); gap: .7rem; align-items: start; padding: .62rem .72rem; border-bottom: 1px solid var(--line); }
  .expenses-table td:last-child { border-bottom: 0; }
  .expenses-table td::before { content: attr(data-label); color: #858179; font-size: .62rem; font-weight: 850; letter-spacing: .055em; text-transform: uppercase; }
  .expenses-table td.empty-cell { display: block; }
  .expenses-table td.empty-cell::before { content: none; }
  .expenses-table .compact-action-details { min-width: 0; }
  .expenses-table .compact-action-popover { position: static; width: 100%; margin-top: .55rem; box-shadow: none; }
}

/* Réglages · identité du site */
.settings-branding-layout { display: grid; grid-template-columns: minmax(220px, .55fr) minmax(0, 1.45fr); gap: 1.1rem; margin-top: .9rem; align-items: stretch; }
.settings-logo-preview { display: flex; flex-direction: column; gap: .6rem; padding: .9rem; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.018); }
.settings-logo-preview-label { color: var(--gold-light); font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.settings-logo-preview-frame { min-height: 190px; display: grid; place-items: center; padding: 1rem; border: 1px dashed rgba(180,150,83,.24); border-radius: 12px; background: radial-gradient(circle, rgba(180,150,83,.08), transparent 62%), #0b0b0b; }
.settings-logo-preview-frame img { width: min(100%, 180px); height: 180px; object-fit: contain; }
.settings-logo-preview small { color: var(--muted); line-height: 1.45; }
.settings-branding-fields { display: grid; gap: .9rem; min-width: 0; }
.settings-logo-source { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; margin: 0; padding: 0; border: 0; min-width: 0; }
.settings-logo-source legend { grid-column: 1 / -1; margin-bottom: .1rem; color: var(--text); font-size: .78rem; font-weight: 700; }
.settings-choice-card { position: relative; display: grid; grid-template-columns: auto 1fr; align-items: start; gap: .65rem; min-width: 0; padding: .8rem; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.018); cursor: pointer; }
.settings-choice-card:has(input:checked) { border-color: rgba(180,150,83,.5); background: rgba(180,150,83,.075); box-shadow: inset 0 0 0 1px rgba(180,150,83,.08); }
.settings-choice-card input { margin-top: .18rem; accent-color: var(--gold); }
.settings-choice-card span { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.settings-choice-card strong { color: var(--text); font-size: .83rem; }
.settings-choice-card small { color: var(--muted); line-height: 1.38; }
.settings-logo-upload input[type="file"] { padding: .55rem; }
.settings-logo-upload input[type="file"]::file-selector-button { margin-right: .7rem; padding: .52rem .7rem; border: 1px solid var(--line-strong); border-radius: 8px; background: #17130b; color: var(--gold-light); font: inherit; font-weight: 700; cursor: pointer; }
@media (max-width: 900px) {
  .settings-branding-layout { grid-template-columns: 1fr; }
  .settings-logo-preview-frame { min-height: 150px; }
  .settings-logo-preview-frame img { height: 140px; }
}
@media (max-width: 680px) {
  .settings-logo-source { grid-template-columns: 1fr; }
}

/* -------------------------------------------------------------------------
   Harmonisation visuelle générale
   Ce bloc est volontairement placé en fin de fichier : il consolide les
   composants partagés sans modifier leur logique métier.
   ------------------------------------------------------------------------- */

/* Navigation secondaire : plus stable et plus lisible pendant le défilement. */
.section-tabs {
  position: sticky;
  top: calc(72px + .55rem);
  z-index: 18;
  border-color: rgba(255,255,255,.115);
  background: rgba(17,17,17,.94);
  box-shadow: 0 10px 28px rgba(0,0,0,.18);
  backdrop-filter: blur(14px);
}
.section-tabs a { transition: color .15s ease, background .15s ease, box-shadow .15s ease; }
.section-tabs a.active { box-shadow: 0 5px 16px rgba(180,150,83,.14); }

/* Titres de panneaux : même séparation et même rythme sur toutes les pages. */
.panel > .panel-heading:not(:last-child) {
  padding-bottom: .82rem;
  border-bottom: 1px solid rgba(255,255,255,.065);
}
.panel-heading > strong:not(.status) {
  color: var(--gold-light);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  font-weight: 500;
}

/* États : repère coloré commun, sans dépendre uniquement de la couleur du texte. */
.status { min-height: 26px; padding-inline: .58rem; }
.status::before {
  content: "";
  width: 5px;
  height: 5px;
  flex: 0 0 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: .82;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 10%, transparent);
}

/* Alertes : icône homogène pour repérer immédiatement le niveau d'information. */
.alert::before {
  content: "i";
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  display: grid;
  place-items: center;
  margin-top: .02rem;
  border: 1px solid currentColor;
  border-radius: 7px;
  color: var(--info);
  background: rgba(124,167,223,.06);
  font-family: Georgia, "Times New Roman", serif;
  font-size: .72rem;
  font-weight: 800;
  line-height: 1;
  opacity: .92;
}
.alert-success::before { content: "✓"; color: var(--success); background: rgba(105,201,153,.06); }
.alert-warning::before { content: "!"; color: var(--warning); background: rgba(231,178,91,.06); }
.alert-danger::before { content: "×"; color: var(--danger); background: rgba(223,115,115,.06); }
.alert-info::before { content: "i"; color: var(--info); }

/* Cartes déroulantes : plus de badge flottant au milieu de la ligne. */
.edit-card {
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.edit-card:hover { border-color: rgba(255,255,255,.15); }
.edit-card[open] {
  border-color: rgba(180,150,83,.22);
  box-shadow: inset 0 1px 0 rgba(180,150,83,.035);
}
.edit-card > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 30px;
  justify-content: initial;
  gap: .8rem;
  transition: background .15s ease;
}
.edit-card > summary:hover { background: rgba(255,255,255,.018); }
.edit-card[open] > summary { background: rgba(180,150,83,.026); }
.edit-card > summary::after {
  grid-column: 3;
  justify-self: end;
  order: initial;
  width: 30px;
  height: 30px;
  flex-basis: 30px;
  border-color: rgba(255,255,255,.11);
  transition: border-color .15s ease, color .15s ease, background .15s ease, transform .15s ease;
}
.edit-card > summary:hover::after { border-color: rgba(180,150,83,.28); color: var(--gold-light); background: rgba(180,150,83,.045); }
.edit-card[open] > summary::after { border-color: rgba(180,150,83,.32); background: rgba(180,150,83,.055); }
.edit-card > summary > .status,
.edit-card > summary > :not(:first-child):not(.tax-history-meta) {
  justify-self: end;
  align-self: center;
}
.edit-card .mini-logo {
  border: 1px solid rgba(255,255,255,.055);
  background: linear-gradient(145deg, rgba(180,150,83,.07), rgba(255,255,255,.018));
}

/* Déclarations fiscales : le statut et le montant forment un bloc cohérent. */
.tax-history-card > .tax-history-summary { grid-template-columns: minmax(0,1fr) auto 30px; }
.tax-history-main { min-width: 0; }
.tax-history-meta {
  min-width: 0;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end;
  gap: .75rem !important;
  justify-self: end;
}
.tax-history-amount {
  min-width: 96px;
  display: grid;
  gap: .05rem;
  text-align: right;
}
.tax-history-amount small {
  color: #77736b !important;
  font-size: .59rem !important;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  white-space: nowrap !important;
}
.tax-history-amount strong {
  color: var(--gold-light);
  font-family: Georgia, "Times New Roman", serif;
  font-size: .96rem;
  font-weight: 500;
  white-space: nowrap !important;
}

/* Tableaux et champs : finition homogène, sans changer leur structure. */
.table-wrap { scrollbar-color: #58554f #111; scrollbar-width: thin; }
.table-wrap::-webkit-scrollbar { height: 9px; width: 9px; }
.table-wrap::-webkit-scrollbar-track { background: #101010; }
.table-wrap::-webkit-scrollbar-thumb { border: 2px solid #101010; border-radius: 99px; background: #57534c; }
.table-wrap::-webkit-scrollbar-thumb:hover { background: #756d5f; }
tbody tr { transition: background .12s ease; }
input:hover:not(:disabled):not([readonly]), textarea:hover:not(:disabled):not([readonly]) { border-color: rgba(255,255,255,.16); }

/* États vides plus proches des cartes du reste de l'interface. */
.empty-state {
  background: radial-gradient(circle at 50% 0, rgba(180,150,83,.035), transparent 14rem), rgba(255,255,255,.008);
}
.empty-state h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 500; }

/* Focus clavier uniforme sur les contrôles interactifs. */
.btn:focus-visible,
.nav a:focus-visible,
.section-tabs a:focus-visible,
details > summary:focus-visible,
.back-link:focus-visible,
.text-link:focus-visible {
  outline: 2px solid rgba(241,211,142,.82);
  outline-offset: 3px;
}

@media (max-width: 860px) {
  .section-tabs { top: calc(64px + .4rem); }
}

@media (max-width: 700px) {
  .edit-card > summary,
  .tax-history-card > .tax-history-summary {
    grid-template-columns: minmax(0, 1fr) 30px;
    gap: .65rem;
  }
  .edit-card > summary::after { grid-column: 2; grid-row: 1; }
  .edit-card > summary > .status {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
    margin-left: 55px;
  }
  .tax-history-meta {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
    justify-content: flex-start;
    margin-left: 55px;
  }
  .tax-history-amount { min-width: 0; text-align: left; }
}

@media (max-width: 420px) {
  .tax-history-meta { align-items: flex-start !important; flex-direction: column; gap: .35rem !important; }
  .tax-history-amount { display: flex; align-items: baseline; gap: .45rem; }
}

/* Sur mobile, les états restent visibles : ils sont trop importants pour être masqués. */
@media (max-width: 700px) {
  .edit-card > summary > .status,
  .tax-history-meta .status,
  .catalog-admin-summary-statuses .status { display: inline-flex; }
  .tax-history-main strong { white-space: normal !important; line-height: 1.28; }
}
@media (max-width: 700px) {
  .edit-card > summary .status { display: inline-flex !important; }
}

/* Déroulants secondaires : même langage visuel que les cartes d'édition. */
.simple-details > summary {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .7rem;
  padding: .72rem .15rem;
  list-style: none;
  border-radius: 8px;
  transition: color .15s ease, background .15s ease;
}
.simple-details > summary::-webkit-details-marker { display: none; }
.simple-details > summary::after {
  content: "+";
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  font-size: .72rem;
}
.simple-details > summary:hover { color: var(--gold-light); background: rgba(180,150,83,.025); }
.simple-details[open] > summary { color: var(--gold-light); }
.simple-details[open] > summary::after {
  content: "−";
  border-color: rgba(180,150,83,.3);
  color: var(--gold-light);
  background: rgba(180,150,83,.05);
}
.technical-disclosure > .technical-history { padding-bottom: .35rem; }
.nested-detail.simple-details { margin-top: .45rem; padding-left: .6rem; border-left: 2px solid rgba(124,167,223,.16); border-top-color: rgba(255,255,255,.05); }
.nested-detail.simple-details > summary { color: #b8c8da; font-size: .72rem; }
.alert-body { min-width: 0; display: grid; gap: .12rem; }
.alert-body > strong { color: #eee9df; }
.alert-body > span { color: #c5c0b7; }

/* -------------------------------------------------------------------------- */
/* Raffinement visuel global : rendu plus luxueux sans changer l'identité     */
/* -------------------------------------------------------------------------- */
:root {
  --surface-soft: #141414;
  --surface-elevated: #1a1a1a;
  --line-soft: rgba(255, 255, 255, .06);
  --gold-glow: rgba(180, 150, 83, .18);
  --shadow-soft: 0 18px 50px rgba(0, 0, 0, .26);
  --shadow-premium: 0 28px 80px rgba(0, 0, 0, .36);
}

body {
  background: linear-gradient(180deg, #080808 0%, #090909 30%, #070707 100%);
}

.sidebar {
  border-right-color: rgba(255,255,255,.07);
  background:
    linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,0) 26%),
    rgba(9, 9, 9, .98);
  box-shadow: 24px 0 60px rgba(0,0,0,.22);
}

.brand {
  padding: .55rem .45rem 1rem;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(180,150,83,.07), rgba(180,150,83,0));
}

.brand img,
.public-brand img,
.cef-header img {
  filter: drop-shadow(0 10px 22px rgba(180,150,83,.18));
}

.nav a {
  min-height: 44px;
  border-radius: 12px;
}

.nav a:hover {
  background: linear-gradient(90deg, rgba(255,255,255,.045), rgba(255,255,255,.02));
}

.nav a.active {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 10px 24px rgba(0,0,0,.18);
}

.nav-icon {
  border-color: rgba(255,255,255,.08);
  background: linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,.01));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}

.sidebar-account {
  border-color: rgba(255,255,255,.08);
  background: linear-gradient(180deg, rgba(255,255,255,.028), rgba(255,255,255,.01));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}

.topbar {
  min-height: 74px;
  border-bottom-color: rgba(255,255,255,.07);
  background:
    linear-gradient(180deg, rgba(19,19,19,.94), rgba(10,10,10,.9)),
    rgba(8,8,8,.88);
  box-shadow: 0 12px 34px rgba(0,0,0,.18);
}

.topbar-title strong {
  font-size: .98rem;
  letter-spacing: .01em;
}

.content-shell {
  width: min(100%, 1500px);
}

.page-heading {
  margin-bottom: 1.45rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.page-heading h1 {
  text-wrap: balance;
}

.page-heading p {
  color: #b5b0a6;
}

.panel,
.vehicle-card,
.metric,
.message-card,
.role-card,
.edit-card,
.table-wrap,
.section-tabs,
.search-bar,
.period-filter,
.pagination,
.todo-toolbar-panel,
.recruitment-control-panel,
.site-modal-panel {
  box-shadow: var(--shadow-soft);
}

.panel,
.vehicle-card,
.metric,
.message-card,
.role-card,
.edit-card {
  border-color: rgba(255,255,255,.07);
  background:
    linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,0) 18%),
    var(--surface);
}

.panel:hover,
.message-card:hover,
.metric:hover,
.vehicle-card:hover {
  border-color: rgba(180,150,83,.16);
}

.panel-heading {
  margin-bottom: 1.05rem;
}

.panel-heading h2 {
  font-size: 1.32rem;
}

.subpanel,
.metric-card,
.inventory-card,
.inventory-preview > div,
.message-normalized dl div,
.comparison-grid > div,
.split-preview div,
.todo-overview-item,
.detail-highlight,
.form-help {
  border-color: rgba(255,255,255,.07);
  background:
    linear-gradient(180deg, rgba(255,255,255,.018), rgba(255,255,255,0)),
    #0d0d0d;
}

.btn {
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}

.btn:hover:not(:disabled) {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 10px 24px rgba(0,0,0,.18);
}

.btn-primary {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.34), 0 14px 34px rgba(180,150,83,.18);
}

.btn-primary:hover:not(:disabled) {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.38), 0 16px 36px rgba(180,150,83,.22);
}

.btn-ghost {
  background: linear-gradient(180deg, rgba(255,255,255,.018), rgba(255,255,255,.005));
}

input,
select,
textarea,
.searchable-select-input {
  border-color: rgba(255,255,255,.08);
  border-radius: 11px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.008)),
    #0b0b0b;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
}

input:hover,
select:hover,
textarea:hover,
.searchable-select-input:hover {
  border-color: rgba(180,150,83,.24);
}

input:focus,
select:focus,
textarea:focus,
.searchable-select-input:focus {
  background:
    linear-gradient(180deg, rgba(255,255,255,.028), rgba(255,255,255,.012)),
    #0d0d0d;
  box-shadow: 0 0 0 3px rgba(180, 150, 83, .08), inset 0 1px 0 rgba(255,255,255,.035);
}

input[type="search"],
.searchable-select-input,
.todo-compact-filters input[type="search"] {
  padding-left: 2.55rem;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23dfb352' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='6'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E"),
    linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.008));
  background-repeat: no-repeat, no-repeat;
  background-size: 16px 16px, auto;
  background-position: .9rem 50%, 0 0;
}

input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
  -webkit-appearance: none;
}

.search-bar,
.period-filter {
  gap: .75rem;
  padding: .9rem;
  border-color: rgba(255,255,255,.07);
  background:
    linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,0)),
    var(--surface);
}

.search-bar label,
.period-filter label,
.catalog-filters label {
  color: #ddd8cf;
}

.search-bar .btn,
.period-filter .btn,
.catalog-filter-actions .btn,
.todo-filter-actions .btn {
  min-height: 42px;
}

.table-wrap {
  border-color: rgba(255,255,255,.07);
  background: linear-gradient(180deg, rgba(255,255,255,.012), rgba(255,255,255,0)), #0d0d0d;
}

th {
  border-bottom-color: rgba(255,255,255,.07);
  background: linear-gradient(180deg, #171717, #111111);
}

tbody tr:nth-child(even) td {
  background: rgba(255,255,255,.01);
}

tbody tr:hover td {
  background: rgba(180,150,83,.035);
}

.status,
.recruitment-state-badge,
.catalog-recruitment-status {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}

.alert {
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
}

.empty-state {
  border-style: solid;
  border-color: rgba(180,150,83,.16);
  background: rgba(255,255,255,.012);
}

.section-tabs {
  padding: .45rem;
  border-color: rgba(255,255,255,.08);
  background:
    linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,0)),
    var(--surface);
}

.section-tabs a {
  border: 1px solid transparent;
  border-radius: 10px;
}

.section-tabs a:hover {
  border-color: rgba(255,255,255,.06);
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.012));
}

.section-tabs a.active {
  border-color: rgba(180,150,83,.42);
  box-shadow: 0 10px 20px rgba(180,150,83,.14);
}

.hero,
.login-visual,
.vehicle-detail-image,
.public-header,
.cef-header {
  box-shadow: var(--shadow-premium);
}

.hero {
  border-color: rgba(255,255,255,.08);
  background: linear-gradient(135deg, #171717, #090909);
}

.public-header {
  border-bottom-color: rgba(255,255,255,.07);
  background:
    linear-gradient(180deg, rgba(18,18,18,.95), rgba(8,8,8,.92)),
    rgba(8,8,8,.9);
}

.vehicle-card {
  border-radius: 18px;
}

.vehicle-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 44px rgba(0,0,0,.22);
}

.vehicle-image {
  background: linear-gradient(180deg, #0d0d0d, #090909);
}

.vehicle-card-body {
  gap: .15rem;
}

.vehicle-card h2 {
  margin-top: .7rem;
}

.catalog-capacity-meta {
  color: #ece7de;
}

.metric {
  min-height: 136px;
}

.metric strong,
.export-card > strong,
.price-display,
.settings-card-value,
.big-value {
  text-shadow: 0 0 20px rgba(180,150,83,.05);
}

.pagination {
  border-color: rgba(255,255,255,.07);
  background:
    linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,0)),
    var(--surface);
}

.pagination-link {
  border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}

.simple-details > summary,
.edit-card > summary {
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.edit-card[open] > summary,
.simple-details[open] > summary {
  background: linear-gradient(90deg, rgba(180,150,83,.05), rgba(180,150,83,0));
}

.todo-toolbar-panel,
.recruitment-control-panel {
  border-color: rgba(255,255,255,.08);
  background:
    linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,0)),
    var(--surface);
}

.searchable-select-menu {
  border-color: rgba(255,255,255,.09);
  background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,0)), #141414;
}

@media (max-width: 860px) {
  .topbar {
    min-height: 68px;
    padding-inline: 1rem;
  }

  .page-heading {
    padding-bottom: .8rem;
  }
}

@media (max-width: 640px) {
  .search-bar,
  .period-filter {
    padding: .8rem;
  }

  .page-heading {
    gap: .8rem;
  }

  .panel,
  .vehicle-card,
  .message-card {
    border-radius: 14px;
  }
}

/* -------------------------------------------------------------------------- */
/* Recherche globale & centre de notifications                                */
/* -------------------------------------------------------------------------- */
.topbar { justify-content: flex-start; }
.topbar-title { flex: 0 1 220px; }
.topbar-search {
  position: relative;
  min-width: 240px;
  max-width: 560px;
  flex: 1 1 420px;
  margin-inline: auto;
}
.topbar-search input {
  min-height: 40px;
  padding: .58rem 4.7rem .58rem 2.55rem;
  border-color: rgba(255,255,255,.08);
  border-radius: 12px;
  background: rgba(255,255,255,.025);
  font-size: .78rem;
}
.topbar-search input:focus { background: #0d0d0d; }
.topbar-search-icon {
  position: absolute;
  top: 50%;
  left: .88rem;
  width: 15px;
  height: 15px;
  transform: translateY(-50%);
  border: 2px solid var(--gold);
  border-radius: 50%;
  pointer-events: none;
}
.topbar-search-icon::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 2px;
  right: -5px;
  bottom: -2px;
  border-radius: 3px;
  background: var(--gold);
  transform: rotate(45deg);
  transform-origin: center;
}
.topbar-search kbd {
  position: absolute;
  top: 50%;
  right: .65rem;
  transform: translateY(-50%);
  padding: .23rem .42rem;
  border: 1px solid rgba(255,255,255,.1);
  border-bottom-color: rgba(255,255,255,.16);
  border-radius: 6px;
  color: #77736c;
  background: rgba(255,255,255,.025);
  font-family: inherit;
  font-size: .6rem;
  font-weight: 800;
  pointer-events: none;
}
.topbar-actions { display: flex; align-items: center; gap: .5rem; margin-left: auto; }
.topbar-icon-button {
  position: relative;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  color: #d8d3ca;
  background: rgba(255,255,255,.02);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease, transform .15s ease;
}
.topbar-icon-button:hover { transform: translateY(-1px); border-color: rgba(180,150,83,.28); color: var(--gold-light); background: rgba(180,150,83,.055); }
.topbar-mobile-search { display: none; }
.topbar-mobile-search .topbar-search-icon { left: 50%; transform: translate(-50%, -50%); }
.notification-menu { position: relative; }
.notification-bell-icon { display: block; font-size: 1.3rem; line-height: 1; transform: rotate(45deg); }
.notification-count {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  padding: 0 .3rem;
  border: 2px solid #0c0c0c;
  border-radius: 999px;
  color: #120d05;
  background: var(--gold-light);
  font-size: .57rem;
  font-weight: 950;
  box-shadow: 0 4px 12px rgba(0,0,0,.3);
}
.notification-popover {
  position: absolute;
  z-index: 100;
  top: calc(100% + .7rem);
  right: 0;
  width: min(410px, calc(100vw - 2rem));
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px;
  background: #111;
  box-shadow: 0 26px 70px rgba(0,0,0,.55);
}
.notification-popover[hidden] { display: none; }
.notification-popover-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 1rem; border-bottom: 1px solid var(--line); }
.notification-popover-head > div { display: grid; gap: .08rem; }
.notification-popover-head .eyebrow { margin: 0; }
.notification-popover-head strong { font-size: .83rem; }
.notification-popover-head > a { color: var(--gold-light); font-size: .68rem; font-weight: 800; }
.notification-popover-list { max-height: 360px; overflow-y: auto; }
.notification-preview-item {
  position: relative;
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: .65rem;
  align-items: start;
  padding: .85rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.055);
  transition: background .15s ease;
}
.notification-preview-item:hover { background: rgba(255,255,255,.025); }
.notification-preview-item > span:last-child { min-width: 0; display: grid; gap: .2rem; }
.notification-preview-item strong { overflow: hidden; color: #eee9df; font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }
.notification-preview-item small { display: -webkit-box; overflow: hidden; color: var(--muted); font-size: .68rem; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.notification-dot { width: 8px; height: 8px; margin-top: .35rem; border-radius: 50%; background: var(--info); box-shadow: 0 0 0 4px rgba(124,167,223,.08); }
.severity-success .notification-dot { background: var(--success); box-shadow: 0 0 0 4px rgba(105,201,153,.08); }
.severity-warning .notification-dot { background: var(--warning); box-shadow: 0 0 0 4px rgba(231,178,91,.08); }
.severity-danger .notification-dot { background: var(--danger); box-shadow: 0 0 0 4px rgba(223,115,115,.08); }
.notification-preview-empty { display: grid; justify-items: center; gap: .2rem; padding: 1.5rem 1rem; color: var(--muted); text-align: center; }
.notification-preview-empty > span { width: 34px; height: 34px; display: grid; place-items: center; margin-bottom: .25rem; border: 1px solid rgba(105,201,153,.22); border-radius: 50%; color: var(--success); }
.notification-preview-empty strong { color: #ded9d0; font-size: .78rem; }
.notification-preview-empty small { font-size: .68rem; }
.notification-popover-footer { display: flex; justify-content: space-between; gap: .8rem; padding: .78rem 1rem; color: var(--gold-light); background: rgba(180,150,83,.035); font-size: .7rem; font-weight: 800; }

.global-search-page-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .7rem;
  align-items: end;
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}
.global-search-page-field { display: grid; gap: .38rem; color: #d7d2c8; font-size: .72rem; font-weight: 760; }
.global-search-page-field input { min-height: 46px; font-size: .84rem; }
.global-search-page-form > .btn { min-height: 46px; padding-inline: 1.15rem; }
.search-result-summary { display: flex; justify-content: flex-end; margin: .7rem 0 1rem; }
.search-result-summary > div { display: flex; align-items: baseline; gap: .45rem; color: var(--muted); }
.search-result-summary .eyebrow { margin: 0 .3rem 0 0; }
.search-result-summary strong { color: var(--gold-light); font-family: Georgia, serif; font-size: 1.55rem; font-weight: 500; }
.search-result-summary small { font-size: .72rem; }
.search-groups { display: grid; gap: 1rem; }
.search-group { padding: 0; overflow: hidden; }
.search-group-heading { margin: 0; padding: .95rem 1rem; border-bottom: 1px solid var(--line); }
.search-group-heading > div { display: flex; align-items: center; gap: .7rem; }
.search-group-heading .eyebrow { margin-bottom: .12rem; }
.search-group-heading h2 { font-size: 1.15rem; }
.search-group-icon, .search-result-icon, .search-tip > span {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(180,150,83,.22);
  border-radius: 11px;
  color: var(--gold-light);
  background: rgba(180,150,83,.055);
  font-family: Georgia, serif;
  font-size: .85rem;
  font-weight: 800;
}
.search-result-list { display: grid; }
.search-result-card {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto 30px;
  gap: .8rem;
  align-items: center;
  padding: .82rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.055);
  transition: background .15s ease, padding-left .15s ease;
}
.search-result-card:last-child { border-bottom: 0; }
.search-result-card:hover { padding-left: 1.08rem; background: rgba(180,150,83,.035); }
.search-result-copy { min-width: 0; display: grid; gap: .12rem; }
.search-result-copy > small { color: var(--gold); font-size: .6rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.search-result-copy > strong, .search-result-copy > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-result-copy > strong { color: #eeeae2; font-size: .8rem; }
.search-result-copy > span { color: var(--muted); font-size: .69rem; }
.search-result-arrow { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); }
.search-result-card:hover .search-result-arrow { border-color: rgba(180,150,83,.25); color: var(--gold-light); }
.search-start-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: .8rem; }
.search-tip { display: flex; align-items: center; gap: .75rem; padding: .9rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.search-tip > div { min-width: 0; display: grid; gap: .18rem; }
.search-tip strong { font-size: .78rem; }
.search-tip small { color: var(--muted); font-size: .67rem; }
.empty-state-icon { width: 42px; height: 42px; display: grid; place-items: center; margin: 0 auto .7rem; border: 1px solid rgba(180,150,83,.2); border-radius: 50%; color: var(--gold-light); font-size: 1.1rem; }

.notification-overview { display: flex; align-items: stretch; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.notification-overview-card { min-width: 190px; display: grid; grid-template-columns: 1fr auto; gap: .12rem .7rem; align-items: center; padding: .8rem .9rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.notification-overview-card > span { color: var(--muted); font-size: .68rem; font-weight: 760; }
.notification-overview-card > strong { grid-row: 1 / 3; grid-column: 2; color: var(--text); font-family: Georgia, serif; font-size: 1.8rem; font-weight: 500; }
.notification-overview-card > small { color: #77736c; font-size: .64rem; }
.notification-overview-card.has-unread { border-color: rgba(180,150,83,.24); }
.notification-overview-card.has-unread > strong { color: var(--gold-light); }
.notification-filters { align-self: center; display: flex; gap: .35rem; padding: .35rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.notification-filters a { display: flex; align-items: center; gap: .4rem; padding: .52rem .72rem; border-radius: 8px; color: var(--muted); font-size: .7rem; font-weight: 800; }
.notification-filters a.active { color: #160f05; background: var(--gold-light); }
.notification-filters a > span { min-width: 17px; height: 17px; display: grid; place-items: center; padding: 0 .25rem; border-radius: 999px; background: rgba(0,0,0,.16); font-size: .55rem; }
.notification-list { display: grid; gap: .7rem; }
.notification-card {
  position: relative;
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: .7rem;
  padding: .9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  transition: border-color .15s ease, background .15s ease;
}
.notification-card.is-unread { border-color: rgba(180,150,83,.18); background: linear-gradient(90deg, rgba(180,150,83,.04), transparent 28%), var(--surface); }
.notification-card.is-resolved { opacity: .68; }
.notification-card-copy { min-width: 0; }
.notification-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.notification-card-head h2 { margin: 0; font-family: Georgia, serif; font-size: 1.05rem; font-weight: 500; }
.notification-card-head .eyebrow { margin-bottom: .15rem; }
.notification-card-meta { display: flex; align-items: center; gap: .55rem; color: #77736c; font-size: .65rem; white-space: nowrap; }
.notification-card-copy > p { margin: .45rem 0 .65rem; color: #b7b2a8; font-size: .75rem; line-height: 1.5; }
.notification-card-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; }
.notification-empty { margin-top: .3rem; }

[id^="vente-"], [id^="location-"], [id^="contrat-"], [id^="document-"], [id^="tache-"] { scroll-margin-top: 92px; }
:target { animation: beanmachine-target-highlight 2.2s ease; }
@keyframes beanmachine-target-highlight {
  0%, 18% { border-color: rgba(180,150,83,.72); box-shadow: 0 0 0 3px rgba(180,150,83,.12); }
  100% { border-color: var(--line); box-shadow: none; }
}

@media (max-width: 1180px) {
  .topbar-title { flex-basis: 180px; }
  .topbar-search { max-width: 440px; }
  .topbar-search kbd { display: none; }
  .topbar-search input { padding-right: .8rem; }
  .search-start-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 860px) {
  .topbar { gap: .6rem; }
  .topbar-title { flex: 1 1 auto; }
  .topbar-search { display: none; }
  .topbar-mobile-search { display: grid; }
  .topbar-logout .btn { width: 40px; min-width: 40px; padding: 0; font-size: 0; }
  .topbar-logout .btn::before { content: "↪"; font-size: 1rem; }
  .notification-popover { position: fixed; top: 70px; right: 1rem; }
}

@media (max-width: 700px) {
  .global-search-page-form { grid-template-columns: 1fr; }
  .global-search-page-form > .btn { width: 100%; }
  .search-result-card { grid-template-columns: auto minmax(0, 1fr) 28px; gap: .65rem; }
  .search-result-badge { grid-column: 2; justify-self: start; }
  .search-result-arrow { grid-column: 3; grid-row: 1 / 3; }
  .search-start-grid { grid-template-columns: 1fr; }
  .notification-overview { flex-direction: column; }
  .notification-overview-card { min-width: 0; }
  .notification-filters { align-self: stretch; }
  .notification-filters a { flex: 1; justify-content: center; }
  .notification-card-head { flex-direction: column; gap: .45rem; }
  .notification-card-meta { flex-wrap: wrap; white-space: normal; }
}

@media (max-width: 480px) {
  .topbar-actions { gap: .35rem; }
  .topbar-icon-button { width: 38px; height: 38px; flex-basis: 38px; }
  .notification-popover { left: .7rem; right: .7rem; width: auto; }
  .tablet-session-badge { display: none; }
}
.notification-bell-icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Bean Machine menu image */
.beanmachine-menu-panel { overflow: hidden; }
.beanmachine-menu-frame {
  width: 100%;
  display: grid;
  place-items: center;
  overflow: auto;
  padding: clamp(.5rem, 2vw, 1.25rem);
  border: 1px solid rgba(180, 150, 83, .20);
  border-radius: 14px;
  background: radial-gradient(circle at 50% 0, rgba(180, 150, 83, .07), transparent 32rem), #0b0b0b;
}
.beanmachine-menu-frame.is-admin-preview { max-height: 78vh; align-items: start; }
.beanmachine-menu-image {
  display: block;
  width: min(100%, 1600px);
  height: auto;
  max-width: 100%;
  object-fit: contain;
}
.beanmachine-menu-empty { min-height: 18rem; display: grid; place-items: center; align-content: center; }
@media (max-width: 720px) {
  .beanmachine-menu-frame { padding: .35rem; border-radius: 10px; }
  .beanmachine-menu-hero { gap: 1rem; }
}
