:root {
  color-scheme: light;
  --ink: #14201d;
  --ink-soft: #5e6b67;
  --forest: #123c35;
  --forest-2: #1c5c50;
  --mint: #dcece5;
  --cream: #f5f3ed;
  --paper: #fffefb;
  --line: #dddcd5;
  --line-strong: #c9cbc4;
  --green: #238263;
  --green-bg: #e3f3ea;
  --red: #b33e3f;
  --red-bg: #fae8e6;
  --amber: #9a681f;
  --amber-bg: #fbf0d6;
  --grey-bg: #e7e9e7;
  --blue: #315f89;
  --blue-bg: #e7f1fa;
  --blue-line: #8bb2d3;
  --shadow: 0 18px 48px rgba(22, 38, 34, .09);
  --radius: 20px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; background: var(--cream); }
body { margin: 0; min-width: 0; overflow-x: hidden; color: var(--ink); background: var(--cream); }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

.eyebrow {
  margin: 0 0 7px;
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
}

.auth-shell {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 28px 18px;
  background:
    radial-gradient(circle at 12% 8%, rgba(76, 143, 121, .24), transparent 33%),
    radial-gradient(circle at 88% 88%, rgba(210, 177, 117, .17), transparent 35%),
    var(--forest);
}

.auth-card {
  width: min(100%, 440px);
  padding: 42px;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 28px;
  background: rgba(255, 254, 251, .98);
  box-shadow: 0 32px 90px rgba(4, 19, 16, .34);
}

