:root {
    --ink: #17222d;
    --muted: #66727f;
    --line: #dfe5e9;
    --paper: #ffffff;
    --canvas: #f3f6f7;
    --nav: #13262e;
    --nav-soft: #203943;
    --brand: #2563b9;
    --brand-dark: #174a87;
    --brand-soft: #e7f0fb;
    --accent: #d99a31;
    --danger: #bd3e45;
    --warning: #a8650c;
    --radius: 14px;
    --shadow: 0 10px 30px rgba(25, 47, 58, .07);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; color: var(--ink); background: var(--canvas); }
body { margin: 0; min-height: 100vh; font-size: 15px; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(27px, 3vw, 38px); line-height: 1.12; letter-spacing: -.035em; margin-bottom: 8px; }
h2 { font-size: 19px; margin-bottom: 5px; letter-spacing: -.01em; }
p { color: var(--muted); line-height: 1.55; }

.app-shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--nav); color: #fff; padding: 26px 18px 20px; display: flex; flex-direction: column; z-index: 40; }
.brand { display: flex; gap: 12px; align-items: center; padding: 0 8px 28px; }
.brand-mark { width: 38px; height: 38px; border-radius: 11px; display: inline-grid; place-items: center; flex: 0 0 auto; background: var(--brand); color: white; font-weight: 800; letter-spacing: -.04em; box-shadow: inset 0 0 0 1px rgba(255,255,255,.16); }
.brand-mark.large { width: 50px; height: 50px; border-radius: 15px; font-size: 18px; }
.brand strong, .auth-brand strong { display: block; font-size: 16px; }
.brand small, .auth-brand small { display: block; color: #aebfc6; margin-top: 2px; font-size: 12px; }
.entity-switcher { margin: -12px 8px 10px; }
.entity-switcher label { display: block; margin-bottom: 5px; color: #91a4ac; font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.entity-switcher select { width: 100%; min-height: 36px; border: 1px solid rgba(255,255,255,.18); border-radius: 8px; padding: 0 8px; background: #20343d; color: white; font-size: 12px; font-weight: 700; }
.main-nav { display: flex; flex-direction: column; gap: 5px; }
.main-nav > a { color: #cbd6da; padding: 11px 12px; border-radius: 9px; font-weight: 560; transition: .15s ease; }
.main-nav > a { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.main-nav > a:hover { color: white; background: var(--nav-soft); }
.main-nav > a.active { color: white; background: var(--brand); }
.main-nav > a small { display: block; color: #93a8b1; font-size: 9px; margin-top: 2px; text-transform: uppercase; letter-spacing: .05em; }
.main-nav > a.active small { color: #dceaff; }
.nav-badge { min-width: 21px; height: 21px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: 999px; background: var(--danger); color: white; font-size: 10px; font-weight: 850; }
.nav-section { margin: 20px 12px 4px; color: #78909a; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; font-weight: 800; }
.sidebar-footer { margin-top: auto; padding: 16px 8px 0; border-top: 1px solid rgba(255,255,255,.1); }
.user-chip { display: flex; gap: 10px; align-items: center; }
.user-chip .avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--brand-soft); color: var(--brand-dark); font-weight: 800; }
.user-chip strong { display: block; font-size: 13px; }
.user-chip small { display: block; color: #9eb0b7; margin-top: 2px; font-size: 11px; }
.sidebar-footer .link-button { margin-top: 13px; color: #aebfc6; }

.main-content { min-width: 0; overflow-x: hidden; }
.topbar { height: 67px; padding: 0 32px; background: rgba(255,255,255,.92); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 30; backdrop-filter: blur(10px); }
.topbar-title { font-weight: 720; }
.global-search { display: flex; width: min(320px, 28vw); margin-left: auto; margin-right: 12px; }
.global-search input { width: 100%; height: 36px; border: 1px solid var(--line); border-radius: 8px 0 0 8px; padding: 7px 10px; background: #f8fafb; }
.global-search button { border: 1px solid var(--line); border-left: 0; border-radius: 0 8px 8px 0; background: white; color: var(--brand-dark); font-weight: 700; font-size: 11px; }
.global-month { display: flex; align-items: center; gap: 7px; margin-right: 16px; }
.global-month label { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.global-month select { height: 36px; max-width: 165px; border: 1px solid var(--line); border-radius: 8px; background: white; padding: 0 8px; color: var(--ink); font-weight: 650; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.local-status { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.local-status span { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.menu-button { display: none; border: 0; background: transparent; color: var(--ink); font-weight: 700; }
.content-wrap { min-width: 0; padding: 34px; max-width: 1600px; margin: 0 auto; }
.page-heading { display: flex; gap: 24px; align-items: flex-start; justify-content: space-between; margin: 2px 0 26px; }
.page-heading p { margin-bottom: 0; }
.heading-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.eyebrow { display: block; text-transform: uppercase; letter-spacing: .12em; color: var(--brand-dark); font-size: 11px; font-weight: 800; margin-bottom: 8px; }
.back-link { color: var(--brand-dark); font-weight: 700; display: inline-block; margin-bottom: 14px; font-size: 13px; }

.button { border: 1px solid transparent; border-radius: 9px; min-height: 42px; padding: 10px 16px; display: inline-flex; align-items: center; justify-content: center; font-weight: 720; transition: .15s ease; white-space: nowrap; }
.button:hover { transform: translateY(-1px); }
.button.primary { background: var(--brand); color: white; }
.button.primary:hover { background: var(--brand-dark); }
.button.secondary { background: white; color: var(--ink); border-color: var(--line); }
.button.danger { background: white; color: var(--danger); border-color: #e8b9bc; }
.button.danger:hover { background: #fdeff0; }
.button.ghost { color: var(--muted); }
.button.full { width: 100%; }
.link-button { border: 0; padding: 0; background: transparent; color: var(--brand-dark); }
.link-button.strong { font-weight: 750; }
.danger-text { color: var(--danger); font-weight: 720; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.metric-grid.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.metric-grid.six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.metric-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); min-height: 142px; display: flex; flex-direction: column; }
.metric-card > span, .finance-card > span { color: var(--muted); font-weight: 650; font-size: 13px; }
.metric-card strong { font-size: 38px; line-height: 1; margin: 16px 0 10px; letter-spacing: -.05em; }
.metric-card small { color: var(--brand-dark); margin-top: auto; font-weight: 650; }
.metric-card.accent { background: var(--nav); color: white; border-color: var(--nav); }
.metric-card.accent > span { color: #b8c8ce; }
.metric-card.accent small { color: #9cc7ff; }
.metric-card.neutral { background: #f8fafb; }

.dashboard-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 20px; }
.dashboard-finance { margin: 30px 0; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 14px; }
.section-heading h2 { font-size: 24px; margin: 0; }
.comparison-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.comparison-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 0; }
.comparison-card { background: white; border: 1px solid var(--line); border-radius: 12px; padding: 16px; box-shadow: var(--shadow); }
.comparison-card:hover { border-color: #a9bfd9; transform: translateY(-1px); }
.comparison-card > span, .comparison-card small { display: block; color: var(--muted); font-size: 11px; }
.comparison-card strong { display: block; font-size: 21px; margin: 10px 0 5px; letter-spacing: -.025em; }
.variance { margin-top: 11px; padding-top: 9px; border-top: 1px solid var(--line); color: #53616c; font-size: 12px; font-weight: 760; }
.variance.positive { color: var(--brand-dark); }
.variance.negative { color: var(--danger); }
.annual-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 20px; margin-bottom: 20px; }
.year-comparison { margin-bottom: 20px; }
.annual-summary .info-box { margin-top: 15px; }
.trend-bars { display: grid; gap: 13px; }
.trend-bars > div { display: grid; grid-template-columns: 34px minmax(100px, 1fr) 95px 40px; align-items: center; gap: 10px; }
.trend-bars span, .trend-bars small { color: var(--muted); font-size: 11px; font-weight: 720; }
.trend-bars strong { text-align: right; font-size: 12px; }
.trend-track { height: 9px; overflow: hidden; border-radius: 999px; background: #e7edf1; }
.trend-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand-dark), var(--brand)); }
.panel { min-width: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.panel-header { display: flex; justify-content: space-between; align-items: flex-start; padding-bottom: 18px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.panel-header p { margin: 0; font-size: 13px; }
.table-panel { padding: 0; overflow: hidden; }
.table-scroll { max-width: 100%; overflow: auto; overscroll-behavior-x: contain; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; padding: 13px 15px; color: #53616c; background: #f7f9fa; border-bottom: 1px solid var(--line); font-size: 11px; letter-spacing: .045em; text-transform: uppercase; white-space: nowrap; }
td { padding: 13px 15px; border-bottom: 1px solid #e9edef; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfcfc; }
td strong { font-size: 14px; }
td small { display: block; color: var(--muted); margin-top: 3px; }
table.dense { font-size: 13px; }
table.dense th, table.dense td { padding: 10px 11px; }
.actions-col { text-align: right; }
.row-actions { display: flex; justify-content: flex-end; gap: 14px; align-items: center; }
.row-actions a, .table-link { color: var(--brand-dark); font-weight: 720; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.company-tag { display: inline-flex; align-items: center; width: fit-content; padding: 2px 7px; border-radius: 5px; background: var(--brand-soft); color: var(--brand-dark); font-size: 10px; font-weight: 800; letter-spacing: .035em; }
.company-tag.serdenet { background: #eef0f4; color: #48586c; }
.company-tag.external { background: #fff0d7; color: var(--warning); }
.status, .role-pill { display: inline-flex; align-items: center; width: fit-content; border-radius: 999px; padding: 4px 9px; font-size: 11px; font-weight: 760; background: #edf1f3; color: #53616c; white-space: nowrap; }
.status.active, .status.success, .status.validated { background: var(--brand-soft); color: var(--brand-dark); }
.status.inactive, .status.error, .status.negative { background: #fde9e9; color: var(--danger); }
.status.warning, .status.submitted, .status.running { background: #fff0d7; color: var(--warning); }
.status.pending { background: #fff0d7; color: var(--warning); }
.status.approved { background: var(--brand-soft); color: var(--brand-dark); }
.status.rejected { background: #fde9e9; color: var(--danger); }
.status.preview, .status.ambiguous, .status.new { background: #fff0d7; color: var(--warning); }
.status.applied, .status.matched { background: var(--brand-soft); color: var(--brand-dark); }
.status.replaced, .status.rolled_back, .status.ignored { background: #edf1f3; color: #53616c; }
.status.draft { background: #e9eef4; color: #53677a; }
.status.large { padding: 7px 12px; font-size: 12px; }
.role-pill.admin { background: var(--nav); color: white; }

.alert-list { display: grid; gap: 10px; }
.data-alert { min-width: 0; padding: 13px 14px; background: #f7f9fa; border-radius: 10px; display: flex; align-items: center; gap: 10px; }
.data-alert strong { min-width: 0; font-size: 13px; overflow-wrap: anywhere; }
.data-alert small { margin-left: auto; flex: 0 0 auto; color: var(--brand-dark); font-weight: 720; }
.data-alert span { width: 9px; height: 9px; border-radius: 50%; background: #6f8490; }
.data-alert.warning span { background: var(--accent); }
.data-alert.info span { background: #487db3; }
.summary-list { margin: 0; }
.summary-list div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.summary-list div:last-child { border-bottom: 0; }
.summary-list dt { color: var(--muted); }
.summary-list dd { margin: 0; font-weight: 650; text-align: right; }
.empty-state { min-height: 140px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: var(--muted); padding: 28px; }
.empty-state strong { color: var(--ink); margin-bottom: 5px; }
.empty-state.compact { min-height: 90px; padding: 15px; }

.filter-bar { display: flex; gap: 10px; margin-bottom: 15px; max-width: 720px; }
.filter-bar.short { max-width: 380px; align-items: flex-end; }
.filter-bar.wide-filter { max-width: 720px; align-items: flex-end; }
.filter-bar label { flex: 1; font-size: 12px; font-weight: 700; color: var(--muted); }
.filter-bar label input { margin-top: 5px; }
.filter-bar label select { margin-top: 5px; }
.pointage-filter { max-width: 920px; align-items: flex-end; }
.pointage-filter label:first-child { flex: 0 0 290px; }
.pointage-filter label:nth-child(2) { flex: 1 1 420px; }
.pointage-filter .button { min-height: 42px; }
.form-control { display: block; width: 100%; min-height: 42px; border: 1px solid #cbd4d9; border-radius: 8px; padding: 9px 11px; background: white; color: var(--ink); outline: none; }
.form-control:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37,99,185,.13); }
textarea.form-control { min-height: 100px; resize: vertical; }
.form-panel { max-width: 920px; }
.two-column-layout { display: grid; grid-template-columns: minmax(300px, .8fr) minmax(0, 1.2fr); gap: 20px; align-items: start; }
.activity-list { display: grid; gap: 12px; }
.activity-card { border: 1px solid var(--line); border-radius: 11px; padding: 14px 16px; background: #fff; }
.activity-card p { margin: 9px 0 0; font-size: 13px; }
.activity-card p strong { color: var(--ink); }
.activity-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.activity-card-header small { display: block; margin-top: 4px; color: var(--muted); }
.activity-card .link-button { margin-top: 10px; font-size: 12px; }
.form-card { max-width: 820px; }
.form-grid { display: grid; gap: 19px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid label, .stack-form label { display: block; font-weight: 680; font-size: 13px; }
.form-grid label > .form-control, .stack-form label > .form-control { margin-top: 7px; }
.form-grid label > small { display: block; color: var(--muted); font-weight: 400; margin-top: 5px; }
.form-grid .checkbox-label { display: flex; align-items: center; gap: 9px; align-self: end; min-height: 42px; }
.form-check-input { width: 18px; height: 18px; accent-color: var(--brand); order: -1; }
input[type="checkbox"] { width: 19px; height: 19px; min-height: 19px; padding: 0; border-radius: 4px; accent-color: var(--brand); }
.span-two { grid-column: 1 / -1; }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding-top: 20px; border-top: 1px solid var(--line); }
.field-error { color: var(--danger); display: block; margin-top: 5px; font-size: 12px; }
.form-errors { background: #fde9e9; color: var(--danger); border-radius: 9px; padding: 12px 14px; }
.stack-form { display: grid; gap: 16px; }

.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 30px; background: radial-gradient(circle at 15% 15%, rgba(37,99,185,.18), transparent 30%), var(--nav); }
.auth-card { width: min(430px, 100%); background: white; border-radius: 18px; padding: 34px; box-shadow: 0 24px 70px rgba(0,0,0,.25); }
.auth-card.wide { width: min(760px, 100%); }
.auth-brand { display: flex; gap: 12px; align-items: center; margin-bottom: 34px; }
.auth-brand small { color: var(--muted); }
.auth-card h1 { font-size: 30px; }
.auth-note { display: block; margin-top: 22px; color: var(--muted); text-align: center; line-height: 1.45; }

.flash { padding: 13px 15px; border-radius: 10px; margin-bottom: 18px; background: #e8f0f7; color: #2c5b80; }
.flash.success { background: var(--brand-soft); color: var(--brand-dark); }
.flash.error { background: #fde9e9; color: var(--danger); }
.flash.info { background: #edf1f3; color: #53616c; }
.impersonation-banner { position: sticky; top: 67px; z-index: 29; min-height: 48px; display: flex; justify-content: center; align-items: center; gap: 10px; padding: 8px 18px; background: #fff0d7; border-bottom: 1px solid #e3bd7b; color: #774800; }
.impersonation-banner form { display: inline; }
.impersonation-banner button { border: 1px solid #b77c1d; background: white; color: #754800; border-radius: 7px; padding: 6px 10px; font-weight: 700; }
.credentials-box { border: 1px solid #e0b55f; background: #fff6e6; border-radius: 12px; padding: 16px; margin-bottom: 18px; }
.credentials-box strong { display: block; margin-bottom: 10px; }
.credentials-box code { display: block; padding: 5px 0; }
.role-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.role-card-head { display: flex; justify-content: space-between; gap: 15px; }
.role-card-head span { color: var(--muted); font-size: 12px; }
.role-card p { min-height: 45px; }
.role-card summary { color: var(--brand-dark); font-weight: 720; cursor: pointer; }
.role-card ul { color: var(--muted); line-height: 1.5; padding-left: 20px; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 18px; padding: 16px; border-top: 1px solid var(--line); color: var(--muted); }
.pagination a { color: var(--brand-dark); font-weight: 720; }
.sort-link { display: inline-flex; align-items: center; gap: 4px; }
.sort-link:hover, .sort-link.active { color: var(--brand-dark); }
.sort-link.active::after { content: "↕"; font-size: 10px; }
.weekly-plan-grid { display: grid; grid-template-columns: repeat(7, minmax(72px, 1fr)); gap: 10px; }
.weekly-plan-grid label { text-align: center; }
.weekly-plan-grid label > span { display: block; margin-bottom: 6px; color: var(--muted); }
.weekly-plan-grid input { text-align: center; }
.weekly-total { color: var(--muted); font-size: 13px; }
.weekly-total strong { color: var(--brand-dark); font-size: 18px; }
.compact-number { max-width: 150px; }

.pointage-heading { align-items: center; }
.pointage-heading-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.pointage-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--nav); color: white; border-radius: 13px; margin-bottom: 16px; overflow: hidden; }
.pointage-contract-details { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 0 12px; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; background: white; }
.pointage-contract-details div { padding: 10px 13px; border-right: 1px solid var(--line); }
.pointage-contract-details div:last-child { border-right: 0; }
.pointage-contract-details dt { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.pointage-contract-details dd { margin: 4px 0 0; font-weight: 760; }
.pointage-contract-details small { display: block; color: var(--muted); margin-top: 2px; font-size: 10px; }
.pointage-summary div { padding: 15px 18px; border-right: 1px solid rgba(255,255,255,.13); }
.pointage-summary div:last-child { border-right: 0; }
.pointage-summary span { display: block; color: #b9c8ce; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.pointage-summary strong { display: block; font-size: 20px; margin-top: 5px; }
.pointage-panel { padding: 0; border-radius: 8px; }
.pointage-scroll { overflow: auto; max-height: calc(100vh - 310px); }
.pointage-table { width: max-content; min-width: 100%; font-size: 11px; }
.pointage-table th { background: #24424d; color: white; border-color: #3a5660; text-align: center; padding: 7px 3px; }
.pointage-table td { padding: 0; height: 37px; border-right: 1px solid #dfe5e9; text-align: center; }
.pointage-table .day-col { width: 42px; min-width: 42px; }
.pointage-table .day-col span, .pointage-table .day-col small { display: block; }
.pointage-table .day-col small { color: #b9c8ce; font-size: 8px; margin-top: 2px; }
.pointage-table .weekend { background: #edf1f3; }
.pointage-table th.weekend { background: #1b333d; }
.pointage-cell input { width: 41px; height: 36px; border: 0; text-align: center; background: transparent; padding: 2px; font-size: 11px; color: var(--ink); -moz-appearance: textfield; }
.pointage-cell input::-webkit-inner-spin-button { display: none; }
.pointage-cell input:focus { outline: 2px solid var(--brand); outline-offset: -2px; background: white; }
.pointage-cell input.save-success { background: var(--brand-soft); }
.pointage-cell input.save-error { background: #fde9e9; outline: 2px solid var(--danger); outline-offset: -2px; }
.pointage-table .sticky-col { position: sticky; left: 0; z-index: 5; background: white; text-align: left; }
.pointage-table th.sticky-col { z-index: 8; background: #24424d; }
.pointage-table .chantier-col { width: 220px; min-width: 220px; max-width: 220px; padding: 7px 10px; }
.pointage-table .sticky-col-two { position: sticky; left: 220px; z-index: 5; width: 66px; min-width: 66px; background: white; border-right: 2px solid #b9c5ca; }
.pointage-table th.sticky-col-two { z-index: 8; background: #24424d; }
.pointage-table .total-col, .pointage-table .line-total { width: 78px; min-width: 78px; max-width: 78px; box-sizing: border-box; padding-left: 4px; padding-right: 4px; background: var(--brand-soft); font-weight: 800; font-size: 10px; white-space: nowrap; overflow: hidden; }
.pointage-table .pointage-total-value { display: block; width: 100%; min-width: 0; overflow: hidden; text-overflow: clip; white-space: nowrap; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.pointage-summary strong { font-size: 16px; }
.pointage-table td.chantier-col strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.line-request-link { color: var(--brand-dark); font-size: 9px; font-weight: 760; }
.supp-label { color: var(--warning); }
.pointage-table .overtime-row td, .pointage-table .overtime-row input, .overtime-row .supp-label { color: var(--danger); font-weight: 760; }
.administrative-elements .form-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); align-items: end; }
.administrative-elements .form-grid > p { margin: 0; display: grid; grid-template-rows: minmax(34px, auto) 42px; align-items: end; }
.administrative-elements .form-grid > p label { align-self: end; }
.administrative-elements .form-actions { grid-column: 1 / -1; }
.assignment-group-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 10px 16px 0; }
.assignment-employee-list { display: grid; gap: 10px; padding: 14px; }
.assignment-employee-group { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.assignment-employee-group > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 24px minmax(220px, 1fr) auto; align-items: center; gap: 10px; padding: 14px 16px; background: #f7f9fa; }
.assignment-employee-group > summary::-webkit-details-marker { display: none; }
.assignment-employee-group summary small { display: block; color: var(--muted); margin-top: 3px; }
.assignment-chevron { font-size: 25px; color: var(--brand); transition: transform .15s ease; }
.assignment-employee-group[open] .assignment-chevron { transform: rotate(90deg); }
.assignment-summary-stats { display: flex; gap: 18px; color: var(--brand-dark); font-size: 13px; }
.permission-module { margin-bottom: 14px; }
.permission-rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.permission-row { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(230px, .8fr); gap: 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.permission-row small { display: block; color: var(--muted); margin-top: 4px; }
table:has(th:first-child .sort-link[href*="sort=code"]) th:first-child,
table:has(th:first-child .sort-link[href*="sort=code"]) tbody > tr > td:first-child { display: none; }
.connection-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.connection-card small { color: var(--muted); }
@media (max-width: 1100px) {
    .administrative-elements .form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .permission-rows, .connection-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
    .administrative-elements .form-grid { grid-template-columns: 1fr; }
    .permission-row { grid-template-columns: 1fr; }
    .assignment-employee-group > summary { grid-template-columns: 22px 1fr; }
    .assignment-summary-stats { grid-column: 2; }
}
.frequency { font-size: 9px; font-weight: 700; color: var(--muted); }
.sticky-actions { position: sticky; bottom: 0; z-index: 20; margin-top: 14px; padding: 12px 15px; display: flex; align-items: center; justify-content: space-between; gap: 16px; background: rgba(255,255,255,.95); border: 1px solid var(--line); border-radius: 11px; box-shadow: 0 -8px 24px rgba(25,47,58,.08); backdrop-filter: blur(10px); }
.sticky-actions span { color: var(--muted); font-size: 13px; }
.sticky-actions div { display: flex; gap: 9px; }
.correction-actions label { min-width: min(520px, 58vw); color: var(--warning); font-size: 11px; font-weight: 760; }
.correction-actions label input { margin-top: 5px; }
.absence-panel { margin-top: 20px; }
.compact-list { display: grid; gap: 0; }
.compact-list > a, .compact-list > div, .compact-list > span { padding: 11px 2px; border-bottom: 1px solid var(--line); color: var(--brand-dark); }
.compact-list > a:last-child, .compact-list > div:last-child, .compact-list > span:last-child { border-bottom: 0; }
.compact-list > div { display: flex; justify-content: space-between; align-items: center; gap: 16px; color: var(--ink); }
.compact-list strong, .compact-list small { display: block; }
.compact-list small { color: var(--muted); margin-top: 3px; }

.finance-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.finance-card { background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.finance-card strong { display: block; font-size: 27px; margin-top: 14px; letter-spacing: -.035em; }
.finance-card small { color: var(--muted); }
.finance-card.revenue { border-top: 4px solid var(--brand); }
.finance-card.result { background: var(--nav); color: white; }
.finance-card.result > span { color: #b9c8ce; }
.finance-card.result.negative { background: #702f33; }
.finance-heading { margin-bottom: 12px; }
.finance-heading .heading-actions { min-width: 0; }
.finance-heading .inline-form { min-width: 0; max-width: 100%; flex: 1 1 100%; flex-wrap: wrap; }
.finance-heading .inline-form .form-control { flex: 1 1 150px; min-width: 0; }
.finance-subnav { display: flex; gap: 7px; margin-bottom: 20px; position: sticky; top: 76px; z-index: 22; width: fit-content; padding: 5px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.94); box-shadow: var(--shadow); backdrop-filter: blur(10px); }
.finance-subnav a { padding: 8px 13px; border-radius: 7px; color: var(--brand-dark); font-size: 12px; font-weight: 760; }
.finance-subnav a:hover { background: var(--brand-soft); }
.finance-alerts { display: grid; gap: 9px; margin-bottom: 20px; }
.finance-overview-grid, .finance-ranking-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-bottom: 20px; }
.summary-list .summary-total { margin-top: 4px; border-top: 2px solid var(--line); border-bottom: 0; font-size: 15px; }
.panel-header.padded { padding: 18px 20px 14px; margin: 0; }
.finance-detail-section { margin-top: 20px; scroll-margin-top: 140px; }
.finance-section-heading { min-width: 0; display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 18px 24px; padding: 22px; border-bottom: 1px solid var(--line); }
.finance-section-heading > div { min-width: 0; flex: 1 1 420px; }
.finance-section-heading p { max-width: 780px; margin-bottom: 0; font-size: 13px; }
.finance-section-heading .inline-form { min-width: min(370px, 100%); }
.finance-filter-form { display: grid; grid-template-columns: minmax(230px, 1fr) auto; gap: 8px; min-width: 390px; }
.finance-filter-form.client-sort-form { grid-template-columns: minmax(180px, 1fr) 145px minmax(170px, .8fr) 125px auto; min-width: 850px; }
.finance-filter-form.employee-sort-form { grid-template-columns: minmax(180px, 1fr) 155px 165px 125px auto; min-width: 860px; }
.finance-table-scroll { max-height: 650px; }
.finance-table-scroll thead { position: sticky; top: 0; z-index: 4; }
.finance-table-scroll table { min-width: 980px; }
.finance-table-scroll td { white-space: nowrap; }
.finance-detail-section > .table-scroll > table { min-width: 900px; }
.comparison-details table { min-width: 1040px; }
.finance-card, .metric-card { overflow-wrap: anywhere; }
.financial-negative { color: var(--danger); font-weight: 760; }
.workflow-status { display: flex; gap: 10px; flex-wrap: wrap; margin: -8px 0 18px; }
.workflow-pill { display: flex; align-items: center; gap: 9px; padding: 9px 13px; border: 1px solid #e2c878; border-radius: 999px; background: #fff9e7; color: #725c17; }
.workflow-pill span { font-size: 10px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.workflow-pill strong { font-size: 12px; }
.workflow-pill.ready { border-color: #8dc9ad; background: #eaf8f1; color: #176342; }
.closing-checklist { display: grid; }
.closing-item { min-width: 0; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--line); }
.closing-item:first-child { border-top: 0; }
.closing-item:hover { background: #f7fafc; }
.closing-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: #fff1cf; color: #8b6410; font-weight: 900; }
.closing-item.ready .closing-icon { background: #dff5ea; color: #176342; }
.closing-item strong, .closing-item small { display: block; }
.closing-item > span:nth-child(2) { min-width: 0; }
.closing-item small { margin-top: 3px; color: var(--muted); line-height: 1.4; overflow-wrap: anywhere; }
.closing-item .table-link { justify-self: end; white-space: nowrap; }
.success-card { border-color: #8dc9ad; background: #f0fbf6; }
.comparison-details { margin-top: 0; border-top: 1px solid var(--line); padding: 0; overflow: hidden; background: #fbfcfd; }
.comparison-details summary { display: flex; align-items: center; gap: 9px; cursor: pointer; list-style: none; padding: 14px 20px; color: var(--brand-dark); font-weight: 800; }
.comparison-details summary::-webkit-details-marker { display: none; }
.comparison-details summary::before { content: "+"; width: 24px; height: 24px; display: inline-grid; place-items: center; border-radius: 50%; background: var(--brand-soft); font-size: 17px; line-height: 1; }
.comparison-details[open] summary { border-bottom: 1px solid var(--line); }
.comparison-details[open] summary::before { content: "−"; }
.comparison-details > .table-scroll { padding: 0 20px 20px; }
.explanation-cell { min-width: 280px; white-space: normal !important; color: var(--muted); line-height: 1.4; }
.expandable-finance-row { cursor: pointer; }
.expandable-finance-row:hover, .expandable-finance-row.expanded { background: #f0f6fd; }
.row-expand-button { width: 25px; height: 25px; margin-right: 7px; border: 0; border-radius: 50%; background: #e7eff8; color: var(--brand-dark); font-size: 18px; font-weight: 900; cursor: pointer; }
.finance-breakdown-row > td { padding: 0 !important; background: #f7fafc; }
.breakdown-content { padding: 16px 20px 20px; border-bottom: 2px solid #aab9c6; }
.breakdown-heading { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 12px; }
.breakdown-heading span, .breakdown-costs { color: var(--muted); font-size: 12px; }
.breakdown-content table { background: white; border: 1px solid var(--line); }
.breakdown-costs { margin-top: 10px; text-align: right; }
.audit-details { min-width: 300px; }
.audit-details summary { cursor: pointer; color: var(--brand-dark); font-weight: 780; }
.audit-details > strong { display: block; margin: 10px 0 5px; font-size: 11px; color: var(--muted); text-transform: uppercase; }
.audit-details dl { margin: 0; display: grid; gap: 4px; }
.audit-details dl div { display: grid; grid-template-columns: minmax(110px, .8fr) minmax(170px, 1.4fr); gap: 8px; border-top: 1px solid var(--line); padding-top: 4px; }
.audit-details dt { color: var(--muted); }
.audit-details dd { margin: 0; white-space: normal; }
.absence-summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 10px; margin-bottom: 18px; }
.compact-card { display: flex; flex-direction: column; gap: 5px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfd; }
.compact-card:hover, .compact-card.selected { border-color: #9cb8da; background: var(--brand-soft); }
.compact-card strong { font-size: 18px; }
.compact-card small { color: var(--muted); }
.absence-code { display: inline-flex; width: fit-content; padding: 3px 8px; border-radius: 999px; background: var(--nav); color: white; font-size: 10px; font-weight: 850; letter-spacing: .05em; }
.separated-list, .movement-section { margin-bottom: 20px; }
.padded-list { padding: 0 22px 22px; }
.unread-row { background: #eef5ff; }
.unread-row:hover { background: #e5f0ff; }
.section-tabs { display: flex; width: fit-content; gap: 7px; margin: 0 0 18px; padding: 5px; border: 1px solid var(--line); border-radius: 11px; background: white; box-shadow: var(--shadow); }
.section-tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 15px; border-radius: 8px; color: var(--brand-dark); font-size: 13px; font-weight: 760; }
.section-tabs a:hover { background: var(--brand-soft); }
.section-tabs a.active { background: var(--brand); color: white; }
.section-tabs a span { min-width: 21px; height: 21px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: 999px; background: #edf1f3; color: #53616c; font-size: 10px; }
.section-tabs a.active span { background: rgba(255,255,255,.22); color: white; }
.pennylane-table select { min-width: 310px; }
.inline-form { display: flex; gap: 8px; }
.note-panel { max-width: 900px; }
.note-panel p { margin-bottom: 0; }
.info-box { margin-top: 20px; background: #f0f5f7; color: #53616c; border-radius: 10px; padding: 13px; font-size: 13px; line-height: 1.5; }
.read-only-notice { border-left: 4px solid var(--brand); margin: 0 0 16px; }
.compact-panel { padding: 15px 18px; margin-bottom: 16px; display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.compact-panel small { display: block; color: var(--muted); margin-top: 4px; }
.compact-panel form { display: flex; gap: 8px; }
.address-cell { min-width: 230px; max-width: 340px; white-space: normal; line-height: 1.35; }
.duplicate-section { margin-bottom: 26px; }
.panel-header.standalone { margin-bottom: 14px; padding: 0 0 12px; }
.duplicate-card { margin-bottom: 12px; }
.duplicate-records { display: grid; gap: 8px; margin: 14px 0; }
.duplicate-records > div { border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; }
.duplicate-records strong, .duplicate-records small { display: block; }
.duplicate-records small { color: var(--muted); margin-top: 4px; }
.duplicate-actions, .duplicate-actions form { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.duplicate-actions { justify-content: flex-end; border-top: 1px solid var(--line); padding-top: 13px; }
.duplicate-actions label { color: var(--muted); font-size: 11px; font-weight: 750; }
.duplicate-actions select { margin-top: 5px; min-width: 260px; }
.search-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.search-panel .panel-header { align-items: center; }
.search-result { display: block; padding: 11px 4px; border-bottom: 1px solid var(--line); }
.search-result:last-child { border-bottom: 0; }
.search-result:hover strong { color: var(--brand-dark); }
.search-result strong, .search-result small { display: block; }
.search-result small { color: var(--muted); margin-top: 4px; }
.global-results-search { max-width: 900px; }

.print-page { background: #eef2f5; color: #111; padding: 18px; }
.print-toolbar { max-width: 1500px; margin: 0 auto 16px; padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; gap: 20px; background: white; border-radius: 10px; box-shadow: var(--shadow); }
.print-toolbar strong, .print-toolbar small { display: block; }
.print-toolbar small { color: var(--muted); margin-top: 4px; }
.print-sheet { width: 100%; max-width: 1500px; min-height: 760px; margin: 0 auto 20px; padding: 18px; background: white; box-shadow: var(--shadow); break-after: page; }
.print-sheet-header { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 3px solid var(--brand); padding-bottom: 10px; }
.print-sheet-header h1 { font-size: 20px; margin: 3px 0 0; }
.print-brand { color: var(--brand-dark); font-size: 11px; font-weight: 900; letter-spacing: .16em; }
.print-period { text-align: right; }
.print-period strong, .print-period span { display: block; }
.print-period span { color: #555; margin-top: 3px; font-size: 10px; }
.print-identity { display: grid; grid-template-columns: 2fr .8fr 1fr 1fr; margin: 10px 0; border: 1px solid #999; }
.print-identity div { padding: 6px 8px; border-right: 1px solid #999; }
.print-identity div:last-child { border-right: 0; }
.print-identity dt { font-size: 7px; font-weight: 800; color: #555; text-transform: uppercase; }
.print-identity dd { margin: 2px 0 0; font-size: 10px; font-weight: 750; }
.print-contract { display: flex; gap: 18px; margin: -4px 0 8px; padding: 5px 8px; border: 1px solid #aaa; border-top: 0; }
.print-contract div { display: flex; align-items: baseline; gap: 5px; }
.print-contract dt { color: #555; font-size: 7px; font-weight: 800; text-transform: uppercase; }
.print-contract dd { margin: 0; font-size: 8px; font-weight: 750; }
.print-pointage-table { table-layout: fixed; border-collapse: collapse; font-size: 6.5px; }
.print-pointage-table th, .print-pointage-table td { border: 1px solid #777; padding: 2px 1px; text-align: center; height: 17px; }
.print-pointage-table th { background: #24424d; color: white; font-size: 6px; }
.print-pointage-table th small { display: block; color: #d2dde1; font-size: 5px; }
.print-pointage-table .print-client { width: 120px; text-align: left; padding-left: 4px; font-size: 7px; }
.print-pointage-table .print-total { width: 52px; min-width: 52px; max-width: 52px; box-sizing: border-box; white-space: nowrap; overflow: hidden; font-variant-numeric: tabular-nums; }
.print-pointage-table .print-total strong { display: block; overflow: hidden; text-overflow: clip; white-space: nowrap; }
.print-pointage-table .weekend { background: #e8edf0; }
.print-pointage-table th.weekend { background: #172f39; }
.print-pointage-table tfoot td { background: var(--brand-soft); font-size: 8px; font-weight: 800; }
.print-pointage-table .overtime-row td { color: #b4232a; font-weight: 800; }
.print-admin-elements { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 9px; padding: 7px 9px; border: 1.5px solid #4b5960; font-size: 8px; }
.print-admin-elements strong { width: 100%; }
.print-empty { max-width: 700px; margin: 100px auto; text-align: center; }
.request-context { max-width: 920px; margin: -8px 0 16px; }
.request-list { display: grid; gap: 16px; }
.request-card { max-width: 1120px; }
.request-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.request-card-head p { margin-bottom: 0; }
.request-details { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; margin: 18px 0 0; }
.request-details div { min-width: 0; }
.request-details .wide { grid-column: 1 / -1; }
.request-details dt { color: var(--muted); font-size: 11px; font-weight: 760; text-transform: uppercase; letter-spacing: .045em; }
.request-details dd { margin: 5px 0 0; line-height: 1.45; }
.review-form { display: grid; gap: 12px; border-top: 1px solid var(--line); margin-top: 18px; padding-top: 16px; }
.review-form label { color: var(--muted); font-size: 12px; font-weight: 700; }
.review-form textarea { margin-top: 6px; min-height: 70px; }
.review-form > div { display: flex; justify-content: flex-end; gap: 10px; }
.review-meta { display: block; color: var(--muted); border-top: 1px solid var(--line); margin-top: 18px; padding-top: 14px; }
.timeline { display: grid; gap: 15px; }
.timeline > div { position: relative; padding-left: 22px; }
.timeline-dot { position: absolute; left: 0; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: #7c8c94; }
.timeline-dot.success { background: var(--brand); }
.timeline-dot.error { background: var(--danger); }
.timeline strong, .timeline small { display: block; }
.timeline small { color: var(--muted); margin: 3px 0; }
.timeline p { margin: 0; font-size: 12px; }
.error-page { max-width: 620px; padding: 70px 0; }
.error-page > span { color: var(--danger); font-weight: 800; text-transform: uppercase; font-size: 11px; letter-spacing: .12em; }

.planning-models { margin-top: 22px; }
.planning-models .panel-header, .table-panel > .panel-header { padding: 20px 22px 16px; margin: 0; }
.planning-heading { align-items: center; }
.planning-editor { display: grid; gap: 9px; }
.planning-meta { padding: 18px; }
.planning-site-card { padding: 0; overflow: hidden; }
.planning-site-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 14px 0 0; background: #f7f9fb; }
.planning-site-toggle { min-width: 0; flex: 1; display: flex; align-items: center; gap: 10px; padding: 12px 18px; border: 0; background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.planning-site-toggle:hover .planning-site-summary strong { color: var(--brand-dark); }
.planning-site-chevron { width: 28px; height: 28px; flex: 0 0 28px; display: grid; place-items: center; border-radius: 50%; background: var(--brand-soft); color: var(--brand-dark); font-size: 23px; font-weight: 900; line-height: 1; transition: transform .16s ease, background .16s ease; }
.planning-site-card.expanded .planning-site-chevron { transform: rotate(90deg); background: #dbeafb; }
.planning-site-summary { min-width: 0; display: block; }
.planning-site-summary strong, .planning-site-summary small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.planning-site-summary small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.planning-site-body { border-top: 1px solid var(--line); padding-bottom: 1px; }
.planning-site-body[hidden] { display: none; }
.planning-site-name { flex: 1; }
.planning-site-name label { display: grid; grid-template-columns: 90px minmax(220px, 460px); align-items: center; gap: 10px; font-size: 12px; font-weight: 800; }
.planning-site-body .planning-site-name { padding: 14px 18px 0; }
.planning-site-name small { display: block; margin: 5px 0 0 100px; color: var(--muted); }
.button.compact { min-height: 34px; padding: 6px 11px; font-size: 12px; }
.planning-task-table { min-width: 1220px; }
.planning-task-table th, .planning-task-table td { padding: 8px; text-align: center; border-right: 1px solid #edf1f3; }
.planning-task-table th:nth-child(3), .planning-task-table td:nth-child(3),
.planning-task-table th:nth-child(6), .planning-task-table td:nth-child(6),
.planning-task-table th:nth-child(8), .planning-task-table td:nth-child(8),
.planning-task-table th:nth-child(10), .planning-task-table td:nth-child(10) { border-left: 2px solid #d3dee5; }
.planning-task-table tbody tr:nth-child(even) { background: #fcfdfe; }
.planning-task-table tbody tr:hover { background: #f0f6fd; }
.planning-task-table th:nth-child(10), .planning-task-table td:nth-child(10) { text-align: left; min-width: 220px; }
.planning-task-table th:nth-child(7), .planning-task-table td:nth-child(7),
.planning-task-table th:nth-child(9), .planning-task-table td:nth-child(9) { min-width: 170px; }
.compact-control { min-width: 96px; min-height: 35px; padding: 6px 8px; }
.micro-control { min-width: 96px; min-height: 31px; padding: 5px 7px; margin-top: 5px; font-size: 11px; }
.frequency-cell { min-width: 126px; background: #fafcfd; }
.frequency-cell .frequency-select, .frequency-cell .frequency-note-select, .frequency-cell .frequency-note-custom { width: 118px; min-width: 118px; }
.frequency-cell .frequency-note-select[hidden], .frequency-cell .frequency-note-custom[hidden] { display: none; }
.planning-text { min-width: 175px; min-height: 35px; padding: 6px 8px; }
.check-cell input { width: 21px; height: 21px; accent-color: var(--brand); }
.check-cell .bin-blue { accent-color: #1757a6; }
.check-cell .bin-yellow { accent-color: #d2a300; }
.bin-choice.blue { color: #1757a6; font-weight: 800; background: #e8f1fb; }
.bin-choice.yellow { color: #8a6700; font-weight: 800; background: #fff7cc; }
.bin-choice.verify { color: var(--danger); font-weight: 800; background: #fde9e9; }
.add-planning-site { display: flex; align-items: flex-end; gap: 12px; }
.add-planning-site label { flex: 1; font-size: 12px; font-weight: 800; }
.add-planning-site select { margin-top: 7px; }
.select-search { margin: 7px 0; font-weight: 500; }
.select-search + select { margin-top: 0; }
.planning-actions { gap: 20px; }
.planning-actions > div { display: flex; flex-wrap: wrap; gap: 9px; }
.assignment-line-panel { margin: 0 16px 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfd; }
.assignment-line-panel summary { cursor: pointer; font-weight: 800; color: var(--brand-dark); }
.assignment-line-panel > p { margin: 8px 0 10px; color: var(--muted); font-size: 12px; }
.assignment-line-table { min-width: 1280px; }
.assignment-line-table th, .assignment-line-table td { padding: 6px; text-align: center; }
.assignment-line-table .compact-number { min-width: 74px; }
.planning-base-summary { padding: 0 22px 18px; }

.password-required-card { max-width: 720px; margin: 40px auto; padding: 28px; }
.password-required-card h1 { margin: 7px 0 9px; }
.password-required-card p { color: var(--muted); max-width: 620px; }
.narrow-form { max-width: 520px; margin-top: 22px; }
.complaint-status-tabs { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 16px; padding: 5px; border: 1px solid var(--line); border-radius: 11px; background: white; box-shadow: var(--shadow); }
.complaint-status-tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 9px 12px; border-radius: 8px; color: var(--brand-dark); font-size: 12px; font-weight: 760; }
.complaint-status-tabs a:hover, .complaint-status-tabs a.active { background: var(--brand); color: white; }
.complaint-status-tabs a span { min-width: 20px; padding: 2px 6px; border-radius: 999px; background: #edf1f3; color: #53616c; text-align: center; font-size: 10px; }
.complaint-status-tabs a.active span { background: rgba(255,255,255,.22); color: white; }
.complaint-filter-panel { padding: 12px 16px; margin-bottom: 16px; }
.complaint-filter-panel .inline-form { width: min(100%, 700px); }
.complaint-filter-panel .form-control { flex: 1; }
.complaint-list { display: grid; gap: 14px; }
.complaint-card { max-width: 1160px; padding: 0; overflow: hidden; }
.complaint-card.urgent { border-left: 5px solid var(--danger); }
.complaint-card-head { display: flex; justify-content: space-between; gap: 20px; padding: 18px 20px 14px; border-bottom: 1px solid var(--line); }
.complaint-card-head h2 { margin: 9px 0 3px; font-size: 18px; }
.complaint-card-head h2 a { color: var(--ink); }
.complaint-card-head h2 a:hover { color: var(--brand-dark); }
.complaint-card-head p { margin: 0; color: var(--muted); }
.complaint-card-date { min-width: 110px; text-align: right; }
.complaint-card-date strong, .complaint-card-date small { display: block; }
.complaint-card-date small { margin-top: 5px; color: var(--muted); }
.complaint-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding: 16px 20px; margin: 0; }
.complaint-summary dt, .complaint-details dt { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.complaint-summary dd, .complaint-details dd { margin: 4px 0 0; line-height: 1.45; }
.complaint-summary .wide { grid-column: 1 / -1; }
.complaint-card-foot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 11px 20px; border-top: 1px solid var(--line); background: #fbfcfd; color: var(--muted); font-size: 11px; }
.complaint-card-foot .table-link { margin-left: auto; }
.complaint-detail-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, .8fr); gap: 18px; align-items: start; }
.complaint-main-panel, .complaint-side-panel, .complaint-action-panel { overflow: hidden; }
.complaint-details { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; padding: 20px; margin: 0; }
.complaint-details .wide { grid-column: 1 / -1; }
.complaint-details dd small { display: block; margin-top: 4px; color: var(--muted); }
.preformatted { white-space: pre-wrap; }
.complaint-return, .complaint-response { margin: 0 20px 20px; padding: 15px 17px; border-radius: 10px; background: #f0f5f7; }
.complaint-response { background: #eaf8f1; }
.complaint-return h3, .complaint-response h3 { margin: 0 0 3px; font-size: 14px; }
.complaint-return small, .complaint-response small { color: var(--muted); }
.complaint-return p, .complaint-response p { margin: 10px 0 0; }
.complaint-photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 16px; }
.complaint-photos a { display: block; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: #f4f7f8; }
.complaint-photos img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.complaint-photo-section { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.complaint-action-panel { margin-top: 18px; }
.complaint-action-panel > .stack-form, .complaint-action-panel > .inline-form { padding: 0 20px 20px; }
.complaint-start-form { padding-top: 0 !important; margin-top: -6px; margin-bottom: 9px; }
.compact-info { margin: 0; align-self: end; }
.check-label { display: flex; align-items: center; gap: 8px; }
.check-label input { width: 19px; height: 19px; accent-color: var(--brand); }
.credentials-box small { display: block; margin-top: 7px; color: var(--muted); }

@media (max-width: 900px) {
    .complaint-detail-grid { grid-template-columns: 1fr; }
    .complaint-summary, .complaint-details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
    .complaint-card-head { flex-direction: column; gap: 8px; }
    .complaint-card-date { text-align: left; }
    .complaint-summary, .complaint-details { grid-template-columns: 1fr; }
    .complaint-summary .wide, .complaint-details .wide { grid-column: auto; }
    .complaint-card-foot .table-link { margin-left: 0; width: 100%; }
}
.update-assignment-choice { display: flex; align-items: center; gap: 8px; max-width: 420px; font-size: 12px; color: var(--muted); }
.update-assignment-choice input { width: 18px; height: 18px; accent-color: var(--brand); }
.status.returned { background: #fff0d8; color: #8a4b00; }
.calendar-month-grid { display: grid; grid-template-columns: repeat(7, minmax(150px, 1fr)); gap: 10px; align-items: stretch; overflow-x: auto; padding-bottom: 8px; }
.calendar-day { min-height: 130px; padding: 12px; margin: 0; }
.calendar-day > header { padding-bottom: 8px; margin-bottom: 8px; border-bottom: 1px solid var(--line); color: var(--brand); }
.calendar-day.weekend { background: #f5f7fa; }
.calendar-event { margin-top: 7px; padding: 7px 8px; border-radius: 7px; font-size: 11px; line-height: 1.3; }
.calendar-event strong, .calendar-event small { display: block; }
.calendar-event.absence { background: #fff0d8; color: #774300; }
.calendar-event.replacement { background: #e8f1ff; color: #164a88; }
.dashboard-grid.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }

@media (max-width: 1100px) {
    .comparison-grid { grid-template-columns: repeat(3, 1fr); }
    .annual-grid { grid-template-columns: 1fr; }
    .metric-grid.five { grid-template-columns: repeat(3, 1fr); }
    .metric-grid.six { grid-template-columns: repeat(3, 1fr); }
    .global-search { display: none; }
    .metric-grid { grid-template-columns: repeat(2, 1fr); }
    .pointage-summary { grid-template-columns: repeat(2, 1fr); }
    .pointage-contract-details { grid-template-columns: repeat(2, 1fr); }
    .finance-grid { grid-template-columns: repeat(2, 1fr); }
    .finance-overview-grid, .finance-ranking-grid { grid-template-columns: 1fr; }
    .finance-section-heading { align-items: stretch; flex-direction: column; }
    .finance-section-heading .inline-form, .finance-filter-form, .finance-filter-form.client-sort-form, .finance-filter-form.employee-sort-form { min-width: 0; width: 100%; }
    .finance-filter-form.client-sort-form, .finance-filter-form.employee-sort-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
    .app-shell { display: block; }
    .sidebar { position: fixed; width: 260px; transform: translateX(-105%); transition: transform .2s ease; box-shadow: 15px 0 40px rgba(0,0,0,.25); }
    .sidebar.open { transform: translateX(0); }
    .menu-button { display: block; }
    .topbar { padding: 0 18px; }
    .content-wrap { padding: 22px 16px; }
    .page-heading { flex-direction: column; }
    .dashboard-grid, .role-grid { grid-template-columns: 1fr; }
    .dashboard-grid.two-columns { grid-template-columns: 1fr; }
    .two-column-layout { grid-template-columns: 1fr; }
    .comparison-grid { grid-template-columns: repeat(2, 1fr); }
    .section-heading { align-items: stretch; flex-direction: column; }
    .search-grid { grid-template-columns: 1fr; }
    .compact-panel { align-items: stretch; flex-direction: column; }
    .compact-panel .heading-actions, .compact-panel form { width: 100%; }
    .form-grid.two { grid-template-columns: 1fr; }
    .request-details { grid-template-columns: 1fr 1fr; }
    .span-two { grid-column: auto; }
    .weekly-plan-grid { grid-template-columns: repeat(4, minmax(72px, 1fr)); }
    .planning-site-head, .add-planning-site { align-items: stretch; flex-direction: column; }
    .planning-site-name label { grid-template-columns: 1fr; }
    .planning-site-name small { margin-left: 0; }
}

@media (max-width: 560px) {
    .metric-grid, .finance-grid { grid-template-columns: 1fr; }
    .comparison-grid { grid-template-columns: 1fr; }
    .trend-bars > div { grid-template-columns: 30px 1fr 82px; }
    .trend-bars small { display: none; }
    .metric-card { min-height: 120px; }
    .auth-shell { padding: 16px; }
    .auth-card { padding: 24px; }
    .pointage-summary { grid-template-columns: 1fr; }
    .pointage-contract-details { grid-template-columns: 1fr; }
    .filter-bar, .inline-form, .sticky-actions { flex-direction: column; align-items: stretch; }
    .finance-filter-form { grid-template-columns: 1fr; }
    .finance-subnav { position: static; width: 100%; justify-content: space-between; }
    .section-tabs { width: 100%; overflow-x: auto; }
    .section-tabs a { white-space: nowrap; }
    .request-card-head { flex-direction: column; }
    .request-details { grid-template-columns: 1fr; }
    .global-month label { display: none; }
    .local-status { display: none; }
    .metric-grid.five { grid-template-columns: 1fr; }
    .metric-grid.six { grid-template-columns: 1fr; }
    .weekly-plan-grid { grid-template-columns: repeat(2, minmax(72px, 1fr)); }
}

@media print {
    @page { size: A4 landscape; margin: 6mm; }
    .print-page { background: white; padding: 0; }
    .print-toolbar { display: none; }
    .print-sheet { width: 100%; max-width: none; min-height: 0; margin: 0; padding: 0; box-shadow: none; break-after: page; page-break-after: always; }
    .print-sheet:last-child { break-after: auto; page-break-after: auto; }
    .print-pointage-table { font-size: 5.5px; }
    .print-pointage-table th, .print-pointage-table td { height: 14px; padding: 1px; }
    .print-pointage-table .print-client { width: 105px; }
}

/* V10 calendar distinctions */
.calendar-legend { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 18px; font-size: 12px; }
.calendar-legend .legend { border-radius: 999px; padding: 5px 9px; border: 1px solid var(--line); background: #fff; }
.calendar-event.absence-open, .calendar-legend .absence-open { background: #fff0d8; color: #774300; }
.calendar-event.absence-replaced, .calendar-legend .absence-replaced { background: #e7f8ef; color: #17613a; }
.calendar-event.absence-pending, .calendar-legend .absence-pending { background: #f4edf9; color: #5e2f7e; }
.calendar-event.appointment, .calendar-legend .appointment { background: #eef6ff; color: #174c78; }
.dashboard-followup-grid { margin-top: 14px; }

.calendar-day.outside-month { opacity: .55; }
.calendar-day.outside-month > header { color: var(--muted); }
