/* Desk tokens and controls. Source: shared/web/static/theme.css
   (copied from business_ops/business_ops/web/static/theme.css). Keep in sync. */

:root {
  --background: hsl(0, 0%, 100%);
  --foreground: hsl(20, 14.3%, 4.1%);
  --muted: hsl(60, 4.8%, 95.9%);
  --muted-foreground: hsl(25, 5.3%, 44.7%);
  --card: hsl(0, 0%, 100%);
  --card-foreground: hsl(20, 14.3%, 4.1%);
  --border: hsl(20, 5.9%, 90%);
  --input: hsl(20, 5.9%, 90%);
  --primary: hsl(200, 80%, 50%);
  --primary-foreground: hsl(211, 100%, 99%);
  --secondary: hsl(60, 4.8%, 95.9%);
  --secondary-foreground: hsl(24, 9.8%, 10%);
  --accent: hsl(60, 4.8%, 95.9%);
  --accent-foreground: hsl(24, 9.8%, 10%);
  --destructive: hsl(0, 84.2%, 60.2%);
  --destructive-foreground: hsl(60, 9.1%, 97.8%);
  --ring: hsl(20, 14.3%, 4.1%);
  --radius: 0.5rem;
  --sidebar-background: hsl(0, 0%, 98%);
  --sidebar-border: hsl(0, 0%, 90%);
  --sky-2: hsl(200, 100%, 60%);
  --ink: var(--foreground);
  --paper: var(--muted);
  --text: var(--foreground);
  --line: var(--border);
  --up: #106793;
  --down: var(--destructive);
  --warn: #9a6b12;
  --info: var(--primary);
  --font: Inter, ui-sans-serif, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --ok: var(--up);
  --bad: var(--down);
  --b: var(--line);
  --mut: var(--muted-foreground);
  --shadow: 0 1px 2px #0c0a090d;
  --shadow-raised: 0 8px 24px #0c0a091f;
  --quiet: var(--muted-foreground);
  --banner: #fff7ed;
  --banner-ink: #9a3412;
  --sans: var(--font);
  --ink-800: var(--secondary-foreground);
  --white: var(--background);
  --line-strong: #d6d3d1;
  --gold: var(--primary);
  --gold-700: var(--up);
  --pad: clamp(20px, 4vw, 40px);
  --max: 1120px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  color: var(--foreground);
  background: var(--background);
  font: 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--info); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--foreground);
  text-decoration: none;
}
.brand:hover { color: var(--primary); text-decoration: none; }
.brand-mark {
  width: 32px;
  height: 32px;
  display: block;
  flex: none;
  transform: rotate(45deg);
  transform-origin: center center;
}
.brand-mark .axis { stroke: var(--primary); stroke-width: 1.6; stroke-linecap: round; }
.brand-mark .sin { stroke: var(--primary); stroke-width: 1.5; fill: none; }
.brand-mark .cos { stroke: var(--sky-2); stroke-width: 1.5; fill: none; }
.brand-word { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-weight: 700; }
.brand-sub {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  margin-top: 2px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex: none;
  padding: 16px 24px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  z-index: 20;
}
.topbar .nav { display: flex; gap: 16px; }
.topbar .nav a { color: var(--foreground); text-decoration: none; font-weight: 500; }
.topbar .nav a:hover { color: var(--primary); }

.app-plain main.wrap, .app-plain .wrap {
  width: min(880px, calc(100% - 32px));
  margin: 24px auto 64px;
}
.app-plain h1 { font-size: 28px; letter-spacing: -0.03em; margin: 0 0 6px; font-weight: 700; }
.app-plain h2 { font-size: 18px; margin: 28px 0 10px; font-weight: 600; }
.lede, .sub, .mut, .quiet { color: var(--muted-foreground); }
.sub { margin: 0 0 16px; }
.mono { font-family: var(--mono); }

input, select, textarea {
  font: inherit;
  height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--input);
  border-radius: calc(var(--radius) - 2px);
  background: #fff;
  color: var(--foreground);
  width: auto;
}
input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  padding: 0;
  margin: 0;
  accent-color: var(--primary);
}
textarea { height: auto; width: 100%; min-height: 88px; }
button, .btn, a.button {
  font: inherit;
  height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: calc(var(--radius) - 2px);
  background: var(--primary);
  color: var(--primary-foreground);
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  text-decoration: none;
}
a.btn:hover, a.button:hover { text-decoration: none; }
button.ghost, .btn.ghost, a.button.ghost {
  background: transparent;
  color: var(--foreground);
  border: 1px solid var(--input);
}
button:disabled { opacity: 0.5; cursor: not-allowed; }

.item, .card, .panel {
  background: var(--card);
  color: var(--card-foreground);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 1px 2px hsl(20 14.3% 4.1% / 0.05);
}
.item { margin-bottom: 10px; }

.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: var(--background);
}
.auth-card { width: 100%; max-width: 420px; }
.auth-card > .item { padding: 28px 28px 24px; }
.auth-card .brand { margin: 0 0 16px; }
.auth-card h1 { font-size: 28px; letter-spacing: -0.03em; margin: 0 0 8px; font-weight: 700; }
.stack { display: flex; flex-direction: column; gap: 20px; margin-top: 18px; }
.stack label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 500; }
.stack input, .stack select { width: 100%; }
.stack button, .stack .btn { width: 100%; margin-top: 4px; }
.auth-card .mut { font-size: 13px; margin: 16px 0 0; }

.banner, .alert, .flash {
  width: min(880px, calc(100% - 32px));
  margin: 16px auto 0;
  padding: 12px 14px;
  border-radius: var(--radius);
}
.banner { background: var(--banner); color: var(--banner-ink); }
.alert, .flash { background: var(--muted); color: var(--foreground); }
.flash.err, .alert { background: #fde8e6; color: var(--down); }
.flash.ok { background: #e5f4ee; color: var(--up); }
.auth-wrap .banner, .auth-wrap .alert, .auth-wrap .flash { width: 100%; }

.week { list-style: none; padding: 0; display: grid; gap: 12px; }
.week .today { outline: 1px solid var(--line); padding: 8px 12px; }
.qr svg { width: 180px; height: 180px; }

.kebab { position: relative; }
.kebab summary {
  list-style: none;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid var(--input);
  background: transparent;
  font-size: 20px;
  line-height: 1;
  color: var(--foreground);
}
.kebab summary::-webkit-details-marker { display: none; }
.menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 160px;
  padding: 8px;
  display: grid;
  z-index: 30;
  box-shadow: var(--shadow-raised);
}
.menu a, .menu button {
  text-align: left;
  width: 100%;
  background: none;
  border: 0;
  padding: 8px 10px;
  font: inherit;
  color: var(--foreground);
  text-decoration: none;
  cursor: pointer;
  border-radius: 6px;
  height: auto;
}
.menu a:hover, .menu button:hover { background: var(--muted); }
