/* The admin panel: the public site's light look (a very subtle grey page, white
   cards, near-black text), in plain CSS. */
:root { --page: #f3f3f1; --card: #fff; --ink: #151515; --muted: #75756f; --line: rgb(0 0 0 / 0.08); --green: #0a9a4c; --pink: #d0179a; --cyan: #0889ad; }
* { box-sizing: border-box; }
html { background: var(--page); color: var(--ink); font: 16px/1.45 "Helvetica Neue", Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--green); }
/* Signed in: the menu is a sidebar on the left; on phones it folds into a Menu button. */
.shell { max-width: 1440px; margin: 0 auto; padding: 0 24px; }
.shell.signed-in { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 40px; }
.side { padding: 18px 0; }
.shell.signed-in .side { position: sticky; top: 0; align-self: start; max-height: 100vh; overflow-y: auto; }
.navtoggle { display: none; }
.sidetop { display: flex; justify-content: space-between; align-items: center; min-height: 34px; }
.menubtn { display: none; padding: 6px 14px; border-radius: 999px; background: var(--card); box-shadow: 0 0 0 1px var(--line); cursor: pointer; user-select: none; }
.side nav { display: flex; flex-direction: column; gap: 2px; margin-top: 24px; }
.side nav a, .side nav button.signout { display: block; width: 100%; text-align: left; padding: 8px 14px; border-radius: 10px; color: var(--ink); }
.side nav a:hover, .side nav button.signout:hover { background: rgb(0 0 0 / 0.05); color: var(--ink); }
.side nav a.on { background: var(--ink); color: var(--card); }
/* Sign out is a form button; looks like the other menu items. */
.side nav .signout-form { margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--line); }
.side nav button.signout { background: none; border: 0; font: inherit; cursor: pointer; color: var(--muted); }
.logo { font-weight: 500; letter-spacing: -0.01em; }
.logo span { color: var(--green); }
main { padding: 32px 0 80px; }
h1 { font-size: 44px; font-weight: 500; letter-spacing: -0.02em; margin: 0 0 28px; }
h2 { font-size: 20px; font-weight: 500; margin: 44px 0 12px; }
.muted { color: var(--muted); }
.neon { color: var(--green); }
.bad { color: var(--pink); }
.stats { display: flex; gap: 56px; flex-wrap: wrap; }
.stats span { display: block; }
.stats b { display: block; font-size: 40px; font-weight: 500; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: 16px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
td, th { text-align: left; padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: top; font-weight: 400; }
tr:first-child td, tr:first-child th { border-top: 0; }
th { color: var(--muted); font-size: 13px; background: rgb(0 0 0 / 0.025); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
pre { white-space: pre-wrap; background: var(--card); box-shadow: 0 0 0 1px var(--line); padding: 16px; border-radius: 12px; font-size: 13px; color: #333; overflow-x: auto; }
input[type=text], input[type=email], input[type=password], input[type=url], select {
  background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font: inherit; width: 100%; outline: none; }
input:focus, select:focus { border-color: var(--ink); }
button, .button, input[type=submit] { background: var(--card); color: var(--ink); border: 1px solid rgb(0 0 0 / 0.15); border-radius: 999px; padding: 7px 16px; font: inherit; cursor: pointer; }
button:hover, .button:hover, input[type=submit]:hover { border-color: var(--ink); }
button.danger, input[type=submit].danger { color: var(--pink); }
button.danger:hover, input[type=submit].danger:hover { border-color: var(--pink); }
.filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.filters a { padding: 6px 14px; border-radius: 999px; background: var(--card); box-shadow: 0 0 0 1px var(--line); color: var(--muted); }
.filters a.on { background: var(--ink); color: var(--card); box-shadow: none; }
.filters form { flex: 1; min-width: 240px; display: flex; gap: 8px; }
.flash { padding: 10px 14px; color: var(--green); background: #e8f7ee; border-radius: 10px; }
.flash.bad { color: var(--pink); background: #fbe9f5; }
.field { margin-bottom: 22px; } .field label { display: block; color: var(--muted); font-size: 14px; margin-bottom: 4px; }
.inline { display: inline; } .row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; background: var(--muted); }
.dot.ok { background: var(--green); } .dot.failed { background: var(--pink); } .dot.running { background: var(--cyan); }
.logo-tile { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 10px; background: var(--card); box-shadow: 0 0 0 1px var(--line); color: var(--muted); font-size: 14px; font-weight: 500; overflow: hidden; }
.logo-tile img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }

/* Daily sales: one bar per day, height = units sold; click a day to open it. */
.daychart { display: flex; align-items: flex-end; gap: 4px; height: 180px; padding: 12px; background: var(--card); border-radius: 16px; box-shadow: 0 0 0 1px var(--line); }
.daybar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; color: var(--muted); }
.daybar .bar { width: 100%; max-width: 28px; min-height: 2px; background: color-mix(in srgb, var(--green) 55%, white); border-radius: 4px 4px 0 0; }
.daybar:hover .bar, .daybar.on .bar { background: var(--green); }
.daybar.on { color: var(--ink); font-weight: 500; }
.daybar .lbl { font-size: 12px; font-variant-numeric: tabular-nums; }

/* Phones and small tablets: one column, the menu behind the Menu button, wide tables scroll sideways. */
@media (max-width: 800px) {
  .shell { padding: 0 16px; }
  .shell.signed-in { display: block; }
  .shell.signed-in .side { position: static; max-height: none; overflow: visible; padding: 14px 0; }
  .menubtn { display: block; }
  .side nav { display: none; margin-top: 12px; padding: 6px; background: var(--card); border-radius: 14px; box-shadow: 0 0 0 1px var(--line); }
  .navtoggle:checked ~ nav { display: flex; }
  .side nav a, .side nav button.signout { padding: 11px 14px; }
  main { padding: 16px 0 60px; }
  h1 { font-size: 32px; margin-bottom: 20px; }
  h2 { margin-top: 32px; }
  .stats { gap: 24px 32px; }
  .stats b { font-size: 30px; }
  table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  td, th { padding: 10px 12px; }
  .filters form { min-width: 0; flex-basis: 100%; }
  .daychart { gap: 2px; padding: 8px; overflow-x: auto; }
  .daybar .lbl { font-size: 10px; }
  input[type=text], input[type=email], input[type=password], input[type=url], select { font-size: 16px; }
}