.brand-lock {
  width: 54px;
  height: 54px;
  margin-bottom: 28px;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  padding: 12px;
  border-radius: 17px;
  background: var(--forest);
}
.brand-lock span { width: 8px; border-radius: 7px 7px 2px 2px; background: #f3d89f; }
.brand-lock span:nth-child(1) { height: 19px; }
.brand-lock span:nth-child(2) { height: 29px; }
.brand-lock span:nth-child(3) { height: 24px; }
.auth-card h1 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(36px, 8vw, 50px); font-weight: 500; line-height: 1.02; letter-spacing: -.035em; }
.auth-period { margin: 10px 0 24px; color: var(--forest-2); font-weight: 750; }
.auth-copy { margin: 0 0 26px; color: var(--ink-soft); font-size: 15px; line-height: 1.55; }
.auth-card form label { display: block; margin: 0 0 8px; font-size: 13px; font-weight: 750; }
.auth-card input {
  width: 100%;
  height: 58px;
  padding: 0 17px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  outline: none;
  background: #fff;
  color: var(--ink);
  font-size: 20px;
  letter-spacing: .08em;
  transition: border-color .18s, box-shadow .18s;
}
.auth-card input:focus { border-color: var(--forest-2); box-shadow: 0 0 0 4px rgba(28, 92, 80, .12); }
.auth-footnote { margin: 24px 0 0; color: #78827e; font-size: 12px; text-align: center; }
.form-error { min-height: 19px; margin: 8px 0; color: var(--red); font-size: 13px; font-weight: 650; }

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 17px;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  font-size: 14px;
  font-weight: 760;
  transition: transform .15s, background .15s, opacity .15s, border-color .15s;
}
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button:disabled { cursor: wait; opacity: .55; }
.button-primary { background: var(--forest); color: #fff; }
.button-primary:hover { background: #0c2f29; }
.button-secondary { border-color: var(--line-strong); background: var(--paper); color: var(--ink); }
.button-secondary:hover { border-color: var(--forest-2); }
.button-dark { background: #172522; color: #fff; }
.button-large { width: 100%; min-height: 54px; justify-content: space-between; padding-inline: 20px; }

.avatar { width: 46px; height: 46px; display: inline-grid; place-items: center; flex: 0 0 auto; border-radius: 15px; color: #fff; font-weight: 850; }
.avatar-pape { background: #315f89; }
.avatar-doudou { background: #a55b42; }

.app-shell { min-height: 100dvh; padding-bottom: calc(40px + var(--safe-bottom)); }
.app-header, .progress-panel, .company-tabs, .toolbar-wrap, .employees-main, .app-footer, .complete-banner { width: min(100% - 40px, 1440px); margin-inline: auto; }
.app-header { min-height: 116px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.header-brand { display: flex; align-items: center; gap: 15px; }
.brand-monogram { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 16px; background: var(--forest); color: #f4dda9; font-family: Georgia, serif; font-size: 15px; font-weight: 800; letter-spacing: .05em; }
.header-brand h1 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 28px; font-weight: 500; letter-spacing: -.02em; }
.actor-pill { min-height: 58px; display: flex; align-items: center; gap: 10px; padding: 7px 11px 7px 7px; border: 1px solid var(--line); border-radius: 17px; background: rgba(255, 254, 251, .8); cursor: pointer; text-align: left; }
.actor-pill:hover { border-color: var(--line-strong); background: #fff; }
.avatar-small { width: 42px; height: 42px; border-radius: 13px; background: var(--blue); }
.actor-pill small, .actor-pill strong { display: block; }
.actor-pill small { color: var(--ink-soft); font-size: 10px; }
.actor-pill strong { margin-top: 2px; font-size: 14px; }
.lock-icon { margin-left: 4px; color: #78827e; font-size: 18px; }

.progress-panel { padding: 22px 24px 20px; border-radius: 20px; background: var(--forest); color: #fff; box-shadow: var(--shadow); }
.progress-copy { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.progress-kicker { margin: 0 0 5px; color: #b9d5ca; font-size: 11px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.progress-number { margin: 0; font-size: 14px; }
.progress-number strong { color: #f4d99f; font-family: Georgia, serif; font-size: 27px; font-weight: 500; }
.progress-panel .button-secondary { border-color: rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .08); color: #fff; }
.progress-panel .button-secondary:hover { background: rgba(255, 255, 255, .14); }
.progress-track { height: 7px; margin-top: 17px; overflow: hidden; border-radius: 99px; background: rgba(255, 255, 255, .15); }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: #f1d28d; transition: width .35s ease; }

.complete-banner { margin-top: 18px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 17px 20px; border: 1px solid #add2bd; border-radius: 18px; background: #ddf0e5; }
.complete-check { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--green); color: white; font-weight: 900; }
.complete-banner strong, .complete-banner span { display: block; }
.complete-banner div > span { margin-top: 3px; color: #416359; font-size: 13px; }

.toolbar-wrap { margin-top: 8px; }
.company-tabs { position: sticky; top: 0; z-index: 20; display: flex; gap: 7px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; margin-top: 22px; padding: 8px 0; border-radius: 0 0 12px 12px; background: rgba(245, 243, 237, .96); backdrop-filter: blur(10px); scrollbar-width: none; }
.company-tabs::-webkit-scrollbar { display: none; }
.company-tab { flex: 0 0 auto; min-height: 44px; scroll-snap-align: start; padding: 9px 14px; border: 1px solid var(--line); border-radius: 99px; background: rgba(255, 254, 251, .7); cursor: pointer; color: var(--ink-soft); font-size: 13px; font-weight: 740; }
.company-tab span { display: inline-grid; min-width: 22px; height: 22px; margin-left: 6px; place-items: center; padding-inline: 5px; border-radius: 99px; background: #e6e7e2; color: var(--ink); font-size: 11px; }
.company-tab.is-active { border-color: var(--forest); background: var(--forest); color: #fff; }
.company-tab.is-active span { background: rgba(255, 255, 255, .16); color: #fff; }
.toolbar-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 8px; }
.search-box { flex: 1; max-width: 520px; min-height: 48px; display: flex; align-items: center; gap: 10px; padding: 0 15px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.search-box span { color: var(--ink-soft); font-size: 21px; }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 16px; }
.search-box:focus-within { border-color: var(--forest-2); box-shadow: 0 0 0 3px rgba(28, 92, 80, .11); }
.toolbar-filters { display: flex; align-items: center; gap: 10px; }
.exited-toggle { min-height: 44px; display: inline-flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink-soft); cursor: pointer; font-size: 12px; font-weight: 650; white-space: nowrap; }
.exited-toggle input { width: 17px; height: 17px; margin: 0; accent-color: var(--forest-2); cursor: pointer; }
.exited-toggle b { min-width: 24px; padding: 2px 7px; border-radius: 99px; background: #edf0ed; color: #4f5e59; font-size: 11px; text-align: center; font-variant-numeric: tabular-nums; }
.exited-toggle:has(input:checked) { border-color: var(--forest-2); color: var(--ink); }
.exited-toggle:has(input:focus-visible) { border-color: var(--forest-2); box-shadow: 0 0 0 3px rgba(28, 92, 80, .11); }
.view-filter { display: flex; align-items: center; gap: 9px; color: var(--ink-soft); font-size: 12px; }
.view-filter select { min-height: 44px; padding: 0 34px 0 12px; border: 1px solid var(--line); border-radius: 12px; outline: 0; background: var(--paper); color: var(--ink); font-size: 16px; font-weight: 650; }
.view-filter select:focus-visible { border-color: var(--forest-2); box-shadow: 0 0 0 3px rgba(28, 92, 80, .11); }
.review-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 12px; color: var(--ink-soft); font-size: 11px; }
.review-legend span { display: inline-flex; align-items: center; gap: 7px; }
.review-legend i { width: 12px; height: 12px; border: 1px solid; border-radius: 4px; }
.legend-correction { border-color: var(--blue-line) !important; background: var(--blue-bg); }
.legend-uncertainty { border-color: #d9ad51 !important; background: #fff1b9; }

.employees-main { min-height: 400px; margin-top: 24px; }
.company-section { margin-bottom: 42px; scroll-margin-top: 20px; }
.company-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 15px; padding: 0 2px; }
.company-heading h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 27px; font-weight: 500; }
.company-heading p { margin: 4px 0 0; color: var(--ink-soft); font-size: 12px; }
.company-score { color: var(--forest-2); font-size: 12px; font-weight: 800; }
.employee-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }

.employee-card { position: relative; overflow: hidden; scroll-margin-top: 78px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: 0 7px 24px rgba(23, 37, 33, .045); transition: border-color .18s, background .18s, transform .18s; }
.employee-card:hover { border-color: var(--line-strong); }
.employee-card.status-new:not(.is-complete) { border-color: #9dcdb6; background: #f5fcf7; box-shadow: 0 0 0 2px rgba(35, 130, 99, .07); }
.employee-card.status-transfer:not(.is-complete) { border-color: #c9cfcb; background: #f4f5f4; }
.employee-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: transparent; }
.employee-card.status-new::before { background: var(--green); }
.employee-card.status-planned::before { background: var(--red); }
.employee-card.status-transfer::before { background: #8b918e; }
.employee-card.status-check::before { background: #d09b3d; }
.employee-card.status-exited::before { background: #8b918e; }
.employee-card.is-complete { background: #eceeeb; border-color: #d6d9d5; box-shadow: none; }
.employee-card.is-locked { background: #e4e6e4; box-shadow: none; }
.employee-card.has-correction { border-color: var(--blue-line); box-shadow: 0 0 0 2px rgba(49, 95, 137, .08); }
.card-head { padding: 17px 18px 12px 20px; }
.card-topline { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 11px; }
.status-badge { display: inline-flex; align-items: center; min-height: 25px; padding: 3px 9px; border-radius: 99px; background: #edf0ed; color: #4f5e59; font-size: 10px; font-weight: 850; letter-spacing: .035em; text-transform: uppercase; }
.status-new .status-badge { background: var(--green-bg); color: var(--green); }
.status-planned .status-badge { background: var(--red-bg); color: var(--red); }
.status-transfer .status-badge { background: #dfe2df; color: #525b56; }
.status-check .status-badge { background: var(--amber-bg); color: var(--amber); }
.status-exited .status-badge { background: #d2d5d2; color: #626966; }
.card-number { color: #8a928f; font-size: 10px; font-variant-numeric: tabular-nums; }
.correction-badge { padding: 4px 8px; border: 1px solid var(--blue-line); border-radius: 99px; background: var(--blue-bg); color: #244f75; font-size: 9px; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.employee-name { margin: 0; font-size: 16px; font-weight: 820; line-height: 1.25; letter-spacing: -.01em; }
.status-exited .employee-name { color: #69706d; text-decoration: line-through; }
.cross-company { display: grid; gap: 7px; margin: 0 18px 11px 20px; padding: 9px 10px; border: 1px solid #b9cbd6; border-radius: 11px; background: #edf5f9; }
.cross-company-title { color: #28536e; font-size: 10px; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.cross-company-links { display: flex; flex-wrap: wrap; gap: 5px; }
.cross-company-link { min-height: 38px; display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border: 1px solid #cadce6; border-radius: 9px; background: #fff; color: #244d68; cursor: pointer; font-size: 11px; }
.cross-company-link:hover, .cross-company-link:focus-visible { border-color: #5486a1; outline: none; }
.cross-company-link strong { font-weight: 850; }
.cross-company-link span { white-space: nowrap; }
.cross-company-link small { color: #6b7880; font-size: 10px; }
.employee-meta { margin: 5px 0 0; color: var(--ink-soft); font-size: 11px; line-height: 1.35; }
.first-validation { display: grid; grid-template-columns: 1fr auto; gap: 3px 10px; margin: 0 18px 14px 20px; padding: 10px 11px; border: 1px solid #d7d9d6; border-radius: 11px; background: #e5e7e5; color: #56605c; }
.first-validation > span { font-size: 9px; font-weight: 850; letter-spacing: .045em; text-transform: uppercase; }
.first-validation > strong { grid-row: 1 / span 2; grid-column: 2; align-self: center; color: #3f4945; font-size: 16px; font-variant-numeric: tabular-nums; }
.first-validation > small { font-size: 10px; line-height: 1.35; }
.first-validation > em { grid-column: 1 / -1; margin-top: 4px; color: #8a5b18; font-size: 10px; font-style: normal; font-weight: 750; }
.first-validation.needs-review { border-color: #d8b66b; background: #f4eddb; }
.first-validation.needs-review > strong { max-width: 145px; color: #79571c; font-size: 12px; text-align: right; }
.first-validation.is-unavailable { color: #7b8481; }
.hour-reference { display: grid; grid-template-columns: 1fr 1fr; margin: 0 18px 14px 20px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .55); }
.reference-item { min-height: 57px; padding: 10px 12px; }
.reference-item + .reference-item { border-left: 1px solid var(--line); }
.reference-item span, .reference-item strong { display: block; }
.reference-item span { margin-bottom: 4px; color: var(--ink-soft); font-size: 9px; font-weight: 750; letter-spacing: .035em; text-transform: uppercase; }
.reference-item strong { font-size: 16px; font-variant-numeric: tabular-nums; }
.reference-item strong.missing { color: #9ca4a1; font-weight: 550; }
.business-note { margin: 0 18px 14px 20px; padding: 10px 12px; border-radius: 11px; background: #f3f1e9; color: #665d4b; font-size: 12px; line-height: 1.45; }
.status-planned .business-note { background: var(--red-bg); color: #843334; }
.status-transfer .business-note { background: #e8ebe8; color: #49534d; }
.status-check .business-note { background: var(--amber-bg); color: #73501b; }
.status-new .business-note { background: var(--green-bg); color: #25654f; }

.entry-form { padding: 0 18px 18px 20px; }
.entry-fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.field label { display: block; margin: 0 0 6px; color: var(--ink-soft); font-size: 11px; font-weight: 800; letter-spacing: .025em; text-transform: uppercase; }
.input-wrap { position: relative; }
.input-wrap input { width: 100%; height: 47px; padding: 0 25px 0 10px; border: 1px solid var(--line-strong); border-radius: 11px; outline: 0; background: #fff; color: var(--ink); font-size: 16px; font-weight: 720; font-variant-numeric: tabular-nums; }
.input-wrap span { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); color: #78827e; font-size: 11px; }
.input-wrap input:focus, .comment-field textarea:focus { border-color: var(--forest-2); box-shadow: 0 0 0 3px rgba(28, 92, 80, .11); }
.field.is-corrected .input-wrap input, .comment-field.is-corrected textarea { border-color: var(--blue-line); background: var(--blue-bg); box-shadow: inset 3px 0 #4d7fa8; }
.comment-field { margin-top: 10px; }
.comment-field label { display: flex; align-items: center; justify-content: space-between; }
.comment-field label span { color: #979d9a; font-weight: 500; text-transform: none; letter-spacing: 0; }
.comment-field textarea { width: 100%; min-height: 72px; resize: vertical; padding: 11px 12px; border: 1px solid var(--line-strong); border-radius: 11px; outline: 0; background: #fff; color: var(--ink); font-size: 16px; line-height: 1.4; }
.comment-field.needs-clarification textarea { border-color: #d1a13d; background: #fff1b9; box-shadow: inset 3px 0 #c48a16; }
.clarification-label { margin: 6px 0 0; color: #7d5415; font-size: 10px; font-weight: 800; }
.import-note { display: flex; align-items: center; gap: 7px; margin: 9px 0 0; color: #805f25; font-size: 10px; font-weight: 700; }
.import-note::before { content: ""; width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: #d7a851; }
.form-actions { display: flex; justify-content: space-between; align-items: center; gap: 9px; margin-top: 12px; }
.history-button { min-height: 44px; padding: 6px 4px; border: 0; background: transparent; color: var(--ink-soft); cursor: pointer; font-size: 11px; text-decoration: underline; text-underline-offset: 3px; }
.save-button { min-width: 128px; }
.field-error { min-height: 15px; margin: 7px 0 0; color: var(--red); font-size: 10px; font-weight: 650; }
.field-warning { margin: 4px 0 0; padding: 9px 11px; border: 1px solid #e2c58a; border-radius: 10px; background: var(--amber-bg); color: #73501b; font-size: 11px; font-weight: 650; line-height: 1.4; }
.field-warning:empty { display: none; }

.completed-body { padding: 0 18px 18px 20px; }
.saved-values { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.saved-value { padding: 6px 9px; border: 1px solid #d5d8d4; border-radius: 9px; background: rgba(255, 255, 255, .58); font-size: 11px; font-weight: 750; }
.saved-value strong { color: var(--forest-2); }
.saved-value.is-corrected { border-color: var(--blue-line); background: var(--blue-bg); color: #244f75; box-shadow: inset 3px 0 #4d7fa8; }
.saved-comment { margin: 0 0 10px; padding: 9px 10px; border-radius: 9px; background: rgba(255, 255, 255, .55); color: #53615d; font-size: 11px; line-height: 1.4; }
.saved-comment.is-corrected { border: 1px solid var(--blue-line); background: var(--blue-bg); color: #244f75; box-shadow: inset 3px 0 #4d7fa8; }
.saved-comment.needs-clarification { border: 1px solid #d1a13d; background: #fff1b9; color: #63420f; box-shadow: inset 3px 0 #c48a16; }
.saved-comment.needs-clarification span { display: block; margin-top: 6px; font-size: 9px; font-weight: 850; letter-spacing: .03em; text-transform: uppercase; }
.correction-note { margin: -2px 0 10px; color: #28577e; font-size: 10px; font-weight: 800; }
.saved-meta { display: flex; align-items: center; gap: 7px; margin-bottom: 12px; color: #66716d; font-size: 10px; }
.saved-meta::before { content: "✓"; width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; background: #90a39b; color: #fff; font-size: 10px; }
.completed-actions { display: flex; gap: 8px; }
.completed-actions .button { flex: 1; min-height: 44px; }
.locked-message { padding: 0 18px 18px 20px; color: #69716e; font-size: 13px; line-height: 1.5; }
.locked-message strong { display: block; margin-bottom: 3px; color: #4e5754; font-size: 12px; }

.empty-state, .loading-state { min-height: 280px; display: grid; place-items: center; align-content: center; gap: 12px; color: var(--ink-soft); text-align: center; }
.loading-state span { width: 34px; height: 34px; border: 3px solid #d3d7d3; border-top-color: var(--forest-2); border-radius: 50%; animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.app-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 30px; padding-top: 23px; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 11px; }
.text-button { min-height: 44px; border: 0; background: transparent; color: var(--forest-2); cursor: pointer; font-size: 12px; font-weight: 760; text-decoration: underline; text-underline-offset: 4px; }

dialog { width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; }
dialog::backdrop { background: rgba(8, 22, 18, .62); backdrop-filter: blur(4px); }
.dialog-shell { width: min(920px, calc(100% - 32px)); max-height: calc(100dvh - 32px); margin: 16px auto; overflow: auto; border-radius: 24px; background: var(--paper); box-shadow: 0 36px 100px rgba(5, 20, 16, .35); }
.dialog-shell-small { width: min(640px, calc(100% - 32px)); }
.dialog-header { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 25px 28px 19px; border-bottom: 1px solid var(--line); background: rgba(255, 254, 251, .96); backdrop-filter: blur(10px); }
.dialog-header h2 { margin: 0; font-family: Georgia, serif; font-size: 29px; font-weight: 500; }
.dialog-close { width: 45px; height: 45px; border: 1px solid var(--line); border-radius: 50%; background: #fff; cursor: pointer; font-size: 25px; line-height: 1; }
.dialog-content { padding: 24px 28px 30px; }
.dialog-footer { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 10px; padding: 16px 28px calc(16px + var(--safe-bottom)); border-top: 1px solid var(--line); background: rgba(255, 254, 251, .96); backdrop-filter: blur(10px); }
.summary-hero { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 20px; padding: 20px; border-radius: 18px; background: var(--forest); color: #fff; }
.summary-ring { position: relative; width: 92px; height: 92px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(#f1d28d var(--progress), rgba(255,255,255,.14) 0); }
.summary-ring::before { content: ""; position: absolute; width: 69px; height: 69px; border-radius: 50%; background: var(--forest); }
.summary-ring strong { z-index: 1; font-family: Georgia, serif; font-size: 22px; font-weight: 500; }
.summary-hero h3 { margin: 0 0 6px; font-size: 21px; }
.summary-hero p { margin: 0; color: #c8ddd5; font-size: 12px; line-height: 1.45; }
.summary-company-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; margin-top: 17px; }
.summary-company { padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.summary-company strong, .summary-company span { display: block; }
.summary-company strong { margin-bottom: 9px; font-size: 13px; }
.summary-company span { color: var(--ink-soft); font-size: 11px; }
.summary-company b { color: var(--forest-2); font-size: 18px; }
.summary-section { margin-top: 25px; }
.summary-section h3 { margin: 0 0 11px; font-size: 15px; }
.remaining-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin: 0; padding: 0; list-style: none; }
.remaining-list li { padding: 9px 11px; border-radius: 10px; background: #f1f0eb; font-size: 11px; }
.remaining-list strong { display: block; margin-bottom: 2px; }
.remaining-list span { color: var(--ink-soft); }
.history-list { margin: 0; padding: 0; list-style: none; }
.history-item { position: relative; display: grid; grid-template-columns: auto 1fr auto; gap: 11px; padding: 10px 0; border-bottom: 1px solid #ebeae5; }
.history-dot { width: 9px; height: 9px; margin-top: 5px; border-radius: 50%; background: var(--green); }
.history-item strong, .history-item span { display: block; }
.history-item strong { font-size: 12px; }
.history-item span { margin-top: 3px; color: var(--ink-soft); font-size: 10px; }
.history-item time { color: #77807d; font-size: 10px; white-space: nowrap; }
.history-empty { padding: 24px; border-radius: 13px; background: #f1f0eb; color: var(--ink-soft); text-align: center; font-size: 12px; }
.history-review { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin-bottom: 18px; padding: 14px; border: 1px solid #d4d7d4; border-radius: 13px; background: #e7e9e7; color: #55615d; }
.history-review span { font-size: 10px; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.history-review strong { grid-row: 1 / span 2; grid-column: 2; color: #37433f; font-size: 19px; }
.history-review small { font-size: 10px; }
.history-review em { grid-column: 1 / -1; margin-top: 5px; padding: 6px 8px; border: 1px solid var(--blue-line); border-radius: 8px; background: var(--blue-bg); color: #28577e; font-size: 10px; font-style: normal; font-weight: 800; }

.toast-region { position: fixed; z-index: 100; right: 18px; bottom: calc(18px + var(--safe-bottom)); display: grid; gap: 8px; width: min(360px, calc(100% - 36px)); pointer-events: none; }
.toast { padding: 13px 15px; border-radius: 13px; background: #172522; color: #fff; box-shadow: var(--shadow); font-size: 12px; line-height: 1.4; animation: toast-in .2s ease; }
.toast.is-error { background: #8a3032; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 1080px) {
  .employee-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary-company-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px) {
  .auth-shell { padding: 0; place-items: stretch; background: var(--paper); }
  .auth-card { width: 100%; min-height: 100dvh; padding: 42px 24px calc(32px + var(--safe-bottom)); border: 0; border-radius: 0; box-shadow: none; }
  .brand-lock { margin-top: 5vh; }
  .app-header, .progress-panel, .company-tabs, .toolbar-wrap, .employees-main, .app-footer, .complete-banner { width: min(100% - 24px, 1440px); }
  .app-header { min-height: 92px; }
  .brand-monogram { width: 45px; height: 45px; border-radius: 14px; font-size: 13px; }
  .header-brand h1 { font-size: 21px; }
  .header-brand .eyebrow { font-size: 9px; }
  .actor-pill { min-height: 48px; border: 0; background: transparent; padding: 3px; }
  .actor-pill > span:nth-child(2), .lock-icon { display: none; }
  .avatar-small { width: 41px; height: 41px; }
  .progress-panel { padding: 18px; border-radius: 17px; }
  .progress-panel .button { min-height: 44px; padding: 8px 11px; font-size: 11px; }
  .progress-number { font-size: 11px; }
  .progress-number strong { font-size: 23px; }
  .complete-banner { grid-template-columns: auto 1fr; }
  .complete-banner .button { grid-column: 1 / -1; width: 100%; }
  .company-tabs { margin-top: 16px; }
  .toolbar-row { align-items: stretch; flex-direction: column; gap: 8px; }
  .review-legend { display: grid; gap: 7px; }
  .search-box { max-width: none; }
  .toolbar-filters { flex-direction: column; align-items: stretch; gap: 8px; }
  .exited-toggle { justify-content: flex-start; }
  .exited-toggle b { margin-left: auto; }
  .view-filter { justify-content: space-between; }
  .view-filter select { flex: 1; }
  .employees-main { margin-top: 24px; }
  .employee-grid { grid-template-columns: 1fr; gap: 11px; }
  .company-section { margin-bottom: 32px; }
  .company-heading h2 { font-size: 24px; }
  .employee-card { border-radius: 17px; }
  .first-validation { grid-template-columns: 1fr; }
  .first-validation > strong { grid-row: auto; grid-column: auto; justify-self: start; }
  .first-validation.needs-review > strong { max-width: none; text-align: left; }
  .entry-fields { gap: 6px; }
  .input-wrap input { height: 49px; }
  .app-footer { align-items: flex-start; flex-direction: column; }
  .dialog-shell, .dialog-shell-small { width: 100%; max-height: 100dvh; min-height: 100dvh; margin: 0; border-radius: 0; }
  .dialog-header { padding: 20px 18px 15px; }
  .dialog-content { padding: 18px; }
  .dialog-footer { display: grid; grid-template-columns: 1fr 1fr; padding: 12px 14px calc(12px + var(--safe-bottom)); }
  .summary-hero { grid-template-columns: 1fr; }
  .summary-ring { width: 82px; height: 82px; }
  .summary-company-grid { grid-template-columns: repeat(2, 1fr); }
  .remaining-list { grid-template-columns: 1fr; }
  .history-item { grid-template-columns: auto 1fr; }
  .history-item time { grid-column: 2; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* La revue partage l’identité visuelle et les filtres de la saisie. */
.workflow-panel, .review-overview { width: min(100% - 40px, 1440px); margin: 0 auto 20px; }
.workflow-panel { overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--paper); box-shadow: 0 6px 20px rgba(23, 37, 33, .035); }
.workflow-topline { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 22px; border-bottom: 1px solid var(--line); background: #eeeee7; }
.stage-nav { display: flex; align-items: center; gap: 8px; }
.stage-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; padding: 6px 13px 6px 6px; border: 1px solid transparent; border-radius: 12px; background: transparent; color: #64706a; cursor: pointer; font-size: 12px; font-weight: 750; }
.stage-number { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; background: #dfe3dc; color: #55655c; font-size: 11px; }
.stage-button.is-active { border-color: #ccd7cb; background: #fffefb; color: var(--forest); box-shadow: 0 2px 4px rgba(20, 40, 30, .035); }
.stage-button.is-active .stage-number { background: var(--forest); color: #f4dda9; }
.stage-link { color: #8a968d; font-size: 16px; }
.workflow-status { display: flex; align-items: center; gap: 7px; color: #3f6653; font-size: 11px; font-weight: 750; white-space: nowrap; }
.workflow-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #468563; box-shadow: 0 0 0 4px #dfebdd; }
.workflow-status.is-locked { color: #6d572e; }
.workflow-status.is-locked::before { background: #9a7738; box-shadow: 0 0 0 4px #f0e7d2; }
.workflow-body { display: flex; align-items: center; justify-content: space-between; gap: 26px; padding: 23px 25px; }
.workflow-body > div { min-width: 0; }
.workflow-body h2 { margin: 0; color: var(--forest); font-family: Georgia, serif; font-size: 23px; font-weight: 500; letter-spacing: -.02em; }
.workflow-body p { max-width: 780px; margin: 7px 0 0; color: var(--ink-soft); font-size: 12px; line-height: 1.5; }
.workflow-body .workflow-meta { color: #7c7665; font-size: 10px; overflow-wrap: anywhere; }
.workflow-body .button { flex: 0 0 auto; }
.is-review-mode .workflow-topline { background: #e8eee6; }
.draft-notice { margin: 0; padding: 12px 25px; border-top: 1px solid #e7d9b6; background: #faf1da; color: #71561f; font-size: 12px; line-height: 1.5; }
.entry-lock-label { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; color: #687368; font-size: 10px; font-weight: 750; }
.entry-lock-label::before { content: ""; width: 8px; height: 8px; border: 2px solid #879582; border-radius: 2px; box-shadow: 0 -4px 0 -1px #879582; margin-top: 3px; }
.completed-actions .entry-lock-label { margin-left: auto; padding: 0 9px; }
.frozen-entry { padding: 0 18px 18px 20px; }
.frozen-entry > .entry-lock-label { margin-bottom: 8px; }
.frozen-note { margin: 6px 0; color: #7b6b4f; font-size: 11px; line-height: 1.45; }
.review-overview { margin-top: 25px; margin-bottom: 0; }
.review-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.review-heading h2 { margin: 0; font-family: Georgia, serif; font-size: 30px; font-weight: 500; letter-spacing: -.025em; }
.review-heading > p { margin: 0 0 4px; color: var(--ink-soft); font-size: 11px; text-align: right; }
.review-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.review-metric { position: relative; display: grid; gap: 8px; padding: 17px 20px; border: 1px solid #d7dbd1; border-radius: 17px; background: #fffefb; color: var(--ink); cursor: pointer; text-align: left; transition: border-color .18s, transform .18s; }
.review-metric:hover { transform: translateY(-2px); border-color: #9daa97; }
.review-metric.is-selected { border-color: var(--forest); box-shadow: inset 0 0 0 1px var(--forest); }
.review-metric > span { font-size: 11px; font-weight: 750; }
.review-metric > strong { font-family: Georgia, serif; font-size: 36px; font-weight: 500; line-height: 1; font-variant-numeric: tabular-nums; }
.review-metric > small { color: var(--ink-soft); font-size: 10px; }
.review-metric.is-pending { background: #fcf4df; border-color: #e5d3a5; }
.review-metric.is-approved { background: #e8f0e4; border-color: #c3d4ba; }
.review-metric.is-approved > strong { color: #386a43; }
.review-metric.is-rejected { background: #f8e9e5; border-color: #e4c7bf; }
.review-metric.is-rejected > strong { color: #9a4c3c; }
.review-context { margin: 13px 0 0; color: #6b756b; font-size: 11px; line-height: 1.5; }
.payslip-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; align-items: start; }
.payslip-card { min-width: 0; overflow: hidden; padding: 20px; border: 1px solid #d9dcd3; border-radius: 19px; background: var(--paper); box-shadow: 0 4px 18px rgba(23, 37, 33, .035); }
.payslip-card.review-status-approved { border-color: #b7cfad; }
.payslip-card.review-status-rejected { border-color: #ddbbb0; }
.payslip-card.review-status-stale { border-color: #d9ba76; }
.payslip-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 15px; }
.review-status-badge { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 5px 9px; border-radius: 7px; background: #eceee7; color: #606c58; font-size: 10px; font-weight: 750; }
.review-status-pending .review-status-badge { background: #f5e9c8; color: #7c6028; }
.review-status-approved .review-status-badge { background: #e1eedb; color: #386743; }
.review-status-rejected .review-status-badge { background: #f5dfd8; color: #964334; }
.review-status-stale .review-status-badge { background: #f6e8c7; color: #795b1f; }
.payslip-company { color: #717b6b; font-size: 10px; font-weight: 800; letter-spacing: .04em; }
.payslip-card h3 { margin: 0; font-size: 16px; font-weight: 800; line-height: 1.3; overflow-wrap: anywhere; }
.payslip-period { margin: 5px 0 16px; color: var(--ink-soft); font-size: 11px; }
.payslip-evp { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; padding: 10px 12px; border: 1px solid #e0e2d9; border-radius: 9px; background: #f1f2eb; }
.payslip-evp > span { color: #707b69; font-size: 9px; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; }
.payslip-evp > strong { margin-left: auto; font-size: 11px; font-variant-numeric: tabular-nums; }
.payslip-evp > small { flex-basis: 100%; color: #927239; font-size: 10px; }
.document-block { display: flex; align-items: center; gap: 11px; padding: 17px 0 12px; }
.document-icon { width: 36px; height: 43px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid #c4cdbc; border-radius: 5px 10px 5px 5px; background: #edf1e9; color: #617052; font-size: 9px; font-weight: 850; }
.document-block > div { min-width: 0; }
.document-block strong { display: block; color: #35472f; font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; }
.document-block div > span { display: block; margin-top: 4px; color: #7b8375; font-size: 10px; }
.document-details { margin: 0 0 14px; color: var(--ink-soft); font-size: 10px; }
.document-details summary { min-height: 36px; padding: 9px 0; cursor: pointer; }
.document-details p { margin: 4px 0 12px; line-height: 1.5; }
.document-details > span { display: block; margin-bottom: 5px; font-size: 9px; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; }
.document-details code { display: block; padding: 8px; border-radius: 6px; background: #edf0e7; font-size: 10px; overflow-wrap: anywhere; }
.document-stale { margin: 2px 0 8px; padding: 10px 11px; border-radius: 8px; background: #faf0d8; color: #795a1f; font-size: 11px; line-height: 1.5; }
.approval-blocked { margin: 13px 0 0; color: #856931; font-size: 11px; line-height: 1.5; }
.decision-proof { margin: 0 0 12px; padding: 11px 12px; border-left: 2px solid #b8c8ad; background: #f0f3eb; color: #4b5f43; }
.review-status-rejected .decision-proof { border-color: #ce9c8f; background: #fcf0eb; color: #834736; }
.decision-proof strong, .decision-proof > span { display: block; font-size: 10px; line-height: 1.5; }
.decision-proof > span { margin-top: 2px; font-size: 9px; opacity: .8; }
.decision-proof p { margin: 8px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; line-height: 1.5; }
.review-card-foot { margin-top: 12px; padding-top: 7px; border-top: 1px solid #e7e8df; }
.review-card-foot .history-button { min-height: 36px; color: #73806b; }
.history-item .history-document-version { margin-top: 7px; color: #5c7252; font-size: 10px; font-weight: 750; overflow-wrap: anywhere; }
.history-comment { margin: 8px 0 0; padding: 9px 11px; border-left: 2px solid #cad5bd; border-radius: 0 7px 7px 0; background: #f0f3e9; color: #506448; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; line-height: 1.5; }
.entry-form input:disabled, .entry-form textarea:disabled { opacity: .65; cursor: wait; }
.document-actions { display: flex; align-items: center; gap: 10px; }
.document-actions > .button { flex: 1; }
.document-actions > .text-button { padding-inline: 2px; color: #727c6a; font-size: 11px; }
.decision-actions { display: grid; grid-template-columns: 1fr 1.15fr; gap: 8px; margin-top: 10px; padding-top: 12px; border-top: 1px solid #e7e8df; }
.button-approve { border-color: #205540; background: #275f47; color: #fff; }
.button-approve:hover { background: #1e4f3a; }
.button-reject { border-color: #dfc3b8; background: #fbefea; color: #97432f; }
.button-reject:hover { border-color: #bb7d6b; background: #f8e3db; }
.button:disabled { cursor: not-allowed; transform: none; }
.missing-document { display: grid; justify-items: center; align-content: center; min-height: 222px; margin-top: 14px; padding: 22px 15px; border: 1px dashed #cfd5c6; border-radius: 12px; background: #f8f9f3; text-align: center; }
.missing-document > span { display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 10px; border-radius: 50%; background: #e9eee0; color: #758366; font-size: 23px; }
.missing-document > strong { color: #69775b; font-size: 12px; }
.missing-document > p { max-width: 270px; margin: 7px 0 15px; color: #7b8374; font-size: 11px; line-height: 1.5; }
.missing-document .button { min-height: 42px; font-size: 11px; }
.review-empty-icon { display: grid; place-items: center; width: 52px; height: 52px; border: 1px solid #d0d9c7; border-radius: 18px; background: #e7eddf; color: #69805a; font-size: 23px; }
.review-empty > span:not(.review-empty-icon) { max-width: 350px; font-size: 12px; line-height: 1.5; }
.action-identity { display: grid; gap: 6px; padding: 17px 18px; border: 1px solid #cbd6c5; border-radius: 13px; background: #edf1e7; }
.action-identity strong { color: #2e4b31; font-size: 17px; line-height: 1.3; }
.action-identity span { color: #53664c; font-size: 12px; font-weight: 700; }
.action-identity small { margin-top: 3px; color: #728169; font-size: 10px; line-height: 1.5; overflow-wrap: anywhere; }
.action-description { margin: 18px 0; color: var(--ink-soft); font-size: 13px; line-height: 1.65; }
.action-comment-field label { display: block; margin-bottom: 8px; color: #4e5e46; font-size: 12px; font-weight: 750; }
.action-comment-field textarea { width: 100%; min-height: 112px; padding: 12px; border: 1px solid #cbd0c5; border-radius: 11px; background: #fff; color: var(--ink); font-size: 16px; line-height: 1.5; resize: vertical; }
.action-comment-field textarea:focus { border-color: var(--forest-2); outline: none; box-shadow: 0 0 0 3px rgba(28, 92, 80, .11); }
.pdf-upload { display: grid; justify-items: center; gap: 8px; padding: 22px 18px; border: 1px dashed #9fae91; border-radius: 13px; background: #f5f7ef; cursor: pointer; text-align: center; }
.pdf-upload-icon { font-size: 30px; color: #668054; }
.pdf-upload > strong { font-size: 13px; }
.pdf-upload > span:not(.pdf-upload-icon) { color: #6e7c62; font-size: 11px; overflow-wrap: anywhere; }
.pdf-upload input { width: 100%; max-width: 340px; margin-top: 8px; padding: 10px; border: 1px solid #d4ddc9; border-radius: 8px; background: #fffefb; color: #617252; font-size: 12px; }
.pdf-upload input::file-selector-button { min-height: 34px; margin-right: 9px; padding-inline: 10px; border: 0; border-radius: 6px; background: #e6ecdf; color: #36562d; cursor: pointer; font-weight: 700; }
.pdf-upload .selected-filename { max-width: 100%; margin-top: 5px; color: #354c2a; font-weight: 700; }
.identity-confirmation { display: flex; align-items: flex-start; gap: 10px; margin-top: 18px; padding: 13px; border: 1px solid #dedfd3; border-radius: 10px; background: #f4f3ec; cursor: pointer; font-size: 12px; line-height: 1.6; }
.identity-confirmation input { width: 18px; height: 18px; margin: 2px 0 0; flex: 0 0 auto; accent-color: var(--forest); }
.action-error { margin: 12px 0 0; color: #a33e32; font-size: 12px; font-weight: 650; line-height: 1.5; }
.action-error:empty { display: none; }
.pdf-viewer-shell { display: flex; flex-direction: column; width: min(1540px, calc(100% - 32px)); height: calc(100dvh - 32px); margin: 16px auto; overflow: hidden; border: 1px solid #516052; border-radius: 21px; background: #3e4540; box-shadow: 0 36px 100px rgba(5, 20, 16, .4); }
.pdf-viewer-header { display: flex; align-items: center; justify-content: space-between; flex: 0 0 auto; gap: 20px; padding: 19px 24px 16px; border-bottom: 1px solid #dce1d5; background: var(--paper); }
.pdf-viewer-heading { min-width: 0; }
.pdf-viewer-heading .eyebrow { margin-bottom: 5px; font-size: 9px; }
.pdf-viewer-heading h2 { margin: 0; font-size: 21px; font-weight: 800; line-height: 1.25; letter-spacing: -.02em; overflow-wrap: anywhere; }
.pdf-viewer-heading > p:last-child { margin: 6px 0 0; color: #64735d; font-size: 12px; font-weight: 650; }
.pdf-viewer-header-actions { display: flex; align-items: center; flex: 0 0 auto; gap: 15px; }
.viewer-status-pending { background: #f5e9c8; color: #7c6028; }
.viewer-status-approved { background: #e1eedb; color: #386743; }
.viewer-status-rejected { background: #f5dfd8; color: #964334; }
.viewer-status-stale { background: #f6e8c7; color: #795b1f; }
.pdf-viewer-toolbar { display: flex; align-items: center; justify-content: space-between; flex: 0 0 auto; flex-wrap: wrap; gap: 10px 20px; padding: 11px 20px; border-bottom: 1px solid #dbe0d3; background: #edf1e6; }
.pdf-viewer-navigation, .pdf-viewer-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.pdf-viewer-toolbar .button { min-height: 40px; padding: 8px 11px; border-color: #ced7c4; border-radius: 9px; font-size: 11px; }
.pdf-viewer-navigation > span { min-width: 57px; color: #4f6544; text-align: center; font-size: 11px; font-weight: 750; font-variant-numeric: tabular-nums; }
.pdf-viewer-document-meta { display: flex; align-items: center; justify-content: space-between; flex: 0 0 auto; gap: 12px; padding: 9px 21px; background: #3e4540; color: #d1d9ce; font-size: 10px; }
.pdf-viewer-document-meta > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdf-viewer-document-meta > span:last-child { flex: 0 0 auto; color: #abb8a7; font-variant-numeric: tabular-nums; }
.pdf-viewer-warning { flex: 0 0 auto; margin: 0; padding: 11px 21px; background: #f8e8c5; color: #755522; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.pdf-viewer-stage { position: relative; flex: 1 1 auto; min-height: 120px; overflow: hidden; background: #525659; }
.pdf-viewer-stage iframe { display: block; width: 100%; height: 100%; border: 0; background: #525659; }
.pdf-viewer-loading { position: absolute; z-index: 1; top: 12px; left: 50%; display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px 15px; border: 1px solid #cfdbc5; border-radius: 10px; background: #f8fbf2; color: #46613a; box-shadow: 0 4px 14px rgba(0, 0, 0, .15); transform: translateX(-50%); font-size: 11px; pointer-events: none; }
.pdf-viewer-loading::before { content: ""; width: 13px; height: 13px; border: 2px solid #d4dfca; border-top-color: #587447; border-radius: 50%; animation: spin .75s linear infinite; }
.pdf-viewer-footer { display: flex; align-items: center; justify-content: space-between; flex: 0 0 auto; gap: 16px; padding: 12px 20px calc(12px + var(--safe-bottom)); border-top: 1px solid #dce1d5; background: var(--paper); }
.pdf-viewer-footer p { margin: 0; color: #6d7964; font-size: 11px; line-height: 1.5; }
.pdf-viewer-footer .button { flex: 0 0 auto; min-height: 40px; font-size: 11px; }
.pdf-viewer-shell.is-expanded, .pdf-viewer-shell:fullscreen { width: 100%; height: 100dvh; max-height: none; margin: 0; border: 0; border-radius: 0; }
.pdf-viewer-shell::backdrop { background: #3e4540; }
button:focus-visible, a:focus-visible, input[type="checkbox"]:focus-visible, summary:focus-visible { outline: 3px solid #789f72; outline-offset: 3px; }

@media (max-width: 1080px) {
  .payslip-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workflow-body { gap: 18px; }
  .workflow-body h2 { font-size: 21px; }
}

@media (max-width: 680px) {
  .workflow-panel, .review-overview { width: min(100% - 24px, 1440px); }
  .workflow-panel { border-radius: 16px; margin-bottom: 16px; }
  .workflow-topline { flex-wrap: wrap; gap: 10px; padding: 12px; }
  .stage-nav { width: 100%; gap: 6px; }
  .stage-button { flex: 1; gap: 7px; padding-right: 7px; font-size: 11px; }
  .stage-number { width: 24px; height: 24px; flex: 0 0 auto; }
  .workflow-status { margin: 2px 0 4px 8px; font-size: 10px; }
  .workflow-body { flex-direction: column; align-items: stretch; gap: 15px; padding: 19px 17px; }
  .workflow-body h2 { font-size: 23px; line-height: 1.2; }
  .workflow-body p { font-size: 12px; }
  .workflow-body .button { width: 100%; }
  .draft-notice { padding: 12px 17px; font-size: 11px; }
  .review-overview { margin-top: 24px; }
  .review-heading { align-items: flex-start; flex-direction: column; gap: 9px; }
  .review-heading h2 { font-size: 27px; }
  .review-heading > p { text-align: left; font-size: 10px; }
  .review-metrics { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .review-metric { gap: 7px; padding: 15px; border-radius: 13px; }
  .review-metric > strong { font-size: 31px; }
  .review-metric > small { font-size: 9px; }
  .payslip-grid { grid-template-columns: 1fr; gap: 12px; }
  .payslip-card { padding: 19px; border-radius: 16px; }
  .review-action-dialog .dialog-shell { min-height: 100dvh; display: flex; flex-direction: column; }
  .review-action-dialog .dialog-content { flex: 1; }
  .review-action-dialog .dialog-footer { grid-template-columns: 1fr; }
  .review-action-dialog .dialog-footer > .button:first-child { order: 2; }
  .pdf-viewer-shell { width: 100%; height: 100dvh; margin: 0; border: 0; border-radius: 0; }
  .pdf-viewer-header { gap: 12px; padding: 16px 13px 13px; }
  .pdf-viewer-heading h2 { font-size: 17px; }
  .pdf-viewer-heading > p:last-child { font-size: 11px; }
  .pdf-viewer-header-actions { flex-direction: column-reverse; align-items: flex-end; gap: 8px; }
  .pdf-viewer-header-actions .dialog-close { width: 38px; height: 38px; }
  .pdf-viewer-header-actions .review-status-badge { white-space: nowrap; font-size: 9px; }
  .pdf-viewer-toolbar { gap: 10px; padding: 10px; }
  .pdf-viewer-navigation { width: 100%; justify-content: space-between; gap: 5px; }
  .pdf-viewer-navigation .button { flex: 1; }
  .pdf-viewer-tools { width: 100%; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 5px; }
  .pdf-viewer-tools .button { padding: 8px 5px; font-size: 10px; }
  .pdf-viewer-document-meta { gap: 7px; padding: 8px 12px; font-size: 9px; }
  .pdf-viewer-warning { padding: 10px 12px; font-size: 11px; }
  .pdf-viewer-footer { align-items: stretch; flex-direction: column; gap: 10px; padding: 11px 12px calc(11px + var(--safe-bottom)); }
  .pdf-viewer-footer p { font-size: 10px; }
  .pdf-viewer-footer .button { width: 100%; }
}
