@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700;900&display=swap");

:root {
  --mint-700: #5abdc4;
  --mint-600: #7bcfd4;
  --mint-500: #a2dfe2;
  --mint-300: #c6eff1;
  --mint-100: #e6fbfb;
  --ice: #f2fbfd;
  --paper: #ffffff;
  --line: #d7e6e8;
  --line-strong: #b7ced2;
  --ink: #24353a;
  --muted: #65777c;
  --soft: #eef6f8;
  --accent: #d96d91;
  --accent-dark: #b9476f;
  --blue: #7fb7e8;
  --blue-dark: #387eb8;
  --green: #8dccb5;
  --yellow: #f5da8b;
  --warning: #ffe9ae;
  --shadow: 0 14px 34px rgba(43, 86, 92, 0.14);
  --shadow-soft: 0 2px 12px rgba(43, 86, 92, 0.08);
  font-family: Roboto, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: #f5fafb;
  font-family: Roboto, Arial, sans-serif;
  font-size: 15px;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(90deg, #9bdde0 0 25%, #c1edf0 25% 52%, #ddfbfb 52% 78%, #f2f8fa 78%);
}

.login-panel {
  width: min(430px, calc(100vw - 32px));
  color: var(--ink);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.login-panel .brand {
  justify-content: center;
  font-size: 38px;
  margin-bottom: 14px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: white;
  background: linear-gradient(135deg, #e482a5, #c84a7a);
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(201, 72, 118, 0.22);
}

.login-subtitle {
  text-align: center;
  font-size: 20px;
  margin: 0 0 36px;
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 18px;
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  min-height: 39px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  padding: 8px 10px;
}

.login-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 4px 0 20px;
  color: var(--ink);
}

.auth-switch {
  margin: 15px 0 0;
  text-align: center;
  color: var(--muted);
}

.auth-message {
  margin-bottom: 14px;
  padding: 11px 12px;
  border-radius: 6px;
  border: 1px solid #b7d8df;
  background: rgba(255, 255, 255, 0.66);
  color: #21424a;
  font-size: 14px;
  line-height: 1.35;
}

.auth-message.error {
  border-color: #e5a3b5;
  background: #fff0f4;
  color: #8c284c;
}

.auth-message.notice {
  border-color: #8fd1d8;
  background: #eefbfc;
}

.signup-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 18px 0 12px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(90, 189, 196, 0.55);
  border-radius: 6px;
}

.signup-callout strong,
.signup-callout span {
  display: block;
}

.signup-callout span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.link {
  border: 0;
  background: transparent;
  color: var(--accent-dark);
  text-decoration: underline;
  padding: 0;
}

.primary-btn,
.ghost-btn,
.soft-btn,
.icon-btn,
.danger-btn {
  min-height: 38px;
  border-radius: 6px;
  border: 1px solid transparent;
  padding: 8px 14px;
  font-weight: 800;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.primary-btn:hover,
.ghost-btn:hover,
.soft-btn:hover,
.icon-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.primary-btn {
  background: linear-gradient(180deg, #df789d, var(--accent));
  color: white;
  border-color: var(--accent-dark);
}

.danger-btn {
  color: white;
  background: #d85858;
  border-color: #bf4141;
}

.ghost-btn {
  background: white;
  border-color: var(--line-strong);
  color: var(--ink);
}

.soft-btn {
  background: #ecfbfb;
  color: #25656b;
  border-color: #98dbe0;
}

.icon-btn {
  min-width: 36px;
  padding: 7px 10px;
  background: white;
  border-color: var(--line-strong);
}

.full {
  width: 100%;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 28px 0;
  color: var(--muted);
}

.divider::before,
.divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: rgba(36, 53, 58, 0.25);
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 212px 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #b9ecef 0%, #a6dfe3 54%, #d9fbfb 100%);
  border-right: 1px solid #9ccdd2;
}

.sidebar-top {
  padding: 24px 18px 18px;
  border-bottom: 1px solid rgba(36, 53, 58, 0.1);
}

.sidebar .brand {
  font-size: 23px;
  line-height: 1.1;
  justify-content: space-between;
}

.nav {
  padding: 12px 10px;
  display: grid;
  gap: 4px;
}

.nav-item {
  width: 100%;
  height: 42px;
  display: grid;
  grid-template-columns: 10px 1fr;
  align-items: center;
  gap: 12px;
  border: 0;
  border-left: 3px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #21494f;
  padding: 0 10px;
  text-align: left;
  font-weight: 800;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(255, 255, 255, 0.62);
  border-left-color: var(--accent);
  color: #153940;
}

.nav-icon {
  width: 6px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(33, 73, 79, 0.2);
  font-size: 0;
}

.nav-item.active .nav-icon {
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(217, 109, 145, 0.14);
}

.sidebar-spacer {
  flex: 1;
}

.profile-box {
  background: rgba(231, 255, 255, 0.74);
  border-top: 1px solid var(--line-strong);
}

.profile-name,
.profile-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  font-weight: 750;
  color: var(--ink);
}

.profile-name {
  min-height: 64px;
  flex-wrap: wrap;
  align-content: center;
  gap: 2px 8px;
}

.profile-name strong {
  flex-basis: 100%;
}

.profile-profession,
.profile-role {
  font-size: 12px;
  font-weight: 650;
}

.profile-profession {
  color: var(--ink);
}

.profile-role {
  color: var(--muted);
}

.profile-link {
  height: 42px;
  border: 0;
  width: 100%;
  background: transparent;
}

.main {
  min-width: 0;
  background: linear-gradient(180deg, #f8fcfd 0%, #f4fafb 100%);
}

.topbar {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 26px 0 30px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
}

.page-title {
  font-family: Roboto, Arial, sans-serif;
  font-size: 27px;
  font-weight: 850;
  letter-spacing: 0;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.content {
  padding: 30px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(520px, 1fr) minmax(360px, 0.48fr);
  gap: 24px;
  align-items: start;
}

/* Keep the Fster overview layout above the legacy modal defaults. */
.modal-panel.appointment-detail-modal {
  width: min(760px, calc(100vw - 32px));
  border: 0;
  border-radius: 24px;
  box-shadow: 0 28px 80px rgba(29, 25, 45, 0.3);
}

.modal-panel.appointment-detail-modal.payment-open {
  width: min(1180px, 100%);
  grid-template-columns: minmax(560px, 1.08fr) minmax(500px, 0.92fr);
}

.appointment-detail-modal .appointment-detail-primary {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  background: #fbfafc;
}

.appointment-detail-modal .appointment-detail-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 20px 28px 28px;
  background: transparent;
}

.appointment-detail-modal .modal-close {
  width: 36px;
  height: 36px;
  border: 1px solid #e5dbe3;
  border-radius: 12px;
  background: #ffffff;
  color: #6f5069;
}

.appointment-detail-modal .appointment-quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.appointment-detail-modal .appointment-quick-actions button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  min-height: 72px;
  padding: 12px 14px;
  border: 1px solid #e4d7e1;
  border-radius: 15px;
  background: #ffffff;
  color: var(--ink);
  text-align: left;
  font: inherit;
}

@media (max-width: 760px) {
  .modal-panel.appointment-detail-modal,
  .modal-panel.appointment-detail-modal.payment-open {
    width: min(100%, 560px);
  }

  .appointment-detail-modal .appointment-detail-primary {
    grid-template-columns: 1fr;
  }

  .appointment-detail-modal .appointment-detail-body {
    padding-inline: 18px;
  }

  .appointment-detail-modal .appointment-quick-actions {
    grid-template-columns: 1fr;
  }
}

/* Fster appointment overview */
.appointment-detail-modal {
  width: min(760px, calc(100vw - 32px));
  overflow: hidden;
  border: 0;
  border-radius: 24px;
  box-shadow: 0 28px 80px rgba(29, 25, 45, 0.3);
}

.appointment-detail-modal.payment-open {
  width: min(1180px, 100%);
  grid-template-columns: minmax(560px, 1.08fr) minmax(500px, 0.92fr);
}

.appointment-detail-primary {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  min-height: 100%;
  background: #fbfafc;
}

.appointment-command-rail {
  display: flex;
  flex-direction: column;
  padding: 22px 14px 18px;
  background: linear-gradient(180deg, #47233f 0%, #311a35 100%);
  color: #ffffff;
}

.appointment-rail-brand {
  display: grid;
  width: 38px;
  height: 38px;
  margin: 0 auto 30px;
  place-items: center;
  border-radius: 12px;
  background: #db507d;
  box-shadow: 0 8px 22px rgba(219, 80, 125, 0.32);
  font-size: 20px;
  font-weight: 900;
}

.appointment-rail-actions {
  display: grid;
  gap: 8px;
}

.appointment-command-rail button {
  display: grid;
  gap: 5px;
  place-items: center;
  min-height: 60px;
  padding: 8px 4px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
  transition: color 150ms ease, background 150ms ease, transform 150ms ease;
}

.appointment-command-rail button span {
  font-size: 21px;
  line-height: 1;
}

.appointment-command-rail button:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  transform: translateY(-1px);
}

.appointment-command-rail .appointment-rail-archive {
  margin-top: auto;
  color: #f5b7c9;
}

.appointment-detail-content {
  min-width: 0;
  background:
    radial-gradient(circle at 92% 0%, rgba(219, 80, 125, 0.1), transparent 220px),
    #fbfafc;
}

.appointment-detail-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 28px 10px;
}

.appointment-detail-kicker,
.appointment-section-label {
  color: #8f708a;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.appointment-detail-modal .modal-close {
  width: 36px;
  height: 36px;
  border: 1px solid #e5dbe3;
  border-radius: 12px;
  background: #ffffff;
  color: #6f5069;
  box-shadow: 0 4px 12px rgba(58, 35, 55, 0.06);
  transition: background 150ms ease, transform 150ms ease;
}

.appointment-detail-modal .modal-close:hover {
  background: #f7edf2;
  transform: rotate(4deg);
}

.appointment-schedule-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin: 6px 28px 0;
  padding: 20px;
  border: 1px solid #eadfe7;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(70, 38, 65, 0.07);
}

.appointment-date-tile {
  display: grid;
  width: 94px;
  min-height: 76px;
  place-content: center;
  border-radius: 15px;
  background: #f9e8ef;
  color: #562845;
  text-align: center;
}

.appointment-date-tile strong {
  font-size: 20px;
}

.appointment-date-tile span {
  margin-top: 3px;
  color: #9d5c78;
  font-size: 12px;
  font-weight: 750;
}

.appointment-schedule-card h2 {
  margin: 0 0 5px;
  color: #2d2430;
  font-size: 20px;
  line-height: 1.25;
}

.appointment-schedule-card p {
  margin: 0 0 7px;
  color: #4d6268;
  font-size: 14px;
}

.appointment-practitioner {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eee8f4;
  color: #654d78;
  font-size: 12px;
  font-weight: 800;
}

.appointment-attendance-actions {
  display: grid;
  gap: 7px;
  min-width: 100px;
}

.appointment-attendance-actions button {
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid #ded1db;
  border-radius: 10px;
  background: #ffffff;
  color: #4a3747;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.appointment-attendance-actions button:first-child {
  border-color: #b9dfd1;
  background: #eff9f5;
  color: #26725a;
}

.appointment-detail-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 20px 28px 28px;
  background: transparent;
}

.appointment-client-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 14px;
  padding: 20px;
  border: 1px solid #eadfe7;
  border-radius: 18px;
  background: #ffffff;
}

.appointment-client-avatar {
  display: grid;
  width: 48px;
  height: 48px;
  grid-row: span 2;
  place-items: center;
  border-radius: 15px;
  background: #5d426b;
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
}

.appointment-client-card h3 {
  margin: 3px 0 4px;
  color: var(--ink);
  font-size: 18px;
}

.appointment-client-card .meta {
  margin: 0;
  color: #56676c;
}

.appointment-client-card .meta span {
  margin-left: 5px;
  color: #9a8795;
  font-size: 12px;
}

.appointment-client-card dl {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 16px 0 0;
  padding: 16px 0 0;
  border: 0;
  border-top: 1px solid #f0e9ee;
  border-radius: 0;
  background: transparent;
}

.appointment-client-card dl div {
  display: grid;
  gap: 3px;
}

.appointment-client-card dt {
  color: #9b7f94;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.appointment-client-card dd {
  margin: 0;
  color: #3f3340;
  font-size: 13px;
  font-weight: 750;
}

.appointment-quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.appointment-quick-actions button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  min-height: 72px;
  padding: 12px 14px;
  border: 1px solid #e4d7e1;
  border-radius: 15px;
  background: #ffffff;
  color: var(--ink);
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.appointment-quick-actions button:hover {
  border-color: #d36b8d;
  background: #fff8fa;
}

.appointment-action-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 11px;
  background: #f7e3eb;
  color: #a5365d;
  font-size: 16px;
  font-weight: 900;
}

.appointment-quick-actions strong,
.appointment-quick-actions small {
  display: block;
}

.appointment-quick-actions strong {
  font-size: 13px;
}

.appointment-quick-actions small {
  margin-top: 3px;
  color: #8d7a88;
  font-size: 11px;
}

.appointment-quick-actions b {
  color: #bb718a;
  font-size: 24px;
  font-weight: 400;
}

@media (max-width: 760px) {
  .appointment-detail-modal,
  .appointment-detail-modal.payment-open {
    width: min(100%, 560px);
  }

  .appointment-detail-primary {
    grid-template-columns: 1fr;
  }

  .appointment-command-rail {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
  }

  .appointment-rail-brand {
    width: 34px;
    height: 34px;
    margin: 0;
  }

  .appointment-rail-actions {
    display: flex;
    justify-content: center;
  }

  .appointment-command-rail button {
    min-height: 42px;
    padding: 6px 9px;
  }

  .appointment-command-rail button span {
    display: none;
  }

  .appointment-command-rail .appointment-rail-archive {
    margin: 0;
  }

  .appointment-schedule-card {
    grid-template-columns: auto 1fr;
    margin-inline: 18px;
  }

  .appointment-attendance-actions {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, 1fr);
  }

  .appointment-detail-topbar,
  .appointment-detail-body {
    padding-inline: 18px;
  }

  .appointment-quick-actions {
    grid-template-columns: 1fr;
  }
}

.panel {
  background: var(--paper);
  border: 1px solid rgba(123, 180, 186, 0.42);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.panel + .panel {
  margin-top: 30px;
}

.panel-header {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  color: #1d5961;
  font-weight: 800;
}

.dashboard-workspace {
  border-top: 4px solid var(--mint-600);
}

.dashboard-workspace .panel-header {
  min-height: 58px;
}

.dashboard-side-panel {
  background: linear-gradient(180deg, #ffffff 0%, #f9fefe 100%);
}

.dashboard-side-panel .panel-header {
  color: var(--ink);
}

.message {
  padding: 20px 16px 22px;
  border-bottom: 1px solid var(--line);
}

.message:last-child {
  border-bottom: 0;
}

.message h3 {
  margin: 0 0 5px;
  color: #207982;
  font-size: 17px;
  font-weight: 850;
}

.meta {
  color: var(--muted);
  font-size: 14px;
}

.message p {
  line-height: 1.55;
  white-space: pre-line;
}

.message-compose {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.message-compose label {
  display: grid;
  gap: 6px;
  color: #087887;
  font-weight: 800;
}

.message-compose input,
.message-compose textarea {
  width: 100%;
  padding: 10px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.message-compose textarea {
  resize: vertical;
}

.split-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.simple-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.simple-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}

.simple-list li:last-child {
  border-bottom: 0;
}

.simple-list .empty-row {
  color: var(--muted);
  font-weight: 500;
}

.patient-link {
  color: var(--accent-dark);
  font-weight: 800;
}

.user-name-link {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--accent-dark);
  padding: 0;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.user-name-link:hover {
  text-decoration: underline;
}

.calendar-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 0;
  max-height: calc(100vh - 69px);
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  border-top: 1px solid var(--line);
}

.calendar-sidebar {
  display: flex;
  flex-direction: column;
  height: max-content;
  min-height: 0;
  overflow: visible;
  background: #f1f8fa;
  border-right: 1px solid var(--line-strong);
  padding: 18px 14px;
}

.mini-month {
  margin-bottom: 22px;
}

.mini-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 800;
  margin-bottom: 10px;
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  gap: 4px;
  color: var(--muted);
  font-size: 13px;
}

.mini-grid span {
  min-height: 25px;
  display: grid;
  place-items: center;
  border-radius: 50%;
}

.mini-date {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  justify-self: center;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: #4f6870;
  font-size: 13px;
  padding: 0;
}

.mini-date:hover {
  background: #f6dce7;
  border-color: #e6a7bf;
  color: #9d315b;
}

.mini-date.in-range {
  background: rgba(217, 109, 145, 0.12);
  color: #8d2f56;
}

.mini-date.selected {
  background: var(--accent);
  color: white;
  font-weight: 800;
  border-color: var(--accent-dark);
  box-shadow: 0 0 0 3px rgba(217, 109, 145, 0.14);
}

.tool-section {
  border-top: 1px solid var(--line);
  padding: 11px 0;
}

.tool-title {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 8px;
  padding: 0;
  text-align: left;
}

.tool-title:hover {
  color: #187486;
}

.tool-chevron {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.tool-chevron::before {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(2px) rotate(225deg);
}

.tool-title[aria-expanded="false"] .tool-chevron::before {
  transform: translateY(-2px) rotate(45deg);
}

.tool-title:hover .tool-chevron {
  background: rgba(255, 255, 255, 0.68);
  border-color: var(--line-strong);
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.pill {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: white;
  color: var(--ink);
}

.availability-tools {
  gap: 6px;
}

.availability-section {
  padding-bottom: 8px;
}

.availability-section .tool-title {
  margin-bottom: 8px;
}

.availability-pill {
  min-height: 31px;
  padding: 5px 9px;
  font-size: 13px;
}

.pill.availability-pill.active {
  background: #ffe68f;
  border-color: #e4b932;
  color: #6b4b00;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.tool-hint {
  margin: 9px 0 0;
  color: #7a5a0a;
  font-size: 13px;
  line-height: 1.35;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 5px;
}

.compact-check {
  padding: 8px 9px;
  font-size: 13px;
}

.alarm-tool {
  display: grid;
  gap: 8px;
}

.alarm-tool .tool-title {
  margin-bottom: 0;
}

.alarm-rules {
  display: grid;
  gap: 8px;
}

.alarm-rule {
  display: grid;
  gap: 7px;
  padding: 9px 10px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 5px;
}

.alarm-rule-check {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.25;
}

.alarm-rule-check input {
  width: 16px;
  height: 16px;
}

.alarm-sound-label {
  display: grid;
  gap: 5px;
  color: #2a7f96;
  font-size: 12px;
  font-weight: 800;
}

.alarm-minute-input {
  display: grid;
  grid-column: 1;
  grid-row: 1;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 34px;
  padding: 0 8px 0 0;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: white;
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
}

.alarm-offset-row {
  display: grid;
  grid-template-columns: 110px 32px minmax(0, 1fr);
  gap: 6px;
  align-items: center;
}

.alarm-row-sound {
  grid-column: 1 / -1;
  grid-row: 2;
  width: 100%;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: white;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
}

.alarm-row-sound:disabled {
  opacity: 0.58;
  background: #f3f7f8;
}

.alarm-remove {
  grid-column: 2;
  grid-row: 1;
  width: 32px;
  min-width: 32px;
  height: 34px;
  border-radius: 5px;
  color: #5a6f75;
  font-size: 18px;
  line-height: 1;
}

.alarm-remove:disabled {
  opacity: 0.36;
  cursor: not-allowed;
}

.alarm-add {
  width: 100%;
  min-height: 32px;
  padding: 6px 8px;
  justify-content: center;
  font-size: 12px;
}

.alarm-minute-input input {
  width: 100%;
  min-height: 32px;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 6px 8px;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
}

.alarm-minute-input input:focus {
  outline: 0;
}

.alarm-minute-input:focus-within {
  border-color: var(--mint-700);
  box-shadow: 0 0 0 2px rgba(90, 189, 196, 0.16);
}

.alarm-minute-input:has(input:disabled) {
  opacity: 0.58;
  background: #f3f7f8;
}

.alarm-sound-label select {
  width: 100%;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: white;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
}

.alarm-volume-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 8px;
  align-items: center;
  min-height: 34px;
  padding: 0 8px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: white;
}

.alarm-volume-control input {
  width: 100%;
  accent-color: var(--pink);
}

.alarm-volume-control strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.alarm-volume-control:has(input:disabled) {
  opacity: 0.58;
  background: #f3f7f8;
}

.practitioner-list {
  display: grid;
  gap: 8px;
}

.practitioner-row {
  width: 100%;
  min-height: 42px;
  display: grid;
  grid-template-columns: 10px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--ink);
  text-align: left;
}

.practitioner-row:hover {
  border-color: #9ccdd2;
  box-shadow: var(--shadow-soft);
}

.practitioner-row.active {
  border-color: #7bcfd4;
  background: #ecfbfb;
}

.practitioner-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mint-700);
}

