:root {
  color-scheme: light;
  --bg: #f3f5f8;
  --card: #ffffff;
  --line: #e4e8ee;
  --text: #0e1a2b;
  --muted: #5f6b7c;
  --brand: #1856d6;
  --deep: #0b2a5b;
  --tint: #e6eefc;
  --on-brand: #ffffff;
  --warn-bg: #fbf0da;
  --warn-text: #8a5a0b;
  --bad-bg: #fbe3e3;
  --bad-text: #a53c3c;
  --bad-line: #c25a5a;
  --good: #138a4b;
  --good-bg: #e3f5ea;
  --nav-bg: #0b2a5b;
  --nav-text: #c4d3ee;
  --nav-on: #7db4ff;
  --info-bg: #e3edf7;
  --info-text: #2c5f8a;
  --glass: #ffffff;
  --edge: rgba(255, 255, 255, 0.9);
  --drop: rgba(11, 42, 91, 0.14);
  --glow: rgba(24, 86, 214, 0.22);
  --dock: rgba(255, 255, 255, 0.9);
  --bar: #d9e1ea;
  --page: radial-gradient(60% 40% at 85% -5%, rgba(24, 86, 214, 0.08), transparent 70%);
}

/* The dark look (navy). It is used when the phone is set to dark and the person has not picked a look,
   or when they pick Dark in Options. Picking Light keeps the green and white look. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --bg: #0d1424;
    --card: #131c2f;
    --line: rgba(255, 255, 255, 0.09);
    --text: #eef2fb;
    --muted: #8d9ab5;
    --brand: #5b9dff;
    --deep: #cfe1ff;
    --tint: rgba(140, 180, 255, 0.12);
    --on-brand: #04122b;
    --warn-bg: rgba(252, 211, 77, 0.1);
    --warn-text: #fde68a;
    --bad-bg: rgba(251, 113, 133, 0.1);
    --bad-text: #fecdd3;
    --bad-line: #fb7185;
    --good: #4ade80;
    --good-bg: rgba(74, 222, 128, 0.12);
    --nav-bg: #0a1830;
    --nav-text: #9fb2d3;
    --nav-on: #7db4ff;
    --info-bg: rgba(125, 180, 240, 0.12);
    --info-text: #a9d1f5;
    --glass: linear-gradient(180deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.035));
    --edge: rgba(255, 255, 255, 0.07);
    --drop: rgba(0, 0, 0, 0.55);
    --glow: rgba(91, 157, 255, 0.4);
    --dock: rgba(16, 26, 49, 0.9);
    --bar: rgba(255, 255, 255, 0.13);
    --page: radial-gradient(60% 40% at 85% -5%, rgba(91, 157, 255, 0.12), transparent 70%), radial-gradient(50% 35% at 0% 22%, rgba(99, 102, 241, 0.11), transparent 70%);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d1424;
  --card: #131c2f;
  --line: rgba(255, 255, 255, 0.09);
  --text: #eef2fb;
  --muted: #8d9ab5;
  --brand: #5b9dff;
  --deep: #cfe1ff;
  --tint: rgba(140, 180, 255, 0.12);
  --on-brand: #04122b;
  --warn-bg: rgba(252, 211, 77, 0.1);
  --warn-text: #fde68a;
  --bad-bg: rgba(251, 113, 133, 0.1);
  --bad-text: #fecdd3;
  --bad-line: #fb7185;
  --good: #4ade80;
  --good-bg: rgba(74, 222, 128, 0.12);
  --nav-bg: #0a1830;
  --nav-text: #9fb2d3;
  --nav-on: #7db4ff;
  --info-bg: rgba(125, 180, 240, 0.12);
  --info-text: #a9d1f5;
  --glass: linear-gradient(180deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.035));
  --edge: rgba(255, 255, 255, 0.07);
  --drop: rgba(0, 0, 0, 0.55);
  --glow: rgba(91, 157, 255, 0.4);
  --dock: rgba(16, 26, 49, 0.9);
  --bar: rgba(255, 255, 255, 0.13);
  --page: radial-gradient(60% 40% at 85% -5%, rgba(91, 157, 255, 0.12), transparent 70%), radial-gradient(50% 35% at 0% 22%, rgba(99, 102, 241, 0.11), transparent 70%);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
}
.wrap { max-width: 560px; margin: 0 auto; padding: 24px 16px 48px; }
.center { text-align: center; }
.logo {
  width: 72px; height: 72px; margin: 8px auto 16px;
  background: var(--brand); border-radius: 16px;
  display: grid; place-items: center;
  font-weight: 800; font-size: 22px; color: var(--on-brand);
}
h1 { font-size: 28px; line-height: 1.2; margin: 0 0 8px; }
h2 { font-size: 20px; margin: 0 0 6px; }
.lead { color: var(--muted); margin: 0 0 24px; }
.card {
  display: block; text-decoration: none; color: inherit;
  background: var(--card); border: 2px solid var(--brand);
  border-radius: 20px; padding: 18px; margin-bottom: 16px;
}
.card p { margin: 0; color: var(--muted); }
.topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.back { color: var(--muted); text-decoration: none; font-size: 15px; }
.tabs { display: flex; gap: 8px; margin: 12px 0 16px; }
.tab {
  flex: 1; padding: 10px 8px; border-radius: 12px; cursor: pointer;
  background: var(--card); color: var(--text);
  border: 1px solid var(--line); font-size: 15px;
}
.tab[aria-pressed="true"] { border-color: var(--brand); color: var(--brand); }
.group-title { color: var(--muted); font-size: 14px; margin: 20px 0 8px; text-transform: uppercase; letter-spacing: .04em; }
.store {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; margin-bottom: 10px;
}
.store summary { padding: 14px 16px; cursor: pointer; font-weight: 600; list-style: none; }
.store summary::-webkit-details-marker { display: none; }
.store[open] { border-color: var(--brand); }
.store .details { padding: 0 16px 14px; color: var(--muted); }
.store .details div { margin-top: 6px; }
.store .details b { color: var(--text); font-weight: 600; }
.note { color: var(--muted); font-size: 14px; text-align: center; margin-top: 24px; }
.nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.nav a {
  flex: 1 1 calc(33.333% - 8px); min-width: 0; text-align: center; padding: 10px 8px; border-radius: 12px;
  text-decoration: none; color: var(--text); background: var(--card);
  border: 1px solid var(--line); font-size: 15px;
}
.nav a[aria-current="page"] { border-color: var(--brand); color: var(--brand); }
.btn {
  display: inline-block; padding: 8px 14px; border-radius: 10px;
  text-decoration: none; color: var(--text); background: var(--bg);
  border: 1px solid var(--brand); font-size: 14px; margin: 8px 8px 0 0;
}
.contact { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.msg {
  display: none; margin-top: 4px; padding: 12px 14px; border-radius: 12px;
  border: 1px dashed var(--brand); color: var(--muted);
}
.msg.show { display: block; }
.has-tabbar .wrap { padding-bottom: 96px; }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; display: flex;
  background: var(--card); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar button {
  flex: 1; padding: 14px 8px; background: none; border: 0;
  border-top: 3px solid transparent; font-size: 15px; color: var(--muted); cursor: pointer;
}
.tabbar button[aria-pressed="true"] { color: var(--brand); border-top-color: var(--brand); font-weight: 600; }
.opt {
  display: block; width: 100%; text-align: left; background: var(--card);
  border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin-bottom: 10px;
  font-size: 16px; font-weight: 600; color: var(--text); cursor: pointer;
}
.opt small { display: block; font-weight: 400; color: var(--muted); margin-top: 4px; font-size: 14px; }
.opt[aria-pressed="true"] { border-color: var(--brand); }
.shift {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 16px; margin-bottom: 8px;
}
.shift.off { color: var(--muted); }
.total { margin: 8px 4px 0; color: var(--muted); font-weight: 600; text-align: right; }
.pill { font-size: 13px; padding: 2px 10px; border-radius: 999px; background: var(--tint); color: var(--deep); white-space: nowrap; }
.pill.pending { background: var(--warn-bg); color: var(--warn-text); }
.primary {
  display: block; width: 100%; margin-top: 12px; padding: 14px; border: 0;
  border-radius: 12px; background: var(--brand); color: var(--on-brand);
  font-size: 16px; font-weight: 600; cursor: pointer;
}
.field {
  display: block; width: 100%; padding: 12px; margin: 6px 0 12px;
  border: 1px solid var(--line); border-radius: 12px; font-size: 16px;
  background: var(--card); color: var(--text);
}
form label { display: block; margin-top: 12px; color: var(--muted); font-size: 14px; }
/* Time clock log: edit-history note under a punch, and .btn used on <button> */
.punch-note {
  margin-top: 10px; padding-left: 10px;
  border-left: 3px solid var(--brand);
  color: var(--muted); font-size: 14px;
}
button.btn { font: inherit; }

