/* ---------- owner app: the home page's design language ----------
 *
 * The owner side wears what the customer directory (home.css) wears: neutrals with
 * no hue, so the brand teal is only ever on the thing to press; pill buttons;
 * rounder white cards on a hairline; sentence-case labels in the body face rather
 * than mono capitals; and the colored marks (OwnerGlyphHelper) wherever a place in
 * the app is named. Scoped to body.owner-app (the layout sets it with app_shell?),
 * so the public pages, onboarding and /malik keep the teal-cut product tokens.
 *
 * Mostly a token layer: app.css draws every owner screen from these names, so
 * redefining them here moves the whole app at once. The rules after it are the
 * pieces a token cannot reach -- the chrome, the dashboard tiles, empty states.
 */

body.owner-app {
  /* The directory's neutrals (.dir-page in home.css), under the product's names. */
  --ink: #222222;
  --ink-2: #000000;
  --ink-3: #3f3f3f;
  --muted: #6a6a6a;
  --muted-2: #9a9a9a;
  --muted-3: #c2c2c2;
  --border: #ebebeb;
  --border-2: #dddddd;
  --border-strong: #222222;
  --surface-2: #f7f7f7;
  --surface-3: #efefef;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05), 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.1), 0 2px 6px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 24px 56px rgba(0, 0, 0, 0.1), 0 8px 16px rgba(0, 0, 0, 0.05);
  /* The directory's cards are r-3xl; panels here step up one size to match. */
  --r-lg: 12px;
  --r-xl: 16px;
  --r-2xl: 20px;
  --r-3xl: 24px;
  /* No mono on the home page. Every eyebrow, stat and timestamp that asked for it
     gets the body face instead, which keeps its tabular figures. */
  --font-mono: 'Inter', sans-serif;
  --topbar-h: 72px;
  -webkit-tap-highlight-color: transparent;
}

/* Eyebrows were mono capitals with wide tracking; in the body face that tracking
   reads as shouting, so the labels the owner sees most go to sentence case. */
.owner-app :is(.q-tier, .q-stat, .setup-card__eyebrow, .mb-label) {
  text-transform: none;
  letter-spacing: 0;
}

.owner-app .q-tier {
  font: 700 0.9375rem var(--font-head);
  letter-spacing: -0.2px;
  color: var(--ink);
}

/* ---- the colored marks ---- */

/* Flat fills, lifted off the white the way .dir-glyph lifts the category marks. */
.owner-glyph {
  display: block;
  flex: none;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.14));
}

/* ---- top bar: the home header's anatomy ---- */

.owner-app .app-topbar {
  height: var(--topbar-h);
  padding: 0 clamp(16px, 3vw, 40px);
  border-bottom-color: var(--border);
}

.app-topbar__lead {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.app-topbar__logo { padding-block: 0; }

.app-topbar__rule {
  width: 1px;
  height: 24px;
  background: var(--border-2);
  flex: none;
}

.app-topbar__business { min-width: 0; }

.app-topbar__name {
  font: 700 0.9375rem var(--font-head);
  letter-spacing: -0.2px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-topbar__date {
  margin-top: 1px;
  font: 500 0.75rem var(--font-body);
  color: var(--muted);
  white-space: nowrap;
}

.app-topbar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

/* "Book a spot" is the header's outlined pill, like the home page's Download app. */
.owner-app .mode-switch {
  min-height: 40px;
  padding: 0 16px;
  border-color: var(--border-2);
  font: 600 0.875rem var(--font-body);
  transition: box-shadow 200ms var(--ease-out), transform 120ms var(--ease-out);
}

.owner-app .mode-switch:hover { box-shadow: var(--shadow-sm); }
.owner-app .mode-switch:active { transform: scale(0.97); }

/* The round icon button of .dir-header__link--icon. */
.app-topbar__settings {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border-2);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  flex: none;
  transition: background-color 160ms var(--ease-out), transform 120ms var(--ease-out);
}

.app-topbar__settings:hover { background: var(--surface-2); }
.app-topbar__settings:active { transform: scale(0.94); }

/* ---- sidebar ---- */

.owner-app .app-sidebar { padding: 24px 16px; }

.side-nav__row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  margin-bottom: 2px;
  padding: 0 12px;
  border-radius: var(--r-lg);
  color: var(--muted);
  font: 600 0.9375rem var(--font-body);
  text-decoration: none;
  transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out);
}

.side-nav__glyph { transition: transform 250ms var(--ease-out); }

.side-nav__row:hover { background: var(--surface-2); color: var(--ink); }

@media (hover: hover) and (pointer: fine) {
  .side-nav__row:hover .side-nav__glyph { transform: translateY(-1px) scale(1.06); }
}

.side-nav__row[aria-current="page"] {
  background: var(--surface-2);
  color: var(--ink);
  font-weight: 700;
}

.side-nav__row--quiet { font-size: 0.875rem; }

.side-nav__divider {
  height: 1px;
  margin: 14px 12px;
  background: var(--border);
}

.side-nav__cta {
  width: 100%;
  margin-top: 16px;
}

/* ---- buttons: the directory's pills ---- */

.owner-app .btn {
  min-height: 40px;
  padding: 0 18px;
  border-radius: var(--r-pill);
  font: 700 0.875rem var(--font-body);
}

/* Brand, like the directory's search button and "Book your spot": the one colored
   thing on a white page is the thing to press. */
.owner-app .btn--primary {
  background: var(--brand);
  color: #fff;
}

.owner-app .btn--primary:hover { background: var(--brand-dark); }
.owner-app .btn--secondary { border-color: var(--border-2); }

@media (max-width: 780px) {
  .owner-app .btn { min-height: 44px; }
}

/* ---- page header ---- */

