:root {
  --black: #0b0b0d;
  --near-black: #111114;
  --charcoal: #1c1c20;
  --graphite: #3a3a40;
  --line: #e5e3de;
  --paper: #ffffff;
  --paper-soft: #f6f5f2;
  --ink: #17171a;
  --ink-soft: #5c5b63;
  --gold: #b7a276;   /* champagne beige (v2.15.0) */
  --gold-soft: #e3d7bc;
  --gold-tint: #f6f2e8;
  --success: #3c7d55;
  --danger: #a4423a;
  --info: #3b6ea5;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(20,20,20,0.06), 0 8px 24px rgba(20,20,20,0.06);
  font-size: 15px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--paper-soft);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

#app {
  display: flex;
  min-height: 100vh;
}

/* ---------- Sidebar ---------- */
.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--black);
  color: #f2f1ec;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-brand {
  padding: 22px 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.brand-logo {
  width: 100%;
  max-width: 180px;
  display: block;
  margin: 0 auto;
}

.brand-sub {
  text-align: center;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-top: 8px;
}

.sidebar-nav {
  flex: 1;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  /* With this many tabs the list can outgrow the screen — scroll inside the
     nav so every item (right down to Settings) is always reachable. */
  overflow-y: auto;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.25) transparent;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: #c9c8c2;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.sidebar-nav a .nav-icon {
  font-size: 6px;
  color: var(--graphite);
}

.sidebar-nav a:hover {
  background: rgba(255,255,255,0.06);
  color: #fff;
}

.sidebar-nav a.active {
  background: rgba(179,144,63,0.16);
  color: #fff;
}

.sidebar-nav a.active .nav-icon {
  color: var(--gold);
}

.sidebar-footer {
  padding: 14px 18px 18px;
  font-size: 10.5px;
  color: #6f6e68;
  border-top: 1px solid rgba(255,255,255,0.08);
}

/* ---------- Main column ---------- */
.main-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 64px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar-title {
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.topbar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.content {
  flex: 1;
  padding: 26px 28px 60px;
  max-width: 1320px;
  width: 100%;
  margin: 0 auto;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, opacity 0.12s ease;
  white-space: nowrap;
}

.btn-primary { background: var(--black); color: #fff; }
.btn-primary:hover { background: var(--near-black); }

.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { opacity: 0.9; }

.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--paper-soft); }

