/* ============================================================
   DreamFlow Studio — CSS Design System v1.0
   Google Material 3 Inspired · Inter + Google Sans Typography
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Google+Sans:wght@400;500;700&family=Inter:wght@400;500;600;700&display=swap');

/* ── DESIGN TOKENS ────────────────────────────────────────── */
:root {
  /* Brand */
  --studio-blue:       #314a63;
  --studio-blue-dark:  #263a4e;
  --studio-blue-light: #e7edf2;
  --studio-green:      #4f755b;
  --studio-red:        #a85656;
  --studio-orange:     #a87939;
  --studio-purple:     #6a5d82;

  /* Surface */
  --surface-bg:        #f2f4f7;
  --surface-white:     #fbfbfa;
  --surface-sidebar:   #f7f8fa;
  --surface-card:      #fdfdfc;
  --surface-hover:     #eef1f4;
  --surface-selected:  #e8edf2;
  --surface-overlay:   rgba(15,23,42,0.28);

  /* Borders */
  --border-soft:       #e3e6ea;
  --border-medium:     #d0d5dd;
  --border-strong:     #b2bac5;

  /* Text */
  --text-primary:      #1f2933;
  --text-secondary:    #516173;
  --text-tertiary:     #6f7d8d;
  --text-link:         #314a63;
  --text-on-blue:      #ffffff;

  /* Elevation shadows */
  --shadow-xs:  0 1px 2px rgba(15,23,42,.04);
  --shadow-sm:  0 4px 10px rgba(15,23,42,.05);
  --shadow-md:  0 10px 24px rgba(15,23,42,.08);
  --shadow-lg:  0 18px 42px rgba(15,23,42,.10);
  --shadow-xl:  0 26px 60px rgba(15,23,42,.12);
  --shadow-fab: 0 14px 28px rgba(49,74,99,.18);

  /* Geometry */
  --radius-xs:  6px;
  --radius-sm:  10px;
  --radius-md:  14px;
  --radius-lg:  18px;
  --radius-xl:  24px;
  --radius-full: 9999px;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;

  /* Layout */
  --sidebar-w:    260px;
  --topbar-h:     64px;

  /* Typography */
  --font-ui:   'Inter', 'Google Sans', system-ui, sans-serif;
  --font-brand:'Google Sans', 'Inter', system-ui, sans-serif;

  /* Transitions */
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
  --ease-decel:    cubic-bezier(0, 0, 0.2, 1);
  --ease-accel:    cubic-bezier(0.3, 0, 1, 1);
  --dur-fast:  120ms;
  --dur-mid:   200ms;
  --dur-slow:  350ms;

  /* Status colors */
  --status-draft:    #5d6978;
  --status-sent:     #314a63;
  --status-viewed:   #6a5d82;
  --status-approved: #4f755b;
  --status-paid:     #4f755b;
  --status-partial:  #a87939;
  --status-open:     #a85656;
  --status-void:     #838e9d;
}

[data-theme="dark"] {
  --surface-bg:        #141a22;
  --surface-white:     #1b232d;
  --surface-sidebar:   #171e28;
  --surface-card:      #1d2530;
  --surface-hover:     #232d39;
  --surface-selected:  #243243;
  --surface-overlay:   rgba(3,8,15,.48);
  --border-soft:       #2f3a48;
  --border-medium:     #3c4858;
  --border-strong:     #556172;
  --text-primary:      #eef2f6;
  --text-secondary:    #b0bac6;
  --text-tertiary:     #8994a2;
  --text-link:         #9fb3c8;
  --studio-blue:       #8ea5bd;
  --studio-blue-dark:  #7991ab;
  --studio-blue-light: #253343;
  --studio-green:      #7aa083;
  --studio-red:        #cf8585;
  --studio-orange:     #c69a5f;
  --studio-purple:     #9d92b8;
  --shadow-xs:  0 1px 2px rgba(0,0,0,.22);
  --shadow-sm:  0 8px 18px rgba(0,0,0,.24);
  --shadow-md:  0 16px 34px rgba(0,0,0,.30);
  --shadow-lg:  0 22px 46px rgba(0,0,0,.34);
  --shadow-xl:  0 28px 60px rgba(0,0,0,.40);
  --shadow-fab: 0 16px 32px rgba(0,0,0,.30);
}

/* ── RESET ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-ui);
  background: var(--surface-bg);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
a { color: var(--text-link); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── TYPOGRAPHY SCALE ──────────────────────────────────────── */
.t-display    { font-family: var(--font-brand); font-size: 36px; font-weight: 700; letter-spacing: -.5px; line-height: 1.2; }
.t-headline   { font-family: var(--font-brand); font-size: 24px; font-weight: 700; letter-spacing: -.3px; line-height: 1.3; }
.t-title      { font-family: var(--font-brand); font-size: 18px; font-weight: 600; line-height: 1.4; }
.t-subtitle   { font-size: 15px; font-weight: 500; line-height: 1.4; color: var(--text-secondary); }
.t-body       { font-size: 14px; line-height: 1.5; }
.t-caption    { font-size: 12px; color: var(--text-secondary); line-height: 1.4; }
.t-label      { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-tertiary); }
.t-mono       { font-family: 'Roboto Mono', 'Courier New', monospace; font-size: 13px; }

/* ── SHELL LAYOUT ──────────────────────────────────────────── */
.studio-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: 1fr;
  min-height: 100vh;
}

/* ── SIDEBAR ───────────────────────────────────────────────── */
.studio-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--surface-sidebar);
  border-right: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform var(--dur-slow) var(--ease-standard);
  scrollbar-width: thin;
  scrollbar-color: var(--border-medium) transparent;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-4) var(--space-3);
  min-height: 64px;
}
.sidebar-logo__mark {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.sidebar-logo__name {
  font-family: var(--font-brand);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -.3px;
}
.sidebar-logo__tagline {
  font-size: 11px;
  color: var(--text-tertiary);
  display: block;
}

/* Nav sections */
.sidebar-section { padding: var(--space-2) 0; }
.sidebar-section + .sidebar-section {
  border-top: 1px solid var(--border-soft);
  margin-top: var(--space-2);
  padding-top: var(--space-4);
}
.sidebar-section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #7c8aa5;
  padding: 0 var(--space-4) var(--space-2);
}

/* Nav items */
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  margin: 4px 8px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  background: var(--surface-card);
  box-shadow: var(--shadow-xs);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background var(--dur-fast) var(--ease-standard),
    color var(--dur-fast) var(--ease-standard),
    border-color var(--dur-fast) var(--ease-standard),
    box-shadow var(--dur-fast) var(--ease-standard),
    transform var(--dur-fast) var(--ease-standard);
  text-decoration: none;
  user-select: none;
  min-height: 54px;
}
.nav-item:hover {
  background: var(--surface-white);
  color: var(--text-primary);
  border-color: var(--border-medium);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}
.nav-item.active {
  background: var(--surface-selected);
  border-color: rgba(49, 74, 99, 0.20);
  color: var(--studio-blue);
  font-weight: 700;
  box-shadow: var(--shadow-xs);
}
[data-theme="dark"] .nav-item.active {
  background: rgba(142, 165, 189, 0.14);
  border-color: rgba(142, 165, 189, 0.22);
  color: var(--studio-blue);
}
.nav-item__icon {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--surface-bg);
  border: 1px solid var(--border-soft);
  color: var(--text-secondary);
  opacity: 1;
}
.nav-item__icon svg {
  width: 20px;
  height: 20px;
}
.nav-item:hover .nav-item__icon {
  background: var(--surface-selected);
  border-color: rgba(49, 74, 99, 0.14);
  color: var(--studio-blue);
}
.nav-item.active .nav-item__icon {
  background: rgba(49, 74, 99, 0.10);
  border-color: rgba(49, 74, 99, 0.14);
  color: var(--studio-blue);
  box-shadow: none;
}
.nav-item__badge {
  margin-left: auto;
  background: var(--studio-blue);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  padding: 3px 9px;
  min-width: 28px;
  text-align: center;
  box-shadow: var(--shadow-xs);
}

/* Sidebar footer */
.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-soft);
  padding: var(--space-3) var(--space-4);
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--dur-fast);
}
.sidebar-user:hover { background: var(--surface-hover); }
.sidebar-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--studio-blue);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sidebar-user__meta {
  flex: 1;
  min-width: 0;
}
.sidebar-user__name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.sidebar-user__role { font-size: 11px; color: var(--text-tertiary); }

/* ── MAIN CONTENT AREA ─────────────────────────────────────── */
.studio-main {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow: hidden;
}

/* ── TOP BAR ───────────────────────────────────────────────── */
.studio-topbar {
  position: sticky;
  top: 0;
  height: var(--topbar-h);
  background: var(--surface-white);
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0 var(--space-6);
  z-index: 50;
  flex-shrink: 0;
}
.topbar-hamburger {
  display: none;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  border-radius: var(--radius-full);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: background var(--dur-fast);
}
.topbar-hamburger:hover { background: var(--surface-hover); }
.topbar-hamburger svg { width: 20px; height: 20px; }

.topbar-search {
  flex: 1;
  max-width: 520px;
  position: relative;
}
.topbar-search input {
  width: 100%;
  height: 46px;
  background: var(--surface-white);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 0 var(--space-4) 0 44px;
  font-size: 14px;
  color: var(--text-primary);
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast), background var(--dur-fast);
  outline: none;
}
.topbar-search input:focus {
  background: var(--surface-white);
  border-color: var(--studio-blue);
  box-shadow: 0 0 0 3px rgba(49,74,99,.12);
}
.topbar-search input::placeholder { color: var(--text-tertiary); }
.topbar-search__icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-tertiary);
  pointer-events: none;
}
.global-search-results {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  right: 0;
  z-index: 60;
  padding: 8px;
  border-radius: 22px;
  border: 1px solid var(--border-medium);
  background: linear-gradient(180deg, rgba(250, 250, 249, 0.98), rgba(243, 244, 246, 0.97));
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px);
}
.global-search-results__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.global-search-results__group {
  display: grid;
  gap: 4px;
}
.global-search-results__group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px 2px;
  color: var(--text-tertiary);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.global-search-results__section {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-width: 0;
  padding: 12px 14px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 160ms ease, transform 160ms ease;
  appearance: none;
}
.global-search-results__section:hover,
.global-search-results__section.is-active {
  background: rgba(49, 74, 99, 0.08);
  transform: translateY(-1px);
}
.global-search-results__type {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(49, 74, 99, 0.1);
  color: var(--studio-blue);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.global-search-results__main {
  min-width: 0;
  display: grid;
  gap: 2px;
}
.global-search-results__title,
.global-search-results__meta {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.global-search-results__title {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
}
.global-search-results__meta {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}
.global-search-results__value {
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.global-search-results__empty {
  padding: 14px 16px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
}
.global-search-results__hint {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px 4px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
[data-theme="dark"] .global-search-results {
  border-color: rgba(148, 163, 184, 0.18);
  background: linear-gradient(180deg, rgba(10, 16, 28, 0.96), rgba(7, 12, 23, 0.94));
  box-shadow: 0 24px 70px rgba(2, 8, 23, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
[data-theme="dark"] .global-search-results__section:hover,
[data-theme="dark"] .global-search-results__section.is-active {
  background: rgba(59, 130, 246, 0.12);
}
[data-theme="dark"] .global-search-results__type {
  background: rgba(59, 130, 246, 0.14);
  color: var(--accent-indigo);
}
[data-theme="dark"] .global-search-results__group-head {
  color: rgba(203, 213, 225, 0.72);
}

.df-other-counter-modal__card {
  width: min(720px, calc(100vw - 32px));
}
.df-other-counter-modal__head,
.df-other-counter-modal__footer,
.df-other-counter-modal__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.df-other-counter-modal__head {
  margin-bottom: 16px;
}
.df-other-counter-modal__title {
  color: var(--text-primary);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
}
.df-other-counter-modal__copy {
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
}
.df-other-counter-modal__close {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-medium);
  border-radius: 8px;
  background: var(--surface-card);
  color: var(--text-secondary);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.df-other-counter-modal__form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.df-other-counter-modal__field,
.df-other-counter-modal__sizes {
  display: grid;
  gap: 7px;
}
.df-other-counter-modal__field > span,
.df-other-counter-modal__section-title {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.df-other-counter-modal__field--span,
.df-other-counter-modal__mode,
.df-other-counter-modal__sizes,
.df-other-counter-modal__actions,
.df-other-counter-modal__footer {
  grid-column: 1 / -1;
}
.df-other-counter-modal__mode {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.df-other-counter-modal__mode label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 700;
}
.df-other-counter-modal__size-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.df-other-counter-modal__actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}
.df-other-counter-modal__footer {
  justify-content: flex-end;
  padding-top: 4px;
}
@media (max-width: 720px) {
  .df-other-counter-modal__form {
    grid-template-columns: 1fr;
  }
  .df-other-counter-modal__head,
  .df-other-counter-modal__footer,
  .df-other-counter-modal__actions {
    align-items: stretch;
    flex-direction: column;
  }
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-left: auto;
}
.topbar-icon-btn {
  width: 40px;
  height: 40px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: background var(--dur-fast);
  position: relative;
}
.topbar-icon-btn:hover {
  background: var(--surface-white);
  border-color: var(--border-soft);
  color: var(--text-primary);
}
.topbar-icon-btn svg { width: 20px; height: 20px; }

/* ── PAGE CONTENT ──────────────────────────────────────────── */
.studio-page { flex: 1; overflow-y: auto; }
.page-body { padding: var(--space-6); max-width: 1400px; margin: 0 auto; }
.page-body--full { padding: var(--space-6); }
.page-body__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
}

/* Page header */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
}
.page-header__title { font-family: var(--font-brand); font-size: 22px; font-weight: 700; color: var(--text-primary); }
.page-header__subtitle { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
.page-header__actions { display: flex; gap: var(--space-2); align-items: center; flex-shrink: 0; }

/* ── BUTTONS ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  height: 38px;
  padding: 0 var(--space-4);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background var(--dur-fast) var(--ease-standard),
              border-color var(--dur-fast) var(--ease-standard),
              box-shadow var(--dur-fast) var(--ease-standard),
              transform var(--dur-fast) var(--ease-standard);
  white-space: nowrap;
  text-decoration: none;
  outline: none;
  user-select: none;
}
.btn:focus-visible { outline: 2px solid var(--studio-blue); outline-offset: 2px; }
.btn:active { transform: none; }
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.btn-primary {
  background: var(--studio-blue);
  border-color: var(--studio-blue);
  color: #fff;
}
.btn-primary:hover   { background: var(--studio-blue-dark); border-color: var(--studio-blue-dark); box-shadow: var(--shadow-sm); }
.btn-primary:active  { background: var(--studio-blue-dark); }
[data-theme="dark"] .btn-primary {
  background: var(--studio-blue);
  border-color: var(--studio-blue);
  color: #fff;
}
[data-theme="dark"] .btn-primary:hover {
  background: var(--studio-blue-dark);
  border-color: var(--studio-blue-dark);
}

.btn-secondary {
  background: var(--surface-white);
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
}
.btn-secondary:hover {
  background: var(--surface-selected);
  border-color: rgba(49, 74, 99, 0.18);
  box-shadow: var(--shadow-xs);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid transparent;
}
.btn-ghost:hover { background: var(--surface-hover); border-color: var(--border-soft); color: var(--text-primary); }

.btn-danger {
  background: var(--studio-red);
  border-color: var(--studio-red);
  color: #fff;
}
.btn-danger:hover  { background: #954949; border-color: #954949; box-shadow: var(--shadow-sm); }

.btn-sm { height: 28px; padding: 0 var(--space-3); font-size: 13px; }
.btn-lg { height: 44px; padding: 0 var(--space-6); font-size: 15px; }
.btn-icon { width: 36px; padding: 0; }
.btn-icon.btn-sm { width: 28px; }

/* FAB */
.fab {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: var(--studio-blue);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-fab);
  transition: transform var(--dur-mid) var(--ease-decel),
              box-shadow var(--dur-mid) var(--ease-decel);
  z-index: 30;
}
.fab:hover { transform: none; box-shadow: var(--shadow-md); }
.fab svg { width: 24px; height: 24px; }
.fab-extended {
  width: auto;
  padding: 0 var(--space-5);
  gap: var(--space-2);
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  min-width: 140px;
}

/* ── CARDS ─────────────────────────────────────────────────── */
.card {
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--dur-fast);
}
.card:hover { box-shadow: var(--shadow-xs); }
.card-sm { border-radius: var(--radius-md); padding: var(--space-4); }
.card-flat { box-shadow: none; }
.card-interactive { cursor: pointer; }
.card-interactive:hover { box-shadow: var(--shadow-sm); transition: box-shadow var(--dur-mid); }

/* ── METRIC CARDS (Home Dashboard) ────────────────────────── */
.metric-card {
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--dur-fast);
}
.metric-card:hover { box-shadow: var(--shadow-sm); }
.metric-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.metric-icon svg { width: 20px; height: 20px; }
.metric-icon--blue   { background: rgba(49, 74, 99, 0.10); color: var(--studio-blue); }
.metric-icon--green  { background: rgba(79, 117, 91, 0.12); color: var(--studio-green); }
.metric-icon--orange { background: rgba(168, 121, 57, 0.12); color: var(--studio-orange); }
.metric-icon--red    { background: rgba(168, 86, 86, 0.12); color: var(--studio-red); }
[data-theme="dark"] .metric-icon--blue   { background: rgba(142, 165, 189, 0.14); color: var(--studio-blue); }
[data-theme="dark"] .metric-icon--green  { background: rgba(122, 160, 131, 0.14); color: var(--studio-green); }
[data-theme="dark"] .metric-icon--orange { background: rgba(198, 154, 95, 0.14); color: var(--studio-orange); }
[data-theme="dark"] .metric-icon--red    { background: rgba(207, 133, 133, 0.14); color: var(--studio-red); }

.metric-value { font-family: var(--font-brand); font-size: 28px; font-weight: 700; color: var(--text-primary); letter-spacing: -.5px; }
.metric-label { font-size: 13px; color: var(--text-secondary); font-weight: 500; }
.metric-delta { font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 3px; }
.metric-delta--up   { color: var(--studio-green); }
.metric-delta--down { color: var(--studio-red); }

/* ── STATUS CHIPS ──────────────────────────────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.chip--draft    { background: #eef1f4; border-color: #d7dce3; color: var(--status-draft); }
.chip--sent     { background: #e8edf2; border-color: rgba(49, 74, 99, 0.14); color: var(--status-sent); }
.chip--viewed   { background: rgba(106, 93, 130, 0.10); border-color: rgba(106, 93, 130, 0.14); color: var(--status-viewed); }
.chip--approved { background: rgba(79, 117, 91, 0.10); border-color: rgba(79, 117, 91, 0.14); color: var(--status-approved); }
.chip--open     { background: rgba(168, 86, 86, 0.10); border-color: rgba(168, 86, 86, 0.14); color: var(--status-open); }
.chip--partial  { background: rgba(168, 121, 57, 0.10); border-color: rgba(168, 121, 57, 0.14); color: var(--status-partial); }
.chip--paid     { background: rgba(79, 117, 91, 0.10); border-color: rgba(79, 117, 91, 0.14); color: var(--status-paid); }
.chip--void     { background: #eef1f4; border-color: #d7dce3; color: var(--status-void); }
[data-theme="dark"] .chip--draft    { background: rgba(137, 148, 162, 0.10); border-color: rgba(137, 148, 162, 0.12); }
[data-theme="dark"] .chip--sent     { background: rgba(142, 165, 189, 0.14); border-color: rgba(142, 165, 189, 0.18); }
[data-theme="dark"] .chip--approved, [data-theme="dark"] .chip--paid { background: rgba(122, 160, 131, 0.14); border-color: rgba(122, 160, 131, 0.18); }
[data-theme="dark"] .chip--open     { background: rgba(207, 133, 133, 0.14); border-color: rgba(207, 133, 133, 0.18); }
[data-theme="dark"] .chip--partial  { background: rgba(198, 154, 95, 0.14); border-color: rgba(198, 154, 95, 0.18); }

/* ── FILTER CHIPS BAR ──────────────────────────────────────── */
.filter-chips {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-4);
}
.filter-chip {
  height: 32px;
  padding: 0 var(--space-3);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  background: var(--surface-card);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--dur-fast);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.filter-chip:hover { border-color: rgba(49, 74, 99, 0.18); background: var(--surface-white); color: var(--text-primary); }
.filter-chip.active {
  border-color: rgba(49, 74, 99, 0.18);
  background: var(--surface-selected);
  color: var(--studio-blue);
  font-weight: 600;
}

/* ── DATA TABLE ────────────────────────────────────────────── */
.data-table-wrap {
  background: var(--surface-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.data-table thead th {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  background: var(--surface-sidebar);
  border-bottom: 1px solid var(--border-soft);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}
.data-table thead th:hover { color: var(--text-primary); }
.data-table tbody tr {
  border-bottom: 1px solid var(--border-soft);
  transition: background var(--dur-fast);
}
.data-table tbody tr:last-child { border-bottom: none; }
.data-table tbody tr:hover { background: var(--surface-hover); }
.data-table tbody td {
  padding: var(--space-3) var(--space-4);
  color: var(--text-primary);
  vertical-align: middle;
}
.data-table .col-name { font-weight: 600; }
.data-table .col-mono { font-family: 'Roboto Mono', monospace; font-size: 13px; }
.data-table .col-muted { color: var(--text-secondary); }
.data-table .col-actions { text-align: right; white-space: nowrap; }
.data-table .row-empty td {
  padding: var(--space-12) var(--space-4);
  text-align: center;
  color: var(--text-tertiary);
}

/* ── FORMS ─────────────────────────────────────────────────── */
.form-section { margin-bottom: var(--space-6); }
.form-section-title { font-size: 15px; font-weight: 600; color: var(--text-primary); margin-bottom: var(--space-4); padding-bottom: var(--space-3); border-bottom: 1px solid var(--border-soft); }
.form-grid { display: grid; gap: var(--space-4); }
.form-grid-2 { grid-template-columns: 1fr 1fr; }
.form-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-row { display: flex; gap: var(--space-4); align-items: flex-start; }

.form-field { display: flex; flex-direction: column; gap: 5px; }
.form-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: .03em;
}
.form-input, .form-select, .form-textarea {
  height: 44px;
  padding: 0 var(--space-3);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  background: var(--surface-white);
  color: var(--text-primary);
  font-size: 14px;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45);
  outline: none;
  width: 100%;
}
.form-textarea { height: auto; min-height: 80px; padding: var(--space-2) var(--space-3); resize: vertical; }
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--studio-blue);
  box-shadow: 0 0 0 3px rgba(49,74,99,.12);
}
.form-input:disabled, .form-select:disabled { background: var(--surface-bg); color: var(--text-secondary); cursor: not-allowed; }
.form-hint { font-size: 12px; color: var(--text-tertiary); }
.form-error { font-size: 12px; color: var(--studio-red); }

/* ── DIALOGS / MODALS ──────────────────────────────────────── */
.dialog-backdrop {
  position: fixed;
  inset: 0;
  background: var(--surface-overlay);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  backdrop-filter: blur(4px);
  animation: fadeIn var(--dur-mid) var(--ease-decel);
}
.dialog {
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp var(--dur-mid) var(--ease-decel);
}
.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--border-soft);
}
.dialog-title { font-family: var(--font-brand); font-size: 18px; font-weight: 600; }
.dialog-close {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: background var(--dur-fast);
}
.dialog-close:hover { background: var(--surface-hover); color: var(--text-primary); }
.dialog-body { padding: var(--space-5) var(--space-6); }
.dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--border-soft);
}

.df-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15,23,42,0.42);
  backdrop-filter: blur(10px);
}

.df-modal-card {
  width: min(100%, 520px);
  max-width: 520px;
  max-height: min(calc(100vh - 40px), 860px);
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  border: 1px solid rgba(148,163,184,0.22);
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(241,245,249,0.98));
  box-shadow: 0 28px 70px rgba(15,23,42,0.24);
  color: #0f172a;
  overflow: hidden;
}

body[data-theme="dark"] .df-modal-card {
  background: linear-gradient(180deg, rgba(15,23,42,0.96), rgba(30,41,59,0.98));
  color: #e2e8f0;
}

.df-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 16px;
  border-bottom: 1px solid rgba(148,163,184,0.18);
}

.df-modal-head__stack {
  display: grid;
  gap: 10px;
}

.df-modal-head h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.df-modal-head p,
.df-modal-copy {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: #64748b;
}

body[data-theme="dark"] .df-modal-head p,
body[data-theme="dark"] .df-modal-copy {
  color: #94a3b8;
}

.df-modal-close {
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 12px;
  background: rgba(148,163,184,0.12);
  color: inherit;
  cursor: pointer;
  font-size: 18px;
  font-weight: 700;
}

.df-modal-form {
  display: grid;
  gap: 14px;
  padding: 20px 24px 24px;
  overflow: auto;
}

.df-modal-body {
  display: grid;
  gap: 16px;
  padding: 20px 24px 24px;
  overflow: auto;
}

.df-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.df-modal-field {
  display: grid;
  gap: 6px;
}

.df-modal-field--full {
  grid-column: 1 / -1;
}

.df-modal-field label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}

body[data-theme="dark"] .df-modal-field label {
  color: #94a3b8;
}

.df-modal-field input,
.df-modal-field select,
.df-modal-field textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(148,163,184,0.28);
  background: rgba(255,255,255,0.9);
  color: #0f172a;
  font: inherit;
}

body[data-theme="dark"] .df-modal-field input,
body[data-theme="dark"] .df-modal-field select,
body[data-theme="dark"] .df-modal-field textarea {
  background: rgba(15,23,42,0.76);
  color: #e2e8f0;
  border-color: rgba(148,163,184,0.22);
}

.df-modal-field textarea {
  min-height: 88px;
  resize: vertical;
}

.df-modal-textarea--compact {
  min-height: 72px;
}

.df-modal-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(49,74,99,0.10);
  color: var(--studio-blue);
  font-size: 13px;
  font-weight: 700;
}

body[data-theme="dark"] .df-modal-meta {
  background: rgba(142,165,189,0.14);
  color: #bfdbfe;
}

.df-modal-error {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(168,86,86,0.10);
  border: 1px solid rgba(168,86,86,0.20);
  color: var(--studio-red);
  font-size: 13px;
  line-height: 1.5;
}

.df-modal-error[hidden] {
  display: none;
}

.df-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 2px;
}

.df-modal-message {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: #475569;
}

body[data-theme="dark"] .df-modal-message {
  color: #cbd5e1;
}

.df-modal-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(49,74,99,0.10);
  color: var(--studio-blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.df-modal-badge--danger {
  background: rgba(168,86,86,0.10);
  color: var(--studio-red);
}

body[data-theme="dark"] .df-modal-badge {
  background: rgba(142,165,189,0.18);
  color: #bfdbfe;
}

body[data-theme="dark"] .df-modal-badge--danger {
  background: rgba(207,133,133,0.18);
  color: #fecaca;
}

.df-modal-linked-preview {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(49,74,99,0.16);
  background: rgba(49,74,99,0.08);
  color: var(--studio-blue);
}

.df-modal-linked-preview--empty {
  border-style: dashed;
  color: #64748b;
  background: rgba(148,163,184,0.08);
}

.df-modal-linked-preview strong {
  font-size: 14px;
  font-weight: 800;
  color: inherit;
}

.df-modal-linked-preview__meta,
.df-modal-linked-preview__line {
  font-size: 12px;
  line-height: 1.45;
  color: inherit;
}

body[data-theme="dark"] .df-modal-linked-preview {
  background: rgba(142,165,189,0.16);
  border-color: rgba(142,165,189,0.22);
  color: #bfdbfe;
}

body[data-theme="dark"] .df-modal-linked-preview--empty {
  background: rgba(148,163,184,0.12);
  color: #94a3b8;
}

.df-modal-action--danger {
  background: rgba(168,86,86,0.16);
  border-color: rgba(168,86,86,0.28);
  color: var(--studio-red);
}

@media (max-width: 720px) {
  .df-modal-grid {
    grid-template-columns: 1fr;
  }
}

/* ── SNACKBAR / TOAST ──────────────────────────────────────── */
.df-intake-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0,0,0,0.52);
  backdrop-filter: blur(8px);
}

.df-intake-card {
  width: min(680px, 100%);
  overflow: hidden;
  border: 1px solid var(--border-soft);
  border-radius: 20px;
  background: var(--surface-card);
  box-shadow: var(--shadow-xl);
}

.df-intake-head {
  padding: 24px 28px 0;
  border-bottom: 1px solid var(--border-soft);
}

.df-intake-head h2 {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.df-intake-head p {
  margin: 0 0 20px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.df-intake-body {
  padding: 24px 28px;
}

.df-intake-grid,
.df-intake-advanced-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.df-intake-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.df-intake-group label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.df-intake-group input,
.df-intake-group textarea,
.df-intake-group select {
  padding: 10px 12px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: var(--surface-bg);
  color: var(--text-primary);
  font: inherit;
  font-size: 14px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.df-intake-group input:focus,
.df-intake-group textarea:focus,
.df-intake-group select:focus {
  outline: none;
  border-color: var(--studio-blue);
  box-shadow: 0 0 0 3px rgba(26,115,232,0.12);
}

.df-intake-group textarea {
  min-height: 80px;
  resize: vertical;
}

.df-intake-full {
  grid-column: 1 / -1;
}

.df-intake-advanced {
  grid-column: 1 / -1;
  padding: 0 14px;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: var(--surface-bg);
}

.df-intake-advanced summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  cursor: pointer;
  list-style: none;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.df-intake-advanced summary::-webkit-details-marker {
  display: none;
}

.df-intake-advanced-copy {
  margin: -6px 0 14px;
  font-size: 12px;
  color: var(--text-secondary);
}

.df-intake-advanced-grid {
  padding-bottom: 14px;
}

.df-intake-error {
  min-height: 16px;
  margin-top: 4px;
  font-size: 12px;
  color: var(--studio-red);
}

.df-intake-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 28px 24px;
}

@media (max-width: 720px) {
  .df-intake-grid,
  .df-intake-advanced-grid {
    grid-template-columns: 1fr;
  }
}

.snackbar-container {
  position: fixed;
  bottom: var(--space-5);
  left: 50%;
  transform: translateX(-50%);
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  align-items: center;
  pointer-events: none;
}
.snackbar {
  background: #323232;
  color: #fff;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  pointer-events: all;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 200px;
  max-width: 480px;
  animation: slideUp var(--dur-mid) var(--ease-decel);
}
.snackbar--error { background: #c62828; }
.snackbar--success { background: #1b5e20; }
.snackbar__action {
  background: transparent;
  border: none;
  color: #8ab4f8;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  margin-left: auto;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* ── GRID LAYOUTS ──────────────────────────────────────────── */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.three-col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--space-4); }

/* ── HOME PAGE ─────────────────────────────────────────────── */
.home-greeting {
  font-family: var(--font-brand);
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}
.home-date { font-size: 14px; color: var(--text-secondary); margin-bottom: var(--space-6); }

.activity-list { list-style: none; display: flex; flex-direction: column; gap: 1px; }
.activity-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: 13px;
  transition: background var(--dur-fast);
}
.activity-item:hover { background: var(--surface-hover); }
.activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--studio-blue);
  flex-shrink: 0;
  margin-top: 5px;
}
.activity-text { color: var(--text-primary); flex: 1; }
.activity-time { color: var(--text-tertiary); font-size: 12px; white-space: nowrap; flex-shrink: 0; }

/* Quick actions on home */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}
.quick-action {
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
  transition: box-shadow var(--dur-fast), transform var(--dur-fast);
  text-decoration: none;
}
.quick-action:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); text-decoration: none; }
.quick-action__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}
.quick-action__icon svg { width: 22px; height: 22px; }
.quick-action__icon--blue   { background: #e8f0fe; color: var(--studio-blue); }
.quick-action__icon--green  { background: #e6f4ea; color: var(--studio-green); }
.quick-action__icon--purple { background: #f3e8fd; color: var(--studio-purple); }
.quick-action__icon--orange { background: #fef7e0; color: var(--studio-orange); }
.quick-action__title { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.quick-action__desc  { font-size: 12px; color: var(--text-secondary); }

/* ── SETTINGS PAGE ─────────────────────────────────────────── */
.settings-layout { display: grid; grid-template-columns: 220px 1fr; gap: var(--space-6); align-items: start; }
.settings-nav { position: sticky; top: var(--space-4); }
.settings-nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--dur-fast), color var(--dur-fast);
  text-decoration: none;
  font-weight: 500;
}
.settings-nav-item:hover { background: var(--surface-hover); color: var(--text-primary); text-decoration: none; }
.settings-nav-item.active { background: var(--studio-blue-light); color: var(--studio-blue); font-weight: 600; }

/* ── EMPTY STATES ──────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding: var(--space-12) var(--space-4);
  text-align: center;
}
.empty-state__icon {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-full);
  background: var(--surface-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
}
.empty-state__icon svg { width: 36px; height: 36px; }
.empty-state__title { font-size: 18px; font-weight: 600; color: var(--text-primary); }
.empty-state__desc  { font-size: 14px; color: var(--text-secondary); max-width: 320px; }

/* ── DRAWER / SIDE PANEL ───────────────────────────────────── */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: var(--surface-overlay);
  z-index: 150;
  opacity: 0;
  transition: opacity var(--dur-slow) var(--ease-standard);
  pointer-events: none;
}
.drawer-backdrop.open { opacity: 1; pointer-events: all; }
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 520px;
  background: var(--surface-card);
  border-left: 1px solid var(--border-soft);
  box-shadow: var(--shadow-lg);
  z-index: 160;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--dur-slow) var(--ease-standard);
}
.drawer.open { transform: translateX(0); }
.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border-soft);
  min-height: 64px;
  flex-shrink: 0;
}
.drawer-title { font-family: var(--font-brand); font-size: 18px; font-weight: 600; }
.drawer-body { padding: var(--space-5); overflow-y: auto; flex: 1; }
.drawer-footer {
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid var(--border-soft);
  display: flex;
  gap: var(--space-3);
  justify-content: flex-end;
  flex-shrink: 0;
}

/* ── BUILDER INTEGRATION ───────────────────────────────────── */
/* When builder is active, hide the main shell */
body.is-builder .studio-shell { display: none; }
#builder-shell {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--bld-shell-bg, #0d1117);
}
body.is-builder {
  --bld-shell-bg: var(--df-bg, #e7ebef);
  --bld-shell-surface: var(--df-surface, rgba(247,248,248,0.90));
  --bld-shell-surface-strong: var(--df-card-strong, #ffffff);
  --bld-shell-surface-soft: var(--df-surface-alt, rgba(237,241,244,0.98));
  --bld-shell-border: var(--df-border, rgba(31,41,51,0.12));
  --bld-shell-border-strong: var(--df-border-strong, rgba(31,41,51,0.18));
  --bld-shell-text: var(--df-text, #1d2731);
  --bld-shell-text-muted: var(--df-text-muted, #5c6a7b);
  --bld-shell-text-subtle: var(--df-text-subtle, #788595);
  --bld-shell-accent: var(--df-primary, #314a63);
  --bld-shell-accent-hover: var(--df-primary-hover, #263a4e);
  --bld-shell-accent-soft: var(--df-primary-soft, rgba(49,74,99,0.12));
  --bld-shell-accent-border: var(--df-primary-ring, rgba(49,74,99,0.18));
  --bld-shell-hover: var(--df-primary-light, rgba(49,74,99,0.10));
  --bld-shell-shadow: var(--df-shadow-sm, 0 12px 26px rgba(15,23,42,0.08));
  --bld-shell-shadow-strong: var(--df-shadow-md, 0 22px 48px rgba(15,23,42,0.12));
}
body.is-builder #builder-shell {
  display: grid;
  position: relative;
  inset: auto;
  min-height: 100vh;
  height: auto;
  grid-template-rows: 58px auto minmax(0, 1fr);
  overflow: visible;
}

/* ── AI CHAT PANEL ─────────────────────────────────────────── */
.bld-topbar {
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  height: 56px;
  padding: 0 16px;
  gap: 8px;
  flex-shrink: 0;
  z-index: 20;
  background: linear-gradient(180deg, var(--bld-shell-surface-strong) 0%, var(--bld-shell-surface-soft) 100%);
  border-bottom: 1px solid var(--bld-shell-border);
  box-shadow: 0 1px 0 rgba(15,23,42,0.04);
}

.bld-back {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px 6px 10px;
  border: 1px solid var(--bld-shell-border-strong);
  border-radius: 14px;
  background: var(--bld-shell-surface);
  color: var(--bld-shell-text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--dur-fast), color var(--dur-fast);
}

.bld-back:hover {
  background: var(--bld-shell-hover);
  color: var(--bld-shell-text);
}

.bld-back svg { opacity: 0.7; }

.bld-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 4px;
}

.bld-brand img {
  width: 22px;
  height: 22px;
  border-radius: 5px;
}

.bld-brand span {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--bld-shell-text);
}

.bld-project-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 5px 16px;
  border: 1px solid var(--bld-shell-border);
  border-radius: 12px;
  background: var(--bld-shell-surface-strong);
  cursor: pointer;
  transition: background var(--dur-fast), border-color var(--dur-fast), box-shadow var(--dur-fast);
}

.bld-project-btn:hover {
  background: var(--bld-shell-surface-strong);
  border-color: var(--bld-shell-border-strong);
  box-shadow: var(--bld-shell-shadow);
}

.bld-project-btn--missing {
  border-color: rgba(180, 116, 32, 0.32);
  background: #fff8ed;
}

.bld-project-btn--missing:hover {
  border-color: rgba(180, 116, 32, 0.5);
  background: #fff4df;
}

.bld-project-btn--missing .bld-project-btn__name {
  color: #7a4a12;
}

.bld-project-btn--missing .bld-project-btn__label {
  color: #9a641f;
}

.bld-project-btn__name {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
  color: var(--bld-shell-text);
}

.bld-project-btn__label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--bld-shell-text-subtle);
}

.bld-spacer { flex: 1; }

.bld-save-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--bld-shell-text-subtle);
}

.bld-save-status__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(100,116,139,0.55);
  transition: background 400ms;
}

.bld-presence {
  display: flex;
  align-items: center;
  min-width: 0;
  max-width: 260px;
  overflow: hidden;
}

.bld-presence .df-presence-banner {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
  min-width: 0;
}

.bld-presence .df-presence-banner__title,
.bld-presence .df-presence-banner__meta {
  display: none;
}

.bld-presence .df-presence-banner__body {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--bld-shell-text-muted);
}

.bld-topbar-sep {
  width: 1px;
  height: 24px;
  margin: 0 4px;
  background: var(--bld-shell-border);
}

.bld-action {
  padding: 7px 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--dur-fast);
}

.bld-action--ghost {
  background: transparent;
  border-color: transparent;
  color: var(--bld-shell-text-muted);
}

.bld-action--ghost:hover {
  color: var(--bld-shell-text);
  background: var(--bld-shell-hover);
}

.bld-action--utility {
  padding-inline: 10px;
  font-weight: 600;
  color: var(--bld-shell-text-subtle);
}

.bld-topbar-doc,
.bld-topbar-doc-sep {
  display: none;
}

body.is-builder.step6-active .bld-topbar-doc,
body.is-builder.step6-active .bld-topbar-doc-sep {
  display: inline-flex;
}

.bld-action--outline {
  background: var(--bld-shell-surface-strong);
  border-color: var(--bld-shell-border-strong);
  color: var(--bld-shell-text);
}

.bld-action--outline:hover {
  background: var(--bld-shell-hover);
  border-color: var(--bld-shell-accent-border);
  color: var(--bld-shell-accent);
}

.bld-action--primary {
  background: var(--bld-shell-accent);
  border-color: var(--bld-shell-accent);
  color: #fff;
  box-shadow: var(--bld-shell-shadow);
}

.bld-action--primary:hover {
  background: var(--bld-shell-accent-hover);
  border-color: var(--bld-shell-accent-hover);
  box-shadow: var(--bld-shell-shadow-strong);
}

.bld-action--danger {
  background: rgba(168,86,86,0.08);
  border-color: rgba(168,86,86,0.18);
  color: #8f4a4a;
}

.bld-action--danger:hover {
  background: rgba(168,86,86,0.12);
  border-color: rgba(168,86,86,0.24);
  color: #7d4141;
}

.bld-back:focus-visible,
.bld-action:focus-visible,
.bld-step:focus-visible,
.bld-project-btn:focus-visible {
  outline: 2px solid var(--bld-shell-accent);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(49,74,99,0.14);
}

.bld-stepbar {
  display: flex;
  align-items: stretch;
  width: 100%;
  min-width: 0;
  padding: 0 10px;
  gap: 10px;
  flex-shrink: 0;
  overflow-x: auto;
  scrollbar-width: none;
  background: linear-gradient(180deg, var(--bld-shell-surface-soft) 0%, var(--bld-shell-surface) 100%);
  border-bottom: 1px solid var(--bld-shell-border);
  box-shadow: inset 0 -1px 0 rgba(15,23,42,0.02);
}

.bld-stepbar::-webkit-scrollbar { display: none; }

.bld-step {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 0;
  min-width: 0;
  gap: 12px;
  padding: 14px 16px 15px;
  border: none;
  border-bottom: 3px solid transparent;
  border-radius: 10px 10px 0 0;
  background: transparent;
  color: var(--bld-shell-text-muted);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: normal;
  transition: all 140ms;
}

.bld-step:hover {
  color: var(--bld-shell-text);
  background: var(--bld-shell-hover);
}

.bld-step.is-complete {
  color: var(--df-success, #4f755b);
  border-bottom-color: rgba(79,117,91,0.22);
}

.bld-step.is-complete .bld-step__num {
  background: rgba(79,117,91,0.10);
  color: var(--df-success, #4f755b);
}

.bld-step.active {
  color: var(--bld-shell-text);
  background: rgba(49,74,99,0.04);
  border-bottom-color: var(--bld-shell-accent);
}

.bld-step.active .bld-step__num {
  background: var(--bld-shell-accent);
  color: #fff;
}

.bld-step.is-upcoming {
  opacity: 0.45;
  cursor: default;
}

.bld-step__num {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(49,74,99,0.10);
  border-radius: 50%;
  background: rgba(49,74,99,0.10);
  color: var(--bld-shell-text-muted);
  font-size: 13px;
  font-weight: 700;
  transition: all 140ms;
}

.bld-step__ico {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: 0.7;
}

.bld-step.active .bld-step__ico { opacity: 1; }

.bld-step__label {
  flex: 1;
  min-width: 0;
  line-height: 1.2;
  text-align: left;
}

.bld-step__label small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--bld-shell-text-subtle);
}

.bld-step.active .bld-step__label small { color: var(--bld-shell-accent); }

@media (max-width: 1440px) {
  .bld-stepbar {
    padding: 0 12px;
    gap: 8px;
  }

  .bld-step {
    flex: 0 0 220px;
  }
}

@media (max-width: 960px) {
  .bld-topbar {
    height: auto;
    padding: 10px 12px;
    flex-wrap: wrap;
    row-gap: 8px;
  }

  .bld-spacer,
  .bld-topbar-sep,
  #helpBtn,
  #undoBtn,
  #redoBtn,
  #revisionsBtn,
  #exportPdfBtn,
  #sendQuoteBtn,
  #printInvoiceBtn,
  #sendInvoiceBtn,
  #createInvoiceBtn {
    display: none !important;
  }

  .bld-brand { order: 1; }

  .bld-project-btn {
    order: 2;
    max-width: calc(100vw - 120px);
  }

  .bld-save-status {
    margin-left: auto;
    order: 3;
  }

  #saveBtn {
    margin-left: auto;
    order: 4;
  }

  .bld-stepbar { padding: 0 8px; }

  .bld-step { flex: 0 0 228px; }

  .bld-canvas-area {
    min-width: 0;
    margin: 8px;
  }

  body.is-field-mode .bld-topbar {
    padding: 6px 8px;
    row-gap: 6px;
  }

  body.is-field-mode .bld-brand,
  body.is-field-mode #saveStatusPill,
  body.is-field-mode #builderPresenceSlot {
    display: none !important;
  }

  body.is-field-mode .bld-back {
    padding: 4px 10px 4px 8px;
    font-size: 12px;
  }

  body.is-field-mode .bld-project-btn {
    order: 2;
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
    padding: 4px 10px;
  }

  body.is-field-mode .bld-project-btn__name {
    max-width: 100%;
    font-size: 12px;
  }

  body.is-field-mode .bld-project-btn__label { font-size: 9px; }

  body.is-field-mode #saveBtn,
  body.is-field-mode #fieldDeleteBtn {
    margin-left: 0;
    padding: 7px 10px;
    font-size: 12px;
  }

  body.is-field-mode .bld-stepbar {
    padding: 0 4px;
    gap: 4px;
  }

  body.is-field-mode .bld-step {
    flex: 0 0 108px;
    gap: 8px;
    padding: 10px 8px 11px;
  }

  body.is-field-mode .bld-step__num {
    width: 24px;
    height: 24px;
    font-size: 12px;
  }

  body.is-field-mode .bld-step__ico {
    width: 16px;
    height: 16px;
  }

  body.is-field-mode .bld-step__label { font-size: 12px; }

  body.is-field-mode .bld-step__label small { display: none; }

  body.is-field-mode .bld-canvas-area {
    margin: 4px !important;
    border-radius: 10px;
  }

  body.is-field-mode #floating-tools {
    bottom: 10px;
    left: 8px;
    right: 8px;
    width: auto;
    max-width: none;
    padding: 6px;
    gap: 6px;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    transform: none;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  body.is-field-mode #floating-tools::-webkit-scrollbar { display: none; }

  body.is-field-mode #floating-tools .bld-action {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 7px 9px;
    font-size: 11px;
    border-radius: 14px;
  }

  body.is-field-mode .bld-tool {
    min-height: 52px;
    padding: 8px 4px;
    font-size: 10px;
  }
}

.bld-workspace {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 200px;
  min-height: 0;
  width: 100%;
  min-width: 0;
  background: var(--bld-shell-bg);
  overflow: hidden;
}

body.step5-active .bld-workspace,
body.step6-active .bld-workspace {
  grid-template-columns: 1fr;
}

body.step6-active .bld-workspace {
  background: var(--bld-shell-surface-strong);
}

body.step5-active .bld-toolbox,
body.step6-active .bld-toolbox { display: none; }

body.is-field-mode .bld-workspace {
  grid-template-columns: minmax(0, 1fr) !important;
}

body.is-field-mode .bld-toolbox {
  display: none !important;
}

body.is-field-mode .bld-canvas-area {
  margin: 12px !important;
}

body.step6-active .bld-canvas-area {
  margin: 0;
  border-radius: 0;
  box-shadow: none;
  background: var(--bld-shell-surface-strong);
}

.bld-canvas-area {
  position: relative;
  margin: 12px 6px 12px 12px;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(180deg, var(--bld-shell-surface) 0%, var(--bld-shell-surface-soft) 100%);
  box-shadow: 0 0 0 1px var(--bld-shell-border), 0 16px 30px rgba(15,23,42,0.06);
  touch-action: none;
}

#counterCanvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: none;
}

#canvasHint {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 20;
  display: none;
  flex-direction: column;
  gap: 12px;
  width: min(380px, calc(100% - 40px));
  padding: 20px;
  border: 1px solid var(--bld-shell-border);
  border-radius: 18px;
  background: var(--bld-shell-surface-strong);
  box-shadow: var(--bld-shell-shadow-strong);
  backdrop-filter: blur(8px);
}

#canvasHint:not([hidden]) {
  display: flex;
}

#canvasHint.builder-canvas-hint--wide {
  top: 10px;
  right: 10px;
  bottom: 10px;
  left: 10px;
  width: auto;
  max-height: calc(100% - 20px);
  height: auto;
  padding: 12px;
  overflow: auto;
  border-radius: 10px;
}

#canvasHint.builder-canvas-hint--summary {
  top: 10px;
  right: 10px;
  bottom: 10px;
  left: 10px;
  width: auto;
  max-height: none;
  height: calc(100% - 20px);
  padding: 12px;
  overflow: hidden;
  border-radius: 10px;
}

#stepTitle {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--bld-shell-text);
}

#stepSubtitle {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--bld-shell-text-muted);
}

#designerSummary {
  padding: 8px 14px;
  border: 1px solid var(--bld-shell-accent-border);
  border-radius: 12px;
  background: var(--bld-shell-accent-soft);
  color: var(--bld-shell-accent);
  font-size: 13px;
  font-weight: 600;
}

#designerForm {
  display: grid;
  gap: 10px;
  margin-top: 2px;
}

#designerForm.builder-designer-form--stack {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

#designerForm.builder-designer-form--summary {
  display: grid;
  height: calc(100% - 32px);
  grid-template-rows: 1fr auto;
  min-height: 0;
}

.builder-fields-host--stack {
  min-height: 0;
  height: auto;
  flex: 1 0 auto;
  overflow: visible;
}

.builder-fields-host--summary {
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.builder-step-nav {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

.builder-step-edge-label {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  color: #60a5fa;
}

#floating-tools {
  position: absolute;
  bottom: 20px;
  left: 50%;
  z-index: 15;
  display: flex;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 18px;
  background: var(--bld-shell-surface);
  box-shadow: var(--bld-shell-shadow), 0 0 0 1px var(--bld-shell-border);
  backdrop-filter: blur(16px);
  transform: translateX(-50%);
}

#builderPresenceSlot {
  position: absolute;
  top: 14px;
  left: 50%;
  z-index: 24;
  width: min(560px, calc(100% - 32px));
  transform: translateX(-50%);
}

.bld-toolbox {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 12px 12px 12px 6px;
  padding: 12px;
  overflow-y: auto;
  border-left: 1px solid var(--bld-shell-border);
  border-radius: 14px;
  background: var(--bld-shell-surface-soft);
  box-shadow: 0 0 0 1px var(--bld-shell-border), 0 14px 28px rgba(15,23,42,0.06);
  scrollbar-width: thin;
  scrollbar-color: rgba(148,163,184,0.35) transparent;
}

.bld-tools-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.bld-tool {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 62px;
  padding: 10px 6px;
  border: 1px solid var(--bld-shell-border);
  border-radius: 12px;
  background: var(--bld-shell-surface-strong);
  color: var(--bld-shell-text-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: all var(--dur-fast);
}

.bld-tool:hover,
.bld-tool.active {
  background: var(--bld-shell-accent-soft);
  border-color: var(--bld-shell-accent-border);
  color: var(--bld-shell-accent);
}

.bld-tool__icon {
  font-size: 20px;
  line-height: 1;
}

.bld-tool__label {
  min-width: 0;
  line-height: 1.15;
}

#step1SqftWidget {
  display: none;
  flex-direction: column;
  gap: 3px;
  padding: 14px;
  border: 1px solid var(--bld-shell-accent-border);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(49,74,99,0.08) 0%, var(--bld-shell-surface) 100%);
  color: var(--bld-shell-text);
  text-align: center;
}

#step1SqftWidget:not([hidden]) {
  display: flex;
}

.sqft-widget-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bld-shell-text-subtle);
}

.sqft-widget-value {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--bld-shell-accent);
}

#step1SidebarPanel,
#step5SidebarPanel {
  display: none;
  flex-direction: column;
  gap: 12px;
}

#step1SidebarPanel:not([hidden]),
#step5SidebarPanel:not([hidden]) {
  display: flex;
}

#step4SinksPanel,
#step3Panel {
  display: none;
  padding: 14px;
  border: 1px solid var(--bld-shell-border);
  border-radius: 12px;
  background: var(--bld-shell-surface-strong);
}

#step4SinksPanel:not([hidden]),
#step3Panel:not([hidden]) {
  display: block;
}

#step3Panel h4 {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bld-shell-accent);
}

#step3Hint {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--bld-shell-text-muted);
}

#step3EdgeOptions { display: none; }

#step3EdgeName { color: var(--bld-shell-accent); }

#step3Buttons {
  display: grid;
  gap: 6px;
}

#status {
  margin-top: auto;
  padding: 10px 14px;
  border: 1px solid var(--bld-shell-border);
  border-radius: 12px;
  background: var(--bld-shell-surface-strong);
  color: var(--bld-shell-text-muted);
  font-size: 12px;
}

#prevBtn,
#nextBtn {
  padding: 8px 16px;
  border: 1px solid var(--bld-shell-border-strong);
  border-radius: 12px;
  background: var(--bld-shell-surface-strong);
  color: var(--bld-shell-text);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--dur-fast);
}

#nextBtn {
  background: var(--bld-shell-accent);
  border-color: var(--bld-shell-accent);
  color: #fff;
}

#prevBtn:hover {
  background: var(--bld-shell-hover);
  color: var(--bld-shell-text);
}

#nextBtn:hover {
  background: var(--bld-shell-accent-hover);
  border-color: var(--bld-shell-accent-hover);
}

#snackbar-root {
  position: fixed;
  bottom: 24px;
  left: 50%;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
  transform: translateX(-50%);
}

/* ── SIDEBAR MOBILE OVERLAY ────────────────────────────────── */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: var(--surface-overlay);
  z-index: 95;
  display: none;
}
body.sidebar-open .sidebar-backdrop { display: block; }
body.sidebar-open .studio-sidebar  { transform: translateX(0) !important; }

/* ── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 960px) {
  .studio-shell { grid-template-columns: 1fr; }
  .studio-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform var(--dur-slow) var(--ease-standard);
    border-right: 1px solid var(--border-medium);
  }
  .topbar-hamburger { display: flex; }
  .topbar-search { max-width: 280px; }
  .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
  .settings-layout { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .two-col, .three-col { grid-template-columns: 1fr; }
  .page-body { padding: var(--space-4); }
}

@media (max-width: 600px) {
  .metric-grid { grid-template-columns: 1fr; }
  .topbar-search { display: none; }
  .page-header { flex-direction: column; align-items: stretch; }
  .page-header__actions { justify-content: flex-end; }
  .data-table thead { display: none; }
  .data-table tbody td { display: block; padding: var(--space-1) var(--space-4); }
  .data-table tbody tr { padding: var(--space-2) 0; border-bottom: 1px solid var(--border-soft); }
  .data-table tbody td::before { content: attr(data-label) ": "; font-weight: 600; color: var(--text-secondary); font-size: 11px; }
  .drawer { max-width: 100%; }
}

/* ── UTILITY ───────────────────────────────────────────────── */
.hidden  { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.flex    { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2  { gap: var(--space-2); }
.gap-3  { gap: var(--space-3); }
.gap-4  { gap: var(--space-4); }
.gap-6  { gap: var(--space-6); }
.flex-1 { flex: 1; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.mt-4  { margin-top: var(--space-4); }
.mt-6  { margin-top: var(--space-6); }
.mb-4  { margin-bottom: var(--space-4); }
.mb-6  { margin-bottom: var(--space-6); }
.truncate { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.w-full { width: 100%; }
.bold  { font-weight: 700; }
.muted { color: var(--text-secondary); }

/* ── ANIMATIONS ────────────────────────────────────────────── */
@keyframes fadeIn   { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp  { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes spin     { to   { transform: rotate(360deg); } }
@keyframes pulse    { 0%,100% { opacity: 1; } 50% { opacity: .4; } }

.animate-spin  { animation: spin 1s linear infinite; }
.animate-pulse { animation: pulse 2s ease-in-out infinite; }

/* ── SCROLLBAR ─────────────────────────────────────────────── */
::-webkit-scrollbar       { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-medium); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

/* ── TRANSITIONS FOR THEME ─────────────────────────────────── */
body, .studio-sidebar, .studio-topbar, .card, .data-table-wrap,
.metric-card, .dialog, .drawer {
  transition: background-color var(--dur-mid) var(--ease-standard),
              border-color var(--dur-mid) var(--ease-standard),
              color var(--dur-mid) var(--ease-standard);
}

/* ── PRINT ─────────────────────────────────────────────────── */
@media print {
  .studio-sidebar, .studio-topbar, .fab, .snackbar-container { display: none !important; }
  .studio-shell { grid-template-columns: 1fr; }
  .page-body { padding: 0; }
}

/* ============================================================
   Home Page � Ported from Huerfana + DreamFlow M3 tokens
   ============================================================ */
.home-page-header { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; padding:20px 24px 16px; flex-wrap:wrap; }
.home-page-header__copy { font-size:13px; color:var(--text-secondary); margin-top:4px; }
.home-page-header__date { font-size:13px; font-weight:700; color:var(--text-tertiary); white-space:nowrap; }

/* Command bar */
.home-command-bar { display:grid; grid-template-columns:1fr auto; gap:20px; align-items:center; padding:20px 24px; border-bottom:1px solid var(--border-soft); flex-wrap:wrap; }
.home-command-bar__eyebrow { font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.09em; color:var(--text-tertiary); display:block; margin-bottom:4px; }
.home-command-bar__title { font-size:18px; font-weight:800; color:var(--text-primary); margin:0 0 6px; }
.home-command-bar__text { font-size:13px; color:var(--text-secondary); margin:0; max-width:520px; }
.home-command-actions { display:flex; gap:8px; flex-wrap:wrap; }
.home-command-action { display:flex; flex-direction:column; gap:2px; padding:10px 16px; border-radius:var(--radius-lg); border:1px solid var(--border-medium); background:var(--surface-card); cursor:pointer; text-align:left; min-width:140px; }
.home-command-action strong { font-size:13px; color:var(--text-primary); }
.home-command-action span { font-size:11px; color:var(--text-secondary); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:160px; }
.home-command-action--primary { background:var(--studio-blue); border-color:var(--studio-blue); }
.home-command-action--primary strong, .home-command-action--primary span { color:#fff; }
.home-command-action--contrast { background:var(--surface-elevated); }
.home-command-action--accent { background:rgba(168,85,247,.12); border-color:rgba(168,85,247,.3); }
.home-command-action--accent strong { color:#7c3aed; }
.home-command-action:hover { opacity:.88; transform:translateY(-1px); transition:all 120ms; }

/* Layout grid */
.home-command-layout { display:grid; grid-template-columns:1fr 1fr; gap:16px; padding:20px 24px; }

/* Panel / focus card (shared base) */
.panel { background:var(--surface-card); border:1px solid var(--border-soft); border-radius:var(--radius-xl); padding:20px; }
.section-title { font-size:15px; font-weight:800; color:var(--text-primary); }
.section-title--flush { margin:0; }
.home-focus-card__head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:10px; }
.home-focus-card__eyebrow { font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:.1em; color:var(--text-tertiary); display:block; margin-bottom:2px; }
.home-focus-card__title { margin:0; }
.home-focus-card__badge { display:inline-flex; align-items:center; height:22px; padding:0 10px; border-radius:999px; background:var(--surface-bg); border:1px solid var(--border-soft); font-size:11px; font-weight:800; color:var(--text-secondary); white-space:nowrap; }
.home-focus-card__badge--neutral { background:var(--surface-bg); border-color:var(--border-soft); color:var(--text-secondary); }
.home-focus-card__badge--live { background:rgba(49,74,99,.10); border-color:rgba(49,74,99,.16); color:var(--studio-blue); }
.home-focus-card__badge--warning { background:rgba(168,121,57,.12); border-color:rgba(168,121,57,.18); color:var(--studio-orange); }
.home-focus-card__badge--error { background:rgba(168,86,86,.10); border-color:rgba(168,86,86,.16); color:var(--studio-red); }
.home-focus-card__copy { font-size:12px; color:var(--text-secondary); margin:0 0 14px; line-height:1.5; }
.home-empty-note { font-size:13px; color:var(--text-secondary); }
.home-accordion { display:block; }
.home-accordion__summary { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; cursor:pointer; list-style:none; }
.home-accordion__summary::-webkit-details-marker { display:none; }
.home-accordion__summary-main { display:grid; gap:4px; min-width:0; }
.home-accordion__summary-side { display:grid; gap:8px; justify-items:end; align-content:start; flex-shrink:0; }
.home-accordion__summary-copy { font-size:12px; color:var(--text-secondary); line-height:1.5; max-width:520px; }
.home-accordion__content { display:grid; gap:14px; }
.home-accordion[open] .home-accordion__content { margin-top:14px; padding-top:14px; border-top:1px solid var(--border-soft); }
.home-accordion__chevron {
  width:18px;
  height:18px;
  border-radius:999px;
  border:1px solid var(--border-soft);
  background:var(--surface-bg);
  position:relative;
  transition:transform 140ms ease;
}
.home-accordion__chevron::before {
  content:"";
  position:absolute;
  inset:0;
  width:6px;
  height:6px;
  margin:auto;
  border-right:1.75px solid var(--text-secondary);
  border-bottom:1.75px solid var(--text-secondary);
  transform:translateY(-1px) rotate(45deg);
}
.home-accordion[open] .home-accordion__chevron { transform:rotate(180deg); }

/* Money card */
.home-money-card__amount { font-size:32px; font-weight:900; color:var(--studio-green); letter-spacing:-0.03em; margin:4px 0 10px; }
.home-money-card__amount--summary { font-size:24px; margin:0; }
.home-money-list { display:grid; gap:8px; }
.home-money-item { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; padding:10px 12px; border-radius:var(--radius-md); background:var(--surface-bg); border:1px solid var(--border-soft); }
.home-money-item__main { flex:1; min-width:0; }
.home-money-item__main strong { display:block; font-size:13px; color:var(--text-primary); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.home-money-item__main span { font-size:11px; color:var(--text-tertiary); }
.home-money-item__side { display:flex; flex-direction:column; align-items:flex-end; gap:6px; flex-shrink:0; }
.home-money-item__side strong { font-size:15px; font-weight:800; color:var(--text-primary); }
.home-money-item__actions { display:flex; gap:6px; }

/* Today panel */
.home-today-panel__controls { display:flex; align-items:center; gap:6px; }
.home-work-list { display:grid; gap:8px; }
.home-work-item { display:flex; gap:12px; padding:10px 12px; border-radius:var(--radius-md); background:var(--surface-bg); border:1px solid var(--border-soft); }
.home-work-item__time { font-size:11px; font-weight:800; color:var(--studio-blue); min-width:50px; padding-top:2px; }
.home-work-item__body { flex:1; min-width:0; }
.home-work-item__head { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:4px; }
.home-work-item__head strong { font-size:13px; color:var(--text-primary); }
.home-work-item__type { font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:.07em; color:var(--text-tertiary); }
.home-work-item__meta { font-size:12px; color:var(--text-secondary); margin:4px 0; }
.home-work-item__actions { display:flex; gap:6px; margin-top:8px; }
.home-work-empty { display:flex; flex-direction:column; gap:4px; padding:16px; text-align:center; color:var(--text-secondary); font-size:13px; }

/* AI panel */
.home-ai-compose { display:grid; gap:8px; margin-bottom:10px; }
.home-ai-input { width:100%; padding:10px 12px; border:1px solid var(--border-medium); border-radius:var(--radius-md); background:var(--surface-bg); color:var(--text-primary); font:inherit; font-size:13px; min-height:80px; resize:vertical; }
.home-ai-send { width:100%; }
.home-ai-quick-actions { display:flex; gap:6px; flex-wrap:wrap; }

/* Slab calculator */
.home-calc-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-bottom:14px; }
.home-calc-field { display:flex; flex-direction:column; gap:4px; }
.home-calc-field span { font-size:11px; font-weight:700; color:var(--text-secondary); text-transform:uppercase; letter-spacing:.05em; }
.home-calc-field input { padding:8px 10px; border:1px solid var(--border-medium); border-radius:var(--radius-md); background:var(--surface-bg); color:var(--text-primary); font:inherit; font-size:13px; }
.home-calc-results { display:grid; grid-template-columns:1fr 1fr 1fr; gap:8px; margin-bottom:10px; }
.home-calc-result { padding:10px 12px; border-radius:var(--radius-md); background:var(--surface-bg); border:1px solid var(--border-soft); display:flex; flex-direction:column; gap:2px; }
.home-calc-result span { font-size:11px; color:var(--text-secondary); }
.home-calc-result strong { font-size:14px; font-weight:800; color:var(--text-primary); }
.home-calc-result--primary { background:rgba(30,142,62,.08); border-color:rgba(30,142,62,.2); }
.home-calc-result--primary strong { color:var(--studio-green); }
.home-calc-note { font-size:12px; color:var(--text-secondary); display:flex; flex-direction:column; gap:2px; }
.home-calc-note strong { color:var(--text-primary); }

/* Inline action buttons (used throughout home) */
.home-inline-action { display:inline-flex; align-items:center; height:28px; padding:0 12px; border-radius:999px; border:1px solid var(--border-medium); background:var(--surface-bg); color:var(--text-secondary); font-size:12px; font-weight:700; cursor:pointer; text-decoration:none; transition:all 100ms; }
.home-inline-action:hover { opacity:.8; }
.home-inline-action--primary { background:var(--studio-blue); border-color:var(--studio-blue); color:#fff; }
.home-inline-action--neutral { background:var(--surface-elevated); }
.home-inline-action--success { background:rgba(30,142,62,.12); border-color:rgba(30,142,62,.3); color:var(--studio-green); }
.home-inline-action--warning { background:rgba(245,158,11,.12); border-color:rgba(245,158,11,.3); color:#b45309; }
.home-inline-action--google { background:rgba(37,99,235,.1); border-color:rgba(37,99,235,.3); color:#1d4ed8; }
.home-inline-action--cash { background:rgba(30,142,62,.12); border-color:rgba(30,142,62,.3); color:var(--studio-green); }

@media (max-width: 640px) {
  .home-accordion__summary { flex-direction:column; align-items:stretch; }
  .home-accordion__summary-side { justify-items:start; }
  .home-today-panel__controls { flex-wrap:wrap; }
}

/* Price Book */
.pricebook-shell { display:grid; gap:22px; }
.pricebook-hero { display:grid; grid-template-columns:minmax(0,1.35fr) minmax(280px,.9fr); gap:22px; overflow:hidden; }
.pricebook-hero__main,
.pricebook-hero__metrics,
.pricebook-sidebar,
.pricebook-main,
.pricebook-groups,
.pricebook-form-card,
.pricebook-editor-block { display:grid; gap:16px; }
.pricebook-kicker {
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:11px;
  font-weight:800;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--text-tertiary);
}
.pricebook-page-head {
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
}
.pricebook-page-head .page-title { margin:0 0 8px; }
.pricebook-hero__copy,
.pricebook-sidebar__head p,
.pricebook-form-card__head p {
  color:var(--text-secondary);
  line-height:1.6;
  max-width:760px;
}
.pricebook-chip-row { display:flex; flex-wrap:wrap; gap:10px; }
.pricebook-chip,
.pricebook-status-pill,
.pricebook-unit-pill {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:30px;
  padding:0 12px;
  border-radius:999px;
  border:1px solid var(--border-medium);
  background:var(--surface-bg);
  color:var(--text-primary);
  font-size:12px;
  font-weight:700;
  letter-spacing:.01em;
}
.pricebook-chip--accent {
  background:rgba(49,74,99,.10);
  border-color:rgba(49,74,99,.14);
  color:var(--studio-blue);
}
.pricebook-chip--success,
.pricebook-status-pill.is-active {
  background:rgba(79,117,91,.10);
  border-color:rgba(79,117,91,.14);
  color:var(--studio-green);
}
.pricebook-chip--neutral,
.pricebook-unit-pill {
  background:var(--surface-bg);
  border-color:var(--border-soft);
  color:var(--text-secondary);
}
.pricebook-chip--stacked {
  margin-top: 6px;
  width: max-content;
}
.pricebook-status-pill.is-inactive {
  background:rgba(168,86,86,.08);
  border-color:rgba(168,86,86,.16);
  color:var(--studio-red);
}
.pricebook-metric-card,
.pricebook-sidebar-card,
.pricebook-editor-block,
.pricebook-empty-state {
  padding:20px 22px;
  border-radius:14px;
  border:1px solid var(--border-soft);
  background:var(--surface-card);
  box-shadow:var(--shadow-xs);
}
.pricebook-metric-card span,
.pricebook-editor-signal small,
.pricebook-sidebar-card small { color:var(--text-secondary); }
.pricebook-metric-card {
  display:grid;
  gap:10px;
  align-content:start;
  min-height:124px;
}
.pricebook-metric-card strong {
  font-size:28px;
  line-height:1;
  letter-spacing:-.04em;
}
.pricebook-metric-card small {
  color:var(--text-secondary);
  line-height:1.55;
}
.pricebook-layout {
  display:grid;
  grid-template-columns:minmax(250px,280px) minmax(0,1fr);
  gap:22px;
  align-items:start;
}
.pricebook-sidebar { position:sticky; top:24px; }
.pricebook-sidebar__head { display:grid; gap:8px; }
.pricebook-category-list { display:grid; gap:10px; }
.pricebook-category-pill {
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:14px 16px;
  border-radius:18px;
  border:1px solid var(--border-medium);
  background:var(--surface-card);
  color:var(--text-primary);
  cursor:pointer;
  text-align:left;
  font:inherit;
  transition:border-color var(--dur-fast) var(--ease-standard), background var(--dur-fast) var(--ease-standard), box-shadow var(--dur-fast) var(--ease-standard);
}
.pricebook-category-pill span { font-weight:700; }
.pricebook-category-pill strong {
  min-width:34px;
  text-align:center;
  font-size:13px;
  color:var(--text-secondary);
}
.pricebook-category-pill:hover,
.pricebook-category-pill.is-active {
  border-color:rgba(49,74,99,.18);
  background:var(--surface-selected);
  box-shadow:var(--shadow-xs);
}
.pricebook-category-pill.is-active strong { color:var(--studio-blue); }
.pricebook-search-block { display:grid; gap:8px; }
.pricebook-search-block label {
  font-size:13px;
  font-weight:700;
  color:var(--text-secondary);
}
.pricebook-search-block input {
  width:100%;
  padding:10px 12px;
  border:1px solid var(--border-medium);
  border-radius:12px;
  background:var(--surface-white);
  color:var(--text-primary);
}
.pricebook-search-block input:focus {
  outline:none;
  border-color:var(--studio-blue);
  box-shadow:0 0 0 3px rgba(49,74,99,.12);
}
.pricebook-sidebar-card strong {
  font-size:20px;
  letter-spacing:-.02em;
}
.pricebook-supplier-card {
  margin:0;
  padding:18px 20px;
  border-radius:20px;
  transition:border-color var(--dur-fast) var(--ease-standard), box-shadow var(--dur-fast) var(--ease-standard), background var(--dur-fast) var(--ease-standard);
}
.pricebook-supplier-card + .pricebook-supplier-card { margin-top:14px; }
.pricebook-supplier-card[open] {
  border-color:rgba(49,74,99,.18);
  box-shadow:var(--shadow-sm);
}
.pricebook-supplier-card > summary { list-style:none; }
.pricebook-supplier-card > summary::-webkit-details-marker { display:none; }
.pricebook-supplier-card__summary {
  cursor:pointer;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
}
.pricebook-supplier-card__title { display:grid; gap:6px; }
.pricebook-supplier-card__title strong {
  font-size:20px;
  letter-spacing:-.03em;
}
.pricebook-supplier-card__meta {
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:8px;
}
.pricebook-supplier-card__toggle {
  width:36px;
  height:36px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
  border-radius:999px;
  border:1px solid var(--border-soft);
  background:var(--surface-bg);
  color:var(--text-secondary);
  transition:transform var(--dur-fast) var(--ease-standard), border-color var(--dur-fast) var(--ease-standard), background var(--dur-fast) var(--ease-standard), color var(--dur-fast) var(--ease-standard);
}
.pricebook-supplier-card__summary:hover .pricebook-supplier-card__toggle {
  border-color:rgba(49,74,99,.16);
  color:var(--text-primary);
}
.pricebook-supplier-card[open] .pricebook-supplier-card__toggle {
  transform:rotate(180deg);
  border-color:rgba(49,74,99,.18);
  background:var(--surface-selected);
  color:var(--studio-blue);
}
.pricebook-table-wrap {
  margin-top:16px;
  overflow:auto;
  border-radius:18px;
  border:1px solid var(--border-soft);
  background:var(--surface-card);
}
.pricebook-table-wrap .data-table thead th {
  position:sticky;
  top:0;
  z-index:1;
  background:var(--surface-card);
}
.pricebook-item-cell { display:grid; gap:4px; }
.pricebook-item-cell strong {
  font-size:14px;
  color:var(--text-primary);
  line-height:1.35;
}
.pricebook-item-cell span { font-size:12px; color:var(--text-secondary); }
.pricebook-money-cell,
.pricebook-markup-cell {
  white-space:nowrap;
  font-variant-numeric:tabular-nums;
}
.pricebook-alpha-row td {
  background:var(--surface-hover);
  border-bottom-color:var(--border-soft);
  padding-top:12px;
  padding-bottom:12px;
}
.pricebook-alpha-row span {
  font-size:12px;
  font-weight:800;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--text-secondary);
}
.pricebook-actions-cell { white-space:nowrap; }
.pricebook-table-action {
  min-width:72px;
  padding:6px 10px;
  font-size:12px;
}
.pricebook-form-host { margin:0; }
.pricebook-form-host[hidden],
.suppliers-form-slot[hidden] {
  display: none !important;
}
.pricebook-form-card__head {
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  margin-bottom:16px;
}
.pricebook-form-card__head .section-title { margin:0 0 8px; }
.pricebook-editor-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
}
.pricebook-editor-notes { margin-top:16px; }
.pricebook-editor-footer {
  margin-top:18px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
}
.pricebook-editor-signal { display:grid; gap:6px; }
.pricebook-editor-signal strong {
  font-size:18px;
  letter-spacing:-.02em;
}
.pricebook-editor-actions {
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:10px;
}
.surface-note-card {
  display:grid;
  gap:4px;
  margin-bottom:14px;
  padding:12px 14px;
  border:1px solid var(--border-soft);
  border-radius:var(--radius-md);
  background:var(--surface-sidebar);
}
.surface-note-card__title {
  display:block;
  font-size:14px;
  font-weight:700;
  color:var(--text-primary);
}
.surface-note-card__copy {
  font-size:13px;
  line-height:1.5;
  color:var(--text-secondary);
}
.pricebook-delete-btn {
  background:rgba(168,86,86,.08);
  border-color:rgba(168,86,86,.16);
  color:var(--studio-red);
}
.pricebook-empty-state { text-align:center; }
.pricebook-empty-state strong {
  display:block;
  margin-bottom:8px;
  font-size:20px;
  letter-spacing:-.02em;
}
.pricebook-empty-state span {
  color:var(--text-secondary);
  line-height:1.6;
}
[data-theme="dark"] .pricebook-chip,
[data-theme="dark"] .pricebook-status-pill,
[data-theme="dark"] .pricebook-unit-pill,
[data-theme="dark"] .pricebook-category-pill,
[data-theme="dark"] .pricebook-search-block input,
[data-theme="dark"] .pricebook-table-wrap {
  background:#202124;
  border-color:var(--border-soft);
}
[data-theme="dark"] .pricebook-category-pill:hover,
[data-theme="dark"] .pricebook-category-pill.is-active {
  background:rgba(138,180,248,.14);
  border-color:rgba(138,180,248,.24);
}
@media (max-width: 1200px) {
  .pricebook-hero,
  .pricebook-layout,
  .pricebook-editor-grid { grid-template-columns:1fr; }
  .pricebook-sidebar { position:static; }
}
@media (max-width: 860px) {
  .pricebook-page-head,
  .pricebook-form-card__head,
  .pricebook-editor-footer,
  .pricebook-supplier-card__summary {
    flex-direction:column;
    align-items:flex-start;
  }
  .pricebook-supplier-card__toggle { align-self:flex-end; }
  .pricebook-editor-actions { justify-content:flex-start; }
}
@media (max-width: 680px) {
  .pricebook-category-pill,
  .pricebook-editor-actions .btn,
  .pricebook-page-head .btn { width:100%; }
  .pricebook-page-head { width:100%; }
}

/* Activity mini */
.home-activity-mini__list { display:grid; gap:8px; }
.home-activity-mini__item { display:flex; justify-content:space-between; gap:12px; padding:8px 0; border-bottom:1px solid var(--border-soft); }
.home-activity-mini__item strong { font-size:13px; color:var(--text-primary); }
.home-activity-mini__item span { font-size:11px; color:var(--text-tertiary); }
.home-empty-copy { font-size:13px; color:var(--text-tertiary); padding:12px 0; }
.ui-loading-state {
  padding:20px 0;
  color:var(--text-secondary);
}
.ui-loading-state--center {
  text-align:center;
}
.cal-section-label {
  display:block;
  margin-bottom:8px;
  color:var(--text-secondary);
}

/* Mobile sticky bar */
.home-mobile-sticky-actions { display:none; }

/* Calendar rows */
.calendar-row { padding:12px 0; border-bottom:1px solid var(--border-soft); }
.calendar-row__head { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:4px; }
.calendar-row__head strong { font-size:14px; color:var(--text-primary); }
.calendar-row__source { display:inline-flex; align-items:center; justify-content:center; min-height:24px; padding:0 10px; border-radius:999px; font-size:11px; font-weight:800; letter-spacing:.05em; text-transform:uppercase; }
.calendar-row__source[data-source="google"] { background:rgba(49,74,99,.10); color:var(--studio-blue); }
.calendar-row__source[data-source="dreamflow"] { background:rgba(79,117,91,.12); color:var(--studio-green); }
.calendar-row__when { font-size:12px; color:var(--text-secondary); margin-bottom:4px; }
.calendar-row__context { font-size:12px; color:var(--text-tertiary); margin-bottom:8px; }
.calendar-row__actions { display:flex; gap:6px; flex-wrap:wrap; }

.home-tax-panel__head { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:10px; flex-wrap:wrap; }
.home-tax-panel__meta { font-size:12px; color:var(--text-secondary); font-weight:600; margin-top:4px; }
.home-tax-panel__stats { display:flex; gap:12px; flex-wrap:wrap; }
.home-tax-panel__stat { padding:10px 12px; border:1px solid var(--border-soft); border-radius:var(--radius-sm); min-width:160px; background:var(--surface-card); }
.home-tax-panel__stat-label { font-size:11px; color:var(--text-secondary); }
.home-tax-panel__stat-value { font-size:14px; font-weight:700; color:var(--text-primary); margin-top:2px; }
.home-tax-panel__stat--due { border-color:rgba(168,86,86,.24); background:rgba(168,86,86,.04); }
.home-tax-panel__stat--due .home-tax-panel__stat-value { color:var(--studio-red); }
.home-tax-panel__codes { margin-top:12px; border:1px solid var(--border-soft); border-radius:var(--radius-sm); background:var(--surface-card); overflow:hidden; }
.home-tax-panel__codes-title { padding:9px 12px; font-size:11px; font-weight:800; color:var(--text-secondary); text-transform:uppercase; border-bottom:1px solid var(--border-soft); }
.home-tax-panel__code-row { display:grid; grid-template-columns:minmax(120px,1fr) auto minmax(220px,1.4fr); gap:10px; align-items:center; padding:9px 12px; font-size:12px; color:var(--text-primary); }
.home-tax-panel__code-row + .home-tax-panel__code-row { border-top:1px solid var(--border-soft); }
.home-tax-panel__code-row strong { text-align:right; color:var(--studio-red); }
.home-tax-panel__code-row small { color:var(--text-secondary); text-align:right; }
.home-tax-panel__note { margin-top:12px; font-size:12px; line-height:1.5; color:var(--text-secondary); }
@media (max-width: 720px) {
  .home-tax-panel__code-row { grid-template-columns:1fr auto; }
  .home-tax-panel__code-row small { grid-column:1 / -1; text-align:left; }
}

.activity-item__title { font-weight:700; color:var(--text-primary); }
.activity-item__copy { font-size:13px; color:var(--text-secondary); margin-top:4px; }
.activity-item__note { font-size:13px; color:var(--text-secondary); margin-top:6px; }
.activity-item__actions { display:flex; gap:6px; flex-wrap:wrap; margin-top:10px; }
.activity-item--danger { border-left:3px solid var(--studio-red); background:rgba(168,86,86,.06); }
.activity-item--primary { border-left:3px solid var(--studio-blue); }
.activity-item--warning { border-left:3px solid var(--studio-orange); background:rgba(168,121,57,.07); }
.activity-item--finance { border-left:3px solid var(--text-secondary); }

/* wb2 list (project picker) */
.wb2-list { display:grid; gap:6px; }
.wb2-list-item { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 14px; border-radius:var(--radius-md); border:1px solid var(--border-soft); background:var(--surface-card); cursor:pointer; text-align:left; width:100%; }
.wb2-list-item:hover { background:var(--surface-elevated); }
.wb2-list-item__title { font-size:14px; font-weight:700; color:var(--text-primary); }
.wb2-list-item__meta { font-size:12px; color:var(--text-secondary); margin-top:2px; }

/* wb2 builder pricing + step 6 shared classes */
.wb2-btn {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:var(--space-2);
  min-height:38px;
  padding:0 var(--space-4);
  border-radius:var(--radius-sm);
  font:inherit;
  font-size:14px;
  font-weight:700;
  cursor:pointer;
  border:1px solid transparent;
  transition:all 120ms;
  text-decoration:none;
}
.wb2-btn.primary {
  background:var(--studio-blue);
  border-color:var(--studio-blue);
  color:#fff;
}
.wb2-btn.primary:hover {
  background:var(--studio-blue-dark);
  border-color:var(--studio-blue-dark);
  box-shadow:var(--shadow-sm);
}
.wb2-btn.secondary {
  background:var(--surface-white);
  color:var(--text-primary);
  border-color:var(--border-medium);
}
.wb2-btn.secondary:hover {
  background:var(--surface-selected);
  border-color:rgba(49,74,99,.18);
  box-shadow:var(--shadow-xs);
}
.wb2-btn:disabled {
  opacity:.55;
  cursor:not-allowed;
  box-shadow:none;
}
.wb2-icon-svg {
  display:block;
  flex-shrink:0;
  color:inherit;
}

.wb2-input,
.wb2-select,
.wb2-textarea {
  width:100%;
  font:inherit;
  color:var(--text-primary);
}

.wb2-field-control {
  width:100%;
  padding:10px 12px;
  border:1px solid var(--border-medium);
  border-radius:var(--radius-md);
  background:var(--surface-elevated);
  color:var(--text-primary);
  font:inherit;
}
.wb2-field-control--surface { background:var(--surface-card); }
.wb2-field-control--compact { padding:6px; }

.wb2-line-rate {
  display:flex;
  align-items:center;
  gap:6px;
}
.wb2-line-rate--legacy { justify-content:flex-start; }
.wb2-line-rate--inline { justify-content:flex-end; }
.wb2-line-rate__at {
  font-style:italic;
  color:var(--text-primary);
}
.wb2-line-rate__suffix {
  font-size:12px;
  color:var(--text-secondary);
}
.wb2-line-rate__input {
  border:1px solid var(--border-medium);
  border-radius:var(--radius-md);
  background:var(--surface-elevated);
  color:var(--text-primary);
}
.wb2-line-rate__input--inline {
  width:96px;
  padding:10px 12px;
  text-align:right;
}
.wb2-line-rate__input--legacy {
  width:90px;
  padding:0 2px;
  border:none;
  border-bottom:1px solid var(--border-medium);
  border-radius:0;
  background:transparent;
  color:inherit;
  font:inherit;
  font-style:italic;
  outline:none;
  text-align:left;
}
.wb2-line-rate.is-warning .wb2-line-rate__at,
.wb2-line-rate.is-warning .wb2-line-rate__input { color:var(--studio-orange); }

.df-modal-actions--start {
  justify-content:flex-start;
  padding-top:0;
}

.wb-floating-modal {
  z-index:2550;
}

.wb-floating-modal__card {
  width:min(420px, 100%);
  border-radius:18px;
  border:1px solid var(--df-border, rgba(255,255,255,0.12));
  background:var(--df-card, rgba(18,24,38,0.96));
  box-shadow:var(--df-shadow-lg, 0 28px 80px rgba(0,0,0,0.45));
  color:var(--df-text, #eef4ff);
  overflow:hidden;
}

.wb-floating-modal__card--wide {
  width:min(560px, 100%);
}

.wb-floating-modal__head {
  display:grid;
  gap:4px;
  padding:18px 22px;
  border-bottom:1px solid var(--df-border, rgba(255,255,255,0.12));
  background:linear-gradient(180deg, var(--df-surface, rgba(18,24,38,0.98)) 0%, var(--df-surface-alt, rgba(17,27,42,0.98)) 100%);
}

.wb-floating-modal__title {
  margin:0;
  font-size:18px;
  font-weight:800;
  color:var(--df-text, #eef4ff);
}

.wb-floating-modal__copy {
  margin:0;
  font-size:13px;
  line-height:1.45;
  color:var(--df-text-muted, #94a3b8);
}

.wb-floating-modal__form {
  display:grid;
  gap:14px;
  padding:20px 22px 22px;
}

.wb-floating-modal__form--grid {
  grid-template-columns:repeat(2, minmax(0, 1fr));
}

.wb-floating-modal__field {
  display:grid;
  gap:6px;
}

.wb-floating-modal__field--full {
  grid-column:1 / -1;
}

.wb-floating-modal__label {
  font-size:12px;
  font-weight:700;
  color:var(--df-text-muted, #94a3b8);
}

.wb-floating-modal__actions {
  display:flex;
  justify-content:flex-end;
  gap:10px;
  padding-top:4px;
}

.wb-floating-modal__actions--full {
  grid-column:1 / -1;
}

.wb-workbench-error {
  padding:18px;
  border:1px solid var(--df-error-border, rgba(239,68,68,0.26));
  border-radius:14px;
  background:var(--df-error-surface, rgba(127,29,29,0.16));
  color:var(--df-error, #fca5a5);
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.04);
}

.wb-sink-gallery-card {
  width:100%;
  border:1px solid var(--df-border);
  border-radius:14px;
  background:var(--df-card);
  padding:10px;
  cursor:pointer;
  text-align:left;
  transition:border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.wb-sink-gallery-card:hover {
  border-color:var(--df-primary);
  box-shadow:var(--df-shadow-md);
  transform:translateY(-1px);
}

.wb-sink-gallery-card__preview {
  display:flex;
  align-items:center;
  justify-content:center;
  height:120px;
  overflow:hidden;
  border:1px solid var(--df-border);
  border-radius:10px;
  background:var(--df-surface-alt);
}

.wb-sink-gallery-card__image {
  max-width:100%;
  max-height:100%;
  object-fit:contain;
}

.wb-sink-gallery-card__empty {
  color:var(--df-text-muted);
}

.wb-sink-gallery-card__name {
  margin-top:8px;
  font-size:12px;
  font-weight:700;
  color:var(--df-text);
}

.wb-help-dialog {
  min-width:420px;
  padding:14px;
  border:1px solid var(--border-medium);
  border-radius:18px;
  background:var(--surface-elevated);
  color:var(--text-primary);
  box-shadow:var(--shadow-lg);
}

.wb-help-dialog::backdrop {
  background:rgba(15,23,42,0.42);
}

.wb-help-dialog__title {
  margin:0 0 8px;
  font-size:18px;
  font-weight:700;
}

.wb-help-dialog__copy {
  margin:0 0 12px;
  color:var(--text-secondary);
  line-height:1.4;
}

.wb-help-dialog__actions {
  display:flex;
  justify-content:flex-end;
}

.wb-misc-modal__card {
  width:min(480px, 95vw);
}

.wb-misc-modal__grid--triple {
  grid-template-columns:repeat(3, minmax(0, 1fr));
}

.wb-misc-modal__toggle {
  display:flex;
  align-items:center;
  gap:10px;
}

.wb-misc-modal__checkbox {
  width:18px;
  height:18px;
  accent-color:var(--studio-blue);
  cursor:pointer;
}

.wb-misc-modal__toggle label {
  font-size:13px;
  font-weight:600;
  color:var(--text-primary);
  cursor:pointer;
}

.wb-floating-modal__card--slab-size {
  width:min(460px, 100%);
}

.step5-phone-upload-overlay {
  z-index:99998;
}

.step5-phone-upload-card {
  width:min(520px, 100%);
  border-radius:24px;
  border:1px solid rgba(148,163,184,0.22);
  background:linear-gradient(180deg,rgba(255,255,255,0.98),rgba(241,245,249,0.98));
  box-shadow:0 28px 80px rgba(15,23,42,0.28);
  overflow:hidden;
  color:#0f172a;
}

.step5-phone-upload-card__head {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding:20px 22px 16px;
  border-bottom:1px solid rgba(148,163,184,0.18);
  background:linear-gradient(135deg,rgba(220,252,231,0.92),rgba(240,249,255,0.96));
}

.step5-phone-upload-card__eyebrow,
.step5-phone-upload-card__meta-label {
  font-size:11px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.step5-phone-upload-card__eyebrow {
  color:#166534;
}

.step5-phone-upload-card__title {
  margin-top:6px;
  font-size:28px;
  font-weight:800;
  letter-spacing:-0.03em;
  line-height:1;
}

.step5-phone-upload-card__copy {
  margin-top:8px;
  font-size:14px;
  line-height:1.6;
  color:#475569;
}

.step5-phone-upload-card__close {
  width:38px;
  height:38px;
  border:none;
  border-radius:12px;
  background:rgba(15,23,42,0.08);
  color:#0f172a;
  cursor:pointer;
  font-size:18px;
  font-weight:800;
}

.step5-phone-upload-card__body {
  display:grid;
  gap:16px;
  padding:22px;
}

.step5-phone-upload-card__grid {
  display:grid;
  grid-template-columns:240px 1fr;
  gap:16px;
  align-items:start;
}

.step5-phone-upload-card__qr {
  display:grid;
  place-items:center;
  min-height:268px;
  padding:14px;
  border:1px solid rgba(148,163,184,0.18);
  border-radius:20px;
  background:#fff;
}

.step5-phone-upload-card__qr img {
  width:220px;
  height:220px;
  display:block;
}

.step5-phone-upload-card__meta {
  display:grid;
  gap:12px;
}

.step5-phone-upload-card__meta-card {
  padding:14px;
  border:1px solid rgba(148,163,184,0.18);
  border-radius:18px;
  background:#fff;
}

.step5-phone-upload-card__meta-label {
  color:#64748b;
}

.step5-phone-upload-card__meta-value {
  margin-top:6px;
  font-size:17px;
  font-weight:800;
}

.step5-phone-upload-card__link {
  width:100%;
  height:42px;
  margin-top:8px;
  padding:0 12px;
  border:1px solid rgba(148,163,184,0.22);
  border-radius:12px;
  background:#f8fafc;
  color:#0f172a;
  font:inherit;
}

.step5-phone-upload-card__actions {
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:10px;
}

.step5-phone-upload-card__button {
  height:40px;
  padding:0 14px;
  border-radius:12px;
  border:1px solid rgba(37,99,235,0.16);
  background:#2563eb;
  color:#fff;
  font:inherit;
  font-weight:700;
  cursor:pointer;
}

.step5-phone-upload-card__button--secondary {
  border-color:rgba(22,163,74,0.18);
  background:rgba(220,252,231,0.94);
  color:#166534;
}

.step5-phone-upload-card__status {
  padding:12px 14px;
  border:1px solid rgba(148,163,184,0.18);
  border-radius:16px;
  background:#fff;
  color:#475569;
  font-size:13px;
  line-height:1.55;
}

.step5-phone-upload-card__status.is-error {
  border-color:rgba(239,68,68,0.24);
  background:rgba(254,242,242,0.96);
  color:#991b1b;
}

.step5-phone-upload-card__status.is-success {
  border-color:rgba(34,197,94,0.24);
  background:rgba(240,253,244,0.96);
  color:#166534;
}

.step5-photo-studio {
  position:fixed;
  inset:0;
  z-index:99999;
  display:flex;
  flex-direction:column;
  background:rgba(8,12,24,0.97);
  font-family:"Inter",sans-serif;
}

.step5-photo-studio__head,
.step5-photo-studio__foot {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-shrink:0;
  background:#0f172a;
}

.step5-photo-studio__head {
  height:58px;
  padding:0 20px;
  border-bottom:1px solid #1e293b;
}

.step5-photo-studio__brand {
  display:flex;
  align-items:center;
  gap:12px;
  color:#f8fafc;
}

.step5-photo-studio__badge {
  display:flex;
  align-items:center;
  justify-content:center;
  width:30px;
  height:30px;
  border-radius:8px;
  background:#2563eb;
  color:#fff;
  font-size:12px;
  font-weight:800;
}

.step5-photo-studio__title {
  font-size:14px;
  font-weight:800;
}

.step5-photo-studio__copy {
  font-size:11px;
  color:#64748b;
}

.step5-photo-studio__close {
  padding:4px 8px;
  border:none;
  background:none;
  color:#94a3b8;
  font-size:24px;
  line-height:1;
  cursor:pointer;
}

.step5-photo-studio__canvas-wrap {
  position:relative;
  display:flex;
  flex:1;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}

.step5-photo-studio__canvas {
  display:block;
  max-width:100%;
  max-height:100%;
  cursor:crosshair;
}

.step5-photo-studio__foot {
  min-height:64px;
  padding:10px 20px;
  border-top:1px solid #1e293b;
}

.step5-photo-studio__actions {
  display:flex;
  align-items:center;
  gap:10px;
}

.step5-photo-studio__browse,
.step5-photo-studio__reset {
  padding:8px 14px;
  border:1px solid #334155;
  border-radius:8px;
  background:#1e293b;
  font-size:12px;
  font-weight:700;
  cursor:pointer;
}

.step5-photo-studio__browse {
  color:#f8fafc;
}

.step5-photo-studio__browse input {
  display:none;
}

.step5-photo-studio__reset {
  color:#cbd5e1;
}

.step5-photo-studio__help {
  max-width:380px;
  font-size:11px;
  line-height:1.5;
  color:#475569;
}

.step5-photo-studio__apply {
  padding:9px 22px;
  border:none;
  border-radius:8px;
  background:#2563eb;
  color:#fff;
  font-size:13px;
  font-weight:800;
  cursor:pointer;
}

.step5-preview-ready {
  display:flex;
  flex-direction:column;
  width:100%;
  min-height:100%;
  height:100%;
  overflow:hidden;
  border:1px solid #cbd5e1;
  border-radius:12px;
  background:#fff;
  box-sizing:border-box;
  box-shadow:0 4px 6px rgba(0,0,0,0.05);
  transition:all 0.2s;
}

.step5-preview-ready__head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  min-height:48px;
  padding:8px 10px;
  border-bottom:1px solid #e2e8f0;
  background:#f8fafc;
}

.step5-preview-ready__toolbar {
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  min-width:0;
  min-height:32px;
}

.step5-preview-ready__count {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  padding:7px 10px;
  border-radius:999px;
  background:#eef2ff;
  color:#4338ca;
  font-size:12px;
  font-weight:800;
  white-space:nowrap;
}

.step5-preview-ready__stage {
  display:flex;
  justify-content:center;
  align-items:flex-start;
  flex:1 1 auto;
  min-height:920px;
  padding:10px;
  background:#e7eef7;
  background-image:radial-gradient(rgba(148,163,184,0.45) 1px, transparent 0);
  background-size:20px 20px;
}

.step5-preview-ready__canvas {
  display:block;
  width:auto;
  max-width:100%;
  height:auto;
  border-radius:4px;
  filter:drop-shadow(0 15px 25px rgba(0,0,0,0.15)) drop-shadow(0 5px 10px rgba(0,0,0,0.05));
}

.step5-preview-toolbar__button {
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:8px 13px;
  border:1px solid #dbe4f0;
  border-radius:999px;
  background:#fff;
  color:#0f172a;
  font-size:12px;
  font-weight:800;
  cursor:pointer;
  box-shadow:0 1px 2px rgba(15,23,42,0.04);
}

.step5-preview-toolbar__button--muted {
  color:#475569;
}

.df5-move-menu__head {
  padding:4px 8px 8px;
}

.df5-move-menu__eyebrow {
  font-size:11px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:#64748b;
}

.df5-move-menu__title {
  margin-top:4px;
  font-size:13px;
  font-weight:800;
  color:#0f172a;
}

.df5-move-menu__button {
  display:flex;
  align-items:center;
  width:100%;
  min-height:40px;
  padding:0 12px;
  border:1px solid rgba(148,163,184,0.16);
  border-radius:12px;
  background:#fff;
  color:#0f172a;
  font:inherit;
  font-size:13px;
  font-weight:800;
  cursor:pointer;
}

.df5-move-menu__button--primary {
  background:rgba(26,115,232,0.10);
  color:#1a73e8;
}

.df5-empty-state {
  padding:18px;
  border:1px solid #d5dfd5;
  border-radius:10px;
  background:#f9fbf9;
  color:#3f4f3f;
}

@media (max-width: 640px) {
  .wb-misc-modal__grid--triple {
    grid-template-columns:1fr;
  }
}

.wb2-line-view {
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  padding:8px 0;
  border-bottom:1px solid var(--border-soft);
}
.wb2-line-view__main {
  flex:1;
  min-width:0;
}
.wb2-line-view__title {
  font-size:14px;
  font-weight:500;
  color:var(--text-primary);
}
.wb2-line-view__context {
  margin-top:4px;
  font-size:12px;
  color:var(--text-secondary);
}
.wb2-line-view__amount {
  min-width:100px;
  text-align:right;
  font-size:14px;
  font-weight:600;
  color:var(--text-primary);
}
.wb2-line-view__amount.is-warning,
.wb2-line-view__tbd { color:var(--studio-orange); }
.wb2-line-view__tbd { font-size:12px; }

.wb2-line-editor {
  padding:8px 0;
  border:1px solid transparent;
  border-bottom-color:var(--border-soft);
  transition:all .2s;
}
.wb2-line-editor__grid {
  display:grid;
  grid-template-columns:16px minmax(0,1.5fr) 70px 60px 100px 90px 40px;
  gap:12px;
  align-items:center;
}
.wb2-line-editor__drag {
  cursor:grab;
  color:var(--text-secondary);
  font-size:16px;
}
.wb2-line-editor__main { min-width:0; }
.wb2-line-editor__name {
  width:100%;
  padding:4px 6px;
  border:1px solid transparent;
  border-radius:var(--radius-sm);
  background:transparent;
  color:var(--text-primary);
  font-size:14px;
  font-weight:600;
}
.wb2-line-editor__badges {
  display:flex;
  flex-wrap:wrap;
  gap:4px;
  margin-top:2px;
}
.wb2-line-editor__badge {
  padding:2px 6px;
  border-radius:4px;
  font-size:10px;
  font-weight:700;
  text-transform:uppercase;
}
.wb2-line-editor__badge--override {
  background:rgba(49,74,99,.10);
  color:var(--studio-blue);
}
.wb2-line-editor__badge--manual {
  background:rgba(79,117,91,.12);
  color:var(--studio-green);
}
.wb2-line-editor__context {
  margin-top:4px;
  font-size:11px;
  color:var(--text-secondary);
}
.wb2-line-editor__input {
  width:100%;
  padding:4px 6px;
  border:1px solid var(--border-medium);
  border-radius:var(--radius-sm);
  background:var(--surface-elevated);
  color:var(--text-primary);
  font-size:13px;
}
.wb2-line-editor__input--qty,
.wb2-line-editor__input--price { text-align:right; }
.wb2-line-editor__input--price.is-warning { color:var(--studio-orange); }
.wb2-line-editor__total {
  text-align:right;
  font-size:14px;
  font-weight:700;
  color:var(--text-primary);
}
.wb2-line-editor__total.is-warning { color:var(--studio-orange); }
.wb2-line-editor__menu { text-align:right; }
.wb2-line-editor__menu-button {
  padding:4px;
  border:none;
  background:transparent;
  color:var(--text-secondary);
  font-weight:700;
}
.wb2-line-editor__details {
  margin-top:12px;
  padding:12px;
  border:1px solid var(--border-soft);
  border-radius:var(--radius-md);
  background:var(--surface-elevated);
}
.wb2-line-editor__details-summary { display:none; }
.wb2-line-editor__details-grid {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
}
.wb2-line-editor__field { display:block; }
.wb2-line-editor__field--span-2 { grid-column:span 2; }
.wb2-line-editor__field-label {
  margin-bottom:4px;
  font-size:10px;
  font-weight:700;
  text-transform:uppercase;
  color:var(--text-tertiary);
}
.wb2-line-editor__toggle {
  display:flex;
  align-items:center;
  gap:6px;
  padding-top:20px;
  font-size:11px;
  color:var(--text-secondary);
}
.wb2-line-editor__details-actions {
  display:flex;
  justify-content:flex-end;
  gap:8px;
  margin-top:12px;
}
.wb2-line-editor__details-action {
  padding:4px 8px;
  font-size:11px;
}

.wb2-step6-group-empty {
  display:grid;
  gap:12px;
  justify-items:center;
  padding:40px;
  border:1px solid var(--border-soft);
  border-radius:var(--radius-lg);
  background:var(--surface-card);
  text-align:center;
  color:var(--text-secondary);
}
.wb2-step6-group-card {
  margin-top:0;
  overflow:hidden;
  border:1px solid rgba(148,163,184,.14);
  border-radius:var(--radius-sm);
  background:var(--surface-card);
  box-shadow:none;
}
.wb2-step6-group-card__header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:6px 8px;
  background:rgba(248,250,252,.7);
  cursor:pointer;
}
.wb2-step6-group-card__header.is-open {
  border-bottom:1px solid rgba(148,163,184,.12);
}
.wb2-step6-group-card__meta {
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
}
.wb2-step6-group-card__caret {
  width:12px;
  flex:0 0 auto;
  text-align:center;
  color:var(--text-secondary);
  font-size:14px;
  font-weight:900;
}
.wb2-step6-group-card__badge,
.wb2-step6-group-label__badge {
  width:26px;
  height:26px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  border-radius:8px;
  border:1px solid rgba(148,163,184,.18);
  background:rgba(148,163,184,.1);
  color:#475569;
  font-size:12px;
  font-weight:900;
}
.wb2-step6-group-card__title {
  font-size:14px;
  font-weight:900;
  letter-spacing:0;
  line-height:1;
  color:#334155;
}
.wb2-step6-group-card__count {
  margin-top:2px;
  font-size:12px;
  font-weight:700;
  line-height:1.1;
  color:#475569;
}
.wb2-step6-group-card__subtotal {
  padding-left:8px;
  text-align:right;
}
.wb2-step6-group-card__subtotal-value {
  font-size:16px;
  font-weight:900;
  line-height:1;
  color:var(--text-primary);
}
.wb2-step6-group-card__subtotal-value.is-warning { color:var(--studio-orange); }
.wb2-step6-group-card__spacer {
  width:8px;
  flex:0 0 auto;
}
.wb2-step6-area-edit {
  appearance:none;
  border:0;
  background:transparent;
  color:#2563eb;
  cursor:pointer;
  font-size:12px;
  font-weight:800;
  padding:3px 0;
  text-decoration:underline;
  text-underline-offset:2px;
  white-space:nowrap;
}
.wb2-step6-area-edit:hover,
.wb2-step6-area-edit:focus {
  color:#1d4ed8;
}

.wb2-validation-summary {
  margin:0 0 10px;
  padding:10px;
  border:1px solid rgba(180,116,32,.34);
  border-radius:8px;
  background:#fff8ed;
  color:#442f12;
  display:grid;
  gap:8px;
}

.wb2-validation-summary[hidden] {
  display:none;
}

.wb2-validation-summary__head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.wb2-validation-summary__eyebrow {
  color:#9a641f;
  font-size:10px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.wb2-validation-summary__title {
  color:#593b14;
  font-size:13px;
  font-weight:900;
}

.wb2-validation-summary__list {
  display:grid;
  gap:6px;
}

.wb2-validation-summary__item {
  width:100%;
  min-height:40px;
  display:flex;
  align-items:flex-start;
  gap:9px;
  padding:8px 10px;
  border:1px solid rgba(180,116,32,.24);
  border-radius:7px;
  background:#fff;
  color:inherit;
  cursor:pointer;
  text-align:left;
}

.wb2-validation-summary__item:hover,
.wb2-validation-summary__item:focus {
  border-color:rgba(180,116,32,.5);
  background:#fffaf2;
}

.wb2-validation-summary__badge {
  flex:0 0 auto;
  padding:3px 6px;
  border-radius:5px;
  background:#f4e2c4;
  color:#7a4a12;
  font-size:10px;
  font-weight:900;
  line-height:1.2;
  text-transform:uppercase;
}

.wb2-validation-summary__copy {
  min-width:0;
  display:grid;
  gap:2px;
}

.wb2-validation-summary__label {
  color:#3c2a13;
  font-size:12px;
  font-weight:900;
  line-height:1.2;
}

.wb2-validation-summary__detail {
  color:#7a4a12;
  font-size:11px;
  font-weight:700;
  line-height:1.35;
}

.wb2-autosave-recovery {
  position:fixed;
  inset:0;
  z-index:10030;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  background:rgba(15,23,42,.42);
}

.wb2-autosave-recovery__card {
  width:min(520px, calc(100vw - 32px));
  display:grid;
  gap:0;
  overflow:hidden;
  border:1px solid rgba(148,163,184,.26);
  border-radius:12px;
  background:#fff;
  box-shadow:0 24px 80px rgba(15,23,42,.28);
}

.wb2-autosave-recovery__head {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  padding:18px 20px;
  border-bottom:1px solid var(--border-soft);
  background:#f8fafc;
}

.wb2-autosave-recovery__eyebrow {
  color:#285f8f;
  font-size:10px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.wb2-autosave-recovery__title {
  margin-top:3px;
  color:#17212b;
  font-size:19px;
  font-weight:900;
  line-height:1.15;
}

.wb2-autosave-recovery__close {
  width:32px;
  height:32px;
  border:1px solid var(--border-soft);
  border-radius:8px;
  background:#fff;
  color:#475569;
  cursor:pointer;
  font-size:22px;
  line-height:1;
}

.wb2-autosave-recovery__body {
  display:grid;
  gap:14px;
  padding:18px 20px;
  color:#334155;
  font-size:13px;
  line-height:1.55;
}

.wb2-autosave-recovery__body p {
  margin:0;
}

.wb2-autosave-recovery__facts {
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:8px;
}

.wb2-autosave-recovery__facts div {
  display:grid;
  gap:4px;
  padding:10px;
  border:1px solid var(--border-soft);
  border-radius:8px;
  background:#f8fafc;
}

.wb2-autosave-recovery__facts span {
  color:#64748b;
  font-size:10px;
  font-weight:900;
  letter-spacing:.06em;
  text-transform:uppercase;
}

.wb2-autosave-recovery__facts strong {
  color:#17212b;
  font-size:12px;
  font-weight:900;
  line-height:1.25;
}

.wb2-autosave-recovery__actions {
  display:flex;
  justify-content:flex-end;
  gap:8px;
  padding:14px 20px 18px;
  border-top:1px solid var(--border-soft);
}

@media (max-width:640px) {
  .wb2-autosave-recovery__facts {
    grid-template-columns:1fr;
  }
  .wb2-autosave-recovery__actions {
    align-items:stretch;
    flex-direction:column;
  }
}
.wb2-step6-group-card__body { padding:0; }

.wb2-step6-group-label {
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
  padding-right:4px;
}
.wb2-step6-group-label__title {
  font-size:13px;
  font-weight:900;
  line-height:1.05;
  white-space:nowrap;
  color:#334155;
}

.wb2-step6-compact-line {
  padding:4px 8px;
  border-bottom:1px solid rgba(148,163,184,.14);
}
.wb2-step6-compact-line__grid {
  display:grid;
  grid-template-columns:minmax(0,1fr) 106px auto;
  gap:8px;
  align-items:center;
}
.wb2-step6-compact-line.has-group-label .wb2-step6-compact-line__grid {
  grid-template-columns:160px minmax(0,1fr) 106px auto;
}
.wb2-step6-compact-line__main { min-width:0; }
.wb2-step6-compact-line__title-row {
  display:flex;
  align-items:baseline;
  gap:10px;
  min-width:0;
  overflow:hidden;
  white-space:nowrap;
  font-size:14px;
  line-height:1.05;
  color:#0f172a;
}
.wb2-step6-compact-line__title {
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#111827;
  font-weight:900;
  letter-spacing:0;
}
.wb2-step6-compact-line__meta {
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:13px;
  font-weight:700;
  color:#64748b;
}
.wb2-step6-compact-line__tbd {
  display:inline-block;
  padding:2px 8px;
  border-radius:8px;
  background:rgba(168,121,57,.12);
  color:var(--studio-orange);
  font-size:11px;
  font-weight:800;
  line-height:1.6;
}
.wb2-step6-compact-line__amount {
  padding-left:6px;
  text-align:right;
  white-space:nowrap;
}
.wb2-step6-compact-line__amount-value {
  font-size:15px;
  font-weight:900;
  line-height:1;
  color:var(--text-primary);
}
.wb2-step6-compact-line__amount-value.is-warning { color:var(--studio-orange); }
.wb2-step6-compact-line__rate-button {
  appearance:none;
  border:0;
  background:transparent;
  color:#2563eb;
  cursor:pointer;
  font-size:11px;
  font-weight:800;
  line-height:1.25;
  padding:3px 0 0;
  text-decoration:underline;
  text-underline-offset:2px;
}
.wb2-step6-compact-line__rate-button:hover,
.wb2-step6-compact-line__rate-button:focus {
  color:#1d4ed8;
}
.wb2-step6-compact-line__actions {
  display:flex;
  align-items:center;
  gap:6px;
  justify-content:flex-end;
}
.wb2-step6-tax-badge {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:54px;
  min-height:22px;
  padding:2px 7px;
  border:1px solid rgba(148,163,184,.42);
  border-radius:999px;
  background:#f8fafc;
  color:#64748b;
  font-size:11px;
  font-weight:900;
  line-height:1;
  white-space:nowrap;
}
.wb2-step6-tax-badge.is-taxable {
  border-color:rgba(22,101,52,.22);
  background:#ecfdf3;
  color:#166534;
}
.wb2-step6-tax-badge.is-nontax {
  border-color:rgba(100,116,139,.25);
  background:#f8fafc;
  color:#64748b;
}
.wb2-step6-tax-badge.is-mixed {
  border-color:rgba(180,83,9,.25);
  background:#fffbeb;
  color:#92400e;
}
.wb2-step6-compact-line__edit {
  min-height:0;
  padding:4px 9px;
  border-radius:8px;
  font-size:12px;
  font-weight:800;
}

.is-material .wb2-step6-group-card__badge,
.is-material .wb2-step6-group-label__badge {
  background:rgba(49,74,99,.10);
  border-color:rgba(49,74,99,.16);
  color:var(--studio-blue);
}
.is-material .wb2-step6-group-card__title,
.is-material .wb2-step6-group-label__title { color:#1e3a5f; }

.is-fabrication .wb2-step6-group-card__badge,
.is-fabrication .wb2-step6-group-label__badge {
  background:rgba(79,117,91,.12);
  border-color:rgba(79,117,91,.20);
  color:var(--studio-green);
}
.is-fabrication .wb2-step6-group-card__title,
.is-fabrication .wb2-step6-group-label__title { color:#355743; }

.is-installation .wb2-step6-group-card__badge,
.is-installation .wb2-step6-group-label__badge {
  background:rgba(168,121,57,.12);
  border-color:rgba(168,121,57,.18);
  color:var(--studio-orange);
}
.is-installation .wb2-step6-group-card__title,
.is-installation .wb2-step6-group-label__title { color:#7f5f2c; }

.is-edge .wb2-step6-group-card__badge,
.is-edge .wb2-step6-group-label__badge {
  background:rgba(64,116,152,.12);
  border-color:rgba(64,116,152,.18);
  color:#23648b;
}
.is-edge .wb2-step6-group-card__title,
.is-edge .wb2-step6-group-label__title { color:#23516e; }

.wb2-step6-summary-card,
.wb2-step6-controls {
  padding:18px;
  border:1px solid var(--border-soft);
  border-radius:18px;
  background:var(--surface-card);
  box-shadow:var(--shadow-sm);
}
.wb2-step6-summary-card__eyebrow,
.wb2-step6-controls__summary {
  font-size:12px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.wb2-step6-summary-card__eyebrow { color:var(--text-tertiary); }
.wb2-step6-summary-card__rows {
  display:grid;
  gap:10px;
  margin-top:14px;
}
.wb2-step6-summary-card__row {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:14px;
  align-items:center;
  padding:0 0 10px;
}
.wb2-step6-summary-card__row.is-final {
  padding:14px 0 0;
  border-top:1px solid var(--border-soft);
}
.wb2-step6-summary-card__label {
  font-size:14px;
  font-weight:600;
  color:var(--text-secondary);
}
.wb2-step6-summary-card__value {
  font-size:16px;
  font-weight:700;
  color:var(--text-primary);
}
.wb2-step6-summary-card__row.is-final .wb2-step6-summary-card__label {
  font-size:22px;
  font-weight:800;
  color:var(--text-primary);
}
.wb2-step6-summary-card__row.is-final .wb2-step6-summary-card__value {
  font-size:28px;
  font-weight:900;
  color:var(--studio-blue);
}
.wb2-step6-controls[open] .wb2-step6-controls__summary { margin-bottom:16px; }
.wb2-step6-controls__summary {
  cursor:pointer;
  list-style:none;
  color:var(--studio-blue);
}
.wb2-step6-controls__grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
.wb2-step6-controls__span-2 { grid-column:span 2; }
.wb2-step6-controls__label { display:block; }
.wb2-step6-controls__field-label {
  margin-bottom:6px;
  font-size:11px;
  font-weight:700;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:var(--text-tertiary);
}
.wb2-step6-controls__button-row {
  display:flex;
  gap:8px;
}
.wb2-step6-controls__button-row .wb2-btn { flex:1; }

.wb2-step6-shell--padded { padding:24px; }
.wb2-step6-shell__inner {
  max-width:1480px;
  margin:0 auto;
}

.wb2-step6-workspace-header {
  padding:14px 16px;
  border:1px solid var(--border-soft);
  border-radius:14px;
  background:var(--surface-card);
  box-shadow:var(--shadow-sm);
}
.wb2-step6-workspace-header__grid {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto auto;
  gap:14px;
  align-items:end;
}
.wb2-step6-workspace-header__meta,
.wb2-step6-workspace-header__group {
  display:grid;
  gap:6px;
  min-width:0;
}
.wb2-step6-workspace-header__group { min-width:220px; }
.wb2-step6-workspace-header__kicker,
.wb2-step6-workspace-header__group-label {
  font-weight:700;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:var(--text-tertiary);
}
.wb2-step6-workspace-header__kicker {
  font-size:12px;
  font-weight:800;
  letter-spacing:.08em;
}
.wb2-step6-workspace-header__count {
  font-size:14px;
  color:var(--text-secondary);
}
.wb2-step6-workspace-header__group-label { font-size:11px; }
.wb2-step6-workspace-header__actions {
  display:flex;
  gap:8px;
}
.wb2-step6-workspace-header__actions .wb2-btn {
  flex:1;
  font-size:14px;
  font-weight:800;
}

.wb2-step6-line-menu {
  margin-top:12px;
  padding-top:12px;
  border-top:1px solid var(--border-soft);
  display:grid;
  gap:12px;
}
.wb2-step6-line-menu__actions,
.wb2-step6-line-menu__toggles {
  display:flex;
  flex-wrap:wrap;
}
.wb2-step6-line-menu__actions { gap:8px; }
.wb2-step6-line-menu__actions .wb2-btn { padding:8px 12px; }
.wb2-step6-line-menu__toggles {
  gap:12px 16px;
  font-size:12px;
  color:var(--text-secondary);
}
.wb2-step6-line-menu__toggle {
  display:flex;
  align-items:center;
  gap:8px;
}
.wb2-step6-line-menu__grid {
  display:grid;
  gap:12px;
}
.wb2-step6-line-menu__grid--4 { grid-template-columns:repeat(4,minmax(0,1fr)); }
.wb2-step6-line-menu__grid--3 {
  grid-template-columns:repeat(3,minmax(0,1fr));
  margin-bottom:12px;
}
.wb2-step6-line-menu__grid--2 { grid-template-columns:repeat(2,minmax(0,1fr)); }
.wb2-step6-line-menu__field { display:block; }
.wb2-step6-line-menu__field-label {
  margin-bottom:6px;
  font-size:11px;
  font-weight:700;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:var(--text-tertiary);
}
.wb2-step6-line-menu__pair {
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:8px;
}

@media (max-width: 1100px) {
  .wb2-step6-workspace-header__grid {
    grid-template-columns:minmax(0,1fr);
  }
  .wb2-step6-workspace-header__group {
    min-width:0;
  }
}

@media (max-width: 960px) {
  .wb2-step6-line-menu__grid--4,
  .wb2-step6-line-menu__grid--3,
  .wb2-step6-line-menu__grid--2,
  .wb2-step6-line-menu__pair {
    grid-template-columns:minmax(0,1fr);
  }
}

.wb2-corner-modal-overlay {
  position:fixed;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:3260;
  padding:22px;
  isolation:isolate;
  background:rgba(15,23,42,0.56);
}
.wb2-corner-modal-card {
  width:min(680px,100%);
  border:1px solid var(--border-soft);
  border-radius:22px;
  background:var(--surface-card);
  color:var(--text-primary);
  box-shadow:var(--shadow-lg);
  overflow:hidden;
}
.wb2-corner-modal-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:20px 24px;
  background:var(--df-primary-gradient);
  color:var(--df-text-inverse);
  border-bottom:1px solid var(--border-soft);
}
.wb2-corner-modal-title {
  font-size:28px;
  line-height:1.1;
  font-weight:600;
  letter-spacing:-0.03em;
}
.wb2-corner-modal-close {
  width:44px;
  height:44px;
  border:1px solid rgba(255,255,255,0.16);
  border-radius:14px;
  background:rgba(255,255,255,0.12);
  color:var(--df-text-inverse);
  font-size:28px;
  line-height:1;
  cursor:pointer;
}
.wb2-corner-modal-body {
  padding:24px 28px 18px;
  display:grid;
  gap:18px;
  background:var(--surface-card);
}
.wb2-corner-modal-grid {
  display:grid;
  grid-template-columns:minmax(0,1fr) 460px;
  gap:20px;
  align-items:start;
}
.wb2-corner-modal-form {
  display:grid;
  gap:18px;
}
.wb2-corner-modal-icon {
  display:flex;
  justify-content:center;
  color:var(--df-primary);
}
.wb2-corner-modal-field {
  display:grid;
  gap:8px;
}
.wb2-corner-modal-field-label {
  font-size:13px;
  font-weight:700;
  color:var(--text-secondary);
  text-transform:uppercase;
  letter-spacing:0.04em;
}
.wb2-corner-modal-copy {
  font-size:13px;
  color:var(--text-secondary);
}
.wb2-corner-preview-col {
  display:grid;
  gap:8px;
}
.wb2-corner-preview-label {
  font-size:12px;
  color:var(--text-secondary);
  font-weight:700;
  letter-spacing:0.03em;
  text-transform:uppercase;
}
.wb2-corner-preview {
  width:min(460px,100%);
  height:260px;
  display:block;
  background:var(--df-surface-alt);
  border:1px solid var(--df-border);
  border-radius:18px;
  box-shadow:var(--df-shadow-xs);
}
.wb2-corner-modal-actions {
  justify-content:flex-end;
  gap:12px;
  padding-top:4px;
}

.step4-panel {
  display:flex;
  flex-direction:column;
  gap:16px;
  padding:8px 0 28px;
}
.step4-panel__intro {
  background:var(--df-card);
  border:1px solid var(--df-border);
  border-radius:18px;
  padding:18px;
  box-shadow:var(--df-shadow-sm);
}
.step4-panel__head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:8px;
}
.step4-panel__title {
  font-size:18px;
  font-weight:800;
  color:var(--df-text);
}
.step4-panel__cta {
  height:38px;
  padding:0 14px;
  border:none;
  border-radius:12px;
  background:var(--df-primary-gradient);
  color:var(--df-text-inverse);
  font-size:13px;
  font-weight:700;
  cursor:pointer;
  box-shadow:var(--df-shadow-sm);
}
.step4-panel__copy {
  font-size:13px;
  line-height:1.45;
  color:var(--df-text-muted);
}
.step4-panel__list {
  display:flex;
  flex-direction:column;
  gap:12px;
}
.step4-panel__card {
  display:grid;
  grid-template-columns:108px 1fr;
  gap:14px;
  align-items:center;
  padding:14px;
  border:1px solid var(--df-border);
  border-radius:16px;
  background:var(--df-card);
  box-shadow:var(--df-shadow-sm);
  cursor:pointer;
  transition:border-color .15s ease, background .15s ease, transform .15s ease, box-shadow .15s ease;
}
.step4-panel__card:hover {
  transform:translateY(-1px);
  border-color:var(--df-primary-ring);
  box-shadow:var(--df-shadow-md);
}
.step4-panel__thumb {
  width:108px;
  height:82px;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  border:1px solid var(--df-border);
  border-radius:12px;
  background:var(--df-surface-alt);
}
.step4-panel__thumb-image {
  width:92px;
  height:72px;
  object-fit:contain;
  display:block;
}
.step4-panel__thumb-placeholder {
  width:92px;
  height:72px;
  border:1px solid var(--df-border);
  border-radius:10px;
  background:var(--df-surface-alt);
}
.step4-panel__body { min-width:0; }
.step4-panel__meta {
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  margin-bottom:6px;
}
.step4-panel__type {
  padding:3px 8px;
  border:1px solid var(--df-primary-ring);
  border-radius:999px;
  background:var(--df-primary-soft);
  color:var(--df-primary);
  font-size:11px;
  font-weight:700;
  letter-spacing:.04em;
  text-transform:uppercase;
}
.step4-panel__price {
  font-size:12px;
  color:var(--df-text-muted);
}
.step4-panel__name {
  margin-bottom:4px;
  font-size:15px;
  font-weight:700;
  line-height:1.3;
  color:var(--df-text);
}
.step4-panel__detail {
  font-size:12px;
  line-height:1.4;
  color:var(--df-text-muted);
}
.step4-panel__empty {
  display:grid;
  gap:12px;
  justify-items:center;
  padding:22px;
  border:1px dashed var(--df-border-strong);
  border-radius:18px;
  background:var(--df-card);
  text-align:center;
  color:var(--df-text-muted);
  font-size:13px;
  line-height:1.5;
}
.step4-panel__empty strong {
  color:var(--df-text);
  font-weight:700;
}

@media (max-width: 480px) {
  .step4-panel__head {
    flex-direction:column;
    align-items:stretch;
  }
  .step4-panel__cta {
    width:100%;
    height:auto;
    min-height:40px;
    padding:10px 14px;
    text-align:center;
  }
  .step4-panel__card {
    grid-template-columns:minmax(0,1fr);
  }
  .step4-panel__thumb {
    width:100%;
    max-width:180px;
    justify-self:start;
  }
}

.step4-gallery {
  padding:20px;
}
.step4-gallery__card {
  width:min(960px, 100%);
  max-height:min(82vh, 920px);
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
.step4-gallery__head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:18px 22px;
  border-bottom:1px solid var(--df-border);
  background:var(--df-primary-gradient);
  color:var(--df-text-inverse);
}
.step4-gallery__heading {
  display:flex;
  flex-direction:column;
  gap:10px;
  min-width:0;
  flex:1 1 auto;
}
.step4-gallery__title {
  font-size:20px;
  font-weight:800;
}
.step4-gallery__search-wrap {
  display:block;
  max-width:320px;
}
.step4-gallery__search {
  width:100%;
  min-height:40px;
  padding:10px 12px;
  border:1px solid rgba(255,255,255,0.24);
  border-radius:12px;
  background:rgba(255,255,255,0.14);
  color:var(--df-text-inverse);
}
.step4-gallery__search::placeholder {
  color:rgba(255,255,255,0.78);
}
.step4-gallery__close {
  width:42px;
  min-width:42px;
  padding:0;
  font-size:26px;
  line-height:1;
  border-color:rgba(255,255,255,0.18);
  background:rgba(255,255,255,0.12);
  color:var(--df-text-inverse);
}
.step4-gallery__grid {
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(220px, 1fr));
  gap:14px;
  padding:18px;
  overflow:auto;
}
.step4-gallery__item {
  display:flex;
  flex-direction:column;
  gap:8px;
  padding:10px;
  border:1px solid var(--df-border);
  border-radius:14px;
  background:var(--df-card);
  text-align:left;
  cursor:pointer;
  transition:border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.step4-gallery__item:hover {
  border-color:var(--df-primary);
  box-shadow:var(--df-shadow-md);
  transform:translateY(-1px);
}
.step4-gallery__preview {
  height:120px;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  border:1px solid var(--df-border);
  border-radius:10px;
  background:var(--df-surface-alt);
}
.step4-gallery__name {
  font-size:13px;
  font-weight:700;
  color:var(--df-text);
}
.step4-gallery__copy {
  font-size:12px;
  color:var(--df-text-muted);
}
.step4-gallery__empty {
  padding:28px 20px;
  border:1px dashed var(--df-border);
  border-radius:14px;
  color:var(--df-text-muted);
  text-align:center;
}

.step4-properties__card {
  width:min(520px, calc(100vw - 32px));
  overflow:hidden;
}

.step4-properties__head {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  padding:16px 18px;
  border-bottom:1px solid var(--df-border);
  background:var(--df-surface-alt);
}

.step4-properties__title {
  color:var(--df-text);
  font-size:18px;
  font-weight:800;
}

.step4-properties__copy {
  margin-top:3px;
  color:var(--df-text-muted);
  font-size:12px;
}

.step4-properties__form {
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:12px;
  padding:16px 18px 18px;
}

.step4-properties__field {
  display:grid;
  gap:5px;
  color:var(--df-text-muted);
  font-size:11px;
  font-weight:800;
  text-transform:uppercase;
}

.step4-properties__field--span,
.step4-properties__actions {
  grid-column:1 / -1;
}

.step4-properties__actions {
  display:flex;
  justify-content:flex-end;
  gap:8px;
  padding-top:4px;
}

.step4-outlet-modal {
  position:fixed;
  inset:0;
  z-index:2300;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(15,23,42,0.38);
  padding:16px;
}
.step4-outlet-modal__card {
  width:min(420px, calc(100vw - 32px));
  background:var(--df-card);
  border:1px solid var(--df-border);
  border-radius:22px;
  box-shadow:var(--df-shadow-float);
  overflow:hidden;
}
.step4-outlet-modal__head {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  padding:22px 22px 18px;
  border-bottom:1px solid var(--df-border);
  background:var(--df-primary-gradient);
}
.step4-outlet-modal__title {
  font-size:20px;
  font-weight:800;
  color:var(--df-text-inverse);
}
.step4-outlet-modal__copy {
  margin-top:6px;
  font-size:13px;
  line-height:1.5;
  color:rgba(248,251,255,0.82);
}
.step4-outlet-modal__close {
  width:38px;
  height:38px;
  border:1px solid rgba(255,255,255,0.18);
  border-radius:12px;
  background:rgba(255,255,255,0.12);
  color:var(--df-text-inverse);
  font-size:20px;
  cursor:pointer;
}
.step4-outlet-modal__body {
  display:grid;
  gap:14px;
  padding:20px 22px 0;
  background:var(--df-card);
}
.step4-outlet-modal__field {
  display:grid;
  gap:6px;
}
.step4-outlet-modal__field-label {
  font-size:12px;
  font-weight:700;
  letter-spacing:.03em;
  text-transform:uppercase;
  color:var(--df-text-muted);
}
.step4-outlet-modal__select {
  height:44px;
  border:1px solid var(--df-border);
  border-radius:12px;
  padding:0 12px;
  font-size:15px;
  color:var(--df-text);
  background:var(--df-card-strong);
  box-shadow:var(--df-shadow-xs);
}
.step4-outlet-modal__price-card {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 14px;
  border:1px solid var(--df-border);
  border-radius:16px;
  background:var(--df-surface-alt);
}
.step4-outlet-modal__price-label {
  font-size:12px;
  font-weight:700;
  letter-spacing:.03em;
  text-transform:uppercase;
  color:var(--df-primary);
}
.step4-outlet-modal__price-copy {
  margin-top:4px;
  font-size:13px;
  color:var(--df-text-muted);
}
.step4-outlet-modal__price-value {
  font-size:22px;
  font-weight:800;
  color:var(--df-text);
}
.step4-outlet-modal__actions {
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top:18px;
  padding:0 22px 22px;
  background:var(--df-card);
}
.step4-outlet-modal__button {
  height:40px;
  padding:0 16px;
  border-radius:12px;
  font-size:14px;
  font-weight:700;
  cursor:pointer;
}
.step4-outlet-modal__button--ghost {
  border:1px solid var(--df-border);
  background:var(--df-card-strong);
  color:var(--df-text-muted);
}
.step4-outlet-modal__button--primary {
  padding:0 18px;
  border:none;
  background:var(--df-primary-gradient);
  color:var(--df-text-inverse);
  box-shadow:var(--df-shadow-sm);
}

.step3-modal {
  padding:20px;
}
.step3-modal__card {
  width:min(440px,100%);
  overflow:hidden;
}
.step3-modal__head {
  padding:18px 22px;
  border-bottom:1px solid var(--df-border);
  background:var(--df-primary-gradient);
}
.step3-modal__title {
  font-size:18px;
  font-weight:800;
  color:var(--df-text-inverse);
}
.step3-modal__copy {
  margin-top:4px;
  font-size:13px;
  line-height:1.45;
  color:rgba(248,251,255,0.82);
}
.step3-modal__form {
  padding:20px 22px 22px;
  display:flex;
  flex-direction:column;
  gap:14px;
  background:var(--df-card);
}
.step3-modal__fields {
  display:flex;
  flex-direction:column;
  gap:14px;
}
.step3-modal__field {
  display:flex;
  flex-direction:column;
  gap:6px;
}
.step3-modal__label {
  font-size:12px;
  font-weight:700;
  color:var(--df-text-muted);
  letter-spacing:.03em;
  text-transform:uppercase;
}
.step3-modal__actions {
  display:flex;
  justify-content:flex-end;
  gap:10px;
  padding-top:4px;
}

.step3-menu {
  min-width:252px;
  max-width:min(280px,calc(100vw - 16px));
  overflow:hidden;
  border:1px solid var(--df-border);
  border-radius:18px;
  background:var(--df-card);
  box-shadow:var(--df-shadow-lg);
  color:var(--df-text);
}
.step3-menu--edge {
  position:fixed;
  z-index:2003;
  max-height:74vh;
  overflow:auto;
}
.step3-menu__head {
  padding:12px 14px;
  border-bottom:1px solid var(--df-border);
  font-weight:800;
  background:var(--df-primary-gradient);
  color:var(--df-text-inverse);
  letter-spacing:-0.01em;
}
.step3-menu__info {
  padding:10px 14px;
  border-bottom:1px solid var(--df-border);
  font-size:13px;
  color:var(--df-text-muted);
  background:var(--df-card);
}
.step3-menu__list {
  display:flex;
  flex-direction:column;
  padding:4px 0;
}
.step3-menu__separator {
  margin:2px 0 0;
  padding-top:2px;
  border-top:1px solid var(--df-border);
}
.step3-menu__item {
  width:100%;
  min-height:42px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:9px 12px;
  border:none;
  background:transparent;
  color:var(--df-text-muted);
  text-align:left;
  cursor:pointer;
  transition:background .15s ease,color .15s ease;
}
.step3-menu__item:hover {
  background:var(--df-surface-alt);
  color:var(--df-text);
}
.step3-menu__item.is-active {
  background:var(--df-primary-soft);
  color:var(--df-text);
}
.step3-menu__item-label {
  font-size:13px;
  font-weight:600;
  line-height:1.2;
}
.step3-menu__item.is-active .step3-menu__item-label {
  font-weight:700;
}
.step3-menu__item-check {
  min-width:18px;
  color:var(--df-primary);
  font-size:13px;
  font-weight:800;
  text-align:right;
}
.step3-menu__item-spacer {
  width:14px;
  flex-shrink:0;
}

.step3-price-list {
  border:1px solid var(--df-border);
  background:var(--df-card);
  border-radius:18px;
  padding:14px;
  display:grid;
  gap:10px;
  box-shadow:var(--df-shadow-sm);
}
.step3-price-list__title {
  font-weight:800;
  color:var(--df-text);
  letter-spacing:-0.01em;
}
.step3-price-list__copy {
  font-size:12px;
  color:var(--df-text-muted);
}
.step3-price-list__table {
  width:100%;
  border-collapse:collapse;
  font-size:13px;
}
.step3-price-list__th,
.step3-price-list__cell {
  padding:8px 10px;
  border-bottom:1px solid var(--df-border);
}
.step3-price-list__th {
  text-align:left;
  color:var(--df-text-muted);
  font-size:12px;
  letter-spacing:.03em;
  text-transform:uppercase;
}
.step3-price-list__th--right,
.step3-price-list__cell--right {
  text-align:right;
}
.step3-price-list__cell {
  color:var(--df-text-muted);
}
.step3-price-list__cell--strong {
  color:var(--df-text);
  font-weight:700;
}
.step3-price-list__input {
  max-width:120px;
  text-align:right;
}
.step3-price-list__empty {
  padding:12px;
  color:var(--df-text-muted);
}
.step3-price-list__total {
  text-align:right;
  font-weight:800;
  color:var(--df-text);
}

@media (max-width: 760px) {
  .wb2-corner-modal-overlay {
    padding:12px;
    align-items:flex-start;
    overflow-y:auto;
  }
  .wb2-corner-modal-card {
    width:100%;
    max-height:calc(100dvh - 24px);
    overflow-y:auto;
  }
  .wb2-corner-modal-header {
    padding:16px 18px;
  }
  .wb2-corner-modal-title { font-size:22px; }
  .wb2-corner-modal-body {
    padding:18px 16px 16px;
  }
  .wb2-corner-modal-grid {
    grid-template-columns:minmax(0,1fr);
  }
  .wb2-corner-preview {
    width:100%;
    height:180px;
  }
  .wb2-corner-modal-actions {
    flex-direction:column-reverse;
    justify-content:stretch;
  }
  .wb2-corner-modal-actions button {
    width:100%;
  }
}

.wb2-corner-menu {
  display:none;
  min-width:260px;
  padding:8px 0;
  overflow:hidden;
  border:1px solid var(--border-soft);
  border-radius:18px;
  background:var(--surface-card);
  color:var(--text-primary);
  box-shadow:var(--shadow-lg);
}
.wb2-corner-menu__item {
  width:100%;
  min-height:78px;
  display:flex;
  align-items:center;
  gap:14px;
  padding:0 16px 0 14px;
  border:none;
  background:transparent;
  color:var(--text-secondary);
  text-align:left;
  cursor:pointer;
  transition:background .15s ease, color .15s ease;
}
.wb2-corner-menu__item + .wb2-corner-menu__item { border-top:1px solid var(--border-soft); }
.wb2-corner-menu__item:hover,
.wb2-corner-menu__item:focus-visible {
  background:var(--surface-elevated);
  outline:none;
}
.wb2-corner-menu__item.is-active { background:rgba(49,74,99,.08); }
.wb2-corner-menu__icon {
  width:72px;
  height:72px;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
  color:var(--text-tertiary);
}
.wb2-corner-menu__item.is-active .wb2-corner-menu__icon { color:var(--studio-blue); }
.wb2-corner-menu__label {
  flex:1;
  font-size:16px;
  font-weight:600;
  line-height:1.2;
  color:var(--text-primary);
}
.wb2-corner-menu__check {
  margin-left:auto;
  flex-shrink:0;
  color:var(--studio-blue);
  font-size:22px;
  font-weight:800;
}

.wb2-floating-menu {
  display:none;
  flex-direction:column;
  gap:4px;
  padding:8px;
  min-width:var(--wb2-menu-min-width, 220px);
  border:1px solid var(--df-border-strong);
  border-radius:18px;
  background:linear-gradient(180deg, var(--df-card-strong), var(--df-surface));
  box-shadow:0 24px 60px rgba(15,23,42,0.24);
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
}
.wb2-floating-menu__item {
  width:100%;
  min-height:38px;
  display:flex;
  align-items:center;
  padding:0 12px;
  border:none;
  border-radius:12px;
  background:transparent;
  color:var(--df-text-muted);
  text-align:left;
  font-size:13px;
  font-weight:600;
  cursor:pointer;
  transition:var(--transition-fast);
}
.wb2-floating-menu__item:hover,
.wb2-floating-menu__item:focus-visible {
  background:var(--df-primary-soft);
  color:var(--df-text);
  outline:none;
}
.wb2-floating-menu__item--danger {
  color:var(--df-error);
}
.wb2-floating-menu__item--danger:hover,
.wb2-floating-menu__item--danger:focus-visible {
  background:var(--df-error-bg);
  color:var(--df-error);
}
.wb2-floating-menu__separator {
  height:1px;
  margin:4px 2px;
  background:var(--df-line-soft);
}

.wb2-step2-edge-menu,
.wb2-step2-menu {
  position:fixed;
  z-index:2002;
  width:332px;
  min-width:332px;
  font-size:16px;
}
.wb2-step2-edge-menu__item,
.wb2-step2-menu__item {
  min-height:74px;
  gap:10px;
  padding:0 14px 0 12px;
}
.wb2-step2-edge-menu__icon,
.wb2-step2-menu__icon {
  width:142px;
  height:50px;
  justify-content:flex-start;
}
.wb2-step2-edge-menu__label,
.wb2-step2-menu__label {
  font-size:13px;
  font-weight:600;
  letter-spacing:-0.01em;
  line-height:1.22;
}
.wb2-step2-edge-menu__check,
.wb2-step2-menu__check {
  margin-left:auto;
  flex-shrink:0;
  color:var(--studio-blue);
  font-size:22px;
  font-weight:800;
}

.wb2-step2-modal {
  position:fixed;
  inset:0;
  z-index:2100;
  display:none;
  align-items:center;
  justify-content:center;
  padding:20px;
  background:rgba(15,23,42,0.42);
}
.wb2-step2-modal__card {
  width:min(420px, calc(100vw - 24px));
  min-width:min(380px, calc(100vw - 24px));
  border:1px solid var(--border-soft);
  border-radius:20px;
  background:var(--surface-card);
  color:var(--text-primary);
  box-shadow:var(--shadow-lg);
  overflow:hidden;
}
.wb2-step2-modal__header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:16px 18px;
  background:var(--df-primary-gradient);
  color:var(--df-text-inverse);
  border-bottom:1px solid var(--border-soft);
}
.wb2-step2-modal__title {
  font-size:1.05rem;
  font-weight:700;
  letter-spacing:-0.01em;
}
.wb2-step2-modal__close {
  width:32px;
  height:32px;
  border:1px solid rgba(255,255,255,0.18);
  border-radius:10px;
  background:rgba(255,255,255,0.12);
  color:var(--df-text-inverse);
  font-size:16px;
  line-height:1;
  cursor:pointer;
  box-shadow:var(--df-shadow-xs);
}
.wb2-step2-modal__body {
  display:grid;
  gap:18px;
  padding:24px;
  background:var(--surface-card);
}
.wb2-step2-modal__form {
  display:grid;
  gap:14px;
}
.wb2-step2-modal__field {
  display:grid;
  gap:6px;
}
.wb2-step2-modal__field-label,
.wb2-step2-modal__preview-label {
  font-size:12px;
  color:var(--text-secondary);
  font-weight:700;
  letter-spacing:0.03em;
  text-transform:uppercase;
}
.wb2-step2-modal__field-control-row,
.wb2-step2-modal__inline-row {
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.wb2-step2-modal__control {
  width:auto;
  min-width:0;
}
.wb2-step2-modal__control--number {
  width:72px;
  padding:8px 10px;
  font-size:14px;
  box-sizing:border-box;
}
.wb2-step2-modal__control--select {
  min-width:120px;
  padding:8px 10px;
  font-size:14px;
}
.wb2-step2-modal__separator,
.wb2-step2-modal__suffix {
  color:var(--text-secondary);
  font-weight:600;
}
.step2-custom-offset-wrap[hidden] {
  display:none !important;
}
.wb2-step2-modal__preview {
  display:grid;
  gap:6px;
  margin-top:2px;
}
.wb2-step2-modal__preview-canvas {
  width:100%;
  max-width:320px;
  height:180px;
  display:block;
  border:1px solid var(--border-soft);
  border-radius:14px;
  background:var(--surface-elevated);
  box-shadow:var(--df-shadow-xs);
}
.wb2-step2-modal__actions {
  display:flex;
  justify-content:flex-end;
  gap:10px;
}
.wb2-step2-modal__save {
  min-width:120px;
  border:none;
  background:var(--df-primary-gradient);
  color:var(--df-text-inverse);
  box-shadow:var(--df-shadow-sm);
}
.wb2-step2-modal__save:hover {
  transform:translateY(-1px);
  filter:brightness(1.05);
  box-shadow:var(--df-shadow-md);
}

.wb2-step2-corner-modal {
  z-index:2150;
}
.wb2-step2-corner-modal__body {
  gap:16px;
}
.wb2-step2-corner-modal__form-row {
  display:flex;
  align-items:center;
  gap:14px;
  padding:0 10px;
  flex-wrap:wrap;
}
.wb2-step2-corner-modal__label {
  min-width:64px;
  font-size:18px;
  font-weight:600;
  color:var(--text-primary);
}
.wb2-step2-corner-modal__input {
  width:228px;
  min-height:48px;
  padding:0 14px;
  font-size:18px;
  border-radius:14px;
  box-shadow:var(--df-shadow-xs);
}
.wb2-step2-corner-modal__suffix {
  font-size:20px;
  color:var(--text-secondary);
  font-weight:600;
}
.wb2-step2-corner-modal__preview-wrap {
  padding-top:16px;
  display:flex;
  justify-content:center;
}
.wb2-step2-corner-modal__preview {
  width:min(460px,100%);
  height:260px;
  display:block;
}
.wb2-step2-corner-modal__actions {
  padding-top:0;
}
.wb2-step2-corner-modal__save {
  min-width:178px;
  min-height:54px;
  border:none;
  border-radius:14px;
  background:var(--df-primary-gradient);
  color:var(--df-text-inverse);
  font-size:22px;
  font-weight:700;
  box-shadow:var(--df-shadow-sm);
}
.wb2-step2-corner-modal__save:hover {
  transform:translateY(-1px);
  filter:brightness(1.05);
  box-shadow:var(--df-shadow-md);
}

@media (max-width: 760px) {
  .wb2-step2-edge-menu,
  .wb2-step2-menu {
    width:min(332px, calc(100vw - 16px));
    min-width:0;
  }
  .wb2-step2-modal {
    padding:12px;
    align-items:flex-start;
    overflow-y:auto;
  }
  .wb2-step2-modal__card {
    width:100%;
    min-width:0;
  }
  .wb2-step2-modal__actions {
    flex-direction:column;
  }
  .wb2-step2-modal__actions .wb2-btn {
    width:100%;
  }
  .wb2-step2-corner-modal__form-row {
    padding:0;
  }
  .wb2-step2-corner-modal__input {
    width:min(228px, 100%);
  }
}

.wb2-field-control--locked { background:var(--surface-hover); }
.wb2-field-control--strong { font-weight:700; }
.wb2-field-control--right { text-align:right; }
.wb2-field-control--textarea {
  min-height:82px;
  resize:vertical;
}

.wb2-line-modal {
  position:fixed;
  inset:0;
  z-index:1400;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  background:rgba(15,23,42,.56);
  backdrop-filter:blur(4px);
}
.wb2-line-modal__card {
  width:min(820px, calc(100vw - 32px));
  max-height:calc(100vh - 48px);
  overflow:auto;
  border:1px solid rgba(148,163,184,.35);
  border-radius:22px;
  background:var(--surface-card);
  box-shadow:0 30px 80px rgba(15,23,42,.28);
  color:var(--text-primary);
}
.wb2-line-modal__head {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  padding:22px 24px 18px;
  border-bottom:1px solid var(--border-soft);
  background:linear-gradient(135deg, rgba(49,74,99,.08) 0%, rgba(255,255,255,.92) 100%);
}
.wb2-line-modal__kicker {
  font-size:12px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--text-tertiary);
}
.wb2-line-modal__title {
  margin-top:8px;
  font-size:28px;
  font-weight:900;
  letter-spacing:-.04em;
  color:var(--text-primary);
}
.wb2-line-modal__copy {
  margin-top:8px;
  font-size:13px;
  line-height:1.5;
  color:var(--text-secondary);
}
.wb2-line-modal__close {
  width:40px;
  height:40px;
  border-radius:12px;
  border:1px solid var(--border-soft);
  background:var(--surface-card);
  color:var(--text-secondary);
  font-size:20px;
  font-weight:700;
  cursor:pointer;
}
.wb2-line-modal__body {
  padding:22px 24px;
  display:grid;
  gap:16px;
}
.wb2-line-modal__intro-grid,
.wb2-line-modal__metrics-grid,
.wb2-line-modal__advanced-grid--three,
.wb2-line-modal__advanced-grid--two,
.wb2-line-modal__advanced-grid--discount {
  display:grid;
  gap:14px;
}
.wb2-line-modal__intro-grid { grid-template-columns:minmax(0,1fr); }
.wb2-line-modal__intro-grid.is-manual {
  grid-template-columns:minmax(0,2fr) repeat(2,minmax(0,1fr));
}
.wb2-line-modal__metrics-grid,
.wb2-line-modal__advanced-grid--three {
  grid-template-columns:repeat(3,minmax(0,1fr));
}
.wb2-line-modal__advanced-grid--two {
  grid-template-columns:repeat(2,minmax(0,1fr));
}
.wb2-line-modal__advanced-grid--discount {
  grid-template-columns:minmax(0,1fr) 130px;
}
.wb2-line-modal__field { display:block; }
.wb2-line-modal__field--span-2 { grid-column:span 2; }
.wb2-line-modal__field-label {
  margin-bottom:6px;
  font-size:11px;
  font-weight:800;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:var(--text-tertiary);
}
.wb2-line-modal__subtle-note {
  margin-top:-4px;
  font-size:12px;
  color:var(--text-secondary);
}
.wb2-line-modal__toggles,
.wb2-line-modal__advanced-toggles {
  display:flex;
  flex-wrap:wrap;
  gap:12px 18px;
  font-size:13px;
  color:var(--text-secondary);
}
.wb2-line-modal__toggle {
  display:flex;
  align-items:center;
  gap:8px;
}
.wb2-line-modal__note-card {
  padding:12px 14px;
  border:1px solid var(--border-soft);
  border-radius:12px;
  background:var(--surface-hover);
  font-size:13px;
  line-height:1.5;
  color:var(--text-secondary);
}
.wb2-line-modal__advanced-toggle-row {
  display:flex;
  justify-content:flex-start;
}
.wb2-line-modal__advanced {
  display:grid;
  gap:14px;
  padding-top:2px;
  border-top:1px solid var(--border-soft);
}
.wb2-line-modal__footer {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:18px 24px;
  border-top:1px solid var(--border-soft);
  background:var(--surface-hover);
}
.wb2-line-modal__actions {
  display:flex;
  gap:10px;
}

.wb2-step6-shell {
  height:100%;
  overflow:auto;
  background:var(--surface-bg);
  padding:10px 12px;
}
.wb2-step6-shell__grid {
  width:100%;
  max-width:none;
  margin:0;
  display:grid;
  grid-template-columns:minmax(0,1fr) 280px;
  gap:10px;
  align-items:start;
  color:var(--text-primary);
}
.wb2-step6-shell__main {
  display:grid;
  gap:4px;
}
.wb2-step6-shell__aside {
  display:grid;
  gap:12px;
  position:sticky;
  top:12px;
}
.wb2-step6-loading {
  border:1px solid var(--border-soft);
  border-radius:18px;
  background:var(--surface-card);
  padding:28px;
  box-shadow:var(--shadow-sm);
  color:var(--text-primary);
}
.wb2-step6-loading__title {
  font-size:28px;
  font-weight:800;
}
.wb2-step6-loading__copy {
  margin-top:10px;
  font-size:15px;
  color:var(--text-tertiary);
}

.wb2-step6-composer {
  border:1px solid var(--border-soft);
  border-radius:8px;
  background:var(--surface-card);
  overflow:hidden;
  box-shadow:none;
}
.wb2-step6-composer__head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:8px 10px;
  background:var(--surface-card);
}
.wb2-step6-composer__brand {
  display:flex;
  align-items:center;
  gap:10px;
}
.wb2-step6-composer__step {
  width:36px;
  height:36px;
  border-radius:11px;
  background:linear-gradient(135deg, #0284c7, #0ea5e9);
  display:flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
  font-size:20px;
  font-weight:900;
  color:#fff;
}
.wb2-step6-composer__title {
  font-size:16px;
  font-weight:900;
  line-height:1;
  color:var(--text-primary);
}
.wb2-step6-composer__copy {
  margin-top:2px;
  font-size:13.5px;
  line-height:1.15;
  color:var(--text-secondary);
}
.wb2-step6-composer__actions {
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.wb2-step6-composer__action {
  min-height:0;
  padding:7px 11px;
  font-size:12px;
  font-weight:800;
}
.wb2-step6-composer__hint {
  padding:8px 12px;
  border-top:1px solid var(--border-soft);
  font-size:13px;
  line-height:1.2;
  color:var(--text-secondary);
}

.wb2-section-head {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
}
.wb2-pricing-header__meta {
  font-size:13px;
  line-height:1.45;
  color:var(--text-secondary);
}
.wb2-pricing-config__field {
  display:grid;
  gap:6px;
  padding:12px 14px;
  border:1px solid var(--border-soft);
  border-radius:12px;
  background:var(--surface-elevated);
}

@media (max-width: 860px) {
  .wb2-line-modal { padding:16px; }
  .wb2-line-modal__head,
  .wb2-line-modal__body,
  .wb2-line-modal__footer { padding-left:18px; padding-right:18px; }
  .wb2-line-modal__intro-grid,
  .wb2-line-modal__intro-grid.is-manual,
  .wb2-line-modal__metrics-grid,
  .wb2-line-modal__advanced-grid--three,
  .wb2-line-modal__advanced-grid--two,
  .wb2-line-modal__advanced-grid--discount { grid-template-columns:1fr; }
  .wb2-line-modal__field--span-2 { grid-column:auto; }
  .wb2-line-modal__footer {
    flex-direction:column;
    align-items:stretch;
  }
  .wb2-line-modal__actions {
    width:100%;
    justify-content:flex-end;
  }
  .wb2-step6-composer__head {
    flex-direction:column;
    align-items:flex-start;
  }
  .wb2-step6-composer__actions {
    width:100%;
    justify-content:flex-start;
  }
  .wb2-section-head {
    flex-direction:column;
    align-items:flex-start;
  }
}

@media (max-width: 980px) {
  .wb2-step6-shell__grid { grid-template-columns:1fr; }
  .wb2-step6-shell__aside {
    position:static;
    top:auto;
  }
}

@media (max-width: 900px) {
  .home-command-layout { grid-template-columns:1fr; }
  .home-command-bar { grid-template-columns:1fr; }
  .home-calc-results { grid-template-columns:1fr 1fr; }
}

/* ============================================================
   Settings Page � DreamFlow M3 Styles
   ============================================================ */

/* Layout */
.settings-layout { display:grid; grid-template-columns:1fr 340px; gap:20px; padding:20px 24px; }
.settings-rail { display:flex; flex-direction:column; gap:16px; }

/* Hero */
.settings-hero { margin:0 24px 16px; }
.settings-hero__head { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; margin-bottom:20px; flex-wrap:wrap; }
.settings-hero__brand { display:flex; align-items:center; gap:16px; }
.settings-brand-lockup { width:64px; height:64px; border-radius:var(--radius-lg); overflow:hidden; flex-shrink:0; }
.settings-brand-lockup img { width:100%; height:100%; object-fit:contain; }
.settings-brand-fallback { width:64px; height:64px; border-radius:var(--radius-lg); background:var(--studio-blue); display:flex; align-items:center; justify-content:center; font-size:22px; font-weight:900; color:#fff; letter-spacing:-0.02em; }
.settings-hero__copy h2 { font-size:20px; font-weight:900; color:var(--text-primary); margin:4px 0 6px; }
.settings-hero__copy p { font-size:13px; color:var(--text-secondary); margin:0 0 10px; }
.settings-hero__aside { display:flex; flex-direction:column; align-items:flex-end; gap:6px; }
.settings-kicker { display:inline-block; font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:.1em; color:var(--text-tertiary); margin-bottom:4px; }
.settings-chip-row { display:flex; gap:6px; flex-wrap:wrap; }
.settings-chip { display:inline-flex; align-items:center; height:24px; padding:0 10px; border-radius:999px; background:var(--surface-elevated); border:1px solid var(--border-soft); font-size:11px; font-weight:700; color:var(--text-secondary); }
.settings-chip--accent { background:rgba(99,102,241,.12); border-color:rgba(99,102,241,.25); color:#4f46e5; }
.settings-chip--success { background:rgba(30,142,62,.12); border-color:rgba(30,142,62,.25); color:var(--studio-green); }
.settings-hero__metrics { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; padding-top:16px; border-top:1px solid var(--border-soft); }
.settings-metric { display:flex; flex-direction:column; gap:2px; }
.settings-metric span { font-size:11px; color:var(--text-tertiary); text-transform:uppercase; letter-spacing:.06em; font-weight:700; }
.settings-metric strong { font-size:16px; font-weight:900; color:var(--text-primary); }
.settings-metric small { font-size:11px; color:var(--text-secondary); }

/* Cards */
.settings-card { margin-bottom:0; }
.settings-card__header { margin-bottom:20px; padding-bottom:16px; border-bottom:1px solid var(--border-soft); }
.settings-card__eyebrow { font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:.1em; color:var(--text-tertiary); display:block; margin-bottom:4px; }
.settings-card__header h2 { font-size:16px; font-weight:800; color:var(--text-primary); margin:4px 0 6px; }
.settings-card__header p { font-size:13px; color:var(--text-secondary); margin:0; }

/* Split body (form + preview aside) */
.settings-card__body--split { display:grid; grid-template-columns:1fr 280px; gap:24px; align-items:start; }
.settings-stack { display:flex; flex-direction:column; gap:24px; }

/* Form blocks */
.settings-form-block { display:flex; flex-direction:column; gap:14px; }
.settings-form-block--compact { gap:10px; }
.settings-block-head { margin-bottom:4px; }
.settings-block-head h3 { font-size:14px; font-weight:800; color:var(--text-primary); margin:4px 0 4px; }
.settings-block-head p { font-size:12px; color:var(--text-secondary); margin:0; }
.settings-block-head--tight h3 { font-size:13px; margin:2px 0 2px; }

/* Form grid */
.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.form-group { display:flex; flex-direction:column; gap:6px; }
.form-group--full { grid-column:1 / -1; }
.form-group label { font-size:12px; font-weight:700; color:var(--text-secondary); text-transform:uppercase; letter-spacing:.05em; }
.form-group input, .form-group select, .form-group textarea { padding:9px 12px; border:1px solid var(--border-medium); border-radius:var(--radius-md); background:var(--surface-bg); color:var(--text-primary); font:inherit; font-size:13px; }
.form-group textarea { resize:vertical; min-height:70px; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline:none; border-color:var(--studio-blue); box-shadow:0 0 0 3px rgba(37,99,235,.15); }

/* Buttons */
.btn { display:inline-flex; align-items:center; justify-content:center; height:36px; padding:0 16px; border-radius:var(--radius-md); font:inherit; font-size:13px; font-weight:700; cursor:pointer; border:1px solid transparent; transition:all 120ms; text-decoration:none; }
.btn-primary { background:var(--studio-blue); color:#fff; border-color:var(--studio-blue); }
.btn-primary:hover { background:#1d4ed8; }
.btn-secondary { background:var(--surface-elevated); color:var(--text-primary); border-color:var(--border-medium); }
.btn-secondary:hover { background:var(--surface-card); }
.btn-danger { background:rgba(220,38,38,.1); color:#dc2626; border-color:rgba(220,38,38,.3); }
.btn-danger:hover { background:rgba(220,38,38,.2); }

/* Settings actions row */
.settings-actions { display:flex; gap:8px; flex-wrap:wrap; padding-top:8px; }

/* Preview card (aside) */
.settings-preview-card { border:1px solid var(--border-soft); border-radius:var(--radius-xl); overflow:hidden; }
.settings-preview-card__surface { padding:20px; background:var(--surface-bg); }
.settings-preview-brand { display:flex; align-items:center; gap:12px; margin-bottom:16px; padding-bottom:14px; border-bottom:1px solid var(--border-soft); }
.settings-preview-brand__logo { width:40px; height:40px; border-radius:var(--radius-md); overflow:hidden; flex-shrink:0; }
.settings-preview-brand__logo img { width:100%; height:100%; object-fit:contain; }
.settings-preview-brand__copy strong { display:block; font-size:13px; font-weight:800; color:var(--text-primary); }
.settings-preview-brand__copy span { font-size:11px; color:var(--text-secondary); }
.settings-preview-list { display:flex; flex-direction:column; gap:8px; }
.settings-preview-list__row { display:flex; justify-content:space-between; gap:8px; font-size:12px; }
.settings-preview-list__row span { color:var(--text-secondary); }
.settings-preview-list__row strong { color:var(--text-primary); font-weight:700; text-align:right; }

/* Logo manager */
.settings-logo-manager { padding:16px 20px; border-top:1px solid var(--border-soft); }
.settings-logo-preview { display:block; width:100%; max-height:80px; object-fit:contain; margin-bottom:10px; border-radius:var(--radius-md); background:var(--surface-bg); }
.settings-logo-preview.is-hidden { display:none; }
.settings-upload-input { display:none; }

/* Doc grid (PDF templates) */
.settings-doc-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px; margin-bottom:16px; }
.settings-doc-card { padding:16px; border:1px solid var(--border-soft); border-radius:var(--radius-lg); background:var(--surface-bg); }
.settings-doc-card h3 { font-size:13px; font-weight:800; color:var(--text-primary); margin:4px 0 8px; }
.settings-doc-card p { font-size:12px; color:var(--text-secondary); margin:0 0 12px; }

/* Toggles */
.settings-toggle-grid { display:flex; flex-direction:column; gap:12px; margin-bottom:16px; padding:16px; background:var(--surface-bg); border-radius:var(--radius-lg); border:1px solid var(--border-soft); }
.settings-toggle { display:flex; align-items:flex-start; gap:12px; cursor:pointer; }
.settings-toggle input[type="checkbox"] { width:18px; height:18px; margin-top:2px; accent-color:var(--studio-blue); flex-shrink:0; }
.settings-toggle span { display:flex; flex-direction:column; gap:2px; }
.settings-toggle strong { font-size:13px; color:var(--text-primary); font-weight:700; }
.settings-toggle small { font-size:12px; color:var(--text-secondary); }

/* Theme picker */
.settings-theme-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-bottom:16px; }
.settings-theme-option { cursor:pointer; }
.settings-theme-option input { display:none; }
.settings-theme-card { display:flex; flex-direction:column; gap:6px; padding:14px; border-radius:var(--radius-lg); border:2px solid var(--border-soft); transition:all 150ms; }
.settings-theme-option input:checked + .settings-theme-card { border-color:var(--studio-blue); box-shadow:0 0 0 3px rgba(37,99,235,.15); }
.settings-theme-card--dark { background:#0f172a; }
.settings-theme-card--dark strong, .settings-theme-card--dark small { color:#e2e8f0; }
.settings-theme-card--light { background:#f8fafc; border-color:#e2e8f0; }
.settings-theme-card--light strong, .settings-theme-card--light small { color:#1e293b; }
.settings-theme-card__preview { display:flex; gap:4px; height:32px; margin-bottom:8px; }
.settings-theme-bar { width:30%; border-radius:4px; background:rgba(255,255,255,.15); }
.settings-theme-card--light .settings-theme-bar { background:rgba(0,0,0,.1); }
.settings-theme-panel { flex:1; border-radius:4px; background:rgba(255,255,255,.08); }
.settings-theme-card--light .settings-theme-panel { background:rgba(0,0,0,.06); }
.settings-theme-card strong { font-size:13px; font-weight:800; }
.settings-theme-card small { font-size:11px; opacity:.7; }

/* Connection cards */
.settings-connection-card { padding:14px 16px; border-radius:var(--radius-md); background:var(--surface-bg); border:1px solid var(--border-soft); margin-bottom:12px; }
.settings-connection-card strong { display:block; font-size:13px; font-weight:800; color:var(--text-primary); margin-bottom:4px; }
.settings-connection-card span { font-size:12px; color:var(--text-secondary); }
.settings-connection-card--soft { background:rgba(37,99,235,.05); border-color:rgba(37,99,235,.2); }
.settings-connection-card--success { background:rgba(30,142,62,.08); border-color:rgba(30,142,62,.25); }
.settings-connection-card--error { background:rgba(220,38,38,.08); border-color:rgba(220,38,38,.25); }

/* Hint fields (copy-to-clipboard) */
.settings-hint-list { display:flex; flex-direction:column; gap:10px; margin-bottom:14px; }
.settings-hint-field label { font-size:11px; font-weight:700; color:var(--text-tertiary); text-transform:uppercase; letter-spacing:.05em; display:block; margin-bottom:4px; }
.settings-hint-copy { display:flex; gap:6px; }
.settings-hint-copy input { flex:1; padding:7px 10px; border:1px solid var(--border-soft); border-radius:var(--radius-md); background:var(--surface-bg); color:var(--text-secondary); font-size:12px; font-family:monospace; }

/* Quick links */
.settings-quicklinks-empty { font-size:13px; color:var(--text-tertiary); padding:12px 0; }
.settings-link-row { display:grid; grid-template-columns:1fr 1fr auto; gap:8px; margin-bottom:8px; }
.settings-link-row input { padding:8px 10px; border:1px solid var(--border-medium); border-radius:var(--radius-md); background:var(--surface-bg); color:var(--text-primary); font:inherit; font-size:13px; }

/* Edit lock */
.settings-section-readonly-note { font-size:12px; color:var(--text-tertiary); margin-bottom:8px; padding:8px 12px; border-radius:var(--radius-md); background:var(--surface-elevated); border:1px solid var(--border-soft); }
.settings-section-fieldset { border:none; padding:0; margin:0; }
.settings-section-fieldset.is-locked { opacity:.65; pointer-events:none; }
.settings-section-fieldset.is-editing { opacity:1; pointer-events:auto; }

/* Status message */
.settings-status { display:none; padding:8px 14px; border-radius:var(--radius-md); font-size:13px; font-weight:700; margin-bottom:12px; }
.settings-status.is-visible { display:block; background:rgba(30,142,62,.1); border:1px solid rgba(30,142,62,.25); color:var(--studio-green); }
.settings-status.is-error { background:rgba(220,38,38,.1); border-color:rgba(220,38,38,.25); color:#dc2626; }

/* OpenAI status block */
.settings-ai-desc { font-size:12px; color:var(--text-secondary); margin:0 0 12px; line-height:1.5; }
.settings-ai-status { padding:12px; border-radius:var(--radius-md); background:var(--surface-bg); border:1px solid var(--border-soft); margin-bottom:12px; font-size:12px; color:var(--text-secondary); }

@media (max-width:960px) {
  .settings-layout { grid-template-columns:1fr; }
  .settings-card__body--split { grid-template-columns:1fr; }
  .settings-hero__metrics { grid-template-columns:1fr 1fr; }
  .settings-doc-grid { grid-template-columns:1fr; }
  .settings-theme-grid { grid-template-columns:1fr; }
  .settings-link-row { grid-template-columns:1fr 1fr auto; }
}

/* ============================================================
   SETTINGS � Google Material 3 Design System
   DreamFlow Studio � SaaS Shell
   ============================================================ */

/* Shell wrapper */
.settings-saas-shell {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 100%;
}

/* Page header */
.settings-page-header--saas {
  padding: 32px 32px 24px;
  border-bottom: 1px solid var(--border-soft);
  background: var(--surface-card);
}
.settings-page-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--studio-blue);
  margin-bottom: 4px;
}
.settings-page-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}
.settings-page-copy {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
  max-width: 540px;
  line-height: 1.55;
}

/* Status banner */
.settings-status-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 32px;
  font-size: 13px;
  font-weight: 600;
  border-bottom: 1px solid transparent;
}
.settings-status-banner.is-success {
  background: rgba(30,142,62,.08);
  border-color: rgba(30,142,62,.2);
  color: var(--studio-green);
}
.settings-status-banner.is-error {
  background: rgba(220,38,38,.08);
  border-color: rgba(220,38,38,.2);
  color: #dc2626;
}
.settings-status-banner.is-hidden { display:none; }

/* Mobile nav */
.settings-saas-mobile-nav {
  display: none;
  padding: 16px 20px;
  margin: 16px 20px 0;
  border-radius: var(--radius-lg);
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  gap: 8px;
  align-items: center;
}
.settings-saas-mobile-nav label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: .06em;
  white-space: nowrap;
}
.settings-saas-mobile-nav select {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  background: var(--surface-bg);
  color: var(--text-primary);
  font: inherit;
  font-size: 14px;
}

/* Layout: sidebar + main */
.settings-saas-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 0;
  flex: 1;
  min-height: 0;
}

.settings-saas-layout--reference {
  grid-template-columns: 1fr;
}

/* SIDEBAR */
.settings-saas-sidebar {
  border-right: 1px solid var(--border-soft);
  background: var(--surface-card);
  display: flex;
  flex-direction: column;
  padding: 20px 12px;
  gap: 4px;
  overflow-y: auto;
}
.settings-saas-sidebar__head {
  padding: 0 8px 16px;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 12px;
}
.settings-saas-sidebar__head .settings-page-kicker {
  font-size: 10px;
  margin-bottom: 2px;
}
.settings-saas-sidebar__head .section-title {
  font-size: 14px;
  margin: 0 0 2px;
}
.settings-saas-sidebar__head p {
  font-size: 12px;
  color: var(--text-tertiary);
  margin: 0;
  line-height: 1.4;
}
.settings-saas-sidebar__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.settings-saas-sidebar__item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border: none;
  border-radius: var(--radius-lg);
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: background 120ms, box-shadow 120ms;
  position: relative;
}
.settings-saas-sidebar__item:hover {
  background: var(--surface-elevated);
}
.settings-saas-sidebar__item.is-active {
  background: rgba(26, 115, 232, 0.1);
  box-shadow: inset 3px 0 0 var(--studio-blue);
}
.settings-saas-sidebar__eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.settings-saas-sidebar__item.is-active .settings-saas-sidebar__eyebrow {
  color: var(--studio-blue);
}
.settings-saas-sidebar__item strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  display: block;
}
.settings-saas-sidebar__item.is-active strong {
  color: var(--studio-blue);
}
.settings-saas-sidebar__copy {
  font-size: 11px;
  color: var(--text-tertiary);
  line-height: 1.4;
  display: block;
}
.settings-saas-sidebar__summary {
  display: none;
}

.settings-sensitive-card {
  border-color: var(--border-medium);
}

.settings-sensitive-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.settings-sensitive-list span {
  display: block;
  padding: 10px 12px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: var(--surface-bg);
  color: var(--text-secondary);
  font-size: 13px;
}

/* MAIN content pane */
.settings-saas-main {
  padding: 28px 32px;
  overflow-y: auto;
  background: var(--surface-bg);
}

/* Section panel */
.settings-saas-panel {
  background: var(--surface-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-soft);
  overflow: hidden;
}

/* Section header (with Edit/Cancel/Save) */
.settings-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--border-soft);
  background: var(--surface-card);
}
.settings-section-header__copy {
  flex: 1;
  min-width: 0;
}
.settings-section-header__copy .settings-card__eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--studio-blue);
  margin-bottom: 3px;
}
.settings-section-header__copy .section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 4px;
}
.settings-section-header__copy p {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}
.settings-section-header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding-top: 2px;
}
.settings-section-mode {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  letter-spacing: .04em;
}
.settings-section-mode.is-locked {
  background: rgba(148,163,184,.12);
  color: var(--text-tertiary);
}
.settings-section-mode.is-editing {
  background: rgba(26,115,232,.1);
  color: var(--studio-blue);
}

/* Forms within sections */
.settings-saas-form {
  padding: 24px;
}

/* Grids */
.settings-saas-grid {
  display: grid;
  gap: 20px;
}
.settings-saas-grid--company {
  grid-template-columns: 1fr 280px;
  align-items: start;
}
.settings-saas-grid--documents {
  grid-template-columns: 1fr 280px;
  align-items: start;
}
.settings-saas-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Card within a section */
.settings-saas-card {
  background: var(--surface-bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 20px;
}

/* Sticky preview aside */
.settings-saas-preview {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.settings-saas-preview--sticky {
  position: sticky;
  top: 0;
}
.settings-saas-logo-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.settings-saas-logo-stage {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
}
.settings-saas-logo-lockup {
  flex-shrink: 0;
}
.settings-saas-logo-meta {
  min-width: 0;
  overflow: hidden;
}
.settings-saas-logo-meta strong {
  display: block;
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.settings-saas-logo-meta span {
  font-size: 11px;
  color: var(--text-tertiary);
}
.settings-saas-preview-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.settings-saas-field-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
  margin-top: 4px;
}
.settings-saas-field-group:first-child {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

/* Live document preview */
.settings-doc-live {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.settings-doc-live__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-soft);
}
.settings-doc-live__head strong {
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 700;
}
.settings-doc-live__head span {
  font-size: 11px;
  color: var(--studio-blue);
  font-weight: 600;
}
.settings-doc-live__section {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.settings-doc-live__section > span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.settings-doc-live__section > p {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

/* AI tools row */
.settings-ai-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.settings-ai-tools .btn {
  font-size: 11px;
  padding: 4px 10px;
}
.settings-stack--compact {
  display: grid;
  gap: 18px;
}
.settings-grid--compact {
  display: grid;
  gap: 18px;
}

/* Integration grid */
.settings-integration-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  padding-top: 4px;
}
.settings-integration-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.settings-integrations-hero {
  padding: 22px 24px;
  border: 1px solid rgba(49,74,99,.16);
  background: linear-gradient(180deg, rgba(49,74,99,.06) 0%, rgba(251,251,250,.98) 100%);
}
.settings-integrations-hero__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.settings-integrations-hero__copy {
  max-width: 620px;
}
.settings-integrations-hero--detail .settings-integrations-hero__copy {
  display: grid;
  gap: 8px;
}
.settings-integrations-back {
  width: max-content;
  margin-bottom: 4px;
}
.settings-integrations-hero__copy .settings-kicker {
  color: var(--studio-blue);
}
.settings-integrations-hero__copy h3 {
  margin: 6px 0 8px;
  font-size: 28px;
  line-height: 1.1;
  color: var(--text-primary);
}
.settings-integrations-hero__copy p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.65;
}
.settings-app-chip-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.settings-app-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-full);
  background: var(--surface-white);
  border: 1px solid var(--border-soft);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 700;
}
.settings-app-chip[data-tone="ai"] { border-color: rgba(49,74,99,.16); }
.settings-app-chip[data-tone="gmail"] { border-color: rgba(168,86,86,.18); }
.settings-app-chip[data-tone="calendar"] { border-color: rgba(79,117,91,.18); }
.settings-app-chip[data-tone="quickbooks"] { border-color: rgba(79,117,91,.22); }
.settings-connected-apps-list {
  display: grid;
  gap: 14px;
}
.settings-connected-apps-list__rows {
  display: grid;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface-white);
}
.settings-connected-app-row {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 88px;
  padding: 14px 16px;
  border: 0;
  border-bottom: 1px solid var(--border-soft);
  background: transparent;
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
}
.settings-connected-app-row:last-child {
  border-bottom: 0;
}
.settings-connected-app-row:hover,
.settings-connected-app-row:focus-visible {
  background: var(--surface-elevated);
}
.settings-connected-app-row__icon {
  display: inline-flex;
  grid-column: 1;
  grid-row: 1 / span 2;
}
.settings-connected-app-row__copy {
  display: grid;
  gap: 3px;
  min-width: 0;
  grid-column: 2;
  grid-row: 1;
}
.settings-connected-app-row__copy strong {
  font-size: 16px;
  line-height: 1.2;
}
.settings-connected-app-row__copy small {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.4;
}
.settings-connected-app-row__meta {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  white-space: normal;
  grid-column: 2;
  grid-row: 2;
}
.settings-connected-app-row__action {
  pointer-events: none;
  white-space: nowrap;
  grid-column: 3;
  grid-row: 1 / span 2;
}
.settings-integration-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.settings-integration-header__main {
  display: flex;
  align-items: center;
  gap: 12px;
}
.settings-integration-header__copy h3 {
  margin: 2px 0 4px;
  font-size: 20px;
  color: var(--text-primary);
}
.settings-integration-header__copy p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
}
.settings-integration-logo {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .02em;
  box-shadow: var(--shadow-xs);
  flex-shrink: 0;
}
.settings-integration-logo.is-compact {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  font-size: 10px;
}
.settings-integration-logo[data-tone="ai"] {
  background: linear-gradient(135deg, #314a63 0%, #516173 100%);
}
.settings-integration-logo[data-tone="gmail"] {
  background: linear-gradient(135deg, #a85656 0%, #c27b58 100%);
}
.settings-integration-logo[data-tone="calendar"] {
  background: linear-gradient(135deg, #4f755b 0%, #6f957a 100%);
}
.settings-integration-logo[data-tone="quickbooks"] {
  background: linear-gradient(135deg, #3f6b49 0%, #5f8b69 100%);
}
.settings-integration-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  background: var(--surface-elevated);
  color: var(--studio-blue);
}
.settings-integration-badge[data-tone="ai"] {
  background: rgba(49,74,99,.10);
  border-color: rgba(49,74,99,.16);
  color: var(--studio-blue);
}
.settings-integration-badge[data-tone="gmail"] {
  background: rgba(168,86,86,.10);
  border-color: rgba(168,86,86,.16);
  color: var(--studio-red);
}
.settings-integration-badge[data-tone="calendar"],
.settings-integration-badge[data-tone="quickbooks"] {
  background: rgba(79,117,91,.10);
  border-color: rgba(79,117,91,.16);
  color: var(--studio-green);
}

/* Connection status card */
.settings-connection-card {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--surface-elevated);
  border: 1px solid var(--border-soft);
  font-size: 13px;
}
.settings-connection-card strong {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 12px;
}
.settings-connection-card span {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.4;
}
.settings-connection-card.is-success {
  background: rgba(30,142,62,.07);
  border-color: rgba(30,142,62,.2);
}
.settings-connection-card.is-success strong { color: var(--studio-green); }
.settings-connection-card.is-error {
  background: rgba(220,38,38,.07);
  border-color: rgba(220,38,38,.2);
}
.settings-connection-card.is-error strong { color: #dc2626; }
.settings-connection-card--soft {
  background: rgba(26,115,232,.05);
  border-color: rgba(26,115,232,.15);
}
.settings-connection-card--flush {
  margin: 0;
}
.settings-connection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.settings-details {
  margin-top: 14px;
}
.settings-details > summary {
  cursor: pointer;
  font-weight: 800;
  list-style: none;
}
.settings-details > summary::-webkit-details-marker {
  display: none;
}
.settings-details__body {
  margin-top: 12px;
  display: grid;
  gap: 12px;
}
.settings-details__body--relaxed {
  gap: 14px;
}
.settings-helper-note {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.55;
}
.settings-form-group--spaced {
  margin-top: 14px;
}
.settings-actions--compact {
  margin-top: 10px;
  gap: 8px;
}
.settings-actions--dense {
  margin-top: 14px;
  gap: 10px;
}
.settings-flow-stack {
  display: grid;
  gap: 12px;
}
.settings-flow-card {
  padding: 14px;
  border: 1px solid rgba(79,117,91,.12);
  border-radius: var(--radius-lg);
  background: rgba(248,250,252,.88);
}
.settings-flow-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.settings-flow-card__copy {
  min-width: 0;
}
.settings-flow-card__kicker {
  margin-bottom: 4px;
}
.settings-flow-card__title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
}
.settings-flow-card__direction {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: var(--radius-full);
  background: rgba(79,117,91,.08);
  color: #3f6b49;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Tax/defaults sub-section */
.settings-tax-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.settings-tax-metric {
  background: var(--surface-bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.settings-tax-metric__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.settings-tax-metric__value {
  font-size: 28px;
  font-weight: 700;
  color: var(--studio-blue);
  letter-spacing: -0.02em;
}
.settings-tax-metric__desc {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Appearance theme grid */
.settings-theme-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}
.settings-theme-option {
  cursor: pointer;
}
.settings-theme-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.settings-theme-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 2px solid var(--border-soft);
  cursor: pointer;
  transition: border-color 150ms, box-shadow 150ms;
}
.settings-theme-option input:checked + .settings-theme-card {
  border-color: var(--studio-blue);
  box-shadow: 0 0 0 3px rgba(26,115,232,.15);
}
.settings-theme-card--dark {
  background: #1a1f2e;
}
.settings-theme-card--light {
  background: #f8fafc;
}
.settings-theme-card__preview {
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 48px;
}
.settings-theme-bar {
  height: 10px;
  border-radius: 3px;
  background: rgba(26,115,232,.5);
  width: 60%;
}
.settings-theme-panel {
  flex: 1;
  border-radius: 3px;
  background: rgba(148,163,184,.15);
}
.settings-theme-card--dark .settings-theme-bar { background: rgba(96,165,250,.6); }
.settings-theme-card--dark .settings-theme-panel { background: rgba(255,255,255,.06); }
.settings-theme-card strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  display: block;
}
.settings-theme-card--dark strong { color: #e2e8f0; }
.settings-theme-card--light strong { color: #1e293b; }
.settings-theme-card small {
  font-size: 11px;
  color: var(--text-tertiary);
  line-height: 1.4;
  display: block;
}
.settings-theme-card--dark small { color: #94a3b8; }
.settings-theme-card--light small { color: #64748b; }

/* Toggle switches */
.settings-toggle-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: 16px;
}
.settings-toggle {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 18px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-soft);
  transition: background 120ms;
}
.settings-toggle:last-child { border-bottom: none; }
.settings-toggle:hover { background: var(--surface-elevated); }
.settings-toggle input[type="checkbox"] {
  margin-top: 2px;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  accent-color: var(--studio-blue);
}
.settings-toggle span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.settings-toggle strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.settings-toggle small {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Access section � user list */
.settings-access-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.settings-users-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.settings-user-row {
  display: grid;
  grid-template-columns: 36px 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-soft);
  transition: background 120ms;
}
.settings-user-row:last-child { border-bottom: none; }
.settings-user-row:hover { background: var(--surface-elevated); }
.settings-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(26,115,232,.12);
  color: var(--studio-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.settings-user-info {
  min-width: 0;
  overflow: hidden;
}
.settings-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.settings-user-email {
  font-size: 11px;
  color: var(--text-tertiary);
}
.settings-user-status-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.settings-user-status-badge.is-active {
  background: rgba(30,142,62,.1);
  color: var(--studio-green);
}
.settings-user-status-badge.is-inactive {
  background: rgba(148,163,184,.15);
  color: var(--text-tertiary);
}

/* Hint copy fields */
.settings-hint-list { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.settings-hint-field { display: flex; flex-direction: column; gap: 4px; }
.settings-hint-field > label { font-size: 11px; font-weight: 600; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: .05em; }
.settings-hint-copy { display: flex; gap: 6px; align-items: center; }
.settings-hint-copy input { flex: 1; }

/* Responsive */
@media (max-width: 1024px) {
  .settings-saas-grid--company,
  .settings-saas-grid--documents { grid-template-columns: 1fr; }
  .settings-saas-preview--sticky { position: static; }
}
@media (max-width: 960px) {
  .settings-saas-layout { grid-template-columns: 1fr; }
  .settings-saas-sidebar { display: none; }
  .settings-saas-mobile-nav { display: flex; }
  .settings-saas-main { padding: 16px; }
  .settings-page-header--saas { padding: 20px 16px 16px; }
  .settings-tax-grid { grid-template-columns: 1fr; }
  .settings-theme-grid { grid-template-columns: 1fr; }
  .settings-integration-grid { grid-template-columns: 1fr; }
  .settings-connected-app-row { grid-template-columns: auto minmax(0, 1fr); }
  .settings-connected-app-row__icon { grid-row: 1 / span 3; }
  .settings-connected-app-row__meta,
  .settings-connected-app-row__action { grid-column: 2; grid-row: auto; }
  .settings-integrations-hero__head,
  .settings-integration-header,
  .settings-flow-card__head { flex-direction: column; align-items: flex-start; }
}

/* -- Access Section ------------------------------------------- */
.settings-access-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.settings-access-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.settings-access-stat {
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.settings-access-stat > span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.settings-access-stat > strong {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: capitalize;
}
.settings-inline-note {
  font-size: 12px;
  color: var(--studio-blue);
  background: rgba(26,115,232,.07);
  border: 1px solid rgba(26,115,232,.18);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  line-height: 1.5;
}
.settings-access-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.settings-access-table {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.settings-access-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-soft);
  transition: background 120ms;
}
.settings-access-user-row:last-child { border-bottom: none; }
.settings-access-user-row:hover { background: var(--surface-elevated); }
.settings-access-user-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.settings-access-user-copy > strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.settings-access-user-copy > span {
  font-size: 12px;
  color: var(--text-secondary);
}
.settings-access-user-copy > small {
  font-size: 11px;
  color: var(--text-tertiary);
}
.settings-access-user-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.settings-access-user-controls select {
  padding: 6px 10px;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  background: var(--surface-bg);
  color: var(--text-primary);
  font: inherit;
  font-size: 12px;
  text-transform: capitalize;
}

/* chip variants used in access */
.settings-chip--success {
  background: rgba(30,142,62,.1);
  color: var(--studio-green);
}

/* -- Settings actions row ------------------------------------- */
.settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}


/* ================================================================
   BUILDER ENGINE DESIGN TOKENS
   Shared --df-* variables used by the active builder and app surfaces.
   Legacy styles.css has been retired; studio.css is the deployable source.
   IMPORTANT: Do not remove; the builder depends on these tokens.
   ================================================================ */
:root {
  --df-bg: #0b0f19;
  --df-bg-elevated: #111827;
  --df-surface: rgba(18, 24, 38, 0.86);
  --df-surface-alt: #111b2a;
  --df-surface-deep: #172234;
  --df-card: rgba(18, 24, 38, 0.94);
  --df-card-strong: #0f1724;
  --df-border: rgba(255, 255, 255, 0.1);
  --df-border-strong: rgba(255, 255, 255, 0.18);
  --df-line-soft: rgba(255, 255, 255, 0.06);
  --df-text: #eef4ff;
  --df-text-muted: #94a3b8;
  --df-text-subtle: #64748b;
  --df-text-inverse: #f8fbff;
  --df-primary: #3b82f6;
  --df-primary-hover: #2563eb;
  --df-primary-strong: #1d4ed8;
  --df-primary-soft: rgba(59, 130, 246, 0.16);
  --df-primary-ring: rgba(59, 130, 246, 0.28);
  --df-primary-gradient: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 55%, #93c5fd 100%);
  --df-primary-light: rgba(59, 130, 246, 0.12);
  --df-focus-ring: #93c5fd;
  --df-focus-glow: rgba(59, 130, 246, 0.28);
  --df-success: #10b981;
  --df-success-bg: rgba(16, 185, 129, 0.14);
  --df-stepbar-surface: linear-gradient(180deg, rgba(12, 24, 21, 0.94) 0%, rgba(14, 28, 24, 0.88) 100%);
  --df-stepbar-border: rgba(110, 231, 183, 0.12);
  --df-stepbar-shadow: 0 6px 18px rgba(3, 12, 10, 0.14);
  --df-stepbar-pill-bg: rgba(17, 35, 30, 0.76);
  --df-stepbar-pill-hover: rgba(22, 45, 38, 0.94);
  --df-stepbar-pill-border: rgba(148, 163, 184, 0.14);
  --df-stepbar-pill-complete: rgba(52, 211, 153, 0.11);
  --df-stepbar-pill-complete-border: rgba(110, 231, 183, 0.16);
  --df-stepbar-pill-active: linear-gradient(135deg, #e8f7ef 0%, #d3f2e2 52%, #b8e8cf 100%);
  --df-stepbar-pill-active-border: rgba(110, 231, 183, 0.4);
  --df-stepbar-text: #e7fff5;
  --df-stepbar-text-muted: #95b8ab;
  --df-stepbar-text-subtle: #74a393;
  --df-stepbar-complete-text: #d1fae5;
  --df-stepbar-active-text: #0f3f2f;
  --df-stepbar-active-kicker: #166534;
  --df-stepbar-badge-bg: rgba(239, 68, 68, 0.14);
  --df-stepbar-badge-text: #fca5a5;
  --df-step5-shell-bg: #dbe3ec;
  --df-step5-topbar-bg: #c8d2de;
  --df-step5-workspace-bg: #e3e9f0;
  --df-step5-panel-bg: #d4dde7;
  --df-step5-head-bg: rgba(205, 214, 225, 0.96);
  --df-step5-toolbar-bg: rgba(216, 224, 233, 0.96);
  --df-step5-toolbar-border: rgba(73, 90, 110, 0.18);
  --df-step5-empty-bg: rgba(255, 255, 255, 0.46);
  --df-warning: #f59e0b;
  --df-warning-bg: rgba(245, 158, 11, 0.14);
  --df-error: #ef4444;
  --df-error-bg: rgba(239, 68, 68, 0.14);
  --df-info: #3b82f6;
  --df-info-bg: rgba(59, 130, 246, 0.14);
  --df-radius-sm: 10px;
  --df-radius-md: 12px;
  --df-radius-lg: 16px;
  --df-radius-xl: 20px;
  --df-radius-pill: 999px;
  --df-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.24);
  --df-shadow-sm: 0 10px 30px rgba(0, 0, 0, 0.28);
  --df-shadow-md: 0 18px 50px rgba(0, 0, 0, 0.38);
  --df-shadow-lg: 0 28px 80px rgba(0, 0, 0, 0.48);
  --df-shadow-float: 0 48px 120px rgba(0, 0, 0, 0.6);
  --df-transition: 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
  --df-bg: #e7ebef;
  --df-bg-elevated: #f2f5f7;
  --df-surface: rgba(247, 248, 248, 0.90);
  --df-surface-alt: #edf1f4;
  --df-surface-deep: #dde4ea;
  --df-card: rgba(251, 251, 250, 0.96);
  --df-card-strong: #ffffff;
  --df-border: rgba(31, 41, 51, 0.12);
  --df-border-strong: rgba(31, 41, 51, 0.18);
  --df-line-soft: rgba(31, 41, 51, 0.06);
  --df-text: #1d2731;
  --df-text-muted: #5c6a7b;
  --df-text-subtle: #788595;
  --df-text-inverse: #ffffff;
  --df-primary: #314a63;
  --df-primary-hover: #263a4e;
  --df-primary-strong: #213246;
  --df-primary-soft: rgba(49, 74, 99, 0.12);
  --df-primary-ring: rgba(49, 74, 99, 0.18);
  --df-primary-gradient: linear-gradient(135deg, #2a4056 0%, #54697e 100%);
  --df-primary-light: rgba(49, 74, 99, 0.10);
  --df-focus-ring: #54697e;
  --df-focus-glow: rgba(49, 74, 99, 0.18);
  --df-success: #4f755b;
  --df-success-bg: rgba(79, 117, 91, 0.12);
  --df-stepbar-surface: linear-gradient(180deg, rgba(247, 248, 247, 0.98) 0%, rgba(240, 244, 241, 0.94) 100%);
  --df-stepbar-border: rgba(79, 117, 91, 0.12);
  --df-stepbar-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
  --df-stepbar-pill-bg: rgba(251, 251, 250, 0.94);
  --df-stepbar-pill-hover: rgba(246, 248, 246, 0.98);
  --df-stepbar-pill-border: rgba(31, 41, 51, 0.10);
  --df-stepbar-pill-complete: rgba(79, 117, 91, 0.06);
  --df-stepbar-pill-complete-border: rgba(79, 117, 91, 0.14);
  --df-stepbar-pill-active: linear-gradient(135deg, #eef2f5 0%, #e5ebf1 50%, #dde6ee 100%);
  --df-stepbar-pill-active-border: rgba(49, 74, 99, 0.18);
  --df-stepbar-text: #253242;
  --df-stepbar-text-muted: #5a6a79;
  --df-stepbar-text-subtle: #7a8997;
  --df-stepbar-complete-text: #335342;
  --df-stepbar-active-text: #213246;
  --df-stepbar-active-kicker: #4f755b;
  --df-stepbar-badge-bg: rgba(168, 86, 86, 0.08);
  --df-stepbar-badge-text: #a85656;
  --df-step5-shell-bg: #e4e8ed;
  --df-step5-topbar-bg: #d8dee5;
  --df-step5-workspace-bg: #edf1f5;
  --df-step5-panel-bg: #e0e6ed;
  --df-step5-head-bg: rgba(228, 233, 239, 0.96);
  --df-step5-toolbar-bg: rgba(235, 239, 243, 0.96);
  --df-step5-toolbar-border: rgba(49, 74, 99, 0.14);
  --df-step5-empty-bg: rgba(255, 255, 255, 0.62);
  --df-warning: #a87939;
  --df-warning-bg: rgba(168, 121, 57, 0.12);
  --df-error: #a85656;
  --df-error-bg: rgba(168, 86, 86, 0.12);
  --df-info: #4c6988;
  --df-info-bg: rgba(76, 105, 136, 0.12);
}

html:not([data-theme]),
html[data-theme="dark"],
body:not([data-theme]),
body[data-theme="dark"] {
  --df-bg: #0b0f19;
  --df-bg-elevated: #111827;
  --df-surface: rgba(18, 24, 38, 0.86);
  --df-surface-alt: #111b2a;
  --df-surface-deep: #172234;
  --df-card: rgba(18, 24, 38, 0.94);
  --df-card-strong: #0f1724;
  --df-border: rgba(255, 255, 255, 0.1);
  --df-border-strong: rgba(255, 255, 255, 0.18);
  --df-line-soft: rgba(255, 255, 255, 0.06);
  --df-text: #eef4ff;
  --df-text-muted: #94a3b8;
  --df-text-subtle: #64748b;
  --df-text-inverse: #f8fbff;
  --df-primary: #3b82f6;
  --df-primary-hover: #2563eb;
  --df-primary-strong: #1d4ed8;
  --df-primary-soft: rgba(59, 130, 246, 0.16);
  --df-primary-ring: rgba(59, 130, 246, 0.28);
  --df-primary-gradient: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 55%, #93c5fd 100%);
  --df-primary-light: rgba(59, 130, 246, 0.12);
  --df-focus-ring: #93c5fd;
  --df-focus-glow: rgba(59, 130, 246, 0.28);
  --df-success: #10b981;
  --df-success-bg: rgba(16, 185, 129, 0.14);
  --df-stepbar-surface: linear-gradient(180deg, rgba(12, 24, 21, 0.94) 0%, rgba(14, 28, 24, 0.88) 100%);
  --df-stepbar-border: rgba(110, 231, 183, 0.12);
  --df-stepbar-shadow: 0 6px 18px rgba(3, 12, 10, 0.14);
  --df-stepbar-pill-bg: rgba(17, 35, 30, 0.76);
  --df-stepbar-pill-hover: rgba(22, 45, 38, 0.94);
  --df-stepbar-pill-border: rgba(148, 163, 184, 0.14);
  --df-stepbar-pill-complete: rgba(52, 211, 153, 0.11);
  --df-stepbar-pill-complete-border: rgba(110, 231, 183, 0.16);
  --df-stepbar-pill-active: linear-gradient(135deg, #e8f7ef 0%, #d3f2e2 52%, #b8e8cf 100%);
  --df-stepbar-pill-active-border: rgba(110, 231, 183, 0.4);
  --df-stepbar-text: #e7fff5;
  --df-stepbar-text-muted: #95b8ab;
  --df-stepbar-text-subtle: #74a393;
  --df-stepbar-complete-text: #d1fae5;
  --df-stepbar-active-text: #0f3f2f;
  --df-stepbar-active-kicker: #166534;
  --df-stepbar-badge-bg: rgba(239, 68, 68, 0.14);
  --df-stepbar-badge-text: #fca5a5;
  --df-step5-shell-bg: #dbe3ec;
  --df-step5-topbar-bg: #c8d2de;
  --df-step5-workspace-bg: #e3e9f0;
  --df-step5-panel-bg: #d4dde7;
  --df-step5-head-bg: rgba(205, 214, 225, 0.96);
  --df-step5-toolbar-bg: rgba(216, 224, 233, 0.96);
  --df-step5-toolbar-border: rgba(73, 90, 110, 0.18);
  --df-step5-empty-bg: rgba(255, 255, 255, 0.46);
  --df-warning: #f59e0b;
  --df-warning-bg: rgba(245, 158, 11, 0.14);
  --df-error: #ef4444;
  --df-error-bg: rgba(239, 68, 68, 0.14);
  --df-info: #3b82f6;
  --df-info-bg: rgba(59, 130, 246, 0.14);
}

/* -- Canvas area dark background (engine uses --df-bg as canvas host bg) -- */
body.is-builder #builder-canvas-area,
body.is-builder .builder-main,
body.is-builder .canvas-host {
  background: var(--df-bg, #0b0f19) !important;
}

/* Premium polish: assistant */
.global-ai-chat {
  position:fixed;
  top:16px;
  right:16px;
  bottom:16px;
  width:min(430px,calc(100vw - 32px));
  z-index:150;
  display:flex;
  flex-direction:column;
  background:var(--surface-card);
  border:1px solid var(--border-medium);
  border-radius:24px;
  box-shadow:var(--shadow-xl);
  transform:translateX(calc(100% + 24px));
  opacity:0;
  pointer-events:none;
  transition:transform .22s ease, opacity .22s ease;
  overflow:hidden;
}
.global-ai-chat.is-open {
  transform:translateX(0);
  opacity:1;
  pointer-events:auto;
}
.global-ai-chat__head {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding:18px 18px 16px;
  border-bottom:1px solid var(--border-soft);
  background:var(--surface-white);
}
.global-ai-chat__title-block {
  display:grid;
  gap:4px;
}
.global-ai-chat__eyebrow {
  display:inline-flex;
  align-items:center;
  width:max-content;
  padding:4px 10px;
  border-radius:999px;
  background:var(--surface-selected);
  color:var(--studio-blue);
  font-size:10px;
  font-weight:900;
  letter-spacing:.12em;
  text-transform:uppercase;
}
.global-ai-chat__head strong {
  display:block;
  font-size:21px;
  letter-spacing:-.03em;
  color:var(--text-primary);
}
.global-ai-chat__head small {
  display:block;
  margin-top:1px;
  color:var(--text-secondary);
  font-size:12px;
  line-height:1.45;
}
.global-ai-chat__head-actions {
  display:flex;
  align-items:center;
  gap:8px;
}
.global-ai-chat__control,
.global-ai-chat__secondary-control,
.global-ai-chat__send,
.global-ai-chat__close {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:36px;
  padding:0 14px;
  border-radius:var(--radius-sm);
  border:1px solid var(--border-soft);
  background:var(--surface-white);
  color:var(--text-primary);
  font-size:12px;
  font-weight:800;
  cursor:pointer;
  transition:background var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.global-ai-chat__close:hover,
.global-ai-chat__control:hover,
.global-ai-chat__secondary-control:hover {
  background:var(--surface-hover);
  border-color:var(--border-medium);
}
.global-ai-chat__control[data-active="true"],
.global-ai-chat__secondary-control[data-active="true"] {
  background:var(--surface-selected);
  color:var(--studio-blue);
  border-color:rgba(49,74,99,.18);
}
.global-ai-chat__messages {
  flex:1;
  min-height:0;
  overflow:auto;
  padding:18px;
  display:flex;
  flex-direction:column;
  gap:14px;
  background:var(--surface-bg);
}
.global-ai-chat__message { display:flex; }
.global-ai-chat__message--assistant { justify-content:flex-start; }
.global-ai-chat__message--user { justify-content:flex-end; }
.global-ai-chat__bubble {
  max-width:88%;
  padding:15px 16px;
  border-radius:20px;
  background:var(--surface-white);
  border:1px solid var(--border-soft);
  color:var(--text-primary);
  box-shadow:var(--shadow-xs);
  line-height:1.6;
  font-size:14px;
}
.global-ai-chat__message--user .global-ai-chat__bubble {
  background:var(--surface-selected);
  border-color:rgba(49,74,99,.18);
  color:var(--text-primary);
}
.global-ai-chat__message--assistant .global-ai-chat__bubble {
  background:var(--surface-white);
}
.global-ai-chat__proposal {
  margin-top:10px;
  padding:12px;
  border-radius:16px;
  border:1px solid var(--border-soft);
  background:var(--surface-white);
  display:grid;
  gap:10px;
  box-shadow:var(--shadow-xs);
}
.global-ai-chat__proposal-head {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}
.global-ai-chat__proposal-copy {
  min-width:0;
  display:grid;
  gap:4px;
}
.global-ai-chat__proposal-title {
  font-size:13px;
  font-weight:800;
  color:var(--text-primary);
}
.global-ai-chat__proposal-summary {
  font-size:12px;
  line-height:1.5;
  color:var(--text-secondary);
}
.global-ai-chat__proposal-lines {
  display:grid;
  gap:4px;
}
.global-ai-chat__proposal-line {
  font-size:12px;
  line-height:1.5;
  color:var(--text-primary);
}
.global-ai-chat__proposal-badge {
  display:inline-flex;
  align-items:center;
  padding:4px 8px;
  border-radius:999px;
  font-size:11px;
  font-weight:800;
  letter-spacing:.04em;
  text-transform:uppercase;
  white-space:nowrap;
}
.global-ai-chat__proposal-badge--success {
  background:rgba(22,163,74,0.12);
  color:#166534;
}
.global-ai-chat__proposal-badge--error {
  background:rgba(239,68,68,0.12);
  color:#991b1b;
}
.global-ai-chat__proposal-badge--pending {
  background:rgba(37,99,235,0.10);
  color:#1d4ed8;
}
.global-ai-chat__proposal-actions {
  display:flex;
  justify-content:flex-end;
}
.global-ai-chat__proposal-button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:38px;
  padding:0 14px;
  border:none;
  border-radius:12px;
  background:linear-gradient(135deg,#2563eb,#1d4ed8);
  color:#ffffff;
  font:inherit;
  font-weight:700;
  cursor:pointer;
  box-shadow:var(--shadow-xs);
  transition:transform var(--dur-fast), box-shadow var(--dur-fast), filter var(--dur-fast);
}
.global-ai-chat__proposal-button:hover {
  filter:brightness(1.02);
  transform:translateY(-1px);
  box-shadow:var(--shadow-sm);
}
.global-ai-chat__preview {
  display:flex;
  padding:10px 14px;
  background:var(--surface-bg);
  border-top:1px solid var(--border-soft);
  align-items:center;
  gap:10px;
}
.global-ai-chat__preview[hidden],
.global-ai-chat__phone-bridge[hidden] {
  display:none;
}
.global-ai-chat__preview-image {
  height:48px;
  width:48px;
  border-radius:12px;
  border:1px solid rgba(15,23,42,.1);
  object-fit:cover;
}
.global-ai-chat__preview-clear {
  border:none;
  background:none;
  color:var(--text-secondary);
  font-size:12px;
  font-weight:700;
  cursor:pointer;
}
.global-ai-chat__phone-bridge {
  display:grid;
  grid-template-columns:minmax(0,1fr) 178px;
  gap:14px;
  margin:0 14px 4px;
  padding:14px;
  border-radius:20px;
  border:1px solid var(--border-soft);
  background:var(--surface-card);
  box-shadow:var(--shadow-xs);
}
.global-ai-chat__phone-bridge-copy {
  display:grid;
  gap:8px;
  align-content:start;
}
.global-ai-chat__phone-bridge-eyebrow {
  display:inline-flex;
  width:max-content;
  padding:4px 10px;
  border-radius:999px;
  background:rgba(168,86,86,.10);
  color:var(--studio-red);
  font-size:10px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.global-ai-chat__phone-bridge-copy strong {
  display:block;
  color:var(--text-primary);
  font-size:17px;
  letter-spacing:-.02em;
}
.global-ai-chat__phone-bridge-copy p {
  margin:0;
  color:var(--text-secondary);
  font-size:13px;
  line-height:1.55;
}
.global-ai-chat__phone-link {
  display:block;
  color:var(--studio-red);
  font-size:12px;
  line-height:1.5;
  text-decoration:none;
  overflow-wrap:anywhere;
}
.global-ai-chat__phone-link:hover {
  text-decoration:underline;
}
.global-ai-chat__phone-bridge-qr-wrap {
  display:flex;
  align-items:center;
  justify-content:center;
  padding:12px;
  border-radius:18px;
  background:var(--surface-white);
  border:1px solid var(--border-soft);
  min-height:178px;
}
.global-ai-chat__phone-bridge-qr {
  width:154px;
  max-width:100%;
  aspect-ratio:1;
  border-radius:18px;
  background:var(--surface-white);
}
.global-ai-chat__phone-bridge-actions {
  grid-column:1 / -1;
  display:flex;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap;
}
.global-ai-chat__phone-status {
  grid-column:1 / -1;
  font-size:12px;
  line-height:1.5;
  color:var(--text-secondary);
}
.global-ai-chat__composer {
  padding:14px 16px 16px;
  border-top:1px solid var(--border-soft);
  display:grid;
  gap:10px;
  flex-shrink:0;
  background:var(--surface-white);
}
.global-ai-chat__composer-row {
  display:flex;
  align-items:flex-end;
  gap:8px;
  padding:10px;
  border-radius:20px;
  background:var(--surface-bg);
  border:1px solid var(--border-soft);
  box-shadow:none;
}
.global-ai-chat__file-btn {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:40px;
  height:40px;
  border-radius:var(--radius-sm);
  border:1px solid var(--border-medium);
  background:var(--surface-white);
  color:var(--text-secondary);
  cursor:pointer;
  flex-shrink:0;
}
.global-ai-chat__composer textarea {
  flex:1;
  min-width:0;
  height:96px;
  min-height:96px;
  max-height:min(180px,28vh);
  overflow-y:auto;
  resize:none;
  padding:12px 14px;
  border-radius:18px;
  border:1px solid var(--border-medium);
  background:var(--surface-white);
  color:var(--text-primary);
  font:inherit;
  line-height:1.5;
}
.global-ai-chat__composer textarea::placeholder {
  color:var(--text-tertiary);
}
.global-ai-chat__composer textarea:focus {
  outline:none;
  border-color:var(--studio-blue);
  box-shadow:0 0 0 3px rgba(49,74,99,.12);
}
.global-ai-chat__send {
  background:var(--studio-blue);
  color:#fff;
  border-color:var(--studio-blue);
  min-width:78px;
  box-shadow:var(--shadow-xs);
}
.global-ai-chat__send:hover { background:var(--studio-blue-dark); border-color:var(--studio-blue-dark); }
.global-ai-chat__send:disabled {
  cursor:not-allowed;
  opacity:.7;
  box-shadow:none;
}

.wb-quote-header__number {
  font-weight:800;
  letter-spacing:-0.01em;
  color:var(--df-text, var(--text-primary));
}
.wb-quote-header__status {
  display:inline-flex;
  align-items:center;
  margin-left:8px;
  padding:2px 9px;
  border-radius:99px;
  border:1px solid transparent;
  font-size:.72rem;
  font-weight:800;
  letter-spacing:.05em;
}
.wb-quote-header__status--draft {
  color:#b45309;
  background:#fffbeb;
  border-color:rgba(180,83,9,.2);
}
.wb-quote-header__status--sent {
  color:#2563eb;
  background:#eff6ff;
  border-color:rgba(37,99,235,.2);
}
.wb-quote-header__status--approved {
  color:#047857;
  background:#ecfdf5;
  border-color:rgba(4,120,87,.2);
}
.wb-quote-header__status--ordered {
  color:#7c3aed;
  background:#f5f3ff;
  border-color:rgba(124,58,237,.2);
}
.wb-quote-header__status--invoiced {
  color:#4f46e5;
  background:#eef2ff;
  border-color:rgba(79,70,229,.2);
}
.wb-quote-header__status--neutral {
  color:#64748b;
  background:#f1f5f9;
  border-color:rgba(100,116,139,.18);
}

.dreamtip {
  position:fixed;
  z-index:99999;
  max-width:280px;
  padding:12px 16px;
  border-radius:12px;
  background:#0f172a;
  color:#f1f5f9;
  font-size:.82rem;
  line-height:1.5;
  box-shadow:0 8px 32px rgba(0,0,0,.35), 0 0 0 1px rgba(255,255,255,.08);
  pointer-events:none;
  opacity:0;
  transition:opacity .12s;
}
.dreamtip.is-visible {
  opacity:1;
}
.dreamtip__title {
  margin-bottom:5px;
  font-size:.85rem;
  font-weight:800;
  color:#93c5fd;
}
.dreamtip__body {
  color:#cbd5e1;
}
.dreamtip__example {
  margin-top:7px;
  color:#94a3b8;
  font-size:.77rem;
  font-style:italic;
}
.dreamtip-icon {
  display:inline-flex;
  align-items:center;
  margin-left:5px;
  color:#94a3b8;
  cursor:help;
  transition:color .12s;
  vertical-align:middle;
}
.dreamtip-icon.is-active,
.dreamtip-icon:focus-visible {
  color:#3b82f6;
}
.dreamtip-icon__svg {
  display:block;
  flex-shrink:0;
}

@media (max-width: 900px) {
  .global-ai-chat {
    top:10px;
    right:10px;
    bottom:10px;
    width:calc(100vw - 20px);
  }
  .global-ai-chat__phone-bridge {
    grid-template-columns:1fr;
  }
  .global-ai-chat__phone-bridge-qr-wrap {
    min-height:auto;
  }
}
/* Operations pages */
.ops-shell {
  display:grid;
  gap:20px;
}
.ops-hero {
  display:grid;
  gap:18px;
  padding:24px 28px;
  border:1px solid var(--border-soft);
  border-radius:24px;
  background:
    radial-gradient(circle at top right, rgba(49,74,99,.08), transparent 32%),
    linear-gradient(180deg, rgba(253,253,252,.96), rgba(247,248,250,.98));
  box-shadow:var(--shadow-xs);
}
.ops-hero__head {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
}
.ops-hero__eyebrow {
  font-size:12px;
  font-weight:800;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--text-tertiary);
}
.ops-hero__title {
  margin:8px 0 0;
  font-size:32px;
  line-height:1.05;
  font-weight:900;
  color:var(--text-primary);
}
.ops-hero__copy {
  margin:10px 0 0;
  max-width:760px;
  font-size:15px;
  line-height:1.6;
  color:var(--text-secondary);
}
.ops-hero__actions {
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.ops-metrics {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:14px;
}
.ops-metric {
  display:grid;
  gap:8px;
  padding:16px 18px;
  border:1px solid var(--border-soft);
  border-radius:18px;
  background:var(--surface-white);
  box-shadow:var(--shadow-xs);
}
.ops-metric__label {
  font-size:11px;
  font-weight:800;
  letter-spacing:.1em;
  text-transform:uppercase;
  color:var(--text-tertiary);
}
.ops-metric__value {
  font-size:28px;
  line-height:1;
  font-weight:900;
  color:var(--text-primary);
}
.ops-metric__subtext {
  font-size:13px;
  color:var(--text-secondary);
}
.invoice-metrics {
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:18px;
}
.invoice-filter-metric {
  appearance:none;
  text-align:left;
  width:100%;
  cursor:pointer;
  transition:border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.invoice-filter-metric:hover {
  border-color:rgba(49,74,99,.20);
  box-shadow:var(--shadow-sm);
}
.invoice-filter-metric.is-active {
  border-color:rgba(49,74,99,.22);
  box-shadow:0 12px 28px rgba(49,74,99,.10);
  transform:translateY(-1px);
}
.invoice-filter-metric__value--success { color:var(--studio-green); }
.invoice-filter-metric__value--danger { color:var(--studio-red); }
.ops-table-card,
.ops-panel {
  overflow:hidden;
  padding:0;
  border:1px solid var(--border-soft);
  border-radius:20px;
  background:var(--surface-card);
  box-shadow:var(--shadow-xs);
}
.ops-table {
  width:100%;
  border-collapse:collapse;
}
.ops-table thead tr {
  background:var(--surface-sidebar);
  border-bottom:1px solid var(--border-soft);
}
.ops-table th {
  padding:12px 18px;
  text-align:left;
  font-size:11px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--text-tertiary);
}
.ops-table td {
  padding:16px 18px;
  vertical-align:top;
  border-bottom:1px solid var(--border-soft);
}
.ops-table tbody tr:last-child td { border-bottom:none; }
.ops-table tbody tr:hover { background:var(--surface-hover); }
.ops-identity {
  display:grid;
  gap:5px;
}
.ops-identity__title {
  font-size:14px;
  font-weight:800;
  color:var(--text-primary);
}
.ops-identity__meta,
.ops-identity__sub {
  font-size:12px;
  line-height:1.5;
  color:var(--text-secondary);
}
.ops-code {
  display:inline-flex;
  align-items:center;
  padding:6px 10px;
  border-radius:999px;
  background:rgba(49,74,99,.08);
  color:var(--studio-blue);
  font-size:11px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.ops-amount {
  font-size:18px;
  font-weight:900;
  color:var(--text-primary);
}
.ops-amount--success { color:var(--studio-green); }
.ops-amount--danger { color:var(--studio-red); }
.ops-amount--muted { color:var(--text-tertiary); }
.ops-actions {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.ops-chip {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:28px;
  padding:0 12px;
  border-radius:999px;
  border:1px solid transparent;
  font-size:11px;
  font-weight:800;
  letter-spacing:.05em;
  text-transform:uppercase;
}
.ops-chip--blue { background:rgba(49,74,99,.10); border-color:rgba(49,74,99,.14); color:var(--studio-blue); }
.ops-chip--amber { background:rgba(168,121,57,.12); border-color:rgba(168,121,57,.14); color:var(--studio-orange); }
.ops-chip--green { background:rgba(79,117,91,.12); border-color:rgba(79,117,91,.14); color:var(--studio-green); }
.ops-chip--red { background:rgba(168,86,86,.10); border-color:rgba(168,86,86,.14); color:var(--studio-red); }
.ops-chip--neutral { background:var(--surface-bg); border-color:var(--border-soft); color:var(--text-secondary); }
.orders-production-stack,
.orders-balance-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.orders-balance-stack {
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.ops-empty {
  display:grid;
  justify-items:center;
  gap:12px;
  padding:44px 24px;
  text-align:center;
}
.ops-empty__mark {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:60px;
  height:60px;
  padding:0 16px;
  border-radius:18px;
  background:rgba(49,74,99,.08);
  color:var(--studio-blue);
  font-size:15px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.ops-empty__title {
  font-size:20px;
  font-weight:900;
  color:var(--text-primary);
}
.ops-empty__copy {
  max-width:420px;
  font-size:14px;
  line-height:1.6;
  color:var(--text-secondary);
}
.ops-section-toggle {
  border:1px solid var(--border-soft);
  border-radius:20px;
  background:var(--surface-card);
  padding:12px 16px;
}
.ops-section-toggle summary {
  cursor:pointer;
  list-style:none;
  font-size:13px;
  font-weight:700;
  color:var(--text-secondary);
}
.ops-section-toggle summary::-webkit-details-marker { display:none; }
.ops-table-row--dim {
  opacity:.62;
}
.ops-table-stack {
  margin-top:12px;
}

/* ============================================================
   Step 5 Support
   ============================================================ */
.step5-nesting-mount--full {
  width:100%;
  height:100%;
  min-height:980px;
  position:relative;
  background:var(--df-surface-alt, #111b2a);
}

.step5-canvas-right--fill {
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
}

.ops-detail-grid {
  display:grid;
  grid-template-columns:minmax(0,1fr) 320px;
  gap:18px;
  align-items:start;
}
.ops-panel__body {
  display:grid;
  gap:18px;
  padding:24px;
}
.ops-panel__eyebrow {
  font-size:11px;
  font-weight:800;
  letter-spacing:.1em;
  text-transform:uppercase;
  color:var(--text-tertiary);
}
.ops-panel__title {
  margin:6px 0 0;
  font-size:22px;
  line-height:1.15;
  font-weight:900;
  color:var(--text-primary);
}
.ops-panel__copy {
  margin:8px 0 0;
  font-size:14px;
  line-height:1.6;
  color:var(--text-secondary);
}
.ops-stat-grid {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
}
.ops-stat {
  display:grid;
  gap:6px;
  padding:16px 18px;
  border-radius:18px;
  background:rgba(248,250,252,.92);
  border:1px solid rgba(148,163,184,.14);
}
.ops-stat__label {
  font-size:11px;
  font-weight:800;
  letter-spacing:.08em;
  color:var(--text-tertiary);
}
.ops-stat__value {
  font-size:28px;
  line-height:1;
  font-weight:900;
  color:var(--text-primary);
}
.ops-stat__value--success { color:var(--studio-green); }
.ops-stat__value--danger { color:var(--studio-red); }
.ops-stat__value--muted { color:var(--text-tertiary); }
.ops-form-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}
.ops-form-field {
  display:grid;
  gap:6px;
}
.ops-form-field .form-input,
.ops-form-field .form-select,
.ops-form-field textarea.form-input {
  width:100%;
}
.ops-form-field label {
  font-size:11px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--text-secondary);
}
.ops-alert {
  display:grid;
  gap:8px;
  padding:14px 16px;
  border-radius:16px;
  border:1px solid rgba(168,86,86,.20);
  background:rgba(168,86,86,.08);
}
.ops-alert--danger .ops-panel__eyebrow,
.ops-alert--danger {
  color:#7d4141;
}
.ops-note {
  font-size:13px;
  line-height:1.6;
  color:var(--text-secondary);
}
.ops-note--spaced {
  margin-top:12px;
}
.invoice-work-summary {
  margin-top:16px;
}
.invoice-work-summary__summary,
.invoice-work-summary__note {
  margin-top:14px;
}
.invoice-work-summary__list {
  display:grid;
  gap:10px;
  margin-top:14px;
}
.invoice-work-summary__item {
  display:flex;
  justify-content:space-between;
  gap:16px;
  padding:12px 14px;
  border:1px solid var(--border-soft);
  border-radius:14px;
  background:var(--surface-subtle);
}
.invoice-work-summary__main {
  display:grid;
  gap:4px;
}
.invoice-work-summary__title {
  font-size:14px;
  font-weight:800;
  color:var(--text-primary);
}
.invoice-work-summary__meta {
  font-size:12px;
  color:var(--text-secondary);
}
.invoice-work-summary__amount {
  font-size:14px;
  font-weight:800;
  color:var(--text-primary);
}
.invoice-detail-title {
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}
.invoice-detail-title h1 {
  margin:0;
  font-size:28px;
}
.invoice-archived-table {
  margin-top:12px;
}
.invoice-row--archived {
  opacity:.62;
}
.invoice-modal-summary {
  padding:12px 14px;
  border-radius:12px;
  background:rgba(49,74,99,.08);
  color:var(--studio-blue);
  font-size:13px;
  font-weight:700;
}
.invoice-payment-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
.invoice-form-grid {
  margin-bottom:16px;
}

@media (max-width: 880px) {
  .invoice-metrics {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media (max-width: 640px) {
  .invoice-metrics,
  .invoice-payment-grid {
    grid-template-columns:1fr;
  }
  .invoice-work-summary__item {
    flex-direction:column;
    align-items:flex-start;
  }
}
.ops-history {
  display:grid;
  gap:0;
  max-height:460px;
  overflow-y:auto;
}
.ops-history__entry {
  padding:12px 0;
  border-bottom:1px solid var(--border-soft);
}
.ops-history__entry:last-child { border-bottom:none; }
.ops-history__summary {
  font-size:13px;
  line-height:1.5;
  color:var(--text-primary);
}
.ops-history__meta {
  margin-top:4px;
  font-size:11px;
  color:var(--text-tertiary);
}
@media (max-width: 1100px) {
  .ops-detail-grid { grid-template-columns:1fr; }
}
@media (max-width: 820px) {
  .ops-hero { padding:20px; border-radius:22px; }
  .ops-hero__title { font-size:28px; }
  .ops-stat-grid,
  .ops-form-grid { grid-template-columns:1fr; }
  .ops-table { min-width:860px; }
}
@media (max-width: 680px) {
  .ops-hero__actions,
  .ops-actions { width:100%; }
  .ops-hero__actions .btn,
  .ops-actions .btn { flex:1 1 160px; }
  .ops-empty { padding:40px 18px; }
}

.account-portfolio {
  padding: 0;
  overflow: hidden;
}

.account-portfolio__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr);
  gap: 0;
}

.account-portfolio__hero {
  padding: 24px;
  display: grid;
  gap: 18px;
  color: var(--text-primary);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-right: 1px solid var(--border-soft);
}

.account-portfolio__hero-copy {
  display: grid;
  gap: 8px;
}

.account-portfolio__kicker,
.account-workspace__eyebrow,
.account-workspace__panel-eyebrow,
.account-workspace__next-eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.account-portfolio__kicker {
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.account-portfolio__title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0;
}

.account-portfolio__copy {
  max-width: 56ch;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.account-portfolio__metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.account-portfolio__metric {
  padding: 14px 16px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--surface-bg);
}

.account-portfolio__metric-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.account-portfolio__metric-value,
.account-workspace__stat-value {
  margin-top: 8px;
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
}

.account-portfolio__metric-value[data-tone="primary"] {
  color: var(--studio-blue-light);
}

.account-portfolio__metric-value[data-tone="success"],
.account-workspace__stat-value[data-tone="success"],
.account-workspace__list-value[data-tone="success"] {
  color: var(--accent-green);
}

.account-portfolio__metric-value[data-tone="danger"],
.account-workspace__stat-value[data-tone="danger"],
.account-workspace__list-value[data-tone="danger"] {
  color: var(--studio-red);
}

.account-portfolio__spotlight {
  padding: 24px;
  display: grid;
  gap: 14px;
  background: var(--surface-card);
  border-left: 1px solid var(--border-soft);
}

.account-portfolio__spotlight-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.account-portfolio__spotlight-title {
  margin-top: 2px;
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
}

.account-portfolio__spotlight-list {
  display: grid;
  gap: 12px;
}

.account-portfolio__status,
.account-portfolio__item-badge,
.account-workspace__timeline-badge {
  display: inline-flex;
  align-items: center;
  width: max-content;
  padding: 5px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.account-portfolio__status[data-tone="urgent"],
.account-portfolio__item-badge[data-tone="urgent"],
.account-workspace__timeline-badge[data-tone="danger"] {
  color: var(--studio-red);
  background: rgba(197, 34, 31, 0.10);
}

.account-portfolio__status[data-tone="calm"],
.account-portfolio__item-badge[data-tone="calm"],
.account-workspace__timeline-badge[data-tone="success"] {
  color: var(--accent-green);
  background: rgba(16, 185, 129, 0.12);
}

.account-portfolio__item-badge[data-tone="active"],
.account-workspace__timeline-badge[data-tone="primary"] {
  color: var(--studio-blue);
  background: rgba(26, 115, 232, 0.10);
}

.account-portfolio__item-badge[data-tone="muted"],
.account-workspace__timeline-badge[data-tone="muted"] {
  color: var(--text-secondary);
  background: var(--surface-selected);
}

.account-portfolio__item,
.account-workspace__empty {
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--surface-bg);
}

.account-portfolio__item {
  display: grid;
  gap: 8px;
}

.account-portfolio__item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.account-portfolio__item-copy {
  display: grid;
  gap: 4px;
}

.account-portfolio__item-title,
.account-workspace__list-title,
.account-workspace__project-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-primary);
}

.account-portfolio__item-title {
  font-size: 15px;
}

.account-portfolio__item-subtitle,
.account-workspace__list-meta,
.account-workspace__project-copy {
  font-size: 12px;
  color: var(--text-secondary);
}

.account-portfolio__item-meta {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
}

.account-portfolio__item-meta[data-tone="danger"] {
  color: var(--studio-red);
}

.account-portfolio__item-detail,
.account-workspace__empty,
.account-workspace__next-copy,
.account-workspace__copy,
.account-workspace__panel-copy {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.account-workspace {
  padding: 22px;
  display: grid;
  gap: 18px;
}

.account-workspace__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.account-workspace__intro {
  display: grid;
  gap: 6px;
}

.account-workspace__eyebrow,
.account-workspace__panel-eyebrow,
.account-workspace__next-eyebrow {
  color: var(--text-tertiary);
}

.account-workspace__title {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
}

.account-workspace__actions,
.account-workspace__project-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.account-workspace__stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.account-workspace__stat {
  padding: 16px;
  border-radius: 18px;
  background: var(--surface-bg);
}

.account-workspace__stat-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.account-workspace__next {
  padding: 16px 18px;
  border-radius: 18px;
  display: grid;
  gap: 6px;
  background: var(--surface-selected);
}

.account-workspace__next[data-tone="urgent"] {
  background: rgba(197, 34, 31, 0.10);
}

.account-workspace__next[data-tone="active"] {
  background: rgba(26, 115, 232, 0.10);
}

.account-workspace__next[data-tone="calm"] {
  background: rgba(16, 185, 129, 0.12);
}

.account-workspace__next-eyebrow[data-tone="urgent"] {
  color: var(--studio-red);
}

.account-workspace__next-eyebrow[data-tone="active"] {
  color: var(--studio-blue);
}

.account-workspace__next-eyebrow[data-tone="calm"] {
  color: var(--accent-green);
}

.account-workspace__next-title,
.account-workspace__panel-title {
  margin-top: 2px;
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
}

.account-workspace__next-title {
  font-size: 18px;
}

.account-workspace__identity {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.account-workspace__identity-chip {
  padding: 12px 14px;
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  display: grid;
  gap: 4px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.96));
}

.account-workspace__identity-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.account-workspace__identity-value {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--text-primary);
}

.account-workspace__content {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 16px;
}

.account-workspace__column {
  display: grid;
  gap: 16px;
}

.account-workspace__panel {
  padding: 18px;
  display: grid;
  gap: 12px;
  border-radius: 18px;
  background: var(--surface-bg);
}

.account-workspace__list {
  display: grid;
  gap: 10px;
}

.account-workspace__list-button,
.account-workspace__timeline-link,
.account-workspace__project-card,
.account-workspace__payment-row,
.account-workspace__timeline-item {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: var(--surface-card);
}

.account-workspace__list-button,
.account-workspace__timeline-link {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.account-workspace__list-copy,
.account-workspace__timeline-copy,
.account-workspace__payment-copy,
.account-workspace__project-copy-wrap {
  display: grid;
  gap: 4px;
  text-align: left;
}

.account-workspace__list-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.account-workspace__list-value-stack {
  display: grid;
  gap: 2px;
  text-align: right;
}

.account-workspace__list-meta[data-tone="danger"] {
  color: var(--studio-red);
}

.account-workspace__list-meta[data-tone="success"],
.account-workspace__timeline-amount[data-tone="success"] {
  color: var(--accent-green);
}

.account-workspace__timeline-item,
.account-workspace__payment-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.account-workspace__panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.account-workspace__timeline-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.account-workspace__timeline-date,
.account-workspace__project-meta {
  font-size: 11px;
  color: var(--text-tertiary);
}

.account-workspace__timeline-detail {
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.account-workspace__timeline-amount {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
}

.account-workspace__project-card {
  display: grid;
  gap: 8px;
}

.account-workspace__project-copy-wrap {
  gap: 4px;
}

.account-workspace__contact-grid {
  display: grid;
  gap: 8px;
}

.account-workspace__mini-row,
.account-workspace__file-row,
.account-workspace__change-row {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: var(--surface-card);
}

.account-workspace__mini-row {
  display: grid;
  gap: 4px;
}

.account-workspace__mini-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.account-workspace__mini-value {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--text-primary);
}

.account-workspace__file-row,
.account-workspace__change-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.account-workspace__file-copy {
  display: grid;
  gap: 4px;
}

@media (max-width: 1120px) {
  .account-portfolio__layout,
  .account-workspace__content {
    grid-template-columns: 1fr;
  }

  .account-portfolio__spotlight {
    border-left: 0;
    border-top: 1px solid var(--border-soft);
  }
}

@media (max-width: 820px) {
  .account-workspace__stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .account-workspace__stats {
    grid-template-columns: 1fr;
  }

  .account-workspace__list-button,
  .account-workspace__timeline-link,
  .account-workspace__timeline-item,
  .account-workspace__payment-row,
  .account-portfolio__item-head,
  .account-portfolio__spotlight-head {
    flex-direction: column;
    align-items: stretch;
  }

  .account-workspace__list-value-stack {
    text-align: left;
  }
}

.surface-summary-card {
  padding: 20px;
  display: grid;
  gap: 16px;
  border-radius: 22px;
  border: 1px solid var(--border-soft);
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.96));
}

.surface-summary-card[data-tone="overdue"] {
  border-color: rgba(197,34,31,0.16);
}

.surface-summary-card[data-tone="active"] {
  border-color: rgba(26,115,232,0.18);
}

.surface-summary-card__header,
.surface-summary-card__hero,
.surface-summary-card__meta-wrap,
.surface-summary-card__actions {
  display: flex;
  gap: 14px;
}

.surface-summary-card__header,
.surface-summary-card__hero {
  align-items: flex-start;
  justify-content: space-between;
}

.surface-summary-card__meta-wrap,
.surface-summary-card__actions,
.surface-summary-card__title-row {
  flex-wrap: wrap;
}

.surface-summary-card__intro,
.surface-summary-card__aside {
  display: grid;
  gap: 6px;
}

.surface-summary-card__aside {
  text-align: right;
  gap: 4px;
}

.surface-summary-card__title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.surface-summary-card__title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
}

.surface-summary-card__title--sm {
  font-size: 17px;
}

.surface-summary-card__meta {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.surface-summary-card__submeta,
.surface-summary-card__aside-copy {
  font-size: 12px;
  color: var(--text-secondary);
}

.surface-summary-card__submeta {
  color: var(--text-tertiary);
}

.surface-summary-card__aside-label,
.surface-summary-card__panel-eyebrow,
.surface-summary-card__stat-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.surface-summary-card__aside-value {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
}

.surface-summary-card__aside-value--lg {
  font-size: 24px;
}

.surface-summary-card__aside-value[data-tone="danger"] {
  color: var(--studio-red);
}

.surface-summary-card__aside-value[data-tone="success"] {
  color: var(--accent-green);
}

.surface-summary-card__badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-secondary);
  background: var(--surface-selected);
}

.surface-summary-card__badge[data-tone="overdue"] {
  color: var(--studio-red);
  background: rgba(197,34,31,0.10);
}

.surface-summary-card__badge[data-tone="active"] {
  color: var(--studio-blue);
  background: rgba(26,115,232,0.10);
}

.surface-summary-card__badge[data-tone="muted"],
.surface-summary-card__badge[data-tone="neutral"] {
  color: var(--text-secondary);
  background: rgba(15,23,42,0.08);
}

.surface-summary-card__badge[data-tone="success"] {
  color: var(--accent-green);
  background: rgba(16,185,129,0.12);
}

.surface-summary-card__panel-grid,
.surface-summary-card__stat-grid {
  display: grid;
  gap: 12px;
}

.surface-summary-card__panel-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.8fr);
}

.surface-summary-card__panel,
.surface-summary-card__stat {
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--surface-bg);
  display: grid;
  gap: 6px;
}

.surface-summary-card__panel[data-tone="overdue"] {
  background: rgba(197,34,31,0.10);
}

.surface-summary-card__panel[data-tone="active"] {
  background: rgba(26,115,232,0.10);
}

.surface-summary-card__panel[data-tone="muted"],
.surface-summary-card__panel[data-tone="neutral"] {
  background: var(--surface-bg);
}

.surface-summary-card__panel[data-tone="overdue"] .surface-summary-card__panel-eyebrow {
  color: var(--studio-red);
}

.surface-summary-card__panel[data-tone="active"] .surface-summary-card__panel-eyebrow {
  color: var(--studio-blue);
}

.surface-summary-card__panel-title,
.surface-summary-card__stat-value {
  font-weight: 800;
  color: var(--text-primary);
}

.surface-summary-card__panel-title {
  font-size: 17px;
}

.surface-summary-card__panel-copy {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.surface-summary-card__stat-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.surface-summary-card__stat-grid--four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.surface-summary-card__stat {
  padding: 12px 14px;
  border-radius: 16px;
}

.surface-summary-card__stat-value {
  font-size: 22px;
}

@media (max-width: 900px) {
  .surface-summary-card__panel-grid,
  .surface-summary-card__stat-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .surface-summary-card__header,
  .surface-summary-card__hero,
  .surface-summary-card__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .surface-summary-card__aside {
    text-align: left;
  }

  .account-directory-table__head {
    padding: 14px 16px;
  }
}

.surface-route-copy h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
}

.surface-route-copy p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.surface-route-actions,
.surface-stack {
  display: grid;
  gap: 16px;
}

.surface-route-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.surface-grid {
  display: grid;
  gap: 16px;
}

.surface-grid--cards {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.surface-grid--project-cards {
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
}

.account-directory-table-wrap {
  padding: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.account-directory-table__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-soft);
  background: linear-gradient(180deg, rgba(255,255,255,0.72), rgba(246,247,249,0.78));
}

.account-directory-table__title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
}

.account-directory-table__copy {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-secondary);
}

.account-directory-row {
  cursor: pointer;
}

.account-directory-row:focus {
  outline: none;
  background: rgba(49,74,99,0.08);
}

.account-directory__account {
  display: grid;
  gap: 4px;
}

.account-directory__title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.account-directory__title,
.account-directory__cell-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.account-directory__meta,
.account-directory__cell-meta {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.account-directory__metric {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
}

.account-directory__metric[data-tone="danger"] {
  color: var(--studio-red);
}

.account-directory__metric[data-tone="success"] {
  color: var(--accent-green);
}

.surface-hero {
  padding: 0;
  overflow: hidden;
}

.surface-hero__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.95fr);
  gap: 0;
}

.surface-hero__primary {
  padding: 24px;
  display: grid;
  gap: 18px;
  color: #fff;
  background: linear-gradient(135deg, rgba(15,23,42,.98) 0%, rgba(30,41,59,.95) 60%, rgba(26,115,232,.92) 100%);
}

.surface-hero__primary[data-tone="teal"] {
  background: linear-gradient(135deg, rgba(15,23,42,.98) 0%, rgba(30,41,59,.95) 58%, rgba(15,118,110,.92) 100%);
}

.surface-hero__copy {
  display: grid;
  gap: 8px;
}

.surface-hero__eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.72);
}

.surface-hero__title {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -.03em;
}

.surface-hero__text {
  max-width: 56ch;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255,255,255,.8);
}

.surface-hero__metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.surface-hero__metric {
  padding: 14px 16px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  background: rgba(255,255,255,.08);
}

.surface-hero__metric-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.62);
}

.surface-hero__metric-value {
  margin-top: 8px;
  font-size: 30px;
  font-weight: 800;
  color: #fff;
}

.surface-hero__metric-value[data-tone="danger"] {
  color: #fecaca;
}

.surface-hero__metric-value[data-tone="primary"] {
  color: #bfdbfe;
}

.surface-hero__secondary {
  padding: 24px;
  display: grid;
  gap: 14px;
  background: var(--surface-card);
  border-left: 1px solid var(--border-soft);
}

.surface-watchlist__head {
  display: grid;
  gap: 2px;
}

.surface-watchlist__eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.surface-watchlist__title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
}

.surface-watchlist__list {
  display: grid;
  gap: 12px;
}

.surface-watchlist__item {
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--surface-bg);
  display: grid;
  gap: 6px;
}

.surface-watchlist__item-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.surface-watchlist__item-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
}

.surface-watchlist__item-badge {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.surface-watchlist__item-badge[data-tone="overdue"] {
  color: var(--studio-red);
}

.surface-watchlist__item-badge[data-tone="active"] {
  color: var(--studio-blue);
}

.surface-watchlist__item-copy {
  font-size: 12px;
  color: var(--text-secondary);
}

.surface-empty-card {
  padding: 64px 32px;
  text-align: center;
}

.surface-empty-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  height: 56px;
  margin-bottom: 16px;
  border-radius: 16px;
  background: var(--surface-bg);
  font-size: 14px;
  font-weight: 800;
  color: var(--text-secondary);
}

.surface-empty-card__title {
  margin-bottom: 8px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.surface-empty-card__copy {
  margin-bottom: 24px;
  font-size: 14px;
  color: var(--text-secondary);
}

@media (max-width: 960px) {
  .surface-hero__layout {
    grid-template-columns: 1fr;
  }

  .surface-hero__secondary {
    border-left: 0;
    border-top: 1px solid var(--border-soft);
  }

  .account-directory-table {
    min-width: 920px;
  }
}

.lead-table__name-row,
.lead-table__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.lead-table__name-row {
  margin-bottom: 2px;
}

.lead-table__actions {
  gap: 6px;
}

.lead-table__name {
  font-weight: 700;
  color: var(--text-primary);
}

.lead-table__sub,
.lead-table__date {
  font-size: 12px;
  color: var(--text-tertiary);
}

.lead-table__contact-sub,
.lead-table__address {
  font-size: 12px;
  color: var(--text-secondary);
}

.lead-table__address {
  font-size: 13px;
}

.lead-table__reminder {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  background: var(--surface-bg);
}

.lead-table__reminder[data-tone="overdue"] {
  color: var(--studio-red);
  background: rgba(197,34,31,0.10);
}

.lead-table__reminder[data-tone="active"] {
  color: var(--studio-blue);
  background: rgba(26,115,232,0.10);
}

.archived-records {
  margin-top: 8px;
}

.archived-records summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.archived-records__table-wrap {
  padding: 0;
  margin-top: 8px;
  overflow: hidden;
  opacity: 0.8;
}

.surface-record-head__main,
.surface-record-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.surface-record-actions {
  gap: 8px;
}

.surface-record-head__title-stack {
  display: grid;
  gap: 4px;
}

.surface-record-head__eyebrow,
.lead-form__kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.surface-record-head__title {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
}

.surface-archived-note {
  padding: 14px 16px;
  color: var(--text-secondary);
  background: rgba(148,163,184,0.08);
  border-style: dashed;
}

.lead-form {
  display: grid;
  gap: 16px;
}

.lead-form__layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 16px;
  align-items: start;
}

.lead-form__main {
  padding: 24px;
  display: grid;
  gap: 16px;
}

.lead-form__sidebar {
  padding: 20px;
  display: grid;
  gap: 16px;
}

.lead-form__kicker {
  margin-bottom: 4px;
  font-size: 13px;
  letter-spacing: .06em;
}

.lead-form__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.lead-form__group--full {
  grid-column: 1 / -1;
}

.lead-form__advanced {
  padding: 0 14px;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: var(--surface-bg);
}

.lead-form__advanced summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.lead-form__advanced-copy {
  margin: -6px 0 14px;
  font-size: 12px;
  color: var(--text-secondary);
}

.lead-form__advanced .lead-form__grid {
  padding-bottom: 14px;
}

.lead-form__reminder-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.lead-form__reminder-summary {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-tertiary);
}

.lead-form__reminder-summary[data-tone="overdue"] {
  color: var(--studio-red);
}

.lead-form__reminder-summary[data-tone="active"] {
  color: var(--studio-blue);
}

.lead-form__toggle {
  position: relative;
  display: inline-flex;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.lead-form__toggle-input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
}

.lead-form__toggle-track {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-full);
  cursor: pointer;
  background: var(--border-medium);
  transition: background var(--dur-fast);
}

.lead-form__toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
  transition: left var(--dur-fast);
}

.lead-form__toggle[data-enabled="true"] .lead-form__toggle-track {
  background: var(--studio-blue);
}

.lead-form__toggle[data-enabled="true"] .lead-form__toggle-thumb {
  left: 22px;
}

.lead-form__reminder-fields {
  display: grid;
  gap: 12px;
}

.lead-form__reminder-fields[data-enabled="false"] {
  opacity: 0.4;
  pointer-events: none;
}

.lead-form__quick-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--border-soft);
  background: var(--surface-bg);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--studio-blue);
}

.lead-form__actions {
  display: flex;
  gap: 12px;
  padding-top: 4px;
  flex-wrap: wrap;
}

@media (max-width: 960px) {
  .lead-form__layout,
  .lead-form__grid {
    grid-template-columns: 1fr;
  }
}

.app-router-error {
  padding: 32px;
  border-color: var(--border-soft);
  max-width: 720px;
  margin: 40px auto;
}

.app-router-error__label {
  color: var(--studio-red);
  margin-bottom: 10px;
}

.app-router-error__headline {
  margin-bottom: 10px;
}

.app-router-error__body {
  color: var(--text-secondary);
  margin-bottom: 18px;
}

.app-router-error__caption {
  margin-bottom: 20px;
  color: var(--text-tertiary);
}

.app-router-error__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.app-router-empty {
  padding-top: 80px;
}

.wb2-mail-compose__note {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--df-border, rgba(148,163,184,0.22));
  background: var(--df-surface-alt, rgba(15,23,42,0.78));
  color: var(--df-text-muted, #94a3b8);
  font-size: 12px;
  line-height: 1.6;
}

.wb2-mail-compose__warning {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(245, 158, 11, 0.38);
  background: rgba(251, 191, 36, 0.12);
  color: var(--df-text, #0f172a);
  font-size: 12px;
  line-height: 1.55;
}

.wb2-mail-alert {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 12000;
  max-width: 360px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(15,23,42,0.96);
  color: #f8fafc;
  box-shadow: 0 24px 60px rgba(15,23,42,0.3);
  border: 1px solid rgba(148,163,184,0.22);
  font: 13px/1.55 "Plus Jakarta Sans","Segoe UI",Arial,sans-serif;
}

.wb2-mail-alert__title {
  font-weight: 800;
  margin-bottom: 6px;
}

.wb2-mail-alert__detail {
  margin-top: 6px;
  color: #cbd5e1;
}

/* Simple Home and audited setup hub */
.home-simple-shell {
  max-width: 980px;
  margin: 0 auto;
  padding: 8px 0 36px;
  display: grid;
  gap: 18px;
}

.home-page-header--simple {
  margin-bottom: 0;
}

.home-simple-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 8px;
}

.home-simple-panel__head {
  display: grid;
  gap: 4px;
}

.home-simple-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.home-simple-link {
  min-height: 78px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 14px;
  border: 1px solid var(--df-border, rgba(148,163,184,0.22));
  border-radius: 8px;
  background: var(--df-card, #fff);
  color: var(--df-text, #0f172a);
  text-decoration: none;
}

.home-simple-link:hover {
  border-color: var(--df-primary-ring, rgba(37,99,235,0.22));
  background: var(--df-primary-soft, rgba(37,99,235,0.08));
}

.home-simple-link strong {
  font-size: 15px;
  font-weight: 850;
}

.home-simple-link span {
  color: var(--df-text-muted, #64748b);
  font-size: 12px;
  font-weight: 700;
}

.settings-saas-grid--pricing {
  grid-template-columns: 1fr;
}

.settings-saas-grid--pricing .settings-saas-preview--sticky {
  position: static;
}

.settings-pricing-hub {
  align-content: start;
}

.settings-pricing-readiness {
  display: grid;
  gap: 14px;
  border-color: rgba(148,163,184,0.28);
}

.settings-pricing-readiness.is-ready {
  border-color: rgba(22,163,74,0.28);
  background: linear-gradient(180deg, rgba(22,163,74,0.08), rgba(255,255,255,0.82));
}

.settings-pricing-readiness.needs-work {
  border-color: rgba(217,119,6,0.26);
  background: linear-gradient(180deg, rgba(217,119,6,0.07), rgba(255,255,255,0.84));
}

.settings-pricing-readiness__head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.settings-pricing-readiness__head h3 {
  margin: 4px 0 4px;
  color: var(--text-primary, #0f172a);
  font-size: 18px;
}

.settings-pricing-readiness__head p {
  margin: 0;
  color: var(--text-secondary, #64748b);
  font-size: 13px;
}

.settings-pricing-readiness__head > strong {
  min-width: 54px;
  height: 54px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255,255,255,0.78);
  border: 1px solid var(--df-border, rgba(148,163,184,0.22));
  color: var(--text-primary, #0f172a);
  font-size: 16px;
}

.settings-pricing-checks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.settings-pricing-check {
  display: grid;
  gap: 3px;
  padding: 11px 12px;
  min-height: 78px;
  border: 1px solid var(--df-border, rgba(148,163,184,0.22));
  border-radius: 8px;
  background: rgba(255,255,255,0.82);
  color: var(--text-primary, #0f172a);
  text-decoration: none;
}

.settings-pricing-check:hover {
  border-color: var(--df-primary-ring, rgba(37,99,235,0.22));
  background: var(--df-primary-soft, rgba(37,99,235,0.08));
}

.settings-pricing-check span {
  width: fit-content;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
  color: var(--text-secondary, #64748b);
  background: rgba(100,116,139,0.10);
}

.settings-pricing-check.is-ok span {
  color: #166534;
  background: rgba(22,163,74,0.12);
}

.settings-pricing-check.is-missing span {
  color: #92400e;
  background: rgba(217,119,6,0.14);
}

.settings-pricing-check strong {
  font-size: 13px;
}

.settings-pricing-check small {
  color: var(--text-secondary, #64748b);
  font-size: 11px;
  line-height: 1.35;
}

.settings-pricing-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.settings-pricing-stats div {
  display: grid;
  gap: 3px;
  padding: 12px;
  border: 1px solid var(--df-border, rgba(148,163,184,0.22));
  border-radius: 8px;
  background: rgba(15,23,42,0.04);
}

.settings-pricing-stats strong {
  color: var(--text-primary, #0f172a);
  font-size: 20px;
  line-height: 1;
}

.settings-pricing-stats span {
  color: var(--text-secondary, #64748b);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.settings-pricing-links {
  display: grid;
  gap: 8px;
}

.settings-pricing-link {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--df-border, rgba(148,163,184,0.22));
  border-radius: 8px;
  background: rgba(255,255,255,0.78);
  color: var(--text-primary, #0f172a);
  text-decoration: none;
}

.settings-pricing-link:hover {
  border-color: var(--df-primary-ring, rgba(37,99,235,0.22));
  background: var(--df-primary-soft, rgba(37,99,235,0.08));
}

.settings-pricing-link span {
  display: grid;
  gap: 2px;
}

.settings-pricing-link strong {
  font-size: 13px;
}

.settings-pricing-link small,
.settings-pricing-link b {
  color: var(--text-secondary, #64748b);
  font-size: 11px;
  font-weight: 800;
}

.settings-pricing-link--accent b {
  color: var(--accent-blue, #2563eb);
}

@media (max-width: 1100px) {
  .home-simple-links,
  .settings-saas-grid--pricing {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .home-simple-links,
  .settings-saas-grid--pricing {
    grid-template-columns: 1fr;
  }
}

/* DreamFlow Classic Operations redesign */
:root {
  --df-classic-bg: #f3f5f7;
  --df-classic-panel: #ffffff;
  --df-classic-line: #cfd7df;
  --df-classic-line-soft: #e3e8ee;
  --df-classic-head: #eef2f6;
  --df-classic-ink: #17212b;
  --df-classic-muted: #5f6f7f;
  --df-classic-blue: #285f8f;
  --df-classic-green: #49795b;
  --df-classic-warn: #9a6a2f;
}

.page-body,
.home-simple-shell,
.settings-saas-shell,
.pricebook-shell {
  background: var(--df-classic-bg);
}

.page-header,
.settings-page-header,
.home-page-header {
  padding: 14px 18px;
  border: 1px solid var(--df-classic-line);
  border-radius: 4px;
  background: linear-gradient(#fff, var(--df-classic-head));
  box-shadow: none;
}

.page-title,
.settings-page-title,
.section-title {
  letter-spacing: 0;
  color: var(--df-classic-ink);
}

.panel,
.card,
.settings-saas-panel,
.settings-saas-card,
.pricebook-hero,
.pricebook-sidebar,
.pricebook-form-host,
.pricebook-empty-state,
.pricebook-supplier-card,
.home-simple-panel,
.home-command-bar {
  border: 1px solid var(--df-classic-line);
  border-radius: 4px;
  background: var(--df-classic-panel);
  box-shadow: none;
}

.btn,
.home-command-action,
.home-simple-link,
.settings-pricing-link,
.settings-pricing-check,
.pricebook-category-pill,
.pricebook-table-action {
  border-radius: 3px;
}

.home-command-bar--classic {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.home-command-bar--classic .home-command-bar__copy {
  padding: 14px 16px;
  border-right: 1px solid var(--df-classic-line);
  background: var(--df-classic-head);
}

.home-command-bar--classic .home-command-bar__title {
  font-size: 18px;
  margin: 2px 0 4px;
}

.home-command-bar--classic .home-command-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
}

.home-command-bar--classic .home-command-action {
  min-height: 74px;
  border: 0;
  border-right: 1px solid var(--df-classic-line-soft);
  background: #fff;
  color: var(--df-classic-ink);
  text-align: left;
}

.home-command-bar--classic .home-command-action:last-child {
  border-right: 0;
}

.home-command-bar--classic .home-command-action:hover,
.home-simple-link:hover,
.settings-pricing-link:hover,
.settings-pricing-check:hover,
.pricebook-category-pill:hover {
  background: #f8fafc;
  border-color: var(--df-classic-blue);
}

.home-command-bar--classic .home-command-action strong {
  font-size: 15px;
  color: var(--df-classic-blue);
}

.home-setup-strip--classic {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 4px;
  border-color: var(--df-classic-line);
  box-shadow: none;
  background: #fff;
}

.home-setup-strip__main p {
  margin: 4px 0 0;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.4;
}

.home-setup-strip__status {
  min-height: 44px;
  border: 1px solid var(--df-classic-line);
  border-radius: 4px;
  display: grid;
  place-items: center;
  padding: 6px 10px;
  background: #f8fafc;
}

.home-setup-strip__status strong {
  color: var(--df-classic-blue);
  font-size: 14px;
}

.home-setup-strip__status span {
  color: var(--text-tertiary);
  font-size: 11px;
}

.home-setup-strip__status.needs-work strong {
  color: var(--studio-orange);
}

.home-setup-strip__links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.home-setup-strip__links a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid var(--df-classic-line);
  border-radius: 4px;
  background: #fff;
  color: var(--df-classic-blue);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.home-setup-strip__links a:hover {
  background: #f8fafc;
  border-color: var(--df-classic-blue);
}

.home-simple-panel--classic {
  padding: 0;
  overflow: hidden;
}

.home-simple-panel--classic .home-simple-panel__head,
.pricebook-sidebar__head,
.settings-saas-sidebar__head,
.settings-block-head {
  padding: 11px 14px;
  border-bottom: 1px solid var(--df-classic-line);
  background: var(--df-classic-head);
}

.home-simple-panel--classic .home-simple-links {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.home-simple-panel--classic .home-simple-link {
  min-height: 46px;
  display: grid;
  grid-template-columns: 160px 1fr;
  padding: 9px 14px;
  border: 0;
  border-bottom: 1px solid var(--df-classic-line-soft);
  background: #fff;
}

.home-simple-panel--classic .home-simple-link:last-child {
  border-bottom: 0;
}

.settings-saas-layout {
  grid-template-columns: 230px 1fr;
  border-top: 1px solid var(--df-classic-line);
}

.settings-saas-layout.settings-saas-layout--reference {
  grid-template-columns: minmax(0, 1fr);
}

.settings-saas-sidebar {
  padding: 0;
  border-right: 1px solid var(--df-classic-line);
  background: #f8fafc;
}

.settings-saas-sidebar__list {
  gap: 0;
}

.settings-saas-sidebar__item {
  padding: 10px 12px;
  border-radius: 0;
  border-bottom: 1px solid var(--df-classic-line-soft);
}

.settings-saas-sidebar__item.is-active {
  background: #fff;
  box-shadow: inset 4px 0 0 var(--df-classic-blue);
}

.settings-saas-sidebar__copy {
  display: none;
}

.settings-saas-main {
  padding: 16px;
}

@media (max-width: 900px) {
  .settings-saas-layout,
  .settings-saas-layout.settings-saas-layout--reference {
    grid-template-columns: minmax(0, 1fr);
  }

  .settings-saas-sidebar {
    display: none;
  }

  .settings-saas-mobile-nav {
    display: flex;
    margin: 16px;
  }

  .settings-saas-main {
    grid-column: 1;
    width: 100%;
    min-width: 0;
    padding: 16px;
  }

  .settings-saas-panel,
  .settings-saas-card,
  .settings-section-header__copy {
    min-width: 0;
  }

  .settings-section-header {
    flex-direction: column;
    align-items: stretch;
  }

  .settings-section-header__actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .settings-saas-grid--company,
  .settings-saas-grid--documents,
  .settings-access-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.settings-saas-panel {
  border-radius: 4px;
}

.settings-section-header {
  padding: 12px 14px;
  background: var(--df-classic-head);
  border-bottom: 1px solid var(--df-classic-line);
}

.settings-saas-form {
  padding: 14px;
}

.settings-saas-card {
  padding: 0;
  overflow: hidden;
}

.settings-saas-card > .form-grid,
.settings-saas-card > .settings-toggle-grid,
.settings-saas-card > .settings-pricing-checks,
.settings-saas-card > .settings-pricing-stats,
.settings-saas-card > .settings-pricing-links {
  padding: 12px;
}

.settings-pricing-readiness__head {
  padding: 12px;
  border-bottom: 1px solid var(--df-classic-line);
  background: var(--df-classic-head);
}

.settings-pricing-readiness,
.settings-pricing-readiness.is-ready,
.settings-pricing-readiness.needs-work {
  background: #fff;
  border-color: var(--df-classic-line);
}

.settings-pricing-checks {
  grid-template-columns: 1fr;
}

.settings-pricing-check {
  min-height: 48px;
  grid-template-columns: 70px 120px 1fr;
  align-items: center;
  border-color: var(--df-classic-line-soft);
}

.settings-pricing-stats div,
.pricebook-metric-card,
.suppliers-metric {
  border-radius: 3px;
  background: #fff;
  border-color: var(--df-classic-line);
}

.settings-pricing-link {
  min-height: 42px;
  border-color: var(--df-classic-line-soft);
  background: #fff;
}

.pricebook-layout {
  gap: 12px;
}

.pricebook-category-list,
.pricebook-groups {
  gap: 8px;
}

.pricebook-table-wrap table,
.pricebook-table,
table {
  border-collapse: collapse;
}

.pricebook-table-wrap th,
.pricebook-table-wrap td {
  border-bottom: 1px solid var(--df-classic-line-soft);
}

.pricebook-table-wrap th {
  background: var(--df-classic-head);
  color: var(--df-classic-ink);
  font-size: 11px;
  text-transform: uppercase;
}

.pricebook-shell--classic {
  gap: 12px;
}

.pricebook-hero--classic {
  grid-template-columns: minmax(0, 1fr) 430px;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.pricebook-hero--classic .pricebook-hero__main {
  padding: 14px 16px;
  border-right: 1px solid var(--df-classic-line);
}

.pricebook-hero--classic .pricebook-hero__metrics--classic {
  grid-template-columns: 1fr;
  gap: 0;
}

.pricebook-hero--classic .pricebook-metric-card {
  min-height: 0;
  padding: 10px 12px;
  border-width: 0 0 1px 0;
  border-radius: 0;
  background: #fff;
}

.pricebook-hero--classic .pricebook-metric-card:last-child {
  border-bottom: 0;
}

.pricebook-hero--classic .pricebook-chip-row {
  gap: 6px;
}

.pricebook-layout--classic {
  grid-template-columns: 230px minmax(0, 1fr);
  align-items: start;
}

.pricebook-layout--classic .pricebook-sidebar {
  position: sticky;
  top: 16px;
  padding: 0;
  overflow: hidden;
}

.pricebook-layout--classic .pricebook-category-list {
  gap: 0;
}

.pricebook-layout--classic .pricebook-category-pill {
  min-height: 38px;
  border: 0;
  border-bottom: 1px solid var(--df-classic-line-soft);
  border-radius: 0;
  background: #fff;
}

.pricebook-layout--classic .pricebook-category-pill.is-active {
  background: #fff;
  box-shadow: inset 4px 0 0 var(--df-classic-blue);
}

.pricebook-layout--classic .pricebook-search-block,
.pricebook-sidebar-card--classic {
  padding: 12px;
  border-top: 1px solid var(--df-classic-line);
}

.pricebook-supplier-card {
  padding: 0;
  overflow: hidden;
}

.pricebook-supplier-card__summary {
  min-height: 44px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--df-classic-line);
  background: var(--df-classic-head);
}

.pricebook-supplier-card__title {
  gap: 2px;
}

.pricebook-supplier-card__meta {
  gap: 6px;
}

.pricebook-table-wrap {
  border-radius: 0;
}

.pricebook-item-cell {
  gap: 2px;
}

.supplier-table__actions {
  white-space: nowrap;
}

.supplier-table__actions .btn {
  min-height: 30px;
  padding: 6px 9px;
}

@media (max-width: 900px) {
  .home-command-bar--classic,
  .home-command-bar--classic .home-command-actions,
  .home-setup-strip--classic,
  .pricebook-hero--classic,
  .pricebook-layout--classic {
    grid-template-columns: 1fr;
  }
  .home-command-bar--classic .home-command-bar__copy,
  .home-command-bar--classic .home-command-action,
  .pricebook-hero--classic .pricebook-hero__main {
    border-right: 0;
    border-bottom: 1px solid var(--df-classic-line-soft);
  }
  .settings-pricing-check {
    grid-template-columns: 1fr;
  }
  .home-setup-strip__links {
    justify-content: flex-start;
  }
  .home-setup-strip__status {
    place-items: start;
  }
}

/* DreamFlow Classic Builder workflow */
body.is-builder #builder-shell {
  --bld-shell-bg: var(--df-classic-bg, #f3f5f7);
  --bld-shell-surface: #ffffff;
  --bld-shell-surface-strong: #ffffff;
  --bld-shell-surface-soft: var(--df-classic-head, #eef2f6);
  --bld-shell-border: var(--df-classic-line, #cfd7df);
  --bld-shell-border-strong: var(--df-classic-line, #cfd7df);
  --bld-shell-text: var(--df-classic-ink, #17212b);
  --bld-shell-text-muted: var(--df-classic-muted, #5f6f7f);
  --bld-shell-text-subtle: #6f7f8f;
  --bld-shell-accent: var(--df-classic-blue, #285f8f);
  --bld-shell-accent-hover: #1f4f79;
  --bld-shell-accent-soft: rgba(40,95,143,0.08);
  --bld-shell-accent-border: rgba(40,95,143,0.28);
  --bld-shell-hover: #f8fafc;
  --bld-shell-shadow: none;
  --bld-shell-shadow-strong: none;
  background: var(--df-classic-bg, #f3f5f7);
}

body.is-builder .bld-topbar {
  min-height: 48px;
  padding: 0 10px;
  gap: 8px;
  border-bottom: 1px solid var(--bld-shell-border);
  background: linear-gradient(#fff, var(--bld-shell-surface-soft));
  box-shadow: none;
}

body.is-builder .bld-brand {
  min-width: 110px;
  gap: 7px;
}

body.is-builder .bld-brand img {
  width: 24px;
  height: 24px;
}

body.is-builder .bld-brand span {
  font-size: 14px;
  font-weight: 800;
}

body.is-builder .bld-back,
body.is-builder .bld-action,
body.is-builder .bld-project-btn {
  min-height: 32px;
  border-radius: 3px;
  box-shadow: none;
}

body.is-builder .bld-project-btn {
  min-width: 210px;
  padding: 5px 10px;
  background: #fff;
}

body.is-builder .bld-project-btn--missing {
  border-color: rgba(180, 116, 32, 0.42);
  background: #fff8ed;
}

body.is-builder .bld-project-btn__name {
  font-size: 13px;
}

body.is-builder .bld-project-btn__label,
body.is-builder .bld-save-status,
body.is-builder .bld-action {
  font-size: 11px;
}

body.is-builder .bld-action {
  padding: 0 10px;
  border: 1px solid var(--bld-shell-border);
  background: #fff;
  color: var(--bld-shell-text);
}

body.is-builder .bld-action--ghost,
body.is-builder .bld-action--outline {
  background: #fff;
}

body.is-builder .bld-action--primary {
  background: var(--bld-shell-accent);
  border-color: var(--bld-shell-accent);
  color: #fff;
}

body.is-builder .bld-action--danger {
  background: #fff;
  border-color: #d3a4a4;
  color: #9b3f3f;
}

body.is-builder .bld-topbar-sep {
  height: 28px;
  background: var(--bld-shell-border);
}

body.is-builder .bld-stepbar {
  min-height: 42px;
  padding: 0 10px;
  gap: 0;
  border-bottom: 1px solid var(--bld-shell-border);
  background: #fff;
  box-shadow: none;
}

body.is-builder .bld-step {
  flex: 1 1 0;
  min-width: 0;
  min-height: 42px;
  padding: 0 10px;
  gap: 8px;
  border: 0;
  border-right: 1px solid var(--bld-shell-border);
  border-bottom: 3px solid transparent;
  border-radius: 0;
  background: #fff;
  color: var(--bld-shell-text-muted);
}

body.is-builder .bld-step:first-child {
  border-left: 1px solid var(--bld-shell-border);
}

body.is-builder .bld-step:hover {
  background: #f8fafc;
}

body.is-builder .bld-step.active {
  background: #fff;
  border-bottom-color: var(--bld-shell-accent);
  color: var(--bld-shell-text);
}

body.is-builder .bld-step.is-complete {
  background: #f9fbfa;
  color: #315c40;
}

body.is-builder .bld-step__num {
  width: 22px;
  height: 22px;
  border-radius: 3px;
  border: 1px solid var(--bld-shell-border);
  background: var(--bld-shell-surface-soft);
  color: var(--bld-shell-text);
  font-size: 11px;
}

body.is-builder .bld-step.active .bld-step__num {
  background: var(--bld-shell-accent);
  border-color: var(--bld-shell-accent);
  color: #fff;
}

body.is-builder .bld-step__ico {
  display: none;
}

body.is-builder .bld-step__label {
  min-width: 0;
  font-size: 12px;
  line-height: 1.1;
}

body.is-builder .bld-step__label small {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--bld-shell-text-subtle);
  font-size: 10px;
}

body.is-builder .bld-workspace {
  gap: 10px;
  padding: 10px;
  background: var(--df-classic-bg, #f3f5f7);
}

body.is-builder .bld-canvas-area {
  border: 1px solid var(--bld-shell-border);
  border-radius: 4px;
  background: #fff;
  box-shadow: none;
}

body.is-builder #canvasHint {
  border: 1px solid var(--bld-shell-border);
  border-radius: 4px;
  background: #fff;
  box-shadow: none;
}

body.is-builder #canvasHint h3,
body.is-builder #stepTitle {
  font-size: 16px;
  letter-spacing: 0;
}

body.is-builder #canvasHint p,
body.is-builder #stepSubtitle,
body.is-builder #designerSummary {
  color: var(--bld-shell-text-muted);
  font-size: 12px;
}

body.is-builder .builder-step-nav {
  gap: 8px;
  padding-top: 10px;
}

body.is-builder .builder-step-nav button {
  min-height: 32px;
  border-radius: 3px;
}

body.is-builder .builder-step-nav button:disabled {
  opacity: .48;
  cursor: default;
}

body.is-builder .bld-toolbox {
  width: 248px;
  padding: 10px;
  border-left: 1px solid var(--bld-shell-border);
  background: #f8fafc;
  box-shadow: none;
}

body.is-builder .bld-tools-grid {
  gap: 6px;
}

body.is-builder .bld-tool {
  min-height: 34px;
  padding: 6px 8px;
  border-radius: 3px;
  background: #fff;
  box-shadow: none;
  font-size: 12px;
}

body.is-builder .bld-tool__icon {
  width: 22px;
  height: 22px;
  border-radius: 3px;
  box-shadow: none;
}

body.is-builder #status,
body.is-builder #step3Panel,
body.is-builder #step1SidebarPanel,
body.is-builder #step5SidebarPanel,
body.is-builder #step4SinksPanel,
body.is-builder #step1SqftWidget {
  border: 1px solid var(--bld-shell-border);
  border-radius: 4px;
  background: #fff;
  box-shadow: none;
}

body.is-builder #status {
  padding: 9px 10px;
  color: var(--bld-shell-text-muted);
  font-size: 12px;
}

body.step5-active .bld-workspace,
body.step6-active .bld-workspace,
body.step6-active .bld-canvas-area {
  background: var(--df-classic-bg, #f3f5f7);
}

body.step5-active .bld-canvas-area,
body.step6-active .bld-canvas-area {
  border: 0;
  background: transparent;
}

body.step6-active #canvasHint {
  border: 0;
  background: transparent;
}

body.step6-active .wb2-step6-shell,
body.step6-active .wb2-step6-shell--padded {
  padding: 10px;
  background: var(--df-classic-bg, #f3f5f7);
}

.wb2-step6-shell__grid {
  gap: 12px;
}

.wb2-step6-composer,
.wb2-step6-workspace-header,
.wb2-step6-group-card,
.wb2-step6-summary-card,
.wb2-step6-controls,
.wb2-step6-line-menu {
  border: 1px solid var(--df-classic-line, #cfd7df);
  border-radius: 4px;
  background: #fff;
  box-shadow: none;
}

.wb2-step6-composer__head,
.wb2-step6-workspace-header,
.wb2-step6-group-card__header,
.wb2-step6-controls__summary {
  background: var(--df-classic-head, #eef2f6);
  border-bottom: 1px solid var(--df-classic-line, #cfd7df);
}

.wb2-step6-group-card__header {
  min-height: 42px;
  padding: 9px 12px;
}

.wb2-step6-group-card__badge,
.wb2-step6-group-label__badge {
  border-radius: 3px;
  box-shadow: none;
}

.wb2-step6-compact-line {
  border-bottom: 1px solid var(--df-classic-line-soft, #e3e8ee);
  background: #fff;
}

.wb2-step6-compact-line__grid {
  min-height: 42px;
  padding: 8px 12px;
}

.wb2-step6-compact-line__edit,
.wb2-btn {
  border-radius: 3px;
  box-shadow: none;
}

.wb2-step6-composer__meta {
  margin-top: 2px;
  color: var(--df-classic-muted, #5f6f7f);
  font-size: 11px;
  line-height: 1.3;
}

.wb2-step6-more {
  position: relative;
}

.wb2-step6-more summary {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--df-classic-line, #cfd7df);
  border-radius: 3px;
  background: #fff;
  color: var(--df-classic-ink, #17212b);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.wb2-step6-more summary::-webkit-details-marker {
  display: none;
}

.wb2-step6-more__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 30;
  display: grid;
  gap: 6px;
  min-width: 150px;
  padding: 8px;
  border: 1px solid var(--df-classic-line, #cfd7df);
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(15,23,42,.12);
}

@media (max-width: 980px) {
  body.is-builder .bld-step {
    flex: 0 0 168px;
  }
  body.is-builder .bld-toolbox {
    width: 100%;
    border-left: 0;
    border-top: 1px solid var(--bld-shell-border);
  }
}

@media (max-width: 680px) {
  body.is-builder .bld-topbar {
    min-height: auto;
    padding: 8px;
  }
  body.is-builder .bld-brand {
    display: none;
  }
  body.is-builder .bld-project-btn {
    min-width: 150px;
  }
  body.is-builder .bld-step {
    flex-basis: 132px;
  }
  body.is-builder .bld-step__label small {
    display: none;
  }
}

/* DreamFlow Classic Operations lists */
.ops-shell,
.surface-stack {
  gap: 12px;
}

.ops-hero,
.surface-hero,
.surface-summary-card,
.surface-empty-card,
.ops-table-card,
.ops-panel,
.ops-section-toggle {
  border: 1px solid var(--df-classic-line, #cfd7df);
  border-radius: 4px;
  background: #fff;
  box-shadow: none;
}

.ops-hero,
.surface-hero {
  padding: 0;
  overflow: hidden;
  background: #fff;
}

.ops-hero__head,
.surface-hero__copy,
.surface-summary-card__header,
.surface-summary-card__hero {
  padding: 12px 14px;
  border-bottom: 1px solid var(--df-classic-line, #cfd7df);
  background: var(--df-classic-head, #eef2f6);
}

.ops-hero__title,
.surface-route-copy h1,
.surface-hero__title,
.surface-summary-card__title {
  margin: 0;
  color: var(--df-classic-ink, #17212b);
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: 0;
}

.ops-hero__copy,
.surface-route-copy p,
.surface-hero__text,
.surface-summary-card__meta,
.surface-summary-card__submeta {
  color: var(--df-classic-muted, #5f6f7f);
  font-size: 12px;
  line-height: 1.4;
}

.ops-hero__eyebrow,
.surface-hero__eyebrow,
.surface-watchlist__eyebrow,
.surface-summary-card__aside-label,
.surface-summary-card__panel-eyebrow,
.surface-summary-card__stat-label {
  color: var(--df-classic-muted, #5f6f7f);
  font-size: 10px;
  letter-spacing: 0.06em;
}

.ops-metrics,
.surface-hero__metric-grid,
.surface-summary-card__stat-grid {
  gap: 0;
}

.ops-metric,
.surface-hero__metric,
.surface-summary-card__stat,
.surface-summary-card__panel {
  min-height: 0;
  padding: 10px 12px;
  border-width: 0 1px 0 0;
  border-color: var(--df-classic-line-soft, #e3e8ee);
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

.ops-metric:last-child,
.surface-hero__metric:last-child,
.surface-summary-card__stat:last-child {
  border-right: 0;
}

.ops-metric__value,
.surface-hero__metric-value,
.surface-summary-card__stat-value,
.surface-summary-card__aside-value {
  color: var(--df-classic-ink, #17212b);
  font-size: 22px;
  line-height: 1;
}

.ops-metric__subtext,
.surface-hero__metric-label,
.surface-summary-card__panel-copy {
  color: var(--df-classic-muted, #5f6f7f);
  font-size: 11px;
}

.ops-table-card {
  overflow: auto;
}

.ops-filter-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border: 1px solid var(--df-classic-line, #cfd7df);
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
}

.ops-filter-pill {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border-right: 1px solid var(--df-classic-line-soft, #e3e8ee);
  color: var(--df-classic-ink, #17212b);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.ops-filter-pill:last-child {
  border-right: 0;
}

.ops-filter-pill:hover {
  background: #f8fafc;
}

.ops-filter-pill.is-active {
  background: var(--df-classic-head, #eef2f6);
  box-shadow: inset 0 -3px 0 var(--df-classic-blue, #285f8f);
}

.ops-filter-pill strong {
  min-width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  border-radius: 3px;
  background: #eef2f6;
  color: var(--df-classic-muted, #5f6f7f);
  font-size: 11px;
}

.ops-saved-views {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--df-classic-line, #cfd7df);
  border-radius: 4px;
  background: #fff;
}

.ops-saved-views__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.ops-saved-views__eyebrow {
  color: var(--df-classic-muted, #5f6f7f);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ops-saved-views__title {
  color: var(--df-classic-ink, #17212b);
  font-size: 14px;
  font-weight: 800;
}

.ops-saved-views__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

.orders-search-panel {
  margin: 10px 0;
}

.orders-search-panel input,
.order-views-search {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--df-classic-line, #cfd7df);
  border-radius: 6px;
  padding: 0 12px;
  background: #fff;
  color: var(--df-classic-ink, #17212b);
  font-size: 15px;
}

.order-views-modal {
  max-width: 760px;
  padding: 0;
  overflow: hidden;
}

.order-views-head {
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--df-classic-line, #cfd7df);
  background: #fff;
  color: var(--df-classic-ink, #17212b);
}

.order-views-head h2 {
  margin: 0 auto 0 0;
  font-size: 24px;
  font-weight: 850;
}

.order-views-head__icon,
.order-views-head .df-modal-close {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--df-classic-line, #cfd7df);
  border-radius: 6px;
  background: #fff;
  color: var(--df-classic-blue, #285f8f);
  font-size: 20px;
  font-weight: 800;
  cursor: pointer;
}

.order-views-body {
  padding: 24px 16px 28px;
  background: #f8fafc;
}

.order-views-section-title {
  margin-top: 28px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--df-classic-line, #cfd7df);
  color: var(--df-classic-ink, #17212b);
  font-size: 18px;
  font-weight: 850;
}

.order-views-list {
  margin-top: 16px;
  border: 1px solid var(--df-classic-line, #cfd7df);
  border-radius: 6px;
  overflow: hidden;
}

.order-views-row {
  width: 100%;
  min-height: 62px;
  display: grid;
  grid-template-columns: 28px 1fr auto auto;
  align-items: center;
  gap: 10px;
  border: 0;
  border-bottom: 1px solid var(--df-classic-line-soft, #e3e8ee);
  padding: 0 16px;
  background: #fff;
  color: var(--df-classic-ink, #17212b);
  text-align: left;
  font-size: 16px;
  cursor: pointer;
}

.order-views-row:nth-child(even) {
  background: #f8fafc;
}

.order-views-row:last-child {
  border-bottom: 0;
}

.order-views-row__mark {
  color: var(--df-classic-blue, #285f8f);
  font-size: 20px;
  font-weight: 900;
}

.order-views-row__label {
  text-decoration: underline;
}

.order-views-row em {
  color: var(--df-classic-blue, #285f8f);
  font-size: 15px;
}

.order-views-row strong {
  min-width: 34px;
  color: var(--df-classic-muted, #5f6f7f);
  text-align: right;
}

.ops-table {
  font-size: 13px;
}

.ops-table thead tr {
  background: var(--df-classic-head, #eef2f6);
  border-bottom: 1px solid var(--df-classic-line, #cfd7df);
}

.ops-table th {
  padding: 9px 12px;
  color: var(--df-classic-ink, #17212b);
  font-size: 10px;
  letter-spacing: 0.06em;
}

.ops-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--df-classic-line-soft, #e3e8ee);
  vertical-align: middle;
}

.ops-table tbody tr:hover {
  background: #f8fafc;
}

.ops-identity {
  gap: 2px;
}

.ops-identity__title,
.lead-table__name {
  color: var(--df-classic-ink, #17212b);
  font-size: 13px;
}

.ops-identity__meta,
.ops-identity__sub,
.lead-table__sub,
.lead-table__contact-sub,
.lead-table__address,
.lead-table__date {
  color: var(--df-classic-muted, #5f6f7f);
  font-size: 11px;
}

.ops-code,
.ops-chip,
.surface-summary-card__badge,
.lead-table__reminder,
.surface-watchlist__item-badge {
  min-height: 22px;
  padding: 2px 7px;
  border-radius: 3px;
  font-size: 10px;
  letter-spacing: 0.04em;
}

.ops-amount {
  font-size: 14px;
}

.ops-actions,
.lead-table__actions,
.surface-route-actions {
  gap: 6px;
}

.ops-actions .btn,
.lead-table__actions .btn,
.surface-route-actions .btn {
  min-height: 28px;
  padding: 0 8px;
  border-radius: 3px;
  font-size: 11px;
}

.page-body__head {
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid var(--df-classic-line, #cfd7df);
  border-radius: 4px;
  background: linear-gradient(#fff, var(--df-classic-head, #eef2f6));
}

.surface-hero__layout {
  gap: 0;
}

.surface-hero__primary,
.surface-hero__secondary {
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

.surface-hero__secondary {
  border-left: 1px solid var(--df-classic-line, #cfd7df);
}

.surface-watchlist__head {
  padding: 12px 14px;
  border-bottom: 1px solid var(--df-classic-line, #cfd7df);
  background: var(--df-classic-head, #eef2f6);
}

.surface-watchlist__list {
  gap: 0;
}

.surface-watchlist__item {
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--df-classic-line-soft, #e3e8ee);
  border-radius: 0;
  background: #fff;
}

.surface-watchlist__item:last-child {
  border-bottom: 0;
}

.surface-empty-card {
  padding: 28px 18px;
}

.surface-empty-card__icon,
.ops-empty__mark {
  min-width: 42px;
  height: 42px;
  border-radius: 3px;
}

.ops-section-toggle {
  padding: 0;
  overflow: hidden;
}

.ops-section-toggle summary {
  padding: 10px 12px;
  border-bottom: 1px solid var(--df-classic-line, #cfd7df);
  background: var(--df-classic-head, #eef2f6);
}

.ops-table-stack {
  margin-top: 0;
}

@media (max-width: 860px) {
  .surface-hero__layout,
  .ops-metrics,
  .surface-hero__metric-grid,
  .surface-summary-card__stat-grid {
    grid-template-columns: 1fr;
  }
  .surface-hero__secondary {
    border-left: 0;
    border-top: 1px solid var(--df-classic-line, #cfd7df);
  }
  .ops-metric,
  .surface-hero__metric,
  .surface-summary-card__stat {
    border-right: 0;
    border-bottom: 1px solid var(--df-classic-line-soft, #e3e8ee);
  }
}

/* DreamFlow Classic Measurement workflow (Builder steps 1-4) */
body.is-builder:not(.step5-active):not(.step6-active) .bld-workspace {
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 10px;
}

body.is-builder:not(.step5-active):not(.step6-active) .bld-canvas-area {
  margin: 10px 0 10px 10px;
}

body.is-builder:not(.step5-active):not(.step6-active) .bld-toolbox {
  width: auto;
  margin: 10px 10px 10px 0;
  padding: 0;
  gap: 0;
  border-radius: 4px;
  overflow: hidden auto;
}

body.is-builder:not(.step5-active):not(.step6-active) .bld-tools-grid {
  grid-template-columns: 1fr;
  gap: 0;
  border-bottom: 1px solid var(--df-classic-line, #cfd7df);
}

body.is-builder:not(.step5-active):not(.step6-active) .bld-tool {
  min-height: 36px;
  flex-direction: row;
  justify-content: flex-start;
  gap: 8px;
  padding: 7px 10px;
  border: 0;
  border-bottom: 1px solid var(--df-classic-line-soft, #e3e8ee);
  border-radius: 0;
  background: #fff;
}

body.is-builder:not(.step5-active):not(.step6-active) .bld-tool:last-child {
  border-bottom: 0;
}

body.is-builder:not(.step5-active):not(.step6-active) .bld-tool.active {
  background: #f8fafc;
  box-shadow: inset 4px 0 0 var(--df-classic-blue, #285f8f);
}

body.is-builder:not(.step5-active):not(.step6-active) .bld-tool__icon {
  width: 28px;
  height: 20px;
  flex: 0 0 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

body.is-builder:not(.step5-active):not(.step6-active) .bld-tool__label {
  overflow: hidden;
  color: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.is-builder:not(.step5-active):not(.step6-active) #canvasHint {
  top: 10px;
  left: 10px;
  width: min(330px, calc(100% - 20px));
  gap: 8px;
  padding: 0;
  overflow: hidden;
}

body.is-builder:not(.step5-active):not(.step6-active) #canvasHint h3,
body.is-builder:not(.step5-active):not(.step6-active) #canvasHint #stepTitle {
  padding: 10px 12px 0;
}

body.is-builder:not(.step5-active):not(.step6-active) #canvasHint #stepSubtitle,
body.is-builder:not(.step5-active):not(.step6-active) #canvasHint #designerSummary {
  margin-left: 12px;
  margin-right: 12px;
}

body.is-builder:not(.step5-active):not(.step6-active) #designerSummary {
  padding: 7px 9px;
  border-radius: 3px;
  background: #f8fafc;
  color: var(--df-classic-ink, #17212b);
}

body.is-builder:not(.step5-active):not(.step6-active) #designerForm {
  gap: 0;
  margin: 0;
}

body.is-builder:not(.step5-active):not(.step6-active) #fieldsHost {
  padding: 0 12px 12px;
}

body.is-builder:not(.step5-active):not(.step6-active) #fieldsHost .grid,
body.is-builder:not(.step5-active):not(.step6-active) .wb2-grid,
body.is-builder:not(.step5-active):not(.step6-active) .wb2-form-grid {
  display: grid;
  gap: 8px;
}

body.is-builder:not(.step5-active):not(.step6-active) .wb2-card,
body.is-builder:not(.step5-active):not(.step6-active) .wb2-panel,
body.is-builder:not(.step5-active):not(.step6-active) .wb2-metric,
body.is-builder:not(.step5-active):not(.step6-active) .step4-panel,
body.is-builder:not(.step5-active):not(.step6-active) .step4-panel__card,
body.is-builder:not(.step5-active):not(.step6-active) .step3-price-list {
  border: 1px solid var(--df-classic-line, #cfd7df);
  border-radius: 4px;
  background: #fff;
  box-shadow: none;
}

body.is-builder:not(.step5-active):not(.step6-active) .wb2-card,
body.is-builder:not(.step5-active):not(.step6-active) .step4-panel {
  padding: 0;
  overflow: hidden;
}

body.is-builder:not(.step5-active):not(.step6-active) .wb2-section,
body.is-builder:not(.step5-active):not(.step6-active) .step4-panel__intro,
body.is-builder:not(.step5-active):not(.step6-active) .step4-panel__head {
  padding: 10px 12px;
  border-bottom: 1px solid var(--df-classic-line, #cfd7df);
  background: var(--df-classic-head, #eef2f6);
}

body.is-builder:not(.step5-active):not(.step6-active) .wb2-card > :not(.wb2-section),
body.is-builder:not(.step5-active):not(.step6-active) .step4-panel > :not(.step4-panel__head):not(.step4-panel__intro) {
  margin: 10px 12px;
}

body.is-builder:not(.step5-active):not(.step6-active) .wb2-flow-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  border-bottom: 1px solid var(--df-classic-line, #cfd7df);
}

body.is-builder:not(.step5-active):not(.step6-active) .wb2-flow-stats > div {
  min-width: 0;
  padding: 9px 8px;
  border-right: 1px solid var(--df-classic-line-soft, #e3e8ee);
  text-align: center;
}

body.is-builder:not(.step5-active):not(.step6-active) .wb2-flow-stats > div:last-child {
  border-right: 0;
}

body.is-builder:not(.step5-active):not(.step6-active) .wb2-flow-stats strong {
  display: block;
  color: var(--df-classic-ink, #17212b);
  font-size: 16px;
  line-height: 1;
}

body.is-builder:not(.step5-active):not(.step6-active) .wb2-flow-stats span {
  display: block;
  margin-top: 3px;
  color: var(--df-classic-muted, #5f6f7f);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

body.is-builder:not(.step5-active):not(.step6-active) .wb2-flow-list {
  display: grid;
  gap: 0;
  margin: 0;
}

body.is-builder:not(.step5-active):not(.step6-active) .wb2-flow-list--panel {
  border-top: 1px solid var(--df-classic-line, #cfd7df);
}

body.is-builder:not(.step5-active):not(.step6-active) .wb2-flow-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 38px;
  padding: 7px 10px;
  border-bottom: 1px solid var(--df-classic-line-soft, #e3e8ee);
}

body.is-builder:not(.step5-active):not(.step6-active) .wb2-flow-row:last-child {
  border-bottom: 0;
}

body.is-builder:not(.step5-active):not(.step6-active) .wb2-flow-row span {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--df-classic-line, #cfd7df);
  border-radius: 3px;
  background: #f8fafc;
  color: var(--df-classic-blue, #285f8f);
  font-size: 10px;
  font-weight: 900;
}

body.is-builder:not(.step5-active):not(.step6-active) .wb2-flow-row strong {
  display: block;
  color: var(--df-classic-ink, #17212b);
  font-size: 12px;
  line-height: 1.2;
}

body.is-builder:not(.step5-active):not(.step6-active) .wb2-flow-row em {
  display: block;
  grid-column: 2;
  color: var(--df-classic-muted, #5f6f7f);
  font-size: 11px;
  font-style: normal;
  line-height: 1.25;
}

body.is-builder:not(.step5-active):not(.step6-active) .wb2-focus-card {
  padding: 10px;
  border: 1px solid var(--df-classic-line, #cfd7df);
  border-radius: 4px;
  background: #fff;
}

body.is-builder:not(.step5-active):not(.step6-active) .wb2-focus-card__eyebrow,
body.is-builder:not(.step5-active):not(.step6-active) .step3-panel__eyebrow {
  color: var(--df-classic-muted, #5f6f7f);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

body.is-builder:not(.step5-active):not(.step6-active) .wb2-focus-card__title,
body.is-builder:not(.step5-active):not(.step6-active) .step3-panel__focus-title {
  margin-top: 4px;
  color: var(--df-classic-ink, #17212b);
  font-size: 13px;
  font-weight: 900;
}

body.is-builder:not(.step5-active):not(.step6-active) .wb2-focus-card__copy,
body.is-builder:not(.step5-active):not(.step6-active) .step3-panel__focus-copy {
  margin-top: 3px;
  color: var(--df-classic-muted, #5f6f7f);
  font-size: 11px;
  line-height: 1.35;
}

body.is-builder:not(.step5-active):not(.step6-active) .wb2-title,
body.is-builder:not(.step5-active):not(.step6-active) .step4-panel__title,
body.is-builder:not(.step5-active):not(.step6-active) .step3-price-list__title {
  color: var(--df-classic-ink, #17212b);
  font-size: 13px;
  line-height: 1.25;
  letter-spacing: 0;
}

body.is-builder:not(.step5-active):not(.step6-active) .wb2-empty,
body.is-builder:not(.step5-active):not(.step6-active) .step4-panel__copy,
body.is-builder:not(.step5-active):not(.step6-active) .step3-price-list__copy {
  color: var(--df-classic-muted, #5f6f7f);
  font-size: 12px;
  line-height: 1.4;
}

body.is-builder:not(.step5-active):not(.step6-active) .wb2-field {
  display: grid;
  gap: 4px;
}

body.is-builder:not(.step5-active):not(.step6-active) .wb2-field__label,
body.is-builder:not(.step5-active):not(.step6-active) .step3-price-list__th {
  color: var(--df-classic-muted, #5f6f7f);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

body.is-builder:not(.step5-active):not(.step6-active) .wb2-input,
body.is-builder:not(.step5-active):not(.step6-active) .wb2-select,
body.is-builder:not(.step5-active):not(.step6-active) .wb2-textarea,
body.is-builder:not(.step5-active):not(.step6-active) .step3-price-list__input {
  min-height: 32px;
  border: 1px solid var(--df-classic-line, #cfd7df);
  border-radius: 3px;
  background: #fff;
  color: var(--df-classic-ink, #17212b);
  font-size: 12px;
  box-shadow: none;
}

body.is-builder:not(.step5-active):not(.step6-active) .wb2-btn,
body.is-builder:not(.step5-active):not(.step6-active) .df-button,
body.is-builder:not(.step5-active):not(.step6-active) .step4-panel__cta,
body.is-builder:not(.step5-active):not(.step6-active) .step4-outlet-modal__button,
body.is-builder:not(.step5-active):not(.step6-active) .step3-modal__actions button,
body.is-builder:not(.step5-active):not(.step6-active) .wb2-step2-modal__save,
body.is-builder:not(.step5-active):not(.step6-active) .wb2-step2-corner-modal__save {
  min-height: 30px;
  border-radius: 3px;
  box-shadow: none;
  font-size: 12px;
}

body.is-builder:not(.step5-active):not(.step6-active) .builder-step-nav {
  margin: 0;
  padding: 10px 12px;
  border-top: 1px solid var(--df-classic-line, #cfd7df);
  background: var(--df-classic-head, #eef2f6);
}

body.is-builder:not(.step5-active):not(.step6-active) #floating-tools {
  bottom: 10px;
  min-height: 34px;
  padding: 5px;
  border: 1px solid var(--df-classic-line, #cfd7df);
  border-radius: 4px;
  background: #fff;
  box-shadow: none;
  backdrop-filter: none;
}

body.is-builder:not(.step5-active):not(.step6-active) #floating-tools .bld-action {
  min-height: 28px;
}

body.is-builder:not(.step5-active):not(.step6-active) #step1SqftWidget {
  margin: 0;
  padding: 10px 12px;
  border-width: 0 0 1px;
  border-radius: 0;
  background: #fff;
}

body.is-builder:not(.step5-active):not(.step6-active) .sqft-widget-value {
  color: var(--df-classic-blue, #285f8f);
  font-size: 22px;
}

body.is-builder:not(.step5-active):not(.step6-active) #step1SidebarPanel,
body.is-builder:not(.step5-active):not(.step6-active) #step4SinksPanel,
body.is-builder:not(.step5-active):not(.step6-active) #step3Panel {
  margin: 0;
  padding: 0;
  border-width: 0 0 1px;
  border-radius: 0;
}

body.is-builder:not(.step5-active):not(.step6-active) #step3Panel h4,
body.is-builder:not(.step5-active):not(.step6-active) #step3Hint,
body.is-builder:not(.step5-active):not(.step6-active) #step3EdgeOptions {
  margin: 10px 12px;
}

body.is-builder:not(.step5-active):not(.step6-active) #status {
  margin-top: auto;
  border-width: 1px 0 0;
  border-radius: 0;
  background: var(--df-classic-head, #eef2f6);
}

body.is-builder:not(.step5-active):not(.step6-active) .step4-panel {
  padding: 0;
  overflow: hidden;
}

body.is-builder:not(.step5-active):not(.step6-active) .step4-panel__list {
  display: grid;
  gap: 0;
}

body.is-builder:not(.step5-active):not(.step6-active) .step4-panel__card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-width: 0 0 1px;
  border-radius: 0;
}

body.is-builder:not(.step5-active):not(.step6-active) .step4-panel__thumb {
  width: 42px;
  height: 34px;
  border-radius: 3px;
}

body.is-builder:not(.step5-active):not(.step6-active) .step4-panel__name,
body.is-builder:not(.step5-active):not(.step6-active) .step4-panel__price {
  font-size: 12px;
}

body.is-builder:not(.step5-active):not(.step6-active) .step3-menu,
body.is-builder:not(.step5-active):not(.step6-active) .wb2-step2-edge-menu,
body.is-builder:not(.step5-active):not(.step6-active) .wb2-step2-menu,
body.is-builder:not(.step5-active):not(.step6-active) .step3-modal__card,
body.is-builder:not(.step5-active):not(.step6-active) .wb2-step2-modal__card,
body.is-builder:not(.step5-active):not(.step6-active) .step4-gallery__card,
body.is-builder:not(.step5-active):not(.step6-active) .step4-properties__card,
body.is-builder:not(.step5-active):not(.step6-active) .step4-outlet-modal__card {
  border: 1px solid var(--df-classic-line, #cfd7df);
  border-radius: 4px;
  background: #fff;
  box-shadow: none;
}

body.is-builder:not(.step5-active):not(.step6-active) .step3-menu__head,
body.is-builder:not(.step5-active):not(.step6-active) .wb2-step2-modal__header,
body.is-builder:not(.step5-active):not(.step6-active) .step4-gallery__head,
body.is-builder:not(.step5-active):not(.step6-active) .step4-properties__head,
body.is-builder:not(.step5-active):not(.step6-active) .step4-outlet-modal__head {
  background: var(--df-classic-head, #eef2f6);
  border-bottom: 1px solid var(--df-classic-line, #cfd7df);
}

body.is-builder:not(.step5-active):not(.step6-active) .step3-menu__item,
body.is-builder:not(.step5-active):not(.step6-active) .wb2-step2-edge-menu__item,
body.is-builder:not(.step5-active):not(.step6-active) .wb2-step2-menu__item {
  min-height: 34px;
  border-radius: 3px;
}

@media (max-width: 980px) {
  body.is-builder:not(.step5-active):not(.step6-active) .bld-workspace {
    grid-template-columns: minmax(0, 1fr);
  }
  body.is-builder:not(.step5-active):not(.step6-active) .bld-canvas-area {
    margin: 10px;
  }
  body.is-builder:not(.step5-active):not(.step6-active) .bld-toolbox {
    margin: 0 10px 10px;
  }
  body.is-builder:not(.step5-active):not(.step6-active) .bld-tools-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
/* Step 6 classic density: audited quote review */
body.is-builder.step6-active #builder-shell {
  grid-template-rows: 43px 42px minmax(0, 1fr);
}

body.is-builder.step6-active .bld-topbar {
  height: 43px;
  min-height: 43px;
  padding: 0 8px;
  gap: 5px;
}

body.is-builder.step6-active .bld-back,
body.is-builder.step6-active .bld-action,
body.is-builder.step6-active .bld-project-btn {
  border-radius: 3px;
}

body.is-builder.step6-active .bld-back {
  padding: 5px 9px;
  font-size: 12px;
}

body.is-builder.step6-active .bld-brand {
  gap: 5px;
  padding-left: 2px;
}

body.is-builder.step6-active .bld-brand img {
  width: 18px;
  height: 18px;
}

body.is-builder.step6-active .bld-brand span {
  font-size: 13px;
}

body.is-builder.step6-active .bld-project-btn {
  padding: 4px 10px;
}

body.is-builder.step6-active .bld-project-btn__name {
  max-width: 180px;
  font-size: 12px;
}

body.is-builder.step6-active .bld-project-btn__label {
  font-size: 9px;
}

body.is-builder.step6-active .bld-save-status {
  max-width: 120px;
  overflow: hidden;
  font-size: 11px;
  white-space: nowrap;
}

body.is-builder.step6-active .bld-presence {
  max-width: 170px;
  overflow: hidden;
  white-space: nowrap;
  font-size: 11px;
}

body.is-builder.step6-active .bld-presence * {
  font-size: 11px !important;
  line-height: 1.15 !important;
}

body.is-builder.step6-active .bld-action {
  min-height: 32px;
  padding: 5px 10px;
  font-size: 11px;
}

body.is-builder.step6-active .bld-stepbar {
  min-height: 42px;
  padding: 0;
  gap: 0;
}

body.is-builder.step6-active .bld-step {
  min-height: 42px;
  gap: 7px;
  padding: 6px 10px;
  border-right: 1px solid var(--df-classic-line, #cfd7df);
  border-radius: 0;
}

body.is-builder.step6-active .bld-step__num {
  width: 20px;
  height: 20px;
  font-size: 11px;
  border-radius: 3px;
}

body.is-builder.step6-active .bld-step__ico {
  display: none;
}

body.is-builder.step6-active .bld-step__label {
  font-size: 12px;
  line-height: 1.1;
}

body.is-builder.step6-active .bld-step__label small {
  margin-top: 2px;
  font-size: 10px;
  line-height: 1.05;
}

body.step6-active .bld-canvas-area {
  min-height: 0;
  overflow: hidden;
}

body.step6-active .wb2-step6-shell,
body.step6-active .wb2-step6-shell--padded {
  padding: 6px 8px;
}

body.step6-active .wb2-step6-shell__grid {
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 8px;
}

body.step6-active .wb2-step6-shell__main {
  gap: 3px;
}

body.step6-active .wb2-step6-shell__aside {
  top: 6px;
  gap: 8px;
}

body.step6-active .wb2-step6-composer__head {
  min-height: 34px;
  padding: 5px 8px;
}

body.step6-active .wb2-step6-composer__title {
  font-size: 13px;
}

body.step6-active .wb2-step6-composer__copy {
  display: none;
}

body.step6-active .wb2-step6-composer__meta {
  display: block;
  max-width: 520px;
  overflow: hidden;
  color: var(--df-classic-muted, #5f6f7f);
  font-size: 11px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.step6-active .wb2-step6-composer__action,
body.step6-active .wb2-step6-more summary {
  min-height: 27px;
  padding: 0 8px;
  font-size: 11px;
}

body.step6-active .wb2-step6-group-card__header {
  min-height: 34px;
  padding: 6px 9px;
}

body.step6-active .wb2-step6-group-card__title {
  font-size: 13px;
}

body.step6-active .wb2-step6-group-card__count {
  font-size: 11px;
}

body.step6-active .wb2-step6-group-card__subtotal-value {
  font-size: 14px;
}

body.step6-active .wb2-step6-group-card__badge,
body.step6-active .wb2-step6-group-label__badge {
  width: 22px;
  height: 22px;
  font-size: 11px;
}

body.step6-active .wb2-step6-compact-line__grid {
  min-height: 33px;
  padding: 5px 8px;
  grid-template-columns: minmax(0, 1fr) 86px 112px;
  column-gap: 8px;
}

body.step6-active .wb2-step6-compact-line__title-row {
  gap: 7px;
  min-height: 22px;
  flex-wrap: nowrap;
}

body.step6-active .wb2-step6-compact-line__title {
  font-size: 13.5px;
  line-height: 1.1;
}

body.step6-active .wb2-step6-compact-line__meta {
  font-size: 12.5px;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.step6-active .wb2-step6-compact-line__amount-value {
  font-size: 13.5px;
}

body.step6-active .wb2-step6-compact-line__rate-button {
  font-size: 10.5px;
}

body.step6-active .wb2-step6-compact-line__edit {
  min-height: 24px;
  padding: 0 7px;
  font-size: 12px;
}

body.step6-active .wb2-step6-tax-badge {
  min-width:52px;
  min-height:22px;
  padding:2px 6px;
  font-size:10.5px;
}

body.step6-active .wb2-step6-compact-line__tbd {
  padding: 2px 7px;
  font-size: 10px;
}

body.step6-active .wb2-step6-summary-card {
  padding: 10px 11px;
}

body.step6-active .wb2-step6-summary-card__eyebrow {
  margin-bottom: 9px;
  font-size: 11px;
}

body.step6-active .wb2-step6-summary-card__rows {
  gap: 7px;
}

body.step6-active .wb2-step6-summary-card__row {
  padding: 3px 0;
}

body.step6-active .wb2-step6-summary-card__label {
  font-size: 13px;
  line-height: 1.15;
}

body.step6-active .wb2-step6-summary-card__value {
  font-size: 14px;
}

body.step6-active .wb2-step6-summary-card__row.is-final {
  margin-top: 8px;
  padding-top: 11px;
}

body.step6-active .wb2-step6-summary-card__row.is-final .wb2-step6-summary-card__label {
  font-size: 17px;
}

body.step6-active .wb2-step6-summary-card__row.is-final .wb2-step6-summary-card__value {
  font-size: 26px;
}

body.step6-active .wb2-step6-price-settings {
  border-radius: 3px;
}

body.step6-active .wb2-step6-price-settings .wb2-step6-controls__grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
}

body.step6-active .wb2-step6-price-settings .wb2-step6-controls__span-2 {
  grid-column: auto;
}

body.step6-active .wb2-step6-price-settings .wb2-step6-controls__button-row {
  justify-content: flex-end;
}

body.step6-active .wb2-step6-price-settings .wb2-step6-controls__button-row .wb2-btn {
  flex: 0 0 auto;
  min-width: 72px;
}

@media (max-width: 1180px) {
  body.step6-active .wb2-step6-price-settings .wb2-step6-controls__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body.step6-active .wb2-step6-price-settings .wb2-step6-controls__span-2 {
    grid-column: 1 / -1;
  }
}

/* Home operations dashboard and compact daily sidebar */
.studio-sidebar .sidebar-logo {
  gap: 9px;
  min-height: 52px;
  padding: 10px 12px 8px;
}

.studio-sidebar .sidebar-logo__mark {
  width: 28px;
  height: 28px;
}

.studio-sidebar .sidebar-logo__name {
  font-size: 16px;
  letter-spacing: 0;
}

.studio-sidebar .sidebar-logo__tagline {
  font-size: 10px;
}

.nav-menu--daily .sidebar-section {
  padding: 3px 0;
}

.nav-menu--daily .sidebar-section + .sidebar-section {
  margin-top: 4px;
  padding-top: 7px;
}

.nav-menu--daily .nav-item {
  min-height: 42px;
  gap: 9px;
  margin: 3px 8px;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 13px;
}

.nav-menu--daily .nav-item__icon {
  width: 30px;
  height: 30px;
  border-radius: 7px;
}

.nav-menu--daily .nav-item__icon svg {
  width: 17px;
  height: 17px;
}

.sidebar-setup {
  display: grid;
  gap: 2px;
}

.sidebar-setup__summary {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 3px 8px;
  padding: 7px 12px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--surface-card);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
  box-shadow: var(--shadow-xs);
}

.sidebar-setup__summary::-webkit-details-marker {
  display: none;
}

.sidebar-setup__chevron {
  width: 16px;
  color: var(--df-classic-blue, #285f8f);
  font-size: 11px;
  transition: transform var(--dur-fast) var(--ease-standard);
}

.sidebar-setup[open] .sidebar-setup__chevron {
  transform: rotate(90deg);
}

.sidebar-setup__items {
  display: grid;
  gap: 1px;
  padding-bottom: 3px;
}

.sidebar-setup-submenu {
  display: none;
  gap: 1px;
  margin: -1px 10px 4px 56px;
  padding: 0 0 4px 9px;
  border-left: 1px solid var(--border-soft);
}

.nav-menu--daily .nav-item--sub.active + .sidebar-setup-submenu,
.nav-menu--daily .nav-item--sub.is-family-active + .sidebar-setup-submenu {
  display: grid;
}

.sidebar-setup-submenu[data-setup-submenu="connected-apps"] {
  display: grid;
}

.sidebar-setup-subitem {
  min-height: 23px;
  display: flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.15;
  text-decoration: none;
}

.sidebar-setup-subitem:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
  text-decoration: none;
}

.sidebar-setup-subitem.active {
  background: #eaf2fb;
  color: var(--df-classic-blue, #285f8f);
}

.nav-menu--daily .nav-item--sub.is-family-active {
  border-color: rgba(40, 95, 143, 0.26);
  background: rgba(234, 242, 251, 0.72);
  color: var(--df-classic-blue, #285f8f);
}

.pricebook-price-lists-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
}

.pricebook-price-lists-panel--form {
  border-radius: 4px;
  background: #fff;
}

.pricebook-form-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 900;
}

.pricebook-form-section-title strong {
  min-width: 28px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  background: var(--surface-bg);
  color: var(--text-secondary);
  font-size: 12px;
}

.pricebook-price-lists-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.pricebook-price-lists-table {
  grid-column: 1 / -1;
}

.pricebook-list-cell {
  display: grid;
  gap: 2px;
}

.pricebook-list-cell strong {
  color: var(--text-primary);
  font-weight: 800;
}

.pricebook-list-cell span {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
}

.pricebook-hero--classic .pricebook-page-head {
  margin-bottom: 0;
}

.pricebook-hero--classic .pricebook-hero__metrics {
  gap: 8px;
}

.pricebook-hero--classic .pricebook-metric-card small {
  margin-top: 2px;
}

.pricebook-form-card__head p,
.pricebook-sidebar__head p,
.pricebook-hero__copy {
  display: none;
}

.pricebook-materials-mw {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.pricebook-materials-mw__nav {
  padding: 0;
  overflow: hidden;
}

.pricebook-materials-mw__nav-head {
  min-height: 44px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--df-classic-line, #cfd7df);
  background: var(--df-classic-head, #eef2f6);
}

.pricebook-materials-mw__nav-head strong {
  color: var(--text-primary);
  font-size: 14px;
}

.pricebook-materials-mw__nav-actions {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.pricebook-materials-mw__nav-actions .btn {
  min-width: 0;
  width: 100%;
  justify-content: center;
  padding-inline: 8px;
  white-space: nowrap;
}

.pricebook-materials-mw__brands {
  display: grid;
  gap: 0;
}

.pricebook-material-brand {
  min-height: 38px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 0;
  border-bottom: 1px solid var(--df-classic-line-soft, #e3e8ee);
  background: #fff;
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
}

.pricebook-material-brand:hover,
.pricebook-material-brand.is-active {
  background: #f8fafc;
  box-shadow: inset 4px 0 0 var(--df-classic-blue, #285f8f);
}

.pricebook-material-brand span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 800;
}

.pricebook-material-brand strong {
  min-width: 24px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  color: var(--text-secondary);
  font-size: 11px;
}

.pricebook-materials-mw__detail {
  display: grid;
  gap: 12px;
}

.pricebook-active-list-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-top: 1px solid var(--df-classic-line-soft, #e3e8ee);
  border-bottom: 1px solid var(--df-classic-line-soft, #e3e8ee);
  background: #f8fafc;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
}

.pricebook-active-list-strip strong {
  color: var(--text-primary);
  font-size: 14px;
}

.pricebook-active-list-strip small {
  margin-left: auto;
  color: var(--text-secondary);
}

.pricebook-list-name-button {
  display: inline;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--df-classic-blue, #285f8f);
  font: inherit;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
}

.pricebook-price-lists-table tr.is-active-price-list td {
  background: #f8fafc;
  box-shadow: inset 4px 0 0 var(--df-classic-blue, #285f8f);
}

.pricebook-material-empty-row {
  min-height: 74px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-secondary);
}

.pricebook-material-empty-row strong {
  color: var(--text-primary);
}

.pricebook-account-assignment-empty,
.pricebook-account-assignment-list {
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  background: #fff;
}

.pricebook-account-assignment-empty {
  padding: 12px;
  color: var(--text-secondary);
  font-weight: 700;
}

.pricebook-account-assignment-list {
  max-height: 220px;
  overflow: auto;
}

.pricebook-account-assignment-row {
  min-height: 46px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--df-classic-line-soft, #e3e8ee);
}

.pricebook-account-assignment-row:last-child {
  border-bottom: 0;
}

.pricebook-account-assignment-row span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.pricebook-account-assignment-row strong,
.pricebook-account-assignment-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pricebook-account-assignment-row small {
  color: var(--text-secondary);
  font-weight: 700;
}

.pricebook-material-card,
.pricebook-material-table-card {
  padding: 0;
  overflow: hidden;
}

.pricebook-material-card__head,
.pricebook-material-table-card__head {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--df-classic-line, #cfd7df);
  background: var(--df-classic-head, #eef2f6);
}

.pricebook-material-card__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.pricebook-material-card__head h2,
.pricebook-material-table-card__head h3 {
  margin: 0;
  color: var(--text-primary);
  font-size: 16px;
  line-height: 1.1;
}

.pricebook-material-card__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-start;
  max-width: 100%;
}

.pricebook-material-card__actions .btn {
  min-width: 0;
  white-space: nowrap;
}

.pricebook-material-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  padding: 0;
}

.pricebook-material-details > div,
.pricebook-material-details > label {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-right: 1px solid var(--df-classic-line-soft, #e3e8ee);
  border-bottom: 1px solid var(--df-classic-line-soft, #e3e8ee);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 800;
}

.pricebook-material-details span,
.pricebook-material-muted {
  color: var(--text-secondary);
  font-weight: 700;
}

.pricebook-material-details input {
  width: 16px;
  height: 16px;
}

.pricebook-editor-block--material {
  grid-column: 1 / -1;
}

.pricebook-check-row {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  background: #fff;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 800;
}

.pricebook-check-row input {
  width: 16px;
  height: 16px;
}

.pricebook-shell--simple {
  gap: 10px;
}

.pricebook-simple-head,
.pricebook-editor-head {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 4px;
}

.pricebook-simple-head--lists {
  align-items: flex-end;
}

.pricebook-root-toolbar,
.pricebook-root-search,
.pricebook-detail-summary__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pricebook-root-search {
  padding: 3px;
  border: 1px solid var(--df-classic-line, #cfd8e2);
  border-radius: 4px;
  background: #fff;
}

.pricebook-root-search input,
.pricebook-root-search select {
  min-height: 32px;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  font: inherit;
  font-size: 13px;
}

.pricebook-root-search input {
  width: min(240px, 34vw);
  padding: 0 8px;
}

.pricebook-root-search select {
  padding: 0 8px;
  border-left: 1px solid var(--df-classic-line-soft, #d8e0e7);
  color: var(--text-secondary);
  font-weight: 800;
}

.pricebook-detail-summary {
  display: grid;
  grid-template-columns: minmax(180px, .8fr) minmax(130px, .45fr) minmax(220px, .95fr) minmax(260px, 1.1fr) auto;
  gap: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 4px;
}

.pricebook-detail-summary__cell {
  min-height: 66px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 10px 12px;
  border-right: 1px solid var(--df-classic-line-soft, #d8e0e7);
  border-bottom: 1px solid var(--df-classic-line-soft, #d8e0e7);
}

.pricebook-detail-summary__cell:last-child {
  border-right: 0;
}

.pricebook-detail-summary__cell span {
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.pricebook-detail-summary__cell strong {
  color: var(--text-primary);
  font-size: 14px;
}

.pricebook-detail-summary__cell small {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
}

.pricebook-detail-summary__cell .pricebook-status-pill {
  width: max-content;
  border: 1px solid rgba(43, 122, 85, 0.24);
  cursor: pointer;
}

.pricebook-detail-summary__cell--accounts {
  align-content: start;
}

.pricebook-detail-summary__cell--action {
  min-width: 150px;
  justify-items: end;
}

.pricebook-shell.is-viewing [data-edit-action="1"] {
  display: none !important;
}

.pricebook-simple-head .page-title,
.pricebook-editor-head .page-title {
  margin: 0;
  font-size: 22px;
  line-height: 1.1;
}

.pricebook-simple-head p,
.pricebook-editor-eyebrow,
.pricebook-editor-section-head span {
  margin: 4px 0 0;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.pricebook-editor-route-label {
  margin: 2px 0 0;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
}

.pricebook-list-index {
  padding: 0;
  overflow: hidden;
  border-radius: 4px;
}

.pricebook-table-wrap--flat {
  margin-top: 0;
  border: 0;
  border-radius: 0;
}

.pricebook-table-wrap--flat .data-table th,
.pricebook-table-wrap--flat .data-table td {
  padding: 9px 12px;
}

.pricebook-list-name-button--large {
  color: var(--df-classic-blue, #285f8f);
  font-size: 14px;
  font-weight: 800;
}

.pricebook-editor-toolbar,
.pricebook-editor-section-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pricebook-editor-tabs {
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 0;
  overflow: auto;
  border-radius: 4px;
}

.pricebook-editor-tab {
  min-height: 42px;
  padding: 0 13px;
  border: 0;
  border-right: 1px solid var(--df-classic-line-soft, #d8e0e7);
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.pricebook-editor-tab:hover,
.pricebook-editor-tab.is-active {
  background: #fff;
  color: var(--df-classic-blue, #285f8f);
  box-shadow: inset 0 -3px 0 var(--df-classic-blue, #285f8f);
}

.pricebook-editor-section-head {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 4px;
}

.pricebook-editor-section-head .section-title {
  margin: 0;
}

.pricebook-editor-section-actions input {
  min-height: 34px;
  width: min(260px, 42vw);
  border: 1px solid var(--df-classic-line, #cfd8e2);
  border-radius: 3px;
  padding: 7px 10px;
  background: #fff;
  color: var(--text-primary);
}

.pricebook-editor-body {
  display: grid;
  gap: 10px;
}

.pricebook-settings-tab {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 10px;
}

.pricebook-settings-card {
  padding: 0;
  overflow: hidden;
  border-radius: 4px;
}

.pricebook-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--df-classic-line-soft, #d8e0e7);
}

.pricebook-settings-grid > div {
  min-height: 52px;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 10px 12px;
  border-right: 1px solid var(--df-classic-line-soft, #d8e0e7);
  border-bottom: 1px solid var(--df-classic-line-soft, #d8e0e7);
}

.pricebook-settings-grid span {
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.pricebook-settings-grid strong {
  color: var(--text-primary);
  font-size: 15px;
}

.pricebook-source-stack {
  display: grid;
  gap: 10px;
}

.pricebook-source-table-card .pricebook-material-table-card__head > div {
  display: grid;
  gap: 3px;
}

.pricebook-source-table-card .pricebook-material-table-card__head span {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 800;
}

.pricebook-source-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.pricebook-source-flags span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 7px;
  border: 1px solid var(--df-classic-line-soft, #d8e0e7);
  border-radius: 3px;
  background: #f8fafc;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.pricebook-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  padding: 0;
  border: 1px solid var(--df-classic-line, #cfd8e2);
  border-radius: 4px;
  background: var(--df-classic-head, #eef2f6);
  overflow: hidden;
}

.pricebook-subtab {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-right: 1px solid var(--df-classic-line-soft, #d8e0e7);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 900;
}

.pricebook-subtab.is-active {
  background: #fff;
  color: var(--df-classic-blue, #285f8f);
  box-shadow: inset 0 -3px 0 var(--df-classic-blue, #285f8f);
}

.pricebook-source-option-strip {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 4px;
}

.pricebook-source-option-strip span {
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.pricebook-source-option-strip strong {
  color: var(--text-primary);
}

.pricebook-source-option-strip small {
  margin-left: auto;
  color: var(--text-secondary);
  font-weight: 700;
}

@media (max-width: 980px) {
  .pricebook-materials-mw {
    grid-template-columns: 1fr;
  }

  .pricebook-material-details {
    grid-template-columns: 1fr;
  }

  .pricebook-detail-summary,
  .pricebook-settings-tab {
    grid-template-columns: 1fr;
  }

  .pricebook-detail-summary__cell {
    border-right: 0;
  }
}

.estimate-start-grid {
  align-items: start;
}

.estimate-start-choice-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.estimate-start-choice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 96px;
  padding: 14px;
  border: 1px solid var(--df-border, #d8dee7);
  border-radius: 8px;
  background: var(--df-surface, #fff);
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.estimate-start-choice input {
  margin-top: 3px;
}

.estimate-start-choice strong,
.estimate-start-choice small {
  display: block;
}

.estimate-start-choice strong {
  color: var(--df-text, #111827);
  font-size: 14px;
  line-height: 1.25;
}

.estimate-start-choice small {
  margin-top: 5px;
  color: var(--df-muted, #64748b);
  font-size: 12px;
  line-height: 1.35;
}

.estimate-start-choice--active {
  border-color: var(--df-primary, #2563eb);
  background: color-mix(in srgb, var(--df-primary, #2563eb) 7%, white);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--df-primary, #2563eb) 16%, transparent);
}

.estimate-start-price-note {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--df-border, #d8dee7);
  border-radius: 8px;
  background: var(--df-soft, #f8fafc);
  color: var(--df-muted, #64748b);
  font-size: 12px;
  line-height: 1.4;
}

@media (max-width: 820px) {
  .estimate-start-choice-row {
    grid-template-columns: 1fr;
  }

  .pricebook-price-lists-panel {
    grid-template-columns: 1fr;
  }

  .pricebook-price-lists-actions {
    justify-content: flex-start;
  }

  .pricebook-simple-head,
  .pricebook-editor-head,
  .pricebook-root-toolbar {
    align-items: stretch;
  }

  .pricebook-root-search,
  .pricebook-root-search input,
  .pricebook-root-search select,
  .pricebook-root-toolbar .btn {
    width: 100%;
  }
}

.nav-menu--daily .nav-item--sub {
  min-height: 38px;
  margin-left: 18px;
  padding-block: 6px;
  font-size: 12px;
}

.nav-menu--daily .nav-item--sub .nav-item__icon {
  width: 26px;
  height: 26px;
}

.studio-sidebar .sidebar-footer {
  padding: 8px 10px;
}

.studio-sidebar .sidebar-user {
  gap: 8px;
  padding: 6px;
}

.studio-sidebar .sidebar-avatar {
  width: 30px;
  height: 30px;
  font-size: 12px;
}

.studio-sidebar .sidebar-user__name {
  font-size: 12px;
}

.studio-sidebar .sidebar-user__role {
  font-size: 10px;
}

.home-simple-shell {
  max-width: 1180px;
  gap: 14px;
}

.home-action-center {
  display: grid;
  gap: 0;
  overflow: hidden;
  border-radius: 4px;
}

.home-action-center__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 13px 14px;
  border-bottom: 1px solid var(--df-classic-line, #cfd7df);
  background: var(--df-classic-head, #eef2f6);
}

.home-action-center__head p {
  margin: 4px 0 0;
  color: var(--text-secondary, #64748b);
  font-size: 12px;
  line-height: 1.35;
}

.home-action-center__scoreboard {
  display: grid;
  grid-template-columns: repeat(4, minmax(86px, 1fr));
  gap: 0;
  border: 1px solid var(--df-classic-line, #cfd7df);
  background: #fff;
}

.home-action-center__scoreboard span {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border-right: 1px solid var(--df-classic-line-soft, #e3e8ee);
  color: var(--text-secondary, #64748b);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.home-action-center__scoreboard span:last-child {
  border-right: 0;
}

.home-action-center__scoreboard strong {
  color: var(--df-classic-ink, #17212b);
  font-size: 18px;
  line-height: 1;
}

.home-action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
}

.home-action-group {
  min-width: 0;
  border-right: 1px solid var(--df-classic-line, #cfd7df);
  background: #fff;
}

.home-action-group:last-child {
  border-right: 0;
}

.home-action-group__head {
  min-height: 76px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 12px 10px;
  border-bottom: 1px solid var(--df-classic-line-soft, #e3e8ee);
  background: #fbfcfd;
}

.home-action-group__head span {
  color: var(--text-tertiary, #7c8aa5);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.home-action-group__head h3 {
  margin: 3px 0 0;
  color: var(--df-classic-ink, #17212b);
  font-size: 15px;
  line-height: 1.2;
}

.home-action-group__head > strong {
  min-width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(40, 95, 143, 0.10);
  color: var(--df-classic-blue, #285f8f);
  font-size: 13px;
}

.home-action-group--today .home-action-group__head > strong,
.home-action-group--quote .home-action-group__head > strong {
  background: rgba(154, 106, 47, 0.12);
  color: var(--df-classic-warn, #9a6a2f);
}

.home-action-group--money .home-action-group__head > strong {
  background: rgba(73, 121, 91, 0.12);
  color: var(--df-classic-green, #49795b);
}

.home-action-group__rows {
  display: grid;
}

.home-action-row {
  min-height: 56px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--df-classic-line-soft, #e3e8ee);
  color: var(--df-classic-ink, #17212b);
  text-decoration: none;
}

.home-action-row:hover {
  background: #f8fafc;
  text-decoration: none;
}

.home-action-row--static {
  cursor: default;
}

.home-action-row__main {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.home-action-row__main strong {
  overflow: hidden;
  color: var(--df-classic-ink, #17212b);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-action-row__main small {
  overflow: hidden;
  color: var(--text-secondary, #64748b);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-action-row__arrow {
  color: var(--text-tertiary, #7c8aa5);
  font-size: 18px;
  font-weight: 700;
}

.home-action-row__button {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--df-classic-line, #cfd7df);
  border-radius: 3px;
  background: #fff;
  color: var(--df-classic-blue, #285f8f);
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}

.home-action-row__button:hover {
  border-color: var(--df-classic-blue, #285f8f);
  background: #f8fafc;
}

.home-action-empty {
  min-height: 72px;
  display: grid;
  align-content: center;
  padding: 12px;
  color: var(--text-secondary, #64748b);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
}

@media (max-width: 1280px) {
  .home-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-action-group {
    border-bottom: 1px solid var(--df-classic-line, #cfd7df);
  }

  .home-action-group:nth-child(2n) {
    border-right: 0;
  }
}

.quote-record-shell {
  width: min(1120px, 100%);
  display: grid;
  gap: 8px;
}

.quote-record-toolbar {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 0 0 4px;
}

.quote-record-card {
  border: 1px solid var(--df-classic-line, #cfd7df);
  border-radius: 4px;
  background: #fff;
  overflow: hidden;
  box-shadow: none;
}

.quote-record-title {
  min-height: 46px;
  display: flex;
  align-items: center;
  padding: 10px 12px;
  background: #fff;
}

.quote-record-title__eyebrow {
  color: var(--df-classic-ink, #17212b);
  font-size: 18px;
  font-weight: 850;
  line-height: 1.2;
}

.quote-record-title__meta {
  margin-top: 2px;
  color: var(--df-classic-muted, #5f6f7f);
  font-size: 12px;
  font-weight: 750;
}

.quote-record-section-head {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--df-classic-line-soft, #e3e8ee);
  background: var(--df-classic-head, #eef2f6);
}

.quote-record-section-head strong {
  margin-right: auto;
  color: var(--df-classic-ink, #17212b);
  font-size: 14px;
  font-weight: 850;
}

.quote-record-section-head a {
  color: var(--df-classic-blue, #285f8f);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.quote-record-icon-btn {
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid var(--df-classic-line, #cfd7df);
  border-radius: 3px;
  background: #fff;
  color: var(--df-classic-blue, #285f8f);
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.quote-record-icon-btn:hover {
  border-color: var(--df-classic-blue, #285f8f);
  background: #f8fafc;
}

.quote-record-icon-btn--primary {
  background: var(--df-classic-blue, #285f8f);
  border-color: var(--df-classic-blue, #285f8f);
  color: #fff;
}

.quote-record-icon-btn--primary:hover {
  background: #1f527f;
  color: #fff;
}

.quote-record-table {
  width: 100%;
  border: 0;
}

.quote-record-table td,
.quote-record-table th {
  padding: 7px 10px;
  border-bottom: 1px solid var(--df-classic-line-soft, #e3e8ee);
  font-size: 13px;
}

.quote-record-table tr:last-child td {
  border-bottom: 0;
}

.quote-record-table td:first-child {
  width: 190px;
  color: var(--df-classic-muted, #5f6f7f);
  font-weight: 850;
}

.quote-record-table td:last-child {
  color: var(--df-classic-ink, #17212b);
  font-weight: 750;
}

.quote-record-table--summary td:first-child {
  width: auto;
}

.quote-record-table--summary td:nth-child(2) {
  width: 210px;
  color: var(--df-classic-muted, #5f6f7f);
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
}

.quote-record-table--summary td:last-child {
  width: 150px;
  text-align: right;
}

.quote-record-total-row td {
  background: #f8fafc;
  font-weight: 900;
}

.quote-record-empty {
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 9px 10px;
  color: var(--df-classic-muted, #5f6f7f);
  font-size: 13px;
  font-weight: 750;
}

.quote-record-details {
  border-top: 1px solid var(--df-classic-line-soft, #e3e8ee);
}

.quote-record-details > summary {
  min-height: 34px;
  display: flex;
  align-items: center;
  padding: 7px 10px;
  color: var(--df-classic-blue, #285f8f);
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
  list-style: none;
}

.quote-record-details > summary::-webkit-details-marker {
  display: none;
}

.quote-record-details > summary::before {
  content: '>';
  margin-right: 8px;
  color: var(--df-classic-blue, #285f8f);
  font-size: 12px;
}

.quote-record-details[open] > summary::before {
  transform: rotate(90deg);
}

.quote-record-shell {
  width: 100%;
  max-width: none;
  gap: 10px;
}

.quote-record-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 34px;
}

.quote-record-back {
  color: #31475c;
  font-size: 14px;
  font-weight: 850;
  text-decoration: none;
}

.quote-record-topline__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.quote-record-info-grid {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(360px, 1fr);
  gap: 10px;
}

.order-command-panel {
  padding: 10px 0 12px;
  border-top: 1px solid var(--df-classic-line-soft, #e3e8ee);
  border-bottom: 1px solid var(--df-classic-line-soft, #e3e8ee);
}

.order-workflow-rail {
  display: grid;
  grid-template-columns: repeat(7, minmax(86px, 1fr));
  gap: 8px;
  align-items: stretch;
}

.order-workflow-step {
  min-height: 54px;
  padding: 9px 10px 8px;
  border: 1px solid var(--df-classic-line, #cfd7df);
  background: #f8fafc;
  color: var(--df-classic-muted, #5f6f7f);
  font-size: 12px;
  font-weight: 850;
}

.order-workflow-step span {
  display: block;
  width: 11px;
  height: 11px;
  margin-bottom: 7px;
  border-radius: 999px;
  border: 2px solid currentColor;
  background: #fff;
}

.order-workflow-step strong {
  display: block;
  line-height: 1.15;
}

.order-workflow-step.is-done {
  border-color: #b8d8c7;
  background: #f0fbf5;
  color: #21734a;
}

.order-workflow-step.is-current {
  border-color: var(--df-classic-blue, #285f8f);
  background: #eef6fd;
  color: var(--df-classic-blue, #285f8f);
}

.order-workflow-step.is-done span {
  background: #21734a;
}

.quote-record-panel {
  background: #fff;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
}

.quote-record-panel-head,
.quote-record-drawing-head {
  min-height: 32px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-medium, #d0d5dd);
  color: var(--studio-blue-dark, #263a4e);
  font-size: 21px;
  line-height: 1.1;
}

.quote-record-panel-head strong,
.quote-record-drawing-head strong {
  margin-right: auto;
  font-size: inherit;
  font-weight: 500;
}

.quote-record-panel--info .quote-record-key-table,
.quote-record-panel--address .quote-record-key-table {
  min-height: 224px;
  background: #f3f7fa;
}

.quote-record-key-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.quote-record-key-table td {
  padding: 2px 10px;
  color: #20303d;
  font-size: 13px;
  line-height: 1.2;
  vertical-align: top;
}

.quote-record-key-table td:first-child {
  width: 150px;
  color: #1f2d38;
  font-weight: 850;
  text-align: right;
}

.quote-record-key-table td:last-child {
  font-weight: 500;
  overflow-wrap: anywhere;
}

.quote-record-mini-action {
  color: var(--text-secondary, #516173);
  font-size: 14px;
  font-weight: 750;
}

.quote-record-edit-btn {
  min-width: 28px;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--studio-blue, #314a63);
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.quote-record-revision {
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--studio-blue-light, #e7edf2);
  color: var(--studio-blue-dark, #263a4e);
  font-size: 12px;
  font-weight: 850;
}

.quote-record-drawing-head a {
  color: var(--studio-blue, #314a63);
  font-size: 13px;
  font-weight: 800;
}

.quote-record-drawing-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(286px, 330px);
  gap: 8px;
}

.quote-record-drawing-stage {
  align-self: start;
  min-height: 680px;
  border: 2px solid var(--studio-blue, #314a63);
  background: #fff;
}

.quote-record-greenbar {
  min-height: 58px;
  display: flex;
  align-items: stretch;
  background: var(--studio-blue, #314a63);
  color: #fff;
}

.quote-record-greenbar button {
  min-width: 74px;
  border: 0;
  border-right: 1px solid rgba(255,255,255,.28);
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.quote-record-greenbar button:hover {
  background: rgba(255,255,255,.16);
}

.quote-record-greenbar span {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  padding: 0 18px;
  font-size: 19px;
  font-weight: 500;
  line-height: 1.22;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.quote-record-drawing-canvas {
  height: clamp(560px, 64vh, 760px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: auto;
}

.quote-record-drawing-svg {
  width: min(720px, 94%);
  max-height: 340px;
  overflow: visible;
}

.quote-record-final-preview {
  width: 100%;
  height: 100%;
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--border-light, #e6edf3);
  background: #f8fafc;
}

.quote-record-final-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.quote-record-drawing-bg {
  fill: #f8fafc;
}

.quote-record-piece {
  fill: #22a553;
  stroke: #126d35;
  stroke-width: 1.8;
  vector-effect: non-scaling-stroke;
}

.quote-record-cutout {
  fill: #f8fafc;
  stroke: #243447;
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.quote-record-cutout--small {
  fill: #f8fafc;
}

.quote-record-piece-label,
.quote-record-dim-label {
  display: none;
}

.quote-record-drawing-empty {
  width: 100%;
  padding: 60px 20px;
  color: #657487;
  text-align: center;
  font-size: 14px;
  font-weight: 800;
}

.quote-record-summary-panel {
  align-self: start;
  border: 1px solid var(--border-medium, #d0d5dd);
  background: #fff;
}

.quote-record-summary-title {
  padding: 9px 12px;
  background: var(--studio-blue, #314a63);
  color: #fff;
  font-size: 21px;
  font-weight: 850;
  text-align: center;
}

.quote-record-summary-table {
  width: 100%;
  border-collapse: collapse;
}

.quote-record-summary-table td {
  padding: 7px 10px;
  font-size: 13px;
  border-bottom: 1px solid var(--border-soft, #e3e6ea);
}

.quote-record-summary-table td:first-child {
  width: 96px;
  color: #50605a;
  font-weight: 850;
  text-align: right;
}

.quote-record-summary-table td:last-child {
  color: #26313d;
  font-weight: 750;
}

.quote-record-summary-panel .quote-record-details {
  border-top: 0;
}

.quote-record-summary-panel .quote-record-table td,
.quote-record-summary-panel .quote-record-table th {
  padding: 6px 8px;
  font-size: 11px;
}

.quote-record-summary-panel .quote-record-table--summary {
  table-layout: fixed;
}

.quote-record-summary-panel .quote-record-table--summary td:first-child {
  width: 42%;
  overflow-wrap: anywhere;
}

.quote-record-summary-panel .quote-record-table--summary td:nth-child(2) {
  width: 34%;
  white-space: normal;
}

.quote-record-summary-panel .quote-record-table--summary td:last-child {
  width: 24%;
  white-space: nowrap;
}

.quote-record-email-table td:first-child {
  width: 120px;
}

@media (max-width: 760px) {
  .quote-record-table td:first-child {
    width: 132px;
  }

  .quote-record-toolbar .btn {
    min-height: 32px;
  }

  .quote-record-info-grid,
  .order-workflow-rail,
  .quote-record-drawing-grid {
    grid-template-columns: 1fr;
  }

  .quote-record-drawing-stage {
    min-height: 420px;
  }

  .quote-record-drawing-canvas {
    height: 345px;
  }

  .quote-record-greenbar {
    flex-wrap: wrap;
  }

  .quote-record-greenbar span {
    width: 100%;
    min-height: 42px;
    padding: 0 12px;
    font-size: 18px;
  }
}

@media (max-width: 900px) {
  .home-action-center__head,
  .home-action-center__scoreboard,
  .home-action-grid {
    grid-template-columns: 1fr;
  }

  .home-action-center__scoreboard span,
  .home-action-group {
    border-right: 0;
  }
}

/* Principal-redesign pass: quiet navigation, minimal Home, operational Orders. */
.home-simple-shell--minimal {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px;
  display: grid;
  gap: 16px;
}

.home-page-header--minimal {
  align-items: end;
  margin-bottom: 0;
}

.home-minimal-search {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--surface-card);
  box-shadow: var(--shadow-xs);
}

.home-minimal-search label {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0;
}

.home-minimal-search__button {
  width: 100%;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--border-soft);
  border-radius: 7px;
  background: var(--surface-bg);
  color: var(--text-secondary);
  font: inherit;
  text-align: left;
  cursor: text;
}

.home-launch-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.home-launch-card {
  min-height: 128px;
  padding: 16px;
  display: grid;
  align-content: space-between;
  gap: 12px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--surface-card);
  color: var(--text-primary);
  text-decoration: none;
  box-shadow: var(--shadow-xs);
}

.home-launch-card:hover {
  border-color: rgba(40, 95, 143, 0.34);
  background: var(--surface-hover);
  text-decoration: none;
}

.home-launch-card span {
  color: var(--text-tertiary);
  font-size: 12px;
  font-weight: 700;
}

.home-launch-card strong {
  font-size: 22px;
  line-height: 1.1;
}

.home-launch-card em {
  color: var(--df-classic-blue, #285f8f);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.home-operate-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.home-operate-grid .home-focus-card {
  min-height: 180px;
  padding: 16px;
  display: grid;
  align-content: space-between;
  gap: 14px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--surface-card);
  box-shadow: var(--shadow-xs);
}

.home-operate-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.home-operate-card__copy {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.45;
}

.home-operate-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.home-work-list--compact {
  max-height: 210px;
  overflow: auto;
}

.home-work-list--compact .home-work-item {
  padding: 8px 0;
}

.home-work-list--compact .home-work-item:first-child {
  padding-top: 0;
}

.home-work-list--compact .home-work-item:last-child {
  padding-bottom: 0;
}

.home-attention-strip {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 12px;
  align-items: stretch;
  padding: 12px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--surface-card);
  box-shadow: var(--shadow-xs);
}

.home-attention-strip__head {
  display: flex;
  align-items: center;
  color: var(--text-secondary);
  font-weight: 800;
}

.home-attention-strip__items {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.home-attention-item {
  min-height: 66px;
  padding: 10px 12px;
  display: grid;
  gap: 3px;
  align-content: center;
  border: 1px solid var(--border-soft);
  border-radius: 7px;
  background: var(--surface-bg);
  color: var(--text-primary);
  text-decoration: none;
}

.home-attention-item:hover {
  background: var(--surface-hover);
  text-decoration: none;
}

.home-attention-item[data-tone="warning"] {
  border-color: rgba(180, 83, 9, 0.28);
  background: #fff7ed;
}

.home-attention-item[data-tone="warning"] strong {
  color: #9a3412;
}

.home-attention-item strong {
  font-size: 18px;
  line-height: 1.1;
}

.home-attention-item span {
  color: var(--text-tertiary);
  font-size: 12px;
  font-weight: 700;
}

.home-minimal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.home-compat-markers {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
}

.orders-name-link {
  color: var(--text-primary);
  font-weight: 800;
}

.ops-table .orders-name-link {
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (max-width: 960px) {
  .home-simple-shell--minimal {
    padding: 16px;
  }

  .home-launch-grid,
  .home-operate-grid,
  .home-attention-strip__items {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-attention-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .home-launch-grid,
  .home-operate-grid,
  .home-attention-strip__items {
    grid-template-columns: 1fr;
  }
}

.setup-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 14px 0;
}

.setup-subnav__item {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  color: var(--text-secondary);
  background: var(--surface-white);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.15;
  text-decoration: none;
}

.setup-subnav__item:hover,
.setup-subnav__item.is-active {
  color: var(--studio-blue-dark);
  border-color: var(--border-medium);
  background: var(--surface-selected);
}

.setup-connection-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid var(--border-soft);
  border-radius: 7px;
  background: var(--surface-bg);
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.35;
}

.setup-connection-note strong {
  flex: 0 0 auto;
  color: var(--studio-green);
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.setup-connection-note span {
  min-width: 0;
  flex: 1 1 auto;
}

.setup-connection-note a {
  flex: 0 0 auto;
  color: var(--studio-blue);
  font-weight: 800;
  text-decoration: none;
}

.setup-live-admin {
  display: grid;
  gap: 14px;
}

.setup-live-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.setup-live-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.setup-live-head h3 {
  margin: 3px 0 0;
  font-size: 18px;
  line-height: 1.2;
}

.setup-permission-table,
.setup-user-table {
  display: grid;
  gap: 8px;
}

.setup-permission-table {
  overflow-x: auto;
  padding-bottom: 2px;
}

.setup-data-list {
  display: grid;
  gap: 8px;
}

.setup-data-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid var(--border-soft);
  border-radius: 7px;
  background: var(--surface-bg);
}

.setup-data-row strong,
.setup-data-row span {
  display: block;
  min-width: 0;
}

.setup-data-row span {
  color: var(--text-secondary);
  font-size: 12px;
}

.setup-permission-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.35fr) repeat(11, minmax(92px, 1fr));
  gap: 8px;
  align-items: center;
  min-width: 1180px;
  padding: 9px 10px;
  border: 1px solid var(--border-soft);
  border-radius: 7px;
  background: var(--surface-bg);
}

.setup-permission-row--head {
  background: var(--surface-selected);
  color: var(--text-secondary);
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.setup-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
}

.setup-check span {
  white-space: nowrap;
}

.setup-user-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.6fr) minmax(150px, 1fr) minmax(120px, .7fr) minmax(140px, 1fr);
  gap: 10px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid var(--border-soft);
  border-radius: 7px;
  background: var(--surface-bg);
}

.setup-user-row strong,
.setup-user-row span {
  display: block;
  min-width: 0;
}

.setup-user-row span {
  color: var(--text-secondary);
  font-size: 12px;
}

.setup-inline-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 1.2fr) minmax(160px, .8fr) auto auto;
  gap: 10px;
  align-items: center;
}

.setup-metric-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.setup-metric-strip span {
  padding: 8px 10px;
  border: 1px solid var(--border-soft);
  border-radius: 7px;
  background: var(--surface-white);
  color: var(--text-secondary);
  font-size: 12px;
}

@media (max-width: 980px) {
  .setup-permission-row,
  .setup-data-row,
  .setup-user-row,
  .setup-inline-form {
    grid-template-columns: 1fr;
  }

  .setup-live-actions {
    justify-content: flex-start;
  }
}

.ops-inline-note {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--border-soft);
  border-radius: 7px;
  background: var(--surface-white);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
}

.live-module-shell {
  display: grid;
  gap: 14px;
}

.live-module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.live-module-card {
  padding: 14px;
}

.live-module-card h2 {
  margin: 0 0 10px;
  font-size: 15px;
  line-height: 1.2;
}

.live-module-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.live-module-card__head h2 {
  margin: 0;
}
