:root {
  --ink:       #1A1A1A;
  --ink-soft:  #4A4A4A;
  --ink-muted: #6A6A6A;
  --cream:     #FDFAF5;
  --cream-2:   #F4F7FB;
  --paper:     #FFFFFF;
  --surface-soft: #F8F5F1;
  --surface-muted: #F4F1EB;
  --surface-strong: #EFEBE3;
  --surface-alt: #B7B0A5;
  --border:    #E2DDD6;
  --border-soft:#EDE9E2;
  --border-faint: #F4EFE7;
  --salmon:    #E8876A;
  --salmon-bg: #FDF1EC;
  --salmon-border: #F2C4B2;
  --salmon-ink: #7A3520;
  --green:     #6A9E5A;
  --green-bg:  #EDF5EA;
  --green-border: #AECFA4;
  --green-ink: #2D5A22;
  --gold:      #C4973A;
  --gold-bg:   #FBF4E6;
  --gold-ink:  #6B4E10;
  --red-soft:  #C0392B;
  --status-paid-bg: #EAF7EF; --status-paid-border: #B9DEBF; --status-paid-color: #1E8449;
  --status-partial-bg: #FEF9E7; --status-partial-border: #E2D6A4; --status-partial-color: #B7950B;
  --status-pending-bg: #FEF9E7; --status-pending-border: #E2D6A4; --status-pending-color: #B7950B;
  --status-unpaid-bg: #FDECEA; --status-unpaid-border: #F1C0BA; --status-unpaid-color: #C0392B;
  --status-active-bg: #EDF7EB; --status-active-border: #B7DDB2; --status-active-color: #2F6B2D;
  --status-pending-review-bg: #FEF9E7; --status-pending-review-border: #E2D6A4; --status-pending-review-color: #B7950B;
  --status-rejected-bg: #FDECEA; --status-rejected-border: #F1C0BA; --status-rejected-color: #C0392B;
  --status-locked-bg: #FBF4E6; --status-locked-border: #DCC07A; --status-locked-color: #7D5A0A;
  --status-expired-bg: #F5F3EF; --status-expired-border: #DDDAD5; --status-expired-color: #6B665F;
  --status-todo-bg: #F8F5F1; --status-todo-border: #E8E0D4; --status-todo-color: #8A8A8A;
  --status-in-progress-bg: #FDF1EC; --status-in-progress-border: #F2C4B2; --status-in-progress-color: #E8876A;
  --status-review-bg: #FEF9E7; --status-review-border: #E2D6A4; --status-review-color: #B7950B;
  --paid-bg:   var(--status-paid-bg); --paid-color: var(--status-paid-color);
  --pending-bg:var(--status-pending-bg); --pending-color: var(--status-pending-color);
  --unpaid-bg: var(--status-unpaid-bg); --unpaid-color: var(--status-unpaid-color);
  --app-bg:    var(--cream);
  --sidebar-bg:#2C57AA;
  --sidebar-ink:#FFFFFF;
  --sidebar-muted: rgba(255,255,255,0.52);
  --sidebar-border: rgba(255,255,255,0.08);
  --sidebar-hover: rgba(255,255,255,0.06);
  --sidebar-active: rgba(255,255,255,0.10);
  --sidebar-panel-bg: rgba(255,255,255,0.08);
  --sidebar-chip-bg: rgba(0,0,0,0.12);
  --sidebar-logout-border: rgba(255,255,255,0.06);
  --topbar-bg: rgba(255,255,255,0.98);
  --topbar-border: rgba(31,54,106,0.08);
  --topbar-shadow: 0 1px 0 rgba(31,54,106,0.05);
  --card-shadow: 0 12px 28px rgba(25,42,79,0.05);
  --sidebar-w: 272px;
  --radius:    14px;
  --shadow:    0 14px 36px rgba(25,42,79,0.08), 0 2px 8px rgba(25,42,79,0.03);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--app-bg);
  color: var(--ink);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.6;
  font-weight: 400;
}
body.sidebar-open { overflow: hidden; }

/* ── LAYOUT ── */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  color: var(--sidebar-ink);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 200;
  box-shadow: 2px 0 20px rgba(0,0,0,0.15);
  transition: transform 0.24s ease;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.42);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 180;
}

.sidebar-brand {
  padding: 28px 24px 18px;
  border-bottom: 1px solid var(--sidebar-border);
}
.brand-main {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--sidebar-ink);
  line-height: 1.3;
  letter-spacing: 0.2px;
}
.brand-amp {
  font-family: 'Playfair Display', serif;
  font-size: 13px;
  font-style: italic;
  color: var(--sidebar-ink);
  margin-top: 2px;
}
.brand-sub {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--sidebar-muted);
  margin-top: 8px;
}

.sidebar-profile {
  margin: 16px 20px 10px;
  padding: 16px;
  border-radius: 18px;
  background: var(--sidebar-panel-bg);
  border: 1px solid var(--sidebar-border);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}
.sidebar-profile-top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.sidebar-profile-avatar {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--paper);
  color: var(--sidebar-bg);
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.4px;
  box-shadow: 0 10px 22px rgba(0,0,0,0.18);
  flex-shrink: 0;
}
.sidebar-profile-copy { min-width: 0; }
.sidebar-profile-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--sidebar-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-profile-role {
  display: inline-flex;
  align-items: center;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--sidebar-ink);
  background: var(--sidebar-chip-bg);
  border: 1px solid var(--sidebar-border);
}
.sidebar-profile-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.sidebar-profile-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--sidebar-muted);
  background: var(--sidebar-chip-bg);
  border: 1px solid var(--sidebar-border);
}

.nav { padding: 20px 0; flex: 1; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  box-sizing: border-box;
  padding: 13px 24px;
  cursor: pointer;
  color: var(--sidebar-muted);
  font-size: 13.5px;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: all 0.18s ease;
  letter-spacing: 0.2px;
  background: none;
  border: none;
  font: inherit;
  text-align: left;
}
.nav-item:hover { color: var(--sidebar-ink); background: var(--sidebar-hover); }
.nav-item.active { color: var(--sidebar-ink); border-left-color: var(--salmon); background: var(--sidebar-active); }
.nav-item.nav-booking-locked {
  background: linear-gradient(90deg, rgba(251,244,230,0.18), rgba(255,255,255,0.05));
  border-left-color: var(--gold);
  box-shadow: inset 0 0 0 1px rgba(196,151,58,0.18);
  color: var(--gold-ink);
  font-weight: 700;
}
.nav-item.nav-booking-locked:hover,
.nav-item.nav-booking-locked:focus {
  background: linear-gradient(90deg, rgba(251,244,230,0.24), rgba(255,255,255,0.08));
  color: var(--gold-ink);
}
.nav-item.nav-booking-locked .ni { color: var(--gold-ink); }
.nav-item .nav-badge {
  margin-left: auto;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  white-space: nowrap;
}
.nav-item .nav-badge-hidden { color: #6E6963; background: rgba(174,170,165,0.10); border-color: rgba(174,170,165,0.22); }
.nav-item .nav-badge-locked { color: var(--ink); background: linear-gradient(180deg, var(--gold-bg), #F7E9C8); border-color: rgba(196,151,58,0.45); box-shadow: 0 1px 0 rgba(255,255,255,0.36), inset 0 0 0 1px rgba(255,255,255,0.18); }
.nav-item .nav-badge-full { color: #2D5A22; background: linear-gradient(180deg, var(--green-bg), #E1F0DE); border-color: rgba(106,158,90,0.36); }
.nav-item .ni, .app-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: currentColor;
}
.nav-item .ni svg, .app-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav-group { display: flex; flex-direction: column; }
.nav-group-toggle { justify-content: space-between; }
.nav-group-toggle .nav-group-caret {
  margin-left: auto;
  font-size: 10px;
  opacity: 0.65;
  transition: transform 0.18s ease;
}
.nav-group.open .nav-group-caret { transform: rotate(180deg); }
.nav-group-subnav { display: none; padding: 0 0 8px; margin-top: 2px; }
.nav-group.open .nav-group-subnav { display: block; }
.nav-subitem {
  padding: 10px 24px 10px 52px;
  font-size: 12.8px;
  color: var(--sidebar-muted);
}
.nav-subitem:hover { color: var(--sidebar-ink); background: var(--sidebar-hover); }
.nav-subitem.active { color: var(--sidebar-ink); border-left-color: var(--salmon); background: var(--sidebar-active); }
.nav-subitem .ni { font-size: 15px; width: 18px; }
.nav-logout {
  margin-top: auto;
  border-top: 1px solid var(--sidebar-logout-border);
  color: var(--sidebar-ink);
}
.nav-logout:hover {
  color: var(--sidebar-ink);
  background: var(--sidebar-active);
}
.nav-logout .ni {
  color: rgba(232,135,106,0.95);
}
.sidebar-new-booking { padding: 16px 20px; }
.sidebar-new-booking .btn { letter-spacing: 0.3px; font-weight: 500; }
.sidebar-foot { padding: 14px 20px 18px; border-top: 1px solid var(--sidebar-border); font-size: 11px; color: var(--sidebar-muted); }

.main { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; }

.main::before {
  content: '';
  position: fixed;
  inset: 0 0 auto var(--sidebar-w);
  height: 240px;
  pointer-events: none;
  background: none;
  z-index: 0;
}

.topbar {
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--topbar-border);
  padding: 0 28px;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--topbar-shadow);
  backdrop-filter: blur(8px);
}
.topbar-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.topbar-title {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.2px;
}
.topbar-search {
  flex: 1;
  max-width: 520px;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink-muted);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
}
.topbar-search-input {
  flex: 1;
  border: 0;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  color: var(--ink);
}
.topbar-search-input::placeholder { color: #9A958F; }
.topbar-utility-group {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}
.topbar-user-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 7px 12px 7px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink-soft);
  box-shadow: 0 8px 20px rgba(25,42,79,0.06);
}
.topbar-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--salmon-bg);
  color: var(--salmon);
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.topbar-user-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}
.topbar-user-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar-user-role {
  font-size: 9.5px;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.topbar-user-chip .sidebar-profile-role {
  margin-top: 0;
}
.sidebar-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
}
.sidebar-toggle:hover { background: var(--cream); }
.topbar-actions { display: flex; gap: 10px; align-items: center; }

.booking-search-popout {
  position: fixed;
  top: 92px;
  left: calc(var(--sidebar-w) + 24px);
  width: min(760px, calc(100vw - var(--sidebar-w) - 48px));
  max-height: calc(100vh - 124px);
  display: none;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--border-soft);
  border-radius: 20px;
  box-shadow: var(--shadow);
  overflow: hidden;
  z-index: 160;
}
.booking-search-popout.open { display: flex; }
.booking-search-popout-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px 14px;
  border-bottom: 1px solid var(--border-soft);
  background: var(--paper);
}
.booking-search-popout-title {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  color: var(--ink);
  line-height: 1.2;
}
.booking-search-popout-subtitle {
  margin-top: 4px;
  font-size: 12px;
  color: var(--ink-muted);
  line-height: 1.5;
}
.booking-search-close {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--paper);
  color: var(--ink-muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}
.booking-search-close:hover {
  color: var(--salmon);
  border-color: var(--salmon-border);
}
.booking-search-results {
  overflow-y: auto;
  padding: 6px 0;
}
.booking-search-empty {
  padding: 24px 18px 26px;
  text-align: center;
  color: var(--ink-muted);
}
.booking-search-empty .title {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  color: var(--ink);
  margin-bottom: 4px;
}
.booking-search-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  border-top: 1px solid var(--border-soft);
  cursor: pointer;
  transition: background 0.15s ease;
  background: var(--paper);
}
.booking-search-item:first-child { border-top: none; }
.booking-search-item:hover { background: var(--surface-soft); }
.booking-search-item-main { min-width: 0; flex: 1; }
.booking-search-item-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.45;
  letter-spacing: 0.01em;
}
.booking-search-item-meta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--ink-muted);
  line-height: 1.55;
  letter-spacing: 0.01em;
}
.booking-search-item-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.booking-search-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: var(--surface-soft);
  color: var(--ink-muted);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.booking-search-item-action {
  flex-shrink: 0;
  margin-top: 2px;
}
.booking-search-item-action .btn {
  padding: 6px 12px;
}
.booking-search-popout-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 18px;
  border-top: 1px solid var(--border-soft);
  background: var(--surface-soft);
  font-size: 11.5px;
  color: var(--ink-muted);
}
.booking-search-hint { text-align: right; }

.mobile-page-banner {
  display: none;
  margin: 14px 24px 0;
  padding: 12px 16px;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--paper), var(--surface-soft));
  box-shadow: var(--card-shadow);
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.2px;
}

.mobile-page-banner span {
  display: block;
  margin-top: 4px;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: var(--ink-muted);
  letter-spacing: 0;
}

.page { padding: 44px; display: none; max-width: 1400px; width: 100%; position: relative; z-index: 1; }
.page.active { display: block; }
.dashboard-page { gap: 20px; }
.page.active.dashboard-page { display: flex; flex-direction: column; }