.btn-danger { background: transparent; color: var(--danger); border-color: #e7c9c6; }
.btn-danger:hover { background: #fbf1f0; }

.btn-sm { padding: 6px 11px; font-size: 12.5px; border-radius: 6px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- Cards / layout ---------- */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.card + .card { margin-top: 16px; }

.grid {
  display: grid;
  gap: 16px;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1000px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

.stat-tile {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.stat-tile .stat-label {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  font-weight: 600;
}
.stat-tile .stat-value {
  font-size: 26px;
  font-weight: 700;
  margin-top: 6px;
  letter-spacing: -0.01em;
}
.stat-tile .stat-sub {
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 4px;
}

.section-title {
  font-size: 14.5px;
  font-weight: 700;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}

.muted { color: var(--ink-soft); }
.small { font-size: 12.5px; }

/* ---------- Tables ---------- */
table.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
table.table th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  font-weight: 700;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}
table.table td {
  padding: 11px 10px;
  border-bottom: 1px solid #f0efe9;
  vertical-align: middle;
}
table.table tr:last-child td { border-bottom: none; }
table.table tr.clickable { cursor: pointer; }
table.table tr.clickable:hover { background: var(--paper-soft); }

/* ---------- Forms ---------- */
label.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 12px;
}
input, select, textarea {
  font-family: inherit;
  font-size: 13.5px;
  padding: 9px 11px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-tint);
}
textarea { resize: vertical; min-height: 70px; }
.field-row { display: flex; gap: 12px; }
.field-row > label.field { flex: 1; }

/* ---------- Badges / tags ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.tag-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  margin: 0 5px 5px 0;
}

/* ---------- Kanban ---------- */
.kanban {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 12px;
}
.kanban-col {
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-width: 250px;
  max-width: 250px;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 190px);
}
.kanban-col-header {
  padding: 12px 14px 10px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.kanban-col-body {
  padding: 10px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.kanban-col-body.drag-over { background: var(--gold-tint); }
.job-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 11px 12px;
  cursor: grab;
  box-shadow: var(--shadow);
}
.job-card:active { cursor: grabbing; }
.job-card .job-card-title { font-weight: 700; font-size: 13px; margin-bottom: 3px; }
.job-card .job-card-meta { font-size: 11.5px; color: var(--ink-soft); }
.job-card .job-card-price { font-weight: 700; font-size: 13px; margin-top: 6px; color: var(--gold); }
.job-card .job-card-emp {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; font-size: 11px; color: var(--ink-soft);
}
.emp-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(11,11,13,0.55);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 40px 20px; overflow-y: auto; z-index: 100;
}
.modal {
  background: var(--paper); border-radius: 14px; width: 100%; max-width: 620px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.modal.modal-wide { max-width: 880px; }
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 22px; border-bottom: 1px solid var(--line);
}
.modal-header h3 { margin: 0; font-size: 16px; }
.modal-close { cursor: pointer; font-size: 20px; color: var(--ink-soft); background: none; border: none; }
.modal-body { padding: 20px 22px; max-height: 70vh; overflow-y: auto; }
.modal-footer {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 16px 22px; border-top: 1px solid var(--line);
}

/* ---------- Toast ---------- */
#toast-root { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 200; }
.toast {
  background: var(--black); color: #fff; padding: 11px 16px; border-radius: 8px;
  font-size: 13px; box-shadow: var(--shadow); max-width: 320px;
}
.toast.error { background: var(--danger); }
.toast.success { background: var(--success); }

/* ---------- Misc ---------- */
.empty-state {
  padding: 50px 20px; text-align: center; color: var(--ink-soft);
}
.search-bar {
  display: flex; gap: 10px; margin-bottom: 16px; align-items: center; flex-wrap: wrap;
}
.search-bar input[type="text"] { min-width: 240px; }
.pill-filter {
  display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line); font-size: 12px; font-weight: 600; cursor: pointer; color: var(--ink-soft);
}
.pill-filter.active { background: var(--black); color: #fff; border-color: var(--black); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tab {
  padding: 9px 14px; font-size: 13px; font-weight: 600; color: var(--ink-soft); cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab.active { color: var(--ink); border-bottom-color: var(--gold); }

.checklist-item { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 13px; }
.checklist-item input { width: auto; }

.timeline-item {
  padding: 12px 0; border-bottom: 1px solid #f0efe9; display: flex; justify-content: space-between; gap: 10px;
}
.timeline-item:last-child { border-bottom: none; }

.customer-card-list { display: flex; flex-direction: column; gap: 10px; }

.link-btn { background: none; border: none; color: var(--gold); font-weight: 600; font-size: 12.5px; cursor: pointer; padding: 0; }

.week-grid {
  display: grid; grid-template-columns: 70px repeat(7, 1fr); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--paper);
}
.week-grid .wg-head { padding: 10px 8px; text-align: center; font-size: 11.5px; font-weight: 700; background: var(--paper-soft); border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); }
.week-grid .wg-head:first-child { border-left: none; }
.week-grid .wg-time { padding: 6px 8px; font-size: 11px; color: var(--ink-soft); border-top: 1px solid #f0efe9; text-align: right; }
.week-grid .wg-cell { border-top: 1px solid #f0efe9; border-left: 1px solid var(--line); min-height: 46px; padding: 3px; position: relative; }
.week-grid .wg-cell:first-child { border-left: none; }
.wg-event {
  background: var(--gold-tint); border-left: 3px solid var(--gold); border-radius: 4px; padding: 3px 6px; font-size: 10.5px; margin-bottom: 2px; cursor: pointer;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.svg-chart text { font-family: inherit; }

/* ---------- Schedule drag & drop ---------- */
.draggable-event { cursor: grab; }
.draggable-event:active { cursor: grabbing; }
.drag-handle {
  display: inline-flex;
  padding: 2px 6px;
  color: var(--ink-soft);
  font-size: 13px;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  border-radius: 4px;
}
.drag-handle:active { background: var(--gold-tint); }
.day-card.drag-over {
  outline: 2px solid var(--gold);
  outline-offset: -2px;
  background: var(--gold-tint) !important;
}
.drag-source { opacity: 0.4; }
.card.drag-over { outline: 2px solid var(--gold); outline-offset: -2px; }
.job-done { position: relative; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(192,57,43,0.35); }
  70% { box-shadow: 0 0 0 8px rgba(192,57,43,0); }
  100% { box-shadow: 0 0 0 0 rgba(192,57,43,0); }
}
.drag-ghost {
  position: fixed;
  z-index: 300;
  pointer-events: none;
  opacity: 0.92;
  box-shadow: 0 12px 30px rgba(0,0,0,0.3);
  background: var(--paper);
  border-radius: 6px;
}

/* Personal / blocked-time events: dark block, clearly not a customer job */
.wg-event.personal-event {
  background: var(--charcoal);
  color: #e8e7e2;
  border-left: 3px solid var(--gold);
  cursor: pointer;
}
.wg-event.personal-event .pe-meta { color: #b9b8b1; font-size: 10px; }

/* ---------- Staff tasks ---------- */
.task-list { display: flex; flex-direction: column; }
.task-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 4px;
  border-bottom: 1px solid #f0efe9;
}
.task-row:last-child { border-bottom: none; }
.task-check {
  width: 20px; height: 20px;
  margin-top: 2px;
  accent-color: var(--gold);
  cursor: pointer;
  flex-shrink: 0;
}
.task-main { flex: 1; min-width: 0; cursor: pointer; }
.task-title { font-weight: 600; font-size: 14px; }
.task-done .task-title { text-decoration: line-through; color: var(--ink-soft); font-weight: 500; }
.task-meta {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  margin-top: 4px; font-size: 12px; color: var(--ink-soft);
}
.task-meta-item { display: inline-flex; align-items: center; gap: 5px; }

.schedule-week { grid-template-columns: repeat(7, 1fr); }

/* ---------- Login screen ---------- */
#login-screen {
  position: fixed; inset: 0; z-index: 500;
  background: var(--black);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.login-box {
  width: 100%; max-width: 360px; text-align: center;
  display: flex; flex-direction: column; gap: 12px;
}
.login-logo { width: 220px; margin: 0 auto 4px; }
.login-sub {
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold-soft); margin-bottom: 18px;
}
#login-screen input {
  background: var(--near-black); border-color: var(--graphite);
  color: #fff; text-align: center; font-size: 16px; padding: 12px;
}
#login-screen input:focus { border-color: var(--gold); box-shadow: none; }
.login-error { color: #e08a82; font-size: 13px; min-height: 18px; }
.login-hint { color: #8b8a84; font-size: 12px; }

/* ---------- Mobile nav (hidden on desktop) ---------- */
.mobile-nav { display: none; }
.mobile-more-sheet { display: none; }

/* ---------- Mobile / iPhone layout ---------- */
@media (max-width: 820px) {
  .sidebar { display: none; }

  #app { min-height: 100dvh; }

  .topbar {
    padding: 0 16px;
    padding-top: env(safe-area-inset-top);
    height: calc(56px + env(safe-area-inset-top));
    background: var(--black);
    color: #f2f1ec;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  .topbar-title { font-size: 17px; }

  .content {
    padding: 16px 14px calc(92px + env(safe-area-inset-bottom));
  }

  /* Bottom tab bar */
  .mobile-nav {
    display: flex;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 90;
    background: var(--black);
    border-top: 1px solid rgba(255,255,255,0.12);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .mobile-nav a, .mobile-nav button {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 6px 2px;
    font-size: 10.5px;
    font-weight: 600;
    color: #c9c8c2;
    background: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
  }
  .mobile-nav .mnav-icon { font-size: 13px; color: var(--graphite); }
  .mobile-nav a.active, .mobile-nav button.active { color: #fff; }
  .mobile-nav a.active .mnav-icon, .mobile-nav button.active .mnav-icon { color: var(--gold); }

  .mobile-more-sheet {
    display: flex;
    flex-direction: column;
    position: fixed;
    right: 10px;
    bottom: calc(70px + env(safe-area-inset-bottom));
    z-index: 95;
    background: var(--near-black);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0,0,0,0.45);
    min-width: 180px;
  }
  .mobile-more-sheet[hidden] { display: none; }
  .mobile-more-sheet a {
    padding: 14px 18px;
    color: #e8e7e2;
    font-size: 14px;
    font-weight: 600;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .mobile-more-sheet a:last-child { border-bottom: none; }
  .mobile-more-sheet a.active { color: var(--gold-soft); }

  /* Bigger touch targets */
  .btn { padding: 11px 16px; }
  input, select, textarea { font-size: 16px; } /* prevents iOS zoom-on-focus */

  /* Stat grids stack 2-up */
  .grid-4, .grid-3, .grid-2 { grid-template-columns: repeat(2, 1fr); }

  /* Wide tables scroll sideways inside cards */
  .card { overflow-x: auto; }
  table.table { min-width: 560px; }

  /* Week calendar becomes a vertical day list on phones */
  .schedule-week { grid-template-columns: 1fr !important; }
  .week-grid { min-width: 760px; }
  .week-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* Kanban columns a bit narrower */
  .kanban-col { min-width: 230px; max-width: 230px; max-height: calc(100dvh - 240px); }

  /* Modals go full screen */
  .modal-overlay { padding: 0; align-items: stretch; }
  .modal, .modal.modal-wide {
    max-width: none;
    min-height: 100dvh;
    border-radius: 0;
    display: flex;
    flex-direction: column;
  }
  .modal-header { padding-top: calc(18px + env(safe-area-inset-top)); }
  .modal-body { flex: 1; max-height: none; }
  .modal-footer { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }

  .field-row { flex-direction: column; gap: 0; }

  #toast-root { left: 14px; right: 14px; bottom: calc(78px + env(safe-area-inset-bottom)); }
  .toast { max-width: none; }

  .search-bar input[type="text"] { min-width: 0; flex: 1; }

  /* Tab rows scroll sideways instead of wrapping/overlapping */
  .tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { white-space: nowrap; flex-shrink: 0; }
}

/* ---------- Schedule navigation bar (v2.9.6) ---------- */
/* Sits above the calendar. Desktop: one compact row. Phone: full-width
   stacked controls with big touch targets so Weekly <-> Daily (Bays) and
   day-to-day moves are easy with a thumb. */
.sched-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.sched-nav .seg-toggle {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.sched-nav .seg-toggle .btn { border-radius: 0; border: none; padding: 9px 16px; }
.sched-nav .nav-row { display: inline-flex; gap: 6px; align-items: center; }
.sched-nav .nav-row .btn { padding: 9px 14px; }
.sched-nav .nav-label { font-weight: 700; min-width: 130px; }
.sched-nav .nav-actions { margin-left: auto; }

@media (max-width: 820px) {
  .sched-nav {
    position: sticky;
    top: 0;
    z-index: 40;
    background: var(--paper-soft);
    padding: 8px 0 10px;
    margin: -6px 0 10px;
    gap: 8px;
  }
  .sched-nav .seg-toggle { width: 100%; display: flex; }
  .sched-nav .seg-toggle .btn {
    flex: 1;
    min-height: 46px;
    font-size: 15px;
    font-weight: 700;
  }
  .sched-nav .nav-row { display: flex; width: 100%; }
  .sched-nav .nav-row .btn { flex: 1; min-height: 44px; font-size: 15px; }
  .sched-nav .nav-label { flex: 2.5; min-width: 0; }
  .sched-nav .nav-actions { margin-left: 0; }
  .sched-nav .nav-actions .btn { min-height: 46px; }
}

/* Client name on schedule cards (v2.10.4) — bold, boxed, spot-it-at-a-glance */
.client-name-box {
  display: inline-block;
  font-weight: 800;
  font-size: 13.5px;
  border: 1.5px solid var(--ink, #17171a);
  border-radius: 7px;
  padding: 2px 8px;
  margin: 3px 0;
  background: rgba(255,255,255,0.65);
  letter-spacing: .2px;
}

/* v2.11 — free-slot markers in Daily bays, mobile fit fixes */
.gap-slot {
  border: 1.5px dashed #cfc7ac;
  border-radius: 8px;
  color: #8a8579;
  text-align: center;
  padding: 6px 4px;
  margin-bottom: 8px;
  cursor: pointer;
  background: repeating-linear-gradient(45deg, transparent, transparent 8px, rgba(0,0,0,0.02) 8px, rgba(0,0,0,0.02) 16px);
}
.gap-slot:hover { border-color: var(--gold); color: var(--gold); }
/* Mobile: client box + modal buttons must never run off the screen */
.client-name-box { max-width: 100%; overflow-wrap: anywhere; white-space: normal; }
@media (max-width: 820px) {
  .modal-footer { flex-wrap: wrap; gap: 6px; }
  .modal-footer .btn { flex: 1 1 auto; min-width: 30%; }
}
