/* ==================================================================
   DASHBOARD + HEADER MENUS  (redesign 2026-09-30)
   docs/design/2026-09-30-dashboard-menus — mock-ups approved by the
   owner 2026-09-30. Loaded after deckcalcshell.css; uses its tokens.

     1. the one header (dashboard + designer) + the account menu
   ================================================================== */

/* ------------------------------------------------------------------
   1 · THE ONE HEADER
   The dashboard header now matches the designer's shell header: the
   chrome colour, 56px tall (the kiosk scale's --h-hdr on a big portrait
   touch screen), the logo, and the same two buttons on the right —
   Feedback and the avatar.
   ------------------------------------------------------------------ */
.dashboard-page > .deck-calculator-header {
  height: var(--h-hdr);
  flex: none;
  background: var(--chrome);
  background-image: none;
  border-bottom: 0;
  padding: 0 var(--space-5, 24px);
  gap: var(--space-4, 16px);
}
.dashboard-page > .deck-calculator-header::before { display: none; }
.dashboard-page > .deck-calculator-header .header-content { gap: var(--space-3, 12px); }
.dashboard-page > .deck-calculator-header .header-logo { height: 26px; }
.dashboard-page > .deck-calculator-header h1 {
  font-size: var(--t-sm) !important;
  font-weight: var(--w-semi) !important;
  letter-spacing: -.01em;
  color: #fff;
}
.dashboard-page > .deck-calculator-header .header-actions { gap: var(--space-2, 8px); position: relative; top: auto; right: auto; }

/* Header buttons, both headers: 40px, one radius, quiet on the chrome. */
:is(.app-shell, .dashboard-page) > .deck-calculator-header .header-action-btn {
  height: 40px;
  min-width: 40px;
  padding: 0 var(--space-3, 12px);
  border-radius: var(--r);
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .06);
  color: var(--chrome-ink);
  font-size: var(--t-sm);
  font-weight: 500;
  gap: var(--space-2, 8px);
}
:is(.app-shell, .dashboard-page) > .deck-calculator-header .header-action-btn:hover { background: rgba(255, 255, 255, .12); }
:is(.app-shell, .dashboard-page) > .deck-calculator-header .header-action-btn svg { width: 18px; height: 18px; }
.touch :is(.app-shell, .dashboard-page) > .deck-calculator-header .header-action-btn { height: var(--touch-min, 44px); }
/* Portrait kiosk: a 64px header with 48px buttons (the ≥1300px kiosk scale
   in deckcalcshell.css §12 takes it to 72px). */
@media (orientation: portrait) and (min-width: 700px) and (max-width: 1299px) {
  :root.touch { --h-hdr: 64px; }
  .touch :is(.app-shell, .dashboard-page) > .deck-calculator-header .header-action-btn { height: 48px; min-height: 48px; font-size: 15px; }
}

/* The avatar button. */
.account-btn { position: relative; padding: 0 var(--space-3, 12px) 0 4px !important; }
.account-btn .account-chevron { width: 14px !important; height: 14px !important; opacity: .8; }
.account-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #3E9A8F;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
  flex: none;
}
.account-dot {
  position: absolute;
  top: 3px;
  left: 27px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #E5484D;
  border: 2px solid var(--chrome);
}
.account-dot[hidden] { display: none !important; }
/* The designer header's give-way levels hide the buttons' words
   (`.header-action-btn > span`); the avatar and its dot are not words. */
.app-shell > .deck-calculator-header[data-fit] .account-btn > .account-avatar { display: grid !important; }
.app-shell > .deck-calculator-header[data-fit] .account-btn > .account-dot:not([hidden]) { display: block !important; }