.dashboard-task-panel {
  margin: 20px 0 24px;
  padding: 20px 20px 18px;
  background: var(--paper);
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  box-shadow: var(--card-shadow);
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border: none; border-radius: 6px;
  cursor: pointer; font-family: 'DM Sans', sans-serif;
  font-size: 13.5px; font-weight: 500; letter-spacing: 0.2px;
  transition: all 0.16s ease; white-space: nowrap;
}
.btn-salmon { background: var(--salmon); color: #fff; }
.btn-salmon:hover { background: #d4714f; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(232,135,106,0.3); }
.btn-outline { background: transparent; color: var(--ink-soft); border: 1.5px solid var(--border); }
.btn-outline:hover { border-color: var(--ink-soft); background: var(--cream); }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: #558845; }
.btn-ghost { background: transparent; color: var(--ink-muted); border: 1.5px solid var(--border-soft); }
.btn-ghost:hover { background: var(--cream); }
.btn-danger { background: var(--red-soft); color: #fff; }
.btn-danger:hover { background: #a93226; }
.btn-sm { padding: 7px 14px; font-size: 12.5px; }
.btn-xs { padding: 5px 10px; font-size: 11.5px; }

/* ── SHELL LINKS ── */
.shell-nav-link {
  color: inherit;
  text-decoration: none;
}
.shell-nav-link:visited {
  color: inherit;
}
.shell-nav-link:hover,
.shell-nav-link:focus {
  text-decoration: none;
}

/* ── SHELL TOPBAR ACTIONS ── */
.shell-topbar-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink-muted);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.shell-topbar-link:hover,
.shell-topbar-link:focus {
  border-color: var(--salmon);
  color: var(--salmon);
  background: var(--paper);
}
.shell-topbar-link.btn {
  text-decoration: none;
}

/* ── CARDS ── */
.card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 24px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
}
.card-header {
  padding: 16px 24px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
}
.card-header.salmon { background: var(--salmon-bg); color: var(--salmon-ink); border-bottom: 1px solid var(--salmon-border); }
.card-header.green  { background: var(--green-bg);  color: var(--green-ink); border-bottom: 1px solid var(--green-border); }
.card-header.gold   { background: var(--gold-bg);   color: var(--gold-ink); border-bottom: 1px solid var(--border-soft); }
.card-header.gray   { background: var(--surface-soft); color: var(--ink-muted); border-bottom: 1px solid var(--border-soft); }
.card-header.contract-panel-header {
  justify-content: flex-start;
}
.card-header.contract-panel-header .btn {
  margin-left: auto;
}
.card-header.contract-panel-header > span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.card-header .dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.dot-salmon { background: var(--salmon); }
.dot-green  { background: var(--green); }
.dot-gold   { background: var(--gold); }
.card-body { padding: 24px; }

/* ── THEME MAKER ── */
.theme-builder-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 20px;
  align-items: start;
}
.theme-builder-panel {
  display: grid;
  gap: 16px;
}
.theme-preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.theme-preset-chip {
  padding: 7px 12px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: var(--cream);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}
.theme-preset-chip:hover {
  border-color: var(--salmon);
  color: var(--salmon);
}
.theme-preset-chip.active {
  background: var(--salmon-bg);
  border-color: var(--salmon-border);
  color: var(--salmon);
}
.theme-color-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.theme-color-section {
  display: grid;
  gap: 10px;
}
.theme-color-section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.theme-color-swatch {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--paper);
}
.theme-color-swatch input[type="color"] {
  width: 36px;
  height: 36px;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
}
.theme-color-copy {
  min-width: 0;
}
.theme-color-copy .field-label {
  margin-bottom: 2px;
}
.theme-color-code {
  font-size: 12px;
  color: var(--ink-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.theme-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.theme-theme-note {
  font-size: 12px;
  color: var(--ink-muted);
  line-height: 1.6;
}
.theme-preview {
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  background: var(--cream);
  box-shadow: var(--card-shadow);
}
.theme-preview-head {
  padding: 12px 14px;
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--topbar-border);
}
.theme-preview-body {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  min-height: 280px;
}
.theme-preview-sidebar {
  background: var(--sidebar-bg);
  color: var(--sidebar-ink);
  padding: 14px;
}
.theme-preview-brand {
  font-family: 'Playfair Display', serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
}
.theme-preview-sub {
  margin-top: 8px;
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--sidebar-border);
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.theme-preview-main {
  padding: 14px;
  background: var(--app-bg);
}
.theme-preview-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
}
.theme-preview-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.theme-preview .status-pill,
.pdf-theme-preview .status-pill {
  color: var(--ink) !important;
  text-shadow: none;
}
.theme-preview .pill-official,
.pdf-theme-preview .pill-official {
  background: var(--surface-soft);
  border: 1px solid var(--border-soft);
  color: var(--ink);
}
.manage-overview-pill,
.preset-badge,
.mbp-note-pill,
.audit-action-badge {
  color: var(--ink);
}
.theme-preview-kicker {
  font-size: 10px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 6px;
}
.theme-preview-line {
  height: 10px;
  border-radius: 999px;
  background: var(--border-soft);
  margin-top: 8px;
}

.pdf-theme-preview {
  background: linear-gradient(180deg, var(--pdf-page-soft, var(--cream)) 0%, var(--pdf-page-bg, var(--paper)) 100%);
}
.pdf-theme-preview .status-pill {
  border: 1px solid var(--border-soft);
  background: var(--surface-soft);
}
.pdf-preview-page {
  padding: 16px;
  min-height: 318px;
  background: var(--pdf-page-bg, #fff);
}
.pdf-preview-hdr {
  text-align: center;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 2px solid var(--pdf-accent, var(--salmon));
}
.pdf-preview-title {
  font-family: 'Playfair Display', serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--pdf-header, var(--ink));
  letter-spacing: 0.2px;
}
.pdf-preview-sub {
  margin-top: 4px;
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 2.1px;
  color: var(--pdf-subheader, var(--salmon));
}
.pdf-preview-sec {
  margin-bottom: 12px;
}
.pdf-preview-sec-title {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--pdf-accent, var(--salmon));
  border-bottom: 1px solid var(--pdf-border, var(--border));
  padding-bottom: 3px;
  margin-bottom: 8px;
}
.pdf-preview-row-line {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 10.5px;
  color: var(--pdf-text, var(--ink));
  margin-bottom: 6px;
}
.pdf-preview-row-line span:last-child {
  flex: 1;
  border-bottom: 1.4px solid var(--pdf-border, var(--border));
  min-height: 14px;
}
.pdf-preview-table {
  display: grid;
  grid-template-columns: 1fr 1.4fr 0.8fr;
  border: 1px solid var(--pdf-border, var(--border));
  border-radius: 10px;
  overflow: hidden;
  font-size: 10px;
  color: var(--pdf-text, var(--ink));
}
.pdf-preview-table > div {
  padding: 7px 8px;
  border-bottom: 1px solid var(--pdf-border, var(--border));
  border-right: 1px solid var(--pdf-border, var(--border));
}
.pdf-preview-table > div:nth-child(3n) {
  border-right: none;
}
.pdf-preview-table > div:nth-last-child(-n + 3) {
  border-bottom: none;
}
.pdf-preview-table-head {
  background: var(--pdf-table-head-bg, #FBF4E6);
  font-weight: 700;
  letter-spacing: 0.4px;
  color: var(--pdf-table-head-text, var(--ink));
}
.pdf-preview-signatures {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 16px;
  text-align: center;
}
.pdf-preview-sign-line {
  border-bottom: 1.8px solid var(--pdf-signature, var(--ink));
  min-height: 32px;
  margin-bottom: 6px;
}
.pdf-preview-sign-label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  color: var(--pdf-muted, var(--ink-muted));
}

/* ── Shared Surface System ── */
.mbp-surface-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.mbp-surface-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-soft);
  background: var(--paper);
}
.mbp-surface-header.salmon {
  background: var(--salmon-bg);
  border-bottom-color: var(--salmon-border);
}
.mbp-surface-header.gray {
  background: var(--surface-soft);
}
.mbp-surface-header.green {
  background: var(--green-bg);
  border-bottom-color: var(--green-border);
}
.mbp-surface-header-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.mbp-surface-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--salmon);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--salmon) 12%, transparent);
}
.mbp-surface-dot.gray {
  background: var(--surface-alt);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--surface-alt) 12%, transparent);
}
.mbp-surface-dot.green {
  background: var(--green);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 12%, transparent);
}
.mbp-surface-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--ink);
}
.mbp-surface-meta {
  font-size: 11px;
  color: var(--ink-muted);
  font-weight: 500;
}
.mbp-surface-body {
  padding: 16px;
}

.mbp-feedback {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
  padding: 11px 14px;
  border: 1px solid var(--green-border);
  border-radius: 10px;
  background: var(--green-bg);
  color: var(--green-ink);
  font-size: 12px;
  font-weight: 500;
}
.mbp-feedback.error {
  border-color: var(--status-unpaid-bg);
  background: var(--status-unpaid-bg);
  color: var(--red-soft);
}
.mbp-feedback button {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 0;
  font-size: 14px;
  line-height: 1;
}

.task-workspace-shell {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.task-workspace-intro {
  padding: 16px 18px 14px;
  border-radius: 18px;
  background: var(--paper);
  border: 1px solid var(--border);
  box-shadow: var(--card-shadow);
}
.task-workspace-kicker {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--salmon);
  margin-bottom: 8px;
}
.task-workspace-title {
  font-family: 'Playfair Display', serif;
  font-size: 21px;
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 6px;
  letter-spacing: 0.01em;
}
.task-workspace-subtitle {
  font-size: 13px;
  color: var(--ink-muted);
  line-height: 1.7;
  letter-spacing: 0.01em;
  max-width: 76ch;
}
.task-workspace-shell.embedded .task-workspace-intro {
  padding: 0 0 10px;
  border: none;
  box-shadow: none;
  background: transparent;
  border-radius: 0;
}
.task-workspace-shell.embedded .task-workspace-title {
  font-size: 20px;
}
.task-workspace-shell.embedded .task-workspace-subtitle {
  font-size: 12.5px;
}
.task-filter-bar {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 2px;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--card-shadow);
}
.task-filter-btn {
  flex: 1;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-muted);
  font: inherit;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
  text-align: left;
}
.task-filter-btn:hover {
  background: var(--surface-muted);
  color: var(--ink);
}
.task-filter-btn.active {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--border-soft);
  box-shadow: 0 8px 18px rgba(25,42,79,0.07);
}
.task-filter-btn-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.01em;
}
.task-filter-btn-desc {
  display: block;
  margin-top: 3px;
  font-size: 10.5px;
  color: var(--ink-muted);
  line-height: 1.5;
  letter-spacing: 0.01em;
}
.task-card-shell {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--border-soft);
  border-left: 4px solid var(--task-accent, var(--border));
  border-radius: 16px;
  padding: 14px 15px 14px;
  box-shadow: 0 10px 24px rgba(25,42,79,0.05);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.task-card-shell:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(25,42,79,0.08);
}
.task-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.task-card-open {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: var(--surface-soft);
  color: var(--ink-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.task-card-open:hover {
  color: var(--salmon);
  border-color: var(--salmon-border);
  background: var(--paper);
}
.task-card-main {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}
.task-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.55;
  letter-spacing: 0.01em;
  word-break: break-word;
}
.task-card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.task-card-service {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: var(--surface-soft);
  color: var(--ink-muted);
  font-size: 10.5px;
  font-weight: 600;
  width: fit-content;
  letter-spacing: 0.01em;
}
.task-card-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.mbp-loading-state {
  padding: 28px 20px;
  text-align: center;
  color: var(--ink-muted);
  font-size: 13px;
}
.mbp-empty-state {
  text-align: center;
  padding: 40px 24px;
  color: var(--ink-muted);
}
.mbp-empty-state .icon {
  font-size: 34px;
  margin-bottom: 10px;
}
.mbp-empty-state .title {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  color: var(--ink);
  margin-bottom: 6px;
}
.mbp-empty-state .body {
  font-size: 13px;
  color: var(--ink-muted);
}

.mbp-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.mbp-stat-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  text-align: center;
  box-shadow: var(--card-shadow);
}
.mbp-stat-value {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  line-height: 1;
}
.mbp-stat-label {
  font-size: 11px;
  color: var(--ink-muted);
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-top: 6px;
  line-height: 1.35;
}

.mbp-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.mbp-section-heading-main {
  min-width: 0;
}
.mbp-section-title {
  font-family: 'Playfair Display', serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
  letter-spacing: 0.01em;
}
.mbp-section-meta {
  font-size: 11px;
  color: var(--ink-muted);
  margin-top: 4px;
  line-height: 1.5;
  letter-spacing: 0.01em;
}
.mbp-section-link {
  font-size: 11px;
  color: var(--salmon);
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}