/* Schedule screen additions */
.req {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; padding: 16px; margin-bottom: 10px;
}
.req-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.req p { margin: 6px 0 4px; color: var(--muted); }
.btn.approve { background: var(--brand); color: var(--on-brand); }
.btn.deny { border-color: var(--bad-line); color: var(--bad-text); }
.btn:disabled { opacity: .55; cursor: default; }
.pill.denied { background: var(--bad-bg); color: var(--bad-text); }
.pill.cover { background: var(--info-bg); color: var(--info-text); }
.reset { display: block; margin: 8px auto 0; background: var(--card); font: inherit; font-size: 14px; cursor: pointer; }
form label input.field { margin-top: 4px; }
select.field { appearance: auto; }
.topbar-end { margin-left: auto; color: var(--muted); text-decoration: none; font-size: 15px; }

/* Snap an invoice or check */
.preview { display: block; width: 100%; max-height: 260px; object-fit: contain; margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.snap-item { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; margin-bottom: 8px; }
.snap-item small { display: block; color: var(--muted); }
.amount-in { color: var(--good); font-weight: 700; white-space: nowrap; }
.amount-out { font-weight: 700; white-space: nowrap; }

/* Little daily bars in the sales report */
.bars { display: flex; gap: 6px; align-items: flex-end; margin-top: 12px; }
.bar { flex: 1; text-align: center; }
.bar-fill { background: var(--brand); border-radius: 6px 6px 0 0; width: 100%; }
.bar small { color: var(--muted); }

/* Admin app bottom bar (links, same look as the Store app's buttons) */
.tabbar a {
  flex: 1; padding: 14px 8px; text-align: center; text-decoration: none;
  border-top: 3px solid transparent; font-size: 15px; color: var(--muted);
}
.tabbar a[aria-current="page"] { color: var(--brand); border-top-color: var(--brand); font-weight: 600; }
body.has-tabbar .wrap { padding-bottom: 96px; }

/* Home screen */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px; margin-bottom: 14px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.tile-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; font-weight: 700; }
.tile-head a { font-weight: 500; font-size: 14px; color: var(--brand); text-decoration: none; }
.big { font-size: 34px; font-weight: 800; color: var(--deep); line-height: 1.1; }
.need { display: block; padding: 12px 14px; margin-top: 8px; border-radius: 12px; background: var(--warn-bg); color: var(--warn-text); text-decoration: none; font-weight: 600; }
.cams.mini { grid-template-columns: 1fr 1fr; }
.quick { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.quick .btn { margin: 0; flex: 1 1 28%; text-align: center; }

/* ===== Design pass =====
   Idea: a store's receipt tape and register display. Big steady numbers, perforated edges, quiet cards.
   One memorable moment (the Home sales receipt counting up); everything else stays calm. */
@view-transition { navigation: auto; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.big, .amount-in, .amount-out, .stamp, .pill, .bar small, .shift span:last-child { font-variant-numeric: tabular-nums; }
#sales-change { display: inline-block; margin-top: 6px; }
h1, h2, .big, .logo, .tile-head span {
  font-family: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: -0.02em;
}
h1 { font-size: 30px; font-weight: 800; color: var(--deep); }
.lead { font-size: 16px; line-height: 1.45; max-width: 34em; }
.wrap { padding-top: 16px; }

/* Cards: one soft border, a gentle lift, and a chevron so it is clear they open something */
.card {
  position: relative; border: 1px solid var(--line); border-radius: 20px; padding: 18px 44px 18px 18px;
  box-shadow: 0 1px 2px rgba(11, 42, 91, .06), 0 8px 24px rgba(11, 42, 91, .05);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
a.card::after {
  content: ""; position: absolute; right: 18px; top: 50%; width: 9px; height: 9px; margin-top: -6px;
  border-right: 2px solid var(--brand); border-top: 2px solid var(--brand); transform: rotate(45deg);
}
a.card:active { transform: scale(.985); border-color: var(--brand); }
.store, .shift, .snap-item, .req, .opt, .tile {
  border-radius: 16px;
}
.opt { transition: transform .12s ease, border-color .12s ease; }
.opt:active { transform: scale(.985); }
.tab, .nav a, .btn { transition: background-color .12s ease, border-color .12s ease, transform .12s ease; }
.tab:active, .btn:active { transform: scale(.97); }
.tab[aria-pressed="true"] { background: var(--tint); font-weight: 700; }
.primary {
  min-height: 52px; border-radius: 14px; letter-spacing: .01em;
  box-shadow: 0 6px 16px rgba(24, 86, 214, .28);
  transition: transform .12s ease, box-shadow .12s ease;
}
.primary:active { transform: translateY(1px) scale(.99); box-shadow: 0 2px 6px rgba(24, 86, 214, .3); }
.primary:disabled { opacity: .55; box-shadow: none; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.logo { border-radius: 22px; width: 84px; height: 84px; font-size: 40px; box-shadow: 0 10px 28px rgba(24, 86, 214, .35); }

/* Bottom bar with icons */
.tabbar {
  padding-top: 2px; background: var(--card);
  box-shadow: 0 -6px 24px rgba(11, 42, 91, .08); view-transition-name: tabbar;
}
.tabbar button, .tabbar a {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 4px 10px; font-size: 12px; border-top: 0 !important;
}
.tabbar svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s ease; }
.tabbar button[aria-pressed="true"] svg, .tabbar a[aria-current="page"] svg { transform: translateY(-1px) scale(1.08); }
.tabbar button[aria-pressed="true"] span, .tabbar a[aria-current="page"] span {
  background: var(--tint); border-radius: 999px; padding: 1px 12px; color: var(--deep);
}
.tabbar span { padding: 1px 12px; font-weight: 600; }

/* Home: tiles, and the sales receipt */
.tile { border-radius: 20px; padding: 18px; box-shadow: 0 1px 2px rgba(11, 42, 91, .06), 0 8px 24px rgba(11, 42, 91, .05); }
.tile-head { font-size: 15px; }
.tile-head span { font-weight: 700; }
.big { font-size: 44px; font-weight: 800; letter-spacing: -0.03em; }
.tile.receipt { position: relative; margin-bottom: 26px; border-bottom: 0; border-radius: 20px 20px 0 0; }
.tile.receipt::after {
  content: ""; position: absolute; left: -1px; right: -1px; bottom: -11px; height: 12px;
  background:
    linear-gradient(-45deg, rgba(0,0,0,0) 8px, var(--card) 0) 0 0 / 16px 12px,
    linear-gradient(45deg, rgba(0,0,0,0) 8px, var(--card) 0) 0 0 / 16px 12px;
  filter: drop-shadow(0 2px 2px rgba(11, 42, 91, .08));
}
.tile.receipt .tile-head { border-bottom: 1px dashed var(--line); padding-bottom: 10px; margin-bottom: 14px; }
.tile .shift { border: 0; border-top: 1px dashed var(--line); border-radius: 0; background: none; margin: 0; padding: 12px 0; }
.tile .shift:first-child { border-top: 0; }
.need { border-radius: 14px; position: relative; padding-right: 36px; }
.need::after { content: ""; position: absolute; right: 16px; top: 50%; width: 8px; height: 8px; margin-top: -5px; border-right: 2px solid currentColor; border-top: 2px solid currentColor; transform: rotate(45deg); }
.bars { height: 76px; align-items: flex-end; }
.bar-fill { transform-origin: bottom; background: var(--brand); border-radius: 8px 8px 3px 3px; }
.bar:last-child .bar-fill { background: var(--deep); }
.pill { font-weight: 600; }
.quick .btn { padding: 12px 10px; font-weight: 600; background: var(--card); border-color: var(--line); }
.cam { border-radius: 14px; }

/* One orchestrated moment on Home: the cards settle in once, the bars grow, the number counts up (see motion.js). */
.check { display: flex; align-items: center; gap: 10px; margin: 10px 0; color: var(--text); font-size: 16px; }
.check input { width: 22px; height: 22px; accent-color: var(--brand); }
.btn.small { padding: 3px 10px; font-size: 12px; margin: 4px 0 0 6px; }
.picture-choices { display: flex; gap: 10px; margin: 12px 0 8px; }
.picture-choices .primary { margin-top: 0; flex: 1; }
.primary.alt { background: var(--glass); color: var(--brand); box-shadow: inset 0 0 0 2px var(--brand); }

/* Arabic reads right to left: flip the arrows, the padding for them, and the text alignment */
:root[dir="rtl"] a.card { padding: 18px 18px 18px 44px; }
:root[dir="rtl"] a.card::after { right: auto; left: 20px; transform: rotate(-135deg); }
:root[dir="rtl"] .need { padding: 15px 20px 15px 42px; }
:root[dir="rtl"] .need::after { right: auto; left: 16px; transform: rotate(-135deg); }
:root[dir="rtl"] .need::before { margin-right: 0; }
:root[dir="rtl"] #store-pick { background-position: left 14px center; padding: 11px 20px 11px 42px; }
:root[dir="rtl"] .opt, :root[dir="rtl"] .menu button, :root[dir="rtl"] .store summary { text-align: right; }
:root[dir="rtl"] .total { text-align: left; }
:root[dir="rtl"] .punch-note { padding-left: 0; padding-right: 10px; border-left: 0; border-right: 3px solid var(--brand); }
:root[dir="rtl"] .cam .label { left: auto; right: 4px; }
:root[dir="rtl"] .cam .live { right: auto; left: 4px; }
:root[dir="rtl"] .cam .stamp { left: auto; right: 4px; }
:root[dir="rtl"] .tile-head { flex-direction: row; }

@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise .5s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 70ms); }
  .rise .bar-fill { animation: grow .7s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(.25s + var(--b, 0) * 45ms); }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
  @keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
}
/* ===== Glass pass (owner, 2026-10-19: "professionally designed and polished", dark and game-smooth) =====
   Quiet glass cards with no heavy borders, mint glow on the numbers that matter, a floating glass bottom bar,
   and springy taps. Everything animated uses transform and opacity only, so it stays smooth on a phone. */
