:root {
  --teal-950: #073b43;
  --teal-900: #0a4f5a;
  --teal-800: #0b5f6b;
  --teal-700: #0d6e7b;
  --teal-600: #11808e;
  --teal-100: #d5ecef;
  --teal-50: #edf7f8;
  --bg: #f3f5f7;
  --surface: #ffffff;
  --line: #dde3e8;
  --line-strong: #c7d0d7;
  --text: #1d2730;
  --text-2: #46535e;
  --muted: #66737e;
  --info: #1c5b9b;
  --info-bg: #eaf2fb;
  --info-line: #bcd4ee;
  --warn: #7a4d00;
  --warn-bg: #fff5df;
  --warn-line: #f0d491;
  --error: #a3251a;
  --error-bg: #fdeeec;
  --error-line: #f1bdb6;
  --success: #1c6e3f;
  --success-bg: #e7f5ec;
  --badge: #c4372c;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 32, 48, 0.06), 0 1px 3px rgba(16, 32, 48, 0.05);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  font-size: 15px;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.45;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

a {
  color: var(--teal-700);
}

a:hover {
  color: var(--teal-900);
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.25;
}

p {
  margin: 0 0 12px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
}

.skip-link:focus {
  left: 12px;
  top: 8px;
  z-index: 100;
  background: #fff;
  padding: 8px 12px;
  border-radius: 6px;
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
}

.icon.sm {
  width: 16px;
  height: 16px;
}

.icon.xs {
  width: 14px;
  height: 14px;
}

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

.small {
  font-size: 13px;
}

.block {
  display: block;
}

.nowrap {
  white-space: nowrap;
}

.center {
  text-align: center;
  justify-content: center;
}

.right {
  text-align: right;
}

/* --- top bar --------------------------------------------------------------- */

.topbar {
  background: linear-gradient(90deg, var(--teal-950), var(--teal-900) 55%, var(--teal-800));
  color: #fff;
  height: 60px;
  flex: none;
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.15);
}

.topbar-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
}

.brand:hover {
  color: #fff;
}

.logo {
  width: 34px;
  height: 34px;
}

.brand-name {
  font-size: 18px;
  font-weight: 650;
  letter-spacing: 0.1px;
}

.brand-sep {
  width: 1px;
  height: 26px;
  background: rgba(255, 255, 255, 0.35);
  margin: 0 4px;
}

.brand-mychart {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.brand-mychart .my {
  font-weight: 400;
  color: #bfe6ea;
}

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

.topbar-link {
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 14px;
}

.topbar-link:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
}

.icon-btn:hover {
  background: var(--teal-50);
  color: var(--teal-800);
}

.icon-btn.on-dark {
  color: #fff;
}

.icon-btn.on-dark:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.badge-dot {
  position: absolute;
  top: 3px;
  right: 2px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--badge);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
  border: 1.5px solid var(--teal-900);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
  padding-left: 14px;
  border-left: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 14px;
  font-weight: 550;
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--teal-100);
  color: var(--teal-900);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex: none;
}

.avatar.sm {
  width: 30px;
  height: 30px;
  font-size: 12px;
  background: #f2b84b;
  color: #3b2a05;
}

.avatar.lg {
  width: 48px;
  height: 48px;
  font-size: 16px;
}

.muted-avatar {
  background: #eef1f4;
  color: var(--muted);
}

.inline-form {
  display: inline;
  margin: 0;
}

.logout-btn {
  margin-left: 6px;
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 6px;
  padding: 6px 12px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.logout-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* --- shell ------------------------------------------------------------------- */

.shell {
  flex: 1;
  display: flex;
  align-items: stretch;
}

.sidenav {
  width: 236px;
  flex: none;
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: sticky;
  top: 76px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text-2);
  text-decoration: none;
  font-weight: 520;
  font-size: 14.5px;
  border-left: 3px solid transparent;
}

.nav-item:hover {
  background: var(--teal-50);
  color: var(--teal-900);
}

.nav-item.active {
  background: var(--teal-50);
  color: var(--teal-900);
  border-left-color: var(--teal-700);
  font-weight: 650;
}

