:root {
  color-scheme: light;
  --navy: #17365d;
  --navy-deep: #102947;
  --blue: #2f75b5;
  --green: #4f8a2f;
  --green-soft: #e7f3df;
  --orange: #d96500;
  --orange-soft: #fff1e4;
  --red: #b42318;
  --red-soft: #fef0ee;
  --ink: #1c2734;
  --muted: #637083;
  --line: #dbe2ea;
  --surface: #ffffff;
  --canvas: #f4f7fa;
  --shadow: 0 14px 34px rgba(23, 54, 93, 0.10);
  font-family: Inter, Aptos, "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--canvas); }
body { margin: 0; color: var(--ink); background: var(--canvas); min-height: 100vh; }
.supervisor-preview-banner { position:sticky; top:72px; z-index:25; display:grid; gap:4px; margin:0 0 16px; padding:14px 16px; border:3px solid #c2410c; border-radius:13px; color:#7c2d12; background:#fff7ed; box-shadow:0 8px 22px rgba(124,45,18,.18); }
.supervisor-preview-banner strong { font-size:13px; letter-spacing:.025em; }
.supervisor-preview-banner span { font-size:13px; line-height:1.45; }
.supervisor-preview-active .task-actions button,.supervisor-preview-active .swap-actions button,.supervisor-preview-active #shiftSwapForm button[type="submit"],.supervisor-preview-active #hrPanel form button[type="submit"] { opacity:.48; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid rgba(47,117,181,.35); outline-offset: 2px; }
[hidden] { display: none !important; }

.topbar {
  position: sticky; top: 0; z-index: 20; min-height: 66px; padding: 10px max(18px, env(safe-area-inset-left));
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  color: #fff; background: linear-gradient(135deg, var(--navy-deep), var(--navy)); box-shadow: 0 4px 16px rgba(16,41,71,.16);
}
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; min-width: 0; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; flex: 0 0 40px; border-radius: 13px; background: #6aa841; font-weight: 900; letter-spacing: -.04em; }
.brand strong, .brand small { display: block; line-height: 1.12; }
.brand strong { font-size: 15px; }
.brand small { margin-top: 3px; opacity: .78; font-size: 12px; }
.topbar-actions { display: flex; align-items: center; justify-content: end; gap: 8px; }
.topbar-help { min-height: 34px; padding: 6px 10px; border: 1px solid rgba(255,255,255,.34); border-radius: 10px; color: #fff; background: rgba(255,255,255,.1); font-size: 12px; font-weight: 850; }
.connection-pill { flex: 0 0 auto; padding: 6px 9px; border-radius: 999px; background: rgba(255,255,255,.12); font-size: 11px; font-weight: 700; }
.connection-pill.online { background: rgba(129,199,96,.22); }
.connection-pill.offline { background: rgba(255,173,91,.24); }

main { width: min(100%, 980px); margin: 0 auto; padding: 24px 18px calc(92px + env(safe-area-inset-bottom)); }
.auth-shell { min-height: calc(100vh - 114px); display: grid; place-items: center; }
.auth-card { width: min(100%, 470px); padding: clamp(24px, 5vw, 42px); border: 1px solid var(--line); border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(26px, 5vw, 38px); line-height: 1.08; letter-spacing: -.035em; }
h2 { margin-bottom: 0; font-size: 19px; }
.eyebrow { color: var(--blue); font-size: 12px; font-weight: 800; letter-spacing: .12em; margin-bottom: 7px; }
.muted { color: var(--muted); line-height: 1.55; }
.compact-copy { font-size: 13px; }
.stack { display: grid; gap: 16px; margin-top: 22px; }
label { display: grid; gap: 7px; color: #344255; font-size: 13px; font-weight: 750; }
label small { color: var(--muted); font-weight: 500; }
input, textarea, select { width: 100%; min-height: 48px; padding: 11px 13px; border: 1px solid #bdc8d5; border-radius: 12px; color: var(--ink); background: #fff; }
textarea { min-height: 88px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--blue); }

.segmented { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; margin-top: 22px; padding: 4px; border-radius: 13px; background: #e9eef4; }
.segmented button { min-height: 42px; border: 0; border-radius: 10px; color: #526072; background: transparent; font-weight: 750; }
.segmented button.is-active { color: var(--navy); background: #fff; box-shadow: 0 2px 8px rgba(23,54,93,.10); }
.segmented.small { grid-template-columns: repeat(3, 1fr); margin: 0 0 18px; }
.notice { margin: 18px 0 0; padding: 13px 14px; border-left: 4px solid var(--blue); border-radius: 9px; background: #eef5fb; color: #344a63; font-size: 13px; line-height: 1.45; }
.notice.secure { margin-bottom: 18px; border-left-color: var(--green); background: var(--green-soft); }
.preview-profile-picker { display:grid; gap:10px; margin:0; border-left-color:var(--orange); background:#fff7ed; }
.preview-profile-picker label { gap:5px; }
.preview-profile-picker select { background:#fff; }
.preview-profile-picker small { color:var(--muted); }
.form-message { min-height: 22px; margin: 14px 0 0; color: var(--red); font-size: 13px; font-weight: 650; }

.button { min-height: 46px; padding: 10px 16px; border: 1px solid transparent; border-radius: 12px; font-weight: 800; }
.button.primary { color: #fff; background: var(--navy); }
.button.secondary { width: 100%; margin-bottom: 12px; color: var(--navy); border-color: #aebdcd; background: #fff; }
.button.danger { width: 100%; color: var(--red); border-color: #efc7c2; background: var(--red-soft); }
.button.ghost { color: var(--navy); border-color: var(--line); background: #fff; }
.button.compact { min-height: 40px; padding: 7px 11px; font-size: 13px; }
.button:disabled { cursor: wait; opacity: .55; }
.text-button { padding: 4px; border: 0; color: var(--blue); background: none; font-weight: 800; }

.app-shell { display: grid; gap: 20px; }
.panel { animation: panel-in .18s ease-out; }
@keyframes panel-in { from { opacity: 0; transform: translateY(4px); } }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.summary-card { min-height: 132px; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: 0 5px 18px rgba(23,54,93,.05); }
.summary-card.accent { color: #fff; border-color: transparent; background: linear-gradient(145deg, var(--navy), #24568c); }
.summary-card span, .summary-card strong, .summary-card small { display: block; }
.summary-card span { opacity: .75; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.summary-card strong { margin: 12px 0 6px; font-size: 21px; line-height: 1.15; }
.summary-card small { color: inherit; opacity: .78; line-height: 1.35; }
.section-card, .profile-card { margin-top: 18px; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.empty-state { padding: 28px 15px; border: 1px dashed #c7d1dc; border-radius: 13px; color: var(--muted); text-align: center; }
.alert-list { display: grid; gap: 10px; margin-top: 16px; }
.alert-item { padding: 12px 14px; border-radius: 12px; background: var(--orange-soft); color: #7a3800; font-size: 13px; font-weight: 650; }

.period-controls { display: grid; grid-template-columns: 48px minmax(180px, 260px) 48px; justify-content: center; gap: 8px; margin-bottom: 14px; }
.icon-button { min-height: 48px; border: 1px solid var(--line); border-radius: 12px; color: var(--navy); background: #fff; font-size: 26px; }
.hours-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-bottom: 18px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--line); }
.hours-strip span { padding: 12px; background: #fff; color: var(--muted); font-size: 12px; text-align: center; }
.hours-strip strong { display: block; margin-top: 4px; color: var(--ink); font-size: 17px; }
.card-list, .task-list { display: grid; gap: 11px; }
.task-pending-ap { margin-top:-4px; padding:11px 13px; border-left:4px solid #d29922; border-radius:9px; color:#674b10; background:#fff7df; font-size:13px; line-height:1.45; }
.shift-card, .document-card { border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.document-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 15px; }
.shift-card { overflow: hidden; }
.shift-card[open] { border-color: #b4c7d9; box-shadow: 0 6px 20px rgba(23,54,93,.06); }
.shift-card-summary { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 15px; cursor: pointer; list-style: none; }
.shift-card-summary::-webkit-details-marker { display: none; }
.date-badge { display: grid; place-items: center; width: 52px; min-height: 58px; padding: 5px; border-radius: 12px; background: #eef3f8; color: var(--navy); }
.date-badge strong { font-size: 22px; line-height: 1; }
.date-badge small { margin-top: 4px; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.card-copy strong, .card-copy small { display: block; }
.card-copy strong { margin-bottom: 4px; }
.card-copy small { color: var(--muted); line-height: 1.35; }
.role-badge { padding: 6px 8px; border-radius: 8px; color: #31536f; background: #eaf3fa; font-size: 11px; font-weight: 850; }
.shift-role-stack { display: grid; justify-items: end; gap: 6px; }
.shift-task-count { color: var(--orange); font-size: 10px; font-weight: 850; white-space: nowrap; }
.shift-task-preview { padding: 14px 15px 16px; border-top: 1px solid #e5ebf1; background: #f8fafc; }
.shift-task-overview { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.shift-task-overview strong, .shift-task-overview small { display: block; }
.shift-task-overview small { color: var(--muted); font-size: 12px; text-align: right; }
.shift-task-list { display: grid; gap: 6px; }
.shift-task-row { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 10px 11px; border: 1px solid #e1e7ed; border-radius: 10px; background: #fff; }
.shift-task-row strong, .shift-task-row small { display: block; }
.shift-task-row strong { font-size: 13px; line-height: 1.35; }
.shift-task-row small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.shift-checklist-button { margin: 12px 0 0; }
.empty-state.compact { padding: 14px 12px; }
.schedule-help { margin: -5px 0 15px; text-align: center; }
.variance { color: var(--orange); font-weight: 800; }
.schedule-scope { margin: -4px 0 18px; }
.personal-period-mode { max-width: 360px; margin: 0 auto 14px; }
.year-schedule-list { display: grid; gap: 16px; }
.year-month-block { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.year-month-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 15px; color: var(--navy); background: #eef3f8; }
.year-month-heading strong { text-transform: capitalize; }
.year-month-heading span { color: var(--muted); font-size: 12px; font-weight: 750; }
.year-shift-row { display: grid; grid-template-columns: 76px minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 11px 15px; border-top: 1px solid #edf1f5; }
.year-shift-row time { color: var(--navy); font-size: 12px; font-weight: 850; text-transform: capitalize; }
.year-shift-row strong, .year-shift-row small { display: block; }
.year-shift-row small { margin-top: 3px; color: var(--muted); }
.team-privacy { margin-top: 0; }
.team-period-mode { margin: 0 0 14px; }
.team-today { display: block; margin: -4px auto 16px; }
.team-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.team-schedule-list { display: grid; gap: 14px; }
.team-day-card { overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: #fff; box-shadow: 0 4px 15px rgba(23,54,93,.04); }
.team-day-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 15px; color: var(--navy); background: #eef3f8; }
.team-day-heading strong { font-size: 15px; text-transform: capitalize; }
.team-day-heading small { color: var(--muted); font-weight: 750; }
.team-service-group { padding: 14px 15px; border-top: 1px solid #e9edf2; }
.team-service-group:first-of-type { border-top: 0; }
.team-service-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.team-service-heading strong { font-size: 13px; text-transform: uppercase; letter-spacing: .045em; }
.team-service-heading span { padding: 4px 7px; border-radius: 999px; color: #31536f; background: #eaf3fa; font-size: 10px; font-weight: 850; }
.team-service-group.department-cucina .team-service-heading span { color: #674b10; background: #fff3d8; }
.team-service-group.department-pizzeria .team-service-heading span { color: #5b3d7a; background: #f1eafa; }
.team-member-list { display: grid; gap: 7px; }
.team-member-row { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 10px; padding: 10px 11px; border: 1px solid #e2e8ef; border-radius: 11px; background: #fafbfd; }
.team-member-row.is-mine { border-color: #82a8cb; background: #edf5fc; box-shadow: inset 4px 0 0 var(--blue); }
.team-member-copy strong, .team-member-copy small { display: block; }
.team-member-copy strong { font-size: 13px; line-height: 1.3; }
.team-member-copy small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.team-me-badge { display: inline-block; margin-left: 6px; padding: 2px 5px; border-radius: 6px; color: #fff; background: var(--blue); font-size: 9px; font-weight: 900; vertical-align: 1px; }
.team-swap-button { min-height: 34px; padding: 6px 9px; border: 1px solid #9cb6cd; border-radius: 9px; color: var(--navy); background: #fff; font-size: 11px; font-weight: 850; }
.team-empty-day { padding: 18px 15px; color: var(--muted); font-size: 13px; text-align: center; }

.date-control { width: min(100%, 300px); margin-bottom: 14px; }
.task-card { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.task-card[open] { border-color: #b4c7d9; box-shadow: 0 6px 20px rgba(23,54,93,.06); }
.task-card summary { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; min-height: 66px; padding: 14px 16px; list-style: none; cursor: pointer; }
.task-card summary::-webkit-details-marker { display: none; }
.task-title strong, .task-title small { display: block; }
.task-title small { margin-top: 4px; color: var(--muted); }
.status-badge { padding: 6px 8px; border-radius: 8px; background: #edf1f5; color: #596779; font-size: 11px; font-weight: 850; }
.status-badge.fatto { color: #32651d; background: var(--green-soft); }
.status-badge.anomalia, .status-badge.non-fatto { color: var(--red); background: var(--red-soft); }
.task-body { padding: 0 16px 16px; border-top: 1px solid #edf0f4; }
.task-instructions { margin: 14px 0; white-space: pre-line; line-height: 1.55; font-size: 14px; }
.done-standard { padding: 11px 12px; border-radius: 10px; background: #f4f7fa; color: #44546a; font-size: 13px; line-height: 1.45; }
.task-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 14px; }
.correction-box { margin-top:16px; padding:13px 14px; border:1px solid var(--line); border-radius:13px; background:#f8fafc; }
.correction-box summary { cursor:pointer; color:var(--navy); font-weight:800; }
.correction-box form { margin-top:14px; }
.task-actions button { min-height: 42px; padding: 7px; border: 1px solid #c8d1dc; border-radius: 10px; background: #fff; font-size: 12px; font-weight: 800; }
.task-actions button[data-state="FATTO"] { color: var(--green); }
.task-actions button[data-state="ANOMALIA"], .task-actions button[data-state="NON_FATTO"] { color: var(--red); }
.task-note { margin-top: 12px; }

.document-card { grid-template-columns: 44px 1fr auto; }
.document-icon { display: grid; place-items: center; width: 44px; height: 50px; border-radius: 9px; color: var(--red); background: var(--red-soft); font-size: 11px; font-weight: 900; }
.document-actions { display: flex; flex-wrap: wrap; justify-content: end; gap: 6px; }
.download-button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 8px 11px; border: 1px solid #b8c8d8; border-radius: 10px; color: var(--navy); background: #fff; font-weight: 800; text-decoration: none; }
.profile-card { margin-bottom: 16px; }
.profile-card div { display: grid; grid-template-columns: 1fr 1.5fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid #edf0f4; }
.profile-card div:last-child { border-bottom: 0; }
.profile-card dt { color: var(--muted); }
.profile-card dd { margin: 0; font-weight: 750; text-align: right; word-break: break-word; }
#profileEmployeeCode { color: var(--navy); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; user-select: all; }

.compact-stack { margin-top: 0; }
.inline-message { padding: 11px 13px; border-radius: 10px; color: #4e5e71; background: #f3f6f9; font-size: 13px; line-height: 1.4; }
.count-badge { min-width: 27px; padding: 5px 8px; border-radius: 999px; color: #fff; background: var(--orange); font-size: 12px; font-weight: 900; text-align: center; }
.swap-list { display: grid; gap: 11px; }
.swap-card { padding: 16px; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.swap-card-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.swap-card-heading > strong { line-height: 1.35; }
.swap-status { flex: 0 0 auto; padding: 6px 9px; border-radius: 8px; color: #76500c; background: #fff3d8; font-size: 11px; font-weight: 850; text-align: center; }
.swap-status.owner { color: #31536f; background: #eaf3fa; }
.swap-status.approved { color: #32651d; background: var(--green-soft); }
.swap-status.declined, .swap-status.invalid { color: var(--red); background: var(--red-soft); }
.swap-exchange { display: grid; grid-template-columns: 1fr 30px 1fr; align-items: center; gap: 9px; }
.swap-shift { min-width: 0; padding: 12px; border-radius: 11px; background: #f4f7fa; }
.swap-shift small, .swap-shift strong { display: block; }
.swap-shift small { margin-bottom: 5px; color: var(--muted); font-size: 11px; }
.swap-shift strong { font-size: 13px; line-height: 1.4; }
.swap-arrow { color: var(--blue); font-size: 22px; font-weight: 900; text-align: center; }
.swap-message, .swap-owner-note { margin: 12px 0 0; padding: 10px 12px; border-left: 3px solid #a8b7c7; border-radius: 8px; color: #4d5b6c; background: #fafbfc; font-size: 13px; line-height: 1.45; }
.swap-owner-note { border-left-color: var(--navy); }
.swap-actions { display: flex; flex-wrap: wrap; justify-content: end; gap: 8px; margin-top: 14px; }
.swap-actions .button.primary { width: auto; }

.bottom-nav { position: fixed; z-index: 30; left: 50%; bottom: 0; transform: translateX(-50%); width: min(100%, 980px); display: grid; grid-template-columns: repeat(7, 1fr); padding: 6px max(8px, env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left)); border-top: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(14px); }
.bottom-nav button { position: relative; min-height: 54px; border: 0; border-radius: 12px; color: #687589; background: transparent; font-size: 10px; font-weight: 750; }
.bottom-nav button span { display: block; margin-bottom: 2px; font-size: 20px; line-height: 1; }
.bottom-nav button.is-active { color: var(--navy); background: #edf3f8; }
.nav-badge { position: absolute; top: 3px; left: calc(50% + 8px); min-width: 18px; height: 18px; padding: 2px 5px; border: 2px solid #fff; border-radius: 999px; color: #fff; background: var(--red); font-size: 9px; font-style: normal; font-weight: 900; line-height: 10px; }
.toast { position: fixed; z-index: 50; left: 50%; bottom: calc(80px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(calc(100% - 30px), 520px); padding: 13px 16px; border-radius: 12px; color: #fff; background: #24384f; box-shadow: var(--shadow); font-size: 13px; text-align: center; }
.employee-help-dialog { width: min(760px, calc(100% - 28px)); max-height: min(88vh, 860px); padding: 0; overflow: hidden; border: 0; border-radius: 20px; color: var(--ink); background: #fff; box-shadow: 0 24px 80px rgba(16,41,71,.28); }
.employee-help-dialog::backdrop { background: rgba(10,25,43,.7); }
.employee-help-header { display: flex; align-items: start; justify-content: space-between; gap: 16px; padding: 20px 20px 14px; border-bottom: 1px solid var(--line); }
.employee-help-header h2 { margin: 0; }
.help-close { flex: 0 0 42px; width: 42px; min-height: 42px; padding: 0; border: 1px solid var(--line); border-radius: 11px; color: var(--navy); background: #fff; font-size: 25px; }
.employee-help-lead { margin: 0; padding: 16px 20px; color: #405168; background: #eef5fb; font-size: 14px; line-height: 1.5; }
.employee-help-topics { display: grid; gap: 8px; max-height: min(53vh, 500px); padding: 14px 20px; overflow: auto; }
.employee-help-topic { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.employee-help-topic summary { padding: 13px 14px; color: var(--navy); background: #f6f8fa; cursor: pointer; font-size: 14px; font-weight: 850; }
.employee-help-topic[open] summary { border-bottom: 1px solid var(--line); background: #eef4f8; }
.employee-help-topic ol { margin: 0; padding: 13px 20px 14px 38px; color: #455366; font-size: 13px; line-height: 1.55; }
.employee-help-topic li + li { margin-top: 6px; }
.employee-tour-hint { margin: 0; padding: 0 20px 12px; color: var(--muted); font-size: 12px; }
.employee-help-actions { display: grid; grid-template-columns: 1.4fr 1fr; gap: 9px; padding: 0 20px 20px; }
.employee-help-actions .button { width: auto; margin: 0; }
.employee-tutorial-overlay { position: fixed; inset: 0; z-index: 1000; display: grid; align-items: start; justify-items: center; padding: max(78px, env(safe-area-inset-top)) 12px 92px; pointer-events: auto; }
.employee-tutorial-overlay::before { content: ""; position: fixed; inset: 0; z-index: 1000; background: rgba(10,25,43,.74); }
.employee-tutorial-overlay.has-target::before { display: none; }
.employee-tutorial-spotlight { position: fixed; z-index: 1050; border: 5px solid #f3b51b; border-radius: 14px; box-shadow: 0 0 0 9999px rgba(10,25,43,.74), 0 0 30px rgba(243,181,27,.72); pointer-events: none; transition: left .12s ease, top .12s ease, width .12s ease, height .12s ease; }
.employee-tutorial-panel { position: relative; z-index: 1100; width: min(700px,100%); padding: 19px; border: 3px solid #f3b51b; border-radius: 17px; background: #fff; box-shadow: 0 22px 70px rgba(0,0,0,.38); }
.employee-tutorial-panel:focus { outline: 0; }
.employee-tutorial-meta { display: flex; align-items: start; justify-content: space-between; gap: 14px; color: #775000; font-size: 11px; font-weight: 900; letter-spacing: .035em; }
.employee-tutorial-panel h2 { margin: 10px 0 7px; }
.employee-tutorial-panel p { margin: 0; color: #435449; line-height: 1.55; }
.employee-tutorial-actions { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 8px; margin-top: 17px; }
.employee-tutorial-actions .button { width: auto; margin: 0; }
body.employee-tutorial-active { overflow: hidden; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hr-balance-card { min-height: 116px; padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.hr-balance-card span,.hr-balance-card small { display:block; color:var(--muted); }
.hr-balance-card strong { display:block; margin:7px 0 4px; color:var(--navy); font-size:22px; }
.hr-request-card { padding:14px; border:1px solid var(--line); border-radius:12px; background:#fff; }
.hr-request-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.hr-request-head strong,.hr-request-head small { display:block; }
.hr-request-card p { margin:8px 0 0; color:var(--muted); font-size:13px; }
.hr-request-card .button { margin-top:10px; }
.hr-status { flex:0 0 auto; padding:5px 8px; border-radius:8px; font-size:10px; font-weight:850; background:#edf1f5; color:#596779; }
.hr-status.approved,.hr-status.verified,.hr-status.closed { color:#32651d; background:var(--green-soft); }
.hr-status.pending-owner,.hr-status.unverified,.hr-status.open { color:#76500c; background:#fff3d8; }
.hr-status.rejected,.hr-status.cancelled,.hr-status.late { color:var(--red); background:var(--red-soft); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.app-version { position:fixed; right:8px; bottom:76px; z-index:30; padding:4px 7px; border:1px solid rgba(23,54,93,.16); border-radius:7px; color:#58687a; background:rgba(255,255,255,.94); font-size:10px; font-weight:850; box-shadow:0 2px 8px rgba(23,54,93,.08); }

@media (max-width: 700px) {
  main { padding-top: 18px; }
  .summary-grid { grid-template-columns: 1fr; }
  .summary-card { min-height: 108px; }
  .hours-strip { grid-template-columns: 1fr; }
  .shift-card-summary { grid-template-columns: auto 1fr; }
  .shift-role-stack { grid-column: 2; justify-items: start; }
  .swap-exchange { grid-template-columns: 1fr; }
  .swap-arrow { transform: rotate(90deg); }
  .field-pair { grid-template-columns: 1fr; }
  .team-filters { grid-template-columns: 1fr; }
  .team-member-row { grid-template-columns: minmax(0,1fr) auto; }
  .team-member-row .team-swap-button { grid-column: 1 / -1; width: 100%; }
  .employee-help-actions, .employee-tutorial-actions { grid-template-columns: 1fr; }
  .employee-tutorial-meta { flex-direction: column; gap: 4px; }
  .employee-tutorial-overlay { padding-top: max(72px, env(safe-area-inset-top)); }
}

@media (max-width: 390px) {
  .brand strong { font-size: 13px; }
  .connection-pill { display: none; }
  .topbar { gap: 8px; }
  .topbar-actions { gap: 5px; }
  .employee-help-dialog { width: calc(100% - 14px); max-height: 94vh; }
  .employee-help-header, .employee-help-lead, .employee-help-actions { padding-left: 14px; padding-right: 14px; }
  .employee-help-topics { padding-left: 14px; padding-right: 14px; }
  .task-actions { grid-template-columns: 1fr; }
  .shift-task-overview { align-items: start; flex-direction: column; }
  .shift-task-overview small { text-align: left; }
  .document-card { grid-template-columns: 38px 1fr; }
  .document-card .download-button { grid-column: 2; justify-self: start; }
  .bottom-nav button { padding-inline: 2px; font-size: 9px; }
  .bottom-nav button span { font-size: 18px; }
  .swap-card-heading { align-items: stretch; flex-direction: column; }
  .swap-status { align-self: start; }
  .swap-actions { display: grid; grid-template-columns: 1fr; }
}

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