:root { --spring: cubic-bezier(.34, 1.56, .64, 1); --settle: cubic-bezier(.22, 1.2, .36, 1); }
body { background-color: var(--bg); background-image: var(--page); background-attachment: fixed; min-height: 100vh; }
h1 { color: var(--text); font-weight: 700; font-size: 30px; letter-spacing: -0.025em; }
h1 em { font-style: normal; color: var(--brand); }
.lead, .tile-head a { color: var(--muted); }
.tile-head a { color: var(--brand); }
.wrap { max-width: 460px; padding: 28px 20px 48px; }
.topbar { margin-bottom: 20px; }

.card, .tile, .store, .shift, .snap-item, .req, .opt, .tab, .nav a, .field, .preview {
  border: 0; background: var(--glass);
  box-shadow: 0 18px 36px -22px var(--drop), inset 0 1px 0 var(--edge);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
}
.card, .tile { border-radius: 26px; }
.tile { padding: 20px; margin-bottom: 16px; }
.tile .shift { box-shadow: none; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.tile-head { margin-bottom: 12px; }
.tile.receipt { border-radius: 28px; margin-bottom: 16px; border-bottom: 0; }
.tile.receipt::after { content: none; }
.tile.receipt .tile-head { border-bottom: 0; padding-bottom: 0; margin-bottom: 8px; }
.tile .shift { border-top: 1px solid var(--line); }
.tile .shift:first-child { border-top: 0; }
.store[open] { box-shadow: 0 18px 36px -22px var(--drop), inset 0 0 0 1px var(--brand); }
.tab[aria-pressed="true"], .opt[aria-pressed="true"], .nav a[aria-current="page"] { box-shadow: 0 0 22px -6px var(--glow), inset 0 0 0 1px var(--brand); }

/* Springy taps on everything you can press */
.card, .opt, .tab, .btn, .primary, .need, .tabbar a, .tabbar button, .cam-btn {
  will-change: transform; transform: translateZ(0);
  transition: transform .45s var(--spring), box-shadow .3s ease, background-color .2s ease;
}
@media (hover: hover) { a.card:hover, .opt:hover, .need:hover, .btn:hover { transform: translate3d(0, -2px, 0); } }
a.card:active, .opt:active, .tab:active, .btn:active, .need:active, .cam-btn:active { transform: scale(.95); transition-duration: .1s; }
.primary:active { transform: scale(.97); transition-duration: .1s; }
.primary { background: linear-gradient(180deg, var(--brand), var(--brand)); box-shadow: 0 10px 28px -8px var(--glow); }
a.card::after { border-color: var(--muted); right: 20px; }
a.card:hover::after { border-color: var(--brand); }

/* The numbers that matter glow */
.big { color: var(--deep); text-shadow: 0 0 32px var(--glow); letter-spacing: -0.03em; }
#sales-change {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 12px; padding: 5px 12px 5px 10px;
  background: var(--tint); color: var(--deep); font-size: 13px;
}
#sales-change::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 8px 2px var(--glow); }
#sales-change.pending { background: var(--warn-bg); color: var(--warn-text); }
#sales-change.pending::before { background: var(--warn-text); box-shadow: none; }
.amount-in { color: var(--good); text-shadow: 0 0 18px var(--glow); }