.nav-item .icon {
  color: var(--teal-700);
}

.nav-badge {
  margin-left: auto;
  background: var(--badge);
  color: #fff;
  border-radius: 10px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 1px 7px;
}

.nav-help {
  margin: 24px 4px 0;
  padding: 12px;
  border-radius: 8px;
  background: var(--bg);
  font-size: 12.5px;
  color: var(--muted);
}

.nav-help-title {
  color: var(--text-2);
  font-weight: 600;
  margin-bottom: 2px;
}

.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.content {
  width: 100%;
  max-width: 940px;
  margin: 0 auto;
  padding: 26px 32px 40px;
  flex: 1;
}

.content.public {
  max-width: 1040px;
  padding-top: 40px;
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.page-title {
  font-size: 26px;
  font-weight: 650;
  color: var(--text);
  margin-bottom: 16px;
}

.page-head .page-title {
  margin-bottom: 0;
}

.text-link {
  color: var(--teal-700);
  font-weight: 560;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

/* --- cards and buttons ---------------------------------------------------------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 22px;
  margin-bottom: 16px;
}

.card.flush {
  padding: 0;
  overflow: hidden;
}

.card-title {
  font-size: 18px;
  font-weight: 650;
  margin-bottom: 8px;
}

.card-title.spaced {
  margin-top: 22px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 20px;
  border-radius: 8px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background: var(--teal-700);
  color: #fff;
}

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

.btn-secondary {
  background: #fff;
  color: var(--teal-800);
  border-color: var(--line-strong);
}

.btn-secondary:hover {
  background: var(--teal-50);
  color: var(--teal-900);
  border-color: var(--teal-600);
}

.btn-link {
  background: transparent;
  color: var(--teal-700);
}

.btn-light {
  background: #fff;
  color: var(--teal-900);
}

.btn-outline-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.6);
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  min-height: 34px;
  padding: 5px 14px;
  font-size: 14px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.form-actions.left {
  justify-content: flex-start;
  border-top: 0;
  padding-top: 0;
}

.form-actions.center {
  justify-content: center;
  border-top: 0;
}

/* --- alerts ------------------------------------------------------------------------ */

.alert {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid;
  margin-bottom: 16px;
  font-size: 14.5px;
}

.alert-icon {
  width: 20px;
  height: 20px;
  flex: none;
  margin-top: 1px;
}

.alert-text {
  flex: 1;
}

.alert-info {
  background: var(--info-bg);
  border-color: var(--info-line);
  color: var(--info);
}

.alert-warning {
  background: var(--warn-bg);
  border-color: var(--warn-line);
  color: var(--warn);
}

.alert-error {
  background: var(--error-bg);
  border-color: var(--error-line);
  color: var(--error);
}

.alert-success {
  background: var(--success-bg);
  border-color: #b6dfc5;
  color: var(--success);
}

.alert a {
  color: inherit;
  font-weight: 600;
}

.offscreen-note {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* --- forms ----------------------------------------------------------------------------- */

.field-label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin: 14px 0 6px;
  color: var(--text-2);
}

.text-input,
.select-input {
  width: 100%;
  font: inherit;
  font-size: 15.5px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}

.text-input:focus,
.select-input:focus {
  outline: 2px solid rgba(17, 128, 142, 0.35);
  border-color: var(--teal-600);
}

textarea.text-input {
  resize: vertical;
  min-height: 60px;
}

.select-input {
  max-width: 420px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2346535e' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  padding-right: 40px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 0;
  font-size: 14.5px;
  color: var(--text-2);
}

.check-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--teal-700);
}

.check-row.policy {
  font-weight: 560;
  color: var(--text);
}

.req {
  color: var(--error);
}

/* --- sign-in ---------------------------------------------------------------------------------- */