.mbp-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--paper);
  font-size: 11px;
  font-weight: 600;
}
.mbp-task-booking-label {
  font-size: 13px;
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 3px;
  line-height: 1.5;
  letter-spacing: 0.01em;
  word-break: break-word;
}
.mbp-task-booking-meta {
  font-size: 11px;
  color: var(--ink-muted);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  line-height: 1.45;
  letter-spacing: 0.01em;
}
.mbp-task-booking-meta-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--border-soft);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink-muted);
  margin-top: 5px;
  width: fit-content;
}
.mbp-note-pill {
  font-size: 11px;
  color: var(--ink-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 8px;
  background: var(--bg);
  white-space: nowrap;
}
.mbp-notification-row {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-soft);
  background: var(--paper);
}
.mbp-notification-row.unread {
  background: var(--salmon-bg);
}
.mbp-notification-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-top: 4px;
  flex-shrink: 0;
  background: transparent;
}
.mbp-notification-row.unread .mbp-notification-dot {
  background: var(--salmon);
}
.mbp-notification-title {
  font-size: 13px;
  color: var(--ink);
}
.mbp-notification-booking {
  font-size: 11.5px;
  color: var(--ink);
  margin-top: 2px;
  font-weight: 600;
}
.mbp-notification-meta {
  font-size: 11px;
  color: var(--ink-muted);
  margin-top: 2px;
}

.editor-dashboard-shell {
  display: grid;
  gap: 20px;
}
.editor-dashboard-welcome {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.editor-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 20px;
  align-items: start;
}
.editor-dashboard-main,
.editor-dashboard-sidebar {
  min-width: 0;
}
.editor-dashboard-notifications {
  max-height: 620px;
  overflow-y: auto;
}
.editor-dashboard-shell .editor-stats-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.editor-task-dashboard .task-workspace-intro {
  padding: 14px 16px 12px;
}
.editor-task-dashboard .mbp-stat-grid {
  gap: 10px;
}
.editor-task-dashboard .task-filter-bar {
  margin-bottom: 0;
}
.editor-task-dashboard .task-card-shell {
  margin-bottom: 0;
}

/* ── FORM ELEMENTS ── */
.field-group { display: flex; flex-direction: column; gap: 7px; }

body[data-service-type="wedding"] #service-location-fields,
body[data-service-type="wedding"] #edf-service-location-fields {
  display: none !important;
}

body:not([data-service-type="wedding"]) #wedding-location-fields,
body:not([data-service-type="wedding"]) #edf-wedding-location-fields {
  display: none !important;
}

body:not([data-service-type="wedding"]) #service-location-fields,
body:not([data-service-type="wedding"]) #edf-service-location-fields {
  display: block !important;
}

#service-location-fields,
#edf-service-location-fields,
#service-location-list,
#edf-service-location-list {
  width: 100%;
}

#service-location-list,
#edf-service-location-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
}

#service-location-list > .field-group,
#edf-service-location-list > .field-group {
  width: 100%;
  align-items: stretch;
}

#service-location-list > .field-group > div,
#edf-service-location-list > .field-group > div {
  width: 100%;
}

#service-location-list input,
#edf-service-location-list input {
  width: 100%;
}
.field-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.field-label .req { color: var(--salmon); margin-left: 2px; }
.field-hint { font-size: 11.5px; color: var(--ink-muted); margin-top: 2px; font-style: italic; }

.contract-logo-grid {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.contract-logo-preview {
  min-height: 150px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: linear-gradient(180deg, #FFF, #FAF8F4);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}
.contract-logo-preview img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.contract-logo-empty {
  color: var(--ink-muted);
  font-size: 12.5px;
  text-align: center;
  line-height: 1.6;
  padding: 8px;
}
.contract-logo-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.contract-logo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.contract-logo-status {
  font-size: 12.5px;
  color: var(--ink-soft);
}
.contract-logo-note {
  font-size: 12px;
  color: var(--ink-muted);
  line-height: 1.55;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="number"],
textarea, select {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  background: var(--paper);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
  appearance: none;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--salmon);
  box-shadow: 0 0 0 3px rgba(232,135,106,0.12);
}
input[readonly] { background: #F8F6F2; color: var(--ink-muted); cursor: default; }
input[readonly]:focus { border-color: var(--border); box-shadow: none; }
textarea { resize: vertical; min-height: 80px; line-height: 1.6; }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238A8A8A' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; cursor: pointer; }

.manage-booking-combobox {
  position: relative;
}
.manage-booking-combobox::after {
  content: '';
  position: absolute;
  right: 14px;
  top: 18px;
  width: 12px;
  height: 8px;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238A8A8A' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  transition: transform 0.16s ease;
}
.manage-booking-combobox.open::after {
  transform: rotate(180deg);
}
.manage-booking-combobox input[type="text"] {
  padding-right: 38px;
}
.manage-booking-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--paper);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 16px 34px rgba(26,26,26,0.12);
  max-height: 280px;
  overflow-y: auto;
  z-index: 30;
  display: none;
}
.manage-booking-results.open {
  display: block;
}
.manage-booking-option {
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  padding: 12px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-soft);
  transition: background 0.14s ease;
}
.manage-booking-option:last-child {
  border-bottom: none;
}
.manage-booking-option:hover,
.manage-booking-option.active {
  background: var(--salmon-bg);
}
.manage-booking-option-name {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
}
.manage-booking-option-meta {
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: 2px;
}
.manage-booking-empty {
  padding: 12px 14px;
  font-size: 12.5px;
  color: var(--ink-muted);
}

.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: 1fr 1fr; }
.g3 { grid-template-columns: 1fr 1fr 1fr; }
.g4 { grid-template-columns: 1fr 1fr 1fr 1fr; }
.g-couple { grid-template-columns: 1fr 1fr; }
.full { grid-column: 1 / -1; }

/* ── SECTION DIVIDER ── */
.section-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0 18px;
}
.section-divider span {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--ink-muted);
  white-space: nowrap;
}
.section-divider::before, .section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-soft);
}

/* ── PACKAGE PRESET DROPDOWN ── */
.preset-bar {
  padding: 18px 28px;
  background: #F8F6F2;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.preset-bar label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--ink-muted);
  white-space: nowrap;
}
.preset-select {
  flex: 1;
  min-width: 220px;
  max-width: 340px;
  padding: 10px 38px 10px 14px;
  border: 1.5px solid var(--green-border);
  border-radius: 6px;
  background: var(--paper);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
}
.preset-select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(106,158,90,0.12); }
.preset-badge {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid var(--green-border);
  display: none;
}
.preset-badge.visible { display: inline-flex; align-items: center; gap: 6px; }

/* ── CALCULATOR PRESET BAR ── */
.calc-preset-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  background: linear-gradient(180deg, var(--surface-soft), var(--paper));
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}
.calc-preset-meta {
  min-width: 0;
  flex: 1;
}
.calc-preset-kicker {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.calc-preset-title {
  margin-top: 4px;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.45;
}
.calc-preset-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.calc-preset-select {
  min-width: 240px;
  max-width: 340px;
}
.manage-calc-preset-bar {
  border-top: none;
  background: var(--surface-soft);
}
@media (max-width: 720px) {
  .calc-preset-bar {
    align-items: stretch;
    flex-direction: column;
  }
  .calc-preset-actions {
    justify-content: stretch;
    width: 100%;
  }
  .calc-preset-select {
    width: 100%;
    max-width: none;
    min-width: 0;
  }
  .calc-preset-actions .btn {
    flex: 1;
  }
}

/* ── PACKAGE INCLUSIONS ── */
.pkg-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.pkg-col {
  padding: 24px 28px;
}
.pkg-col.left { border-right: 1px solid var(--border-soft); }
.pkg-col-header {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1.5px solid var(--border-soft);
}
.pkg-col-header.video-hdr { color: var(--salmon-ink); }
.pkg-col-header.photo-hdr { color: var(--green-ink); }

.inclusion-group { margin-bottom: 22px; }
.inclusion-group:last-child { margin-bottom: 0; }
.group-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  margin-bottom: 12px;
  padding: 4px 10px;
  border-radius: 4px;
  display: inline-block;
}
.group-label.sal { background: var(--salmon-bg); color: var(--salmon-ink); }
.group-label.grn { background: var(--green-bg); color: var(--green-ink); }

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 8px 0;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.12s;
}
.check-item:hover { background: var(--surface-muted); padding-left: 4px; margin-left: -4px; }
.check-item input[type="checkbox"] {
  width: 17px; height: 17px;
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
  border-radius: 4px;
  accent-color: var(--salmon);
  border: 1.5px solid var(--border);
}
.check-item.grn-chk input[type="checkbox"] { accent-color: var(--green); }
.check-item .ci-label { font-size: 13.5px; color: var(--ink); line-height: 1.5; }
.check-item .ci-sub { font-size: 11.5px; color: var(--ink-muted); line-height: 1.4; }
.check-item.indented { padding-left: 28px; }
.pkg-inc-node .pkg-inc-children {
  margin-left: 16px;
  padding-left: 10px;
  gap: 4px;
}
.pkg-inc-node .pkg-inc-child-row {
  margin-left: 10px;
  padding-left: 10px;
}
.pkg-inc-node .pkg-inc-child-row:hover {
  margin-left: 10px;
  padding-left: 10px;
}
.inclusion-tree-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 0;
}

/* Others row — full width */
.pkg-others {
  padding: 20px 28px;
  border-top: 1px solid var(--border-soft);
  background: var(--surface-soft);
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
}
.pkg-others-tree {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}
.pkg-others-tree .pkg-others-label {
  margin-bottom: 0;
}
.pkg-others-tree .inclusion-group {
  margin-bottom: 0;
}
.pkg-others-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--ink-muted);
  white-space: nowrap;
}

/* ── PACKAGES & INCLUSIONS PAGE ── */
.pkg-tab-bar {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px;
  width: fit-content;
  box-shadow: var(--shadow);
}
.pkg-tab-btn {
  padding: 9px 24px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-muted);
  background: transparent;
  transition: all 0.16s;
  letter-spacing: 0.1px;
}
.pkg-tab-btn:hover { color: var(--ink); background: var(--cream); }
.pkg-tab-btn.active { background: var(--salmon); color: #fff; box-shadow: 0 1px 4px rgba(232,135,106,0.25); }

/* Inclusion rows */
.inc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 28px;
  border-bottom: 1px solid var(--border-soft);
  transition: background 0.12s;
  gap: 12px;
}
.inc-row:last-child { border-bottom: none; }
.inc-row:hover { background: var(--surface-soft); }
.inc-row-info { flex: 1; min-width: 0; }
.inc-row-name { font-size: 14px; font-weight: 500; color: var(--ink); }
.inc-row-sub  { font-size: 12px; color: var(--ink-muted); margin-top: 1px; }
.inc-row-actions { display: flex; gap: 6px; flex-shrink: 0; }
.inc-cat-header {
  padding: 10px 28px 6px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}
.inc-cat-header.video { color: var(--salmon-ink); background: var(--salmon-bg); border-bottom: 1px solid var(--salmon-border); }
.inc-cat-header.photo { color: var(--green-ink); background: var(--green-bg);  border-bottom: 1px solid var(--green-border); }
.inc-cat-header.other { color: var(--gold-ink); background: var(--gold-bg);   border-bottom: 1px solid var(--border-soft); }

/* Package cards */
.pkg-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.pkg-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--border-soft);
  gap: 12px;
}
.pkg-card-name {
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}
.pkg-card-emoji { font-size: 18px; line-height: 1; }
.pkg-card-actions { display: flex; gap: 6px; flex-shrink: 0; }
.pkg-card-body { padding: 14px 20px; display: flex; flex-direction: column; gap: 8px; min-height: 44px; }
.pkg-card-row { display: flex; flex-wrap: wrap; gap: 6px; }
.pkg-service-row { gap: 8px; }
.pkg-hierarchy-row { flex-direction: column; gap: 10px; }
.pkg-inc-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 0 0 12px;
  margin-bottom: 8px;
  border-left: 1px solid transparent;
}
.pkg-inc-group:last-child { margin-bottom: 0; }
.pkg-inc-group-video { border-left-color: rgba(232,135,106,0.42); }
.pkg-inc-group-photo { border-left-color: rgba(111,149,112,0.42); }
.pkg-inc-group-other { border-left-color: rgba(213,171,95,0.34); }
.pkg-inc-parent-row { display: flex; align-items: center; gap: 8px; }
.pkg-inc-children {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-left: 14px;
  padding-left: 12px;
  border-left: 1px solid var(--border-soft);
}
.pkg-inc-child {
  opacity: 0.93;
  font-size: 11px;
  padding: 2px 8px;
}
.pkg-inc-parent-tag {
  font-size: 12px;
  padding: 4px 10px;
  box-shadow: none;
}
.pkg-inc-tag {
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.pkg-service-tag {
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--ink-soft);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.2px;
}
.tag-video { background: var(--salmon-bg); color: var(--salmon-ink); border: 1px solid var(--salmon-border); }
.tag-photo { background: var(--green-bg);  color: var(--green-ink); border: 1px solid var(--green-border); }
.tag-other { background: var(--gold-bg);   color: var(--gold-ink); border: 1px solid var(--border-soft); }
.pkg-inc-group .tag-video,
.pkg-inc-group .tag-photo,
.pkg-inc-group .tag-other { box-shadow: none; }