.all-practitioners-dot {
  background: linear-gradient(135deg, var(--mint-700) 0 45%, var(--pink) 45% 100%);
}

.practitioner-row strong,
.practitioner-row em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.practitioner-row.active strong {
  color: #267078;
}

.clinic-switcher {
  margin-top: 8px;
}

.clinic-switcher select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  padding: 0 10px;
  font: inherit;
}

.calendar-board {
  height: max-content;
  min-height: 0;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  background: white;
  cursor: grab;
}

.calendar-board.is-panning {
  cursor: grabbing;
  user-select: none;
}

.calendar-board.is-panning .slot-cell {
  cursor: grabbing;
}

.week-grid {
  min-width: 1040px;
  display: grid;
  grid-template-columns: 58px repeat(7, minmax(138px, 1fr));
  grid-template-rows: 38px 26px repeat(22, 32px);
  position: relative;
  min-height: 820px;
}

.corner,
.day-head,
.practitioner-head,
.time-cell,
.slot-cell {
  border-right: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line);
}

.corner,
.day-head,
.practitioner-head {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f9fafa;
}

.day-head {
  display: grid;
  place-items: center;
  font-weight: 800;
}

.day-head.active-day {
  background: #fff2bf;
  border-bottom-color: #e0bf4a;
}

.practitioner-head {
  top: 38px;
  display: grid;
  place-items: center;
  font-size: 13px;
  color: var(--muted);
  min-width: 0;
  padding: 0 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.multi-practitioner-head {
  font-size: 11px;
  font-weight: 700;
}

.all-practitioners-grid .appointment,
.all-practitioners-grid .unavailable-block {
  font-size: 11px;
  line-height: 1.2;
}

.time-cell {
  color: #18272c;
  text-align: right;
  padding: 4px 6px;
  background: #fbfbfb;
  font-size: 13px;
  font-weight: 600;
}

.slot-cell {
  padding: 0;
  border-top: 0;
  border-left: 0;
  text-align: left;
  background: #ffffff;
}

.slot-cell.closed {
  background: #d9ddde;
}

.slot-cell.closed:hover {
  background: #cfd4d5;
}

.slot-cell:not(.closed):hover {
  background: #eef5f6;
}

.slot-cell.one-off-open {
  background: #ffffff;
  box-shadow: inset 0 0 0 2px rgba(255, 204, 72, 0.5);
}

.slot-cell.one-off-open:hover {
  background: #fff9df;
}

.slot-cell.drag-preview.availability-preview {
  background: #ffffff;
  box-shadow: inset 0 0 0 2px rgba(255, 204, 72, 0.8);
}

.slot-cell.drag-preview.unavailable-preview {
  background: #c4d8df;
  box-shadow: inset 0 0 0 2px rgba(84, 57, 85, 0.42);
}

.slot-cell.drop-target {
  background: #fff6cf;
  box-shadow: inset 0 0 0 2px var(--accent);
}

.slot-cell.resize-preview {
  background: #e7f4ff;
  box-shadow: inset 0 0 0 2px #4e9bd6;
}

.now-line {
  position: relative;
  z-index: 6;
  pointer-events: none;
}

.now-line::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: var(--now-top);
  height: 2px;
  background: var(--accent);
}

.appointment {
  position: relative;
  width: calc(100% - 30px);
  justify-self: start;
  margin: 1px 3px;
  padding: 4px 6px 14px;
  background: var(--blue);
  border: 1px solid var(--blue-dark);
  border-radius: 3px;
  color: #10324b;
  font-size: 12px;
  line-height: 1.25;
  overflow: hidden;
  z-index: 4;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.appointment-resize-handle {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 13px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: rgba(16, 50, 75, 0.72);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  cursor: ns-resize;
}

.appointment-resize-handle:hover {
  background: rgba(255, 255, 255, 0.22);
}

.appointment.resizing {
  pointer-events: none;
  cursor: ns-resize;
}

.appointment:active,
.appointment.dragging {
  cursor: grabbing;
}

.appointment.dragging {
  opacity: 0.28;
  pointer-events: none;
}

.appointment-drag-ghost {
  position: fixed;
  inset: 0 auto auto 0;
  z-index: 200;
  margin: 0;
  box-sizing: border-box;
  pointer-events: none;
  opacity: 0.92;
  box-shadow: 0 10px 24px rgba(18, 66, 91, 0.28);
  cursor: grabbing;
  will-change: transform;
}

.appointment.gold {
  background: #d9b26c;
  border-color: #b4873c;
}

.appointment.claim {
  background: #cfe1e8;
  border-color: #8aa8b3;
}

.appointment strong {
  display: block;
  font-size: 12px;
}

.appointment-paid-badge {
  position: absolute;
  top: 3px;
  right: 5px;
  padding: 1px 4px;
  border-radius: 3px;
  background: rgba(16, 50, 75, 0.82);
  color: #fff;
  font-size: 8px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  pointer-events: none;
}

.appointment-paid-badge.pending {
  background: #fff1c9;
  color: #8a5a00;
}

.unavailable-block {
  position: relative;
  margin: 1px 3px;
  padding: 4px 6px;
  border: 1px solid #8aa8b3;
  border-radius: 3px;
  background: #c4d8df;
  color: #18323b;
  text-align: left;
  font-size: 12px;
  line-height: 1.25;
  overflow: hidden;
  z-index: 5;
}

.unavailable-block:hover {
  background: #b9d0d8;
  border-color: #6f929e;
}

.unavailable-block strong,
.unavailable-block span {
  display: block;
}

.unavailable-block::after {
  content: "=";
  position: absolute;
  left: 50%;
  bottom: 2px;
  transform: translateX(-50%);
  color: #3b7181;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: start center;
  padding: 32px 20px;
  background: rgba(17, 24, 28, 0.68);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.modal-panel {
  width: min(570px, calc(100vw - 32px));
  background: white;
  border: 1px solid #d9e4e6;
  border-radius: 3px;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.28);
}

.booking-mode-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  min-height: 42px;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 18px;
  background: #ffe899;
  border-bottom: 1px solid #e7c95f;
  color: #243a40;
  box-shadow: 0 6px 18px rgba(18, 36, 42, 0.12);
}

.booking-mode-banner button {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  color: #243a40;
  font-size: 21px;
  font-weight: 850;
}

.booking-mode-banner button:hover {
  background: #ffffff;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 30px;
  background: #fbfbfb;
  border-bottom: 1px solid #edf1f2;
}

.unavailable-modal .modal-header {
  background: #543955;
  color: white;
  border-bottom-color: #543955;
}

.unavailable-modal .modal-close {
  color: white;
}

.schedule-modal .modal-header {
  background: #e4f7f8;
  color: var(--ink);
}

.schedule-modal {
  width: min(660px, calc(100vw - 32px));
  max-height: calc(100vh - 72px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body.modal-open {
  overflow: hidden;
}

.appointment-modal .modal-header {
  background: #0d8aa3;
  color: white;
  border-bottom-color: #0d8aa3;
}

.appointment-modal {
  max-height: calc(100vh - 36px);
  overflow-y: auto;
}

.appointment-modal .modal-close {
  color: white;
  background: rgba(255, 255, 255, 0.16);
}

.appointment-detail-modal {
  width: min(570px, calc(100vw - 32px));
  overflow: hidden;
  border: 0;
  border-radius: 14px;
}

.appointment-detail-modal.payment-open {
  width: min(1080px, 100%);
  max-height: calc(100dvh - 64px);
  display: grid;
  grid-template-columns: minmax(340px, 0.78fr) minmax(500px, 1.22fr);
  align-items: start;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.appointment-detail-primary {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-self: stretch;
  min-height: 100%;
  background: #ffffff;
}

.appointment-detail-modal .modal-header {
  align-items: flex-start;
  padding: 28px 30px 26px;
  background: linear-gradient(145deg, #087f98 0%, #0b9bb2 100%);
  color: white;
  border-bottom: 0;
}

.appointment-detail-modal .modal-close {
  color: white;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  transition: background 150ms ease, transform 150ms ease;
}

.appointment-detail-modal .modal-close:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: scale(1.04);
}

.detail-meta {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.32);
  display: grid;
  gap: 5px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 650;
  line-height: 1.45;
}

.detail-meta strong {
  color: #ffffff;
  font-size: 15px;
}

.appointment-detail-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  padding: 28px 30px;
  background: white;
}

.appointment-detail-body h3 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 18px;
}

.appointment-client-link {
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  text-align: left;
  cursor: pointer;
}

.appointment-client-link:hover,
.appointment-client-link:focus-visible {
  color: var(--accent-dark);
  text-decoration: underline;
}

.appointment-invoice-number {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #e5f6f8;
  color: #00677a;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  vertical-align: middle;
}

.appointment-detail-body dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 18px;
  margin: 22px 0 0;
  padding: 18px;
  border: 1px solid #dce9ec;
  border-radius: 10px;
  background: #f7fafb;
}

.appointment-detail-body dt {
  margin: 0;
  color: #00798a;
  font-weight: 850;
}

.appointment-detail-body dd {
  margin: 0;
  color: #4d6268;
}

.appointment-quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.appointment-quick-actions button {
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid #c7dadd;
  border-radius: 8px;
  background: #f8fbfb;
  color: var(--ink);
  text-align: center;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.appointment-quick-actions button:hover {
  border-color: #0795aa;
  background: #eef9fa;
  transform: translateY(-1px);
}

.modal-actions.appointment-detail-actions {
  display: grid;
  grid-template-columns: 0.85fr 1.35fr 0.75fr 0.9fr 1.05fr;
  margin-top: auto;
  background: #f7f4f7;
  border-top: 1px solid #e5dfe6;
  gap: 8px;
  padding: 18px 30px;
}

.appointment-detail-actions .ghost-btn {
  min-width: 0;
  padding-inline: 7px;
  border-color: #d5c8d6;
  border-radius: 7px;
  background: #ffffff;
  color: #503951;
  font-size: 13px;
}

.appointment-detail-actions .archive-action {
  margin-left: 0;
  min-width: 0;
  border-color: #ecd3da;
  color: #9d4058;
}

.appointment-payment-notice {
  margin-bottom: 16px;
  padding: 10px 12px;
  border: 1px solid #8ed6ba;
  border-radius: 5px;
  background: #e9f8f1;
  color: #176b50;
  font-weight: 750;
}

.appointment-payment-panel {
  min-width: 0;
  padding: 26px 28px 30px;
  border-left: 1px solid #d4e3e6;
  background: #f3f8f9;
}

.payment-panel-header,
.payment-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.payment-panel-header {
  margin-bottom: 20px;
  padding: 0 2px;
}

.payment-panel-header h2,
.payment-source-card h3,
.payment-products-card h3 {
  margin: 0;
}

.payment-panel-header h2 {
  margin-top: 3px;
  color: #23383d;
  font-size: 24px;
}

.payment-eyebrow {
  color: #00839a;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.payment-summary-card,
.payment-source-card,
.payment-products-card {
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid #d2e2e5;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 5px 18px rgba(31, 68, 76, 0.05);
}

.payment-summary-card {
  padding: 20px 22px;
  text-align: center;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdfd 100%);
}

.payment-summary-card > span {
  color: #60757b;
  font-weight: 750;
}

.payment-summary-card > strong {
  display: block;
  margin: 3px 0 18px;
  color: #17383f;
  font-size: 40px;
  line-height: 1.05;
}

.payment-summary-card > div {
  display: flex;
  justify-content: space-between;
  padding-top: 9px;
  border-top: 1px solid #e3ecee;
  color: #50656b;
}

.payment-summary-card > div + div {
  margin-top: 9px;
}

.payment-source-card,
.payment-products-card {
  padding: 18px;
}

.payment-source-card .payment-section-heading p,
.payment-products-card p {
  margin: 5px 0 14px;
  color: #6c7d82;
  font-size: 13px;
}

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

.payment-method-list label {
  display: grid;
  gap: 5px;
  color: #007f94;
  font-size: 13px;
  font-weight: 800;
}

.payment-method-list .money-input,
.payment-product-picker select,
.payment-product-list input {
  min-height: 42px;
}

.payment-product-picker {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.payment-product-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.payment-product-list > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 86px 72px 30px;
  gap: 8px;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid #e5edef;
}

.payment-product-list label {
  display: grid;
  grid-template-columns: auto 44px;
  align-items: center;
  gap: 5px;
  color: #65777c;
  font-size: 12px;
}

.payment-product-list input {
  width: 44px;
  padding: 5px;
}

.payment-product-list button {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid #d7e2e4;
  border-radius: 4px;
  background: #ffffff;
  color: #a1465e;
}

.payment-products-empty {
  margin-bottom: 0 !important;
}

.payment-products-unavailable {
  display: grid;
  gap: 4px;
  padding: 13px 14px;
  border: 1px dashed #bcd5d9;
  border-radius: 8px;
  background: #f7fbfb;
}

.payment-products-unavailable strong {
  color: #36565d;
}

.payment-products-unavailable span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.payment-notes {
  display: grid;
  gap: 6px;
  color: #007f94;
  font-weight: 800;
}

.payment-validation {
  min-height: 20px;
  padding-top: 8px;
  color: #b13f5c;
  font-size: 13px;
  font-weight: 750;
}

.payment-panel-actions {
  display: flex;
  gap: 8px;
  position: sticky;
  bottom: -30px;
  z-index: 2;
  margin: 4px -28px -30px;
  padding: 16px 28px 20px;
  border-top: 1px solid #d4e3e6;
  background: rgba(243, 248, 249, 0.96);
  backdrop-filter: blur(8px);
}

.payment-panel-actions .primary-btn {
  min-width: 170px;
}

.payment-panel-actions .primary-btn:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

@media (max-width: 760px) {
  .appointment-detail-modal.payment-open {
    width: min(570px, calc(100vw - 24px));
    max-height: calc(100dvh - 24px);
    display: block;
    overflow-y: auto;
  }

  .appointment-payment-panel {
    padding: 22px;
    border-top: 1px solid #c7dde1;
    border-left: 0;
  }

  .payment-method-list {
    grid-template-columns: 1fr;
  }

  .payment-panel-actions {
    bottom: -22px;
    margin: 4px -22px -22px;
    padding: 14px 22px 18px;
  }

  .payment-product-list > div {
    grid-template-columns: minmax(0, 1fr) 78px 64px 30px;
  }

  .appointment-detail-actions .archive-action {
    margin-left: 0;
  }
}

.selected-patient-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid #b8cbd0;
  border-radius: 4px;
  background: #ffffff;
}

.selected-patient-chip span {
  color: var(--muted);
}

.confirm-modal .modal-header {
  border-top: 8px solid #fff2a9;
}

.confirm-body {
  padding: 28px 30px 10px;
}

.confirm-body p {
  margin: 0 0 10px;
  line-height: 1.45;
}

.confirm-actions {
  padding-left: 30px;
}

.modal-header h2 {
  margin: 0;
  font-size: 26px;
  font-weight: 850;
}