body.signed-out {
  background: linear-gradient(180deg, #e3f1f3 0, var(--bg) 420px);
}

.auth-page {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 48px;
  align-items: start;
}

.auth-card {
  padding: 30px 32px;
  margin: 0;
}

.auth-title {
  font-size: 24px;
  font-weight: 650;
  margin-bottom: 4px;
}

.auth-sub {
  color: var(--muted);
  margin-bottom: 14px;
}

.auth-form .btn {
  margin-top: 18px;
}

.auth-links {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  font-size: 14px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  margin: 22px 0 12px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.auth-alt {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.signing-as {
  color: var(--text-2);
  margin: 6px 0 16px;
}

.signing-as a {
  margin-left: 6px;
  font-size: 14px;
}

.password-field {
  position: relative;
}

.password-field .text-input {
  padding-right: 48px;
}

.pw-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
}

.code-input {
  font-size: 22px;
  letter-spacing: 6px;
  max-width: 220px;
}

.auth-fine {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--muted);
}

.auth-badge {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--teal-50);
  color: var(--teal-700);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.auth-badge .icon {
  width: 26px;
  height: 26px;
}

.auth-badge.danger {
  background: var(--error-bg);
  color: var(--error);
}

.auth-aside {
  padding-top: 8px;
}

.aside-title {
  font-size: 26px;
  font-weight: 650;
  color: var(--teal-950);
  margin-bottom: 22px;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 24px;
}

.feature {
  display: flex;
  gap: 14px;
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal-700);
  flex: none;
}

.feature-title {
  display: block;
  font-weight: 650;
  margin-bottom: 2px;
}

.feature-text {
  display: block;
  color: var(--muted);
  font-size: 14px;
}

.aside-apps {
  margin-top: 28px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  color: var(--text-2);
  font-size: 14px;
}

/* --- home ---------------------------------------------------------------------------------- */

.shortcuts {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.shortcut {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 8px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  cursor: pointer;
  font-weight: 560;
  font-size: 14px;
  color: var(--text-2);
}

.shortcut:hover {
  border-color: var(--teal-600);
  color: var(--teal-900);
}

.shortcut-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--teal-50);
  color: var(--teal-700);
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.home-grid .card {
  margin-bottom: 0;
}

.tile-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.tile-card p {
  color: var(--text-2);
  flex: 1;
}

.tile-card.accent {
  border-top: 4px solid var(--teal-700);
}

.tile-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  width: 100%;
}

.tile-head h2 {
  font-size: 17px;
  font-weight: 650;
}

.tile-icon {
  color: var(--teal-700);
  display: flex;
}

.pill-badge {
  margin-left: auto;
  background: #fde8e6;
  color: var(--badge);
  font-size: 12px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 10px;
}

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

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

.todo-title {
  font-weight: 600;
}

.visit-list {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  width: 100%;
}

.visit-row {
  display: flex;
  gap: 12px;
  padding: 8px 0;
}

.date-chip {
  width: 46px;
  flex: none;
  border-radius: 8px;
  border: 1px solid var(--line);
  overflow: hidden;
  text-align: center;
  background: #fff;
}

.date-chip-month {
  display: block;
  background: var(--teal-700);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 1px 0;
}

.date-chip-day {
  display: block;
  font-size: 18px;
  font-weight: 700;
  padding: 2px 0;
}

.date-chip.lg {
  width: 60px;
}

.date-chip.lg .date-chip-day {
  font-size: 24px;
}

.visit-title {
  font-weight: 650;
}

/* --- visits, messages, results, billing ------------------------------------------------------- */

