@font-face {
  font-family: Poppins;
  src: url("/app/brand/poppins-400.woff2");
}
@font-face {
  font-family: Poppins;
  src: url("/app/brand/poppins-600.woff2");
  font-weight: 600;
}
:root {
  font-family: Poppins, system-ui, sans-serif;
  color: #29262e;
  background: #f7f6f8;
  font-size: 14px;
  font-synthesis: none;
  --purple: #65508e;
  --lavender: #e9e2f5;
  --muted: #6d6675;
  --line: #e4e0e8;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #7854b2;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  color: #39313f;
  padding: 10px 16px;
  min-height: 44px;
}
button:hover {
  background: #f0ecf5;
}
button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
a {
  color: var(--purple);
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -1px;
  margin-bottom: 0;
}
h2 {
  font-size: 20px;
  font-weight: 600;
}
h3 {
  font-size: 17px;
}
p {
  line-height: 1.7;
}
small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 5px;
}
strong {
  font-weight: 600;
}
label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 16px 0;
  color: #4b4354;
}
input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  background: #fff;
  border: 1px solid #b6adbf;
  border-radius: 8px;
  padding: 11px;
  color: #29262e;
}
textarea {
  min-height: 110px;
  resize: vertical;
}
fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--purple);
  color: #fff;
  border: 1px solid var(--purple);
  padding: 12px 20px;
  border-radius: 9px;
  text-decoration: none;
  min-height: 44px;
}
.primary:hover {
  background: #534077;
}
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.muted {
  color: var(--muted);
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--purple);
  font-weight: 600;
  margin-bottom: 10px;
}
.shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: 100vh;
}
.shell > aside {
  background: #29262f;
  color: #eee9f6;
  padding: 36px 20px 22px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.logo {
  width: 164px;
  align-self: center;
  margin-bottom: 35px;
}
.clinic-picker {
  font-size: 11px;
  color: #d3cadf;
}
.clinic-picker select {
  background: #38323f;
  border-color: #686070;
  color: white;
  font-size: 12px;
}
nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 20px;
}
nav a {
  display: flex;
  gap: 14px;
  align-items: center;
  min-height: 48px;
  text-decoration: none;
  color: #dcd5e5;
  padding: 12px 16px;
  border-radius: 9px;
}
nav a span {
  font-size: 22px;
  width: 23px;
  text-align: center;
}
nav a[aria-current="page"] {
  background: #e6dcf5;
  color: #463453;
}
nav a:hover {
  background: #51455f;
  color: white;
}
aside footer {
  margin-top: auto;
  padding: 28px 10px 0;
  border-top: 1px solid #53495e;
  display: grid;
  grid-template-columns: 40px 1fr;
  column-gap: 12px;
  align-items: center;
}
aside footer small {
  color: #c5bccc;
  margin: 2px 0 0;
  grid-column: 2;
}
.avatar {
  grid-row: span 2;
  background: #655278;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
}
aside footer button {
  grid-column: span 2;
  margin-top: 18px;
  background: transparent;
  color: #ddd3e8;
  border-color: #665871;
}
.shell main {
  padding: 0 42px 50px;
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
  min-width: 0;
}
.topline {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 24px 0;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.7px;
}
.topline i {
  font-size: 8px;
  color: #65508e;
  margin-left: 8px;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 35px 0 28px;
}
.welcome {
  padding: 34px 36px;
  background: #eee8f5;
  border: 1px solid #e1d6ed;
  border-radius: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}
