:root {
  --ink: #202124;
  --ink-soft: #45484d;
  --accent: #b21f2d;
  --accent-dark: #8f1622;
  --accent-soft: #f8e9eb;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --canvas: #f4f5f6;
  --muted: #687078;
  --line: #d9dde1;
  --line-strong: #b9bec4;
  --success: #24734b;
  --success-soft: #e7f3ec;
  --warning: #916318;
  --warning-soft: #fff4db;
  --danger: #a61b2b;
  --danger-soft: #fbe9eb;
  --focus: #275e92;
  --shadow: 0 14px 38px rgba(24, 28, 33, 0.1);
  --header-height: 68px;
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--canvas); }
body { min-height: 100vh; margin: 0; background: var(--canvas); color: var(--ink); font-size: 16px; line-height: 1.45; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button, summary, select { cursor: pointer; }
input, select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 8px;
  background: var(--surface); color: var(--ink); transition: border-color .15s ease, box-shadow .15s ease;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible, summary:focus-visible {
  outline: 3px solid rgba(39, 94, 146, .23); outline-offset: 2px; border-color: var(--focus);
}
label, legend { display: block; margin-bottom: 6px; color: var(--ink-soft); font-size: .88rem; font-weight: 650; }
fieldset { margin: 6px 0; padding: 14px; border: 1px solid var(--line); border-radius: 10px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 6px; font-size: clamp(1.8rem, 3vw, 2.55rem); line-height: 1.08; letter-spacing: -.035em; }
h2 { margin-bottom: 12px; font-size: 1.18rem; letter-spacing: -.015em; }
h3 { margin-bottom: 6px; font-size: 1rem; }
.hidden { display: none !important; }
.subtle { color: var(--muted); }
.eyebrow { margin-bottom: 8px; color: var(--accent); font-size: .74rem; font-weight: 800; letter-spacing: .16em; }
.skip-link { position: fixed; z-index: 9999; top: 8px; left: 8px; transform: translateY(-160%); padding: 10px 14px; background: var(--ink); color: #fff; border-radius: 6px; }
.skip-link:focus { transform: translateY(0); }

.login-shell { min-height: 100vh; display: grid; place-items: center; padding: max(24px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom)); background: var(--surface); }
.login-shell::before { content: ""; position: fixed; inset: 0 auto 0 0; width: 7px; background: var(--accent); }
.login-panel { width: min(100%, 430px); padding: clamp(26px, 6vw, 48px); border: 1px solid var(--line); background: var(--surface-raised); box-shadow: var(--shadow); }
.product-mark, .landing-symbol { display: flex; gap: 6px; align-items: end; height: 42px; margin-bottom: 22px; }
.product-mark span, .landing-symbol span { display: block; width: 8px; background: var(--ink); }
.product-mark span:nth-child(1), .landing-symbol span:nth-child(1) { height: 22px; }
.product-mark span:nth-child(2), .landing-symbol span:nth-child(2) { height: 34px; background: var(--accent); }
.product-mark span:nth-child(3), .landing-symbol span:nth-child(3) { height: 28px; }
.login-intro { margin-bottom: 26px; color: var(--muted); }
.stack { display: grid; gap: 8px; }
.stack label:not(:first-child) { margin-top: 8px; }
.stack.compact { margin-top: 14px; }
.form-error { min-height: 1.2rem; margin: 4px 0 0; color: var(--danger); font-size: .87rem; }
.admin-access { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 16px; color: var(--muted); }
.admin-access summary { font-size: .88rem; font-weight: 650; }

.button { min-height: 42px; padding: 9px 15px; border: 1px solid transparent; border-radius: 8px; background: transparent; font-size: .9rem; font-weight: 700; transition: background .15s ease, color .15s ease, border-color .15s ease, transform .1s ease; }
.button:active { transform: translateY(1px); }
.button:disabled { cursor: not-allowed; opacity: .5; }
.button.primary { background: var(--accent); color: #fff; }
.button.primary:hover { background: var(--accent-dark); }
.button.dark { background: var(--ink); color: #fff; }
.button.dark:hover { background: #090a0b; }
.button.secondary { border-color: var(--line-strong); background: var(--surface); }
.button.secondary:hover, .button.ghost:hover { background: #eceeef; }
.button.ghost { border-color: transparent; }
.button.danger-outline { border-color: #d9a2a9; color: var(--danger); background: var(--surface); }
.button.wide { width: 100%; margin-top: 10px; }

.app-shell { min-height: 100vh; }
.app-header { position: sticky; z-index: 100; top: 0; height: var(--header-height); display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 0 max(18px, env(safe-area-inset-left)); background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); }
.icon-button, .profile-button, .brand-button { border: 0; background: transparent; }
.icon-button { width: 44px; height: 44px; display: grid; place-content: center; gap: 4px; border-radius: 8px; }
.icon-button:hover, .profile-button:hover { background: #eceeef; }
.icon-button > span:not(.notification-count) { display: block; }
#menuButton > span { width: 20px; height: 2px; background: var(--ink); }
.brand-button { justify-self: start; display: flex; align-items: center; gap: 10px; padding: 8px 4px; font-weight: 800; letter-spacing: -.01em; }
.mini-mark { width: 5px; height: 26px; background: var(--accent); box-shadow: 7px 5px 0 #383a3d, 14px -3px 0 #73777c; }
.header-actions { display: flex; align-items: center; gap: 4px; }
.bell-button { position: relative; font-size: 1.45rem; }
.notification-count { position: absolute; top: 3px; right: 2px; min-width: 18px; height: 18px; padding: 0 4px; display: grid; place-items: center; border: 2px solid #fff; border-radius: 20px; background: var(--accent); color: #fff; font-size: .7rem; font-weight: 800; }
.profile-button { width: 38px; height: 38px; border-radius: 50%; background: var(--ink); color: #fff; font-size: .75rem; font-weight: 800; }

.menu-drawer { position: fixed; z-index: 300; inset: 0 auto 0 0; width: min(88vw, 330px); padding: max(20px, env(safe-area-inset-top)) 16px 20px; transform: translateX(-105%); background: var(--surface); box-shadow: 16px 0 42px rgba(0,0,0,.18); transition: transform .2s ease; }
.menu-drawer.open { transform: translateX(0); }
.drawer-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 4px 4px 18px; border-bottom: 1px solid var(--line); }
.drawer-header strong, .drawer-header span { display: block; }
.drawer-header span { margin-top: 2px; color: var(--muted); font-size: .82rem; text-transform: capitalize; }
#mainMenu { display: grid; gap: 5px; padding-top: 14px; }
#mainMenu button { min-height: 46px; padding: 10px 12px; border: 0; border-radius: 8px; background: transparent; text-align: left; font-weight: 650; }
#mainMenu button:hover, #mainMenu button.active { background: var(--accent-soft); color: var(--accent-dark); }
.drawer-scrim { position: fixed; z-index: 250; inset: 0; width: 100%; height: 100%; border: 0; background: rgba(12,13,14,.42); }

main { min-height: calc(100vh - var(--header-height)); }
.view { width: min(1540px, 100%); margin: 0 auto; padding: 32px clamp(16px, 3vw, 42px) 64px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 24px; }
.page-head p:last-child { margin-bottom: 0; }
.landing-view { position: relative; min-height: calc(100vh - var(--header-height)); display: grid; place-items: center; background: var(--surface); }
.landing-core { width: min(760px, 100%); padding: 30px 0 60px; }
.landing-symbol { height: 58px; }
.landing-symbol span { width: 11px; }
.landing-symbol span:nth-child(1) { height: 30px; }
.landing-symbol span:nth-child(2) { height: 51px; }
.landing-symbol span:nth-child(3) { height: 40px; }
.landing-core h1 { max-width: 680px; font-size: clamp(2.5rem, 7vw, 5.6rem); line-height: .96; letter-spacing: -.065em; }
.landing-core h1 span { color: var(--accent); }
.landing-welcome { margin: 24px 0 32px; color: var(--muted); font-size: 1.05rem; }
.tool-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tool-card { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 14px; min-height: 94px; padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); text-align: left; }
.tool-card:hover { border-color: var(--accent); box-shadow: 0 8px 24px rgba(24,28,33,.08); }
.tool-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 8px; background: var(--canvas); color: var(--accent); font-weight: 800; }
.tool-copy strong, .tool-copy span { display: block; }
.tool-copy span { margin-top: 2px; color: var(--muted); font-size: .82rem; }
.tool-arrow { font-size: 1.3rem; }
.version-label { position: absolute; right: 22px; bottom: 16px; color: var(--muted); font-size: .75rem; }

.status-cluster { display: flex; align-items: center; gap: 10px; }
.status-pill { padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: 999px; background: #eceeef; color: var(--ink-soft); font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.status-pill.submitted { border-color: #d3b66c; background: var(--warning-soft); color: #76500f; }
.status-pill.approved { border-color: #78ae91; background: var(--success-soft); color: var(--success); }
.status-pill.reopened { border-color: #bd9c65; background: #f6efe4; color: #6f5023; }
.save-status { color: var(--muted); font-size: .8rem; }
.planner-toolbar { position: relative; display: grid; grid-template-columns: minmax(180px, 230px) 1fr auto; align-items: end; gap: 14px; margin-bottom: 16px; padding: 14px; border: 1px solid var(--line); background: var(--surface); }
.field-group { min-width: 0; }
.week-nav { display: grid; grid-template-columns: 42px minmax(150px, 210px) 42px auto; align-items: end; gap: 8px; }
.week-nav label { grid-column: 2 / 3; grid-row: 1; }
.week-nav input { grid-column: 2 / 3; grid-row: 2; }
.week-nav button:nth-of-type(1) { grid-column: 1; grid-row: 2; }
.week-nav button:nth-of-type(2) { grid-column: 3; grid-row: 2; }
.week-nav button:nth-of-type(3) { grid-column: 4; grid-row: 2; }
.toolbar-actions { position: relative; display: flex; gap: 8px; justify-content: flex-end; }
.action-menu { position: absolute; z-index: 80; top: calc(100% + 8px); right: 0; width: 210px; padding: 6px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); box-shadow: var(--shadow); }
.action-menu button { width: 100%; min-height: 40px; padding: 8px 10px; border: 0; border-radius: 6px; background: transparent; text-align: left; font-size: .88rem; }
.action-menu button:hover { background: #eceeef; }
.notice { margin-bottom: 14px; padding: 11px 14px; border-left: 4px solid var(--warning); background: var(--warning-soft); color: #634718; }

.calendar { --hour-height: 58px; display: grid; grid-template-columns: repeat(7, minmax(150px, 1fr)); gap: 1px; border: 1px solid var(--line); background: var(--line); overflow: clip; }
.day-column { min-width: 0; background: var(--surface); }
.day-header { position: sticky; z-index: 5; top: var(--header-height); min-height: 132px; padding: 12px 10px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.97); }
.day-header.today { box-shadow: inset 0 4px 0 var(--accent); }
.day-title { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.day-title strong { font-size: .94rem; }
.day-title span { color: var(--muted); font-size: .75rem; }
.holiday { min-height: 18px; margin-bottom: 6px; color: var(--accent-dark); font-size: .75rem; font-weight: 700; }
.work-row { display: grid; grid-template-columns: auto 1fr 1fr; align-items: center; gap: 5px; }
.work-row input[type="checkbox"] { width: 34px; min-height: 26px; height: 26px; accent-color: var(--accent); }
.work-row input[type="time"] { min-height: 32px; padding: 4px; font-size: .72rem; }
.day-hours { position: relative; height: calc((var(--display-hours)) * var(--hour-height)); min-height: 300px; overflow: hidden; background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--hour-height) / 4 - 1px), #eef0f2 calc(var(--hour-height) / 4 - 1px), #eef0f2 calc(var(--hour-height) / 4)); }
.work-shade { position: absolute; inset-inline: 0; background: rgba(32,33,36,.055); border-top: 1px dashed #c8ccd0; border-bottom: 1px dashed #c8ccd0; pointer-events: none; }
.hour-label { position: absolute; left: 4px; transform: translateY(-50%); color: var(--muted); font-size: .75rem; pointer-events: none; }
.event-card { position: absolute; z-index: 2; min-height: 24px; padding: 6px 7px; overflow: hidden; border: 0; border-left: 4px solid var(--event-color); border-radius: 6px; background: #f3f4f5; background: color-mix(in srgb, var(--event-color) 15%, white); color: var(--ink); text-align: left; box-shadow: 0 2px 7px rgba(0,0,0,.12); }
.event-card:hover { z-index: 4; box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.event-card strong, .event-card span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.event-card strong { font-size: .75rem; }
.event-card span { color: var(--ink-soft); font-size: .75rem; }
.event-card.read-only { cursor: default; }
.day-empty { padding: 20px 10px; color: var(--muted); font-size: .82rem; }

.dashboard-filters { display: grid; grid-template-columns: minmax(160px, 230px) minmax(150px, 200px); gap: 5px 10px; }
.dashboard-filters label { margin: 0; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi-card { min-height: 126px; padding: 18px; border-top: 4px solid var(--ink); background: var(--surface); box-shadow: 0 2px 12px rgba(24,28,33,.06); }
.kpi-card.accent { border-top-color: var(--accent); }
.kpi-card.success { border-top-color: var(--success); }
.kpi-card span { display: block; color: var(--muted); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.kpi-card strong { display: block; margin-top: 12px; font-size: 2rem; line-height: 1; }
.kpi-card small { display: block; margin-top: 8px; color: var(--muted); }
.dashboard-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.panel { padding: 20px; border: 1px solid var(--line); background: var(--surface); box-shadow: 0 2px 10px rgba(24,28,33,.035); }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.panel-head h2 { margin-bottom: 0; }
.donut-wrap { display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 18px; min-height: 180px; }
.donut { position: relative; width: 148px; aspect-ratio: 1; border-radius: 50%; background: conic-gradient(var(--accent) calc(var(--value) * 1%), #e6e8ea 0); }
.donut::after { content: ""; position: absolute; inset: 28px; border-radius: 50%; background: var(--surface); }
.donut-value { position: absolute; z-index: 1; inset: 0; display: grid; place-items: center; font-size: 1.45rem; font-weight: 850; }
.legend-list { display: grid; gap: 8px; }
.legend-row { display: grid; grid-template-columns: 9px 1fr auto; align-items: center; gap: 8px; font-size: .8rem; }
.legend-dot { width: 9px; height: 9px; background: var(--legend-color); }
.bar-list { display: grid; gap: 11px; }
.bar-label { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 4px; font-size: .76rem; }
.bar-track { height: 8px; background: #e8eaec; overflow: hidden; }
.bar-fill { height: 100%; width: var(--bar-width); background: var(--bar-color); }
.table-panel { padding: 0; }
.table-panel .panel-head { padding: 18px 20px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 14px; border-top: 1px solid var(--line); text-align: left; vertical-align: middle; font-size: .83rem; }
th { color: var(--muted); background: #fafafa; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; }
.table-status { display: inline-block; padding: 4px 7px; border-radius: 99px; font-size: .75rem; font-weight: 800; }
.table-status.good { background: var(--success-soft); color: var(--success); }
.table-status.open { background: var(--warning-soft); color: #76500f; }

.agenda-list, .version-list, .audit-list { display: grid; gap: 10px; }
.agenda-card, .version-card, .audit-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--line); background: var(--surface); }
.agenda-time { min-width: 74px; color: var(--accent-dark); font-weight: 800; }
.agenda-copy strong, .agenda-copy span { display: block; }
.agenda-copy span { margin-top: 3px; color: var(--muted); font-size: .82rem; }
.empty-state { padding: 40px 20px; border: 1px dashed var(--line-strong); background: var(--surface); color: var(--muted); text-align: center; }

.admin-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.brand-admin-list { display: grid; gap: 10px; }
.brand-block { border: 1px solid var(--line); }
.brand-row { display: grid; grid-template-columns: minmax(180px, 1fr) auto auto; align-items: center; gap: 14px; padding: 14px; background: #fafafa; }
.brand-row strong, .brand-row span { display: block; }
.brand-row span { color: var(--muted); font-size: .78rem; }
.area-list { display: grid; }
.area-row { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(170px, 1fr) auto auto; align-items: center; gap: 10px; padding: 11px 14px; border-top: 1px solid var(--line); }
.area-row input { min-height: 38px; }
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 700; }
.switch input, .switch-field input { width: 38px; height: 24px; min-height: 24px; accent-color: var(--accent); }
.admin-filters { display: grid; grid-template-columns: minmax(190px, 260px) 1fr; gap: 6px 14px; margin: 16px 0; }
.pagination { display: flex; justify-content: flex-end; align-items: center; gap: 12px; padding-top: 14px; }
.audit-card { grid-template-columns: minmax(120px, .45fr) 1fr minmax(140px, auto); }
.audit-card time { color: var(--muted); font-size: .75rem; }
.account-panel { max-width: 620px; }
.account-panel dl { display: grid; grid-template-columns: 150px 1fr; gap: 10px; margin: 0 0 22px; }
.account-panel dt { color: var(--muted); }
.account-panel dd { margin: 0; font-weight: 650; }
.account-panel .button { margin-right: 8px; }

.modal { width: min(92vw, 620px); max-height: min(90vh, 860px); padding: 0; border: 0; border-radius: 12px; background: var(--surface); box-shadow: 0 24px 70px rgba(0,0,0,.28); }
.modal.wide-modal { width: min(94vw, 820px); }
.modal::backdrop { background: rgba(10,11,12,.55); backdrop-filter: blur(2px); }
.modal-form { max-height: min(90vh, 860px); padding: 24px; overflow-y: auto; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.modal-head h2 { margin-bottom: 0; font-size: 1.55rem; }
.dialog-close { width: 40px; height: 40px; border: 0; border-radius: 7px; background: #eceeef; font-size: 1.5rem; }
.form-grid { display: grid; gap: 12px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.activity-time-grid { margin-top: 14px; }
.modal-form > label, .modal-form > select, .modal-form > input, .modal-form > textarea, .modal-form > fieldset { margin-top: 10px; }
.modal-actions { position: sticky; bottom: -24px; display: grid; grid-template-columns: auto 1fr auto auto; gap: 8px; margin: 20px -24px -24px; padding: 14px 24px max(14px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(255,255,255,.97); }
.switch-field { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; }
.switch-field label { margin: 0; }
.check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.check-option { display: grid; grid-template-columns: 24px 1fr; align-items: center; gap: 7px; padding: 7px; border: 1px solid var(--line); border-radius: 7px; }
.check-option input { width: 20px; height: 20px; min-height: 20px; }
.check-option label { margin: 0; font-size: .8rem; }
.temporary-password { display: block; padding: 16px; border: 1px dashed var(--line-strong); background: var(--canvas); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.2rem; font-weight: 750; text-align: center; letter-spacing: .04em; user-select: all; }
.task-editor-list { display: grid; gap: 8px; }
.task-row { display: grid; grid-template-columns: 46px 1fr 100px 110px 44px; align-items: end; gap: 8px; padding: 10px; border: 1px solid var(--line); }
.task-row input[type="color"] { padding: 3px; }
.task-row .icon-button { border: 1px solid var(--line); }
.toast-region { position: fixed; z-index: 1000; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); display: grid; gap: 8px; width: min(380px, calc(100vw - 32px)); }
.toast { padding: 12px 14px; border-left: 4px solid var(--ink); background: var(--ink); color: #fff; box-shadow: var(--shadow); }
.toast.error { border-left-color: #ff7485; }
.toast.success { border-left-color: #72d4a1; }
.network-activity { position: fixed; z-index: 1200; top: max(12px, env(safe-area-inset-top)); right: max(14px, env(safe-area-inset-right)); display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-soft); box-shadow: var(--shadow); font-size: .8rem; font-weight: 700; }
.loading-spinner { width: 16px; height: 16px; border: 2px solid var(--line-strong); border-top-color: var(--accent); border-radius: 50%; animation: loading-spin .75s linear infinite; }
button.is-busy { cursor: wait; }
button.is-busy::before { content: ""; display: inline-block; width: 13px; height: 13px; margin-right: 7px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; vertical-align: -2px; animation: loading-spin .75s linear infinite; }
@keyframes loading-spin { to { transform: rotate(360deg); } }

@media (max-width: 1120px) {
  .planner-toolbar { grid-template-columns: minmax(170px, 220px) 1fr; }
  .toolbar-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .dashboard-grid { grid-template-columns: 1fr 1fr; }
  .dashboard-grid .panel:last-child { grid-column: 1 / -1; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .calendar { grid-template-columns: repeat(7, minmax(120px, 1fr)); overflow-x: auto; }
}

@media (max-width: 900px) {
  :root { --header-height: 60px; }
  .app-header { padding-inline: 10px; }
  .brand-button span:last-child { display: none; }
  .view { padding: 22px 12px 44px; }
  .page-head { align-items: flex-start; flex-direction: column; gap: 14px; }
  .landing-view { min-height: calc(100vh - var(--header-height)); padding-inline: 22px; }
  .landing-core { align-self: center; padding-bottom: 40px; }
  .landing-core h1 { font-size: clamp(2.7rem, 14vw, 4.4rem); }
  .tool-grid { grid-template-columns: 1fr; }
  .planner-toolbar { grid-template-columns: 1fr; }
  .week-nav { grid-template-columns: 42px 1fr 42px; }
  .week-nav button:nth-of-type(3) { grid-column: 1 / -1; grid-row: 3; }
  .toolbar-actions { grid-column: auto; display: grid; grid-template-columns: 1fr 1fr; }
  .toolbar-actions .button { width: 100%; }
  .action-menu { left: 0; right: auto; }
  .calendar { display: grid; grid-template-columns: 1fr; gap: 10px; border: 0; background: transparent; overflow: visible; }
  .day-column { border: 1px solid var(--line); }
  .day-header { position: static; min-height: auto; }
  .day-hours { height: auto !important; min-height: 72px; padding: 8px; background: #fafafa; }
  .work-shade, .hour-label { display: none; }
  .event-card { position: relative !important; inset: auto !important; width: 100% !important; min-height: 58px; margin: 6px 0; padding: 9px 10px; }
  .event-card strong { font-size: .86rem; }
  .event-card span { margin-top: 2px; font-size: .76rem; }
  .dashboard-filters { width: 100%; grid-template-columns: 1fr 1fr; }
  .dashboard-grid, .kpi-grid, .admin-kpis { grid-template-columns: 1fr; }
  .dashboard-grid .panel:last-child { grid-column: auto; }
  .donut-wrap { grid-template-columns: 120px 1fr; }
  .donut { width: 120px; }
  .donut::after { inset: 23px; }
  .brand-row { grid-template-columns: 1fr auto; }
  .brand-row > .button { grid-column: 1 / -1; }
  .area-row { grid-template-columns: 1fr auto; }
  .area-row input { grid-column: 1 / -1; }
  .admin-filters, .form-grid.two, .form-grid.three, .check-grid { grid-template-columns: 1fr; }
  .task-row { grid-template-columns: 42px 1fr 42px; }
  .task-row > div:nth-of-type(2), .task-row > div:nth-of-type(3) { grid-column: span 1; }
  .task-row .remove-task { grid-column: 3; grid-row: 1; }
  .audit-card, .agenda-card, .version-card { grid-template-columns: 1fr; gap: 5px; }
  .account-panel dl { grid-template-columns: 1fr; gap: 2px; }
  .account-panel dd { margin-bottom: 10px; }
  .modal { width: 100vw; max-width: none; max-height: 96vh; margin: auto 0 0; border-radius: 14px 14px 0 0; }
  .modal-form { max-height: 96vh; padding: 20px 16px; }
  .modal-actions { bottom: -20px; margin: 18px -16px -20px; padding-inline: 16px; grid-template-columns: auto 1fr auto; }
  .modal-actions .button:nth-last-child(2) { grid-column: auto; }
}

@media print {
  @page { size: A4 landscape; margin: 8mm; }
  body { background: #fff; }
  .app-header, .planner-toolbar, .menu-drawer, .drawer-scrim, .toast-region, .page-head .status-cluster { display: none !important; }
  .view { width: 100%; padding: 0; }
  .calendar { grid-template-columns: repeat(7, 1fr); }
  .day-header { position: static; min-height: 90px; }
  .event-card { box-shadow: none; }
}

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