.visit-cards,
.past-list,
.message-list,
.result-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.visit-card {
  display: flex;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.visit-card:first-child {
  border-top: 0;
}

.visit-card .visit-info {
  flex: 1;
}

.visit-actions {
  display: flex;
  gap: 4px;
}

.past-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.past-row:first-child {
  border-top: 0;
}

.empty-state {
  padding: 8px 0;
}

.tabs {
  display: flex;
  gap: 4px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
}

.tab {
  padding: 12px 14px;
  color: var(--muted);
  font-weight: 560;
  border-bottom: 3px solid transparent;
}

.tab.active {
  color: var(--teal-900);
  border-bottom-color: var(--teal-700);
}

.message-row,
.result-row {
  border-bottom: 1px solid var(--line);
}

.message-row summary,
.result-row summary {
  list-style: none;
  display: grid;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  cursor: pointer;
}

.message-row summary::-webkit-details-marker,
.result-row summary::-webkit-details-marker {
  display: none;
}

.message-row summary {
  grid-template-columns: 10px 220px 1fr auto;
}

.message-row summary:hover,
.result-row summary:hover {
  background: #fafbfc;
}

.unread-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.message-row.unread .unread-dot {
  background: var(--teal-600);
}

.message-row.unread .msg-from,
.message-row.unread .msg-subject {
  font-weight: 700;
}

.msg-from {
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.msg-subject {
  color: var(--text-2);
}

.msg-date {
  color: var(--muted);
  font-size: 13px;
}

.msg-body {
  padding: 0 18px 16px 58px;
  color: var(--text-2);
}

.list-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px 8px 18px;
  border-bottom: 1px solid var(--line);
}

.result-row summary {
  grid-template-columns: 1fr auto 260px;
}

.result-name {
  font-weight: 650;
}

.status-pill {
  font-size: 12px;
  font-weight: 700;
  border-radius: 10px;
  padding: 2px 10px;
}

.status-pill.ok {
  background: var(--success-bg);
  color: var(--success);
}

.status-pill.warn {
  background: var(--warn-bg);
  color: var(--warn);
}

.result-table,
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.result-table {
  margin: 0 18px 16px;
  width: calc(100% - 36px);
}

.result-table th,
.result-table td,
.data-table th,
.data-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}

.result-table th,
.data-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
  background: #fafbfc;
}

.data-table .num {
  text-align: right;
}

.flag {
  color: var(--error);
  font-weight: 700;
  font-size: 12px;
}

.billing-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 16px;
}

.amount-card .amount {
  font-size: 36px;
  font-weight: 700;
  margin: 4px 0;
}

.amount-card .btn {
  margin: 14px 0 8px;
}

.kv {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 8px 12px;
  margin: 8px 0 0;
}

.kv dt {
  color: var(--muted);
}

.kv dd {
  margin: 0;
  font-weight: 560;
}

/* --- scheduling wizard -------------------------------------------------------------------------- */

.steps {
  list-style: none;
  display: flex;
  margin: 0 0 18px;
  padding: 0;
  counter-reset: none;
}

.steps li {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--muted);
  position: relative;
  padding-right: 10px;
}

.steps li:not(:last-child)::after {
  content: "";
  flex: 1;
  height: 2px;
  background: var(--line);
  margin-left: 4px;
}

.steps li.done:not(:last-child)::after {
  background: var(--teal-600);
}

.step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12.5px;
  flex: none;
}

.step-label {
  white-space: nowrap;
}

.steps li.done .step-num {
  background: var(--teal-600);
  border-color: var(--teal-600);
  color: #fff;
}

.steps li.current .step-num {
  border-color: var(--teal-700);
  color: var(--teal-800);
  background: var(--teal-50);
}

.steps li.current {
  color: var(--teal-900);
  font-weight: 650;
}

.wizard-card > .muted {
  margin-bottom: 16px;
}

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

.choice-card,
.provider-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 44px 14px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}

.choice-card:hover,
.provider-card:hover {
  border-color: var(--teal-600);
}

.choice-card input,
.provider-card input,
.pill-radio input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.choice-card:has(input:checked),
.provider-card:has(input:checked) {
  border-color: var(--teal-700);
  background: var(--teal-50);
  box-shadow: 0 0 0 1px var(--teal-700) inset;
}

.choice-card:has(input:focus-visible),
.provider-card:has(input:focus-visible),
.pill-radio:has(input:focus-visible) {
  outline: 2px solid var(--teal-600);
  outline-offset: 2px;
}

.choice-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--teal-50);
  color: var(--teal-700);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.choice-card:has(input:checked) .choice-icon {
  background: #fff;
}

.choice-title {
  display: block;
  font-weight: 650;
  font-size: 15.5px;
}

.choice-desc {
  display: block;
  color: var(--muted);
  font-size: 13.5px;
  margin-top: 2px;
}

.choice-check {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
}

