/* ==========================================================================
   BeautyClara — Studio & Digital Loyalty Workspace
   Grounded in 3 Approved Awwwards References (2026-10-22):
   1. Two-Do (https://twodo.design) — One-handed mobile priority list & Dark mode
   2. GoShuin (https://aestudio.studio/goshuin/en) — Tactile paper stamp book & Lang switcher
   3. Bluejack Group Dashboard (https://me.thebluejackgroup.com) — Plain-language + 4 giant metrics
   ========================================================================== */

:root,
html[data-theme="paper"] {
  color-scheme: light;
  --font-ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bg: #F6F4F0;
  --surface: #FFFFFF;
  --surface-subtle: #EFECE6;
  --surface-paper: #FAF8F5;
  --ink: #1C1B19;
  --ink-secondary: #5A5650;
  --ink-muted: #757068;
  --border: #E2DDD5;
  --border-strong: #948E84;
  --accent: #C84B31;
  --accent-ink: #FFFFFF;
  --accent-soft: #F9EBE8;
  --sage: #2D6A4F;
  --sage-soft: #E8F3EE;
  --amber: #9C5700;
  --amber-soft: #FDF3E6;
  --stamp-ring: #C84B31;
  --stamp-fill: #FDF3F1;
  --shadow-card: 0 2px 10px rgba(28, 27, 25, 0.04);
  --shadow-modal: 0 24px 60px rgba(28, 27, 25, 0.16);
}

html[data-theme="pink"] {
  color-scheme: light;
  --bg: #FAF5F6;
  --surface: #FFFFFF;
  --surface-subtle: #F3EAEC;
  --surface-paper: #FDFBFC;
  --ink: #23191B;
  --ink-secondary: #635156;
  --ink-muted: #7D6A6F;
  --border: #E8D8DC;
  --border-strong: #9E878D;
  --accent: #B83B5E;
  --accent-ink: #FFFFFF;
  --accent-soft: #FCECEF;
  --sage: #2D6A4F;
  --sage-soft: #E8F3EE;
  --amber: #9C5700;
  --amber-soft: #FDF3E6;
  --stamp-ring: #B83B5E;
  --stamp-fill: #FDF2F5;
}

html[data-theme="lavender"] {
  color-scheme: light;
  --bg: #F6F5FA;
  --surface: #FFFFFF;
  --surface-subtle: #ECEAF4;
  --surface-paper: #FBF9FE;
  --ink: #1D1B24;
  --ink-secondary: #575366;
  --ink-muted: #706B80;
  --border: #DDD9EB;
  --border-strong: #8D88A1;
  --accent: #5E4AE3;
  --accent-ink: #FFFFFF;
  --accent-soft: #EFEFFD;
  --sage: #2D6A4F;
  --sage-soft: #E8F3EE;
  --amber: #9C5700;
  --amber-soft: #FDF3E6;
  --stamp-ring: #5E4AE3;
  --stamp-fill: #F3F1FE;
}

/* Two-Do Inspired Warm Olive/Charcoal Dark Palette */
html[data-theme="two-do-dark"] {
  color-scheme: dark;
  --bg: #181A17;
  --surface: #222520;
  --surface-subtle: #2B2F29;
  --surface-paper: #1E211D;
  --ink: #F4F1EA;
  --ink-secondary: #B8B4AA;
  --ink-muted: #8E8A80;
  --border: #343831;
  --border-strong: #6E736A;
  --accent: #E29578;
  --accent-ink: #181A17;
  --accent-soft: rgba(226, 149, 120, 0.16);
  --sage: #86A789;
  --sage-soft: rgba(134, 167, 137, 0.16);
  --amber: #E9C46A;
  --amber-soft: rgba(233, 196, 106, 0.16);
  --stamp-ring: #E29578;
  --stamp-fill: rgba(226, 149, 120, 0.14);
  --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.25);
  --shadow-modal: 0 28px 72px rgba(0, 0, 0, 0.55);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

/* Consistent, readable interface typography */
.serif-title {
  font-family: var(--font-ui);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.2;
  margin: 0;
}

/* ==========================================================================
   Top Editorial Bar (Bluejack + GoShuin)
   ========================================================================== */
