@import "./colors_and_type.css";

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-zh);
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button { cursor: pointer; }
#app { min-height: 100vh; }
body.locked #app,
body.unlocked .lock-screen {
  display: none;
}

.lock-screen {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(250,248,244,.72), rgba(250,248,244,.95)),
    var(--paper);
  display: grid;
  place-items: center;
  padding: 24px;
}
.lock-card {
  width: min(390px, 100%);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  padding: 28px;
}
.lock-brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 28px;
}
.lock-brand span {
  font-family: var(--font-sans);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.lock-brand strong {
  border-left: 1px solid var(--line-strong);
  color: var(--ink-2);
  font-size: 15px;
  font-weight: 500;
  padding-left: 10px;
}
.lock-card h1 {
  margin: 5px 0 8px;
  font-size: 25px;
  font-weight: 600;
}
.lock-card p {
  margin: 0 0 22px;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.7;
}
.lock-card label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 12px;
}
.lock-card label span {
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 500;
}
.lock-card input {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--paper);
  color: var(--ink);
  padding: 12px 13px;
  outline: none;
}
.lock-card input:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.lock-card .btn {
  width: 100%;
  margin-top: 8px;
}
.lock-version {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-align: right;
}
.lock-error {
  min-height: 20px;
  color: #8a4940;
  font-size: 12.5px;
}

.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
}
.side {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 14px;
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 4px 10px 18px;
}
.brand .mk {
  font-family: var(--font-sans);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.brand .pd {
  border-left: 1px solid var(--line-strong);
  padding-left: 10px;
  color: var(--ink-2);
  font-weight: 500;
}
.logout-btn {
  margin-left: auto;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--paper-2);
  color: var(--ink-2);
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 600;
}
.logout-btn:hover {
  background: var(--surface-sink);
  color: var(--ink);
}
.store {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 10px;
  margin-bottom: 14px;
}
.store .mark {
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  background: var(--soft-fill);
  display: grid;
  place-items: center;
  color: var(--accent-ink);
  font-weight: 600;
}
.store strong { display: block; font-size: 13.5px; }
.store span { display: block; color: var(--ink-3); font-size: 11.5px; margin-top: 2px; }
.navlbl {
  padding: 12px 10px 5px;
  color: var(--ink-3);
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.nav {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px;
  color: var(--ink-2);
  background: none;
  border: 0;
  border-radius: var(--r-sm);
  text-align: left;
  font-size: 14px;
  font-weight: 500;
}
.nav:hover { background: var(--surface-sink); color: var(--ink); }
.nav.active { background: var(--primary-soft); color: var(--ink); }
.nav svg, .btn svg, .iconbtn svg { width: 17px; height: 17px; stroke-width: 1.75; }
.side-foot {
  margin-top: auto;
  padding: 12px 10px 0;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 12px;
  line-height: 1.6;
}
.side-foot span {
  display: block;
}
.cloud-sync-btn {
  width: 100%;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--paper-2);
  color: var(--ink-2);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 7px 9px;
  text-align: left;
  font-size: 11.5px;
  line-height: 1.35;
}
.cloud-sync-btn:hover:not(:disabled) {
  background: var(--surface-sink);
  color: var(--ink);
}
.cloud-sync-btn:disabled {
  cursor: default;
  opacity: .72;
}
.cloud-sync-btn svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}
.app-version {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
}

