/* Apple-like: system font, quiet greys, white tiles without borders, pill buttons, lots of space. */
:root {
  --bg: #f5f5f7; --card: #fff; --tx: #1d1d1f; --mut: #6e6e73; --bd: #d2d2d7; --fill: #e8e8ed;
  --ac: #1d6b54; --ac2: #e9f4ef; --warn: #d70015; --warnbg: #fff0f1;
  --morn: #1d6b54; --mornbg: #eef7f3; --eve: #0f4a39; --evebg: #b5dccc;
  --tipc: #6db597; /* the tips' share in the pay-per-hour bar */
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 4px 20px rgba(0, 0, 0, .04);
  --bar: rgba(245, 245, 247, .8);
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%236e6e73' stroke-width='1.5'/%3E%3C/svg%3E");
  color-scheme: light;
  box-sizing: border-box;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000; --card: #1c1c1e; --tx: #f5f5f7; --mut: #98989d; --bd: #38383a; --fill: #2c2c2e;
    --ac: #5cc4a2; --ac2: #16302a; --warn: #ff453a; --warnbg: #3a1614;
    --morn: #8fd9bf; --mornbg: #1c2b26; --eve: #e3f7ef; --evebg: #2f6652;
    --tipc: #2f8a6b;
    --shadow: none;
    --bar: rgba(22, 22, 23, .8);
    --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2398989d' stroke-width='1.5'/%3E%3C/svg%3E");
    color-scheme: dark;
  }
}
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--tx); line-height: 1.47; font-size: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Hebrew", "Helvetica Neue", "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased; letter-spacing: -.01em;
}
main { max-width: 980px; margin: 0 auto; padding: 24px 20px 48px; }
h1, h2, h3 { letter-spacing: -.02em; }
h2 { font-size: 21px; font-weight: 600; margin: 0 0 14px; }

/* Frosted bar across the top, like apple.com */
.topbar {
  position: sticky; top: 0; z-index: 10; background: var(--bar); border-bottom: 1px solid var(--bd);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  padding-top: env(safe-area-inset-top, 0px);
}
.topbar-in { max-width: 980px; margin: 0 auto; padding: 0 20px; height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.topbar h1 { margin: 0; display: flex; }
.topbar .logo { height: 34px; width: auto; display: block; }
/* The logo elsewhere: the icon on the login cards, the full logo in the footer */
.card-mark { width: 44px; height: 44px; display: block; }
/* Footer, on every page */
.foot { border-top: 1px solid var(--bd); background: var(--card); margin-top: 24px; padding: 36px 20px calc(24px + env(safe-area-inset-bottom, 0px)); font-size: 14px; color: var(--mut); }
.foot-in { max-width: 980px; margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 28px; }
.foot-brand { max-width: 340px; }
.foot-brand p { margin: 12px 0 0; line-height: 1.6; }
.foot-logo { height: 32px; width: auto; display: block; }
.foot-links { display: flex; flex-direction: column; gap: 8px; min-width: 140px; }
.foot-links h3 { margin: 0 0 4px; font-size: 13px; font-weight: 600; color: var(--tx); }
.foot a { color: var(--mut); text-decoration: none; }
.foot-links a:hover { color: var(--ac); }
.foot-bottom { max-width: 980px; margin: 28px auto 0; padding-top: 18px; border-top: 1px solid var(--fill); font-size: 13px; }

/* Privacy policy and terms of service */
.toplink { font-size: 14px; color: var(--ac); text-decoration: none; font-weight: 500; }
.topbar h1 a { display: flex; }
.legal { background: var(--card); border-radius: 18px; box-shadow: var(--shadow); padding: clamp(24px, 5vw, 48px); max-width: 780px; margin: 0 auto; line-height: 1.75; }
.legal h1 { font-size: clamp(28px, 5vw, 38px); margin: 0 0 4px; letter-spacing: -.03em; }
.legal .updated { color: var(--mut); font-size: 14px; margin: 0 0 24px; }
.legal h2 { font-size: 19px; margin: 32px 0 8px; }
.legal p, .legal li { font-size: 16px; }
.legal ul { padding-inline-start: 22px; margin: 8px 0; }
.legal li { margin-bottom: 6px; }
.legal a { color: var(--ac); }
.legal .fill { background: var(--warnbg); color: var(--warn); border-radius: 6px; padding: 0 6px; font-weight: 600; }
#userbar { display: flex; gap: 12px; align-items: center; font-size: 13px; min-width: 0; }
#userbar .note { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#userbar button { padding: 5px 14px; font-size: 13px; }

.card { background: var(--card); border-radius: 18px; padding: 22px; margin-bottom: 16px; box-shadow: var(--shadow); }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; }
.row.between { justify-content: space-between; align-items: center; }
label { display: flex; flex-direction: column; font-size: 13px; color: var(--mut); gap: 6px; flex: 1; min-width: 120px; }
input, select {
  font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid var(--bd); border-radius: 12px;
  background-color: var(--card); color: var(--tx); width: 100%; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus { outline: none; border-color: var(--ac); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ac) 18%, transparent); }