.owner-app :is(.page-head__title, .settings-screen__title) {
  font: 800 clamp(1.5rem, 1.1rem + 1vw, 1.75rem)/1.15 var(--font-head);
  letter-spacing: -0.6px;
}

/* The second half of a title in grey, like the home page's "Book your spot." */
.page-head__muted { color: var(--muted); }

/* ---- dashboard ---- */

.owner-app .open-card.is-open { border-color: var(--border); }

.dash-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dash-tile {
  display: block;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  text-decoration: none;
  transition: box-shadow 200ms var(--ease-out), transform 120ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .dash-tile:hover { box-shadow: var(--shadow-md); }
  .dash-tile:hover .dash-tile__go svg { transform: translateX(3px); }
}

.dash-tile:active { transform: scale(0.99); }

.dash-tile--queue { padding: 24px; }

.dash-tile__head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dash-tile__label {
  flex: 1;
  font: 700 0.9375rem var(--font-head);
  letter-spacing: -0.2px;
  color: var(--ink);
}

.dash-tile__go {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font: 700 0.8125rem var(--font-body);
  color: var(--brand);
}

.dash-tile__go svg { transition: transform 200ms var(--ease-out); }

.dash-tile__figure {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 16px;
}

.dash-tile__num {
  font: 800 3.5rem/1 var(--font-head);
  letter-spacing: -2px;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.dash-tile__num--sm {
  margin-top: 12px;
  font-size: 1.75rem;
  letter-spacing: -0.8px;
}

.dash-tile__unit {
  font: 600 0.9375rem var(--font-body);
  color: var(--muted);
}

.dash-tile__spark {
  display: block;
  width: 100%;
  height: 34px;
  margin-top: 8px;
}

.dash-tile__foot {
  margin-top: 6px;
  font: 500 0.8125rem var(--font-body);
  color: var(--muted);
}

.dash-tile__foot--warn { color: var(--warn-ink); }

.dash-tile__empty {
  margin: 14px 0 0;
  font: 500 0.875rem var(--font-body);
  color: var(--muted);
}

.dash-queue {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.dash-queue__row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--r-lg);
  background: var(--surface-2);
}

.dash-queue__pos {
  min-width: 18px;
  font: 800 0.9375rem var(--font-head);
  font-variant-numeric: tabular-nums;
}

.dash-queue__name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font: 600 0.875rem var(--font-body);
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* The white pill of .dir-card__badge: a live dot and the state. */
.dash-queue__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  padding: 5px 10px;
  border-radius: var(--r-pill);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  font: 600 0.75rem var(--font-body);
}

/* The map nudge: a white row with its mark, not a teal banner. */
.owner-app .dash-nudge {
  gap: 14px;
  padding: 14px 16px;
  border-color: var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
}

.owner-app .dash-nudge__go { color: var(--brand); }

/* ---- money ---- */

/* The day's hero was an ink card; on this side it is the dashboard's white tile, so
   every tint that was cut for a dark ground comes back to the light one. */
.owner-app .mb-hero {
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
}

.mb-hero__head { display: flex; align-items: center; gap: 10px; }

.owner-app .mb-hero .mb-label,
.owner-app .mb-hero__head .mb-label {
  font: 700 0.9375rem var(--font-head);
  letter-spacing: -0.2px;
  color: var(--ink);
}

.owner-app .mb-rule .mb-label { font: 600 0.8125rem var(--font-body); color: var(--muted); }
.owner-app .mb-sub,
.owner-app .mb-legend,
.owner-app .mb-compare { color: var(--muted); }
.owner-app .mb-rule { border-top-color: var(--border); }
.owner-app .mb-mixbar { background: var(--surface-3); }
.owner-app .mb-mixbar .upi { background: var(--brand); }
.owner-app .mb-mixbar .cash { background: var(--muted-3); }
.owner-app .mb-delta--up { color: var(--success); }
.owner-app .mb-delta--down { color: var(--warn-ink); }
.owner-app .mb-delta--flat { color: var(--muted); }

/* ---- settings ---- */

.owner-app .settings-group__title {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 800 1.125rem var(--font-head);
  letter-spacing: -0.3px;
}

.owner-app .settings-rail__row[aria-current="page"] { background: var(--surface-2); }

/* ---- empty states: a mark and a plain sentence, not italic serif ---- */

.owner-app :is(.q-next__empty, .mb-empty, .cust-empty) {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.owner-app .q-next__empty { padding: 32px 24px; }
.cust-empty { margin: 0; padding: 32px 0 12px; }

.owner-app :is(.q-next__empty p, .mb-empty p),
.cust-empty {
  margin: 0;
  font: 600 0.9375rem/1.4 var(--font-body);
  font-style: normal;
  color: var(--muted);
}

.owner-app .mb-empty p { font-size: 1rem; color: var(--ink); }
.owner-app .mb-empty small { margin-top: 0; }
.owner-app .mb-quiet { font-family: var(--font-body); font-style: normal; }

/* ---- phone ---- */

@media (max-width: 780px) {
  .owner-app { --topbar-h: 64px; }

  .owner-app .app-topbar { padding: 0 16px; }

  /* The home page's tab bar (.dir-tabbar): frosted white, small labels, the active
     tab in brand. */
  .owner-app .bottom-nav {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top-color: var(--border);
  }

  .owner-app .bottom-nav a { font: 600 0.6875rem var(--font-body); }
  .owner-app .bottom-nav svg { width: 26px; height: 26px; }
  .owner-app .bottom-nav a[aria-current="page"] svg { stroke-width: 2.2; }

  .owner-app .fab {
    background: var(--brand);
    color: #fff;
  }

  .dash-tile--queue { padding: 20px; }
  .dash-tile__num { font-size: 3rem; }
}
