/* =====================================================================
   Health Consultancy — Diet & Nutrition Management System — styles
   V50: the V3 … V49.1 patch sections were merged into one set of rules
   (every selector once per screen size, overridden rules removed). The
   screens and the printed PDFs look exactly the same as in V49.1 (checked
   page by page, desktop and phone, and the diet / exercise / invoice PDFs).
   ===================================================================== */
@keyframes modalIn {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes notificationSlide {
  0% {
    transform: translateX(24px);
    opacity: 0.5;
  }
  to {
    transform: none;
    opacity: 1;
  }
}
@keyframes hcClientReturn {
  0%,
  35% {
    box-shadow:
      0 0 0 3px #f2a65a,
      0 6px 18px rgba(242, 166, 90, 0.35);
    background: #fff6ec;
  }
  to {
    box-shadow: none;
  }
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: "DM Sans", sans-serif;
  color: #1a1a1a;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
.app {
  display: grid;
  grid-template-columns: 245px 1fr;
  min-height: 100vh;
}
.sidebar {
  color: #fff;
  padding: 20px 15px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.brand,
.nav .nav-group-toggle {
  display: flex;
  align-items: center;
}
.brand {
  gap: 11px;
  padding-bottom: 16px;
  border-bottom: 1px solid #ffffff25;
}
.mini-logo {
  width: 48px;
  height: 48px;
  background: #fff;
  color: var(--navy);
  border-radius: 10px;
  display: grid;
  place-items: center;
  overflow: hidden;
  font-weight: 700;
}
.mini-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.brand h1 {
  font:
    700 18px "Playfair Display",
    serif;
  margin: 0;
}
.brand p {
  font-size: 11px;
  color: #d9e4f3;
  margin: 3px 0 0;
}
.nav {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}
.nav button {
  border: 0;
  background: 0 0;
  color: #e8eef8;
  text-align: left;
  padding: 11px 12px;
  border-radius: 8px;
  font-weight: 700;
}
.nav button.active,
.nav button:hover {
  background: #ffffff20;
}
.nav-group {
  min-width: 0;
}
.nav .nav-group-toggle {
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}
.nav .nav-group-toggle.has-active-page {
  background: #ffffff14;
  color: #fff;
}
.nav-chevron {
  display: inline-block;
  font-size: 24px;
  line-height: 1;
  transition: transform 0.15s ease;
}
.fu-history-collapse[open] summary::before,
.nav-group-toggle[aria-expanded="true"] .nav-chevron {
  transform: rotate(90deg);
}
.nav-submenu {
  display: grid;
  gap: 4px;
  margin: 5px 0 4px 18px;
  padding-left: 10px;
  border-left: 1px solid #ffffff35;
}
.nav-group[hidden],
.nav-submenu[hidden] {
  display: none !important;
}
.nav .nav-submenu button {
  width: 100%;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  padding: 9px 10px;
}
.nav .nav-submenu button.active {
  background: var(--peach);
  color: var(--navy);
  font-weight: 700;
}
.nav button:focus-visible {
  outline: 2px solid var(--peach);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  .nav-chevron {
    transition: none;
  }
}
.main {
  padding: 24px;
  min-width: 0;
}
.page {
  display: none;
}
.page.active {
  display: block;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}
.topbar h2 {
  font:
    700 29px "Playfair Display",
    serif;
  margin: 0;
}
.topbar p {
  margin: 5px 0 0;
  color: var(--muted);
}
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.btn,
.file-btn,
input,
select,
textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.btn,
.file-btn {
  color: var(--navy);
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
}
.btn.primary {
  color: #fff;
}
.file-btn.primary {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.btn.danger {
  color: var(--danger);
  border-color: #edc3bf;
  background: #fff8f7;
}
.btn.small {
  padding: 6px 8px;
  font-size: 11px;
}
.card {
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 17px;
}
.grid {
  display: grid;
  gap: 15px;
}
.form-grid,
.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.form-grid {
  display: grid;
  gap: 12px;
}
.field {
  display: grid;
  gap: 6px;
  align-content: start;
}
.field.full {
  grid-column: 1/-1;
}
label {
  font-size: 12px;
  font-weight: 700;
}
input,
select,
textarea {
  width: 100%;
  padding: 9px 10px;
  outline: 0;
}
textarea {
  min-height: 88px;
  resize: vertical;
}
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.section-title h3 {
  margin: 0;
  font-size: 17px;
}
.client-card p,
.empty,
.muted {
  color: var(--muted);
}
.empty {
  padding: 26px;
  text-align: center;
  border: 1px dashed var(--line);
  background: #fff;
  border-radius: 8px;
}
.search-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.search-row input {
  max-width: 460px;
  flex: 1;
}
.client-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.client-card,
.table-wrap {
  border: 1px solid var(--line);
}
.client-card {
  background: var(--cream);
  border-radius: 10px;
  padding: 15px;
  box-shadow: 0 7px 24px #001f5210;
}
.client-card h4 {
  font:
    700 17px "Playfair Display",
    serif;
  color: var(--navy);
  margin: 0 0 5px;
}
.client-card p {
  font-size: 12px;
  margin: 3px 0;
}
.client-card .row {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 11px;
}
.table-wrap {
  overflow: auto;
  border-radius: 8px;
  background: #fff;
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}
td,
th {
  padding: 10px 11px;
  border-bottom: 1px solid #efe6db;
  text-align: left;
  vertical-align: top;
}
th {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  background: #fff1e2;
  color: var(--navy);
}
td {
  font-size: 12px;
}
.invoice-payhist-table tr:last-child td,
.invoice-total div:last-child,
tr:last-child td {
  border-bottom: 0;
}
.tag {
  display: inline-flex;
  padding: 4px 7px;
  border-radius: 999px;
  background: #edf3ff;
  color: var(--navy);
  font-size: 10px;
  font-weight: 700;
}
.tag.success {
  background: #eaf7f0;
  color: var(--success);
}
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.55fr);
  gap: 15px;
}
.sticky {
  position: sticky;
  top: 15px;
  align-self: start;
}
.day-card,
.mode-note {
  border: 1px solid var(--line);
}
.mode-note {
  padding: 10px 11px;
  background: #fff1e2;
  border-radius: 8px;
  color: var(--navy);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 11px;
}
.day-card {
  border-radius: 9px;
  overflow: hidden;
  background: #fff;
  margin-bottom: 12px;
}
.day-head {
  background: var(--navy);
  color: #fff;
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  font:
    600 15px "Playfair Display",
    serif;
}
.day-body {
  padding: 11px;
}
.meal-row {
  display: grid;
  grid-template-columns: 170px 120px repeat(4, minmax(135px, 1fr)) auto;
  gap: 7px;
  align-items: start;
  border: 1px solid #eee5da;
  border-radius: 8px;
  padding: 8px;
  margin-bottom: 8px;
  background: #fffdfa;
}
.meal-row textarea {
  min-height: 60px;
}
.remove {
  width: 33px;
  height: 33px;
  padding: 0;
}
.food-list {
  max-height: 540px;
  overflow: auto;
  display: grid;
  gap: 8px;
}
.food-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  background: #fff;
}
.food-item strong {
  font-size: 12px;
  color: var(--navy);
}
.exercise-summary strong,
.food-item small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}
.macro {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  margin-top: 7px;
}
.macro span {
  font-size: 9px;
  padding: 4px;
  background: #f7f3ee;
  border-radius: 5px;
  text-align: center;
}
.file-list {
  display: grid;
  gap: 8px;
}
.exercise-summary > div,
.file-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}
.check-grid label,
.file-item {
  display: flex;
  align-items: center;
  background: #fff;
}
.file-item {
  justify-content: space-between;
  gap: 10px;
}
.logo-preview,
.signature-preview {
  width: 145px;
  height: 98px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #fff;
  color: var(--muted);
}
.logo-preview img,
.signature-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.notice,
.toast {
  border-radius: 8px;
}
.notice {
  padding: 11px 12px;
  background: #fff8ee;
  border: 1px solid #e8cda8;
  color: #74420a;
  font-size: 12px;
}
.toast {
  position: fixed;
  background: #111827;
  color: #fff;
  padding: 11px 14px;
  opacity: 0;
  transform: translateY(8px);
  transition: 0.2s;
}
.toast.show {
  opacity: 1;
  transform: none;
}
.dashboard-urgent {
  background: #fff5f3;
}
.dashboard-warning {
  background: #fffaf0;
}
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}
.status-active {
  background: #17a56b;
}
.status-finished {
  background: #d84b3f;
}
.status-upcoming {
  background: #d9931e;
}
.status-none {
  background: #9ca3af;
}
.print-sheet {
  display: none;
}
.check-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.check-grid label {
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--navy);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 9px;
}
.check-grid input {
  width: auto;
}
.grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.kpi-number {
  font-size: 27px;
  font-weight: 700;
  color: var(--navy);
  margin-top: 5px;
}
.client-photo {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--line);
}
.client-photo-placeholder,
.client-photo-preview {
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.client-photo-placeholder {
  width: 58px;
  height: 58px;
  background: #edf3ff;
  color: var(--navy);
  font-weight: 700;
}
.client-photo-preview {
  width: 72px;
  height: 72px;
  margin-top: 7px;
  border: 1px dashed var(--line);
  overflow: hidden;
  font-size: 10px;
  color: var(--muted);
  background: #fff;
}
.client-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.client-card-head {
  display: flex;
  gap: 11px;
  align-items: center;
}
.money-positive {
  color: var(--success);
  font-weight: 700;
}
.money-due,
.status-chip {
  color: var(--danger);
  font-weight: 700;
}
.status-chip {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 10px;
  background: #edf3ff;
  color: var(--navy);
}
.status-chip.active {
  background: #eaf7f0;
  color: var(--success);
}
.status-chip.inactive,
.status-chip.pending {
  background: #fff0ee;
  color: var(--danger);
}
.status-chip.partial {
  background: #fff7e8;
  color: #9a6700;
}
.exercise-builder-row {
  display: grid;
  grid-template-columns: minmax(170px, 1.3fr) 80px 80px 95px 80px 95px auto;
  gap: 7px;
  align-items: end;
  border: 1px solid #eee5da;
  background: #fffdfa;
  border-radius: 9px;
  padding: 9px;
  margin-bottom: 8px;
}
.exercise-builder-row .field {
  gap: 4px;
}
.exercise-builder-row label,
.invoice-service-row label {
  font-size: 10px;
}
.exercise-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.exercise-summary > div {
  background: #f7f3ee;
}
.exercise-summary strong {
  color: var(--navy);
  font-size: 18px;
}
.exercise-library-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.exercise-lib-card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px;
}
.exercise-lib-card h4 {
  margin: 0 0 4px;
  color: var(--navy);
}
.exercise-lib-card p {
  font-size: 11px;
  color: var(--muted);
  margin: 3px 0;
}
.invoice-print {
  font-family: "DM Sans", Arial, sans-serif;
  color: #111;
}
.invoice-head,
.invoice-total div {
  display: flex;
  justify-content: space-between;
}
.invoice-brand,
.invoice-head {
  gap: 18px;
  align-items: flex-start;
}
.invoice-brand {
  display: flex;
  gap: 12px;
}
.invoice-logo {
  width: 82px;
  height: 68px;
  object-fit: contain;
}
.invoice-title {
  text-align: right;
}
.invoice-title h1 {
  margin: 0;
  font:
    700 27px "Playfair Display",
    serif;
}
.invoice-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0;
}
.invoice-box {
  border: 1px solid #ded5ca;
  border-radius: 8px;
  padding: 11px;
  font-size: 11px;
}
.invoice-box strong {
  color: var(--navy);
}
.invoice-items {
  min-width: 0;
  margin-top: 10px;
}
.invoice-items td,
.invoice-items th {
  padding: 8px;
  font-size: 10.5px;
}
.invoice-total {
  width: 320px;
  margin-left: auto;
  margin-top: 13px;
  border: 1px solid #ddd3c6;
  border-radius: 8px;
  overflow: hidden;
}
.invoice-total div {
  padding: 7px 10px;
  border-bottom: 1px solid #eee5da;
  font-size: 10.5px;
}
.invoice-total .grand {
  font-size: 13px;
  font-weight: 700;
}
.invoice-bottom {
  display: grid;
  grid-template-columns: 1.5fr 0.5fr;
  gap: 16px;
  margin-top: 18px;
}
.invoice-terms {
  font-size: 8.8px;
  line-height: 1.45;
  white-space: pre-wrap;
}
.invoice-sign {
  text-align: center;
  align-self: end;
  font-size: 9px;
}
.invoice-sign img {
  display: block;
  max-width: 120px;
  max-height: 55px;
  object-fit: contain;
  margin: 0 auto 4px;
}
.invoice-status-badge {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
}
.invoice-status-badge.paid {
  background: #e6f6ee;
  color: #0f7a45;
  border: 1px solid #b7e6cc;
}
.invoice-status-badge.partial {
  background: #fff4e0;
  color: #9a6700;
  border: 1px solid #f0d9a6;
}
.invoice-status-badge.unpaid {
  background: #fdeceb;
  color: #b42318;
  border: 1px solid #f3c8c3;
}
.invoice-amount-words {
  font-size: 10px;
  color: #333;
}
.crop-modal {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 25, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}
.crop-modal-inner {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  width: 320px;
  max-width: 92vw;
}
.crop-viewport {
  width: 260px;
  height: 260px;
  margin: 0 auto;
  overflow: hidden;
  position: relative;
  border-radius: 10px;
  background: #eee;
  touch-action: none;
  cursor: grab;
}
.crop-viewport img {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  user-select: none;
  pointer-events: none;
}
.crop-modal-inner input[type="range"] {
  width: 100%;
  margin-top: 12px;
}
@media (max-width: 1120px) {
  .client-list {
    grid-template-columns: repeat(2, 1fr);
  }
  .layout {
    grid-template-columns: 1fr;
  }
  .sticky {
    position: static;
  }
  .meal-row {
    grid-template-columns: 170px 120px repeat(2, minmax(150px, 1fr));
  }
  .meal-row .remove {
    grid-column: 2;
    justify-self: end;
  }
}
@media (max-width: 760px) {
  .exercise-builder-row,
  .exercise-library-grid,
  .exercise-summary {
    grid-template-columns: 1fr 1fr;
  }
  .exercise-builder-row .ex-name {
    grid-column: 1/-1;
  }
  .invoice-bottom,
  .invoice-meta {
    grid-template-columns: 1fr;
  }
  .invoice-title {
    text-align: left;
  }
  .grid.four {
    grid-template-columns: repeat(2, 1fr);
  }
  .app {
    display: block;
  }
  .sidebar {
    position: static;
    height: auto;
  }
  .topbar {
    flex-direction: column;
  }
  .client-list,
  .form-grid,
  .grid.three,
  .grid.two,
  .meal-row {
    grid-template-columns: 1fr;
  }
  .field.full {
    grid-column: auto;
  }
  .meal-row .remove {
    grid-column: auto;
    justify-self: start;
  }
}
@media print {
  .app,
  .toast {
    display: none !important;
  }
  .print-sheet {
    display: block !important;
  }
  @page {
    size: A4;
    margin: 10mm;
  }
  .pdf-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid var(--navy);
    padding-bottom: 9px;
    margin-bottom: 10px;
  }
  .pdf-header h1 {
    font:
      700 21px "Playfair Display",
      serif;
    color: var(--navy);
    margin: 0;
  }
  .pdf-header p {
    color: #555;
    margin: 3px 0 0;
  }
  .pdf-logo {
    width: 80px;
    height: 58px;
    object-fit: contain;
  }
  .pdf-client {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    background: #faf6f0;
    border: 1px solid #dfd5c8;
    padding: 8px;
    border-radius: 6px;
    margin-bottom: 9px;
  }
  .pdf-client div,
  .pdf-header p {
    font-size: 9.5px;
  }
  .pdf-client strong {
    display: block;
    color: var(--navy);
  }
  .pdf-day {
    margin-bottom: 9px;
    break-inside: avoid;
  }
  .pdf-day h3 {
    margin: 0 0 4px;
    background: var(--navy);
    color: #fff;
    padding: 5px 7px;
    font-size: 11.5px;
    border-radius: 4px;
  }
  .pdf-table {
    min-width: 0;
    font-size: 8.8px;
    border: 1px solid #d7cdbf;
  }
  .pdf-table td,
  .pdf-table th {
    border: 1px solid #d7cdbf;
    padding: 5px;
  }
  .pdf-box,
  .pdf-table tr {
    break-inside: avoid;
  }
  .pdf-box {
    border: 1px solid #d8cdbc;
    border-radius: 5px;
    padding: 7px;
    margin-top: 7px;
  }
  .pdf-box h4 {
    margin: 0 0 3px;
    color: var(--navy);
    font-size: 10px;
  }
  .pdf-box p {
    font-size: 9px;
    line-height: 1.4;
    white-space: pre-wrap;
    margin: 0;
  }
  .pdf-footer,
  .pdf-signature {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
  }
  .pdf-signature img {
    max-width: 105px;
    max-height: 46px;
  }
  .pdf-signature div {
    text-align: center;
    font-size: 8.5px;
  }
  .pdf-footer {
    justify-content: space-between;
    border-top: 1px solid #d8cdbc;
    padding-top: 6px;
    margin-top: 9px;
    font-size: 8px;
    color: #555;
  }
}
:root {
  /* navy and peach are replaced by the colours chosen in Branding once the app opens */
  --navy: #12355b;
  --navy2: #0d2948;
  --peach: #e8b27d;
  --teal: #2f7f7b;
  --teal-soft: #e8f4f2;
  --cream: #fbfaf7;
  --danger: #b42318;
  --success: #18794e;
  --warning: #b26a00;
  --peach-soft: #fff4ea;
  --line: #e3e8ef;
  --muted: #667085;
  --bg: #f4f6f9;
  --text: #1d2939;
  --text-2: #475467;
  --border-strong: #d0d7e2;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04), 0 2px 8px rgba(16, 24, 40, 0.04);
  --shadow-md: 0 4px 12px rgba(16, 24, 40, 0.06), 0 12px 32px rgba(16, 24, 40, 0.08);
  --shadow-lg: 0 24px 64px rgba(10, 25, 45, 0.24);
  --ring: 0 0 0 3px rgba(15, 45, 82, 0.16);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}
body {
  background: #f3f5f7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
.sidebar {
  background: linear-gradient(180deg, var(--navy2), #153f67);
}
.main {
  background: linear-gradient(180deg, #f7f9fb 0, #f3f5f7 100%);
}
.card {
  background: #fff;
  border-color: #e1e7ec;
  box-shadow: 0 7px 22px rgba(18, 53, 91, 0.07);
}
.btn.primary {
  background: var(--navy);
  border-color: var(--navy);
}
.btn.primary:hover {
  background: var(--navy2);
}
.btn.peach {
  background: var(--peach-soft);
  border-color: #e8c19b;
  color: #7a481c;
}
.section-title h3,
.topbar h2,
label {
  color: var(--navy);
}
.dashboard-card {
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition:
    0.18s transform,
    0.18s box-shadow;
}
.dashboard-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(18, 53, 91, 0.13);
}
.dashboard-card:before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: var(--navy);
}
.dashboard-card small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 10px;
}
.kpi-active:before,
.kpi-income:before {
  background: #2f8f65;
}
.kpi-inactive:before {
  background: #8b95a1;
}
.kpi-diet:before {
  background: #d9822b;
}
.kpi-exercise:before {
  background: #2f7f7b;
}
.kpi-outstanding:before,
.kpi-pending:before {
  background: #b5473c;
}
.inline-select {
  display: flex;
  gap: 6px;
}
.inline-select select {
  flex: 1;
}
.master-list {
  display: grid;
  gap: 7px;
}
.master-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  padding: 9px 10px;
  border-radius: 8px;
  background: #fafcfd;
}
.master-item span {
  font-size: 12px;
  font-weight: 600;
}
.client-import-note {
  font-size: 11px;
  color: var(--muted);
}
.diet-health-note {
  padding: 10px 12px;
  margin-bottom: 12px;
  border-radius: 9px;
  background: var(--teal-soft);
  border: 1px solid #c9e3df;
  color: #225f5b;
  font-size: 12px;
}
.exercise-link {
  font-weight: 700;
  text-decoration: none;
  color: var(--navy);
}
@media print {
  a {
    color: #001f52 !important;
    text-decoration: underline !important;
  }
  .exercise-pdf {
    font-family: "DM Sans", sans-serif;
  }
  .exercise-pdf table {
    width: 100%;
    border-collapse: collapse;
  }
  .exercise-pdf td,
  .exercise-pdf th {
    border: 1px solid #d7cdbf;
    padding: 6px;
    font-size: 9px;
  }
  .exercise-pdf th {
    background: #edf3f7;
    color: #12355b;
  }
}
.invoice-print {
  --invoice-primary: var(--navy);
  --invoice-accent: var(--peach);
  background: #fff;
  border: 1px solid #dbe3ea;
  border-radius: 12px;
  padding: 18px;
  overflow: hidden;
  max-width: 210mm;
  margin: 0 auto;
  box-sizing: border-box;
}
.invoice-print:before {
  content: "";
  display: block;
  height: 8px;
  background: linear-gradient(90deg, var(--invoice-primary), var(--invoice-accent));
  margin: -18px -18px 16px;
}
.invoice-head {
  border-bottom: 2px solid var(--invoice-primary);
  padding: 2px 2px 14px;
}
.invoice-title h1 {
  background: var(--invoice-primary);
  color: #fff !important;
  padding: 8px 13px;
  border-radius: 8px;
  display: inline-block;
  font-size: 24px !important;
}
.invoice-box {
  border-color: #d9e2ea;
  background: linear-gradient(180deg, #fff, #f8fbfd);
  box-shadow: 0 3px 10px rgba(18, 53, 91, 0.05);
}
.invoice-box > strong {
  display: inline-block;
  background: var(--peach-soft);
  padding: 4px 7px;
  border-radius: 5px;
  color: var(--navy);
}
.invoice-print table {
  min-width: 0 !important;
  max-width: 100%;
}
.invoice-items {
  border-radius: 8px;
  overflow: hidden;
  border-collapse: collapse;
  border: 1.5px solid #cfd8e2;
  width: 100%;
  table-layout: fixed;
}
.invoice-items td,
.invoice-items th {
  border: 1px solid #cfd8e2;
  word-break: break-word;
  overflow-wrap: break-word;
}
.invoice-items th {
  background: var(--invoice-primary) !important;
  color: #fff !important;
  border-color: var(--invoice-primary) !important;
  text-transform: uppercase;
  letter-spacing: 0.35px;
}
.invoice-items td {
  background: #fff;
}
.invoice-total {
  border-color: #cfd9e2;
  box-shadow: 0 4px 14px rgba(18, 53, 91, 0.07);
}
.invoice-total div:nth-child(odd):not(.grand) {
  background: #fbfcfd;
}
.invoice-total .grand {
  background: var(--invoice-primary) !important;
  color: #fff !important;
}
.invoice-amount-words {
  background: var(--peach-soft);
  border: 1px solid #ecd1b5;
  border-radius: 7px;
  padding: 8px 10px;
  margin-top: 10px;
}
.invoice-terms {
  background: #f8fbfd;
  border: 1px solid #dbe4eb;
  border-left: 4px solid var(--invoice-primary);
  border-radius: 7px;
  padding: 9px 10px !important;
}
.invoice-sign {
  border: 1px solid #dbe4eb;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}
.invoice-payhist-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  margin-top: 6px;
}
.invoice-payhist-table td,
.invoice-payhist-table th {
  padding: 5px 6px;
  font-size: 10px;
  word-break: break-word;
  overflow-wrap: break-word;
  border-bottom: 1px solid #eee5da;
}
.invoice-payhist-table th {
  color: var(--navy);
  font-weight: 700;
}
.required-star {
  color: var(--danger);
  font-weight: 800;
}
.topbar .actions {
  align-items: center;
  gap: 9px;
}
.topbar .actions .btn,
.topbar .actions .file-btn {
  min-height: 40px;
  justify-content: center;
  white-space: nowrap;
}
.btn.soft-action,
.file-btn.soft-action {
  background: #fff;
  border-color: #d7e0e8;
  color: var(--navy);
  box-shadow: 0 1px 2px rgba(18, 53, 91, 0.04);
}
.btn.soft-action:hover,
.file-btn.soft-action:hover {
  background: #f7fafc;
  border-color: #bdcad6;
}
.btn.export-main {
  background: var(--teal-soft);
  border-color: #bcded9;
  color: #205d59;
}
.btn.export-main:hover {
  background: #dff0ed;
  border-color: #9fcfc8;
}
#clients .search-row {
  background: #fff;
  border: 1px solid #e1e7ec;
  border-radius: 14px;
  padding: 16px 17px;
  box-shadow: 0 6px 20px rgba(18, 53, 91, 0.05);
}
#clients .search-row {
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 4px 14px rgba(18, 53, 91, 0.04);
}
#clientFormCard {
  border-top: 4px solid var(--teal);
}
#clientFormCard .field input:required,
#clientFormCard .field select:required {
  border-left: 3px solid #c7d8e6;
}
#clientFormCard .field input:required:focus {
  border-left-color: var(--teal);
}
@media (max-width: 760px) {
  .topbar .actions .btn,
  .topbar .actions .file-btn {
    flex: 1 1 auto;
  }
}
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13, 41, 72, 0.58);
  z-index: 500;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  overflow-y: auto;
}
.modal-card {
  width: 100%;
  max-width: 920px;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
  animation: modalIn 0.18s ease;
}
.modal-card > .section-title {
  position: sticky;
  top: -17px;
  margin: -17px -17px 14px;
  padding: 16px 17px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  z-index: 2;
  border-radius: 11px 11px 0 0;
}
.client-list {
  gap: 16px;
}
.client-card {
  position: relative;
  transition:
    0.18s transform,
    0.18s box-shadow;
  border-left: 4px solid var(--line);
}
.client-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(18, 53, 91, 0.16);
}
.client-card-status {
  position: absolute;
  top: 15px;
  right: 15px;
}
.client-card-head h4 {
  padding-right: 78px;
}
.client-count {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  align-self: center;
  white-space: nowrap;
}
@media (max-width: 760px) {
  .modal-overlay {
    padding: 0;
  }
  .modal-card,
  .modal-card > .section-title {
    border-radius: 0;
  }
}
.client-search-picker {
  position: relative;
}
.client-search-picker > input {
  padding-right: 34px;
}
.client-search-results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 120;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: 0 14px 34px rgba(18, 53, 91, 0.18);
  max-height: 290px;
  overflow: auto;
  display: none;
}
.client-search-result {
  padding: 9px 10px;
  border-bottom: 1px solid #eef1f4;
  cursor: pointer;
}
.client-search-result:last-child {
  border-bottom: 0;
}
.client-search-result.active,
.client-search-result:hover {
  background: #f3f7fa;
}
.client-search-result strong,
.diet-alert-card strong {
  display: block;
  color: var(--navy);
  font-size: 12px;
}
.client-search-result small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 2px;
}
.client-search-empty {
  padding: 12px;
  color: var(--muted);
  font-size: 11px;
}
.payment-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}
.payment-badge.paid {
  background: #e6f6ee;
  color: #0f7a45;
  border: 1px solid #b7e6cc;
}
.payment-badge.partial {
  background: #fff4e0;
  color: #9a6700;
  border: 1px solid #f0d9a6;
}
.payment-badge.pending {
  background: #fdeceb;
  color: #b42318;
  border: 1px solid #f3c8c3;
}
.diet-alert-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 16px;
}
.diet-alert-card {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 11px;
  cursor: pointer;
  transition: 0.16s;
}
.diet-alert-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(18, 53, 91, 0.1);
}
.diet-alert-card strong {
  font-size: 21px;
  margin-top: 4px;
}
.diet-alert-card span {
  font-size: 11px;
  font-weight: 700;
}
.diet-alert-card.future {
  border-left: 4px solid #d9822b;
}
.diet-alert-card.today {
  border-left: 4px solid #b5473c;
  background: #fff8f7;
}
.diet-alert-card.past {
  border-left: 4px solid #8b95a1;
}
.duplicate-warning {
  position: fixed;
  inset: 0;
  background: rgba(13, 41, 72, 0.58);
  z-index: 1600;
  display: grid;
  place-items: center;
  padding: 16px;
}
.duplicate-warning .card {
  width: min(620px, 96vw);
  max-height: 86vh;
  overflow: auto;
}
.duplicate-match {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 11px;
  margin-top: 9px;
  background: #fafcfd;
}
.duplicate-match strong {
  color: var(--navy);
}
@media (max-width: 900px) {
  .diet-alert-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 560px) {
  .diet-alert-grid {
    grid-template-columns: 1fr;
  }
}
.invoice-service-rows {
  display: grid;
  gap: 8px;
}
.invoice-service-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px 38px;
  gap: 8px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px;
  background: #fafcfd;
}
.invoice-service-row .remove-service {
  width: 38px;
  height: 38px;
  padding: 0;
  justify-content: center;
}
.invoice-print .invoice-sign img {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}
@media (max-width: 760px) {
  .invoice-service-row {
    grid-template-columns: 1fr 120px 38px;
  }
}
.client-photo {
  cursor: zoom-in;
  transition:
    0.18s transform,
    0.18s box-shadow;
}
.client-photo:hover {
  transform: scale(1.05);
  box-shadow:
    0 0 0 2px var(--teal-soft),
    0 6px 16px rgba(18, 53, 91, 0.18);
}
.photo-viewer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 22, 38, 0.82);
  z-index: 2200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.photo-viewer-card {
  width: min(760px, 96vw);
  max-height: 94vh;
  background: #fff;
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  display: grid;
  gap: 12px;
}
.photo-viewer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.notification-head h3,
.photo-viewer-head h3 {
  margin: 0;
  color: var(--navy);
  font-size: 16px;
}
.photo-viewer-stage {
  min-height: 280px;
  max-height: 72vh;
  background: #eef2f5;
  border-radius: 10px;
  display: grid;
  place-items: center;
  overflow: auto;
  padding: 10px;
}
.photo-viewer-stage img {
  display: block;
  max-width: 100%;
  max-height: 68vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
}
.photo-viewer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
@media (max-width: 560px) {
  .photo-viewer-overlay {
    padding: 0;
  }
  .photo-viewer-card {
    width: 100%;
    height: 100vh;
    max-height: none;
    border-radius: 0;
  }
  .photo-viewer-stage {
    max-height: none;
    min-height: 0;
  }
  .photo-viewer-stage img {
    max-height: 76vh;
  }
}
.notification-badge,
.notification-bell {
  align-items: center;
  justify-content: center;
}
.notification-bell {
  position: fixed;
  top: 18px;
  right: 24px;
  z-index: 1800;
  width: 46px;
  height: 42px;
  border: 1px solid #d7e0e8;
  border-radius: 11px;
  background: #fff;
  color: var(--navy);
  display: flex;
  box-shadow: 0 6px 18px rgba(18, 53, 91, 0.12);
  font-size: 19px;
}
.notification-bell:hover {
  background: #f7fafc;
}
.notification-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 21px;
  height: 21px;
  padding: 0 5px;
  border-radius: 999px;
  background: #b42318;
  color: #fff;
  border: 2px solid #fff;
  display: none;
  font-size: 10px;
  font-weight: 800;
}
.notification-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13, 41, 72, 0.22);
  z-index: 1850;
  display: none;
}
.notification-drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: min(430px, 94vw);
  height: 100%;
  background: #f7f9fb;
  box-shadow: -18px 0 50px rgba(13, 41, 72, 0.2);
  display: flex;
  flex-direction: column;
  animation: notificationSlide 0.18s ease;
}
.notification-head {
  padding: 17px 18px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.notification-head h3 {
  font-size: 18px;
}
.notification-head-actions {
  display: flex;
  gap: 7px;
}
.notification-body {
  overflow: auto;
  padding: 14px 14px 26px;
}
.notification-section {
  margin-bottom: 16px;
}
.notification-card {
  background: #fff;
  border: 1px solid #e1e7ec;
  border-left: 4px solid #c7ced6;
  border-radius: 10px;
  padding: 11px 12px;
  margin-bottom: 8px;
  box-shadow: 0 4px 14px rgba(18, 53, 91, 0.05);
}
.notification-card.red {
  border-left-color: #b42318;
}
.notification-card.orange {
  border-left-color: #d9822b;
}
.notification-card.amber {
  border-left-color: #d6a11d;
}
.notification-card.green {
  border-left-color: #18794e;
}
.notification-card.neutral {
  border-left-color: #9ca3af;
}
.notification-card-title {
  font-weight: 800;
  color: var(--navy);
  font-size: 12px;
}
.notification-card-client {
  font-size: 12px;
  margin-top: 3px;
}
.notification-card-meta {
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 3px;
  line-height: 1.45;
}
.notification-card-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 9px;
}
.notification-empty {
  padding: 32px 18px;
  text-align: center;
  color: var(--muted);
}
.due-cell {
  min-width: 118px;
}
.due-date {
  font-weight: 700;
  color: var(--navy);
}
.due-label {
  display: inline-block;
  margin-top: 4px;
  font-size: 10px;
  font-weight: 800;
}
.due-label.red {
  color: #b42318;
}
.due-label.orange {
  color: #b26a00;
}
.due-label.amber {
  color: #9a6700;
}
.due-label.green {
  color: #18794e;
}
.due-label.neutral,
.imp-table tr.imp-skip td {
  color: var(--muted);
}
@media (min-width: 761px) {
  .main {
    padding-top: 24px;
  }
}
@media (max-width: 760px) {
  .notification-bell {
    width: 42px;
    height: 40px;
  }
  .notification-drawer {
    width: 100vw;
  }
  .main {
    padding-top: 58px;
  }
  .topbar .actions {
    padding-right: 0;
  }
}
.hc-v337-overlay {
  z-index: 10050;
  align-items: flex-start;
  justify-content: center;
  padding: 28px 18px;
  overflow: auto;
  background: rgba(5, 24, 52, 0.48);
  backdrop-filter: blur(2px);
}
.hc-v337-modal-card {
  width: min(980px, 96vw);
  max-height: calc(100vh - 56px);
  overflow: auto;
  margin: auto;
  box-shadow: 0 24px 70px rgba(0, 31, 82, 0.22);
}
.hc-assessment-popup .hc-v337-modal-card,
.hc-body-popup .hc-v337-modal-card {
  width: min(900px, 96vw);
}
#exerciseTable[style*="display: none"] {
  display: none !important;
}
@media (max-width: 700px) {
  .hc-v337-overlay {
    padding: 10px;
  }
  .hc-v337-modal-card {
    width: 100%;
    max-height: calc(100vh - 20px);
  }
}
/* V59.3: date box = visible text box (type DD/MM/YYYY) + 📅 calendar button.
   The real date input sits invisible behind it and only opens the calendar. */
.hc-dmy-wrap {
  position: relative;
  display: block;
  width: 100%;
}
.hc-dmy-wrap > input[type="date"] {
  position: absolute;
  z-index: 0;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}
.hc-dmy-wrap > input.hc-dmy-in {
  position: relative;
  z-index: 1;
  width: 100%;
  padding-right: 42px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.hc-dmy-wrap > input.hc-dmy-in::placeholder {
  color: #9aa3ad;
  letter-spacing: 0.04em;
}
.hc-dmy-btn {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: 4px;
  transform: translateY(-50%);
  width: 34px;
  height: calc(100% - 8px);
  max-height: 34px;
  min-height: 26px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.75;
  padding: 0;
}
.hc-dmy-btn:hover:not(:disabled) {
  background: #eef3fa;
  opacity: 1;
}
.hc-dmy-btn:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}
.hc-dmy-wrap.is-bad > input.hc-dmy-in {
  border-color: #d92d20 !important;
  box-shadow: 0 0 0 3px #d92d2022 !important;
}
.hc-dmy-wrap.is-disabled > input.hc-dmy-in,
.hc-dmy-wrap.is-readonly > input.hc-dmy-in {
  background: #f2f4f7;
  color: #667085;
  cursor: not-allowed;
}
#clientProfileModal .modal-card {
  max-width: 1120px;
}
#clientProfileModal #clientHistory {
  display: block !important;
  margin: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}