.choice-card:has(input:checked) .choice-check,
.provider-card:has(input:checked) .choice-check {
  background: var(--teal-700);
  border-color: var(--teal-700);
  color: #fff;
}

.question {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0;
  padding: 16px 0;
}

.question legend {
  float: left;
  width: 100%;
  padding: 0;
  font-weight: 600;
  font-size: 15.5px;
  margin-bottom: 10px;
  display: flex;
  gap: 10px;
  align-items: baseline;
}

.q-num {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--teal-50);
  color: var(--teal-800);
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.yesno {
  clear: both;
  display: flex;
  gap: 10px;
  padding-left: 34px;
}

.pill-radio {
  position: relative;
  cursor: pointer;
}

.pill-radio span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  height: 40px;
  padding: 0 18px;
  border: 1.5px solid var(--line-strong);
  border-radius: 20px;
  font-weight: 600;
  color: var(--text-2);
  background: #fff;
}

.pill-radio:hover span {
  border-color: var(--teal-600);
}

.pill-radio input:checked + span {
  background: var(--teal-700);
  border-color: var(--teal-700);
  color: #fff;
}

#symptom-notice {
  margin-top: 4px;
}

.empty-hint {
  margin: 14px 0 0;
}

.loc-address {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13.5px;
  margin: 0 0 4px;
}

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

.provider-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.provider-info {
  display: flex;
  flex-direction: column;
}

.provider-name {
  font-weight: 650;
  font-size: 15.5px;
}

.provider-spec {
  color: var(--teal-800);
  font-size: 13.5px;
  font-weight: 560;
}

.provider-bio {
  color: var(--muted);
  font-size: 13.5px;
  margin-top: 2px;
}

.location-field {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.location-field legend {
  padding: 0;
}

.location-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.location-card {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 14px 40px 14px 16px;
}

.location-card .choice-check {
  top: 14px;
  right: 12px;
  transform: none;
}

.location-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 650;
  font-size: 15.5px;
}

.location-name .icon {
  color: var(--teal-700);
}

.location-address {
  color: var(--text-2);
  font-size: 13.5px;
}

.location-phone {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

/* times */

.times-head {
  padding-bottom: 0;
}

.times-head-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.summary-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 4px 0 4px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--text-2);
}

.chip .icon {
  color: var(--teal-700);
}

.tz-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--info-bg);
  color: var(--info);
  font-size: 13.5px;
  font-weight: 560;
  white-space: nowrap;
}

.week-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 14px -22px 0;
  padding: 10px 22px;
  border-top: 1px solid var(--line);
  background: #fafbfc;
  border-radius: 0 0 var(--radius) var(--radius);
}

