@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  font-family: "DM Sans", sans-serif;
  color: #242438;
  background: #f6f7fb;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --muted: #89899b;
  --purple: #6c5ce7;
  --line: #eeeef3;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; }
button, input { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.app-shell { min-height: 100vh; }
.sidebar {
  width: 244px;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  padding: 30px 18px 20px;
  background: #fff;
  border-right: 1px solid #efeff4;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  margin: 0 0 53px 8px;
  color: #25243b;
  text-decoration: none;
  font: 800 25px "Manrope", sans-serif;
  letter-spacing: -1.5px;
}
.brand-mark {
  display: grid;
  width: 33px;
  height: 33px;
  place-items: center;
  border-radius: 11px;
  background: var(--purple);
  color: #fff;
  font: 800 24px "Manrope", sans-serif;
  letter-spacing: -2px;
  padding: 0 2px 3px 0;
}
.brand-period { color: var(--purple); }
.nav-label, .eyebrow {
  color: #aaa9b8;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.15px;
}
.nav-label { margin: 0 0 12px 12px; }
.main-nav { display: grid; gap: 6px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 45px;
  padding: 0 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #747488;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
}
.nav-item:hover { background: #f8f7ff; color: var(--purple); }
.nav-item.is-active { color: var(--purple); background: #f2f0ff; }
.nav-icon { width: 20px; font-size: 17px; text-align: center; }
.sidebar-bottom {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 15px 3px 2px;
  border-top: 1px solid #f0f0f4;
}
.profile-avatar {
  display: grid;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  background: #eeeaff;
  color: #6959d8;
  font-size: 13px;
  font-weight: 700;
}
.sidebar-bottom strong, .sidebar-bottom span { display: block; }
.sidebar-bottom strong { font-size: 12px; }
.sidebar-bottom div:nth-child(2) span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.sidebar-bottom .profile-menu { margin-left: auto; color: #9291a2; font-size: 18px; }

.main-content { min-height: 100vh; margin-left: 244px; }
.topbar {
  display: flex;
  height: 72px;
  align-items: center;
  justify-content: space-between;
  padding: 0 5.2%;
  background: #fff;
  border-bottom: 1px solid #eeeef3;
}
.breadcrumb { color: #9291a2; font-size: 12px; }
.breadcrumb span { margin: 0 8px; color: #c5c4d0; }
.breadcrumb strong { color: #38374d; font-weight: 600; }
.topbar-actions { display: flex; align-items: center; gap: 22px; }
.today-label { color: #79798b; font-size: 11px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  transition: background .15s, transform .15s;
}
.button:active { transform: translateY(1px); }
.button-primary { border: 1px solid var(--purple); background: var(--purple); color: #fff; box-shadow: 0 3px 8px #6c5ce72a; }
.button-primary:hover { background: #5948d1; }
.button-secondary { border: 1px solid #e8e7ef; background: #fff; color: #56556b; }
.button-secondary:hover { background: #f8f7fc; }
.topbar-new { min-height: 36px; padding: 0 13px; font-size: 11px; }
.topbar-new span, .compact-heading .button span { font-size: 17px; font-weight: 400; }
.page-content { max-width: 1160px; margin: 0 auto; padding: 43px 5.2% 28px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 28px; }
.eyebrow { margin: 0 0 9px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 7px; color: #29283f; font: 700 25px "Manrope", sans-serif; letter-spacing: -.8px; }
h1 span { font-size: 21px; }
.page-subtitle { margin-bottom: 0; color: #89899b; font-size: 12px; }
.stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; margin-bottom: 24px; }
.stat-card, .panel { border: 1px solid #eeeef3; border-radius: 11px; background: #fff; box-shadow: 0 3px 12px #29283f05; }
.stat-card { min-height: 139px; padding: 17px 18px 15px; }
.stat-top { display: flex; align-items: center; justify-content: space-between; color: #79798d; font-size: 11px; font-weight: 500; }
.stat-icon { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 9px; font-size: 16px; }
.lilac { color: #715fdc; background: #f0edff; }
.peach { color: #e19a50; background: #fff3e8; }
.mint { color: #37a888; background: #e9f8f2; }
.stat-value { display: block; margin: 5px 0 4px; color: #29283f; font: 700 27px "Manrope", sans-serif; }
.stat-foot { color: #9a99a8; font-size: 10px; }
.stat-dot { display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: #40bd94; vertical-align: 1px; }
.panel { overflow: hidden; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; padding: 19px 21px 16px; }
.panel-heading h2, .dialog-heading h2 { margin: 0; color: #323147; font: 700 14px "Manrope", sans-serif; }
.panel-heading p { margin: 5px 0 0; color: #9998a8; font-size: 10px; }
.text-button { padding: 5px 0 5px 10px; border: 0; background: transparent; color: var(--purple); font-size: 10px; font-weight: 600; }
.text-button:hover { color: #4939bd; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
thead { background: #fbfbfd; }
th { padding: 10px 20px; color: #aaa9b8; font-size: 9px; font-weight: 600; letter-spacing: .55px; white-space: nowrap; }
td { padding: 13px 20px; border-top: 1px solid #f2f2f6; color: #77778a; font-size: 11px; white-space: nowrap; }
.customer-cell { display: flex; align-items: center; gap: 10px; color: #37364b; font-weight: 600; }
.customer-avatar { display: grid; width: 31px; height: 31px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: #f0edff; color: #6b5ad5; font-size: 10px; font-weight: 700; }
.customer-avatar.color-1 { background: #e8f6f1; color: #329777; }
.customer-avatar.color-2 { background: #fff0e8; color: #d78a56; }
.customer-avatar.color-3 { background: #eaf2ff; color: #4a7ac7; }
.customer-name small { display: block; margin-top: 3px; color: #aaa9b8; font-size: 9px; font-weight: 400; }
.date-cell { color: #47465b; font-weight: 500; }
.status-select { appearance: none; padding: 5px 22px 5px 9px; border: 0; border-radius: 20px; outline-offset: 2px; font-size: 9px; font-weight: 600; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath d='m2 4 3 3 3-3' fill='none' stroke='%23777788' stroke-width='1.3'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 7px center; }
.status-pending { background-color: #fff4e5; color: #bb7d28; }
.status-completed { background-color: #e9f8f1; color: #328d6d; }
.status-cancelled { background-color: #fff0f0; color: #c26666; }
.privacy-note { margin: 15px 0 0; color: #a4a3b1; font-size: 9px; text-align: right; }
.privacy-note span { margin-right: 4px; }
.empty-state { display: flex; min-height: 190px; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 24px; color: #9796a7; text-align: center; }
.empty-state strong { color: #434258; font-size: 12px; }
.empty-state > span:not(.empty-icon) { font-size: 10px; }
.empty-icon { display: grid; width: 37px; height: 37px; place-items: center; margin-bottom: 2px; border-radius: 12px; background: #f2f0ff; color: #6c5ce7; font-size: 19px; }
.empty-state .button { margin-top: 5px; }
.secondary-view { padding-top: 38px; }
.compact-heading { align-items: center; margin-bottom: 23px; }
.compact-heading .eyebrow { margin-bottom: 7px; }
.compact-heading h1 { margin-bottom: 5px; }
.list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 14px 19px; }
.filter-tabs { display: flex; align-items: center; gap: 4px; overflow-x: auto; }
.filter-tab { flex: 0 0 auto; padding: 8px 11px; border: 0; border-radius: 7px; background: transparent; color: #89899b; font-size: 10px; }
.filter-tab:hover { background: #f8f7fc; }
.filter-tab.is-selected { background: #f0edff; color: #6554d2; font-weight: 600; }
.search-box { display: flex; width: 200px; min-width: 155px; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid #ecebf1; border-radius: 7px; color: #9b9aaa; }
.search-box span { font-size: 17px; }
.search-box input { width: 100%; min-width: 0; height: 33px; border: 0; outline: 0; background: transparent; color: #3b3a50; font-size: 10px; }
.customer-panel-heading { padding-bottom: 18px; }
.customer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 0 20px 20px; }
.customer-card { display: flex; align-items: center; gap: 11px; min-width: 0; padding: 14px; border: 1px solid #f0eff5; border-radius: 9px; }
.customer-card-info { min-width: 0; }
.customer-card-info strong { display: block; overflow: hidden; color: #39384d; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.customer-card-info span { display: block; margin-top: 4px; color: #9897a7; font-size: 9px; }
.customer-appointments { margin-left: auto; color: #79788b; font-size: 9px; text-align: right; white-space: nowrap; }
.customer-delete-button { padding: 6px 9px; border: 1px solid #f1dede; border-radius: 6px; background: #fff; color: #b94b4b; font-size: 9px; }
.customer-delete-button:hover:not(:disabled) { background: #fff4f4; }
.customer-delete-button:disabled { cursor: wait; opacity: .6; }
.appointment-dialog { width: min(440px, calc(100vw - 28px)); max-height: calc(100vh - 28px); padding: 25px; border: 1px solid #efedf4; border-radius: 14px; background: #fff; color: #29283f; box-shadow: 0 20px 80px #29283f30; }
.appointment-dialog::backdrop { background: #25243b55; backdrop-filter: blur(2px); }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 23px; }
.dialog-heading h2 { font-size: 18px; }
.dialog-heading .eyebrow { margin-bottom: 6px; }
.icon-button { width: 30px; height: 30px; border: 0; border-radius: 7px; background: #f6f5f9; color: #747386; font-size: 21px; line-height: 1; }
.field-label { display: grid; gap: 7px; margin: 0 0 15px; color: #55546a; font-size: 10px; font-weight: 600; }
.field-label input, .field-label select { width: 100%; height: 40px; padding: 0 11px; border: 1px solid #e9e8ef; border-radius: 7px; outline: 0; background: #fff; color: #343349; font-size: 11px; }
.field-label input:focus, .field-label select:focus { border-color: #9285eb; box-shadow: 0 0 0 3px #6c5ce718; }
.field-label input::placeholder { color: #b4b3c0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-error { margin: -2px 0 12px; color: #c04a4a; font-size: 10px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 23px; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 5; padding: 12px 17px; transform: translateY(15px); border-radius: 8px; background: #29283f; color: #fff; opacity: 0; pointer-events: none; font-size: 11px; box-shadow: 0 5px 18px #29283f25; transition: opacity .2s, transform .2s; }
.toast.is-visible { transform: translateY(0); opacity: 1; }
:focus-visible { outline: 3px solid #6c5ce766; outline-offset: 2px; }
.auth-screen { display: grid; min-height: 100vh; place-items: center; padding: 24px; background: radial-gradient(ellipse at 50% 20%, #f0edff 0, #f6f7fb 52%); }
.auth-card { width: min(100%, 410px); padding: 35px; border: 1px solid #eeeef3; border-radius: 15px; background: #fff; box-shadow: 0 12px 45px #29283f0d; }
.auth-brand { margin: 0 0 31px; }
.auth-card .eyebrow { margin-bottom: 8px; }
.auth-card h1 { margin-bottom: 8px; font-size: 23px; }
.auth-subtitle { margin-bottom: 24px; color: #89899b; font-size: 11px; line-height: 1.6; }
.auth-card .field-label { margin-bottom: 16px; }
.auth-card .field-label input { height: 44px; }
.auth-submit { width: 100%; min-height: 43px; margin-top: 4px; }
.auth-link { display: block; margin: 15px auto 0; padding: 4px; border: 0; background: transparent; color: var(--purple); font-size: 10px; }
.auth-link:hover { text-decoration: underline; }
.setup-notice { margin: 0 0 18px; padding: 12px; border: 1px solid #f0dfb8; border-radius: 8px; background: #fff9eb; color: #806229; font-size: 10px; line-height: 1.5; }
.auth-screen form[hidden] { display: none; }
.sign-out-button { margin-left: auto; padding: 6px 8px; border: 0; background: transparent; color: #7d7c8f; font-size: 10px; }
.sign-out-button:hover { color: #c04a4a; }
.invite-form { padding: 18px 20px; border-top: 1px solid #f2f2f6; border-bottom: 1px solid #f2f2f6; background: #fdfdff; }
.invite-heading { display: flex; align-items: baseline; gap: 10px; margin-bottom: 13px; }
.invite-heading strong { color: #37364b; font-size: 11px; }
.invite-heading span { color: #9998a8; font-size: 9px; }
.invite-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; align-items: end; gap: 11px; }
.invite-fields .field-label { min-width: 0; margin-bottom: 0; }
.invite-fields .field-label input { height: 37px; font-size: 10px; }
.invite-fields .button { min-height: 37px; padding: 0 12px; font-size: 10px; white-space: nowrap; }
.invite-form .form-error { margin: 10px 0 0; }
.member-portal { min-height: 100vh; background: #f6f7fb; }
.member-topbar { display: flex; height: 72px; align-items: center; justify-content: space-between; padding: 0 max(5%, calc((100% - 1040px) / 2)); border-bottom: 1px solid #eeeef3; background: #fff; }
.member-topbar .brand { margin: 0; }
.member-topbar .button { min-height: 35px; font-size: 10px; }
.member-content { width: min(100% - 40px, 1040px); margin: 0 auto; padding: 48px 0; }
.member-content h1 { margin-bottom: 8px; }
.member-content .page-subtitle { margin-bottom: 25px; }
.member-sessions { margin-top: 26px; }
.member-sessions .table-wrap table { min-width: 0; }
.status-badge { display: inline-block; padding: 5px 9px; border-radius: 20px; font-size: 9px; font-weight: 600; white-space: nowrap; }

@media (min-width: 1440px) {
  .page-content { padding-right: 60px; padding-left: 60px; }
  .topbar { padding-right: max(5.2%, calc((100% - 1040px) / 2)); padding-left: max(5.2%, calc((100% - 1040px) / 2)); }
}
@media (max-width: 900px) {
  .sidebar { width: 205px; padding-right: 14px; padding-left: 14px; }
  .main-content { margin-left: 205px; }
  .page-content { padding-right: 4%; padding-left: 4%; }
  .stats-grid { gap: 10px; }
  .stat-card { padding-right: 13px; padding-left: 13px; }
  .stat-top { font-size: 10px; }
  td, th { padding-right: 13px; padding-left: 13px; }
  .today-label { display: none; }
}
@media (max-width: 650px) {
  .sidebar { position: sticky; top: 0; width: 100%; height: auto; padding: 10px 14px 8px; border-right: 0; border-bottom: 1px solid #efeff4; }
  .brand { margin: 0 0 10px 2px; font-size: 21px; }
  .brand-mark { width: 29px; height: 29px; border-radius: 9px; font-size: 21px; }
  .nav-label, .sidebar-bottom { display: none; }
  .main-nav { grid-template-columns: repeat(3, 1fr); gap: 5px; }
  .nav-item { justify-content: center; gap: 6px; min-height: 37px; padding: 0 5px; font-size: 10px; }
  .nav-icon { width: auto; font-size: 14px; }
  .main-content { margin-left: 0; }
  .topbar { height: 55px; padding: 0 17px; }
  .breadcrumb { font-size: 10px; }
  .topbar-new { min-height: 33px; padding: 0 10px; font-size: 10px; }
  .page-content { padding: 28px 16px 24px; }
  .page-heading { margin-bottom: 21px; }
  h1 { font-size: 21px; }
  .page-subtitle { font-size: 10px; line-height: 1.5; }
  .stats-grid { grid-template-columns: 1fr; gap: 9px; margin-bottom: 17px; }
  .stat-card { display: grid; min-height: auto; grid-template-columns: 1fr auto; padding: 13px 15px; }
  .stat-top { display: contents; }
  .stat-top > span:first-child { align-self: end; }
  .stat-icon { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  .stat-value { grid-column: 1; grid-row: 2; margin: 4px 0 0; font-size: 23px; }
  .stat-foot { grid-column: 1; margin-top: 2px; }
  .panel-heading { padding: 16px 15px 13px; }
  .panel-heading h2 { font-size: 13px; }
  .text-button { font-size: 9px; }
  .table-wrap table { min-width: 570px; }
  th { font-size: 8px; }
  td { font-size: 10px; }
  .compact-heading { align-items: flex-start; gap: 12px; }
  .compact-heading .button { min-height: 35px; padding: 0 10px; font-size: 9px; white-space: nowrap; }
  .secondary-view { padding-top: 27px; }
  .list-toolbar { align-items: flex-start; flex-direction: column-reverse; padding: 13px; }
  .filter-tabs { width: 100%; }
  .filter-tab { padding: 7px 9px; font-size: 9px; }
  .search-box { width: 100%; }
  .customer-panel-heading { align-items: flex-start; flex-direction: column; }
  .customer-grid { grid-template-columns: 1fr; padding: 0 13px 14px; }
  .invite-form { padding: 15px 13px; }
  .invite-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
  .invite-fields { grid-template-columns: 1fr; }
  .invite-fields .button { width: 100%; }
  .auth-card { padding: 27px 22px; }
  .member-topbar { height: 60px; padding: 0 17px; }
  .member-content { width: min(100% - 32px, 1040px); padding: 32px 0; }
  .member-sessions .table-wrap table { min-width: 520px; }
  .toast { right: 14px; bottom: 14px; left: 14px; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
