:root {
  --ink: #21342f;
  --muted: #708079;
  --line: #e3e9e5;
  --surface: #fff;
  --ground: #f5f7f4;
  --teal: #0e7569;
  --teal-dark: #08594f;
  --tint: #e8f2ed;
  --warning: #8b6326;
  --danger: #a1443f;
  --radius: 12px;
  --sidebar: 232px;
  font-family: "Golos Text", sans-serif;
  color: var(--ink);
  font-synthesis: none;
  background: var(--ground);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  color: inherit;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #7abfb2;
  outline-offset: 3px;
}
button,
input,
select,
textarea {
  border-radius: 7px;
}
button {
  transition:
    background 0.15s,
    color 0.15s,
    transform 0.15s;
}
button:active:not(:disabled) {
  transform: translateY(1px);
}
h1,
h2,
h3,
h4,
p {
  margin: 0;
}
h1,
h2,
h3 {
  font-weight: 600;
  letter-spacing: -0.035em;
}
h1 {
  font-size: 32px;
  line-height: 1.2;
}
h2 {
  font-size: 19px;
  line-height: 1.3;
}
h3 {
  font-size: 15px;
}
svg {
  height: 20px;
  width: 20px;
  flex-shrink: 0;
}
small {
  font-size: 12px;
}
[hidden] {
  display: none !important;
}
.muted {
  color: var(--muted);
}
.mono {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  font-weight: 500;
}
.eyebrow {
  display: block;
  color: var(--teal);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.13em;
  font-weight: 500;
}
.light {
  color: #a8cfc4;
}
.skip-link {
  position: fixed;
  top: 8px;
  left: 16px;
  z-index: 100;
  background: #fff;
  padding: 12px;
  transform: translateY(-150%);
}
.skip-link:focus {
  transform: none;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 23px;
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.055em;
}
.brand-symbol {
  width: 39px;
  height: 39px;
  border-radius: 10px;
  background: var(--teal);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.13em;
  padding-right: 3px;
}
.brand small {
  display: block;
  font-size: 8px;
  letter-spacing: 0.1em;
  margin-top: 7px;
  font-weight: 500;
  color: var(--muted);
}
.brand-light {
  color: #fff;
}
.brand-light .brand-symbol {
  background: #fff;
  color: var(--teal-dark);
}
.brand-light small {
  color: #b6d1c8;
}
.button {
  min-height: 39px;
  padding: 9px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #fff;
  border: 1px solid #dbe3de;
  font-weight: 500;
  font-size: 12px;
  white-space: nowrap;
}
.button:hover {
  background: #f2f6f3;
}
.button.primary {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}
.button.primary:hover {
  background: var(--teal-dark);
}
.button.quiet {
  background: transparent;
  border-color: transparent;
}
.button.quiet:hover {
  background: var(--tint);
}
.button.danger {
  color: var(--danger);
  background: #fff7f6;
  border-color: #efd7d4;
}
.button.small {
  min-height: 31px;
  padding: 5px 10px;
  font-size: 11px;
}
.button svg {
  width: 16px;
  height: 16px;
}
.text-link {
  color: var(--teal);
  font-size: 12px;
  font-weight: 500;
}
.text-link:hover {
  text-decoration: underline;
}
.icon-button {
  border: 1px solid var(--line);
  background: #fff;
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  padding: 7px;
}
.icon-button:hover {
  background: var(--tint);
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 18px;
  min-width: 0;
}
.field > span {
  font-weight: 500;
  font-size: 12px;
}
.field small {
  color: var(--muted);
  line-height: 1.5;
}
.field input,
.field select,
.field textarea,
.search-input,
.filter-input {
  border: 1px solid #dce4df;
  background: #fff;
  padding: 11px 12px;
  width: 100%;
  min-height: 42px;
  color: var(--ink);
  font-size: 13px;
}
.field textarea {
  min-height: 92px;
  resize: vertical;
  line-height: 1.6;
}
.field input::placeholder,
.field textarea::placeholder,
.search-input::placeholder {
  color: #98a39c;
}
.field input:focus,
.field textarea:focus,
.search-input:focus {
  border-color: var(--teal);
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.field-row .field {
  margin-bottom: 12px;
}
.check-label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 12px;
  color: #52685d;
  margin: 12px 0 20px;
}
.check-label input {
  margin-top: 3px;
  accent-color: var(--teal);
}
.notice {
  border: 1px solid #dae7e1;
  border-radius: 8px;
  padding: 12px 15px;
  background: #f1f7f3;
  font-size: 12px;
  line-height: 1.6;
  margin-bottom: 18px;
}
.notice.danger {
  color: var(--danger);
  background: #fff4f2;
  border-color: #efd8d4;
}
.notice.warning {
  background: #fff9ec;
  border-color: #ece0bd;
  color: #826021;
}
.auth-screen {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100dvh;
  background: #fff;
}
.auth-story {
  background: #114c43;
  color: white;
  padding: 45px 55px 35px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.auth-story-main {
  margin: auto 0;
  padding: 70px 0 20px;
}
.auth-story h1 {
  font-size: clamp(34px, 3.7vw, 55px);
  line-height: 1.17;
  letter-spacing: -0.055em;
  margin: 19px 0 24px;
}
.auth-story p {
  color: #c3d6ce;
  font-size: 14px;
  line-height: 1.8;
}
.auth-back {
  font-size: 12px;
  color: #bcd4ca;
  padding: 20px 0;
}
.auth-back:hover {
  color: #fff;
}
.auth-diagram {
  position: relative;
  width: 90%;
  max-width: 390px;
  height: 220px;
  margin-top: 44px;
  background: radial-gradient(
    ellipse at center,
    transparent 27%,
    #ffffff12 27.4%,
    #ffffff12 27.8%,
    transparent 28.2%,
    transparent 48%,
    #ffffff12 48.4%,
    #ffffff12 48.8%,
    transparent 49.2%
  );
}
.diagram-core {
  position: absolute;
  left: 43%;
  top: 38%;
  font-size: 27px;
  background: #d6e9df;
  color: #155a4c;
  border-radius: 16px;
  width: 57px;
  height: 57px;
  display: grid;
  place-items: center;
  font-weight: 700;
  box-shadow: 0 0 0 15px #ffffff04;
}
.diagram-node {
  position: absolute;
  padding: 10px 13px;
  border: 1px solid #ffffff28;
  color: #dbebe3;
  font-size: 10px;
  border-radius: 7px;
  background: #164f45;
}
.node-1 {
  left: 0;
  top: 16%;
}
.node-2 {
  right: -4%;
  top: 24%;
}
.node-3 {
  right: 0;
  bottom: 17%;
}
.node-4 {
  left: 1%;
  bottom: 15%;
}
.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 55px;
}
.auth-form-wrap {
  max-width: 380px;
  width: 100%;
}
.auth-panel h2 {
  font-size: 33px;
  letter-spacing: -0.045em;
  margin: 18px 0 10px;
}
.auth-subtitle {
  font-size: 14px;
  margin-bottom: 33px;
}
.auth-submit {
  width: 100%;
  justify-content: space-between;
  padding: 13px 16px;
  font-size: 13px;
}
.auth-help {
  font-size: 11px;
  line-height: 1.8;
  color: var(--muted);
  margin: 23px 0 20px;
}
.auth-security {
  border-top: 1px solid var(--line);
  margin-top: 50px;
  padding-top: 22px;
  font-size: 10px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 7px;
}
.security-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
}
.doctor-app {
  min-height: 100dvh;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar);
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  z-index: 30;
  padding: 27px 17px 16px;
}
.sidebar > .brand {
  margin: 0 11px 29px;
  font-size: 23px;
}
.clinic-switch {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  padding: 11px 10px;
  border-radius: 8px;
  margin: 0 1px 25px;
}
.clinic-switch div {
  min-width: 0;
}
.clinic-switch b {
  display: block;
  font-size: 11px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.clinic-switch div > span {
  display: block;
  font-size: 9px;
  color: var(--muted);
  margin-top: 2px;
}
.clinic-symbol {
  background: #f0f4f0;
  border: 1px solid #e7ece6;
  border-radius: 6px;
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  font-size: 20px;
  color: var(--teal);
  flex-shrink: 0;
}
.nav-label {
  padding: 0 13px;
  margin: 21px 0 9px;
  font-size: 8px;
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: 0.1em;
  color: #95a198;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  margin: 3px 0;
  border-radius: 7px;
  color: #6d7e73;
  font-size: 12px;
  font-weight: 500;
}
.nav-link svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.5;
}
.nav-link:hover {
  background: #f5f7f3;
  color: var(--ink);
}
.nav-link.active {
  background: var(--tint);
  color: var(--teal-dark);
}
.nav-link.active svg {
  stroke-width: 1.9;
}
.nav-count {
  font-family: "IBM Plex Mono", monospace;
  font-size: 9px;
  margin-left: auto;
  min-width: 20px;
  text-align: center;
  background: #fff;
  border-radius: 4px;
  padding: 1px 4px;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 20px;
}
.return-link {
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: 10px;
  color: var(--muted);
  padding: 10px 13px 20px;
}
.return-link > span {
  font-size: 18px;
}
.profile-button {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 16px 1px 0;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  width: 100%;
  text-align: left;
}
.profile-button > span:nth-child(2) {
  min-width: 0;
  flex: 1;
}
.profile-button b {
  font-size: 10px;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-button small {
  font-size: 9px;
  display: block;
  color: var(--muted);
  margin-top: 3px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.profile-button > span:last-child {
  color: #9aaa9f;
  font-size: 12px;
}
.avatar {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: #e8ece0;
  color: #5f754c;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}
.avatar.patient-avatar {
  background: #e8eeeb;
  color: #55756c;
  width: 34px;
  height: 34px;
}
.avatar.patient-avatar.tone-1 {
  background: #f0e9e0;
  color: #947b56;
}
.avatar.patient-avatar.tone-2 {
  background: #e8edf2;
  color: #647c8f;
}
.avatar.patient-avatar.tone-3 {
  background: #edeaf1;
  color: #837390;
}
.main-shell {
  margin-left: var(--sidebar);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
.topbar {
  height: 72px;
  border-bottom: 1px solid var(--line);
  background: #ffffffd9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 36px;
  gap: 16px;
}
.topbar-location {
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: 11px;
}
.topbar-location b {
  font-weight: 500;
}
.breadcrumb-slash {
  color: #bec8c0;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 17px;
}
.today-label {
  font-size: 10px;
  color: #8c9a90;
}
.topbar-avatar {
  border: 1px solid #d9e2d8;
  background: #e9eee3;
  width: 33px;
  height: 33px;
  border-radius: 50%;
  font-size: 10px;
  color: #57704d;
  font-weight: 600;
}
.mobile-menu {
  display: none;
}
.workspace {
  padding: 33px 36px 25px;
  max-width: 1660px;
  width: 100%;
  margin: 0 auto;
  flex: 1;
}
.workspace-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #94a096;
  font-size: 9px;
  padding: 16px 36px 20px;
}
.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}
.page-heading .eyebrow {
  margin-bottom: 9px;
}
.page-heading h1 {
  margin-bottom: 9px;
}
.page-heading p {
  font-size: 12px;
  color: var(--muted);
}
.heading-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 2px;
}
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 26px;
  padding: 23px 0;
}
.stat-item {
  padding: 0 24px;
  border-right: 1px solid var(--line);
}
.stat-item:last-child {
  border-right: 0;
}
.stat-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--muted);
  gap: 6px;
}
.stat-label svg {
  width: 17px;
  height: 17px;
  color: #8ca596;
}
.stat-value {
  font-size: 31px;
  font-weight: 500;
  letter-spacing: -0.07em;
  margin: 8px 0 2px;
  line-height: 1.2;
}
.stat-foot {
  font-size: 9px;
  color: #8f9b92;
}
.stat-foot.highlight {
  color: var(--teal);
}
.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 22px;
  align-items: start;
}
.content-grid > *,
.chart-grid > *,
.dashboard-aside > *,
.report-grid > *,
.settings-grid > * {
  min-width: 0;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-width: 0;
  overflow: hidden;
}
.panel + .panel {
  margin-top: 20px;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 21px 23px;
  border-bottom: 1px solid #ecf0ec;
}
.panel-head h2 {
  font-size: 17px;
}
.panel-head h2 small {
  font-size: 10px;
  font-weight: 400;
  color: var(--muted);
  margin-left: 6px;
  letter-spacing: 0;
}
.panel-head p {
  color: var(--muted);
  font-size: 10px;
  margin-top: 5px;
}
.panel-body {
  padding: 22px;
}
.panel-head .text-link {
  font-size: 10px;
}
.date-tabs {
  display: flex;
  gap: 1px;
  background: #f2f5f1;
  padding: 3px;
  border-radius: 6px;
}
.date-tabs button {
  background: transparent;
  border: 0;
  padding: 6px 10px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}