/* In an RTL page browsers reverse the parts of date fields. Times are text fields marked dir="ltr". */
input[type="date"], .wr .s, .wr .e { direction: ltr; text-align: right; }
.wr .s:not(:placeholder-shown):not(:focus):invalid, .wr .e:not(:placeholder-shown):not(:focus):invalid { border-color: var(--warn); }
/* Native selects ignore padding on macOS, so draw our own to match the inputs' height. */
select {
  appearance: none;
  padding-left: 30px;
  background-image: var(--chevron);
  background-repeat: no-repeat;
  background-position: left 12px center;
  background-size: 10px 6px;
}
button {
  font: inherit; font-size: 15px; padding: 9px 18px; border-radius: 980px; border: 0; background: var(--fill); color: var(--tx);
  cursor: pointer; transition: filter .15s, background-color .15s, transform .1s;
}
button:hover:not(:disabled) { filter: brightness(.96); }
button:active:not(:disabled) { transform: scale(.98); }
button:focus-visible { outline: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--ac) 30%, transparent); }
button:disabled, input:disabled, select:disabled { opacity: .45; cursor: default; }
button.p { background: var(--ac); color: #fff; }
button.x { color: var(--warn); }
@media (prefers-color-scheme: dark) { button.p { color: #000; } button:hover:not(:disabled) { filter: brightness(1.15); } }

/* Tabs as a segmented control */
.tabs { display: flex; gap: 2px; margin: 0 auto 20px; padding: 3px; background: var(--fill); border-radius: 12px; width: fit-content; max-width: 100%; }
.tabs button { background: none; border-radius: 9px; padding: 7px 16px; font-size: 14px; white-space: nowrap; color: var(--tx); }
.tabs button.on { background: var(--card); font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
@media (prefers-color-scheme: dark) { .tabs button.on { background: #636366; } }
/* Managers: users and settings in a menu behind the three lines at the end of the bar */
.tabs .more { position: relative; display: flex; }
#morebtn { padding: 7px 12px; font-size: 15px; }
.moremenu { position: absolute; top: calc(100% + 6px); inset-inline-end: 0; z-index: 20; min-width: 170px; padding: 5px; display: flex; flex-direction: column; gap: 2px; background: var(--card); border: 1px solid var(--bd); border-radius: 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, .14); }
.moremenu.hide { display: none; }
.tabs .moremenu button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: start; padding: 9px 12px; font-size: 14px; }
.tabs .moremenu button i { width: 16px; color: var(--mut); }
.tabs .moremenu button:hover { background: var(--fill); }
.tabs .moremenu button.on { box-shadow: none; background: var(--fill); }

.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; white-space: nowrap; }
th, td { padding: 10px 10px; text-align: right; border-bottom: 1px solid var(--bd); }
tbody tr:last-child td { border-bottom: 0; }
th { font-size: 12px; color: var(--mut); font-weight: 500; }
tr.me td { background: var(--ac2); font-weight: 600; }
td.cb { font-weight: 700; }
th.cb { color: var(--ac); font-weight: 700; }

.big { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 12px; margin: 12px 0; }
.stat { background: var(--bg); border-radius: 14px; padding: 12px 16px; min-width: 0; }
.stat b { display: block; font-size: clamp(19px, 2.6vw, 24px); font-weight: 600; letter-spacing: -.02em; white-space: nowrap; }
.stat span { font-size: 12px; color: var(--mut); }
.explain { background: var(--bg); border-radius: 14px; padding: 14px 16px; margin: 10px 0; }
.explain .rate { font-size: 22px; }
.tipbox { border: 1px solid var(--ac); border-radius: 14px; padding: 14px 16px; margin: 10px 0; }
.card.tipbox { padding: 22px; margin: 0 0 16px; }
.tipbox h3 { font-size: 15px; margin: 0 0 6px; color: var(--ac); }
.tipbox table { white-space: normal; }
.note { font-size: 13px; color: var(--mut); }
.diff { padding: 10px 14px; border-radius: 12px; margin-top: 10px; font-weight: 600; }
.diff.bad { background: var(--warnbg); color: var(--warn); }
.diff.ok { background: var(--ac2); color: var(--ac); }
.banner { padding: 10px 16px; border-radius: 12px; margin-bottom: 16px; background: var(--card); font-size: 14px; color: var(--mut); text-align: center; box-shadow: var(--shadow); }
.banner:empty, p.note:empty { display: none; }
.banner.bad { background: var(--warnbg); color: var(--warn); }

.wr { display: grid; grid-template-columns: 2fr 1fr 1fr 56px 52px 36px; gap: 8px; align-items: center; margin-bottom: 8px; }
.wr input { min-width: 0; }
.wr button { padding: 8px 0; }
.hd { font-size: 12px; color: var(--mut); }
.hide { display: none !important; }
body:not(.manager) .mgr { display: none !important; }
body.manager .nomgr { display: none !important; }

/* Work schedule */
.segs { display: flex; gap: 4px; flex-wrap: wrap; }
.segs button { padding: 6px 12px; font-size: 14px; }
.segs button.on { background: var(--ac); color: #fff; }
.segs button:disabled:not(.on) { opacity: .35; }
button.st-open { background: var(--ac2); color: var(--ac); }
button.st-busy { background: var(--warnbg); color: var(--warn); font-weight: 600; }
button.st-closed { color: var(--mut); }
.badge { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--fill); color: var(--tx); font-weight: 600; vertical-align: middle; }
.badge.ok { background: var(--ac2); color: var(--ac); }
.warn-text { color: var(--warn); }

/* Table rows that open a shift */
tr.link { cursor: pointer; }
tr.link:hover td { background: var(--ac2); }
.card { scroll-margin-top: calc(64px + env(safe-area-inset-top, 0px)); }
.card.flash, .cal-panel.flash { animation: flash 1.6s ease-out; }
@keyframes flash { 0%, 30% { box-shadow: 0 0 0 3px var(--ac); } 100% { box-shadow: 0 0 0 3px transparent; } }

/* Availability table */
.avail td, .avail th { text-align: center; }
.avail td:first-child, .avail th:first-child { text-align: right; }
.av { display: inline-block; min-width: 46px; padding: 2px 8px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.av-morning { background: var(--mornbg); color: var(--morn); box-shadow: inset 0 0 0 1px var(--morn); }
.av-evening { background: var(--evebg); color: var(--eve); }
.av-any { background: var(--ac); color: #fff; }
.av-none { color: var(--mut); font-weight: 400; }

/* Project owner: all restaurants */
.rgrid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; margin-bottom: 16px; }
.rgrid .card { margin: 0; display: flex; flex-direction: column; }
.rgrid .card .row { margin-top: auto; }
h3.sub { font-size: 14px; margin: 14px 0 6px; }

/* Dropdown menus (instead of the browser's own select and datalist popups) */
.menu {
  position: fixed; z-index: 50; background: var(--card); border: 1px solid var(--bd); border-radius: 14px; padding: 6px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .14); max-height: 300px; overflow-y: auto; font-size: 15px; animation: dlg-fade .12s ease-out;
}
.menu-g { padding: 8px 10px 4px; font-size: 12px; font-weight: 600; color: var(--mut); }
.menu-i { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 8px 12px; border-radius: 9px; cursor: pointer; white-space: nowrap; }
.menu-i.on { background: var(--ac2); color: var(--ac); }
.menu-i.sel { font-weight: 600; }
/* The "none" choice (e.g. no waiter yet) reads as a way to clear, not as a name */
.menu-i.blank { color: var(--mut); font-size: 14px; border-bottom: 1px solid var(--bd); border-radius: 9px 9px 0 0; margin-bottom: 4px; }
.menu-i i { color: var(--ac); font-size: 12px; }

/* A shift's box in the schedule editor */
.wk-s { border-radius: 14px; padding: 10px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.wk-s.morning { background: var(--mornbg); }
.wk-s.evening { background: color-mix(in srgb, var(--evebg) 45%, var(--card)); }
.wk-s.busy { box-shadow: inset 0 0 0 2px var(--warn); }
.wk-s.closed { background: var(--bg); color: var(--mut); }
.wk-s .note { margin: 0; font-size: 13px; }
.wk-sh { display: flex; align-items: center; gap: 8px; min-height: 28px; }
.wk-p { font-weight: 600; font-size: 14px; }
.wk-sh .st { margin-inline-start: auto; padding: 3px 12px; font-size: 12px; background: var(--card); }
.wk-sh .st.st-busy { background: var(--warnbg); }
.cnt { font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--warnbg); color: var(--warn); }
.cnt.full { background: var(--card); color: var(--ac); }

/* One arrival: time, waiter, remove */
.arr { display: grid; grid-template-columns: 64px 1fr 24px 24px; gap: 6px; align-items: center; background: var(--card); border-radius: 12px; padding: 5px; border: 1px solid var(--bd); border-inline-start: 4px solid var(--ac); }
.arr.empty { border-inline-start-color: var(--bd); border-style: dashed; border-inline-start-style: solid; }
.arr input.arr-t { padding: 6px 4px; font-size: 14px; font-weight: 600; text-align: center; border-radius: 8px; font-variant-numeric: tabular-nums; }
/* The time list opens on click; Chrome's arrow would only squeeze the time. */
.arr input.arr-t::-webkit-calendar-picker-indicator { display: none !important; }
.arr select { padding: 6px 4px 6px 22px; font-size: 14px; border-radius: 8px; background-position: left 6px center; min-width: 0; }
.arr.empty select { color: var(--mut); }
.arr-x { background: none; color: var(--mut); padding: 0; font-size: 15px; line-height: 1; }
.arr-x:hover:not(:disabled) { color: var(--warn); }
.arr-dup { font-size: 13px; }
.arr-dup:hover:not(:disabled) { color: var(--ac); }
/* The new-arrival row has one button where arrivals have two */
.arr.add { grid-template-columns: 64px 1fr 28px; }
.arr.add { border: 1px dashed var(--bd); background: transparent; }
.arr.add input, .arr.add select { background-color: var(--card); }
.arr-plus { padding: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--ac); color: #fff; font-size: 13px; line-height: 1; display: grid; place-items: center; }

/* Schedule toolbar */
.sched-top .progress { margin-bottom: 12px; }
.bar { height: 8px; border-radius: 999px; background: var(--fill); overflow: hidden; margin-top: 8px; }
.bar i { display: block; height: 100%; background: var(--ac); border-radius: inherit; transition: width .3s; }
.sched-top .actions { margin-bottom: 4px; }
details.issues { border-top: 1px solid var(--fill); margin-top: 10px; padding-top: 10px; }
details.issues summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--warn); }
details.issues.mild summary { color: var(--mut); font-weight: 500; }
details.issues ul, details.issues p { margin: 8px 0 0; font-size: 13px; }
details.issues ul { padding-inline-start: 18px; line-height: 1.7; }
ul.help { color: var(--mut); }
details.issues .row { margin-top: 8px; }



.legend { list-style: none; padding: 0; margin: 4px 0 10px; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--mut); }
.legend li { display: flex; align-items: center; gap: 5px; }
.lg { width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--bd); background: var(--card); display: inline-block; }
.lg.ok { border-color: var(--ac); }
.lg.empty { border: 1px dashed var(--warn); }