#clientProfileModal .profile-popup-head {
  position: sticky;
  top: -17px;
  margin: -17px -17px 14px;
  padding: 14px 17px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.diet-alert-card.membership-soon {
  border-left: 4px solid #d9822b;
  background: #fffaf0;
}
.diet-alert-card.membership-today {
  border-left: 4px solid #b5473c;
  background: #fff3f1;
}
.diet-alert-card.membership-ended {
  border-left: 4px solid #68727d;
  background: #f6f7f8;
}
@media print {
  @page {
    size: A4;
    margin: 10mm;
  }
  body {
    background: #fff !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .invoice-print {
    width: 100%;
    max-width: 100%;
    margin: 0;
    min-height: 277mm;
    padding: 12px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    display: flex;
    flex-direction: column;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .invoice-print:before {
    height: 6px;
    margin: -12px -12px 12px;
  }
  .invoice-head {
    padding-bottom: 10px;
  }
  .invoice-logo {
    width: 68px;
    height: 52px;
  }
  .invoice-title h1 {
    font-size: 20px !important;
    padding: 6px 11px;
  }
  .invoice-meta {
    gap: 10px;
    margin: 12px 0;
  }
  .invoice-box {
    padding: 8px 9px;
    font-size: 9.5px;
    break-inside: avoid;
  }
  .invoice-items {
    margin-top: 8px;
  }
  .invoice-items td,
  .invoice-items th {
    padding: 6px 8px;
    font-size: 9.5px;
    line-height: 1.3;
  }
  .invoice-items tr {
    break-inside: avoid;
  }
  .invoice-total {
    margin-top: 10px;
    width: 300px;
  }
  .invoice-total div {
    padding: 5px 9px;
    font-size: 9.5px;
  }
  .invoice-total .grand {
    font-size: 11px !important;
  }
  .invoice-amount-words {
    font-size: 9px;
  }
  .invoice-amount-words,
  .invoice-print .invoice-payment-history {
    margin-top: 8px;
    padding: 6px 9px;
    break-inside: avoid;
  }
  .invoice-print .invoice-payhist-table {
    table-layout: fixed;
    width: 100%;
  }
  .invoice-print .invoice-payhist-table td,
  .invoice-print .invoice-payhist-table th {
    font-size: 8.3px;
    padding: 3px 4px;
    word-break: break-word;
    overflow-wrap: break-word;
  }
  .invoice-bottom {
    gap: 12px;
    margin-top: auto;
    padding-top: 10px;
    align-items: end;
    break-inside: avoid;
  }
  .invoice-terms {
    font-size: 8.3px !important;
    line-height: 1.35;
    padding: 7px 9px !important;
  }
  .invoice-sign {
    padding: 7px;
    font-size: 8.8px;
    break-inside: avoid;
  }
  .invoice-sign img {
    max-width: 100px;
    max-height: 44px;
  }
  .invoice-print > div:last-child {
    margin-top: 8px;
    padding-top: 6px;
    font-size: 8.5px;
  }
  #appRoot,
  #authScreen,
  #clientFormModal,
  #clientProfileModal,
  #notificationOverlay,
  #photoCropModal,
  #photoViewerOverlay,
  .modal-overlay,
  .notification-overlay,
  .photo-viewer-overlay,
  .toast {
    display: none !important;
  }
  #printSheet.print-sheet {
    display: block !important;
    position: static !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }
}
.ex-layout-switch {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0 16px;
}
.ex-layout-switch button,
.ex-session-head input {
  font-weight: 700;
  color: var(--navy);
  background: #fff;
}
.ex-layout-switch button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 15px;
  cursor: pointer;
}
.ex-layout-switch button.active {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.ex-session-card {
  border: 1px solid #ddd3c6;
  background: #fffdfa;
  border-radius: 13px;
  margin: 12px 0;
  overflow: hidden;
}
.ex-session-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #f7f3ee;
  border-bottom: 1px solid #e8dfd4;
}
.ex-session-head input {
  min-width: 180px;
}
.ex-session-head .session-spacer {
  flex: 1;
}
.ex-session-body {
  padding: 13px;
}
.ex-days {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 0 0 12px;
}
.ex-day-chip,
.ex-rest-toggle {
  font-weight: 700;
  color: var(--navy);
}
.ex-day-chip {
  border: 1px solid #d7cdbf;
  background: #fff;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  cursor: pointer;
}
.ex-day-chip.active {
  background: var(--teal-soft);
  border-color: #62aaa3;
  color: #185d58;
}
.ex-rest-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  margin-left: auto;
}
.ex-rest-note {
  padding: 13px;
  border: 1px dashed #d7cdbf;
  border-radius: 9px;
  background: #fff;
  color: var(--muted);
}
.ex-session-card .exercise-builder-row {
  grid-template-columns: minmax(190px, 1.4fr) 78px minmax(120px, 0.8fr) auto;
}
.ex-row-details {
  grid-column: 1/-1;
  display: grid;
  gap: 8px;
}
.ex-add-row {
  width: 100%;
  margin-top: 9px;
  border-style: dashed !important;
  background: #fff !important;
}
.ex-combo {
  position: relative;
}
.ex-combo-input {
  width: 100%;
}
.ex-combo-list {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 40;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(18, 53, 91, 0.14);
  max-height: 230px;
  overflow: auto;
  margin-top: 4px;
}
.ex-combo-list.open {
  display: block;
}
.ex-combo-item {
  padding: 8px 10px;
  cursor: pointer;
  border-bottom: 1px solid #f1ede6;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.ex-combo-item:last-child {
  border-bottom: 0;
}
.ex-combo-item:hover {
  background: #f3f7fa;
}
.ex-combo-item span {
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}
.ex-combo-empty {
  padding: 9px 10px;
  font-size: 11px;
  color: var(--muted);
}
@media (max-width: 760px) {
  .ex-session-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .ex-session-head input {
    width: 100%;
  }
  .ex-session-head .session-spacer {
    display: none;
  }
  .ex-rest-toggle {
    margin-left: 0;
  }
  .ex-session-card .exercise-builder-row {
    grid-template-columns: 1fr 1fr;
  }
  .ex-row-details,
  .ex-session-card .exercise-builder-row .ex-name {
    grid-column: 1/-1;
  }
}
@media print {
  .exercise-pdf .ex-pdf-session {
    margin-top: 13px;
    break-inside: avoid;
  }
  .exercise-pdf .ex-pdf-session h3 {
    margin: 0;
    padding: 7px 9px;
    background: #edf3f7;
    color: #12355b;
    font-size: 12px;
  }
  .exercise-pdf .ex-pdf-days {
    font-size: 9px;
    color: #555;
    margin: 4px 0 7px;
  }
  .exercise-pdf .ex-pdf-rest {
    border: 1px solid #d7cdbf;
    padding: 8px;
    font-size: 9px;
  }
}
.diet-date-helper {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 7px;
}
.diet-date-helper .btn.active {
  background: var(--navy);
  color: #fff;
}
.fu-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 8px;
}
.fu-chip {
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
}
.fu-chip.red {
  background: #fdecea;
  color: #b3261e;
  border-color: #f5c6c2;
}
.fu-chip.orange {
  background: #fff1d8;
  color: #9a5b00;
  border-color: #f3ddb4;
}
.fu-chip.grey {
  background: #f2f4f5;
  color: #4a5560;
}
tr.fu-row-red td {
  background: #fffaf9;
}
tr.fu-row-orange td {
  background: #fffdf6;
}
.fu-chip,
.fu-when {
  font-size: 11px;
  font-weight: 700;
}
.fu-when.red {
  color: #b3261e;
}
.fu-when.orange {
  color: #9a5b00;
}
.fu-when.grey {
  color: #6b7681;
}
.fu-actions-cell {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.fu-next-box {
  border: 1px solid #c9e3df;
  background: var(--teal-soft);
  border-radius: 9px;
  padding: 11px 12px;
  margin-bottom: 12px;
}
.fu-next-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  flex-wrap: wrap;
}
.fu-history-collapse {
  border: 1px solid var(--line);
  border-radius: 9px;
  margin-top: 10px;
  overflow: hidden;
}
.fu-history-collapse summary {
  cursor: pointer;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 700;
  color: #12355b;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f8f9fa;
}
.fu-history-collapse summary::before {
  content: "▸";
  font-size: 11px;
  transition: transform 0.15s;
}
.fu-history-collapse summary::-webkit-details-marker {
  display: none;
}
.fu-history-collapse .table-wrap {
  border-top: 1px solid var(--line);
}
.client-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding: 11px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(18, 53, 91, 0.04);
}
.client-pagination .pager-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.client-pagination .pager-info {
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
}
.client-pagination select {
  width: auto;
  min-width: 92px;
  padding: 7px 8px;
}
.client-pagination .page-number {
  min-width: 34px;
  justify-content: center;
}
.client-pagination .page-number.current {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.client-pagination button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
@media (max-width: 760px) {
  .client-pagination {
    align-items: stretch;
  }
  .client-pagination .pager-actions,
  .client-pagination .pager-info {
    width: 100%;
  }
}
.hc-sync-status {
  position: fixed;
  right: 18px;
  bottom: 18px;
  left: auto;
  z-index: 10020;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 8px 12px;
  background: #fff;
  color: #334155;
  box-shadow: 0 6px 22px rgba(15, 23, 42, 0.14);
  font:
    700 11px/1.2 "DM Sans",
    sans-serif;
  cursor: pointer;
}
.hc-sync-status[data-kind="saved"] {
  border-color: #9bd5b0;
  color: #166534;
  background: #f0fdf4;
}
.hc-sync-status[data-kind="pending"],
.hc-sync-status[data-kind="syncing"] {
  border-color: #f6c66b;
  color: #92400e;
  background: #fffbeb;
}
.hc-sync-status[data-kind="offline"] {
  border-color: #cbd5e1;
  color: #475569;
  background: #f8fafc;
}
.hc-sync-status[data-kind="conflict"],
.hc-sync-status[data-kind="error"] {
  border-color: #f1a2a2;
  color: #991b1b;
  background: #fef2f2;
}
@media (max-width: 720px) {
  .hc-sync-status {
    right: 10px;
    bottom: 10px;
    left: auto;
    max-width: calc(100vw - 20px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
.meal-row .meal-order-actions {
  display: grid;
  grid-template-columns: repeat(2, 28px);
  gap: 4px;
  align-content: start;
  justify-content: end;
}
.meal-row .meal-drag-handle {
  grid-column: 1/-1;
  width: 60px;
  height: 28px;
  padding: 0;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #f8fafc;
  color: #334155;
  font-weight: 800;
  cursor: grab;
  touch-action: none;
}
.meal-row .meal-drag-handle:active {
  cursor: grabbing;
}
.meal-row .meal-move-button,
.meal-row .meal-order-actions .remove {
  width: 28px;
  height: 28px;
  padding: 0;
  display: grid;
  place-items: center;
}
.meal-row.meal-dragging {
  opacity: 0.48;
  border: 2px dashed #002b67;
  background: #edf4ff;
}
.meal-row.meal-drop-target {
  box-shadow: 0 0 0 2px #f0a85a inset;
}
@media (max-width: 760px) {
  .meal-row .meal-order-actions {
    grid-template-columns: 58px 36px 36px 36px;
    justify-content: start;
    align-items: center;
  }
  .meal-row .meal-drag-handle {
    grid-column: auto;
    width: 58px;
    height: 34px;
  }
  .meal-row .meal-move-button,
  .meal-row .meal-order-actions .remove {
    width: 36px;
    height: 34px;
  }
}
.hc-client-name-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
  cursor: pointer;
}
.hc-client-name-link:hover {
  color: var(--navy, #12355b);
  text-decoration-style: solid;
}
#dashboardNextPlans .hc-group-row td {
  background: #fffbeb;
  color: #92400e;
  font-weight: 700;
  font-size: 12px;
  border-top: 2px solid #f6c66b;
}
#dashboardNextPlans .hc-paused-row td {
  background: #fffdf7;
}
.hc-conflict-card {
  max-width: 680px;
  width: 100%;
}
.hc-conflict-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
  max-height: 60vh;
  overflow: auto;
}
.hc-conflict-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border: 1px solid #f1a2a2;
  background: #fef2f2;
  border-radius: 10px;
  padding: 10px 12px;
}
.hc-conflict-row .muted {
  font-size: 11px;
  margin-top: 3px;
}
.hc-conflict-row .actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
@media (max-width: 720px) {
  .hc-conflict-row {
    flex-direction: column;
    align-items: stretch;
  }
}
#dashboardTable tbody td:first-child strong {
  cursor: pointer;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
}
#dashboardTable tbody td:first-child strong:hover {
  color: var(--navy, #12355b);
}
.library-form-modal .modal-card {
  max-width: 760px;
  margin: 0;
}
.instruction-card h4,
.label-row label,
.library-form-modal .modal-card form {
  margin: 0;
}
.meal-row .m-time {
  width: 100%;
  min-width: 0;
  resize: vertical;
  overflow-wrap: anywhere;
  line-height: 1.4;
}
.app[hidden],
[hidden] {
  display: none !important;
}
.search-row > select {
  width: auto;
  max-width: 260px;
  flex: 0 1 auto;
}
.fu-when.amber {
  color: #9a6700;
}
.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.mobile-bar,
.nav-backdrop {
  display: none;
}
@media (max-width: 760px) {
  .app .sidebar,
  .mobile-bar {
    position: fixed;
    top: 0;
    left: 0;
  }
  .mobile-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    right: 0;
    height: 58px;
    padding: 8px 64px 8px 12px;
    background: var(--navy);
    color: #fff;
    z-index: 1700;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  }
  .mobile-menu-btn {
    min-height: 42px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid #ffffff40;
    background: #ffffff18;
    color: #fff;
    font-weight: 700;
    font-size: 15px;
  }
  .mobile-page-title {
    font:
      700 16px "Playfair Display",
      serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .app .sidebar {
    bottom: 0;
    width: min(290px, 84vw);
    height: 100vh;
    z-index: 1950;
    transform: translateX(-102%);
    transition: transform 0.2s ease;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.25);
  }
  .app.nav-open .sidebar {
    transform: none;
  }
  .app.nav-open .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 1900;
  }
  body.hc-nav-lock {
    overflow: hidden;
  }
  .nav button {
    min-height: 44px;
  }
  .main {
    padding: 70px 12px !important;
    overflow-x: hidden;
  }
  .notification-bell {
    top: 8px !important;
    right: 10px !important;
    z-index: 1750 !important;
  }
  .topbar .actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
  }
  .topbar .actions > * {
    flex: 1 1 auto;
  }
  #globalSearch {
    min-width: 0 !important;
    width: 100%;
  }
  .search-row {
    flex-wrap: wrap;
  }
  .search-row input,
  .search-row select {
    max-width: none !important;
    flex: 1 1 140px;
    min-width: 0;
  }
  .btn {
    min-height: 40px;
  }
  .btn.small {
    min-height: 36px;
    font-size: 12px;
  }
  .modal-card {
    width: calc(100vw - 16px) !important;
    max-width: none !important;
  }
  .today-row {
    grid-template-columns: 28px 1fr;
  }
  .today-row .btn,
  .today-row .fu-when {
    grid-column: 2;
    justify-self: start;
  }
  .appt-row {
    grid-template-columns: 1fr;
  }
  .profile-head {
    grid-template-columns: 56px 1fr;
  }
  .profile-head-side {
    grid-column: 1/-1;
    align-items: flex-start;
  }
  .grid.four,
  .payment-summary {
    grid-template-columns: 1fr 1fr;
  }
  .client-health-panel {
    position: static;
  }
  .diet-alert-grid {
    grid-template-columns: 1fr;
  }
  .card {
    min-width: 0;
  }
  .pager-actions {
    flex-wrap: wrap;
  }
}
@media (max-width: 380px) {
  .grid.four {
    grid-template-columns: 1fr;
  }
}
.hc-offline-banner {
  background: #fff7e6;
  border: 1px solid #f3d19c;
  color: #7a4b00;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 700;
}
.hc-choice-card {
  width: min(760px, 96vw);
  max-height: 88vh;
  overflow: auto;
}
.hc-choice-message {
  font-size: 13px;
  line-height: 1.55;
}
.hc-choice-message p {
  margin: 0 0 8px;
}
.hc-choice-actions {
  justify-content: flex-end;
  margin-top: 14px;
  flex-wrap: wrap;
}
.choice-help {
  margin: 6px 0 0 18px;
  padding: 0;
}
.choice-help li {
  margin-bottom: 6px;
}
.history-row {
  border-bottom: 1px solid var(--line);
  padding: 7px 0;
  font-size: 13px;
}
.payment-badge.closed {
  background: #f2f4f7;
  color: #475467;
  border: 1px solid #d0d5dd;
}
.payment-badge.cancelled {
  background: #f4f4f5;
  color: #52525b;
  border: 1px dashed #a1a1aa;
  text-decoration: line-through;
}
.invoice-status-badge.closed {
  background: #f2f4f7;
  color: #475467;
  border: 1px solid #d0d5dd;
}
.invoice-status-badge.cancelled {
  background: #f4f4f5;
  color: #3f3f46;
  border: 1px solid #a1a1aa;
}
tr.row-cancelled td {
  color: #8b8b95;
}
tr.row-cancelled td:first-child strong {
  text-decoration: line-through;
}
.invoice-cancelled-note {
  margin: 8px 0;
  padding: 8px 10px;
  border: 1px dashed #a1a1aa;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  color: #3f3f46;
}
.health-form-block {
  background: #f7fbfa;
  border: 1px solid #d9ebe7;
  border-radius: 10px;
  padding: 12px;
}
.allergy-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fdecec;
  color: #a3160f;
  border: 1px solid #f1a9a4;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 800;
  margin: 2px 4px 2px 0;
}
.card-allergy {
  color: #a3160f;
  font-weight: 700;
  font-size: 12px;
  margin: 6px 0 0;
}
.profile-head {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 14px;
  align-items: start;
  background: #f7f9fb;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 14px;
}
.profile-head-photo {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  object-fit: cover;
}
.profile-head-photo.placeholder {
  display: grid;
  place-items: center;
  background: var(--navy);
  color: #fff;
  font:
    700 26px "Playfair Display",
    serif;
}
.profile-head-main h2 {
  margin: 0 0 3px;
  font:
    700 21px "Playfair Display",
    serif;
  color: var(--navy);
}
.profile-head-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 6px;
  font-size: 12px;
}
.profile-allergies {
  margin-top: 8px;
  font-size: 12px;
}
.profile-health-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: 7px;
  font-size: 12px;
  color: #344054;
}
.profile-head-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.profile-balance {
  text-align: right;
}
.profile-balance strong {
  display: block;
  font-size: 18px;
}
.client-health-panel {
  border-left: 4px solid #d9931e;
}
.client-health-panel .chp-row {
  display: grid;
  gap: 2px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 12px;
}
.client-health-panel .chp-row:last-child {
  border-bottom: 0;
}
.client-health-panel .chp-allergy strong {
  color: #a3160f;
}
.today-list,
.today-row {
  display: grid;
  gap: 6px;
}
.today-row {
  grid-template-columns: 28px 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.today-row.red {
  border-left: 4px solid #b3261e;
  background: snow;
}
.today-row.orange {
  border-left: 4px solid #d9931e;
}
.today-icon {
  font-size: 18px;
  text-align: center;
}
.today-main {
  min-width: 0;
  font-size: 13px;
}
.today-main .muted {
  font-size: 12px;
}
.seg {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  flex-wrap: wrap;
}
.seg-btn,
.seg-radio {
  border: 0;
  background: #fff;
  padding: 8px 12px;
  font-weight: 700;
  font-size: 12px;
  color: var(--navy);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.seg-btn.active {
  background: var(--navy);
  color: #fff;
}
.seg-radio input {
  width: auto;
}
.task-list {
  display: grid;
  gap: 8px;
}
.task-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}
.task-card.overdue {
  border-left: 4px solid #b3261e;
}
.task-card.done {
  opacity: 0.7;
}
.task-card.done .task-title {
  text-decoration: line-through;
}
.task-top {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.task-status-select {
  width: auto;
  min-width: 100px;
}
.ld-next-text strong.lc-when,
.task-title {
  font-size: 14px;
}
.task-details {
  margin: 6px 0 0;
  font-size: 13px;
  white-space: pre-wrap;
}
.task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
  font-size: 12px;
}
.task-actions {
  margin-left: auto;
  display: flex;
  gap: 6px;
}
.lead-stage-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.lead-stage-pill {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 700;
  color: #344054;
}
.lead-stage-pill strong {
  font-size: 13px;
}
.lead-stage-pill.active {
  outline: 2px solid var(--navy);
}
.lead-column-head span,
.stage-chip {
  border-radius: 999px;
  background: #eef2f6;
  font-size: 11px;
}
.stage-chip {
  display: inline-block;
  padding: 2px 9px;
  font-weight: 800;
  color: #344054;
  border: 1px solid #d0d5dd;
}
.stage-new {
  background: #eef4ff;
  color: #1d4ed8;
  border-color: #c7d7fe;
}
.stage-contacted {
  background: #f0f9ff;
  color: #026aa2;
  border-color: #b9e6fe;
}
.stage-interested {
  background: #fef6ee;
  color: #b93815;
  border-color: #f9dbaf;
}
.stage-booked {
  background: #f4f3ff;
  color: #5925dc;
  border-color: #d9d6fe;
}
.stage-converted {
  background: #ecfdf3;
  color: #067647;
  border-color: #abefc6;
}
.stage-not-interested {
  background: #f2f4f7;
  color: #475467;
  border-color: #d0d5dd;
}
.stage-follow-up-later {
  background: #fffaeb;
  color: #b54708;
  border-color: #fedf89;
}
#today .today-groups {
  display: grid;
  gap: 8px;
}
.lead-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}
.lead-column-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.lead-column-head span {
  min-width: 25px;
  text-align: center;
  padding: 2px 7px;
}
.lead-column .lead-card {
  box-shadow: 0 1px 2px #1018280a;
  cursor: grab;
}
.lead-card.is-dragging {
  opacity: 0.42;
}
.lead-column-empty {
  padding: 14px 9px;
  text-align: center;
  color: #667085;
  border: 1px dashed #d0d5dd;
  border-radius: 8px;
  font-size: 12px;
}
.payment-summary strong {
  font-size: 15px;
}
.lead-notes {
  font-size: 12px;
  margin: 6px 0 0;
  padding: 8px 9px;
  border-radius: 8px;
  background: #f8fafc;
  color: #344054;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.lead-card .actions {
  flex-wrap: wrap;
  margin-top: 9px;
}
.appt-day {
  margin-bottom: 12px;
}
.appt-day-head {
  font-weight: 800;
  color: var(--navy);
  margin: 0 0 6px;
}
.appt-row,
.payment-summary > div {
  border: 1px solid var(--line);
  display: grid;
}
.appt-row {
  grid-template-columns: 90px 1fr auto;
  gap: 12px;
  align-items: center;
  background: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 6px;
}
.appt-row.status-done {
  opacity: 0.75;
}
.appt-row.status-cancelled {
  opacity: 0.55;
  text-decoration: line-through;
}
.appt-time {
  display: grid;
  font-size: 13px;
}
.payment-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 6px 0 12px;
}
.payment-summary > div {
  background: #f7f9fb;
  border-radius: 8px;
  padding: 8px 10px;
  gap: 3px;
  font-size: 12px;
}
table.compact-table {
  min-width: 0;
}
.mini-pay-list {
  display: grid;
  gap: 2px;
  margin-top: 6px;
  font-size: 12px;
}
.invoice-first-payment {
  background: #f7fbfa;
  border: 1px solid #d9ebe7;
  border-radius: 10px;
  padding: 10px;
}
.instruction-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}
.instruction-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  font-size: 13px;
}
.instr-pick-list {
  max-height: 46vh;
  overflow: auto;
  display: grid;
  gap: 6px;
}
.instr-pick {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 8px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  font-size: 13px;
  cursor: pointer;
}
.instr-pick input {
  width: auto;
  margin-top: 3px;
}
.group-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.group-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 6px 5px 12px;
  background: #fff;
  font-size: 13px;
}
.group-check-grid {
  max-height: 44vh;
  overflow: auto;
  margin-top: 8px;
}
.copy-client-list {
  display: grid;
  gap: 4px;
  max-height: 26vh;
  overflow: auto;
  margin-top: 6px;
}
.copy-client-btn {
  text-align: left;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 8px 10px;
}
.copy-client-btn.active {
  border-color: var(--navy);
  background: #eef3fa;
}
.copy-plan,
.copy-plan-list {
  display: grid;
  gap: 4px;
}
.copy-plan {
  grid-template-columns: 22px 1fr;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 9px;
  font-size: 13px;
}
.copy-plan input,
.progress-chart-head select {
  width: auto;
}
.ex-copy-actions {
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.ex-row-details {
  grid-template-columns: 1fr 1fr 1fr 1fr;
}
.ex-row-details .ex-wide {
  grid-column: span 2;
}
.ex-caution-field input {
  border-color: #f1c38a;
  background: #fffaf2;
}
.lib-caution {
  color: #9a3412;
  font-size: 12px;
  font-weight: 700;
}
.ex-pdf-mod {
  font-size: 9px;
  color: #334155;
}
.ex-pdf-caution {
  font-size: 9px;
  color: #a3160f;
  font-weight: 700;
}
@media (max-width: 760px) {
  .ex-row-details {
    grid-template-columns: 1fr 1fr;
  }
  .ex-row-details .ex-wide {
    grid-column: 1/-1;
  }
}
.progress-chart {
  width: 100%;
  max-width: 760px;
  height: auto;
  display: block;
}
.progress-chart .pc-grid {
  stroke: #e4e7ec;
  stroke-width: 1;
}
.progress-chart .pc-axis {
  fill: #667085;
  font-size: 11px;
}
.progress-chart .pc-value {
  fill: var(--navy);
  font-size: 12px;
  font-weight: 700;
}
.progress-chart .pc-line {
  fill: none;
  stroke: var(--navy);
  stroke-width: 2.5;
}
.progress-chart .pc-dot {
  fill: #fff;
  stroke: var(--navy);
  stroke-width: 2;
}
.progress-chart-head {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 14px 0 6px;
}
.progress-print-title {
  font:
    700 16px "Playfair Display",
    serif;
  color: var(--navy);
  margin: 10px 0;
}
@media print {
  .progress-print .pc-line {
    stroke: #001f52;
  }
}
#leadList,
#leads {
  min-width: 0;
  max-width: 100%;
}
.lead-stage-pill,
.lead-table tbody tr {
  cursor: pointer;
}
.lead-viewbar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: 0 0 12px;
}
.lead-viewbar-hint {
  font-size: 12px;
  margin-left: 6px;
}
.lead-board {
  display: grid;
  grid-template-columns: repeat(var(--lead-cols, 7), minmax(132px, 1fr));
  gap: 8px;
  align-items: start;
  overflow-x: auto;
  padding: 0 0 6px;
  max-width: 100%;
}
.lead-board.single {
  grid-template-columns: minmax(0, 1fr);
}
.lead-board.single .lead-column-cards {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}
.lead-column {
  min-width: 0;
  min-height: 150px;
  max-height: min(66vh, 680px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #f6f8fb !important;
  border: 1px solid var(--line);
  border-radius: 12px;
  transition:
    background 0.15s,
    border-color 0.15s,
    box-shadow 0.15s;
}
.lead-column.is-drop-target {
  background: #edf4ff !important;
  border-color: var(--navy);
  box-shadow: 0 0 0 2px #001f5220;
}
.lead-column-head {
  padding: 9px 10px;
  border-top: 3px solid currentColor;
  border-radius: 12px 12px 0 0;
  font-size: 12.5px;
}
.lead-column-head strong {
  min-width: 0;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.lead-column-cards {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 6px;
  overflow-y: auto;
  min-height: 90px;
  flex: 1 1 auto;
}
.lead-column-more {
  flex: 0 0 auto;
  border: 0;
  border-top: 1px solid var(--line);
  background: #fff;
  color: var(--navy);
  font-weight: 800;
  font-size: 11.5px;
  padding: 8px 6px;
  cursor: pointer;
}
.lead-column-more:hover {
  background: #eef3fa;
}
.lead-card.lc {
  display: grid;
  gap: 2px;
  padding: 8px 9px;
  border-radius: 9px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 3px solid #d0d5dd;
  cursor: pointer;
  text-align: left;
  min-width: 0;
}
.lead-card.lc:focus-visible,
.lead-card.lc:hover {
  border-color: var(--navy);
  box-shadow: 0 2px 8px #10182814;
  outline: 0;
}
.lead-column.stage-new .lc {
  border-left-color: #1d4ed8;
}
.lead-column.stage-contacted .lc {
  border-left-color: #0086c9;
}
.lead-column.stage-follow-up-later .lc {
  border-left-color: #dc6803;
}
.lead-column.stage-interested .lc {
  border-left-color: #e04f16;
}
.lead-column.stage-booked .lc {
  border-left-color: #6938ef;
}
.lead-column.stage-converted .lc {
  border-left-color: #079455;
}
.lead-column.stage-not-interested .lc {
  border-left-color: #98a2b3;
}
.lc-name {
  font-size: 13px;
  color: var(--navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lc-phone {
  font-size: 12px;
  color: #475467;
}
.lc-phone,
.lc-when {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lc-when {
  font-size: 11px;
  font-weight: 800;
}
.lc-when.red {
  color: #b42318;
}
.lc-when.orange {
  color: #c4320a;
}
.lc-when.amber {
  color: #9a6700;
}
.lc-when.later {
  color: #026aa2;
}
.lc-when.none,
.ld-info span {
  font-weight: 700;
}
.lead-detail-card {
  max-width: 640px !important;
}
.ld-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}
.appt-google-box dd,
.ld-title h3 {
  margin: 0;
  overflow-wrap: anywhere;
}
.ld-info {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}
.ld-info > div {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 9px;
  min-width: 0;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.ld-info span {
  display: block;
  font-size: 11px;
  color: #667085;
  margin-bottom: 2px;
}
.ld-goal,
.ld-group h4,
.ld-move {
  margin: 0 0 8px;
  font-size: 13px;
}
.ld-move {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 4px;
  font-weight: 700;
  color: #344054;
}
.ld-move select {
  width: auto;
  min-width: 180px;
}
.ld-group {
  border-top: 1px solid var(--line);
  padding-top: 10px;
  margin-top: 10px;
}
.ld-group h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #667085;
}
.ld-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.clinic-schedule-card .sched-head a.btn,
.ld-actions .btn {
  text-decoration: none;
}
.btn.wa {
  border-color: #25d36680;
  color: #067647;
  background: #f0fdf4;
}
.ld-appts {
  margin-top: 8px;
  display: grid;
  gap: 4px;
  font-size: 12.5px;
}
.ld-hist {
  font-size: 12.5px;
  padding: 5px 0;
  border-bottom: 1px dashed var(--line);
}
.ld-hist:last-child,
.lead-table tbody tr:last-child td {
  border-bottom: 0;
}
.lead-all {
  margin-top: 14px;
  min-width: 0;
  scroll-margin-top: 16px;
}
.lead-all-head {
  display: flex;
  margin-bottom: 10px;
  justify-content: space-between;
  align-items: flex-end;
  gap: 10px;
}
.lead-all-head h3 {
  margin: 0 0 2px;
}
.lead-all-head .muted {
  font-size: 12px;
}
.lead-table-wrap {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
}
table.lead-table {
  min-width: 0;
  width: 100%;
  table-layout: fixed;
  font-size: 13px;
}
.lead-table td,
.lead-table th {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lead-table thead th {
  background: #f8fafc;
  font-size: 11.5px;
  color: #475467;
}
.lead-table tbody tr:focus-visible,
.lead-table tbody tr:hover {
  background: #f5f8fc;
  outline: 0;
}
.lead-table .lt-no {
  width: 48px;
  color: #667085;
  font-weight: 700;
}
.lead-table .lt-phone {
  width: 118px;
}
.lead-table .lt-stage {
  width: 128px;
}
.lead-table .lt-src {
  width: 110px;
}
.lead-table .lt-next {
  width: 130px;
}
.lead-table .lt-added {
  width: 86px;
}
.lead-all-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  font-size: 12px;
}
#diet .layout > div,
#templates .layout > div {
  min-width: 0;
}
.cal-overdue > div,
.cal-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}
.cal-toolbar {
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.cal-nav h3 {
  margin: 0;
  font:
    700 19px "Playfair Display",
    serif;
  color: var(--navy);
  white-space: nowrap;
}
.cal-legend {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: #475467;
  margin-bottom: 8px;
}
.cal-legend .dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-right: 5px;
  vertical-align: -1px;
}
.dot.fu {
  background: #fef0c7;
  border: 1px solid #dc6803;
}
.dot.appt {
  background: #ebe9fe;
  border: 1px solid #6938ef;
}
.cal-overdue {
  background: #fef3f2;
  border: 1px solid #fecdca;
  border-radius: 10px;
  padding: 8px 10px;
  margin-bottom: 10px;
  font-size: 12.5px;
  color: #b42318;
}
.cal-overdue > div {
  gap: 5px;
  margin-top: 6px;
}
.cal-chip,
.cal-day-head em {
  border-radius: 999px;
  font-weight: 700;
}
.cal-chip {
  border: 1px solid #fda29b;
  background: #fff;
  color: #912018;
  padding: 3px 9px;
  font-size: 11.5px;
  cursor: pointer;
}
.cal-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}
.cal-day {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
  min-height: 220px;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.cal-day.today {
  border-color: var(--navy);
  box-shadow: 0 0 0 1px var(--navy);
}
.cal-day.past {
  opacity: 0.8;
}
.cal-day-head {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 7px 8px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  border-radius: 10px 10px 0 0;
  font-size: 12px;
  color: #667085;
}
.cal-day-head strong {
  font-size: 16px;
  color: var(--navy);
}
.cal-day-head em {
  margin-left: auto;
  font-style: normal;
  font-size: 11px;
  background: #eef2f6;
  padding: 1px 7px;
  color: #344054;
}
.cal-day-items {
  display: grid;
  gap: 5px;
  padding: 6px;
  align-content: start;
  max-height: 52vh;
  overflow-y: auto;
}
.cal-empty {
  color: #98a2b3;
  font-size: 12px;
  text-align: center;
}
.cal-item,
.cal-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal-item {
  width: 100%;
  min-width: 0;
  text-align: left;
  border: 1px solid;
  border-radius: 7px;
  padding: 5px 7px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.3;
}
.cal-item small {
  font-weight: 600;
  font-size: 10.5px;
  opacity: 0.85;
}
.cal-item.fu {
  background: #fffaeb;
  border-color: #fedf89;
  color: #93370d;
}
.cal-item.appt {
  background: #f4f3ff;
  border-color: #d9d6fe;
  color: #4a1fb8;
}
.cal-item.appt.status-done {
  opacity: 0.6;
}
.cal-time {
  font-variant-numeric: tabular-nums;
}
.cal-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}
.cal-cell {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 104px;
  padding: 4px;
  min-width: 0;
}
.cal-cell.out {
  background: #f8fafc;
  opacity: 0.6;
}
.cal-cell.today {
  border-color: var(--navy);
  box-shadow: 0 0 0 1px var(--navy);
}
.cal-date {
  border: 0;
  background: 0 0;
  font-weight: 800;
  color: var(--navy);
  font-size: 12.5px;
  padding: 1px 4px;
  cursor: pointer;
}
.cal-cell .cal-item small,
.cal-count {
  display: none;
}
.cal-cell-items {
  display: grid;
  gap: 3px;
}
.cal-cell .cal-item {
  padding: 2px 5px;
  font-size: 11px;
}
.cal-more {
  border: 0;
  background: 0 0;
  text-align: left;
  padding: 1px 4px;
  cursor: pointer;
}
@media (max-width: 1100px) {
  .lead-table .lt-added,
  .lead-table .lt-src {
    display: none;
  }
}
@media (max-width: 760px) {
  .lead-board {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(74vw, 1fr);
    scroll-snap-type: x mandatory;
  }
  .lead-board.single {
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-template-columns: minmax(0, 1fr);
  }
  .lead-column {
    max-height: 62vh;
    scroll-snap-align: start;
  }
  .lead-table .lt-next.is-empty,
  .lead-table thead,
  .lead-viewbar-hint {
    display: none;
  }
  .ld-info {
    grid-template-columns: 1fr 1fr;
  }
  .ld-move {
    flex-wrap: wrap;
  }
  .ld-move select {
    flex: 1 1 100%;
  }
  .ld-actions .btn {
    flex: 1 1 calc(50% - 6px);
    justify-content: center;
  }
  .lead-table-wrap {
    border: 0;
    background: 0 0;
  }
  .lead-table tbody,
  table.lead-table {
    display: block;
  }
  .lead-table tr {
    display: grid;
    grid-template-columns: 34px 1fr auto;
    gap: 2px 8px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 8px 10px;
    margin-bottom: 6px;
  }
  .lead-table td {
    display: block;
    border: 0;
    padding: 0;
    width: auto !important;
  }
  .lead-table .lt-no {
    grid-row: span 3;
  }
  .lead-all {
    scroll-margin-top: 70px;
  }
  .lead-table .lt-stage {
    grid-column: 3;
    grid-row: 1;
  }
  .lead-table .lt-added,
  .lead-table .lt-goal,
  .lead-table .lt-src {
    display: none;
  }
  .lead-table .lt-next,
  .lead-table .lt-phone {
    grid-column: 2 / span 2;
    font-size: 12px;
  }
  .cal-week {
    grid-template-columns: 1fr;
  }
  .cal-day {
    min-height: 0;
  }
  .cal-day-items {
    max-height: none;
  }
  .cal-cell {
    min-height: 54px;
  }
  .cal-cell-items {
    display: none;
  }
  .cal-count {
    display: block;
    margin: 2px auto 0;
    width: max-content;
    background: var(--navy);
    color: #fff;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
  }
  .cal-nav,
  .cal-toolbar {
    width: 100%;
  }
  .modal-overlay {
    padding-top: 58px !important;
  }
  .modal-card {
    max-height: calc(100vh - 58px) !important;
  }
}
.lc-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 4px;
  min-width: 0;
}
.lc-top .lc-name {
  flex: 1 1 auto;
  min-width: 0;
}
.lc-line,
.lc-meta {
  font-size: 11px;
  color: #667085;
  line-height: 1.3;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.lc-line {
  font-size: 11.5px;
  color: #344054;
  line-height: 1.35;
  margin-top: 1px;
}
.appt-google-box dt,
.lc-line b {
  font-weight: 800;
  color: #475467;
}
.lc-notes {
  border-radius: 6px;
  padding: 3px 6px;
  background: #f8fafc;
}
.lc-idle {
  font-size: 10.5px;
  font-weight: 800;
  border-radius: 6px;
  padding: 2px 6px;
  margin-top: 2px;
  width: max-content;
  max-width: 100%;
}
.lc-idle.lvl1 {
  background: #fffaeb;
  color: #93370d;
}
.lc-idle.lvl2 {
  background: #fef3f2;
  color: #b42318;
}
.temp-chip {
  flex: 0 0 auto;
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  border-radius: 999px;
  padding: 1px 7px;
  border: 1px solid;
  line-height: 1.5;
  vertical-align: 1px;
}
.temp-hot {
  background: #fef3f2;
  color: #b42318;
  border-color: #fda29b;
}
.temp-warm {
  background: #fffaeb;
  color: #b54708;
  border-color: #fedf89;
}
.temp-cold {
  background: #eff8ff;
  color: #175cd3;
  border-color: #b2ddff;
}
.off-chip {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  border-radius: 999px;
  padding: 1px 7px;
  background: #f2f4f7;
  color: #475467;
  border: 1px dashed #98a2b3;
}
.lead-idle-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px 14px;
  flex-wrap: wrap;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  margin-bottom: 10px;
  font-size: 12.5px;
}
.lead-idle-bar.has-ready {
  background: #fffbfa;
  border-color: #fecdca;
}
.lead-idle-msg {
  min-width: 0;
  flex: 1 1 300px;
}
.ld-temp,
.lead-idle-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.lead-idle-actions label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  color: #475467;
  margin: 0;
}
.lead-idle-actions select {
  width: auto;
  padding: 4px 24px 4px 7px;
  font-size: 12px;
  min-height: 0;
}
.ld-temp {
  gap: 6px;
  margin-bottom: 10px;
}
.ld-temp > span {
  font-size: 13px;
  font-weight: 700;
  color: #344054;
  margin-right: 4px;
}
.temp-btn {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  color: #475467;
}
.temp-btn.active.temp-hot {
  background: #d92d20;
  border-color: #d92d20;
  color: #fff;
}
.temp-btn.active.temp-warm {
  background: #dc6803;
  border-color: #dc6803;
  color: #fff;
}
.temp-btn.active.temp-cold {
  background: #1570ef;
  border-color: #1570ef;
  color: #fff;
}
.ld-note,
.ld-reply {
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 10px;
}
.ld-reply {
  background: #f0f9ff;
  border: 1px solid #b9e6fe;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.ld-reply span {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #026aa2;
  margin-bottom: 2px;
}
.ld-note {
  font-size: 12.5px;
  font-weight: 600;
}
.ld-note.off {
  background: #f2f4f7;
  color: #344054;
  border: 1px dashed #98a2b3;
}
.ld-note.idle1 {
  background: #fffaeb;
  color: #93370d;
  border: 1px solid #fedf89;
}
.ld-note.idle2 {
  background: #fef3f2;
  color: #b42318;
  border: 1px solid #fecdca;
}
@media (max-width: 760px) {
  .lead-idle-actions label {
    flex: 1 1 100%;
    justify-content: space-between;
  }
  .lead-table .lt-name {
    white-space: normal;
  }
}
.lc-top {
  flex-wrap: wrap;
}
.lc-top .lc-name {
  white-space: normal;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.pay-chip,
.src-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  border: 1px solid;
  white-space: nowrap;
}
.cal-item.appt.src-staff,
.src-chip.src-staff {
  background: #eef4ff;
  border-color: #c7d7fe;
  color: #1d3f8f;
}
.src-chip.src-superprofile {
  background: #ecfdf3;
  border-color: #abefc6;
  color: #067647;
}
.src-chip.src-google {
  background: #f0f9ff;
  border-color: #b9e6fe;
  color: #026aa2;
}
.cal-item.appt.src-superprofile,
.pay-chip.pay-paid {
  background: #ecfdf3;
  border-color: #abefc6;
  color: #067647;
}
.pay-chip.pay-clinic {
  background: #fffaeb;
  border-color: #fedf89;
  color: #93370d;
}
.pay-chip.pay-free {
  background: #f2f4f7;
  border-color: #d0d5dd;
  color: #344054;
}
.pay-chip.pay-check,
.pay-chip.pay-refunded {
  background: #fef3f2;
  border-color: #fecdca;
  color: #b42318;
}
.pay-chip.pay-check {
  border-color: #fda29b;
}
.meet-link,
.sched-tile span {
  font-size: 12px;
  font-weight: 700;
}
.appt-chips,
.sched-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 4px 0 2px;
  align-items: center;
}
.appt-row.src-google {
  border-left: 4px solid #0ba5ec;
}
.appt-row.src-superprofile {
  border-left: 4px solid #17b26a;
}
.appt-row.src-staff {
  border-left: 4px solid #6172f3;
}
.cal-item.appt.src-google {
  background: #f0f9ff;
  border-color: #b9e6fe;
  color: #026aa2;
}
.cal-item.cfu {
  background: #fff6ed;
  border-color: #fddcab;
  color: #b93815;
}
.cal-legend .dot.src-staff {
  background: #c7d7fe;
}
.cal-legend .dot.src-superprofile {
  background: #abefc6;
}
.cal-legend .dot.src-google {
  background: #b9e6fe;
}
.cal-legend .dot.fu {
  background: #fedf89;
}
.cal-legend .dot.appt {
  background: #d9d6fe;
}
.cal-legend {
  flex-wrap: wrap;
}
.gsync-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.gsync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #98a2b3;
  flex: none;
}
.gsync-line.ok .gsync-dot {
  background: #17b26a;
}
.gsync-line.wait .gsync-dot {
  background: #f79009;
}
.gsync-line.bad {
  color: #b42318;
  font-weight: 700;
}
.gsync-line.bad .gsync-dot {
  background: #f04438;
}
.clinic-schedule-card .sched-head {
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}
.clinic-schedule-card .sched-head .actions {
  flex-wrap: wrap;
}
.sched-tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0;
}
.sched-tile {
  display: grid;
  gap: 2px;
  text-align: left;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.sched-tile span {
  color: #667085;
}
.sched-tile strong {
  font-size: 24px;
  color: var(--navy);
  line-height: 1.2;
}
.sched-tile:hover {
  border-color: var(--navy);
}
.sched-alert,
.sched-row {
  gap: 10px;
  align-items: center;
}
.sched-alert {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  background: #fef3f2;
  border: 1px solid #fecdca;
  color: #912018;
  border-radius: 10px;
  padding: 8px 12px;
  margin: 8px 0;
  font-size: 13px;
}
.sched-today h4 {
  margin: 12px 0 6px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #667085;
}
.sched-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}
.sched-row.is-done {
  opacity: 0.6;
}
.sched-time {
  display: grid;
  font-size: 13px;
}
.sched-main {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 13.5px;
}
.appt-google-box {
  background: #f0f9ff;
  border: 1px solid #b9e6fe;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
}
.appt-google-box p {
  margin: 6px 0;
}
.appt-google-box dl {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 3px 10px;
  margin: 6px 0 0;
}
.appt-google-details {
  white-space: pre-wrap;
  max-height: 140px;
  overflow-y: auto;
}
.appt-history {
  display: grid;
  gap: 3px;
  font-size: 12.5px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 9px;
}
.gsync-steps {
  margin: 4px 0 8px;
  padding-left: 20px;
  font-size: 13px;
  line-height: 1.55;
}
.gsync-steps li,
.handover-list li,
.hc-check-list li.hc-check-group .hc-check-list {
  margin: 3px 0;
}
input[readonly]#appointmentDate,
input[readonly]#appointmentDuration,
input[readonly]#appointmentTime {
  background: #f2f4f7 !important;
  color: #475467 !important;
  pointer-events: none;
}
@media (max-width: 760px) {
  .sched-tiles {
    grid-template-columns: 1fr 1fr;
  }
  .sched-row {
    grid-template-columns: 52px minmax(0, 1fr);
  }
  .sched-row .actions {
    grid-column: 1/-1;
    justify-content: flex-end;
  }
  .appt-google-box dl {
    grid-template-columns: 1fr;
  }
}
@media (min-width: 761px) {
  .lead-board:not(.single) {
    align-items: stretch;
  }
  .lead-board:not(.single) .lead-column {
    max-height: none;
  }
}
@media (max-width: 760px) {
  .lead-board:not(.single) {
    align-items: stretch;
  }
}
.lead-board:not(.single) .lead-column-cards {
  flex: 1 1 auto;
  overflow-y: auto;
}
.lc-line,
.lc-meta,
.lc-name {
  overflow-wrap: anywhere;
}
.ld-more summary,
.ld-replies-toggle {
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}
.ld-replies-toggle {
  margin-top: 6px;
  border: 0;
  background: 0 0;
  padding: 0;
  color: var(--navy);
  text-decoration: underline;
}
.ld-replies {
  margin-top: 8px;
  display: grid;
  gap: 6px;
  max-height: 260px;
  overflow-y: auto;
}
.ld-reply-row {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 12.5px;
}
.ld-reply-row .muted {
  font-size: 11px;
}
.task-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 8px;
  font-size: 13px;
}
.task-group,
.today-group {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 8px;
  overflow: hidden;
}
.today-group {
  background: #f8fafc;
}
.task-group-head,
.today-group-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  border: 0;
  background: 0 0;
  padding: 11px 14px;
  text-align: left;
  font: inherit;
  color: var(--navy);
  cursor: pointer;
}
.task-group-head:hover,
.today-group-head:hover {
  background: #f2f5f9;
}
.task-group-chev {
  display: inline-block;
  font-weight: 900;
  transition: transform 0.15s;
}
.task-group.open .task-group-chev,
.today-group.open .task-group-chev {
  transform: rotate(90deg);
}
.task-group-count {
  min-width: 26px;
  text-align: center;
  padding: 1px 8px;
  border-radius: 999px;
  background: #eef2f6;
  color: #344054;
  font-size: 12px;
  font-weight: 800;
}
.task-group-hint {
  margin-left: auto;
  font-size: 11px;
  color: #667085;
  font-weight: 600;
}
.task-group > .task-list {
  padding: 0 12px 12px;
}
.today-group > .today-list {
  padding: 0 10px 10px;
}
.task-type-chip {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid #d0d5dd;
  background: #f8fafc;
  font-size: 11px;
  font-weight: 800;
  color: #344054;
}
.pw-error {
  margin-top: 6px;
  color: #b42318;
  font-weight: 700;
  font-size: 13px;
}
.stage-consulted {
  background: #fdf2fa;
  color: #c11574;
  border-color: #fcceee;
}
.lead-column.stage-consulted .lc {
  border-left-color: #dd2590;
}
.lead-column.stage-consulted .lead-column-head {
  color: #c11574;
}
.lead-column.is-auto .lead-column-head strong::after {
  content: " · auto";
  font-weight: 600;
  font-size: 10.5px;
  color: #667085;
}
.lc-when.none {
  color: #667085;
}
.ld-next {
  display: grid;
  gap: 8px;
  padding: 12px;
  margin: 4px 0 10px;
  border: 1px solid #c7d7fe;
  border-radius: 12px;
  background: #f5f8ff;
}
.ld-next-text {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.ld-next-text > span {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #475467;
}
#calendar .topbar .actions,
.ld-group .ld-actions {
  align-items: center;
}
.ld-group .ld-move {
  margin: 0 0 0 auto;
}
.ld-more {
  margin-top: 10px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}
.ld-more summary {
  color: #475467;
  margin-bottom: 8px;
}
.ld-appts > div {
  font-size: 13px;
  padding: 3px 0;
}
.appt-person-chosen {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 9px 11px;
  border: 1px solid #c7d7fe;
  background: #f5f8ff;
  border-radius: 10px;
  font-size: 13px;
}
.appt-person-results {
  display: grid;
  gap: 4px;
  margin-top: 6px;
  max-height: 240px;
  overflow-y: auto;
}
.appt-person-row {
  text-align: left;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  cursor: pointer;
}
.appt-person-row:focus-visible,
.appt-person-row:hover {
  border-color: var(--navy);
  outline: 0;
}
.appt-person-row.new {
  font-weight: 800;
  color: var(--navy);
  background: #f8fafc;
}
.appt-person-hint {
  font-size: 12px;
  padding: 4px 2px;
}
.appt-newlead {
  margin-top: 8px;
  padding: 10px;
  border: 1px dashed #98a2b3;
  border-radius: 10px;
  background: #fcfcfd;
}
.who-chip {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  background: #eef2f6;
  color: #344054;
  vertical-align: 1px;
}
.appt-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.appt-slots .slot {
  min-width: 64px;
  padding: 7px 8px;
  border-radius: 8px;
  border: 1px solid #c7d7fe;
  background: #fff;
  color: #1d3f8f;
  font-weight: 700;
  font-size: 12.5px;
  cursor: pointer;
}
.appt-slots .slot.on {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.appt-slots .slot:disabled {
  cursor: not-allowed;
  background: #f2f4f7;
  border-color: #eaecf0;
  color: #98a2b3;
}
.appt-slots .slot.taken:disabled {
  text-decoration: line-through;
}
.slot-warn {
  flex-basis: 100%;
  color: var(--danger);
  font-size: 12px;
  font-weight: 700;
}
.appt-time-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.appt-time-row label {
  font-weight: 600;
  font-size: 12px;
  margin: 0;
}
.appt-time-row input {
  width: auto;
}
.appt-more summary {
  cursor: pointer;
  font-weight: 800;
  font-size: 12.5px;
  color: #475467;
}
.appt-more[open] summary {
  margin-bottom: 8px;
}
.appt-form-actions,
.appt-outcome,
.refund-ask {
  align-items: center;
  flex-wrap: wrap;
}
.appt-outcome,
.refund-ask {
  display: inline-flex;
  gap: 6px;
}
.refund-ask {
  padding: 4px 8px;
  border-radius: 8px;
  background: #fef3f2;
  color: #b42318;
  font-size: 12px;
}
.appt-phone {
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
  margin-left: 4px;
}
.appt-set-table input {
  width: 100%;
}
.sched-alert.quiet {
  background: #fffaeb;
  border-color: #fedf89;
  color: #93370d;
}
.cal-ev.appt.sp,
.convert-note {
  background: #ecfdf3;
  color: #05603a;
}
.convert-note {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #abefc6;
  font-size: 13px;
}
.today-actions {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
@media (max-width: 760px) {
  .today-row .today-actions {
    grid-column: 2;
    justify-content: flex-start;
  }
  .ld-group .ld-move {
    margin: 6px 0 0;
    flex: 1 1 100%;
  }
  .appt-slots .slot {
    flex: 1 1 calc(25% - 6px);
    min-width: 0;
  }
}
.cal-kinds {
  font-size: 12.5px;
  font-weight: 700;
  color: #344054;
}
.cal-kind input {
  margin: 0;
}
.inline-check input,
.workdays input {
  width: auto;
  margin: 0;
}
.k-appt i {
  background: #1d4ed8;
}
.k-lead i {
  background: #dc6803;
}
.k-block i {
  background: repeating-linear-gradient(45deg, #98a2b3 0 3px, #eaecf0 3px 6px);
}
.cal-tip {
  font-size: 11.5px;
  margin: 8px 0 0;
}
.cal-ev,
.cal-ev.timed span,
.cal-ev.timed strong {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal-ev {
  width: 100%;
  text-align: left;
  border: 1px solid;
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.3;
  cursor: pointer;
  margin: 0 0 3px;
}
.cal-ev.appt {
  background: #eef4ff;
  border-color: #b2ccff;
  color: #1d3f8f;
}
.cal-ev.appt.sp {
  border-color: #75e0a7;
}
.cal-ev.appt.st-done {
  background: #f2f4f7;
  border-color: #d0d5dd;
  color: #475467;
}
.cal-ev.appt.st-noshow {
  background: #fef3f2;
  border-color: #fecdca;
  color: #b42318;
  text-decoration: line-through;
}
.cal-ev.appt.unmarked {
  border-style: dashed;
  border-color: #f79009;
}
.cal-ev.lead {
  background: #fff6ed;
  border-color: #fddcab;
  color: #b93815;
}
.cal-ev.cfu {
  background: #f0fdf9;
}
.cal-ev.task {
  background: #f4f3ff;
}
.cal-ev.block {
  background: repeating-linear-gradient(45deg, #f2f4f7 0 6px, #e4e7ec 6px 12px);
  border-color: #d0d5dd;
  color: #344054;
}
.cal-ev.timed {
  position: absolute;
  margin: 0;
  white-space: normal;
  z-index: 2;
  box-shadow: 0 1px 2px #1018280f;
}
.cal-ev.timed span,
.cal-ev.timed strong {
  font-size: 12px;
}
.cal-ev.timed span {
  font-weight: 600;
  font-size: 11px;
  opacity: 0.85;
}
.cal-dow,
.cal-strip-day em {
  font-size: 11px;
  font-weight: 800;
}
.cal-dow {
  margin-bottom: 4px;
  color: #667085;
  text-transform: uppercase;
  text-align: center;
}
.cal-dow,
.cal-mgrid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}
.cal-mcell {
  min-height: 104px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 5px;
  cursor: pointer;
}
.cal-mcell:hover {
  border-color: var(--navy);
}
.cal-mcell.out {
  opacity: 0.5;
}
.cal-mcell.today {
  border: 2px solid var(--navy);
}
.cal-mcell.closed {
  background: #f9fafb;
}
.cal-mcell.off {
  background: repeating-linear-gradient(45deg, #f9fafb 0 8px, #f2f4f7 8px 16px);
}
.cal-mhead {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 3px;
}
.cal-mhead strong {
  font-size: 13px;
  margin-right: auto;
}
.cal-count {
  font-size: 10.5px;
  font-weight: 800;
  border-radius: 999px;
  padding: 1px 6px;
}
.cal-count.appt {
  background: #1d4ed8;
  color: #fff;
}
.cal-count.call {
  background: #fff6ed;
  color: #b93815;
}
.cal-off-label {
  font-size: 11px;
  font-weight: 800;
  color: #475467;
  margin-bottom: 3px;
}
.cal-dhead small,
.cal-more,
.cal-off-label.quiet {
  color: #98a2b3;
  font-weight: 700;
}
.cal-more {
  font-size: 11px;
  color: #475467;
}
.cal-wrap {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow-x: auto;
  background: #fff;
}
.cal-grid,
.cal-headrow,
.cal-toprow {
  display: grid;
  min-width: fit-content;
}
.cal-dhead {
  padding: 7px 6px;
  border-left: 1px solid var(--line);
  font-size: 12.5px;
  background: #f8fafc;
  display: flex;
  gap: 6px;
  align-items: baseline;
}
.cal-dhead.today {
  background: #eef4ff;
}
.cal-dhead.today .link-btn {
  color: #1d4ed8;
}
.cal-allday,
.cal-dhead,
.cal-toplabel {
  border-bottom: 1px solid var(--line);
}
.cal-toplabel {
  font-size: 10.5px;
  padding: 6px 4px;
}
.cal-allday {
  border-left: 1px solid var(--line);
  padding: 4px;
  max-height: 118px;
  overflow-y: auto;
  min-width: 0;
}
.cal-none {
  color: #d0d5dd;
  font-size: 12px;
}
.cal-hline {
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1px solid #eaecf0;
}
.cal-hline span {
  position: absolute;
  top: -8px;
  left: 6px;
  font-size: 10.5px;
  color: #667085;
  background: #fff;
  padding: 0 2px;
}
.cal-col {
  position: relative;
  border-left: 1px solid var(--line);
  cursor: copy;
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 65px, #eaecf0 65px, #eaecf0 66px);
  background-size: 100% 66px;
  min-width: 0;
}
.cal-col.closed {
  background-color: #f9fafb;
  cursor: default;
  background-image: repeating-linear-gradient(45deg, #f9fafb 0 8px, #f2f4f7 8px 16px);
}
.cal-col.today {
  background-color: #fbfcff;
}
.cal-now,
.cal-shade {
  position: absolute;
  left: 0;
  right: 0;
  pointer-events: none;
}
.cal-shade {
  background: #f2f4f7cc;
}
.cal-now {
  border-top: 2px solid #d92d20;
  z-index: 3;
}
.cal-now::before {
  content: "";
  position: absolute;
  left: -4px;
  top: -5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d92d20;
}
.sched-week-h {
  margin: 12px 0 6px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #667085;
}
.cal-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}
.cal-strip-day,
.workdays label {
  border: 1px solid var(--line);
  cursor: pointer;
  background: #fff;
}
.cal-strip-day {
  display: grid;
  gap: 1px;
  justify-items: center;
  padding: 8px 4px;
  border-radius: 10px;
  font-size: 12px;
}
.cal-strip-day:hover {
  border-color: var(--navy);
}
.cal-strip-day span {
  font-weight: 800;
  color: #344054;
}
.cal-strip-day strong {
  font-size: 18px;
  color: #1d3f8f;
}
.cal-strip-day small,
.with-txt small {
  font-size: 11px;
  color: #667085;
}
.cal-strip-day em {
  font-style: normal;
  color: #98a2b3;
  margin-top: 6px;
}
.cal-strip-day.today {
  border: 2px solid var(--navy);
}
.cal-strip-day.off {
  background: repeating-linear-gradient(45deg, #f9fafb 0 8px, #f2f4f7 8px 16px);
}
.set-h {
  margin: 6px 0 8px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #475467;
}
.workdays {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.workdays label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13px;
}
.break-row,
.inline-check {
  align-items: center;
  gap: 8px;
}
.inline-check {
  display: inline-flex !important;
  font-weight: 700;
}
.break-row {
  display: flex;
  flex-wrap: wrap;
}
.break-row input {
  width: auto;
  flex: 1 1 110px;
}
.break-row label {
  margin: 0;
  font-weight: 700;
}
.slot-warn.quiet {
  color: #93370d;
  font-weight: 600;
}
@media (max-width: 760px) {
  .cal-mcell {
    padding: 3px;
  }
  .cal-count.call,
  .cal-mitems {
    display: none;
  }
  .cal-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.who-pick,
.who-pick-label {
  display: inline-flex;
  align-items: center;
}
.who-pick {
  height: 40px;
  border: 1px solid #d7e0e8;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(18, 53, 91, 0.04);
  overflow: hidden;
  max-width: 100%;
}
.who-pick-label {
  padding: 0 10px 0 12px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #667085;
  border-right: 1px solid #eaecf0;
  height: 100%;
  background: #f8fafc;
  white-space: nowrap;
}
.who-pick select {
  border: 0;
  border-radius: 0;
  height: 100%;
  padding: 0 30px 0 10px;
  font-weight: 800;
  font-size: 13px;
  color: var(--navy);
  background-color: transparent;
  min-width: 150px;
  max-width: 260px;
  cursor: pointer;
}
.who-pick.is-person {
  border-color: var(--navy);
  box-shadow: 0 0 0 1px var(--navy);
}
.who-pick.is-person .who-pick-label {
  background: var(--navy);
  color: #fff;
  border-right-color: var(--navy);
}
.search-row .who-pick {
  height: auto;
  min-height: 38px;
}
.scope-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  background: #eef4ff;
  border: 1px solid #c7d7fe;
  color: #1d3f8f;
  border-radius: 10px;
  padding: 8px 12px;
  margin: 0 0 12px;
  font-size: 12.5px;
}
.cal-card .scope-note {
  margin: 0 0 10px;
}
.sched-who {
  font:
    700 13px system-ui,
    sans-serif;
  color: #1d4ed8;
}
.card-handler {
  font-size: 12px;
  color: #475467;
  margin: 6px 0 0;
}
.cal-card {
  padding: 16px;
}
.cal-bar,
.cal-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.cal-bar {
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.cal-nav {
  min-width: 0;
}
.cal-arrows {
  display: inline-flex;
  border: 1px solid #d7e0e8;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  height: 38px;
}
.cal-arrows .btn {
  border: 0;
  border-radius: 0;
  height: 100%;
  min-height: 0;
  padding: 0 14px;
  font-size: 13px;
}
.cal-arrows .btn + .btn,
.cal-views .seg-btn + .seg-btn {
  border-left: 1px solid #eaecf0;
}
.cal-arrows .cal-arrow {
  font-size: 18px;
  padding: 0 12px;
  line-height: 1;
}
.cal-views {
  height: 38px;
  flex-wrap: nowrap;
  border-color: #d7e0e8;
}
.cal-views .seg-btn {
  min-width: 72px;
  justify-content: center;
  font-size: 13px;
  padding: 0 14px;
}
.cal-legend-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px 16px;
  flex-wrap: wrap;
  margin: 12px 0;
}
.cal-kinds {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}
.cal-kind {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 11px 0 9px;
  border: 1px solid #e4e7ec;
  border-radius: 999px;
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  color: #344054;
  cursor: pointer;
  user-select: none;
  position: relative;
}
.cal-kind input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.cal-kind i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
  flex: none;
}
.cal-kind:not(.on) {
  color: #98a2b3;
  background: #f9fafb;
  border-style: dashed;
}
.cal-kind:not(.on) i {
  opacity: 0.35;
}
.cal-kind:focus-within {
  outline: 2px solid #b2ccff;
  outline-offset: 1px;
}
.k-gcal i {
  background: #667085;
}
.cal-hours {
  font-size: 12px;
  margin: 0;
  white-space: nowrap;
}
.cal-google-hint {
  background: #f9fafb;
  border: 1px dashed #d0d5dd;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 12.5px;
  color: #475467;
  margin: 0 0 10px;
}
.cal-ev.gcal {
  background: #f2f4f7;
  border-color: #98a2b3;
  color: #344054;
  border-left: 3px solid #475467;
}
.cal-ev.gcal.free {
  background: #fff;
  border-style: dashed dashed dashed solid;
}
@media (max-width: 760px) {
  .cal-bar {
    gap: 10px;
  }
  .cal-nav {
    justify-content: space-between;
  }
  .cal-nav h3 {
    font-size: 16px;
  }
  .cal-nav,
  .cal-views {
    width: 100%;
  }
  .cal-views .seg-btn {
    flex: 1 1 0;
    min-width: 0;
  }
  .cal-hours {
    white-space: normal;
  }
  .who-pick {
    width: 100%;
  }
  .who-pick select {
    flex: 1;
    max-width: none;
    min-width: 0;
  }
}
.appt-with-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.with-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 14px 7px 7px;
  border: 1px solid #d7e0e8;
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  min-height: 44px;
}
.with-chip.on,
.with-chip:hover {
  border-color: var(--navy);
}
.with-chip.on {
  background: #eef4ff;
  box-shadow: 0 0 0 1px var(--navy);
}
.with-av {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #e4e7ec;
  color: #344054;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 13px;
  flex: none;
}
.appt-slots .slot.gbusy.on,
.with-chip.on .with-av {
  background: var(--navy);
  color: #fff;
}
.with-txt {
  display: grid;
  line-height: 1.2;
}
.with-txt strong {
  font-size: 13px;
  color: var(--navy);
}
.appt-with-line {
  font-size: 12px;
  color: #475467;
  margin-top: 3px;
}
.appt-slots .slot.gbusy {
  background: #fffaeb;
  border-color: #fedf89;
  color: #93370d;
}
.appt-slots .slot.gbusy.on {
  border-color: var(--navy);
}
.slot-legend {
  flex-basis: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: #667085;
}
.slot-legend .slot {
  min-width: 0 !important;
  padding: 2px 6px !important;
  font-size: 10px !important;
  cursor: default;
  flex: none !important;
}
.appt-tools {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px 16px;
  margin-bottom: 15px;
  padding: 14px 16px;
}
.appt-tools-title {
  display: grid;
  gap: 2px;
}
.appt-tools-title strong {
  color: var(--navy);
  font-size: 15px;
}
.appt-tools-title span {
  font-size: 12px;
}
.appt-tools-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.appt-tools-btns .btn {
  min-height: 38px;
}
.appt-blocks {
  grid-column: 1/-1;
}
.appt-blocks-empty {
  font-size: 12px;
}
.appt-blocks-head {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 9px 12px;
  cursor: pointer;
  text-align: left;
  color: var(--navy);
  font-size: 13px;
}
.appt-blocks-head .task-group-hint {
  margin-left: auto;
}
.appt-blocks-head[aria-expanded="true"] .task-group-chev {
  transform: rotate(90deg);
}
.appt-blocks-list {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}
.appt-block-row {
  display: grid;
  grid-template-columns: 120px 110px auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: repeating-linear-gradient(45deg, #fff 0 10px, #f9fafb 10px 20px);
  font-size: 12.5px;
}
.appt-block-date {
  font-weight: 800;
  color: var(--navy);
}
@media (max-width: 760px) {
  .appt-tools {
    grid-template-columns: 1fr;
  }
  .appt-tools-btns {
    justify-content: stretch;
  }
  .appt-tools-btns .btn {
    flex: 1 1 auto;
  }
  .appt-block-row {
    grid-template-columns: 1fr auto;
  }
  .appt-block-row .muted {
    grid-column: 1/-1;
  }
}
.today-who {
  display: inline-block;
  margin-left: 8px;
  font-size: 10.5px;
  font-weight: 800;
  color: #1d3f8f;
  background: #eef4ff;
  border: 1px solid #c7d7fe;
  border-radius: 999px;
  padding: 0 8px;
  vertical-align: 1px;
}
.today-kinds {
  font-size: 13px;
  letter-spacing: 2px;
}
#today .topbar .actions .seg {
  height: 40px;
}
#today .topbar .actions .seg-btn {
  padding: 0 14px;
  font-size: 12.5px;
}
.lf-settings {
  display: grid;
  gap: 12px;
}
.lf-box {
  margin: 0 !important;
  padding: 14px !important;
}
.lf-box h4 {
  margin: 0 0 6px;
  color: var(--navy);
}
.lf-box p.muted {
  font-size: 12px;
  margin: 0 0 8px;
}
.lf-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.lf-check,
.lf-switch {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}
.lf-check input,
.lf-switch input {
  width: auto;
  margin: 0;
}
.copy-row {
  display: flex;
  gap: 6px;
}
.copy-row input {
  flex: 1;
  min-width: 0;
}
.drive-steps {
  margin: 6px 0 0;
}
.drive-steps summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--navy);
  font-size: 13px;
}
.drive-steps code {
  background: #f2f4f7;
  padding: 0 4px;
  border-radius: 4px;
}
.notice.drive-ok {
  background: #ecfdf3;
  border-color: #abefc6;
  color: #067647;
}
.notice.drive-bad {
  background: #fef3f2;
  border-color: #fecdca;
  color: #b42318;
}
.gsync-update-note {
  background: #fffaeb;
  border: 1px solid #fedf89;
  border-radius: 9px;
  padding: 8px 11px;
  font-size: 12.5px;
  color: #93370d;
  margin: 0 0 8px;
}
#dashboard .topbar .actions {
  flex-wrap: nowrap;
  justify-content: flex-end;
}
#dashboard #globalSearch {
  width: 250px;
  min-width: 0 !important;
  height: 40px;
}
@media (max-width: 1180px) {
  #dashboard .topbar {
    flex-wrap: wrap;
  }
  #dashboard .topbar .actions {
    flex-wrap: wrap;
    width: 100%;
    justify-content: flex-start;
  }
  #dashboard #globalSearch {
    flex: 1 1 220px;
    width: auto;
  }
}
@media (min-width: 1181px) {
  #appointments .topbar .actions,
  #calendar .topbar .actions,
  #leads .topbar .actions,
  #tasks .topbar .actions,
  #today .topbar .actions {
    flex-wrap: nowrap;
    flex-shrink: 0;
  }
  #appointments .topbar > div:first-child,
  #calendar .topbar > div:first-child,
  #leads .topbar > div:first-child,
  #today .topbar > div:first-child {
    min-width: 0;
  }
}
#backup .inline-check {
  display: flex !important;
}
.appt-slots .slot.gbusy:disabled {
  background: #f2f4f7;
  border-color: #eaecf0;
  color: #98a2b3;
}
#lfColor {
  height: 40px;
  padding: 3px 6px;
  cursor: pointer;
}
.who-fixed {
  cursor: default;
}
.who-fixed-val {
  padding: 0 14px 0 10px;
  font-weight: 800;
  font-size: 13px;
  color: var(--navy);
  white-space: nowrap;
}
.scope-perm-box {
  background: #f6f9ff;
  border: 1px solid #c7d7fe;
  border-radius: 10px;
  padding: 12px;
}
.scope-perm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 8px;
}
.scope-perm {
  display: flex !important;
  gap: 9px;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px 10px;
  cursor: pointer;
  font-weight: 400 !important;
}
.scope-perm input {
  width: auto;
  margin: 3px 0 0;
  flex: none;
}
.scope-perm span {
  display: grid;
  gap: 2px;
}
.scope-perm strong {
  font-size: 13px;
  color: var(--navy);
}
.scope-perm small {
  font-size: 11.5px;
  color: #667085;
}
.handler-chip {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  color: #1d3f8f;
  background: #eef4ff;
  border: 1px solid #c7d7fe;
  border-radius: 999px;
  padding: 1px 8px;
  margin: 1px 0;
  white-space: nowrap;
}
.handler-chip.is-owner {
  color: #344054;
  background: #f2f4f7;
  border-color: #e4e7ec;
}
.handler-line {
  font-size: 11.5px;
}
.bell-push {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
  font-size: 12px;
}
.bell-push .btn[hidden] {
  display: none;
}
.lf-status.is-on {
  border-left: 4px solid #17a56b;
}
.lf-status:not(.is-on) {
  border-left: 4px solid #d0d5dd;
}
.enquiry-banner {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 9000;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  max-width: min(430px, calc(100vw - 28px));
  background: #fff;
  border: 1px solid #abefc6;
  border-left: 5px solid #17a56b;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(16, 24, 40, 0.18);
  padding: 12px 14px;
  font-size: 13px;
}
.enquiry-banner-icon {
  font-size: 22px;
  line-height: 1;
}
.enquiry-banner strong {
  color: #067647;
}
.enquiry-banner .muted {
  font-size: 12.5px;
  margin-top: 3px;
}
.enquiry-banner .actions {
  flex-direction: column;
  gap: 6px;
  margin-left: auto;
}
.cal-grid-scroll {
  max-height: 66vh;
  overflow-y: auto;
  padding-top: 10px;
}
@media (max-width: 760px) {
  .cal-card {
    padding: 10px;
  }
  .cal-nav {
    gap: 8px;
  }
  .cal-arrows .btn {
    padding: 0 11px;
  }
  .cal-legend-row {
    margin: 10px 0;
    gap: 8px;
  }
  .cal-kinds {
    gap: 5px;
  }
  .cal-kind {
    position: relative;
    height: 28px;
    padding: 0 9px 0 8px;
    font-size: 11.5px;
  }
  .cal-wrap {
    -webkit-overflow-scrolling: touch;
  }
  .cal-grid-scroll {
    max-height: 62vh;
  }
  .cal-toplabel {
    font-size: 9.5px;
    padding: 4px 2px;
  }
  .cal-axis .cal-hline span {
    left: 2px;
    font-size: 10px;
  }
  .cal-allday {
    max-height: 90px;
  }
  .cal-ev.timed strong {
    font-size: 11.5px;
  }
  .cal-ev.timed span {
    font-size: 10.5px;
  }
  .cal-mcell {
    min-height: 58px;
  }
  .cal-mhead strong {
    font-size: 12px;
  }
  .cal-count {
    padding: 0 5px;
  }
  .cal-off-label {
    font-size: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  #calendar .topbar .actions {
    width: 100%;
  }
  #calendar .topbar .actions .btn {
    flex: 1 1 auto;
  }
  .enquiry-banner {
    left: 14px;
    right: 14px;
    top: 60px;
    max-width: none;
  }
}
.cal-agenda {
  display: grid;
  gap: 8px;
}
.cal-ag-day {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}
.cal-ag-day.today {
  border: 2px solid var(--navy);
}
.cal-ag-day.off {
  background: repeating-linear-gradient(45deg, #fff 0 10px, #f9fafb 10px 20px);
}
.cal-ag-head {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
  padding: 9px 12px;
  text-align: left;
  cursor: pointer;
  font-size: 13px;
  color: var(--navy);
}
.cal-ag-open {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  color: #1d4ed8;
}
.cal-ag-list {
  display: grid;
  gap: 5px;
  padding: 8px;
}
.cal-ag-row {
  display: flex;
  gap: 10px;
  align-items: baseline;
  width: 100%;
  text-align: left;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  padding: 7px 9px;
  background: #fff;
  cursor: pointer;
  font-size: 12.5px;
  min-height: 40px;
}
.cal-ag-row.appt {
  background: #eef4ff;
  border-color: #b2ccff;
  color: #1d3f8f;
}
.cal-ag-row.appt.sp {
  background: #ecfdf3;
  border-color: #75e0a7;
  color: #05603a;
}
.cal-ag-row.lead {
  background: #fff6ed;
  border-color: #fddcab;
  color: #b93815;
}
.cal-ag-row.cfu {
  background: #f0fdf9;
}
.cal-ag-row.task {
  background: #f4f3ff;
}
.cal-ag-row.block {
  background: repeating-linear-gradient(45deg, #f2f4f7 0 6px, #e4e7ec 6px 12px);
  border-color: #d0d5dd;
  color: #344054;
}
.cal-ag-row.gcal {
  background: #f2f4f7;
  border-left: 3px solid #475467;
  color: #344054;
}
.cal-ag-time {
  font-weight: 800;
  min-width: 42px;
  font-variant-numeric: tabular-nums;
}
.cal-ag-text {
  font-weight: 700;
  overflow-wrap: anywhere;
}
.cal-ag-empty {
  padding: 8px 12px;
  font-size: 12px;
}
.cal-axis {
  position: sticky;
  left: 0;
  z-index: 4;
  background: #fff;
}
.cal-headrow > div:first-child,
.cal-toprow > .cal-toplabel {
  position: sticky;
  left: 0;
  z-index: 4;
  background: #fff;
}
.meal-row:not(.weekly-meal-row):not(.focused-meal-row) {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.meal-row:not(.weekly-meal-row):not(.focused-meal-row) > .m-time {
  grid-column: 1;
  grid-row: 1;
}
.meal-row:not(.weekly-meal-row):not(.focused-meal-row) > .m-meal {
  grid-column: 2/4;
  grid-row: 1;
  align-self: start;
}
.meal-row:not(.weekly-meal-row):not(.focused-meal-row) > .meal-order-actions {
  grid-column: 4;
  grid-row: 1;
  justify-self: end;
}
.meal-row:not(.weekly-meal-row):not(.focused-meal-row) > .m-o1 {
  grid-column: 1;
  grid-row: 2;
}
.meal-row:not(.weekly-meal-row):not(.focused-meal-row) > .m-o2 {
  grid-column: 2;
  grid-row: 2;
}
.meal-row:not(.weekly-meal-row):not(.focused-meal-row) > .m-o3 {
  grid-column: 3;
  grid-row: 2;
}
.meal-row:not(.weekly-meal-row):not(.focused-meal-row) > .m-o4 {
  grid-column: 4;
  grid-row: 2;
}
.meal-row:not(.weekly-meal-row):not(.focused-meal-row) > .m-time {
  min-height: 42px;
}
.meal-row:not(.weekly-meal-row):not(.focused-meal-row) > .meal-order-actions {
  grid-template-columns: 60px 28px 28px 28px;
  align-items: center;
}
.meal-row:not(.weekly-meal-row):not(.focused-meal-row) > .meal-order-actions .meal-drag-handle {
  grid-column: auto;
}
.meal-row textarea.hc-autogrow {
  overflow-y: hidden;
}
.meal-row > input,
.meal-row > textarea {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}
.meal-row [class^="m-o"] {
  overflow-wrap: anywhere;
}
.focused-meal-row,
.weekly-meal-row {
  grid-template-columns: minmax(110px, 150px) minmax(90px, 120px) minmax(0, 1fr) auto;
}
@media (max-width: 760px) {
  .meal-row:not(.weekly-meal-row):not(.focused-meal-row) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .meal-row:not(.weekly-meal-row):not(.focused-meal-row) > .m-time {
    grid-column: 1;
    grid-row: 1;
  }
  .meal-row:not(.weekly-meal-row):not(.focused-meal-row) > .m-meal {
    grid-column: 2;
    grid-row: 1;
  }
  .meal-row:not(.weekly-meal-row):not(.focused-meal-row) > .m-o1 {
    grid-column: 1;
    grid-row: 2;
  }
  .meal-row:not(.weekly-meal-row):not(.focused-meal-row) > .m-o2 {
    grid-column: 2;
    grid-row: 2;
  }
  .meal-row:not(.weekly-meal-row):not(.focused-meal-row) > .m-o3 {
    grid-column: 1;
    grid-row: 3;
  }
  .meal-row:not(.weekly-meal-row):not(.focused-meal-row) > .m-o4 {
    grid-column: 2;
    grid-row: 3;
  }
  .meal-row:not(.weekly-meal-row):not(.focused-meal-row) > .meal-order-actions {
    grid-column: 1/-1;
    grid-row: 4;
    justify-self: start;
  }
  .focused-meal-row,
  .weekly-meal-row {
    grid-template-columns: 1fr;
  }
}
#assessmentPopup input[type="number"]::-webkit-inner-spin-button,
#assessmentPopup input[type="number"]::-webkit-outer-spin-button,
#bodyCompPopup input[type="number"]::-webkit-inner-spin-button,
#bodyCompPopup input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
#assessmentPopup input[type="number"],
#bodyCompPopup input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}
.assess-age-note {
  display: block;
  margin-top: 3px;
  font-size: 11px;
}
@media print {
  body > :not(#printSheet) {
    display: none !important;
  }
  #hcSyncStatus {
    display: none !important;
  }
}
.progress-pdf-options {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 12px 0;
  background: #fbf8f3;
}
.progress-pdf-options h4 {
  margin: 0 0 4px;
  color: var(--navy);
}
.progress-pdf-options .ppo-group {
  margin-top: 10px;
}
.progress-pdf-options .ppo-group > strong {
  display: block;
  font-size: 12px;
  margin-bottom: 6px;
  color: var(--navy);
}
.progress-pdf-options .ppo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 6px 12px;
}
.progress-pdf-options label {
  display: flex;
  gap: 7px;
  align-items: flex-start;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}
.progress-pdf-options label input {
  width: auto;
  margin-top: 2px;
}
.progress-pdf-options label.ppo-disabled {
  opacity: 0.5;
  cursor: default;
}
.progress-pdf-options .ppo-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
  font-size: 11px;
}
.progress-pdf-options textarea {
  min-height: 60px;
}
.progress-print .pdf-remarks p {
  white-space: pre-wrap;
  margin: 0;
  font-size: 10px;
}
.progress-print .progress-history td,
.progress-print .progress-history th {
  font-size: 9px;
}
@media print {
  .progress-print .pdf-box {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}
.drive-card .btn[disabled] {
  opacity: 0.6;
  cursor: wait;
}
.drive-fail-list {
  margin: 6px 0 0;
  padding-left: 18px;
  font-size: 11px;
}
.cal-mode-btn,
.cal-modes {
  background: #fff;
  display: inline-flex;
}
.cal-modes {
  flex-wrap: wrap;
  border: 2px solid var(--navy);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 12px;
}
.cal-mode-btn {
  border: 0;
  color: var(--navy);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  padding: 9px 16px;
  cursor: pointer;
  align-items: center;
  gap: 6px;
}
.cal-mode-btn + .cal-mode-btn {
  border-left: 1px solid #d0d5dd;
}
.cal-mode-btn.active {
  background: var(--navy);
  color: #fff;
}
.cal-mode-btn:focus-visible {
  outline: 3px solid #b2ccff;
  outline-offset: -3px;
}
.cal-mode-count {
  background: #f79009;
  color: #fff;
  border-radius: 999px;
  font-size: 11px;
  padding: 1px 7px;
  line-height: 1.4;
}
.cal-mode-count.late {
  background: #d92d20;
}
.cal-legend-label {
  font-size: 11.5px;
  font-weight: 800;
  color: #475467;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  min-width: 150px;
}
.cal-legend-due {
  margin-top: -4px;
}
.cal-ag-row.cfu,
.cal-ev.cfu {
  background: #ecfdf3;
  border-color: #75e0a7;
  color: #067647;
}
.cal-ag-row.task,
.cal-ev.task {
  background: #f0fdfa;
  border-color: #5eead4;
  color: #0f766e;
}
.k-cfu i {
  background: #16a34a;
}
.k-task i {
  background: #0d9488;
}
.cal-ag-row.due,
.cal-ev.due {
  border: 1px solid transparent;
  border-left: 4px solid;
}
.dNext {
  --due-bg: #f5f3ff;
  --due-fg: #5b21b6;
  --due-bar: #7c3aed;
}
.dEnd {
  --due-bg: #faf5ff;
  --due-fg: #7e22ce;
  --due-bar: #c084fc;
}
.dEx {
  --due-bg: #f0f9ff;
  --due-fg: #075985;
  --due-bar: #0ea5e9;
}
.dProg {
  --due-bg: #f8f1ea;
  --due-fg: #6b3e26;
  --due-bar: #8b5a3c;
}
.dBill {
  --due-bg: #fefce8;
  --due-fg: #854d0e;
  --due-bar: #eab308;
}
.dResume {
  --due-bg: #eef2ff;
  --due-fg: #3730a3;
  --due-bar: #6366f1;
}
.dBday {
  --due-bg: #fdf2f8;
  --due-fg: #9d174d;
  --due-bar: #ec4899;
}
.dLab {
  --due-bg: #f7fee7;
  --due-fg: #3f6212;
  --due-bar: #84cc16;
}
.cal-ag-row.due,
.cal-due-row,
.cal-ev.due {
  background: var(--due-bg);
  color: var(--due-fg);
  border-left-color: var(--due-bar);
}
.cal-ag-row.due.overdue,
.cal-due-row.overdue,
.cal-ev.due.overdue {
  border-color: #d92d20;
  box-shadow: 0 0 0 1px #d92d20 inset;
}
.k-dNext i {
  background: #7c3aed;
}
.k-dEnd i {
  background: #c084fc;
}
.k-dEx i {
  background: #0ea5e9;
}
.k-dProg i {
  background: #8b5a3c;
}
.k-dBill i {
  background: #eab308;
}
.k-dResume i {
  background: #6366f1;
}
.k-dBday i {
  background: #ec4899;
}
.k-dLab i {
  background: #84cc16;
}
.cal-due-sep {
  border-top: 1px dashed #d0d5dd;
  margin: 4px 0 3px;
}
.cal-count.due {
  background: #fff4e5;
  color: #b54708;
}
.cal-count.due.late {
  background: #fee4e2;
  color: #b42318;
}
.cal-duerow .cal-toplabel {
  font-weight: 800;
  color: #b54708;
  background: #fffaf2;
}
.cal-duerow .cal-due-cell {
  background: #fffaf2;
  border-bottom: 2px solid #f4d7b0;
}
.cal-due-board {
  display: grid;
  min-width: fit-content;
}
.cal-due-col {
  border-left: 1px solid var(--line);
  padding: 6px 5px;
  min-height: 320px;
  min-width: 0;
}
.cal-due-col:first-child {
  border-left: 0;
}
.cal-due-col.today {
  background: #f5f8ff;
}
.cal-due-col .cal-ev {
  white-space: normal;
}
.cal-due-day {
  display: grid;
  gap: 8px;
}
.cal-due-row {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  flex-wrap: wrap;
  border: 1px solid #e4e7ec;
  border-left: 5px solid;
  border-radius: 10px;
  padding: 9px 12px;
}
.cal-due-main {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 0;
  background: 0 0;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  padding: 0;
  flex: 1 1 260px;
}
.cal-due-icon {
  font-size: 18px;
  line-height: 1.2;
}
.cal-due-row .actions {
  gap: 6px;
}
.due-late {
  display: inline-block;
  background: #fee4e2;
  color: #b42318;
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 11px;
  font-weight: 800;
}
@media (max-width: 760px) {
  .cal-modes {
    display: flex;
    width: 100%;
  }
  .cal-mode-btn {
    flex: 1 1 0;
    justify-content: center;
    padding: 9px 6px;
    font-size: 12px;
  }
  .cal-legend-label {
    min-width: 0;
    width: 100%;
  }
  .cal-count.due {
    display: block;
    margin: 2px auto 0;
    width: max-content;
  }
}
.cal-ev.due {
  white-space: normal;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  line-height: 1.25;
}
.cal-due-col .cal-ev.due {
  -webkit-line-clamp: 3;
  line-clamp: 3;
}
.inline-select .hc-combo {
  flex: 1;
  min-width: 0;
}
.hc-combo {
  position: relative;
}
.hc-combo-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 4px 6px;
  min-height: 40px;
}
.hc-combo-box:focus-within {
  border-color: var(--navy);
  box-shadow: 0 0 0 2px rgba(0, 31, 82, 0.08);
}
.hc-combo-box > input {
  flex: 1 1 140px;
  min-width: 120px;
  border: 0;
  padding: 5px 4px;
  background: 0 0;
  box-shadow: none;
}
.hc-combo-chips {
  display: contents;
}
.hc-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #eef3fb;
  color: var(--navy);
  border: 1px solid #cfdcf0;
  border-radius: 999px;
  padding: 3px 4px 3px 10px;
  font-size: 12px;
  font-weight: 700;
  max-width: 100%;
}
.hc-chip button {
  border: 0;
  background: 0 0;
  color: var(--navy);
  font-size: 15px;
  line-height: 1;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
}
.hc-chip button:hover {
  background: #dbe6f5;
}
.hc-combo-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 130;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: 0 14px 34px rgba(18, 53, 91, 0.18);
  max-height: 260px;
  overflow: auto;
}
.hc-combo-item {
  padding: 9px 11px;
  font-size: 13px;
  cursor: pointer;
  border-bottom: 1px solid #f0f2f5;
}
.hc-combo-item:last-child {
  border-bottom: 0;
}
.hc-combo-item.active,
.hc-combo-item:hover {
  background: #f3f7fa;
}
.appt-brief dt,
.handover-group summary,
.hc-combo-item.on {
  font-weight: 700;
  color: var(--navy);
}
.hc-combo-empty {
  padding: 11px;
  font-size: 12px;
  color: var(--muted);
}
.tag.goal-tag {
  background: #eef3fb;
  color: var(--navy);
}
.invoice-client-info {
  background: #f7f9fc;
  border: 1px dashed #cfdcf0;
  border-radius: 9px;
  padding: 9px 11px;
  font-size: 12px;
}
.svc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.svc-chip {
  border: 1px solid #cfdcf0;
  background: #fff;
  color: var(--navy);
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.svc-chip.program {
  background: #fff4e8;
  border-color: #f2d3ad;
}
.svc-chip:hover {
  background: #eef3fb;
}
.handover-group {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  margin: 10px 0;
  background: #fbfaf7;
}
.handover-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.handover-head label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}
.handover-head select {
  width: auto;
  min-width: 190px;
  max-width: 100%;
}
.handover-group details {
  margin-top: 6px;
  font-size: 12px;
}
.handover-group summary {
  cursor: pointer;
}
.handover-list {
  margin: 6px 0 0;
  padding-left: 18px;
  max-height: 190px;
  overflow: auto;
}
.appt-brief {
  background: #f4f8f5;
  border: 1px solid #cfe5d6;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12px;
}
.appt-brief dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 3px 12px;
  margin: 8px 0 0;
}
.appt-brief dd {
  margin: 0;
}
.appt-view-only #apptPersonChosen .link-btn,
.appt-view-only .slot,
.appt-view-only .with-chip,
.appt-view-only input,
.appt-view-only select,
.appt-view-only textarea {
  pointer-events: none;
}
.appt-view-only input,
.appt-view-only select,
.appt-view-only textarea {
  background: #f6f7f8;
}
@media (max-width: 760px) {
  .handover-head select {
    min-width: 0;
    width: 100%;
  }
  .handover-head label {
    width: 100%;
  }
  .appt-brief dl {
    grid-template-columns: 1fr;
  }
}
.ex-row-order {
  display: flex;
  gap: 4px;
  align-items: end;
  justify-content: flex-end;
}
.ex-row-order .btn {
  width: 30px;
  height: 30px;
  padding: 0;
  display: grid;
  place-items: center;
}
.ex-drag-handle {
  height: 30px;
  padding: 0 8px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #f8fafc;
  color: #334155;
  font-weight: 800;
  font-size: 11px;
  cursor: grab;
  touch-action: none;
  white-space: nowrap;
}
.ex-drag-handle:active {
  cursor: grabbing;
}
.ex-row-no,
.filter-chip span {
  color: var(--muted);
  font-weight: 800;
  margin-left: 4px;
}
.exercise-builder-row.ex-row-dragging {
  opacity: 0.5;
  border: 2px dashed #002b67;
  background: #edf4ff;
}
.exercise-builder-row.ex-row-moved {
  box-shadow: 0 0 0 2px #f0a85a inset;
  transition: box-shadow 0.2s;
}
.ex-session-move {
  display: inline-flex;
  gap: 4px;
}
.ex-session-move .btn {
  width: 30px;
  height: 30px;
  padding: 0;
}
.ex-add-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.ex-browse-btn,
.meal-row > .meal-nutri strong,
.nutri-hint strong {
  color: var(--navy);
}
.filter-box {
  display: grid;
  gap: 7px;
}
.filter-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}
.filter-chip-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--navy);
  min-width: 112px;
}
.filter-chip {
  border: 1px solid #d7cdbf;
  background: #fff;
  color: var(--navy);
  border-radius: 999px;
  padding: 5px 10px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1.2;
}
.filter-chip span {
  font-weight: 600;
  margin-left: 2px;
}
.filter-chip.active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.filter-chip.active span {
  color: #dbe4f0;
}
.filter-chip,
.filter-count,
.nutri-target .field label {
  font-size: 11px;
}
.filter-count .link-btn {
  background: 0 0;
  border: 0;
  padding: 0;
  color: var(--navy);
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  font-size: 11px;
}
.focus-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 2px 0 6px;
}
.focus-chip {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e8f4f2;
  color: #185d58;
  border: 1px solid #b9dcd7;
}
.focus-chip.auto {
  background: #f6f7f8;
  color: #4b5563;
  border-style: dashed;
  border-color: #cfd5dc;
}
.food-picker-filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}
.food-picker-filters #foodPickerSearch {
  grid-column: 1/-1;
}
.master-item-actions {
  display: inline-flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.ex-pick-card {
  max-width: 860px;
  width: 100%;
  display: grid;
  gap: 10px;
}
.ex-pick-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 6px;
  max-height: 46vh;
  overflow: auto;
  padding: 2px;
}
.ex-pick-item {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 9px;
  background: #fffdfa;
  cursor: pointer;
}
.ex-pick-item:has(input:checked) {
  border-color: var(--navy);
  background: #edf4ff;
}
.ex-pick-item input {
  margin-top: 3px;
}
.ex-pick-item small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 2px;
}
.ex-pick-foot {
  justify-content: flex-end;
  align-items: center;
}
.ex-pick-foot .muted {
  margin-right: auto;
  font-size: 12px;
}
.diet-file-box {
  display: grid;
  gap: 12px;
}
.diet-file-current,
.diet-file-tick {
  display: flex;
  gap: 8px;
  align-items: center;
}
.diet-file-tick {
  font-weight: 700;
  color: var(--navy);
}
.diet-file-current {
  flex-wrap: wrap;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px 11px;
  background: #fffdfa;
}
.diet-file-chip {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fff1e2;
  color: #8a4b12;
  border: 1px solid #f0c99c;
  white-space: nowrap;
}
@media (max-width: 760px) {
  .ex-session-card .exercise-builder-row .ex-row-order {
    grid-column: 1/-1;
    justify-content: flex-start;
  }
  .ex-drag-handle,
  .ex-row-order .btn {
    height: 36px;
  }
  .ex-row-order .btn {
    width: 38px;
  }
  .ex-add-actions {
    grid-template-columns: 1fr;
  }
  .filter-chip-label {
    min-width: 0;
    width: 100%;
  }
  .filter-chip {
    padding: 7px 11px;
  }
  .ex-pick-list {
    grid-template-columns: 1fr;
    max-height: 52vh;
  }
  .ex-pick-foot {
    flex-wrap: wrap;
  }
}
#exerciseLibFocus input[type="checkbox"],
.diet-file-tick input[type="checkbox"],
.ex-pick-item input[type="checkbox"],
.ex-session-head .ex-rest-toggle input[type="checkbox"] {
  width: auto;
  min-width: 0;
  flex: 0 0 auto;
  height: auto;
}
.ex-row-order .btn,
.ex-session-move .btn {
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
}
.ex-pick-item span {
  flex: 1;
  min-width: 0;
}
@media (max-width: 760px) {
  .ex-session-head .ex-session-move {
    order: -1;
  }
  .ex-session-move .btn {
    width: 38px;
    height: 34px;
  }
  .ex-pick-card {
    padding-bottom: 56px;
  }
  .ex-pick-foot .btn {
    flex: 1 1 140px;
  }
}
.client-card {
  scroll-margin-top: 16px;
}
.client-card.client-card-return {
  animation: hcClientReturn 2.4s ease-out;
}
@media (max-width: 760px) {
  .client-card {
    scroll-margin-top: 70px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .client-card.client-card-return {
    animation: none;
    outline: 3px solid #f2a65a;
  }
}
.diet-builder-head {
  margin-bottom: 12px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.diet-builder-head .section-title {
  margin-bottom: 0;
}
.meal-row > .meal-nutri {
  grid-column: 1/-1;
  grid-row: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  padding: 6px 8px;
  border-radius: 7px;
  background: #f4f8fb;
  border: 1px dashed #d5e0ea;
  font-size: 12px;
  color: #33475b;
}
.meal-row > .meal-nutri[hidden] {
  display: none;
}
.meal-nutri-chips {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
}
.meal-nutri-chip {
  padding: 1px 7px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #d5e0ea;
  font-size: 11px;
  white-space: nowrap;
}
.meal-nutri-chip.warn {
  background: #fff4e5;
  border-color: #f0b35a;
  color: #8a4b00;
  font-weight: 700;
}
.meal-nutri-miss {
  color: var(--muted);
  font-size: 11px;
}
.meal-nutri-warn {
  color: #8a4b00;
  font-weight: 700;
  font-size: 11px;
}
@media (min-width: 761px) {
  .meal-row:not(.weekly-meal-row):not(.focused-meal-row) > .meal-nutri {
    grid-row: 3;
  }
}
.day-head-right {
  display: inline-flex;
  gap: 10px;
  align-items: center;
}
.day-nutri {
  font:
    600 12px "DM Sans",
    sans-serif;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}
.day-nutri:empty {
  display: none;
}
.day-nutri.ok {
  background: #d9f2e4;
  color: #0d5132;
}
.day-nutri.warn {
  background: #ffe9c7;
  color: #7a4300;
}
.day-nutri.bad {
  background: #ffd9d6;
  color: #8c1d14;
}
#diet aside.sticky {
  max-height: calc(100vh - 30px);
  overflow: auto;
  overscroll-behavior: contain;
}
@media (max-width: 1120px) {
  #diet aside.sticky {
    max-height: none;
    overflow: visible;
  }
}
.nutri-card .section-title {
  margin-bottom: 8px;
}
.nutri-target {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.nutri-target .field:first-child {
  grid-column: 1/-1;
}
.nutri-target small {
  font-size: 10.5px;
  margin-top: 2px;
  display: block;
}
.nutri-card .section-title .muted {
  display: block;
  font-size: 11px;
  margin-top: 2px;
}
.nutri-target input,
.nutri-target select {
  padding: 7px 8px;
}
.nutri-hint {
  font-size: 11px;
  color: var(--muted);
  margin: 6px 0 10px;
  line-height: 1.45;
}
.link-btn {
  background: 0 0;
  border: 0;
  padding: 0;
  color: var(--teal, #2f7f7b);
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  font-size: inherit;
}
.nutri-miss li small,
.nutri-sub {
  color: var(--muted);
  font-size: 11px;
}
.nutri-sub {
  margin-bottom: 6px;
}
.nutri-bar-row {
  margin: 8px 0;
}
.nutri-bar-label {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}
.nutri-bar-label strong {
  color: var(--navy);
  text-align: right;
}
.nutri-bar {
  position: relative;
  height: 9px;
  border-radius: 999px;
  background: #edf1f5;
  margin-top: 4px;
  overflow: hidden;
}
.nutri-bar span {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: 999px;
  background: #8aa4bd;
}
.nutri-bar i {
  position: absolute;
  top: -2px;
  bottom: -2px;
  width: 2px;
  background: var(--navy);
}
.nutri-bar-row.ok .nutri-bar span {
  background: #2e9d63;
}
.nutri-bar-row.warn .nutri-bar span {
  background: #e09a2d;
}
.nutri-bar-row.bad .nutri-bar span {
  background: #d14b3d;
}
.nutri-note {
  font-size: 11px;
  color: var(--muted);
  margin: -2px 0 6px;
}
.nutri-split {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  font-size: 12px;
  margin: 8px 0;
  padding: 8px;
  background: #f7f9fb;
  border-radius: 8px;
}
.nutri-details > summary,
.nutri-split b {
  color: var(--navy);
  font-weight: 700;
}
.nutri-coverage {
  font-size: 12px;
  padding: 6px 8px;
  border-radius: 7px;
  background: #fff4e5;
  color: #7a4300;
  margin: 6px 0;
}
.nutri-coverage.ok {
  background: #e9f7ef;
  color: #0d5132;
}
.nutri-empty {
  font-size: 12px;
  padding: 10px;
  background: #f7f9fb;
  border-radius: 8px;
  line-height: 1.5;
}
.nutri-details {
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 9px;
  background: #fff;
}
.nutri-details > summary {
  cursor: pointer;
  font-size: 12px;
}
.nutri-details ul {
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}
.nutri-days {
  width: 100%;
  min-width: 0;
  font-size: 12px;
  margin-top: 6px;
  border-collapse: collapse;
}
.nutri-days td,
.nutri-days th {
  padding: 4px 6px;
  border-bottom: 1px solid #eef2f5;
  text-align: left;
}
.nutri-day-k.ok {
  color: #0d5132;
  font-weight: 700;
}
.nutri-day-k.warn {
  color: #8a4b00;
  font-weight: 700;
}
.food-item small.food-item-issue,
.nutri-day-k.bad {
  color: #a3241a;
  font-weight: 700;
}
.nutri-balance {
  margin-top: 8px;
  padding: 7px 9px;
  border-radius: 8px;
  background: #fff4e5;
  font-size: 12px;
  color: #7a4300;
}
.nutri-balance ul {
  margin: 4px 0 0 16px;
  padding: 0;
}
.nutri-warnings {
  border-color: #f3c1bb;
  background: #fff7f6;
}
.nutri-warnings > summary {
  color: #a3241a;
}
.nutri-warnings li {
  font-size: 12px;
  padding: 5px 7px;
  border-radius: 6px;
  background: #fff;
  border-left: 3px solid #e09a2d;
}
.nutri-warnings li.danger {
  border-left-color: #d14b3d;
}
.nutri-warnings li span {
  color: #5b6573;
}
.nutri-miss li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 8px;
  align-items: center;
  font-size: 12px;
  padding: 5px 0;
  border-bottom: 1px solid #f0f2f5;
}
.nutri-miss li small {
  grid-column: 1;
}
.nutri-miss li .btn {
  grid-column: 2;
  grid-row: 1 / span 2;
}
.diet-kcal-chip {
  display: inline-block;
  margin-top: 3px;
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #eef4fa;
  color: var(--navy);
}
.hc-ac {
  position: fixed;
  z-index: 5000;
  background: #fff;
  border: 1px solid #cfd8e2;
  border-radius: 10px;
  box-shadow: 0 14px 34px rgba(13, 41, 72, 0.2);
  overflow: hidden;
  max-height: 380px;
  overflow-y: auto;
}
.hc-ac[hidden] {
  display: none;
}
.hc-ac-item {
  padding: 7px 10px;
  cursor: pointer;
  border-bottom: 1px solid #f0f3f6;
}
.hc-ac-item.sel,
.hc-ac-item:hover {
  background: #eef5fc;
}
.hc-ac-item.warn {
  background: #fff8f0;
}
.hc-ac-item.warn.sel {
  background: #fed;
}
.hc-ac-name {
  font-size: 13px;
  color: var(--navy);
}
.hc-ac-name span {
  color: var(--muted);
  font-size: 12px;
}
.hc-ac-meta {
  font-size: 11px;
  color: #5b6573;
  margin-top: 2px;
}
.hc-ac-warn {
  display: block;
  color: #a3241a;
  font-weight: 700;
  margin-top: 2px;
}
.hc-ac-hint {
  font-size: 10.5px;
  color: var(--muted);
  padding: 5px 10px;
  background: #f7f9fb;
}
.food-picker-habit {
  font-size: 11px;
  margin: 4px 0;
  padding: 5px 8px;
  border-radius: 7px;
  background: #eef5fc;
  color: var(--navy);
}
.food-bulk-bar[hidden],
.food-picker-habit[hidden] {
  display: none;
}
.food-item-warn {
  border-color: #f0b35a;
  background: #fffaf3;
}
.copy-day-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 12px;
}
.copy-day-grid label,
.copy-day-mode label {
  display: flex;
  gap: 7px;
  align-items: center;
  font-size: 13px;
}
.copy-day-mode {
  display: grid;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f7f9fb;
}
.hc-small-body {
  max-height: min(68vh, 640px);
  overflow: auto;
}
.food-bulk-bar {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  margin-bottom: 10px;
  border-radius: 10px;
  background: var(--navy);
  color: #fff;
  box-shadow: 0 8px 20px rgba(13, 41, 72, 0.18);
}
.food-bulk-bar .btn:not(.primary):not(.danger) {
  background: #fff;
}
.food-table .sel-col {
  width: 34px;
  text-align: center;
}
.food-table .sel-col input {
  height: 17px;
}
.food-used-chip {
  display: inline-block;
  margin-top: 3px;
  font-size: 10.5px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #e9f7ef;
  color: #0d5132;
}
.food-kcal-check {
  margin-bottom: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff4e5;
  color: #7a4300;
  font-size: 12px;
  display: grid;
  gap: 3px;
}
.food-kcal-check[hidden] {
  display: none;
}
.hc-check-sec {
  margin-bottom: 14px;
}
.hc-check-sec h4 {
  margin: 0 0 2px;
  color: var(--navy);
}
.hc-check-sec p {
  margin: 0 0 6px;
  font-size: 12px;
}
.hc-check-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 5px;
}
.hc-check-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 12px;
}
.hc-check-list li.hc-check-group {
  display: block;
  padding: 6px;
  background: #fbfcfd;
}
.hc-check-actions {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}
.hc-check-calc,
.hc-check-ok {
  color: #a3241a;
  font-weight: 700;
}
.hc-check-ok {
  padding: 14px;
  border-radius: 9px;
  background: #e9f7ef;
  color: #0d5132;
}
.hc-tag-list,
.hc-tag-row {
  display: grid;
  gap: 6px;
}
.hc-tag-row {
  grid-template-columns: minmax(160px, 230px) 1fr;
  gap: 8px;
  align-items: center;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.hc-tag-food {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 12.5px;
}
.hc-tag-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.hc-tag-chip {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  font-size: 11px;
  padding: 2px 7px;
  border: 1px solid #d5e0ea;
  border-radius: 999px;
  background: #fff;
}
.hc-tag-chip:has(input:checked) {
  background: #e8f1fa;
  border-color: #8fb1d3;
  color: var(--navy);
  font-weight: 700;
}
@media (max-width: 640px) {
  .copy-day-grid,
  .hc-tag-row {
    grid-template-columns: 1fr;
  }
}
.imp-table {
  font-size: 12px;
}
.imp-table tr.imp-new td:nth-child(3) {
  color: #0d5132;
  font-weight: 700;
}
.warn-tag {
  background: #fff4e5 !important;
  color: #7a4300 !important;
}
.copy-day-grid input,
.copy-day-mode input,
.food-table .sel-col input,
.hc-tag-row input[type="checkbox"],
.hc-vegan-row input {
  width: auto;
  padding: 0;
  margin: 0;
  flex: 0 0 auto;
}
.hc-tag-food {
  justify-content: flex-start;
  text-align: left;
}
.hc-tag-chip,
.type-chip {
  font-weight: 600;
  white-space: nowrap;
}
.type-chip {
  display: inline-block;
  margin: 1px 2px 1px 0;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: #eef2f6;
  color: #344054;
}
.type-chip.type-vegetarian {
  background: #e6f4ea;
  color: #146c2e;
}
.type-chip.type-vegan {
  background: #dff3ef;
  color: #0f5c52;
}
.type-chip.type-eggetarian {
  background: #fff3d6;
  color: #7a5200;
}
.type-chip.type-non-vegetarian {
  background: #fde4e1;
  color: #9b1c12;
}
.food-recipe-mode {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 8px;
  font-size: 11px;
}
.food-recipe-mode label {
  font-size: 11px;
  white-space: nowrap;
}
.food-recipe-mode select {
  padding: 5px 7px;
  font-size: 12px;
}
.food-recipe-link {
  display: inline-block;
  margin-top: 6px;
  font-size: 11.5px;
}
.food-recipe-link,
.hc-ac-recipe {
  color: var(--teal, #2f7f7b);
  font-weight: 700;
}
.hc-vegan-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 12px;
}
.hc-vegan-row {
  display: flex;
  gap: 7px;
  align-items: center;
  font-size: 12.5px;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-weight: 500;
}
@media (max-width: 640px) {
  .hc-vegan-list {
    grid-template-columns: 1fr;
  }
}

/* ===================== V50 ===================== */
/* "Show more" under long lists */
.hc-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 0 4px;
}
.hc-older-note {
  font-size: 12px;
  margin: 8px 2px 0;
}