/* Rounded bars, yesterday lit */
.bars { height: 118px; gap: 10px; margin-top: 24px; align-items: flex-end; }
.bar { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 8px; height: 100%; }
.bar-fill { border-radius: 999px; background: var(--bar); }
.bar:last-child .bar-fill { background: linear-gradient(to top, var(--brand), var(--deep)); box-shadow: 0 0 22px -2px var(--glow); }
.bar:last-child small { color: var(--deep); }

/* Needs-your-answer pills */
.need { display: flex; align-items: center; border-radius: 999px; padding: 15px 42px 15px 20px; margin-top: 10px; font-weight: 600; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05); }
.need::before { content: ""; flex: none; width: 8px; height: 8px; margin-right: 12px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }
.need.bad { background: var(--bad-bg); color: var(--bad-text); }

#needs-tile { background: none; box-shadow: none; padding: 4px 0 0; backdrop-filter: none; -webkit-backdrop-filter: none; }
#needs-tile .tile-head { font-size: 17px; }

/* Store picker as a pill */
#store-pick {
  display: inline-block; width: auto; min-width: 176px; max-width: 100%; margin: 4px 0 20px; padding: 11px 42px 11px 20px;
  border-radius: 999px; font-weight: 600; font-size: 15px; -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238d9ab5' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 16px;
}
select.field { appearance: none; -webkit-appearance: none; }

