/* Customer dashboard. Shares the site's palette so it feels like the same
   company, but lighter and denser — this is a tool people use, not a page they
   read once. */

:root{
  --ink:#101013; --ink-2:#2b2b33; --ink-3:#6a6a78;
  --line:#e5e2dc; --bg:#faf8f4; --card:#fff;
  --accent:#ff6a13; --accent-ink:#fff; --accent-soft:#fff1e6;
  --good:#1c7c4a; --good-bg:#e8f5ee;
  --warn:#8a5a00; --warn-bg:#fdf3e0;
  --radius:14px; --radius-sm:10px;
  --shadow:0 1px 2px rgba(16,16,19,.06),0 6px 20px rgba(16,16,19,.05);
}
*{box-sizing:border-box}
body{
  margin:0;background:var(--bg);color:var(--ink);
  font:15px/1.55 ui-sans-serif,system-ui,-apple-system,"Segoe UI",Helvetica,Arial,sans-serif;
  -webkit-font-smoothing:antialiased;
}
a{color:var(--ink)}
.wrap{max-width:1060px;margin:0 auto;padding:0 20px}

/* ---------- top bar ---------- */
.bar{background:var(--ink);color:#fff}
.bar__in{display:flex;align-items:center;gap:16px;height:60px}
.bar__brand{display:flex;align-items:center;gap:10px;font-weight:800;letter-spacing:-.02em;color:#fff;text-decoration:none}
.bar__mark{width:26px;height:26px;border-radius:7px;background:#fff;color:var(--ink);display:grid;place-items:center;font-weight:900;font-size:14px}
.bar__biz{margin-left:auto;font-size:13px;color:#b9b9c4}
.bar__out{color:#fff;font-size:13px;text-decoration:none;border:1px solid rgba(255,255,255,.28);padding:6px 12px;border-radius:999px}
.bar__out:hover{background:rgba(255,255,255,.1)}

/* The bar grew from two links to six. On a phone a fixed-height flex row just
   overflows sideways, so below 760px it wraps: brand and business name on the
   first line, the links underneath. */
@media (max-width:760px){
  /* ⚠️ top/bottom only — the shorthand would wipe the 20px side padding this
     element inherits from .wrap, and the whole bar ran to the screen edge. */
  .bar__in{flex-wrap:wrap;height:auto;padding-top:11px;padding-bottom:11px;gap:9px 8px}
  .bar__brand{font-size:.95rem}
  /* A long business name was being pushed past the wrap's padding and clipped by
     the screen edge. Let it shrink and ellipsis instead of overflowing. */
  .bar__biz{font-size:12px;min-width:0;flex:0 1 auto;overflow:hidden;
            text-overflow:ellipsis;white-space:nowrap}
  .bar__out{font-size:12.5px;padding:5px 11px}
  .bar__in > .bar__out:first-of-type{margin-left:0}
}

/* ---------- login ---------- */
.login{min-height:100dvh;display:grid;place-items:center;padding:24px}
.login__card{width:100%;max-width:380px;background:var(--card);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:28px}
.login__mark{width:40px;height:40px;border-radius:11px;background:var(--ink);color:#fff;display:grid;place-items:center;font-weight:900;margin-bottom:16px}
.login h1{font-size:20px;margin:0 0 4px;letter-spacing:-.02em}
.login p.sub{margin:0 0 20px;color:var(--ink-3);font-size:13.5px}

label{display:block;font-size:13px;font-weight:700;margin:0 0 6px}
input[type=email],input[type=password],input[type=url],input[type=text]{
  width:100%;padding:11px 13px;border:1px solid var(--line);border-radius:var(--radius-sm);
  font:inherit;background:#fff;color:var(--ink);
}
input:focus-visible{outline:3px solid rgba(255,106,19,.35);outline-offset:1px;border-color:var(--accent)}
.field{margin-bottom:14px}

.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  padding:11px 18px;border:0;border-radius:999px;font:inherit;font-weight:700;
  background:var(--accent);color:var(--accent-ink);cursor:pointer;text-decoration:none;
}
.btn:hover{filter:brightness(1.06)}
.btn--full{width:100%}
.btn--ghost{background:transparent;color:var(--ink);border:1px solid var(--line)}
.btn--sm{padding:8px 14px;font-size:13.5px}

.note{padding:11px 13px;border-radius:var(--radius-sm);font-size:13.5px;margin-bottom:16px}
.note--bad{background:#fdecec;color:#8a1c1c}
.note--good{background:var(--good-bg);color:var(--good)}
.note--warn{background:var(--warn-bg);color:var(--warn)}

/* ---------- dashboard ---------- */
.head{padding:30px 0 6px}
.head h1{font-size:23px;margin:0 0 4px;letter-spacing:-.02em}
.head p{margin:0;color:var(--ink-3);font-size:14px}

.stats{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;margin:22px 0}
@media(min-width:780px){.stats{grid-template-columns:repeat(4,1fr)}}
@media(min-width:760px){.stats{grid-template-columns:repeat(4,1fr)}}
.stat{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);
      padding:15px 16px;display:flex;gap:12px;align-items:flex-start}
.stat__ico{flex:none;width:38px;height:38px;border-radius:11px;display:flex;
           align-items:center;justify-content:center;background:var(--accent-soft);color:var(--accent)}
.stat__ico svg{display:block}
.stat__txt{min-width:0}
.stat__lbl{display:block;font-size:11.5px;color:var(--ink-3);line-height:1.3}
.stat b{display:block;font-size:23px;letter-spacing:-.03em;line-height:1.25;
        white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.stat__sub{display:block;font-size:11.5px;color:var(--ink-3);line-height:1.3}

/* ---------- taps by day ----------
   A plain CSS bar chart: 30 columns, one per day, no library. Quiet days keep a
   faint stub so the day is still visibly there rather than missing. */
.days{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:15px 17px 12px;margin-bottom:16px}
.days__head{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;margin-bottom:12px}
.days__head h2{font-size:14px;margin:0;letter-spacing:-.01em}
.days__head span{font-size:12.5px;color:var(--ink-3)}
/* Taps over time is a line, not bars — one point a day for thirty days is a
   shape you read, and thirty separate bars is just noise. */
.days__line{position:relative;height:96px}
.days__line svg{display:block;width:100%;height:100%;overflow:visible}
.days__line .grid{stroke:var(--line);stroke-width:1;vector-effect:non-scaling-stroke}
.days__line .fill{fill:var(--accent-soft)}
.days__line .path{fill:none;stroke:var(--accent);stroke-width:2;
                  stroke-linejoin:round;stroke-linecap:round;vector-effect:non-scaling-stroke}
/* Dots sit over the chart as HTML. See line_chart() for why they cannot be SVG
   circles: preserveAspectRatio="none" stretches the grid and turns a circle into
   an oval. These carry the hover text a bar chart used to give for free. */
.days__dots{position:absolute;inset:0;pointer-events:none}
.days__dot{position:absolute;width:7px;height:7px;margin:-3.5px 0 0 -3.5px;
           border-radius:50%;background:var(--accent);box-shadow:0 0 0 2px var(--card);
           pointer-events:auto;cursor:default}
.days__dot:hover{width:11px;height:11px;margin:-5.5px 0 0 -5.5px}
.days__yaxis{position:absolute;inset:0;pointer-events:none}
.days__ymax{position:absolute;top:-6px;left:0;font-size:11px;color:var(--ink-3);background:var(--card);padding-right:4px}
.days__axis{display:flex;justify-content:space-between;font-size:11.5px;color:var(--ink-3);margin-top:7px}
.days__none{margin:0;font-size:13.5px;color:var(--ink-3)}
@media(max-width:520px){.days__chart{height:66px;gap:2px}}

.sec-title{display:flex;align-items:baseline;gap:10px;margin:26px 0 12px}
.sec-title h2{font-size:16px;margin:0;letter-spacing:-.01em}
.sec-title span{font-size:13px;color:var(--ink-3)}

.tags{display:grid;gap:12px}
.tag{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);overflow:hidden}
.tag__top{display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px;padding:14px 17px}
.tag__slot{font-weight:800;font-size:15px}
.tag__where{font-size:12.5px;color:var(--ink-3)}
.tag__code{font:12.5px ui-monospace,SFMono-Regular,Menlo,monospace;color:var(--ink-3);background:#f2efe9;padding:3px 8px;border-radius:6px}
.tag__taps{margin-left:auto;text-align:right}
.tag__taps b{display:block;font-size:18px;line-height:1.1;letter-spacing:-.02em}
.tag__taps span{font-size:11.5px;color:var(--ink-3)}

.pill{font-size:11.5px;font-weight:700;padding:3px 9px;border-radius:999px}
.pill--live{background:var(--good-bg);color:var(--good)}
.pill--off{background:var(--warn-bg);color:var(--warn)}

.tag__body{border-top:1px solid var(--line);padding:14px 17px;background:#fcfbf8}
.tag__row{display:flex;flex-wrap:wrap;gap:10px;align-items:flex-end}
.tag__row .field{flex:1 1 340px;margin:0}
.tag__hint{font-size:12.5px;color:var(--ink-3);margin:8px 0 0}
.tag__hint code{background:#f2efe9;padding:2px 6px;border-radius:5px;font-size:12px}

.empty{background:var(--card);border:1px dashed var(--line);border-radius:var(--radius);padding:26px;text-align:center;color:var(--ink-3)}
/* Plain panel — used by the sign-up list and the settings form. Matches .stat and
   .tag so the page keeps one card style rather than three near-identical ones. */
.card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}
.card > div:last-child{border-bottom:0}
.foot{margin:34px 0 40px;font-size:12.5px;color:var(--ink-3)}


/* ---------- refine bar + product boxes ----------
   Small boxes, two per row on a phone, more as it gets wider. Detail is hidden in
   a native <details> so it works with JavaScript off; advanced mode just opens
   them all. */
.refine{display:flex;flex-wrap:wrap;gap:7px;align-items:center;margin:6px 0 4px}
.refine__tab{
  display:inline-block;font-size:13px;text-decoration:none;color:var(--ink-2);
  border:1px solid var(--line);background:var(--card);padding:6px 13px;border-radius:999px;
}
.refine__tab:hover{border-color:var(--ink-3)}
.refine__tab.is-on{background:var(--ink);color:#fff;border-color:var(--ink)}
.refine__adv{margin-left:auto;display:flex;align-items:flex-start;gap:10px;font-size:13px;
             color:var(--ink-2);cursor:pointer;user-select:none;max-width:340px}
.refine__advtxt b{display:block;font-weight:650;line-height:1.35}
.refine__advtxt > span{display:block;font-size:11.5px;color:var(--ink-3);line-height:1.45;margin-top:2px}
/* On a phone it sits under the filter tabs rather than squeezing beside them. */
@media(max-width:700px){
  .refine__adv{margin-left:0;flex:1 1 100%;max-width:none;padding-top:4px}
}
/* A real switch. The checkbox is still the control — it is moved out of sight
   rather than hidden, so it keeps keyboard focus and screen readers. */
.switch{position:relative;flex:none;width:42px;height:24px;display:block}
.switch input{position:absolute;opacity:0;width:100%;height:100%;margin:0;cursor:pointer}
.switch .track{position:absolute;inset:0;border-radius:999px;background:#d8d3ca;
               transition:background .16s ease;pointer-events:none}
.switch .knob{position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;
              background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.28);
              transition:transform .16s ease;pointer-events:none}
.switch input:checked ~ .track{background:var(--accent)}
.switch input:checked ~ .knob{transform:translateX(18px)}
.switch input:focus-visible ~ .track{outline:2px solid var(--ink);outline-offset:2px}

.prods{display:grid;gap:12px;grid-template-columns:1fr}
@media(min-width:620px){.prods{grid-template-columns:repeat(2,1fr)}}
@media(min-width:1000px){.prods{grid-template-columns:repeat(3,1fr)}}

.prod{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);
      box-shadow:var(--shadow);overflow:hidden}
.prod__head{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:12px 14px 0}
.prod__name b{display:block;font-size:14.5px;line-height:1.25}
.prod__name span{display:block;font-size:12.5px;color:var(--ink-3)}
.prod__slot{margin-left:auto;font-size:11.5px;color:var(--ink-3);
            border:1px solid var(--line);border-radius:999px;padding:2px 9px}
.prod__asks{display:flex;flex-wrap:wrap;gap:6px 14px;padding:10px 14px 12px;font-size:13px}
.prod__asks label{display:flex;align-items:center;gap:7px;font-weight:400;margin:0;cursor:pointer}
.prod__asks input{width:18px;height:18px;accent-color:var(--accent)}
.prod__more{border-top:1px solid var(--line)}
.prod__more summary{cursor:pointer;font-size:13px;font-weight:650;padding:10px 14px;
                    list-style:none;color:var(--ink-2)}
.prod__more summary::-webkit-details-marker{display:none}
.prod__more summary::after{content:" ▾";color:var(--ink-3)}
.prod__more[open] summary::after{content:" ▴"}
/* Kept deliberately tight: with advanced mode on, every one of these is open at
   once, and a roomy panel turns eight displays into a very long page. */
.prod__body{padding:2px 12px 11px;border-top:1px solid var(--line)}
.prod__body .field{margin-bottom:8px}
.prod__body label{font-size:11.5px;margin-bottom:3px}
.prod__body input{padding:8px 10px;font-size:13px}
.prod__code{display:block;font:11px/1.45 ui-monospace,SFMono-Regular,Menlo,monospace;
            background:#f2efe9;padding:6px 8px;border-radius:7px;word-break:break-all;color:var(--ink-2)}
.prod__stats{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin:9px 0}
.prod__stats div{background:var(--bg);border:1px solid var(--line);border-radius:9px;padding:6px 8px}
.prod__stats b{display:block;font-size:15px;letter-spacing:-.02em;line-height:1.25}
.prod__stats span{font-size:10.5px;color:var(--ink-3);line-height:1.25;display:block}
.prod__rename{border-top:1px solid var(--line);padding-top:12px;margin-top:4px}

/* Logo drop zone (admin). The file input itself is moved off-screen, not hidden,
   so the keyboard and screen readers still reach it and the form works with JS off. */
.drop{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;
      text-align:center;padding:20px 16px;border:1.5px dashed var(--line);border-radius:12px;
      background:var(--bg);color:var(--ink-3);cursor:pointer;transition:border-color .12s,background .12s}
.drop:hover{border-color:var(--ink-3)}
.drop.is-over{border-color:var(--accent);background:var(--accent-soft);color:var(--accent)}
.drop b{font-size:13.5px;color:var(--ink-2)}
.drop span{font-size:12px;line-height:1.4}
.drop.is-over b{color:var(--accent)}

/* Logo size + position, with a phone-width preview beside it. */
.logoset{display:grid;gap:16px;grid-template-columns:1fr;margin-top:12px}
@media(min-width:640px){.logoset{grid-template-columns:1fr auto}}
.logoset__ctl label{display:block;font-size:11.5px;color:var(--ink-3);margin-bottom:4px}
.logoset__ctl input[type=range]{width:100%;max-width:280px;accent-color:var(--accent)}
#logo_w_val{font-size:12px;color:var(--ink-3)}
.logoset__align{display:flex;gap:6px;flex-wrap:wrap}
.logoset__align label{margin:0}
.logoset__align input{position:absolute;opacity:0;width:0;height:0}
.logoset__align span{display:inline-block;border:1px solid var(--line);border-radius:999px;
                     padding:6px 13px;font-size:12.5px;cursor:pointer;background:var(--card)}
.logoset__align input:checked + span{background:var(--ink);color:#fff;border-color:var(--ink)}
.logoset__align input:focus-visible + span{outline:2px solid var(--accent);outline-offset:2px}

.logoset__prev{flex:none}
.logoset__cap{display:block;font-size:11px;color:var(--ink-3);margin-bottom:5px}
.logoset__page{width:300px;max-width:100%;background:#f7f3ec;border:1px solid var(--line);
               border-radius:14px;padding:20px 15px;text-align:center}
.logoset__page img{max-width:180px;max-height:144px;width:auto;height:auto;display:inline-block}
.logoset__page img.oncard{background:#fff;padding:9px 12px;border-radius:11px}
.logoset__word{display:inline-block;font-size:17px;letter-spacing:.18em;text-transform:uppercase;
               line-height:1.25;color:#14120f}
.logoset__msg{display:block;font-size:9.5px;letter-spacing:.2em;text-transform:uppercase;
              color:#7a7369;margin-top:7px}
.logoset__btn{display:block;margin-top:13px;background:linear-gradient(180deg,#d98b3a,#c2762a);
              color:#fff;border-radius:12px;padding:15px 10px;font-size:11px;font-weight:700;
              letter-spacing:.14em;text-transform:uppercase;text-align:center}

/* Build credit. The quietest thing on the page — this is a tool people use daily,
   so it should read as a footnote, never as a second brand competing with theirs. */
.app-by{margin:26px 0 4px;text-align:center;font-size:11.5px;color:var(--ink-3);opacity:.75}
.app-by a{color:inherit;border-bottom:1px solid var(--line)}
.app-by a:hover{color:var(--ink-2);border-bottom-color:var(--ink-3)}