/* V50.3 — small Bold / Italic / Underline bar (shows only while text is selected in a box) */
.hc-fmt-bar {
  position: fixed;
  z-index: 10100;
  display: flex;
  gap: 2px;
  padding: 3px;
  background: #fff;
  border: 1px solid #cfd8e2;
  border-radius: 9px;
  box-shadow: 0 6px 18px rgba(13, 41, 72, 0.18);
}
.hc-fmt-bar[hidden] {
  display: none;
}
.hc-fmt-bar button {
  width: 28px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--navy);
  font: 15px/1 Georgia, "Times New Roman", serif;
}
.hc-fmt-bar button:hover {
  background: #eef2f7;
}
.hc-fmt-bar button.on {
  background: var(--navy);
  color: #fff;
}
@media print {
  .hc-fmt-bar {
    display: none !important;
  }
}

/* V50.5 — see-through layer that shows Gujarati / Hindi bold & italic inside a text box */
.hc-rt-layer {
  position: absolute;
  left: 0;
  top: 0;
  margin: 0;
  overflow: hidden;
  pointer-events: none;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  color: transparent;
  background: transparent;
  border-style: solid;
  border-color: transparent;
  box-sizing: border-box;
  z-index: 1;
  scrollbar-width: none;
}
.hc-rt-layer::-webkit-scrollbar {
  display: none;
}
.hc-rt-b,
.hc-rt-bi {
  -webkit-text-stroke-width: 0.6px;
  paint-order: stroke fill;
}
.hc-rt-i,
.hc-rt-bi {
  background: rgba(255, 204, 153, 0.45);
  border-radius: 2px;
}
.hc-rt-i {
  color: transparent !important;
}
@media print {
  .hc-rt-layer {
    display: none !important;
  }
}