.week-nav.bottom {
  margin: 0 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.week-link {
  font-weight: 600;
  text-decoration: none;
  color: var(--teal-700);
  padding: 6px 4px;
}

.week-link.disabled {
  color: #a8b2ba;
  cursor: not-allowed;
}

.week-label {
  font-weight: 650;
}

.day-block {
  padding: 0;
  overflow: hidden;
}

.day-title {
  font-size: 15.5px;
  font-weight: 700;
  padding: 12px 20px;
  background: #fafbfc;
  border-bottom: 1px solid var(--line);
}

.prov-row {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px 20px;
}

.prov-row + .prov-row {
  border-top: 1px solid var(--line);
}

.prov-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.prov-meta .provider-name {
  font-size: 14.5px;
}

.time-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.time-form {
  margin: 0;
}

.time-btn {
  min-width: 96px;
  height: 40px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1.5px solid var(--teal-700);
  background: #fff;
  color: var(--teal-800);
  font: inherit;
  font-weight: 650;
  font-size: 14.5px;
  cursor: pointer;
}

.time-btn:hover {
  background: var(--teal-700);
  color: #fff;
}

.more-link {
  font-size: 14px;
  font-weight: 600;
  margin-left: 6px;
  text-decoration: none;
}

.more-link:hover {
  text-decoration: underline;
}

.empty-card {
  text-align: left;
}

.empty-icon,
.success-icon,
.error-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.empty-icon {
  background: var(--bg);
  color: var(--muted);
}

.empty-icon .icon,
.success-icon .icon,
.error-icon .icon {
  width: 28px;
  height: 28px;
}

/* review */

.review-card {
  padding-bottom: 18px;
}

.review-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.facts {
  margin: 8px 0 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.fact {
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
}

.fact:nth-child(odd) {
  border-right: 1px solid var(--line);
}

.fact:last-child {
  grid-column: 1 / -1;
  border-bottom: 0;
  border-right: 0;
}

.fact dt {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.fact dd {
  margin: 2px 0 0;
  font-size: 16px;
  font-weight: 650;
}

.fact dd .muted {
  font-weight: 400;
  font-size: 14px;
}

.policy-text {
  margin: 8px 0 0 28px;
  font-size: 13.5px;
  color: var(--text-2);
}

.review-card .form-actions {
  margin-top: 16px;
  padding-top: 14px;
}

/* confirmation and errors */

.success-card,
.error-card {
  text-align: center;
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.success-card h1,
.error-card h1 {
  font-size: 26px;
  margin-bottom: 8px;
}

.success-icon {
  background: var(--success-bg);
  color: var(--success);
}

.error-icon {
  background: var(--error-bg);
  color: var(--error);
}

.confirm-line {
  font-size: 16px;
}

.confirm-line strong {
  font-size: 18px;
  letter-spacing: 0.5px;
}

.facts.compact {
  width: 100%;
  max-width: 560px;
  text-align: left;
}

.success-card .form-actions,
.error-card .form-actions {
  border-top: 0;
  padding-top: 0;
  margin-top: 10px;
}

/* --- footer ------------------------------------------------------------------------------------ */

.footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 16px 32px 20px;
  font-size: 13px;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin-bottom: 6px;
}

.footer-links a {
  color: var(--text-2);
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

body.has-cookie-banner .footer {
  padding-bottom: 96px;
}

/* --- cookie banner, chat ------------------------------------------------------------------------- */

.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  background: #1f2b35;
  color: #e9eef2;
  box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.18);
}

.cookie-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 24px;
}

.cookie-text {
  margin: 0;
  flex: 1;
  font-size: 14px;
}

.cookie-text a {
  color: #9fdde4;
}

.cookie-actions {
  display: flex;
  gap: 10px;
  flex: none;
}

.chat-bubble {
  position: fixed;
  right: 12px;
  bottom: 18px;
  z-index: 35;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--teal-700);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(7, 59, 67, 0.35);
}

.chat-bubble .icon {
  width: 24px;
  height: 24px;
}

.chat-bubble:hover {
  background: var(--teal-800);
}

/* The label shows as a tooltip, so the launcher stays clear of the page's content. */
.chat-bubble span {
  position: absolute;
  right: 62px;
  white-space: nowrap;
  background: #1f2b35;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s;
}

.chat-bubble:hover span,
.chat-bubble:focus span {
  opacity: 1;
}

body.has-cookie-banner .chat-bubble {
  bottom: 92px;
}

.chat-panel {
  position: fixed;
  right: 12px;
  bottom: 80px;
  z-index: 36;
  width: 340px;
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: 0 12px 36px rgba(16, 32, 48, 0.22);
  overflow: hidden;
}

body.has-cookie-banner .chat-panel {
  bottom: 154px;
}

.chat-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 10px 12px 16px;
  background: var(--teal-900);
  color: #fff;
}

.chat-head .icon-btn {
  color: #fff;
}

.chat-head .icon-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.chat-title {
  font-weight: 650;
}

.chat-status {
  font-size: 12px;
  opacity: 0.85;
  display: flex;
  align-items: center;
  gap: 6px;
}

.online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f2b84b;
}

.chat-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg);
}

.chat-msg {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px 12px 12px 4px;
  padding: 9px 12px;
  font-size: 14px;
}

.chat-input {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid var(--line);
}