.top-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background-color: var(--bg);
  border-bottom: 1px solid var(--border);
}

.top-header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.brand-cluster {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-seal {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  border: 1.5px solid var(--stamp-ring);
  background: var(--stamp-fill);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-ui);
  font-size: 1.2rem;
  flex-shrink: 0;
}

.brand-name {
  font-family: var(--font-ui);
  font-size: 1.45rem;
  line-height: 1.1;
}

.brand-subtitle {
  font-size: 0.78rem;
  color: var(--ink-secondary);
}

/* Quiet Editorial Nav Links (Bluejack style) */
.primary-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-tab {
  appearance: none;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.55rem 0.9rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-secondary);
  transition: color 0.15s ease, border-color 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.nav-tab:hover {
  color: var(--ink);
}

.nav-tab[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
  border-bottom-color: var(--accent);
}

.nav-count {
  font-size: 0.74rem;
  padding: 0.08rem 0.45rem;
  border-radius: 999px;
  background: var(--surface-subtle);
  color: var(--ink-secondary);
  border: 1px solid var(--border);
}

/* GoShuin Language & Workspace Controls */
.utility-controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.lang-pill-group {
  display: inline-flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.15rem;
}

.lang-pill {
  appearance: none;
  border: none;
  background: transparent;
  padding: 0.28rem 0.58rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--ink-secondary);
}

.lang-pill[aria-pressed="true"] {
  background: var(--ink);
  color: var(--bg);
}

.quiet-select {
  appearance: none;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.34rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink);
}

.theme-dots {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.45rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.theme-dot {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  border: 1.5px solid var(--border-strong);
  padding: 0;
  position: relative;
}

.theme-dot[data-theme-opt="paper"] { background: #F6F4F0; }
.theme-dot[data-theme-opt="pink"] { background: #F4C7D0; }
.theme-dot[data-theme-opt="lavender"] { background: #D7D0F5; }
.theme-dot[data-theme-opt="two-do-dark"] { background: #181A17; }

.theme-dot[aria-pressed="true"] {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ==========================================================================
   Main Workspace Container — Generous Breathable Layout
   ========================================================================== */
.workspace-shell {
  max-width: 960px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 6.5rem;
}

.page-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2.25rem;
  flex-wrap: wrap;
}

.page-hero-title {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.page-hero-sub {
  margin: 0.45rem 0 0;
  color: var(--ink-secondary);
  font-size: 0.98rem;
  max-width: 58ch;
}

/* ==========================================================================
   1. Two-Do Inspired One-Handed Priority Agenda
   ========================================================================== */
.progress-strip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.1rem 1.35rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
  box-shadow: var(--shadow-card);
}

.progress-meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.progress-label {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-secondary);
  font-weight: 600;
}

.progress-headline {
  font-size: 1.05rem;
  font-weight: 600;
}

.progress-track-wrap {
  flex: 1;
  min-width: 200px;
  max-width: 340px;
}

.progress-track {
  height: 8px;
  background: var(--surface-subtle);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.progress-fill {
  height: 100%;
  background: var(--sage);
  border-radius: 999px;
  transition: width 0.25s ease;
}

.agenda-group {
  margin-bottom: 2.25rem;
}

.agenda-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--border);
}

.agenda-group-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-secondary);
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.agenda-stack {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.appointment-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  box-shadow: var(--shadow-card);
  transition: border-color 0.15s ease;
}

.appointment-row.is-priority {
  border-left: 4px solid var(--accent);
}

.appointment-row.is-completed {
  background: var(--surface-paper);
  opacity: 0.88;
}

.appointment-main {
  display: flex;
  align-items: flex-start;
  gap: 1.15rem;
  min-width: 0;
  flex: 1;
}

.appointment-time-box {
  min-width: 4.5rem;
  padding-top: 0.1rem;
}

.appointment-time {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  display: block;
}

.appointment-duration {
  font-size: 0.78rem;
  color: var(--ink-muted);
}

.appointment-details {
  min-width: 0;
  flex: 1;
}

.appointment-client {
  font-size: 1.12rem;
  font-weight: 600;
  margin: 0 0 0.2rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.appointment-service {
  font-size: 0.94rem;
  color: var(--ink-secondary);
  margin: 0;
}

.appointment-note {
  font-size: 0.82rem;
  color: var(--ink-muted);
  margin: 0.35rem 0 0;
}

/* Accessible status badges: never rely on color alone (shape/icon + label) */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface-subtle);
  color: var(--ink);
}

.status-badge.status-ready {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--ink);
}