/* ===== V51 — Lead form builder (Google-Forms style) ===== */
.lf-layout {
  display: grid;
  gap: 16px;
  align-items: start;
}
@media (min-width: 1240px) {
  .lf-layout {
    grid-template-columns: minmax(0, 1fr) 390px;
  }
}
.lf-preview {
  display: none;
}
@media (min-width: 1240px) {
  .lf-preview {
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 12px;
    height: calc(100vh - 24px);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(13, 41, 72, 0.06);
  }
}
.lf-preview-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.lf-preview-head strong {
  color: var(--navy);
  font-size: 13px;
}
.lf-preview-head .btn {
  margin-left: auto;
}
.lf-preview iframe {
  flex: 1;
  width: 100%;
  border: 0;
  background: #f3f5f7;
}
.lf-builder {
  display: grid;
  gap: 14px;
}
.lfs {
  border: 1px solid #e4e7ec;
  border-top: 4px solid var(--navy);
  border-radius: 12px;
  background: #fbfcfd;
  padding: 12px;
  display: grid;
  gap: 8px;
}
.lfs-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.lfs-num {
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: var(--navy);
  padding: 3px 9px;
  border-radius: 999px;
}
.lfs-tools {
  display: flex;
  gap: 5px;
}
.lfs-title {
  font-size: 17px !important;
  font-weight: 700;
  color: var(--navy);
  border: 0 !important;
  border-bottom: 1px solid transparent !important;
  border-radius: 0 !important;
  background: transparent !important;
  padding: 6px 2px !important;
}
.lfs-desc {
  border: 0 !important;
  border-bottom: 1px solid transparent !important;
  border-radius: 0 !important;
  background: transparent !important;
  padding: 4px 2px !important;
  min-height: 0 !important;
  resize: none;
  font-size: 13px;
  color: #475467;
  overflow: hidden;
}
.lfs-title:hover,
.lfs-desc:hover {
  border-bottom-color: #d0d5dd !important;
}
.lfs-title:focus,
.lfs-desc:focus {
  outline: none;
  border-bottom: 2px solid var(--navy) !important;
}
.lfs-qs {
  display: grid;
  gap: 8px;
}
.lfs-empty {
  font-size: 12px;
  color: var(--muted);
  padding: 10px;
  border: 1px dashed #d0d5dd;
  border-radius: 10px;
  text-align: center;
}
.lfs-add {
  display: flex;
}
.lfq {
  background: #fff;
  border: 1px solid #e4e7ec;
  border-left: 4px solid transparent;
  border-radius: 10px;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.lfq:not(.active) {
  cursor: pointer;
}
.lfq:not(.active):hover,
.lfq:not(.active):focus-visible {
  border-color: #cfd8e2;
  border-left-color: #cfd8e2;
  box-shadow: 0 2px 8px rgba(13, 41, 72, 0.06);
  outline: none;
}
.lfq.active {
  border-left-color: var(--navy);
  box-shadow: 0 6px 18px rgba(13, 41, 72, 0.12);
  padding: 12px;
  display: grid;
  gap: 8px;
}
.lfq-sum {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
}
.lfq-sum-main {
  display: grid;
  gap: 3px;
  flex: 1;
  min-width: 0;
}
.lfq-sum-main strong {
  color: #101828;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.lfq-req {
  color: #d92d20;
}
.lfq-meta {
  font-size: 11.5px;
  color: var(--muted);
}
.lfq-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}
.lfq-chips span {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f2f4f7;
  color: #344054;
}
.lfq-edit {
  color: #98a2b3;
  font-size: 15px;
}
.lfq-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 8px;
}
@media (max-width: 640px) {
  .lfq-top {
    grid-template-columns: 1fr;
  }
}
.lfq-label {
  font-size: 15px !important;
  font-weight: 700;
  background: #f8fafc !important;
  border: 0 !important;
  border-bottom: 2px solid #d0d5dd !important;
  border-radius: 8px 8px 0 0 !important;
}
.lfq-label:focus {
  outline: none;
  border-bottom-color: var(--navy) !important;
}
.lfq-help {
  font-size: 12.5px !important;
  border: 0 !important;
  border-bottom: 1px solid #e4e7ec !important;
  border-radius: 0 !important;
  padding: 6px 2px !important;
}
.lfq-help:focus {
  outline: none;
  border-bottom: 2px solid var(--navy) !important;
}
.lfq-opts {
  display: grid;
  gap: 4px;
}
.lfq-opt {
  display: flex;
  align-items: center;
  gap: 8px;
}
.lfq-opt input {
  flex: 1;
  min-width: 0;
  border: 0 !important;
  border-bottom: 1px solid transparent !important;
  border-radius: 0 !important;
  padding: 6px 2px !important;
}
.lfq-opt input:hover {
  border-bottom-color: #e4e7ec !important;
}
.lfq-opt input:focus {
  outline: none;
  border-bottom: 2px solid var(--navy) !important;
}
.lfq-mark {
  flex: none;
  width: 16px;
  height: 16px;
  border: 2px solid #98a2b3;
  border-radius: 50%;
  font-size: 11px;
  color: #667085;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.lfq-mark.sq {
  border-radius: 3px;
}
.lfq-mark.num {
  border: 0;
  width: 20px;
}
.lfq-x {
  flex: none;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #667085;
  font-size: 18px;
  line-height: 1;
}
.lfq-x:hover {
  background: #f2f4f7;
  color: #b42318;
}
.lfq-other-text {
  flex: 1;
  font-size: 13px;
  color: #475467;
  padding: 6px 2px;
}
.lfq-opt-add {
  font-size: 13px;
  padding: 4px 0;
}
.lfq-opt-add .link-btn {
  font-weight: 700;
}
.lfq-fixed {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.lfq-fixed span {
  font-size: 12px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #f2f4f7;
}
.lfq-fixed small {
  width: 100%;
}
.lfq-note {
  font-size: 11.5px;
  color: #1d4f91;
  background: #eef4ff;
  border-radius: 7px;
  padding: 6px 9px;
}
.lfq-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  border-top: 1px solid #f0f2f5;
  padding-top: 9px;
}
.lfq-sep {
  flex: 1;
}
.lfq-switch {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 12.5px;
  cursor: pointer;
  margin-right: 4px;
}
.lfq-switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.lfq-switch i {
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: #d0d5dd;
  position: relative;
  transition: background 0.15s;
}
.lfq-switch i::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s;
}
.lfq-switch input:checked + i {
  background: var(--navy);
}
.lfq-switch input:checked + i::after {
  transform: translateX(16px);
}
.lfq-switch input:focus-visible + i {
  outline: 2px solid #84adff;
  outline-offset: 2px;
}
.lfq-switch.locked {
  opacity: 0.6;
  cursor: default;
}
.lf-addbar {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px dashed #cfd8e2;
  border-radius: 12px;
  background: #fff;
}
.lf-addbar-main {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.lf-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 12px;
}
.lf-chip {
  border: 1px solid #d0d5dd;
  background: #fff;
  color: var(--navy);
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 700;
}
.lf-chip:hover:not([disabled]) {
  background: #eef4ff;
  border-color: #b2ccff;
}
.lf-chip[disabled] {
  opacity: 0.45;
  cursor: default;
}
.lf-undo {
  display: flex;
  gap: 10px;
  align-items: center;
  background: #101828;
  color: #fff;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px;
}
.lf-undo .link-btn {
  color: #84adff;
  font-weight: 700;
}
.lf-savebar {
  position: sticky;
  bottom: 10px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(13, 41, 72, 0.12);
}
.lf-savebar .lf-unsaved {
  display: none;
  color: #b54708;
  font-weight: 700;
  font-size: 12.5px;
  margin-right: auto;
}
.lf-savebar .lf-saved {
  color: var(--success);
  font-size: 12.5px;
  font-weight: 700;
  margin-right: auto;
}
.lf-savebar.dirty .lf-unsaved {
  display: inline;
}
.lf-savebar.dirty .lf-saved {
  display: none;
}
.lf-savebar.dirty {
  border-color: #fec84b;
}
/* answers sent through the form, inside the lead window */
.ld-answers {
  border: 1px solid #e4e7ec;
  border-radius: 10px;
  padding: 8px 10px;
  background: #fcfcfd;
  margin: 8px 0;
}
.ld-answers summary {
  font-weight: 700;
  color: var(--navy);
  cursor: pointer;
}
.ld-ans-sec {
  margin: 8px 0 2px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ld-ans {
  display: grid;
  grid-template-columns: minmax(110px, 38%) 1fr;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid #f2f4f7;
  font-size: 13px;
}
.ld-ans:last-child {
  border-bottom: 0;
}
.ld-ans span {
  color: #475467;
}
.ld-ans div {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* ===== V52 — Tasks & Reminders ===== */
.task-info {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin: 6px 0 0;
  font-size: 12px;
  color: #344054;
}
.task-greet-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
}
.task-greet-bar .send-bar {
  flex: 1;
  max-width: 220px;
}
.send-bar {
  height: 8px;
  border-radius: 999px;
  background: #eaecf0;
  overflow: hidden;
}
.send-bar i {
  display: block;
  height: 100%;
  background: #17a56b;
  border-radius: 999px;
  transition: width 0.25s;
}
.task-greet {
  background: #f8fafc;
  border: 1px solid #e4e7ec;
  border-radius: 10px;
  padding: 10px 12px;
}
.task-greet-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.task-greet-row select {
  flex: 1;
  min-width: 200px;
}
.send-modal {
  max-width: 640px;
}
.send-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--navy);
}
.send-progress .send-bar {
  flex: 1;
  height: 10px;
}
.send-msg {
  border: 1px solid #e4e7ec;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fcfcfd;
  font-size: 13.5px;
  white-space: pre-wrap;
}
.send-msg > .muted {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: block;
  margin-bottom: 4px;
}
.send-msg-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
  white-space: normal;
}
.send-help {
  font-size: 12px;
  margin: 8px 0;
}
.send-tools {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 8px;
}
.send-tools input {
  flex: 1;
  min-width: 160px;
}
.send-list {
  max-height: 46vh;
  overflow: auto;
  border: 1px solid #eef0f3;
  border-radius: 10px;
}
.send-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid #f2f4f7;
}
.send-row:last-child {
  border-bottom: 0;
}
.send-row.sent {
  background: #f6fef9;
}
.send-who {
  flex: 1;
  min-width: 0;
  display: grid;
}
.send-who .muted {
  font-size: 11.5px;
}
.send-done {
  color: #067647;
  font-weight: 700;
  font-size: 12.5px;
}
.send-finish {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #ecfdf3;
  color: #054f31;
  font-weight: 700;
  font-size: 13px;
}
.fest-modal {
  max-width: 820px;
}
.fest-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 720px) {
  .fest-cols {
    grid-template-columns: 1fr;
  }
}
.fest-cols h4 {
  margin: 0 0 6px;
  color: var(--navy);
}
.fest-list {
  display: grid;
  gap: 2px;
  border: 1px solid #eef0f3;
  border-radius: 10px;
  padding: 4px;
  max-height: 360px;
  overflow: auto;
}
.fest-row {
  display: flex !important;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600 !important;
}
.fest-row:hover {
  background: #f8fafc;
}
.fest-row input {
  width: auto;
  margin: 0;
}
.fest-row.added {
  opacity: 0.6;
  cursor: default;
}
.fest-name {
  flex: 1;
}
.fest-date {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
.fest-opts {
  margin-top: 12px;
}

/* ===== V54 — Festival list manager ===== */
.fest-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 12px;
}
.fest-sep {
  flex: 1;
}
.fest-import {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.fest-import input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.fest-warn {
  color: #b54708;
  font-weight: 700;
}
.fest-alert {
  background: #fffaeb;
  border: 1px solid #fec84b;
  color: #93370d;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 13px;
  margin-bottom: 10px;
}
.fest-help {
  font-size: 12.5px;
  color: #344054;
  margin-bottom: 10px;
  border: 1px solid #e4e7ec;
  border-radius: 10px;
  padding: 8px 12px;
  background: #fcfcfd;
}
.fest-help summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--navy);
}
.fest-help ol {
  margin: 8px 0 2px;
  padding-left: 18px;
  display: grid;
  gap: 5px;
}
.fest-table .fest-group td {
  background: #f2f4f7;
  font-weight: 700;
  color: var(--navy);
  font-size: 12px;
}
.fest-dates {
  min-width: 220px;
}
.fest-acts {
  white-space: nowrap;
  text-align: right;
}
.fest-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  padding: 2px 8px;
  margin: 2px 4px 2px 0;
  border-radius: 999px;
  background: #eef4ff;
  color: #1d3f78;
  font-weight: 600;
}
.fest-chip.fixed {
  background: #ecfdf3;
  color: #05603a;
}
.fest-chip.past {
  background: #f2f4f7;
  color: #98a2b3;
}
.fest-chip button {
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 14px;
  line-height: 1;
  padding: 0 0 0 2px;
  cursor: pointer;
}
.fest-state {
  font-size: 11.5px;
  font-weight: 700;
  margin-top: 3px;
}
.fest-state.warn {
  color: #b54708;
}
.fest-state.bad {
  color: #b42318;
}
.fest-chips {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.fest-adddate {
  display: flex;
  gap: 8px;
  align-items: center;
}
.fest-adddate input {
  max-width: 200px;
}
.fest-imp-wrap {
  max-height: 50vh;
  overflow: auto;
}
.fest-imp tr.have td {
  color: #98a2b3;
}
.fest-imp select {
  min-width: 190px;
}

/* ===================== V55 ===================== */
/* Messages sit above the cloud status button (they never cover each other) */
.toast {
  right: 18px;
  bottom: 62px;
  max-width: min(440px, calc(100vw - 36px));
  line-height: 1.4;
  z-index: 10030;
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.22);
}
@media (max-width: 720px) {
  .toast {
    left: 10px;
    right: 10px;
    bottom: 50px;
    max-width: none;
  }
}
/* Login screen information line */
.auth-info {
  background: #eef5ff;
  border: 1px solid #c9dcf5;
  color: #123b6b;
  border-radius: 8px;
  padding: 9px 11px;
  font-size: 12px;
  line-height: 1.45;
}
/* Automatic logout warning */
.hc-idle-warn {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10060;
  background: #7a2e0e;
  color: #fff;
  padding: 11px 16px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  max-width: calc(100vw - 32px);
  text-align: center;
}
/* Staff Access → Login security */
.security-card {
  margin-bottom: 15px;
}
.security-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.security-row label {
  font-weight: 700;
  font-size: 13px;
  color: var(--navy);
}
.security-row select {
  max-width: 200px;
}
.security-note {
  font-size: 12px;
  margin: 8px 0 0;
}
/* Consent */
.consent-field {
  background: #f6f8fb;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 11px 12px;
}
.consent-field.missing {
  background: #fff8ee;
  border-color: #e8cda8;
}
.consent-check {
  display: flex !important;
  gap: 9px;
  align-items: flex-start;
  font-weight: 500 !important;
  font-size: 13px;
  line-height: 1.45;
  cursor: pointer;
}
.consent-check input {
  width: 18px !important;
  height: 18px;
  margin-top: 1px;
  flex: none;
}
.consent-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 11px;
  font-weight: 700;
}
.consent-chip.ok {
  background: #ecfdf3;
  color: #067647;
  border: 1px solid #abefc6;
}
.consent-chip.missing {
  background: #fff8ee;
  color: #93370d;
  border: 1px solid #f5c48a;
}
.ld-consent {
  font-size: 12px;
  font-weight: 700;
  color: #067647;
  margin: 6px 0;
}
.tag.draft-pending {
  background: #fff4e5;
  color: #93370d;
  border: 1px solid #f5c48a;
  font-weight: 700;
}
/* Tables shown as cards on phones (Dashboard, plan lists, bills) */
@media (max-width: 760px) {
  .table-wrap.m-cards {
    overflow: visible;
    border: 0;
    background: transparent;
  }
  .m-cards table,
  .m-cards tbody,
  .m-cards tr,
  .m-cards td {
    display: block;
    width: 100%;
  }
  .m-cards table {
    min-width: 0 !important;
  }
  .m-cards thead {
    display: none;
  }
  .m-cards tr {
    border: 1px solid var(--line);
    border-radius: 11px;
    margin: 0 0 10px;
    padding: 10px 12px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  }
  .m-cards td {
    border: 0 !important;
    padding: 4px 0 4px 112px !important;
    position: relative;
    text-align: left !important;
    white-space: normal !important;
    min-height: 22px;
    overflow-wrap: anywhere;
  }
  .m-cards td::before {
    content: attr(data-label);
    position: absolute;
    left: 0;
    top: 6px;
    width: 104px;
    font-size: 10.5px;
    line-height: 1.3;
    color: var(--muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
  }
  .m-cards td:first-child {
    padding-left: 0 !important;
    font-size: 14px;
    padding-bottom: 6px !important;
    border-bottom: 1px dashed var(--line) !important;
    margin-bottom: 4px;
  }
  .m-cards td:first-child::before,
  .m-cards td[data-label=""]::before {
    display: none;
  }
  .m-cards td[data-label=""] {
    padding-left: 0 !important;
  }
  .m-cards td .actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
  .m-cards td:last-child .btn,
  .m-cards td:last-child button {
    margin: 2px 4px 2px 0;
  }
  .m-cards tr.hc-group-row {
    background: #fff8e6;
    padding: 8px 12px;
    font-weight: 700;
  }
  .m-cards tr.hc-group-row td {
    padding-left: 0 !important;
    border-bottom: 0 !important;
    margin: 0;
  }
}
/* Client card: rarely used actions in a "⋯ More" menu (floats above everything, always inside the screen) */
.card-more-menu.floating {
  position: fixed;
  z-index: 10045;
  min-width: 210px;
  max-width: calc(100vw - 16px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.24);
  padding: 6px;
}
.card-more-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  padding: 6px 10px 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-more-menu button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  border-radius: 8px;
  padding: 11px 10px;
  font: 700 14px "DM Sans", sans-serif;
  cursor: pointer;
}
.card-more-menu button:hover,
.card-more-menu button:focus-visible {
  background: #fdf1ef;
  outline: none;
}
.card-more-menu .danger-item {
  color: var(--danger);
}
/* Diet / exercise plan list search */
.list-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin: 0 0 12px;
}
.list-filters input {
  flex: 1 1 260px;
  min-width: 0;
}
.list-filters select {
  flex: 0 0 auto;
  max-width: 170px;
}
.list-count {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}
.list-filters-card {
  margin-bottom: 15px;
  padding-bottom: 4px;
}
/* Bell sits inside the page header instead of on its corner */
@media (min-width: 761px) {
  .notification-bell {
    top: 34px;
    right: 36px;
  }
  .topbar .actions {
    padding-right: 66px;
  }
}
/* Today: group headings stay on one line on phones; segmented switches fill their row */
@media (max-width: 760px) {
  .today-group-head {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 8px;
    row-gap: 3px;
  }
  .today-group-head > strong {
    grid-column: 3;
    grid-row: 1;
    min-width: 0;
    overflow-wrap: anywhere;
    line-height: 1.25;
  }
  .today-group-head > .task-group-chev {
    grid-column: 1;
    grid-row: 1;
  }
  .today-group-head > .today-icon {
    grid-column: 2;
    grid-row: 1;
  }
  .today-group-head > .task-group-count {
    grid-column: 4;
    grid-row: 1;
  }
  .today-group-head > :not(strong):not(.task-group-chev):not(.today-icon):not(.task-group-count) {
    grid-column: 3 / span 2;
    justify-self: start;
  }
  .today-group-head > .task-group-hint {
    justify-self: end;
  }
  .topbar .actions .seg {
    display: flex;
    flex-wrap: nowrap;
  }
  .topbar .actions .seg .seg-btn {
    flex: 1 1 0;
    justify-content: center;
  }
}
/* PDF popup (Share / Download / Print) */
.pdf-modal-card {
  max-width: 880px;
  width: min(880px, 96vw);
}
.pdf-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 6px;
}
.pdf-share-hint {
  font-size: 12px;
  margin: 2px 0 10px;
}
.pdf-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
  max-height: min(64vh, 720px);
  overflow: auto;
  background: #eef1f5;
  border-radius: 10px;
  padding: 14px;
}
.pdf-page-prev {
  margin: 0;
  display: grid;
  gap: 5px;
  justify-items: center;
}
.pdf-sheet {
  width: 100%;
  aspect-ratio: 210 / 297;
  background: #fff;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.16);
  border-radius: 3px;
  padding: 4.76%;
  overflow: hidden;
}
.pdf-sheet img {
  width: 100%;
  height: auto;
  display: block;
}
.pdf-page-prev figcaption {
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
}
.pdf-making {
  grid-column: 1 / -1;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  padding: 40px 10px;
  font-weight: 700;
  color: var(--navy);
}
.pdf-spinner {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 3px solid #cfd8e3;
  border-top-color: var(--navy);
  animation: hcSpin 0.8s linear infinite;
}
@keyframes hcSpin {
  to {
    transform: rotate(360deg);
  }
}
@media (max-width: 760px) {
  .pdf-preview {
    grid-template-columns: minmax(0, 1fr);
    max-height: 58vh;
  }
  .pdf-modal-actions .btn {
    flex: 1 1 auto;
    justify-content: center;
  }
}
/* Bill: UPI QR + bank details (only while money is due) */
.invoice-paybox {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
  margin: 10px 0 4px;
  break-inside: avoid;
  page-break-inside: avoid;
}
.invoice-qr,
.invoice-bank {
  border: 1px solid #ddd3c6;
  border-radius: 8px;
  padding: 9px 11px;
  font-size: 10px;
  background: #fffdf9;
}
.invoice-qr {
  display: flex;
  gap: 11px;
  align-items: center;
}
.invoice-qr img {
  width: 92px;
  height: 92px;
  image-rendering: pixelated;
  flex: none;
}
.invoice-qr > div,
.invoice-bank {
  display: grid;
  gap: 3px;
  align-content: start;
}
.invoice-qr strong,
.invoice-bank > strong {
  font-size: 11.5px;
  color: var(--navy);
}
.invoice-bank > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.invoice-bank > div span {
  color: #666;
}
.pay-settings {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-top: 4px;
}
.pay-settings .set-h {
  margin: 0 0 4px;
}
/* Reports */
.rp-custom {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.rp-custom input {
  max-width: 160px;
}
.rp-period-line {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 10px;
}
.rp-period-line strong {
  color: var(--navy);
}
.rp-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin-bottom: 15px;
}
.rp-kpis > div {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  display: grid;
  gap: 2px;
}
.rp-kpis span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}
.rp-kpis strong {
  font-size: 24px;
  color: var(--navy);
  line-height: 1.2;
}
.rp-kpis em {
  font-style: normal;
  font-size: 11.5px;
  color: var(--muted);
}
.rp-kpis.small strong {
  font-size: 20px;
}
.rp-kpis.small {
  margin-bottom: 0;
}
.rp-sec {
  margin-bottom: 15px;
}
.rp-table td {
  vertical-align: middle;
}
.rp-total td {
  font-weight: 800;
  background: #f6f8fb;
}
.rp-bar {
  display: inline-block;
  width: 70px;
  height: 8px;
  border-radius: 99px;
  background: #eef1f5;
  margin-right: 8px;
  vertical-align: middle;
  overflow: hidden;
}
.rp-bar i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--navy);
}
.rp-bar.ok i {
  background: #12a150;
}
.rp-bar.billed i {
  background: #d9931e;
}
.rp-good {
  color: #067647;
}
.rp-note {
  font-size: 11.5px;
  margin: 8px 0 0;
}
.rp-print .rp-sec {
  border: 1px solid #ddd;
  box-shadow: none;
  padding: 10px;
  break-inside: avoid;
}
.rp-print .rp-kpis strong {
  font-size: 18px;
}
@media (max-width: 760px) {
  .rp-bar {
    width: 48px;
  }
}
/* Progress: Before / After photos */
.pp-box {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 14px;
  background: #fbfcfd;
}
.pp-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 250px));
  justify-content: center;
  gap: 16px;
}
.pp-pair.one {
  align-items: center;
}
.pp-side {
  margin: 0;
  display: grid;
  gap: 6px;
}
.pp-img {
  aspect-ratio: 3 / 4;
  background: #eef1f5;
  border-radius: 10px;
  overflow: hidden;
  display: grid;
  place-items: center;
  font-size: 12px;
}
.pp-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pp-side figcaption {
  display: grid;
  gap: 3px;
  font-size: 12px;
}
.pp-side figcaption label {
  display: flex;
  gap: 8px;
  align-items: center;
}
.pp-side figcaption select {
  flex: 1;
  min-width: 0;
}
.pp-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 0 2px;
}
.pp-thumb {
  flex: 0 0 96px;
  display: grid;
  gap: 3px;
  font-size: 10.5px;
  color: var(--muted);
  position: relative;
}
.pp-img.small {
  aspect-ratio: 3 / 4;
  border-radius: 8px;
}
.pp-thumb .btn {
  position: absolute;
  top: 4px;
  right: 4px;
  padding: 2px 6px;
  min-height: 0;
  font-size: 11px;
}
.pp-hint {
  font-size: 12px;
}
.pp-print-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.pp-print-pair figure {
  margin: 0;
  text-align: center;
}
.pp-print-pair img {
  width: 100%;
  max-height: 330px;
  object-fit: contain;
  border-radius: 6px;
  background: #f4f5f7;
}
.pp-print-pair figcaption {
  font-size: 10px;
  margin-top: 4px;
}
@media (max-width: 760px) {
  #dashboard .card > .section-title {
    flex-wrap: wrap;
  }
  #dashboard .card > .section-title > span.muted {
    flex: 1 1 100%;
  }
}
#reports .topbar .actions select {
  max-width: 230px;
}