/* The account menu — the ⋮ menu's popup (projectMenu.js) with a head. */
.proj-menu.account-menu { width: 300px; padding: 6px; border-radius: var(--r-lg, 12px); }
.proj-menu-head {
  display: flex;
  align-items: center;
  gap: var(--space-3, 12px);
  padding: 10px 10px 12px;
  border-bottom: 1px solid var(--line-2);
  margin-bottom: 6px;
}
.account-avatar-lg { width: 40px; height: 40px; font-size: 14px; }
.account-menu-who { display: flex; flex-direction: column; min-width: 0; }
.account-menu-who b { font-weight: var(--w-semi); color: var(--ink); }
.account-menu-who span { color: var(--ink-2); font-size: 13px; overflow-wrap: anywhere; }
.account-menu .proj-menu-item { display: flex; align-items: center; gap: var(--space-3, 12px); font-weight: 500; padding: 0 10px; }
.proj-menu-sep { border-top: 1px solid var(--line-2); margin: 6px 0; }
.proj-menu-group {
  font-size: 11px;
  font-weight: var(--w-semi);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 8px 10px 2px;
}
.proj-menu-badge {
  margin-left: auto;
  font-size: 12px;
  font-weight: var(--w-semi);
  border-radius: var(--r-full, 999px);
  padding: 1px 7px;
}
.proj-menu-badge-new { background: #E5484D; color: #fff; }
.proj-menu-badge-count { background: var(--warn-bg); color: var(--warn); }

/* ------------------------------------------------------------------
   2 · THE PROJECTS DASHBOARD  (mockups/dashboard-desktop.html,
   dashboard-cards.html, dashboard-kiosk.html)
   Row 1 title + actions, row 2 toolbar, row 3 status tabs. Every
   control is 44px; the portrait kiosk goes to 52–64px.
   ------------------------------------------------------------------ */
.dashboard-page { background: var(--bg, #F6F8F9); font-family: var(--font-family); }
.dashboard-page .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.dashboard-page .dashboard-body { max-width: 1240px; padding: 28px 24px 48px; }

.dash-titlebar { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 20px; }
.dash-title {
  margin: 0;
  flex: 1;
  font-size: var(--t-xl, 28px);
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--tuds-navy, #133A52);
  line-height: 1.1;
}
.dash-title-count { color: var(--ink-3); font-weight: 500; margin-left: 10px; font-size: var(--t-md, 16px); letter-spacing: 0; }
.dash-title-actions { display: flex; gap: 12px; flex-direction: row-reverse; }
.dash-title-actions .btn {
  height: 44px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--r);
  font-size: var(--t-sm);
  font-weight: var(--w-semi);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}
.dash-title-actions .dashboard-scratchpad-btn { background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.dash-title-actions .scratchpad-hint { font-weight: 400; color: var(--ink-3); font-size: var(--t-xs); display: inline; }

.dash-toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.dash-toolbar .dashboard-search-wrapper { flex: 1; position: relative; min-width: 0; display: block; }
.dash-toolbar .dashboard-search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--ink-3); pointer-events: none; }
.dash-toolbar .dashboard-search-input {
  width: 100%;
  height: 44px;
  padding: 0 14px 0 42px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  font-size: var(--t-sm);
  color: var(--ink);
}
.dash-toolbar .dashboard-search-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.dash-toolbar .dashboard-filter-select { height: 44px; min-height: 44px; padding: 0 34px 0 14px; font-weight: 500; line-height: normal; width: auto; }

/* Segmented controls: Mine / Everyone, List / Cards. */
.dash-seg { display: inline-flex; background: var(--line-2); border-radius: var(--r); padding: 3px; gap: 2px; height: 44px; flex: none; }
.dash-seg button {
  border: 0;
  background: transparent;
  border-radius: 6px;
  padding: 0 14px;
  min-width: 38px;
  font-size: var(--t-sm);
  font-weight: 500;
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
}
.dash-seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); font-weight: var(--w-semi); }
.dash-seg button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* Row 3: status tabs with counts, Archived + Select on the right. */
.dash-tabs { display: flex; align-items: flex-end; gap: 4px; border-bottom: 1px solid var(--line); margin: 12px 0 16px; }
.dash-tablist { display: flex; gap: 4px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.dash-tab {
  border: 0;
  background: none;
  height: 44px;
  padding: 0 14px;
  color: var(--ink-2);
  font-size: var(--t-sm);
  font-weight: 500;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  border-radius: 0;
}
.dash-tab:hover { color: var(--ink); }
.dash-tab[aria-selected="true"] { color: var(--tuds-navy); border-bottom-color: var(--accent); font-weight: var(--w-semi); }
.dash-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.dash-tab-n { font-size: 12px; background: var(--line-2); color: var(--ink-2); border-radius: var(--r-full, 999px); padding: 1px 8px; font-weight: var(--w-semi); }
.dash-tab-warn .dash-tab-n { background: var(--warn-bg); color: var(--warn); }
.dash-tab-sep { flex: 1; min-width: 8px; }
.dash-select-btn[aria-pressed="true"] { color: var(--accent-700); font-weight: var(--w-semi); }
.dash-select-btn[hidden] { display: none; }

/* Select mode: the tick-box column shows only while selecting. */
.dashboard-page:not(.is-selecting) .dashboard-table .dashboard-select-col { display: none; }

/* Status pills: one shape, the shell's semantic colours. */
.dash-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 9px;
  border-radius: var(--r-full, 999px);
  font-size: 12px;
  font-weight: var(--w-semi);
  white-space: nowrap;
}
.dash-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.dash-pill-draft { background: var(--line-2); color: var(--ink-2); }
.dash-pill-quoted { background: #E8F0F8; color: #2B5C8A; }
.dash-pill-sold { background: var(--ok-bg); color: var(--ok); }
.dash-pill-lost { background: var(--err-bg); color: var(--err); }
.dash-pill-expiring { background: var(--warn-bg); color: var(--warn); }

/* Store marks: a small square, navy Regina, green Saskatoon. */
.store-mark { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); white-space: nowrap; }
.store-mark::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--ink-3); flex: none; }
.store-mark-rg::before { background: var(--tuds-navy, #133A52); }
.store-mark-sk::before { background: var(--tuds-green, #83AD54); }

/* The list. */
.dashboard-page .dashboard-table-wrapper { border: 1px solid var(--line); border-radius: var(--r-lg, 12px); background: var(--surface); overflow: hidden; overflow-x: auto; }
.dashboard-page .dashboard-table thead th {
  height: 44px;
  padding: 0 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink-3);
}
.dashboard-page .dashboard-table thead th.active-sort { color: var(--tuds-navy); }
.dashboard-page .dashboard-table tbody td { height: 64px; padding: 8px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.dashboard-page .dashboard-table tbody tr:last-child td { border-bottom: 0; }
.dashboard-page .dashboard-table tbody tr { cursor: pointer; }
.dashboard-page .dashboard-table tbody tr:hover td { background: #F9FBFB; }
.dashboard-table .dash-num, .dashboard-table th.dash-num { text-align: right; font-weight: var(--w-semi); white-space: nowrap; }
.dashboard-table .dash-when { white-space: nowrap; color: var(--ink-2); }
.dashboard-table .dash-when small { display: block; color: var(--ink-3); font-size: 12px; }
.dashboard-table .dash-kebab-col { width: 56px; padding-right: 8px; text-align: right; }
.dash-row-expiring td:first-child { box-shadow: inset 3px 0 0 #EBCB97; }
.dash-pcell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.dash-thumb-sm { width: 56px; height: 40px; border-radius: 6px; background: var(--line-2); flex: none; overflow: hidden; display: grid; place-items: center; }
.dash-thumb-sm img { width: 100%; height: 100%; object-fit: cover; }
.dash-pcell-text { min-width: 0; }
.dash-psub { color: var(--ink-2); font-size: 13px; margin-top: 2px; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.dashboard-table .dashboard-project-name { font-weight: var(--w-semi); color: var(--ink); max-width: 380px; }

/* The cards. */
.dashboard-page .dashboard-cards-grid { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; padding: 0; }
.dashboard-page .dash-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg, 12px);
  transform: none;
}
.dashboard-page .dash-card:hover { box-shadow: var(--shadow-float); border-color: #D5DEE3; transform: none; }
.dashboard-page .dash-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dashboard-page .dash-card-expiring { border-color: #EBCB97; }
.dashboard-page .dash-card-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(180deg, #F1F5F7, #E8EEF1);
  display: grid;
  place-items: center;
  border-bottom: 1px solid var(--line-2);
}
.dash-card-img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.dash-card-empty { font-size: 12px; color: var(--ink-3); }
.dash-card-thumb .dash-pill { position: absolute; top: 10px; left: 10px; box-shadow: 0 1px 2px rgba(0, 0, 0, .06); }
.dash-card-kebab { position: absolute; top: 6px; right: 6px; }
.dash-card-kebab .proj-menu-btn { background: rgba(255, 255, 255, .92); border: 1px solid var(--line); }
.dashboard-page .dash-card-select { top: auto; bottom: 8px; left: 8px; width: 44px; height: 44px; }
.dashboard-page .dash-card-body { padding: 14px 16px 12px; flex: 1; }
.dashboard-page .dash-card-name { font-weight: var(--w-semi); font-size: 15px; line-height: 1.3; }
.dashboard-page .dash-card-customer { color: var(--ink-2); margin-top: 3px; font-size: var(--t-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dashboard-page .dash-card-meta { display: flex; gap: 6px 10px; align-items: center; flex-wrap: wrap; margin-top: 10px; font-size: 13px; color: var(--ink-2); }
.dash-card-foot { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; border-top: 1px solid var(--line-2); font-size: 13px; color: var(--ink-3); gap: 8px; }
.dash-card-total { font-size: 16px; font-weight: 700; color: var(--ink); }

/* Select mode's action bar sits in the page flow, light like the page. */
.dashboard-page .dashboard-bulk-bar { background: var(--accent-50); color: var(--ink); border: 1px solid var(--accent-ring); border-radius: var(--r-lg, 12px); }
.dashboard-page .dashboard-bulk-count { color: var(--accent-700); }

/* Paging. */
.dashboard-page .dashboard-paging { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 20px; color: var(--ink-3); font-size: 13px; }
.dashboard-page .dashboard-load-more-btn { height: 44px; min-height: 44px; padding: 0 24px; }

/* Laptop widths: the toolbar wraps before it squeezes the search. */
@media (max-width: 1100px) {
  .dash-toolbar { flex-wrap: wrap; }
  .dash-toolbar .dashboard-search-wrapper { flex: 1 1 100%; }
}

/* Portrait kiosk / tablet (mockups/dashboard-kiosk.html): a full-width New
   project at thumb height, 52px controls, two card columns, the toolbar
   stacked, tabs scrolling sideways if they ever overflow. */
@media (orientation: portrait) and (min-width: 700px) {
  .dashboard-page .dashboard-body { max-width: none; padding: 28px 32px 48px; }
  .dash-titlebar { flex-direction: column; align-items: stretch; gap: 16px; }
  .dash-title { font-size: 32px; }
  .dash-title-actions { display: grid; grid-template-columns: 2fr 1fr; flex-direction: row; }
  .dash-title-actions .btn { height: 64px; min-height: 64px; font-size: 18px; }
  .dash-toolbar { flex-wrap: wrap; }
  .dash-toolbar .dashboard-search-wrapper { flex: 1 1 100%; }
  .dash-toolbar .dashboard-search-input { height: 52px; font-size: 17px; }
  .dash-toolbar .dashboard-filter-select { height: 52px; font-size: 16px; }
  .dash-seg { height: 52px; }
  .dash-seg button { padding: 0 20px; font-size: 16px; }
  .dash-toolbar .dashboard-view-toggle { margin-left: auto; }
  .dash-tab { height: 52px; font-size: 16px; padding: 0 16px; }
  .dashboard-page .dashboard-cards-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
  .dashboard-page .dash-card-thumb { aspect-ratio: 2 / 1; }
  .dashboard-page .dash-card-name { font-size: 18px; }
  .dash-card-foot { padding: 14px 16px; font-size: 15px; }
  .dash-card-total { font-size: 20px; }
  .dashboard-page .dash-pill { height: 28px; font-size: 13px; padding: 0 12px; }
  .dashboard-page .dashboard-load-more-btn { height: 56px; padding: 0 28px; }
  .touch .dash-select-btn { display: none; }
}

/* ------------------------------------------------------------------
   3 · DIALOGS: New project, Send feedback (mockups/new-project.html,
   feedback-form.html) and the Feedback inbox (feedback-inbox.html)
   ------------------------------------------------------------------ */

/* .ui-select inside a form row used to clip its text vertically: the row's
   10px padding sat inside the select's fixed height ("Select type" cut). */
.auth-modal-body .form-row select.ui-select { padding-top: 0; padding-bottom: 0; line-height: normal; height: 44px; }

/* A dialog, centred, with a fixed header and footer and a scrolling body. */
.auth-modal:has(> .dm-dialog):not(.hidden),
.auth-modal:has(> .dm-sheet):not(.hidden) { display: flex !important; align-items: center; justify-content: center; padding: 24px; background: rgba(14, 44, 63, .45); }
.dm-dialog {
  max-width: 560px;
  width: 100%;
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--r-xl, 16px);
  box-shadow: 0 24px 60px rgba(19, 58, 82, .22);
  background: var(--surface);
  margin: 0;
}
:is(.dm-dialog, .dm-sheet) > .auth-modal-header { padding: 18px 20px 14px; border-bottom: 1px solid var(--line-2); border-radius: 0; flex: none; gap: 12px; align-items: flex-start; }
:is(.dm-dialog, .dm-sheet) .auth-modal-title h2 { font-size: var(--t-lg, 20px); font-weight: 700; color: var(--tuds-navy); letter-spacing: -.01em; }
:is(.dm-dialog, .dm-sheet) .auth-modal-close { width: 40px; height: 40px; display: grid; place-items: center; flex: none; }
.dm-title-stack { flex-direction: column; align-items: flex-start; gap: 2px; }
.dm-subtitle { margin: 0; color: var(--ink-2); font-size: 13px; }
.dm-subtitle:empty { display: none; }
.dm-dialog > .auth-modal-body { padding: 18px 20px; overflow: auto; display: flex; flex-direction: column; gap: 18px; flex: 1 1 auto; min-height: 0; }
.dm-dialog > .auth-modal-body .form-row { margin: 0; }
.dm-dialog .form-row label, .dm-label { display: block; font-weight: var(--w-semi); font-size: 13px; margin-bottom: 6px; color: var(--ink); }
.dm-opt { font-weight: 400; color: var(--ink-3); }
.dm-dialog .form-row input[type="text"],
.dm-dialog .form-row input[type="tel"],
.dm-dialog .form-row input[type="email"] { height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--r); font-size: var(--t-sm); }
.dm-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dm-dialog-foot { display: flex; gap: 10px; justify-content: flex-end; align-items: center; padding: 14px 20px; border-top: 1px solid var(--line-2); background: var(--surface-2); flex: none; }
.dm-dialog-foot .btn { height: 44px; min-height: 44px; padding: 0 18px; }
.dm-dialog-foot .btn-primary { min-width: 180px; }
.dm-help { font-size: 12px; color: var(--ink-3); line-height: 1.45; }

/* New project: the four scope tick boxes as 44px tiles. */
.dm-scope-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 0; background: none; border: 0; }
.dm-scope-tiles label {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
}
.dm-scope-tiles label:has(input:checked) { border-color: var(--accent); background: var(--accent-50); color: var(--accent-700); font-weight: var(--w-semi); box-shadow: inset 0 0 0 1px var(--accent); }
.dm-scope-tiles input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); }
#npModePicker { margin: 0; }
#npModePicker .mode-picker-label { font-size: 13px; color: var(--ink); }

/* Send feedback: kind chips, the text, the picture switch. */
.dm-choice { display: flex; flex-wrap: wrap; gap: 8px; }
.dm-choice button {
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: var(--t-sm);
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
}
.dm-choice button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-50); color: var(--accent-700); font-weight: var(--w-semi); box-shadow: inset 0 0 0 1px var(--accent); }
.dm-choice button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dm-textarea { width: 100%; min-height: 120px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); font: inherit; font-size: var(--t-sm); line-height: 1.5; resize: vertical; color: var(--ink); }
.dm-textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.dm-toggle-row { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-lg, 12px); background: var(--surface-2); }
.dm-toggle-text { flex: 1; min-width: 0; }
.dm-toggle-text b { font-weight: var(--w-semi); }
.dm-shot { width: 120px; height: 68px; border-radius: 6px; border: 1px solid var(--line); background: #E8EEF1; flex: none; overflow: hidden; }
.dm-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dm-switch { width: 46px; height: 28px; border-radius: 14px; background: #CDD6DB; position: relative; flex: none; border: 0; cursor: pointer; padding: 0; }
.dm-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: left .15s ease; }
.dm-switch[aria-checked="true"] { background: var(--accent); }
.dm-switch[aria-checked="true"]::after { left: 21px; }
.dm-switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* On a finger screen the switch keeps its look; an invisible ::before makes
   the target 44px tall (the generic 44px minimum would stretch the track). */
.touch button.dm-switch.dm-switch { min-width: 46px; min-height: 28px; height: 28px; }
.touch .dm-switch::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; bottom: -8px; }