.modal-close {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(72, 91, 97, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  color: #485b61;
  font-size: 20px;
  line-height: 1;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(43, 86, 92, 0.08);
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}

.modal-close:hover {
  transform: rotate(8deg) scale(1.04);
  background: #fff3f7;
  border-color: rgba(217, 109, 145, 0.42);
  color: var(--accent-dark);
}

.availability-form {
  display: grid;
  gap: 14px;
  padding: 28px 30px 16px;
}

.availability-form label {
  display: grid;
  grid-template-columns: 130px 1fr;
  align-items: center;
  gap: 20px;
  color: #19727d;
  font-weight: 800;
}

.availability-form .hidden-field {
  display: none;
}

.availability-form input,
.availability-form select,
.availability-form textarea {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: white;
  color: var(--ink);
  padding: 7px 10px;
  font-weight: 500;
}

.patient-search {
  position: relative;
}

.patient-search input {
  padding-right: 36px;
}

.search-mark {
  position: absolute;
  top: 8px;
  right: 11px;
  color: #0d8aa3;
  font-weight: 900;
}

.patient-search p {
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 500;
}

.patient-results {
  position: absolute;
  left: 0;
  right: 0;
  top: 38px;
  z-index: 30;
  background: white;
  border: 2px solid #25aede;
  border-top: 0;
  border-radius: 0 0 5px 5px;
  overflow: hidden;
  box-shadow: 0 12px 22px rgba(20, 70, 80, 0.14);
}

.patient-results button,
.patient-empty {
  width: 100%;
  display: block;
  min-height: 30px;
  border: 0;
  background: white;
  padding: 7px 10px;
  text-align: left;
  color: var(--ink);
}

.patient-results button:hover,
.patient-results button:first-child {
  background: #fff7fb;
  color: var(--accent-dark);
}

.patient-results mark {
  background: transparent;
  color: var(--accent-dark);
}

.patient-results span,
.patient-empty {
  color: var(--muted);
}

.form-divider {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 6px 0;
  color: var(--ink);
  font-family: Roboto, Arial, sans-serif;
  font-size: 24px;
  font-weight: 700;
}

.form-divider::before,
.form-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  border-top: 1px dashed #cbd7da;
}

.form-subhead {
  grid-column: 131px / -1;
  margin-top: 6px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 850;
}

.dob-row,
.split-input {
  display: grid;
  grid-template-columns: repeat(3, minmax(80px, 1fr));
  gap: 6px;
}

.split-input {
  grid-template-columns: 1fr 150px;
}

.option-box {
  display: grid;
  gap: 10px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--ink);
  font-weight: 500;
}

.option-box label {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 500;
}

.option-box input {
  width: auto;
  min-height: auto;
}

.form-link-row {
  grid-column: 131px / -1;
}

.time-range {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
}

.time-range span {
  color: var(--ink);
  font-weight: 500;
}

.modal-actions {
  display: flex;
  gap: 8px;
  padding: 0 30px 30px 180px;
}

.modal-delete {
  margin-left: auto;
}

.schedule-body {
  display: grid;
  gap: 18px;
  padding: 28px 30px 18px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.schedule-modal .modal-actions {
  flex-shrink: 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  background: white;
}

.schedule-practitioner {
  display: grid;
  grid-template-columns: 130px 1fr;
  align-items: center;
  gap: 20px;
  color: #19727d;
  font-weight: 800;
}

.schedule-practitioner select,
.schedule-row select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: white;
  color: var(--ink);
  padding: 7px 10px;
  font-weight: 500;
}

.schedule-list {
  display: grid;
  gap: 10px;
}

.show-slots-box {
  display: grid;
  grid-template-columns: 130px 1fr;
  align-items: center;
  gap: 20px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.show-slots-box strong,
.show-slots-box span {
  display: block;
}

.show-slots-box strong {
  color: #19727d;
}

.show-slots-box span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.show-slot-controls {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto minmax(120px, 1fr);
  align-items: center;
  gap: 10px;
}

.show-slot-controls.compact {
  grid-template-columns: minmax(160px, 240px);
}

.show-slot-controls select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: white;
  color: var(--ink);
  padding: 7px 10px;
  font-weight: 500;
}

.schedule-row {
  display: grid;
  grid-template-columns: 130px 106px 1fr;
  align-items: center;
  gap: 18px;
}

.schedule-row strong {
  font-size: 16px;
}

.closed-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 700;
}

.closed-toggle input {
  width: 16px;
  height: 16px;
}

.schedule-times {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto minmax(120px, 1fr);
  align-items: center;
  gap: 10px;
}

.schedule-times.disabled {
  opacity: 0.42;
}

.timezone-note {
  margin: 2px 0 0 148px;
  color: var(--muted);
  font-size: 13px;
}

.table-page {
  display: grid;
  gap: 18px;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}

.search {
  min-width: min(420px, 100%);
  flex: 1;
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  padding: 8px 12px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  overflow: hidden;
}

.data-table th,
.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.data-table th {
  background: #dcf5f7;
  color: #267078;
  font-size: 13px;
  text-transform: uppercase;
}

.data-table .table-empty {
  color: var(--muted);
  font-weight: 500;
}

.financial-row {
  cursor: pointer;
  transition: background 120ms ease;
}

.financial-row:hover,
.financial-row:focus {
  outline: 0;
  background: #eef9fa;
}

.invoice-list-pay {
  min-height: 34px;
  padding: 6px 14px;
}

.financial-detail-page {
  padding: 0 28px 32px;
}

.financial-detail-card {
  max-width: 940px;
  margin-top: 24px;
  padding: 24px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.financial-detail-heading {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.financial-detail-heading h2 {
  margin: 3px 0 5px;
  font-size: 25px;
}

.financial-detail-heading p {
  margin: 0;
  color: var(--muted);
}

.financial-detail-eyebrow {
  color: #267078;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.financial-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.financial-detail-grid label {
  display: grid;
  gap: 7px;
  color: #267078;
  font-size: 13px;
  font-weight: 800;
}

.financial-detail-grid input,
.financial-detail-grid select,
.financial-detail-grid textarea {
  width: 100%;
  min-height: 40px;
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 400;
}

.financial-detail-grid input:read-only,
.financial-detail-grid textarea:read-only,
.financial-detail-grid select:disabled {
  background: #f5f7f7;
  color: #4d595c;
  opacity: 1;
}

.financial-detail-wide {
  grid-column: 1 / -1;
}

.payment-edit-methods {
  padding: 18px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: #f8fcfd;
}

.payment-edit-methods h3 {
  margin: 18px 0 4px;
}

.payment-edit-methods > p {
  margin: 0 0 14px;
  color: var(--muted);
}

.payment-edit-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.payment-edit-summary div {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
}

.payment-edit-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.payment-edit-summary strong {
  color: var(--ink);
  font-size: 18px;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: var(--mint-100);
  color: #267078;
}

.status.due {
  background: #ffe6ef;
  color: var(--accent-dark);
}

.invoice-pending-status {
  background: #ffe1e1;
  color: #b4232f;
}

.status.archived {
  margin-left: 8px;
  background: #edf3f4;
  color: var(--muted);
}

.people-page {
  display: grid;
  gap: 18px;
}

.patient-form-page {
  display: grid;
  gap: 22px;
  max-width: 940px;
}

.patient-form-card {
  display: grid;
  gap: 22px;
  padding: 24px 28px 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  box-shadow: 0 14px 28px rgba(43, 92, 102, 0.08);
}

.patient-form-section-title {
  color: var(--ink);
  font-size: 22px;
  font-weight: 850;
}

.settings-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.settings-form-grid > label {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  align-items: start;
  gap: 18px;
  color: #087f96;
  font-weight: 850;
}

.settings-form-grid > label > input,
.settings-form-grid > label > select,
.settings-form-grid > label > textarea,
.settings-form-grid > label > .dob-row,
.settings-form-grid > label > .split-input,
.settings-form-grid > label > .option-box {
  min-width: 0;
}

.settings-form-grid > label > input,
.settings-form-grid > label > select,
.settings-form-grid > label > textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid #c7d7dc;
  border-radius: 5px;
  background: white;
  color: var(--ink);
  padding: 8px 11px;
  font: inherit;
  font-weight: 500;
}

.settings-form-grid > label > textarea {
  resize: vertical;
}

.settings-form-grid .option-box {
  gap: 9px;
  padding: 12px 14px;
}

.settings-form-grid .option-box > span {
  margin-bottom: 2px;
}

.settings-form-grid .option-box label {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-weight: 500;
}

.settings-form-grid .option-box input[type="checkbox"],
.settings-form-grid .option-box input[type="radio"] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
  flex: 0 0 auto;
  accent-color: #0b8fa3;
}

.patient-form-actions {
  padding: 0 0 0 188px;
}

.people-filter {
  display: grid;
  gap: 18px;
}

.people-search {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  border-bottom: 2px solid #aebdc1;
  padding: 10px 2px 8px;
  color: #98a6aa;
  font-size: 18px;
}

.people-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 18px;
}

.archived-toggle {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 9px;
  color: #43565b;
}

.archived-toggle input {
  width: 17px;
  height: 17px;
  accent-color: #0b8fa3;
}

.people-table th {
  text-transform: none;
  font-size: 14px;
}

.text-link {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--accent-dark);
  font-weight: 800;
  text-align: left;
}

.text-link:hover,
.link:hover {
  text-decoration: underline;
}

.person-name-link {
  min-height: 26px;
}

.phone-link {
  color: var(--accent-dark);
}

.muted {
  color: var(--muted);
}

.empty-cell {
  color: var(--muted);
  text-align: center !important;
  padding: 26px !important;
}

.patient-detail-page {
  min-height: calc(100vh - 66px);
  background: #f7f7f7;
}

.patient-detail-title {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
  padding: 18px 24px 14px;
  background: #fbfbfb;
  border-bottom: 1px solid var(--line);
}

.patient-detail-title h1 {
  margin: 3px 0 0;
  font-family: Roboto, Arial, sans-serif;
  font-size: 28px;
  font-weight: 500;
}

.patient-detail-title h1 span {
  color: var(--muted);
  margin: 0 8px;
}

.back-link {
  font-size: 13px;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 0;
}

.detail-actions .ghost-btn {
  border-radius: 0;
  margin-left: -1px;
  background: white;
}

.detail-actions .save-action {
  color: #007c91;
}

.detail-actions .danger-action {
  color: #b4234f;
}

.alert-link {
  margin: 12px 24px;
}

.patient-detail-layout {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  border-top: 1px solid var(--line);
}

.patient-tabs {
  display: grid;
  align-content: start;
  gap: 2px;
  padding: 16px 0;
  background: #fbfbfb;
  border-right: 1px solid var(--line);
}

.patient-tabs button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 0;
  background: transparent;
  padding: 9px 12px;
  color: #4b4f51;
  text-align: left;
}

.patient-tabs button.active {
  color: #00839a;
  font-weight: 800;
}

.patient-tabs em {
  min-width: 23px;
  padding: 2px 7px;
  border-radius: 4px;
  background: #fff1ba;
  color: #82713b;
  font-style: normal;
  text-align: center;
}

.patient-tabs em.strong-badge {
  background: #0588a0;
  color: white;
}

.patient-detail-main {
  display: grid;
  grid-template-columns: minmax(380px, 590px) minmax(280px, 530px);
  gap: 60px;
  padding: 30px;
}

.patient-edit-main {
  display: grid;
  grid-template-columns: minmax(420px, 560px) 1fr;
  min-height: calc(100vh - 160px);
  background: #f3f3f3;
}

.patient-edit-form {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 28px 30px 40px;
  background: white;
  border-right: 1px solid var(--line);
}

.patient-edit-form label {
  display: grid;
  gap: 7px;
  color: #00839a;
  font-weight: 850;
}

.patient-edit-form input,
.patient-edit-form select,
.patient-edit-form textarea {
  width: 100%;
  border: 1px solid #b8cbd1;
  border-radius: 5px;
  background: white;
  color: var(--ink);
  padding: 9px 11px;
  font: inherit;
  font-weight: 500;
}

.patient-edit-form input:focus,
.patient-edit-form select:focus,
.patient-edit-form textarea:focus {
  border-color: #24bde1;
  outline: 2px solid rgba(36, 189, 225, 0.2);
}

.patient-edit-form textarea {
  resize: vertical;
}

.field-without-label {
  color: transparent !important;
}

.edit-name-grid {
  display: grid;
  grid-template-columns: 118px 1fr 1fr;
  gap: 14px;
}

.edit-dob-grid,
.edit-address-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

.edit-dob-grid > label {
  grid-column: 1 / -1;
}

.edit-panel,
.edit-choice-group,
.check-chip-group {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fbfbfb;
}

.edit-panel h2,
.edit-section-heading {
  margin: 0;
  color: #333;
  font-size: 18px;
  font-weight: 850;
}

.edit-panel p,
.edit-choice-group p {
  margin: 0;
  color: #4d5b60;
}

.edit-choice-group legend,
.check-chip-group legend {
  padding: 0 4px;
  color: #00839a;
  font-weight: 850;
}

.radio-chip,
.check-chip,
.checkbox-line {
  display: inline-flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 9px !important;
  width: fit-content;
  color: #3e474b !important;
  font-weight: 500 !important;
}

.radio-chip input,
.check-chip input,
.checkbox-line input {
  width: 17px;
  height: 17px;
  padding: 0;
}

.check-chip-group > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.phone-edit-row {
  display: grid;
  grid-template-columns: 1fr 160px;
  gap: 10px;
}

.compact-panel {
  gap: 10px;
}

.patient-edit-actions {
  padding: 10px 0 0;
}

.patient-edit-fill {
  background: #f3f3f3;
}

.patient-card-stack,
.patient-summary-stack {
  display: grid;
  align-content: start;
  gap: 30px;
}

.detail-card,
.summary-card {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: white;
}

.detail-card h2 {
  margin: 0;
  padding: 13px 16px;
  background: #dcf5f7;
  color: #007c91;
  font-size: 16px;
}

.detail-row {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 16px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
}

.detail-row:first-child {
  border-top: 0;
}

.detail-row strong {
  color: #00839a;
}

.detail-row.single {
  display: block;
}

.summary-card {
  border-color: var(--line);
}

.summary-card h2 {
  margin: 0;
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
  background: white;
  font-size: 17px;
}

.summary-card p {
  margin: 0;
  padding: 16px;
  line-height: 1.55;
}

.sms-reply-list article {
  padding: 14px 16px;
  border-top: 1px solid var(--line);
}

.sms-reply-list article:first-child {
  border-top: 0;
}

.sms-reply-list p {
  padding: 0;
}

.sms-reply-list small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
}

.patient-tab-content {
  min-width: 0;
  padding: 30px;
}

.patient-tab-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.patient-tab-toolbar h2,
.patient-tab-toolbar p {
  margin: 0;
}

.patient-tab-toolbar h2 {
  font-size: 24px;
}

.patient-tab-toolbar p {
  margin-top: 6px;
  color: var(--muted);
}

.patient-file-picker {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.patient-file-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.patient-file-grid {
  display: grid;
  gap: 12px;
}

.patient-file-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
}

.patient-file-icon {
  display: grid;
  place-items: center;
  min-height: 48px;
  border-radius: 5px;
  background: #dcf5f7;
  color: #007c91;
  font-size: 12px;
  font-weight: 900;
}

.patient-file-card > div:nth-child(2) {
  display: grid;
  gap: 4px;
}

.patient-file-card span,
.patient-file-card small {
  color: var(--muted);
}

.patient-file-actions {
  display: flex;
  gap: 14px;
}

.danger-link {
  color: #b4234f;
}

.patient-tab-empty {
  padding: 60px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
  background: white;
  text-align: center;
}

.patient-tab-empty strong {
  font-size: 18px;
}

.patient-tab-empty p {
  margin: 8px 0 0;
  color: var(--muted);
}

.patient-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
}

.patient-record-table {
  margin: 0;
}

.patient-status {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  background: #edf2f4;
}

.patient-status.upcoming,
.patient-status.today {
  background: #dcf5f7;
  color: #007c91;
}

.account-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.account-summary-grid article {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
}

.account-summary-grid span {
  color: var(--muted);
}

.account-summary-grid strong {
  color: #007c91;
  font-size: 24px;
}

@media (max-width: 900px) {
  .patient-tab-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .patient-file-picker {
    width: fit-content;
  }

  .account-summary-grid {
    grid-template-columns: 1fr;
  }
}

.patient-notes-main {
  display: grid;
  grid-template-columns: minmax(440px, 620px) minmax(260px, 380px);
  gap: 60px;
  padding: 30px;
}

.treatment-note-side-column {
  display: grid;
  align-content: start;
  gap: 30px;
}

.treatment-note-side-column .patient-summary-stack {
  gap: 30px;
}

.treatment-note-ai-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid #b9d3d9;
  border-radius: 7px;
  background: linear-gradient(180deg, #f1fbfc 0%, #ffffff 58%);
  box-shadow: var(--shadow-soft);
}

.treatment-note-ai-panel header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.treatment-note-ai-panel header div {
  display: grid;
  gap: 4px;
}

.treatment-note-ai-panel header span {
  color: #176f82;
  font-size: 18px;
  font-weight: 850;
}

.treatment-note-ai-panel header small {
  color: #60767c;
  line-height: 1.35;
}

.treatment-note-ai-panel header > strong {
  padding: 4px 8px;
  border-radius: 999px;
  background: #d65f8a;
  color: white;
  font-size: 11px;
  white-space: nowrap;
}

.treatment-note-ai-panel label {
  display: grid;
  gap: 7px;
  color: #31545d;
  font-weight: 800;
}

.treatment-note-ai-panel textarea {
  width: 100%;
  min-height: 170px;
  resize: vertical;
  border: 1px solid #b9ccd1;
  border-radius: 5px;
  padding: 10px 11px;
  background: white;
  color: var(--ink);
  font: inherit;
  font-weight: 500;
  line-height: 1.45;
}