/* Package modal inclusions layout */
.pkg-modal-cats { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--border-soft); border-radius: 6px; overflow: hidden; }
.pkg-modal-cat  { padding: 16px 18px; }
.pkg-modal-cat:first-child { border-right: 1px solid var(--border-soft); }
.pkg-modal-cat.full-width  { grid-column: 1 / -1; border-top: 1px solid var(--border-soft); border-right: none; }
.pkg-modal-cat-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-soft);
}
.pkg-modal-cat-label.video { color: var(--salmon-ink); }
.pkg-modal-cat-label.photo { color: var(--green-ink); }
.pkg-modal-cat-label.other { color: var(--gold-ink); }
.pkg-service-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pkg-service-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 500;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.pkg-service-chip:hover { border-color: var(--salmon-border); background: var(--salmon-bg); color: var(--ink); }
.pkg-service-chip input[type="checkbox"] { accent-color: var(--salmon); }
.pkg-service-chip input[type="checkbox"]:checked + span { color: var(--ink); }
.pkg-service-chip.is-locked {
  cursor: not-allowed;
  opacity: 0.72;
  background: var(--surface);
  border-color: var(--border-soft);
}
.pkg-service-chip.is-locked:hover {
  border-color: var(--border-soft);
  background: var(--surface);
  color: var(--ink-soft);
}
.pkg-service-chip.is-locked input[type="checkbox"] + span { color: var(--ink-soft); }
.pkg-inc-node { display: flex; flex-direction: column; gap: 8px; }
.pkg-inc-child-row { margin-left: 0; }
.inc-tree-node.child .inc-row {
  margin-left: 18px;
  width: calc(100% - 18px);
}
.inc-tree-children { display: flex; flex-direction: column; gap: 2px; }

/* ── PAYMENT TABLE ── */
.pay-table-wrap { overflow-x: visible; }
.pay-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
}
.pay-table th {
  padding: 12px 18px;
  text-align: left;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--ink-muted);
  background: var(--surface-soft);
  border-bottom: 1.5px solid var(--border);
  white-space: nowrap;
}
.pay-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: middle;
}
.pay-table tr:last-child td { border-bottom: none; }
.pay-table tbody tr:hover td { background: var(--surface-muted); }
.pay-table td:first-child { width: 44px; text-align: center; font-size: 12px; color: var(--ink-muted); font-weight: 500; }
.pay-table td.terms-cell { font-weight: 500; }
.pay-table input[type="number"] {
  padding: 8px 10px;
  font-size: 13.5px;
  border-radius: 5px;
  border: 1.5px solid var(--border);
  width: 100%;
}
.pay-table input[type="number"]:focus { border-color: var(--salmon); box-shadow: 0 0 0 3px rgba(232,135,106,0.1); }
.pay-table input[type="date"] { padding: 8px 10px; font-size: 13px; border-radius: 5px; width: 100%; }

.pay-total-row td { background: var(--surface-soft); font-weight: 600; padding: 15px 18px; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.status-paid    { background: var(--status-paid-bg);    color: var(--status-paid-color); }
.status-partial { background: var(--status-partial-bg); color: var(--status-partial-color); }
.status-pending { background: var(--status-pending-bg); color: var(--status-pending-color); }
.status-unpaid  { background: var(--status-unpaid-bg);  color: var(--status-unpaid-color); }
.status-active  { background: var(--status-active-bg);  color: var(--status-active-color); }
.status-review  { background: var(--status-pending-review-bg); color: var(--status-pending-review-color); }
.status-rejected{ background: var(--status-rejected-bg); color: var(--status-rejected-color); }
.status-locked  { background: var(--status-locked-bg);  color: var(--status-locked-color); }
.status-expired { background: var(--status-expired-bg); color: var(--status-expired-color); }
.status-todo    { background: var(--status-todo-bg);    color: var(--status-todo-color); }
.status-in-progress { background: var(--status-in-progress-bg); color: var(--status-in-progress-color); }

.pay-summary-box {
  margin-top: 20px;
  background: var(--cream);
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  padding: 18px 22px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.pay-sum-item .psi-label { font-size: 10px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 4px; }
.pay-sum-item .psi-val { font-family: 'Playfair Display', serif; font-size: 22px; font-weight: 600; }
.psi-total { color: var(--ink); }
.psi-paid  { color: var(--green); }
.psi-bal   { color: var(--salmon); }

/* ── STATS DASHBOARD ── */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 28px; }
.stat-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px 22px;
  box-shadow: var(--card-shadow);
  position: relative;
  overflow: hidden;
}
.stat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.stat-label { font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 10px; }
.stat-value { font-family: 'Playfair Display', serif; font-size: 34px; font-weight: 700; color: var(--ink); line-height: 1; }
.stat-sub { font-size: 12px; color: var(--gold); margin-top: 6px; }
.stat-toggle {
  border: 1px solid var(--border);
  background: var(--cream);
  color: var(--ink-muted);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  cursor: pointer;
  line-height: 1.2;
}
.stat-toggle:hover { color: var(--ink); border-color: var(--ink-muted); }

/* ── RECORDS TABLE ── */
.search-row { display: flex; gap: 12px; margin-bottom: 20px; align-items: center; flex-wrap: wrap; }
.search-row input { flex: 1; min-width: 220px; max-width: 380px; }
.records-count { font-size: 13px; color: var(--ink-muted); margin-left: auto; }

.rec-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.rec-table thead th {
  text-align: left; padding: 12px 16px;
  font-size: 10px; font-weight: 500; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--ink-muted); border-bottom: 1.5px solid var(--border); background: var(--surface-soft);
}
.rec-table tbody tr { transition: background 0.12s; }
.rec-table tbody tr:hover td { background: var(--salmon-bg); }
.rec-table tbody td { padding: 14px 16px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 20px; font-size: 11.5px; font-weight: 500;
}
.badge-paid    { background: var(--status-paid-bg);    color: var(--status-paid-color); }
.badge-partial { background: var(--status-partial-bg); color: var(--status-partial-color); }
.badge-pending { background: var(--status-pending-bg); color: var(--status-pending-color); }
.badge-unpaid  { background: var(--status-unpaid-bg);  color: var(--status-unpaid-color); }

/* ── MODAL ── */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 1000; align-items: center; justify-content: center; backdrop-filter: blur(2px); }
.modal-overlay.open { display: flex; }
.modal { background: var(--paper); border-radius: 12px; width: 92%; max-width: 880px; max-height: 90vh; overflow-y: auto; padding: 36px 40px; position: relative; box-shadow: 0 20px 60px rgba(0,0,0,0.2); }
.modal-close { position: absolute; top: 20px; right: 24px; font-size: 20px; cursor: pointer; color: var(--ink-muted); background: var(--cream); border: 1px solid var(--border); width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: all 0.15s; }
.modal-close:hover { background: var(--border); color: var(--ink); }

/* ── FORM ACTIONS ── */
.form-actions { display: flex; gap: 12px; justify-content: flex-end; padding: 8px 0 4px; }

/* ── SIGNATURE ── */
.sig-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 36px; margin-top: 8px; }
.sig-blk { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.sig-area {
  width: 100%; border-bottom: 2px solid var(--ink);
  min-height: 56px; display: flex; align-items: flex-end;
  padding-bottom: 6px; justify-content: center;
}
.sig-area input { border: none; border-radius: 0; background: transparent; text-align: center; font-family: 'Playfair Display', serif; font-size: 17px; padding: 4px 0; width: 100%; color: var(--ink); }
.sig-area input:focus { outline: none; }
.sig-lbl { font-size: 11px; letter-spacing: 1.8px; text-transform: uppercase; color: var(--ink-muted); font-weight: 500; }

/* ── TOAST ── */
#toast { position: fixed; bottom: 28px; right: 28px; padding: 14px 22px; border-radius: 8px; font-size: 13.5px; font-weight: 500; opacity: 0; transition: opacity 0.25s, transform 0.25s; z-index: 9999; pointer-events: none; transform: translateY(8px); box-shadow: 0 8px 24px rgba(0,0,0,0.15); }
#toast.show { opacity: 1; transform: translateY(0); }
#toast.success { background: var(--ink); color: #fff; }
#toast.error   { background: var(--red-soft); color: #fff; }

.divider { border: none; border-top: 1px solid var(--border-soft); margin: 22px 0; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--ink-muted); }
.empty-state .ei { font-size: 48px; margin-bottom: 14px; }
.empty-state h3 { font-family: 'Playfair Display', serif; font-size: 22px; font-weight: 400; margin-bottom: 6px; color: var(--ink); }
.empty-state p { font-size: 14px; color: var(--ink-muted); }

/* ── UPCOMING EVENTS ── */
.event-row { display: flex; align-items: center; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--border-soft); }
.event-row:last-child { border-bottom: none; }
.event-date-box { background: var(--salmon); color: #fff; border-radius: 8px; padding: 10px 14px; text-align: center; min-width: 56px; flex-shrink: 0; }
.event-date-box .edm { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; opacity: 0.85; }
.event-date-box .edd { font-family: 'Playfair Display', serif; font-size: 26px; font-weight: 700; line-height: 1; }
.event-info { flex: 1; }
.event-couple { font-family: 'Playfair Display', serif; font-size: 16px; font-weight: 600; }
.event-venue  { font-size: 12.5px; color: var(--ink-muted); margin-top: 2px; }
.event-days   { font-size: 12.5px; font-weight: 600; color: var(--salmon); text-align: right; white-space: nowrap; }



/* ── CONTRACT MAKER ── */
.contract-layout { display: block; }
.contract-main { min-width: 0; }
.contract-sidebar-panel { position: sticky; top: 80px; }

.clause-list { display: flex; flex-direction: column; gap: 0; }
.clause-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 11px 16px; border-bottom: 1px solid var(--border-soft);
  transition: background 0.12s; cursor: default;
}
.clause-row:last-child { border-bottom: none; }
.clause-row:hover { background: var(--cream); }
.clause-row.disabled { opacity: 0.4; }
.clause-row.group-header { background: var(--surface-soft); padding: 8px 16px; }
.clause-toggle { flex-shrink: 0; margin-top: 2px; width: 18px; height: 18px; accent-color: var(--salmon); cursor: pointer; }
.clause-num { font-size: 11px; font-weight: 700; color: var(--salmon); min-width: 26px; margin-top: 1px; flex-shrink: 0; }
.clause-text-wrap { flex: 1; min-width: 0; }
.clause-text { font-size: 12.5px; color: var(--ink); line-height: 1.5; }
.clause-text.group { font-size: 11px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--ink-muted); }
.clause-tag { font-size: 10px; padding: 1px 6px; border-radius: 3px; background: var(--salmon-bg); color: var(--salmon); border: 1px solid var(--salmon-border); margin-left: 4px; white-space: nowrap; }
.clause-tag.grn { background: var(--green-bg); color: var(--green); border-color: var(--green-border); }
.clause-actions { display: flex; gap: 4px; flex-shrink: 0; opacity: 0; transition: opacity 0.1s; }
.clause-row:hover .clause-actions { opacity: 1; }
.clause-edit-btn { background: none; border: 1px solid var(--border); border-radius: 4px; padding: 2px 6px; font-size: 11px; cursor: pointer; color: var(--ink-muted); font-family: 'DM Sans', sans-serif; transition: all 0.12s; }
.clause-edit-btn:hover { background: var(--gold-bg); border-color: var(--gold); color: var(--gold); }
.clause-del-btn { background: none; border: 1px solid var(--border); border-radius: 4px; padding: 2px 6px; font-size: 11px; cursor: pointer; color: var(--ink-muted); font-family: 'DM Sans', sans-serif; transition: all 0.12s; }
.clause-del-btn:hover { background: var(--status-unpaid-bg); border-color: var(--red-soft); color: var(--red-soft); }

.contract-preview {
  background: var(--paper); border: 1px solid var(--border); border-radius: 6px;
  padding: 40px 44px; font-family: 'DM Sans', sans-serif; font-size: 13px;
  line-height: 1.7; color: var(--ink); max-height: 600px; overflow-y: auto;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.preview-header { text-align: center; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 2px solid var(--salmon); }
.preview-studio { font-size: 18px; font-weight: 700; font-family: 'Playfair Display', serif; }
.preview-sub { font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--salmon); margin-top: 4px; }
.preview-ref { font-size: 11px; color: var(--ink-muted); margin-top: 6px; }
.preview-section { margin-top: 20px; }
.preview-section-title { font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--salmon); margin-bottom: 8px; padding-bottom: 4px; border-bottom: 1px solid var(--border); }
.preview-field { font-size: 12.5px; margin-bottom: 4px; }
.preview-field strong { color: var(--ink); }
.preview-clause { font-size: 11.5px; margin: 4px 0 4px 16px; line-height: 1.5; color: var(--ink-soft); }
.preview-clause.inactive { opacity: 0.3; text-decoration: line-through; }
.preview-note { font-size: 11px; font-style: italic; color: var(--ink-muted); margin: 4px 0 4px 16px; }

