:root {
  --ink: #18362f;
  --muted: #65766f;
  --line: #dce7e1;
  --surface: #ffffff;
  --background: #f4f7f2;
  --green: #275f50;
  --green-2: #367866;
  --green-soft: #e2f1e9;
  --orange: #9a5a14;
  --orange-soft: #fff1d8;
  --red: #a33b35;
  --red-soft: #fbe7e3;
  --shadow: 0 12px 34px rgba(33, 71, 61, .08);
  --radius: 20px;
}

* { box-sizing: border-box; }
html { color-scheme: light; scroll-behavior: auto; }
body { margin: 0; color: var(--ink); background: var(--background); font: 16px/1.55 Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: var(--green); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #ed9c37; outline-offset: 3px; border-radius: 4px; }
.skip-link { position: fixed; z-index: 100; left: 1rem; top: -5rem; padding: .75rem 1rem; background: #fff; }
.skip-link:focus { top: 1rem; }
.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; }

.topbar { height: 76px; display: flex; align-items: center; justify-content: space-between; padding: 0 28px; background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(14px); }
.brand { display: flex; gap: 11px; align-items: center; color: var(--ink); text-decoration: none; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; color: #fff; background: var(--green); font-size: 27px; font-weight: 300; }
.brand strong, .brand small { display: block; line-height: 1.15; }
.brand small { color: var(--muted); margin-top: 3px; }
.top-actions { display: flex; align-items: center; gap: 18px; }
.icon-link { text-decoration: none; position: relative; }
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 5px; padding: 0 5px; border-radius: 99px; background: var(--red); color: white; font-size: 12px; }
.account-menu { position: relative; }
.account-menu summary { cursor: pointer; font-weight: 650; }
.account-menu > div { position: absolute; right: 0; top: 2rem; min-width: 220px; padding: 14px; background: white; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.account-menu span, .account-menu a { display: block; padding: 7px; }

.shell { max-width: 1480px; margin: 0 auto; display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: calc(100vh - 128px); }
.shell-public { display: block; max-width: 1100px; }
.sidebar { padding: 28px 20px; border-right: 1px solid var(--line); }
.sidebar a { display: block; padding: 11px 14px; margin: 3px 0; border-radius: 11px; color: #34554c; text-decoration: none; font-weight: 600; }
.sidebar a:hover { background: var(--green-soft); color: var(--green); }
.sidebar a[aria-current="page"] { color: #fff; background: var(--green); box-shadow: 0 7px 16px rgba(39,95,80,.14); }
.sidebar-label { margin: 0 14px 7px; color: #7b8c85; font-size: 11px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.sidebar-label-personal { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.sidebar-personal { color: #245f4f !important; background: #edf6f1; border: 1px solid #c7ded4; }
.sidebar-personal[aria-current="page"] { color: #fff !important; background: var(--green); border-color: var(--green); }
.sidebar-group { margin-top: 11px; padding-top: 8px; border-top: 1px solid var(--line); }
.sidebar-group summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 13px; color: var(--muted); border-radius: 10px; cursor: pointer; list-style: none; font-size: 13px; font-weight: 800; letter-spacing: .025em; }
.sidebar-group summary::-webkit-details-marker { display: none; }
.sidebar-group summary::after { content: "+"; font-size: 18px; font-weight: 500; line-height: 1; }
.sidebar-group[open] summary::after { content: "−"; }
.sidebar-group summary:hover { color: var(--green); background: #edf3f0; }
.sidebar-group-links { padding-left: 8px; }
.sidebar-group-links a { padding-block: 8px; color: #536a62; font-size: 14px; font-weight: 600; }
.content { min-width: 0; padding: 38px clamp(20px, 4vw, 58px) 70px; }
footer { min-height: 52px; display: grid; place-items: center; padding: 12px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); }

.annual-prompt { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 22px; margin: 0 0 24px; background: linear-gradient(135deg, #edf7f1, #fff); border-color: #b9d8ca; }
.annual-prompt-icon, .suggestion-card > span { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 15px; background: var(--green); color: white; font-size: 22px; }
.progress, .wizard-progress > div { height: 8px; overflow: hidden; background: #dfe9e4; border-radius: 99px; }
.progress span, .wizard-progress span { display: block; height: 100%; background: var(--green-2); border-radius: inherit; }
.wizard-progress { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; margin-bottom: 24px; }
.suggestion-card { display: flex; gap: 18px; margin-bottom: 24px; padding: 22px; border-radius: var(--radius); background: #eef6ff; border: 1px solid #bfd5ed; }
.suggestion-card h2 { margin-bottom: 8px; }
.suggestion-card ul { margin: 0; padding-left: 20px; }
.step-number { width: 30px; height: 30px; display: grid; place-items: center; float: left; margin-right: 10px; border-radius: 9px; color: white; background: var(--green); font-weight: 800; }
.annual-create { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.inline-form { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; }
.inline-form label { font-weight: 700; }
.inline-form input[type=month] { min-width: 170px; }
.holiday-review-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.holiday-review { display: grid; grid-template-columns: 1.2fr 1fr; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: 15px; }
.holiday-review.done { border-color: #9ac8b4; background: #fbfefc; }
.holiday-review small, .holiday-review strong { display: block; }
.holiday-review input, .holiday-review button { grid-column: 1 / -1; }
.custom-halves { grid-column: 1 / -1; display: flex; gap: 16px; }
.custom-halves[hidden] { display: none; }
.annual-employee select { width: auto; min-width: 150px; }
.annual-stepper { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.annual-stepper a { display: flex; align-items: center; gap: 7px; min-height: 48px; padding: 8px 11px; color: #536a62; background: white; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; font-size: 13px; font-weight: 750; }
.annual-stepper a span { width: 24px; height: 24px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 8px; background: #edf1ef; }
.annual-stepper a.done span { color: white; background: var(--green-2); }
.annual-stepper a.done span::after { content: "✓"; }
.annual-stepper a.done span { font-size: 0; }
.annual-stepper a.done span::after { font-size: 13px; }
.annual-stepper a.active { color: white; background: var(--green); border-color: var(--green); box-shadow: 0 7px 18px rgba(39,95,80,.14); }
.annual-stepper a.active span { color: var(--green); background: white; }
.annual-wizard-panel { margin-top: 0; }
.annual-source-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.annual-source-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 15px; padding: 20px; background: #f7faf8; border: 1px solid var(--line); border-radius: 16px; }
.annual-source-card.official { background: #edf7f1; border-color: #abd1c0; }
.annual-source-card > span { width: 42px; height: 42px; display: grid; place-items: center; color: white; background: var(--green); border-radius: 13px; font-weight: 850; }
.annual-source-card h3 { margin: 1px 0 6px; }
.annual-source-card p { margin: 0 0 8px; color: var(--muted); }
.manual-holiday-card { margin-top: 16px; background: white; border: 1px solid var(--line); border-radius: 16px; }
.manual-holiday-card summary { padding: 17px 19px; color: var(--green); cursor: pointer; font-weight: 800; }
.manual-holiday-card form { padding: 0 19px 19px; }
.annual-bulk-action { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 18px 0; padding: 18px; background: #edf7f1; border: 1px solid #b9d8ca; border-radius: 15px; }
.annual-bulk-action p { margin: 3px 0 0; color: var(--muted); }
.wizard-next { display: flex; justify-content: flex-end; margin-top: 20px; }
.annual-review-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 20px 0; }
.annual-review-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 17px; color: var(--ink); background: #fff7f6; border: 1px solid #e8c6c1; border-radius: 13px; text-decoration: none; }
.annual-review-item.done { background: #edf7f1; border-color: #b9d8ca; }
.annual-review-item span { color: var(--muted); }
.disabled-link { opacity: .55; }

.personal-button { color: #315f77; background: #edf6fb; border-color: #bed7e4; }
.scope-banner { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 15px; margin-bottom: 22px; padding: 15px 18px; background: #edf6fb; border: 1px solid #c5dce8; border-radius: 16px; }
.scope-banner > span { width: 40px; height: 40px; display: grid; place-items: center; color: white; background: #416f86; border-radius: 12px; font-weight: 850; }
.scope-banner p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.hub-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; margin-bottom: 22px; }
.hub-action { min-height: 118px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 13px; padding: 19px; color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 17px; box-shadow: var(--shadow); text-decoration: none; }
.hub-action:hover { border-color: #8eb6a6; transform: translateY(-1px); }
.hub-action strong, .hub-action p { display: block; margin: 0; }
.hub-action p { margin-top: 3px; color: var(--muted); font-size: 13px; }
.hub-action > b { min-width: 34px; height: 34px; display: grid; place-items: center; padding: 0 8px; color: var(--green); background: var(--green-soft); border-radius: 11px; }
.hub-action > b.attention-count { color: var(--orange); background: var(--orange-soft); }
.hub-icon { width: 40px; height: 40px; display: grid; place-items: center; color: var(--green); background: var(--green-soft); border-radius: 12px; font-size: 19px; }
.team-snapshot { margin-top: 0; }
.category-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.category-summary > div { padding: 14px; background: #f7faf8; border: 1px solid var(--line); border-radius: 12px; }
.category-summary strong, .category-summary span { display: block; }
.category-summary strong { font-size: 1.45rem; }
.category-summary span { color: var(--muted); font-size: 13px; }
.attention-panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 22px; }
.compact-panel { min-width: 0; padding: 19px; background: white; border: 1px solid var(--line); border-radius: 17px; box-shadow: var(--shadow); }
.compact-panel .section-title { margin-bottom: 10px; }
.compact-panel .section-title h2 { font-size: 1.08rem; }
.compact-panel .section-title p { font-size: 13px; }
.compact-list { gap: 6px; }
.compact-list .list-row { min-height: 58px; padding: 10px 12px; font-size: 14px; }
.calm-state { min-height: 68px; display: flex; align-items: center; justify-content: center; gap: 9px; color: #406258; background: #f5faf7; border-radius: 12px; }
.calm-state span { width: 26px; height: 26px; display: grid; place-items: center; color: white; background: var(--green-2); border-radius: 50%; font-weight: 850; }
.calm-state p { margin: 0; }

.tool-search { max-width: 620px; display: block; margin-bottom: 28px; }
.tool-search span { display: block; margin-bottom: 7px; font-weight: 750; }
.tool-group { margin-top: 26px; }
.tools-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tool-card { min-height: 142px; display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 15px; position: relative; padding: 20px; color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 17px; box-shadow: var(--shadow); text-decoration: none; overflow: hidden; }
.tool-card:hover, .tool-card:focus-visible { border-color: #78a792; box-shadow: 0 15px 36px rgba(33,71,61,.13); transform: translateY(-1px); }
.tool-symbol { width: 46px; height: 46px; display: grid; place-items: center; color: white; background: var(--green); border-radius: 14px; font-size: 14px; font-weight: 850; }
.tool-card strong, .tool-card p, .tool-card small { display: block; }
.tool-card strong { margin-right: 90px; font-size: 1.05rem; }
.tool-card p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.tool-more { max-height: 0; margin-top: 0; overflow: hidden; color: #375b50; opacity: 0; transition: max-height .15s ease, opacity .15s ease, margin .15s ease; }
.tool-card:hover .tool-more, .tool-card:focus .tool-more, .tool-card:focus-within .tool-more { max-height: 55px; margin-top: 9px; opacity: 1; }
.tool-status { position: absolute; top: 17px; right: 17px; padding: 4px 8px; color: #526b62; background: #edf2ef; border-radius: 99px; font-size: 11px; font-weight: 800; }
.empty-tool-search { padding: 28px; color: var(--muted); text-align: center; background: white; border: 1px dashed #b9c9c2; border-radius: 16px; }

.critical-dialog { width: min(570px, calc(100vw - 30px)); padding: 34px; color: var(--ink); background: white; border: 0; border-radius: 22px; box-shadow: 0 26px 80px rgba(33,43,40,.3); text-align: center; }
.critical-dialog::backdrop { background: rgba(18,38,33,.48); backdrop-filter: blur(3px); }
.critical-dialog .dialog-icon { margin-bottom: 12px; }
.critical-dialog h2 { margin-bottom: 8px; }
.dialog-incident-list { margin: 18px 0; text-align: left; }
.dialog-incident-list p { display: flex; justify-content: space-between; gap: 16px; margin: 0; padding: 10px 0; border-bottom: 1px solid var(--line); }
.dialog-incident-list span { color: var(--muted); }

.call-first-dialog, .rule-confirm-dialog { width: min(610px, calc(100vw - 30px)); max-height: calc(100vh - 30px); overflow-y: auto; padding: clamp(25px, 5vw, 40px); color: var(--ink); background: white; border: 0; border-radius: 24px; box-shadow: 0 28px 90px rgba(21,43,37,.32); text-align: center; }
.call-first-dialog { width: min(480px, calc(100vw - 30px)); }
.call-first-dialog::backdrop, .rule-confirm-dialog::backdrop { background: rgba(18,38,33,.55); backdrop-filter: blur(4px); }
.call-dialog-icon { width: 58px; height: 58px; display: grid; place-items: center; margin: 0 auto 14px; color: white; background: var(--green); border-radius: 18px; font-size: 27px; }
.call-first-dialog h2 { margin: 4px 0 9px; font-size: clamp(1.5rem, 4vw, 1.9rem); }
.call-first-dialog > p:not(.eyebrow) { max-width: 380px; margin: 0 auto; color: var(--muted); }
.call-phone-button { min-height: 58px; display: flex; align-items: center; justify-content: center; margin: 19px 0 11px; padding: 12px 18px; color: white; background: var(--green); border-radius: 15px; box-shadow: 0 9px 22px rgba(39,95,80,.2); text-decoration: none; font-size: 1.18rem; font-weight: 850; }
.call-first-dialog > .button { width: 100%; margin-top: 2px; }
.call-priority-banner { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; margin-bottom: 22px; padding: 15px 18px; background: #edf6fb; border: 1px solid #bed8e5; border-radius: 16px; }
.call-priority-banner > span { width: 42px; height: 42px; display: grid; place-items: center; color: white; background: #416f86; border-radius: 13px; font-size: 20px; }
.call-priority-banner strong, .call-priority-banner p { display: block; margin: 0; }
.call-priority-banner p { margin-top: 2px; color: var(--muted); font-size: 13px; }
.call-priority-banner a { font-weight: 800; }
.illness-form-card { align-self: start; }

.rule-version-banner { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 15px; margin-bottom: 20px; padding: 16px 18px; background: #edf6fb; border: 1px solid #bed8e5; border-radius: 16px; }
.rule-version-banner > span:first-child { min-width: 52px; height: 42px; display: grid; place-items: center; color: white; background: #416f86; border-radius: 12px; font-weight: 850; }
.rule-version-banner p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.coverage-rules-editor { overflow: hidden; background: white; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.coverage-rule-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); }
.coverage-rule-input { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; margin: 0; padding: 21px; background: white; }
.coverage-rule-input .error-text { grid-column: 2 / -1; }
.role-rule-code { width: 46px; height: 46px; display: grid; place-items: center; color: white; background: #61736c; border-radius: 14px; font-size: 13px; font-weight: 900; letter-spacing: .04em; }
.role-pharmacist .role-rule-code { background: #416f9f; }
.role-assistant .role-rule-code { background: #287d78; }
.role-preparer .role-rule-code { background: #76549a; }
.role-apprentice .role-rule-code { background: #987027; }
.coverage-rule-copy strong, .coverage-rule-copy small { display: block; }
.coverage-rule-copy small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.number-stepper { display: grid; grid-template-columns: 38px 56px 38px; align-items: center; overflow: hidden; background: #f7faf8; border: 1px solid #b9cbc3; border-radius: 13px; }
.number-stepper button { height: 44px; padding: 0; color: var(--green); background: transparent; border: 0; cursor: pointer; font-size: 21px; font-weight: 800; }
.number-stepper button:hover { background: var(--green-soft); }
.number-stepper input[type=number] { min-height: 44px; padding: 5px 2px; text-align: center; background: white; border-width: 0 1px; border-color: #d6e1dc; border-radius: 0; font-size: 1.15rem; font-weight: 850; appearance: textfield; }
.number-stepper input::-webkit-inner-spin-button { appearance: none; }
.rule-preview-bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 19px 21px; background: #f7faf8; border-top: 1px solid var(--line); }
.rule-preview-bar strong, .rule-preview-bar span { display: block; }
.rule-preview-bar span { margin-top: 2px; color: var(--muted); font-size: 13px; }
.rule-impact { margin-top: 22px; border: 2px solid #afcbbf; }
.rule-change-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-bottom: 16px; }
.rule-change-list > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 15px; background: #f6faf8; border: 1px solid var(--line); border-radius: 12px; }
.rule-change-list span { font-size: 1.05rem; font-weight: 800; }
.rule-change-list b { margin: 0 7px; color: var(--muted); }
.rule-deficit-details { margin-top: 16px; padding: 14px 16px; background: var(--red-soft); border-radius: 13px; }
.rule-deficit-details summary { color: var(--red); cursor: pointer; font-weight: 800; }
.rule-deficit-details .compact-list { margin-top: 12px; }
.rule-impact-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 19px; padding-top: 18px; border-top: 1px solid var(--line); }
.rule-confirm-dialog { text-align: left; }
.rule-confirm-dialog .dialog-icon { margin-left: 0; text-align: center; }
.rule-confirm-dialog h2 { margin: 3px 0 8px; }
.rule-confirm-dialog > form > p:not(.eyebrow) { color: var(--muted); }
.rule-confirm-dialog .actions { margin-top: 20px; }
.rule-advanced-section { margin-top: 24px; }

.employee-home-header { margin-bottom: 22px; }
.employee-profile-line { margin-top: 8px !important; color: #48655c !important; font-size: 14px; font-weight: 700; }
.employee-home-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 14px; margin-bottom: 24px; }
.employee-balance-card, .employee-shortcuts { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.employee-balance-card { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; min-height: 235px; padding: clamp(24px, 4vw, 38px); background: linear-gradient(135deg, #e8f5ee, #fff 70%); border-color: #add1c1; }
.employee-balance-card h2 { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; margin: 1px 0 5px; }
.employee-balance-card h2 strong { color: var(--green); font-size: clamp(2.7rem, 7vw, 4.4rem); line-height: 1; letter-spacing: -.045em; }
.employee-balance-card h2 span { font-size: clamp(1.15rem, 2.5vw, 1.5rem); }
.employee-balance-card > p:not(.eyebrow) { margin: 0 0 20px; color: var(--muted); }
.employee-shortcuts { padding: 24px; background: white; }
.employee-shortcuts > div { margin-bottom: 12px; }
.employee-shortcuts h2 { margin: 1px 0 0; font-size: 1.45rem; }
.employee-shortcut { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 13px; padding: 16px 3px; color: var(--ink); border-top: 1px solid var(--line); text-decoration: none; }
.employee-shortcut:hover { color: var(--green); }
.employee-shortcut > span:first-child { width: 40px; height: 40px; display: grid; place-items: center; color: var(--green); background: var(--green-soft); border-radius: 12px; font-size: 21px; font-weight: 800; }
.employee-shortcut.illness > span:first-child { color: #416f86; background: #edf6fb; }
.employee-shortcut strong, .employee-shortcut small { display: block; }
.employee-shortcut small { margin-top: 2px; color: var(--muted); font-size: 13px; line-height: 1.4; }
.employee-shortcut > b { color: #789087; font-size: 19px; }
.employee-week-overview { margin-top: 0; }
.employee-upcoming { margin-bottom: 0; }

.everyday-actions { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 14px; margin-bottom: 26px; }
.everyday-action { min-height: 130px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; padding: 22px; color: var(--ink); background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); text-decoration: none; }
.everyday-action:hover { border-color: #9bbdaf; transform: translateY(-1px); }
.everyday-action > span { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: var(--green-soft); color: var(--green); font-size: 24px; }
.everyday-action strong, .everyday-action p { display: block; margin: 0; }
.everyday-action p { margin-top: 4px; color: var(--muted); font-size: 14px; }
.everyday-action.primary-action { color: white; background: var(--green); border-color: var(--green); }
.everyday-action.primary-action p { color: #d9eee5; }
.everyday-action.primary-action > span { color: white; background: rgba(255,255,255,.16); }
.flow-choice-banner { display: flex; align-items: center; gap: 15px; margin-bottom: 22px; padding: 16px 18px; background: var(--green-soft); border: 1px solid #bcd8cc; border-radius: 15px; }
.flow-choice-banner > span { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; color: white; background: var(--green); font-size: 22px; }
.flow-choice-banner p { margin: 2px 0 0; color: var(--muted); }

.request-page-header { margin-bottom: 22px; }
.request-steps { position: sticky; z-index: 12; top: 88px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin: -6px -6px 8px; padding: 6px; background: rgba(244,247,242,.92); border-radius: 18px; backdrop-filter: blur(12px); list-style: none; }
.request-steps li { min-width: 0; min-height: 64px; color: #7a8a84; background: #eef2f0; border: 1px solid transparent; border-radius: 14px; }
.request-step-button { width: 100%; min-height: 62px; display: flex; align-items: center; gap: 11px; padding: 11px 14px; color: inherit; background: transparent; border: 0; text-align: left; cursor: pointer; }
.request-step-button > span:first-child { width: 30px; height: 30px; flex: 0 0 auto; display: grid; place-items: center; color: #5d7069; background: white; border: 1px solid #d1ddd7; border-radius: 10px; font-weight: 850; }
.request-step-button > span:last-child { min-width: 0; }
.request-step-button:disabled { cursor: default; }
.request-steps strong, .request-steps small { display: block; line-height: 1.25; }
.request-steps small { margin-top: 2px; }
.request-steps li.active { color: var(--green); background: white; border-color: #9fc2b3; box-shadow: 0 7px 18px rgba(39,95,80,.07); }
.request-steps li.active .request-step-button > span:first-child { color: white; background: var(--green); border-color: var(--green); }
.request-steps li.done { color: #28654f; background: var(--green-soft); }
.request-steps li.done .request-step-button > span:first-child { color: white; background: var(--green-2); border-color: var(--green-2); }
.leave-request-form { display: grid; gap: 22px; }
.request-summary { padding: clamp(20px, 3vw, 28px); background: white; border: 2px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); scroll-margin-top: 174px; }
.request-summary.available { border-color: #69a78d; background: linear-gradient(135deg, #f0faf5, #fff 65%); }
.request-summary.pending { border-color: #d9a85f; background: linear-gradient(135deg, #fff8ea, #fff 65%); }
.request-summary.unavailable { border-color: #d88980; background: linear-gradient(135deg, #fff4f2, #fff 65%); }
.request-summary.waiting { background: linear-gradient(135deg, #f4f8f6, #fff 65%); }
.request-summary-heading { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 15px; align-items: start; }
.request-summary-heading h2 { margin: 1px 0 5px; font-size: clamp(1.35rem, 2.4vw, 1.8rem); }
.request-summary-heading p:last-child { max-width: 790px; margin: 0; color: var(--muted); }
.request-result-icon { width: 46px; height: 46px; display: grid; place-items: center; color: white; background: #76877f; border-radius: 14px; font-size: 22px; font-weight: 850; }
.request-summary.available .request-result-icon { background: var(--green-2); }
.request-summary.pending .request-result-icon { background: #b87423; }
.request-summary.unavailable .request-result-icon { background: var(--red); }
.request-summary-grid { display: grid; grid-template-columns: 1.5fr repeat(3, minmax(120px, 1fr)); gap: 1px; margin-top: 20px; overflow: hidden; background: var(--line); border: 1px solid var(--line); border-radius: 14px; }
.request-summary-grid > div { min-width: 0; padding: 13px 15px; background: rgba(255,255,255,.94); }
.request-summary-grid span, .request-summary-grid strong { display: block; }
.request-summary-grid span { margin-bottom: 3px; color: var(--muted); font-size: 12px; }
.request-summary-grid strong { overflow-wrap: anywhere; font-size: 14px; }
.request-balance-line { display: flex; align-items: center; justify-content: space-between; gap: 18px; max-width: 520px; margin-top: 18px; padding: 13px 15px; background: white; border: 1px solid var(--line); border-radius: 13px; }
.request-balance-line span { color: var(--muted); }
.request-balance-line strong { font-size: 1.15rem; }
.request-inline-note { display: flex; align-items: flex-start; gap: 12px; margin-top: 16px; padding: 13px 15px; color: #71450f; background: var(--orange-soft); border-radius: 13px; }
.request-inline-note span { color: #765b37; }
.request-reasons { margin-top: 16px; padding: 15px 17px; background: rgba(255,255,255,.85); border: 1px solid #e8c0ba; border-radius: 14px; }
.request-reasons ul { display: grid; gap: 7px; margin: 10px 0 0; padding: 0; list-style: none; }
.request-reasons li { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; padding-top: 7px; border-top: 1px solid #f0d8d4; }
.request-reasons li span { color: var(--muted); }
.request-reasons li b { text-align: right; }
.request-summary-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 13px; margin-top: 20px; }
.request-reverify-note { color: var(--orange); font-size: 14px; font-weight: 750; }
.request-reverify-note[hidden] { display: none; }
.request-dates-card { padding: clamp(20px, 3vw, 28px); scroll-margin-top: 174px; }
.request-dates-card .section-title { margin-bottom: 18px; }
.request-dates-card .section-title h2 { margin: 1px 0 3px; }
.date-range-editor { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: stretch; gap: 14px; }
.date-range-editor fieldset { min-width: 0; display: grid; grid-template-columns: minmax(160px, 1.35fr) minmax(130px, .8fr); align-content: start; gap: 13px; margin: 0; padding: 18px; background: #f8faf9; border: 1px solid var(--line); border-radius: 16px; }
.date-range-editor legend { padding: 0 7px; color: var(--green); font-weight: 800; }
.date-range-editor .field { margin: 0; }
.date-range-editor input, .date-range-editor select { width: 100%; }
.date-range-arrow { align-self: center; color: #799087; font-size: 24px; font-weight: 800; }
.request-verify-bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.request-verify-bar strong, .request-verify-bar span { display: block; }
.request-verify-bar span { margin-top: 2px; color: var(--muted); font-size: 13px; }

.cycle-editor { display: grid; gap: 18px; padding-bottom: 90px; }
.editor-section { margin: 0; }
.editor-heading { display: flex; align-items: flex-start; gap: 13px; margin-bottom: 20px; }
.editor-heading > span { width: 31px; height: 31px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 10px; color: white; background: var(--green); font-weight: 800; }
.editor-heading h2, .editor-heading p { margin: 0; }
.editor-heading p { margin-top: 4px; color: var(--muted); }
.pattern-options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.school-status-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pattern-card { min-height: 70px; display: flex; align-items: center; gap: 8px; padding: 14px; border: 1px solid #bfcfc8; border-radius: 13px; cursor: pointer; }
.pattern-card:has(input:checked) { color: var(--green); background: var(--green-soft); border: 2px solid var(--green-2); }
.pattern-card input { flex: 0 0 auto; }
.custom-cycle-field { max-width: 320px; margin-top: 16px; }
.custom-cycle-field[hidden] { display: none; }
.cycle-tools { display: flex; justify-content: flex-end; gap: 8px; margin: -4px 0 12px; }
.cycle-week { margin-top: 14px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; }
.cycle-week[hidden] { display: none; }
.cycle-week > header { display: flex; align-items: center; justify-content: space-between; padding: 12px 15px; background: #edf4f0; }
.cycle-days { display: grid; grid-template-columns: repeat(7, minmax(95px, 1fr)); }
.cycle-day { min-width: 0; margin: 0; padding: 10px; border: 0; border-right: 1px solid var(--line); }
.cycle-day:last-child { border-right: 0; }
.cycle-day legend { width: 100%; padding: 5px 0 8px; text-align: center; font-weight: 800; }
.cycle-day-toggle { width: 100%; min-height: 31px; margin-bottom: 4px; padding: 3px; color: var(--green); background: #f2f7f4; border: 1px solid #c8d6d0; border-radius: 8px; cursor: pointer; font-size: 11px; font-weight: 800; }
.cycle-day-toggle:hover { background: var(--green-soft); border-color: #78a792; }
.day-short { display: none; }
.cycle-half { min-height: 48px; display: flex; align-items: center; margin: 5px 0; padding: 8px; border: 1px solid #c8d6d0; border-radius: 10px; cursor: pointer; font-size: 13px; }
.cycle-half:has(input:checked) { color: #174b3c; background: #d8eee4; border-color: #6ca98f; font-weight: 800; }
.cycle-half input { flex: 0 0 auto; margin-right: 5px; }
.date-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.anchor-explanation { margin-bottom: 0; }
.cycle-savebar { position: sticky; z-index: 12; bottom: 16px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 18px; color: white; background: rgba(24,54,47,.96); border-radius: 16px; box-shadow: 0 15px 40px rgba(24,54,47,.25); backdrop-filter: blur(12px); }
.cycle-savebar strong, .cycle-savebar small { display: block; }
.cycle-savebar small { color: #dbe9e3; }
.cycle-savebar small.mismatch { color: #ffd99d; }

.role-chip { display: inline-flex !important; align-items: center; gap: 5px; width: fit-content; padding: 4px 8px; border: 1px solid transparent; border-radius: 8px; color: #17362f !important; font-size: 12px; line-height: 1.3; }
.role-chip.pharmacist, .role-text.pharmacist { background: #dcecff; border-color: #8eb5e5; }
.role-chip.assistant, .role-text.assistant { background: #d9f1ea; border-color: #83c5b2; }
.role-chip.preparer, .role-text.preparer { background: #eee2f7; border-color: #bea0d4; }
.role-chip.apprentice, .role-text.apprentice { background: #fff0c9; border-color: #d8af53; }
.people-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.holiday-label { padding: 8px 12px; background: #e8efff; border-top: 1px solid #b7c8e8; color: #263e70; }
.holiday-label small { display: block; }
.calendar-slot.closed { color: var(--muted); background: #edf0ee; border-left: 4px solid #78877f; }

.planning-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.dashboard-stats { margin-top: 24px; }
.setup-checklist + .stats-grid { margin-top: 24px; }
.print-actions { justify-content: flex-end; }
.print-sheet { padding: 28px; background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.print-header { display: flex; justify-content: space-between; align-items: start; border-bottom: 2px solid var(--ink); margin-bottom: 12px; padding-bottom: 10px; }
.print-header h1 { margin: 0; }
.print-header > div:last-child { text-align: right; }
.print-header small, .print-header strong { display: block; }
.planning-table-wrap { overflow-x: auto; }
.planning-table { table-layout: fixed; min-width: 1200px; font-size: 10px; }
.planning-table th, .planning-table td { padding: 5px 3px; text-align: center; }
.planning-table th:first-child { width: 180px; position: sticky; left: 0; z-index: 2; background: white; text-align: left; }
.planning-table thead th:first-child { background: #f7faf8; }
.planning-table thead span, .planning-table thead strong { display: block; }
.planning-table .weekend { background: #edf0ee; }
.planning-guide { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 18px; margin-bottom: 12px; padding: 10px 12px; color: #3f5750; background: #f7faf8; border: 1px solid var(--line); border-radius: 10px; font-size: 12px; }
.planning-guide span { display: inline-flex; align-items: center; gap: 6px; }
.guide-half { width: 10px; height: 18px; display: inline-block; background: #4d9b75; border: 1px solid #347457; }
.guide-half.morning { border-radius: 5px 0 0 5px; }
.guide-half.afternoon { border-radius: 0 5px 5px 0; }
.planning-status-cell { padding: 6px 2px !important; }
.planning-day-status { width: 100%; max-width: 34px; min-width: 24px; height: 25px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: auto; overflow: hidden; background: white; border: 1px solid #aebdb6; border-radius: 6px; }
.planning-segment + .planning-segment { border-left: 1px solid rgba(24,54,47,.22); }
.planning-segment.work, .planning-state.work { background: #7fc5a4; color: #143d2d; }
.planning-segment.school, .planning-state.school { background-color: #f7d98f; color: #6e4c00; background-image: repeating-linear-gradient(90deg, transparent, transparent 4px, rgba(109,76,0,.12) 4px, rgba(109,76,0,.12) 6px); }
.planning-segment.away, .planning-state.away { background-color: #d7dcda; color: #454545; background-image: repeating-linear-gradient(135deg, transparent, transparent 4px, rgba(0,0,0,.14) 4px, rgba(0,0,0,.14) 6px); }
.planning-segment.off, .planning-state.off { background: white; color: #718078; }
.planning-state { padding: 4px 8px; border-radius: 6px; font-size: 12px; }
.planning-state.off { border: 1px solid #aebdb6; }
.wall-weekdays, .wall-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.wall-weekdays strong { padding: 8px; text-align: center; background: var(--green); color: white; border-right: 1px solid rgba(255,255,255,.25); }
.wall-day { min-height: 210px; padding: 8px; border-right: 1px solid #9cab9f; border-bottom: 1px solid #9cab9f; }
.wall-day.empty { background: #f1f3f2; }
.wall-day > header { display: flex; justify-content: space-between; font-size: 12px; }
.wall-day > header strong { font-size: 20px; }
.wall-day.holiday { background: #f3f6ff; }
.holiday-name { margin: 2px 0 6px; color: #334d83; font-size: 11px; font-weight: 800; }
.wall-half { min-height: 70px; padding-top: 5px; border-top: 1px solid var(--line); font-size: 9px; }
.wall-half > b, .wall-half > span, .role-text { display: block; }
.count-chips { display: flex; flex-wrap: wrap; gap: 2px; margin: 2px 0; }
.count-chips span { padding: 1px 3px; border-radius: 3px; background: #edf1ef; font-weight: 800; }
.role-text { margin: 2px 0; padding: 1px 3px; border-left: 3px solid currentColor; }

h1, h2, h3 { margin-top: 0; line-height: 1.16; letter-spacing: -.025em; }
h1 { margin-bottom: 10px; font-size: clamp(2rem, 4vw, 3.15rem); }
h2 { font-size: 1.25rem; }
p { margin-top: 0; }
.eyebrow { margin-bottom: 8px; color: var(--green-2); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.muted, small { color: var(--muted); }
.page-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 22px; margin-bottom: 32px; }
.page-header p { max-width: 720px; color: var(--muted); }
.section { margin-top: 30px; }
.section-title { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 14px; }
.section-title h2, .section-title p { margin-bottom: 3px; }
.section-title p { color: var(--muted); }

.button { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border: 1px solid transparent; border-radius: 12px; text-decoration: none; font-weight: 750; cursor: pointer; transition: transform .12s, box-shadow .12s, background .12s; }
.button:hover { transform: translateY(-1px); }
.button.primary { background: var(--green); color: white; box-shadow: 0 8px 18px rgba(39,95,80,.16); }
.button.secondary { background: var(--green-soft); color: var(--green); border-color: #bcd8cc; }
.button.ghost { color: var(--green); background: white; border-color: var(--line); }
.button.small { min-height: 36px; padding: 6px 11px; font-size: 14px; }
.button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.danger-button { background: var(--red); color: white; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.centered-actions { justify-content: center; }
.text-link { display: inline-block; margin-top: 18px; }

.card, .auth-card, .dialog-card, .section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card, .section { padding: 24px; }
.auth-card { max-width: 480px; margin: 8vh auto; padding: clamp(28px, 5vw, 48px); }
.auth-card.wide { max-width: 680px; }
.login-card { max-width: 450px; text-align: center; }
.auth-symbol { width: 54px; height: 54px; display: grid; place-items: center; margin: 0 auto 18px; color: white; background: var(--green); border-radius: 17px; font-size: 34px; font-weight: 300; box-shadow: 0 10px 24px rgba(39,95,80,.2); }
.auth-intro { margin-bottom: 26px; color: var(--muted); }
.login-form { text-align: left; }
.auth-submit { width: 100%; }
.auth-help-link { margin-top: 17px; font-weight: 750; }
.auth-footnote { margin: 25px 0 0; padding-top: 20px; color: var(--muted); border-top: 1px solid var(--line); font-size: 13px; }
.dialog-card { max-width: 580px; margin: 8vh auto; padding: 42px; text-align: center; }
.dialog-icon { width: 52px; height: 52px; display: grid; place-items: center; margin: 0 auto 18px; background: var(--red-soft); color: var(--red); border-radius: 50%; font-size: 24px; font-weight: 800; }
.form-card { max-width: 720px; }
.centered { text-align: center; }
.qr { width: min(260px, 100%); height: auto; }

.field { margin: 0 0 20px; }
.field-label { display: flex; gap: 3px; margin-bottom: 7px; font-weight: 720; }
.required { color: var(--red); }
input:not([type=checkbox]):not([type=radio]), select, textarea { width: 100%; min-height: 48px; padding: 11px 13px; color: var(--ink); background: #fbfcfb; border: 1px solid #bdcec6; border-radius: 11px; }
textarea { min-height: 92px; resize: vertical; }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; margin-right: 8px; accent-color: var(--green); }
.field ul { list-style: none; padding: 0; columns: 2; }
.field li { margin: 8px 0; break-inside: avoid; }
.help-text { color: var(--muted); font-size: 14px; }
.error-text, .errorlist { color: var(--red); margin: 6px 0; font-weight: 650; }
.field-error input, .field-error select, .field-error textarea { border: 2px solid var(--red); }
.form-errors { margin-bottom: 20px; padding: 14px; background: var(--red-soft); border-left: 4px solid var(--red); }

.messages { margin-bottom: 20px; }
.message { padding: 13px 16px; border-radius: 12px; background: var(--green-soft); border: 1px solid #b9d8ca; }
.message.error { background: var(--red-soft); border-color: #eab8b3; }
.message.warning { background: var(--orange-soft); border-color: #ebce9a; }
.notice { padding: 16px 18px; margin: 18px 0; border-radius: 13px; }
.notice p:last-child, .notice ul:last-child { margin-bottom: 0; }
.notice.warning { background: var(--orange-soft); border-left: 4px solid var(--orange); }
.notice.danger { background: var(--red-soft); border-left: 4px solid var(--red); }
.notice.success { background: var(--green-soft); border-left: 4px solid var(--green); }

.stats-grid, .cards-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.stat-card, .rule-card { min-height: 160px; padding: 24px; background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.stat-card span, .stat-card small { display: block; }
.stat-card strong { display: block; margin: 8px 0; font-size: 2rem; }
.stat-card.accent { background: var(--green); color: white; }
.stat-card.accent small, .stat-card.accent span { color: #d9eee5; }
.stat-card.critical { border: 2px solid #d97e73; background: var(--red-soft); }
.stat-card.warning-card { border: 2px solid #e3b86f; background: var(--orange-soft); }
.rule-card h2 { margin: 18px 0 8px; }
.rule-number { display: block; font-size: 3.2rem; line-height: 1; }
.critical-section { border: 2px solid #e0a29b; }

.two-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.form-layout { align-items: start; }
.summary-card dl { margin: 0; }
.summary-card dl > div { display: flex; justify-content: space-between; gap: 20px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.summary-card dd { margin: 0; text-align: right; font-weight: 750; }
.list { display: grid; gap: 9px; }
.list-row { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 14px; }
.list-row div:first-child { min-width: 0; }
.list-row strong, .list-row span { display: block; }
.list-row span { color: var(--muted); }
.list-row.clickable { text-decoration: none; }
.list-row.clickable:hover { border-color: #91b8a8; box-shadow: 0 6px 18px rgba(39,95,80,.08); }
.status, .pill { display: inline-flex !important; width: fit-content; padding: 5px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.status.confirmed { color: #196141; background: #dff3e8; }
.status.pending { color: var(--orange); background: var(--orange-soft); }
.status.rejected, .status.cancelled { color: var(--red); background: var(--red-soft); }
.pill { color: #4d5d57; background: #edf1ef; }
.empty-state { padding: 46px 20px; text-align: center; color: var(--muted); background: white; border: 1px dashed #b9c9c2; border-radius: var(--radius); }
.empty-state > span { font-size: 2rem; }
.empty-state.compact { padding: 24px; }

.legend { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 18px; }
.legend span { display: flex; align-items: center; gap: 7px; }
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot.green { background: #3a9c73; } .dot.orange { background: #d78b32; } .dot.red { background: #cf574d; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(145px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 12px; }
.day-card { min-width: 145px; background: white; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.day-card > header { display: grid; grid-template-columns: 1fr auto; align-items: center; padding: 13px; background: #edf4f0; }
.day-card > header span { grid-column: 1; text-transform: uppercase; color: var(--muted); font-size: 11px; }
.day-card > header strong { grid-row: 1 / 3; grid-column: 2; font-size: 1.8rem; }
.day-card > header small { grid-column: 1; }
.calendar-slot { min-height: 112px; padding: 12px; border-top: 1px solid var(--line); }
.calendar-slot strong, .calendar-slot span, .calendar-slot small { display: block; }
.calendar-slot span { margin: 4px 0; font-size: 13px; font-weight: 700; }
.calendar-slot.safe { border-left: 4px solid #3a9c73; }
.calendar-slot.warning { border-left: 4px solid #d78b32; background: #fffbf2; }
.calendar-slot.danger { border-left: 4px solid #cf574d; background: #fff7f6; }
.calendar-slot details { margin-top: 7px; font-size: 12px; }

.week-strip { display: grid; grid-template-columns: repeat(7, minmax(118px, 1fr)); gap: 9px; overflow-x: auto; padding-bottom: 6px; }
.week-day { min-width: 118px; overflow: hidden; background: white; border: 1px solid var(--line); border-top-width: 4px; border-radius: 14px; }
.week-day.safe { border-top-color: #3a9c73; }
.week-day.warning { border-top-color: #d78b32; }
.week-day.danger { border-top-color: #cf574d; }
.week-day.closed { border-top-color: #78877f; }
.week-day > header { display: grid; grid-template-columns: 1fr auto; align-items: center; padding: 10px; background: #f4f8f5; }
.week-day > header span, .week-day > header small { font-size: 11px; color: var(--muted); text-transform: uppercase; }
.week-day > header strong { grid-row: 1 / 3; grid-column: 2; font-size: 1.55rem; }
.week-holiday { margin: 0; padding: 7px 9px; color: #334d83; background: #f3f6ff; font-size: 11px; font-weight: 800; }
.week-half { min-height: 70px; padding: 9px; border-top: 1px solid var(--line); }
.week-half strong, .week-half span, .week-half small { display: block; }
.week-half strong { font-size: 12px; }
.week-half span { margin: 3px 0; font-size: 12px; font-weight: 800; }
.week-half small { font-size: 10px; line-height: 1.25; }
.week-half.safe span { color: #20704c; }
.week-half.warning { background: #fffbf2; }
.week-half.warning span { color: var(--orange); }
.week-half.danger { background: #fff7f6; }
.week-half.danger span { color: var(--red); }
.week-half.closed { color: var(--muted); background: #f0f3f1; }

.employee-preview-picker { display: grid; grid-template-columns: minmax(210px, 1fr) minmax(260px, 1.5fr) auto; align-items: end; gap: 14px; margin-bottom: 18px; }
.employee-preview-picker label small { display: block; margin-top: 3px; }
.preview-notice { margin-bottom: 22px; }
.employee-preview-shell { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 22px; align-items: start; }
.employee-preview-home, .employee-preview-request { overflow: hidden; background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.preview-window-title { display: flex; align-items: center; justify-content: space-between; padding: 11px 16px; color: #486158; background: #edf3f0; border-bottom: 1px solid var(--line); font-size: 13px; }
.preview-window-title span { color: #9eaaa5; font-size: 9px; letter-spacing: 3px; }
.preview-window-content { padding: 22px; }
.compact-header { margin-bottom: 20px; }
.compact-header h2 { margin-bottom: 6px; font-size: 1.8rem; }
.preview-button { pointer-events: none; }
.preview-balance-card { min-height: 205px; padding: 24px; box-shadow: none; }
.preview-balance-card h2 strong { font-size: 3rem; }
.preview-shortcuts { margin-top: 12px; padding: 20px; box-shadow: none; }
.preview-week { margin-top: 22px; }
.preview-week h3 { margin-bottom: 10px; }
.preview-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.preview-stats .stat-card { min-height: 135px; padding: 18px; }
.preview-stats .stat-card strong { font-size: 1.35rem; }
.preview-list { margin-top: 22px; }
.preview-result { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.preview-result dl { margin: 0; }
.preview-result dl > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.preview-result dd { margin: 0; font-weight: 750; }

.help-button { width: 46px; height: 46px; flex: 0 0 auto; border: 1px solid #b9cec4; border-radius: 50%; color: var(--green); background: white; font-size: 22px; font-weight: 800; cursor: pointer; }
.help-panel { position: fixed; z-index: 40; top: 88px; right: 22px; width: min(390px, calc(100vw - 44px)); padding: 28px; background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 24px 70px rgba(24,54,47,.2); }
.help-close { float: right; width: 40px; height: 40px; border: 0; border-radius: 50%; background: #edf3f0; cursor: pointer; font-size: 24px; }

.table-wrap { overflow-x: auto; background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 15px 18px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .07em; background: #f7faf8; }
td small { display: block; }
.row-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.account-action { font-weight: 800; }
.employee-onboarding { margin-bottom: 28px; padding: 18px 20px; background: white; border: 1px solid var(--line); border-radius: 17px; box-shadow: var(--shadow); }
.employee-onboarding-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 10px; }
.employee-onboarding-heading span, .employee-onboarding-heading strong { display: block; }
.employee-onboarding-heading span, .employee-onboarding-heading small { color: var(--muted); font-size: 13px; }
.employee-onboarding ol { display: grid; grid-template-columns: repeat(var(--onboarding-steps, 4), minmax(0, 1fr)); gap: 8px; margin: 15px 0 0; padding: 0; list-style: none; }
.employee-onboarding li a, .employee-onboarding li > div { min-height: 48px; display: flex; align-items: center; gap: 9px; padding: 8px 10px; color: #536a62; background: #f5f8f6; border: 1px solid transparent; border-radius: 11px; text-decoration: none; }
.employee-onboarding li > div { opacity: .62; }
.employee-onboarding li span { width: 27px; height: 27px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 8px; background: #e5ece8; font-size: 12px; font-weight: 850; }
.employee-onboarding li.done span { color: white; background: var(--green-2); }
.employee-onboarding li.current a, .employee-onboarding li.current > div { color: white; background: var(--green); border-color: var(--green); opacity: 1; }
.employee-onboarding li.current span { color: var(--green); background: white; }
.employee-profile-form { max-width: 880px; }
.employee-form-section { margin-bottom: 16px; }
.employee-form-section-title { display: flex; align-items: flex-start; gap: 13px; margin-bottom: 22px; }
.employee-form-section-title > span { width: 35px; height: 35px; display: grid; flex: 0 0 auto; place-items: center; color: white; background: var(--green); border-radius: 11px; font-weight: 850; }
.employee-form-section-title h2, .employee-form-section-title p { margin: 0; }
.employee-form-section-title p { color: var(--muted); font-size: 14px; }
.employee-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.employee-form-wide { grid-column: 1 / -1; }
.checkbox-panel { margin-bottom: 13px; padding: 14px 15px; background: #f5f8f6; border: 1px solid var(--line); border-radius: 13px; }
.checkbox-panel .field { margin: 0; }
.employee-form-savebar { position: sticky; z-index: 8; bottom: 16px; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 20px; padding: 16px 18px; background: rgba(255,255,255,.97); border: 1px solid #b9cec4; border-radius: 16px; box-shadow: 0 15px 36px rgba(24,54,47,.15); backdrop-filter: blur(12px); }
.employee-form-savebar strong, .employee-form-savebar small { display: block; }
.employee-form-savebar small { color: var(--muted); }
.access-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.access-heading small, .access-heading span { display: block; }
.access-heading strong { overflow-wrap: anywhere; text-align: right; }
.invitation-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.recipient-check { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 13px; margin: 18px 0; padding: 15px; background: #f3f7f4; border: 1px solid #bfd4ca; border-radius: 14px; }
.recipient-check > span { width: 38px; height: 38px; display: grid; place-items: center; color: white; background: var(--green); border-radius: 11px; font-weight: 850; }
.recipient-check small, .recipient-check strong, .recipient-check a { display: block; overflow-wrap: anywhere; }
.recipient-check a { margin-top: 5px; font-size: 14px; }
.invitation-send-form { padding-top: 4px; }
.invitation-send-form > .button { width: 100%; }
.revoke-invitation-form { margin-top: 10px; }
.onboarding-checklist { display: grid; gap: 10px; margin: 18px 0; }
.onboarding-check { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 13px; background: #fff9ef; border: 1px solid #edd4a8; border-radius: 13px; }
.onboarding-check.done { background: #edf7f1; border-color: #b9d8ca; }
.onboarding-check > span { width: 32px; height: 32px; display: grid; place-items: center; color: white; background: var(--orange); border-radius: 10px; font-weight: 850; }
.onboarding-check.done > span { background: var(--green); }
.onboarding-check strong, .onboarding-check small { display: block; }
.activation-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 20px 0 26px; }
.activation-summary > div { padding: 14px; background: #f3f7f4; border: 1px solid var(--line); border-radius: 13px; }
.activation-summary span, .activation-summary strong { display: block; }
.activation-summary span { color: var(--muted); font-size: 13px; }
.activation-submit { width: 100%; }
.legal-list { display: grid; gap: 12px; }
.legal-card { background: white; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.legal-card summary { display: flex; justify-content: space-between; gap: 20px; padding: 20px; cursor: pointer; }
.legal-card summary strong, .legal-card summary small { display: block; }
.legal-card > div { padding: 0 20px 20px; }
.legal-meta { color: var(--muted); font-size: 13px; }
.notification { display: flex; justify-content: space-between; gap: 20px; padding: 18px; background: white; border: 1px solid var(--line); border-radius: 14px; }
.notification.unread { border-left: 5px solid var(--green); }
.notification.critical { border-left-color: var(--red); }
.notification p { margin: 5px 0; }
.employee-remove-link { color: var(--red); }
.apprentice-next-step { margin: 6px 0 0; }
.apprentice-schedule-note { margin: -10px 0 20px; }
.employee-departure-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 18px; }
.employee-departure-grid .card { margin: 0; }
.departure-choice { width: 46px; height: 46px; display: grid; place-items: center; margin-bottom: 17px; color: white; border-radius: 14px; font-size: 24px; font-weight: 850; }
.departure-choice.safe { background: var(--green); }
.departure-choice.danger { background: var(--red); }
.delete-test-card { border-color: #e7c1bc; }

.audit-header { align-items: center; }
.audit-filters { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(200px, .55fr) auto auto; align-items: end; gap: 12px; margin-bottom: 22px; padding: 18px; background: white; border: 1px solid var(--line); border-radius: 17px; box-shadow: var(--shadow); }
.audit-filters label > span { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 800; }
.audit-list { display: grid; gap: 10px; }
.audit-event { display: grid; grid-template-columns: 100px minmax(0, 1fr); overflow: hidden; background: white; border: 1px solid var(--line); border-left: 5px solid #73857e; border-radius: 15px; box-shadow: var(--shadow); }
.audit-event.audit-security { border-left-color: #416f9f; }
.audit-event.audit-team { border-left-color: #287d78; }
.audit-event.audit-absence { border-left-color: #987027; }
.audit-event.audit-planning { border-left-color: #76549a; }
.audit-date { padding: 18px 14px; text-align: center; background: #f5f8f6; border-right: 1px solid var(--line); }
.audit-date strong, .audit-date span { display: block; }
.audit-date span { color: var(--muted); font-size: 13px; }
.audit-main { min-width: 0; padding: 17px 19px; }
.audit-event-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.audit-event-heading h2 { margin: 2px 0 5px; font-size: 1.05rem; }
.audit-category { color: var(--muted); font-size: 11px; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.audit-actor { max-width: 230px; overflow-wrap: anywhere; text-align: right; font-size: 14px; }
.audit-main > p { margin: 0; color: #486159; }
.audit-metadata { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0 0; }
.audit-metadata > div { display: flex; gap: 6px; padding: 5px 8px; background: #f1f5f3; border-radius: 8px; font-size: 12px; }
.audit-metadata dt { color: var(--muted); }
.audit-metadata dd { margin: 0; font-weight: 800; }
.audit-technical { margin-top: 10px; color: var(--muted); font-size: 12px; }
.audit-technical summary { width: fit-content; cursor: pointer; }
.audit-technical span { display: block; margin-top: 5px; overflow-wrap: anywhere; font-family: ui-monospace, monospace; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 22px; }

code { padding: 2px 6px; background: #eef2f0; border-radius: 5px; font-size: .9em; }

@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: flex; align-items: center; gap: 4px; padding: 10px 14px; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar a { white-space: nowrap; }
  .sidebar-label { display: none; }
  .sidebar-personal { margin: 3px 0 !important; }
  .sidebar-group { flex: 0 0 auto; margin: 0; padding: 0; border: 0; }
  .sidebar-group[open] { display: flex; align-items: center; }
  .sidebar-group summary { min-height: 46px; padding: 9px 13px; white-space: nowrap; font-size: 15px; }
  .sidebar-group-links { display: flex; align-items: center; gap: 4px; padding: 0 0 0 4px; }
  .sidebar-group-links a { padding: 10px 13px; font-size: 15px; }
  .stats-grid, .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .calendar-grid { grid-template-columns: repeat(7, minmax(160px, 1fr)); }
  .everyday-actions { grid-template-columns: 1fr; }
  .pattern-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cycle-days { grid-template-columns: repeat(7, minmax(78px, 1fr)); overflow-x: auto; }
  .day-full { display: none; }
  .day-short { display: inline; }
  .hub-actions { grid-template-columns: 1fr; }
  .employee-home-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .topbar { height: 68px; padding: 0 15px; }
  .brand small, .icon-link { display: none; }
  .content { padding: 26px 15px 56px; }
  .page-header, .section-title { align-items: stretch; flex-direction: column; }
  .page-header > .button, .page-header > .actions .button { width: 100%; }
  .page-header > .print-actions { width: 100%; }
  .page-header > .print-actions .button { flex: 1 1 100%; }
  .stats-grid, .cards-grid, .two-columns { grid-template-columns: 1fr; }
  .stat-card { min-height: 130px; }
  .field ul { columns: 1; }
  .list-row { align-items: flex-start; flex-wrap: wrap; }
  .list-row .button { width: 100%; }
  .auth-card { margin: 25px auto; }
  .table-wrap { margin-inline: -15px; border-radius: 0; }
  .access-heading { align-items: stretch; flex-direction: column; }
  .access-heading strong { text-align: left; }
  .invitation-actions .button { width: 100%; }
  .activation-summary { grid-template-columns: 1fr; }
  .employee-onboarding { margin-inline: -4px; padding: 15px; }
  .employee-onboarding-heading { align-items: flex-start; }
  .employee-onboarding ol { display: flex; overflow-x: auto; padding-bottom: 4px; }
  .employee-onboarding li { flex: 0 0 112px; }
  .employee-onboarding li a, .employee-onboarding li > div { min-height: 62px; align-items: flex-start; flex-direction: column; justify-content: center; gap: 4px; }
  .employee-profile-form { max-width: none; }
  .employee-form-grid { grid-template-columns: 1fr; }
  .employee-form-wide { grid-column: auto; }
  .employee-form-savebar { position: static; align-items: stretch; flex-direction: column; }
  .employee-form-savebar .button { width: 100%; }
  .employee-form-header .button { width: 100%; }
  .revoke-invitation-form .button { width: 100%; }
  .annual-prompt { grid-template-columns: 1fr; }
  .annual-prompt-icon { display: none; }
  .annual-create, .planning-toolbar { align-items: stretch; flex-direction: column; }
  .holiday-review-grid { grid-template-columns: 1fr; }
  .annual-employee { display: block; }
  .annual-employee .actions { margin-top: 12px; }
  .print-sheet { margin-inline: -15px; padding: 12px; border-radius: 0; }
  .wall-days, .wall-weekdays { min-width: 850px; }
  .wall-calendar { overflow-x: auto; }
  .employee-preview-picker, .employee-preview-shell { grid-template-columns: 1fr; }
  .preview-stats { grid-template-columns: 1fr; }
  .pattern-options, .school-status-options, .date-pair { grid-template-columns: 1fr; }
  .cycle-days { grid-template-columns: repeat(7, minmax(70px, 1fr)); overflow-x: auto; }
  .cycle-day { padding: 6px; }
  .cycle-half { justify-content: center; padding: 6px 3px; }
  .cycle-half span { font-size: 10px; }
  .cycle-editor { padding-bottom: 0; }
  .cycle-savebar { position: static; align-items: stretch; flex-direction: column; }
  .annual-stepper { display: flex; overflow-x: auto; padding-bottom: 5px; }
  .annual-stepper a { min-width: 112px; }
  .annual-bulk-action { align-items: stretch; flex-direction: column; }
  .annual-review-grid { grid-template-columns: 1fr; }
  .annual-source-grid { grid-template-columns: 1fr; }
  .scope-banner { grid-template-columns: auto 1fr; }
  .scope-banner .button { grid-column: 1 / -1; }
  .category-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .attention-panels, .tools-grid { grid-template-columns: 1fr; }
  .tool-card { min-height: 130px; padding: 17px; }
  .tool-card strong { margin-right: 0; }
  .tool-status { position: static; grid-column: 2; width: fit-content; margin-top: 8px; }
  .tool-more { max-height: none; margin-top: 8px; opacity: 1; }
  .critical-dialog { padding: 26px 20px; }
  .dialog-incident-list p { flex-direction: column; gap: 2px; }
  .call-priority-banner, .rule-version-banner { grid-template-columns: auto 1fr; }
  .call-priority-banner > a, .rule-version-banner > .status { grid-column: 2; justify-self: start; }
  .rules-page-header > .actions { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .rules-page-header > .actions .button { width: auto; }
  .coverage-rule-grid, .rule-change-list { grid-template-columns: 1fr; }
  .coverage-rule-input { padding: 16px; gap: 10px; }
  .number-stepper { grid-template-columns: 34px 48px 34px; }
  .rule-preview-bar { align-items: stretch; flex-direction: column; }
  .rule-preview-bar .button, .rule-impact-actions .button { width: 100%; }
  .rule-impact-actions { flex-direction: column-reverse; }
  .rule-confirm-dialog .actions { align-items: stretch; flex-direction: column; }
  .request-page-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 14px; }
  .request-page-header > div { min-width: 0; }
  .request-page-header .help-button { grid-column: 2; grid-row: 1; }
  .request-steps { top: 74px; }
  .request-step-button { padding: 9px; }
  .request-step-button > span:first-child { width: 27px; height: 27px; }
  .request-steps small { display: none; }
  .request-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .date-range-editor { grid-template-columns: 1fr; }
  .date-range-arrow { justify-self: center; transform: rotate(90deg); }
  .date-range-editor fieldset { grid-template-columns: 1fr; }
  .request-verify-bar { align-items: stretch; flex-direction: column; }
  .request-verify-bar .button, .request-summary-actions .button { width: 100%; }
  .request-reasons li, .request-inline-note { flex-direction: column; gap: 2px; }
  .request-reasons li b { text-align: left; }
  .employee-balance-card { min-height: 0; }
  .employee-balance-card .button { width: 100%; }
  .employee-shortcuts { padding: 20px; }
  .employee-departure-grid { grid-template-columns: 1fr; }
  .audit-header > .button { width: 100%; }
  .audit-filters { grid-template-columns: 1fr; }
  .audit-filters .button { width: 100%; }
  .audit-event { grid-template-columns: 1fr; }
  .audit-date { display: flex; gap: 7px; padding: 9px 14px; text-align: left; border-right: 0; border-bottom: 1px solid var(--line); }
  .audit-event-heading { flex-direction: column; gap: 5px; }
  .audit-actor { max-width: none; text-align: left; }
  .pagination { align-items: stretch; flex-direction: column; text-align: center; }
}

@media (max-width: 360px) {
  .request-steps { gap: 6px; }
  .request-step-button { min-height: 68px; flex-direction: column; justify-content: center; gap: 4px; padding: 7px 3px; text-align: center; }
  .request-step-button strong { font-size: 12px; }
}

@media print {
  @page { size: A3 landscape; margin: 8mm; }
  @page compact { size: A4 landscape; margin: 6mm; }
  body { background: white; font-size: 10pt; }
  .topbar, .sidebar, footer, .no-print, .messages { display: none !important; }
  .shell, .content { display: block; max-width: none; padding: 0; margin: 0; }
  .print-sheet { padding: 0; border: 0; box-shadow: none; }
  .print-a4 { page: compact; font-size: 8pt; }
  .planning-table-wrap { overflow: visible; }
  .planning-table { min-width: 0; width: 100%; }
  .planning-table th:first-child { position: static; width: 42mm; }
  .planning-table thead { display: table-header-group; }
  .planning-table tr { break-inside: avoid; }
  .wall-day { min-height: 42mm; break-inside: avoid; }
  .role-chip, .planning-day-status, .planning-segment, .role-text { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