.treatment-note-ai-help,
.treatment-note-ai-locked p {
  margin: 0;
  color: #617277;
  font-size: 13px;
  line-height: 1.45;
}

.treatment-note-ai-locked {
  background: #ffffff;
}

.treatment-notes-panel {
  display: grid;
  align-content: start;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: white;
}

.treatment-notes-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 10px 14px 10px 18px;
  border-bottom: 1px solid var(--line-strong);
}

.treatment-notes-panel-header strong {
  color: #3d4548;
  font-size: 18px;
  font-weight: 850;
}

.treatment-notes-panel-body {
  padding: 18px;
}

.treatment-note-list {
  display: grid;
  gap: 18px;
}

.treatment-note-card {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: white;
}

.treatment-note-card header {
  display: grid;
  grid-template-columns: 1fr 44px;
  align-items: center;
  min-height: 46px;
  border-bottom: 1px solid var(--line-strong);
  background: #dcf5f7;
}

.treatment-note-card header strong {
  padding: 13px 16px;
  color: #007c91;
  font-size: 17px;
}

.note-pin {
  width: 44px;
  height: 46px;
  border-width: 0 0 0 1px;
  border-color: var(--line-strong);
  border-radius: 0;
  background: #dcf5f7;
  color: #00839a;
}

.treatment-note-meta {
  display: grid;
  gap: 6px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  color: #4d5b60;
}

.treatment-note-meta span:first-child {
  color: #4d5b60;
  font-weight: 700;
}

.treatment-note-meta span:last-child {
  color: var(--accent-dark);
}

.treatment-note-body {
  display: grid;
  gap: 22px;
  padding: 18px 16px 24px;
  color: #444d50;
  line-height: 1.5;
}

.treatment-note-body section {
  display: grid;
  gap: 4px;
}

.treatment-note-body h3 {
  margin: 0;
  color: #00839a;
  font-size: 15px;
  font-weight: 850;
}

.treatment-note-body p {
  margin: 0;
}

.treatment-note-editor {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: white;
}

.treatment-note-editor label {
  display: grid;
  gap: 7px;
  color: #00839a;
  font-weight: 850;
}

.treatment-note-template-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
}

.treatment-note-template-row .ghost-btn {
  min-height: 40px;
  white-space: nowrap;
}

.treatment-note-template-row .ghost-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.treatment-note-editor input,
.treatment-note-editor select,
.treatment-note-editor textarea {
  width: 100%;
  border: 1px solid #c7d7dc;
  border-radius: 5px;
  background: white;
  color: var(--ink);
  padding: 9px 11px;
  font: inherit;
  font-weight: 500;
}

.treatment-note-editor textarea {
  resize: vertical;
}

.treatment-template-missing {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px dashed #b8ced2;
  border-radius: 5px;
  color: #52666b;
}

.treatment-note-actions {
  padding: 0;
}

.treatment-notes-page {
  display: grid;
  align-content: start;
  gap: 24px;
  padding: 28px 30px 42px;
}

.treatment-notes-date-panel {
  position: relative;
  display: grid;
  gap: 18px;
  max-width: 980px;
  padding: 20px 22px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: white;
  box-shadow: var(--shadow-soft);
}

.treatment-notes-date-heading {
  display: grid;
  gap: 4px;
}

.treatment-notes-date-heading span,
.treatment-notes-date-picker span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.treatment-notes-date-heading strong {
  color: var(--ink);
  font-size: 24px;
}

.treatment-notes-date-controls {
  display: flex;
  align-items: end;
  gap: 8px;
}

.treatment-notes-date-picker {
  display: grid;
  gap: 5px;
}

.treatment-notes-date-picker input {
  min-width: 190px;
  min-height: 40px;
  padding: 8px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: white;
  color: var(--ink);
  font: inherit;
  font-weight: 750;
}

.treatment-notes-count {
  position: absolute;
  top: 22px;
  right: 22px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #e7f6f7;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 850;
}

.daily-treatment-note-list {
  display: grid;
  gap: 18px;
  max-width: 980px;
}

.daily-treatment-note-card header {
  grid-template-columns: minmax(0, 1fr) auto;
  padding-right: 10px;
}

.daily-treatment-note-card header div {
  display: grid;
  gap: 2px;
  padding: 10px 16px;
}

.daily-treatment-note-card header strong {
  padding: 0;
}

.daily-treatment-note-card header span {
  color: #4d5b60;
  font-size: 13px;
}

.treatment-notes-empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  max-width: 980px;
  padding: 80px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
  background: white;
  text-align: center;
}

.treatment-notes-empty strong {
  color: var(--accent-dark);
  font-size: 18px;
}

.treatment-notes-empty p {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 720px) {
  .treatment-notes-page {
    padding: 20px 16px 32px;
  }

  .treatment-notes-date-panel {
    padding: 18px;
  }

  .treatment-notes-date-heading {
    padding-right: 70px;
  }

  .treatment-notes-date-heading strong {
    font-size: 20px;
  }

  .treatment-notes-date-controls {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .treatment-notes-date-picker {
    flex: 1 1 180px;
  }

  .treatment-notes-date-picker input {
    width: 100%;
    min-width: 0;
  }
}

.treatment-template-page {
  padding-bottom: 48px;
}

.treatment-template-message {
  margin: 24px 30px 0;
}

.treatment-template-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 30px;
}

.treatment-template-intro h2,
.treatment-template-editor h2 {
  margin: 0 0 7px;
  color: #263f45;
  font-size: 26px;
}

.treatment-template-intro p,
.treatment-template-editor header p,
.treatment-template-question-heading p {
  margin: 0;
  color: #617277;
  line-height: 1.45;
}

.treatment-template-list {
  width: min(920px, calc(100vw - 310px));
  min-height: 0;
  padding-top: 0;
}

.treatment-template-table th {
  background: #dff2f6;
  color: #087f98;
}

.treatment-template-row-actions {
  display: flex;
  gap: 16px;
}

.danger-link {
  color: #c43d58 !important;
}

.treatment-template-editor {
  display: grid;
  gap: 22px;
  width: min(1160px, calc(100vw - 310px));
  margin: 30px;
  padding: 28px;
  border: 1px solid #c9dadd;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.treatment-template-builder-grid {
  display: grid;
  grid-template-columns: minmax(520px, 1.6fr) minmax(300px, 0.9fr);
  align-items: start;
  gap: 24px;
}

.treatment-template-builder-main {
  display: grid;
  gap: 22px;
}

.treatment-template-ai-prompt textarea {
  width: 100%;
  min-height: 190px;
  resize: vertical;
  border: 1px solid #c8d1d4;
  border-radius: 5px;
  padding: 11px 12px;
  background: #ffffff;
  color: #31383b;
  font: inherit;
  line-height: 1.5;
}

.treatment-template-question-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-top: 4px;
}

.treatment-template-question-heading h3 {
  margin: 0 0 5px;
  color: #2d4147;
  font-size: 20px;
}

.treatment-template-fields {
  display: grid;
  gap: 10px;
}

.treatment-template-field {
  display: grid;
  grid-template-columns: 34px minmax(260px, 1fr) 170px auto;
  align-items: end;
  gap: 12px;
  padding: 14px;
  border: 1px solid #d5e1e3;
  border-radius: 7px;
  background: #f9fcfd;
}

.treatment-template-field-number {
  align-self: center;
  color: #16849a;
  font-weight: 850;
  text-align: center;
}

.treatment-template-field label {
  display: grid;
  gap: 5px;
  color: #4c5558;
  font-size: 12px;
  font-weight: 700;
}

.treatment-template-field input,
.treatment-template-field select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #c8d1d4;
  border-radius: 5px;
  padding: 8px 10px;
  background: #ffffff;
  color: #31383b;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
}

.treatment-template-field > button {
  min-height: 42px;
}

.treatment-template-editor-actions {
  padding: 0;
}

.treatment-template-delete {
  margin-left: auto;
}

@media (max-width: 900px) {
  .treatment-template-intro {
    align-items: flex-start;
    flex-direction: column;
  }

  .treatment-template-list,
  .treatment-template-editor {
    width: auto;
  }

  .treatment-template-builder-grid {
    grid-template-columns: 1fr;
  }

  .treatment-template-field {
    grid-template-columns: 32px 1fr auto;
  }

  .treatment-template-field label:nth-of-type(2) {
    grid-column: 2 / -1;
  }
}

.treatment-empty-state {
  display: grid;
  justify-items: center;
  gap: 12px;
  min-height: 220px;
  align-content: center;
  padding: 34px 16px;
  color: #4b4f51;
  text-align: center;
}

.treatment-empty-state strong {
  color: #3d4548;
  font-size: 18px;
  font-weight: 850;
}

.treatment-empty-state p {
  margin: 0;
  color: #50585b;
  line-height: 1.5;
}

.settings-hub {
  padding-top: 28px;
  background: #ffffff;
}

.settings-topbar {
  background: #fbfbfb;
}

.settings-page {
  min-height: calc(100vh - 68px);
  background: #ffffff;
}

.settings-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 30px;
  border-top: 1px solid #edf1f2;
  border-bottom: 1px solid #cfdadc;
  background: #ffffff;
  color: var(--muted);
}

.settings-breadcrumb span:first-child {
  color: var(--accent-dark);
  font-weight: 800;
}

.settings-breadcrumb span + span::before {
  content: ">";
  margin-right: 8px;
  color: #9aa8ac;
}

.settings-breadcrumb button + span::before {
  content: ">";
  margin-right: 8px;
  color: #9aa8ac;
}

.general-settings-form {
  width: min(690px, calc(100vw - 340px));
  padding: 26px 30px 48px;
}

.settings-section {
  margin-bottom: 42px;
}

.settings-section h2 {
  margin: 0 0 16px;
  color: #33383a;
  font-family: Roboto, Arial, sans-serif;
  font-size: 29px;
  font-weight: 500;
  letter-spacing: 0;
}

.settings-section h3 {
  margin: 20px 0 10px;
  color: #3f474b;
  font-size: 16px;
  font-weight: 850;
}

.settings-field {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
  color: #16849a;
  font-weight: 850;
}

.settings-field span,
.settings-help {
  color: #4c5558;
  font-weight: 500;
  line-height: 1.45;
}

.settings-field input,
.settings-field select,
.settings-field textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid #c8d1d4;
  border-radius: 5px;
  background: #ffffff;
  color: #31383b;
  padding: 9px 12px;
  font: inherit;
  font-weight: 500;
  box-shadow: inset 0 1px 2px rgba(24, 40, 45, 0.04);
}

.settings-field textarea {
  min-height: 146px;
  resize: vertical;
}

.settings-field input + input {
  margin-top: 6px;
}

.settings-field.compact {
  max-width: 260px;
}

.profession-settings-field > strong {
  color: #16849a;
}

.profession-input-list {
  display: grid;
  gap: 8px;
}

.profession-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.profession-input-row .ghost-btn,
.profession-add-btn {
  margin: 0;
}

.profession-add-btn {
  justify-self: start;
}

.settings-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 12px;
}

.settings-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 12px 0;
  color: #4c5558;
  line-height: 1.45;
}

.settings-check input {
  width: 20px;
  height: 20px;
  margin-top: 1px;
  accent-color: #278aa0;
}

.inline-setting {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  color: #4c5558;
}

.inline-setting select {
  min-height: 42px;
  border: 1px solid #c8d1d4;
  border-radius: 5px;
  background: #ffffff;
  color: #31383b;
  padding: 8px 38px 8px 12px;
  font: inherit;
}

.settings-help {
  margin: 8px 0 16px;
}

.settings-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 12px 0 28px;
}

.settings-card-title-link {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  font: inherit;
  font-weight: inherit;
  cursor: pointer;
}

.settings-card-title-link:hover {
  color: var(--accent);
}

.customer-form-layout {
  display: grid;
  grid-template-columns: minmax(620px, 1.25fr) minmax(360px, 0.75fr);
  align-items: start;
  gap: 30px;
  padding: 30px;
}

.customer-form-builder,
.customer-form-preview-sticky {
  border: 1px solid #c9dadd;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.customer-form-builder {
  padding: 28px;
}

.customer-form-heading h2,
.customer-form-preview h2 {
  margin: 5px 0 8px;
  color: #243a40;
  font-size: 27px;
}

.customer-form-heading p,
.customer-form-preview p,
.customer-form-questions-heading p {
  margin: 0;
  color: #5a6b70;
  line-height: 1.45;
}

.customer-form-eyebrow {
  color: #16849a;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.customer-form-details {
  margin-top: 28px;
}

.customer-form-details textarea {
  min-height: 88px;
}

.customer-form-questions-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin: 30px 0 14px;
}

.customer-form-questions-heading h3 {
  margin: 0 0 5px;
  color: #2d4147;
  font-size: 20px;
}

.customer-form-fields {
  display: grid;
  gap: 10px;
}

.customer-form-field {
  display: grid;
  grid-template-columns: 34px 86px minmax(210px, 1fr) 150px auto;
  align-items: end;
  gap: 12px;
  padding: 14px;
  border: 1px solid #d5e1e3;
  border-radius: 7px;
  background: #f9fcfd;
}

.customer-form-field-number {
  align-self: center;
  color: #16849a;
  font-weight: 850;
  text-align: center;
}

.customer-form-required {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  color: #4c5558;
  font-size: 13px;
  font-weight: 700;
}

.customer-form-required input {
  width: 19px;
  height: 19px;
  accent-color: #278aa0;
}

.customer-form-question,
.customer-form-type {
  display: grid;
  gap: 5px;
  color: #4c5558;
  font-size: 12px;
  font-weight: 700;
}

.customer-form-question input,
.customer-form-type select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #c8d1d4;
  border-radius: 5px;
  padding: 8px 10px;
  background: #ffffff;
  color: #31383b;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
}

.customer-form-remove {
  min-height: 42px;
  border: 0;
  background: transparent;
  color: #c8445d;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.customer-form-empty {
  padding: 28px;
  border: 1px dashed #b8ced2;
  border-radius: 7px;
  color: #64757a;
  text-align: center;
}

.customer-form-actions {
  margin-top: 18px;
}

.customer-form-preview-sticky {
  position: sticky;
  top: 90px;
  padding: 28px;
}

.customer-form-preview-fields {
  display: grid;
  gap: 17px;
  margin: 24px 0;
}

.customer-form-preview-fields > label,
.customer-form-preview-fields fieldset {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  border: 0;
  color: #3e5055;
  font-weight: 750;
}

.customer-form-preview-fields input:not([type="radio"]),
.customer-form-preview-fields textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid #c8d1d4;
  border-radius: 5px;
  background: #f8fafb;
  padding: 9px 12px;
}

.customer-form-preview-fields textarea {
  min-height: 82px;
  resize: none;
}

.customer-form-preview-fields legend {
  margin-bottom: 8px;
}

.form-preview-date-fields {
  display: grid;
  grid-template-columns: 0.8fr 1fr 1.15fr;
  gap: 8px;
}

.form-preview-date-fields input {
  min-width: 0;
  text-align: left;
}