/* Clause edit modal */
.clause-modal { max-width: 640px; }

/* ── FILL DUE BUTTON ── */
.fill-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  border: 1.5px solid var(--green-border);
  background: var(--green-bg); color: var(--green);
  cursor: pointer; font-size: 13px; transition: all 0.15s;
  flex-shrink: 0; title: 'Fill with amount due';
}
.fill-btn:hover { background: var(--green); color: #fff; border-color: var(--green); transform: scale(1.1); }
.fill-btn:active { transform: scale(0.95); }

/* ── AMOUNT PAID CELL ── */
.paid-cell { display: flex; align-items: center; gap: 6px; }
.paid-cell input { flex: 1; min-width: 0; }

/* ── MODE / CARE-OF CELLS ── */
.pay-table select { padding: 8px 30px 8px 10px; font-size: 13px; }
.pay-table .small-input { padding: 8px 10px; font-size: 13px; }

/* ── INLINE WARNING ── */
.field-warning {
  font-size: 11.5px; color: var(--red-soft); margin-top: 4px;
  display: none; align-items: center; gap: 5px;
}
.field-warning.show { display: flex; }


/* ── CALENDAR ── */
.cal-wrap {
  background: var(--paper);
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 16px 34px rgba(25,42,79,0.07);
  margin-bottom: 24px;
}
.cal-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; border-bottom: 1px solid var(--border-soft); background: var(--paper); }
.cal-title { font-family: 'Playfair Display', serif; font-size: 18px; font-weight: 600; }
.cal-meta { margin-top: 4px; }
.cal-refresh-status { font-size: 12px; color: var(--ink-muted); }
.cal-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cal-view-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.cal-view-btn {
  border: none;
  background: transparent;
  color: var(--ink-muted);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
}
.cal-view-btn.active {
  background: var(--ink);
  color: #fff;
}
.cal-nav { display: flex; gap: 8px; }
.cal-nav button { background: var(--cream); border: 1.5px solid var(--border); border-radius: 6px; width: 32px; height: 32px; cursor: pointer; font-size: 14px; display: flex; align-items: center; justify-content: center; transition: all 0.15s; }
.cal-nav button:hover { background: var(--salmon); color: #fff; border-color: var(--salmon); }
.cal-body { width: 100%; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); width: 100%; }
.cal-dow { padding: 10px 0; text-align: center; font-size: 10px; font-weight: 600; letter-spacing: 1.4px; text-transform: uppercase; color: var(--ink-muted); background: var(--surface-soft); border-bottom: 1px solid var(--border); }
.cal-cell { min-height: 88px; padding: 8px; border-right: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); cursor: default; transition: background 0.1s; position: relative; }
.cal-cell:nth-child(7n) { border-right: none; }
.cal-cell.other-month .cal-day { color: var(--ink-muted); opacity: 0.35; }
.cal-cell.today { background: var(--salmon-bg); }
.cal-cell.today .cal-day { background: var(--salmon); color: #fff; border-radius: 50%; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; }
.cal-day { font-size: 13px; font-weight: 500; margin-bottom: 4px; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; }
.cal-event { font-size: 10px; font-weight: 500; padding: 2px 6px; border-radius: 4px; margin-bottom: 2px; cursor: pointer; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: opacity 0.1s; }
.cal-event:hover { opacity: 0.8; }
.cal-event.official { background: var(--salmon-bg); color: var(--salmon-ink); border-left: 3px solid var(--salmon); }
.cal-event.pencil { background: var(--surface-soft); color: var(--ink-muted); border-left: 3px solid var(--ink-muted); }
.cal-event.pre { background: var(--green-bg); color: var(--green-ink); border-left: 3px solid var(--green); }
.cal-legend { display: flex; gap: 18px; padding: 12px 20px; border-top: 1px solid var(--border-soft); background: var(--surface-soft); flex-wrap: wrap; }
.cal-legend-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-muted); }
.cal-legend-dot { width: 10px; height: 10px; border-radius: 2px; }
.cal-year-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 18px;
}
.cal-year-card {
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-soft);
}
.cal-year-head {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.cal-year-title {
  border: none;
  background: transparent;
  padding: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}
.cal-year-count {
  font-size: 11px;
  color: var(--ink-muted);
}
.cal-mini-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  padding: 12px;
  width: 100%;
}
.cal-mini-dow {
  text-align: center;
  font-size: 9px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.cal-mini-day {
  position: relative;
  min-height: 32px;
  min-width: 0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--ink);
  cursor: pointer;
}
.cal-mini-day.other-month {
  color: var(--ink-muted);
}
.cal-mini-day.today {
  background: var(--salmon-bg);
  color: var(--salmon-ink);
  font-weight: 700;
}
.cal-mini-day.has-event::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--salmon);
}
.cal-mini-day.has-pre::before {
  content: '';
  position: absolute;
  bottom: 4px;
  left: calc(50% - 8px);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}
.cal-mini-day.has-pencil::after {
  background: var(--ink-muted);
}
.cal-mini-day.has-event.has-pre::after,
.cal-mini-day.has-pencil.has-pre::after {
  left: calc(50% + 4px);
  transform: none;
}


/* ── BOOKING MANAGE PAGE ── */
.manage-header {
  background: var(--ink); color: #fff; border-radius: var(--radius);
  padding: 24px 28px; margin-bottom: 24px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 14px; box-shadow: var(--shadow);
}
.manage-couple {
  font-family: 'Playfair Display', serif; font-size: 24px; font-weight: 700; color: #fff;
}
.manage-meta { font-size: 12.5px; color: rgba(255,255,255,0.55); margin-top: 4px; }
.dashboard-pipeline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}
.manage-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}
.manage-grid-3 {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; margin-top: 20px;
}

/* ── TODO LIST ── */
.todo-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 16px; border-bottom: 1px solid var(--border-soft);
  transition: background 0.12s;
}
.todo-item:last-child { border-bottom: none; }
.todo-item:hover { background: var(--cream); }
.todo-check {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--border); cursor: pointer;
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  transition: all 0.15s; font-size: 11px; color: transparent;
}
.todo-check.done { background: var(--green); border-color: var(--green); color: #fff; }
.todo-label { flex: 1; font-size: 13.5px; transition: all 0.15s; }
.todo-label.done { text-decoration: line-through; color: var(--ink-muted); }
.todo-tag {
  font-size: 10px; padding: 2px 7px; border-radius: 10px;
  background: var(--salmon-bg); color: var(--salmon); border: 1px solid var(--salmon-border);
  white-space: nowrap; flex-shrink: 0;
}
.todo-tag.custom { background: var(--gold-bg); color: var(--gold); border-color: #E8D4A0; }
.todo-del { background: none; border: none; cursor: pointer; color: var(--ink-muted); font-size: 15px; padding: 2px 4px; border-radius: 3px; opacity: 0; transition: opacity 0.1s; }
.todo-item:hover .todo-del { opacity: 1; }
.todo-del:hover { color: var(--red-soft); }

/* ── SHOOTER CARDS ── */
.shooter-card {
  background: var(--paper);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 6px 14px rgba(25,42,79,0.03);
}
.shooter-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--salmon); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; flex-shrink: 0;
}
.shooter-avatar.photo { background: var(--green); }
.shooter-avatar.pa    { background: var(--gold); }
.shooter-info { flex: 1; min-width: 0; }
.shooter-name { font-size: 13.5px; font-weight: 500; }
.shooter-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.shooter-role,
.shooter-dayrole {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: #fff;
  color: var(--ink-muted);
  white-space: nowrap;
}
.shooter-role { font-weight: 500; }
.shooter-dayrole {
  background: var(--salmon-bg);
  border-color: var(--salmon-border);
  color: var(--salmon);
  font-weight: 600;
}
.shooter-remove { background: none; border: none; cursor: pointer; color: var(--ink-muted); font-size: 16px; padding: 4px; transition: color 0.12s; }
.shooter-remove:hover { color: var(--red-soft); }

.roster-quick-item > summary {
  list-style: none;
}
.roster-quick-item > summary::-webkit-details-marker {
  display: none;
}
.roster-quick-item[open] {
  box-shadow: 0 8px 20px rgba(25,42,79,0.06);
}

/* ── FILE LOCATION ── */
.file-loc-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 12px 10px;
  padding: 12px 14px;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: var(--paper);
  box-shadow: 0 6px 14px rgba(25,42,79,0.03);
}
.file-loc-item:last-child { margin-bottom: 12px; }
.file-loc-icon { font-size: 18px; flex-shrink: 0; width: 28px; text-align: center; }
.file-loc-text { flex: 1; font-size: 13.5px; color: var(--ink); }
.file-loc-note { font-size: 11.5px; color: var(--ink-muted); margin-top: 2px; }

/* ── MANAGE CALCULATOR ── */
.manage-calc-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 12px 10px;
  padding: 10px 12px;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: var(--paper);
  font-size: 13.5px;
  box-shadow: 0 6px 14px rgba(25,42,79,0.03);
}
.manage-calc-line:last-child { margin-bottom: 12px; }
.manage-calc-name { flex: 1; font-weight: 500; }
.manage-calc-rate input { width: 100px; padding: 5px 8px; font-size: 13px; border: 1.5px solid var(--border); border-radius: 5px; text-align: right; font-family: 'DM Sans', sans-serif; }
.manage-calc-qty { display: flex; align-items: center; gap: 5px; }
.manage-calc-qty button { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--border); background: var(--cream); cursor: pointer; font-size: 14px; font-weight: 700; transition: all 0.12s; color: var(--ink-soft); display: flex; align-items: center; justify-content: center; }
.manage-calc-qty button:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.manage-calc-qty span { min-width: 20px; text-align: center; font-weight: 600; font-size: 13.5px; }
.manage-calc-sub { min-width: 90px; text-align: right; font-weight: 500; color: var(--ink); }
.manage-calc-summary {
  background: var(--paper);
  border-top: 1px solid var(--border-soft);
  border-radius: 0 0 16px 16px;
  overflow: hidden;
}
.manage-calc-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 14px 18px;
  border-top: 1px solid rgba(46, 45, 42, 0.08);
}
.manage-calc-total:first-child { border-top: none; }
.manage-calc-total-label {
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.manage-calc-total-val {
  font-family: 'Playfair Display', serif;
  font-size: 21px;
  font-weight: 700;
  color: var(--ink);
}
.manage-calc-total.manage-calc-total-estimate {
  background: var(--surface-soft);
}
.manage-calc-total.manage-calc-total-estimate .manage-calc-total-label {
  color: var(--ink-muted);
}
.manage-calc-total.manage-calc-total-estimate .manage-calc-total-val {
  color: var(--salmon);
  font-size: 24px;
}
.manage-calc-total.manage-calc-total-package .manage-calc-total-val {
  color: var(--gold-ink);
}
.manage-calc-total.manage-calc-total-subtotal {
  background: var(--paper);
}
.manage-calc-total.manage-calc-total-subtotal .manage-calc-total-val {
  color: var(--ink);
}
.manage-calc-total.manage-calc-total-deductions {
  background: var(--surface-soft);
}
.manage-calc-total.manage-calc-total-deductions .manage-calc-total-val {
  color: var(--salmon);
}
.manage-calc-total.manage-calc-total-income {
  background: var(--surface-soft);
}
.manage-calc-total.manage-calc-total-income .manage-calc-total-label {
  color: var(--green-ink);
}
.manage-calc-total.manage-calc-total-income .manage-calc-total-val {
  color: var(--green);
}

.contract-payment-panel {
  background: var(--paper);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 16px 18px;
}
.contract-payment-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.contract-payment-note {
  font-size: 12.5px;
  color: var(--ink-muted);
  max-width: 520px;
  line-height: 1.55;
}
.contract-payment-summary {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.contract-payment-card {
  background: var(--paper);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 12px 14px;
}
.contract-payment-card .label {
  display: block;
  font-size: 10px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 6px;
}
.contract-payment-card .value {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
}
.contract-payment-card.package .value { color: var(--gold-ink); }
.contract-payment-card.balance .value { color: var(--salmon); }
.contract-payment-card.schedule .value { color: var(--green); }

/* ── BOOKING CALCULATOR ── */
.calc-layout { display: grid; grid-template-columns: 320px 1fr; gap: 24px; align-items: start; }
.calc-items-panel { background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); position: sticky; top: 80px; }
.calc-items-header { padding: 16px 20px; background: var(--surface-soft); border-bottom: 1px solid var(--border); font-size: 11px; font-weight: 600; letter-spacing: 1.4px; text-transform: uppercase; color: var(--ink-muted); }



/* ── CALC ITEM DND ── */
.calc-item-row { cursor: grab; }
.calc-item-row.ci-dragging { opacity: 0.4; cursor: grabbing; background: var(--salmon-bg) !important; }
.calc-item-row.ci-drag-over { border-top: 2px solid var(--salmon) !important; }
.ci-dnd-handle { color: var(--ink-muted); font-size: 13px; cursor: grab; padding: 2px 4px; opacity: 0.4; flex-shrink: 0; transition: opacity 0.1s; }
.calc-item-row:hover .ci-dnd-handle { opacity: 1; }

/* ── GLOBAL ROSTER ── */
.roster-card {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px; border-bottom: 1px solid var(--border-soft);
}
.roster-card:last-child { border-bottom: none; }
.roster-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--salmon); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.roster-avatar.photo { background: var(--green); }
.roster-avatar.pa    { background: var(--gold); }