/* The inbox: one sheet, list | detail. */
.dm-sheet {
  width: min(1180px, 100%);
  max-width: none;
  height: min(820px, calc(100vh - 48px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--r-xl, 16px);
  background: var(--surface);
  box-shadow: 0 24px 60px rgba(19, 58, 82, .22);
  margin: 0;
}
.dm-sheet > .auth-modal-header .auth-modal-title { flex: 1; }
.dm-head-actions { display: flex; gap: 8px; align-items: center; }
.dm-head-actions .btn { height: 44px; min-height: 44px; padding: 0 16px; }
.fb-panes { display: grid; grid-template-columns: 400px 1fr; flex: 1; min-height: 0; }
.fb-pane { overflow: auto; min-height: 0; }
.fb-pane + .fb-pane { border-left: 1px solid var(--line); }
.fb-list-pane { display: flex; flex-direction: column; overflow: hidden; }
.fb-listbar { padding: 12px 18px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; background: var(--surface); flex: none; }
.fb-list { overflow: auto; flex: 1; min-height: 0; }
.dm-search { position: relative; display: block; }
.dm-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.dm-search input { width: 100%; height: 44px; padding: 0 14px 0 36px; border: 1px solid var(--line); border-radius: var(--r); font-size: var(--t-sm); }
.dm-search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.fb-tabs { display: flex; gap: 2px; overflow-x: auto; }
.fb-tabs .dash-tab { height: 40px; padding: 0 10px; font-size: 13px; margin-bottom: 0; }
.fb-bulkbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding-bottom: 10px; }
.fb-bulkbar[hidden] { display: none; }
.fb-bulkbar .ui-select { width: auto; min-width: 130px; height: 40px; }
.fb-bulkbar .btn { height: 40px; min-height: 40px; padding: 0 12px; }
.fb-selectall { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; font-size: 13px; color: var(--ink-2); flex: 1; }
.fb-item { display: flex; gap: 10px; width: 100%; text-align: left; border-bottom: 1px solid var(--line-2); padding: 14px 18px; min-height: 72px; cursor: pointer; }
.fb-item:hover { background: #F9FBFB; }
.fb-item[aria-current="true"] { background: var(--accent-50); box-shadow: inset 3px 0 0 var(--accent); }
.fb-item:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.fb-item-select { display: flex; align-items: flex-start; padding-top: 2px; min-width: 24px; }
.fb-item-select input { width: 18px; height: 18px; }
.fb-item-main { flex: 1; min-width: 0; }
.fb-top { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--ink-3); }
.fb-type { font-weight: var(--w-semi); color: var(--ink-2); }
.fb-when { margin-left: auto; white-space: nowrap; }
.fb-desc { margin: 4px 0; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--ink); font-size: var(--t-sm); }
.fb-by { font-size: 12px; color: var(--ink-3); }
.fb-empty { color: var(--ink-3); text-align: center; padding: 32px 18px; margin: 0; }
.fb-error { color: var(--err); }
.fb-pill { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: var(--r-full, 999px); font-size: 12px; font-weight: var(--w-semi); white-space: nowrap; }
.fb-pill-new { background: var(--warn-bg); color: var(--warn); }
.fb-pill-working { background: #E8F0F8; color: #2B5C8A; }
.fb-pill-resolved { background: var(--ok-bg); color: var(--ok); }
.fb-pill-wontfix { background: var(--line-2); color: var(--ink-2); }
.fb-detail { padding: 22px 26px; display: flex; flex-direction: column; gap: 18px; }
.fb-detail h3 { margin: 2px 0 0; font-size: 20px; font-weight: 700; color: var(--tuds-navy); line-height: 1.3; }
.fb-id { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--ink-3); }
.fb-legacy { font-family: var(--font-family); }
.fb-statusseg { display: flex; gap: 6px; flex-wrap: wrap; }
.fb-statusseg button { height: 44px; padding: 0 14px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); font-weight: 500; font-size: var(--t-sm); cursor: pointer; color: var(--ink); }
.fb-statusseg button[aria-pressed="true"] { font-weight: var(--w-semi); }
.fb-statusseg button.fb-pill-new { background: var(--warn-bg); color: var(--warn); border-color: var(--warn); }
.fb-statusseg button.fb-pill-working { background: #E8F0F8; color: #2B5C8A; border-color: #2B5C8A; }
.fb-statusseg button.fb-pill-resolved { background: var(--ok-bg); color: var(--ok); border-color: var(--ok); }
.fb-statusseg button.fb-pill-wontfix { background: var(--line-2); color: var(--ink-2); border-color: var(--ink-3); }
/* The plain (secondary) buttons in these dialogs: white with a hairline. */
:is(.dm-head-actions, .fb-actions, .fb-bulkbar) > .btn:not(.btn-primary):not(.btn-danger-outline),
.dm-dialog-foot > .btn-ghost { border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.dm-dialog-foot > .btn-ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
:is(.dm-head-actions, .fb-actions, .fb-bulkbar) > .btn[aria-pressed="true"] { border-color: var(--accent); color: var(--accent-700); background: var(--accent-50); }
.dm-shot img[hidden] { display: none; }
.fb-meta { display: grid; grid-template-columns: 110px 1fr; gap: 8px 16px; font-size: 13px; margin: 0; }
.fb-meta dt { color: var(--ink-3); }
.fb-meta dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.fb-link { border: 0; background: none; padding: 0; color: var(--accent); font-weight: var(--w-semi); cursor: pointer; font-size: inherit; text-align: left; min-height: 0; }
.fb-link:hover { text-decoration: underline; }
.fb-quote { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--r-lg, 12px); padding: 14px 16px; line-height: 1.55; font-size: 15px; white-space: pre-wrap; }
.fb-bigshot { border: 1px solid var(--line); border-radius: var(--r-lg, 12px); overflow: hidden; background: #E8EEF1; cursor: zoom-in; max-width: 380px; padding: 0; display: block; }
.fb-bigshot img { display: block; width: 100%; }
.fb-tech summary { cursor: pointer; font-weight: var(--w-semi); min-height: 44px; display: flex; align-items: center; }
.fb-tech pre { background: var(--chrome); color: var(--chrome-ink); border-radius: var(--r); padding: 12px; font-size: 12px; overflow: auto; max-height: 220px; }
.fb-actions { display: flex; gap: 10px; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid var(--line-2); }
.fb-actions .btn { height: 44px; min-height: 44px; padding: 0 16px; }
.fb-spacer { flex: 1; }
.btn-danger-outline { color: var(--err) !important; border: 1px solid #F0C9C6 !important; background: var(--surface) !important; }
.btn-danger-outline:hover:not(:disabled) { background: var(--err-bg) !important; }
.btn-danger-outline[hidden] { display: none !important; }

/* Portrait kiosk / tablet: bigger targets; the inbox stacks list over detail. */
@media (orientation: portrait) and (min-width: 700px) {
  .dm-dialog { max-width: 680px; }
  .dm-dialog .form-row input[type="text"],
  .dm-dialog .form-row input[type="tel"],
  .dm-dialog .form-row input[type="email"],
  .auth-modal-body .form-row select.ui-select { height: 52px; font-size: 16px; }
  .dm-scope-tiles { grid-template-columns: 1fr 1fr; }
  .dm-scope-tiles label, .dm-choice button { min-height: 52px; font-size: 16px; }
  .dm-dialog-foot .btn { height: 52px; min-height: 52px; font-size: 16px; }
  .dm-textarea { font-size: 17px; }
  .fb-panes { grid-template-columns: 1fr; grid-template-rows: minmax(0, 45%) minmax(0, 1fr); }
  .fb-pane + .fb-pane { border-left: 0; border-top: 1px solid var(--line); }
  .dm-sheet { height: calc(100vh - 48px); }
}

/* ------------------------------------------------------------------
   4 · ADMIN (mockups/admin.html): side nav + People / Pricing &
   stores / Catalog
   ------------------------------------------------------------------ */
.settings-modal:has(> .dm-sheet):not(.hidden) { display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(14, 44, 63, .45); }
.settings-modal > .dm-sheet { max-height: none; }
.adm-panes { display: grid; grid-template-columns: 220px 1fr; flex: 1; min-height: 0; }
.adm-sidenav { padding: 12px; display: flex; flex-direction: column; gap: 2px; background: var(--surface-2); border-right: 1px solid var(--line); }
.adm-sidenav .admin-tab {
  height: 44px;
  border: 0;
  border-radius: var(--r);
  text-align: left;
  padding: 0 12px;
  font-size: var(--t-sm);
  font-weight: 500;
  color: var(--ink-2);
  background: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.adm-sidenav .admin-tab:hover { color: var(--ink); background: var(--line-2); }
.adm-sidenav .admin-tab.active { background: var(--surface); color: var(--tuds-navy); font-weight: var(--w-semi); box-shadow: 0 1px 3px rgba(0, 0, 0, .06); border: 0; }
.adm-content.settings-modal-body { padding: 22px 26px 32px; overflow: auto; min-height: 0; }
.adm-content .admin-tab-content { max-height: none; overflow: visible; display: flex; flex-direction: column; gap: 16px; }
.adm-content .admin-tab-content.hidden { display: none; }
.adm-sec { margin: 0; font-size: var(--t-lg, 20px); font-weight: 700; color: var(--tuds-navy); }
.adm-secsub { margin: -8px 0 0; color: var(--ink-2); font-size: 13px; }
.adm-card { border: 1px solid var(--line); border-radius: var(--r-lg, 12px); padding: 18px 20px; background: var(--surface); }
.adm-card h3 { margin: 0 0 4px; font-size: 16px; font-weight: var(--w-semi); color: var(--tuds-navy); }
.adm-card > p { margin: 0 0 14px; color: var(--ink-2); font-size: 13px; line-height: 1.5; }
.adm-card-table { padding: 8px 10px; overflow-x: auto; }
.adm-empty { color: var(--ink-3); text-align: center; padding: 24px; margin: 0; }
.adm-error { color: var(--err) !important; }
.adm-muted { color: var(--ink-3); font-size: 13px; }
.adm-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.adm-utable { width: 100%; border-collapse: collapse; }
.adm-utable th { font-size: 12px; color: var(--ink-3); text-align: left; font-weight: var(--w-semi); padding: 0 10px 8px; white-space: nowrap; }
.adm-utable td { padding: 8px 10px; border-top: 1px solid var(--line-2); height: 60px; vertical-align: middle; font-size: var(--t-sm); }
.adm-utable tr.row-disabled td { opacity: .6; }
.adm-name { height: 36px; border: 1px solid transparent; border-radius: var(--r-sm, 6px); padding: 0 8px; margin-left: -8px; font: inherit; font-weight: var(--w-semi); color: var(--ink); background: transparent; width: 100%; max-width: 240px; }
.adm-name:hover { border-color: var(--line); }
.adm-name:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); background: var(--surface); }
.adm-email { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.adm-role { font-size: 12px; font-weight: var(--w-semi); padding: 2px 8px; border-radius: var(--r-full, 999px); background: var(--accent-50); color: var(--accent-700); white-space: nowrap; }
.adm-role-owner { background: #EEE9F8; color: #5B3FA0; }
.adm-utable .ui-select.admin-store-select { height: 40px; min-width: 140px; }
.adm-row-actions { width: 56px; text-align: right; }
.adm-reassign { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.adm-reassign .ui-select { height: 44px; min-width: 200px; }
.adm-reassign .btn, .adm-addstore .btn, .adm-store-contact .btn { height: 44px; min-height: 44px; padding: 0 16px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.adm-reassign .btn:disabled { opacity: .5; }
.adm-kv { display: grid; grid-template-columns: 160px 1fr; gap: 14px 16px; align-items: center; }
.adm-kv .dm-label { margin: 0; }
.adm-kv-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.adm-stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--r); height: 44px; overflow: hidden; }
.adm-stepper button { width: 44px; height: 100%; border: 0; background: var(--surface-2); font-size: 18px; color: var(--ink); cursor: pointer; }
.adm-stepper button:hover { background: var(--line-2); }
.adm-stepper span { min-width: 64px; text-align: center; font-weight: var(--w-semi); }
.adm-suffix { display: inline-flex; align-items: center; gap: 6px; }
.adm-suffix input { width: 110px; height: 44px; border: 1px solid var(--line); border-radius: var(--r); padding: 0 12px; font: inherit; }
.adm-suffix input:focus, .dm-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.dm-input { height: 44px; border: 1px solid var(--line); border-radius: var(--r); padding: 0 12px; font: inherit; font-size: var(--t-sm); width: 100%; background: var(--surface); color: var(--ink); }
.dm-input[aria-invalid="true"] { border-color: var(--err); }
.adm-storelist { display: flex; flex-direction: column; gap: 12px; }
.adm-store { border: 1px solid var(--line-2); border-radius: var(--r); padding: 12px 14px; }
.adm-store-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.adm-store-head .adm-muted { margin-left: auto; }
.adm-store-contact { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 6px 10px; align-items: end; }
.adm-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.adm-store-contact .dm-label { margin: 0; font-size: 12px; color: var(--ink-2); }
.adm-store-note { grid-column: 1 / -1; margin: 2px 0 0; }
.adm-addstore { display: flex; gap: 10px; margin-top: 12px; }
.adm-status { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--r); font-weight: var(--w-semi); margin: 0; }
.adm-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.adm-status-ok { background: var(--ok-bg); color: var(--ok); }
.adm-status-warn { background: var(--warn-bg); color: var(--warn); }
.adm-status-err { background: var(--err-bg); color: var(--err); }
.adm-coverage-summary { margin: 12px 0 8px; font-size: 13px; color: var(--ink-2); }
.adm-coverage-missing { max-height: 320px; overflow: auto; }
.adm-missing td { height: auto; padding: 6px 10px; font-size: 13px; }

@media (orientation: portrait) and (min-width: 700px) {
  .adm-panes { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .adm-sidenav { flex-direction: row; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
  .adm-sidenav .admin-tab { height: 52px; font-size: 16px; flex: none; }
  .adm-kv { grid-template-columns: 1fr; }
  .adm-store-contact { grid-template-columns: 1fr; }
}