.customer-form-preview-choice {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.form-preview-signature-pad {
  position: relative;
  min-height: 118px;
  border: 1px solid #c8d1d4;
  border-radius: 5px;
  background:
    linear-gradient(to bottom, transparent calc(100% - 30px), #d7e0e2 calc(100% - 29px), transparent calc(100% - 28px)),
    #f8fafb;
}

.form-preview-signature-pad canvas {
  display: block;
  width: 100%;
  height: 118px;
  cursor: crosshair;
  touch-action: none;
}

.form-preview-signature-pad span {
  position: absolute;
  right: 12px;
  bottom: 8px;
  color: #8a979b;
  font-size: 12px;
  font-weight: 500;
  pointer-events: none;
}

.form-preview-signature-pad.has-signature span {
  display: none;
}

.form-preview-signature-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #6a797d;
  font-size: 12px;
  font-weight: 500;
}

.form-preview-signature-actions button {
  border: 0;
  background: transparent;
  color: #c8445d;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.form-preview-required {
  margin-left: 3px;
  color: #d53e65;
}

.customer-form-preview .primary-btn[disabled] {
  opacity: 0.65;
}

@media (max-width: 1180px) {
  .customer-form-layout {
    grid-template-columns: 1fr;
  }

  .customer-form-preview-sticky {
    position: static;
  }
}

@media (max-width: 820px) {
  .customer-form-layout {
    padding: 18px;
  }

  .customer-form-builder,
  .customer-form-preview-sticky {
    padding: 20px;
  }

  .customer-form-field {
    grid-template-columns: 32px 1fr auto;
  }

  .customer-form-required {
    grid-column: 2;
  }

  .customer-form-question,
  .customer-form-type {
    grid-column: 2 / -1;
  }

  .customer-form-remove {
    grid-column: 3;
    grid-row: 1 / 3;
  }
}

.communication-home-page {
  background:
    radial-gradient(circle at 85% 8%, rgba(58, 184, 189, 0.12), transparent 30%),
    #f7faf9;
}

.communication-home-intro {
  max-width: 760px;
  padding: 42px 40px 24px;
}

.communication-home-intro h1 {
  margin: 0 0 12px;
  color: #183e43;
  font-size: clamp(30px, 3vw, 44px);
  line-height: 1.08;
}

.communication-home-intro > p:last-child {
  max-width: 620px;
  margin: 0;
  color: #587074;
  font-size: 17px;
  line-height: 1.55;
}

.communication-eyebrow {
  margin: 0 0 10px;
  color: #16849a;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.communication-home-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 18px;
  width: min(1040px, calc(100vw - 310px));
  padding: 12px 40px 56px;
}

.communication-home-card {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  gap: 17px;
  align-items: center;
  min-height: 148px;
  border: 1px solid #d8e6e4;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.95);
  color: #27474b;
  padding: 22px;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(34, 83, 88, 0.06);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.communication-home-card:hover {
  transform: translateY(-2px);
  border-color: #8fc9cf;
  box-shadow: 0 14px 34px rgba(34, 83, 88, 0.11);
}

.communication-home-copy {
  display: grid;
  gap: 7px;
}

.communication-home-copy strong {
  color: #183e43;
  font-size: 18px;
}

.communication-home-copy > span {
  color: #607579;
  line-height: 1.45;
}

.communication-home-copy small {
  color: #16849a;
  font-weight: 800;
}

.communication-home-arrow {
  color: #2c9aa7;
  font-size: 24px;
}

.communication-home-icon {
  position: relative;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: #e4f5f4;
}

.communication-home-icon::before,
.communication-home-icon::after {
  content: "";
  position: absolute;
}

.communication-home-icon::before {
  inset: 14px 11px 15px;
  border: 2px solid #16849a;
  border-radius: 7px;
}

.communication-home-icon::after {
  left: 19px;
  bottom: 11px;
  width: 10px;
  height: 10px;
  border-left: 2px solid #16849a;
  transform: skew(-28deg);
}

.communication-home-icon.credits {
  background: #fff1dd;
}

.communication-home-icon.credits::before {
  inset: 13px;
  border-radius: 50%;
  border-color: #c77b18;
}

.communication-home-icon.credits::after {
  content: "$";
  left: 21px;
  bottom: 15px;
  width: auto;
  height: auto;
  border: 0;
  color: #c77b18;
  font-weight: 900;
  transform: none;
}

.communication-home-icon.cancel {
  background: #fff0f2;
}

.communication-home-icon.cancel::before,
.communication-home-icon.cancel::after {
  top: 25px;
  left: 15px;
  width: 24px;
  height: 2px;
  border: 0;
  border-radius: 2px;
  background: #c94d65;
}

.communication-home-icon.cancel::before {
  transform: rotate(45deg);
}

.communication-home-icon.cancel::after {
  bottom: auto;
  transform: rotate(-45deg);
}

.communication-home-icon.confirm::after {
  left: 19px;
  bottom: 21px;
  width: 15px;
  height: 8px;
  border: 0;
  border-left: 3px solid #16849a;
  border-bottom: 3px solid #16849a;
  transform: rotate(-45deg);
}

.communication-home-icon.reminder::before {
  inset: 12px;
  border-radius: 50%;
}

.communication-home-icon.reminder::after {
  left: 26px;
  bottom: 25px;
  width: 9px;
  height: 10px;
  border: 0;
  border-left: 2px solid #16849a;
  border-bottom: 2px solid #16849a;
  transform: none;
}

.communication-home-icon.followup {
  background: #eeeafd;
}

.communication-home-icon.followup::before {
  border-color: #7462ba;
}

.communication-home-icon.followup::after {
  border-color: #7462ba;
}

.communication-empty-state {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 430px;
  padding: 60px 24px;
  text-align: center;
}

.communication-empty-state h2 {
  margin: 18px 0 8px;
  color: #28484c;
}

.communication-empty-state p {
  margin: 0 0 22px;
  color: #667b7f;
}

.communication-empty-icon {
  position: relative;
  width: 86px;
  height: 66px;
  border: 2px solid #2c9aa7;
  border-radius: 8px 8px 14px 14px;
  background: #ffe49a;
  transform: rotate(-2deg);
}

.communication-empty-icon::before {
  content: "";
  position: absolute;
  top: -13px;
  left: 8px;
  width: 34px;
  height: 15px;
  border: 2px solid #2c9aa7;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: #ffe49a;
}

.communication-empty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.communication-list-page {
  background: #ffffff;
}

.communication-template-list {
  min-height: calc(100vh - 250px);
}

.appointment-message-groups {
  display: grid;
  gap: 28px;
  width: min(920px, calc(100vw - 310px));
  padding: 30px 30px 48px;
}

.communication-template-group {
  overflow: hidden;
  border: 1px solid #c8dde1;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(17, 75, 84, 0.05);
}

.communication-template-group-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 20px 22px;
}

.communication-template-group-heading h2 {
  margin: 0 0 5px;
  color: #33383a;
  font-size: 23px;
}

.communication-template-group-heading .settings-help {
  margin: 0;
}

.communication-template-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.communication-template-group .communication-template-list {
  width: 100%;
  min-height: 0;
  padding: 0;
}

.communication-template-table {
  width: 100%;
}

.communication-template-table th {
  background: #dff2f6;
  color: #087f98;
}

.communication-template-link {
  font-weight: 800;
}

.communication-channel {
  display: inline-block;
  margin-left: 6px;
  padding: 3px 6px;
  border: 1px solid #d1d7d9;
  border-radius: 4px;
  background: #f7f7f7;
  color: #444c4f;
  font-size: 12px;
}

.communication-related {
  grid-template-columns: 1fr;
}

.communication-template-form {
  width: min(700px, calc(100vw - 340px));
  padding: 30px 30px 48px;
}

.communication-associations,
.communication-info {
  margin-bottom: 16px;
  padding: 18px 24px;
  border: 1px solid #cbd5d7;
  border-radius: 5px;
  background: #ffffff;
  color: #424a4d;
  line-height: 1.5;
}

.communication-associations ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.communication-associations li {
  margin: 5px 0;
  color: #d52f58;
}

.communication-token-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.communication-token-controls select {
  min-width: 132px;
  min-height: 38px;
  border: 1px solid #c8d1d4;
  border-radius: 5px;
  background: #ffffff;
  color: #4a5154;
  padding: 7px 30px 7px 10px;
  font: inherit;
  font-weight: 650;
}

.communication-template-form textarea {
  min-height: 260px;
  line-height: 1.5;
}

.communication-number {
  width: 58px !important;
  min-height: 38px !important;
}

.communication-checkbox-field {
  margin-top: 20px;
}

.sms-settings-layout {
  display: grid;
  grid-template-columns: 300px minmax(420px, 600px);
  gap: 30px;
  padding: 30px;
}

.sms-credit-card,
.sms-cost-note {
  overflow: hidden;
  margin-bottom: 30px;
  border: 1px solid #c6d2d5;
  border-radius: 5px;
  background: #ffffff;
  text-align: center;
}

.sms-credit-card h2 {
  margin: 0;
  padding: 14px;
  border-bottom: 1px solid #b7d8df;
  background: #def1f5;
  color: #087f98;
  font-family: inherit;
  font-size: 17px;
}

.sms-credit-card strong {
  display: block;
  padding: 16px;
  font-size: 46px;
  font-weight: 400;
}

.sms-credit-card > div {
  padding: 16px;
  border-top: 1px solid #e0e5e6;
  background: #f7f7f7;
  text-align: right;
}

.sms-cost-note {
  padding: 8px 20px;
  line-height: 1.45;
}

.sms-settings-form h3 {
  margin: 2px 0 8px;
  color: #3c4346;
}

.sms-settings-form section {
  margin-bottom: 28px;
  color: #4b5356;
  line-height: 1.45;
}

.sms-balance-options {
  overflow: hidden;
  border: 1px solid #c6d2d5;
  border-radius: 5px;
  background: #ffffff;
}

.sms-balance-options > .settings-check {
  margin: 0;
  padding: 10px;
}

.sms-auto-fields {
  padding: 0 36px 12px;
}

.sms-email-reminder {
  border-top: 1px solid #dce2e3;
}

@media (max-width: 900px) {
  .communication-home-grid {
    grid-template-columns: 1fr;
    width: auto;
  }

  .sms-settings-layout {
    grid-template-columns: 1fr;
  }

  .sms-settings-layout aside {
    max-width: 420px;
  }

  .communication-template-form {
    width: auto;
  }
}

.invoice-settings-form {
  width: min(760px, calc(100vw - 340px));
}

.invoice-settings-form .settings-section {
  margin-bottom: 38px;
}

.invoice-check-group {
  gap: 0;
}

.invoice-check-group > label:first-of-type {
  margin-top: 8px;
}

.invoice-wide-select {
  max-width: 420px;
}

.invoice-email-settings {
  display: grid;
  gap: 20px;
}

.invoice-email-template {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid #c8dde1;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(17, 75, 84, 0.05);
}

.invoice-email-template h3 {
  margin: 0 0 4px;
  color: #293235;
  font-size: 18px;
  font-weight: 850;
}

.invoice-template-field {
  display: grid;
  gap: 8px;
  color: #087f96;
  font-weight: 850;
}

.invoice-token-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.invoice-token-controls select {
  min-width: 132px;
  min-height: 39px;
  border: 1px solid #c8d1d4;
  border-radius: 5px;
  background: #ffffff;
  color: #3c464a;
  padding: 8px 32px 8px 10px;
  font: inherit;
  font-weight: 650;
}

.invoice-template-editor {
  min-height: 120px;
  border: 1px solid #c8d1d4;
  border-radius: 5px;
  background: #ffffff;
  color: #394245;
  padding: 12px;
  font-weight: 500;
  line-height: 1.5;
  outline: none;
  box-shadow: inset 0 1px 2px rgba(24, 40, 45, 0.04);
}

.invoice-template-editor.single-line {
  min-height: 42px;
  white-space: nowrap;
  overflow-x: auto;
}

.invoice-template-editor:focus {
  border-color: #49bdd0;
  box-shadow: 0 0 0 3px rgba(73, 189, 208, 0.17);
}

.invoice-token {
  display: inline-block;
  margin: 0 2px;
  border-radius: 4px;
  background: #dff4f7;
  color: #077c93;
  padding: 0 4px;
  font-weight: 700;
}

@media (max-width: 680px) {
  .invoice-settings-form {
    padding-inline: 18px;
  }

  .invoice-token-controls {
    display: grid;
    grid-template-columns: 1fr;
  }

  .invoice-token-controls select {
    width: 100%;
  }

  .invoice-email-template {
    padding: 14px;
  }
}

.business-settings-list {
  display: grid;
  gap: 18px;
  width: min(860px, calc(100vw - 360px));
  padding: 38px 30px 46px;
}

.users-settings-list {
  width: calc(100vw - 310px);
  padding: 38px 30px 46px;
}

.appointment-types-list {
  width: calc(100vw - 310px);
  padding: 38px 30px 46px;
}

.settings-table-list {
  width: calc(100vw - 310px);
  padding: 38px 30px 46px;
}

.appointment-types-table td {
  vertical-align: middle;
}

.appointment-types-table {
  width: 100%;
  table-layout: fixed;
}

.appointment-types-table th:first-child,
.appointment-types-table td:first-child {
  width: 38%;
}

.appointment-types-table th:nth-child(2),
.appointment-types-table td:nth-child(2) {
  width: 28%;
}

.appointment-types-table th:nth-child(3),
.appointment-types-table td:nth-child(3) {
  width: 20%;
}

.appointment-types-table th:last-child,
.appointment-types-table td:last-child {
  width: 190px;
  text-align: right;
}

.appointment-type-name {
  margin-left: 8px;
  font-weight: 800;
}

.appointment-type-row-actions {
  white-space: nowrap;
}

.appointment-type-row-actions .compact-btn + .compact-btn {
  margin-left: 6px;
}

.appointment-type-actions-heading {
  text-align: right;
}

.appointment-type-delete {
  margin-left: auto;
}

.appointment-types-table tbody tr:nth-child(even) {
  background: #f7f7f7;
}

.settings-simple-table th {
  text-transform: none;
  font-size: 16px;
}

.settings-simple-table td,
.payment-types-table td {
  height: 48px;
}

.payment-types-table th:first-child,
.payment-types-table td:first-child {
  width: 260px;
}

.payment-types-table td:nth-child(2) {
  color: var(--muted);
  line-height: 1.45;
}

.settings-row-link,
.payment-type-link {
  font-weight: 750;
}

.payment-type-message {
  width: min(760px, calc(100vw - 340px));
  margin: 28px 30px -18px;
}

.payment-type-editor {
  display: grid;
  gap: 24px;
  width: min(760px, calc(100vw - 340px));
  margin: 30px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.payment-type-editor-heading {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.payment-type-eyebrow {
  color: #00839a;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.payment-type-editor-heading h2 {
  margin: 5px 0 7px;
  color: var(--ink);
  font-size: 25px;
}

.payment-type-editor-heading p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.payment-type-fields {
  display: grid;
  gap: 18px;
}

.payment-type-fields label {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 10px 18px;
  align-items: start;
}

.payment-type-fields label > span {
  padding-top: 10px;
  color: #087f96;
  font-weight: 850;
}

.payment-type-fields input,
.payment-type-fields textarea {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #c7d7dc;
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
}

.payment-type-fields textarea {
  resize: vertical;
  line-height: 1.5;
}

.payment-type-actions {
  align-items: center;
  padding-top: 2px;
}

.payment-type-delete {
  margin-left: auto;
}

.taxes-list {
  max-width: 820px;
}

.type-colour-dot {
  width: 18px;
  height: 18px;
  display: inline-block;
  margin-right: 14px;
  border-radius: 999px;
  vertical-align: middle;
  box-shadow: inset 0 0 0 1px rgba(23, 50, 58, 0.08);
}

.appointment-type-form {
  width: min(690px, calc(100vw - 340px));
}

.colour-input-wrap {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 8px;
}

.colour-input-wrap input[type="color"] {
  width: 42px;
  min-height: 42px;
  padding: 4px;
}

.appointment-message-box {
  overflow: hidden;
  margin-bottom: 18px;
  border-color: #c7dde1;
}

.appointment-message-box h3 {
  margin: 0;
  padding: 14px 18px;
  border-bottom: 1px solid #b8d7dc;
  background: #dff3f6;
  color: #16849a;
  font-size: 18px;
  font-weight: 850;
}

.panel-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  padding: 16px 18px;
  background: #fafafa;
}

.panel-action-row .ghost-btn + .ghost-btn {
  margin-left: -1px;
}

.appointment-type-availability h3 {
  margin-top: 24px;
}

.appointment-types-related {
  width: calc(100vw - 310px);
  margin: 0 30px 48px;
}

.users-table td {
  vertical-align: middle;
}

.user-management-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 270px;
}

.compact-btn {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 13px;
}

.user-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #e7f6ef;
  color: #176b50;
  font-size: 12px;
  font-weight: 800;
}

.user-status-pill.inactive {
  background: #f2f0f1;
  color: #6b5961;
}

.user-management-modal .confirm-body {
  padding: 22px 30px 4px;
  line-height: 1.55;
}

.inactive-user-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 28px;
  border-bottom: 1px solid #e0c46c;
  background: #fff4c8;
  color: #443a18;
}

.inactive-user-banner strong {
  white-space: nowrap;
}

.inactive-user-mode [aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.52;
}

.subscription-content {
  width: min(760px, calc(100vw - 360px));
  padding: 38px 30px 54px;
}

.subscription-box {
  overflow: hidden;
  margin-bottom: 28px;
  border: 1px solid #c7dde1;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.subscription-box h2 {
  margin: 0;
  padding: 16px 20px;
  border-bottom: 1px solid #b8d7dc;
  background: #dff3f6;
  color: #16849a;
  font-size: 21px;
  font-weight: 850;
}

.subscription-status-note,
.subscription-box-actions,
.subscription-pricing-note {
  padding: 18px 20px;
  color: #3f474b;
  line-height: 1.5;
}

.subscription-box-actions {
  border-top: 1px solid #e5ecee;
  background: #fafafa;
}

.subscription-detail-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 18px;
  padding: 18px 20px;
  border-top: 1px solid #e5ecee;
  color: #3f474b;
}

.subscription-detail-row:nth-child(odd) {
  background: #f7f7f7;
}

.subscription-detail-row > strong {
  color: #16849a;
}

.online-booking-layout {
  display: grid;
  grid-template-columns: minmax(520px, 1fr) minmax(420px, 520px);
  gap: 34px;
  width: calc(100vw - 310px);
  padding: 34px 30px 48px;
}

.online-booking-form {
  width: 100%;
  padding: 0;
}

.online-booking-form .settings-section {
  margin-bottom: 26px;
}

.boxed-check {
  width: fit-content;
  max-width: 100%;
  padding: 10px 12px;
  border: 1px solid #c8d1d4;
  border-radius: 5px;
  background: #ffffff;
}

.radio-segment-group,
.notification-pair {
  display: inline-flex;
  overflow: hidden;
  margin: 0 0 18px;
  border: 1px solid #d5dddf;
  border-radius: 5px;
  background: #ffffff;
}

.radio-segment,
.notification-pair label {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 14px;
  border-right: 1px solid #e5ecee;
  color: #3f474b;
  cursor: pointer;
}

.radio-segment:last-child,
.notification-pair label:last-child {
  border-right: 0;
}

.radio-segment input,
.notification-pair input {
  width: 20px;
  height: 20px;
  accent-color: #278aa0;
}

.online-inline {
  margin: 8px 0 18px;
}

.logo-preview {
  width: min(620px, 100%);
  min-height: 330px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  margin: 0 0 12px;
  border: 16px solid #f4f4f4;
  background: #ffffff;
  color: #236b72;
  text-align: center;
}

.logo-preview .logo-mark {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: var(--accent);
  color: #ffffff;
  font-size: 28px;
  font-weight: 900;
}

.logo-preview strong {
  font-size: 30px;
  letter-spacing: 0;
}

.logo-preview span {
  color: #5b7379;
}

.file-input {
  width: min(360px, 100%);
  min-height: 42px;
  margin: 0 0 22px;
  border: 1px solid #c8d1d4;
  border-radius: 5px;
  background: #ffffff;
  padding: 8px 10px;
  font: inherit;
}

.switch-field {
  position: relative;
  display: inline-block;
  width: 70px;
  height: 38px;
  margin: 0 0 16px;
  cursor: pointer;
}

.switch-field input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
}