.main { min-width: 0; }
.top {
  position: sticky;
  top: 0;
  z-index: 5;
  min-height: 70px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(250,248,244,.84);
  backdrop-filter: blur(8px);
}
.top h1 {
  margin: 0;
  font-size: 21px;
  font-weight: 600;
}
.top .range {
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 13px;
  min-width: 188px;
  text-align: center;
}
.spacer { flex: 1; }
.content {
  padding: 24px 28px 60px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.kicker {
  color: var(--ink-3);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.btn {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  border-radius: var(--r-sm);
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.btn:active { transform: scale(.98); }
.btn:disabled {
  cursor: not-allowed;
  opacity: .48;
}
.btn-primary { background: var(--primary); color: var(--paper); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); }
.btn-secondary:hover { background: var(--surface-sink); }
.btn-ghost { background: none; color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-sink); color: var(--ink); }
.btn-ghost.danger { color: #8a4940; }
.iconbtn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink-2);
  display: grid;
  place-items: center;
}
.iconbtn:hover { background: var(--surface-sink); color: var(--ink); }

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.stat {
  min-height: 112px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  padding: 16px;
}
.stat.dark { background: var(--ink); border-color: var(--ink); }
.stat .label { color: var(--ink-3); font-size: 12px; }
.stat .value {
  margin-top: 7px;
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: 0;
}
.stat.dark .value { color: var(--paper); }
.stat .hint { margin-top: 4px; color: var(--ink-3); font-size: 11.5px; line-height: 1.5; }
.stat.dark .label, .stat.dark .hint { color: #A39C93; }

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.panel-h {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.panel-h h2 { margin: 2px 0 0; font-size: 17px; font-weight: 600; }
.panel-body { padding: 18px; }

.schedule-toolbar {
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.schedule-toolbar h2 {
  margin: 2px 0 0;
  font-size: 17px;
  font-weight: 600;
}
.segmented {
  margin-left: auto;
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(58px, 1fr));
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--paper-2);
  padding: 3px;
  gap: 3px;
}
.segmented button {
  min-height: 32px;
  border: 0;
  border-radius: calc(var(--r-sm) - 3px);
  background: transparent;
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 500;
}
.segmented button:hover { color: var(--ink); background: var(--surface-sink); }
.segmented button.active {
  background: var(--ink);
  color: var(--paper);
  box-shadow: var(--shadow-xs);
}
.segmented svg {
  width: 15px;
  height: 15px;
  stroke-width: 1.8;
}

.schedule {
  display: grid;
  grid-template-columns: 172px repeat(7, minmax(118px, 1fr));
  overflow-x: auto;
}
.mobile-schedule { display: none; }
.day-h, .staff-h, .cell, .person-cell {
  border-bottom: 1px solid var(--line-faint);
  border-left: 1px solid var(--line-faint);
}
.staff-h, .person-cell {
  border-left: 0;
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--surface);
}
.staff-h, .day-h {
  min-height: 78px;
  padding: 13px 12px;
  background: var(--paper-2);
}
.tone-sage {
  --person-soft: #E9EEE6;
  --person-fill: #DCE7D8;
  --person-line: #BFCEB7;
  --person-ink: #52684D;
}
.tone-rose {
  --person-soft: #F0E5DF;
  --person-fill: #E8D5CC;
  --person-line: #D5B8AA;
  --person-ink: #8A6353;
}
.tone-sand {
  --person-soft: #F2EADC;
  --person-fill: #E8D9BC;
  --person-line: #D8C194;
  --person-ink: #7D6840;
}
.tone-slate {
  --person-soft: #E6E8EF;
  --person-fill: #D8DBE7;
  --person-line: #BCC2D2;
  --person-ink: #596275;
}
.tone-clay {
  --person-soft: #F1E6DD;
  --person-fill: #E6D0C1;
  --person-line: #CDAE98;
  --person-ink: #7C543B;
}
.day-h .d { font-weight: 600; font-size: 13.5px; }
.day-h .date { margin-top: 3px; color: var(--ink-3); font-family: var(--font-mono); font-size: 11.5px; }
.day-h .cover {
  display: inline-flex;
  align-items: center;
  margin-top: 7px;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  font-size: 11px;
}
.cover.ok { background: var(--success-soft); color: #4a6b45; }
.cover.low { background: var(--danger-soft); color: #8a4940; }
.clear-day {
  margin-top: 8px;
  min-height: 26px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  font-size: 11.5px;
}
.clear-day:hover,
.quick-clear:hover {
  background: var(--danger-soft);
  border-color: #e3c9c2;
  color: #8a4940;
}
.clear-day svg,
.quick-clear svg,
.batch-clear svg {
  width: 15px;
  height: 15px;
  stroke-width: 1.8;
}
.person-cell {
  min-height: 82px;
  padding: 12px;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: center;
  border-left: 4px solid var(--person-line, transparent);
  background: linear-gradient(90deg, var(--person-soft, var(--surface)) 0, var(--surface) 72%);
  color: var(--person-ink, var(--ink));
}
.person-cell:hover { background: var(--person-soft, var(--surface-sink)); }
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--person-fill, var(--soft-fill));
  display: grid;
  place-items: center;
  color: var(--person-ink, var(--accent-ink));
  font-size: 13px;
  font-weight: 600;
}
.person-cell .name { font-weight: 600; font-size: 13.5px; }
.person-cell .meta { color: var(--person-ink, var(--ink-3)); font-family: var(--font-mono); font-size: 11px; margin-top: 2px; opacity: .72; }
.cell {
  min-height: 82px;
  padding: 8px;
  background: var(--surface);
}
.shift-btn {
  width: 100%;
  min-height: 64px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--ink-3);
  padding: 7px;
  text-align: left;
}
.shift-btn:hover { background: var(--surface-sink); color: var(--ink); }
.shift-btn:not([data-shift-staff]),
.person-cell:not([data-edit-staff]),
.mobile-shift-card:not([data-shift-staff]) {
  cursor: default;
}
.shift-btn:not([data-shift-staff]):hover,
.person-cell:not([data-edit-staff]):hover,
.mobile-shift-card:not([data-shift-staff]):hover {
  background: var(--person-soft, var(--surface));
}
.shift-btn.filled {
  border-style: solid;
  color: var(--ink);
  box-shadow: var(--shadow-xs);
}
.shift-btn.person-tone {
  background: var(--person-soft);
  border-color: var(--person-line);
  color: var(--person-ink);
}
.shift-btn.person-tone:hover {
  background: var(--person-fill);
  color: var(--person-ink);
}
.shift-btn .lab { display: block; font-weight: 600; font-size: 12.5px; }
.shift-btn .time { display: block; margin-top: 3px; font-family: var(--font-mono); font-size: 11px; }
.shift-btn .pay { display: block; margin-top: 5px; color: currentColor; opacity: .78; font-family: var(--font-mono); font-size: 10.5px; }

