@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700;800&family=Open+Sans:wght@400;600;700&display=swap');

body.sched-body {
  --a1: #1F2A44;
  --a2: #5c6b82;
  --ink: #1F2A44;
  --muted: #6b7280;
  --bg: #f3f4f6;
  font-family: 'Open Sans', sans-serif;
}
body.sched-body .wrap { max-width: 1100px; }
body.sched-body h1,
body.sched-body h2,
body.sched-body h3,
body.sched-body .brand,
body.sched-body .viewtabs button,
body.sched-body .dow {
  font-family: 'Montserrat', sans-serif;
}
body.sched-body .err { color: #92400e; }
body.sched-body .toast { background: #1F2A44; }
body.sched-body .toast.fail { background: #b45309; }
body.sched-body .note.warn,
body.sched-body .note.bad {
  background: #fffbeb;
  color: #92400e;
  border: 2px solid #fcd34d;
}
body.sched-body .note.info,
body.sched-body .note.ok {
  background: #eef1f6;
  color: #1F2A44;
  border: 2px solid #c5ceda;
}
body.sched-body .badge.open,
body.sched-body .badge.warn {
  background: #fef3c7;
  color: #92400e;
}
body.sched-body .badge.ok { background: #e5e7eb; color: #1F2A44; }
body.sched-body .invalid { border-color: #d97706 !important; }

.viewtabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
.viewtabs button, .textbtn, .mini {
  font: inherit;
  border: 2px solid #d1d5db;
  background: #fff;
  color: #1F2A44;
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
}
.viewtabs button.on, .textbtn.on { background: #1F2A44; color: #fff; border-color: #1F2A44; }
.row-btns { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.btn.secondary {
  background: #fff;
  color: #1F2A44;
  border: 2px solid #1F2A44;
  box-shadow: none;
  width: auto;
  margin-top: 0;
}
.budget-top { border: 2px solid #1F2A44; }
.rule { color: var(--muted); font-size: .92rem; line-height: 1.45; }
.store-bud { border: 2px solid #e5e7eb; border-radius: 16px; padding: 12px 14px; margin-top: 12px; background: #fafafa; }
.store-bud h3 { margin: 0 0 4px; font-size: 1rem; }
.store-bud.overbud { background: #fffbeb; border-color: #fcd34d; }
.store-bud.underbud { background: #f8fafc; border-color: #c5ceda; }
.overbud-t { color: #92400e; font-weight: 700; }
.underbud-t { color: #1F2A44; font-weight: 700; }
.daystrip { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.daychip { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 6px 8px; min-width: 72px; font-size: .82rem; }
.daychip b { display: block; font-family: 'Montserrat', sans-serif; }
.daychip.overbud { background: #fffbeb; border-color: #fcd34d; }
.ratebox { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.ratebox label { margin: 0 0 6px; }
.ratebox input { max-width: 140px; }
.person { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid #e5e7eb; }
.person .who { font-weight: 700; }
table.hours-table { border-collapse: collapse; width: 100%; min-width: 520px; color: #1F2A44; }
table.hours-table th, table.hours-table td { border-bottom: 1px solid #e5e7eb; padding: 8px 6px; text-align: left; color: #1F2A44; }
table.hours-table th { font-family: 'Montserrat', sans-serif; font-size: .82rem; background: #f8fafc; }
table.hours-table a { color: #1F2A44; font-weight: 700; }
table.hours-table tr.hrs-over td { background: #fffbeb; }
table.hours-table tr.hrs-near td { background: #f8fafc; }
table.hours-table tr.hrs-over { box-shadow: inset 4px 0 0 #f59e0b; }
table.hours-table tr.hrs-near { box-shadow: inset 4px 0 0 #d1d5db; }
.hrs-flag { color: #92400e; font-weight: 700; margin-left: 6px; }
.hrs-near-flag { color: #1F2A44; font-weight: 700; margin-left: 6px; }
.hrs-mgr { color: #5c6b82; }
body.sched-body .tblwrap { overflow-x: auto; overflow-y: visible; max-height: none; -webkit-overflow-scrolling: touch; }
table.gridweek { border-collapse: collapse; min-width: 920px; width: 100%; }
table.gridweek th, table.gridweek td { border-bottom: 1px solid #e5e7eb; padding: 8px; vertical-align: top; text-align: left; }
table.gridweek th { font-size: .82rem; background: #f8fafc; }
table.gridweek .shiftname { position: sticky; left: 0; background: #fff; z-index: 1; min-width: 118px; box-shadow: 1px 0 0 #e5e7eb; }
tr.mgr-shift th.shiftname,
tr.mgr-shift td { background: #eef1f6; color: #1F2A44; }
tr.mgr-shift th.shiftname { box-shadow: inset 4px 0 0 #f59e0b; }
tr.mgr-shift td.open { background: #fffbeb; }
.mgr-badge {
  display: block;
  width: fit-content;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fcd34d;
  font-weight: 700;
  font-size: .72rem;
}
.slot select, .slot input, .mgrgrid select, .mgrgrid input {
  width: 100%;
  margin-top: 4px;
  padding: 8px 10px;
  font-size: .92rem;
}
.times { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.hrs-tag { color: var(--muted); font-size: .78rem; margin-top: 2px; }
td.open { background: #fffbeb; }
td.inactive { outline: 2px solid #f59e0b; outline-offset: -2px; }
.pv { display: none; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.dow { font-size: .75rem; color: var(--muted); text-align: center; }
.day {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 8px;
  min-height: 120px;
  font-size: .82rem;
}
.day.out { visibility: hidden; }
.day button.dayhead {
  font: inherit;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  background: none;
  border: 0;
  padding: 0;
  color: #1F2A44;
  cursor: pointer;
  text-align: left;
}
.day .nm { display: block; margin-top: 3px; }
.day .gap { color: #92400e; font-weight: 700; }
.monthcard { border: 2px solid #e5e7eb; border-radius: 16px; padding: 12px; margin-top: 12px; }
.monthcard h3 { margin: 0 0 6px; }
.monthcard h3 button { font: inherit; font-family: 'Montserrat', sans-serif; font-weight: 800; background: none; border: 0; color: #1F2A44; cursor: pointer; padding: 0; font-size: 1.05rem; }
.weekline { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid #e5e7eb; }
.weekline button { font: inherit; background: none; border: 0; color: #1F2A44; font-weight: 700; cursor: pointer; padding: 0; }
table.list { border-collapse: collapse; width: 100%; font-size: .9rem; }
table.list th, table.list td { border-bottom: 1px solid #e5e7eb; padding: 6px; text-align: left; white-space: nowrap; }
table.list th { cursor: pointer; background: #f8fafc; position: sticky; top: 0; }
table.list td.wrap { white-space: normal; }
details.help { margin-top: 8px; }
details.help summary { cursor: pointer; font-weight: 700; }
.steps { margin: 8px 0 0; padding-left: 18px; }
.steps li { margin: 6px 0; }
@media (max-width: 720px) {
  .cal { grid-template-columns: 1fr; }
  .cal .dow, .day.out { display: none; }
  .day { min-height: 0; }
  table.gridweek { min-width: 760px; }
}
@media print {
  body.sched-body { background: #fff; }
  .no-print, .viewtabs, .row-btns, .mini, .btn, details.help { display: none !important; }
  .pv { display: block; font-weight: 700; }
  .slot select, .slot input, .mgrgrid select, .mgrgrid input { display: none !important; }
  .card, .day, .store-bud, #weekHoursCard { break-inside: avoid; }
  .hero { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  a.back { display: none !important; }
}