.status-badge.status-done {
  background: var(--sage-soft);
  border-color: var(--sage);
  color: var(--ink);
}

.status-badge.status-reward {
  background: var(--amber-soft);
  border-color: var(--amber);
  color: var(--ink);
}

.appointment-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.appointment-price {
  font-size: 1.05rem;
  font-weight: 600;
  margin-right: 0.35rem;
  white-space: nowrap;
}

/* Large One-Handed Tap Buttons */
.btn-primary {
  appearance: none;
  border: 1px solid transparent;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.68rem 1.15rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
  transition: transform 0.1s ease, opacity 0.15s ease;
}

.btn-primary:hover {
  opacity: 0.92;
}

.btn-secondary {
  appearance: none;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  font-weight: 500;
  font-size: 0.88rem;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}

.btn-secondary:hover {
  background: var(--surface-subtle);
}

/* ==========================================================================
   2. GoShuin Inspired Tactile Digital Stamp Book
   ========================================================================== */
.goshuin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 1.35rem;
}

.goshuin-card {
  background: var(--surface-paper);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
}

.goshuin-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.goshuin-client-name {
  font-family: var(--font-ui);
  font-size: 1.65rem;
  margin: 0;
}

.goshuin-client-meta {
  font-size: 0.84rem;
  color: var(--ink-secondary);
  margin: 0.25rem 0 0;
}

/* Tactile Circular Ink Stamp Slots */
.stamp-book-sheet {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.1rem;
}

.stamp-book-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--ink-secondary);
  margin-bottom: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.stamp-slots-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.stamp-slot {
  width: 2.85rem;
  height: 2.85rem;
  border-radius: 999px;
  border: 1.5px dashed var(--border-strong);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--ink-muted);
  position: relative;
  background: var(--surface-paper);
}

.stamp-slot.is-stamped {
  border-style: solid;
  border-width: 2px;
  border-color: var(--stamp-ring);
  background: var(--stamp-fill);
  color: var(--accent);
  font-weight: 700;
  transform: rotate(-4deg);
}

.stamp-slot.is-stamped:nth-child(even) {
  transform: rotate(3deg);
}

.stamp-slot.is-reward-slot {
  border-style: solid;
  border-color: var(--amber);
}

.stamp-seal-char {
  font-family: var(--font-ui);
  font-size: 1.15rem;
  line-height: 1;
}

.goshuin-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

/* ==========================================================================
   3. Bluejack Group Dashboard — Plain-Language Narrative + 4 Giant Metrics
   ========================================================================== */
.narrative-banner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.75rem 2rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow-card);
}

.narrative-eyebrow {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-secondary);
  font-weight: 700;
  margin: 0 0 0.55rem;
}

.narrative-paragraph {
  font-family: var(--font-ui);
  font-size: clamp(1.45rem, 2.5vw, 1.9rem);
  line-height: 1.35;
  margin: 0;
  color: var(--ink);
}

.narrative-paragraph strong {
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 4px;
}

.bluejack-metrics-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 2.25rem;
  box-shadow: var(--shadow-card);
}

.bluejack-metric-cell {
  padding: 1.6rem 1.5rem;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.65rem;
}

.bluejack-metric-cell:last-child {
  border-right: none;
}

.bluejack-metric-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-secondary);
}

.bluejack-metric-value {
  font-family: var(--font-ui);
  font-size: clamp(1.25rem, 2vw, 1.9rem);
  line-height: 1.05;
  color: var(--ink);
}

.bluejack-metric-sub {
  font-size: 0.8rem;
  color: var(--ink-muted);
}

/* Clean Single-Column Table / List for Invoices & Cost Entries */
.clean-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.5rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow-card);
}

.clean-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.15rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.clean-panel-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0;
}

.ledger-list {
  display: flex;
  flex-direction: column;
}

.ledger-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
}