.btn { border: 0; border-radius: 999px; background: var(--glass); box-shadow: inset 0 0 0 1px var(--line); padding: 10px 16px; }
.btn.approve { background: var(--brand); box-shadow: 0 8px 20px -8px var(--glow); }
.quick .btn { background: var(--glass); box-shadow: 0 14px 28px -20px var(--drop), inset 0 1px 0 var(--edge); }
.field { box-shadow: inset 0 0 0 1px var(--line); border-radius: 14px; }
.cam { border: 0; border-radius: 18px; box-shadow: 0 14px 28px -18px var(--drop); }
.pill { font-weight: 600; }

/* Floating glass bottom bar (it stays put while pages change, see view-transition-name) */
.tabbar {
  left: 14px; right: 14px; bottom: max(12px, env(safe-area-inset-bottom)); max-width: 420px; margin: 0 auto;
  padding: 7px; gap: 2px; border: 0; border-radius: 28px; background: var(--dock);
  -webkit-backdrop-filter: blur(28px) saturate(1.4); backdrop-filter: blur(28px) saturate(1.4);
  box-shadow: 0 24px 48px -14px var(--drop), inset 0 1px 0 var(--edge);
}
.tabbar::before { content: ""; position: fixed; left: 0; right: 0; bottom: 0; height: 120px; z-index: -1; pointer-events: none; background: linear-gradient(to top, var(--bg) 30%, transparent); }
.tabbar a, .tabbar button { border-radius: 20px; padding: 9px 4px 8px; color: var(--muted); }
.tabbar span { padding: 0; font-size: 11px; }
.tabbar a[aria-current="page"], .tabbar button[aria-pressed="true"] { color: var(--brand); background: var(--tint); box-shadow: 0 0 24px -6px var(--glow); }
.tabbar a[aria-current="page"] span, .tabbar button[aria-pressed="true"] span { background: none; color: var(--deep); padding: 0; }
.tabbar a[aria-current="page"] svg, .tabbar button[aria-pressed="true"] svg { filter: drop-shadow(0 0 8px var(--glow)); }
.tabbar a:active, .tabbar button:active { transform: scale(.9); transition-duration: .1s; }
.has-tabbar .wrap, body.has-tabbar .wrap { padding-bottom: 130px; }