/* V55.2: phone cards keep the same colours as the computer rows (overdue red, due soon orange, paused) */
@media (max-width: 760px) {
  .m-cards td {
    background: transparent !important;
  }
  .m-cards tr.dashboard-urgent,
  .m-cards tr.fu-row-red {
    background: #fff1ee;
    border-color: #f4c2b8;
    border-left: 5px solid #d64535;
  }
  .m-cards tr.dashboard-warning,
  .m-cards tr.fu-row-orange {
    background: #fff7e6;
    border-color: #f3d39a;
    border-left: 5px solid #e39b24;
  }
  .m-cards tr.hc-paused-row {
    background: #fffbea;
    border-color: #efdfa6;
    border-left: 5px solid #c9a227;
  }
  .m-cards tr.row-cancelled {
    background: #f6f6f7;
    opacity: 0.85;
  }
  .m-cards tr.hc-group-row {
    border-left: 5px solid #c9a227;
  }
}
/* V55.3: computer rows use exactly the same colours as the phone cards
   (red = overdue, orange = due today / in 3 days, yellow = paused), with the same coloured left stripe */
@media (min-width: 761px) {
  tr.dashboard-urgent > td,
  tr.fu-row-red > td {
    background: #fff1ee !important;
  }
  tr.dashboard-warning > td,
  tr.fu-row-orange > td {
    background: #fff7e6 !important;
  }
  tr.hc-paused-row > td,
  #dashboardNextPlans tr.hc-paused-row > td {
    background: #fffbea !important;
  }
  tr.dashboard-urgent > td:first-child,
  tr.fu-row-red > td:first-child {
    box-shadow: inset 5px 0 0 #d64535;
  }
  tr.dashboard-warning > td:first-child,
  tr.fu-row-orange > td:first-child {
    box-shadow: inset 5px 0 0 #e39b24;
  }
  tr.hc-paused-row > td:first-child {
    box-shadow: inset 5px 0 0 #c9a227;
  }
  tr.dashboard-urgent > td,
  tr.fu-row-red > td {
    border-bottom-color: #f4c2b8;
  }
  tr.dashboard-warning > td,
  tr.fu-row-orange > td {
    border-bottom-color: #f3d39a;
  }
}

/* V55: page layout helpers (moved out of the page markup; same look as before).
   ":is(#u#u#u, html)" gives them the same priority the old inline styles had, so they always apply. */
:is(#u#u#u, html) .u-center {
  text-align:center;
}
:is(#u#u#u, html) .ix-cea5ae {
  font:700 22px 'Playfair Display',serif;
  color:var(--navy);
  margin:0;
}
:is(#u#u#u, html) .ix-e3bc2e {
  font-size:12px;
  margin:4px 0 0;
}
:is(#u#u#u, html) .ix-100069 {
  font-size:10px;
  margin:6px 0 0;
}
:is(#u#u#u, html) .ix-9b54a3 {
  justify-content:center;
}
:is(#u#u#u, html) .ix-3148ad {
  margin-top:14px;
  border-top:1px solid #ffffff25;
  padding-top:16px;
}
:is(#u#u#u, html) .ix-6686b3 {
  min-width:260px;
}
:is(#u#u#u, html) .u-mb15 {
  margin-bottom:15px;
}
:is(#u#u#u, html) .u-fs12 {
  font-size:12px;
}
:is(#u#u#u, html) .ix-742864 {
  max-width:180px;
}
:is(#u#u#u, html) .u-mw150 {
  max-width:150px;
}
:is(#u#u#u, html) .u-fw500 {
  font-weight:500;
}
:is(#u#u#u, html) .ix-733aaf {
  font-size:11px;
  margin-top:4px;
}
:is(#u#u#u, html) .ix-2937bf {
  margin-bottom:6px;
}
:is(#u#u#u, html) .ix-3dd9b4 {
  font-size:15px;
}
:is(#u#u#u, html) .ix-b4282c {
  background:#f6f7f8;
  border:1px solid var(--line);
  border-radius:9px;
  padding:12px;
}
:is(#u#u#u, html) .u-flex1 {
  flex:1;
}
:is(#u#u#u, html) .u-mt15 {
  margin-top:15px;
}
:is(#u#u#u, html) .u-mb9 {
  margin-bottom:9px;
}
:is(#u#u#u, html) .ix-2dfe19 {
  font-size:11px;
  margin:7px 0 4px;
}
:is(#u#u#u, html) .u-fs11 {
  font-size:11px;
}
:is(#u#u#u, html) .u-mb0 {
  margin-bottom:0;
}
:is(#u#u#u, html) .u-mb8 {
  margin-bottom:8px;
}
:is(#u#u#u, html) .ix-fa3e1c {
  margin-bottom:12px;
}
:is(#u#u#u, html) .ix-b0043e {
  margin-top:16px;
}
:is(#u#u#u, html) .u-mt10 {
  margin-top:10px;
}
:is(#u#u#u, html) .ix-0171bc {
  font-size:12px;
  margin:0 0 8px;
}
:is(#u#u#u, html) .u-upper {
  text-transform:uppercase;
}
:is(#u#u#u, html) .ix-901210 {
  flex-wrap:wrap;
}
:is(#u#u#u, html) .ix-5f88ac {
  color:#b5473c;
}
:is(#u#u#u, html) .ix-a30bda {
  flex-wrap:wrap;
  align-items:center;
}
:is(#u#u#u, html) .ix-90c130 {
  margin-bottom:0;
  flex-wrap:wrap;
}
:is(#u#u#u, html) .ix-20bd8c {
  font-size:12px;
  margin-top:4px;
}
:is(#u#u#u, html) .ix-f6314d {
  font-size:12px;
  margin-top:8px;
}
:is(#u#u#u, html) .ix-b89a77 {
  margin-top:22px;
}
:is(#u#u#u, html) .ix-8abfc6 {
  border-top:1px solid var(--line);
  padding-top:14px;
  margin-top:6px;
}
:is(#u#u#u, html) .u-mt6 {
  margin-top:6px;
}
:is(#u#u#u, html) .ix-6aba78 {
  font-size:12px;
  margin-bottom:8px;
}
:is(#u#u#u, html) .ix-69cd82 {
  font-weight:700;
  font-size:13px;
  margin:10px 0 6px;
}
:is(#u#u#u, html) .ix-20e2b2 {
  font-weight:700;
  font-size:13px;
  margin:14px 0 6px;
}
:is(#u#u#u, html) .u-mt12 {
  margin-top:12px;
}
:is(#u#u#u, html) .ix-226a77 {
  font-size:12px;
  margin-bottom:10px;
}
:is(#u#u#u, html) .ix-1d687e {
  margin:8px 0 10px;
}
:is(#u#u#u, html) .ix-7d0a95 {
  font-size:11px;
  margin-top:9px;
}
:is(#u#u#u, html) .ix-7b1d96 {
  min-height:120px;
  font:11px/1.4 monospace;
}
:is(#u#u#u, html) .ix-0998cf {
  margin:0 0 10px;
}
:is(#u#u#u, html) .ix-a53ed3 {
  margin-top:12px;
  justify-content:flex-end;
}
:is(#u#u#u, html) .ix-0b7f76 {
  color:var(--navy);
  font-size:17px;
}
:is(#u#u#u, html) .u-mw560 {
  max-width:560px;
}
:is(#u#u#u, html) .u-mh64 {
  min-height:64px;
}
:is(#u#u#u, html) .ix-2f5b1b {
  background:#f6f7f8;
}
:is(#u#u#u, html) .ix-89a879 {
  font-size:10px;
  margin-top:3px;
}
:is(#u#u#u, html) .ix-e0c9b2 {
  max-width:90px;
}
:is(#u#u#u, html) .u-wauto {
  width:auto;
}
:is(#u#u#u, html) .u-mw640 {
  max-width:640px;
}
:is(#u#u#u, html) .ix-d43169 {
  margin-top:8px;
}
:is(#u#u#u, html) .ix-278063 {
  min-height:80px;
}
:is(#u#u#u, html) .u-mh70 {
  min-height:70px;
}
:is(#u#u#u, html) .u-mw680 {
  max-width:680px;
}
:is(#u#u#u, html) .ix-68dd93 {
  min-height:60px;
}
:is(#u#u#u, html) .ix-836b76 {
  margin-top:0;
  font-size:12px;
}
:is(#u#u#u, html) .u-mw720 {
  max-width:720px;
}
:is(#u#u#u, html) .ix-1386d5 {
  margin:0;
}
:is(#u#u#u, html) .ix-cf8dbb {
  justify-content:space-between;
  margin-top:12px;
  border-top:1px solid var(--line);
  padding-top:12px;
}
:is(#u#u#u, html) .ix-22bddb {
  min-height:110px;
}
:is(#u#u#u, html) .ix-b9ee2d {
  font-size:10px;
  margin-top:2px;
}
#driveStatus {
  margin-top: 10px;
}