.mobile-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(54px, 1fr));
  gap: 8px;
  padding: 14px;
  overflow-x: auto;
}
.mobile-day {
  min-width: 54px;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--ink-2);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
}
.mobile-day span { font-size: 12px; }
.mobile-day strong {
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
}
.mobile-day.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
.mobile-day.active strong { color: var(--paper); }
.mobile-day-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 16px 14px;
}
.mobile-day-summary h3 {
  margin: 3px 0 0;
  font-size: 20px;
  font-weight: 600;
}
.mobile-cover {
  margin-left: auto;
  padding: 5px 11px;
  border-radius: var(--r-pill);
  font-size: 12.5px;
  font-weight: 600;
}
.mobile-cover.ok { background: var(--success-soft); color: #4a6b45; }
.mobile-cover.low { background: var(--danger-soft); color: #8a4940; }
.quick-clear {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink-3);
  display: grid;
  place-items: center;
  flex: none;
}
.mobile-mini-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 16px 14px;
}
.mobile-mini-stats.single { grid-template-columns: 1fr; }
.mobile-mini-stats div {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--paper-2);
  padding: 12px;
}
.mobile-mini-stats span {
  display: block;
  color: var(--ink-3);
  font-size: 12px;
  margin-bottom: 5px;
}
.mobile-mini-stats strong { font-size: 18px; }
.mobile-shifts {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 16px 16px;
}
.mobile-shift-card {
  width: 100%;
  min-height: 76px;
  border: 1px solid var(--person-line, var(--line));
  border-left-width: 4px;
  border-radius: var(--r-md);
  background: linear-gradient(90deg, var(--person-soft, var(--surface)) 0, var(--surface) 72%);
  color: var(--person-ink, var(--ink));
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  padding: 12px;
  text-align: left;
}
.mobile-shift-card:active { transform: scale(.99); }
.mobile-shift-main { min-width: 0; }
.mobile-person-line,
.mobile-shift-line {
  display: flex;
  align-items: center;
  gap: 8px;
}
.mobile-person-line strong { font-size: 15px; }
.mobile-person-line span {
  color: var(--ink-3);
  font-size: 12px;
}
.mobile-shift-line {
  margin-top: 6px;
  color: var(--person-ink, var(--ink-2));
  font-size: 13px;
}
.mobile-shift-line .mono { color: var(--ink-2); }
.mobile-shift-pay {
  text-align: right;
  white-space: nowrap;
}
.mobile-shift-pay strong {
  display: block;
  font-size: 15px;
}
.mobile-shift-pay span {
  display: block;
  margin-top: 4px;
  color: var(--ink-3);
  font-size: 11.5px;
}