.chat-input input {
  flex: 1;
  font: inherit;
  font-size: 14px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

/* --- modals --------------------------------------------------------------------------------------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(13, 24, 33, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal {
  position: relative;
  width: 460px;
  max-width: 100%;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  padding: 28px 28px 24px;
}

.modal h2 {
  font-size: 21px;
  font-weight: 650;
  margin-bottom: 8px;
}

.modal p {
  color: var(--text-2);
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.modal.promo {
  text-align: center;
  width: 440px;
}

.modal.promo .modal-actions {
  justify-content: center;
}

.qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

.qr {
  width: 150px;
  height: 150px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.modal.idle {
  text-align: center;
  width: 420px;
}

.modal.idle .modal-actions {
  justify-content: center;
}

.modal-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--warn-bg);
  color: var(--warn);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-icon .icon {
  width: 26px;
  height: 26px;
}

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

.pref-name {
  font-weight: 650;
}

.pref-desc {
  font-size: 13.5px;
  color: var(--muted);
}

.switch {
  position: relative;
  flex: none;
}

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

.switch span {
  display: block;
  width: 42px;
  height: 24px;
  border-radius: 12px;
  background: #c3ccd3;
  position: relative;
  cursor: pointer;
}

.switch span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: left 0.12s;
}

.switch input:checked + span {
  background: var(--teal-700);
}

.switch input:checked + span::after {
  left: 21px;
}

.switch input:disabled + span {
  opacity: 0.6;
  cursor: not-allowed;
}

.notice-banner {
  margin-bottom: 18px;
}

/* --- human check (positions come from human_check.LAYOUT, inlined on the page) --- */

.hc-page {
  background: linear-gradient(160deg, var(--teal-950), var(--teal-700));
}

.hc-panel {
  margin: 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.hc-panel > * {
  position: absolute;
  box-sizing: border-box;
}

.hc-brand {
  height: 28px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--teal-900);
  font-size: 15px;
  font-weight: 650;
}

.hc-brand .logo {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--line);
}

.hc-brand-sep {
  width: 1px;
  height: 18px;
  background: var(--line-strong);
}

.hc-brand-mychart {
  font-weight: 700;
}

.hc-head {
  background: var(--teal-700);
  color: #fff;
  border-radius: 8px;
  padding: 12px 14px;
  overflow: hidden;
}

.hc-head h1 {
  font-size: 13.5px;
  font-weight: 600;
  opacity: 0.92;
  margin: 0 0 4px;
}

.hc-head p {
  font-size: 19px;
  line-height: 1.25;
  margin: 0;
}

.hc-grid {
  display: grid;
}

.hc-tile {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 4px;
  background: #e8f4f5;
  cursor: pointer;
}

.hc-tile svg {
  display: block;
  transition: transform 0.12s;
}

.hc-tile input {
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.hc-tile:has(input:checked) svg {
  transform: scale(0.78);
}

.hc-tile:has(input:focus-visible) {
  outline: 3px solid var(--teal-600);
  outline-offset: 1px;
}

.hc-tick {
  position: absolute;
  left: 5px;
  top: 5px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--teal-700);
  color: #fff;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px #fff;
}

.hc-tile:has(input:checked) .hc-tick {
  display: flex;
}

.hc-note {
  margin: 0;
  display: flex;
  align-items: center;
  font-size: 12.5px;
  line-height: 1.3;
  color: var(--muted);
}

.hc-note.error {
  color: var(--error);
  font-weight: 600;
}

.hc-verify {
  min-height: 0;
  padding: 0;
}

.consent-block {
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.consent-block .policy-text {
  margin-top: 8px;
}

/* --- details, insurance and changing a visit --------------------------------------------------- */

.review-extra {
  grid-template-columns: 150px 1fr;
  margin: 0 0 16px;
}

.details-list {
  margin-bottom: 12px;
}

.current-time {
  margin: 4px 0 12px;
}

.provider-switch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.visit-actions .btn-sm {
  align-self: flex-start;
  margin-right: 4px;
}

/* A guest's form (option guest_scheduling) */
.form-field {
  margin-bottom: 14px;
}
.required {
  color: #b42318;
}
.field-error {
  color: #b42318;
  font-size: 13px;
  margin: 4px 0 0;
}
