:root {
  color-scheme: light;
  --bg: #fbfbf8;
  --surface: #ffffff;
  --ink: #17231d;
  --muted: #6f7972;
  --line: #e7ebe6;
  --green: #19764e;
  --green-dark: #135c3d;
  --green-soft: #edf7f1;
  --yellow: #d99b24;
  --yellow-soft: #fff4dc;
  --red: #a63b32;
  --red-soft: #fae9e7;
  --shadow: 0 10px 28px rgba(22, 34, 27, 0.055);
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--bg); touch-action: pan-x pan-y; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  touch-action: pan-x pan-y;
}

button, input, select, textarea { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
button:focus { outline: none; }
button:focus-visible { box-shadow: 0 0 0 3px rgba(25, 118, 78, .14); }
svg { width: 20px; height: 20px; flex: 0 0 auto; }
.hidden { display: none !important; }

.state-screen,
.auth-screen {
  width: min(440px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(32px, env(safe-area-inset-top)) 24px max(32px, env(safe-area-inset-bottom));
}

.state-screen {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
}

.brand-mark {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--green);
  color: white;
  font-size: 27px;
  font-weight: 900;
}

.brand-mark.small { width: 38px; height: 38px; font-size: 20px; }

.loader {
  width: 22px;
  height: 22px;
  border: 2px solid var(--line);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.auth-screen { display: flex; flex-direction: column; justify-content: center; gap: 28px; }
.auth-brand, .side-brand { display: flex; align-items: center; gap: 12px; }
.auth-brand > div:last-child, .side-brand > div:last-child { display: grid; }
.auth-brand strong, .side-brand strong { font-size: 20px; line-height: 1; }
.auth-brand span, .side-brand span { color: var(--muted); font-size: 11px; margin-top: 4px; }
.auth-copy { display: grid; gap: 10px; }
.auth-copy.centered { text-align: center; }
.auth-copy h1 { font-size: 34px; line-height: 1.08; }
h1, h2, p { margin: 0; }
h1 { font-size: 28px; line-height: 1.1; }
h2 { font-size: 20px; line-height: 1.2; }
p { color: var(--muted); line-height: 1.55; }
.eyebrow { color: var(--green); font-size: 10px; font-weight: 750; text-transform: uppercase; }

.form-stack { display: grid; gap: 16px; }
label { display: grid; gap: 7px; color: #4f5d55; font-size: 13px; font-weight: 650; }
input, select, textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 13px;
  background: var(--surface);
  color: var(--ink);
  outline: none;
}
input:focus, select:focus, textarea:focus { border-color: #79b894; box-shadow: 0 0 0 3px rgba(25, 118, 78, .1); }
textarea { resize: vertical; }
.input-prefix { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 7px; background: white; padding-left: 13px; }
.input-prefix span { color: var(--muted); }
.input-prefix input { border: 0; box-shadow: none; }

button, .button-link {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 0 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  text-decoration: none;
}
.primary { background: var(--green); color: white; box-shadow: 0 8px 18px rgba(25, 118, 78, .13); }
.primary:hover { background: var(--green-dark); }
.secondary { background: #f3f5f2; color: var(--ink); border: 1px solid var(--line); }
.ghost { background: transparent; color: var(--ink); }
.wide { width: 100%; }
.text-btn { min-height: 34px; padding: 0; background: transparent; color: var(--green); }
.icon-btn { width: 44px; padding: 0; }
.danger-soft { color: var(--red); background: var(--red-soft); }
.status-icon { width: 74px; height: 74px; display: grid; place-items: center; margin: 0 auto; border-radius: 50%; background: var(--green-soft); color: var(--green); }
.status-icon svg { width: 34px; height: 34px; }
.status-icon.blocked { background: var(--red-soft); color: var(--red); }

.notice { border-radius: 8px; padding: 12px 14px; line-height: 1.45; font-size: 14px; }
.notice.neutral { background: #eef1ef; color: #4d5a52; }
.notice.success { background: var(--green-soft); color: var(--green-dark); }
.notice.error { background: var(--red-soft); color: var(--red); }
.notice.warning { background: var(--yellow-soft); color: #765713; }

.app-shell { min-height: 100vh; }
.sidebar {
  width: 236px;
  position: fixed;
  inset: 0 auto 0 0;
  padding: 24px 14px;
  border-right: 1px solid var(--line);
  background: #f6f8f5;
  display: flex;
  flex-direction: column;
  z-index: 10;
}
.side-brand { padding: 0 8px 26px; }
.side-nav { display: grid; gap: 5px; }
.side-nav button { justify-content: flex-start; min-height: 46px; background: transparent; color: #516057; }
.side-nav button.active { color: var(--green-dark); background: white; box-shadow: var(--shadow); }
.side-user { margin-top: auto; padding: 14px 8px 0; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; min-width: 0; }
.side-user > div:last-child { display: grid; min-width: 0; }
.side-user strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user span { color: var(--muted); font-size: 11px; margin-top: 3px; }
.avatar { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 50%; background: var(--green-soft); color: var(--green-dark); font-size: 12px; font-weight: 850; }

.workspace { margin-left: 236px; min-height: 100vh; }
.topbar { height: 78px; position: sticky; top: 0; z-index: 8; padding: 14px 30px; border-bottom: 1px solid var(--line); background: rgba(251, 251, 248, .94); backdrop-filter: blur(16px); display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; }
.topbar > div { display: grid; gap: 4px; }
.topbar > .top-actions { display: flex; align-items: center; gap: 12px; }
.page-heading { min-width: 0; overflow: hidden; }
.topbar h1 { min-width: 0; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 22px; font-weight: 760; line-height: 1.08; }
#pageTitleText { min-width: 0; }
.page-greeting { min-width: 0; max-width: min(380px, 44vw); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #334039; font-size: .72em; font-weight: 650; }
.page-greeting::before { content: "·"; margin-right: 8px; color: var(--muted); font-weight: 650; }
.page-subline { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 13px; line-height: 1.2; }
.connection { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; }
.connection > span { width: 7px; height: 7px; border-radius: 50%; background: #35a269; box-shadow: 0 0 0 3px #dceee4; }
.top-profile { min-height: 0; max-width: min(320px, 42vw); min-width: 0; display: flex; align-items: center; gap: 9px; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; }
.top-profile strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.top-profile > svg { width: 15px; height: 15px; color: var(--muted); }
.content { width: min(1120px, 100%); margin: 0 auto; padding: 30px 30px 60px; }
.view { display: none; }
.view.active { display: block; }
.bottom-nav { display: none; }

.welcome-row, .box-toolbar, .section-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.welcome-row { margin-bottom: 24px; }
.welcome-row > div { display: grid; gap: 6px; }
.welcome-row h2 { font-size: 23px; font-weight: 760; }

.shift-panel { min-height: 86px; margin-bottom: 14px; padding: 14px; display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 12px; border: 1px solid #cbe3d4; border-radius: 8px; background: #fcfefc; box-shadow: var(--shadow); }
.shift-panel.not-started { border-color: var(--line); background: white; }
.shift-panel.ended { border-color: #ead8aa; background: #fffdf6; }
.shift-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 8px; background: var(--green-soft); color: var(--green); }
.shift-panel.not-started .shift-icon { background: #eef1ef; color: var(--muted); }
.shift-panel.ended .shift-icon { background: var(--yellow-soft); color: #8d600e; }
.shift-copy { min-width: 0; display: grid; gap: 3px; }
.shift-copy small { color: var(--muted); overflow-wrap: anywhere; }
.shift-list { display: grid; gap: 8px; }
.shift-row { min-height: 76px; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: white; box-shadow: 0 4px 14px rgba(22, 34, 27, .035); }
.shift-row > div:nth-child(2) { min-width: 0; display: grid; gap: 4px; }
.shift-row span, .shift-row small { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.shift-status { padding: 5px 8px; border-radius: 999px; background: var(--green-soft); color: var(--green-dark); font-size: 11px; font-weight: 800; }
.shift-status.ended { background: var(--yellow-soft); color: #805a11; }

.metrics { display: grid; grid-template-columns: 1.35fr 1fr 1fr; gap: 12px; margin-bottom: 30px; }
.metric { min-height: 136px; padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); display: flex; flex-direction: column; justify-content: space-between; box-shadow: 0 4px 18px rgba(22, 34, 27, .035); }
.metric span { color: var(--muted); font-size: 13px; }
.metric-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.metric-label svg { width: 18px; height: 18px; color: var(--green); order: 2; }
.metric strong { font-size: 31px; line-height: 1; font-weight: 760; }
.metric small { color: var(--muted); }
.metric.accent { background: #f1f8f4; border-color: #c8e3d2; color: var(--ink); }
.metric.accent span, .metric.accent small { color: #617469; }
.metric.accent .metric-label svg { color: var(--green); }
.metric.warning { background: #fffaf0; border-color: #f0dfb7; }
.section-head { margin: 24px 0 12px; }
.section-head > div { display: grid; gap: 4px; }
.section-meta { color: var(--muted); font-size: 12px; }

.tasks-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.task-card { display: grid; gap: 12px; min-height: 156px; padding: 15px; border: 1px solid var(--line); border-radius: 8px; background: white; box-shadow: 0 4px 14px rgba(22, 34, 27, .035); }
.task-card.done { border-color: #acd0bc; background: #fbfefc; }
.task-top { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 10px; }
.task-top > div:nth-child(2) { display: grid; gap: 4px; min-width: 0; }
.task-top span, .task-card small { color: var(--muted); font-size: 12px; }
.task-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 7px; background: var(--green-soft); color: var(--green); }
.task-scan, .task-remove { width: 38px; min-height: 38px; padding: 0; background: #eef1ef; color: var(--green-dark); }
.task-remove { color: var(--red); background: var(--red-soft); }
.progress-label { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; }
.progress-label strong { color: var(--ink); }
.progress { height: 7px; border-radius: 999px; background: #e7ebe8; overflow: hidden; }
.progress > span, .progress > i { height: 100%; display: block; border-radius: inherit; background: var(--green); }

.work-breakdown, .records, .people-list, .box-list { display: grid; gap: 8px; }
.work-row { min-height: 68px; display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: white; box-shadow: 0 4px 14px rgba(22, 34, 27, .03); }
.work-symbol, .record-icon, .box-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 8px; background: var(--green-soft); color: var(--green); }
.work-row > div:nth-child(2) { display: grid; gap: 4px; }
.work-row span { color: var(--muted); font-size: 12px; }

.record { min-height: 76px; display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 12px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 8px; background: white; box-shadow: 0 4px 14px rgba(22, 34, 27, .025); }
.record:first-child { border-top: 1px solid var(--line); }
.record-main { min-width: 0; display: grid; gap: 4px; font-size: 13px; }
.record-title { display: flex; justify-content: space-between; gap: 12px; }
.record small { color: var(--muted); }
.record-action { width: 38px; min-height: 38px; padding: 0; background: var(--red-soft); color: var(--red); }
.record.canceled { opacity: .5; }
.record.canceled .record-icon { background: var(--red-soft); color: var(--red); }
.empty { min-height: 110px; display: grid; place-content: center; justify-items: center; gap: 10px; color: var(--muted); border: 1px dashed #d7ddd7; border-radius: 8px; background: rgba(255, 255, 255, .55); }
.empty svg { width: 26px; height: 26px; }
.audit-list { display: grid; gap: 6px; }
.audit-row { min-height: 62px; display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.audit-row > div:last-child { min-width: 0; display: grid; gap: 3px; }
.audit-row span, .audit-row small { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }

.scan-layout { width: 100%; min-width: 0; display: grid; grid-template-columns: minmax(340px, 1.1fr) minmax(300px, .9fr); gap: 22px; align-items: start; }
.scanner-zone, .scan-controls { width: 100%; min-width: 0; display: grid; gap: 12px; }
.scan-session { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.scan-session > div { min-height: 82px; display: grid; align-content: center; gap: 5px; padding: 13px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.scan-session span { color: var(--muted); font-size: 12px; }
.scan-session strong { font-size: 22px; }
.scanner { width: 100%; min-width: 0; max-width: none; min-height: 430px; overflow: hidden; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: #17221d; color: white; box-shadow: 0 8px 22px rgba(22, 34, 27, .08); }
.scanner-empty { display: grid; justify-items: center; gap: 7px; color: #bdc6c0; }
.scanner-empty svg { width: 58px; height: 58px; margin-bottom: 5px; }
.scanner-empty span { font-size: 13px; }
.scanner > div,
.scanner video,
.scanner canvas { width: 100% !important; max-width: none !important; }
.scanner video { height: 100% !important; object-fit: cover !important; }
.operation-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.operation-choice { display: block; }
.operation-choice input { position: absolute; width: 1px; min-height: 1px; opacity: 0; pointer-events: none; }
.operation-choice span { min-height: 48px; display: grid; place-items: center; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--ink); text-align: center; box-shadow: 0 2px 10px rgba(22, 34, 27, .025); }
.operation-choice input:checked + span { border-color: #8bc3a2; background: var(--green-soft); color: var(--green-dark); box-shadow: inset 0 0 0 1px #8bc3a2; }
.manual-entry { border-top: 1px solid var(--line); padding-top: 12px; }
.manual-entry summary { min-height: 42px; display: flex; align-items: center; gap: 8px; color: var(--green); font-weight: 700; cursor: pointer; list-style: none; }
.manual-entry textarea { margin: 8px 0; }
.range-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0; }
.issue-trigger { min-height: 70px; justify-content: flex-start; padding: 12px 14px; border: 1px solid #ead8aa; background: #fffdf6; color: #654c14; text-align: left; }
.issue-trigger.rework-trigger { border-color: #b8d4c3; background: #f4fbf7; color: var(--green-dark); }
.issue-trigger > svg:first-child { width: 26px; height: 26px; flex: 0 0 26px; color: #a06c0c; }
.issue-trigger.rework-trigger > svg:first-child { color: var(--green); }
.issue-trigger > svg:last-child { width: 18px; height: 18px; margin-left: auto; }
.issue-trigger > span { min-width: 0; display: grid; gap: 4px; }
.issue-trigger small { color: #8b7444; font-weight: 500; }
.scan-result { min-height: 76px; display: flex; align-items: center; font-size: 15px; font-weight: 700; }
.queue-status { min-height: 48px; display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid #dfc585; border-radius: 7px; background: #fffaf0; color: #765713; font-size: 13px; }
.queue-status .text-btn { margin-left: auto; }

.issue-list { display: grid; gap: 8px; }
.issue-card { min-height: 94px; display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: start; gap: 12px; padding: 14px; border: 1px solid var(--line); border-left: 4px solid #d49a2e; border-radius: 8px; background: white; }
.issue-card.resolved { border-left-color: var(--green); }
.issue-card.rejected { border-left-color: var(--red); opacity: .72; }
.issue-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 7px; background: var(--yellow-soft); color: #8d600e; }
.issue-card.resolved .issue-icon { background: var(--green-soft); color: var(--green); }
.issue-card.rejected .issue-icon { background: var(--red-soft); color: var(--red); }
.issue-main { min-width: 0; display: grid; gap: 5px; font-size: 13px; }
.issue-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.issue-main small { color: var(--muted); }
.issue-main p { margin-top: 3px; color: #4b5850; font-size: 12px; }
.issue-main p.resolution { padding-top: 6px; border-top: 1px solid var(--line); color: var(--green-dark); }
.issue-photo { width: min(280px, 100%); max-height: 220px; object-fit: cover; border-radius: 7px; border: 1px solid var(--line); }
.issue-status { flex: 0 0 auto; padding: 4px 7px; border-radius: 999px; background: var(--yellow-soft); color: #805a11; font-size: 10px; font-weight: 800; }
.issue-status.resolved { background: var(--green-soft); color: var(--green-dark); }
.issue-status.rejected { background: var(--red-soft); color: var(--red); }
.issue-action { width: 40px; min-height: 40px; padding: 0; background: #edf1ee; color: var(--green-dark); }

.period-switch, .admin-tabs { width: fit-content; display: flex; padding: 4px; border-radius: 8px; background: #f0f3ef; gap: 2px; margin-bottom: 18px; border: 1px solid var(--line); }
.period-switch button, .admin-tabs button { min-height: 38px; background: transparent; color: var(--muted); }
.period-switch button.active, .admin-tabs button.active { background: white; color: var(--ink); box-shadow: 0 2px 8px rgba(20, 37, 27, .055); }
.salary-total { min-height: 164px; display: flex; flex-direction: column; justify-content: center; padding: 24px; border: 1px solid #c8e3d2; border-radius: 8px; background: #f1f8f4; color: var(--ink); box-shadow: var(--shadow); }
.salary-total span, .salary-total small { color: #617469; }
.salary-total strong { font-size: 44px; margin: 10px 0; font-weight: 760; }
.date-range { display: flex; align-items: end; gap: 9px; margin: 0 0 14px; }
.date-range label { min-width: 150px; }
.export-button { margin-top: 10px; }
.admin-export { padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: white; box-shadow: 0 4px 14px rgba(22, 34, 27, .03); }

.box-toolbar { margin-bottom: 16px; }
.box-toolbar > div { display: grid; gap: 4px; }
.inline-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end; gap: 10px; padding: 16px; margin-bottom: 12px; border: 1px solid var(--line); border-radius: 8px; background: white; box-shadow: var(--shadow); }
.box-form-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; }
.box-form-actions button { min-width: 140px; }
.box-scan-row { display: grid; grid-template-columns: 1fr 1.4fr auto auto; align-items: end; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: white; box-shadow: var(--shadow); }
.box-card { min-height: 84px; display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: start; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: white; box-shadow: 0 4px 14px rgba(22, 34, 27, .03); }
.box-main { min-width: 0; display: grid; gap: 10px; }
.box-main > div:first-child { display: grid; gap: 4px; }
.box-main strong, .box-main span, .box-main small { min-width: 0; overflow-wrap: anywhere; }
.box-card span, .box-card small { color: var(--muted); font-size: 12px; }
.box-card .status { width: fit-content; border-radius: 999px; padding: 5px 9px; font-size: 12px; font-weight: 750; }
.box-card .status.open { background: var(--yellow-soft); color: #805a11; }
.box-card .status.closed { background: var(--green-soft); color: var(--green-dark); }
.box-items { display: grid; gap: 6px; }
.box-items > div { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 7px 9px; padding: 7px 9px; border-radius: 7px; background: #f3f5f3; }
.box-items > div > span { grid-row: 1 / 3; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: white; color: var(--green-dark); font-weight: 850; }
.box-items strong, .box-items small { overflow-wrap: anywhere; }
.box-actions { grid-column: 2; display: grid; justify-items: start; gap: 9px; }
.box-card-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.text-action { min-height: 32px; padding: 0 2px; background: transparent; color: #516057; font-size: 13px; font-weight: 650; }
.text-action.danger { color: var(--red); }
.box-export-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-start; }
.box-actions button { min-height: 36px; padding: 0 10px; }
.box-card-controls .text-action { min-height: 32px; padding: 0 2px; }
.box-swipe { border-radius: 8px; }
#boxResult { margin-top: 10px; }

.admin-panel { display: none; }
.admin-panel.active { display: block; }
.section-head.compact { margin-top: 10px; }
.compact-metrics { margin-bottom: 12px; }
.settings-grid, .help-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.setting-row, .help-card { padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.setting-row { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.setting-row span, .help-card p { color: var(--muted); }
.setting-row label { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 800; }
.setting-row input { width: 20px; height: 20px; }
.help-card { display: grid; gap: 6px; }
.help-card h3 { margin: 0; font-size: 17px; }
.help-card p { margin: 0; line-height: 1.4; }
.admin-metrics { grid-template-columns: repeat(4, 1fr); }
.timesheet-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 12px 0; }
.timesheet-summary article { min-height: 84px; display: grid; gap: 6px; align-content: center; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: white; box-shadow: 0 4px 14px rgba(22, 34, 27, .03); }
.timesheet-summary span { color: var(--muted); font-size: 12px; }
.timesheet-summary strong { font-size: 28px; font-weight: 760; }
.timesheet-scroll { overflow: auto; border: 1px solid #9aa39b; border-radius: 8px; background: white; box-shadow: 0 4px 14px rgba(22, 34, 27, .03); }
.timesheet-table { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; font-size: 11px; line-height: 1.1; }
.timesheet-table th, .timesheet-table td { min-width: 34px; height: 30px; padding: 4px 5px; border-right: 1px solid #4f5a52; border-bottom: 1px solid #4f5a52; text-align: center; white-space: nowrap; }
.timesheet-table th { position: sticky; top: 0; z-index: 2; background: #d8ded9; color: #18211c; font-weight: 800; }
.timesheet-table thead tr:nth-child(2) th { top: 30px; }
.timesheet-table .fixed-head { vertical-align: bottom; background: #d8ded9; }
.timesheet-table .fixed-head.num { min-width: 30px; }
.timesheet-table .fixed-head.name { min-width: 220px; }
.timesheet-table .fixed-head.vertical { width: 42px; min-width: 42px; height: 82px; writing-mode: vertical-rl; transform: rotate(180deg); line-height: 1.2; }
.timesheet-table .row-num { min-width: 30px; background: #f2f4f2; }
.timesheet-table .employee-name { position: sticky; left: 0; z-index: 1; min-width: 220px; max-width: 260px; text-align: left; background: white; box-shadow: 1px 0 0 #4f5a52; }
.timesheet-table .employee-name strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timesheet-table .role-cell, .timesheet-table .section-cell { background: #f2f4f2; }
.timesheet-table .role-cell.helper { background: #54cdd0; }
.timesheet-table .section-cell.green { background: #25c932; font-weight: 800; }
.timesheet-table .weekend { background: #d87922; color: white; font-weight: 800; }
.timesheet-table .day-cell.active { background: #22c322; color: #0e1a11; font-weight: 800; }
.badge { min-width: 20px; height: 20px; display: inline-grid; place-items: center; border-radius: 50%; background: var(--red); color: white; font-size: 11px; }
.person { display: grid; grid-template-columns: 42px minmax(180px, 1fr) minmax(360px, auto); align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.person.pending { border-left: 4px solid var(--yellow); }
.person.blocked { border-left: 4px solid var(--red); background: #fffafa; }
.person.blocked .avatar { background: var(--red-soft); color: var(--red); }
.person-info { display: grid; gap: 3px; }
.person-info span, .person-info small { color: var(--muted); font-size: 12px; }
.person-controls { display: grid; grid-template-columns: minmax(190px, 1fr) minmax(150px, .7fr) auto auto; gap: 8px; }
.person-controls label { display: grid; gap: 4px; color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.person-controls label select { width: 100%; }
.person-controls > button:only-of-type { grid-column: 3 / -1; }
.person.dirty { border-color: #8dc5a4; background: #fbfffc; }

.team-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.team-row { min-height: 70px; display: grid; grid-template-columns: 24px 38px 1fr auto; align-items: center; gap: 10px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.team-rank { color: var(--muted); font-size: 12px; font-weight: 800; text-align: center; }
.team-row > div:nth-child(3), .team-result { display: grid; gap: 3px; }
.team-row > div:nth-child(3) span, .team-result span { color: var(--muted); font-size: 11px; }
.team-result { text-align: right; }
.team-result strong { font-size: 20px; }

.list-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.search-field { width: min(420px, 100%); position: relative; }
.search-field svg { position: absolute; left: 13px; top: 13px; width: 18px; height: 18px; color: var(--muted); }
.search-field input { padding-left: 40px; }

.task-form { display: grid; grid-template-columns: 1.2fr 1fr .8fr .65fr; align-items: end; gap: 10px; margin-bottom: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: white; box-shadow: var(--shadow); }
.task-note { grid-column: 1 / 4; }
.task-form-actions { display: flex; justify-content: flex-end; gap: 8px; }
.admin-task-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.plan-form { display: grid; grid-template-columns: 1fr 1.2fr .8fr .8fr; align-items: end; gap: 10px; margin-bottom: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: white; box-shadow: var(--shadow); }
.plan-route { grid-column: 1 / -1; margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 7px; }
.plan-route legend { padding: 0 6px; color: var(--green); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.plan-route > div { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.check-row { min-height: 42px; display: flex; align-items: center; gap: 9px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--ink); }
.check-row input { width: 18px; min-height: 18px; flex: 0 0 18px; padding: 0; }
.plan-note { grid-column: 1 / 4; }
.plans-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.plan-card { display: grid; gap: 14px; padding: 16px; border: 1px solid var(--line); border-top: 3px solid var(--green); border-radius: 8px; background: white; box-shadow: 0 4px 14px rgba(22, 34, 27, .03); }
.plan-card.paused { border-left-color: var(--yellow); background: #fffdf8; }
.plan-card.completed { border-left-color: #86928a; opacity: .78; }
.plan-head { display: flex; justify-content: space-between; gap: 12px; }
.plan-head > div { display: grid; gap: 4px; }
.plan-head h3 { margin: 0; font-size: 17px; }
.plan-head small, .plan-card p { color: var(--muted); font-size: 12px; }
.status { height: fit-content; padding: 5px 8px; border-radius: 999px; background: var(--green-soft); color: var(--green-dark); font-size: 11px; font-weight: 800; white-space: nowrap; }
.status.paused { background: var(--yellow-soft); color: #805a11; }
.status.completed { background: #edf0ed; color: var(--muted); }
.plan-progress { display: grid; gap: 9px; }
.plan-progress > div { display: grid; gap: 5px; }
.plan-progress span { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; }
.plan-progress i { font-style: normal; }
.plan-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.code-builder { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: 18px; align-items: start; }
.code-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: white; box-shadow: var(--shadow); }
.code-form > button { grid-column: 1 / -1; }
.code-form > .check-row { grid-column: 1 / -1; }
.price-grid { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 4px 0; padding: 13px; border: 1px solid var(--line); border-radius: 8px; background: #fcfdfb; }
.price-grid legend { padding: 0 6px; color: var(--green); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.code-output { display: grid; justify-items: stretch; gap: 11px; padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: white; text-align: center; box-shadow: var(--shadow); }
.qr-placeholder, #generatedQr img, #generatedQr canvas { width: 220px !important; height: 220px !important; margin: 0 auto; }
.qr-placeholder { display: grid; place-items: center; background: #f4f7f4; color: #9aa59e; border-radius: 8px; }
.qr-placeholder svg { width: 70px; height: 70px; }
#signedCode { font-size: 10px; line-height: 1.35; word-break: break-all; }

.chat-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 14px; align-items: start; }
.chat-toolbar { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.chat-rooms { display: grid; gap: 8px; }
.chat-rooms button { min-height: 66px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--ink); text-align: left; }
.chat-rooms button.active { border-color: rgba(23, 128, 78, .35); background: var(--green-soft); }
.chat-rooms strong, .chat-rooms span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-rooms span { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.chat-rooms b { min-width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--green); color: white; font-size: 11px; }
.chat-panel { min-width: 0; display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.chat-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.chat-panel-head > div { min-width: 0; display: grid; gap: 3px; }
.chat-panel-head strong, .chat-panel-head span, .chat-panel-head small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-panel-head span { color: var(--muted); font-size: 12px; }
.chat-panel-head small { color: var(--muted); font-size: 11px; }
.chat-pinned { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 9px; padding: 10px; border-radius: 8px; background: var(--yellow-soft); color: #5f420c; }
.chat-pinned svg { width: 20px; height: 20px; margin-top: 2px; }
.chat-pinned span, .chat-pinned small { display: block; margin-top: 3px; line-height: 1.35; }
.chat-pinned small { color: #80642b; font-size: 11px; }
.chat-pin-box { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.chat-messages { height: min(58vh, 560px); min-height: 320px; overflow: auto; display: flex; flex-direction: column; gap: 7px; padding: 4px; }
.chat-message { width: fit-content; min-width: 150px; max-width: min(72%, 420px); align-self: flex-start; display: grid; gap: 4px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.chat-message.mine { align-self: flex-end; background: var(--green-soft); border-color: rgba(23, 128, 78, .22); }
.chat-message > div { display: flex; align-items: baseline; justify-content: space-between; gap: 9px; color: var(--muted); font-size: 10px; }
.chat-message > div strong { color: var(--ink); font-size: 12px; }
.chat-message p { margin: 0; line-height: 1.3; word-break: break-word; }
.chat-message small { color: var(--muted); font-size: 10px; }
.chat-send { display: grid; grid-template-columns: minmax(0, 1fr) 50px; gap: 8px; align-items: end; }
.chat-send textarea { min-height: 50px; max-height: 92px; resize: none; padding: 12px 14px; }
.chat-send button { width: 50px; min-width: 50px; height: 50px; min-height: 50px; padding: 0; display: grid; place-items: center; border-radius: 8px; }
.chat-send button svg { width: 20px; height: 20px; stroke-width: 2; }
.chat-form { display: grid; gap: 10px; margin-bottom: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.chat-form-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.chat-members { max-height: 260px; overflow: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.chat-members .empty { grid-column: 1 / -1; }

.toast { position: fixed; z-index: 60; right: 22px; bottom: 22px; min-height: 48px; max-width: min(380px, calc(100vw - 28px)); display: flex; align-items: center; gap: 10px; padding: 12px 15px; border-radius: 8px; background: var(--green-dark); color: white; box-shadow: 0 12px 34px rgba(17, 50, 33, .2); }
.toast.error { background: var(--red); }

.modal { width: min(430px, calc(100% - 28px)); border: 0; border-radius: 8px; padding: 0; color: var(--ink); box-shadow: 0 24px 70px rgba(12, 25, 17, .25); }
.modal::backdrop { background: rgba(14, 25, 18, .55); }
.modal form { display: grid; justify-items: stretch; gap: 15px; padding: 24px; }
.modal h2, .modal p { text-align: center; }
.modal-icon { width: 48px; height: 48px; display: grid; place-items: center; justify-self: center; border-radius: 50%; background: var(--red-soft); color: var(--red); }
.modal-icon.issue { background: var(--yellow-soft); color: #8d600e; }
.modal-heading { display: grid; grid-template-columns: 48px 1fr; align-items: center; gap: 13px; }
.modal-heading .modal-icon { justify-self: stretch; }
.modal-heading h2, .modal-heading p { text-align: left; }
.modal-heading p { margin-top: 4px; font-size: 12px; line-height: 1.4; }
.issue-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
.modal-actions.three { grid-template-columns: auto 1fr 1fr; }
.danger-button { background: var(--red); color: white; }
.danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 24px; padding: 14px; border: 1px solid #e2b8b3; border-radius: 8px; background: #fffafa; }
.danger-zone > div { display: grid; gap: 4px; }
.danger-zone span { color: var(--muted); font-size: 12px; line-height: 1.4; }

@media (max-width: 900px) {
  .sidebar { display: none; }
  .workspace { width: 100%; max-width: 100%; margin-left: 0; padding-bottom: 76px; overflow-x: hidden; }
  .connection { display: none; }
  .top-actions { min-width: 0; justify-content: flex-end; }
  .top-profile { max-width: min(260px, 46vw); }
  .bottom-nav { position: fixed; z-index: 20; inset: auto 0 0; min-height: 66px; padding: 6px 8px max(6px, env(safe-area-inset-bottom)); display: flex; justify-content: space-around; border-top: 1px solid var(--line); background: rgba(255, 255, 255, .96); backdrop-filter: blur(16px); }
  .bottom-nav button { min-width: 58px; min-height: 52px; flex-direction: column; gap: 3px; padding: 3px 7px; background: transparent; color: var(--muted); font-size: 10px; }
  .bottom-nav button svg { width: 20px; height: 20px; }
  .bottom-nav button.active { color: var(--green); background: var(--green-soft); }
  .content, .view { width: 100%; min-width: 0; max-width: none; }
  .content { padding-bottom: 24px; }
  .scan-layout { grid-template-columns: minmax(0, 1fr); }
  .admin-metrics { grid-template-columns: repeat(2, 1fr); }
  .box-scan-row { grid-template-columns: 1fr 1fr; }
  .admin-task-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plans-list { grid-template-columns: 1fr; }
  .code-builder { grid-template-columns: 1fr; }
  .chat-layout { grid-template-columns: 1fr; }
  .chat-rooms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .topbar { min-height: 72px; height: auto; padding: 10px 16px; }
  .topbar h1 { font-size: 19px; gap: 6px; }
  .page-greeting { max-width: calc(100vw - 145px); }
  .page-greeting::before { margin-right: 6px; }
  .page-subline { font-size: 12px; }
  .top-actions { min-width: 0; }
  .top-profile .avatar { width: 32px; height: 32px; flex-basis: 32px; }
  .content { padding: 18px 14px 26px; }
  .welcome-row { align-items: flex-start; }
  .welcome-row h2 { font-size: 21px; }
  .welcome-row { flex-wrap: wrap; }
  .shift-panel { grid-template-columns: 40px minmax(0, 1fr); }
  .shift-panel > button { grid-column: 1 / -1; width: 100%; }
  .metrics { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .metric { min-height: 112px; padding: 14px; }
  .metric:first-child { grid-column: 1 / -1; min-height: 124px; }
  .metric strong { font-size: 27px; }
  .scanner { min-height: min(410px, 56vh); }
  .operation-choices { grid-template-columns: repeat(2, 1fr); }
  .salary-total { min-height: 150px; }
  .salary-total strong { font-size: 38px; }
  .inline-form, .box-scan-row { grid-template-columns: 1fr; }
  .box-card { grid-template-columns: 38px minmax(0, 1fr); }
  .box-actions { grid-column: 2; justify-items: start; }
  .box-export-actions { justify-content: flex-start; }
  .box-toolbar { align-items: flex-start; }
  .box-toolbar button { min-width: 46px; padding: 0 12px; }
  .admin-tabs { width: 100%; overflow-x: auto; }
  .admin-tabs button { flex: 0 0 auto; white-space: nowrap; padding: 0 10px; }
  .admin-metrics { grid-template-columns: repeat(2, 1fr); }
  .admin-metrics .metric:first-child { grid-column: 1 / -1; }
  .timesheet-summary { grid-template-columns: 1fr 1fr; }
  .timesheet-summary article:first-child { grid-column: 1 / -1; }
  .timesheet-table .fixed-head.name, .timesheet-table .employee-name { min-width: 170px; max-width: 190px; }
  .person { grid-template-columns: 42px 1fr; }
  .person-controls { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; }
  .settings-grid, .help-grid { grid-template-columns: 1fr; }
  .person-controls select { grid-column: auto; }
  .person-controls > button:only-of-type { grid-column: 1 / -1; }
  .tasks-grid, .team-list, .admin-task-grid { grid-template-columns: 1fr; }
  .task-form { grid-template-columns: 1fr 1fr; }
  .task-note { grid-column: 1 / -1; }
  .task-form-actions { grid-column: 1 / -1; }
  .plan-form { grid-template-columns: 1fr 1fr; }
  .plan-route, .plan-note, .plan-form .task-form-actions { grid-column: 1 / -1; }
  .plan-route > div { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .date-range { align-items: stretch; flex-wrap: wrap; }
  .date-range label { min-width: calc(50% - 5px); flex: 1; }
  .date-range button { width: 100%; }
  .toast { right: 14px; bottom: 84px; }
  .record { grid-template-columns: 34px 1fr auto; gap: 9px; padding: 12px 4px; }
  .record-icon { width: 34px; height: 34px; }
  .record-main > div:not(.record-title) { line-height: 1.4; }
  .code-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .price-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chat-rooms, .chat-members { grid-template-columns: 1fr; }
  .chat-message { max-width: 94%; }
  .chat-pin-box { grid-template-columns: 1fr; }
  .issue-card { grid-template-columns: 38px minmax(0, 1fr) auto; padding: 12px 10px; gap: 9px; }
  .issue-icon, .issue-action { width: 38px; height: 38px; }
  .issue-title { align-items: flex-start; }
  .shift-row { grid-template-columns: 38px minmax(0, 1fr); }
  .shift-status { grid-column: 2; justify-self: start; }
  .modal-actions.three { grid-template-columns: 1fr 1fr; }
  .modal-actions.three .secondary { grid-column: 1 / -1; order: 3; }
  .danger-zone { align-items: stretch; flex-direction: column; }
}

@media (max-width: 380px) {
  .bottom-nav button { min-width: 50px; padding-inline: 4px; }
  .operation-choices { grid-template-columns: 1fr; }
  .person-controls { grid-template-columns: 1fr; }
  .person-controls select, .person-controls > button { grid-column: 1; width: 100%; }
  .task-form { grid-template-columns: 1fr; }
  .task-note, .task-form-actions { grid-column: auto; }
  .plan-form { grid-template-columns: 1fr; }
  .plan-route, .plan-note, .plan-form .task-form-actions { grid-column: auto; }
  .plan-route > div { grid-template-columns: 1fr; }
  .modal-actions { grid-template-columns: 1fr; }
  .code-form, .price-grid { grid-template-columns: 1fr; }
  .chat-send { grid-template-columns: minmax(0, 1fr) 48px; }
  .issue-fields { grid-template-columns: 1fr; }
}

/* Lighter visual system */
:root {
  --bg: #f7f9f7;
  --surface: #ffffff;
  --ink: #17221c;
  --muted: #78827c;
  --line: #e5eae6;
  --green: #16764c;
  --green-dark: #105c3a;
  --green-soft: #eef8f2;
  --shadow: 0 2px 10px rgba(22, 34, 27, .035);
}

body { -webkit-font-smoothing: antialiased; }
h1, h2 { font-weight: 680; }
.eyebrow { font-size: 10px; font-weight: 700; }

button, .button-link {
  min-height: 43px;
  font-weight: 650;
  transition: background-color .16s ease, color .16s ease, border-color .16s ease, transform .16s ease;
}
button:active, .button-link:active { transform: scale(.985); }
.primary { box-shadow: none; }
.secondary { background: white; }

input, select, textarea {
  min-height: 45px;
  border-color: #dfe5e0;
  background: #fff;
}

.sidebar { background: #fbfcfb; }
.side-nav button { font-weight: 600; }
.side-nav button.active { background: var(--green-soft); box-shadow: none; }

.topbar {
  height: 68px;
  padding: 11px 30px;
  background: rgba(247, 249, 247, .92);
}
.topbar h1 { font-size: 20px; font-weight: 680; }
.page-heading { gap: 2px !important; }
.content { padding-top: 24px; }

.shift-panel,
.metric,
.task-card,
.work-row,
.record,
.audit-row,
.scan-session > div,
.issue-card,
.admin-export,
.inline-form,
.box-scan-row,
.box-card,
.person,
.task-form,
.plan-form,
.plan-card,
.code-form,
.code-output,
.salary-total {
  box-shadow: none;
  border-color: var(--line);
}

.shift-panel { padding: 13px; background: rgba(255,255,255,.8); }
.shift-icon, .work-symbol, .record-icon, .box-icon, .task-icon { background: #f1f5f2; }
.metrics { gap: 10px; margin-bottom: 26px; }
.metric { min-height: 124px; padding: 16px; }
.metric strong { font-size: 29px; font-weight: 680; }
.metric.accent { background: #f4faf6; border-color: #d8e9de; }
.section-head { margin-top: 28px; }
.section-head h2 { font-size: 19px; }

.task-card { min-height: 144px; }
.work-row, .record, .shift-row, .box-card { background: rgba(255,255,255,.82); }
.empty { background: rgba(255,255,255,.35); border-color: #dfe5e0; }

.period-switch, .admin-tabs {
  padding: 3px;
  border-color: transparent;
  background: #edf1ee;
}
.period-switch button.active, .admin-tabs button.active { box-shadow: none; }

.operation-choice span { box-shadow: none; }
.operation-choice input:checked + span { box-shadow: none; }
.scanner { box-shadow: none; }
.issue-trigger { background: #fffdf8; }

.bottom-nav button.active { background: transparent; }
.bottom-nav button.active svg { stroke-width: 2.4; }

.modal { box-shadow: 0 18px 48px rgba(12, 25, 17, .18); }
.toast { box-shadow: 0 8px 24px rgba(17, 50, 33, .16); }

.entry-greeting {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 24px;
  background: var(--bg);
  color: var(--muted);
  font-size: 22px;
  animation: entryGreeting 1.5s ease both;
}
.entry-greeting strong { color: var(--ink); font-weight: 680; }

@keyframes entryGreeting {
  0% { opacity: 0; transform: translateY(8px); }
  18%, 66% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-7px); visibility: hidden; }
}

@media (max-width: 640px) {
  .topbar { min-height: 64px; padding: 9px 16px; }
  .topbar h1 { font-size: 18px; }
  .content { padding: 16px 14px 26px; }
  .metric { min-height: 106px; padding: 13px; }
  .metric:first-child { min-height: 116px; }
  .admin-metrics .metric:first-child { grid-column: auto; min-height: 106px; }
  .box-toolbar > div { display: none; }
  .box-toolbar { justify-content: flex-end; margin-bottom: 12px; }
  .entry-greeting { font-size: clamp(18px, 5vw, 22px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
  .entry-greeting { animation: entryGreetingReduced 1.5s linear both; }
  @keyframes entryGreetingReduced { 0%, 75% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
}