/* ── FILE LOC CATEGORIES ── */
.file-cat-header {
  margin: 12px 14px 8px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  background: var(--surface-soft);
  border: 1px solid var(--border-soft);
}
.file-cat-header.salmon { color: var(--salmon); }
.file-cat-header.green  { color: var(--green); }


.calc-item-row { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border-soft); transition: background 0.12s; }
.calc-item-row:last-child { border-bottom: none; }
.calc-item-row:hover { background: var(--surface-soft); }
.calc-item-name { flex: 1; font-size: 13.5px; font-weight: 500; color: var(--ink); }
.calc-item-price { font-size: 13px; color: var(--ink-muted); min-width: 80px; text-align: right; }
.calc-item-price input { width: 100px; padding: 5px 8px; font-size: 13px; border: 1.5px solid var(--border); border-radius: 5px; text-align: right; font-family: 'DM Sans', sans-serif; }
.calc-item-price input:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 2px color-mix(in srgb, var(--gold) 12%, transparent); }
.calc-add-btn { width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--green-border); background: var(--green-bg); color: var(--green); font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.15s; font-weight: 300; flex-shrink: 0; }
.calc-add-btn:hover { background: var(--green); color: #fff; transform: scale(1.1); }

.calc-quote-panel { background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.calc-quote-header { padding: 16px 22px; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: space-between; }
.calc-quote-title { font-family: 'Playfair Display', serif; font-size: 18px; font-weight: 600; color: var(--salmon); }
.calc-empty { text-align: center; padding: 48px 20px; color: var(--ink-muted); font-size: 14px; }
.calc-empty-icon { font-size: 40px; margin-bottom: 10px; }
.calc-line { display: flex; align-items: center; gap: 12px; padding: 13px 22px; border-bottom: 1px solid var(--border-soft); }
.calc-line:last-child { border-bottom: none; }
.calc-line-name { flex: 1; font-size: 14px; font-weight: 500; }
.calc-line-qty { display: flex; align-items: center; gap: 6px; }
.calc-line-qty button { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--border); background: var(--cream); cursor: pointer; font-size: 14px; font-weight: 600; display: flex; align-items: center; justify-content: center; transition: all 0.12s; color: var(--ink-soft); }
.calc-line-qty button:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.calc-line-qty span { font-size: 14px; font-weight: 600; min-width: 22px; text-align: center; }
.calc-line-subtotal { font-size: 14px; font-weight: 500; min-width: 100px; text-align: right; color: var(--ink); }
.calc-line-remove { color: var(--ink-muted); background: none; border: none; cursor: pointer; font-size: 16px; padding: 4px; border-radius: 4px; transition: all 0.12s; }
.calc-line-remove:hover { color: var(--red-soft); background: var(--status-unpaid-bg); }
.calc-section,
.manage-calc-section {
  border-top: 1px solid var(--border-soft);
}
.calc-section-head,
.manage-calc-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 22px 12px;
}
.calc-section-head > span,
.manage-calc-section-head > div,
.calc-section-head > div {
  min-width: 0;
}
.calc-section-head,
.manage-calc-section-head { background: var(--paper); }
.calc-section-head > span,
.manage-calc-section-kicker,
.calc-section-kicker {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--salmon);
}
.calc-section-title,
.manage-calc-section-title {
  margin-top: 3px;
  font-size: 12px;
  color: var(--ink-muted);
}
.calc-line-list,
.manage-calc-line-list,
.calc-deduction-list,
.manage-calc-deduction-list {
  display: flex;
  flex-direction: column;
}
.calc-empty,
.manage-calc-empty {
  text-align: center;
  padding: 28px 20px;
  color: var(--ink-muted);
  font-size: 14px;
}
.calc-empty-compact,
.manage-calc-empty-soft {
  padding: 18px 20px 22px;
  font-size: 13px;
}
.calc-empty-soft {
  margin: 0 22px 12px;
  background: var(--surface-soft);
  border-radius: 14px;
}
.calc-empty-icon { font-size: 40px; margin-bottom: 10px; }
.calc-deduction-row,
.manage-calc-deduction-row {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) 92px 110px minmax(0, 1.2fr) auto auto;
  gap: 10px;
  padding: 12px 22px;
  border-bottom: 1px solid var(--border-soft);
  align-items: end;
  background: var(--paper);
}
.calc-deduction-row:last-child,
.manage-calc-deduction-row:last-child { border-bottom: none; }
.calc-deduction-row .field-group,
.manage-calc-deduction-row .field-group {
  margin: 0;
}
.calc-deduction-row input,
.manage-calc-deduction-row input {
  width: 100%;
  min-width: 0;
}
.calc-mode-toggle,
.manage-calc-mode-toggle {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-soft);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.55);
}
.calc-mode-toggle button,
.manage-calc-mode-toggle button {
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border: none;
  background: transparent;
  color: var(--ink-muted);
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.calc-mode-toggle button.active,
.manage-calc-mode-toggle button.active {
  background: var(--ink);
  color: #fff;
}
.calc-value-wrap,
.manage-calc-value-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 10px;
  background: var(--paper);
  min-height: 40px;
}
.calc-value-wrap span,
.manage-calc-value-wrap span {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-muted);
}
.calc-value-wrap input,
.manage-calc-value-wrap input {
  border: none !important;
  padding: 0 !important;
  background: transparent;
  box-shadow: none !important;
  text-align: right;
  flex: 1;
  min-width: 0;
}
.calc-value-wrap input:focus,
.manage-calc-value-wrap input:focus {
  outline: none;
}
.calc-deduction-amount,
.manage-calc-deduction-amount {
  min-width: 96px;
  text-align: right;
  font-weight: 600;
  color: var(--salmon);
}
.calc-deduction-remove,
.manage-calc-deduction-remove,
.manage-calc-line-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink-muted);
  font-size: 16px;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.12s;
  align-self: center;
}
.calc-deduction-remove:hover,
.manage-calc-deduction-remove:hover,
.manage-calc-line-remove:hover { color: var(--red-soft); background: var(--status-unpaid-bg); }
.calc-breakdown,
.manage-calc-breakdown {
  background: var(--surface-soft);
  border-top: 1px solid var(--border-soft);
  display: grid;
  gap: 0;
}
.calc-breakdown-row,
.manage-calc-breakdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 22px;
  border-top: 1px solid rgba(46,45,42,0.08);
}
.calc-breakdown-row:first-child,
.manage-calc-breakdown-row:first-child { border-top: none; }
.calc-breakdown-row-muted,
.manage-calc-breakdown-row-muted {
  background: rgba(255,255,255,0.45);
}
.calc-breakdown-label,
.manage-calc-breakdown-label {
  font-size: 11px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.calc-breakdown-value,
.manage-calc-breakdown-value {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}
.calc-breakdown-row-muted .calc-breakdown-value,
.manage-calc-breakdown-row-muted .manage-calc-breakdown-value {
  color: var(--salmon);
}
.calc-breakdown-row .calc-breakdown-value[data-tone="green"],
.manage-calc-breakdown-row .manage-calc-breakdown-value[data-tone="green"] {
  color: var(--green);
}
.calc-total-row { display: flex; align-items: center; justify-content: space-between; padding: 16px 22px; background: var(--ink); color: #fff; }
.calc-total-label { font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; opacity: 0.6; }
.calc-total-amount { font-family: 'Playfair Display', serif; font-size: 26px; font-weight: 700; color: var(--salmon); }
.calc-actions { display: flex; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--border-soft); background: var(--surface-soft); }

/* ── CALC CUSTOM ITEM FORM ── */
.calc-custom-form {
  padding: 14px 16px;
  border-top: 1px solid var(--border-soft);
  background: var(--gold-bg);
  display: none;
}
.calc-custom-form.open { display: block; }
.calc-custom-form .grid { gap: 8px; }
.calc-custom-label {
  font-size: 10px; font-weight: 600; letter-spacing: 1.4px;
  text-transform: uppercase; color: var(--gold); margin-bottom: 10px;
  display: flex; align-items: center; gap: 6px;
}
.calc-item-delete {
  background: none; border: none; cursor: pointer;
  color: var(--ink-muted); font-size: 14px; padding: 3px 5px;
  border-radius: 4px; transition: all 0.12s; flex-shrink: 0;
  opacity: 0;
}
.calc-item-row:hover .calc-item-delete { opacity: 1; }
.calc-item-delete:hover { color: var(--red-soft); background: var(--status-unpaid-bg); }
.calc-items-header { display: flex; align-items: center; justify-content: space-between; }
.calc-add-custom-btn {
  background: none; border: 1.5px solid var(--gold); color: var(--gold);
  border-radius: 5px; padding: 3px 10px; font-size: 11px; font-weight: 600;
  cursor: pointer; font-family: 'DM Sans', sans-serif; letter-spacing: 0.5px;
  transition: all 0.15s;
}
.calc-add-custom-btn:hover { background: var(--gold); color: #fff; }


/* Sub-items in clause display */

/* Drag and drop for clauses */
.clause-row { cursor: grab; }
.clause-row.dragging { opacity: 0.4; background: var(--salmon-bg) !important; cursor: grabbing; }
.clause-row.drag-over { border-top: 2px solid var(--salmon) !important; }
.dnd-handle { color: var(--ink-muted); font-size: 13px; cursor: grab; padding: 2px 4px; flex-shrink: 0; opacity: 0.4; transition: opacity 0.1s; }
.clause-row:hover .dnd-handle { opacity: 1; }

.sub-item { display: block; padding: 3px 0; line-height: 1.6; }
.sub-a { padding-left: 20px; }
.sub-i { padding-left: 40px; }

.save-items-btn { display: flex; align-items: center; gap: 6px; padding: 7px 14px; background: var(--gold-bg); color: var(--gold); border: 1.5px solid #E8D4A0; border-radius: 5px; cursor: pointer; font-size: 12px; font-weight: 500; font-family: 'DM Sans', sans-serif; transition: all 0.15s; }
.save-items-btn:hover { background: var(--gold); color: #fff; }

/* ── RESPONSIVE LAYOUT ── */
#table-container { overflow-x: auto; }

@media (max-width: 1200px) {
  .page { padding: 32px; }
  .stats-grid,
  .stats-grid--dashboard { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calc-layout { grid-template-columns: 280px minmax(0, 1fr); }
  .manage-grid-3 { grid-template-columns: 1fr 1fr; }
  .manage-grid-3 > .card[style*="grid-column: span 2"] { grid-column: span 2; }
  .cal-year-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .theme-builder-grid { grid-template-columns: 1fr; }
  .contract-logo-grid { grid-template-columns: 1fr; }

  body.compact-inner-shell .topbar {
    min-height: 58px;
    padding-top: 10px;
    padding-bottom: 10px;
    align-items: center;
  }
  body.compact-inner-shell .topbar-search,
  body.compact-inner-shell .topbar-utility-group {
    display: none;
  }
  body.compact-inner-shell .topbar-title-row {
    width: 100%;
  }
  body.compact-inner-shell .topbar-title {
    font-size: 19px;
  }
  body.compact-inner-shell .main {
    height: 100dvh;
    overflow: hidden;
  }
  body.compact-inner-shell .page {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 24px;
  }
  body.compact-inner-shell #page-new-booking #booking-mode-header {
    padding: 16px 16px 14px !important;
  }
  body.compact-inner-shell #page-new-booking #booking-mode-header > div {
    flex-direction: column;
    align-items: flex-start;
  }
  body.compact-inner-shell #page-new-booking #booking-mode-header > div > div:last-child {
    text-align: left;
    width: 100%;
  }
  body.compact-inner-shell #page-new-booking > div:nth-of-type(2) {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  body.compact-inner-shell #page-new-booking > div:nth-of-type(2) > div:first-child {
    width: 100%;
  }
  body.compact-inner-shell #page-new-booking .grid.g2,
  body.compact-inner-shell #page-new-booking .grid.g3,
  body.compact-inner-shell #page-new-booking .grid.g4,
  body.compact-inner-shell #page-new-booking .g-couple,
  body.compact-inner-shell #page-settings .grid.g2,
  body.compact-inner-shell #page-settings .theme-builder-grid,
  body.compact-inner-shell #page-settings .theme-color-grid {
    grid-template-columns: 1fr;
  }
  body.compact-inner-shell #page-new-booking .preset-bar {
    padding: 14px 16px;
  }
  body.compact-inner-shell #page-settings .theme-preset-chips {
    gap: 6px;
  }
  body.compact-inner-shell #page-new-booking .pay-table-wrap {
    overflow: visible;
  }
  body.compact-inner-shell #page-new-booking .pay-table {
    min-width: 0;
    border-spacing: 0 12px;
  }
  body.compact-inner-shell #page-new-booking .pay-table thead,
  body.compact-inner-shell #page-new-booking .pay-table tfoot {
    display: none;
  }
  body.compact-inner-shell #page-new-booking .pay-table tbody {
    display: grid;
    gap: 12px;
  }
  body.compact-inner-shell #page-new-booking .pay-table tbody tr {
    display: block;
    padding: 14px 14px 8px;
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    background: var(--paper);
    box-shadow: var(--card-shadow);
  }
  body.compact-inner-shell #page-new-booking .pay-table tbody tr::before {
    content: attr(data-payment-term);
    display: block;
    margin-bottom: 10px;
    color: var(--ink-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
  }
  body.compact-inner-shell #page-new-booking .pay-table td {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-soft);
    text-align: left;
  }
  body.compact-inner-shell #page-new-booking .pay-table td:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }
  body.compact-inner-shell #page-new-booking .pay-table td::before {
    content: attr(data-label);
    flex: 0 0 38%;
    max-width: 136px;
    color: var(--ink-muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.3px;
    text-transform: uppercase;
    line-height: 1.3;
    padding-top: 7px;
  }
  body.compact-inner-shell #page-new-booking .pay-table td:first-child {
    width: auto;
    min-width: 42px;
    padding: 0 10px;
    border-bottom: none;
    border-radius: 999px;
    background: var(--gold-bg);
    color: var(--gold-ink);
    font-weight: 700;
    justify-content: center;
    align-items: center;
    align-self: flex-start;
  }
  body.compact-inner-shell #page-new-booking .pay-table td:first-child::before {
    display: none;
  }
  body.compact-inner-shell #page-new-booking .pay-table td.terms-cell {
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
  }
  body.compact-inner-shell #page-new-booking .pay-table td.terms-cell::before {
    padding-top: 1px;
  }
  body.compact-inner-shell #page-new-booking .pay-table td .paid-cell {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: 100%;
  }
  body.compact-inner-shell #page-new-booking .pay-table td .paid-cell .fill-btn {
    align-self: flex-end;
  }
  body.compact-inner-shell #page-new-booking .pay-table td input,
  body.compact-inner-shell #page-new-booking .pay-table td select {
    width: 100%;
  }
  body.compact-inner-shell #page-new-booking .pay-table td[id^="s"] {
    min-height: 40px;
    justify-content: flex-start;
  }
  body.compact-inner-shell #page-new-booking .pay-table td[id^="s"]::before {
    padding-top: 0;
  }
  body.compact-inner-shell #page-new-booking .pay-summary-box {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 16px;
  }
}