.date-tabs button.active {
  background: white;
  box-shadow: 0 1px 3px #1738260d;
  color: var(--ink);
}
.table-wrap {
  overflow-x: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  font-size: 11px;
  white-space: nowrap;
}
th {
  background: #fbfcfa;
  font-size: 9px;
  color: #8d9a90;
  font-weight: 400;
  padding: 11px 18px;
  border-bottom: 1px solid #edf0eb;
}
td {
  padding: 15px 18px;
  border-bottom: 1px solid #edf0eb;
}
tr:last-child td {
  border-bottom: 0;
}
tr[data-patient]:hover {
  background: #f9fbf8;
  cursor: pointer;
}
.person-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}
.person-cell b {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink);
}
.person-cell small {
  display: block;
  font-size: 9px;
  color: var(--muted);
  margin-top: 4px;
}
.time-cell {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  font-weight: 500;
}
.time-cell small {
  display: block;
  font-size: 9px;
  font-family: "Golos Text", sans-serif;
  font-weight: 400;
  color: var(--muted);
  margin-top: 4px;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border-radius: 4px;
  background: #edf2ed;
  color: #657966;
  font-size: 9px;
  font-weight: 500;
  white-space: nowrap;
}
.status.booked,
.status.signed,
.status.completed,
.status.done {
  background: #e9f3ed;
  color: #477b5c;
}
.status.requested,
.status.draft,
.status.open {
  background: #f8f1df;
  color: #9b7a31;
}
.status.cancelled,
.status.no_show {
  background: #f5eaea;
  color: #a27470;
}
.status.arrived {
  background: #e5effc;
  color: #36628e;
}
.status-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}
.appointment-actions {
  display: flex;
  gap: 5px;
  align-items: center;
}
.appointment-actions .button {
  font-size: 9px;
  min-height: 29px;
  padding: 5px 8px;
}
.row-arrow {
  color: #81988a;
  background: transparent;
  border: 0;
  width: 25px;
  font-size: 16px;
}
.table-foot {
  padding: 12px 22px;
  border-top: 1px solid var(--line);
  font-size: 9px;
  color: #92a095;
  display: flex;
  justify-content: space-between;
}
.day-note {
  padding: 17px 22px;
  background: #fbfcfa;
  border-top: 1px solid #edf0eb;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 10px;
  color: #7d8d81;
}
.day-note svg {
  width: 16px;
  height: 16px;
  color: #85a492;
}
.tasks-list {
  padding: 2px 19px 8px;
}
.task-row {
  display: flex;
  gap: 10px;
  padding: 16px 0;
  border-bottom: 1px solid #ecf0eb;
  align-items: flex-start;
}
.task-row:last-child {
  border: 0;
}
.task-toggle {
  width: 16px;
  height: 16px;
  border: 1px solid #cbd7cb;
  background: #fff;
  border-radius: 4px;
  margin-top: 1px;
  flex-shrink: 0;
  padding: 0;
  font-size: 11px;
  color: var(--teal);
}
.task-toggle.checked {
  background: var(--tint);
  border-color: #afcbb8;
}
.task-copy {
  flex: 1;
  min-width: 0;
}
.task-copy b {
  font-size: 11px;
  line-height: 1.55;
  font-weight: 500;
  display: block;
}
.task-copy small {
  font-size: 9px;
  color: #95a096;
  display: block;
  margin-top: 5px;
}
.task-copy.done b {
  text-decoration: line-through;
  color: #95a096;
}
.priority-high {
  color: #a96e44 !important;
}
.section-link {
  display: flex;
  justify-content: center;
  padding: 14px;
  color: var(--teal);
  font-size: 10px;
  border-top: 1px solid #ecf0eb;
}
.quick-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  padding: 17px;
}
.quick-link {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  text-align: left;
  gap: 16px;
  background: #f7f9f5;
  border: 1px solid #edf1e9;
  padding: 14px 12px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 500;
  min-height: 91px;
}
.quick-link:hover {
  background: var(--tint);
}
.quick-link svg {
  color: var(--teal);
  width: 20px;
  height: 20px;
}
.subtle-info {
  margin-top: 20px;
  display: flex;
  gap: 11px;
  color: #7c8c81;
  font-size: 10px;
  line-height: 1.7;
  padding: 0 4px;
}
.subtle-info svg {
  color: #8fa697;
  flex-shrink: 0;
  width: 17px;
}
.list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 21px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.search-box {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 390px;
}
.search-box svg {
  position: absolute;
  left: 12px;
  top: 11px;
  width: 16px;
  height: 16px;
  color: #91a093;
}
.search-input {
  min-height: 38px;
  padding: 9px 13px 9px 37px;
  font-size: 11px;
  background: #fbfcfa;
}
.filters {
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
}
.filter-input {
  font-size: 11px;
  width: auto;
  min-height: 37px;
  padding: 8px 10px;
  max-width: 180px;
}
.filter-label {
  font-size: 10px;
  color: var(--muted);
}
.empty {
  padding: 49px 24px;
  text-align: center;
  color: var(--muted);
}
.empty-icon {
  margin: 0 auto 15px;
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7f9f5;
  color: #8ba28f;
}
.empty b {
  display: block;
  font-size: 14px;
  color: #526b5d;
  font-weight: 500;
  margin-bottom: 8px;
}
.empty p {
  font-size: 11px;
  max-width: 340px;
  margin: 0 auto;
  line-height: 1.7;
}
.empty .button {
  margin-top: 18px;
}
.loading {
  display: grid;
  gap: 15px;
  padding: 25px;
}
.skeleton {
  height: 16px;
  background: #ebefea;
  border-radius: 5px;
  animation: pulse 1.6s ease-in-out infinite;
}
.skeleton:nth-child(2) {
  width: 75%;
}
.skeleton:nth-child(3) {
  width: 88%;
}
.skeleton:nth-child(4) {
  width: 58%;
}
@keyframes pulse {
  50% {
    opacity: 0.45;
  }
}
.error-state {
  padding: 30px;
  background: #fff;
  border: 1px solid #eddcda;
  border-radius: 12px;
}
.error-state h2 {
  margin-bottom: 10px;
}
.error-state p {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 18px;
}
.patient-head {
  display: flex;
  gap: 18px;
  align-items: center;
  background: #fff;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 21px;
}
.patient-head .avatar {
  width: 66px;
  height: 66px;
  font-size: 21px;
  border-radius: 18px;
}
.patient-title {
  min-width: 0;
  flex: 1;
}
.patient-title h1 {
  font-size: 25px;
  margin-bottom: 6px;
}
.patient-title p {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}
.patient-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.patient-tags .status {
  font-size: 9px;
}
.back-button {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  border: 0;
  background: none;
  padding: 0;
  margin-bottom: 20px;
  font-size: 11px;
  color: var(--muted);
}
.chart-tabs {
  display: flex;
  gap: 25px;
  border-bottom: 1px solid #dce5dc;
  margin-bottom: 24px;
  overflow-x: auto;
}
.chart-tab {
  background: none;
  border: 0;
  border-radius: 0;
  padding: 12px 0 14px;
  font-size: 11px;
  white-space: nowrap;
  color: var(--muted);
  position: relative;
}
.chart-tab.active {
  color: var(--teal);
  font-weight: 600;
}
.chart-tab.active:after {
  position: absolute;
  content: "";
  height: 2px;
  background: var(--teal);
  bottom: 0;
  left: 0;
  right: 0;
}
.chart-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 22px;
  align-items: start;
}
.details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 23px 18px;
  margin: 0;
}
.details-grid dt,
.detail-label {
  font-size: 9px;
  color: #8c9a90;
  margin-bottom: 5px;
}
.details-grid dd {
  margin: 0;
  font-size: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.details-grid .span-2 {
  grid-column: 1/-1;
}
.allergy-box {
  display: flex;
  gap: 9px;
  padding: 14px 17px;
  border: 1px solid #efdccc;
  background: #fcf5ec;
  color: #97683c;
  border-radius: 8px;
  font-size: 11px;
  margin-bottom: 20px;
}
.allergy-box svg {
  width: 18px;
  height: 18px;
}
.allergy-box b {
  display: block;
  font-size: 10px;
  margin-bottom: 2px;
}
.timeline {
  padding: 1px 23px;
}
.timeline-item {
  position: relative;
  padding: 20px 0 20px 24px;
  border-bottom: 1px solid #edf1eb;
}
.timeline-item:last-child {
  border: 0;
}
.timeline-item:before {
  content: "";
  position: absolute;
  left: 0;
  top: 25px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #a4bcab;
  box-shadow: 0 0 0 4px #f0f5ef;
}
.timeline-item h3 {
  font-size: 12px;
  letter-spacing: 0;
  line-height: 1.4;
  margin: 5px 0 8px;
}
.timeline-item p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
  white-space: pre-wrap;
}
.timeline-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 9px;
  color: #97a197;
  gap: 8px;
}
.timeline-item .text-link {
  font-size: 10px;
  margin-top: 10px;
  display: inline-block;
}
.records-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px;
}
.record-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px;
  text-align: left;
  min-width: 0;
}
.record-card:hover {
  border-color: #a9c4b5;
}
.record-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 17px;
}
.record-kind {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--teal);
  font-size: 9px;
}
.record-kind svg {
  width: 16px;
  height: 16px;
}
.record-card h3 {
  font-size: 14px;
  margin-bottom: 9px;
  overflow-wrap: anywhere;
}
.record-card p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 18px;
  white-space: pre-wrap;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.record-card-foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 9px;
  color: #8d9c90;
  border-top: 1px solid #edf1eb;
  padding-top: 13px;
}
.calendar-controls {
  display: flex;
  align-items: center;
  gap: 9px;
}
.calendar-caption {
  font-size: 15px;
  font-weight: 500;
  margin: 0 7px;
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(110px, 1fr));
  min-width: 800px;
}
.calendar-day {
  border-right: 1px solid #e7ece6;
  min-height: 340px;
}
.calendar-day:last-child {
  border-right: 0;
}
.calendar-day-head {
  padding: 17px 12px;
  border-bottom: 1px solid var(--line);
  text-align: center;
  font-size: 10px;
  color: var(--muted);
}
.calendar-day-head b {
  display: block;
  font-size: 20px;
  font-weight: 500;
  color: var(--ink);
  margin-top: 3px;
}
.calendar-day.today .calendar-day-head {
  background: #f1f7f0;
}
.calendar-day.today .calendar-day-head b {
  color: var(--teal);
}
.calendar-event {
  background: #eff5ed;
  border: 1px solid #e0ebdc;
  border-left: 3px solid #8cac79;
  margin: 10px 7px;
  padding: 10px 8px;
  border-radius: 6px;
  display: block;
  width: calc(100% - 14px);
  text-align: left;
  white-space: normal;
}
.calendar-event.cancelled {
  background: #f6f0ed;
  border-color: #eaddd5;
  border-left-color: #c9a691;
}
.calendar-event .mono {
  font-size: 9px;
  color: #6c8c66;
}
.calendar-event b {
  font-size: 10px;
  display: block;
  margin: 7px 0 3px;
  font-weight: 500;
  line-height: 1.5;
}
.calendar-event small {
  font-size: 9px;
  color: #7d9077;
}
.calendar-empty {
  padding: 26px 12px;
  text-align: center;
  color: #a0aca1;
  font-size: 10px;
}
.schedule-list {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--line);
}
.schedule-day {
  padding: 19px 13px;
  background: white;
}
.schedule-day b {
  font-size: 11px;
  display: block;
  margin-bottom: 7px;
}
.schedule-day span {
  font-size: 10px;
  color: var(--muted);
}
.reference-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.reference-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 28px;
  display: flex;
  gap: 22px;
  align-items: flex-start;
}
.reference-card:hover {
  border-color: #aec5b6;
  background: #fafcf8;
}
.reference-icon {
  width: 46px;
  height: 46px;
  background: var(--tint);
  display: grid;
  place-items: center;
  color: var(--teal);
  border-radius: 11px;
  flex-shrink: 0;
}
.reference-card h2 {
  font-size: 18px;
  margin-bottom: 10px;
}
.reference-card p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
  margin-bottom: 16px;
}
.reference-card span {
  font-size: 11px;
  color: var(--teal);
}
.report-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.bar-row {
  margin-bottom: 21px;
}
.bar-row:last-child {
  margin-bottom: 0;
}
.bar-label {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  margin-bottom: 8px;
}
.bar-label span {
  color: var(--muted);
}
progress {
  appearance: none;
  display: block;
  width: 100%;
  height: 7px;
  border: 0;
  border-radius: 4px;
  overflow: hidden;
  background: #edf1e9;
}
progress::-webkit-progress-bar {
  background: #edf1e9;
}
progress::-webkit-progress-value {
  background: #82ab8a;
}
progress::-moz-progress-bar {
  background: #82ab8a;
}
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 23px;
}
.settings-grid .panel + .panel {
  margin: 0;
}
.editor-dialog {
  padding: 0;
  width: min(700px, calc(100% - 32px));
  max-height: 90dvh;
  border: 1px solid #d7e1d9;
  border-radius: 15px;
  color: var(--ink);
  box-shadow: 0 25px 100px #12352229;
  overflow: auto;
}
.editor-dialog::backdrop {
  background: #102d2455;
  backdrop-filter: blur(3px);
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 23px 27px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
}
.dialog-head h2 {
  font-size: 20px;
}
.dialog-head p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
}
.dialog-body {
  padding: 25px 27px;
}
.dialog-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 27px;
  background: #f8faf6;
  border-top: 1px solid var(--line);
  position: sticky;
  bottom: 0;
}
.dialog-footer-actions {
  display: flex;
  gap: 9px;
}
.dialog-footer small {
  font-size: 10px;
  color: var(--muted);
}
.record-content {
  display: grid;
  gap: 23px;
}
.record-content h3 {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0;
  font-weight: 400;
  margin-bottom: 7px;
}
.record-content p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.8;
}
.toast {
  position: fixed;
  bottom: 26px;
  left: calc(50% + 90px);
  transform: translateX(-50%);
  z-index: 150;
  background: #194f40;
  color: white;
  padding: 13px 20px;
  max-width: min(550px, 90vw);
  border-radius: 8px;
  box-shadow: 0 8px 40px #10322420;
  font-size: 12px;
}
.toast.error {
  background: #963e36;
}
.demo-notice {
  margin-bottom: 22px;
  font-size: 11px;
  display: flex;
  gap: 8px;
  align-items: center;
  background: #faf5e8;
  border: 1px solid #e9dec0;
  color: #8c773d;
  padding: 10px 13px;
  border-radius: 7px;
}
.section-spacer {
  margin-top: 24px;
}
.read-only-note {
  font-size: 10px;
  color: #8c9a90;
  line-height: 1.7;
  margin-top: 15px;
}
.inline-list {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.compact-description {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mobile-overlay {
  display: none;
}
@media (min-width: 1500px) {
  .workspace {
    padding-top: 40px;
  }
  .content-grid {
    grid-template-columns: minmax(0, 1fr) 320px;
  }
  .sidebar {
    padding-left: 20px;
    padding-right: 20px;
  }
  :root {
    --sidebar: 250px;
  }
  .panel-head {
    padding: 24px;
  }
  .stat-item {
    padding: 0 29px;
  }
  .topbar {
    height: 78px;
  }
}
@media (max-width: 1200px) {
  :root {
    --sidebar: 210px;
  }
  .sidebar {
    padding-left: 12px;
    padding-right: 12px;
  }
  .sidebar > .brand {
    font-size: 21px;
    margin-left: 7px;
  }
  .brand small {
    font-size: 7px;
  }
  .workspace {
    padding: 28px 25px;
  }
  .topbar {
    padding: 0 25px;
  }
  .content-grid {
    grid-template-columns: minmax(0, 1fr) 250px;
    gap: 17px;
  }
  .stat-item {
    padding: 0 17px;
  }
  .stats-strip {
    padding: 20px 0;
  }
  td {
    padding: 14px 12px;
  }
  th {
    padding: 11px 12px;
  }
  .panel-head {
    padding: 19px 17px;
  }
  .chart-grid {
    grid-template-columns: minmax(0, 1fr) 260px;
  }
  .auth-story {
    padding: 35px;
  }
  .auth-panel {
    padding: 40px;
  }
}
@media (max-width: 1023px) {
  .content-grid,
  .chart-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-aside {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 17px;
    align-items: start;
  }
  .dashboard-aside .panel + .panel {
    margin-top: 0;
  }
  .dashboard-aside .subtle-info {
    grid-column: 1/-1;
    margin-top: 0;
  }
  .today-label {
    display: none;
  }
  .workspace {
    padding: 25px 23px;
  }
  .page-heading h1 {
    font-size: 29px;
  }
  .page-heading {
    align-items: flex-start;
  }
  .heading-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .reference-card {
    padding: 22px;
    gap: 15px;
  }
  .stats-strip {
    margin-bottom: 22px;
  }
  .stat-label {
    font-size: 10px;
  }
  .stat-label svg {
    display: none;
  }
  .patient-head {
    flex-wrap: wrap;
  }
  .patient-head > .heading-actions {
    margin-left: auto;
  }
  .chart-tabs {
    gap: 22px;
  }
  .auth-diagram {
    width: 95%;
  }
  .auth-story h1 {
    font-size: 36px;
  }
  .settings-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 767px) {
  :root {
    --sidebar: 235px;
  }
  .sidebar {
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform 0.2s;
  }
  .sidebar.open {
    transform: translateX(0);
    visibility: visible;
    box-shadow: 10px 0 50px #12332126;
  }
  .main-shell {
    margin-left: 0;
  }
  .topbar {
    height: 61px;
    padding: 0 18px;
  }
  .topbar-location {
    gap: 10px;
    font-size: 10px;
  }
  .mobile-menu {
    display: grid;
    width: 31px;
    height: 31px;
    padding: 4px;
    font-size: 14px;
  }
  .topbar-actions {
    gap: 10px;
  }
  .workspace {
    padding: 23px 18px;
  }
  .page-heading {
    flex-wrap: wrap;
    gap: 17px;
    margin-bottom: 22px;
  }
  .page-heading h1 {
    font-size: 29px;
  }
  .heading-actions {
    justify-content: flex-start;
  }
  .page-heading p {
    font-size: 11px;
  }
  .stats-strip {
    grid-template-columns: 1fr 1fr;
    padding: 0;
  }
  .stat-item {
    padding: 19px;
  }
  .stat-item:nth-child(2) {
    border-right: 0;
  }
  .stat-item:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
  .stat-value {
    font-size: 30px;
  }
  .stat-label {
    font-size: 11px;
  }
  .stat-label svg {
    display: block;
  }
  .dashboard-aside {
    grid-template-columns: 1fr;
  }
  .dashboard-aside .panel + .panel {
    margin: 0;
  }
  .reference-grid,
  .report-grid,
  .records-grid {
    grid-template-columns: 1fr;
  }
  .auth-screen {
    grid-template-columns: 1fr;
  }
  .auth-story {
    padding: 25px;
  }
  .auth-story-main {
    padding: 35px 0 18px;
  }
  .auth-story h1 {
    font-size: 34px;
    margin: 14px 0 17px;
  }
  .auth-story p {
    font-size: 12px;
  }
  .auth-diagram {
    display: none;
  }
  .auth-story .eyebrow {
    font-size: 9px;
  }
  .auth-back {
    padding: 8px 0;
    font-size: 10px;
  }
  .auth-panel {
    padding: 40px 25px;
  }
  .auth-panel h2 {
    font-size: 29px;
  }
  .auth-form-wrap {
    max-width: 420px;
  }
  .auth-security {
    margin-top: 35px;
  }
  .auth-story > .brand {
    font-size: 21px;
  }
  .auth-story .brand-symbol {
    width: 34px;
    height: 34px;
    font-size: 22px;
  }
  .patient-head {
    padding: 20px;
    gap: 13px;
  }
  .patient-head .avatar {
    width: 51px;
    height: 51px;
    font-size: 17px;
    border-radius: 13px;
  }
  .patient-title h1 {
    font-size: 20px;
  }
  .patient-title p {
    font-size: 10px;
    gap: 7px;
  }
  .patient-head > .heading-actions {
    margin-left: 0;
    width: 100%;
  }
  .chart-tabs {
    gap: 22px;
    margin-bottom: 18px;
  }
  .chart-tab {
    font-size: 11px;
  }
  .list-toolbar {
    padding: 15px;
    gap: 12px;
  }
  .search-box {
    max-width: none;
  }
  .filters {
    gap: 7px;
  }
  .filter-input {
    font-size: 10px;
    max-width: 153px;
  }
  .calendar-caption {
    font-size: 13px;
  }
  .calendar-controls {
    gap: 5px;
    flex-wrap: wrap;
  }
  .schedule-list {
    grid-template-columns: repeat(2, 1fr);
  }
  .workspace-footer {
    font-size: 8px;
    padding: 15px 18px;
  }
  .dialog-head {
    padding: 19px;
  }
  .dialog-body {
    padding: 20px;
  }
  .dialog-footer {
    padding: 15px 19px;
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .dialog-footer-actions {
    width: 100%;
    justify-content: flex-end;
  }
  .field-row {
    gap: 12px;
  }
  .toast {
    left: 50%;
    bottom: 18px;
  }
  .details-grid {
    gap: 18px 12px;
  }
  .settings-grid {
    gap: 18px;
  }
  .table-foot {
    padding: 11px 15px;
  }
  .panel-head h2 {
    font-size: 16px;
  }
  .panel-head {
    padding: 18px;
  }
  .record-card {
    padding: 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media print {
  .sidebar,
  .topbar,
  .workspace-footer,
  .page-heading .heading-actions,
  .chart-tabs,
  .back-button,
  .toast,
  .dialog-footer,
  .dialog-head .icon-button {
    display: none !important;
  }
  .main-shell {
    margin: 0;
  }
  .workspace {
    padding: 0;
  }
  .doctor-app {
    display: block;
  }
  .editor-dialog[open] {
    position: absolute;
    top: 0;
    left: 0;
    max-height: none;
    width: 100%;
    border: 0;
    box-shadow: none;
  }
  .editor-dialog::backdrop {
    background: white;
  }
  .panel,
  .record-card {
    break-inside: avoid;
  }
  body {
    background: #fff;
  }
}
.profile-sections {
  max-width: 1080px;
}
.profile-group {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  margin-top: 11px;
  overflow: hidden;
}
.profile-group summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
  padding: 19px 23px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
}
.profile-group summary::-webkit-details-marker {
  display: none;
}
.profile-group summary > span:last-child {
  font-size: 10px;
  font-weight: 400;
}
.profile-group summary b {
  font-weight: 400;
  font-size: 17px;
  margin-left: 18px;
}
.profile-group[open] summary {
  border-bottom: 1px solid var(--line);
}
.profile-group[open] summary b {
  display: inline-block;
  transform: rotate(45deg);
}
.profile-group .panel-body {
  padding: 24px;
}
.chart-toolbar {
  border: 0;
  padding: 0 0 17px;
}
.sidebar nav {
  overflow-y: auto;
  scrollbar-width: thin;
  min-height: 0;
}
.sidebar-bottom {
  flex-shrink: 0;
}
.sidebar .nav-link {
  padding: 9px 12px;
}
.sidebar .nav-label {
  margin-top: 13px;
}
.sidebar .clinic-switch {
  margin-bottom: 15px;
}
.profile-group dd {
  font-size: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.editor-dialog .dialog-footer-actions {
  flex-wrap: wrap;
}
.auth-panel .notice {
  margin-top: 16px;
}
.attachment-list {
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.attachment-list > h3 {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 12px;
}
.attachment-row {
  display: flex;
  gap: 12px;
  align-items: center;
  width: 100%;
  background: #f7f9f5;
  border: 1px solid var(--line);
  padding: 13px;
  text-align: left;
  margin-top: 8px;
}
.attachment-row > span:nth-child(2) {
  flex: 1;
  min-width: 0;
}
.attachment-row b {
  font-size: 12px;
  display: block;
  overflow-wrap: anywhere;
}
.attachment-row small {
  font-size: 10px;
  color: var(--muted);
  display: block;
  margin-top: 4px;
}
.attachment-row > svg {
  color: var(--teal);
}
@media print {
  body.dialog-open > .doctor-app,
  body.dialog-open > .auth-screen,
  body.dialog-open > .skip-link {
    display: none !important;
  }
  .editor-dialog[open] {
    display: block;
    overflow: visible;
    position: static;
    max-height: none;
    width: 100%;
    margin: 0;
  }
  .attachment-list {
    display: none;
  }
  .dialog-head {
    position: static;
  }
  .dialog-body {
    padding: 25px 0;
  }
  .dialog-head {
    padding: 0 0 20px;
  }
}
.task-title-button {
  border: 0;
  background: none;
  padding: 0;
  text-align: left;
  font-size: 11px;
  line-height: 1.55;
  font-weight: 500;
}
.task-title-button:hover {
  color: var(--teal);
}
.task-copy.done .task-title-button {
  text-decoration: line-through;
  color: #95a096;
}

.template-list { display: grid; gap: 8px; }
.template-option { display: flex; gap: 12px; align-items: center; width: 100%; padding: 15px 16px; border: 1px solid var(--line, #dce7e4); border-radius: 10px; background: #fff; color: inherit; text-align: left; font: inherit; cursor: pointer; }
.template-option:hover { background: #f1f8f6; border-color: #89b7a9; }
.template-option svg { width: 21px; height: 21px; flex: 0 0 21px; color: #267866; }
.template-option span:last-child { margin-left: auto; }