/* =====================================================================
   V56 — Program History, Renew / Extend popups, bill types
   ===================================================================== */
.pg-card {
  width: min(760px, 96vw);
  max-height: 90vh;
  overflow: auto;
}
.pg-card .form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.pg-notice {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
}
.pg-inline {
  display: flex;
  gap: 6px;
}
.pg-inline > input {
  flex: 1;
  min-width: 0;
}
.pg-inline > select {
  width: auto;
  min-width: 92px;
}
.pg-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
  align-items: center;
}
.pg-spacer {
  flex: 1;
}
.pg-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
}
.pg-check input {
  width: auto;
}
.pg-bill {
  border: 1px solid var(--line);
  background: var(--cream);
  border-radius: 12px;
  padding: 12px;
  display: grid;
  gap: 12px;
}
.pg-bill-fields {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}
.pg-type {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  background: #eef1f4;
  color: #475467;
}
.pg-type.pg-t-new {
  background: #edf3ff;
  color: var(--navy);
}
.pg-type.pg-t-renew {
  background: #eaf7f0;
  color: var(--success);
}
.pg-type.pg-t-ext {
  background: var(--peach-soft);
  color: #9a5b12;
}
.pg-period {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 13px;
  margin-bottom: 10px;
  background: #fff;
}
.pg-period.is-running {
  border-color: #9fd3bd;
  box-shadow: inset 4px 0 0 var(--success);
}
.pg-period-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.pg-period-head .btn {
  margin-left: auto;
}
.pg-period-dates {
  margin-top: 6px;
  font-size: 13px;
}
.pg-period-note {
  margin-top: 4px;
  font-size: 12px;
}
.pg-period-list {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
  font-size: 12px;
}
.pg-period-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.pg-dates-lock[hidden] {
  display: none;
}
.pg-lock-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 11px;
  border-radius: 10px;
  background: var(--teal-soft);
  color: #1f5a57;
  font-size: 12px;
}
.pg-lock-note.warn {
  background: #fff4e5;
  color: var(--warning);
}
.pg-bt-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.pg-bt-search {
  max-width: 320px;
}
.pg-master-help {
  font-size: 11px;
  margin-bottom: 6px;
}
.pg-master-item {
  flex-wrap: wrap;
  gap: 6px;
}
.pg-master-item > span {
  flex: 1 1 100%;
}
.pg-master-fields {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}
.pg-master-fields input {
  width: 64px;
  min-width: 0;
  padding: 5px 6px;
}
.pg-master-fields select {
  width: auto;
  padding: 5px 4px;
}
.pg-rupee {
  font-size: 12px;
  color: var(--muted);
  margin-left: 4px;
}
.rp-sub {
  margin: 16px 0 8px;
  font-size: 14px;
}
@media (max-width: 760px) {
  .pg-card .form-grid,
  .pg-bill-fields {
    grid-template-columns: 1fr !important;
  }
  .pg-period-head .btn {
    margin-left: 0;
  }
}
.modal-overlay.pg-overlay {
  z-index: 10055;
  align-items: flex-start;
  padding: 28px 14px;
  overflow: auto;
}
#clientStartDate:disabled,
#clientEndDate:disabled {
  background: #f2f4f7;
  cursor: not-allowed;
}
.hc-dmy-wrap:has(#clientStartDate:disabled) .hc-dmy-in,
.hc-dmy-wrap:has(#clientEndDate:disabled) .hc-dmy-in {
  color: #667085;
}
/* V56 — own QR image + clickable payment link */
.pay-qr-own {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 8px;
}
.pay-qr-own[hidden] {
  display: none;
}
.pay-qr-preview {
  width: 120px;
  height: 120px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #fff;
  overflow: hidden;
  text-align: center;
  font-size: 11px;
  padding: 6px;
}
.pay-qr-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.pay-qr-btns {
  display: grid;
  gap: 6px;
  flex: 1;
  min-width: 200px;
  justify-items: start;
}
.invoice-qr img.own {
  image-rendering: auto;
  object-fit: contain;
}
.invoice-paylink {
  display: inline-block;
  margin-top: 4px;
  padding: 4px 9px;
  border-radius: 6px;
  border: 1.5px solid #001f52;
  background: #eef3fb;
  color: #001f52;
  font-weight: 700;
  font-size: 10.5px;
  justify-self: start;
}
/* V56: the exercise PDF table fits the A4 page (the screen tables' 760 px minimum cut off the
   "Video / Guide" column), with fixed column widths so "Click Here" is always fully shown. */
.exercise-pdf table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: collapse;
}
.exercise-pdf th:nth-child(1),
.exercise-pdf td:nth-child(1) {
  width: 5%;
}
.exercise-pdf th:nth-child(2),
.exercise-pdf td:nth-child(2) {
  width: 35%;
}
.exercise-pdf th:nth-child(3),
.exercise-pdf td:nth-child(3) {
  width: 7%;
}
.exercise-pdf th:nth-child(4),
.exercise-pdf td:nth-child(4) {
  width: 17%;
}
.exercise-pdf th:nth-child(5),
.exercise-pdf td:nth-child(5) {
  width: 11%;
}
.exercise-pdf th:nth-child(6),
.exercise-pdf td:nth-child(6) {
  width: 10%;
}
.exercise-pdf th:nth-child(7),
.exercise-pdf td:nth-child(7) {
  width: 15%;
}
.exercise-pdf td,
.exercise-pdf th {
  overflow-wrap: anywhere;
  vertical-align: top;
}
.exercise-pdf td .exercise-link {
  white-space: nowrap;
}