@media (max-width: 1200px) {
  .editor-dashboard-grid {
    grid-template-columns: 1fr;
  }
  .editor-dashboard-sidebar {
    order: 2;
  }
  .editor-dashboard-main {
    order: 1;
  }
  .editor-dashboard-shell .editor-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .sidebar-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .sidebar {
    transform: translateX(-100%);
    width: min(84vw, 320px);
    z-index: 260;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open {
    opacity: 1;
    pointer-events: auto;
    z-index: 250;
  }
  .main {
    margin-left: 0;
    position: relative;
    z-index: 1;
  }
  .dashboard-page { gap: 18px; }
  .dashboard-task-panel {
    margin: 18px 0 20px;
    padding: 18px 18px 16px;
  }
  .topbar {
    height: auto;
    min-height: 68px;
    padding: 14px 24px;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
    z-index: 120;
  }
  .topbar-title { font-size: 20px; }
  .topbar-search {
    width: 100%;
    max-width: none;
  }
  .topbar-utility-group {
    width: 100%;
    justify-content: flex-end;
  }
  .topbar-actions { flex-wrap: wrap; width: 100%; }
  .topbar-actions .btn { flex: 1 1 180px; justify-content: center; }
  .mobile-page-banner {
    display: block;
    margin: 12px 14px 0;
    padding: 10px 14px;
    font-size: 17px;
  }
  body.compact-mobile-shell .topbar-search,
  body.compact-mobile-shell .topbar-utility-group {
    display: none;
  }
  body.compact-mobile-shell .topbar {
    min-height: 58px;
    align-items: center;
  }
  body.compact-mobile-shell .topbar-title-row {
    width: 100%;
  }
  body.compact-mobile-shell .topbar-title {
    font-size: 19px;
  }
  body.compact-mobile-shell .contract-logo-grid {
    grid-template-columns: 1fr;
  }
  body.compact-mobile-shell .main {
    height: 100dvh;
    overflow: hidden;
  }
  body.compact-mobile-shell .page {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 24px;
  }
  body.compact-mobile-shell #page-new-booking #booking-mode-header {
    padding: 14px 14px 12px !important;
  }
  body.compact-mobile-shell #page-new-booking #booking-mode-header > div {
    gap: 10px;
    flex-direction: column;
    align-items: flex-start;
  }
  body.compact-mobile-shell #page-new-booking > div:nth-of-type(2) {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px;
  }
  body.compact-mobile-shell #page-new-booking > div:nth-of-type(2) > div:first-child {
    width: 100%;
  }
  body.compact-mobile-shell #page-new-booking .grid.g2,
  body.compact-mobile-shell #page-new-booking .grid.g3,
  body.compact-mobile-shell #page-new-booking .grid.g4,
  body.compact-mobile-shell #page-new-booking .g-couple,
  body.compact-mobile-shell #page-settings .grid.g2,
  body.compact-mobile-shell #page-settings .theme-builder-grid,
  body.compact-mobile-shell #page-settings .theme-color-grid {
    grid-template-columns: 1fr;
  }