.ledger-row:last-child {
  border-bottom: none;
}

/* ==========================================================================
   Public Booking Sheet (GoShuin Editorial + Multi-Service Combination)
   ========================================================================== */
.booking-sheet {
  max-width: 640px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 2rem;
  box-shadow: var(--shadow-card);
}

.service-pick-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin: 1rem 0 1.5rem;
}

.service-pick-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1.15rem;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  background: var(--surface-paper);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.service-pick-item.is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.addon-callout {
  padding: 1rem 1.15rem;
  border-radius: 14px;
  border: 1.5px dashed var(--border-strong);
  background: var(--surface-subtle);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.field-label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink-secondary);
}

.field-input {
  padding: 0.68rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-size: 0.95rem;
}

/* ==========================================================================
   Native Light-Dismiss Dialog (<dialog closedby="any">)
   ========================================================================== */
dialog.editorial-dialog {
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  color: var(--ink);
  padding: 0;
  max-width: 520px;
  width: calc(100% - 2rem);
  box-shadow: var(--shadow-modal);
}

dialog.editorial-dialog::backdrop {
  background: rgba(24, 26, 23, 0.48);
  backdrop-filter: blur(3px);
}

.dialog-body {
  padding: 1.75rem;
}

.dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.dialog-close {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

/* ==========================================================================
   Two-Do Mobile Bottom Navigation Bar (4 items + 1 central action)
   ========================================================================== */
.mobile-bottom-bar {
  display: none;
}

/* Toast Notification */
#toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 60;
  background: var(--ink);
  color: var(--bg);
  padding: 0.75rem 1.2rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--shadow-modal);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

#toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* High-Contrast / Forced Colors Accessibility Support */
@media (forced-colors: active) {
  .status-badge,
  .appointment-row,
  .goshuin-card,
  .bluejack-metrics-strip,
  .stamp-slot,
  .btn-primary,
  .btn-secondary {
    forced-color-adjust: none;
    border: 2px solid ButtonText;
  }
}

/* Responsive Breakpoints */
@media (max-width: 860px) {
  .bluejack-metrics-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .bluejack-metric-cell:nth-child(2) {
    border-right: none;
  }
  .bluejack-metric-cell:nth-child(1),
  .bluejack-metric-cell:nth-child(2) {
    border-bottom: 1px solid var(--border);
  }
  .goshuin-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .primary-nav {
    display: none;
  }
  .appointment-row {
    flex-direction: column;
    align-items: stretch;
  }
  .appointment-actions {
    flex-wrap: wrap;
    justify-content: space-between;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
  }
  .mobile-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 40;
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 0.45rem 0.75rem calc(0.45rem + env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    align-items: center;
    gap: 0.25rem;
  }
  .mobile-nav-btn {
    appearance: none;
    border: none;
    background: transparent;
    padding: 0.4rem 0.2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.18rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--ink-secondary);
  }
  .mobile-nav-btn[aria-current="page"] {
    color: var(--accent);
  }
  .mobile-fab-btn {
    appearance: none;
    border: none;
    background: var(--accent);
    color: var(--accent-ink);
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 999px;
    margin: 0 auto;
    font-size: 1.35rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* Public prototype context; uses the existing typography and palette. */
.demo-notice { font-size: .8rem; line-height: 1.5; opacity: .75; margin: 0 0 1.5rem; }

/* Shared heading and numeric hierarchy across all demo views. */
.brand-name, .goshuin-client-name, .narrative-paragraph, .bluejack-metric-value { font-weight: 600; letter-spacing: -.025em; }
.appointment-time, .appointment-price, .bluejack-metric-value { font-variant-numeric: tabular-nums; }

/* Connected workflow controls use the existing palette and type scale. */
.text-button { border: 0; padding: 0; background: transparent; font: inherit; color: inherit; text-align: left; text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 4px; overflow-wrap: anywhere; }
.workflow-toolbar { display: flex; align-items: flex-end; flex-wrap: wrap; gap: .75rem; margin: 0 0 1.5rem; }
.workflow-toolbar > .field-label { flex: 1 1 10rem; }
.workflow-toolbar > input { flex: 1 1 15rem; width: auto; }
.workflow-panel { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 1.25rem; margin: 0 0 1.5rem; }
.workflow-panel summary { cursor: pointer; font-weight: 600; line-height: 1.5; }
.workflow-panel fieldset { border: 1px solid var(--border); border-radius: 10px; margin: 1rem 0; padding: 1rem; min-width: 0; }
.workflow-checks { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; }
.workflow-checks label { display: inline-flex; align-items: flex-start; gap: .35rem; min-height: 2rem; }
.workflow-checks input { margin-top: .4rem; flex-shrink: 0; }
.workflow-history-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .75rem; padding: 1rem 0; border-bottom: 1px solid var(--border); }
.workflow-history-row > span:first-child { flex: 1 1 12rem; overflow-wrap: anywhere; }
.workflow-empty { padding: 1.5rem; border: 1px dashed var(--border-strong); border-radius: 12px; }
.field-input { max-width: 100%; }
textarea.field-input { resize: vertical; }
.goshuin-card-footer { flex-wrap: wrap; }
.service-pick-item { width: 100%; text-align: left; color: var(--ink); }
@media (max-width: 720px) {
  .mobile-nav-btn { overflow-wrap: anywhere; min-width: 0; font-size: .66rem; min-height: 2.75rem; }
  .workflow-toolbar > .field-label { flex-basis: 100%; }
  .appointment-time-box { min-width: 4.5rem; max-width: 7.5rem; }
  .appointment-actions button { white-space: normal; max-width: 100%; }
}