@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise .8s var(--settle) both; animation-delay: calc(var(--i, 0) * 70ms + 60ms); }
  .rise .bar-fill { animation: grow .9s var(--settle) both; animation-delay: calc(.3s + var(--b, 0) * 55ms); }
  .tabbar { animation: dock .9s var(--settle) .3s both; }
  @keyframes rise { from { opacity: 0; transform: translate3d(0, 18px, 0) scale(.98); } to { opacity: 1; transform: none; } }
  @keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
  @keyframes dock { from { opacity: 0; transform: translate3d(0, 90px, 0); } to { opacity: 1; transform: none; } }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  @view-transition { navigation: none; }
}
.preview[hidden] { display: none; }

/* Daily-work screens */
.ops-form { margin-bottom: 18px; }
.line-row { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 6px; margin-bottom: 6px; }
.line-row .field { margin: 0; padding: 10px 8px; min-width: 0; }
.alert-button { background: rgb(220, 38, 38) !important; color: rgb(255, 255, 255) !important; font-size: 18px; padding: 18px; }
button.card { width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; display: block; }
.alert-card { box-shadow: inset 4px 0 0 rgb(248, 113, 113); }

/* Bookkeeping screens */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }
.filters select { flex: 1 1 150px; }
.meter { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; margin: 4px 0 10px; }
.meter-fill { display: block; height: 100%; border-radius: 999px; background: var(--brand); }
.meter-fill.close { background: var(--warn-text); }
.meter-fill.over { background: var(--bad-text); }
.pl-row { display: flex; justify-content: space-between; gap: 12px; }
.pl-row.pl-total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; }
.big-number { font-size: 30px; font-weight: 700; margin: 4px 0 0; color: var(--deep); }
.big-number.bad { color: var(--bad-text); }
.fold { margin: 0 0 14px; }
.fold > summary { cursor: pointer; font-weight: 600; padding: 12px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; color: var(--deep); }
.fold[open] > summary { margin-bottom: 12px; }

/* Face ID / fingerprint unlock screen (lock.js) */
html[data-lock="wait"] body > * { visibility: hidden; }
.lock-screen {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center;
  padding: 24px; background: var(--bg);
}
.lock-card { width: 100%; max-width: 360px; text-align: center; }
.lock-btn { width: 100%; margin-top: 8px; }

/* The "hidden" attribute must win over card and button display rules. */
[hidden] { display: none !important; }

/* Long private links wrap instead of widening the page */
#g-link, #g-shown, #link, #new-link { overflow-wrap: anywhere; word-break: break-all; }