/* V56: every table inside a PDF fits the A4 page width (screen tables keep their 760 px minimum) */
@media print {
  #printSheet table {
    min-width: 0;
  }
}
#billingSettingsCard {
  scroll-margin-top: 72px;
}
.invoice-upi-link {
  color: #001f52;
  text-decoration: underline;
}
.invoice-upi-link b {
  color: #001f52;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* =====================================================================
   V56.2 — Note for each meal
   A small "+ Note" button sits on the top edge of every meal. Pressing it
   opens a note box for that meal. In the PDF the note is printed right
   under that meal, in a light highlighted row.
   ===================================================================== */
.meal-row {
  position: relative;
  margin-top: 16px;
}
.meal-row > .meal-note-btn {
  position: absolute;
  top: -11px;
  left: 12px;
  z-index: 2;
  height: 21px;
  padding: 0 10px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  color: #475569;
  font:
    700 11px/19px "DM Sans",
    sans-serif;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}
.meal-row > .meal-note-btn:hover,
.meal-row > .meal-note-btn:focus-visible {
  border-color: var(--navy);
  color: var(--navy);
}
.meal-row > .meal-note-btn.has-note {
  background: #fff4e5;
  border-color: #f0a85a;
  color: #8a4b00;
}
.meal-row > .m-note {
  grid-column: 1/-1;
  min-height: 42px;
  padding: 7px 9px;
  border: 1px dashed #f0b35a;
  border-radius: 7px;
  background: #fffaf2;
  font-size: 13px;
  line-height: 1.45;
  resize: vertical;
}
.meal-row > .m-note[hidden] {
  display: none !important;
}
/* Flexible (4 options) layout: the note opens right under Time / Meal, above the food options */
.meal-row.note-open:not(.weekly-meal-row):not(.focused-meal-row) > .m-note {
  grid-row: 2;
}
.meal-row.note-open:not(.weekly-meal-row):not(.focused-meal-row) > .m-o1,
.meal-row.note-open:not(.weekly-meal-row):not(.focused-meal-row) > .m-o2,
.meal-row.note-open:not(.weekly-meal-row):not(.focused-meal-row) > .m-o3,
.meal-row.note-open:not(.weekly-meal-row):not(.focused-meal-row) > .m-o4 {
  grid-row: 3;
}
@media (min-width: 761px) {
  .meal-row.note-open:not(.weekly-meal-row):not(.focused-meal-row) > .meal-nutri {
    grid-row: 4;
  }
}
@media (max-width: 760px) {
  .meal-row.note-open:not(.weekly-meal-row):not(.focused-meal-row) > .m-o3,
  .meal-row.note-open:not(.weekly-meal-row):not(.focused-meal-row) > .m-o4 {
    grid-row: 4;
  }
  .meal-row.note-open:not(.weekly-meal-row):not(.focused-meal-row) > .meal-order-actions {
    grid-row: 5;
  }
  /* Weekly / Focused on phone: the note comes right under the meal name */
  .weekly-meal-row > .m-time,
  .weekly-meal-row > .m-meal,
  .focused-meal-row > .m-time,
  .focused-meal-row > .m-meal {
    order: -2;
  }
  .weekly-meal-row > .m-note,
  .focused-meal-row > .m-note {
    order: -1;
  }
}
@media print {
  .pdf-table tbody.pdf-meal {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .pdf-table tbody.pdf-meal.has-note > tr:first-child > td {
    border-bottom: 0;
  }
  .pdf-table tr.pdf-meal-note > td {
    background: #fff6ea;
    border-top: 1px dashed #e9b97f;
    border-left: 3px solid #f0a85a;
    padding: 5px 7px 6px;
    font-size: 8.8px;
    line-height: 1.45;
    color: #3d2b12;
  }
  .pdf-meal-note-in {
    display: flex;
    align-items: flex-start;
    gap: 7px;
  }
  .pdf-meal-note-text {
    flex: 1;
    min-width: 0;
  }
  .pdf-meal-note-label {
    flex: none;
    display: inline-block;
    padding: 0 6px;
    border-radius: 3px;
    background: var(--navy);
    color: #fff;
    font-size: 8px;
    font-weight: 700;
    line-height: 13px;
    vertical-align: 1px;
    white-space: nowrap;
  }
}

/* V56.4: Facebook / Instagram Lead Ads status (Lead Form page) */
#metaLeadStatus > div { margin: 4px 0; line-height: 1.5; }
#metaLeadStatus .meta-ok { color: #1f7a4d; }
#metaLeadStatus .meta-warn { color: #b42318; }

/* =====================================================================
   V57 — WhatsApp Messaging (Send Queue, Replies, Automations, Templates, Settings)
   ===================================================================== */
.btn.primary.wa { background: #128c4a; border-color: #128c4a; color: #fff; }
.btn.primary.wa:hover { background: #0e7a40; }
.wa-nav-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px; border-radius: 9px; background: #25d366; color: #fff; font-size: 11px; font-weight: 700; line-height: 1; }
.wa-nav-badge[hidden] { display: none; }
.wa-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: #fff; margin-bottom: 12px; }
.wa-banner > div:first-child { display: grid; gap: 2px; }
.wa-banner span { color: var(--muted); font-size: 13px; }
.wa-banner.on { border-color: #a6e9c0; background: #f0fdf4; }
.wa-banner.warn { border-color: #fec84b; background: #fffaeb; color: #93370d; }
.wa-banner-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.wa-dash-note { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; margin-bottom: 14px; border-radius: 12px; border: 1px solid #a6e9c0; background: #f0fdf4; }
.wa-queue-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.wa-queue-tools .seg { flex-wrap: wrap; }
.wa-queue-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.wa-queue-filters input, .wa-queue-filters select { min-width: 180px; }
.wa-count:not(:empty) { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 9px; background: #e4e7ec; color: #344054; font-size: 11px; font-weight: 700; }
.wa-count.alert:not(:empty) { background: #fee4e2; color: #b42318; }
.wa-help { margin: 10px 0 4px; font-size: 13px; color: var(--muted); }
.wa-help:empty { display: none; }
.wa-list { display: grid; gap: 8px; margin-top: 8px; }
.wa-row { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; padding: 10px 12px; border: 1px solid #e4e7ec; border-radius: 12px; background: #fff; }
.wa-row-main { min-width: 0; flex: 1; display: grid; gap: 4px; }
.wa-row-top { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.wa-row-top .link-btn, .wa-row-top strong { font-weight: 700; }
.wa-rule { font-size: 12px; font-weight: 600; color: #344054; background: #f2f4f7; border-radius: 6px; padding: 1px 7px; }
.wa-row-msg summary { cursor: pointer; font-size: 13px; color: #344054; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; list-style: none; }
.wa-row-msg summary::-webkit-details-marker { display: none; }
.wa-row-msg[open] summary { white-space: normal; color: var(--muted); }
.wa-row-meta { font-size: 12px; }
.wa-err { color: var(--danger); }
.wa-row-acts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; flex: none; }
.wa-chip { display: inline-block; font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 1px 8px; background: #f2f4f7; color: #344054; white-space: nowrap; }
.wa-chip.st-queued { background: #e0f2fe; color: #075985; }
.wa-chip.st-scheduled { background: #f4ebff; color: #6941c6; }
.wa-chip.st-sending { background: #e0f2fe; color: #075985; }
.wa-chip.st-sent { background: #ecfdf3; color: #067647; }
.wa-chip.st-delivered { background: #ecfdf3; color: #067647; }
.wa-chip.st-read { background: #d1fadf; color: #05603a; }
.wa-chip.st-failed { background: #fee4e2; color: #b42318; }
.wa-chip.st-skipped, .wa-chip.st-cancelled, .wa-chip.st-expired { background: #f2f4f7; color: #667085; }
.wa-chip.api { background: #eef4ff; color: #3538cd; }
.wa-chip.cat { background: #f2f4f7; color: #475467; font-weight: 600; }
.wa-chip.meta-ok { background: #d1fadf; color: #05603a; }
.wa-chip.meta-wait { background: #fef0c7; color: #93370d; }
.wa-chip.meta-bad { background: #fee4e2; color: #b42318; }
.wa-chip.meta-none { background: #f2f4f7; color: #667085; }
/* WhatsApp-like preview */
.wa-phone-frame { background: #efeae2; background-image: radial-gradient(#e2dbd0 1px, transparent 1px); background-size: 14px 14px; border-radius: 14px; padding: 14px; }
.wa-phone-frame.mini { padding: 10px; max-height: 300px; overflow: auto; }
.wa-bubble { position: relative; max-width: 360px; background: #d9fdd3; border-radius: 10px 10px 10px 2px; padding: 8px 10px; font-size: 13.5px; line-height: 1.45; color: #111b21; box-shadow: 0 1px 1px rgba(11, 20, 26, 0.13); overflow-wrap: anywhere; }
.wa-bubble.in { background: #fff; border-radius: 10px 10px 2px 10px; }
.wa-bubble img { display: block; width: 100%; max-height: 260px; object-fit: cover; border-radius: 7px; margin-bottom: 6px; }
.wa-bubble.small { max-width: 520px; margin-top: 6px; }
.wa-bubble i { color: #54656f; }
.wa-link { color: #027eb5; text-decoration: underline; }
/* Send one by one */
.wa-sender-card { max-width: 560px; }
.wa-sender { display: grid; gap: 12px; }
.wa-sender-who { display: grid; gap: 2px; }
.wa-sender-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.wa-steps, .wa-tip { margin: 0; font-size: 12.5px; }
.wa-sender-done { text-align: center; padding: 20px 0; }
.wa-big { font-size: 44px; }
/* Replies */
.wa-inbox { display: grid; grid-template-columns: minmax(240px, 340px) 1fr; gap: 14px; align-items: start; }
.wa-inbox-list { padding: 6px; max-height: 72vh; overflow: auto; display: grid; gap: 4px; }
.wa-conv { text-align: left; border: 0; background: transparent; border-radius: 10px; padding: 9px 10px; display: grid; gap: 2px; cursor: pointer; width: 100%; }
.wa-conv:hover { background: #f2f4f7; }
.wa-conv.active { background: #e7f8ee; }
.wa-conv-top { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.wa-conv-top .muted { font-size: 11px; white-space: nowrap; }
.wa-conv-msg { font-size: 12.5px; color: #475467; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-conv.unread .wa-conv-msg { color: #101828; font-weight: 700; }
.wa-unread { display: inline-grid; place-items: center; min-width: 18px; height: 18px; border-radius: 9px; background: #25d366; color: #fff; font-size: 11px; margin-right: 6px; padding: 0 4px; }
.wa-conv-sub { font-size: 11px; }
.wa-chat { display: grid; grid-template-rows: auto 1fr auto; min-height: 60vh; padding: 0; overflow: hidden; }
.wa-chat > .empty { padding: 30px; }
.wa-chat-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.wa-chat-head > div:first-child { display: grid; }
.wa-chat-head-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.wa-chat-body { background: #efeae2; padding: 14px; overflow: auto; max-height: 60vh; display: grid; gap: 8px; align-content: start; }
.wa-msg { display: flex; }
.wa-msg.out { justify-content: flex-end; }
.wa-msg.out .wa-bubble { border-radius: 10px 10px 2px 10px; }
.wa-msg.in .wa-bubble { border-radius: 10px 10px 10px 2px; }
.wa-msg-time { display: block; margin-top: 4px; text-align: right; font-size: 10.5px; color: #667781; }
.wa-msg-time .wa-chip { font-size: 10px; padding: 0 6px; }
.wa-reply { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); align-items: flex-end; }
.wa-reply textarea { flex: 1; min-height: 44px; }
.wa-reply-closed { padding: 12px 14px; border-top: 1px solid var(--line); font-size: 13px; }
/* Automations */
.wa-master { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 14px; border-left: 5px solid #d0d5dd; }
.wa-master.on { border-left-color: #25d366; }
.wa-master h3 { margin: 0 0 4px; }
.wa-master p { margin: 0; max-width: 760px; }
.wa-master-btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.lf-switch.big { font-size: 16px; }
.lf-switch.big input { width: 20px; height: 20px; }
.wa-group-title { margin: 18px 0 8px; font-size: 15px; color: var(--navy); }
.wa-rules { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; }
.wa-rule { display: grid; gap: 10px; align-content: start; border-left: 4px solid #e4e7ec; }
.wa-rule.on { border-left-color: #25d366; }
.wa-rule[data-rule="lead_not_interested"] { grid-column: 1 / -1; }
.wa-rule-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.wa-rule-title { display: flex; gap: 10px; align-items: flex-start; }
.wa-rule-title p { margin: 2px 0 0; font-size: 12.5px; }
.wa-rule-icon { font-size: 22px; line-height: 1; }
.wa-rule-tpl { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.wa-rule-tpl select { flex: 1; min-width: 180px; }
.wa-warn { font-size: 12.5px; color: #93370d; background: #fffaeb; border: 1px solid #fedf89; border-radius: 8px; padding: 6px 9px; }
.wa-rule-extra { display: grid; gap: 8px; padding-top: 8px; border-top: 1px dashed #e4e7ec; }
.wa-inline { display: flex !important; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.wa-inline input[type="number"] { width: 70px; }
.wa-inline input[type="checkbox"] { width: auto; margin: 0; }
.wa-days { gap: 10px; }
.wa-days label { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.wa-days input { width: auto; margin: 0; }
.wa-days-input { width: 110px !important; }
.wa-steps-box { display: grid; gap: 8px; }
.wa-step { display: grid; grid-template-columns: 30px auto auto minmax(180px, 1fr) 30px; gap: 8px; align-items: center; padding: 8px; border: 1px solid #e4e7ec; border-radius: 10px; background: #fcfcfd; }
.wa-step label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.wa-step input[type="number"] { width: 68px; }
.wa-step-n { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 700; font-size: 12px; }
.wa-step-sum, .wa-step .wa-warn { grid-column: 2 / -1; font-size: 12px; }
.wa-step-foot { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.wa-savebar { margin-top: 14px; }
.wa-preview-list { display: grid; gap: 8px; max-height: 60vh; overflow: auto; }
.wa-preview-row { border: 1px solid #e4e7ec; border-radius: 10px; padding: 8px 10px; }
.wa-preview-body { font-size: 12.5px; color: #344054; margin-top: 4px; }
/* Templates */
.wa-tpl-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.wa-tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.wa-tpl { display: grid; gap: 10px; align-content: start; }
.wa-tpl-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.wa-tpl-used { font-size: 12px; }
.wa-tpl-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.wa-tpl-modal { max-width: 1040px; }
.wa-tpl-edit { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr); gap: 16px; align-items: start; }
.wa-tpl-preview { position: sticky; top: 0; display: grid; gap: 6px; }
.wa-photo-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.wa-photo-row p { margin: 6px 0 0; font-size: 12px; }
.wa-photo { width: 120px; height: 80px; border: 1px dashed #d0d5dd; border-radius: 10px; display: grid; place-items: center; overflow: hidden; background: #f9fafb; font-size: 12px; }
.wa-photo img { width: 100%; height: 100%; object-fit: cover; }
.wa-var-help { font-size: 12px; margin-top: 6px; }
.wa-vars { display: grid; gap: 4px; margin-top: 4px; }
.wa-var-group { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.wa-var-group > span { font-size: 11px; font-weight: 700; color: var(--muted); width: 100px; }
.wa-var { border: 1px solid #d0d5dd; background: #fff; border-radius: 999px; padding: 2px 8px; font-size: 11.5px; font-family: ui-monospace, Menlo, Consolas, monospace; color: #344054; cursor: pointer; }
.wa-var:hover { border-color: #25d366; background: #f0fdf4; }
.wa-var.dim { opacity: 0.5; }
/* Settings */
.wa-modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.wa-mode { display: grid !important; gap: 6px; padding: 14px; border: 2px solid #e4e7ec; border-radius: 12px; cursor: pointer; background: #fff; }
.wa-mode.active { border-color: #25d366; background: #f6fef9; }
.wa-mode input { width: auto; margin: 0; justify-self: start; }
.wa-mode span { font-size: 13px; color: #344054; font-weight: 400; }
.wa-mode small { font-size: 12px; color: var(--muted); font-weight: 400; }
.wa-dim { opacity: 0.85; }
.wa-webhook, .wa-test { margin-top: 12px; font-size: 13px; display: grid; gap: 6px; }
.wa-guide { margin-top: 12px; }
.wa-guide summary { cursor: pointer; font-weight: 700; color: var(--navy); }
.wa-guide ol { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 6px; font-size: 13px; }
#waConnState .meta-ok { color: #1f7a4d; }
#waConnState .meta-warn { color: #b42318; }
/* Send to one person */
.wa-one-card { max-width: 900px; }
.wa-one { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 360px); gap: 16px; align-items: start; }
.wa-one-left { display: grid; gap: 8px; }
.wa-one-left label { font-weight: 700; font-size: 13px; }
.wa-one-btns { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.wa-one-btns p { margin: 0; width: 100%; font-size: 12px; }
.wa-one-hist { display: grid; gap: 6px; margin-top: 6px; font-size: 13px; }
.wa-hist-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; padding: 5px 0; border-bottom: 1px solid #f2f4f7; font-size: 12.5px; }
.wa-series-note { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; padding: 8px 10px; border-radius: 10px; background: #f9fafb; border: 1px solid #e4e7ec; font-size: 13px; }
@media (max-width: 760px) {
  .wa-row { flex-direction: column; }
  .wa-row-acts { justify-content: flex-start; }
  .wa-inbox { grid-template-columns: 1fr; }
  .wa-inbox-list { max-height: 40vh; }
  .wa-tpl-edit, .wa-one { grid-template-columns: 1fr; }
  .wa-tpl-preview { position: static; }
  .wa-step { display: flex; flex-wrap: wrap; align-items: center; }
  .wa-step select { flex: 1 1 100%; order: 5; }
  .wa-step .lfq-x { margin-left: auto; }
  .wa-step-sum, .wa-step .wa-warn { flex: 1 1 100%; order: 6; }
  .wa-rules { grid-template-columns: 1fr; }
  .wa-queue-filters input, .wa-queue-filters select { min-width: 0; flex: 1; }
  .wa-var-group > span { width: 100%; }
}

/* =====================================================================
   V58 — WhatsApp: switch, Automations list, Live Chat, Chatbot builder,
   Contact Lists, Broadcasts
   ===================================================================== */
/* on / off switch */
.wa-switch { position: relative; display: inline-flex !important; align-items: center; flex: none; cursor: pointer; margin: 0; }
.wa-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.wa-switch span { width: 40px; height: 22px; border-radius: 11px; background: #d0d5dd; position: relative; transition: background 0.15s; }
.wa-switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.25); transition: transform 0.15s; }
.wa-switch input:checked + span { background: #12b76a; }
.wa-switch input:checked + span::after { transform: translateX(18px); }
.wa-switch input:focus-visible + span { outline: 2px solid var(--navy); outline-offset: 2px; }
.wa-switch input:disabled + span { opacity: 0.5; }
.wa-switch.big span { width: 52px; height: 28px; border-radius: 14px; }
.wa-switch.big span::after { width: 22px; height: 22px; }
.wa-switch.big input:checked + span::after { transform: translateX(24px); }

/* ---------- Automations ---------- */
.wa-auto-top { display: grid; gap: 14px; margin-bottom: 14px; border-top: 4px solid #d0d5dd; }
.wa-auto-top.on { border-top-color: #12b76a; }
.wa-auto-master { display: flex; gap: 14px; align-items: center; }
.wa-auto-master h3 { margin: 0 0 2px; }
.wa-auto-master p { margin: 0; }
.wa-auto-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.wa-auto-stats > div { background: #f9fafb; border: 1px solid #eaecf0; border-radius: 12px; padding: 10px 12px; display: grid; gap: 2px; }
.wa-auto-stats b { font-size: 22px; color: var(--navy); line-height: 1.1; }
.wa-auto-stats b small { font-size: 13px; color: var(--muted); font-weight: 600; }
.wa-auto-stats span { font-size: 12px; color: var(--muted); }
.wa-auto-stats .bad b { color: var(--danger); }
.wa-auto-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; font-size: 13px; color: #475467; padding-top: 10px; border-top: 1px dashed #e4e7ec; }
.wa-auto-meta-btns { display: inline-flex; gap: 6px; margin-left: auto; }
.wa-auto-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 12px; }
.wa-auto-tabs button { border: 1px solid #d0d5dd; background: #fff; border-radius: 999px; padding: 7px 14px; font-weight: 700; font-size: 13px; color: #344054; display: inline-flex; gap: 8px; align-items: center; }
.wa-auto-tabs button span { font-size: 11px; font-weight: 700; background: #f2f4f7; color: #475467; border-radius: 9px; padding: 1px 7px; }
.wa-auto-tabs button.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.wa-auto-tabs button.on span { background: rgba(255, 255, 255, 0.2); color: #fff; }
.wa-auto-list { padding: 0; overflow: hidden; margin-bottom: 12px; }
.wa-auto-group { padding: 10px 16px; font-size: 12px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); background: #f9fafb; border-bottom: 1px solid #eaecf0; }
.wa-ar { border-bottom: 1px solid #eaecf0; }
.wa-ar:last-child { border-bottom: 0; }
.wa-ar-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) minmax(130px, 220px) auto 18px; gap: 12px; align-items: center; padding: 12px 16px; cursor: pointer; }
.wa-ar-row:hover { background: #fcfcfd; }
.wa-ar-row:focus-visible { outline: 2px solid var(--navy); outline-offset: -2px; }
.wa-ar-icon { font-size: 20px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: #f2f4f7; }
.wa-ar.on .wa-ar-icon { background: #ecfdf3; }
.wa-ar-text { display: grid; gap: 2px; min-width: 0; }
.wa-ar-text strong { font-size: 14px; color: #101828; }
.wa-ar-text span { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-ar.open .wa-ar-text span { white-space: normal; }
.wa-ar-tpl { font-size: 12.5px; color: #344054; background: #f2f4f7; border-radius: 8px; padding: 4px 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; gap: 6px; align-items: center; }
.wa-ar-tpl.none { color: var(--muted); background: transparent; border: 1px dashed #d0d5dd; }
.wa-ar-tpl.warn { color: #93370d; background: #fffaeb; }
.wa-ar-flag { font-size: 10.5px; font-weight: 700; color: #93370d; background: #fef0c7; border-radius: 6px; padding: 0 5px; flex: none; }
.wa-ar-chev { color: #98a2b3; font-size: 18px; transition: transform 0.15s; }
.wa-ar.open .wa-ar-chev { transform: rotate(90deg); }
.wa-ar.open { background: #fcfcfd; }
.wa-ar-edit { padding: 4px 16px 16px 62px; display: grid; gap: 10px; }
.wa-ar-field { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 10px; align-items: start; }
.wa-ar-label { font-size: 12px; font-weight: 700; color: var(--muted); padding-top: 8px; text-transform: uppercase; letter-spacing: 0.03em; }
.wa-auto-save { position: sticky; bottom: 10px; z-index: 5; }
.wa-auto-save:not(.dirty) { display: none; }

/* ---------- Live Chat ---------- */
.wa-lc { display: grid; grid-template-columns: minmax(260px, 360px) minmax(0, 1fr); gap: 14px; height: calc(100vh - 200px); min-height: 520px; }
.wa-lc-side { padding: 0; display: grid; grid-template-rows: auto auto 1fr auto; overflow: hidden; }
.wa-lc-search { padding: 10px 10px 6px; }
.wa-lc-search input { width: 100%; }
.wa-lc-filters { display: flex; gap: 5px; padding: 0 10px 8px; border-bottom: 1px solid #eaecf0; scrollbar-width: none; }
.wa-lc-chip { border: 1px solid #d0d5dd; background: #fff; border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 700; color: #344054; white-space: nowrap; display: inline-flex; gap: 5px; align-items: center; }
.wa-lc-chip.on { background: #e7f8ee; border-color: #12b76a; color: #05603a; }
.wa-lc-n:not(:empty) { background: #12b76a; color: #fff; border-radius: 9px; padding: 0 6px; font-size: 10.5px; }
.wa-lc-list { overflow-y: auto; }
.wa-lc-live { font-size: 11.5px; padding: 6px 12px; border-top: 1px solid #eaecf0; display: flex; align-items: center; gap: 6px; }
.wa-dot { width: 8px; height: 8px; border-radius: 50%; background: #f79009; display: inline-block; }
.wa-dot.on { background: #12b76a; box-shadow: 0 0 0 3px #d1fadf; }
.wa-cv { width: 100%; border: 0; background: #fff; display: flex; gap: 10px; padding: 10px 12px; text-align: left; border-bottom: 1px solid #f2f4f7; cursor: pointer; }
.wa-cv:hover { background: #f9fafb; }
.wa-cv.active { background: #eefcf3; }
.wa-av { width: 40px; height: 40px; border-radius: 50%; background: #dfe7f1; color: var(--navy); font-weight: 800; display: grid; place-items: center; flex: none; }
.wa-cv-main { min-width: 0; flex: 1; display: grid; gap: 2px; }
.wa-cv-top { display: flex; justify-content: space-between; gap: 6px; }
.wa-cv-top strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.wa-cv-time { font-size: 11px; color: var(--muted); white-space: nowrap; }
.wa-cv.unread .wa-cv-time { color: #12b76a; font-weight: 700; }
.wa-cv-msg { font-size: 12.5px; color: #475467; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-cv.unread .wa-cv-msg { color: #101828; font-weight: 600; }
.wa-cv-chips { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.wa-cv-chips .wa-unread { margin: 0 0 0 auto; }
.wa-mini { font-size: 10.5px; font-weight: 700; border-radius: 6px; padding: 0 6px; background: #f2f4f7; color: #475467; }
.wa-mini.client { background: #eef4ff; color: #3538cd; }
.wa-mini.lead { background: #fdf2fa; color: #c11574; }
.wa-mini.needs { background: #fef0c7; color: #93370d; }
.wa-mini.paused { background: #f2f4f7; color: #667085; }
.wa-tk { color: #8696a0; font-size: 11px; letter-spacing: -2px; margin-right: 2px; }
.wa-tk.read { color: #53bdeb; }
.wa-tk.bad { color: var(--danger); letter-spacing: 0; }
.wa-lc-main { padding: 0; display: grid; grid-template-rows: auto 1fr auto; overflow: hidden; min-height: 0; }
.wa-lc-empty { display: grid; place-items: center; align-content: center; height: 100%; color: var(--muted); background: #f9fafb; }
.wa-lc-head { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-bottom: 1px solid #eaecf0; flex-wrap: wrap; background: #fff; }
.wa-lc-who { display: grid; min-width: 0; margin-right: auto; }
.wa-lc-who strong { font-size: 15px; }
.wa-lc-who .muted { font-size: 12px; }
.wa-lc-state { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.wa-back { display: none !important; }
.wa-pill { font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 3px 9px; background: #f2f4f7; color: #475467; white-space: nowrap; }
.wa-pill.ok { background: #ecfdf3; color: #067647; }
.wa-pill.off { background: #fef3f2; color: #b42318; }
.wa-pill.warn { background: #fffaeb; color: #93370d; }
.wa-pill.needs { background: #fef0c7; color: #93370d; }
.wa-lc-body { background: #efeae2; background-image: radial-gradient(#e2dbd0 1px, transparent 1px); background-size: 14px 14px; padding: 14px 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; min-height: 0; }
.wa-lc-body .wa-bubble { max-width: min(520px, 78%); }
.wa-bubble.bot { background: #e7f0ff; }
.wa-by { font-weight: 700; color: #54656f; }
.wa-day { text-align: center; margin: 8px 0; }
.wa-day span { background: #fff; color: #54656f; font-size: 11.5px; border-radius: 8px; padding: 3px 10px; box-shadow: 0 1px 1px rgba(11, 20, 26, 0.08); }
.wa-media-img { display: block; max-width: 100%; max-height: 260px; border-radius: 7px; margin-bottom: 6px; cursor: pointer; }
.wa-media-btn { border: 1px dashed #b7c1cc; background: rgba(255, 255, 255, 0.6); border-radius: 8px; padding: 8px 10px; font-size: 13px; cursor: pointer; margin-bottom: 4px; }
.wa-err.small { font-size: 11.5px; margin-top: 4px; }
.wa-lc-compose { border-top: 1px solid #eaecf0; background: #f0f2f5; padding: 8px 10px; }
.wa-compose { display: grid; gap: 6px; }
.wa-compose-row { display: flex; gap: 6px; align-items: flex-end; }
.wa-compose textarea { flex: 1; resize: none; min-height: 42px; max-height: 160px; border-radius: 20px; padding: 10px 14px; border: 1px solid #d0d5dd; background: #fff; }
.wa-icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; font-size: 20px; display: grid; place-items: center; cursor: pointer; flex: none; margin: 0 !important; }
.wa-icon-btn:hover { background: #e4e7ec; }
.wa-send { width: 44px; height: 44px; border-radius: 50% !important; padding: 0 !important; background: #128c4a !important; border-color: #128c4a !important; font-size: 18px; flex: none; }
.wa-file-chip { font-size: 12.5px; background: #fff; border-radius: 10px; padding: 6px 10px; border: 1px solid #d0d5dd; }
.wa-file-chip[hidden] { display: none; }
.wa-qr-wrap { position: relative; }
.wa-qr-menu { position: absolute; bottom: 46px; left: 0; z-index: 20; background: #fff; border: 1px solid #d0d5dd; border-radius: 12px; box-shadow: 0 12px 30px rgba(16, 24, 40, 0.18); width: min(340px, 80vw); max-height: 300px; overflow-y: auto; padding: 4px; }
.wa-qr-menu[hidden] { display: none; }
.wa-qr-menu button { display: grid; gap: 1px; width: 100%; text-align: left; border: 0; background: transparent; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.wa-qr-menu button:hover { background: #f2f4f7; }
.wa-qr-menu button span { font-size: 12px; color: var(--muted); }
.wa-qr-menu .wa-qr-manage { color: var(--navy); font-weight: 700; border-top: 1px solid #eaecf0; border-radius: 0; }
.wa-qr-edit { display: grid; grid-template-columns: 160px minmax(0, 1fr) 30px; gap: 8px; align-items: start; margin-bottom: 8px; }
.wa-closed { display: grid; gap: 8px; font-size: 13px; }
.wa-closed-row { display: flex; gap: 8px; }
.wa-closed-row select { flex: 1; }

/* ---------- Chatbot builder ---------- */
.wb-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.wb-main { display: grid; gap: 12px; min-width: 0; }
.wb-top { display: grid; gap: 12px; border-top: 4px solid #d0d5dd; }
.wb-top.on { border-top-color: #12b76a; }
.wb-top .wa-banner { margin: 0; }
.wb-top-main { display: flex; gap: 14px; align-items: center; }
.wb-top-main h3 { margin: 0 0 2px; }
.wb-top-main p { margin: 0; }
.wb-tabs { display: flex; gap: 4px; border-bottom: 2px solid #eaecf0; overflow-x: auto; }
.wb-tabs button { border: 0; background: transparent; padding: 10px 14px; font-weight: 700; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; }
.wb-tabs button.on { color: var(--navy); border-bottom-color: var(--navy); }
.wb-menu-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.wb-menu-tabs button { border: 1px solid #d0d5dd; background: #fff; border-radius: 10px; padding: 7px 12px; font-weight: 700; font-size: 13px; display: inline-flex; gap: 8px; align-items: center; }
.wb-menu-tabs button span { font-size: 11px; background: #f2f4f7; border-radius: 8px; padding: 0 6px; color: #475467; }
.wb-menu-tabs button.on { border-color: var(--navy); background: #eef3f9; color: var(--navy); }
.wb-menu-tabs .wb-add-menu { border-style: dashed; color: var(--muted); }
.wb-menu, .wb-card { display: grid; gap: 12px; }
.wb-card h3, .wb-menu h3 { margin: 0; }
.wb-card > p { margin: 0; }
.wb-menu-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.wb-menu-head > h3 { margin-right: auto; }
.wb-count { font-size: 11px; color: var(--muted); justify-self: end; }
.wb-vars { display: block; margin-top: 4px; }
.wb-media-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.wb-thumb { width: 72px; height: 54px; object-fit: cover; border-radius: 8px; border: 1px solid #e4e7ec; }
.wb-file { font-size: 13px; color: #067647; font-weight: 600; }
.wb-opts-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; padding-top: 6px; border-top: 1px dashed #e4e7ec; }
.wb-opts-head .muted { font-size: 12px; }
.wb-opts { display: grid; gap: 8px; }
.wb-opt { border: 1px solid #e4e7ec; border-radius: 12px; background: #fff; }
.wb-opt.open { border-color: #98a2b3; box-shadow: 0 4px 14px rgba(16, 24, 40, 0.06); }
.wb-opt-row { display: flex; gap: 10px; align-items: center; padding: 9px 10px; }
.wb-opt-n { width: 26px; height: 26px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 700; font-size: 12px; display: grid; place-items: center; flex: none; }
.wb-opt-main { flex: 1; min-width: 0; display: grid; cursor: pointer; }
.wb-opt-main .muted { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb-opt-btns { display: flex; gap: 4px; align-items: center; flex: none; }
.wb-opt-edit { padding: 4px 12px 14px; border-top: 1px solid #f2f4f7; display: grid; gap: 10px; }
.wb-msgs { display: grid; gap: 8px; }
.wb-msg { border: 1px solid #eaecf0; background: #fcfcfd; border-radius: 10px; padding: 10px; display: grid; gap: 8px; }
.wb-msg-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.wb-msg-head span { display: flex; gap: 4px; }
.wb-add-msg { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.wb-note { font-size: 13px; color: #344054; background: #f0f9ff; border: 1px solid #b9e6fe; border-radius: 10px; padding: 8px 10px; }
.wb-checks, .wl-checks { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.wb-checks label, .wl-checks label { display: inline-flex !important; gap: 5px; align-items: center; font-weight: 600; font-size: 13px; }
.wb-checks input, .wl-checks input { width: auto; margin: 0; }
.wb-help ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 13px; color: #344054; }
.wb-savebar { position: sticky; bottom: 10px; z-index: 5; }
.wb-sim-col { position: sticky; top: 12px; }
.wb-sim { padding: 0; overflow: hidden; display: grid; grid-template-rows: auto 1fr auto; height: min(680px, calc(100vh - 40px)); }
.wb-sim-head { display: flex; gap: 8px; align-items: center; padding: 10px 12px; background: #075e54; color: #fff; }
.wb-sim-head .muted { color: #cfe9e5; font-size: 11.5px; margin-right: auto; }
.wb-sim-screen { background: #efeae2; background-image: radial-gradient(#e2dbd0 1px, transparent 1px); background-size: 14px 14px; padding: 12px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.wb-sim-screen .wa-bubble { max-width: 88%; }
.wb-sim-foot { font-size: 11.5px; color: #667781; margin-top: 4px; }
.wb-sim-btns { display: grid; gap: 4px; max-width: 88%; }
.wb-sim-btns button, .wb-sim-btns a { background: #fff; border: 0; border-radius: 8px; padding: 8px; color: #027eb5; font-weight: 600; text-align: center; box-shadow: 0 1px 1px rgba(11, 20, 26, 0.13); cursor: pointer; text-decoration: none; font-size: 13.5px; }
.wb-sim-list { background: #fff; border-radius: 10px; max-width: 88%; box-shadow: 0 1px 1px rgba(11, 20, 26, 0.13); overflow: hidden; }
.wb-sim-list[hidden] { display: none; }
.wb-sim-list button { display: grid; gap: 1px; text-align: left; width: 100%; border: 0; border-bottom: 1px solid #f0f2f5; background: #fff; padding: 8px 12px; cursor: pointer; }
.wb-sim-list button:hover { background: #f7f8fa; }
.wb-sim-list button span { font-size: 12px; color: #667781; }
.wb-sim-note { align-self: center; font-size: 11.5px; background: #fff8c4; color: #54656f; border-radius: 8px; padding: 4px 10px; text-align: center; max-width: 92%; }
.wb-sim-doc { font-size: 13px; background: rgba(0, 0, 0, 0.04); border-radius: 6px; padding: 8px; margin-bottom: 4px; }
.wb-sim-typing { display: flex; gap: 4px; background: #fff; border-radius: 10px; padding: 10px 12px; width: 54px; }
.wb-sim-typing span { width: 7px; height: 7px; border-radius: 50%; background: #8696a0; animation: wbDot 1s infinite; }
.wb-sim-typing span:nth-child(2) { animation-delay: 0.15s; }
.wb-sim-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes wbDot { 0%, 60%, 100% { opacity: 0.3; } 30% { opacity: 1; } }
.wb-sim-input { display: flex; gap: 6px; padding: 8px; background: #f0f2f5; }
.wb-sim-input input { flex: 1; border-radius: 20px; }

/* ---------- Contact Lists ---------- */
.wl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin-bottom: 14px; }
.wl-card { display: grid; gap: 10px; align-content: start; }
.wl-head { display: flex; gap: 10px; align-items: flex-start; }
.wl-head .muted { font-size: 12.5px; }
.wl-ic { font-size: 22px; }
.wl-count b { font-size: 20px; color: var(--navy); }
.wl-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.wl-modal { max-width: 860px; }
.wl-filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin: 10px 0; }
.wl-filters .full { grid-column: 1 / -1; }
.wl-fixed { display: grid; gap: 10px; margin: 10px 0; }
.wl-members { display: flex; flex-wrap: wrap; gap: 6px; max-height: 200px; overflow-y: auto; }
.wl-m { display: inline-flex; gap: 6px; align-items: center; background: #f2f4f7; border-radius: 999px; padding: 3px 4px 3px 10px; font-size: 12.5px; }
.wl-m small { color: var(--muted); }
.wl-m button { border: 0; background: #fff; border-radius: 50%; width: 20px; height: 20px; cursor: pointer; }
.wl-preview { background: #f9fafb; border: 1px solid #eaecf0; border-radius: 10px; padding: 10px 12px; margin: 10px 0; font-size: 13.5px; }
.wl-preview .muted { font-size: 12px; margin-top: 4px; }

/* ---------- Broadcasts ---------- */
.wbc-top { display: flex; gap: 14px; justify-content: space-between; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.wbc-top h3 { margin: 0 0 4px; }
.wbc-top p { margin: 0; max-width: 760px; }
.wbc-list { display: grid; gap: 12px; }
.wbc-card { display: grid; gap: 12px; }
.wbc-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.wbc-head .muted { font-size: 12.5px; }
.wbc-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.wbc-stat-top { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.wbc-stat-top b { color: #101828; font-size: 15px; }
.wbc-bar { height: 6px; background: #f2f4f7; border-radius: 3px; overflow: hidden; margin-top: 4px; }
.wbc-bar i { display: block; height: 100%; background: #12b76a; border-radius: 3px; }
.wbc-stat.read .wbc-bar i { background: #53bdeb; }
.wbc-stat.replied .wbc-bar i { background: #7a5af8; }
.wbc-stat.bad .wbc-bar i { background: #f04438; }
.wbc-stat.wait .wbc-bar i { background: #f79009; }
.wbc-foot { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 12.5px; }
.wbc-people { max-height: 60vh; overflow-y: auto; }
.wbc-modal { max-width: 980px; }
.wbc-new { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.wbc-steps { display: grid; gap: 12px; }
.wbc-step { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; align-items: start; }
.wbc-n { width: 28px; height: 28px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 800; display: grid; place-items: center; margin-top: 22px; }
.wbc-count { font-size: 13px; margin-top: 4px; }
.wbc-count b { color: var(--navy); font-size: 16px; }
.wbc-preview { position: sticky; top: 0; display: grid; gap: 6px; }

@media (max-width: 1100px) {
  .wb-wrap { grid-template-columns: 1fr; }
  .wb-sim-col { position: static; }
  .wb-sim { height: 520px; }
}
@media (max-width: 860px) {
  .wa-lc { grid-template-columns: 1fr; height: calc(100vh - 150px); }
  .wa-lc .wa-lc-main { display: none; }
  .wa-lc.has-chat .wa-lc-side { display: none; }
  .wa-lc.has-chat .wa-lc-main { display: grid; }
  .wa-back { display: inline-grid !important; }
  .wa-lc-state { width: 100%; }
  .wa-lc-body .wa-bubble { max-width: 88%; }
  .wa-auto-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wa-ar-row { grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; padding: 12px; }
  .wa-ar-tpl { grid-column: 2 / 4; grid-row: 2; justify-self: start; max-width: 100%; }
  .wa-ar-chev { display: none; }
  .wa-ar-edit { padding: 4px 12px 14px; }
  .wa-ar-field { grid-template-columns: 1fr; gap: 4px; }
  .wa-ar-label { padding-top: 0; }
  .wa-auto-meta-btns { margin-left: 0; }
  .wbc-new { grid-template-columns: 1fr; }
  .wbc-preview { position: static; }
  .wa-qr-edit { grid-template-columns: 1fr 30px; }
  .wa-qr-edit textarea { grid-column: 1 / 2; }
  .wb-opt-row { flex-wrap: wrap; }
  .wb-opt-btns { width: 100%; justify-content: flex-end; }
}
.wa-send { display: grid !important; place-items: center; line-height: 1; }
.wa-lc-filters { flex-wrap: wrap; overflow-x: visible; }
.wb-menu > .btn, .wb-card > .btn, .wb-opt-edit > .btn { justify-self: start; }

/* V59 chatbot flow map */
.wb-flow-head h3,.wb-flow-checks h3{margin:0 0 8px}.wb-flow-head p{margin:0 0 15px;line-height:1.6}
.wb-flow-tools{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.wb-flow-tools label{display:flex;gap:8px;align-items:center;font-size:12px}.wb-flow-tools select{max-width:210px;padding:8px;border:1px solid #cbd5e1;border-radius:8px;background:white}
.wb-flow-legend{display:flex;gap:15px;flex-wrap:wrap;font-size:11px;color:#64748b;margin:16px 3px 10px}.wb-flow-legend span:first-child{color:#164e63}.wb-flow-legend span:nth-child(2){color:#7c3aed}.wb-flow-legend span:nth-child(3){color:#047857}
.wb-flow-canvas{overflow:auto;max-height:660px;border:1px solid #d5e2e6;border-radius:16px;background-color:#f6fafb;background-image:radial-gradient(#cbd5e1 .8px,transparent .8px);background-size:18px 18px;margin-bottom:18px;overscroll-behavior:contain}
.wb-flow-canvas svg{display:block;max-width:none}.wb-flow-lines path{fill:none;stroke:#a7b9c4;stroke-width:2}.wb-flow-node{cursor:pointer;outline:none}.wb-flow-node rect{fill:white;stroke:#cbd5e1;stroke-width:1.5}.wb-flow-node.menu rect{fill:#164e63;stroke:#164e63}.wb-flow-node.action rect{stroke:#c4b5fd}.wb-flow-node.next rect{fill:#ecfdf5;stroke:#a7d7c1}.wb-flow-node .title{font:600 13px 'DM Sans',sans-serif;fill:#173143}.wb-flow-node .detail{font:11px 'DM Sans',sans-serif;fill:#526575}.wb-flow-node.menu text{fill:white}.wb-flow-node:hover rect,.wb-flow-node:focus rect{stroke:#0284c7;stroke-width:3}.wb-flow-checks ul{padding-left:22px;font-size:13px;line-height:1.7}.wb-flow-checks .error{color:#b91c1c}.wb-flow-checks .warning{color:#92400e}.wb-flow-checks p{font-size:12px;line-height:1.6}
@media(max-width:760px){.wb-flow-canvas{max-height:480px}.wb-flow-tools label{width:100%}.wb-flow-legend{gap:8px}}
/* Keep a wide SVG inside its own scroller, not underneath the simulator. */
.wb-main{grid-template-columns:minmax(0,1fr)}
.wb-main > *,#wbTabBody{min-width:0}
.wb-flow-head,.wb-flow-checks{overflow-wrap:anywhere}

/* =====================================================================
   V59.2 — Print looks exactly like the downloaded PDF
   1) Browsers drop background colours when printing unless told not to.
      This keeps every colour (navy bars, cream table heads, note labels,
      report bars) in Print for Diet, Exercise, Bill, Progress and Report.
   2) A PDF made on a phone must not pick up the phone screen layout
      (Bill boxes stacked, Report tables turned into cards, short bars).
   ===================================================================== */
@media print {
  html,
  body,
  .print-sheet,
  .print-sheet * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  .print-sheet .invoice-meta {
    grid-template-columns: 1fr 1fr;
  }
  .print-sheet .invoice-bottom {
    grid-template-columns: 1.5fr 0.5fr;
  }
  .print-sheet .invoice-title {
    text-align: right;
  }
  .print-sheet .rp-bar {
    width: 70px;
  }
  .print-sheet .rp-bar i {
    display: inline-block; /* the PDF maker leaves a block bar empty */
    vertical-align: top;
  }
  /* the table's right edge line sits half outside the page — 1px narrower keeps it on paper */
  .print-sheet .pdf-table,
  .print-sheet .exercise-pdf table,
  .print-sheet .rp-table {
    width: calc(100% - 1px);
  }
}

/* V59.2 — WhatsApp mind map: one full tree, sub-menus open / close in place */
.wb-flow-node.menu.closed rect{fill:#2b6f86;stroke:#2b6f86;stroke-dasharray:6 4}
.wb-flow-node.next.bad rect{fill:#fef2f2;stroke:#fca5a5}
.wb-flow-pen circle{fill:rgba(255,255,255,.18);stroke:rgba(255,255,255,.55);stroke-width:1}
.wb-flow-pen text{font:13px 'DM Sans',sans-serif;fill:#fff}
.wb-flow-pen:hover circle{fill:rgba(255,255,255,.38)}

/* =====================================================================
   V59.3 — Leads: call groups, call filter, resizable / full-screen board
   ===================================================================== */
@media (min-width: 761px) {
  .lead-board:not(.single) {
    grid-template-columns: repeat(var(--lead-cols, 7), minmax(var(--lead-col-w, 132px), 1fr));
  }
}
@media (min-width: 761px) {
  .lead-board:not(.single) .lead-column {
    height: var(--lead-col-h, min(66vh, 680px));
  }
}
.lead-board.single .lead-column {
  max-height: var(--lead-col-h, min(66vh, 680px));
}
.lead-board-wrap {
  margin-bottom: 16px;
}
.lead-board-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 10px;
}
.lead-callbar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.lead-callbar-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #667085;
  margin-right: 2px;
}
.lead-call-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  background: #fff;
  color: #344054;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}
.lead-call-chip strong {
  font-size: 11.5px;
  background: #f2f4f7;
  border-radius: 999px;
  padding: 1px 7px;
}
.lead-call-chip:hover {
  border-color: var(--navy);
}
.lead-call-chip.active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.lead-call-chip.active strong {
  background: #ffffff26;
}
.lead-call-chip.call-now:not(.active) strong {
  background: #fef3f2;
  color: #b42318;
}
.lead-call-chip.call-noans:not(.active) strong {
  background: #fff4ed;
  color: #b93815;
}
.lead-call-chip.call-done:not(.active) strong {
  background: #ecfdf3;
  color: #067647;
}
.lead-board-size {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.lead-width {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #475467;
}
.lead-width input[type="range"] {
  width: 120px;
  padding: 0;
  accent-color: var(--navy);
}
.lead-board-title {
  font-size: 15px;
  color: var(--navy);
}
/* group heading inside a column */
.lc-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 7px;
  border-radius: 7px;
  margin-top: 4px;
}
.lc-group:first-child {
  margin-top: 0;
}
.lc-group b {
  font-size: 10.5px;
  background: #ffffffb3;
  border-radius: 999px;
  padding: 0 7px;
}
.lc-group.g-overdue {
  background: #fef3f2;
  color: #b42318;
}
.lc-group.g-today {
  background: #fff4ed;
  color: #b93815;
}
.lc-group.g-done {
  background: #ecfdf3;
  color: #067647;
}
.lc-group.g-later {
  background: #eff8ff;
  color: #175cd3;
}
/* status chips on a card */
.lc-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin: 2px 0 1px;
}
.lc-flag {
  font-size: 10px;
  font-weight: 800;
  border-radius: 6px;
  padding: 1px 6px;
  white-space: nowrap;
}
.lc-flag.noans {
  background: #fff4ed;
  color: #b93815;
}
.lc-flag.called {
  background: #ecfdf3;
  color: #067647;
}
.lc-flag.new {
  background: #eff8ff;
  color: #175cd3;
}
.lc-flag.moved {
  background: #f4f3ff;
  color: #5925dc;
}
.lead-table .lc-flags {
  display: inline-flex;
  margin: 0 0 0 4px;
  vertical-align: middle;
}
/* drag bar under the board */
.lead-board-resize {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
  padding: 6px;
  border: 1px dashed #c8d1dc;
  border-radius: 10px;
  font-size: 11.5px;
  font-weight: 700;
  color: #667085;
  cursor: ns-resize;
  user-select: none;
  touch-action: none;
  background: #fff;
}
.lead-board-resize span {
  width: 36px;
  height: 4px;
  border-radius: 4px;
  background: #98a2b3;
}
.lead-board-resize:hover,
.lead-board-resize:focus-visible,
.lead-board-resize.is-dragging {
  border-color: var(--navy);
  color: var(--navy);
  background: #eef3fa;
  outline: 0;
}
/* full screen */
.lead-board-wrap.is-full {
  position: fixed;
  inset: 0;
  z-index: 1760;
  margin: 0;
  padding: 12px 14px;
  background: #f4f6f9;
  display: flex;
  flex-direction: column;
}
.lead-board-wrap.is-full .lead-board {
  flex: 1 1 auto;
  min-height: 0;
  align-items: stretch;
}
.lead-board-wrap.is-full .lead-board .lead-column {
  max-height: none;
  height: auto;
  min-height: 0;
}
body.hc-board-full {
  overflow: hidden;
}
/* popups (lead window, call form, booking) still open above the full-screen board */
body.hc-board-full .modal-overlay {
  z-index: 1790;
}
@media (max-width: 760px) {
  .lead-width {
    display: none;
  }
  .lead-board-tools {
    flex-direction: column;
    align-items: stretch;
  }
  .lead-callbar {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
  }
  .lead-call-chip {
    flex: 0 0 auto;
  }
  .lead-board:not(.single) .lead-column {
    height: var(--lead-col-h, 62vh);
  }
  .lead-board-wrap.is-full {
    padding: 10px;
  }
}
.lead-table td.lt-name {
  white-space: normal;
}
.lead-table td.lt-name .lc-flags {
  display: flex;
  margin: 3px 0 0;
}
/* keep the notification bell from covering "Exit full screen" */
.lead-board-wrap.is-full .lead-board-tools {
  padding-right: 64px;
}

/* =====================================================================
   V59.3 — Chatbot mind map: zoom, view size, full screen
   ===================================================================== */
.wb-flow-stage {
  position: relative;
  margin-bottom: 18px;
}
.wb-flow-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin: 14px 0 0;
}
.wb-flow-title {
  display: none;
  color: var(--navy);
  font-size: 15px;
  margin-right: 4px;
}
.wb-flow-label {
  font-size: 12px;
  font-weight: 700;
  color: #475467;
}
.wb-seg {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
  background: #fff;
}
.wb-seg button {
  border: 0;
  background: transparent;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  color: #344054;
  cursor: pointer;
}
.wb-seg button + button {
  border-left: 1px solid var(--line);
}
.wb-seg button.on {
  background: var(--navy);
  color: #fff;
}
.wb-flow-stage .wb-flow-canvas {
  max-height: none;
  min-height: 240px;
  margin-bottom: 0;
  resize: vertical;
  cursor: grab;
  touch-action: pan-x pan-y;
}
.wb-flow-stage .wb-flow-canvas.is-panning {
  cursor: grabbing;
  user-select: none;
}
.wb-flow-stage .wb-flow-canvas .wb-flow-node {
  cursor: pointer;
}
/* floating zoom box, bottom-right of the map */
.wb-flow-canvas-wrap {
  position: relative;
}
.wb-flow-zoom {
  position: absolute;
  right: 22px;
  top: 12px;
  z-index: 3;
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid #d5e2e6;
  border-radius: 12px;
  box-shadow: 0 6px 20px #0f2a3a1f;
  overflow: hidden;
}
.wb-flow-zoom button {
  border: 0;
  background: transparent;
  min-width: 38px;
  height: 36px;
  font-size: 18px;
  font-weight: 700;
  color: #164e63;
  cursor: pointer;
}
.wb-flow-zoom button + button {
  border-left: 1px solid #e4ecef;
}
.wb-flow-zoom button:hover {
  background: #eef6f8;
}
.wb-flow-zoom .wb-flow-pct {
  min-width: 58px;
  font-size: 12.5px;
}
/* full screen */
.wb-flow-stage.is-full {
  position: fixed;
  inset: 0;
  z-index: 1760;
  margin: 0;
  padding: 12px 14px;
  background: #fff;
  display: flex;
  flex-direction: column;
}
.wb-flow-stage.is-full .wb-flow-bar {
  margin: 0;
  padding-right: 64px;
}
.wb-flow-stage.is-full .wb-flow-title {
  display: inline;
}
.wb-flow-stage.is-full .wb-flow-canvas {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
  resize: none;
}
.wb-flow-stage.is-full .wb-flow-canvas-wrap {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.wb-flow-stage.is-full .wb-flow-zoom {
  top: auto;
  right: 22px;
  bottom: 18px;
}
body.hc-flow-full {
  overflow: hidden;
}
body.hc-flow-full .modal-overlay {
  z-index: 1790;
}
@media (max-width: 760px) {
  .wb-flow-stage .wb-flow-canvas {
    max-height: none;
  }
  .wb-flow-zoom {
    right: 12px;
  }
  .wb-flow-legend span:last-child {
    display: none;
  }
}
.lead-board-tools > * {
  min-width: 0;
  max-width: 100%;
}
@media (max-width: 760px) {
  .lead-board-wrap.is-full .lead-board-tools {
    padding-right: 0;
  }
  .lead-board-size {
    justify-content: space-between;
  }
  .wb-flow-stage.is-full .wb-flow-bar {
    padding-right: 0;
  }
}
/* V59.3: an empty / hidden message box never blocks taps on what is under it */
.toast:not(.show) {
  pointer-events: none;
}
/* V59.5: blue "new" dot on leads nobody has opened yet (like an unread message) */
.lead-new-dot {
  flex: 0 0 auto;
  display: inline-block;
  width: 10px;
  height: 10px;
  margin: 3px 6px 0 0;
  border-radius: 50%;
  background: #1570ef;
  box-shadow: 0 0 0 0 #1570ef66;
  animation: leadDotPulse 2s ease-out infinite;
  vertical-align: middle;
}
.lead-table td.lt-name .lead-new-dot {
  margin-top: 0;
  position: relative;
  top: -1px;
}
@keyframes leadDotPulse {
  0% { box-shadow: 0 0 0 0 #1570ef66; }
  70% { box-shadow: 0 0 0 6px #1570ef00; }
  100% { box-shadow: 0 0 0 0 #1570ef00; }
}
@media (prefers-reduced-motion: reduce) {
  .lead-new-dot { animation: none; }
}
.lead-card.lc.is-unseen {
  background: #f2f7ff;
}
.lead-card.lc.is-unseen .lc-name {
  font-weight: 800;
}
.lead-table tbody tr.is-unseen td {
  background: #f2f7ff;
}
.lead-nav-badge {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 6px;
  border-radius: 9px;
  background: #1570ef;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}
.lead-nav-badge[hidden],
.lead-nav-dot[hidden] {
  display: none;
}
.lead-nav-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 6px;
  border-radius: 50%;
  background: #1570ef;
  vertical-align: middle;
}
.nav-group-toggle[aria-expanded="true"] .lead-nav-dot {
  display: none;
}

/* =====================================================================
   V60 — WhatsApp Home · message journeys · Check one person · My workflows
   ===================================================================== */
.wh-top { display: grid; gap: 14px; margin-bottom: 14px; border-top: 4px solid #d0d5dd; }
.wh-top.on { border-top-color: #12b76a; }
.wh-setup { margin-bottom: 14px; }
.wh-setup > summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; list-style: none; }
.wh-setup > summary::-webkit-details-marker { display: none; }
.wh-setup > summary::before { content: "›"; font-weight: 700; transition: transform 0.15s; display: inline-block; }
.wh-setup[open] > summary::before { transform: rotate(90deg); }
.wh-steps { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.wh-steps li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid #eaecf0; border-radius: 12px; background: #fff; }
.wh-steps li > div { display: grid; gap: 2px; }
.wh-steps li span.muted { font-size: 13px; }
.wh-steps li.done { background: #f6fef9; border-color: #a6e9c0; }
.wh-step-n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; background: #f2f4f7; color: #344054; }
.wh-steps li.done .wh-step-n { background: #12b76a; color: #fff; }
.wh-h { margin: 18px 0 10px; font-size: 16px; color: var(--navy); }
.wh-parts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.wh-part { display: grid; gap: 10px; align-content: start; border-top: 4px solid #d0d5dd; margin: 0; }
.wh-part.on { border-top-color: #12b76a; }
.wh-part-head { display: flex; gap: 10px; align-items: flex-start; }
.wh-part-head > div { display: grid; gap: 3px; }
.wh-part-head span.muted { font-size: 12.5px; line-height: 1.35; }
.wh-part-icon { font-size: 22px; line-height: 1; }
.wh-part-status { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; }
.wh-part-num b { color: var(--navy); }
.wh-part-more { font-size: 12.5px; }
.wh-part .btn { justify-self: start; }
.wh-journey, .wh-person, .wh-rules { margin-bottom: 14px; }
.wh-journey-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; align-items: flex-start; }
.wh-journey-head h3 { margin: 0 0 2px; }
.wh-journey-head p { margin: 0; }
.wh-tl { list-style: none; margin: 14px 0 0; padding: 0; }
.wh-tl-stage { position: relative; display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; padding-bottom: 16px; }
.wh-tl-stage::before { content: ""; position: absolute; left: 10px; top: 20px; bottom: 0; width: 2px; background: #e4e7ec; }
.wh-tl-stage:last-child::before { display: none; }
.wh-tl-dot { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 3px solid var(--teal); margin-top: 1px; position: relative; z-index: 1; }
.wh-tl-body { display: grid; gap: 6px; min-width: 0; }
.wh-tl-title { display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; }
.wh-tl-title span { font-size: 12.5px; }
.wh-tl-item { display: grid; grid-template-columns: 170px minmax(0, 1fr) auto; gap: 10px; align-items: center; text-align: left; width: 100%; border: 1px solid #eaecf0; background: #fff; border-radius: 10px; padding: 8px 10px; color: inherit; }
.wh-tl-item:hover { border-color: var(--teal); background: #f6fbfa; }
.wh-tl-item.off { background: #fafafa; color: #667085; }
.wh-tl-item.flow { border-left: 4px solid #7a5af8; }
.wh-tl-when { font-size: 12.5px; font-weight: 700; color: var(--navy); }
.wh-tl-item.off .wh-tl-when { color: #98a2b3; }
.wh-tl-what { display: grid; gap: 1px; min-width: 0; }
.wh-tl-what > span { font-weight: 600; font-size: 13.5px; }
.wh-tl-what small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wh-tl-state { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.wh-tl-none { font-size: 13px; }
.wh-person-find input { width: 100%; max-width: 520px; }
.wh-p-head { margin: 14px 0 6px; }
.wh-person h4 { margin: 14px 0 6px; font-size: 14px; color: var(--navy); }
.wh-p-row { display: grid; grid-template-columns: 170px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border-bottom: 1px solid #f2f4f7; }
.wh-p-row.next { background: #f5f8ff; border-radius: 8px; border-bottom-color: #fff; }
.wh-p-time { font-size: 12.5px; font-weight: 600; color: #344054; }
.wh-p-what { display: grid; gap: 1px; min-width: 0; }
.wh-p-what small { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wh-p-st { display: flex; gap: 6px; align-items: center; }
.wh-p-note, .wh-p-empty { font-size: 12.5px; }
.wh-rules ul { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 6px; font-size: 13.5px; }

.wf-hint { margin: 4px 0 14px; font-size: 13px; }
.wf-intro { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.wf-intro h3 { margin: 0 0 2px; }
.wf-intro p { margin: 0; }
.wf-list { display: grid; gap: 10px; margin-bottom: 14px; }
.wf-card { display: grid; gap: 10px; margin: 0; border-left: 4px solid #d0d5dd; }
.wf-card.on { border-left-color: #7a5af8; }
.wf-card-top { display: flex; gap: 12px; align-items: center; }
.wf-card-name { display: grid; gap: 2px; }
.wf-card-name span { font-size: 13px; }
.wf-card-steps { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.wf-pill { font-size: 12px; background: #f4f3ff; color: #4a1fb8; border-radius: 999px; padding: 3px 10px; font-weight: 600; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wf-pill.bad { background: #fee4e2; color: #b42318; }
.wf-arrow { color: #98a2b3; font-weight: 700; }
.wf-card-sum { font-size: 12.5px; }
.wf-empty p { margin: 0 0 10px; }
.wf-examples { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.wf-example { display: grid; gap: 4px; text-align: left; border: 1px dashed #b692f6; background: #faf8ff; border-radius: 12px; padding: 12px; color: inherit; }
.wf-example:hover { border-style: solid; background: #f4f3ff; }
.wf-example span { font-size: 12.5px; }
.wf-modal { max-width: 1020px; width: calc(100vw - 32px); }
.wf-edit { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.wf-flow { display: grid; gap: 0; }
.wf-flow > .field { margin-bottom: 12px; }
.wf-node { border: 1px solid #e4e7ec; border-radius: 14px; padding: 12px 14px; background: #fff; display: grid; gap: 8px; }
.wf-node.when { border-color: #f5c48a; background: #fffaf3; }
.wf-node.step { border-color: #d9d6fe; background: #fcfbff; }
.wf-node.stop { border-color: #fecdca; background: #fffbfa; }
.wf-node-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.wf-node-n { width: 26px; height: 26px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.wf-node.when .wf-node-n { background: #f79009; }
.wf-node.step .wf-node-n { background: #7a5af8; }
.wf-node.stop .wf-node-n { background: #d92d20; }
.wf-node-time { font-size: 12px; }
.wf-node-tools { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.wf-node-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13.5px; }
.wf-node-row label { display: inline-flex; gap: 6px; align-items: center; }
.wf-node-row input[type="number"] { width: 80px; }
.wf-node-row select, .wf-node-row input { width: auto; margin: 0; }
.wf-node-row select.wf-unit { flex: 0 0 auto; min-width: 120px; }
.wf-node-row select.wf-tpl { flex: 1 1 240px; min-width: 0; max-width: 100%; }
.wf-node-row select.wf-from { flex: 1 1 220px; min-width: 0; max-width: 100%; }
.wf-send { font-weight: 700; }
.wf-node-msg { font-size: 12.5px; background: #dcf8c6; border-radius: 10px; padding: 8px 10px; max-height: 120px; overflow: auto; white-space: pre-wrap; }
.wf-connector { display: flex; justify-content: center; padding: 6px 0; position: relative; }
.wf-connector::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: #d0d5dd; }
.wf-connector span, .wf-connector .btn { position: relative; background: #fff; border: 1px solid #d0d5dd; border-radius: 999px; padding: 2px 10px; font-size: 12px; color: #475467; }
.wf-connector.add { padding: 10px 0; }
.wf-side { display: grid; gap: 12px; position: sticky; top: 0; }
.wf-preview ol { margin: 8px 0; padding-left: 18px; display: grid; gap: 6px; font-size: 13px; }
.wf-preview li span { display: block; }
.wf-pv-time { font-weight: 700; color: var(--navy); }
.wf-help ul { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 5px; font-size: 12.5px; }
.wf-actions { margin-top: 14px; }
.wbc-after { border: 1px solid #d1e9ff; background: #f5faff; border-radius: 12px; padding: 10px 12px; font-size: 13px; }
.wbc-after ul { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 4px; }
@media (max-width: 1100px) {
  .wh-parts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .wf-edit { grid-template-columns: 1fr; }
  .wf-side { position: static; }
}
@media (max-width: 760px) {
  .wh-parts { grid-template-columns: 1fr; }
  .wh-tl-item, .wh-p-row { grid-template-columns: 1fr; gap: 4px; }
  .wh-tl-state, .wh-p-st { justify-content: flex-start; }
  .wh-steps li { grid-template-columns: 30px minmax(0, 1fr); }
  .wh-steps li > :last-child { grid-column: 2; justify-self: start; }
  .wf-modal { width: calc(100vw - 16px); }
}

.field label.wbc-skip, .wf-node label.wa-inline { display: flex !important; gap: 8px; align-items: flex-start; font-weight: 500; font-size: 13px; color: #344054; margin: 8px 0 0; text-transform: none; letter-spacing: 0; }
.field label.wbc-skip input, .wf-node label.wa-inline input { width: auto; margin: 2px 0 0; flex: none; }
.wf-node > .muted { font-size: 12.5px; }

/* V60.6: last call result next to the lead's name */
.lc-call {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  align-self: flex-start;
  font-size: 10.5px;
  font-weight: 800;
  border-radius: 999px;
  padding: 1px 8px;
  margin: 2px 0 1px;
  white-space: nowrap;
  border: 1px solid transparent;
}
.lc-call.ok { background: #ecfdf3; color: #067647; border-color: #abefc6; }
.lc-call.mid { background: #fffaeb; color: #b54708; border-color: #fedf89; }
.lc-call.warn { background: #fff4ed; color: #b93815; border-color: #f9dbaf; }
.lc-call.bad { background: #fef3f2; color: #b42318; border-color: #fecdca; }
.lc-call.none { background: #f2f4f7; color: #475467; border-color: #d0d5dd; }
.lead-table .lc-call { vertical-align: middle; margin: 0 0 0 2px; }

/* V60.6: leave requests */
.cal-ev.block.pending {
  background: repeating-linear-gradient(45deg, #fffaeb 0 6px, #fef0c7 6px 12px);
  border: 1px dashed #f79009;
  color: #93370d;
}
.cal-ag-row.block.pending { background: #fffaeb; border-color: #f79009; }
.appt-block-row.pending { background: #fffaeb; }
.appt-blocks-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.leave-pill { display: inline-block; font-size: 11px; font-weight: 800; border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.leave-pill.pending { background: #fffaeb; color: #b54708; border: 1px solid #fedf89; }
.leave-pill.ok { background: #ecfdf3; color: #067647; border: 1px solid #abefc6; }
.leave-pill.refused { background: #fef3f2; color: #b42318; border: 1px solid #fecdca; white-space: normal; }
.leave-modal h4 { margin: 16px 0 6px; }
.leave-row { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; padding: 9px 0; border-top: 1px solid var(--line); }
.leave-row .actions { display: flex; gap: 6px; flex-shrink: 0; }
@media (max-width: 560px) { .leave-row { flex-direction: column; } }

/* =====================================================================
   V60.9 — Staff attendance
   ===================================================================== */
.att-btn {
  position: fixed;
  top: 18px;
  right: 78px;
  z-index: 1800;
  width: 46px;
  height: 42px;
  border: 1px solid #d7e0e8;
  border-radius: 11px;
  background: #fff;
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(18, 53, 91, 0.12);
  font-size: 19px;
  cursor: pointer;
}
.att-btn[hidden] { display: none; }
.att-btn:hover { background: #f7fafc; }
.att-dot {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: #98a2b3;
}
.att-dot.in { background: #12b76a; }
.att-dot.break { background: #f79009; }
.att-dot.done { background: var(--navy); }
.att-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}
.att-badge.in-tab { position: static; margin-left: 4px; display: inline-block; }
@media (min-width: 761px) {
  .att-btn { top: 34px; right: 90px; }
  body.hc-att-on .topbar .actions { padding-right: 120px; }
}
@media (max-width: 760px) {
  .att-btn { top: 8px !important; right: 58px !important; width: 42px; height: 40px; z-index: 1750; }
  body.hc-att-on .mobile-bar { padding-right: 112px; }
}

/* staff panel */
.att-modal { max-width: 520px; }
.att-now { text-align: center; padding: 6px 0 4px; }
.att-date { font-weight: 700; color: var(--navy); }
.att-clock { font-size: 38px; font-weight: 800; color: var(--navy); letter-spacing: 0.5px; margin: 2px 0; }
.att-line { margin: 10px 0 4px; font-size: 15px; }
.att-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 14px 0 6px; }
.att-big { min-width: 150px; min-height: 52px; font-size: 17px; font-weight: 800; border-radius: 14px; color: #fff; border: 0; }
.att-big.in { background: #12b76a; }
.att-big.out { background: #d92d20; }
.att-big.brk { background: #f79009; }
.att-big:disabled { opacity: 0.6; }
.att-wait, .att-done { padding: 14px; font-weight: 700; color: var(--teal); }
.att-note { font-size: 12px; margin: 6px 0 0; }
.att-late { color: var(--warning); font-style: normal; font-weight: 700; font-size: 12px; margin-left: 6px; }
.att-steps { list-style: none; margin: 12px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--cream); }
.att-steps li { display: flex; gap: 8px; align-items: baseline; padding: 4px 0; }
.att-steps li span { min-width: 90px; color: var(--muted); }
.att-links { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin: 8px 0 4px; }
.att-sec { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.att-sec h4 { margin: 0 0 8px; color: var(--navy); }
.att-req { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.att-req-r { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.att-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.att-chips span { background: #f2f4f7; border-radius: 999px; padding: 4px 10px; font-size: 12px; }
.att-chips.big span { font-size: 13px; padding: 6px 12px; background: #fff; border: 1px solid var(--line); }
.att-mylist { display: grid; gap: 2px; max-height: 320px; overflow-y: auto; }
.att-myrow { display: grid; grid-template-columns: 92px 1fr 64px auto; gap: 8px; align-items: center; font-size: 13px; padding: 5px 2px; border-bottom: 1px solid #f0f2f4; }
.att-myrow .att-late { grid-column: 1 / -1; margin: 0; }
.att-myd { font-weight: 700; }
.att-fix .form-grid { margin-top: 6px; }

/* status pills */
.att-pill { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; background: #f2f4f7; color: #475467; white-space: nowrap; }
.att-pill.ok { background: #eaf7f0; color: var(--success); }
.att-pill.live { background: #e8f4f2; color: var(--teal); }
.att-pill.warn { background: #fff4e5; color: var(--warning); }
.att-pill.bad { background: #fdecea; color: var(--danger); }
.att-pill.leave { background: #f4ebff; color: #6941c6; }
.att-pill.off { background: #f2f4f7; color: #667085; }
.att-bad { color: var(--danger); font-weight: 700; }

/* owner page */
.att-tabs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 14px; }
.att-loading { margin-left: 6px; font-size: 12px; }
.att-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.att-card { padding: 14px; }
.att-card-h { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.att-card-t { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 6px; }
.att-card-t div { display: flex; flex-direction: column; gap: 2px; }
.att-card-t .att-late { margin: 0; }
.att-loc { font-size: 12px; margin-top: 4px; }
.att-card-a { display: flex; gap: 6px; margin-top: 10px; }
.att-h { margin: 18px 0 8px; font-size: 16px; color: var(--navy); }
.att-month-f { margin-bottom: 12px; }
.att-table td, .att-table th { white-space: nowrap; }
.att-rq { padding: 12px 14px; margin-bottom: 10px; }
.att-rq-h { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; margin-bottom: 6px; }
.att-rq-b { display: grid; gap: 4px; font-size: 13px; }
.att-rq .actions { margin-top: 10px; }
.att-hist { margin-top: 10px; font-size: 12px; }
.att-hist ul { margin: 4px 0 0; padding-left: 18px; }
.att-set { padding: 16px; }
.att-switch { display: flex; gap: 8px; align-items: center; font-size: 15px; }
.att-staff-set { display: grid; gap: 10px; }
.att-srow { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.att-sname { display: flex; gap: 8px; align-items: center; }
.att-sfields { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-top: 8px; }
.att-sfields label { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; }
.att-sfields input[type="time"] { width: auto; }
.att-days { display: flex; flex-wrap: wrap; gap: 4px; }
.att-days label { border: 1px solid var(--line); border-radius: 8px; padding: 3px 7px; font-size: 12px; gap: 4px; }
@media (max-width: 760px) {
  .att-big { min-width: 0; flex: 1 1 140px; }
  .att-clock { font-size: 32px; }
  .att-table td, .att-table th { white-space: normal; }
}
/* V60.9: tick boxes inside the attendance settings stay small, text next to them */
.att-set input[type="checkbox"], .att-days input[type="checkbox"] { width: auto; min-height: 0; flex: none; margin: 0; }
.att-switch, .att-sname, .att-any, .att-days label { display: inline-flex !important; justify-content: flex-start; align-items: center; gap: 6px; flex-wrap: wrap; text-align: left; }
.att-any { flex-basis: 100%; display: flex !important; }
.att-sname b, .att-any, .att-switch b { font-size: 14px; }
.att-big { justify-content: center; text-align: center; display: inline-flex; align-items: center; }
/* when the bell is hidden, the attendance button takes its place */
.att-btn:has(+ #notificationBell[style*="none"]) { right: 24px; }
@media (min-width: 761px) { .att-btn:has(+ #notificationBell[style*="none"]) { right: 36px; } }
@media (max-width: 760px) { .att-btn:has(+ #notificationBell[style*="none"]) { right: 10px !important; } }

/* V60.9: notifications divided by kind of work */
.ntf-group { border: 1px solid #e1e7ec; border-radius: 12px; background: #fbfcfd; margin-bottom: 10px; overflow: hidden; }
.ntf-group-head { width: 100%; display: flex; align-items: center; gap: 8px; padding: 11px 12px; background: #fff; border: 0; text-align: left; cursor: pointer; font: inherit; color: var(--navy); }
.ntf-group.open .task-group-chev { transform: rotate(90deg); }
.ntf-icon { font-size: 18px; width: 24px; text-align: center; }
.ntf-label { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ntf-label strong { font-size: 13px; }
.ntf-names { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ntf-group-body { padding: 10px 10px 4px; border-top: 1px solid #eef1f4; }
.ntf-group-foot { display: flex; gap: 6px; flex-wrap: wrap; justify-content: space-between; margin: 2px 0 8px; }

/* V60.11: "Forgot password?" on the login screen */
.auth-forgot { background: none; border: 0; color: var(--navy); font-family: inherit; font-size: 13px; font-weight: 600; line-height: 1.4; cursor: pointer; justify-self: center; padding: 4px 8px; text-decoration: underline; text-underline-offset: 2px; }
.auth-forgot:hover { opacity: .8; }
/* V60.11: web links inside WhatsApp chat bubbles can be tapped */
a.wa-link { color: inherit; text-decoration: underline; overflow-wrap: anywhere; word-break: break-word; }
/* V60.11: text inside the app's own popups (instead of browser alert / confirm) */
.hc-popup-text { margin: 0; white-space: normal; overflow-wrap: anywhere; line-height: 1.5; }

/* =====================================================================
   V61 — DESIGN SYSTEM ("Premium & clean")
   One place for the app's look: colours, type, buttons, forms, cards,
   tables, popups, menu, phone bottom bar, dashboard and client cards.
   Same brand (navy + peach, DM Sans + Playfair Display), calmer and lighter.
   Navy and peach still come from Branding (Settings & Tools → Branding).
   Every rule is limited to the app screens (.app) and its popups, so the
   printed / PDF bills, diet and exercise charts look exactly as before.
   ===================================================================== */
body {
  color: var(--text);
  background: var(--bg);
}

/* The printed / PDF pages keep their own (old) colours and text settings — they never change with the app's look */
.hc-pdf-render,
.print-sheet {
  --peach-soft: #fff2e7;
  --line: #dfe4e8;
  --muted: #667085;
  color: #1a1a1a;
  -webkit-font-smoothing: auto;
  -moz-osx-font-smoothing: auto;
  text-rendering: auto;
}

/* ---------- Layout ---------- */
.app {
  grid-template-columns: 256px 1fr;
}
.main {
  background: var(--bg);
  padding: 28px 32px 40px;
}
.topbar {
  margin-bottom: 20px;
  align-items: center;
}
.topbar h2 {
  font: 700 27px/1.2 "Playfair Display", serif;
  letter-spacing: -0.01em;
  color: var(--navy);
}
.topbar p {
  font-size: 14px;
  color: var(--muted);
  margin-top: 4px;
}

/* ---------- Sidebar ---------- */
.sidebar {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.14) 0%, rgba(255, 255, 255, 0.04) 100%), var(--navy);
  padding: 18px 14px;
  border-right: 1px solid rgba(255, 255, 255, 0.04);
}
.brand {
  gap: 12px;
  padding: 2px 6px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}
.mini-logo {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}
.brand h1 {
  font: 700 17px/1.2 "Playfair Display", serif;
  letter-spacing: 0.01em;
}
.brand p {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.6);
}
.nav {
  gap: 3px;
  margin-top: 16px;
}
.nav button {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  font-weight: 600;
  transition:
    background 0.15s var(--ease),
    color 0.15s var(--ease);
}
.nav button:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}
.nav button.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  box-shadow: inset 3px 0 0 var(--peach);
}
.nav-ico {
  width: 19px;
  height: 19px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav button .nav-ico {
  opacity: 0.9;
}
.nav .nav-label {
  display: inline-flex;
  align-items: center;
  gap: 11px;
}
.nav .nav-group-toggle.has-active-page {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}
.nav-chevron {
  font-size: 20px;
  opacity: 0.6;
}
.nav-submenu {
  gap: 2px;
  margin: 4px 0 6px 21px;
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.14);
}
.nav .nav-submenu button {
  font-size: 13px;
  font-weight: 500;
  padding: 8px 10px;
  color: rgba(255, 255, 255, 0.72);
}
.nav .nav-submenu button.active {
  background: var(--peach);
  color: var(--navy2);
  font-weight: 700;
  box-shadow: none;
}

/* ---------- Cards & sections ---------- */
:where(.app, .modal-overlay) .card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 18px 20px;
}
:where(.app, .modal-overlay) .section-title h3 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.005em;
}
:where(.app, .modal-overlay) .empty {
  border-radius: var(--radius-sm);
  border-color: var(--border-strong);
  color: var(--muted);
  background: #fbfcfd;
}
:where(.app, .modal-overlay) .notice {
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.5;
}

/* ---------- Buttons ---------- */
:where(.app, .modal-overlay, .card-more-menu) .btn,
:where(.app, .modal-overlay) .file-btn {
  min-height: 38px;
  padding: 8px 14px;
  gap: 6px;
  border-radius: var(--radius-sm);
  border-color: var(--border-strong);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  transition:
    background 0.15s var(--ease),
    border-color 0.15s var(--ease),
    box-shadow 0.15s var(--ease),
    transform 0.1s var(--ease);
}
:where(.app, .modal-overlay) .btn:hover {
  background: #f7f9fc;
  border-color: #b8c2d0;
}
:where(.app, .modal-overlay) .btn:active {
  transform: translateY(1px);
}
:where(.app, .modal-overlay) .btn:focus-visible,
:where(.app, .modal-overlay) .file-btn:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}
:where(.app, .modal-overlay) .btn.primary {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
  box-shadow: 0 1px 2px rgba(15, 45, 82, 0.24);
}
:where(.app, .modal-overlay) .btn.primary:hover {
  background: var(--navy2);
  border-color: var(--navy2);
}
:where(.app, .modal-overlay) .btn.small {
  min-height: 32px;
  padding: 6px 11px;
  font-size: 12.5px;
  border-radius: 9px;
}
:where(.app, .modal-overlay) .btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* ---------- Forms ---------- */
:where(.app, .modal-overlay) input,
:where(.app, .modal-overlay) select,
:where(.app, .modal-overlay) textarea {
  border-color: var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 14px;
  color: var(--text);
  transition:
    border-color 0.15s var(--ease),
    box-shadow 0.15s var(--ease);
}
:where(.app, .modal-overlay) input::placeholder,
:where(.app, .modal-overlay) textarea::placeholder {
  color: #98a2b3;
}
:where(.app, .modal-overlay) input:focus,
:where(.app, .modal-overlay) select:focus,
:where(.app, .modal-overlay) textarea:focus {
  border-color: var(--navy);
  box-shadow: var(--ring);
}
:where(.app, .modal-overlay) input[type="checkbox"],
:where(.app, .modal-overlay) input[type="radio"] {
  accent-color: var(--navy);
}
:where(.app, .modal-overlay) label {
  font-size: 12.5px;
  font-weight: 600;
  color: #344054;
}

/* ---------- Tables ---------- */
:where(.app, .modal-overlay) .table-wrap {
  border-color: var(--line);
  border-radius: 12px;
}
:where(.app, .modal-overlay) th {
  background: #f8fafc;
  color: var(--text-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-bottom-color: var(--line);
}
:where(.app, .modal-overlay) td {
  font-size: 13px;
  border-bottom-color: #eef1f5;
}
:where(.app, .modal-overlay) tbody tr:hover > td {
  background: #fafbfd;
}

/* ---------- Pills ---------- */
:where(.app, .modal-overlay) .status-chip {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  letter-spacing: 0.01em;
}

/* ---------- Popups ---------- */
.modal-overlay {
  background: rgba(10, 25, 45, 0.5);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.modal-card {
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.modal-card > .section-title {
  border-radius: 18px 18px 0 0;
  padding: 16px 20px;
  margin: -18px -20px 16px;
  top: -18px;
  border-bottom-color: var(--line);
}
.hc-choice-card .hc-choice-message {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text);
}
.card-more-menu.floating {
  border-radius: 14px;
  border-color: var(--line);
  box-shadow: var(--shadow-md);
  padding: 6px;
}
.card-more-menu button {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}
.card-more-menu button:hover,
.card-more-menu button:focus-visible {
  background: #f2f5f9;
}

/* ---------- Bell, toast, sync pill ---------- */
.notification-bell {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
  color: var(--navy);
}
.notification-bell .nav-ico {
  width: 21px;
  height: 21px;
}
.toast {
  border-radius: 12px;
  font-size: 13.5px;
  padding: 12px 16px;
}
.hc-sync-status {
  box-shadow: var(--shadow-sm);
  font-size: 11.5px;
}

/* ---------- Dashboard ---------- */
.clinic-kpis {
  gap: 12px;
}
.dashboard-card {
  padding: 16px 18px;
  transition:
    transform 0.18s var(--ease),
    box-shadow 0.18s var(--ease),
    border-color 0.18s var(--ease);
}
.dashboard-card:before {
  top: 14px;
  bottom: 14px;
  width: 3px;
  border-radius: 0 3px 3px 0;
}
.dashboard-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}
.dashboard-card .muted {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
}
.kpi-number {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 4px;
}
.dashboard-card small {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 6px;
}
#dashGreeting {
  font-weight: 500;
}

/* ---------- Client cards ---------- */
.client-card {
  --st: #17a56b;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 16px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}
.client-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  height: 3px;
  background: var(--st);
}
.client-card.cc-paused {
  --st: #d9931e;
}
.client-card.cc-completed {
  --st: var(--navy);
}
.client-card.cc-inactive {
  --st: #c94f45;
}
.client-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.client-card-head {
  gap: 12px;
  align-items: center;
}
.client-card-head .cc-id {
  min-width: 0;
  flex: 1;
}
.client-card h4 {
  font: 700 16px/1.25 "DM Sans", sans-serif;
  color: var(--text);
  margin: 0 0 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.client-card-head h4 {
  padding-right: 0;
}
.client-card-head p {
  font-size: 12.5px;
  margin: 0;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.client-card .client-photo,
.client-card .client-photo-placeholder {
  width: 46px;
  height: 46px;
  flex: none;
}
.client-card .client-photo-placeholder {
  background: var(--peach-soft);
  color: #8a4b16;
  font-size: 17px;
}
.client-card-status {
  position: static;
  align-self: flex-start;
  flex: none;
}
.status-chip.st-paused {
  background: #fff7e8;
  color: #9a6700;
}
.status-chip.st-completed {
  background: #eef2f8;
  color: var(--navy);
}
.cc-program {
  display: grid;
  gap: 2px;
  font-size: 13px;
  color: var(--muted);
}
.cc-program strong {
  color: var(--text);
  font-size: 13.5px;
}
.cc-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 14px;
  margin: 0;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #eef1f5;
  border-radius: 10px;
}
.cc-fact {
  min-width: 0;
}
.cc-fact.wide {
  grid-column: 1 / -1;
}
.cc-fact dt {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #98a2b3;
}
.cc-fact dd {
  margin: 1px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  overflow-wrap: anywhere;
}
.cc-fact .cc-note {
  font-weight: 400;
  color: var(--muted);
}
.money-clear {
  color: var(--success);
}
.client-card .card-allergy,
.client-card .card-handler {
  margin: 0;
}
.client-card .row.cc-actions {
  margin-top: auto;
  padding-top: 2px;
  gap: 6px;
  flex-wrap: nowrap;
}
.cc-actions .btn.primary {
  flex: 1 1 auto;
  justify-content: center;
}
.cc-actions .card-more-btn {
  min-width: 36px;
  justify-content: center;
  font-size: 16px;
  letter-spacing: 0.05em;
}

/* ---------- Login ---------- */
#authScreen {
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(242, 185, 138, 0.28), transparent 60%),
    radial-gradient(900px 500px at 110% 110%, rgba(15, 45, 82, 0.18), transparent 60%),
    #f4f1ec !important;
}
#authForm.card {
  max-width: 380px !important;
  padding: 30px 28px 24px;
  border-radius: 20px;
  border: 1px solid rgba(15, 45, 82, 0.08);
  box-shadow: 0 30px 80px rgba(15, 45, 82, 0.16);
}
#authForm .btn.primary {
  min-height: 46px;
  font-size: 15px;
  border-radius: 12px;
}
#authForm input {
  padding: 12px 14px;
  font-size: 15px;
  border-radius: 12px;
}
#authForm input:focus {
  border-color: var(--navy);
  box-shadow: var(--ring);
}

/* ---------- Phone bottom bar (hidden on bigger screens) ---------- */
.bottom-nav {
  display: none;
}

/* ---------- Phone ---------- */
@media (max-width: 760px) {
  .main {
    padding: 68px 14px calc(88px + env(safe-area-inset-bottom)) !important;
  }
  .mobile-bar {
    height: 56px;
    padding: 8px 64px 8px 10px;
    background: rgba(255, 255, 255, 0.94);
    -webkit-backdrop-filter: saturate(160%) blur(10px);
    backdrop-filter: saturate(160%) blur(10px);
    color: var(--navy);
    border-bottom: 1px solid var(--line);
    box-shadow: none;
  }
  .mobile-menu-btn {
    width: 40px;
    min-height: 40px;
    padding: 0;
    display: grid;
    place-items: center;
    border-color: var(--line);
    background: #fff;
    color: var(--navy);
  }
  .mobile-menu-btn .nav-ico {
    width: 21px;
    height: 21px;
  }
  .mobile-page-title {
    font: 700 17px/1.2 "DM Sans", sans-serif;
    color: var(--navy);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .notification-bell {
    width: 40px;
    height: 40px;
    box-shadow: none;
  }
  .topbar {
    gap: 12px;
    margin-bottom: 14px;
  }
  .topbar h2 {
    font-size: 22px;
  }
  .topbar > div > p {
    font-size: 13px;
  }
  .topbar > div:first-child > p:not(#dashGreeting) {
    display: none;
  }
  /* the page name is already in the top bar */
  .topbar > div:first-child > h2 {
    display: none;
  }
  .topbar > div:first-child:not(:has(#dashGreeting)) {
    display: none;
  }
  /* page buttons: one row that scrolls sideways, the main (+ Add …) button first */
  .topbar .actions {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 0 -14px;
    padding: 2px 14px 4px !important;
    width: calc(100% + 28px) !important;
  }
  .topbar .actions::-webkit-scrollbar {
    display: none;
  }
  .topbar .actions > * {
    flex: none !important;
  }
  .topbar .actions > .btn.primary {
    order: -1;
  }
  .topbar .actions > input,
  .topbar .actions > [data-scope-picker] {
    flex: 1 0 220px !important;
  }
  /* a header with a search box (Dashboard): search on its own line, then the buttons */
  .topbar .actions:has(> input) {
    flex-wrap: wrap !important;
    overflow: visible;
    margin: 0;
    padding: 0 !important;
    width: 100% !important;
  }
  .topbar .actions:has(> input) > input {
    order: -2;
    flex: 1 1 100% !important;
  }
  .topbar .actions:has(> input) > [data-scope-picker] {
    flex: 1 1 0 !important;
    min-width: 0;
  }
  :where(.app, .modal-overlay) .card {
    padding: 14px;
  }
  .grid.four.clinic-kpis {
    gap: 10px;
  }
  .dashboard-card {
    padding: 12px 14px;
  }
  .kpi-number {
    font-size: 24px;
  }
  .dashboard-card small {
    display: none;
  }
  :where(.app, .modal-overlay) input,
  :where(.app, .modal-overlay) select,
  :where(.app, .modal-overlay) textarea {
    font-size: 16px; /* no zoom-in on iPhone when a box is tapped */
  }
  .bottom-nav {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 450;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.96);
    -webkit-backdrop-filter: saturate(160%) blur(12px);
    backdrop-filter: saturate(160%) blur(12px);
    border-top: 1px solid var(--line);
    box-shadow: 0 -4px 20px rgba(16, 24, 40, 0.06);
  }
  .bottom-nav button {
    display: grid;
    justify-items: center;
    gap: 3px;
    padding: 6px 2px 4px;
    border: 0;
    border-radius: 12px;
    background: none;
    color: #667085;
    font: 600 11px/1.1 "DM Sans", sans-serif;
    -webkit-tap-highlight-color: transparent;
  }
  .bottom-nav button .nav-ico {
    width: 23px;
    height: 23px;
  }
  .bottom-nav button.active {
    color: var(--navy);
  }
  .bottom-nav button.active .nav-ico {
    stroke-width: 2.1;
  }
  .bottom-nav button.active span {
    font-weight: 700;
  }
  .bottom-nav button.active::after {
    content: "";
    width: 18px;
    height: 3px;
    border-radius: 3px;
    background: var(--peach);
    margin-top: 1px;
  }
  .app.nav-open .bottom-nav {
    display: none;
  }
  .toast {
    bottom: calc(84px + env(safe-area-inset-bottom)) !important;
  }
  .hc-sync-status {
    bottom: calc(82px + env(safe-area-inset-bottom)) !important;
  }
  .client-card {
    padding: 14px 14px 12px;
  }
  .client-card:hover {
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .nav button,
  .dashboard-card,
  .client-card,
  :where(.app, .modal-overlay) .btn {
    transition: none;
  }
}

/* ===== V62: template buttons (Quick reply / Website link / Call) ===== */
.wa-bubble-btns { display: flex; flex-direction: column; margin: 8px -10px -8px; border-top: 1px solid rgba(11, 20, 26, 0.1); }
.wa-bubble-btns span { display: block; padding: 8px 10px; text-align: center; color: #027eb5; font-weight: 600; font-size: 13px; border-top: 1px solid rgba(11, 20, 26, 0.08); }
.wa-bubble-btns span:first-child { border-top: 0; }
.wf-node-msg:has(.wa-bubble-btns) { max-height: 240px; }
.wf-node-msg .wa-bubble-btns { white-space: normal; margin: 8px 0 0; border: 1px solid rgba(11, 20, 26, 0.1); border-radius: 8px; background: #fff; }
.wa-btn-edit #waTBtns { display: grid; gap: 10px; }
.wa-btn-row { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px; background: var(--cream); display: grid; gap: 8px; }
.wa-btn-main { display: grid; grid-template-columns: auto 140px minmax(120px, 1fr) minmax(0, 1.3fr) auto; gap: 8px; align-items: center; }
.wa-btn-main:not(:has(input[type="url"], input[type="tel"])) { grid-template-columns: auto 140px minmax(120px, 1fr) auto; }
.wa-btn-n { width: 24px; height: 24px; border-radius: 50%; background: var(--teal-soft); color: var(--teal); font-weight: 700; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.wa-btn-when { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 8px; }
.wa-btn-when label { display: grid; gap: 4px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.wa-btn-when textarea { min-height: 54px; resize: vertical; }
.wa-btn-add { display: flex; flex-wrap: wrap; gap: 8px; }
.wa-btn-help { margin: 0; font-size: 12.5px; }
.wf-once { display: grid; gap: 6px; margin-top: 10px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--teal-soft); font-size: 13px; }
.wf-once .wa-inline { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
@media (max-width: 760px) {
  .wa-btn-main, .wa-btn-main:not(:has(input[type="url"], input[type="tel"])) { grid-template-columns: auto minmax(0, 1fr) auto; }
  .wa-btn-main > input { grid-column: 1 / -1; order: 5; }
  .wa-btn-when { grid-template-columns: 1fr; }
}

/* V63: Clinic visit (offline) messages */
.cv-card { display: grid; gap: 12px; margin-bottom: 12px; border-left: 4px solid #d0d5dd; }
.cv-card.on { border-left-color: #12b76a; }
.cv-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 10px; }
.cv-head h3 { margin: 0 0 4px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cv-head p { margin: 0; max-width: 720px; }
.cv-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; }
.cv-step { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fcfcfd; }
.cv-step > div { display: grid; gap: 2px; font-size: 13px; }
.cv-step.bad { border-style: dashed; }
.cv-step-a { font-size: 12.5px; }
.cv-step-n { flex: none; width: 22px; height: 22px; border-radius: 999px; background: #ecfdf3; color: #067647; font-weight: 700; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.cv-modal { max-width: 1100px; width: 100%; }
.cv-checks { display: grid; gap: 6px; }
.cv-checks .wa-warn { display: grid; gap: 4px; }
.cv-prev-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; margin: 14px 0 8px; }
.cv-prev { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.cv-prev-item { display: grid; gap: 6px; align-content: start; }
.cv-prev .wa-phone-frame.mini { max-height: none; overflow: visible; }
.cv-prev-title { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; }
.cv-prev-title .muted { width: 100%; padding-left: 28px; font-size: 12px; }
@media (max-width: 640px) { .cv-prev { grid-template-columns: 1fr; } .cv-head .wa-banner-btns { width: 100%; } }

/* V63: Attendance — pop-ups, calendar, leave & salary */
.att-pop { display: grid; gap: 3px; padding: 12px 14px; border-radius: 12px; margin-bottom: 10px; text-align: left; }
.att-pop strong { font-size: 15px; }
.att-pop span { font-size: 13.5px; }
.att-pop.in { background: #eaf7f0; border: 1px solid #a6e9c0; color: #05603a; }
.att-pop.out { background: #fff4e5; border: 1px solid #fec84b; color: #93370d; }
.att-notnow { margin-top: 8px; }
.att-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 4px 0 10px; font-size: 12px; color: var(--muted); }
.att-legend span { display: inline-flex; align-items: center; gap: 5px; }
.att-legend .att-cc { width: 22px; height: 20px; min-width: 22px; font-size: 10px; cursor: default; }
.att-cc { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 26px; min-width: 28px; padding: 0; border-radius: 6px; border: 1px solid transparent; font-size: 11px; font-weight: 700; font-style: normal; cursor: pointer; background: #f2f4f7; color: #667085; line-height: 1; }
.att-cc.ok, .att-cc.live { background: #d1fadf; color: #05603a; }
.att-cc.late { background: #fef0c7; color: #93370d; border-color: #fdb022; }
.att-cc.bad { background: #fee4e2; color: #b42318; }
.att-cc.leave { background: #f4ebff; color: #6941c6; }
.att-cc.half { background: linear-gradient(135deg, #d1fadf 50%, #f4ebff 50%); color: #344054; }
.att-cc.warn { background: #fff; color: #b54708; border: 1px dashed #f79009; }
.att-cc.duty { background: #e0f2fe; color: #075985; }
.att-cc.off { background: #f2f4f7; color: #98a2b3; }
.att-cc.hol { background: #eaecf0; color: #475467; }
.att-cc.fut, .att-cc.none { background: transparent; border: 1px dashed #eaecf0; cursor: default; }
.att-mx-wrap { overflow-x: auto; }
.att-mx { border-collapse: separate; border-spacing: 3px; font-size: 12px; }
.att-mx th { font-weight: 600; text-align: center; padding: 2px; }
.att-mx thead th span { display: block; font-size: 12px; }
.att-mx thead th small { display: block; color: var(--muted); font-weight: 400; font-size: 10px; }
.att-mx thead th.today { color: var(--teal); }
.att-mx tbody th { text-align: left; position: sticky; left: 0; background: var(--card, #fff); z-index: 1; padding-right: 10px; min-width: 150px; }
.att-mx tbody th span { display: block; font-size: 11px; font-weight: 400; }
.att-mx td { padding: 0; }
.att-cal-week, .att-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.att-cal-week span { text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); }
.att-cal { margin-top: 4px; }
.att-cd { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 92px; padding: 6px 7px; border-radius: 10px; border: 1px solid var(--line); background: #fff; text-align: left; font: inherit; font-size: 11.5px; cursor: pointer; color: inherit; overflow: hidden; }
.att-cd.empty { border: 0; background: transparent; cursor: default; }
.att-cd[disabled] { cursor: default; opacity: 0.55; }
.att-cd.today { box-shadow: 0 0 0 2px var(--teal); }
.att-cd-h { display: flex; justify-content: space-between; align-items: baseline; gap: 4px; width: 100%; }
.att-cd-h b { font-size: 14px; }
.att-cd-s { font-size: 10.5px; font-weight: 700; text-align: right; line-height: 1.2; }
.att-cd-t { font-size: 11px; }
.att-cd-w { font-size: 11px; color: var(--muted); }
.att-cd .att-late { margin: 0; font-size: 11px; }
.att-cd.ok, .att-cd.live { background: #f3fcf6; border-color: #a6e9c0; }
.att-cd.ok .att-cd-s, .att-cd.live .att-cd-s { color: #067647; }
.att-cd.late { background: #fffaeb; border-color: #fdb022; }
.att-cd.late .att-cd-s { color: #b54708; }
.att-cd.bad { background: #fef3f2; border-color: #fda29b; }
.att-cd.bad .att-cd-s { color: #b42318; }
.att-cd.leave, .att-cd.half { background: #f9f5ff; border-color: #d6bbfb; }
.att-cd.leave .att-cd-s, .att-cd.half .att-cd-s { color: #6941c6; }
.att-cd.warn { background: #fff; border: 1px dashed #f79009; }
.att-cd.warn .att-cd-s { color: #b54708; }
.att-cd.duty { background: #f0f9ff; border-color: #b9e6fe; }
.att-cd.off, .att-cd.hol { background: #f9fafb; }
.att-cd.off .att-cd-s, .att-cd.hol .att-cd-s { color: #667085; }
.att-pay-set input, .att-pay-set select { width: 100%; min-width: 90px; }
.att-pay-sum { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.att-pay-sum span { background: #f2f4f7; border-radius: 999px; padding: 4px 10px; font-size: 12px; }
.att-pay-net { font-size: 15px; padding: 8px 12px; background: #eaf7f0; border-radius: 10px; }
.att-pay-net b { font-size: 18px; color: #05603a; }
@media (max-width: 700px) {
  .att-cal-week, .att-cal { gap: 3px; }
  .att-cd { min-height: 58px; padding: 4px; font-size: 10px; }
  .att-cd-h { flex-direction: column; gap: 0; }
  .att-cd-h b { font-size: 12px; }
  .att-cd-s { font-size: 9px; text-align: left; }
  .att-cd-t, .att-cd-w { display: none; }
  .att-cd .att-late { font-size: 9.5px; }
}
/* V63: yearly leave */
.att-free-in { display: flex; gap: 6px; }
.att-free-in input { max-width: 90px; min-width: 70px; }
.att-free-in select { min-width: 110px; }
.att-ly { margin-bottom: 12px; }
.att-ly-h { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.att-ly-h .att-h { margin: 0; }
.att-ly-t th, .att-ly-t td { text-align: center; white-space: nowrap; }
.att-ly-t th:first-child, .att-ly-t td:first-child { text-align: left; }
.att-ly-t td.att-ly-has { background: #f9f5ff; color: #6941c6; font-weight: 700; }

/* V63: WhatsApp cost (Meta) on WhatsApp Home */
.wh-cost { display: grid; gap: 12px; margin-bottom: 12px; }
.wh-cost-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.wh-cost-head h3 { margin: 0 0 2px; }
.wh-cost-tools { display: flex; gap: 6px; align-items: center; }
.wh-cost-big { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.wh-cost-big > div { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fcfcfd; }
.wh-cost-big > div:first-child { background: #ecfdf3; border-color: #a6e9c0; }
.wh-cost-big b { font-size: 20px; }
.wh-cost-big > div:first-child b { color: #05603a; }
.wh-cost-big span { font-size: 12px; color: var(--muted); }
.wh-cost-t { width: 100%; }
.wh-cost-t td, .wh-cost-t th { vertical-align: top; }
.wh-cost-bar { display: block; height: 5px; border-radius: 999px; background: #f2f4f7; margin-top: 5px; max-width: 160px; }
.wh-cost-bar i { display: block; height: 100%; border-radius: 999px; background: #12b76a; }
.wh-cost-days { display: flex; align-items: flex-end; gap: 2px; height: 70px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.wh-cost-days span { flex: 1; height: 100%; display: flex; align-items: flex-end; }
.wh-cost-days i { display: block; width: 100%; background: #6ce9a6; border-radius: 3px 3px 0 0; }
.wh-cost-days span:hover i { background: #12b76a; }
.wh-cost-days-l { display: flex; justify-content: space-between; font-size: 11px; }
.wh-cost-note { margin: 0; font-size: 12px; }
/* V63: chatbot calendar booking card */
.wb-cal-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 10px; }
.wb-cal-head h3 { margin: 0 0 4px; }
.wb-cal-head p { margin: 0; max-width: 760px; }
.wb-cal .actions { margin: 8px 0 4px; }
/* V63: staff Leave / My requests */
.att-leave-top { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 10px; }
.att-bal { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 12px; }
.att-bal span { background: #f2f4f7; border-radius: 999px; padding: 4px 10px; font-size: 12.5px; }
.att-type { display: inline-block; font-size: 11px; font-weight: 700; border-radius: 6px; padding: 1px 6px; background: #eef4ff; color: #3538cd; margin-right: 2px; }