.month-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--paper-2);
}
.month-overview div {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  padding: 13px 14px;
}
.month-overview span {
  display: block;
  color: var(--ink-3);
  font-size: 12px;
  margin-bottom: 6px;
}
.month-overview strong {
  color: var(--ink);
  font-size: 19px;
  font-weight: 500;
}
.month-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(122px, 1fr));
  overflow-x: auto;
}
.month-weekday {
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-left: 1px solid var(--line-faint);
  border-bottom: 1px solid var(--line-faint);
  background: var(--paper-2);
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 600;
}
.month-weekday:first-child,
.month-day:nth-child(7n + 8) {
  border-left: 0;
}
.month-day {
  min-height: 128px;
  border: 0;
  border-left: 1px solid var(--line-faint);
  border-bottom: 1px solid var(--line-faint);
  background: var(--surface);
  color: var(--ink);
  padding: 11px;
  text-align: left;
}
.month-day:hover {
  background: var(--surface-sink);
}
.month-day.muted {
  background: var(--paper);
  color: var(--ink-3);
}
.month-day.today {
  box-shadow: inset 0 0 0 2px var(--ink);
}
.month-day.has-shift {
  background: linear-gradient(180deg, var(--surface) 0, var(--primary-soft) 100%);
}
.month-day.has-shift:hover {
  background: linear-gradient(180deg, var(--surface-sink) 0, var(--primary-soft) 100%);
}
.month-day-top {
  display: flex;
  align-items: center;
  gap: 8px;
}
.month-day-top strong {
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 500;
}
.month-day-top .cover {
  margin-left: auto;
  padding: 2px 7px;
  border-radius: var(--r-pill);
  font-size: 11px;
  white-space: nowrap;
}
.month-day-metrics {
  display: grid;
  gap: 3px;
  margin-top: 15px;
  color: var(--ink-2);
  font-size: 12px;
}
.month-day-staff {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 8px;
}
.month-shift-row {
  display: flex;
  align-items: center;
  gap: 5px;
}
.month-shift-dot {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border: 1px solid var(--person-line, var(--line));
  border-radius: 50%;
  background: var(--person-fill, var(--soft-fill));
  color: var(--person-ink, var(--accent-ink));
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 600;
}
.month-shift-time {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--ink-2);
  white-space: nowrap;
}
.month-shift-more {
  font-size: 10px;
  color: var(--ink-3);
  padding-left: 2px;
}

.report-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr);
  gap: 18px;
}
.rows { display: flex; flex-direction: column; }
.row {
  display: grid;
  grid-template-columns: 1.25fr .8fr .8fr .9fr;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line-faint);
}
.row:last-child { border-bottom: 0; }
.row.head {
  padding-top: 0;
  color: var(--ink-3);
  font-size: 11.5px;
  letter-spacing: .06em;
}
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.bar {
  height: 8px;
  border-radius: var(--r-pill);
  background: var(--soft-fill);
  overflow: hidden;
  margin-top: 6px;
}
.bar i {
  display: block;
  height: 100%;
  background: var(--person-line, var(--accent));
}
.insight {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 15px;
}
.insight h3 { margin: 0 0 10px; font-size: 15px; }
.insight p { margin: 0; color: var(--ink-2); line-height: 1.7; font-size: 13.5px; }
.month-list { margin-top: 15px; display: flex; flex-direction: column; gap: 10px; }
.month-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink-2);
  font-size: 13px;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}
.member {
  border: 1px solid var(--line);
  border-left: 4px solid var(--person-line, var(--line));
  border-radius: var(--r-md);
  background: linear-gradient(180deg, var(--person-soft, var(--surface)) 0, var(--surface) 64%);
  padding: 14px;
}
.member-top {
  display: flex;
  align-items: center;
  gap: 11px;
}
.member strong { display: block; font-size: 15px; }
.member span { color: var(--ink-3); font-size: 12px; }
.member dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 14px 0 0;
}
.member dt { color: var(--ink-3); font-size: 11.5px; }
.member dd { margin: 3px 0 0; font-family: var(--font-mono); }

.empty {
  padding: 32px;
  text-align: center;
  color: var(--ink-3);
}