/* Home page: what the service does, then log in or open a restaurant */
.hero { text-align: center; padding: 40px 0 36px; }
.hero h2 { font-size: clamp(34px, 7vw, 56px); font-weight: 700; line-height: 1.07; letter-spacing: -.035em; margin: 6px auto 16px; max-width: 760px; }
.hero > p { color: var(--mut); font-size: clamp(17px, 2.4vw, 21px); line-height: 1.4; max-width: 620px; margin: 0 auto 32px; }
.hero .eyebrow { color: var(--ac); font-weight: 600; font-size: 17px; margin: 0; }
.roles { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.role { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 30px; min-width: 240px; background: var(--fill); }
.role b { font-size: 17px; font-weight: 600; }
.role span { font-size: 13px; color: var(--mut); }
.role[data-role="manager"] { background: var(--ac); color: #fff; }
.role[data-role="manager"] span { color: inherit; opacity: .8; }
@media (prefers-color-scheme: dark) { .role[data-role="manager"] { color: #000; } }
#entry { max-width: 760px; margin: 0 auto 40px; }
.back { background: none; color: var(--ac); padding: 4px 0; margin-bottom: 10px; font-weight: 500; }
#entry:not(.manager) .for-manager { display: none; }
/* Main home page: highlights, steps, a card per audience */
.strip { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 28px; color: var(--mut); font-size: 15px; margin: 0 0 12px; }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0 0 32px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.steps li { counter-increment: step; background: var(--card); border-radius: 18px; padding: 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; }
.steps li::before { content: counter(step); width: 32px; height: 32px; border-radius: 50%; background: var(--ac2); color: var(--ac); font-weight: 700; display: grid; place-items: center; margin-bottom: 4px; }
.steps b { font-size: 18px; }
.steps span { font-size: 15px; color: var(--mut); }
.audience { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-bottom: 32px; }
.aud { background: var(--card); border-radius: 18px; padding: 28px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.aud h3 { margin: 8px 0 10px; font-size: 24px; }
.aud ul { margin: 0 0 20px; padding-inline-start: 20px; color: var(--mut); line-height: 1.7; flex: 1; }
.aud button { align-self: flex-start; padding: 10px 22px; }

/* The home page speaks to everyone until a role is chosen, then only to managers or only to waiters. */
#login:not([data-role=""]) .when-home, #login:not([data-role="manager"]) .when-manager, #login:not([data-role="waiter"]) .when-waiter { display: none; }
/* Logging in is the main thing; opening a restaurant is a link that swaps in its own form. */
.home { display: flex; flex-direction: column; gap: 14px; max-width: 400px; margin: 0 auto; }
.home .alt { text-align: center; margin: 0; font-size: 15px; color: var(--mut); }
.home .card { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 28px; }
.home .card h2, .home .card .note { margin: 0; }
.home .card h2 { font-size: 24px; }
.home .card .note:empty { display: none; }
.home button[type="submit"] { width: 100%; padding: 12px; font-size: 17px; }
.features-title { font-size: clamp(28px, 5vw, 40px); font-weight: 700; letter-spacing: -.03em; text-align: center; margin: 24px 0; }
.features { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; margin-bottom: 24px; }
.feature { background: var(--card); border-radius: 18px; padding: 26px; box-shadow: var(--shadow); }
@media (min-width: 761px) {
  .feature { grid-column: span 2; }
  /* Five cards (after the main one) go three and two */
  .features:has(> .feature:nth-child(6):last-child) > .feature:nth-last-child(-n+2) { grid-column: span 3; }
}
.feature h3 { margin: 10px 0 8px; font-size: 21px; font-weight: 600; }
.feature p { margin: 0; font-size: 15px; color: var(--mut); }
.feature.main { grid-column: 1 / -1; padding: 40px 32px; text-align: center; }
.feature.main h3 { font-size: clamp(26px, 4.5vw, 34px); font-weight: 700; color: var(--ac); }
.feature.main p { font-size: 17px; max-width: 640px; margin: 0 auto; color: var(--tx); }
.ficon { font-size: 26px; color: var(--ac); display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--ac2); }
.feature.main .ficon { font-size: 32px; width: 68px; height: 68px; border-radius: 18px; }
.strip i { color: var(--ac); margin-inline-end: 4px; }
.wk-p i { color: var(--ac); width: 1.1em; }
.issues summary i { margin-inline-end: 2px; }

/* Project owner */
.billing { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 12px; border-radius: 12px; background: var(--bg); margin: 8px 0; font-size: 14px; }
.billing .badge { margin-inline-end: auto; }
.badge.due { background: var(--warnbg); color: var(--warn); }
.mgrs { list-style: none; padding: 0; margin: 6px 0; }
.mgrs li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--bd); font-size: 14px; }
.mgrs li:last-child { border-bottom: 0; }
.mgrs button { padding: 3px 10px; font-size: 12px; }
.temppw { font-family: ui-monospace, Menlo, monospace; font-size: 18px; letter-spacing: 1px; direction: ltr; display: inline-block; background: var(--ac2); color: var(--ac); padding: 4px 12px; border-radius: 8px; user-select: all; }

/* A button that reads as a link, e.g. jumping to another week */
button.linkish { background: none; color: var(--ac); padding: 0 2px; font-size: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* Dialogs: every message, question and text prompt (see dialog() in app.js) */
.dlg-back {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(0, 0, 0, .32); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  animation: dlg-fade .15s ease-out;
}
.dlg {
  background: var(--card); border-radius: 18px; padding: 24px 22px 18px; width: 100%; max-width: 380px; text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .25); animation: dlg-pop .18s cubic-bezier(.2, .9, .3, 1.2);
}
.dlg h2 { font-size: 19px; margin: 0 0 8px; }
.dlg p { margin: 0 0 18px; font-size: 15px; color: var(--mut); white-space: pre-line; }
.dlg h2 + p { color: var(--mut); }
.dlg > p:first-child { color: var(--tx); font-size: 16px; }
.dlg-in { margin: -6px 0 18px; text-align: center; }
.dlg-btns { display: flex; gap: 10px; }
.dlg-btns button { flex: 1; padding: 11px 12px; font-weight: 600; }
button.danger { background: var(--warn); color: #fff; }
@keyframes dlg-fade { from { opacity: 0; } }
@keyframes dlg-pop { from { opacity: 0; transform: scale(.94); } }
@media (prefers-reduced-motion: reduce) { .dlg-back, .dlg { animation: none; } }

/* Availability form: day names in one column, dates lined up beside them */
.dayname { display: inline-block; min-width: 4.5em; font-weight: 600; }
.daydate { color: var(--mut); font-variant-numeric: tabular-nums; }

/* Spacing that used to be inline styles (the Content-Security-Policy allows none) */
.sub-h { margin-top: 22px; }
.mt { margin-top: 16px; }
.mt-s { margin-top: 10px; }

/* Checkboxes in forms: a row with the box first */
label.check { flex-direction: row; align-items: center; gap: 8px; font-size: 14px; color: var(--tx); min-width: 0; }
label.check input { width: 18px; height: 18px; margin: 0; flex: none; accent-color: var(--ac); }
label.check a { color: var(--ac); }

/* Password strength under new-password fields */
.pwmeter { display: flex; align-items: center; gap: 8px; font-size: 12px; min-height: 16px; }
.pwmeter:empty { display: none; }
.pwmeter i { display: block; height: 4px; flex: 1; max-width: 120px; border-radius: 999px; background: var(--fill); overflow: hidden; }
.pwmeter i b { display: block; height: 100%; border-radius: inherit; transition: width .2s; }
.pwmeter[data-score="0"] b, .pwmeter[data-score="1"] b { background: var(--warn); }
.pwmeter[data-score="2"] b { background: #c77700; }
.pwmeter[data-score="3"] b, .pwmeter[data-score="4"] b { background: var(--ac); }
.pwmeter[data-score="0"] i b { width: 10%; }
.pwmeter[data-score="1"] i b { width: 30%; }
.pwmeter[data-score="2"] i b { width: 55%; }
.pwmeter[data-score="3"] i b { width: 80%; }
.pwmeter[data-score="4"] i b { width: 100%; }

/* Two-factor setup */
#mfasetup .card, #mustpw .card { max-width: 560px; margin: 0 auto; }
.mfa-steps { margin: 0 0 14px; padding-inline-start: 20px; line-height: 1.7; font-size: 15px; }
.mfa-qr { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 6px 0 16px; }
.mfa-qr img { width: 200px; height: 200px; border-radius: 12px; background: #fff; padding: 8px; }
.mfa-qr img:not([src]) { visibility: hidden; }
.mfa-qr code { font-size: 14px; letter-spacing: .08em; background: var(--fill); padding: 6px 10px; border-radius: 8px; word-break: break-all; text-align: center; }
#mfacode, #mfasetupcode { letter-spacing: .3em; font-size: 20px; text-align: center; }

/* Account security card */
.acct-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--fill); }
.acct-row:first-of-type { border-top: 0; padding-top: 0; }
.acct-row .note { margin: 2px 0 0; }
.acct-row button { flex: none; }
.sessions { list-style: none; margin: 0 0 4px; padding: 0; font-size: 13px; color: var(--mut); }
.sessions:empty { display: none; }
.sessions li { padding: 4px 0; }
.sessions li b { color: var(--tx); font-weight: 500; }

/* Who entered and changed a shift, and correction requests */
.byline { font-size: 12px; color: var(--mut); margin: -6px 0 10px; }
.corr { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 10px 0; border-top: 1px solid var(--fill); }
.corr:first-of-type { border-top: 0; }
.corr p { margin: 2px 0 0; }
.corr .row { flex: none; }
details#auditbox summary { cursor: pointer; list-style-position: inside; }
details#auditbox summary h2 { display: inline; margin: 0; }
details#auditbox[open] summary { margin-bottom: 10px; }
#auditlist table { white-space: normal; }
#auditlist td:first-child { white-space: nowrap; }
.card .note a, #mustpw a { color: var(--ac); }

/* Morning and evening tips in the shift form, and each part's section in a shift */
.tips-parts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
@media (max-width: 640px) { .tips-parts { grid-template-columns: 1fr; } }
.tips-part { background: var(--bg); border-radius: 14px; padding: 12px 14px; }
.tips-part h3 { font-size: 15px; margin: 0 0 8px; color: var(--ac); }
.period-h { font-size: 16px; margin: 18px 0 4px; color: var(--ac); }
.note.warn { color: var(--warn); }

/* Trainee tick in a worker row of the shift form */
.wr label.tr { display: grid; place-items: center; min-width: 0; }
.wr label.tr input { width: 18px; height: 18px; margin: 0; accent-color: var(--ac); }
@media (max-width: 640px) { .wr { grid-template-columns: 1.6fr 1fr 1fr 40px 34px 30px; gap: 4px; } }
/* A checkbox on its own line under a row of fields */
.row + label.check { margin-top: 14px; }

/* Shift cards: the figures in one box, the table, and the details folded away */
.card.shift h2 .date { font-weight: 400; color: var(--mut); font-size: .8em; margin-inline-start: 6px; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 12px 0; }
.facts.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.facts > div { display: flex; flex-direction: column; gap: 2px; background: var(--bg); border-radius: 14px; padding: 12px 14px; min-width: 0; }
.facts .lbl { font-size: 12px; color: var(--mut); }
.facts b { font-size: 22px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.facts .badge { font-size: 10px; padding: 1px 7px; margin-inline-start: 4px; }
@media (max-width: 600px) {
  .facts { grid-template-columns: 1fr 1fr; gap: 8px; }
  /* Three tiles stay in one row (no tile left alone), a little smaller */
  .facts.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .facts.n3 > div { padding: 10px 9px; }
  .facts.n3 b { font-size: 16px; }
  .facts > div { padding: 10px 12px; }
  .facts b { font-size: 19px; }
}
details.how { margin-top: 12px; border-top: 1px solid var(--bd); padding-top: 12px; }
details.how summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--ac); }
details.how[open] summary { margin-bottom: 8px; }
details.how .period-h { margin-top: 14px; }

/* No lonely items: grids of cards and figures pick a column count that divides what they hold, and
   go to one column rather than leave one item on a row of its own. */
@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr 1fr; }
  .big:has(> :nth-child(5)) { grid-auto-flow: row; grid-template-columns: repeat(6, 1fr); }
  .big:has(> :nth-child(5)) > * { grid-column: span 2; }
  .big:has(> :nth-child(5):last-child) > :nth-child(n+4) { grid-column: span 3; }
}
@media (max-width: 760px) {
  .features { grid-template-columns: 1fr; }
  .big:has(> :nth-child(4):last-child) { grid-auto-flow: row; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .strip { flex-direction: column; align-items: center; }
}
/* Forms: fields side by side while they fit, one under the other (button too) when they don't */
form.card { container-type: inline-size; }
@container (max-width: 560px) {
  .row:not(.between) > label, .row:not(.between) > button { flex-basis: 100%; }
}
/* The week's arrows stay beside its title: on a narrow screen they lose their words */
.weeknav { flex-wrap: nowrap; }
.weeknav h2 { margin: 0; white-space: nowrap; }
.weeknav button { white-space: nowrap; flex-shrink: 0; }
@media (max-width: 520px) {
  .weeknav h2 { font-size: 17px; }
  .weeknav button { padding: 8px 12px; }
  .weeknav button span { display: none; }
  .segs { display: grid; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; }
  .big { grid-auto-flow: row; grid-template-columns: 1fr 1fr; }
  .big > * { grid-column: auto !important; }
  /* An odd number of figures: one under the other, the label beside the number */
  .big:has(> :nth-child(3):last-child), .big:has(> :nth-child(5):last-child) { grid-template-columns: 1fr; gap: 8px; }
  .big:has(> :nth-child(3):last-child) > .stat, .big:has(> :nth-child(5):last-child) > .stat { display: flex; flex-direction: row-reverse; justify-content: space-between; align-items: baseline; gap: 12px; }
}
/* Lists of any length (restaurants): rows of three, and the last row or two go in twos, so
   nothing is left alone: 4 = 2+2, 5 = 3+2, 7 = 3+2+2. One column on a narrow screen. */
.rgrid > * { grid-column: span 2; }
.rgrid > :only-child { grid-column: 1 / -1; }
.rgrid:has(> :first-child:nth-last-child(3n+2)) > :nth-last-child(-n+2),
.rgrid:has(> :first-child:nth-last-child(3n+4)) > :nth-last-child(-n+4) { grid-column: span 3; }
@media (max-width: 760px) { .rgrid { grid-template-columns: 1fr; } .rgrid > * { grid-column: auto !important; } }

/* The home headline: each sentence on a line of its own, never broken, on any screen */
.hero h2.lines span { display: block; white-space: nowrap; }
.hero h2.lines { font-size: clamp(22px, 7.4vw, 56px); margin-bottom: 32px; }
/* The waiters' way in: as inviting as the managers', in the light green */
.role[data-role="waiter"], button.w { background: var(--ac2); color: var(--ac); box-shadow: inset 0 0 0 1.5px var(--ac); }
.role[data-role="waiter"] span { color: inherit; opacity: .85; }
.role[data-role="waiter"]:hover, button.w:hover { background: color-mix(in srgb, var(--ac) 18%, var(--card)); }
/* The two ways in are the same size: side by side, or one above the other on a phone */
.roles { display: grid; grid-template-columns: repeat(2, 290px); justify-content: center; }
.roles .role { min-width: 0; padding-inline: 16px; }
@media (max-width: 640px) { .roles { grid-template-columns: minmax(0, 320px); } }

/* Phones: the tabs in an even grid instead of a bar to scroll: four in 2+2, or for managers in one row where they fit */
@media (max-width: 700px) {
  .tabs { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  /* Managers: four tabs in 2+2, and the menu button as a column of its own beside them */
  body.manager .tabs { grid-template-columns: 1fr 1fr auto; }
  body.manager .tabs .more { grid-column: 3; grid-row: 1 / span 2; }
  body.manager .tabs .more > button { width: 100%; }
  .tabs button { padding: 8px 4px; }
  #morebtn { padding: 8px 12px; }
}
@media (min-width: 521px) and (max-width: 700px) {
  body.manager .tabs { grid-template-columns: repeat(4, 1fr) auto; }
  body.manager .tabs .more { grid-column: auto; grid-row: auto; }
}
/* A table too wide for its card (see fitTables): every row a small card, label beside value */
table.stacked, table.stacked tbody, table.stacked tr, table.stacked td, table.stacked th { display: block; width: 100%; }
table.stacked tr:first-child { display: none; }
table.stacked tr { padding: 10px 4px; border-bottom: 1px solid var(--bd); }
table.stacked tr:last-child { border-bottom: 0; }
table.stacked td, table.stacked th { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 3px 6px; border: 0; white-space: normal; text-align: start; }
table.stacked td::before { content: attr(data-label); color: var(--mut); font-size: 13px; font-weight: 400; }
table.stacked td:not([data-label])::before { content: none; }
/* The first cell (name, date, part of the day) is the card's title */
table.stacked tr > :first-child { font-size: 16px; font-weight: 600; justify-content: flex-start; padding-bottom: 6px; }
table.stacked tr > :first-child::before { content: none; }
table.stacked tr.me { background: var(--ac2); border-radius: 12px; }
table.stacked tr.me td, table.stacked tr.link:hover td { background: none; }
/* Long rows (a worker's pay) go in two columns of label and value, under the name */
table.stacked tr:has(> td:nth-child(6)) { display: grid; grid-template-columns: 1fr 1fr; column-gap: 18px; }
table.stacked tr:has(> td:nth-child(6)) > :first-child { grid-column: 1 / -1; }
table.stacked tr:has(> td:nth-child(6)) > td { flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 0; padding-block: 4px; }
table.stacked tr:has(> td:nth-child(6)) > td::before { font-size: 12px; }
/* An odd number of values: the last one (the total) becomes a full-width line of its own */
table.stacked tr:has(> td:nth-child(6)) > td:last-child:nth-child(even) { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--bd); margin-top: 6px; padding-top: 8px; }
table.stacked tr:has(> td:nth-child(6)) > td:last-child:nth-child(even)::before { font-size: 13px; }

/* Manager's schedule: a bar of the week's days, then the chosen day's morning and evening */
.daybar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; padding: 4px; background: var(--fill); border-radius: 14px; margin: 4px 0 16px; }
.dayb { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 8px 2px 7px; border-radius: 11px; background: none; color: var(--tx); min-width: 0; line-height: 1.2; }
.dayb b { font-size: 14px; font-weight: 600; }
.dayb .dd { font-size: 12px; color: var(--mut); font-variant-numeric: tabular-nums; }
.dayb .dc { margin-top: 4px; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: var(--warnbg); color: var(--warn); font-variant-numeric: tabular-nums; }
.dayb.full .dc { background: var(--ac2); color: var(--ac); }
.dayb.off { color: var(--mut); }
.dayb.off .dc { background: none; color: var(--mut); font-weight: 500; }
.dayb.on { background: var(--card); box-shadow: 0 1px 4px rgba(0, 0, 0, .14); }
.dayb.on b { color: var(--ac); }
@media (prefers-color-scheme: dark) { .dayb.on { background: #636366; } }
.dayb .s { display: none; }
.day-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.day-head h3 { margin: 0; font-size: 19px; }
.day-head h3 span { font-weight: 400; color: var(--mut); font-size: 15px; margin-inline-start: 4px; }
.day-head .legend { margin: 0; }
.day-shifts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
@media (max-width: 700px) {
  .day-shifts { grid-template-columns: 1fr; }
}
/* Narrow: the day's initial and date number, and a dot for its status */
@media (max-width: 520px) {
  .daybar { gap: 2px; padding: 3px; }
  .dayb { padding: 7px 0 6px; }
  .dayb .l { display: none; }
  .dayb .s { display: inline; }
  .dayb b { font-size: 15px; }
  .dayb .dc { font-size: 0; width: 7px; height: 7px; padding: 0; margin-top: 5px; background: var(--warn); }
  .dayb.full .dc { background: var(--ac); }
  .dayb.off .dc { background: var(--bd); }
  .day-head { flex-direction: column; gap: 4px; }
}
/* The smallest phones: a narrower time so the waiter's name has room */
@media (max-width: 360px) {
  .arr { grid-template-columns: 54px 1fr 22px 22px; gap: 4px; }
  .arr.add { grid-template-columns: 54px 1fr 28px; }
}

/* Employees' availability: a row each, a cell per day; on a narrow card the name sits above the days */
.staffav { container-type: inline-size; }
.sa-row { display: grid; grid-template-columns: minmax(90px, 1.3fr) repeat(7, minmax(0, 1fr)); gap: 4px; align-items: center; padding: 5px 0; border-top: 1px solid var(--bd); }
.sa-head { border-top: 0; padding-bottom: 2px; font-size: 12px; color: var(--mut); text-align: center; }
.sa-head .off { opacity: .45; }
.sa-head span:not(.sa-name) { font-size: 0; }
.sa-head em { font-style: normal; font-size: 12px; }
.sa-name { font-weight: 600; font-size: 15px; min-width: 0; overflow-wrap: anywhere; }
.sa-name .warn-text { font-size: 12px; font-weight: 500; margin-inline-start: 4px; }
.staffav .av { min-width: 0; display: flex; align-items: center; justify-content: center; gap: 5px; height: 30px; padding: 0 4px; border-radius: 9px; font-size: 13px; font-weight: 600; }
.staffav .av em { font-style: normal; }
/* Morning, evening and open look alike (only the icon and word differ); unavailable is grey */
.staffav .av-morning, .staffav .av-evening, .staffav .av-any { background: var(--ac2); color: var(--ac); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ac) 40%, transparent); }
.staffav .av-none { background: var(--bg); color: var(--mut); font-weight: 400; box-shadow: none; }
.staffav .av-missing { border: 1px dashed var(--bd); }
.staffav .legend .av { display: inline-flex; width: 26px; height: 20px; border-radius: 6px; font-size: 11px; }
.staffav .legend .av em { display: none; }
@container (max-width: 640px) {
  .staffav .av em { display: none; }
  .sa-head span:not(.sa-name) { font-size: 12px; }
  .sa-head em { display: none; }
}
@container (max-width: 480px) {
  .sa-row { grid-template-columns: 64px repeat(7, minmax(0, 1fr)); gap: 3px; }
  .sa-name { font-size: 13px; line-height: 1.2; }
  .sa-name .warn-text { display: block; margin: 0; font-size: 11px; }
  .staffav .av { height: 28px; padding: 0; font-size: 12px; border-radius: 7px; }
}