.welcome h2 {
  font-size: 25px;
  margin-top: 18px;
}
.welcome p {
  color: var(--muted);
  margin: 0;
}
.flower {
  font-size: 130px;
  color: #b5a0cb;
  line-height: 1;
  margin-right: 20px;
}
.pill {
  display: inline-block;
  background: #efebf5;
  color: #58476d;
  font-size: 11px;
  border-radius: 20px;
  padding: 6px 11px;
  white-space: nowrap;
}
.pill.paid,
.pill.completed,
.pill.arrived {
  background: #e5f1e9;
  color: #326445;
}
.pill.pending,
.pill.absent {
  background: #fff0d8;
  color: #78541d;
}
.pill.cancelled,
.pill.reversed {
  background: #f8e7e9;
  color: #92354a;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 22px 0 12px;
}
.section-heading h2 {
  margin: 0;
}
.section-heading span {
  font-size: 12px;
  color: var(--muted);
}
.timeline {
  background: white;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 8px 24px;
}
.timeline article {
  display: flex;
  gap: 24px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.timeline article:last-child {
  border: 0;
}
.timeline time {
  min-width: 90px;
  font-size: 18px;
  color: var(--purple);
}
.timeline article > div {
  flex: 1;
}
.timeline p {
  font-size: 12px;
  color: var(--muted);
  margin: 5px 0 0;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 26px 0;
}
.metrics section {
  padding: 24px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.metrics section > span {
  color: var(--muted);
  font-size: 12px;
}
.metrics strong {
  display: block;
  font-size: 26px;
  margin-top: 12px;
}
.metrics small {
  font-size: 11px;
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.toolbar > input {
  max-width: 310px;
}
.segmented {
  display: flex;
  background: #ece8f1;
  padding: 4px;
  border-radius: 10px;
}
.segmented button {
  border: 0;
  background: transparent;
  padding: 7px 18px;
}
.segmented button[aria-pressed="true"] {
  background: white;
  box-shadow: 0 2px 5px #29262e10;
  color: var(--purple);
}
.table-wrap {
  overflow: auto;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  min-width: 630px;
}
th {
  font-weight: 400;
  color: var(--muted);
  font-size: 12px;
  background: #fbfafc;
}
th,
td {
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}
tbody tr:last-child td {
  border: 0;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 15px;
  margin: 20px 0;
}
.empty {
  text-align: center;
  padding: 65px 25px;
  background: white;
  border: 1px dashed #c9bfd5;
  border-radius: 12px;
}
.empty > span {
  font-size: 42px;
  color: #9c86b5;
}
.empty h2 {
  margin: 12px 0;
}
.empty p {
  color: var(--muted);
  margin: 0;
}
.notice {
  background: #eee8f6;
  padding: 15px 20px;
  border-radius: 9px;
  color: #554069;
  font-size: 13px;
}
.error {
  background: #fff0f0;
  border-left: 3px solid #aa3447;
  padding: 15px;
  color: #92283b;
  border-radius: 4px;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  padding: 26px;
  border-radius: 12px;
  margin: 25px 0;
}
.narrow {
  max-width: 550px;
}
.settings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.settings > section {
  background: white;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.member {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}
.conversation {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  min-height: 550px;
}
.conversation > section {
  padding: 24px;
}
.conversation > section:first-child {
  border-right: 1px solid var(--line);
}
.conversation > section:first-child button {
  display: block;
  width: 100%;
  text-align: left;
  margin: 8px 0;
  border: 0;
}
.selected {
  background: var(--lavender);
}
.messages {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 420px;
  overflow: auto;
}
.messages article {
  background: #f1ecf8;
  max-width: 90%;
  border-radius: 12px;
  padding: 16px;
}
.messages article p {
  margin: 0;
}
.prewrap {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 16px;
  width: min(580px, calc(100vw - 24px));
  padding: 28px;
  max-height: 90vh;
  overflow: auto;
  color: #29262e;
}
dialog::backdrop {
  background: #21182c80;
}
dialog > header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}
dialog > header h2 {
  margin: 0;
}
dialog > header button {
  font-size: 24px;
  min-width: 44px;
  padding: 2px;
}
.auth {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}
.auth-brand {
  background: #29262f;
  color: white;
  padding: 12vh 12%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-brand img {
  width: 210px;
  margin-bottom: 80px;
}
.auth-brand h1 {
  font-size: 46px;
  line-height: 1.3;
}
.auth-brand p {
  color: #c6b9d6;
  margin-top: 25px;
}
.auth > section {
  max-width: 490px;
  width: 100%;
  margin: auto;
  padding: 40px;
}
.auth h2 {
  font-size: 28px;
}
.auth form .primary {
  width: 100%;
  margin-top: 14px;
}
.auth .actions button {
  font-size: 12px;
}
.skip {
  position: fixed;
  left: 15px;
  top: -100px;
  background: white;
  z-index: 20;
  padding: 16px;
}
.skip:focus {
  top: 15px;
}
@media (max-width: 1100px) {
  .shell {
    grid-template-columns: 205px minmax(0, 1fr);
  }
  .shell main {
    padding: 0 24px 40px;
  }
  .metrics strong {
    font-size: 21px;
  }
  .settings {
    grid-template-columns: 1fr;
  }
  .flower {
    font-size: 85px;
    margin: 0;
  }
  .conversation {
    grid-template-columns: 210px 1fr;
  }
}
@media (max-width: 760px) {
  h1 {
    font-size: 26px;
  }
  .shell {
    display: block;
  }
  .shell > aside {
    position: static;
    height: auto;
    padding: 18px;
  }
  .logo {
    width: 125px;
    margin: 0;
    align-self: flex-start;
  }
  .clinic-picker {
    margin: 12px 0 0;
  }
  .shell nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    margin: 14px 0 0;
  }
  .shell nav a {
    font-size: 12px;
    padding: 9px;
    gap: 7px;
    justify-content: center;
  }
  .shell nav a span {
    display: none;
  }
  .shell aside footer {
    display: flex;
    padding: 12px 0 0;
    margin-top: 15px;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 12px;
  }
  .shell aside footer small {
    display: none;
  }
  .shell aside footer button {
    margin: 0 0 0 auto;
    padding: 8px;
  }
  .avatar {
    width: 30px;
    height: 30px;
  }
  .shell main {
    padding: 0 18px 30px;
  }
  .topline {
    padding: 15px 0;
    font-size: 10px;
  }
  .page-heading {
    align-items: flex-start;
    flex-direction: column;
    padding: 24px 0;
  }
  .welcome {
    padding: 24px;
  }
  .welcome h2 {
    font-size: 21px;
  }
  .flower {
    display: none;
  }
  .metrics {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .metrics section {
    padding: 20px;
  }
  .metrics strong {
    font-size: 26px;
  }
  .timeline {
    padding: 6px 16px;
  }
  .timeline article {
    gap: 12px;
    flex-wrap: wrap;
  }
  .timeline time {
    min-width: 65px;
    font-size: 16px;
  }
  .timeline .pill {
    margin-left: auto;
  }
  .toolbar {
    gap: 12px;
  }
  .segmented {
    width: 100%;
  }
  .segmented button {
    flex: 1;
  }
  .conversation {
    grid-template-columns: 1fr;
  }
  .conversation > section:first-child {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    max-height: 220px;
    overflow: auto;
  }
  .auth {
    grid-template-columns: 1fr;
  }
  .auth-brand {
    padding: 35px;
  }
  .auth-brand img {
    width: 140px;
    margin-bottom: 25px;
  }
  .auth-brand h1 {
    font-size: 28px;
  }
  .auth-brand p {
    margin-bottom: 0;
    font-size: 13px;
  }
  .auth > section {
    padding: 30px;
  }
  .settings > section {
    padding: 20px;
  }
  .section-heading {
    align-items: flex-start;
    gap: 10px;
  }
  .section-heading h2 {
    font-size: 18px;
  }
  table {
    min-width: 590px;
  }
  th,
  td {
    padding: 14px;
  }
  .pagination {
    justify-content: center;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}

.calendar-scroll { overflow-x:auto; border:1px solid var(--line,#ddd); border-radius:16px; background:white; }
.calendar-grid { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); min-width:700px; }
.calendar-heading { padding:14px; text-align:center; background:#eee9f5; }
.calendar-day { min-width:0; padding:8px; min-height:150px; border:1px solid #eee9f5; }
.calendar-day > small { display:block; margin:6px 0; color:#595164; }
.calendar-date { border:0; min-height:36px; }
.calendar-event { display:flex; flex-direction:column; align-items:flex-start; width:100%; padding:8px; margin:6px 0; text-align:left; background:#eee9f5; border-left:3px solid #69507e; overflow-wrap:anywhere; }
.calendar-event time, .calendar-event small { font-size:12px; }
.calendar-event.cancelled, .calendar-event.absent { background:#f7eeee; }
.calendar-event.completed { background:#e7f3eb; }
.history-event { display:flex; flex-wrap:wrap; gap:12px; padding:12px 0; border-bottom:1px solid #ddd; }
.history-event strong { overflow-wrap:anywhere; }
@media(max-width:600px) { .calendar-grid.week { min-width:0; grid-template-columns:1fr; } .calendar-grid.week .calendar-heading { display:none; } .calendar-grid.week .calendar-day { min-height:80px; } }

@media(max-width:600px) {
  .calendar-grid.month { min-width:0; }
  .calendar-grid.month .calendar-heading { padding:10px 0; font-size:12px; }
  .calendar-grid.month .calendar-day { padding:2px; min-height:85px; text-align:center; }
  .calendar-grid.month .calendar-date { padding:0; width:100%; min-height:44px; }
  .calendar-grid.month .calendar-event, .calendar-grid.month .calendar-count-label { display:none; }
  .calendar-grid.month .calendar-day > small { font-size:11px; }
}