.scrim {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(31,28,24,.32);
}
.sheet {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 45;
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-pop);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.sheet-h {
  min-height: 76px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
}
.sheet-h h2 { margin: 2px 0 0; font-size: 18px; }
.sheet-h .iconbtn { margin-left: auto; }
.form {
  padding: 18px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: auto;
}
.form label { display: flex; flex-direction: column; gap: 7px; }
.form label span { color: var(--ink-2); font-size: 12.5px; font-weight: 500; }
.form input, .form select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink);
  padding: 11px 12px;
  outline: none;
}
.form input:focus, .form select:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.batch-clear {
  border: 1px solid #e3c9c2;
  border-radius: var(--r-md);
  background: var(--danger-soft);
  color: #8a4940;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 13px;
  text-align: left;
  font-size: 13.5px;
  font-weight: 500;
}
.batch-clear:hover { background: #ead4ce; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sheet-preview {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  padding: 13px;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.6;
}
.sheet-actions {
  margin-top: 4px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.sheet-actions .btn-ghost { margin-right: auto; }
[hidden] { display: none !important; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 80;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-lg);
  padding: 12px 18px;
  font-size: 13.5px;
}

@media (max-width: 980px) {
  .app { grid-template-columns: 1fr; }
  .side {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .navrow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .navlbl, .store { display: none; }
  .side-foot {
    margin-top: 8px;
    padding: 8px 10px 0;
    text-align: right;
  }
  .side-foot span:first-child { display: none; }
  .top { padding: 14px 16px; flex-wrap: wrap; }
  .content { padding: 18px 16px 44px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-grid { grid-template-columns: 1fr; }
  .month-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .app { min-height: 100dvh; }
  .brand {
    padding-bottom: 8px;
    align-items: center;
  }
  .logout-btn {
    min-height: 32px;
    padding: 5px 10px;
  }
  .side { padding: 14px 12px 10px; }
  .navrow { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .nav {
    justify-content: center;
    gap: 6px;
    padding: 9px 8px;
    font-size: 13px;
  }
  .top {
    position: static;
    gap: 10px;
  }
  .top h1 { font-size: 19px; }
  .top .spacer { display: none; }
  .top .btn {
    flex: 1 1 auto;
    min-width: calc(50% - 8px);
  }
  .content { gap: 14px; }
  .top .range { min-width: 100%; text-align: left; }
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat {
    min-height: 94px;
    padding: 13px;
  }
  .stat .value { font-size: 21px; }
  .stat .hint { display: none; }
  .panel-h { display: none; }
  .schedule-toolbar {
    align-items: flex-start;
    padding: 14px;
  }
  .schedule-toolbar h2 { font-size: 16px; }
  .segmented {
    flex: none;
    grid-template-columns: repeat(2, 50px);
  }
  .schedule { display: none; }
  .mobile-schedule { display: block; }
  .month-overview {
    gap: 10px;
    padding: 12px;
  }
  .month-overview div {
    padding: 11px;
  }
  .month-overview strong {
    font-size: 17px;
  }
  .month-calendar {
    grid-template-columns: repeat(7, 116px);
  }
  .month-day {
    min-height: 118px;
    padding: 10px;
  }
  .panel { border-radius: var(--r-md); }
  .row { grid-template-columns: 1fr 1fr; }
  .row.head { display: none; }
  .split { grid-template-columns: 1fr; }
  .sheet {
    top: auto;
    left: 8px;
    right: 8px;
    bottom: 8px;
    transform: none;
    width: auto;
    max-height: calc(100dvh - 16px);
    border-radius: var(--r-xl);
  }
}

@media (max-width: 420px) {
  .content { padding: 14px 10px 34px; }
  .mobile-days {
    grid-template-columns: repeat(7, 54px);
    padding-inline: 12px;
  }
  .mobile-day-summary,
  .mobile-mini-stats,
  .mobile-shifts {
    padding-left: 12px;
    padding-right: 12px;
  }
  .mobile-shift-card {
    grid-template-columns: 34px minmax(0, 1fr);
  }
  .mobile-shift-pay {
    grid-column: 2;
    text-align: left;
    display: flex;
    gap: 8px;
  }
  .schedule-toolbar {
    flex-direction: column;
    gap: 10px;
  }
  .segmented {
    width: 100%;
    grid-template-columns: 1fr 1fr;
  }
  .month-overview { grid-template-columns: 1fr; }
  .month-calendar {
    grid-template-columns: repeat(7, 104px);
  }
  .month-day {
    min-height: 112px;
  }
  .month-day-metrics {
    font-size: 11.5px;
  }
}
