:root {
  color-scheme: light;
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  color: #2a2138;
  background: #f9f8fc;
  font-synthesis: none;
  --ink: #2a2138;
  --muted: #6b627a;
  --purple: #6c46b5;
  --purple-dark: #563497;
  --line: #ebe7f1;
  --body: #f9f8fc;
  --white: #fff;
  --sidebar-width: 236px;
  --shadow: 0 2px 5px #32224e05;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font-size: 14px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
svg { display: block; flex: none; }
:focus-visible { outline: 2px solid #8258cf; outline-offset: 3px; }
main:focus { outline: none; }
.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; }

.shell { min-height: 100vh; }
.sidebar {
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  background: #fefeff;
  border-right: 1px solid var(--line);
  padding: 28px 17px 16px;
  z-index: 10;
  overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; align-self: flex-start; margin: 0 0 31px 9px; font-size: 27px; font-weight: 780; letter-spacing: -.08em; line-height: 1; }
.brand-mark { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 11px; color: white; background: #7753c1; }
.brand-dot { color: #926ccc; }
.center-switch, .profile {
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  text-align: left;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--white);
  padding: 9px;
}
.center-switch:hover, .profile:hover { background: #f9f5ff; }
.center-switch > svg, .profile > svg { margin-left: auto; color: #716780; }
.center-icon { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 8px; color: #734db6; background: #eee7fb; }
.center-text, .profile > span:nth-child(2) { min-width: 0; }
.center-text strong, .profile strong { display: block; font-size: 12.5px; line-height: 1.35; overflow-wrap: anywhere; }
.center-text small, .profile small { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.nav-section { margin-top: 28px; }
.nav-section p { color: #736883; font-size: 10px; font-weight: 740; letter-spacing: .105em; margin: 0 0 10px 11px; }
.nav-link { position: relative; display: flex; align-items: center; gap: 11px; padding: 11px 11px; min-height: 43px; margin: 3px 0; border-radius: 8px; color: #625772; font-weight: 570; font-size: 13px; }
.nav-link:hover { background: #f5f0fc; color: var(--purple); }
.nav-link.selected { background: #efe8fb; color: #6039ab; font-weight: 720; }
.nav-link.selected::before { content: ""; width: 3px; height: 18px; border-radius: 5px; background: #825bc9; position: absolute; left: 0; }
.side-bottom { margin-top: auto; padding-top: 32px; }
.demo-indicator { display: flex; align-items: center; gap: 7px; color: #736883; padding: 0 8px 14px; font-size: 11px; }
.demo-indicator > span { width: 7px; height: 7px; border-radius: 50%; background: #a884df; }
.profile { border-color: transparent; border-top-left-radius: 0; border-top-right-radius: 0; border-top-color: var(--line); padding: 12px 5px 4px; }
.sidebar-overlay, #mobile-menu { display: none; }

.workspace { margin-left: var(--sidebar-width); }
.topbar {
  height: 65px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  padding: 0 32px;
}
.top-start, .breadcrumb, .top-actions { display: flex; align-items: center; }
.top-start, .breadcrumb { gap: 10px; }
.breadcrumb { white-space: nowrap; color: var(--muted); font-size: 12px; }
.breadcrumb strong { color: var(--ink); font-weight: 680; }
.top-actions { gap: 12px; }
.quick-search { display: flex; align-items: center; gap: 9px; width: 227px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: #fbfaff; min-height: 36px; padding: 0 9px 0 11px; text-align: left; font-size: 12px; }
.quick-search:hover, .icon-button:hover { color: var(--purple-dark); background: #f4effc; }
kbd { font-family: inherit; line-height: 18px; width: 18px; text-align: center; margin-left: auto; background: var(--white); border: 1px solid #ebe5f3; border-radius: 4px; font-size: 11px; }
.icon-button { display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid transparent; border-radius: 8px; background: transparent; color: #776b86; }
.bell { position: relative; border-color: var(--line); width: 36px; height: 36px; }
.bell i { position: absolute; top: 6px; right: 8px; width: 7px; height: 7px; border: 1px solid white; border-radius: 50%; background: #a573d7; }

.main { width: 100%; max-width: 1530px; margin: auto; padding: 29px 32px 42px; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 23px; }
.page-heading h1 { font-size: clamp(24px, 2.6vw, 31px); letter-spacing: -.043em; line-height: 1.22; font-weight: 760; }
.page-heading p { font-size: 13px; color: var(--muted); margin-top: 6px; line-height: 1.45; }
.page-actions, .inline-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 39px; padding: 7px 13px; border-radius: 8px; border: 1px solid transparent; font-size: 12px; font-weight: 700; white-space: nowrap; line-height: 1.25; }
.primary { color: var(--white); background: #7650be; border-color: #7650be; box-shadow: 0 2px 4px #45237726; }
.primary:hover { background: var(--purple-dark); border-color: var(--purple-dark); }
.secondary { background: #fff; border-color: #e9e2f0; color: var(--purple-dark); }
.secondary:hover { background: #f5efff; border-color: #d7c5ef; }
.button.small { min-height: 31px; padding: 5px 9px; }
.text-button { display: inline-flex; align-items: center; justify-content: start; gap: 7px; color: var(--purple); padding: 6px 2px; border: 0; background: transparent; font-size: 12px; font-weight: 730; white-space: nowrap; }
.text-button:hover { color: var(--purple-dark); text-decoration: underline; text-underline-offset: 3px; }

.hero { min-height: 174px; border: 1px solid #e8dcf7; border-radius: 14px; background: linear-gradient(108deg, #f1e9fd 0%, #eee5fc 61%, #e9ddf8 100%); display: flex; align-items: center; justify-content: space-between; position: relative; isolation: isolate; overflow: hidden; margin-bottom: 22px; }
.hero-copy { padding: 25px 28px; z-index: 1; }
.hero-label { color: #633ca0; display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 730; margin-bottom: 10px; }
.hero-label span { width: 7px; height: 7px; border-radius: 50%; background: #9a6fd5; }
.hero h2 { font-size: clamp(28px, 3.4vw, 41px); line-height: 1.09; letter-spacing: -.055em; font-weight: 760; color: #33224d; }
.hero p { font-size: 13px; line-height: 1.5; margin-top: 9px; color: #594775; max-width: 365px; }
.hero img { position: absolute; z-index: 0; width: 41%; height: 106%; right: 3%; top: -3%; object-fit: contain; pointer-events: none; }

.card { background: var(--white); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); min-width: 0; overflow: hidden; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px; }
.metric { display: flex; flex-direction: column; align-items: flex-start; padding: 15px 16px 14px; min-height: 118px; }
a.metric:hover { border-color: #cfb9ee; box-shadow: 0 2px 8px #6944a416; }
.metric-top { display: flex; align-items: center; gap: 9px; font-size: 12px; color: #645974; font-weight: 650; }
.square-icon, .avatar { display: grid; place-items: center; flex: none; width: 35px; height: 35px; border-radius: 9px; }
.avatar { border-radius: 50%; font-size: 11px; font-weight: 760; }
.tone-purple { background: #efe7fc; color: #6d43aa; }
.tone-blue { background: #e8effc; color: #3c62aa; }
.tone-green { background: #e4f4eb; color: #277355; }
.tone-orange { background: #fff0df; color: #924d23; }
.tone-red { background: #fbe8ec; color: #a33955; }
.tone-gray { background: #f0edf4; color: #62566f; }
.metric > strong { font-size: 28px; line-height: 1.12; letter-spacing: -.045em; font-weight: 760; margin-top: 8px; }
.metric > small { font-size: 11px; color: var(--muted); margin-top: 5px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.95fr) minmax(250px, 1fr); gap: 17px; align-items: start; }
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 17px 18px 15px; }
.card-heading h2 { font-size: 16px; font-weight: 750; line-height: 1.3; letter-spacing: -.02em; }
.card-heading p { color: var(--muted); font-size: 11.5px; line-height: 1.4; margin-top: 4px; }
.card-foot { padding: 9px 18px 12px; border-top: 1px solid #f0ecf5; }
.count { white-space: nowrap; color: #7249ad; background: #f0e9fa; border-radius: 7px; font-size: 11px; padding: 4px 8px; font-weight: 730; }
.table-wrap { width: 100%; overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 12px; text-align: left; }
thead { color: #6d627b; background: #faf8fc; }
th { font-size: 10.5px; font-weight: 720; padding: 10px 10px; }
td { padding: 9px 10px; border-top: 1px solid #f1edf5; height: 50px; }
th:first-child, td:first-child { padding-left: 18px; }
th:last-child, td:last-child { padding-right: 15px; }
td:last-child { text-align: right; }
tbody tr:hover { background: #fcfaff; }
td strong { font-weight: 700; }
td small { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; }
td .icon-button { width: 28px; height: 28px; }
.time-cell { font-weight: 690; white-space: nowrap; font-variant-numeric: tabular-nums; }
.service-label { display: flex; align-items: center; gap: 6px; white-space: nowrap; color: #5e526d; font-size: 11px; }
.dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: currentColor; opacity: .78; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; white-space: nowrap; border-radius: 20px; font-size: 10px; font-weight: 690; }
.pill > span { width: 5px; height: 5px; background: currentColor; flex: none; border-radius: 50%; }
.alert-list { padding: 0 15px; }
.alert-row { border: 0; background: transparent; border-top: 1px solid #f0ecf5; display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 2px; min-height: 61px; text-align: left; }
.alert-row:hover { background: #fcf8ff; }
.alert-row > svg { color: #80718e; margin-left: auto; }
.alert-copy strong, .alert-copy small { display: block; }
.alert-copy strong { font-size: 12px; font-weight: 730; }
.alert-copy small { color: var(--muted); font-size: 10.5px; margin-top: 4px; line-height: 1.3; }
.empty { display: grid; justify-items: center; gap: 8px; padding: 33px 14px; text-align: center; color: var(--muted); font-size: 12px; }
.empty svg { color: #9373c3; }
.empty strong { color: var(--ink); font-size: 13px; }

.agenda-heading { flex-wrap: wrap; }
.week-controls { display: flex; align-items: center; gap: 8px; }
.week-controls .secondary { min-height: 34px; }
.week-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; padding: 0 18px 16px; }
.week-day { border: 1px solid var(--line); background: #faf9fc; border-radius: 9px; color: var(--muted); padding: 10px 3px; display: grid; gap: 3px; justify-items: center; }
.week-day:hover, .week-day.chosen { color: var(--purple-dark); background: #eee5fc; border-color: #d8c6ee; }
.week-day span { font-size: 11px; text-transform: capitalize; }
.week-day strong { font-size: 17px; }
.filter-input { border: 1px solid var(--line); border-radius: 8px; display: flex; align-items: center; gap: 7px; color: var(--muted); padding: 0 9px; max-width: 100%; }
.filter-input:focus-within { border-color: #a880d8; outline: 2px solid #ede0fa; }
.filter-input input { height: 35px; width: min(155px, 100%); border: 0; outline: 0; min-width: 0; background: transparent; font-size: 12px; }
select, .field input, .field textarea { min-width: 0; border: 1px solid #e6dfef; border-radius: 8px; background: var(--white); padding: 8px 10px; font-size: 13px; min-height: 37px; }
.person-button { border: 0; padding: 0; background: transparent; display: flex; align-items: center; gap: 9px; text-align: left; }
.person-button:hover { color: var(--purple-dark); text-decoration: underline; }
.billing-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.billing-summary .metric { min-height: 90px; }
.billing-card { margin-bottom: 16px; }

.dialog { width: min(530px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow-y: auto; padding: 0; color: var(--ink); background: var(--white); border: 1px solid #e9e1f1; border-radius: 15px; box-shadow: 0 16px 65px #2c194d3b; }
.dialog::backdrop { background: #24173565; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding: 15px 19px; }
.dialog-head h2 { font-size: 19px; letter-spacing: -.03em; }
.dialog-body { padding: 19px; }
.dialog-body > p { margin-bottom: 10px; line-height: 1.5; }
.dialog-actions { border-top: 1px solid var(--line); padding: 12px 19px; display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.dialog-actions > :nth-child(1):nth-last-child(3) { margin-right: auto; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 13px; }
.field { display: grid; gap: 5px; margin-bottom: 12px; }
.field:last-child { margin-bottom: 0; }
.field span { display: block; font-size: 12px; font-weight: 690; }
.field textarea { resize: vertical; }
.form-error { margin-top: 9px; color: #9b2f4b; font-size: 12px; }
.dialog-context { color: var(--muted); font-size: 12px; }
.choice-list { display: grid; gap: 5px; }
.choice { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; min-height: 51px; background: transparent; border: 1px solid transparent; border-radius: 8px; text-align: left; }
.choice:hover, .choice.current { background: #f6f0fd; border-color: #e9dafa; }
.choice > span:nth-child(2) { flex: 1; min-width: 0; }
.choice strong, .choice small { display: block; }
.choice small { color: var(--muted); font-size: 11px; margin-top: 3px; }
.choice > svg { color: var(--purple); }
.dialog-search { margin-bottom: 10px; }
.dialog-search input { width: 100%; }
.dialog .alert-list { padding: 0; }
.dialog .alert-row:first-child { border-top: 0; }
.record-title { display: flex; align-items: center; gap: 11px; }
.record-title .avatar { width: 44px; height: 44px; font-size: 14px; }
.record-title h3 { font-size: 17px; }
.record-title p { color: var(--muted); margin-top: 3px; font-size: 12px; }
.details { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin: 15px 0; }
.details dt { color: var(--muted); font-size: 11px; margin-bottom: 3px; }
.details dd { margin: 0; font-size: 13px; overflow-wrap: anywhere; }
.clinical { margin-top: 15px; padding-top: 12px; border-top: 1px solid var(--line); }
.clinical h3 { margin: 5px 0; font-size: 13px; }
.clinical p { color: var(--muted); font-size: 12px; margin-bottom: 12px; line-height: 1.5; }
.preserve-lines { white-space: pre-wrap; overflow-wrap: anywhere; }
.notes strong { font-size: 11px; }
.info-note { display: flex; align-items: start; gap: 7px; margin-top: 13px; color: var(--muted); font-size: 12px; }
.toast { position: fixed; z-index: 22; bottom: 20px; right: 20px; width: max-content; max-width: calc(100% - 40px); background: #34234c; color: white; font-size: 13px; border-radius: 9px; display: flex; align-items: center; gap: 8px; padding: 11px 14px; box-shadow: 0 4px 20px #33195133; }

@media (max-width: 1160px) {
  :root { --sidebar-width: 210px; }
  .main, .topbar { padding-left: 23px; padding-right: 23px; }
  .dashboard-grid { grid-template-columns: minmax(0, 1.75fr) minmax(230px, 1fr); }
  .today-table th, .today-table td { padding-left: 7px; padding-right: 7px; }
  .today-table th:first-child, .today-table td:first-child { padding-left: 14px; }
}
@media (max-width: 960px) {
  .main, .topbar { padding-left: 18px; padding-right: 18px; }
  .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
  .metrics { gap: 9px; }
  .metric { padding: 12px 10px; min-height: 116px; }
  .metric-top { gap: 6px; }
  .metric .square-icon { width: 29px; height: 29px; }
}
@media (max-width: 730px) {
  :root { --sidebar-width: 225px; }
  .sidebar { visibility: hidden; transform: translateX(-100%); }
  .sidebar.opened { visibility: visible; transform: translateX(0); }
  .sidebar-overlay { display: block; position: fixed; inset: 0; z-index: 9; border: 0; background: #251a395b; }
  #mobile-menu { display: inline-grid; }
  .workspace { margin-left: 0; }
  .topbar { height: 55px; }
  .breadcrumb > span, .breadcrumb > svg { display: none; }
  .main { padding-top: 19px; }
  .hero img { right: -1%; opacity: .86; }
}
@media (max-width: 480px) {
  .main, .topbar { padding-left: 12px; padding-right: 12px; }
  .top-actions { gap: 6px; }
  .quick-search { justify-content: center; padding: 0; width: 36px; }
  .quick-search > span, .quick-search kbd { display: none; }
  .page-heading { gap: 8px; }
  .page-heading p { font-size: 11.5px; }
  .hero { min-height: 148px; margin-bottom: 15px; }
  .hero-copy { padding: 17px; max-width: 74%; }
  .hero p { font-size: 11px; }
  .hero img { width: 43%; right: -8%; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 15px; }
  .card-heading { padding: 13px 11px; }
  .today-table th:nth-child(3), .today-table td:nth-child(3) { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .week-grid { gap: 4px; padding: 0 10px 12px; }
}