/* The finished schedule, for reading: shifts as columns, days as rows, "time  name" lines */
.sched-h { margin-bottom: 12px; }
.sched-h h2 { margin: 0; }
.seg2 { display: flex; gap: 2px; padding: 3px; background: var(--fill); border-radius: 11px; }
.seg2 button { background: none; padding: 6px 14px; font-size: 14px; border-radius: 8px; color: var(--tx); }
.seg2 button.on { background: var(--card); font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
@media (prefers-color-scheme: dark) { .seg2 button.on { background: #636366; } }
.ros-day { display: grid; grid-template-columns: 96px 1fr 1fr; gap: 6px 20px; padding: 12px 0; border-top: 1px solid var(--bd); align-items: start; }
.ros-head { border-top: 0; padding: 0 0 6px; font-size: 13px; font-weight: 600; color: var(--mut); }
.ros-head i { margin-inline-end: 3px; }
.ros-d { display: flex; flex-direction: column; line-height: 1.25; }
.ros-d b { font-size: 16px; }
.ros-d span { font-size: 13px; color: var(--mut); }
.ros-d em { font-style: normal; font-size: 11px; font-weight: 600; color: var(--ac); }
.ros-day.today .ros-d b { color: var(--ac); }
.ros-day.off { color: var(--mut); }
.ros-p { display: none; font-size: 12px; font-weight: 600; color: var(--mut); margin-bottom: 2px; }
.ros-s ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.ros-s li { display: grid; grid-template-columns: 46px 1fr; gap: 8px; padding: 3px 8px; border-radius: 8px; font-size: 15px; }
.ros-s li bdi { color: var(--mut); font-variant-numeric: tabular-nums; font-size: 14px; }
.ros-s li span { font-weight: 500; overflow-wrap: anywhere; }
.ros-s li.empty span { color: var(--mut); }
.ros-s li.mine { background: var(--ac2); }
.ros-s li.mine span, .ros-s li.mine bdi { color: var(--ac); font-weight: 600; }
.ros-s.closed { font-size: 14px; color: var(--mut); padding: 3px 8px; }
.ros-s .note { margin: 0; padding: 3px 8px; font-size: 13px; }
.ros-all { grid-column: 2 / -1; }
/* Phones: the day above its two shifts, and each shift names itself */
@media (max-width: 560px) {
  .ros-day { grid-template-columns: 1fr 1fr; gap: 6px 10px; }
  .ros-d { grid-column: 1 / -1; flex-direction: row; align-items: baseline; gap: 8px; }
  .ros-head { display: none; }
  .ros-p { display: block; padding-inline-start: 8px; }
  .ros-s li { grid-template-columns: 40px 1fr; gap: 6px; padding: 3px 6px; font-size: 14px; }
  .ros-s li bdi { font-size: 13px; }
  .ros-all { grid-column: 1 / -1; }
  .sched-h { flex-wrap: nowrap; }
}
.ros-head span { padding-inline-start: 8px; }

/* My shifts: a row per day I work */
.my-day { display: grid; grid-template-columns: 96px 1fr; gap: 6px 20px; align-items: center; padding: 12px 0; border-top: 1px solid var(--bd); }
.my-day:first-child { border-top: 0; padding-top: 4px; }
.my-day.today .ros-d b { color: var(--ac); }
.my-sh { display: flex; flex-wrap: wrap; gap: 8px; }
.my-sh > div { display: flex; align-items: center; gap: 10px; padding: 7px 14px; border-radius: 10px; background: var(--ac2); color: var(--ac); font-weight: 600; font-size: 15px; }
.my-sh .ros-p { display: inline; margin: 0; padding: 0; font-size: 14px; color: inherit; }
.my-sh bdi { font-variant-numeric: tabular-nums; }
@media (max-width: 520px) {
  .my-day { grid-template-columns: 62px 1fr; gap: 6px 12px; }
  .my-sh { flex-direction: column; align-items: stretch; gap: 6px; }
  .my-sh > div { justify-content: space-between; padding: 7px 12px; }
  .my-sh .arrive { display: none; }
}
/* (not the schedule's phone layout: here the day stays beside its shifts) */
.my-day .ros-d { grid-column: auto; flex-direction: column; align-items: flex-start; gap: 0; }
.my-sh .ros-p { display: inline; padding: 0; }

/* Manager: whether this week is open for availability */
.gate { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--bg); margin-bottom: 14px; }
.gate > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gate b { font-size: 15px; }
.gate b i { margin-inline-end: 4px; color: var(--mut); }
.gate span { font-size: 13px; color: var(--mut); }
.gate.on { background: var(--ac2); }
.gate.on b, .gate.on b i { color: var(--ac); }
.gate button { flex-shrink: 0; }
@media (max-width: 420px) { .gate { flex-direction: column; align-items: stretch; } }

/* Manager's month: a calendar, then the chosen day */
.cal-h { margin-bottom: 12px; flex-wrap: nowrap; }
.cal-h h2 { margin: 0; }
.cal-h button { width: 40px; height: 40px; padding: 0; border-radius: 50%; flex-shrink: 0; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-w { text-align: center; font-size: 12px; font-weight: 600; color: var(--mut); padding-bottom: 2px; }
.cal-w .s { display: none; }
.cal-d { display: flex; flex-direction: column; align-items: stretch; gap: 2px; min-height: 78px; padding: 8px; border-radius: 12px; background: var(--bg); color: var(--mut); text-align: start; min-width: 0; }
.cal-d b { font-size: 15px; font-weight: 600; }
.cal-d.has { background: var(--ac2); color: var(--tx); }
.cal-t { font-size: 14px; font-weight: 600; color: var(--ac); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: auto; }
.cal-n { font-size: 12px; color: var(--mut); white-space: nowrap; }
.cal-n i { font-size: 10px; }
.cal-d.today b { color: var(--ac); }
.cal-d.on { background: var(--ac); color: #fff; }
.cal-d.on .cal-t, .cal-d.on .cal-n, .cal-d.on b { color: #fff; }
.cal-d:not(.on):hover { box-shadow: inset 0 0 0 1.5px var(--ac); }
.cal-d.today:not(.on) { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--ac) 50%, transparent); }
@media (prefers-color-scheme: dark) { .cal-d.on, .cal-d.on b, .cal-d.on .cal-t, .cal-d.on .cal-n { color: #000; } }
.cal-panel { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--bd); }
.cal-panel h3 { margin: 0; font-size: 19px; }
.cal-panel h3 span { font-weight: 400; color: var(--mut); font-size: 15px; margin-inline-start: 4px; }
.cal-panel > .row { margin-bottom: 8px; }
.cal-panel hr { border: 0; border-top: 1px dashed var(--bd); margin: 18px 0; }
/* Narrow: the day's number, and a dot for a day with a shift */
@media (max-width: 640px) {
  .cal-grid { gap: 4px; }
  .cal-w .l { display: none; }
  .cal-w .s { display: inline; }
  .cal-d { min-height: 0; aspect-ratio: 1; padding: 4px 2px; align-items: center; justify-content: center; text-align: center; }
  .cal-n { display: none; }
  .cal-t { font-size: 10px; margin-top: 0; max-width: 100%; }
}
@media (max-width: 420px) {
  .cal-t { display: none; }
  .cal-d.has b::after { content: ''; display: block; width: 6px; height: 6px; border-radius: 50%; background: var(--ac); margin: 3px auto 0; }
  .cal-d.on.has b::after { background: #fff; }
}
/* The days before and after the month: faint cells, so every week is a full row */
.cal-pad { border-radius: 12px; background: color-mix(in srgb, var(--bg) 45%, transparent); }
@media (max-width: 640px) { .cal-pad { aspect-ratio: 1; } }
/* Where a label ("סה"כ שעות של כל העובדים") goes to two lines, every tile's label takes two, so the numbers stay level */
@media (max-width: 1000px) { .facts .lbl { min-height: 2.6em; line-height: 1.3; } }

/* "Saved" under the shift form, with a link to the shift in the monthly calendar */
.saved { margin: 12px 0 0; padding: 10px 14px; border-radius: 12px; background: var(--ac2); color: var(--ac); font-size: 14px; font-weight: 500; }
.saved i { margin-inline-end: 4px; }

/* A worker on the shift: name, then when and how long, and beside it (to the left) the pay as a sum */
.wlist { margin: 6px 0 4px; }
.wrow { display: grid; grid-template-columns: 150px auto 1fr; gap: 6px 36px; align-items: start; padding: 12px 10px; border-top: 1px solid var(--bd); }
.wpay { justify-self: end; }
.wrow:first-child { border-top: 0; }
.wrow.me { background: var(--ac2); border-radius: 12px; border-top-color: transparent; }
.wrow.me + .wrow { border-top-color: transparent; }
.wname { font-weight: 600; font-size: 16px; padding-top: 1px; }
.wrow dl { display: grid; grid-template-columns: auto auto; row-gap: 4px; margin: 0; font-size: 14px; white-space: nowrap; }
.wrow dt { color: var(--mut); padding-left: 16px; }
.wrow dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.wpay dd { font-weight: 500; }
.whrs .hn { margin-inline-end: 10px; color: var(--mut); font-variant-numeric: tabular-nums; }
.wpay .tot { border-top: 1.5px solid currentColor; padding-top: 5px; margin-top: 2px; font-weight: 700; color: var(--tx); font-size: 15px; }
/* Phones: the name above; hours and pay side by side, or one under the other when there's no room */
@media (max-width: 700px) {
  .wrow { grid-template-columns: auto auto; justify-content: space-between; gap: 8px 16px; }
  .wname { grid-column: 1 / -1; }
}
@media (max-width: 440px) {
  .wrow { grid-template-columns: 1fr; }
  .wpay { justify-self: stretch; }
  .wrow dl { grid-template-columns: 1fr auto; }
  .wpay { padding-top: 8px; border-top: 1px dashed var(--bd); }
}
/* Narrow phones, three tiles: a row each, label beside the number and the morning/evening figures under it */
@media (max-width: 420px) {
  .facts.n3 { grid-template-columns: 1fr; gap: 6px; }
  .facts.n3 > div { display: grid; grid-template-columns: 1fr auto; align-items: baseline; column-gap: 10px; padding: 10px 12px; }
  .facts.n3 .lbl { min-height: 0; font-size: 13px; }
  .facts.n3 b { font-size: 18px; }
}

/* A shift's details box: tips as small tiles, then the pay per hour as a bar of its parts */
.howbox { background: var(--bg); border-radius: 16px; padding: 14px; margin: 10px 0 14px; display: flex; flex-direction: column; gap: 14px; }
.hb-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.hb-stats > div { background: var(--card); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hb-stats span { font-size: 12px; color: var(--mut); }
.hb-stats b { font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hb-stats .hl { background: var(--ac2); }
.hb-stats .hl span, .hb-stats .hl b { color: var(--ac); }
.hb-split { padding: 0 2px; }
.hb-h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.hb-h span { font-size: 13px; font-weight: 600; color: var(--mut); }
.hb-h b { font-size: 15px; font-variant-numeric: tabular-nums; }
.hb-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--fill); gap: 2px; }
.hb-bar i { display: block; height: 100%; }
.s1 { background: var(--ac); }
.s2 { background: color-mix(in srgb, var(--ac) 45%, var(--card)); }
.s3 { background: var(--tipc); }
.hb-leg { list-style: none; margin: 10px 0 0; padding: 0; display: flex; gap: 6px 22px; font-size: 13px; }
.hb-leg li { display: flex; align-items: center; gap: 6px; color: var(--mut); white-space: nowrap; }
.hb-leg li i { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.hb-leg b { color: var(--tx); font-weight: 600; font-variant-numeric: tabular-nums; }
.hb-split .note { margin: 8px 0 0; }
@media (max-width: 560px) {
  .hb-stats { grid-template-columns: 1fr 1fr; }
  .hb-leg { flex-direction: column; }
  .hb-leg li b { margin-inline-start: auto; }
}

/* Clocking in and out: the page the restaurant's barcode opens, alone on the screen with one big button */
body.clockmode #login > :not(#entry), body.clockmode #roleback, body.clockmode #tosignupwrap, body.clockmode .foot { display: none; }
.clockcard { max-width: 420px; margin: 24px auto; padding: 32px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
#clockbody { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 14px; }
#clockbody h2 { margin: 0; font-size: 24px; }
.clock-btn { width: 100%; font-size: 20px; padding: 18px; border-radius: 14px; }
.clock-msg { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.clock-msg i { font-size: 52px; color: var(--ac); }
.clock-msg.bad i { color: var(--warn); }
.clock-msg p { margin: 0; color: var(--mut); }
.clock-who { margin: 4px 0 0; }
.clockcard .alt a { color: var(--ac); }
#clockerr:empty { display: none; }

/* The shift form's heading for the workers, with the button that fills them in from the clock */
.sub-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.sub-row .sub-h { margin: 0; }
#fromclock { padding: 6px 12px; font-size: 13px; }

/* Managers: the day's clock-ins */
#att .card { container-type: inline-size; }
.att-list { display: flex; flex-direction: column; }
.att-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 80px auto; align-items: center; gap: 6px 14px; padding: 10px 2px; border-bottom: 1px solid var(--bd); }
.att-row:last-child { border-bottom: 0; }
.att-row b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-times { font-variant-numeric: tabular-nums; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.att-times small { color: var(--mut); }
.att-times input { width: 74px; text-align: center; }
.att-h { color: var(--mut); font-size: 14px; white-space: nowrap; }
.att-acts { display: flex; gap: 6px; justify-content: flex-end; }
.att-acts button { padding: 5px 10px; font-size: 13px; }
.att-row.editing { grid-template-columns: minmax(0, 1fr) auto auto; }
@container (max-width: 520px) {
  .att-row { grid-template-columns: minmax(0, 1fr) auto; }
  .att-row .att-times { grid-row: 2; }
  .att-row .att-h { grid-row: 2; text-align: end; }
  .att-row.editing { grid-template-columns: 1fr; }
  .att-row.editing .att-times { grid-row: auto; }
  .att-row.editing .att-acts { justify-content: flex-start; }
}

/* The barcode to print */
.qrbox { display: flex; gap: 22px; align-items: flex-start; }
.qrbox p { margin: 0 0 10px; }
.qr { width: 190px; height: 190px; flex: none; background: #fff; padding: 8px; border-radius: 12px; border: 1px solid var(--bd); }
@container (max-width: 520px) {
  .qrbox { flex-direction: column; align-items: center; text-align: center; }
  .qrbox .row { justify-content: center; }
}
#qrprint { display: none; }
@media print {
  body.printqr header, body.printqr footer, body.printqr main > :not(#qrprint) { display: none !important; }
  body.printqr, body.printqr main { background: #fff; margin: 0; padding: 0; }
  body.printqr #qrprint { display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 25mm; color: #000; }
  #qrprint h2 { font-size: 30pt; margin: 0 0 4mm; }
  #qrprint p { font-size: 18pt; margin: 0 0 10mm; }
  #qrpimg { width: 120mm; height: 120mm; }
}