.booking-search-popout {
    left: 12px;
    width: calc(100vw - 24px);
    top: 126px;
    max-height: calc(100vh - 142px);
  }
  .page { padding: 24px; }
  .g3, .g4 { grid-template-columns: 1fr 1fr; }
  .dashboard-pipeline,
  .pkg-columns,
  .pkg-modal-cats,
  .manage-grid,
  .calc-layout { grid-template-columns: 1fr; }
  .editor-dashboard-grid {
    grid-template-columns: 1fr;
  }
  .editor-dashboard-sidebar {
    order: 2;
  }
  .editor-dashboard-main {
    order: 1;
  }
  .editor-dashboard-shell .editor-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .theme-color-grid { grid-template-columns: 1fr; }
  .theme-preview-body { grid-template-columns: 1fr; }
  .pkg-col.left,
  .pkg-modal-cat:first-child { border-right: none; border-bottom: 1px solid var(--border-soft); }
  .pkg-modal-cat.full-width { border-top: none; }
  .pay-summary-box { grid-template-columns: 1fr; }
  .form-actions { flex-wrap: wrap; }
  .form-actions .btn { flex: 1 1 180px; justify-content: center; }
  .calc-items-panel,
  .contract-sidebar-panel { position: static; top: auto; }
  .calc-actions { flex-wrap: wrap; }
  .calc-actions .btn { flex: 1 1 180px; justify-content: center; }
  .manage-grid-3 { grid-template-columns: 1fr; }
  .manage-grid-3 > .card[style*="grid-column: span 2"] { grid-column: auto; }
  #page-manage .manage-header {
    flex-direction: column;
    align-items: stretch;
  }
  #page-manage .manage-header > div:last-child {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
  }
  #page-manage .manage-header > div:last-child .btn {
    flex: 1 1 180px;
    justify-content: center;
  }
  #page-manage .manage-backup-bar {
    width: 100%;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
  }
  #page-manage .manage-backup-bar .lbl {
    width: 100%;
    margin-left: 0 !important;
  }
  #page-manage .manage-backup-bar .btn {
    flex: 1 1 160px;
    justify-content: center;
  }
  #page-manage .manage-booking-combobox,
  #page-manage .manage-booking-combobox input[type="text"] {
    width: 100%;
  }
  #page-manage .card-header {
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-start;
  }
  #page-manage .card-header .btn {
    flex: 1 1 160px;
    justify-content: center;
  }
  #page-manage .grid.g2,
  #page-manage .grid.g3,
  #page-manage .grid.g4,
  #page-manage .grid.g-couple {
    grid-template-columns: 1fr;
  }
  #page-manage #bc-editor-bar {
    flex-direction: column;
    align-items: stretch;
  }
  #page-manage #bc-editor-bar > div {
    width: 100%;
    justify-content: flex-start;
  }
  #page-manage #bc-editor-bar .btn {
    flex: 1 1 160px;
    justify-content: center;
  }
  .cal-header { flex-wrap: wrap; gap: 12px; }
  .cal-controls {
    width: 100%;
    justify-content: flex-start;
  }
  .cal-view-switch {
    width: 100%;
    justify-content: stretch;
  }
  .cal-view-btn {
    flex: 1 1 0;
  }
  .cal-nav {
    width: 100%;
  }
  .cal-nav button {
    flex: 1 1 0;
  }
  .search-row input { max-width: none; }
  .cal-year-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .page { padding: 18px; }
  .dashboard-task-panel {
    margin: 14px 0 18px;
    padding: 14px 14px 12px;
    border-radius: 16px;
  }
  .topbar { padding: 12px 14px; }
  .topbar-title { font-size: 18px; }
  .topbar-title-row { width: 100%; }
  .topbar-search {
    order: 2;
    width: 100%;
  }
  .topbar-utility-group {
    order: 3;
    width: 100%;
    justify-content: space-between;
  }
  .topbar-user-chip {
    width: 100%;
    justify-content: space-between;
  }
  body[data-active-page="dashboard"] .topbar-search,
  body[data-active-page="dashboard"] .topbar-utility-group {
    display: none;
  }
  body[data-active-page="dashboard"] .topbar {
    min-height: 56px;
    padding-top: 10px;
    padding-bottom: 10px;
    align-items: center;
  }
  body[data-active-page="dashboard"] .topbar-title-row {
    width: 100%;
  }
  body.compact-mobile-shell .topbar-search,
  body.compact-mobile-shell .topbar-utility-group {
    display: none;
  }
  body.compact-mobile-shell .topbar {
    min-height: 56px;
    padding-top: 10px;
    padding-bottom: 10px;
  }
  body.compact-mobile-shell .main {
    height: 100dvh;
    overflow: hidden;
  }
  body.compact-mobile-shell .page {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 24px;
  }
  .mobile-page-banner {
    margin: 10px 14px 0;
    padding: 10px 14px;
    font-size: 16px;
  }
  .booking-search-popout {
    top: 132px;
    max-height: calc(100vh - 150px);
    border-radius: 16px;
  }
  .topbar-actions .btn,
  .form-actions .btn,
  .calc-actions .btn { width: 100%; flex-basis: 100%; }
  .btn { white-space: normal; }
  .g2, .g3, .g4, .g-couple { grid-template-columns: 1fr; }
  .stats-grid,
  .stats-grid--dashboard { grid-template-columns: 1fr; }
  .card {
    margin-bottom: 18px;
    border-radius: 16px;
  }
  .card-header {
    padding: 14px 16px;
    font-size: 10px;
    letter-spacing: 1.5px;
  }
  .editor-dashboard-welcome {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 16px;
  }
  .editor-dashboard-grid {
    gap: 14px;
  }
  .editor-dashboard-main .mbp-surface-body {
    padding: 14px !important;
  }
  .editor-dashboard-shell .editor-stats-grid {
    grid-template-columns: 1fr;
  }
  .editor-dashboard-notifications {
    max-height: none !important;
    overflow-y: visible !important;
  }
  .editor-task-dashboard .task-workspace-intro {
    padding: 14px 14px 12px;
  }
  .editor-task-dashboard .mbp-stat-grid {
    grid-template-columns: 1fr;
  }
  .editor-task-dashboard .task-filter-bar {
    flex-direction: column;
    gap: 6px;
  }
  .editor-task-dashboard .task-filter-btn {
    text-align: left;
    padding: 10px 12px;
  }
  .editor-task-dashboard .mbp-section-heading {
    flex-direction: column;
    align-items: flex-start;
  }
  .editor-task-dashboard .mbp-section-link {
    white-space: normal;
  }
  .editor-task-dashboard .task-card-shell {
    padding: 12px 12px 13px;
  }
  .editor-task-dashboard .task-card-top {
    flex-direction: column;
    align-items: stretch;
  }
  .editor-task-dashboard .task-card-open {
    align-self: flex-start;
  }
  .editor-task-dashboard .task-card-main {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .editor-task-dashboard .task-card-footer {
    align-items: flex-start;
  }
  .editor-task-dashboard .task-card-actions {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }
  .editor-task-dashboard .task-card-actions button,
  .editor-task-dashboard .task-card-actions .btn {
    flex: 1 1 160px;
    justify-content: center;
  }
  .editor-task-dashboard .mbp-notification-row {
    padding: 11px 14px;
  }
  .editor-task-dashboard .mbp-section-title {
    font-size: 14px;
  }
  #page-manage .manage-backup-bar {
    flex-direction: column;
    align-items: stretch;
  }
  #page-manage .manage-backup-bar .btn {
    width: 100%;
    flex: 1 1 auto;
  }
  #page-manage .manage-header {
    gap: 10px;
  }
  #page-manage .manage-header > div:last-child .btn {
    flex: 1 1 100%;
  }
  #page-manage .manage-booking-combobox::after {
    top: 16px;
  }
  #page-manage .manage-booking-results {
    max-height: 220px;
  }
  #page-manage .todo-item,
  #page-manage .shooter-card,
  #page-manage .file-loc-item,
  #page-manage .manage-calc-line {
    flex-wrap: wrap;
  }
  #page-manage .todo-check,
  #page-manage .shooter-remove {
    align-self: flex-start;
  }
  #page-manage .manage-calc-rate input {
    width: 100%;
  }
  #page-manage .manage-calc-qty,
  #page-manage .manage-calc-sub {
    width: 100%;
  }
  #page-manage .manage-calc-sub {
    text-align: left;
    min-width: 0;
  }
  #page-manage .manage-calc-summary {
    gap: 0;
  }
  #page-manage .manage-calc-total {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  #page-manage .manage-calc-total-val {
    font-size: 18px;
  }
  .card-body {
    padding: 18px 16px;
  }
  .search-row > * { width: 100%; }
  .records-count { margin-left: 0; }
  .sig-grid { grid-template-columns: 1fr; gap: 24px; }
  .modal { width: calc(100% - 20px); padding: 24px 18px; max-height: 88vh; }
  .pay-table-wrap { overflow-x: auto; }
  .pay-table { min-width: 860px; }
  .rec-table { min-width: 860px; }
  .cal-grid { min-width: 0; }
  .cal-view-switch { width: 100%; justify-content: stretch; }
  .cal-view-btn { flex: 1 1 0; }
  .cal-wrap { overflow-x: visible; }
  .cal-header {
    padding: 14px 16px;
    align-items: flex-start;
  }
  .cal-title {
    font-size: 16px;
  }
  .cal-controls {
    gap: 10px;
  }
  .cal-legend { padding: 12px 16px; }
  .cal-cell {
    min-height: 72px;
    padding: 6px;
  }
  .cal-day {
    width: 22px;
    height: 22px;
    font-size: 12px;
  }
  .cal-event {
    font-size: 9px;
    padding: 2px 5px;
    white-space: normal;
    line-height: 1.25;
  }
  .cal-year-grid {
    min-width: 0;
    padding: 14px;
    gap: 12px;
  }
  .cal-year-card { min-width: 0; }
  .cal-mini-grid { padding: 10px; gap: 3px; }
  .cal-mini-day {
    min-height: 30px;
    font-size: 10px;
  }
  body.compact-mobile-shell #page-new-booking .pay-table-wrap {
    overflow: visible;
  }
  body.compact-mobile-shell #page-new-booking .pay-table {
    min-width: 0;
    border-spacing: 0 12px;
  }
  body.compact-mobile-shell #page-new-booking .pay-table thead,
  body.compact-mobile-shell #page-new-booking .pay-table tfoot {
    display: none;
  }
  body.compact-mobile-shell #page-new-booking .pay-table tbody {
    display: grid;
    gap: 12px;
  }
  body.compact-mobile-shell #page-new-booking .pay-table tbody tr {
    display: block;
    padding: 14px 14px 8px;
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    background: var(--paper);
    box-shadow: var(--card-shadow);
  }
  body.compact-mobile-shell #page-new-booking .pay-table tbody tr::before {
    content: attr(data-payment-term);
    display: block;
    margin-bottom: 10px;
    color: var(--ink-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
  }
  body.compact-mobile-shell #page-new-booking .pay-table td {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-soft);
    text-align: left;
  }
  body.compact-mobile-shell #page-new-booking .pay-table td:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }
  body.compact-mobile-shell #page-new-booking .pay-table td::before {
    content: attr(data-label);
    flex: 0 0 38%;
    max-width: 136px;
    color: var(--ink-muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.3px;
    text-transform: uppercase;
    line-height: 1.3;
    padding-top: 7px;
  }
  body.compact-mobile-shell #page-new-booking .pay-table td:first-child {
    width: auto;
    min-width: 42px;
    padding: 0 10px;
    border-bottom: none;
    border-radius: 999px;
    background: var(--gold-bg);
    color: var(--gold-ink);
    font-weight: 700;
    justify-content: center;
    align-items: center;
    align-self: flex-start;
  }
  body.compact-mobile-shell #page-new-booking .pay-table td:first-child::before {
    display: none;
  }
  body.compact-mobile-shell #page-new-booking .pay-table td.terms-cell {
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
  }
  body.compact-mobile-shell #page-new-booking .pay-table td.terms-cell::before {
    padding-top: 1px;
  }
  body.compact-mobile-shell #page-new-booking .pay-table td .paid-cell {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: 100%;
  }
  body.compact-mobile-shell #page-new-booking .pay-table td .paid-cell .fill-btn {
    align-self: flex-end;
  }
  body.compact-mobile-shell #page-new-booking .pay-table td input,
  body.compact-mobile-shell #page-new-booking .pay-table td select {
    width: 100%;
  }
  body.compact-mobile-shell #page-new-booking .pay-table td[id^="s"] {
    min-height: 40px;
    justify-content: flex-start;
  }
  body.compact-mobile-shell #page-new-booking .pay-table td[id^="s"]::before {
    padding-top: 0;
  }
  body.compact-mobile-shell #page-new-booking .pay-summary-box {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 16px;
  }
  body.compact-mobile-shell #page-records #table-container {
    overflow: visible;
  }
  body.compact-mobile-shell #page-records .rec-table {
    min-width: 0;
    border-spacing: 0 12px;
  }
  body.compact-mobile-shell #page-records .rec-table thead {
    display: none;
  }
  body.compact-mobile-shell #page-records .rec-table tbody {
    display: grid;
    gap: 12px;
  }
  body.compact-mobile-shell #page-records .rec-table tbody tr {
    display: block;
    padding: 14px 14px 10px;
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    background: var(--paper);
    box-shadow: var(--card-shadow);
  }
  body.compact-mobile-shell #page-records .rec-table tbody td {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-soft);
    text-align: left;
  }
  body.compact-mobile-shell #page-records .rec-table tbody td:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }
  body.compact-mobile-shell #page-records .rec-table tbody td::before {
    content: attr(data-label);
    flex: 0 0 34%;
    max-width: 132px;
    color: var(--ink-muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    line-height: 1.3;
    padding-top: 6px;
  }
  body.compact-mobile-shell #page-records .rec-table tbody td[data-label="Booking ID"] {
    border-bottom: none;
    padding: 0 10px;
    width: auto;
    min-width: 0;
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--ink-muted);
    justify-content: center;
    align-items: center;
    align-self: flex-start;
  }
  body.compact-mobile-shell #page-records .rec-table tbody td[data-label="Booking ID"]::before {
    display: none;
  }
  body.compact-mobile-shell #page-records .rec-table tbody td[data-label="Couple"] {
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
  }
  body.compact-mobile-shell #page-records .rec-table tbody td[data-label="Actions"] > div {
    width: 100%;
  }
  body.compact-mobile-shell #page-records .rec-table tbody td[data-label="Actions"] .btn {
    flex: 1 1 100%;
    justify-content: center;
  }
  body.compact-mobile-shell #page-records .rec-table tbody td[data-label="Payment"] .badge {
    white-space: normal;
    text-align: left;
  }
  .pkg-tab-bar { width: 100%; }
  .pkg-tab-btn { flex: 1 1 0; text-align: center; }
  .event-row { align-items: flex-start; }
  .event-days { text-align: left; white-space: normal; }
  .manage-header { padding: 18px 20px; }
  .manage-couple { font-size: 20px; }
  .calc-line,
  .manage-calc-line { flex-wrap: wrap; }
  .calc-deduction-row,
  .manage-calc-deduction-row {
    grid-template-columns: 1fr 1fr;
  }
  .calc-deduction-amount,
  .manage-calc-deduction-amount,
  .calc-deduction-remove,
  .manage-calc-deduction-remove {
    justify-self: start;
  }
  .calc-line-subtotal,
  .manage-calc-sub { min-width: 0; width: 100%; text-align: left; }
  body.compact-mobile-shell #page-new-booking .pay-table-wrap { overflow: visible; }
  body.compact-mobile-shell #page-new-booking .pay-table { min-width: 0; }
  body.compact-mobile-shell #page-records .rec-table-wrap { overflow: visible; }
}
/* ── UTILITY CLASSES (replace repeated inline styles) ── */
/* Used for section labels throughout Manage / Contract pages */
.u-section-label {
  font-size: 10px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--salmon);
  margin-bottom: 10px; padding-bottom: 4px;
  border-bottom: 1px solid var(--border-soft);
}
/* Used for smaller muted uppercase labels */
.u-label-muted {
  font-size: 10px; font-weight: 600; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--ink-muted);
}
/* Used for signature / small uppercase labels */
.u-sig-label {
  font-size: 10px; font-weight: 600; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--ink-muted);
  margin-top: 5px;
}

/* ══ AUDIT TRAIL TIMELINE ════════════════════════════════════════════════════ */
.audit-timeline { padding: 8px 0; }

.audit-date-group {
  margin: 0 16px 16px;
  padding: 14px 0 6px;
  border-top: 1px solid var(--border-soft);
}

.audit-date-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--salmon);
  padding: 0 0 10px;
  margin-bottom: 12px;
}

.audit-entry {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  position: relative;
  margin-bottom: 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--paper);
  box-shadow: 0 8px 16px rgba(25,42,79,0.04);
}
.audit-entry:hover { background: var(--surface-soft); }

.audit-entry-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ink-muted);
  margin-top: 5px;
  flex-shrink: 0;
  border: 2px solid var(--paper);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--paper) 82%, transparent);
}

.audit-entry-body { flex: 1; min-width: 0; }

.audit-entry-action {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.3;
}

.audit-entry-detail {
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 2px;
  line-height: 1.4;
}

.audit-entry-meta {
  font-size: 11px;
  color: var(--ink-muted);
  margin-top: 3px;
}

.audit-action-badge {
  display: inline-block; font-size: 10px; font-weight: 600;
  letter-spacing: 0.6px; text-transform: uppercase;
  padding: 2px 7px; border-radius: 4px;
  background: var(--border-soft); color: var(--ink-soft);
}
.audit-action-badge.create  { background: var(--green-bg);   color: var(--green); }
.audit-action-badge.update  { background: var(--salmon-bg);  color: var(--salmon); }
.audit-action-badge.delete  { background: var(--status-unpaid-bg);  color: var(--red-soft); }
.audit-action-badge.sign    { background: var(--green-bg);   color: var(--green); }
.audit-action-badge.login   { background: var(--gold-bg);    color: var(--gold); }

/* ── Admin Audit Log page ────────────────────────────────────────────────── */
.audit-log-filter-bar {
  display: flex; gap: 10px; flex-wrap: wrap;
  align-items: center; margin-bottom: 20px;
}
.audit-log-filter-bar input,
.audit-log-filter-bar select {
  height: 36px; border: 1px solid var(--border);
  border-radius: 6px; padding: 0 10px;
  font-size: 13px; background: var(--paper);
  color: var(--ink);
}
.audit-log-filter-bar input[type="text"] { flex: 1; min-width: 180px; }

.audit-log-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.audit-log-table th {
  text-align: left; padding: 10px 12px;
  font-size: 10px; font-weight: 700; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--ink-muted);
  border-bottom: 2px solid var(--border);
}
.audit-log-table td {
  padding: 10px 12px; border-bottom: 1px solid var(--border-soft);
  vertical-align: top;
}
.audit-log-table tr:last-child td { border-bottom: none; }
.audit-log-table tr:hover td { background: var(--salmon-bg); }

.audit-pagination {
  display: flex; gap: 6px; justify-content: center;
  align-items: center; margin-top: 16px; flex-wrap: wrap;
}
.audit-pagination button {
  padding: 5px 12px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--paper);
  font-size: 12.5px; cursor: pointer; color: var(--ink);
}
.audit-pagination button:hover { background: var(--salmon-bg); border-color: var(--salmon); }
.audit-pagination button.active { background: var(--salmon); color: #fff; border-color: var(--salmon); }
.audit-pagination button:disabled { opacity: 0.4; cursor: not-allowed; }