/* Invoice intake and payment planning, within the current interface. */
.bill-dialog { max-width: 780px; width: calc(100% - 2rem); max-height: calc(100dvh - 2rem); }
.bill-dialog .dialog-header { align-items: center; flex-wrap: wrap; }
.bill-dropzone { border: 2px dashed var(--border-strong); border-radius: 14px; padding: 1.2rem; text-align: center; background: var(--surface-subtle); }
.bill-dropzone .workflow-toolbar { justify-content: center; margin: .8rem 0; }
.bill-dropzone small { display: block; color: var(--ink-secondary); }
.bill-file-label { position: relative; overflow: hidden; cursor: pointer; }
.bill-file-label input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.bill-local-note { font-size: .8rem; color: var(--ink-secondary); }
.bill-form-fields { border: 0; padding: 0; margin: 0; min-width: 0; }
.bill-reviewed { display: flex; align-items: flex-start; gap: .5rem; margin: 1rem 0; line-height: 1.5; }
.bill-reviewed input { flex-shrink: 0; margin-top: .3rem; }
.bill-source { margin-top: 1.25rem; }
.bill-source pre { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; font-size: .8rem; padding: 1rem; background: var(--surface-subtle); border-radius: 10px; }
.bill-payables { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; margin: 1rem 0; }
.bill-payables > div { border: 1px solid var(--border); border-radius: 12px; padding: 1rem; }
.bill-payables span { display: block; font-size: .8rem; color: var(--ink-secondary); }
.bill-payables strong { display: block; font-size: clamp(1.2rem,2vw,1.8rem); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.bill-forecast { color: var(--ink-secondary); }
.bill-quickdrop { padding: 1rem; border: 1px dashed var(--border-strong); border-radius: 12px; display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; margin: 1rem 0; }
.bill-row { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 1rem; padding: 1.2rem 0; border-top: 1px solid var(--border); }
.bill-row-main { flex: 1 1 16rem; min-width: 0; }
.bill-row h3, .bill-supplier h3 { margin: 0 0 .4rem; font-size: 1rem; overflow-wrap: anywhere; }
.bill-row p, .bill-supplier p { margin: .4rem 0; color: var(--ink-secondary); font-size: .85rem; overflow-wrap: anywhere; }
.bill-row-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
.bill-row-actions strong { font-variant-numeric: tabular-nums; }
.bill-supplier { padding: 1.2rem 0; border-top: 1px solid var(--border); }
@media(max-width:720px) { .bill-payables { grid-template-columns: 1fr; gap: .5rem; } .bill-payables > div { display: flex; justify-content: space-between; align-items: center; gap: 1rem; } .bill-dialog .form-grid { grid-template-columns: 1fr; } .bill-row-actions { width: 100%; } }