/* ===== Jibgrid blue look (owner's mockups, 2026-10-20). Red is only for alerts. ===== */
.tabbar[aria-label="Admin app tabs"] { background: var(--nav-bg); border-top: 0; box-shadow: none; }
.tabbar[aria-label="Admin app tabs"] a { color: var(--nav-text); }
.tabbar[aria-label="Admin app tabs"] a[aria-current="page"] { color: var(--nav-on); }
.tabbar[aria-label="Admin app tabs"] a[aria-current="page"] span { background: transparent; color: var(--nav-on); }
.apphead { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: var(--card); border-bottom: 1px solid var(--line); max-width: 560px; margin: 0 auto; }
.apphead strong { display: block; font-size: 19px; color: var(--deep); }
.apphead small { color: var(--muted); }
.avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; font-weight: 700; text-decoration: none; }
.sect-head { display: flex; justify-content: space-between; align-items: baseline; margin: 18px 0 8px; }
.sect-head h2 { margin: 0; font-size: 17px; }
.sect-head a { color: var(--brand); text-decoration: none; font-size: 14px; font-weight: 600; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { display: flex; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 12px; box-shadow: 0 1px 2px rgba(11, 42, 91, .06); }
.stat small { color: var(--muted); }
.stat-big { font-size: 28px; font-weight: 800; color: var(--deep); line-height: 1.15; }
.stat-icon { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--tint); color: var(--brand); font-weight: 800; font-size: 20px; }
.stat-icon.good { background: var(--good-bg); color: var(--good); }
.trend { font-size: 12px; color: var(--good); font-weight: 600; }
.trend.down { color: var(--bad-text); }
.trend.flat { color: var(--muted); font-weight: 400; }
.rows { background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: 0 1px 2px rgba(11, 42, 91, .06); }
.rows > .note { padding: 12px 14px; margin: 0; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; text-decoration: none; color: var(--text); border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.row-icon { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--tint); color: var(--brand); font-weight: 800; }
.row-text { flex: 1; min-width: 0; }
.row-text small { display: block; color: var(--muted); }
.chev { color: var(--muted); font-size: 22px; }
.row.alert.bad .row-icon { background: var(--bad-bg); color: var(--bad-line); }
.row.alert.bad .chev { color: var(--bad-line); }
.row.alert.warn .row-icon { background: var(--warn-bg); color: var(--warn-text); }
.row.alert.warn .chev { color: var(--warn-text); }
.actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.actions a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; color: var(--text); text-decoration: none; font-size: 13px; text-align: center; }
.actions svg { width: 28px; height: 28px; fill: none; stroke: var(--brand); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sect-head a::after { content: " \203A"; }
.avatar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* Flat bottom bar, docked to the bottom like the mockups (replaces the floating glass dock) */
.tabbar { left: 0; right: 0; bottom: 0; max-width: none; margin: 0; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); border-radius: 0; background: var(--card); border-top: 1px solid var(--line); -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; animation: none; }
.tabbar::before { display: none; }
.tabbar a, .tabbar button { border-radius: 12px; }
.tabbar a[aria-current="page"], .tabbar button[aria-pressed="true"] { background: none; box-shadow: none; color: var(--brand); }
.tabbar a[aria-current="page"] span, .tabbar button[aria-pressed="true"] span { color: var(--brand); }
.tabbar a[aria-current="page"] svg, .tabbar button[aria-pressed="true"] svg { filter: none; }
.tabbar[aria-label="Admin app tabs"] { background: var(--nav-bg); border-top: 0; }
.tabbar[aria-label="Admin app tabs"] a[aria-current="page"], .tabbar[aria-label="Admin app tabs"] a[aria-current="page"] span { color: var(--nav-on); }
.big, .amount-in { text-shadow: none; }
#sales-change.trend { display: block; margin: 2px 0 0; padding: 0; background: none; font-size: 12px; color: var(--good); }
#sales-change.trend::before { display: none; }
#sales-change.trend.down { color: var(--bad-text); }
.stat small { white-space: nowrap; }
.has-tabbar .wrap, body.has-tabbar .wrap { padding-bottom: 96px; }
.stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stat > div { min-width: 0; }
.stat small { white-space: normal; }
.stat-big { font-size: 24px; }
@media (max-width: 420px) { .stat { flex-direction: column; gap: 6px; } .stat-big { font-size: 22px; } }

/* Schedule & Team */
.top-actions { display: flex; gap: 8px; margin: 0 0 14px; }
.top-actions .btn { flex: 1; text-align: center; margin: 0; background: var(--card); }
.weekcard, .listcard { background: var(--card); border: 1px solid var(--line); border-radius: 16px; margin-bottom: 14px; box-shadow: 0 1px 2px rgba(11, 42, 91, .06); overflow: hidden; }
.listcard { padding: 4px 14px 8px; }
.listcard .sect-head { margin: 10px 0 6px; }
.listcard .row { padding-left: 0; padding-right: 0; }
.weekbar { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; }
.weekbar svg { width: 22px; height: 22px; fill: none; stroke: var(--text); stroke-width: 1.7; stroke-linecap: round; }
.daystrip { display: grid; grid-template-columns: repeat(7, 1fr); border-top: 1px solid var(--line); background: var(--bg); }
.daybtn { background: none; border: 0; padding: 8px 0; font: inherit; color: var(--text); cursor: pointer; text-align: center; }
.daybtn small { display: block; color: var(--muted); font-size: 11px; }
.daybtn span { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-weight: 600; }
.daybtn[aria-pressed="true"] { background: var(--tint); }
.daybtn[aria-pressed="true"] small { color: var(--brand); }
.daybtn[aria-pressed="true"] span { background: var(--brand); color: var(--on-brand); }
.dayrow { display: flex; gap: 12px; padding: 12px 14px; border-top: 1px dashed var(--line); }
.dayrow > b { width: 28px; color: var(--muted); font-size: 13px; padding-top: 6px; }
.shiftcards { flex: 1; display: grid; gap: 6px; }
.shiftcard { border-radius: 10px; padding: 6px 10px; border: 1px solid; }
.shiftcard b { display: block; }
.shiftcard small { color: inherit; opacity: .85; }
.shift-a { background: var(--good-bg); border-color: var(--good); color: var(--text); }
.shift-b { background: var(--info-bg); border-color: var(--info-text); color: var(--text); }
.shift-c { background: var(--warn-bg); border-color: var(--warn-text); color: var(--text); }
.shift-d { background: var(--tint); border-color: var(--brand); color: var(--text); }
.count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--warn-text); color: var(--bg); font-size: 12px; margin-left: 6px; }
.count:empty { display: none; }
.row-icon.warn { background: var(--warn-bg); color: var(--warn-text); }
.btn.small { padding: 8px 14px; margin: 0; }
.muted { color: var(--muted); }