.switch-field span {
  position: relative;
  display: block;
  width: 70px;
  height: 38px;
  overflow: hidden;
  border: 1px solid #c8d1d4;
  border-radius: 5px;
  background: linear-gradient(90deg, #ffffff 0 35px, #e6e8e9 35px 70px);
  color: #3f474b;
  box-shadow: inset 0 1px 1px rgba(24, 40, 45, 0.06);
}

.switch-field span::after {
  content: "Off";
  position: absolute;
  top: 0;
  left: 0;
  width: 35px;
  height: 38px;
  display: grid;
  place-items: center;
  border-right: 1px solid #c8d1d4;
  background: #ffffff;
  font-weight: 650;
}

.switch-field input:checked + span {
  background: linear-gradient(90deg, #8fd4a9 0 35px, #ffffff 35px 70px);
}

.switch-field input:checked + span::after {
  content: "On";
  left: 35px;
  border-right: 0;
  border-left: 1px solid #c8d1d4;
}

.switch-field input:focus-visible + span {
  outline: 3px solid rgba(73, 189, 208, 0.3);
  outline-offset: 2px;
}

.online-notice-box {
  width: 100%;
  box-shadow: none;
}

.online-box-body {
  padding: 18px 20px;
  color: #3f474b;
  line-height: 1.5;
}

.online-booking-builder {
  align-self: start;
}

.builder-card {
  overflow: hidden;
  border: 1px solid #d8e1e3;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.builder-card h2 {
  margin: 0;
  padding: 16px 20px;
  border-bottom: 1px solid #b8d7dc;
  background: #f2f7f8;
  color: #3f474b;
  font-size: 21px;
  font-weight: 850;
}

.builder-card.active h2 {
  border-color: #a6dcb8;
  background: #dff4e6;
}

.builder-card.active h2::before {
  content: "✓ ";
  color: #45a66a;
}

.builder-body {
  display: grid;
  gap: 12px;
  padding: 18px 20px 22px;
  color: #3f474b;
  line-height: 1.45;
}

.builder-body h3 {
  margin: 0;
  font-size: 18px;
}

.builder-row-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.copy-box,
.embed-code {
  overflow: auto;
  border: 1px solid #edf1f2;
  border-radius: 5px;
  background: #f7f7f7;
  color: #3f474b;
}

.copy-box {
  padding: 14px 16px;
}

.embed-code {
  max-height: 230px;
  margin: 0;
  padding: 14px 16px;
  white-space: pre-wrap;
  font-family: Roboto, Arial, sans-serif;
  font-size: 13px;
  line-height: 1.45;
}

.cookie-policy {
  margin-top: 8px;
  padding: 14px 16px;
  border: 1px solid #d8e1e3;
  border-left: 8px solid #f1d46a;
  border-radius: 5px;
  background: #ffffff;
}

.cookie-policy h3 {
  margin: 0 0 8px;
  color: #3f474b;
}

.cookie-policy p {
  margin: 0;
}

.online-related {
  width: calc(100vw - 310px);
  margin: 0 30px 48px;
}

.billing-cycle {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 18px 20px 8px;
  color: #16849a;
}

.billing-cycle span {
  color: #16849a;
  font-weight: 800;
}

.billing-toggle {
  display: inline-flex;
  width: fit-content;
  overflow: hidden;
  border: 1px solid #c8d1d4;
  border-radius: 5px;
}

.billing-toggle button {
  min-height: 42px;
  border: 0;
  border-right: 1px solid #c8d1d4;
  background: #ffffff;
  color: #3f474b;
  padding: 0 14px;
  font: inherit;
  cursor: pointer;
}

.billing-toggle button:last-child {
  border-right: 0;
}

.billing-toggle .active {
  background: #278aa0;
  color: #ffffff;
  font-weight: 850;
}

.subscription-pricing-note {
  color: #4c5558;
}

.subscription-plan-list {
  display: grid;
  gap: 12px;
  padding: 0 20px 22px;
}

.subscription-plan-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px 132px;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: #f7f7f7;
}

.subscription-plan-row.current {
  border-color: #63ca87;
  background: #ffffff;
}

.subscription-plan-row strong {
  display: block;
  margin-bottom: 4px;
  color: #3f474b;
}

.subscription-plan-row span {
  color: #657074;
  line-height: 1.4;
}

.subscription-price {
  color: #3f474b;
  font-weight: 850;
  text-align: right;
}

.selected-plan {
  min-height: 42px;
  border: 1px solid #63ca87;
  border-radius: 999px;
  background: #ecfff2;
  color: #2d8f4f;
  font: inherit;
  font-weight: 850;
}

.subscription-currency {
  margin: -10px 0 28px;
  color: #777f82;
  font-style: italic;
  text-align: right;
}

.invoice-section {
  margin: 36px 0;
}

.invoice-section h2 {
  margin: 0 0 14px;
  color: #3f474b;
  font-size: 20px;
}

.invoice-table {
  width: 100%;
}

.pagination {
  display: flex;
  justify-content: center;
  margin: 18px 0 0;
}

.pagination button {
  min-width: 38px;
  min-height: 38px;
  border: 1px solid #c8d1d4;
  border-right: 0;
  background: #ffffff;
  color: #3f474b;
  font: inherit;
  cursor: pointer;
}

.pagination button:first-child {
  border-radius: 5px 0 0 5px;
}

.pagination button:last-child {
  border-right: 1px solid #c8d1d4;
  border-radius: 0 5px 5px 0;
}

.pagination button:disabled {
  color: #c0c7c9;
  cursor: default;
}

.pagination .active {
  color: #16849a;
  font-weight: 850;
}

.subscription-copy {
  max-width: 620px;
  color: #3f474b;
  line-height: 1.55;
}

.subscription-copy h2 {
  margin: 30px 0 10px;
  color: #33383a;
  font-size: 20px;
}

.subscription-related {
  margin-top: 38px;
}

.owner-badge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  margin-left: 6px;
  padding: 2px 8px;
  border: 1px solid #e5c66d;
  border-radius: 4px;
  background: #fff1bd;
  color: #7b5e11;
  font-size: 12px;
  font-weight: 850;
}

.settings-panel-box {
  margin: 20px 0;
  border: 1px solid #c7dde1;
  border-radius: 6px;
  background: #f8f8f8;
  overflow: hidden;
}

.settings-panel-box h3 {
  margin: 0;
  padding: 14px 20px;
  border-bottom: 1px solid #b8d7dc;
  background: #dff3f6;
  color: #16849a;
  font-size: 20px;
}

.settings-panel-box .ghost-btn {
  margin: 16px 20px;
}

.settings-callout {
  margin: 22px 0;
  padding: 16px 18px;
  border-left: 4px solid #e5edf0;
  border-radius: 5px;
  background: #ffffff;
  color: #4c5558;
  line-height: 1.45;
}

.business-card {
  overflow: hidden;
  border: 1px solid #c7dde1;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.business-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 58px;
  padding: 14px 20px;
  border-bottom: 1px solid #b8d7dc;
  background: #dff3f6;
}

.business-card h2 {
  margin: 0;
  color: #16849a;
  font-size: 21px;
  font-weight: 850;
}

.business-card header span {
  color: #267078;
  font-size: 13px;
  font-weight: 850;
}

.business-card-body {
  padding: 20px;
}

.business-card-body p {
  margin: 0;
  color: #444f53;
  line-height: 1.55;
}

.business-card footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid #eef2f3;
  background: #f8f8f8;
}

.settings-related {
  display: grid;
  grid-template-columns: minmax(260px, 0.4fr) minmax(260px, 0.4fr);
  gap: 48px;
  padding: 26px 30px 42px;
  border-top: 1px solid #d4dcde;
  background: #ffffff;
}

.settings-related h2 {
  margin: 0 0 10px;
  color: #16849a;
  font-family: Roboto, Arial, sans-serif;
  font-size: 27px;
  font-weight: 500;
}

.settings-related p,
.settings-related li {
  color: #4c5558;
  line-height: 1.45;
}

.settings-related ul {
  margin: 0;
  padding-left: 18px;
}

.settings-three-col {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(150px, 1fr) minmax(110px, 0.7fr);
  gap: 12px;
}

.new-business-form .settings-section {
  margin-bottom: 28px;
}

.settings-check-list {
  display: grid;
  gap: 2px;
}

.settings-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  gap: 28px;
  align-items: stretch;
}

