/* Tagiora — a small theme over Bootstrap 5.3. */
:root {
  --tg-ink: #1d1838;
  --tg-muted: #5f5a78;
  --tg-brand: #5b3fd6;
  --tg-brand-deep: #4429b8;
  --tg-night: #2b1d5c;
  --tg-tag: #f5a524;
  --tg-paper: #f7f5fd;
  --tg-surface: #fff;
  --tg-line: #e6e1f5;
  --bs-body-font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  --bs-body-color: var(--tg-ink);
  --bs-link-color: var(--tg-brand);
  --bs-link-hover-color: var(--tg-brand-deep);
}

.tg-body { background: var(--tg-paper); color: var(--tg-ink); min-height: 100vh; }
/* Inside the phone app (api/web.py) a page reaches under the phone's own bars; the app
   bar makes room for them, and pages without it (print pages, signing in) do here. */
@media screen {
  .tg-in-app:not(:has(.tg-appbar)) { box-sizing: border-box;
    padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
}

/* Brand */
.tg-brand { display: inline-flex; align-items: center; gap: .5rem; color: var(--tg-brand);
  font-weight: 800; font-size: 1.15rem; letter-spacing: -.01em; text-decoration: none; }
.tg-brand span { color: var(--tg-ink); }
.tg-brand-lg { font-size: 1.5rem; margin-bottom: 1.25rem; }
.tg-brand-lg .tg-mark { width: 36px; height: 36px; }

/* Buttons */
.tg-btn { background: var(--tg-brand); border-color: var(--tg-brand); color: #fff; font-weight: 600; }
.tg-btn:hover, .tg-btn:focus-visible { background: var(--tg-brand-deep); border-color: var(--tg-brand-deep); color: #fff; }
.tg-btn:disabled, .tg-btn.disabled { background: var(--tg-brand); border-color: var(--tg-brand); color: #fff; opacity: .45; }
.tg-btn-ghost { border: 1px solid var(--tg-line); background: var(--tg-surface); color: var(--tg-ink); font-weight: 600; }
.tg-btn-ghost:hover { border-color: var(--tg-brand); color: var(--tg-brand); }

/* Public site */
.tg-top { background: var(--tg-surface); border-bottom: 1px solid var(--tg-line); }
.tg-hero { background: linear-gradient(135deg, var(--tg-night) 0%, var(--tg-brand) 100%); color: #fff; padding: 4.5rem 0 5rem; }
.tg-hero h1 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 800; letter-spacing: -.02em; max-width: 18ch; }
.tg-lead { font-size: 1.15rem; max-width: 46ch; opacity: .92; margin: 1rem 0 2rem; }
.tg-hero .tg-btn { background: var(--tg-tag); border-color: var(--tg-tag); color: var(--tg-night); }
.tg-hero .tg-btn:hover { background: #ffb840; border-color: #ffb840; color: var(--tg-night); }
.tg-kicker { display: inline-block; background: rgba(255,255,255,.14); border-radius: 999px;
  padding: .25rem .75rem; font-size: .85rem; font-weight: 600; margin-bottom: 1rem; }
.tg-steps { margin-top: -2.5rem; padding-bottom: 3rem; }
.tg-step { background: var(--tg-surface); border: 1px solid var(--tg-line); border-radius: 1rem;
  padding: 1.5rem; height: 100%; box-shadow: 0 6px 24px rgba(43,29,92,.06); }
.tg-step h2 { font-size: 1.15rem; font-weight: 700; margin: .75rem 0 .5rem; }
.tg-step p { color: var(--tg-muted); margin: 0; }
.tg-step-no { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%;
  background: var(--tg-paper); color: var(--tg-brand); font-weight: 800; }
.tg-footer { color: var(--tg-muted); font-size: .9rem; padding: 2rem 0; }

/* Sign-in and simple pages */
.tg-auth { min-height: 100vh; display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 2rem 1rem; }
.tg-auth .tg-card { width: 100%; max-width: 400px; }
.tg-auth h1 { font-size: 1.35rem; font-weight: 700; margin-bottom: 1.25rem; }
.tg-note { color: var(--tg-muted); font-size: .9rem; margin-top: 1rem; }

/* Vendor app (app/_shell.html): the menu at the left (.tg-side), and beside it the page
   (.tg-page): the bar on top, then the page itself. Every page has the same width and starts
   in the same place (.tg-frame), and keeps its place whether or not it scrolls (the gutter):
   the counter too, which never scrolls, or it sits half a scrollbar to the right of the rest. */
html:has(.tg-shell) { scrollbar-gutter: stable; }
.tg-shell { --tg-side-w: 15rem; --tg-bar-h: 3.75rem; display: flex; min-height: 100vh; }
.tg-page { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.tg-frame { width: 100%; max-width: 76rem; margin-inline: auto; padding-inline: 2rem; }
@media (max-width: 767.98px) { .tg-frame { padding-inline: .75rem; } }
.tg-main { padding-top: 1.5rem; padding-bottom: 3rem; }
.tg-appbar { flex: none; background: var(--tg-surface); border-bottom: 1px solid var(--tg-line); }
.tg-appbar-row { display: flex; align-items: center; gap: .75rem; min-height: var(--tg-bar-h); }
.tg-appbar-row > .tg-icon-btn { margin-left: -.75rem; }  /* ☰'s lines start where the page does */
/* The shop's name, as bold as Tagiora's own at the top of the menu. */
.tg-shop-name { flex: 0 1 auto; min-width: 0; font-weight: 800; font-size: 1.15rem; letter-spacing: -.01em; color: var(--tg-ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tg-appbar-row .tg-nav { flex: none; margin-left: .25rem; padding-left: 1rem; border-left: 1px solid var(--tg-line); }
.tg-card { background: var(--tg-surface); border: 1px solid var(--tg-line); border-radius: 1rem; padding: 1.5rem; }
.tg-h1 { font-size: 1.6rem; font-weight: 800; letter-spacing: -.01em; }
/* As tall as a button, so a title starts at the same height on every page, with buttons
   beside it or not. */
.tg-page .tg-h1 { line-height: 1.2; padding-block: .2275rem; }
.tg-h2 { font-size: 1.05rem; font-weight: 700; margin-bottom: 1rem; }
.tg-facts { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1.25rem; margin: 0; }
.tg-facts dt { color: var(--tg-muted); font-weight: 500; }
.tg-facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.tg-list { margin: 0; padding-left: 1.1rem; color: var(--tg-muted); }
.tg-list li + li { margin-top: .35rem; }

/* Navigation */
.tg-nav { display: flex; gap: .25rem; }
.tg-nav a { color: var(--tg-muted); text-decoration: none; font-weight: 600; padding: .35rem .55rem; border-radius: .5rem; }
.tg-nav a:hover { background: var(--tg-paper); color: var(--tg-ink); }
.tg-nav a[aria-current="page"] { background: var(--tg-paper); color: var(--tg-brand); }
.tg-crumbs { font-size: .9rem; color: var(--tg-muted); margin-bottom: .25rem; }
.tg-crumbs a { color: var(--tg-muted); }
.tg-count { font-size: .9rem; font-weight: 700; color: var(--tg-muted); background: var(--tg-surface);
  border: 1px solid var(--tg-line); border-radius: 999px; padding: .1rem .55rem; vertical-align: middle; }

/* Dashboard */
.tg-stat { background: var(--tg-surface); border: 1px solid var(--tg-line); border-radius: 1rem; padding: 1rem 1.25rem;
  display: flex; flex-direction: column; color: var(--tg-muted); }
.tg-stat-n { font-size: 1.9rem; font-weight: 800; color: var(--tg-ink); line-height: 1.1; }
.tg-timeline { list-style: none; margin: 0; padding: 0; }
.tg-timeline li { display: flex; flex-direction: column; gap: .15rem; padding: .6rem 0; border-top: 1px solid var(--tg-line); }
.tg-timeline li:first-child { border-top: 0; padding-top: 0; }
.tg-timeline small { color: var(--tg-muted); }

/* (i) buttons (app.js): an explanation shows only when asked for. Without JavaScript,
   no button, and the text shows. */
.tg-info-btn { display: none; }
.tg-js .tg-info-btn { flex: none; width: 2.5rem; height: 2.5rem; display: inline-grid; place-items: center; padding: 0;
  border: 0; border-radius: 50%; background: none; color: #857fa0; }
.tg-js .tg-info-btn:hover { color: var(--tg-brand); }
.tg-js .tg-info-btn[aria-expanded="true"] { background: #efeafd; color: var(--tg-brand); }
.tg-info-btn svg { width: 20px; height: 20px; }
.tg-info-text { margin: .35rem 0 .75rem; font-size: .85rem; line-height: 1.45; color: var(--tg-muted); }
.tg-js .tg-info-text:not(.is-open) { display: none; }
/* A heading with its (i). The button is taller than a section heading, so the row
   takes back the difference and the heading stays where it was. */
.tg-with-info { display: flex; align-items: center; gap: .25rem; }
/* Bootstrap floats a legend and clears only the element right after it; here that's
   the (i) text, hidden until opened, so everything after it must clear the float. */
legend.tg-with-info ~ * { clear: left; }
.tg-with-info > .tg-h2 { margin-bottom: 0; }
.tg-js .tg-with-info-h2 { margin: -.625rem 0 .375rem; }
.tg-with-info-h2 + .tg-info-text { margin-top: 0; }

/* Home (app/dashboard.html, billing/insights.py). Phones: one column, the day first, each
   card in its turn (order). Computers: the day across the top, the week on the left, what
   needs attention on the right. */
.tg-home-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .75rem; margin-bottom: 1rem; }
.tg-home-when { margin: 0; font-size: .88rem; color: var(--tg-muted); }
.tg-home { display: flex; flex-direction: column; gap: .9rem; }
.tg-home-main, .tg-home-side, .tg-home-pair { display: contents; }
.tg-home-today { order: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.tg-o-pay { order: 2; } .tg-o-attention { order: 3; } .tg-o-week { order: 4; } .tg-o-top { order: 5; }
.tg-o-profit { order: 6; } .tg-o-hours { order: 7; } .tg-o-staff { order: 8; } .tg-o-customers { order: 9; }
.tg-o-recent { order: 10; }
.tg-kpi { min-width: 0; display: flex; flex-direction: column; padding: .75rem .7rem; background: var(--tg-surface);
  border: 1px solid var(--tg-line); border-radius: .9rem; color: var(--tg-ink); text-decoration: none; }
.tg-kpi-label { font-size: .78rem; font-weight: 600; color: var(--tg-muted); }
.tg-kpi-n { margin-top: .15rem; font-size: 1.3rem; font-weight: 800; letter-spacing: -.01em; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.tg-kpi-change { margin-top: .2rem; font-size: .78rem; font-weight: 700; color: var(--tg-muted); }
.tg-kpi-change.is-up { color: #157f3b; }
.tg-kpi-change.is-down { color: #b42318; }
.tg-kpi-was { font-size: .74rem; color: var(--tg-muted); }
.tg-kpi-cash { grid-column: 1 / -1; padding: 1rem; }
.tg-kpi-cash .tg-kpi-label { font-size: .92rem; font-weight: 700; color: var(--tg-ink); }
.tg-kpi-cash .tg-kpi-n { font-size: 1.75rem; }
.tg-kpi-cash .tg-kpi-was { font-size: .85rem; }
.tg-kpi-action { margin-top: .6rem; padding: .55rem .75rem; border: 1px solid #d9d2f0; border-radius: .7rem; text-align: center;
  font-size: .92rem; font-weight: 650; }
a.tg-kpi:hover { border-color: var(--tg-brand); }
.tg-home-card { min-width: 0; padding: 1rem; background: var(--tg-surface); border: 1px solid var(--tg-line); border-radius: 1rem; }
.tg-home-list { padding: 0; overflow: hidden; }
.tg-home-list > .tg-home-title, .tg-home-list > .tg-home-titlebar, .tg-home-list > .tg-home-note { padding: 1rem 1rem .5rem; margin: 0; }
.tg-home-list > .tg-home-titlebar .tg-home-title { padding: 0; }
.tg-home-list > .tg-home-empty { padding: 0 1rem 1rem; }
.tg-home-title { margin: 0; font-size: .98rem; font-weight: 700; }
.tg-home-titlebar { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem .75rem; }
.tg-home-more { font-size: .85rem; font-weight: 650; text-decoration: none; }
.tg-home-note { margin: .3rem 0 0; font-size: .85rem; color: var(--tg-muted); }
.tg-home-empty { margin: .4rem 0 0; font-size: .9rem; color: var(--tg-muted); }
.tg-home-sub { margin: 0; padding: .6rem 1rem .35rem; font-size: .8rem; font-weight: 700; color: var(--tg-muted); }
.tg-home-big { margin-top: .2rem; font-size: 1.5rem; font-weight: 800; }
.tg-home-row { min-height: 3.1rem; display: flex; align-items: center; gap: .75rem; padding: .5rem 1rem; border-top: 1px solid #efebf8;
  color: var(--tg-ink); text-decoration: none; }
a.tg-home-row:hover { background: var(--tg-paper); }
.tg-home-row-text { flex: 1 1 auto; min-width: 0; font-size: .92rem; font-weight: 600; line-height: 1.3; }
.tg-home-row-meta { display: block; font-size: .8rem; font-weight: 500; color: var(--tg-muted); }
.tg-home-phone { letter-spacing: .02em; }
.tg-chevron { flex: none; width: 18px; height: 18px; color: #857fa0; }
.tg-pill { flex: none; min-width: 2rem; height: 1.75rem; padding: 0 .5rem; display: inline-flex; align-items: center; justify-content: center;
  border-radius: .875rem; font-size: .88rem; font-weight: 800; }
.tg-pill-bad { background: #fdebe9; color: #b42318; }
.tg-pill-warn { background: #fff3dc; color: #8a4b00; }
.tg-pill-info { background: #efeafd; color: #4429b8; }
.tg-avatar { flex: none; width: 2.1rem; height: 2.1rem; border-radius: 50%; display: grid; place-items: center;
  background: #efeafd; color: #4429b8; font-weight: 800; }
.tg-home-pair-figures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; padding: .6rem 1rem .9rem; }
.tg-home-card:not(.tg-home-list) .tg-home-pair-figures { padding: .6rem 0 0; }
.tg-home-pair-figures div { display: flex; flex-direction: column; padding: .6rem .75rem; background: var(--tg-paper); border-radius: .75rem; }
.tg-home-pair-figures strong { font-size: 1.35rem; font-weight: 800; }
.tg-home-pair-figures span { font-size: .8rem; color: var(--tg-muted); }
.tg-home-pair-figures .tg-profit-out { margin-top: .25rem; font-size: .74rem; line-height: 1.3; }
.tg-paybar { margin-top: .75rem; height: .9rem; display: flex; overflow: hidden; border-radius: .45rem; background: var(--tg-paper); }
.tg-paykeys { margin-top: .6rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; font-size: .82rem; }
.tg-paykeys strong { display: block; font-size: .92rem; }
.tg-paykey { display: inline-block; width: .65rem; height: .65rem; margin-right: .35rem; border-radius: .2rem; vertical-align: baseline; }
/* Each payment method's colour on Home (tg-method-*; .tg-pay-card is the pay page's box). */
.tg-method-cash { background: #2b1d5c; }
.tg-method-upi { background: #8a70e3; }
.tg-method-card { background: #f5a524; }
.tg-week { margin-top: .75rem; height: 8.5rem; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .4rem;
  border-bottom: 1px solid var(--tg-line); }
.tg-week-day { min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: .2rem; }
.tg-week-amount { display: none; font-size: .72rem; font-weight: 700; white-space: nowrap; }
.tg-week-bars { height: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 3px; }
.tg-week-bars span { width: .6rem; border-radius: 4px 4px 0 0; }
.tg-week-before { background: #ddd5f7; }
.tg-week-bars .tg-week-now { width: .95rem; background: var(--tg-brand); }
.tg-week-bars .tg-week-now.is-today { background: #a99ae6; }
.tg-week-labels { margin-top: .35rem; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .4rem; text-align: center;
  font-size: .74rem; color: var(--tg-muted); }
.tg-week-labels .is-today { font-weight: 700; color: var(--tg-ink); }
.tg-week-keys { margin-top: .6rem; display: flex; flex-wrap: wrap; gap: .25rem 1rem; font-size: .76rem; color: var(--tg-muted); }
.tg-week-key-now { background: var(--tg-brand); }
.tg-week-key-before { background: #ddd5f7; }
.tg-week-key-today { background: #a99ae6; }
.tg-top-rank { flex: none; width: 1.25rem; font-size: .85rem; font-weight: 800; color: #857fa0; }
.tg-top-categories { border-top: 1px solid #efebf8; padding-bottom: 1rem; }
.tg-top-chips { display: flex; flex-wrap: wrap; gap: .4rem; padding: 0 1rem; }
.tg-heat { margin-top: .75rem; display: grid; gap: 3px; }
.tg-heat span { height: 1.9rem; border-radius: .3rem; }
.tg-heat-0 { background: #f1edfc; }
.tg-heat-1 { background: #d9d0f7; }
.tg-heat-2 { background: #b3a2ee; }
.tg-heat-3 { background: #8a70e3; }
.tg-heat-4 { background: var(--tg-brand); }
.tg-heat-labels { margin-top: .35rem; display: flex; justify-content: space-between; font-size: .74rem; color: var(--tg-muted); }
.tg-home-recent { padding: 0; }
.tg-home-recent summary { min-height: 3rem; display: flex; align-items: center; padding: 0 1rem; font-size: .92rem; font-weight: 600; cursor: pointer; }
.tg-home-recent[open] summary { border-bottom: 1px solid #efebf8; }
.tg-home-recent .tg-timeline { padding: .75rem 1rem 1rem; font-size: .88rem; }
.tg-home-cashier .tg-home-card { order: 0; }
@media (max-width: 767.98px) {
  .tg-home-start { width: 100%; }
}
/* Narrow phones: sales gets the whole row, so a lakh (₹1,24,500) still fits on one line. */
@media (max-width: 575.98px) {
  .tg-home-today { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tg-home-today > .tg-kpi:first-child { grid-column: 1 / -1; }
  .tg-home-today > .tg-kpi:first-child .tg-kpi-n { font-size: 1.75rem; }
}
@media (min-width: 992px) {
  .tg-home { flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 1rem; }
  .tg-home-today { flex: 1 1 100%; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; }
  .tg-kpi { padding: 1rem 1.1rem; }
  .tg-kpi-n { font-size: 1.85rem; }
  .tg-kpi-change, .tg-kpi-was { font-size: .82rem; }
  .tg-kpi-cash { grid-column: auto; }
  .tg-kpi-cash .tg-kpi-label { font-size: .78rem; font-weight: 600; color: var(--tg-muted); }
  .tg-kpi-cash .tg-kpi-n { font-size: 1.85rem; }
  .tg-kpi-cash .tg-kpi-was { font-size: .78rem; }
  .tg-kpi-action { margin-top: .4rem; padding: 0; border: 0; text-align: left; font-size: .85rem; color: var(--tg-brand); }
  .tg-home-main, .tg-home-side { min-width: 0; display: flex; flex-direction: column; gap: 1rem; }
  .tg-home-main { flex: 2 1 0; order: 2; }
  .tg-home-side { flex: 1 1 0; order: 3; }
  .tg-home-main > *, .tg-home-side > *, .tg-home-pair > * { order: 0; }  /* each column as written */
  .tg-home-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start; }
  .tg-home-cashier { flex-direction: column; align-items: stretch; max-width: 40rem; }
  .tg-week { height: 11rem; gap: .75rem; }
  .tg-week-labels { gap: .75rem; }
  .tg-week-bars span { width: 1rem; }
  .tg-week-bars .tg-week-now { width: 1.6rem; }
}
/* Each day's amount over its bar, where the columns are wide enough for ₹10 lakh. */
@media (min-width: 1200px) { .tg-week-amount { display: block; } }
.tg-changes { display: flex; flex-wrap: wrap; gap: .25rem .9rem; font-size: .88rem; color: var(--tg-muted); }
.tg-changes b { color: var(--tg-ink); font-weight: 600; }

/* Prices */
.tg-price { font-weight: 700; }
.tg-was { color: var(--tg-muted); font-size: .9em; }
.tg-badge { display: inline-block; font-size: .75rem; font-weight: 700; color: #7a4a00; background: #fff1d6;
  border-radius: 999px; padding: .1rem .5rem; vertical-align: middle; }
.tg-badge-muted { color: var(--tg-muted); background: var(--tg-paper); }

/* Item list */
.tg-filters { display: grid; grid-template-columns: 1fr auto auto auto; gap: .5rem; margin-bottom: 1rem; }
@media (max-width: 640px) { .tg-filters { grid-template-columns: 1fr 1fr; } .tg-filters input { grid-column: 1 / -1; } }
.tg-item-filters { grid-template-columns: 1fr auto auto; }
@media (max-width: 640px) { .tg-item-filters { grid-template-columns: 1fr auto; } }
.tg-item-chips { margin-bottom: 1rem; }
/* Phones: one row that scrolls sideways, so the list starts sooner; the stock ones come first. */
@media (max-width: 640px) {
  .tg-chips.tg-item-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; white-space: nowrap;
    margin-inline: -.75rem; padding-inline: .75rem; }  /* to the screen's edges (.tg-frame) */
  .tg-item-chips::-webkit-scrollbar { display: none; }
}
.tg-chip-link .tg-chip-n { opacity: 1; display: inline-block; min-width: 1.4rem; padding: 0 .4rem; margin-left: .15rem;
  border-radius: 999px; background: var(--tg-paper); color: var(--tg-muted); font-size: .78rem; text-align: center; }
.tg-chip-link.is-on .tg-chip-n { background: rgba(255, 255, 255, .2); color: #fff; }
.tg-chip-link .tg-chip-n.is-bad { background: #fde2e1; color: #a1261f; }
.tg-chip-link .tg-chip-n.is-warn { background: #fff1d6; color: #7a4a00; }
.tg-batch-lines { list-style: none; padding: 0; margin: .35rem 0 0; font-size: .85rem; color: var(--tg-muted); }
.tg-batch-lines li { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .75rem; padding: .2rem 0; }
.tg-bulkbar { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; padding: .75rem 1rem; border-bottom: 1px solid var(--tg-line); }
.tg-table { --bs-table-bg: transparent; }
.tg-table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--tg-muted); font-weight: 600; }
.tg-table td, .tg-table th { padding: .7rem 1rem; }
.tg-check { width: 2.5rem; }
.tg-item-link { color: var(--tg-ink); font-weight: 600; text-decoration: none; }
.tg-item-link:hover { color: var(--tg-brand); text-decoration: underline; }
.tg-sub { font-size: .85rem; color: var(--tg-muted); }
.tg-code { color: var(--tg-ink); background: var(--tg-paper); border-radius: .35rem; padding: .1rem .35rem; font-size: .85rem; }
.tg-row-bad td { background: #fdecec; }

/* Forms */
.tg-form .form-label { font-weight: 600; }
.tg-optional { font-weight: 400; color: var(--tg-muted); font-size: .85em; }
.tg-error { color: #b42318; font-size: .875rem; margin-top: .25rem; }
.tg-field.has-error .form-control, .tg-field.has-error .form-select, .has-error input { border-color: #d92d20; }
/* Filled in for the owner, e.g. the city and state from the PIN code (pincode.js). */
.tg-form .form-control[readonly] { background: var(--tg-paper); color: var(--tg-muted); }
.tg-more { border-top: 1px solid var(--tg-line); padding-top: .75rem; margin-top: .25rem; }
.tg-more > summary { cursor: pointer; font-weight: 600; color: var(--tg-brand); }
.tg-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; border-top: 1px solid var(--tg-line);
  padding-top: 1rem; margin-top: 1rem; }
.tg-labels-count { display: flex; align-items: center; gap: .5rem; font-weight: 600; }
.tg-labels-count input { width: 5.5rem; }
.tg-adjust { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.tg-adjust .form-select { width: auto; }
.tg-adjust input[type="number"] { width: 8rem; }

/* Photos */
.tg-photo { display: block; width: 100%; max-height: 320px; object-fit: contain; border-radius: .75rem; background: var(--tg-paper); }
.tg-item-cell { display: flex; align-items: center; gap: .75rem; }
.tg-thumb { flex: none; width: 44px; height: 44px; object-fit: cover; border-radius: .5rem; background: var(--tg-paper); }
.tg-pp-photo { display: block; width: calc(100% + 3.5rem); max-width: none; margin: -1.75rem -1.75rem 1.25rem; height: 300px;
  object-fit: contain; background: var(--tg-paper); border-radius: 1rem 1rem 0 0; }

/* QR card on the item page */
.tg-qr-card { text-align: center; }
.tg-qr { width: 168px; height: 168px; margin: 0 auto .5rem; }
.tg-qr svg { width: 100%; height: 100%; display: block; }
.tg-code-lg { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-weight: 700; font-size: 1.15rem; letter-spacing: .08em; }

/* Customer price page (tagiora.in/<code>) */
.tg-pricepage { max-width: 480px; margin: 0 auto; padding: 2rem 1rem 3rem; }
.tg-pp-shop { text-align: center; font-weight: 700; color: var(--tg-muted); text-transform: uppercase; letter-spacing: .06em; font-size: .85rem; }
.tg-pp-card { padding: 1.75rem; }
.tg-pp-cat { color: var(--tg-brand); font-weight: 600; font-size: .9rem; margin-bottom: .25rem; }
.tg-pp-name { font-size: 1.5rem; font-weight: 800; letter-spacing: -.01em; }
.tg-pp-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: .6rem; margin-top: 1rem; }
.tg-pp-now { font-size: 2.4rem; font-weight: 800; letter-spacing: -.02em; color: var(--tg-ink); }
.tg-pp-unit { color: var(--tg-muted); margin: 0 0 .75rem; }
.tg-pp-mrp { margin: 0 0 .25rem; }
.tg-pp-updated { color: var(--tg-muted); font-size: .85rem; margin: 0; }
.tg-pp-note { text-align: center; color: var(--tg-muted); font-size: .9rem; margin-top: 1rem; }
.tg-pp-foot { text-align: center; color: var(--tg-muted); font-size: .85rem; }

/* Label printing */
.tg-print-bar { background: var(--tg-surface); border-bottom: 1px solid var(--tg-line); margin-bottom: 1.5rem; }
.tg-print-form label { flex-wrap: wrap; max-width: 100%; }
.tg-print-form select { width: auto; max-width: 100%; }
.tg-copies { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .4rem 1rem; padding-top: .5rem; }
.tg-copies label { display: flex; align-items: center; gap: .5rem; font-size: .9rem; }
.tg-copies input { width: 4.5rem; flex: none; }
.tg-labels { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; padding: 0 1rem 3rem; }
.tg-roll { display: flex; flex-wrap: wrap; gap: 4mm; justify-content: center; max-width: 1100px; }
.tg-sheet-a4 { display: grid; grid-auto-rows: var(--h); align-content: start; width: 210mm; height: 297mm;
  box-sizing: border-box; background: #fff; box-shadow: 0 4px 24px rgba(43,29,92,.12); }
.tg-lbl { box-sizing: border-box; width: var(--w); height: var(--h); padding: 1.5mm; display: flex; align-items: center;
  gap: 1.2mm; overflow: hidden; background: #fff; color: #000; font-family: Arial, Helvetica, sans-serif; line-height: 1.1; }
.is-roll .tg-lbl { outline: 1px dashed #c9c2e3; }
.is-sheet .tg-lbl { outline: 1px dashed #ebe7f6; outline-offset: -1px; }
.tg-lbl-qr { flex: 0 0 var(--qr); width: var(--qr); height: var(--qr); }
.tg-lbl-qr svg { width: 100%; height: 100%; display: block; }
.tg-lbl-txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: .6mm; }
.tg-lbl-shop { font-size: 5.5pt; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tg-lbl-name { font-size: 7pt; font-weight: 700; overflow-wrap: anywhere; display: -webkit-box;
  -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tg-lbl-price { font-size: 10pt; font-weight: 800; }
.tg-nobr { white-space: nowrap; }
.tg-lbl-code { font-family: "Courier New", Courier, monospace; font-size: 7pt; font-weight: 700; letter-spacing: .04em; }
.tg-lbl-hint { font-size: 4.8pt; }

@media print {
  .no-print { display: none !important; }
  html, body, .tg-body { background: #fff !important; margin: 0; padding: 0; min-height: 0; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .tg-labels { display: block; padding: 0; }
  .tg-lbl { outline: none !important; }
  .tg-roll { display: block; max-width: none; }
  /* One label per page on a roll: each page holds one label, and breaks after it. */
  .tg-lbl { break-inside: avoid; page-break-inside: avoid; }
  .tg-roll, .tg-sheet-a4 { break-after: page; page-break-after: always; }
  .tg-sheet-a4 { box-shadow: none; }
  .tg-roll:last-child, .tg-sheet-a4:last-child { break-after: auto; page-break-after: auto; }
}

/* Billing counter: the whole screen, like an app. Phones: finding items on top (as tall
   as the front row needs, at most half), the bill below, and Pay, Hold and Clear at the
   bottom (where other pages have the tab bar), above a thin footer that keeps them clear
   of the phone's rounded corners and navigation bar. Computers: finding on the left half,
   the bill on the right. */
.tg-counter-page { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.tg-counter-page .tg-shell { flex: 1 1 auto; min-height: 0; }
/* It starts as far down as other pages' titles (.tg-main). */
.tg-main-counter { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; padding-top: 1.5rem; padding-bottom: 1.25rem; }
.tg-counter { --tg-bar: 4.75rem; flex: 1 1 auto; min-height: 0; display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; }
.tg-counter-find { min-height: 0; display: flex; flex-direction: column; gap: .75rem; }
/* No front row (Settings): one column on computers too, the search box over the bill, so the
   bill gets the room instead of half the screen staying empty. Notes and choices at most about
   half the height; the camera, when on, that half. */
@media (min-width: 768px) {
  .tg-counter-bare { width: 100%; max-width: 48rem; margin-inline: auto; gap: 1rem;
    grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .tg-counter-bare .tg-counter-find { max-height: 45vh; max-height: 45dvh; }
  .tg-counter-bare .tg-counter-find:has(.tg-camera:not([hidden])) { height: 45vh; height: 45dvh; }
}
.tg-screen-foot { display: none; }

.tg-scan-form { display: flex; gap: .5rem; margin: 0; }
.tg-card .tg-scan-form { margin-bottom: .75rem; }
.tg-scan-box { position: relative; flex: 1 1 auto; min-width: 0; }
.tg-scan-box .form-control { padding-right: 3.4rem; }
.tg-scan-camera, .tg-scan-mic { position: absolute; top: 50%; right: .25rem; transform: translateY(-50%); width: 2.75rem; height: 2.75rem;
  display: grid; place-items: center; padding: 0; border: 0; border-radius: .55rem; background: none; color: var(--tg-brand); }
.tg-scan-camera:hover, .tg-scan-mic:hover { background: var(--tg-paper); }
.tg-scan-camera[aria-pressed="true"], .tg-scan-mic[aria-pressed="true"] { background: var(--tg-brand); color: #fff; }
.tg-scan-camera svg, .tg-scan-mic svg { width: 24px; height: 24px; }
/* Voice search: the mic just before the camera, pulsing while it listens. */
.tg-scan-mic { right: 3.1rem; }
.tg-scan-box:has(.tg-scan-mic:not([hidden])) .form-control { padding-right: 6.25rem; }
.tg-scan-box:has(.tg-scan-camera[hidden]) .tg-scan-mic { right: .25rem; }
.tg-scan-box:has(.tg-scan-camera[hidden]):has(.tg-scan-mic:not([hidden])) .form-control { padding-right: 3.4rem; }
.tg-scan-mic[aria-pressed="true"] { animation: tg-listen 1.2s ease-in-out infinite; }
@keyframes tg-listen { 50% { box-shadow: 0 0 0 .35rem color-mix(in srgb, var(--tg-brand) 28%, transparent); } }
@media (prefers-reduced-motion: reduce) { .tg-scan-mic[aria-pressed="true"] { animation: none; } }

/* The front row: tiles the owner chose (catalogue/front_row.py). */
.tg-front-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-height: 1.5rem; }
.tg-front-title { margin: 0; font-size: .85rem; font-weight: 700; color: var(--tg-muted); }
.tg-front-edit { margin: -.5rem -.6rem; padding: .5rem .6rem; font-size: .85rem; font-weight: 700; text-decoration: none; }
.tg-front-body { position: relative; flex: 1 1 auto; min-height: 0; }
.tg-front { position: absolute; inset: 0; margin: 0; padding: 0 0 2px; list-style: none; display: grid; align-content: start;
  grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr)); grid-auto-rows: 5.5rem; gap: .5rem;
  overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.tg-front li, .tg-front form { min-width: 0; height: 100%; margin: 0; }
.tg-tile { position: relative; display: block; width: 100%; height: 100%; padding: 0; overflow: hidden; text-align: left;
  background: #efeafd; border: 1px solid #e2dbf7; border-radius: .75rem; color: var(--tg-ink); transition: transform .12s ease-out; }
.tg-tile:hover { border-color: var(--tg-brand); }
.tg-tile:active { transform: scale(.95); }
.tg-tile:focus-visible { outline: 3px solid var(--tg-brand); outline-offset: -3px; }
.tg-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tg-tile-name { position: absolute; left: 0; right: 0; bottom: 0; padding: .4rem .5rem .45rem; font-size: .8rem; font-weight: 650; line-height: 1.22; }
.tg-tile-text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.tg-tile-photo { border-color: transparent; }
.tg-tile-photo .tg-tile-name { padding: .3rem .45rem .35rem; background: rgba(29, 24, 56, .76); color: #fff; font-size: .75rem; line-height: 1.2; }
.tg-tile-photo .tg-tile-text { -webkit-line-clamp: 2; }
.tg-tile-qty { position: absolute; top: .25rem; right: .25rem; min-width: 1.35rem; height: 1.35rem; padding: 0 .35rem; border-radius: .7rem;
  display: flex; align-items: center; justify-content: center; background: var(--tg-brand); color: #fff;
  font-size: .75rem; font-weight: 800; box-shadow: 0 0 0 2px #fff; }
.tg-tile-hit::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; animation: tg-hit .6s ease-out forwards; }
@keyframes tg-hit { from { box-shadow: inset 0 0 0 3px var(--tg-brand); } to { box-shadow: inset 0 0 0 3px transparent; } }
.tg-front-empty { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: 1rem 1.5rem; border: 1px dashed #d4cbf3; border-radius: .9rem; color: var(--tg-muted); }

.tg-camera { position: absolute; inset: 0; z-index: 2; overflow: hidden; border-radius: .9rem; background: #17122b; }
.tg-camera video { width: 100%; height: 100%; object-fit: cover; display: block; }
.tg-camera-stop { position: absolute; top: .6rem; right: .6rem; height: 2.4rem; padding: 0 1rem; border: 0; border-radius: 1.2rem;
  background: rgba(23, 18, 43, .62); color: #fff; font-weight: 600; }
.tg-camera-hint { position: absolute; left: .6rem; right: .6rem; bottom: .6rem; margin: 0; padding: .45rem .75rem; border-radius: .7rem;
  background: rgba(23, 18, 43, .72); color: #fff; font-size: .85rem; text-align: center; }

/* Over the front row: what was just added, notes, and the choice of matching items. */
.tg-pop { position: absolute; top: 0; left: 0; right: 0; z-index: 3; max-height: 100%; display: flex; flex-direction: column; gap: .5rem; pointer-events: none; }
.tg-pop > * { flex: none; pointer-events: auto; }
.tg-pop .alert { margin: 0; box-shadow: 0 8px 24px rgba(20, 12, 50, .15); cursor: pointer; }
/* Without JavaScript nothing closes a note: taps go through it to the tiles below. */
.tg-pop .alert, .tg-pop .tg-added { pointer-events: none; }
.tg-js .tg-pop .alert, .tg-js .tg-pop .tg-added { pointer-events: auto; }
/* No front row (Settings): the notes come in under the search box and push the bill down, so
   none covers the bill's newest line or the customer's number. */
.tg-counter-bare .tg-front-body { display: flex; flex-direction: column; }
.tg-counter-bare .tg-pop { position: relative; flex: 0 1 auto; min-height: 0; max-height: none; }
.tg-counter-bare .tg-pop > :first-child { margin-top: .6rem; }
.tg-counter-bare .tg-counter-find:not(:has(.tg-camera:not([hidden]))) { gap: 0; }
.tg-added { display: flex; align-items: center; gap: 1rem; padding: .7rem; background: var(--tg-surface); border-radius: .9rem;
  box-shadow: 0 10px 30px rgba(20, 12, 50, .22); cursor: pointer; }
.tg-added img, .tg-added-blank { width: 72px; height: 72px; object-fit: cover; border-radius: .6rem; flex: none; background: var(--tg-paper); }
.tg-added-blank { display: grid; place-items: center; color: var(--tg-brand); }
.tg-added-name { font-weight: 800; font-size: 1.15rem; line-height: 1.2; }
.tg-added-note { margin-top: .1rem; font-size: .85rem; color: var(--tg-muted); }
.tg-added-warn { color: #8a3b00; font-weight: 600; }
.tg-choices-box { flex: 0 1 auto; min-height: 0; display: flex; flex-direction: column; background: var(--tg-surface);
  border: 1px solid var(--tg-line); border-radius: .9rem; box-shadow: 0 10px 30px rgba(20, 12, 50, .18); }
.tg-choices-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  padding: .35rem .5rem .35rem .9rem; font-weight: 700; border-bottom: 1px solid var(--tg-line); }
.tg-choices { list-style: none; min-height: 0; overflow-y: auto; padding: .5rem; margin: 0; display: grid; gap: .4rem; }
.tg-choice { width: 100%; display: flex; justify-content: space-between; gap: 1rem; text-align: left; background: var(--tg-paper);
  border: 1px solid var(--tg-line); border-radius: .6rem; padding: .6rem .8rem; font-weight: 600; color: var(--tg-ink); }
.tg-choice:hover { border-color: var(--tg-brand); }
.tg-choice-meta { display: block; font-size: .85rem; font-weight: 500; color: var(--tg-muted); }
.tg-choice-meta:empty { display: none; }

/* The bill */
.tg-cart { position: relative; min-height: 0; display: flex; flex-direction: column; overflow: hidden; background: var(--tg-surface);
  border: 1px solid var(--tg-line); border-radius: 1rem; box-shadow: 0 6px 24px rgba(43, 29, 92, .06); }
.tg-cart-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-height: 3rem;
  padding: .35rem 1rem; border-bottom: 1px solid #efebf8; }
.tg-cart-title { margin: 0; font-size: 1rem; font-weight: 800; }
.tg-cart-count { margin-left: .35rem; font-size: .85rem; font-weight: 500; color: var(--tg-muted); }
.tg-sending .tg-cart-title::after { content: "Sending…"; margin-left: .5rem; font-size: .8rem; font-weight: 600; color: var(--tg-brand); }
/* The customer's phone, in the bill's header: optional, kept with the bill as it's typed
   (app.js). 16px text, so iPhones don't zoom in on it. */
.tg-phone { position: relative; flex: 0 1 15rem; min-width: 0; margin: 0 0 0 auto; }
.tg-cart-head .tg-cart-title, .tg-cart-head .tg-drop-held { flex: none; white-space: nowrap; }  /* the box gives way */
.tg-phone-input { width: 100%; height: 2.25rem; box-sizing: border-box; padding: 0 1.85rem 0 1.9rem; border: 1px solid #d9d2f0;
  border-radius: 1.125rem; background: var(--tg-surface); font-size: 1rem; font-weight: 650; letter-spacing: .02em; color: var(--tg-ink); }
.tg-phone-input::placeholder { color: #857fa0; font-weight: 500; letter-spacing: 0; }
.tg-phone-input:focus { outline: none; border-color: var(--tg-brand); box-shadow: 0 0 0 3px rgba(91, 63, 214, .18); }
.tg-phone-input.is-invalid { border-color: #d93025; box-shadow: none; }
.tg-phone-icon, .tg-phone-ok { position: absolute; top: 50%; transform: translateY(-50%); pointer-events: none; }
.tg-phone-icon { left: .65rem; width: 15px; height: 15px; color: #857fa0; }
.tg-phone-ok { right: .65rem; width: 16px; height: 16px; color: #157f3b; display: none; }
.tg-phone.is-complete .tg-phone-ok { display: block; }
.tg-phone.is-complete .tg-phone-input:not(:focus) { border-color: #9fd3b4; }
.tg-phone:focus-within .tg-phone-icon, .tg-phone.is-complete .tg-phone-icon { color: var(--tg-brand); }
.tg-phone-msg { flex: none; margin: 0; padding: .35rem 1rem .45rem; font-size: .8rem; line-height: 1.35; color: #b42318;
  border-bottom: 1px solid #efebf8; }
/* Narrow phones: the number keeps the room; the green border says it's complete. */
@media (max-width: 379.98px) {
  .tg-phone-icon, .tg-phone-ok { display: none !important; }
  .tg-phone-input { padding: 0 .65rem; }
}
.tg-lines-box { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.tg-cart-empty { height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 1rem 2rem; }
.tg-lines { list-style: none; margin: 0; padding: 0; }
.tg-line { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(4.5rem, auto) auto; align-items: center; gap: .5rem;
  padding: .45rem .5rem .45rem 1rem; border-bottom: 1px solid #efebf8; }
.tg-line-new { animation: tg-line-new 1.2s ease-out; }
@keyframes tg-line-new { from { background: #ece7fd; } to { background: transparent; } }
/* Two lines, so "Bandhani dupatta, mustard…" and "Bandhani dupatta, navy…" stay apart on a phone. */
.tg-line-name { font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.tg-line-unit { font-size: .8rem; color: var(--tg-muted); }
.tg-line-total { font-weight: 700; text-align: right; }
.tg-qty { display: flex; align-items: center; gap: .35rem; }
.tg-qty form, .tg-line form { margin: 0; }
.tg-qty-btn { width: 2.25rem; height: 2.25rem; border-radius: .5rem; border: 1px solid var(--tg-line); background: var(--tg-surface); font-weight: 700; font-size: 1.1rem; line-height: 1; color: var(--tg-ink); }
.tg-qty-btn:hover { border-color: var(--tg-brand); color: var(--tg-brand); }
.tg-qty-btn:disabled { opacity: .35; border-color: var(--tg-line); color: var(--tg-ink); }
.tg-qty-n { min-width: 1.6rem; text-align: center; font-weight: 700; }
.tg-qty-set input { width: 4.8rem; }
.tg-remove { border: 0; background: none; color: var(--tg-muted); font-size: 1.4rem; line-height: 1; min-width: 2rem; height: 2.5rem; padding: 0 .25rem; }
.tg-remove:hover { color: #b42318; }
.tg-cart-foot { flex: none; display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-height: 3.5rem;
  padding: .4rem 1rem; border-top: 1px solid var(--tg-line); }
.tg-cart-sums { min-width: 0; font-size: .8rem; line-height: 1.45; color: var(--tg-muted); }
.tg-cart-total { flex: none; text-align: right; line-height: 1.1; }
.tg-cart-total span { display: block; font-size: .75rem; color: var(--tg-muted); }
.tg-total { font-weight: 800; font-size: 1.5rem; color: var(--tg-ink); }
/* Held bills and the bill discount open as panels over the bill. */
.tg-drop > summary { list-style: none; cursor: pointer; }
.tg-drop > summary::-webkit-details-marker { display: none; }
.tg-drop-panel { position: absolute; left: .75rem; right: .75rem; z-index: 5; max-height: 60%; overflow-y: auto; padding: .75rem;
  background: var(--tg-surface); border: 1px solid var(--tg-line); border-radius: .9rem; box-shadow: 0 10px 30px rgba(20, 12, 50, .18); }
.tg-drop-held .tg-drop-panel { top: 3.25rem; }
.tg-drop-discount .tg-drop-panel { bottom: calc(var(--tg-bar) + 3.75rem); color: var(--tg-ink); font-size: 1rem; }
.tg-drop-discount .tg-inline-form { flex-wrap: nowrap; }
.tg-drop-discount .tg-inline-form input { flex: 1 1 auto; width: auto; min-width: 0; }
.tg-chip { display: inline-flex; align-items: center; height: 2rem; padding: 0 .8rem; border: 1px solid #e0d9f2; border-radius: 1rem;
  background: var(--tg-surface); font-size: .85rem; font-weight: 650; }
.tg-drop[open] > .tg-chip { background: #efeafd; border-color: #d4cbf3; }
.tg-drop-link { display: inline-block; padding: .2rem 0; color: var(--tg-brand); font-size: .85rem; font-weight: 650; }
.tg-inline-form { display: flex; flex-wrap: wrap; gap: .5rem; }
.tg-inline-form .form-select { width: auto; }
.tg-inline-form input { width: 7rem; }
.tg-held-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .3rem 0; }
.tg-cart-actions { flex: none; height: var(--tg-bar); box-sizing: border-box; display: flex; align-items: center; gap: .5rem;
  padding: .6rem 1rem; border-top: 1px solid var(--tg-line); background: var(--tg-surface); }
.tg-cart-actions form { flex: none; margin: 0; }
.tg-cart-actions .btn { height: 3.25rem; display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; }
.tg-cart-actions form .btn { min-width: 4.75rem; padding-inline: .9rem; }
.tg-pay { flex: 1 1 auto; min-width: 0; padding-inline: .75rem; }

@media (min-width: 768px) and (max-height: 520px) {
  .tg-main-counter { padding-top: .5rem; padding-bottom: .5rem; }
  .tg-counter { gap: 1rem; }
}

@media (max-width: 767.98px) {
  .tg-main-counter { max-width: none; padding: 0; }
  /* --tg-foot: the footer's line, then the phone's own bottom (its navigation bar, when
     the phone says so; never less than a little, for the rounded corners). */
  .tg-counter-page { --tg-foot: calc(1.45rem + max(.5rem, env(safe-area-inset-bottom))); }
  .tg-counter { --tg-bar: 4.6rem; display: flex; flex-direction: column; gap: 0; }
  .tg-screen-foot { display: block; flex: none; height: var(--tg-foot); box-sizing: border-box;
    padding: .3rem 1rem max(.5rem, env(safe-area-inset-bottom)); background: var(--tg-surface);
    font-size: .7rem; line-height: 1.15rem; text-align: center; color: var(--tg-muted); }
  /* As tall as the front row needs, so a short one leaves the bill more room; at most half
     the screen above the bar, the rest of the row scrolling. With the camera on, the half. */
  .tg-counter-find { flex: none; max-height: calc((100% - var(--tg-bar) - var(--tg-foot)) / 2);
    gap: .6rem; padding: .75rem 1rem .6rem; }
  .tg-counter-find:has(.tg-camera:not([hidden])) { height: calc((100% - var(--tg-bar) - var(--tg-foot)) / 2); }
  .tg-front-body { display: flex; flex-direction: column; }
  .tg-front { position: relative; inset: auto; flex: 0 1 auto; min-height: 0; }
  /* Over a short front row, notes and choices reach down over the bill. */
  .tg-pop { max-height: max(100%, 45dvh); }
  .tg-scan-form .form-control-lg { font-size: 1rem; }
  /* Tall enough that three lines of a name stay below the count in the corner. */
  .tg-front { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 5rem; }
  .tg-tile-name { line-height: 1.18; }
  .tg-cart { flex: 1 1 0; border: 0; border-radius: 1.1rem 1.1rem 0 0; box-shadow: 0 -2px 14px rgba(43, 29, 92, .08); }
  .tg-qty-set input { width: 3.75rem; }
  /* Sold by the metre: the box for the length leaves the name too little room, so the
     name gets the line's first row to itself. */
  .tg-line-metre { grid-template-columns: minmax(0, 1fr) minmax(4.5rem, auto) auto; row-gap: .25rem; }
  .tg-line-metre .tg-line-main { grid-column: 1 / -1; }
  .tg-cart-actions .btn-lg { font-size: 1.1rem; }
  .tg-added img, .tg-added-blank { width: 64px; height: 64px; }
}
@media (max-width: 359.98px) {
  .tg-cart-actions form .btn { min-width: 4.25rem; padding-inline: .6rem; }
}
@media (prefers-reduced-motion: reduce) {
  .tg-tile { transition: none; }
  .tg-tile:active { transform: none; }
  .tg-tile-hit::after, .tg-line-new { animation: none; }
}

/* Choosing the front row */
.tg-pick-list { list-style: none; margin: 0; padding: 0; }
.tg-pick { display: flex; align-items: center; gap: .75rem; padding: .5rem 0; border-top: 1px solid var(--tg-line); }
.tg-pick:first-child { border-top: 0; }
.tg-pick form { margin: 0; }
.tg-pick-thumb { flex: none; width: 44px; height: 44px; border-radius: .5rem; object-fit: cover; background: #efeafd; }
.tg-pick-blank { display: grid; place-items: center; color: var(--tg-brand); }
.tg-pick-blank .tg-mark { width: 22px; height: 22px; }
.tg-pick-main { flex: 1 1 auto; min-width: 0; }
.tg-pick-name { display: block; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.tg-pick-meta { display: block; font-size: .85rem; color: var(--tg-muted); }
.tg-pick-actions { flex: none; display: flex; align-items: center; gap: .3rem; }

/* Settings: when bill numbers start again, each choice with the next bill's number */
.tg-resets { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: .5rem; }
.tg-reset { display: flex; align-items: flex-start; gap: .6rem; margin: 0; padding: .7rem .85rem; cursor: pointer;
  background: var(--tg-surface); border: 1px solid var(--tg-line); border-radius: .75rem; }
.tg-reset:has(input:checked) { border-color: var(--tg-brand); background: #f4f1fe; }
.tg-reset .form-check-input { flex: none; margin-top: .2rem; }
.tg-reset-label { display: block; font-weight: 600; }
.tg-reset-next { display: block; margin-top: .15rem; font-size: .85rem; color: var(--tg-muted); }
/* A link under a check's help text, lined up with its label (Settings: Choose its items). */
.tg-check-link { display: inline-block; margin: -.6rem 0 0 1.5rem; font-size: .875rem; font-weight: 600; }

/* Sheets: a short form over the page, opened by app.js (without it, shown in place).
   Phones: from the bottom. Computers: in the middle. */
.tg-sheet { width: min(32rem, calc(100% - 2rem)); max-width: none; max-height: calc(100dvh - 2rem); overflow-y: auto;
  margin: auto; padding: 1.25rem 1.25rem 1rem; border: 0; border-radius: 1.25rem; background: var(--tg-surface);
  color: var(--tg-ink); text-align: left; pointer-events: auto; box-shadow: 0 10px 40px rgba(20, 12, 50, .25); }
.tg-sheet::backdrop { background: rgba(20, 12, 50, .45); }
.tg-sheet-title { margin: 0; font-size: 1.15rem; font-weight: 800; }
.tg-sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; }
.tg-sheet-head .tg-remove { flex: none; height: 1.75rem; margin: -.35rem -.5rem 0 0; }
.tg-sheet-lead { margin: .25rem 0 1rem; font-size: .9rem; color: var(--tg-muted); }
.tg-sheet-note { margin: 0 0 .75rem; font-size: .8rem; color: var(--tg-muted); }
.tg-sheet-actions { display: flex; gap: .5rem; }
.tg-sheet-actions .btn { flex: 1 1 0; white-space: nowrap; font-size: 1.05rem; padding-inline: .75rem; }
.tg-sheet-actions .tg-btn { flex-grow: 2; }
/* The main button first in the page, so Enter in a field presses it, but shown last. */
.tg-sheet-actions-end { flex-direction: row-reverse; }
.tg-sheet .tg-field { margin-bottom: .75rem !important; }
@media (max-width: 767.98px) {
  .tg-sheet:modal { width: 100%; max-height: 92dvh; margin: auto 0 0; border-radius: 1.25rem 1.25rem 0 0;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom)); }
}

/* The counter: a barcode no item has, which an owner can add there and then */
.tg-unknown { display: flex; flex-direction: column; gap: .6rem; padding: .75rem; color: #6b4a00; background: #fff8e6;
  border: 1px solid #f3d38a; border-radius: .9rem; box-shadow: 0 8px 24px rgba(20, 12, 50, .15); }
.tg-unknown-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; }
.tg-unknown-head .tg-remove { flex: none; height: 1.6rem; margin: -.3rem -.35rem 0 0; color: inherit; }
.tg-unknown-actions { display: flex; align-items: center; gap: .75rem; font-size: .8rem; line-height: 1.35; }
.tg-unknown-actions .btn { flex: none; }

/* Stock → Receive by scanning: the scan box over (phones) or beside (computers) the list */
.tg-receive { --tg-bar: 4.75rem; flex: 1 1 auto; min-height: 0; display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; }
.tg-receive-find { min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: .75rem; }
.tg-receive-crumb { font-size: .85rem; color: var(--tg-muted); }
.tg-receive-title { margin: .1rem 0 0; font-size: 1.35rem; font-weight: 800; }
.tg-receive-camera { position: relative; inset: auto; flex: none; height: 14rem; }
.tg-receive-pop { display: flex; flex-direction: column; gap: .5rem; }
.tg-receive-pop .alert { cursor: pointer; }
.tg-receive-added { display: flex; align-items: center; gap: .6rem; padding: .6rem .75rem; cursor: pointer;
  background: var(--tg-surface); border: 1px solid var(--tg-line); border-radius: .75rem; box-shadow: 0 6px 18px rgba(43, 29, 92, .10); }
.tg-receive-plus { flex: none; width: 1.75rem; height: 1.75rem; display: grid; place-items: center; border-radius: 50%;
  background: #ece7fd; color: var(--tg-brand); font-weight: 800; }
.tg-delivery-total { flex: 1 1 auto; min-width: 0; font-size: .85rem; color: var(--tg-muted); }
.tg-delivery .tg-cart-actions .btn { flex: none; padding-inline: 1.25rem; }
.tg-dline { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: .25rem .5rem;
  padding: .5rem .5rem .5rem 1rem; border-bottom: 1px solid #efebf8; }
.tg-dline form { margin: 0; }
.tg-dline-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .15rem .5rem; margin-top: .2rem; font-size: .78rem; color: var(--tg-muted); }
.tg-dline-meta .tg-code { font-size: .75rem; }
.tg-dline .tg-qty-set input { width: 4.25rem; text-align: center; }
.tg-dline-expiry { grid-column: 1 / -1; display: flex; align-items: center; gap: .5rem; font-size: .85rem; font-weight: 600; }
.tg-dline-expiry input { width: auto; }
.tg-dline-expiry.has-error label { color: #b42318; }
.tg-dline-expiry.has-error input { border-color: #d93025; }
@media (max-width: 767.98px) {
  .tg-receive { --tg-bar: 4.6rem; display: flex; flex-direction: column; gap: 0; }
  .tg-receive-find { flex: none; max-height: 55%; padding: .75rem 1rem; gap: .6rem; }
  .tg-delivery { flex: 1 1 auto; }
}

/* The pick-up point: New, Ready and Handed over side by side on a computer, one
   under the other on a phone. The big number is the one called out. */
.tg-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; align-items: start; margin-top: 1rem; }
.tg-board-col { min-width: 0; display: flex; flex-direction: column; gap: .75rem; }
.tg-board-title { margin: 0; font-size: 1.05rem; font-weight: 800; }
.tg-board-empty { margin: 0; padding: 1rem; text-align: center; font-size: .9rem; color: var(--tg-muted);
  border: 1px dashed #d4cbf3; border-radius: .9rem; }
/* Printing each new bill on this device (pickup-print.js); the slips print in a frame kept off screen. */
.tg-autoprint { margin-top: .75rem; }
.tg-autoprint-width { width: auto; }
.tg-autoprint-status { font-size: .9rem; color: var(--tg-muted); }
.tg-autoprint-status[data-kind="ok"] { color: #157f3b; }
.tg-autoprint-status[data-kind="err"] { color: #b42318; }
.tg-print-frame { position: fixed; left: -10000px; top: 0; width: 420px; height: 900px; border: 0; }
.tg-pcard { padding: .85rem 1rem; background: var(--tg-surface); border: 1px solid var(--tg-line); border-radius: 1rem;
  box-shadow: 0 6px 18px rgba(43, 29, 92, .06); }
.tg-pcard-ready { background: #f2fbf6; border-color: #bfe5cf; }
.tg-pcard-done { background: transparent; box-shadow: none; }
.tg-pcard-done .tg-pcard-lines { font-size: .85rem; color: var(--tg-muted); }
.tg-pcard-head { display: flex; align-items: center; gap: .75rem; }
.tg-pcard-token { flex: none; min-width: 3.5rem; font-size: 2rem; font-weight: 800; line-height: 1; }
.tg-pcard-meta { font-size: .85rem; line-height: 1.35; color: var(--tg-muted); }
.tg-pcard-number { font-size: .75rem; }
.tg-pcard-lines { list-style: none; margin: .6rem 0; padding: 0; display: grid; gap: .2rem; font-size: .95rem; }
.tg-pcard-lines li { display: flex; gap: .4rem; }
.tg-pcard-qty { flex: none; min-width: 2.5rem; font-weight: 800; }
.tg-pcard-batch { font-size: .85rem; color: var(--tg-muted); }
.tg-pcard-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.tg-pcard-actions form { margin: 0; }
.tg-pcard-actions .tg-btn { min-width: 8rem; }
.tg-pcard-back { margin-left: auto !important; }
.tg-pcard-back .btn-link { color: var(--tg-muted); }
@media (max-width: 991.98px) {
  .tg-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tg-board-done { grid-column: 1 / -1; }
}
@media (max-width: 767.98px) { .tg-board { grid-template-columns: minmax(0, 1fr); } }
/* Phones: one step at a time, chosen by the tabs (app.js; without it, the columns stack). */
.tg-board-tabs { display: none; }
@media (max-width: 767.98px) {
  .tg-js .tg-board-tabs { position: sticky; top: calc(3.5rem + env(safe-area-inset-top)); z-index: 5;
    display: flex; gap: .25rem; padding: .25rem;
    background: var(--tg-surface); border: 1px solid var(--tg-line); border-radius: .9rem;
    box-shadow: 0 4px 14px rgba(43, 29, 92, .06); }
  /* Each as wide as its label needs ("Handed over" is the longest), the room left shared out. */
  .tg-board-tab { flex: 1 1 auto; height: 2.75rem; display: inline-flex; align-items: center; justify-content: center; gap: .3rem;
    padding: 0 .4rem; border: 0; border-radius: .7rem; background: none; color: var(--tg-muted);
    font-size: .88rem; font-weight: 700; white-space: nowrap; }
  .tg-board-tab .tg-count { padding: 0 .4rem; font-size: .78rem; }
  .tg-board-tab[aria-selected="true"] { background: var(--tg-brand); color: #fff; }
  .tg-board-tab[aria-selected="true"] .tg-count { background: #fff; border-color: #fff; color: var(--tg-brand-deep); }
  /* New bills while another tab is open; and the step a bill just moved to. */
  .tg-board-tab.is-fresh .tg-count { background: #f5a524; border-color: #f5a524; color: var(--tg-ink); }
  .tg-board-tab.is-bumped { animation: tg-tab-bump 1.2s ease-out; }
  .tg-js .tg-board[data-tab="new"] .tg-board-col:not([data-col="new"]),
  .tg-js .tg-board[data-tab="ready"] .tg-board-col:not([data-col="ready"]),
  .tg-js .tg-board[data-tab="done"] .tg-board-col:not([data-col="done"]) { display: none; }
  /* The tab already says which step and how many. */
  .tg-js .tg-board .tg-board-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .tg-js .tg-board { gap: .75rem; }
}
@media (max-width: 359.98px) {
  .tg-board-tab { gap: .2rem; padding: 0 .25rem; font-size: .8rem; }
  .tg-board-tab .tg-count { padding: 0 .3rem; font-size: .72rem; }
}
@keyframes tg-tab-bump { from { box-shadow: inset 0 0 0 2px #f5a524; background: #fff3dc; } to { box-shadow: inset 0 0 0 2px transparent; } }
@media (prefers-reduced-motion: reduce) { .tg-board-tab.is-bumped { animation: none; } }

/* A saved delivery */
.tg-delivery-saved { max-width: 40rem; }
.tg-done-mark { flex: none; width: 2.75rem; height: 2.75rem; display: grid; place-items: center; border-radius: 50%;
  background: #e7f6ee; color: #146c43; }
.tg-saved-row { padding: .75rem 1rem; }
.tg-saved-qty { flex: none; text-align: right; line-height: 1.2; }
.tg-saved-qty strong { display: block; font-size: 1.05rem; color: #146c43; }
.tg-saved-qty span { font-size: .78rem; color: var(--tg-muted); }

/* Payment */
.tg-pay-total { color: var(--tg-brand); }
.tg-pay-card { display: flex; flex-direction: column; }
.tg-quick-cash { display: flex; flex-wrap: wrap; gap: .4rem; margin: .6rem 0; }
.tg-change { font-size: 1.1rem; margin: .5rem 0 1rem; }
.tg-upi-qr { width: 200px; height: 200px; margin: 0 auto .5rem; }
.tg-upi-qr svg { width: 100%; height: 100%; display: block; }
.tg-paid { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; background: #e7f8ef;
  border: 1px solid #b7e6cb; border-radius: 1rem; padding: 1rem 1.25rem; margin-bottom: 1.25rem; }
.tg-paid-title { font-weight: 800; font-size: 1.4rem; color: #0b6b3a; }
.tg-stat-link { text-decoration: none; }
.tg-stat-link:hover { border-color: var(--tg-brand); }
.tg-stat-sm .tg-stat-n { font-size: 1.25rem; }
.tg-bill-filters { grid-template-columns: auto auto 1fr auto; }
@media (max-width: 640px) { .tg-bill-filters { grid-template-columns: 1fr 1fr; } .tg-bill-filters input[type="search"] { grid-column: 1 / -1; } }

/* Receipts: on screen in a card, and printed on 80 / 58 mm rolls */
.tg-receipt { font-family: ui-monospace, "Cascadia Mono", Consolas, "Courier New", monospace; font-size: 13px; line-height: 1.35; color: #000; }
.tg-receipt-card { padding: 1.25rem; }
.tg-receipt .r-center { text-align: center; }
.tg-receipt .r-shop { font-weight: 800; font-size: 1.15em; }
.tg-receipt .r-type { font-weight: 700; margin-top: .3em; text-transform: uppercase; letter-spacing: .05em; }
.tg-receipt .r-token { font-weight: 800; font-size: 2.6em; line-height: 1.1; margin: .15em 0; }  /* a packing slip's bill number */
.tg-receipt .r-dup { font-weight: 800; border: 1px dashed #000; display: inline-block; padding: 0 .4em; margin-top: .2em; }
.tg-receipt .r-row { display: flex; justify-content: space-between; gap: .75em; }
.tg-receipt .r-row span:last-child { text-align: right; white-space: nowrap; }
/* A bill number and its time: the number is never broken (at the - of 26-27); when they
   don't fit side by side, the time goes on the line below, as printed by Bluetooth. */
.tg-receipt .r-num { flex-wrap: wrap; row-gap: 0; }
.tg-receipt .r-num span { white-space: nowrap; }
.tg-receipt .r-num span:last-child { margin-left: auto; }
.tg-receipt .r-item { font-weight: 700; margin-top: .3em; }
.tg-receipt .r-rule { border-top: 1px dashed #000; margin: .45em 0; }
.tg-receipt .r-total { font-weight: 800; font-size: 1.2em; margin-top: .2em; }
.tg-receipt .r-small { font-size: .85em; }
.tg-receipt .r-gst { width: 100%; font-size: .85em; border-collapse: collapse; }
.tg-receipt .r-gst th, .tg-receipt .r-gst td { text-align: right; padding: 0 0 0 .3em; font-weight: 400; }
.tg-receipt .r-gst th:first-child, .tg-receipt .r-gst td:first-child { text-align: left; padding-left: 0; }
.tg-receipt .r-qr { width: 30mm; height: 30mm; margin: .5em auto .2em; }
.tg-receipt .r-qr svg { width: 100%; height: 100%; display: block; }
.tg-receipt-sheet { background: #fff; margin: 0 auto 3rem; padding: 3mm 4mm; box-shadow: 0 4px 24px rgba(43,29,92,.12); }
.tg-receipt-80 { width: 80mm; }
.tg-receipt-80 .tg-receipt { font-size: 12px; }
.tg-receipt-58 { width: 58mm; padding: 2mm 3mm; }
.tg-receipt-58 .tg-receipt { font-size: 10px; }
.tg-receipt-58 .r-qr { width: 24mm; height: 24mm; }
@media print {
  .tg-receipt-sheet { box-shadow: none; margin: 0; }
  .tg-pricepage .tg-card { border: 0; padding: 0; }
}

/* Batch code, EXP and PKD wrap onto their own lines rather than being cut: the
   expiry date must always print whole. */
.tg-lbl-batch { font-size: 6pt; font-weight: 700; display: flex; flex-wrap: wrap; column-gap: 1.2mm; line-height: 1.15; }
.tg-lbl-batch span { white-space: nowrap; }

/* Stock and batches */
.tg-h3 { font-size: .95rem; font-weight: 700; }
.tg-onhand { font-weight: 800; font-size: 1.15rem; }
.tg-onhand.is-low, .tg-low { color: #8a5a00; font-weight: 700; }
.tg-onhand.is-negative { color: #b42318; }
.tg-badge-bad { color: #a1261f; background: #fde2e1; }
.tg-row-muted td { opacity: .6; }
.tg-batch-tools td { border-top: 0; padding-top: 0; }
.tg-batch-tools summary { font-size: .85rem; color: var(--tg-brand); cursor: pointer; }
.tg-batch-forms { display: grid; gap: .5rem; padding: .5rem 0 .25rem; }
.tg-batch-forms .tg-inline-form input[type="date"] { width: auto; }
.tg-batch-forms .tg-inline-form input[name="reason"] { width: 14rem; max-width: 100%; }
.tg-stock-forms { display: grid; gap: .5rem; border-top: 1px solid var(--tg-line); padding-top: .75rem; }
.tg-stock-forms summary { font-weight: 600; color: var(--tg-brand); cursor: pointer; }
.tg-moves { list-style: none; padding: 0; margin: 0; }
.tg-moves li { display: grid; grid-template-columns: 4.5rem 1fr; gap: 0 .75rem; padding: .35rem 0; border-top: 1px solid var(--tg-line); }
.tg-moves small { grid-column: 2; color: var(--tg-muted); }
.tg-move-qty { font-weight: 800; color: #0b6b3a; text-align: right; }
.tg-move-qty.is-out { color: #a1261f; }
.tg-alerts { list-style: none; padding: 0; margin: 0; }
.tg-alerts li { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1rem; padding: .6rem 0; border-top: 1px solid var(--tg-line); }
.tg-alerts li:first-child { border-top: 0; }
.tg-alerts li > span { color: var(--tg-muted); flex: 1 1 14rem; }
.tg-line-batch { font-size: .8rem; color: var(--tg-muted); }
.tg-stat-alert { border-color: #f3d48b; background: #fff8e6; }
.tg-pp-batch { color: var(--tg-muted); font-size: .9rem; margin: .5rem 0; }

/* Offers */
.tg-offer-note { background: #fff8e6; border: 1px solid #f3d48b; border-radius: .6rem; padding: .5rem .75rem; font-size: .92rem; }
.tg-category-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: .25rem .75rem; }
.tg-category-picks .form-check { display: flex; align-items: center; gap: .4rem; margin: 0; }
.tg-category-picks input { margin: 0; }
.tg-pp-sale { font-weight: 700; color: #8a5a00; margin: 0 0 .5rem; }

/* A small menu of links behind a button (e.g. the CSV exports). */
.tg-menu { position: relative; }
.tg-menu > summary { list-style: none; }
.tg-menu > summary::-webkit-details-marker { display: none; }
.tg-menu-list { position: absolute; right: 0; z-index: 20; margin-top: .25rem; min-width: 16rem; display: flex;
  flex-direction: column; background: var(--tg-surface); border: 1px solid var(--tg-line);
  border-radius: .6rem; box-shadow: 0 8px 24px rgba(30, 20, 60, .12); padding: .35rem; }
.tg-menu-list a { padding: .45rem .65rem; border-radius: .4rem; text-decoration: none; color: inherit; }
.tg-menu-list a:hover, .tg-menu-list a:focus { background: var(--tg-paper); }
.tg-split > summary { cursor: pointer; }

/* Help, privacy and terms pages. */
.tg-doc { max-width: 54rem; }
.tg-doc h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); font-weight: 800; letter-spacing: -.01em; }
.tg-doc h2 { font-size: 1.3rem; font-weight: 750; margin-top: 2rem; }
.tg-doc h3 { font-size: 1.08rem; font-weight: 700; margin-top: 1.5rem; }
.tg-lead-sm { font-size: 1.1rem; color: var(--tg-muted); }
.tg-note { background: var(--tg-paper); border-left: 4px solid var(--tg-tag); padding: .75rem 1rem; border-radius: .4rem; }
.tg-contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: .75rem; }
.tg-contact-card { display: flex; flex-direction: column; gap: .15rem; padding: 1rem 1.1rem; border: 1px solid var(--tg-line);
  border-radius: .8rem; background: var(--tg-surface); color: var(--tg-ink); text-decoration: none; }
.tg-contact-card:hover, .tg-contact-card:focus { border-color: var(--tg-brand); }
.tg-contact-card strong { font-size: 1.1rem; overflow-wrap: anywhere; }
.tg-contact-kind { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--tg-brand); }
.tg-contact-card span:last-child { color: var(--tg-muted); font-size: .9rem; }
.tg-faq { border-bottom: 1px solid var(--tg-line); padding: .6rem 0; }
.tg-faq > summary { cursor: pointer; font-weight: 600; }
.tg-faq > p { margin: .5rem 0 .25rem; }
.tg-hw td, .tg-hw th { font-size: .92rem; }
.tg-printers { min-width: 52rem; }  /* 9 columns: fits a computer, scrolls sideways on phones */
.tg-printers td:first-child { color: var(--tg-muted); }
.tg-footer-links { display: flex; flex-wrap: wrap; gap: .25rem 1rem; }
.tg-footer-links a { color: inherit; }

/* ------------------------------------------------------------------------- the menu
   Computers (992px and up): open beside the page, staying put as the page scrolls; ☰
   hides it (.is-menu-hidden). Tablets and phones: it slides out over the page from ☰. */
.tg-icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; flex: 0 0 auto;
  border: 0; border-radius: .6rem; background: none; color: var(--tg-ink); }
.tg-icon-btn:hover, .tg-icon-btn:focus-visible { background: var(--tg-paper); }
.tg-icon-btn svg { width: 24px; height: 24px; }

.tg-side { display: flex; flex-direction: column; background: var(--tg-surface); color: var(--tg-ink); }
.tg-side-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  min-height: var(--tg-bar-h); padding: 0 .75rem 0 1.375rem; border-bottom: 1px solid var(--tg-line); }
.tg-side-nav, .tg-side-foot { display: flex; flex-direction: column; gap: .125rem; padding: .75rem; }
.tg-side-nav { flex: 1 1 auto; }
.tg-side-foot { border-top: 1px solid var(--tg-line); }
.tg-side-foot form { margin: 0; }
.tg-side-link { display: block; width: 100%; text-align: left; background: none; border: 0; padding: .5rem .75rem;
  border-radius: .6rem; color: var(--tg-ink); font-weight: 600; font-size: .95rem; text-decoration: none; }
.tg-side-link:hover, .tg-side-link:focus-visible { background: var(--tg-paper); color: var(--tg-ink); }
.tg-side-link[aria-current="page"] { background: #efeafd; color: var(--tg-brand); }
.tg-side-switch { padding: .5rem .75rem; }
.tg-side-who { margin: .5rem .75rem 0; font-size: .8rem; color: var(--tg-muted); overflow-wrap: anywhere; }
.tg-install-tip { margin: 0 .75rem .5rem; font-size: .85rem; color: var(--tg-muted); }
.tg-side-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(20, 12, 50, .45); }

@media (min-width: 992px) {
  .tg-side { position: sticky; top: 0; align-self: flex-start; flex: 0 0 var(--tg-side-w); width: var(--tg-side-w);
    height: 100vh; height: 100dvh; overflow-y: auto; border-right: 1px solid var(--tg-line); }
  .tg-shell.is-menu-hidden .tg-side, .tg-side-close, .tg-side-backdrop { display: none; }
}
@media (max-width: 991.98px) {
  .tg-side { position: fixed; inset: 0 auto 0 0; z-index: 50; width: min(19rem, 86vw); overflow-y: auto;
    padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); border-radius: 0 1rem 1rem 0;
    box-shadow: 0 0 40px rgba(20, 12, 50, .25); transform: translateX(-100%); visibility: hidden;
    transition: transform .18s ease-out, visibility 0s linear .18s; }
  .tg-side.is-open { transform: none; visibility: visible; transition: transform .18s ease-out; }
  .tg-side-link { padding: .7rem .8rem; font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) { .tg-side, .tg-side.is-open { transition: none; } }

/* ------------------------------------------------------------------ phones: app layout
   ☰ and the shop name on top, a tab bar at the bottom. Safe-area insets keep clear of
   the notch and the home bar when opened from the home screen (full screen). */
@media (max-width: 767.98px) {
  .tg-appbar { position: sticky; top: 0; z-index: 30; padding-top: env(safe-area-inset-top); }
  .tg-appbar-row { gap: .5rem; min-height: 3.5rem; }
  .tg-appbar-row > .tg-icon-btn { margin-left: -.25rem; }
  .tg-shop-name { font-size: 1.05rem; }
  .tg-main { padding-bottom: calc(5.5rem + env(safe-area-inset-bottom)); }
}

.tg-tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid;
  grid-template-columns: repeat(4, 1fr); background: var(--tg-surface); border-top: 1px solid var(--tg-line);
  padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  box-shadow: 0 -4px 16px rgba(30, 20, 60, .06); }
.tg-tab { display: flex; flex-direction: column; align-items: center; gap: .1rem; padding: .5rem 0 .45rem;
  font-size: .72rem; font-weight: 650; color: var(--tg-muted); text-decoration: none; }
.tg-tab svg { width: 24px; height: 24px; }
.tg-tab[aria-current="page"] { color: var(--tg-brand); }

/* Bluetooth printer test page */
.tg-pt-steps { padding-left: 1.2rem; color: var(--tg-muted); font-size: .92rem; }
.tg-pt-status { font-weight: 650; }
.tg-pt-preview { overflow-x: auto; }
.tg-pt-preview canvas { display: block; max-width: 100%; height: auto; image-rendering: pixelated;
  border: 1px dashed var(--tg-line); background: #fff; }
.tg-pt-progress { width: 100%; height: .5rem; }
.tg-pt-log { min-height: 6rem; max-height: 22rem; overflow: auto; padding: .75rem; border-radius: .6rem;
  background: var(--tg-night); color: #ece8fb; font: .78rem/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap; overflow-wrap: anywhere; }
.tg-pt-log .is-ok { color: #8be3b0; }
.tg-pt-log .is-warn { color: #ffd27a; }
.tg-pt-log .is-err { color: #ff9a9a; }
.tg-pt-log .is-in { color: #9fd3ff; }

/* "Print by Bluetooth" on the label and receipt print pages */
.tg-bt-status { font-size: .875rem; color: var(--tg-muted); margin: .5rem 0 0; }
.tg-bt-status[data-kind="ok"] { color: #157f3b; }
.tg-bt-status[data-kind="err"] { color: #b42318; }

/* Staff, temporary passwords, sign-in help */
.tg-staff { list-style: none; margin: 0; padding: 0; }
.tg-staff-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem;
  padding: .75rem 0; border-top: 1px solid var(--tg-line); }
.tg-staff-row:first-child { border-top: 0; padding-top: 0; }
.tg-staff-row.is-removed .tg-staff-who strong { color: var(--tg-muted); }
.tg-staff-who { display: flex; flex-direction: column; min-width: 0; }
.tg-staff-who span { font-size: .875rem; color: var(--tg-muted); overflow-wrap: anywhere; }
.tg-staff-who .tg-staff-tag { align-self: flex-start; margin-top: .25rem; font-size: .75rem; font-weight: 700;
  color: var(--tg-ink); background: var(--tg-paper); border: 1px solid var(--tg-line); border-radius: 999px; padding: .05rem .5rem; }
.tg-staff-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.tg-btn-danger { color: #b42318; }
.tg-btn-danger:hover { border-color: #b42318; color: #b42318; }
.tg-credentials { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1rem; margin-bottom: 1rem; }
.tg-credentials dt { font-weight: 600; color: var(--tg-muted); }
.tg-credentials dd { margin: 0; overflow-wrap: anywhere; }
.tg-temp-password { display: inline-block; white-space: nowrap; font-size: 1.15rem; font-weight: 700; letter-spacing: .02em; color: var(--tg-ink);
  background: var(--tg-paper); padding: .15rem .45rem; border-radius: .35rem; }
.tg-forgot { margin-top: 1rem; font-size: .9rem; color: var(--tg-muted); }
.tg-forgot summary { cursor: pointer; font-weight: 600; color: var(--tg-brand); }
.tg-forgot p { margin: .5rem 0 0; }
@media (max-width: 520px) { .tg-credentials { grid-template-columns: 1fr; } .tg-credentials dd { margin-bottom: .4rem; } }

/* ------------------------------------------------------------------------- */
/* Launch: sign-in with mobile + PIN, My account, plans, the console          */
/* ------------------------------------------------------------------------- */
.tg-auth-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; margin-top: 1rem; font-size: .92rem; font-weight: 600; }
.tg-step-of { margin: 0 0 .5rem; font-size: .82rem; font-weight: 700; color: var(--tg-muted); }
.tg-resend { margin-top: 1rem; padding-top: .75rem; border-top: 1px solid var(--tg-line); }
.tg-pin { font-size: 1.35rem; letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; }
.tg-btn-danger-solid { background: #b42318; border-color: #b42318; }
.tg-btn-danger-solid:hover, .tg-btn-danger-solid:focus-visible { background: #8a1c12; border-color: #8a1c12; }
.tg-narrow { max-width: 34rem; }
.tg-narrow.text-center { margin-inline: auto; }

.tg-account { display: grid; gap: .75rem; max-width: 40rem; }
.tg-account-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.tg-account-label { font-size: .82rem; font-weight: 700; color: var(--tg-muted); }
.tg-account-value { font-size: 1.1rem; font-weight: 800; }
.tg-account-ok { font-size: .8rem; font-weight: 700; color: #157f3b; }
.tg-account-wait { font-size: .8rem; font-weight: 700; color: #8a5a00; }

/* The plan banner under the app bar */
.tg-plan-banner { padding: .55rem 0; font-size: .92rem; border-bottom: 1px solid var(--tg-line); }
.tg-plan-banner.is-info { background: #efeafd; color: #2b1d5c; }
.tg-plan-banner.is-danger { background: #fdecea; color: #6d1810; border-color: #f4c7c1; }
.tg-plan-banner-link { font-weight: 800; color: inherit; text-decoration: underline; }

/* Plan & billing, pricing */
.tg-plan-now.tg-plan-grace, .tg-plan-now.tg-plan-paused { border-color: #f4c7c1; }
.tg-meters { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 1rem; margin-bottom: .75rem; }
.tg-meter-head { display: flex; justify-content: space-between; gap: .5rem; font-size: .9rem; font-weight: 700; }
.tg-meter-head span:last-child { color: var(--tg-muted); font-weight: 600; }
.tg-meter-bar { height: .5rem; margin-top: .35rem; border-radius: 999px; background: #efebf8; overflow: hidden; }
.tg-meter-bar span { display: block; height: 100%; max-width: 100%; border-radius: inherit; background: var(--tg-brand); }
.tg-meter.is-full .tg-meter-bar span { background: #b4690e; }
.tg-steppers { display: grid; gap: .75rem; }
.tg-stepper { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; }
.tg-stepper > label { font-weight: 700; }
.tg-stepper-controls { display: flex; align-items: center; gap: .4rem; }
.tg-stepper-controls .btn { width: 2.75rem; height: 2.75rem; padding: 0; font-size: 1.3rem; font-weight: 700; }
/* Pricing: Online orders and the shop's own app, switched on or off. */
.tg-sell { display: grid; gap: .6rem; }
.tg-sell-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: .25rem 1rem; align-items: center;
  border: 1px solid var(--tg-line); border-radius: 14px; padding: .85rem 1rem; cursor: pointer; }
.tg-sell-row:has(input:checked) { border-color: var(--tg-brand); background: var(--tg-paper); }
.tg-sell-text strong { display: block; font-size: 1.05rem; }
.tg-sell-text span { display: block; color: var(--tg-muted); font-size: .92rem; }
.tg-sell-price { text-align: right; white-space: nowrap; color: var(--tg-muted); font-size: .9rem; }
.tg-sell-price b { color: var(--tg-ink); font-size: 1.05rem; }
.tg-sell-switch { margin: 0; padding-left: 2.6em; min-height: 0; }
.tg-sell-switch .form-check-input { width: 2.6em; height: 1.45em; margin-top: 0; cursor: pointer; }
@media (max-width: 575.98px) {
  .tg-sell-row { grid-template-columns: minmax(0, 1fr) auto; }
  .tg-sell-price { grid-column: 1; text-align: left; }
  .tg-sell-switch { grid-row: 1; grid-column: 2; }
}
.tg-step-input { width: 4.5rem; text-align: center; font-weight: 800; }
.tg-segments { display: inline-flex; flex-wrap: wrap; gap: .35rem; padding: .25rem; border: 1px solid var(--tg-line); border-radius: .8rem; background: var(--tg-paper); }
.tg-segment { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .8rem; border-radius: .6rem; font-weight: 700; cursor: pointer; }
.tg-segment:has(input:checked) { background: var(--tg-brand); color: #fff; }
.tg-segment input { accent-color: #fff; }
.tg-plan-base { display: flex; flex-wrap: wrap; gap: .25rem .75rem; align-items: baseline; padding: .75rem 1rem; border-radius: .8rem; background: var(--tg-paper); }
.tg-plan-total { position: sticky; top: 1rem; padding: 1.25rem; border: 1px solid var(--tg-line); border-radius: 1rem; background: var(--tg-surface); }
.tg-total-row { display: flex; justify-content: space-between; gap: 1rem; padding: .3rem 0; }
.tg-total-big { font-size: 1.15rem; font-weight: 800; border-top: 1px solid var(--tg-line); margin-top: .35rem; padding-top: .6rem; }
.tg-total-row > :last-child { white-space: nowrap; }
.tg-total-off { color: #0b6b3a; font-weight: 700; }
.tg-code { margin-top: 1rem; }
.tg-code-ok { color: #0b6b3a; font-size: .875rem; margin-top: .25rem; }
.tg-pay-choice { display: flex; gap: .6rem; align-items: flex-start; padding: .65rem .75rem; margin-bottom: .5rem; border: 1px solid var(--tg-line); border-radius: .8rem; cursor: pointer; }
.tg-pay-choice:has(input:checked) { border-color: var(--tg-brand); box-shadow: 0 0 0 3px #efeafd; }
.tg-pay-choice input { margin-top: .3rem; accent-color: var(--tg-brand); }
.tg-pay-choice small { display: block; color: var(--tg-muted); }
.tg-test-pay { border-style: dashed; }
.tg-done-mark, .tg-paused-mark { width: 4.5rem; height: 4.5rem; margin: 0 auto .75rem; display: grid; place-items: center; border-radius: 50%;
  background: #e3f4ea; color: #157f3b; font-size: 2rem; font-weight: 800; }
.tg-paused-mark { background: #efeafd; color: var(--tg-brand); }
.tg-start-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.tg-start-steps li { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; }
.tg-start-dot { width: 1.75rem; height: 1.75rem; display: grid; place-items: center; border-radius: 50%; background: #efeafd; color: var(--tg-brand); font-weight: 800; flex: none; }
.tg-start-steps li.is-done .tg-start-dot { background: #157f3b; color: #fff; }
.tg-start-steps li.is-done .tg-start-label { color: var(--tg-muted); text-decoration: line-through; }
.tg-start-label { font-weight: 700; margin-right: auto; }
.tg-top-link { color: var(--tg-ink); font-weight: 600; text-decoration: none; }
.tg-top-link:hover, .tg-top-link[aria-current="page"] { color: var(--tg-brand); }
.tg-top-nav { gap: 1.1rem; }
/* Narrow phones: Start free sits on the page itself, Help in the footer. */
@media (max-width: 639.98px) { .tg-top-cta { display: none; } }
@media (max-width: 459.98px) { .tg-top-help { display: none; } }
@media (max-width: 389.98px) { .tg-top-nav { gap: .75rem; } .tg-top-link { font-size: .95rem; } }

/* The discount code tagiora.in shows new shops (plans/discounts.py offer): a line running
   along the top of every page, a pill in the home page's hero and a ticket by the prices. */
.tg-promo { background: linear-gradient(90deg, var(--tg-night), #3d2799 50%, var(--tg-night)); color: #fff; font-size: .875rem; line-height: 1.3; }
.tg-promo-in { display: flex; align-items: center; gap: .75rem; min-height: 2.5rem; }
.tg-promo-run { flex: 1; min-width: 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 1.5rem, #000 calc(100% - 1.5rem), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 1.5rem, #000 calc(100% - 1.5rem), transparent); }
.tg-promo-track { display: flex; width: max-content; animation: tg-promo-run 48s linear infinite; }
.tg-promo-run:hover .tg-promo-track { animation-play-state: paused; }
.tg-promo-item { display: flex; align-items: center; gap: .5rem; margin: 0; padding: .45rem 3rem .45rem 0; white-space: nowrap; }
.tg-promo-item b { color: var(--tg-tag); font-weight: 800; }
.tg-promo-spark { flex: none; width: 14px; height: 14px; fill: var(--tg-tag); }
.tg-promo-code { position: relative; display: inline-block; overflow: hidden; vertical-align: middle; padding: .1rem .45rem; border: 1px dashed rgba(255, 255, 255, .55);
  border-radius: .35rem; background: rgba(255, 255, 255, .1); font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-weight: 700; letter-spacing: .06em; }
.tg-promo-term { color: #cbc3ef; }
.tg-promo-term::before { content: "·"; margin-right: .5rem; }
.tg-promo-cta { flex: none; padding: .3rem .8rem; border-radius: 999px; background: var(--tg-tag); color: var(--tg-night); font-size: .8125rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.tg-promo-cta:hover, .tg-promo-cta:focus-visible { background: #ffb840; color: var(--tg-night); }
.tg-site:has(.tg-promo) [id] { scroll-margin-top: 120px; }

.tg-intro-pills { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tg-promo-pill { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 4px 10px; border-radius: 999px;
  background: var(--tg-night); color: #fff; font-size: 14px; font-weight: 600; text-decoration: none; animation: tg-promo-pulse 2.4s ease-out infinite; }
.tg-promo-pill b { color: var(--tg-tag); letter-spacing: .04em; }
.tg-promo-pill:hover, .tg-promo-pill:focus-visible { background: var(--tg-brand-deep); color: #fff; }

.tg-ticket { --stub: 10rem; max-width: 34rem; filter: drop-shadow(0 14px 22px rgba(43, 29, 92, .22)); }
.tg-ticket-in { position: relative; overflow: hidden; display: flex; border-radius: 16px; background: #fff; color: var(--tg-ink);
  /* A notch above and below the tear line, cut out of the ticket whatever is behind it. */
  -webkit-mask: radial-gradient(circle 9px at calc(100% - var(--stub)) 0, transparent 98%, #000) top / 100% 51% no-repeat,
    radial-gradient(circle 9px at calc(100% - var(--stub)) 100%, transparent 98%, #000) bottom / 100% 51% no-repeat;
  mask: radial-gradient(circle 9px at calc(100% - var(--stub)) 0, transparent 98%, #000) top / 100% 51% no-repeat,
    radial-gradient(circle 9px at calc(100% - var(--stub)) 100%, transparent 98%, #000) bottom / 100% 51% no-repeat; }
.tg-ticket-main { flex: 1; min-width: 0; padding: 16px 18px; }
.tg-ticket-kicker { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--tg-brand); font-size: 12.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.tg-ticket-head { margin: 4px 0 0; font-size: 1.3rem; font-weight: 800; line-height: 1.15; letter-spacing: -.01em; text-wrap: balance; }
.tg-ticket-price { margin: 6px 0 0; color: var(--tg-muted); font-size: .95rem; }
.tg-ticket-price b { color: var(--tg-ink); }
.tg-ticket-terms { margin: 4px 0 0; color: var(--tg-muted); font-size: .85rem; }
.tg-ticket-stub { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: var(--stub); padding: 14px 10px;
  border-left: 2px dashed rgba(43, 29, 92, .35); background: var(--tg-tag); color: var(--tg-night); text-align: center; }
.tg-ticket-label { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; opacity: .75; }
.tg-ticket-code { font: 800 1.3rem/1.1 ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .06em; overflow-wrap: anywhere; }
.tg-ticket-copy { margin-top: 4px; padding: 3px 14px; border: 1.5px solid var(--tg-night); border-radius: 999px; background: transparent; color: var(--tg-night); font-size: 13px; font-weight: 700; }
.tg-ticket-copy:hover, .tg-ticket-copy:focus-visible { background: var(--tg-night); color: #fff; }
.tg-ticket-how { margin: .6rem 0 0; color: var(--tg-muted); font-size: .9rem; max-width: 34rem; }
.tg-ticket-wrap { margin-top: 1.75rem; }
.tg-hero .tg-ticket-how { color: rgba(255, 255, 255, .85); }
.tg-site .tg-ticket-head { font-family: var(--tg-display); font-size: 1.5rem; }
@media (max-width: 419.98px) {
  .tg-ticket { --stub: 7.5rem; }
  .tg-ticket-main { padding: 14px; }
  .tg-ticket-head, .tg-site .tg-ticket-head { font-size: 1.15rem; }
  .tg-ticket-code { font-size: 1.05rem; }
}

/* A shine passes over the code now and then. */
.tg-promo-code::after, .tg-promo-pill::after, .tg-ticket-in::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .6) 50%, transparent 65%); transform: translateX(-120%);
  animation: tg-promo-shine 4s ease-in-out infinite; }
.tg-ticket-in::after { animation-delay: 1.2s; }
@keyframes tg-promo-run { to { transform: translateX(-50%); } }
@keyframes tg-promo-shine { 0%, 55% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
@keyframes tg-promo-pulse { 0% { box-shadow: 0 0 0 0 rgba(245, 165, 36, .6); } 70%, 100% { box-shadow: 0 0 0 10px rgba(245, 165, 36, 0); } }
@media (prefers-reduced-motion: reduce) {
  .tg-promo-run { -webkit-mask-image: none; mask-image: none; }
  .tg-promo-track { width: auto; animation: none; }
  .tg-promo-item { flex-wrap: wrap; padding-right: 0; white-space: normal; }
  .tg-promo-item[aria-hidden] { display: none; }
  .tg-promo-pill, .tg-promo-code::after, .tg-promo-pill::after, .tg-ticket-in::after { animation: none; }
}
.tg-hero-short { padding: 3rem 0 4.5rem; }
.tg-pricing { margin-top: -2.5rem; padding-bottom: 3rem; }
.tg-price-big { font-size: 2.6rem; font-weight: 800; letter-spacing: -.02em; margin: .25rem 0; }
.tg-price-big small { font-size: 1rem; font-weight: 600; color: var(--tg-muted); }
.tg-ticks { list-style: none; padding: 0; margin: .5rem 0 1rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: .4rem 1rem; }
.tg-ticks li::before { content: "✓ "; color: #157f3b; font-weight: 800; }

/* Tagiora's own GST invoice (printable) */
.tg-invoice-bar { max-width: 50rem; margin: 1rem auto 0; padding: 0 1rem; text-align: right; }
.tg-invoice { max-width: 50rem; margin: 1rem auto 2rem; padding: 2.5rem; background: #fff; border: 1px solid var(--tg-line); font-size: .92rem; }
.tg-invoice-head { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.tg-invoice-title { font-size: 1.4rem; font-weight: 800; letter-spacing: .03em; }
.tg-invoice-number { font-family: ui-monospace, Consolas, monospace; font-weight: 700; }
.tg-invoice-parties { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.tg-invoice-parties section { border: 1px solid var(--tg-line); border-radius: .6rem; padding: .8rem 1rem; }
.tg-invoice-parties h2 { font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--tg-muted); margin: 0 0 .3rem; }
.tg-invoice-lines { width: 100%; border-collapse: collapse; margin-bottom: 1rem; }
.tg-invoice-lines th, .tg-invoice-lines td { padding: .5rem; border-bottom: 1px solid var(--tg-line); text-align: left; }
.tg-invoice-lines th { background: var(--tg-paper); font-size: .82rem; }
.tg-invoice-totals { margin-left: auto; max-width: 20rem; display: grid; gap: .3rem; }
.tg-invoice-totals div { display: flex; justify-content: space-between; gap: 1rem; }
.tg-invoice-total { border-top: 2px solid var(--tg-ink); padding-top: .4rem; font-size: 1.1rem; font-weight: 800; }
.tg-invoice-totals .tg-invoice-words { display: block; font-size: .8rem; color: var(--tg-muted); text-align: right; }
.tg-invoice-paid { margin-top: 1.25rem; padding: .8rem 1rem; border: 1px solid var(--tg-line); border-radius: .6rem; }
.tg-invoice-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; margin-top: 1.5rem; padding-top: .8rem; border-top: 1px solid var(--tg-line); font-size: .78rem; color: var(--tg-muted); }
@media print { .tg-invoice { border: 0; margin: 0; padding: 0; } }

/* console.tagiora.in */
.tg-console { display: flex; flex-wrap: wrap; min-height: 100vh; }
.tg-console-nav { flex: 1 1 14rem; max-width: 100%; display: flex; flex-direction: column; gap: .2rem; padding: 1.25rem .9rem; background: var(--tg-night); color: #fff; }
@media (min-width: 992px) { .tg-console-nav { flex: 0 0 15rem; min-height: 100vh; } }
.tg-console-brand { display: flex; align-items: center; gap: .5rem; font-weight: 800; padding: 0 .5rem 1rem; color: var(--tg-tag); }
.tg-console-brand span { color: #fff; }
.tg-console-nav a { padding: .55rem .75rem; border-radius: .6rem; color: #d9d3f5; font-weight: 600; text-decoration: none; }
.tg-console-nav a[aria-current="page"], .tg-console-nav a:hover { background: rgba(255,255,255,.14); color: #fff; }
.tg-console-out { margin-top: 1rem; width: 100%; text-align: left; padding: .55rem .75rem; border: 0; border-radius: .6rem; background: none; color: #d9d3f5; font-size: .85rem; }
.tg-console-out:hover { background: rgba(255,255,255,.14); color: #fff; }
.tg-console-main { flex: 999 1 36rem; min-width: 0; padding: 1.5rem; }
.tg-console-head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-bottom: 1rem; }
.tg-console-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: .75rem; }
.tg-console-kpis .tg-card { padding: 1rem; }
.tg-console-filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: 1rem 0; }
.tg-console-filters .form-control { flex: 1 1 16rem; min-width: 0; max-width: 28rem; }
.tg-chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.tg-chip-link { padding: .35rem .8rem; border: 1px solid var(--tg-line); border-radius: 999px; background: var(--tg-surface); color: var(--tg-ink); font-weight: 700; font-size: .88rem; text-decoration: none; }
.tg-chip-link span { opacity: .7; }
.tg-chip-link.is-on { background: var(--tg-brand); border-color: var(--tg-brand); color: #fff; }
.tg-state { display: inline-block; padding: .15rem .6rem; border-radius: 999px; font-size: .75rem; font-weight: 800; background: #efeafd; color: #4429b8; }
.tg-state.is-active { background: #e3f4ea; color: #1f6b44; }
.tg-state.is-grace { background: #fff3dc; color: #7a4a00; }
.tg-state.is-paused, .tg-state.is-closed { background: #fdecea; color: #8a1c12; }
.tg-attention { display: block; padding: .65rem .8rem; margin-bottom: .5rem; border-radius: .6rem; background: var(--tg-paper); color: var(--tg-ink); font-weight: 700; text-decoration: none; }
.tg-attention.is-danger { background: #fdecea; color: #6d1810; }
.tg-attention.is-warn { background: #fff8e6; color: #5c3b00; }
.tg-attention.is-info { background: #efeafd; color: #2b1d5c; }
.tg-bars { display: flex; align-items: flex-end; gap: .4rem; height: 11rem; border-bottom: 1px solid var(--tg-line); margin-bottom: .3rem; }
.tg-bar { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: .2rem; }
.tg-bar-n { font-size: .7rem; font-weight: 700; color: var(--tg-muted); }
.tg-bar-fill { width: 100%; min-height: 2px; border-radius: .35rem .35rem 0 0; background: var(--tg-brand); }
.tg-pager { display: flex; justify-content: center; gap: 1rem; margin: 1rem 0; }
.tg-person { padding: .75rem 0; border-top: 1px solid var(--tg-line); }
.tg-person:first-of-type { border-top: 0; padding-top: 0; }
.tg-person-actions summary { font-size: .85rem; font-weight: 700; color: var(--tg-brand); cursor: pointer; margin-top: .3rem; }
.tg-action-form { padding: .6rem 0; border-top: 1px solid var(--tg-line); }
.tg-timeline-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; font-size: .9rem; }
.tg-timeline-list li { display: grid; grid-template-columns: 8.5rem 1fr; gap: .75rem; }
.tg-timeline-list time { color: var(--tg-muted); }
.tg-plain-list { margin: 0; padding-left: 1.1rem; display: grid; gap: .35rem; font-size: .9rem; }
.tg-totp-qr { width: 12rem; margin: .5rem auto 1rem; }
.tg-totp-qr svg { width: 100%; height: auto; }