/* Delivery Check (Store app) */
.dc-title { font-size: 24px; margin: 4px 0 6px; }
.dc-status { display: inline-block; margin-bottom: 12px; padding: 3px 12px; border-radius: 999px; background: var(--tint); color: var(--brand); font-size: 13px; font-weight: 600; }
.dc-status::before { content: "\25CF  "; font-size: 10px; }
.dc-ref { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 14px; }
.dc-ref small { display: block; color: var(--muted); }
.dc-items { margin: 8px 0 0; font-size: 18px; }
.dc-table { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 6px; margin-bottom: 8px; }
.dc-row { display: grid; grid-template-columns: minmax(0, 2fr) 1fr 1fr 1fr 1.3fr; gap: 6px; align-items: center; padding: 4px 0; }
.dc-row .field { min-width: 0; padding: 8px 6px; margin: 0; }
.dc-head { color: var(--muted); font-size: 12px; font-weight: 600; }
.dc-badge { font-size: 12px; font-weight: 700; text-align: center; border-radius: 8px; padding: 4px 2px; border: 1px solid transparent; }
.dc-badge:empty { display: none; }
.dc-badge.ok { color: var(--good); background: var(--good-bg); border-color: var(--good); }
.dc-badge.bad { color: var(--bad-text); background: var(--bad-bg); border-color: var(--bad-line); }
.dc-badge.warn { color: var(--warn-text); background: var(--warn-bg); border-color: var(--warn-text); }
.alert-btn { background: var(--bad-line) !important; color: var(--card); box-shadow: none; }
.dc-count { display: block; text-align: right; color: var(--muted); }
textarea { font: inherit; }
.dc-photo { display: block; width: 100%; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin: 10px 0; font: inherit; color: var(--text); cursor: pointer; }
.dc-photo small { display: block; color: var(--muted); }
.dc-shots { display: flex; gap: 8px; flex-wrap: wrap; }
.dc-shots img { width: 30%; max-width: 120px; }

/* Feedback: a note's words wrap and keep the writer's line breaks */
.fb-text { white-space: pre-wrap; overflow-wrap: anywhere; margin: 6px 0; }
textarea.field { resize: vertical; font: inherit; min-height: 96px; }

/* Connections page (connections.html): one card each for the bank and Clover. */
.conn h2 { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.conn label { display: block; margin-top: 12px; color: var(--muted); font-size: 14px; }
.conn .field { width: 100%; box-sizing: border-box; }
.conn-steps { margin: 12px 0; padding-inline-start: 22px; color: var(--muted); }
.conn-steps li { margin: 4px 0; }
.conn a.btn { display: inline-block; text-decoration: none; color: var(--brand); }
.conn-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.conn-buttons .primary { width: auto; flex: 1 1 140px; margin: 0; }
.conn-shown { margin-top: 10px; }
.conn-shown div { padding: 6px 0; border-bottom: 1px solid var(--line); }
.conn .msg.bad { border-color: var(--bad-line); background: var(--bad-bg); color: var(--bad-text); }

/* Inside WILLIS (the owner's control app adds html.in-willis): his password and "sign out of this phone" stay on Jibgrid itself. */
html.in-willis .not-in-willis{display:none!important}

/* The owner page's tester and signed-in-device rows (private.js) hold several buttons: let them wrap onto the next
   line on a phone instead of running off the right edge (Gary 2026-11-07: "the buttons ... go off the screen to the
   right and the screen scrolls right a tad"). The name and the small line take the whole width above the buttons. */
.owner-item { flex-wrap: wrap; justify-content: flex-start; align-items: center; gap: 8px; }
.owner-item > strong, .owner-item > small { flex: 1 1 100%; }
.owner-item > br { display: none; }