.settings-card {
  min-height: 455px;
  background: var(--paper);
  border: 1px solid #c7dde1;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.settings-art {
  position: relative;
  height: 168px;
  background: linear-gradient(180deg, #e2f6f7, #d6eef2);
  border-bottom: 1px solid #b8d7dc;
  overflow: hidden;
}

.settings-art span {
  position: absolute;
  display: block;
  border-radius: 5px;
}

.settings-art.business span:nth-child(1) {
  width: 118px;
  height: 80px;
  left: calc(50% - 59px);
  bottom: 30px;
  background: #ffe08a;
  border: 2px solid #68aeca;
  box-shadow: inset 0 18px 0 #f5c954;
}

.settings-art.business span:nth-child(2) {
  width: 34px;
  height: 54px;
  left: calc(50% - 17px);
  top: 26px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: #ff907f;
  border: 2px solid #df6e79;
}

.settings-art.business span:nth-child(3) {
  width: 148px;
  height: 28px;
  left: calc(50% - 74px);
  bottom: 54px;
  background: repeating-linear-gradient(90deg, #8fd0e0 0 22px, transparent 22px 34px);
  border: 1px solid #4ba5bd;
}

.settings-art.appointments span:nth-child(1) {
  width: 178px;
  height: 104px;
  left: calc(50% - 70px);
  bottom: 28px;
  background: #ffffff;
  border: 2px solid #58b5cd;
  box-shadow: -33px 0 0 #10889a;
}

.settings-art.appointments span:nth-child(2) {
  width: 110px;
  height: 72px;
  right: calc(50% - 92px);
  bottom: 44px;
  background: repeating-linear-gradient(0deg, #ffd876 0 19px, #8dd8af 19px 38px, #ffa2b9 38px 57px);
  border: 1px solid #58b5cd;
}

.settings-art.appointments span:nth-child(3) {
  width: 58px;
  height: 58px;
  left: calc(50% - 132px);
  bottom: 24px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #8ecdd9;
}

.settings-art.people span:nth-child(1) {
  width: 88px;
  height: 118px;
  left: calc(50% - 98px);
  top: 18px;
  background: #ffffff;
  border: 3px solid #ff8c86;
  transform: rotate(-5deg);
}

.settings-art.people span:nth-child(2) {
  width: 92px;
  height: 124px;
  left: calc(50% + 8px);
  top: 22px;
  background: #ffffff;
  border: 2px solid #58b5cd;
  transform: rotate(8deg);
}

.settings-art.people span:nth-child(3) {
  width: 54px;
  height: 54px;
  left: calc(50% - 54px);
  top: 42px;
  border-radius: 50%;
  background: #ff9fbb;
  border: 2px solid #d96191;
}

.settings-art.finances span:nth-child(1) {
  width: 78px;
  height: 96px;
  left: calc(50% - 54px);
  top: 28px;
  background: #ffffff;
  border: 2px solid #62b4ca;
  transform: rotate(2deg);
}

.settings-art.finances span:nth-child(2) {
  width: 86px;
  height: 52px;
  left: calc(50% - 96px);
  bottom: 36px;
  background: #087f9a;
  border: 2px solid #05596f;
  transform: rotate(7deg);
}

.settings-art.finances span:nth-child(3) {
  width: 50px;
  height: 70px;
  left: calc(50% + 42px);
  bottom: 34px;
  background: #ff9f86;
  border: 2px solid #e57b72;
  transform: rotate(8deg);
}

.settings-art.communication span:nth-child(1) {
  width: 88px;
  height: 88px;
  left: calc(50% - 92px);
  top: 28px;
  border-radius: 50%;
  background: #ffb1c7;
  border: 2px solid #e06c96;
}

.settings-art.communication span:nth-child(2) {
  width: 76px;
  height: 76px;
  left: calc(50% + 42px);
  top: 50px;
  border-radius: 50%;
  background: #9bd9bc;
  border: 2px solid #4ca47e;
}

.settings-art.communication span:nth-child(3) {
  width: 62px;
  height: 96px;
  left: calc(50% - 10px);
  top: 42px;
  background: #ffffff;
  border: 2px solid #58b5cd;
  box-shadow: inset 0 -18px 0 #72d3e0;
}

.settings-art.templates span:nth-child(1) {
  width: 96px;
  height: 112px;
  left: calc(50% - 70px);
  top: 30px;
  background: #ffffff;
  border: 2px solid #58b5cd;
  box-shadow: inset 0 22px 0 #ffb1c7;
}

.settings-art.templates span:nth-child(2) {
  width: 76px;
  height: 96px;
  left: calc(50% + 12px);
  top: 42px;
  background: #ffffff;
  border: 2px solid #58b5cd;
  transform: rotate(5deg);
  box-shadow: inset 0 18px 0 #ffe08a;
}

.settings-art.templates span:nth-child(3) {
  width: 58px;
  height: 3px;
  left: calc(50% - 48px);
  top: 88px;
  background: #58b5cd;
  box-shadow: 0 17px 0 #58b5cd, 0 34px 0 #9bd9bc;
}

.settings-art.docs span:nth-child(1) {
  width: 88px;
  height: 104px;
  left: calc(50% - 72px);
  top: 46px;
  background: #ffffff;
  border: 2px solid #58b5cd;
  box-shadow: inset 0 22px 0 #ffe08a;
}

.settings-art.docs span:nth-child(2) {
  width: 70px;
  height: 86px;
  left: calc(50% + 18px);
  top: 28px;
  background: repeating-linear-gradient(0deg, #ffffff 0 11px, #f1fbfc 11px 22px);
  border: 2px solid #58b5cd;
  transform: rotate(3deg);
}

.settings-art.docs span:nth-child(3) {
  width: 66px;
  height: 3px;
  left: calc(50% - 44px);
  top: 94px;
  background: #58b5cd;
  box-shadow: 0 18px 0 #58b5cd, 0 36px 0 #ff9fbb;
}

.settings-card-body {
  padding: 18px 20px 22px;
}

.settings-card h2,
.settings-guide h2 {
  margin: 0 0 10px;
  color: #243a40;
  font-family: Roboto, Arial, sans-serif;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0;
}

.settings-inline {
  display: grid;
  grid-template-columns: 110px 1fr;
  align-items: center;
  gap: 10px;
  margin: 8px 0 10px;
  color: #225d67;
  font-weight: 800;
}

.settings-inline select {
  min-height: 36px;
  border: 1px solid #b8d0d6;
  border-radius: 5px;
  padding: 0 10px;
  background: #ffffff;
  color: #203840;
  font: inherit;
}

.settings-note {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.settings-links {
  margin: 0;
  padding-left: 18px;
  color: #3a4e55;
}

.settings-links li {
  margin: 8px 0;
  padding-left: 2px;
}

.settings-links .link {
  text-align: left;
}

.settings-guide {
  position: relative;
  min-height: 148px;
  margin-top: 30px;
  padding: 26px 210px 28px 30px;
  border-top: 1px solid #cddadd;
  background: linear-gradient(180deg, #ffffff, #f8fdfe);
  overflow: hidden;
}

.settings-guide p {
  max-width: 650px;
  margin: 0 0 8px;
  color: #4f6269;
  line-height: 1.45;
}

.guide-sign {
  position: absolute;
  right: 38px;
  bottom: 0;
  width: 120px;
  height: 136px;
}

.guide-sign::before {
  content: "";
  position: absolute;
  left: 55px;
  top: 10px;
  width: 8px;
  height: 130px;
  background: #ff9c7d;
  border-radius: 4px;
}

.guide-sign span {
  position: absolute;
  right: 0;
  width: 92px;
  height: 28px;
  border-radius: 4px;
  border: 2px solid #58b5cd;
  background: #bfeee4;
}

.guide-sign span:nth-child(1) {
  top: 16px;
  transform: rotate(-4deg);
}

.guide-sign span:nth-child(2) {
  top: 54px;
  right: 18px;
  background: #bfe2ff;
}

.guide-sign span:nth-child(3) {
  top: 92px;
  background: #ffe08a;
  border-color: #f2b45e;
  transform: rotate(2deg);
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 18px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 1fr));
  gap: 14px;
  padding: 16px;
}

.placeholder-page {
  display: grid;
  grid-template-columns: minmax(420px, 0.8fr) minmax(320px, 0.4fr);
  gap: 24px;
}

.expenses-page {
  display: block;
}

.expense-scope-tabs {
  display: inline-flex;
  gap: 6px;
  margin-bottom: 16px;
  padding: 5px;
  border: 1px solid #c6dde1;
  border-radius: 12px;
  background: #eaf6f7;
}

.expense-scope-tabs button {
  display: grid;
  gap: 2px;
  min-width: 180px;
  padding: 10px 16px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #35545b;
  text-align: left;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.expense-scope-tabs button span {
  color: #70858a;
  font-size: 11px;
  font-weight: 500;
}

.expense-scope-tabs button.active {
  background: #ffffff;
  color: #0e5966;
  box-shadow: 0 2px 8px rgba(31, 89, 98, 0.12);
}

.expense-scope-tabs button.active span {
  color: #4f7178;
}

.expenses-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.expense-workbook-panel {
  min-width: 0;
}

.expense-side-column {
  display: grid;
  gap: 22px;
  min-width: 0;
}

.expense-side-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.expense-side-header > div {
  display: grid;
  gap: 3px;
}

.expense-side-header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.expense-ai-heading {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 10px !important;
}

.expense-ai-heading-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.expense-ai-robot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 12px;
  background: linear-gradient(145deg, #d9f6f7, #f8ffff);
  box-shadow: inset 0 0 0 1px #a9dce1, 0 3px 8px rgba(35, 105, 116, 0.12);
}

.expense-ai-robot svg {
  width: 28px;
  height: 28px;
  fill: #ffffff;
  stroke: #137181;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.expense-ai-robot circle {
  fill: #df5f89;
  stroke: none;
}

.expense-ai-messages {
  display: grid;
  gap: 9px;
  max-height: 210px;
  overflow-y: auto;
  padding: 16px;
  background: #f8fcfc;
}

.expense-ai-message {
  max-width: 88%;
  padding: 10px 13px;
  border-radius: 14px;
  color: #294047;
  font-size: 12px;
  line-height: 1.45;
}

.expense-ai-message.assistant {
  justify-self: start;
  border: 1px solid #c7dfe3;
  background: #ffffff;
  border-bottom-left-radius: 5px;
}

.expense-ai-message.user {
  justify-self: end;
  background: #d9f3f5;
  border-bottom-right-radius: 5px;
}

.expense-ai-dropzone {
  display: grid;
  justify-items: center;
  gap: 7px;
  margin: 16px;
  padding: 24px 16px;
  border: 2px dashed #8bc6ce;
  border-radius: 12px;
  background: #f7fdfd;
  color: #31545b;
  text-align: center;
  transition: 0.15s ease;
}

.expense-ai-dropzone.dragging {
  border-color: #d74f79;
  background: #fff3f7;
}

.expense-ai-dropzone.busy {
  opacity: 0.7;
}

.expense-ai-dropzone span {
  color: var(--muted);
  font-size: 12px;
}

.expense-ai-instruction {
  display: grid;
  gap: 6px;
  padding: 0 16px 16px;
  color: #4c6268;
  font-size: 11px;
  font-weight: 800;
}

.expense-ai-instruction textarea {
  width: 100%;
  resize: vertical;
}

.expense-ai-send-row {
  display: flex;
  justify-content: flex-end;
  padding: 0 16px 16px;
}

.expense-receipt-list {
  display: grid;
  max-height: 330px;
  overflow-y: auto;
}

.expense-receipt-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
}

.expense-receipt-item:first-child {
  border-top: 0;
}

.expense-receipt-details {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.expense-receipt-item strong,
.expense-receipt-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.expense-receipt-item span {
  color: var(--muted);
  font-size: 11px;
}

.expense-receipt-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.expense-receipt-delete {
  min-height: 38px;
}

.expense-receipt-empty {
  padding: 28px 16px;
  color: var(--muted);
  text-align: center;
}

.user-expense-access {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.user-expense-access em {
  min-width: 54px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.expense-access-status {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.users-expense-access-note {
  margin-top: 16px;
}

.expense-workbook-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.expense-workbook-header > div {
  display: grid;
  gap: 3px;
}

.expense-workbook-actions {
  display: flex !important;
  grid-auto-flow: column;
  align-items: center;
  gap: 8px !important;
}

.expense-workbook-header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.expense-period-controls {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) repeat(2, minmax(135px, 0.6fr));
  gap: 12px;
  align-items: end;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #f8fcfc;
}

.expense-period-controls label {
  display: grid;
  gap: 5px;
  color: #4c6268;
  font-size: 11px;
  font-weight: 800;
}

.expense-period-controls select,
.expense-period-controls input {
  width: 100%;
  min-height: 38px;
  border: 1px solid #c7d5d8;
  border-radius: 5px;
  background: #ffffff;
  padding: 7px 9px;
  color: #263b41;
  font: inherit;
}

.expense-period-summary {
  display: grid;
  grid-column: 2 / -1;
  gap: 4px;
  min-height: 38px;
  align-content: center;
}

.expense-period-summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.expense-period-summary strong {
  color: #263b41;
  font-size: 13px;
}

.expense-sheet-wrap {
  overflow: auto;
}

.expense-sheet {
  width: 100%;
  min-width: 790px;
  border-collapse: collapse;
  font-size: 12px;
}

.expense-sheet th,
.expense-sheet td {
  height: 36px;
  padding: 7px 9px;
  border: 1px solid #cadcdf;
  text-align: left;
  vertical-align: middle;
}

.expense-sheet thead th {
  background: #fff200;
  color: #17333a;
  font-weight: 800;
}

.expense-sheet td:nth-child(3),
.expense-sheet td:nth-child(4),
.expense-sheet td:nth-child(5) {
  text-align: right;
  white-space: nowrap;
}

.expense-sheet input {
  width: 100%;
  min-width: 0;
  height: 30px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  padding: 4px 6px;
  color: #263b41;
  font: inherit;
}

.expense-sheet input:hover,
.expense-sheet input:focus {
  border-color: #82bec7;
  background: #ffffff;
  outline: 0;
  box-shadow: 0 0 0 2px rgba(67, 166, 179, 0.12);
}

.expense-sheet input[readonly] {
  color: #49636a;
  cursor: default;
}

.expense-sheet input[readonly]:hover,
.expense-sheet input[readonly]:focus {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.expense-sheet th:nth-child(1) {
  width: 23%;
}

.expense-sheet th:nth-child(2) {
  width: 16%;
}

.expense-sheet th:nth-child(3),
.expense-sheet th:nth-child(4),
.expense-sheet th:nth-child(5) {
  width: 12%;
}

.expense-sheet th:nth-child(6) {
  width: 21%;
}

.expense-sheet th:last-child,
.expense-sheet td:last-child {
  width: 38px;
  padding: 4px;
  text-align: center;
}

.expense-row-remove {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #b13c57;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.expense-row-remove:hover {
  background: #fff0f4;
}

.expense-sheet tbody tr:nth-child(even) {
  background: #fbfefe;
}

.expense-workbook-message {
  margin: 12px 16px 0;
}

.expense-total-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
  border-top: 1px solid var(--line);
  background: #f8fcfc;
}

.expense-total-summary > div {
  display: grid;
  gap: 5px;
  padding: 13px 15px;
  border: 1px solid #c9dfe2;
  border-radius: 6px;
  background: #ffffff;
}

.expense-total-summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.expense-total-summary strong {
  color: #17333a;
  font-size: 19px;
}

@media (max-width: 900px) {
  .expenses-workspace {
    grid-template-columns: 1fr;
  }

  .expense-period-controls {
    grid-template-columns: 1fr;
  }

  .expense-period-summary {
    grid-column: auto;
  }

  .expense-total-summary {
    grid-template-columns: 1fr;
  }

  .expense-workbook-header {
    align-items: flex-start;
  }

  .expense-workbook-actions {
    grid-auto-flow: row;
  }

  .expense-scope-tabs {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .expense-scope-tabs button {
    min-width: 0;
  }
}

.financial-list-page {
  grid-template-columns: minmax(0, 1fr);
}

.products-page {
  display: grid;
  gap: 16px;
  max-width: 1260px;
}

.products-panel .panel-header {
  min-height: 66px;
  padding: 14px 18px;
}

.products-panel .panel-header > div {
  display: grid;
  gap: 3px;
}

.products-panel .panel-header strong {
  color: var(--ink);
  font-size: 17px;
}

.products-panel .panel-header span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.products-panel .panel-header .product-count {
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--mint-100);
  color: #267078;
  font-size: 12px;
  font-weight: 800;
}

.products-table-wrap {
  overflow-x: auto;
}

.products-table {
  min-width: 800px;
  border: 0;
  border-radius: 0;
}

.products-table td {
  vertical-align: middle;
}

.products-table th:last-child,
.products-table td:last-child {
  width: 78px;
  text-align: right;
}

.products-table td:nth-child(1) {
  width: 22%;
}

.products-table td:nth-child(2) {
  width: 34%;
  color: var(--muted);
  line-height: 1.45;
}

.products-table td:nth-child(3) {
  white-space: nowrap;
}

.product-tax-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid #c9e1e4;
  border-radius: 6px;
  background: #f3fafb;
  color: #30717a;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.product-edit-btn {
  min-width: 58px;
}

.products-empty {
  display: grid;
  justify-items: center;
  gap: 7px;
  padding: 44px 20px;
  text-align: center;
}

.products-empty strong {
  color: var(--ink);
  font-size: 18px;
}

.products-empty span {
  margin-bottom: 8px;
}

.product-form-page {
  display: grid;
  gap: 18px;
  max-width: 900px;
}

.product-form-card {
  display: grid;
  gap: 22px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.product-form-intro {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.product-form-eyebrow {
  color: #00839a;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.product-form-intro h2 {
  margin: 5px 0 6px;
  font-size: 24px;
}

.product-form-intro p,
.product-tax-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.product-form-grid {
  display: grid;
  gap: 18px;
}

.product-form-grid > label {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 7px 18px;
  align-items: start;
}

.product-form-grid > label > span {
  padding-top: 10px;
  color: #087f96;
  font-weight: 850;
}

.product-form-grid > label > span b {
  color: var(--accent-dark);
}

.product-form-grid input,
.product-form-grid textarea {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #c7d7dc;
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
}

.product-form-grid textarea {
  resize: vertical;
}

.product-form-grid small {
  grid-column: 2;
  color: var(--muted);
  font-weight: 400;
}

.product-price-input {
  width: min(240px, 100%);
}

.product-price-input input {
  border: 0;
}

.product-tax-card {
  display: grid;
  grid-template-columns: minmax(190px, 0.7fr) minmax(300px, 1fr);
  gap: 24px;
  align-items: center;
  padding: 18px;
  border: 1px solid #d7e5e7;
  border-radius: 9px;
  background: #f8fbfb;
}

.product-tax-card > div {
  display: grid;
  gap: 5px;
}

.product-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border: 1px solid #c8dde0;
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
}

.product-checkbox input {
  width: 19px;
  height: 19px;
  margin: 1px 0 0;
  flex: 0 0 auto;
  accent-color: #0b8fa3;
}

.product-checkbox span {
  display: grid;
  gap: 4px;
}

.product-checkbox small {
  color: var(--muted);
  line-height: 1.4;
}

.product-form-actions {
  padding-top: 2px;
}

.auth-message.success {
  border-color: #8ed6ba;
  background: #e9f8f1;
  color: #176b50;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.reports-page,
.report-detail-page {
  display: grid;
  gap: 22px;
  max-width: 1460px;
}

.reports-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 4px 2px 2px;
}

.reports-eyebrow {
  color: #c63b6c;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.reports-intro h1,
.report-detail-header h1 {
  margin: 5px 0 6px;
  font-size: 26px;
  letter-spacing: 0;
}

.reports-intro p,
.report-detail-header p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.reports-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(300px, 1fr));
  gap: 18px;
}

.report-group {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.report-group-header,
.report-detail-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px;
  border-bottom: 1px solid var(--line);
  background: #f7fcfc;
}

.report-group-header h2 {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 19px;
}

.report-group-header p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.report-group-mark {
  width: 10px;
  height: 38px;
  flex: 0 0 10px;
  border-radius: 3px;
  background: #73c9d1;
}

.report-group-green .report-group-mark,
.report-detail-green .report-group-mark {
  background: #72c99b;
}

.report-group-violet .report-group-mark,
.report-detail-violet .report-group-mark {
  background: #9c8bd8;
}

.report-group-coral .report-group-mark,
.report-detail-coral .report-group-mark {
  background: #e58b91;
}

.report-link-list {
  display: grid;
}

.report-link {
  width: 100%;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 16px 12px 20px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.report-link:last-child {
  border-bottom: 0;
}

.report-link:hover,
.report-link:focus-visible {
  background: #eefafb;
}

.report-link span:first-child {
  display: grid;
  gap: 4px;
}

.report-link strong {
  color: #c93668;
  font-size: 15px;
}

.report-link small {
  color: var(--muted);
  font-size: 12px;
}

.report-link-arrow {
  color: #258994;
  font-size: 28px;
  line-height: 1;
}

.report-back-link {
  width: fit-content;
  padding: 0;
  border: 0;
  background: transparent;
  color: #c93668;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.report-detail-header {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
}

.report-detail-header > div > span {
  color: #27818a;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.report-filter-bar {
  display: flex;
  align-items: end;
  gap: 14px;
  flex-wrap: wrap;
  padding: 18px 20px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
}

.report-filter-bar label {
  min-width: 210px;
  display: grid;
  gap: 6px;
  color: #176c76;
  font-size: 13px;
  font-weight: 800;
}

.report-filter-bar select {
  min-height: 40px;
  border: 1px solid #bfd4d9;
  border-radius: 5px;
  background: #fff;
  padding: 8px 10px;
  color: var(--ink);
  font: inherit;
}

.payment-summary-filter input {
  min-height: 40px;
  border: 1px solid #bfd4d9;
  border-radius: 5px;
  background: #fff;
  padding: 8px 10px;
  color: var(--ink);
  font: inherit;
}

.payment-summary-period-summary {
  display: grid;
  gap: 4px;
  margin-left: auto;
  padding: 0 4px 3px;
  text-align: right;
}

.payment-summary-period-summary span {
  color: var(--muted);
  font-size: 12px;
}

.payment-summary-period-summary strong {
  color: #176c76;
  font-size: 17px;
}

.report-results-empty {
  min-height: 260px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 34px;
  border: 1px dashed #b8d4d8;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  text-align: center;
}

.report-empty-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #d9f4f6;
  color: #267d87;
  font-weight: 900;
}

.report-results-empty h2 {
  margin: 4px 0 0;
  font-size: 20px;
}

.report-results-empty p {
  margin: 0;
  color: var(--muted);
}

.practice-growth-page {
  max-width: none;
}

.practice-growth-toolbar {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
  padding: 16px 20px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
}

.practice-growth-toolbar label {
  display: grid;
  gap: 5px;
  color: #176c76;
  font-size: 12px;
  font-weight: 800;
}

.practice-growth-toolbar input {
  min-height: 40px;
  padding: 7px 10px;
  border: 1px solid #bfd4d9;
  border-radius: 5px;
  color: var(--ink);
  font: inherit;
}

.practice-growth-toolbar select {
  min-height: 40px;
  padding: 7px 34px 7px 10px;
  border: 1px solid #bfd4d9;
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.practice-growth-date-separator {
  padding-bottom: 11px;
  color: var(--muted);
}

.practice-growth-total {
  display: grid;
  gap: 2px;
  margin-left: auto;
  text-align: right;
}

.practice-growth-total span,
.practice-growth-panel-heading span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.practice-growth-total strong {
  color: #167f91;
  font-size: 25px;
}

.practice-growth-summary {
  margin: -4px 0 0;
  color: #4b5d62;
  font-size: 13px;
}

.practice-growth-panel {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.practice-growth-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px 10px;
}

.practice-growth-panel-heading h2 {
  margin: 3px 0 0;
  font-size: 18px;
}

.practice-growth-panel-heading > strong {
  color: #2a8cac;
  font-size: 13px;
}

.practice-growth-chart-scroll {
  overflow-x: auto;
  padding: 0 12px 4px;
}

.practice-growth-chart {
  width: 100%;
  min-width: 760px;
  height: auto;
  display: block;
}

.practice-growth-gridline {
  stroke: #dfe8eb;
  stroke-width: 1;
}

.practice-growth-bar rect {
  fill: url(#practice-growth-bar-fill);
  filter: drop-shadow(0 4px 5px rgba(111, 67, 139, 0.16));
  transition: filter 160ms ease, opacity 160ms ease;
}

.practice-growth-bar:hover rect {
  filter: drop-shadow(0 6px 8px rgba(111, 67, 139, 0.28));
  opacity: 0.86;
}

.practice-growth-bar-empty rect {
  fill: #dce7e9;
  filter: none;
}

.practice-growth-y-label,
.practice-growth-x-label {
  fill: #5f7075;
  font-size: 12px;
}

.practice-growth-y-label {
  text-anchor: end;
}

.practice-growth-x-label {
  text-anchor: middle;
}

.practice-growth-practitioners th:not(:first-child),
.practice-growth-practitioners td:not(:first-child) {
  text-align: right;
}

.practice-growth-no-data {
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.practice-financial-section {
  display: grid;
  gap: 18px;
  padding-top: 6px;
}

.practice-financial-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.practice-financial-title > div {
  display: grid;
  gap: 4px;
}

.practice-financial-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.practice-financial-title h2 {
  margin: 0;
  font-size: 21px;
}

.practice-financial-pies {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.practice-financial-pies .daily-payment-chart-heading {
  align-items: flex-start;
  flex-direction: column;
}

.practice-financial-pies .daily-payment-breakdown-tabs {
  width: 100%;
}

.practice-financial-pies .daily-payment-breakdown-tabs button {
  flex: 1;
  padding-inline: 10px;
}

.practice-financial-pies .transaction-summary {
  grid-template-columns: minmax(190px, 0.8fr) minmax(220px, 1.2fr);
  gap: 16px;
  padding: 24px 20px;
}

.practice-financial-pies .transaction-pie {
  width: min(230px, 62vw);
}

.practice-financial-pies .transaction-legend-row {
  grid-template-columns: 12px minmax(100px, 1fr) auto 52px;
  gap: 8px;
}

.practice-financial-comparison {
  margin-top: 2px;
}

.practice-financial-totals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 8px 20px 12px;
}

.practice-financial-totals > div {
  display: grid;
  gap: 5px;
  padding: 14px 16px;
  border: 1px solid #d9e5e7;
  border-radius: 7px;
  background: #f7fbfb;
}

.practice-financial-totals span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.practice-financial-totals strong {
  color: #176c76;
  font-size: 22px;
}

.practice-financial-totals > div:last-child {
  border-color: #b8ded2;
  background: #eefaf6;
}

.practice-financial-totals > div:last-child strong {
  color: #198262;
}

.practice-financial-totals > div.negative {
  border-color: #efc1ca;
  background: #fff4f6;
}

.practice-financial-totals > div.negative strong {
  color: #b43b62;
}

.practice-comparison-legend {
  display: flex;
  align-items: center;
  gap: 16px;
}

.practice-comparison-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.practice-comparison-legend i {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.practice-comparison-legend i.income,
.practice-comparison-bars rect.income {
  fill: #168b96;
  background: #168b96;
}

.practice-comparison-legend i.expenses,
.practice-comparison-bars rect.expenses {
  fill: #e45d8c;
  background: #e45d8c;
}

.practice-comparison-bars rect {
  filter: drop-shadow(0 3px 4px rgba(25, 68, 76, 0.12));
}

.daily-payment-toolbar {
  display: flex;
  align-items: end;
  gap: 10px;
  padding: 18px 20px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
}

.daily-payment-toolbar label {
  display: grid;
  gap: 6px;
  color: #176c76;
  font-size: 13px;
  font-weight: 800;
}

.daily-payment-toolbar input {
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #bfd4d9;
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.daily-payment-nav {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid #bfd4d9;
  border-radius: 5px;
  background: #eefafb;
  color: #176c76;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.daily-payment-nav:hover,
.daily-payment-nav:focus-visible {
  border-color: #258994;
  background: #dff5f7;
}

.daily-payment-date-label,
.daily-payment-total {
  display: grid;
  gap: 4px;
  padding: 0 10px 3px;
}

.daily-payment-date-label {
  flex: 1;
}

.daily-payment-date-label span,
.daily-payment-total span {
  color: var(--muted);
  font-size: 12px;
}

.daily-payment-total {
  min-width: 150px;
  text-align: right;
}

.daily-payment-total strong {
  color: #176c76;
  font-size: 24px;
}

.daily-payment-chart-panel {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
}

.daily-payment-chart-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px 0;
}

.daily-payment-chart-heading > div:first-child {
  display: grid;
  gap: 3px;
}

.daily-payment-chart-heading span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.daily-payment-chart-heading h2 {
  margin: 0;
  font-size: 19px;
}

.daily-payment-breakdown-tabs {
  display: flex;
  overflow: hidden;
  border: 1px solid #bfd4d9;
  border-radius: 6px;
}

.daily-payment-breakdown-tabs button {
  min-height: 38px;
  padding: 8px 14px;
  border: 0;
  border-right: 1px solid #bfd4d9;
  background: #fff;
  color: #176c76;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.daily-payment-breakdown-tabs button:last-child {
  border-right: 0;
}

.daily-payment-breakdown-tabs button:hover,
.daily-payment-breakdown-tabs button:focus-visible {
  background: #eefafb;
}

.daily-payment-breakdown-tabs button.active {
  background: #168b96;
  color: #fff;
}

.daily-payment-chart-panel .transaction-summary {
  border: 0;
}

.service-product-charts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 18px;
  background: var(--line);
  border-top: 1px solid var(--line);
}

.service-product-chart {
  min-width: 0;
  background: #fff;
}

.service-product-chart h3 {
  margin: 0;
  padding: 18px 24px 0;
  color: var(--ink);
  font-size: 16px;
}

.service-product-chart .transaction-summary {
  grid-template-columns: minmax(190px, 0.75fr) minmax(220px, 1.25fr);
  gap: 18px;
  padding: 22px 24px 28px;
}

.service-product-chart .transaction-pie {
  width: min(220px, 54vw);
}

.transaction-summary {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(320px, 1.2fr);
  gap: 24px;
  align-items: center;
  padding: 28px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
}

.transaction-pie-wrap {
  display: grid;
  place-items: center;
}

.transaction-pie {
  position: relative;
  width: min(280px, 70vw);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--payment-chart);
  box-shadow: inset 0 0 0 1px rgba(16, 46, 54, 0.08);
}

.transaction-pie::before {
  content: "";
  grid-area: 1 / 1;
  width: 58%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(16, 46, 54, 0.08);
}

.transaction-pie > div {
  z-index: 1;
  grid-area: 1 / 1;
  display: grid;
  gap: 4px;
  text-align: center;
}

.transaction-pie span {
  color: var(--muted);
  font-size: 13px;
}

.transaction-pie strong {
  font-size: 25px;
  color: var(--ink);
}

.transaction-pie .transaction-pie-percentage {
  position: absolute;
  z-index: 2;
  translate: -50% -50%;
  color: #fff;
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
  text-shadow:
    0 1px 2px rgba(17, 48, 56, 0.9),
    0 0 4px rgba(17, 48, 56, 0.55);
  white-space: nowrap;
  pointer-events: none;
}

.transaction-pie .transaction-pie-percentage-small {
  font-size: 10px;
}

.transaction-legend {
  display: grid;
  gap: 2px;
}

.transaction-legend-row {
  display: grid;
  grid-template-columns: 12px minmax(100px, 1fr) auto 58px;
  gap: 12px;
  align-items: center;
  padding: 12px 8px;
  border-bottom: 1px solid var(--line);
}

.transaction-legend-row:last-child {
  border-bottom: 0;
}

.transaction-legend-colour {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.transaction-legend-row small {
  color: var(--muted);
  text-align: right;
}

.transaction-summary-compact-legend .transaction-legend {
  width: min(100%, 560px);
  justify-self: start;
}

.transaction-summary-compact-legend .transaction-legend-row {
  grid-template-columns: 12px minmax(150px, auto) auto 58px;
}

.transaction-records {
  overflow: hidden;
}

.transaction-records .panel-header strong {
  color: var(--muted);
  font-size: 13px;
}

.transaction-records td small {
  color: #b43b62;
  font-weight: 750;
}

@media (max-width: 1180px) {
  .service-product-charts {
    grid-template-columns: 1fr;
  }

  .practice-financial-pies {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .payment-summary-period-summary {
    width: 100%;
    margin-left: 0;
    text-align: left;
  }

  .practice-growth-total {
    width: 100%;
    margin-left: 0;
    padding-top: 8px;
    text-align: left;
  }

  .practice-growth-panel-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .practice-financial-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .practice-financial-pies .transaction-summary {
    grid-template-columns: 1fr;
  }

  .practice-financial-totals {
    grid-template-columns: 1fr;
  }

  .daily-payment-toolbar {
    align-items: end;
    flex-wrap: wrap;
  }

  .daily-payment-chart-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .service-product-chart .transaction-summary {
    grid-template-columns: 1fr;
  }

  .daily-payment-breakdown-tabs {
    width: 100%;
  }

  .daily-payment-breakdown-tabs button {
    flex: 1;
    padding-inline: 8px;
  }

  .daily-payment-date-label {
    flex-basis: calc(100% - 50px);
    order: 4;
    padding-left: 0;
  }

  .daily-payment-total {
    order: 5;
    margin-left: auto;
  }

  .transaction-summary {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .transaction-records {
    overflow-x: auto;
  }
}

.invoice-editor {
  padding: 0 28px 28px;
  background: #fff;
}

.invoice-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  gap: 30px;
  max-width: 1120px;
  margin-top: 26px;
}

.invoice-field-stack {
  display: grid;
  gap: 14px;
}

.invoice-editor label {
  display: grid;
  gap: 6px;
  color: #007f9c;
  font-size: 14px;
  font-weight: 800;
}

.invoice-editor input,
.invoice-editor select,
.invoice-editor textarea {
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  font-weight: 400;
}

.invoice-editor textarea {
  resize: vertical;
}

.invoice-editor input:focus,
.invoice-editor select:focus,
.invoice-editor textarea:focus {
  outline: 0;
  border-color: #14aeda;
  box-shadow: 0 0 0 2px rgba(20, 174, 218, 0.16);
}

.invoice-patient-search {
  position: relative;
}

.invoice-items-panel {
  max-width: 1120px;
  margin-top: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  overflow: visible;
  background: #fff;
}

.invoice-items-panel .panel-header {
  border-radius: 0;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
}

.invoice-item-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(220px, 1.8fr) 100px 110px 170px 76px 94px 40px;
  gap: 14px;
  align-items: end;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.invoice-source-search {
  position: relative;
}

.invoice-source-results {
  position: absolute;
  z-index: 20;
  top: calc(100% + 3px);
  left: 0;
  right: 0;
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid #159dbe;
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(19, 56, 65, 0.14);
}

.invoice-source-results button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.invoice-source-results button:last-child {
  border-bottom: 0;
}

.invoice-source-results button:hover,
.invoice-source-results button:focus-visible {
  background: #f8edf3;
  color: #b94069;
}

.invoice-source-results button span {
  color: #52666b;
  font-weight: 700;
  white-space: nowrap;
}

.money-input,
.discount-input {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: #fff;
}

.discount-input {
  grid-template-columns: minmax(0, 1fr) auto;
}

.money-input span,
.discount-input span {
  padding: 0 10px;
  color: var(--muted);
}

.money-input input,
.discount-input input {
  border: 0;
  min-height: 34px;
  padding: 7px 8px;
}

.invoice-static-field {
  display: grid;
  gap: 10px;
  min-height: 58px;
  color: var(--ink);
  font-size: 14px;
}

.invoice-static-field strong {
  color: #007f9c;
  font-size: 14px;
}

.invoice-delete-line {
  align-self: end;
  width: 34px;
  min-width: 34px;
  height: 36px;
}

.invoice-item-actions {
  display: flex;
  padding: 16px;
  background: #f7f7f7;
}

.invoice-item-actions .ghost-btn {
  border-radius: 0;
}

.invoice-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 600px) 340px;
  gap: 80px;
  max-width: 1120px;
  margin-top: 18px;
  align-items: start;
}

.invoice-summary {
  display: grid;
  gap: 14px;
  margin-top: 4px;
  color: var(--ink);
}

.invoice-summary div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
}

.invoice-summary strong {
  color: #007f9c;
}

.invoice-summary .invoice-total {
  margin-top: 4px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 18px;
}

.invoice-summary .invoice-total strong {
  color: var(--ink);
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(170px, 1fr));
  align-items: start;
  gap: 12px;
  margin-bottom: 20px;
}

.metric {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 2px 16px;
  min-height: 72px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(123, 180, 186, 0.42);
  border-radius: 8px;
  padding: 14px 16px;
  color: #395a60;
}

.metric span,
.metric small {
  display: block;
  grid-column: 1;
}

.metric span {
  font-weight: 800;
}

.metric small {
  color: var(--muted);
  font-size: 13px;
}

.metric strong {
  grid-column: 2;
  grid-row: 1 / span 2;
  font-size: 31px;
  color: #102e36;
  letter-spacing: 0;
}

.dashboard-invoice-metric {
  align-self: start;
}

.dashboard-unpaid-list {
  grid-column: 1 / -1;
  margin: 12px -16px -14px;
  border-top: 1px solid var(--line);
}

.dashboard-unpaid-row {
  display: grid;
  grid-template-columns: minmax(80px, auto) minmax(120px, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.dashboard-unpaid-row:last-child {
  border-bottom: 0;
}

.dashboard-invoice-link {
  font-weight: 800;
  text-align: left;
}

.dashboard-unpaid-row time {
  color: var(--muted);
  white-space: nowrap;
}

@media (max-width: 640px) {
  .dashboard-unpaid-row {
    grid-template-columns: auto 1fr;
  }

  .dashboard-unpaid-row time {
    grid-column: 1 / -1;
    white-space: normal;
  }
}

@media (max-width: 1040px) {
  .app-shell {
    grid-template-columns: 76px 1fr;
  }

  .sidebar .brand span:not(.brand-mark),
  .nav-label,
  .profile-name span,
  .profile-link span {
    display: none;
  }

  .sidebar-top {
    padding-inline: 18px;
  }

  .nav-item {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 0;
  }

  .dashboard-grid,
  .placeholder-page {
    grid-template-columns: 1fr;
  }

  .calendar-layout {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .calendar-sidebar {
    min-height: 0;
    border-right: 1px solid var(--line-strong);
    border-bottom: 0;
  }

  .settings-grid,
  .reports-grid,
  .settings-card-grid,
  .invoice-form-grid,
  .invoice-bottom-grid,
  .metric-row {
    grid-template-columns: 1fr;
  }

  .invoice-item-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .invoice-delete-line {
    width: 100%;
  }

  .settings-page {
    background: #ffffff;
  }

  .general-settings-form {
    width: 100%;
  }

  .business-settings-list {
    width: 100%;
  }

  .appointment-types-list,
  .settings-table-list,
  .appointment-types-related,
  .appointment-type-form,
  .appointment-message-groups {
    width: 100%;
  }

  .payment-type-message,
  .payment-type-editor {
    width: auto;
  }

  .users-settings-list {
    width: 100%;
  }

  .subscription-content {
    width: 100%;
  }

  .online-booking-layout,
  .online-related {
    width: 100%;
  }

  .online-booking-layout {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .subscription-plan-row {
    grid-template-columns: 1fr;
  }

  .subscription-price {
    text-align: left;
  }

  .settings-guide {
    padding-right: 30px;
  }

  .guide-sign {
    display: none;
  }
}

@media (max-width: 720px) {
  body {
    overflow-x: hidden;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    position: static;
    height: auto;
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid rgba(49, 142, 151, 0.28);
  }

  .sidebar-top {
    min-height: 68px;
    padding: 12px 16px;
  }

  .sidebar .brand span:not(.brand-mark) {
    display: inline;
  }

  .nav {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 8px 10px 12px;
    scrollbar-width: thin;
  }

  .nav-item {
    flex: 0 0 auto;
    width: auto;
    min-width: 72px;
    min-height: 44px;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 3px;
    padding: 6px 10px;
    border-radius: 8px;
  }

  .nav-label {
    display: block;
    font-size: 11px;
    line-height: 1.1;
    white-space: nowrap;
  }

  .nav-icon {
    width: 19px;
    height: 19px;
    font-size: 11px;
  }

  .sidebar-spacer {
    display: none;
  }

  .profile-box {
    display: none;
  }

  .content {
    padding: 18px;
  }

  .payment-type-message,
  .payment-type-editor {
    margin: 18px;
  }

  .payment-type-editor {
    padding: 20px;
  }

  .payment-type-fields label {
    grid-template-columns: 1fr;
  }

  .payment-type-fields label > span {
    padding-top: 0;
  }

  .payment-type-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .payment-type-delete {
    grid-column: 1 / -1;
    margin-left: 0;
  }

  .product-form-card {
    padding: 20px;
  }

  .product-form-grid > label,
  .product-tax-card {
    grid-template-columns: 1fr;
  }

  .product-form-grid > label > span {
    padding-top: 0;
  }

  .product-form-grid small {
    grid-column: 1;
  }

  .appointment-message-groups {
    gap: 18px;
    padding: 20px 16px 36px;
  }

  .communication-template-group-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .communication-template-actions {
    flex-wrap: wrap;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    height: auto;
    min-height: 66px;
    align-items: flex-start;
    flex-direction: column;
    padding: 16px 18px;
    gap: 12px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
  }

  .page-title {
    font-size: 26px;
  }

  .top-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 44px 44px;
    gap: 8px;
  }

  .top-actions .ghost-btn,
  .top-actions .icon-btn,
  .top-actions select {
    width: 100%;
    min-height: 42px;
  }

  .top-actions [data-calendar-days],
  .top-actions [data-adjust-schedule] {
    grid-column: span 3;
  }

  .calendar-layout {
    display: block;
    height: auto;
    max-height: none;
    overflow: visible;
    border-top: 0;
  }

  .calendar-sidebar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    height: auto;
    min-height: 0;
    overflow: visible;
    padding: 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line-strong);
  }

  .mini-month,
  .tool-section {
    margin: 0;
    padding: 13px;
    border: 1px solid #c7dde1;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.62);
    box-shadow: var(--shadow-soft);
  }

  .mini-grid {
    gap: 4px;
  }

  .mini-date {
    min-height: 32px;
  }

  .practitioner-row {
    min-height: 46px;
  }

  .pill-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .pill {
    width: 100%;
    min-height: 42px;
  }

  .clinic-switcher {
    margin-top: 0;
  }

  .clinic-switcher select {
    min-height: 44px;
  }

  .patient-form-page {
    max-width: none;
  }

  .patient-form-card {
    padding: 18px;
  }

  .settings-form-grid > label {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .patient-form-actions {
    padding-left: 0;
  }

  .calendar-board {
    height: auto;
    min-height: 68vh;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    border-top: 1px solid var(--line);
  }

  .week-grid {
    grid-template-rows: 40px 28px repeat(22, 36px);
  }

  .day-head,
  .practitioner-head,
  .corner {
    position: sticky;
  }

  .time-cell {
    position: sticky;
    left: 0;
    z-index: 4;
    background: #fbfbfb;
  }

  .appointment,
  .unavailable-block {
    font-size: 11px;
    padding: 5px 6px;
  }

  .appointment strong,
  .unavailable-block strong {
    font-size: 11px;
  }

  .metric-row,
  .dashboard-grid,
  .placeholder-page,
  .invoice-form-grid,
  .invoice-bottom-grid,
  .settings-card-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .invoice-editor {
    padding: 0 14px 22px;
  }

  .invoice-item-row {
    grid-template-columns: 1fr;
  }

  .metric {
    min-height: 92px;
  }

  .panel {
    border-radius: 8px;
  }

  .settings-card {
    min-height: auto;
  }

  .settings-breadcrumb,
  .general-settings-form {
    padding-inline: 18px;
  }

  .settings-two-col {
    grid-template-columns: 1fr;
  }

  .settings-three-col,
  .settings-related {
    grid-template-columns: 1fr;
  }

  .settings-art {
    height: 126px;
  }

  .settings-guide {
    margin-top: 18px;
    padding: 22px 18px;
  }

  .patient-detail-title,
  .patient-detail-main {
    gap: 18px;
  }

  .patient-detail-main {
    grid-template-columns: 1fr;
  }

  .patient-notes-main {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 22px;
  }

  .appointment-detail-body {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 22px;
  }

  .appointment-detail-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .appointment-detail-actions .archive-action {
    margin-left: 0;
  }

  .modal-backdrop {
    align-items: start;
    padding: 12px;
    place-items: start center;
  }

  .modal-panel,
  .schedule-modal,
  .appointment-detail-modal {
    width: min(100%, 560px);
    max-height: calc(100vh - 24px);
    overflow-y: auto;
  }

  .modal-header {
    padding: 20px 22px;
  }

  .availability-form,
  .schedule-body {
    padding-inline: 22px;
  }

  .availability-form label,
  .schedule-row,
  .show-slots-box,
  .schedule-practitioner {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .schedule-times,
  .show-slot-controls,
  .time-range {
    grid-template-columns: 1fr auto 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .people-page {
    overflow-x: auto;
  }

  .people-table {
    min-width: 720px;
  }

  .patient-detail-title {
    display: grid;
    padding: 16px;
  }

  .detail-actions {
    justify-content: start;
  }

  .patient-detail-layout {
    grid-template-columns: 1fr;
  }

  .patient-tabs {
    display: flex;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 10px 12px;
  }

  .patient-tabs button {
    white-space: nowrap;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: white;
  }

  .patient-detail-main {
    padding: 16px;
  }

  .patient-notes-main {
    padding: 16px;
  }

  .treatment-note-template-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .detail-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}
