@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/roboto-400.ttf") format("truetype");
}

@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/roboto-500.ttf") format("truetype");
}

@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/roboto-600.ttf") format("truetype");
}

@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/roboto-700.ttf") format("truetype");
}

@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("fonts/roboto-800.ttf") format("truetype");
}

@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url("fonts/roboto-900.ttf") format("truetype");
}

:root {
  color-scheme: light;
  --canvas: #f3f6f5;
  --surface: #ffffff;
  --surface-subtle: #f6f9f8;
  --surface-brand: #eaf5f1;
  --text: #182326;
  --text-soft: #526266;
  --muted: #728084;
  --field-placeholder: #71847e;
  --line: #e5ebe9;
  --line-strong: #d5dfdc;
  --brand: #147661;
  --brand-strong: #0e5c4c;
  --blue: #315f85;
  --blue-soft: #eaf1f7;
  --orange: #b85f2a;
  --orange-soft: #fff0e6;
  --danger: #b63f49;
  --danger-soft: #fff0f1;
  --warning: #96610b;
  --warning-soft: #fff5d9;
  --success: #28704e;
  --success-soft: #e5f5ec;
  --section-content-gap: 14px;
  --shadow-low:
    0 1px 2px rgba(22, 42, 44, 0.035),
    0 7px 20px rgba(22, 42, 44, 0.045);
  --shadow-card:
    0 1px 2px rgba(22, 42, 44, 0.035),
    0 12px 34px rgba(22, 42, 44, 0.055);
  --shadow-dialog: 0 24px 70px rgba(20, 34, 37, 0.2);
  font-family: "Roboto", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  background: var(--canvas);
  font-family: "Roboto", sans-serif;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--canvas);
  color: var(--text);
  font-family: "Roboto", sans-serif;
  font-size: 15px;
  line-height: 1.45;
}

button,
input,
select,
textarea,
summary {
  font: inherit;
  font-family: "Roboto", sans-serif;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

button:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(49, 95, 133, 0.22);
  outline-offset: 2px;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
}

.app-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}

.auth-screen {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 32px 18px;
  background: var(--canvas);
}

.auth-panel {
  display: grid;
  gap: 20px;
  width: min(100%, 520px);
  padding: 28px;
  border: 0;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-dialog);
}

.auth-brand {
  padding: 0;
}

.auth-heading h1 {
  margin: 4px 0 7px;
  font-size: 28px;
  line-height: 1.2;
}

.auth-heading p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.5;
}

.auth-heading .eyebrow {
  color: var(--brand);
}

.google-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  border: 0;
  border-radius: 18px;
  background: rgba(246, 249, 248, 0.78);
  color: var(--text);
  font-weight: 750;
  -webkit-backdrop-filter: blur(12px) saturate(130%);
  backdrop-filter: blur(12px) saturate(130%);
  transition:
    background 150ms ease,
    box-shadow 150ms ease,
    transform 150ms ease;
}

.google-button:hover {
  background: #edf3f1;
  box-shadow: 0 2px 6px rgba(22, 42, 44, 0.1);
}

.google-mark {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: var(--surface);
  color: #315f85;
  font-weight: 800;
}

.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

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

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 4px;
  border: 0;
  border-radius: 11px;
  background: var(--surface-subtle);
}

.auth-tabs button {
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-weight: 750;
}

.auth-tabs button.is-active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 2px 6px rgba(22, 42, 44, 0.08);
}

.auth-form {
  display: grid;
  gap: 15px;
}

.auth-form > .primary-button {
  width: 100%;
}

.auth-link {
  justify-self: center;
}

.auth-message {
  min-height: 18px;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
}

.auth-message.is-error {
  color: var(--danger);
}

.auth-message.is-success {
  color: var(--success);
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 18px;
  height: 100vh;
  padding: 20px 14px;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(234, 245, 241, 0.62) 0, rgba(255, 255, 255, 0) 180px),
    var(--surface);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 92px;
  padding: 0 8px 18px;
  border-bottom: 1px solid rgba(220, 228, 227, 0.78);
}

.brand strong {
  display: block;
  font-size: 19px;
  line-height: 1.2;
}

.brand-wordmark em {
  color: var(--brand);
  font-family: "Roboto", sans-serif;
  font-size: 0.92em;
  font-weight: 600;
}

.brand small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.brand-logo {
  display: block;
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.auth-brand .brand-logo {
  width: 60px;
  height: 60px;
}

.account-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 4px 10px;
  padding: 14px;
  border: 0;
  border-radius: 12px;
  background: var(--surface-subtle);
}

.account-avatar {
  display: grid;
  grid-row: 1 / span 2;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--surface-brand);
  color: var(--brand-strong);
  font-weight: 800;
  overflow: hidden;
}

.account-avatar img,
.catalog-provider-avatar img,
.catalog-profile-avatar img,
.profile-avatar-picture img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-avatar.has-image {
  background: var(--surface-subtle);
  cursor: zoom-in;
}

.account-identity {
  min-width: 0;
}

.account-identity strong,
.account-identity span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-identity strong {
  font-size: 13px;
}

.account-identity span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.account-card label,
.eyebrow,
.section-kicker {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.account-card .text-button {
  grid-column: 2;
  justify-self: start;
}

.account-menu {
  position: relative;
}

.account-menu summary {
  list-style: none;
}

.account-menu summary::-webkit-details-marker {
  display: none;
}

.account-menu summary::marker {
  content: "";
}

.account-menu-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  max-width: 290px;
  padding: 5px 8px 5px 6px;
  border: 0;
  border-radius: 12px;
  background: rgba(20, 118, 97, 0.045);
  cursor: pointer;
  transition:
    background 150ms ease,
    box-shadow 150ms ease;
}

.account-menu-trigger:hover,
.account-menu[open] .account-menu-trigger {
  background: var(--surface-brand);
  box-shadow: 0 3px 7px rgba(24, 48, 43, 0.09);
}

.account-menu-trigger:focus-visible {
  outline: none;
  background: var(--surface-brand);
  box-shadow: 0 0 0 4px rgba(20, 118, 97, 0.08);
}

.account-menu-trigger .account-avatar {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  font-size: 12px;
}

.account-menu-trigger .account-identity {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.account-menu-trigger .account-identity strong {
  font-size: 13.5px;
}

.account-login {
  color: var(--text-soft) !important;
  font-family: "Roboto", sans-serif;
  font-size: 11px !important;
  font-weight: 700;
}

.account-menu-popover {
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  z-index: 20;
  display: grid;
  width: 100%;
  min-width: 0;
  padding: 6px;
  border: 0;
  border-radius: 10px;
  background: #fbfcfc;
  box-shadow: 0 4px 7px rgba(24, 48, 43, 0.12);
}

.account-menu-popover button {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.account-menu-popover svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.account-menu-popover .account-copy-check {
  display: none;
  color: var(--success);
}

.account-menu-popover .is-copied .account-copy-icon {
  display: none;
}

.account-menu-popover .is-copied .account-copy-check {
  display: block;
}

.account-menu-popover button:hover {
  background: #edf3f1;
  color: var(--brand-strong);
}

.account-menu-popover button[hidden] {
  display: none;
}

.account-menu-popover .account-menu-logout {
  margin-top: 4px;
  border-top: 1px solid var(--line);
  border-radius: 8px;
  color: var(--danger);
}

.nav {
  display: grid;
  gap: 3px;
  padding: 2px;
  overflow-y: auto;
}

.nav button {
  display: grid;
  position: relative;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 43px;
  padding: 6px 9px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 680;
  text-align: left;
  transition:
    background 140ms ease,
    color 140ms ease;
}

.nav button:hover {
  background: var(--surface-subtle);
  color: var(--text);
}

.nav button.is-active {
  background: var(--surface-brand);
  color: var(--brand-strong);
}

.nav button:focus-visible {
  outline: none;
  background: var(--surface-brand);
  color: var(--brand-strong);
}

.nav-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: currentColor;
  transition:
    background 140ms ease,
    color 140ms ease,
    box-shadow 140ms ease;
}

.nav-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav button.is-active .nav-icon {
  background: transparent;
  color: currentColor;
  box-shadow: none;
}

.main {
  min-width: 0;
  padding: 0 32px 40px;
}

.topbar {
  position: sticky;
  top: 14px;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
  margin: 14px 0 22px;
  padding: 10px 12px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 8px 28px rgba(24, 48, 43, 0.06);
}

.topbar-heading {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 11px;
  min-width: 0;
  flex-wrap: wrap;
}

.page-save-status {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  gap: 7px;
  border-radius: 9px;
  padding: 5px 9px;
  background: var(--surface-brand);
  color: var(--brand-strong);
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.page-save-status[hidden] {
  display: none;
}

.page-save-status.is-saving {
  background: var(--orange-soft);
  color: #8a5b12;
}

.page-save-status.is-error {
  background: var(--danger-soft);
  color: var(--danger);
}

.page-save-spinner {
  width: 13px;
  height: 13px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: page-save-spin 700ms linear infinite;
}

@keyframes page-save-spin {
  to {
    transform: rotate(360deg);
  }
}

.topbar-title-accent {
  width: 5px;
  height: 30px;
  flex: 0 0 5px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--brand), #56a792);
  box-shadow: 0 4px 12px rgba(20, 118, 97, 0.2);
}

.topbar h1,
.dialog-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 23px;
  line-height: 1.2;
}

.topbar .eyebrow,
.dialog-head .eyebrow {
  margin: 0 0 5px;
  color: var(--brand);
}

.topbar-actions,
.dialog-actions,
.row-actions,
.toolbar,
.quick-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.grant-actions {
  align-items: end;
}

.grant-level-control {
  display: grid;
  flex: 1 1 250px;
  gap: 5px;
  max-width: 360px;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 700;
}

.grant-level-control select {
  min-height: 42px;
}

.cloud-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  max-width: 230px;
  padding: 5px 9px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: var(--success-soft);
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 750;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cloud-status.is-loading {
  background: var(--orange-soft);
}

.cloud-status.is-offline {
  background: var(--danger-soft);
  color: var(--danger);
}

.status-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: none;
}

.status-dot.is-loading {
  background: var(--orange);
  box-shadow: none;
}

.status-dot.is-offline {
  background: var(--danger);
  box-shadow: none;
}

.view {
  display: grid;
  gap: 18px;
  width: min(100%, 1480px);
  margin: 0 auto;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card,
dialog {
  border: 0;
  border-radius: 14px;
  background: var(--surface);
}

.card {
  min-width: 0;
  padding: 22px;
  box-shadow: var(--shadow-card);
}

.card h2,
.card h3 {
  margin: 0;
}

.card > h2 {
  margin-bottom: var(--section-content-gap);
}

.card h2 {
  font-size: 19px;
  line-height: 1.35;
}

.card h3 {
  font-size: 16px;
}

.dashboard-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 6px 2px 4px;
}

.dashboard-intro h2 {
  margin: 0 0 5px;
  font-size: 22px;
  line-height: 1.3;
}

.dashboard-intro p {
  max-width: 650px;
  margin: 0;
  color: var(--text-soft);
  line-height: 1.5;
}

.dashboard-workspace {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(350px, 430px);
  gap: 18px;
  align-items: start;
  min-height: 560px;
}

.dashboard-summary {
  padding: 14px 16px;
  overflow: hidden;
}

.dashboard-summary > h2 {
  margin: 0 0 6px;
  font-size: 15px;
}

.dashboard-summary-list {
  display: grid;
  gap: 2px;
}

.dashboard-summary-item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 34px;
  padding: 7px 9px 7px 14px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 150ms ease;
}

.dashboard-summary-item::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 0;
  width: 4px;
  border-radius: 999px;
  background: rgba(20, 118, 97, 0.28);
  transition: background 150ms ease;
}

.dashboard-summary-item:hover,
.dashboard-summary-item:focus-visible {
  background: var(--surface-brand);
}

.dashboard-summary-item:focus-visible {
  outline: none;
}

.dashboard-summary-item strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.dashboard-summary-item:hover::before,
.dashboard-summary-item:focus-visible::before {
  background: var(--brand);
}

.dashboard-summary-item.tone-brand b {
  color: var(--brand-strong);
}

.dashboard-summary-item.tone-blue b {
  color: var(--blue);
}

.dashboard-summary-item.tone-orange b {
  color: var(--orange);
}

.dashboard-summary-item.is-alert {
  background: var(--orange-soft);
}

.dashboard-summary-item.is-alert::before {
  background: var(--orange);
}

.dashboard-summary-item.is-alert strong,
.dashboard-summary-item.is-alert b {
  color: var(--orange);
}

.dashboard-summary-item b {
  font-size: 18px;
  line-height: 1;
}

.dashboard-journal-space {
  min-height: 520px;
}

.dashboard-activity {
  display: grid;
  gap: 14px;
}

.dashboard-activity .card {
  padding: 16px;
}

.dashboard-activity .dashboard-summary {
  padding: 14px 16px;
}

.dashboard-activity .section-heading {
  align-items: center;
  margin-bottom: var(--section-content-gap);
}

.dashboard-activity .section-heading h2 {
  font-size: 15px;
}

.dashboard-record-list,
.dashboard-audit-list {
  display: grid;
  gap: 3px;
}

.dashboard-record-item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 8px 9px 8px 14px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--text);
  text-align: left;
  transition: background 150ms ease;
}

.dashboard-record-item:hover {
  background: var(--surface-brand);
}

.dashboard-record-mark {
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 0;
  width: 4px;
  height: auto;
  border-radius: 999px;
  background: rgba(20, 118, 97, 0.28);
  transition: background 150ms ease;
}

.clickable-row-mark {
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 0;
  width: 4px;
  height: auto;
  border-radius: 999px;
  background: rgba(20, 118, 97, 0.25);
  transition: background 160ms ease;
}

.dashboard-record-item:hover .dashboard-record-mark {
  background: var(--brand);
}

.dashboard-record-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.dashboard-record-copy strong,
.dashboard-record-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-record-copy strong {
  font-size: 12px;
}

.dashboard-record-copy small {
  color: var(--muted);
  font-size: 11px;
}

.dashboard-audit-item {
  position: relative;
  display: grid;
  grid-template-columns: 7px minmax(0, 1fr);
  gap: 8px;
  padding: 7px 7px;
}

.dashboard-audit-dot {
  width: 7px;
  height: 7px;
  margin-top: 4px;
  border: 2px solid rgba(20, 118, 97, 0.36);
  border-radius: 50%;
  background: var(--surface);
}

.dashboard-audit-item > span:last-child {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.dashboard-audit-item strong {
  overflow: hidden;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-audit-item small {
  color: var(--muted);
  font-size: 11px;
}

.dashboard-diary,
.health-diary-page {
  display: grid;
  gap: 18px;
  align-content: start;
}

.health-diary-heading,
.diary-composer-heading,
.diary-composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.health-diary-heading {
  padding: 4px 2px;
}

.diary-patient-toolbar {
  justify-content: flex-end;
}

.diary-calendar {
  min-width: 0;
}

.diary-calendar-controls {
  display: flex;
  align-items: center;
  min-height: 28px;
  padding: 0 4px;
}

.diary-calendar-controls button {
  min-height: 28px;
  padding: 4px 7px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.diary-calendar-controls button:hover {
  background: var(--surface-brand);
  color: var(--brand-strong);
}

.diary-calendar-controls .is-later {
  margin-left: auto;
}

.diary-calendar-track {
  display: grid;
  grid-template-columns: repeat(15, minmax(64px, 1fr));
  gap: 6px;
  width: 100%;
  padding: 8px 10px 14px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-color: var(--line-strong) transparent;
  scrollbar-width: thin;
  scroll-snap-type: x proximity;
}

.diary-calendar-day {
  position: relative;
  display: block;
  min-width: 0;
  aspect-ratio: 5 / 6;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: #edf1f1;
  color: var(--muted);
  font: inherit;
  scroll-snap-align: center;
}

.diary-calendar-day time {
  position: absolute;
  top: 10px;
  right: 4px;
  left: 4px;
  font-size: 11px;
  font-weight: 750;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.diary-calendar-day strong {
  position: absolute;
  top: 50%;
  left: 50%;
  color: var(--text-soft);
  font-size: 23px;
  line-height: 1;
  transform: translate(-50%, -50%);
}

.diary-calendar-day small {
  position: absolute;
  right: 5px;
  bottom: 7px;
  left: 5px;
  max-width: 66px;
  margin: auto;
  color: inherit;
  font-size: 10px;
  font-weight: 750;
  line-height: 1.1;
  text-align: center;
}

.diary-calendar-day:not(.has-entry) {
  color: rgba(82, 98, 102, 0.58);
}

.diary-calendar-day:not(.has-entry) strong {
  color: rgba(82, 98, 102, 0.42);
}

.diary-calendar-day.has-entry {
  cursor: pointer;
  box-shadow: 0 3px 7px rgba(24, 48, 43, 0.075);
  transition:
    transform 150ms ease,
    box-shadow 150ms ease,
    filter 150ms ease;
}

.diary-calendar-day.has-entry.tone-neutral {
  background: var(--surface);
}

.diary-calendar-day.has-entry:hover {
  z-index: 1;
  transform: translateY(-3px);
  box-shadow: 0 4px 7px rgba(24, 48, 43, 0.13);
  filter: saturate(1.08);
}

.diary-calendar-day.tone-calm {
  background: var(--success-soft);
}

.diary-calendar-day.tone-calm strong {
  color: var(--success);
}

.diary-calendar-day.tone-attention {
  background: var(--warning-soft);
  color: var(--warning);
}

.diary-calendar-day.tone-attention strong {
  color: var(--warning);
}

.diary-calendar-day.tone-danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.diary-calendar-day.tone-danger strong {
  color: var(--danger);
}

.diary-calendar-day.is-today {
  transform: translateY(-2px);
}

.diary-calendar-day.has-entry.is-today:hover {
  transform: translateY(-4px);
}

.diary-calendar-day.is-today::after {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  content: "";
}

.health-diary-heading h2,
.health-diary-heading p,
.diary-composer-heading h2,
.diary-composer-heading p {
  margin: 0;
}

.health-diary-heading p {
  margin-top: 5px;
  color: var(--text-soft);
}

.diary-patient-select {
  min-width: 240px;
}

.diary-composer-panel {
  display: grid;
}

.diary-composer-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 10px 16px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(31, 151, 124, 0.96), rgba(13, 96, 78, 0.94));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    inset 0 -1px 0 rgba(5, 66, 54, 0.16),
    0 3px 7px rgba(20, 118, 97, 0.22);
  color: #fff;
  font-size: 13px;
  font-weight: 780;
  -webkit-backdrop-filter: blur(14px) saturate(135%);
  backdrop-filter: blur(14px) saturate(135%);
  transition:
    background 160ms ease,
    box-shadow 160ms ease;
}

.diary-composer-toggle:hover {
  background: linear-gradient(135deg, rgba(35, 163, 133, 0.97), rgba(11, 85, 69, 0.95));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -1px 0 rgba(5, 66, 54, 0.18),
    0 4px 7px rgba(20, 118, 97, 0.26);
}

.diary-composer-panel.is-open .diary-composer-toggle {
  border: 0;
  background: var(--surface-brand);
  box-shadow: none;
  color: var(--brand-strong);
}

.diary-composer-panel.is-open .diary-composer-toggle:hover {
  background: #e2f0eb;
  box-shadow: none;
}

.diary-composer-toggle-icon {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  transition: transform 220ms ease;
}

.diary-composer-toggle-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.diary-composer-panel.is-open .diary-composer-toggle-icon {
  transform: rotate(180deg);
}

.diary-composer-collapse {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  pointer-events: none;
  transition:
    grid-template-rows 320ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 180ms ease;
}

.diary-composer-collapse > div {
  min-height: 0;
  overflow: hidden;
}

.diary-composer-panel.is-open .diary-composer-collapse {
  grid-template-rows: 1fr;
  opacity: 1;
  pointer-events: auto;
}

.diary-composer {
  display: grid;
  gap: 20px;
  margin-top: 12px;
}

.diary-score-preview {
  display: grid;
  min-width: 72px;
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--surface-brand);
  text-align: center;
}

.diary-score-preview strong {
  color: var(--brand-strong);
  font-size: 22px;
  line-height: 1;
}

.diary-score-preview span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.diary-primary-questions,
.diary-questions {
  display: grid;
  gap: 16px;
}

.diary-questions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 22px;
  position: relative;
}

.diary-questions::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: var(--line);
}

.diary-symptom-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.diary-symptom-heading h3,
.diary-symptom-heading p {
  margin: 0;
}

.diary-symptom-heading h3 {
  font-size: 16px;
}

.diary-symptom-heading p {
  margin-top: 4px;
}

.diary-number-question {
  min-width: 0;
  margin: 0;
  padding: 2px 0;
  border: 0;
  background: transparent;
}

.diary-number-question.is-required {
  padding: 2px 0;
}

.diary-number-question legend {
  max-width: calc(100% - 24px);
  margin-bottom: 9px;
  padding: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
}

.diary-number-question.is-required legend {
  max-width: 100%;
  font-size: 13px;
}

.diary-number-scale {
  display: grid;
  grid-template-columns: repeat(11, minmax(0, 1fr));
  gap: 5px;
  width: 100%;
  max-width: 358px;
}

.diary-number-scale label {
  position: relative;
  cursor: pointer;
}

.diary-number-scale input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.diary-number-scale span {
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 31px;
  aspect-ratio: 1;
  margin: 0 auto;
  border: 1px dashed rgba(90, 110, 112, 0.24);
  border-radius: 50%;
  background: transparent;
  color: rgba(72, 91, 93, 0.7);
  font-size: 12px;
  font-weight: 750;
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    background 150ms ease,
    color 150ms ease,
    box-shadow 150ms ease;
}

.diary-number-scale label:hover span {
  border-color: rgba(20, 118, 97, 0.38);
  color: rgba(20, 118, 97, 0.78);
}

.diary-number-scale input:focus-visible + span {
  outline: 2px solid rgba(20, 118, 97, 0.28);
  outline-offset: 2px;
}

.diary-number-scale input:checked + span {
  transform: translateY(-2px) scale(1.06);
  border: 1.5px solid var(--brand-strong);
  background: rgba(20, 118, 97, 0.1);
  box-shadow:
    0 3px 7px rgba(20, 118, 97, 0.18),
    0 0 0 4px rgba(20, 118, 97, 0.08);
  color: var(--brand-strong);
}

.diary-number-labels {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  width: 358px;
  max-width: 100%;
  margin-top: 7px;
  color: var(--muted);
}

.diary-number-labels small {
  font-size: 11px;
  line-height: 1.35;
}

.diary-note {
  display: grid;
  gap: 7px;
}

.diary-note textarea {
  border: 0;
  border-radius: 14px;
  background-color: rgba(20, 118, 97, 0.045);
  box-shadow: none;
  resize: vertical;
}

.diary-note textarea:hover {
  background-color: rgba(20, 118, 97, 0.07);
  box-shadow: none;
}

.diary-note textarea:focus {
  background-color: var(--surface);
  box-shadow: 0 0 0 4px rgba(20, 118, 97, 0.09);
}

.diary-composer-footer {
  align-items: end;
}

.diary-composer-footer .meta {
  max-width: 460px;
}

.diary-composer.is-compact .diary-composer-footer {
  align-items: stretch;
  flex-direction: column;
}

.diary-composer.is-compact .diary-composer-footer .primary-button {
  width: 100%;
}

.diary-feed-card {
  display: grid;
  gap: var(--section-content-gap);
}

.diary-feed-card > .section-heading {
  margin-bottom: 0;
}

.diary-feed-heading-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.diary-heading-info {
  flex: 0 0 auto;
}

.diary-card-calendar {
  min-width: 0;
  margin-top: -2px;
  padding-bottom: 4px;
}

.diary-card-calendar .diary-calendar-track {
  padding-bottom: 4px;
}

.diary-feed {
  display: grid;
  gap: 3px;
}

.diary-entry {
  position: relative;
  overflow: visible;
  border: 0;
  border-radius: 14px;
  background: transparent;
  transition: background 160ms ease;
}

.diary-entry.is-open {
  background: var(--surface-subtle);
}

.diary-feed-card .diary-entry {
  background: transparent;
  box-shadow: none;
}

.diary-feed-card .diary-entry.is-open {
  background: var(--surface-subtle);
  box-shadow: none;
}

.diary-entry:hover {
  background: var(--surface-brand);
}

.diary-entry:hover .clickable-row-mark,
.diary-entry.is-open .clickable-row-mark {
  background: var(--brand);
}

.diary-entry-mark {
  z-index: 1;
}

.diary-entry-toggle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 58px;
  padding: 8px 9px 8px 14px;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.diary-entry-head {
  display: flex;
  align-items: center;
}

.diary-entry-head .diary-entry-toggle {
  min-width: 0;
  padding-right: 8px;
}

.diary-entry-menu {
  position: relative;
  z-index: 4;
  flex: 0 0 auto;
  margin-right: 10px;
}

.diary-entry-menu summary {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
  transition:
    color 150ms ease,
    background 150ms ease;
}

.diary-entry-menu summary::-webkit-details-marker {
  display: none;
}

.diary-entry-menu summary::marker {
  content: "";
}

.diary-entry-menu summary:hover,
.diary-entry-menu[open] summary {
  color: var(--text);
  background: var(--surface-brand);
}

.diary-entry-menu summary svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.diary-entry-menu-popover {
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  display: grid;
  min-width: 174px;
  padding: 6px;
  border: 0;
  border-radius: 10px;
  background: #fbfcfc;
  box-shadow: 0 4px 7px rgba(22, 42, 44, 0.12);
}

.diary-entry-menu-popover button {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-soft);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.diary-entry-menu-popover button:hover {
  color: var(--brand-strong);
  background: #edf3f1;
}

.diary-entry-menu-popover button.is-danger {
  color: var(--danger);
}

.diary-entry-menu-popover svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.diary-entry-copy {
  min-width: 0;
  flex: 1;
}

.diary-entry-copy strong,
.diary-entry-copy small {
  display: block;
}

.diary-entry-copy strong {
  font-size: 14px;
}

.diary-entry-copy small {
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.diary-entry-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.diary-score {
  display: grid;
  place-items: center;
  min-width: 43px;
  height: 31px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 850;
}

.diary-score.tone-good {
  background: var(--success-soft);
  color: var(--success);
}

.diary-score.tone-medium {
  background: var(--warning-soft);
  color: var(--warning);
}

.diary-score.tone-low {
  background: var(--danger-soft);
  color: var(--danger);
}

.diary-entry-collapse {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  pointer-events: none;
  transition:
    grid-template-rows 320ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 180ms ease;
}

.diary-entry-collapse > div {
  min-height: 0;
  overflow: hidden;
}

.diary-entry.is-open .diary-entry-collapse {
  grid-template-rows: 1fr;
  opacity: 1;
  pointer-events: auto;
}

.diary-entry-content {
  display: grid;
  gap: 15px;
  padding: 3px 14px 15px 23px;
}

.diary-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.diary-metrics > div {
  display: grid;
  align-content: center;
  min-height: 72px;
  padding: 10px 8px;
  border-radius: 8px;
  background: var(--surface);
  text-align: center;
}

.diary-metrics > div.is-primary {
  background: var(--surface);
  box-shadow: inset 0 0 0 1px rgba(20, 118, 97, 0.16);
}

.diary-metrics > div.is-primary span,
.diary-metrics > div.is-primary strong,
.diary-metrics > div.is-primary strong small {
  color: var(--brand-strong);
}

.diary-metrics span,
.diary-entry-note > span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.diary-metrics strong {
  display: block;
  margin-top: 5px;
  font-size: 17px;
}

.diary-metrics strong small {
  color: var(--muted);
  font-size: 11px;
}

.diary-entry-note {
  padding: 12px;
  border-radius: 14px;
  background: var(--surface-brand);
}

.diary-entry-note p {
  margin: 0;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.diary-entry-edit-form {
  display: grid;
  gap: 18px;
  padding: 4px 0 2px;
}

.diary-date-picker {
  position: relative;
  display: grid;
  gap: 7px;
  width: min(100%, 270px);
}

.diary-date-picker.is-open {
  z-index: 30;
}

.diary-date-caption {
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 750;
}

.diary-date-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 0;
  border-radius: 14px;
  background: rgba(20, 118, 97, 0.045);
  box-shadow: none;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    box-shadow 150ms ease,
    background 150ms ease;
}

.diary-date-trigger:hover {
  background: rgba(20, 118, 97, 0.07);
  box-shadow: none;
}

.diary-date-picker.is-open .diary-date-trigger {
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(20, 118, 97, 0.09);
}

.diary-date-trigger svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--brand);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.diary-date-popover,
.native-date-popover {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  z-index: 40;
  width: min(310px, calc(100vw - 48px));
  padding: 12px;
  border: 0;
  border-radius: 10px;
  background: #fbfcfc;
  box-shadow: 0 4px 7px rgba(22, 42, 44, 0.12);
}

.native-date-popover {
  position: fixed;
  z-index: 1000;
  max-height: calc(100vh - 16px);
  overflow-y: auto;
}

.diary-date-popover[hidden],
.native-date-popover[hidden] {
  display: none;
}

.diary-date-calendar-head {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
}

.diary-date-calendar-head strong {
  font-size: 14px;
  text-align: center;
  text-transform: capitalize;
}

.diary-date-calendar-head button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
}

.diary-date-calendar-head button:hover:not(:disabled) {
  background: var(--surface-brand);
  color: var(--brand-strong);
}

.diary-date-calendar-head button:disabled {
  opacity: 0.25;
  cursor: default;
}

.diary-date-calendar-head svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.diary-date-weekdays,
.diary-date-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
}

.diary-date-weekdays {
  margin-bottom: 4px;
}

.diary-date-weekdays span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  text-align: center;
}

.diary-date-days button {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  min-width: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text-soft);
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

.diary-date-days button:hover:not(:disabled):not(.is-selected) {
  background: var(--surface-brand);
  color: var(--brand-strong);
}

.diary-date-days button.is-outside {
  color: #acb8b5;
}

.diary-date-days button.is-today:not(.is-selected) {
  box-shadow: inset 0 0 0 1px rgba(20, 118, 97, 0.32);
  color: var(--brand-strong);
}

.diary-date-days button.is-selected {
  background: var(--brand);
  box-shadow: 0 3px 7px rgba(20, 118, 97, 0.22);
  color: #fff;
}

.diary-date-days button:disabled {
  color: #d5dcda;
  cursor: default;
}

.diary-composer-panel:has(.diary-date-picker.is-open) .diary-composer-collapse > div,
.diary-entry:has(.diary-date-picker.is-open) .diary-entry-collapse > div {
  overflow: visible;
}

.diary-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.section-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: var(--section-content-gap);
}

.section-heading h2 {
  margin-top: 3px;
}

.profile-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 4px 2px 0;
}

.profile-heading h2 {
  margin: 3px 0 0;
  font-size: 22px;
  line-height: 1.3;
}

.patient-workspace {
  display: grid;
  gap: 18px;
  align-content: start;
}

.access-page {
  display: grid;
  gap: 12px;
}

.access-page .access-section-card {
  width: 100%;
  padding: 16px 18px;
}

.access-page .access-section-card > h2 {
  margin-bottom: 10px;
  font-size: 18px;
}

.access-page .empty-state {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 8px;
  padding: 4px 0 2px;
  text-align: left;
}

.access-page .empty-visual {
  display: none;
}

.access-page .empty-state h3 {
  font-size: 13px;
}

.access-page .empty-state p {
  font-size: 12px;
  line-height: 1.35;
}

.access-page .access-grant-item {
  grid-template-columns: minmax(220px, 1fr) minmax(360px, 520px);
  align-items: center;
  gap: 14px;
  padding: 11px 13px;
}

.access-page .access-grant-item .grant-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  margin: 0;
}

.access-page .access-grant-item .grant-level-control {
  grid-template-columns: auto minmax(180px, 1fr);
  align-items: center;
  max-width: none;
}

.access-page .access-grant-item .grant-level-control select {
  min-height: 38px;
}

.patient-workspace-heading {
  align-items: end;
}

.patient-workspace-heading .row-actions {
  justify-content: flex-end;
}

.patient-back-button {
  display: inline-flex;
  margin-bottom: 5px;
}

.patient-medical-profile-card {
  padding-top: 18px;
  padding-bottom: 18px;
}

.patient-workspace-profile-card > .patient-medical-profile-card {
  padding-top: 0;
  padding-bottom: 0;
}

.patient-medical-profile-card .section-heading {
  align-items: center;
  margin-bottom: var(--section-content-gap);
}

.patient-medical-profile-card .section-heading p {
  margin: 3px 0 0;
}

.patient-medical-profile-form > label:not(.wide) {
  grid-column: span 3;
}

.patient-medical-profile-form label.wide {
  grid-column: span 4;
}

.patient-medical-profile-form textarea {
  resize: vertical;
}

.patient-section-heading {
  margin: 0;
  padding: 4px 2px 0;
}

.patient-section-heading h2 {
  font-size: 19px;
}

.patient-section-heading p {
  margin: 4px 0 0;
}

.patient-diary-section {
  display: grid;
  gap: 14px;
}

.medical-record-heading {
  align-items: center;
  gap: 18px;
}

.medical-record-title {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 8px;
}

.medical-record-title h2 {
  margin: 0;
}

.medical-record-total-count {
  border-radius: 999px;
  padding: 3px 7px;
  background: var(--surface-subtle);
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.medical-record-heading-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  gap: 12px;
}

.heading-with-info {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  width: fit-content;
}

.heading-with-info h1,
.heading-with-info h2,
.heading-with-info h3 {
  margin: 0;
}

.heading-info {
  flex: 0 0 auto;
}

.profile-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.profile-columns > .card {
  height: 100%;
}

.profile-personal-main {
  display: grid;
  grid-template-columns: 125px minmax(0, 1fr) minmax(320px, 0.52fr);
  align-items: stretch;
  gap: 16px;
}

.profile-personal-main > .profile-avatar-editor {
  grid-template-columns: 105px;
  align-content: center;
  margin: 0;
}

.profile-personal-main > .profile-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}

.profile-contact-row {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.profile-contact-row.is-clinic {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.profile-account-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  align-content: stretch;
  gap: 7px;
  margin: 0;
  padding: 10px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(20, 118, 97, 0.075), rgba(20, 118, 97, 0.035));
}

.profile-account-heading {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 2px;
}

.profile-account-heading h3 {
  margin: 0;
  font-size: 15px;
  white-space: nowrap;
}

.profile-account-mark {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--brand-strong);
}

.profile-account-mark svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profile-account-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: center;
  align-content: stretch;
  gap: 6px;
}

.profile-account-facts {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-self: center;
  gap: 3px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.48);
}

.profile-account-facts > div {
  display: grid;
  min-width: 0;
  gap: 2px;
  padding: 6px 8px;
}

.profile-account-facts span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.profile-account-facts strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-email-status {
  display: inline-grid;
  place-items: center;
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 850;
}

.account-email-status.is-verified {
  background: var(--success-soft);
  color: var(--success);
}

.account-email-status.is-unverified {
  background: var(--warning-soft);
  color: var(--warning);
}

.account-email-status svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profile-contact-value .account-email-status {
  flex: 0 0 19px;
}

.profile-security-actions,
.form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.profile-security-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin: 0;
  padding: 0;
  background: transparent;
}

.secondary-button.account-action-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 34px;
  padding: 6px 7px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.48);
  box-shadow: none;
  font-size: 11px;
  white-space: nowrap;
}

.secondary-button.account-action-button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.76);
  box-shadow: none;
  color: var(--brand);
}

.account-action-button svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profile-security-actions > .text-button {
  grid-column: 1 / -1;
  min-height: 30px;
  padding: 5px 8px;
}

.form-actions {
  justify-content: flex-start;
  padding-top: 2px;
}

.summary-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 14px;
  min-height: 122px;
  padding-top: 30px;
  overflow: hidden;
}

.summary-card::before {
  position: absolute;
  top: 16px;
  left: 20px;
  width: 32px;
  height: 3px;
  border-radius: 999px;
  background: var(--brand);
  content: "";
}

.summary-card.tone-blue::before {
  background: var(--blue);
}

.summary-card.tone-orange::before {
  background: var(--orange);
}

.summary-card > span:first-child {
  align-self: center;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 700;
}

.summary-card strong {
  grid-row: 1 / span 2;
  grid-column: 2;
  align-self: center;
  color: var(--text);
  font-size: 34px;
  line-height: 1;
}

.summary-card > span:last-child {
  align-self: start;
  color: var(--muted);
  font-size: 12px;
}

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

.meta {
  margin-top: 3px;
  font-size: 13px;
  line-height: 1.45;
}

.list {
  display: grid;
  gap: 8px;
}

.list-item {
  display: grid;
  gap: 11px;
  padding: 14px 15px;
  border: 0;
  border-radius: 11px;
  background: var(--surface-subtle);
}

.card > .list .list-item {
  padding: 13px 14px;
  border: 0;
  border-radius: 10px;
  background: var(--surface-subtle);
}

.card > .list .list-item:first-child {
  padding-top: 13px;
}

.card > .list .list-item:last-child {
  padding-bottom: 13px;
}

.list-item-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.list-item-head strong {
  display: block;
  line-height: 1.4;
}

.badge-row {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  max-width: 100%;
  padding: 4px 8px;
  border-radius: 999px;
  background: #edf2f1;
  color: #3f5559;
  font-size: 11px;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.badge.warning {
  background: var(--warning-soft);
  color: var(--warning);
}

.badge.success {
  background: var(--success-soft);
  color: var(--success);
}

.badge.danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.primary-button,
.secondary-button,
.danger-button,
.text-button,
.icon-button,
.text-link {
  min-height: 44px;
  border: 0;
  border-radius: 18px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 750;
  transition:
    background 140ms ease,
    color 140ms ease,
    box-shadow 140ms ease;
}

.primary-button {
  background: linear-gradient(135deg, rgba(31, 151, 124, 0.96), rgba(13, 96, 78, 0.94));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    inset 0 -1px 0 rgba(5, 66, 54, 0.16),
    0 3px 7px rgba(20, 118, 97, 0.22);
  color: #fff;
  -webkit-backdrop-filter: blur(14px) saturate(135%);
  backdrop-filter: blur(14px) saturate(135%);
}

.primary-button:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(35, 163, 133, 0.97), rgba(11, 85, 69, 0.95));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -1px 0 rgba(5, 66, 54, 0.18),
    0 4px 7px rgba(20, 118, 97, 0.26);
}

.primary-button:active:not(:disabled) {
  background: #0e624f;
  box-shadow:
    inset 0 2px 4px rgba(7, 55, 45, 0.16),
    0 2px 5px rgba(20, 118, 97, 0.2);
}

.secondary-button {
  background: rgba(228, 242, 237, 0.76);
  color: var(--brand-strong);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 3px 7px rgba(20, 118, 97, 0.1);
  -webkit-backdrop-filter: blur(12px) saturate(125%);
  backdrop-filter: blur(12px) saturate(125%);
}

.secondary-button:hover:not(:disabled) {
  background: rgba(211, 235, 226, 0.86);
  color: var(--brand-strong);
  box-shadow: 0 4px 7px rgba(20, 118, 97, 0.14);
}

.danger-button {
  background: rgba(255, 232, 234, 0.78);
  color: var(--danger);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 3px 7px rgba(182, 63, 73, 0.1);
  -webkit-backdrop-filter: blur(12px) saturate(125%);
  backdrop-filter: blur(12px) saturate(125%);
}

.danger-button:hover:not(:disabled) {
  background: rgba(255, 215, 219, 0.88);
  box-shadow: 0 4px 7px rgba(182, 63, 73, 0.14);
}

.danger-zone {
  gap: 0;
  padding: 0;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.danger-zone-heading {
  padding: 20px 22px;
  background: #fff9f9;
}

.danger-zone-heading h2 {
  color: var(--danger);
}

.danger-zone-heading p,
.danger-zone-action p {
  margin: 5px 0 0;
}

.danger-zone-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 22px;
}

.danger-zone-action .danger-button {
  flex: 0 0 auto;
}

#confirmPhraseField {
  display: grid;
  gap: 7px;
  color: var(--text);
  font-weight: 700;
}

#confirmPhraseField[hidden] {
  display: none;
}

.record-delete-button {
  min-height: 28px;
  padding: 4px 9px;
  font-size: 11px;
}

.text-button,
.text-link {
  min-height: auto;
  padding: 4px 7px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--brand-strong);
  font-size: 12px;
  text-align: left;
}

.text-link:hover,
.text-button:hover {
  background: var(--surface-brand);
  text-decoration: none;
}

.danger-text {
  color: var(--danger);
}

.icon-button {
  display: grid;
  place-items: center;
  width: 40px;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: rgba(228, 242, 237, 0.76);
  color: var(--brand-strong);
  font-size: 22px;
  line-height: 1;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 3px 7px rgba(20, 118, 97, 0.1);
  -webkit-backdrop-filter: blur(12px) saturate(125%);
  backdrop-filter: blur(12px) saturate(125%);
}

.icon-button:hover:not(:disabled) {
  background: rgba(211, 235, 226, 0.86);
  color: var(--brand-strong);
  box-shadow: 0 4px 7px rgba(20, 118, 97, 0.14);
}

.dialog-close-button,
.doctor-service-remove,
.contact-link-remove {
  position: relative;
  flex: 0 0 auto;
  overflow: hidden;
  font-size: 0;
}

.dialog-close-button {
  width: 34px;
  height: 34px;
  min-height: 34px;
  border-radius: 13px;
}

.dialog-close-button::before,
.dialog-close-button::after,
.doctor-service-remove::before,
.doctor-service-remove::after,
.contact-link-remove::before,
.contact-link-remove::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 1.5px;
  border-radius: 999px;
  background: currentColor;
  content: "";
  transform-origin: center;
}

.dialog-close-button::before,
.doctor-service-remove::before,
.contact-link-remove::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.dialog-close-button::after,
.doctor-service-remove::after,
.contact-link-remove::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.button-icon {
  display: inline-grid;
  place-items: center;
  width: 18px;
  font-size: 17px;
  line-height: 1;
}

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

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 14px;
  padding: 10px 12px;
  background-color: rgba(20, 118, 97, 0.045);
  box-shadow: none;
  color: var(--text);
  font-size: 13px;
  font-style: normal;
  font-weight: 650;
  line-height: 1.5;
  letter-spacing: normal;
  transition:
    background-color 140ms ease,
    box-shadow 140ms ease;
}

input::placeholder,
textarea::placeholder {
  color: var(--field-placeholder);
  font-weight: 550;
  opacity: 1;
}

select {
  appearance: none;
  padding-right: 38px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--text-soft) 50%),
    linear-gradient(135deg, var(--text-soft) 50%, transparent 50%);
  background-position:
    calc(100% - 17px) 50%,
    calc(100% - 12px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  color-scheme: light;
}

select option {
  background: #fbfcfc;
  color: var(--text);
}

.select-options-popover {
  position: fixed;
  z-index: 1000;
  display: grid;
  gap: 1px;
  max-height: 280px;
  padding: 6px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 0;
  border-radius: 10px;
  background: #fbfcfc;
  box-shadow: 0 4px 7px rgba(24, 48, 43, 0.12);
}

.select-options-popover[hidden] {
  display: none;
}

.select-options-popover button {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-soft);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}

.select-options-popover button:hover,
.select-options-popover button.is-active {
  background: #edf3f1;
  color: var(--brand-strong);
}

.select-options-popover button.is-selected {
  background: var(--surface-brand);
  color: var(--brand-strong);
}

.select-options-popover button.is-active.is-selected {
  background: #dceee8;
}

.select-options-popover button:disabled {
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.5;
}

select.is-options-open {
  background-color: var(--surface);
  box-shadow: 0 0 0 4px rgba(20, 118, 97, 0.09);
}

input:hover,
select:hover,
textarea:hover {
  background-color: rgba(20, 118, 97, 0.07);
  box-shadow: none;
}

input:focus,
select:focus,
textarea:focus {
  background-color: var(--surface);
  box-shadow: 0 0 0 4px rgba(20, 118, 97, 0.09);
}

input[type="date"] {
  border: 0;
  border-radius: 14px;
  background-color: rgba(20, 118, 97, 0.045);
  box-shadow: none;
  cursor: pointer;
}

input[type="date"]:hover {
  border: 0;
  background-color: rgba(20, 118, 97, 0.07);
  box-shadow: none;
}

input[type="date"]:focus {
  border: 0;
  background-color: var(--surface);
  box-shadow: 0 0 0 4px rgba(20, 118, 97, 0.09);
}

input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.68;
  pointer-events: none;
}

.native-date-field {
  position: relative;
  display: block;
  width: 100%;
}

.native-date-display {
  width: 100%;
  min-height: 42px;
  box-sizing: border-box;
  border: 0;
  border-radius: 14px;
  padding: 10px 38px 10px 12px;
  background: rgba(20, 118, 97, 0.045);
  color: var(--text);
  box-shadow: none;
  font-family: inherit;
  font-size: 14px;
  transition: background-color 150ms ease, box-shadow 150ms ease;
}

.native-date-display.is-placeholder {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.native-date-field:hover .native-date-display {
  background: rgba(20, 118, 97, 0.07);
}

.native-date-field:focus-within .native-date-display {
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(20, 118, 97, 0.09);
}

.native-date-field.is-invalid .native-date-display {
  box-shadow: 0 0 0 2px rgba(177, 64, 64, 0.2);
}

.native-date-field.is-disabled .native-date-display {
  background: rgba(28, 48, 44, 0.035);
  color: var(--muted);
}

.native-date-field.is-disabled .native-date-control {
  cursor: default;
}

.native-date-control {
  position: absolute;
  z-index: 2;
  top: 0;
  right: 0;
  width: 40px;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.native-date-calendar-period {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(78px, 0.65fr);
  gap: 5px;
}

.native-date-calendar-period select {
  min-width: 0;
  min-height: 34px;
  padding: 6px 24px 6px 9px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 650;
  text-transform: capitalize;
}

.native-date-icon {
  position: absolute;
  z-index: 1;
  top: 50%;
  right: 12px;
  width: 18px;
  height: 18px;
  color: var(--muted);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: translateY(-50%);
  pointer-events: none;
}

input[readonly] {
  background: rgba(28, 48, 44, 0.035);
  color: var(--text);
  box-shadow: none;
  cursor: default;
}

.phone-field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  width: 100%;
}

.contact-visibility-control {
  align-self: center;
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin: 0 8px 0 2px;
  border-radius: 50%;
  color: var(--primary);
  cursor: pointer;
  flex: 0 0 auto;
}

.contact-visibility-control:hover {
  background: rgba(20, 118, 97, 0.09);
}

.contact-visibility-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.contact-visibility-eye {
  grid-area: 1 / 1;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-visibility-control input:checked ~ .is-hidden,
.contact-visibility-control input:not(:checked) ~ .is-visible {
  display: none;
}

.contact-visibility-control:has(input:focus-visible) {
  outline: 3px solid rgba(20, 118, 97, 0.18);
  outline-offset: 1px;
}

.profile-contact-field {
  min-width: 0;
}

.profile-contact-value {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding-left: 14px;
  border-radius: 14px;
  background: rgba(20, 118, 97, 0.045);
}

.profile-contact-value strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-contact-email {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  margin-right: auto;
}

.phone-prefix {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-right: 0;
  border-radius: 10px 0 0 10px;
  background: var(--surface-subtle);
  box-shadow:
    inset 1px 0 0 var(--line-strong),
    inset 0 1px 0 var(--line-strong),
    inset 0 -1px 0 var(--line-strong);
  color: var(--text);
  white-space: nowrap;
}

.phone-flag {
  display: block;
  width: 22px;
  height: 15px;
  overflow: hidden;
  border: 1px solid rgba(23, 37, 35, 0.14);
  border-radius: 3px;
  box-shadow: 0 1px 2px rgba(23, 37, 35, 0.08);
}

.phone-prefix strong {
  font-size: 13px;
  letter-spacing: 0.02em;
}

.phone-field input {
  border-radius: 0 10px 10px 0;
}

textarea {
  min-height: 112px;
  resize: vertical;
  line-height: 1.5;
}

label {
  display: grid;
  gap: 7px;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 750;
}

.field-label-with-info {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
}

.field-info {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border: 1px solid rgba(82, 98, 102, 0.28);
  border-radius: 50%;
  background: transparent;
  color: rgba(82, 98, 102, 0.5);
  font-family: inherit;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  line-height: 1;
  cursor: help;
  transition: border-color 140ms ease, color 140ms ease;
}

.field-info:hover,
.field-info:focus {
  border-color: rgba(82, 98, 102, 0.48);
  color: rgba(82, 98, 102, 0.76);
}

.field-info:focus-visible {
  outline: 2px solid rgba(20, 118, 97, 0.28);
  outline-offset: 2px;
}

.field-tooltip {
  position: absolute;
  bottom: calc(100% + 9px);
  left: 50%;
  z-index: 25;
  width: 250px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px 12px;
  background: var(--surface);
  color: var(--text-soft);
  box-shadow: 0 10px 30px rgba(22, 42, 44, 0.12);
  font-family: inherit;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
  text-align: left;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px);
  transition:
    opacity 140ms ease,
    transform 140ms ease;
}

.field-info:hover .field-tooltip,
.field-info:focus .field-tooltip {
  opacity: 1;
  transform: translate(-50%, 0);
}

.catalog-qr-match {
  border-color: rgba(20, 118, 97, 0.32);
  background: var(--surface-brand);
  box-shadow: 0 0 0 3px rgba(20, 118, 97, 0.06);
}

.catalog-directory {
  display: grid;
  gap: var(--section-content-gap);
}

.catalog-directory > h2 {
  margin-bottom: 0;
}

.catalog-directory-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.catalog-directory-heading h2 {
  margin: 0;
}

.catalog-results-count {
  border-radius: 999px;
  padding: 4px 9px;
  background: rgba(20, 118, 97, 0.07);
  color: var(--brand-strong);
  font-size: 11px;
  font-weight: 750;
}

.catalog-results-heading {
  margin-top: 2px;
}

.catalog-filters {
  display: grid;
  gap: 10px;
  border-radius: 14px;
  padding: 11px 12px 12px;
  background: rgba(246, 249, 248, 0.88);
}

.catalog-filter-reset {
  flex: 0 0 auto;
  min-height: 28px;
  border: 0;
  border-radius: 12px;
  padding: 5px 9px;
  background: rgba(20, 118, 97, 0.075);
  color: var(--brand-strong);
  font-size: 11px;
  font-weight: 750;
}

.catalog-filter-reset:hover:not(:disabled) {
  background: rgba(20, 118, 97, 0.12);
}

.catalog-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.catalog-filter-field {
  position: relative;
  display: grid;
  align-content: start;
  min-width: 0;
  gap: 5px;
}

.catalog-filter-wide {
  grid-column: span 2;
}

.catalog-filter-field > span {
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 700;
}

.catalog-filter-select {
  position: relative;
}

.catalog-filter-select summary {
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  outline: none;
}

.catalog-filter-text {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 11px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  outline: none;
  transition: border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}

.catalog-filter-text::placeholder {
  color: var(--field-placeholder);
  font-weight: 550;
  opacity: 1;
}

.catalog-filter-text:hover,
.catalog-filter-text:focus {
  border-color: rgba(20, 118, 97, 0.15);
  background: #fff;
}

.catalog-filter-text:focus {
  box-shadow: 0 0 0 3px rgba(20, 118, 97, 0.08);
}

.catalog-filter-id {
  text-transform: uppercase;
}

.catalog-filter-choice {
  padding-right: 30px;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--text-soft) 50%),
    linear-gradient(135deg, var(--text-soft) 50%, transparent 50%);
  background-position:
    calc(100% - 16px) 50%,
    calc(100% - 11px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.catalog-filter-select summary {
  position: relative;
  padding: 8px 30px 8px 10px;
  list-style: none;
  cursor: pointer;
}

.catalog-filter-select summary::after {
  position: absolute;
  top: 50%;
  right: 12px;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid var(--text-soft);
  border-bottom: 1.5px solid var(--text-soft);
  content: "";
  transform: translateY(-65%) rotate(45deg);
}

.catalog-filter-select summary::-webkit-details-marker {
  display: none;
}

.catalog-filter-select summary span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-filter-select[open] summary,
.catalog-filter-select summary:hover {
  border-color: rgba(20, 118, 97, 0.15);
  background: #fff;
}

.catalog-filter-options {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  z-index: 32;
  display: grid;
  width: max(100%, 210px);
  max-height: 190px;
  overflow-y: auto;
  border-radius: 11px;
  padding: 5px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(22, 42, 44, 0.13);
}

.catalog-filter-options label {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  border-radius: 8px;
  padding: 5px 7px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.catalog-filter-options label:hover {
  background: rgba(20, 118, 97, 0.055);
}

.catalog-filter-options input {
  display: grid;
  width: 17px;
  min-width: 17px;
  min-height: 17px;
  height: 17px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  margin: 0;
  padding: 0;
  appearance: none;
  background: #fff;
}

.catalog-filter-options input::after {
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  content: "";
  opacity: 0;
  transform: translateY(-1px) rotate(45deg);
}

.catalog-filter-options input:checked {
  border-color: var(--brand);
  background: var(--brand);
}

.catalog-filter-options input:checked::after {
  opacity: 1;
}

.catalog-directory-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.catalog-directory-grid > .empty-state {
  grid-column: 1 / -1;
}

.catalog-provider-card {
  --catalog-provider-avatar-size: clamp(54px, 4.5vw, 64px);
  display: grid;
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 13px 14px;
  background: var(--surface-subtle);
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: background-color 150ms ease;
}

.catalog-provider-card:focus-visible {
  box-shadow: 0 0 0 3px rgba(20, 118, 97, 0.12);
  outline: none;
}

.catalog-provider-card:hover {
  background: rgba(20, 118, 97, 0.065);
}

.catalog-provider-card.catalog-qr-match {
  background: var(--surface-brand);
  box-shadow: none;
}

.catalog-provider-main {
  display: grid;
  grid-template-columns: var(--catalog-provider-avatar-size) minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
}

.catalog-provider-avatar {
  display: grid;
  width: var(--catalog-provider-avatar-size);
  height: var(--catalog-provider-avatar-size);
  place-items: center;
  border: 1px solid rgba(20, 118, 97, 0.12);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--brand-strong);
  font-size: clamp(16px, 1.35vw, 20px);
  font-weight: 800;
  letter-spacing: 0.02em;
  overflow: hidden;
}

.avatar-image-button {
  min-height: 0;
  border: 0;
  padding: 0;
  cursor: zoom-in;
}

.avatar-image-button:hover {
  transform: none;
  box-shadow: 0 0 0 4px rgba(20, 118, 97, 0.08);
}

.avatar-image-button:focus-visible {
  outline: 3px solid rgba(20, 118, 97, 0.22);
  outline-offset: 2px;
}

.catalog-provider-copy {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.catalog-provider-heading {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 10px;
}

.catalog-provider-heading > strong {
  font-size: 15px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.catalog-provider-heading > .badge.code {
  margin-top: 1px;
}

.catalog-provider-meta {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.catalog-provider-meta > span + span:not(.catalog-provider-experience)::before {
  margin-right: 8px;
  color: rgba(82, 98, 102, 0.35);
  content: "·";
}

.catalog-provider-experience {
  border-radius: 999px;
  padding: 3px 7px;
  background: rgba(20, 118, 97, 0.08);
  color: var(--brand-strong);
  font-size: 11px;
  font-weight: 700;
}

.catalog-provider-side {
  display: grid;
  flex: 0 0 auto;
  justify-items: end;
  gap: 8px;
}

.catalog-provider-inactive {
  line-height: 1.35;
}

.catalog-book-button {
  min-height: 34px;
  border-radius: 10px;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 750;
}

.catalog-book-button {
  border: 1px solid rgba(20, 118, 97, 0.22);
  background: transparent;
  color: var(--brand-strong);
}

.catalog-book-button:hover {
  border-color: rgba(20, 118, 97, 0.38);
  background: rgba(20, 118, 97, 0.06);
}

.catalog-profile-page {
  display: grid;
  gap: 12px;
}

.catalog-profile-back {
  justify-self: start;
}

.catalog-profile-card {
  display: grid;
  gap: 18px;
}

.catalog-profile-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.catalog-profile-avatar {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: var(--surface-brand);
  color: var(--brand-strong);
  font-size: 22px;
  font-weight: 800;
  overflow: hidden;
}

.profile-avatar-editor {
  display: grid;
  grid-template-columns: 105px;
  width: 125px;
  height: 125px;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  padding: 10px;
  border-radius: 14px;
  background: var(--surface-subtle);
}

.profile-avatar-picture {
  display: grid;
  place-items: center;
  width: 105px;
  height: 105px;
  min-height: 105px;
  overflow: hidden;
  border: 0;
  border-radius: 22px;
  padding: 0;
  background: var(--surface-brand);
  color: var(--brand-strong);
  font-size: 28px;
  font-weight: 800;
  cursor: pointer;
}

.profile-avatar-picture:hover {
  transform: none;
  box-shadow: 0 0 0 4px rgba(20, 118, 97, 0.08);
}

.profile-avatar-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.catalog-profile-title {
  min-width: 0;
}

.catalog-profile-title h2 {
  overflow: hidden;
  margin: 2px 0 3px;
  font-size: 24px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-profile-title-line {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-wrap: nowrap;
}

.catalog-profile-medpass-id {
  color: var(--text-soft);
  font-size: 15px;
  font-weight: 750;
  white-space: nowrap;
}

.catalog-profile-copy-id {
  display: inline-grid;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  place-items: center;
  border: 0;
  border-radius: 9px;
  padding: 0;
  background: rgba(20, 118, 97, 0.07);
  color: var(--brand-strong);
}

.catalog-profile-copy-id:hover,
.catalog-profile-copy-id.is-copied {
  background: var(--surface-brand);
}

.catalog-profile-copy-id svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.catalog-profile-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.catalog-profile-content-grid p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.65;
  white-space: pre-line;
}

.catalog-profile-content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.catalog-profile-content-grid section {
  display: grid;
  align-content: start;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 15px;
  background: var(--surface);
}

.catalog-profile-content-grid section:first-child {
  grid-column: 1 / -1;
}

.catalog-profile-detail {
  display: grid;
  gap: 5px;
  min-height: 76px;
  border-radius: 12px;
  padding: 13px 14px;
  background: var(--surface-subtle);
}

.catalog-profile-detail span {
  color: var(--muted);
  font-size: 11px;
}

.catalog-profile-detail strong {
  font-size: 14px;
  line-height: 1.4;
}

.catalog-doctor-profile-layout {
  display: grid;
}

.catalog-doctor-section {
  gap: 14px;
}

.catalog-doctor-field {
  display: grid;
  align-content: start;
  gap: 7px;
  min-height: 64px;
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(20, 118, 97, 0.045);
}

.catalog-doctor-field span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.catalog-doctor-field strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.5;
}

.catalog-doctor-field.is-multiline {
  min-height: 0;
}

.catalog-doctor-field.is-multiline strong {
  white-space: pre-line;
}

.catalog-doctor-field.is-wide {
  grid-column: 1 / -1;
}

.catalog-doctor-section .catalog-profile-credentials {
  padding-top: 2px;
}

.catalog-credential-open {
  grid-template-columns: 38px minmax(0, 1fr);
  width: 100%;
  border: 0;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: background-color 140ms ease, transform 140ms ease;
}

.catalog-credential-open:hover,
.catalog-credential-open:focus-visible {
  outline: none;
  background: var(--surface-brand);
}

.catalog-credential-open:active {
  transform: translateY(1px);
}

.catalog-doctor-services {
  display: grid;
  gap: 8px;
}

.catalog-doctor-service-list {
  display: grid;
  gap: 7px;
}

.catalog-doctor-service-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 48px;
  border-radius: 12px;
  padding: 9px 12px;
  background: rgba(20, 118, 97, 0.045);
}

.catalog-doctor-service-item strong {
  font-size: 13px;
}

.catalog-doctor-service-item span {
  color: var(--brand-strong);
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
}

.catalog-profile-team {
  display: grid;
  gap: 12px;
}

.catalog-profile-team h3 {
  margin: 0;
}

.catalog-profile-team-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.city-combobox {
  position: relative;
  width: 100%;
}

.city-options {
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  left: 0;
  z-index: 30;
  max-height: 250px;
  padding: 6px;
  overflow-y: auto;
  border: 0;
  border-radius: 10px;
  background: #fbfcfc;
  box-shadow: 0 4px 7px rgba(24, 48, 43, 0.12);
}

.city-options[hidden] {
  display: none;
}

.city-option {
  display: block;
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}

.city-option:hover,
.city-option.is-active {
  background: #edf3f1;
  color: var(--brand-strong);
}

.city-options-empty {
  display: block;
  padding: 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 550;
  line-height: 1.4;
}

.field-hint {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}

.form-grid .wide {
  grid-column: 1 / -1;
}

.profile-form {
  gap: 16px;
}

.profile-form-section-title {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  margin-top: 6px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.profile-form-section-title strong {
  font-size: 16px;
}

.form-field {
  display: grid;
  gap: 8px;
}

.form-field-label {
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 750;
}

.doctor-language-select {
  position: relative;
}

.profile-form .doctor-language-select summary,
.doctor-credentials-upload .doctor-language-select summary {
  display: block;
  min-height: 44px;
  border: 0;
  border-radius: 14px;
  padding: 10px 38px 10px 12px;
  background-color: rgba(20, 118, 97, 0.045);
  background-image:
    linear-gradient(45deg, transparent 50%, var(--text-soft) 50%),
    linear-gradient(135deg, var(--text-soft) 50%, transparent 50%);
  background-position:
    calc(100% - 17px) 50%,
    calc(100% - 12px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  color: var(--text);
  font-family: "Roboto", sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.45;
  list-style: none;
  cursor: pointer;
  outline: none;
  transition: background-color 140ms ease, box-shadow 140ms ease;
}

.profile-form .doctor-language-select .doctor-multiselect-summary-input,
.doctor-credentials-upload .doctor-language-select .doctor-multiselect-summary-input {
  display: block;
  width: 100%;
  min-height: 0;
  height: auto;
  border: 0;
  border-radius: 0;
  margin: 0;
  padding: 0;
  appearance: none;
  background: transparent;
  box-shadow: none;
  pointer-events: none;
}

.profile-form .doctor-language-select .doctor-multiselect-summary-input,
.doctor-credentials-upload .doctor-language-select .doctor-multiselect-summary-input {
  color: var(--text);
  font-family: "Roboto", sans-serif;
  font-size: 13px;
  font-style: normal;
  font-weight: 650;
  line-height: 1.5;
  letter-spacing: normal;
  opacity: 1;
}

.profile-form .doctor-language-select .doctor-multiselect-summary-input::placeholder,
.doctor-credentials-upload .doctor-language-select .doctor-multiselect-summary-input::placeholder {
  color: var(--field-placeholder);
  font-family: "Roboto", sans-serif;
  font-size: 13px;
  font-style: normal;
  font-weight: 550;
  line-height: 1.5;
  letter-spacing: normal;
  opacity: 1;
}

.doctor-language-select summary::-webkit-details-marker {
  display: none;
}

.doctor-language-select[open] summary {
  background-color: rgba(20, 118, 97, 0.07);
  box-shadow: none;
}

.doctor-language-select summary:focus-visible {
  box-shadow: 0 0 0 4px rgba(20, 118, 97, 0.09);
}

.doctor-language-chevron {
  display: none;
}

.doctor-language-options {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 32px;
  align-content: start;
  width: 360px;
  max-width: 100%;
  max-height: 142px;
  overflow-y: auto;
  border: 0;
  border-radius: 10px;
  padding: 6px;
  background: #fbfcfc;
  box-shadow: 0 4px 7px rgba(24, 48, 43, 0.12);
  font-family: "Roboto", sans-serif;
}

.profile-form .doctor-language-options label,
.doctor-credentials-upload .doctor-language-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 0;
  height: 32px;
  border-radius: 8px;
  padding: 4px 8px;
  color: var(--text-soft);
  font-family: "Roboto", sans-serif;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
  cursor: pointer;
}

.profile-form .doctor-language-options label:hover,
.doctor-credentials-upload .doctor-language-options label:hover {
  background: #edf3f1;
  color: var(--brand-strong);
}

.profile-form .doctor-language-options input,
.doctor-credentials-upload .doctor-language-options input {
  display: grid;
  place-items: center;
  width: 17px;
  min-height: 17px;
  height: 17px;
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  margin: 0;
  padding: 0;
  appearance: none;
  background: var(--surface);
  box-shadow: none !important;
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}

.profile-form .doctor-language-options input::after,
.doctor-credentials-upload .doctor-language-options input::after {
  width: 5px;
  height: 9px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  content: "";
  opacity: 0;
  transform: translateY(-1px) rotate(45deg);
}

.profile-form .doctor-language-options input:hover,
.doctor-credentials-upload .doctor-language-options input:hover {
  border-color: var(--brand);
  background: var(--surface);
}

.profile-form .doctor-language-options input:focus-visible,
.doctor-credentials-upload .doctor-language-options input:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(20, 118, 97, 0.14) !important;
}

.profile-form .doctor-language-options input:checked,
.doctor-credentials-upload .doctor-language-options input:checked {
  border-color: var(--brand);
  background: var(--brand);
}

.profile-form .doctor-language-options input:checked:hover,
.doctor-credentials-upload .doctor-language-options input:checked:hover {
  background: var(--brand-strong);
}

.profile-form .doctor-language-options input:checked::after,
.doctor-credentials-upload .doctor-language-options input:checked::after {
  opacity: 1;
}

.doctor-specialties-options,
.doctor-work-places-options {
  display: block;
  width: min(480px, calc(100vw - 48px));
  max-width: none;
  max-height: none;
  overflow: hidden;
}

.doctor-specialties-search-wrap,
.doctor-work-places-search-wrap {
  padding: 2px 2px 6px;
}

.profile-form .doctor-specialties-options .doctor-specialties-search,
.profile-form .doctor-work-places-options .doctor-work-places-search {
  display: block;
  width: 100%;
  height: 38px;
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  padding: 8px 11px;
  appearance: none;
  background: rgba(20, 118, 97, 0.055);
  color: var(--text);
  font-family: "Roboto", sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: text;
}

.profile-form .doctor-specialties-options .doctor-specialties-search::after,
.profile-form .doctor-work-places-options .doctor-work-places-search::after {
  content: none;
}

.doctor-specialties-list,
.doctor-work-places-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 34px;
  max-height: 238px;
  overflow-y: auto;
}

.profile-form .doctor-specialties-list label,
.profile-form .doctor-work-places-list label {
  height: 34px;
}

.doctor-work-place-option-copy {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.doctor-work-place-custom-note {
  color: var(--muted);
  font-size: 10px;
  font-weight: 550;
}

.doctor-work-place-add-custom {
  width: 100%;
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  margin-top: 5px;
  background: rgba(20, 118, 97, 0.07);
  color: var(--brand-strong);
  font: 650 12px/1.4 "Roboto", sans-serif;
  cursor: pointer;
}

.doctor-work-place-add-custom:hover {
  background: rgba(20, 118, 97, 0.12);
}

.doctor-services-field {
  display: grid;
  grid-column: 1 / -1;
  gap: 8px;
}

.doctor-services-editor {
  display: grid;
  gap: 8px;
}

.doctor-service-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px 90px 34px;
  align-items: center;
  gap: 8px;
}

.doctor-service-row input[name="servicePrice"] {
  text-align: right;
}

.doctor-service-remove {
  width: 28px;
  height: 28px;
  min-height: 28px;
  border-radius: 10px;
  padding: 0;
  color: var(--danger);
  background: rgba(182, 63, 73, 0.055);
  box-shadow: 0 2px 5px rgba(182, 63, 73, 0.06);
}

.doctor-service-remove:hover:not(:disabled) {
  background: rgba(182, 63, 73, 0.1);
  color: var(--danger);
  box-shadow: 0 2px 6px rgba(182, 63, 73, 0.1);
}

.doctor-service-add {
  justify-self: start;
  min-height: 38px;
}

.doctor-professional-profile-form {
  display: grid;
  gap: 0;
}

.doctor-profile-section {
  display: grid;
  gap: var(--section-content-gap);
  border-top: 1px solid rgba(90, 110, 112, 0.1);
  padding: 16px 0;
}

.doctor-profile-section:first-child {
  border-top: 0;
  padding-top: 2px;
}

.profile-section-heading {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}

.doctor-profile-core-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 14px;
}

.doctor-profile-text-grid,
.doctor-profile-practice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
}

.doctor-professional-profile-form .doctor-profile-practice-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.catalog-doctor-section .doctor-profile-text-grid {
  align-items: stretch;
}

.catalog-doctor-section .doctor-profile-text-grid > .catalog-doctor-field {
  height: 100%;
}

.doctor-profile-practice-grid > [data-field="services"] {
  grid-column: 1 / -1;
}

.public-contact-setting {
  display: flex;
  align-items: center;
  gap: 8px;
}

.public-contact-toggle {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.public-contact-toggle > input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.public-contact-switch {
  position: relative;
  width: 34px;
  height: 20px;
  border-radius: 999px;
  background: rgba(82, 98, 102, 0.2);
  transition: background-color 150ms ease;
}

.public-contact-switch::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(22, 42, 44, 0.2);
  content: "";
  transition: transform 150ms ease;
}

.public-contact-toggle > input:checked + .public-contact-switch {
  background: var(--brand);
}

.public-contact-toggle > input:checked + .public-contact-switch::after {
  transform: translateX(14px);
}

.public-contact-toggle > input:focus-visible + .public-contact-switch {
  box-shadow: 0 0 0 3px rgba(20, 118, 97, 0.14);
}

.public-contact-copy {
  gap: 5px;
}

.public-contact-copy strong {
  color: var(--text);
  font-size: 12px;
}

.doctor-additional-contacts-field {
  display: grid;
  width: 100%;
  max-width: 280px;
  gap: 6px;
  min-width: 0;
}

.doctor-contact-links {
  display: flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  justify-content: flex-start;
  min-height: 44px;
  gap: 4px;
  padding: 0;
  background: transparent;
}

.doctor-contact-link-icons,
.catalog-profile-social-links {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 6px;
  flex-wrap: wrap;
}

.doctor-contact-link-icons {
  gap: 4px;
  margin: 0;
}

.contact-link-icon {
  display: inline-grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border-radius: 14px;
  background: rgba(20, 118, 97, 0.09);
  color: var(--brand-strong);
}

.contact-link-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-link-icon svg .is-filled {
  fill: currentColor;
  stroke: none;
}

.contact-link-icon.is-instagram { color: #c13584; background: rgba(193, 53, 132, 0.09); }
.contact-link-icon.is-facebook { color: #1877f2; background: rgba(24, 119, 242, 0.09); }
.contact-link-icon.is-telegram { color: #229ed9; background: rgba(34, 158, 217, 0.09); }
.contact-link-icon.is-linkedin { color: #0a66c2; background: rgba(10, 102, 194, 0.09); }
.contact-link-icon.is-youtube { color: #ff0000; background: rgba(255, 0, 0, 0.08); }
.contact-link-icon.is-x,
.contact-link-icon.is-tiktok { color: #172124; background: rgba(23, 33, 36, 0.08); }

.doctor-contact-links-edit {
  display: inline-grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border: 0;
  border-radius: 14px;
  padding: 0;
  background: transparent;
  color: var(--brand-strong);
}

.doctor-contact-links-edit:hover {
  background: rgba(20, 118, 97, 0.09);
}

.doctor-contact-links .contact-visibility-control {
  width: 44px;
  height: 44px;
  margin: 0;
  border-radius: 14px;
}

.doctor-contact-links .contact-visibility-eye {
  width: 22px;
  height: 22px;
}

.doctor-contact-links-edit svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#contactLinksDialog {
  width: min(620px, calc(100vw - 28px));
}

#credentialPreviewDialog {
  width: min(1180px, calc(100vw - 20px));
  height: min(94vh, 1040px);
  max-height: calc(100vh - 20px);
  overflow: hidden;
}

#avatarPreviewDialog {
  width: min(552px, calc(100vw - 28px));
}

.avatar-preview-dialog {
  gap: 14px;
  padding: 20px;
}

.avatar-preview-content {
  display: grid;
  width: min(512px, calc(100vw - 68px));
  height: min(512px, calc(100vw - 68px));
  place-items: center;
  overflow: hidden;
  border-radius: 18px;
  background: var(--surface-subtle);
}

.avatar-preview-content img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.avatar-preview-delete {
  min-height: 34px;
  justify-self: end;
  padding: 6px 10px;
}

.credential-preview-dialog {
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
  box-sizing: border-box;
  gap: 14px;
  padding: 20px;
  overflow: hidden;
}

.credential-preview-content {
  display: grid;
  min-height: 0;
  height: 100%;
  place-items: center;
  overflow: hidden;
  border-radius: 14px;
  background: var(--surface-subtle);
}

.credential-preview-content img {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
}

.credential-preview-content iframe {
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  background: #fff;
}

.credential-preview-content [hidden] {
  display: none;
}

.contact-links-editor {
  display: grid;
  gap: 8px;
}

.contact-link-editor-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 8px;
}

.contact-link-editor-row .contact-link-icon {
  width: 30px;
  height: 30px;
}

.contact-link-remove {
  width: 28px;
  height: 28px;
  min-height: 28px;
  border-radius: 10px;
  padding: 0;
  color: var(--danger);
  background: rgba(182, 63, 73, 0.055);
  box-shadow: 0 2px 5px rgba(182, 63, 73, 0.06);
}

.contact-link-remove:hover:not(:disabled) {
  background: rgba(182, 63, 73, 0.1);
  color: var(--danger);
  box-shadow: 0 2px 6px rgba(182, 63, 73, 0.1);
}

.contact-link-add-button {
  justify-self: start;
  min-height: 38px;
}

.doctor-professional-profile-form > .form-actions {
  padding-top: 14px;
}

.doctor-professional-profile-form > [data-field="specialty"],
.doctor-professional-profile-form > [data-field="license"],
.doctor-professional-profile-form > [data-field="experienceYears"] {
  grid-column: span 2;
}

.doctor-professional-profile-form > [data-field="workPlace"],
.doctor-professional-profile-form > .doctor-appointment-formats-field,
.doctor-professional-profile-form > .doctor-languages-field,
.doctor-professional-profile-form > [data-field="education"],
.doctor-professional-profile-form > [data-field="qualifications"] {
  grid-column: span 3;
}

.doctor-professional-profile-form > [data-field] textarea {
  min-height: 78px;
}

.doctor-credentials-card {
  display: grid;
  gap: var(--section-content-gap);
}

.doctor-credentials-saved,
.doctor-credentials-new {
  display: grid;
  gap: 10px;
}

.doctor-credentials-upload {
  display: grid;
  grid-template-areas:
    "type files action"
    ". selection selection";
  grid-template-columns: minmax(190px, 0.8fr) minmax(280px, 1.4fr) minmax(120px, auto);
  align-items: end;
  gap: 10px;
}

.doctor-credential-type-field {
  grid-area: type;
}

.doctor-credentials-upload > label,
.doctor-credential-type-field {
  display: grid;
  gap: 5px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 750;
}

.doctor-credential-type-select {
  width: 100%;
}

.doctor-credential-type-options {
  width: 100%;
  grid-template-columns: 1fr;
  grid-auto-rows: 34px;
  max-height: 148px;
}

.doctor-credential-type-options button {
  width: 100%;
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  padding: 7px 9px;
  background: transparent;
  color: var(--text-soft);
  font: 650 12px/1.4 "Roboto", sans-serif;
  text-align: left;
  cursor: pointer;
}

.doctor-credential-type-options button:hover,
.doctor-credential-type-options button:focus-visible {
  background: #edf3f1;
  color: var(--brand-strong);
  outline: none;
}

.doctor-credentials-drop {
  position: relative;
  grid-area: files;
  min-height: 44px;
  grid-template-columns: 28px minmax(0, 1fr) !important;
  align-content: center;
  border: 1px dashed rgba(20, 118, 97, 0.25);
  border-radius: 14px;
  padding: 6px 12px;
  background: rgba(20, 118, 97, 0.035);
  cursor: pointer;
}

.doctor-credentials-drop input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.doctor-credentials-drop-icon {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 8px;
  background: rgba(20, 118, 97, 0.09);
  color: var(--brand-strong);
  font-size: 15px;
  font-weight: 400;
}

.doctor-credentials-drop-title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
}

.doctor-credentials-drop strong {
  color: var(--text);
  font-size: 12px;
}

.doctor-credentials-drop:hover {
  background: rgba(20, 118, 97, 0.065);
}

.doctor-credentials-drop.is-disabled {
  cursor: default;
  opacity: 0.62;
}

.doctor-credentials-selection {
  grid-area: selection;
  border-radius: 10px;
  padding: 9px 11px;
  background: var(--surface-subtle);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
  white-space: pre-line;
}

.doctor-credentials-upload > [data-action="upload-provider-credentials"] {
  grid-area: action;
  min-width: 120px;
  min-height: 44px;
  margin: 0;
  padding-inline: 18px;
}

.doctor-credentials-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 10px;
}

.doctor-credential-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  border-radius: 10px;
  padding: 11px 13px;
  background: var(--surface-subtle);
}

.doctor-credential-file-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 10px;
  background: rgba(20, 118, 97, 0.09);
  color: var(--brand-strong);
  font-size: 9px;
  font-weight: 800;
}

.doctor-credential-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.doctor-credential-copy strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doctor-credential-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.danger-link {
  color: var(--danger);
}

.catalog-profile-credentials {
  display: grid;
  gap: var(--section-content-gap);
}

.catalog-profile-credentials h3 {
  margin: 0;
}

.catalog-profile-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.catalog-profile-section-heading h3 {
  margin: 0;
}

.catalog-profile-contact-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  border: 0;
  border-radius: 9px;
  padding: 7px 10px;
  background: var(--surface-subtle);
  color: var(--brand-strong);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.catalog-profile-contact-chip:hover,
.catalog-profile-contact-chip.is-copied {
  background: var(--surface-brand);
}

.catalog-profile-contact-chip > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
}

.catalog-profile-contact-chip > strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-profile-contact-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.contact-verified-check {
  display: inline-grid;
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  place-items: center;
  border-radius: 50%;
  background: var(--success-soft);
  color: var(--success);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.catalog-profile-contact-strip .catalog-profile-social-links {
  flex: 0 0 auto;
  flex-wrap: nowrap;
}

.catalog-profile-contact-strip .contact-link-icon {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
}

.doctor-work-place-control {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 14px;
  background-color: rgba(20, 118, 97, 0.045);
  transition: background-color 140ms ease, box-shadow 140ms ease;
}

.doctor-work-place-control:hover {
  background-color: rgba(20, 118, 97, 0.07);
}

.doctor-work-place-control:focus-within {
  background-color: var(--surface);
  box-shadow: 0 0 0 4px rgba(20, 118, 97, 0.09);
}

.profile-form .doctor-work-place-control > input,
.profile-form .doctor-work-place-control > input:hover,
.profile-form .doctor-work-place-control > input:focus {
  width: 100%;
  min-width: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.doctor-work-place-status {
  position: absolute;
  top: 50%;
  display: inline-grid;
  width: 13px;
  height: 13px;
  place-items: center;
  border: 1px solid rgba(20, 118, 97, 0.24);
  border-radius: 50%;
  color: rgba(20, 118, 97, 0.78);
  font-size: 8px;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
  transform: translateY(-50%);
}

.doctor-work-place-status:empty {
  display: none;
}

.doctor-work-place-status.is-confirmed {
  background: rgba(20, 118, 97, 0.09);
}

.doctor-work-place-options {
  max-height: 230px;
}

.doctor-work-place-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.doctor-work-place-option-name {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
}

.doctor-work-place-option-city {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 550;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doctor-work-place-option-check {
  display: inline-grid;
  flex: 0 0 13px;
  width: 13px;
  height: 13px;
  place-items: center;
  border: 1px solid rgba(20, 118, 97, 0.24);
  border-radius: 50%;
  background: rgba(20, 118, 97, 0.09);
  color: rgba(20, 118, 97, 0.78);
  font-size: 8px;
  font-weight: 700;
  line-height: 1;
}

.profile-form label {
  gap: 8px;
}

.profile-form textarea {
  min-height: 84px;
}

.profile-form.patient-medical-profile-form {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 10px 14px;
}

.profile-form.patient-medical-profile-form textarea {
  min-height: 68px;
}

.profile-form .phone-field {
  border-radius: 14px;
  background: rgba(20, 118, 97, 0.045);
  transition:
    background-color 160ms ease,
    box-shadow 160ms ease;
}

.profile-form .phone-field:hover {
  background: rgba(20, 118, 97, 0.07);
}

.profile-form .phone-field:focus-within {
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(20, 118, 97, 0.09);
}

.profile-form .phone-prefix {
  border: 0;
  border-radius: 14px 0 0 14px;
  background: transparent;
  box-shadow: none;
}

.profile-form .phone-field input,
.profile-form .phone-field input:hover,
.profile-form .phone-field input:focus {
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.profile-form .city-options {
  border: 0;
  border-radius: 10px;
}

[data-form="access-request"] input,
[data-form="access-request"] select {
  border: 0;
  border-radius: 14px;
  background-color: rgba(20, 118, 97, 0.045);
  box-shadow: none;
}

[data-form="access-request"] input:hover,
[data-form="access-request"] select:hover {
  border: 0;
  background-color: rgba(20, 118, 97, 0.07);
  box-shadow: none;
}

[data-form="access-request"] input:focus,
[data-form="access-request"] select:focus,
[data-form="access-request"] select.is-options-open {
  border: 0;
  background-color: var(--surface);
  box-shadow: 0 0 0 4px rgba(20, 118, 97, 0.09);
}

.role-field[hidden] {
  display: none;
}

.checkbox-row {
  display: flex;
  align-items: start;
  gap: 10px;
  line-height: 1.45;
}

.checkbox-row input {
  width: 18px;
  min-height: 18px;
  margin-top: 1px;
}

.timeline {
  display: grid;
  gap: 3px;
}

.timeline-view-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 280px;
  max-width: 100%;
  margin: 0;
  border: 0;
  border-radius: 11px;
  padding: 4px;
  background: var(--surface-subtle);
}

.timeline-view-switch button {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  padding: 6px 12px;
  background: transparent;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 750;
}

.timeline-view-switch button.is-active {
  background: var(--surface);
  color: var(--brand-strong);
  box-shadow: 0 2px 6px rgba(22, 42, 44, 0.08);
}

.medical-folder-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px 12px;
}

.medical-folder {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 58px;
  border: 0;
  border-radius: 14px;
  padding: 8px 9px 8px 14px;
  background: transparent;
  color: var(--text);
  text-align: left;
  transition: background 150ms ease;
}

.medical-folder:hover {
  background: var(--surface-brand);
}

.medical-folder:hover .clickable-row-mark {
  background: var(--brand);
}

.medical-folder:not(.has-records) .clickable-row-mark {
  background: rgba(20, 118, 97, 0.12);
}

.medical-folder.has-records {
  background: transparent;
}

.medical-folder.has-records:hover {
  background: var(--surface-brand);
}

.medical-folder-copy {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 3px;
}

.medical-folder-copy strong {
  overflow: hidden;
  font-size: 14px;
  line-height: 1.35;
  text-overflow: ellipsis;
}

.medical-folder-copy span {
  color: var(--muted);
  font-size: 11px;
}

.medical-folder-view {
  display: grid;
  gap: 10px;
}

.medical-folder-view-header {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  border-radius: 14px;
  padding: 7px 10px;
  background: linear-gradient(90deg, var(--surface-brand), var(--surface-subtle));
}

.medical-folder-back-button {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 5px;
  min-height: 32px;
  border: 0;
  border-radius: 10px;
  padding: 6px 9px 6px 7px;
  background: var(--surface);
  color: var(--brand-strong);
  box-shadow: 0 2px 7px rgba(22, 42, 44, 0.07);
  font-size: 12px;
  font-weight: 750;
  transition:
    background 140ms ease,
    color 140ms ease,
    box-shadow 140ms ease,
    transform 140ms ease;
}

.medical-folder-back-button:hover {
  background: var(--surface);
  color: var(--brand);
  box-shadow: 0 4px 11px rgba(22, 42, 44, 0.1);
  transform: translateX(-1px);
}

.medical-folder-back-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.medical-folder-view-divider {
  flex: 0 0 auto;
  color: var(--line-strong);
  font-size: 15px;
}

.medical-folder-view-title {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  gap: 9px;
}

.medical-folder-view-header h3 {
  min-width: 0;
  overflow: hidden;
  margin: 0;
  font-size: 14px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.medical-folder-view-count {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 3px 7px;
  background: rgba(20, 118, 97, 0.1);
  color: var(--brand-strong);
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.patient-context-header {
  display: flex;
  align-items: center;
  min-height: 58px;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px 10px;
  background: var(--surface);
  box-shadow: 0 4px 14px rgba(22, 42, 44, 0.04);
}

.patient-context-back-button {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 6px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 7px 10px 7px 8px;
  background: var(--surface);
  color: var(--brand-strong);
  box-shadow: 0 2px 7px rgba(22, 42, 44, 0.07);
  font-size: 12px;
  font-weight: 750;
  transition:
    border-color 140ms ease,
    color 140ms ease,
    box-shadow 140ms ease,
    transform 140ms ease;
}

.patient-context-back-button:hover {
  border-color: rgba(20, 118, 97, 0.22);
  color: var(--brand);
  box-shadow: 0 4px 11px rgba(22, 42, 44, 0.1);
  transform: translateX(-2px);
}

.patient-context-back-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.patient-context-identity {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
  border-left: 3px solid var(--brand);
  padding-left: 14px;
}

.patient-context-identity h2 {
  overflow: hidden;
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.patient-context-id {
  flex: 0 0 auto;
  color: var(--text-secondary);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.timeline-item {
  display: grid;
  overflow: hidden;
  border: 0;
  border-radius: 14px;
  background: transparent;
  transition: background 160ms ease;
}

.timeline-item:hover {
  background: var(--surface-brand);
}

.timeline-item:hover .clickable-row-mark {
  background: var(--brand);
}

.card .timeline-item {
  background: transparent;
  box-shadow: none;
}

.card .timeline-item:hover {
  background: var(--surface-brand);
  box-shadow: none;
}

.record-summary {
  display: flex;
  align-items: stretch;
}

.record-open-button {
  position: relative;
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-width: 0;
  min-height: 62px;
  border: 0;
  padding: 8px 9px 8px 14px;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.record-open-button:hover {
  background: transparent;
}

.diary-entry-toggle:focus-visible,
.medical-folder:focus-visible,
.record-open-button:focus-visible {
  outline: none;
  background: var(--surface-brand);
}

.diary-entry:has(.diary-entry-toggle:focus-visible) .diary-entry-mark,
.medical-folder:focus-visible .clickable-row-mark,
.record-open-button:focus-visible .clickable-row-mark {
  background: var(--brand);
}

.record-summary-copy {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 4px;
  text-align: left;
}

.record-summary-copy strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-summary-copy .meta {
  margin-top: 0;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-summary-side {
  display: flex;
  flex: none;
  align-items: center;
  gap: 9px;
  margin-left: auto;
}

.record-delete-button {
  align-self: center;
  flex: none;
  margin-right: 12px;
}

.record-detail {
  display: grid;
  gap: 14px;
  width: min(100%, 1180px);
  margin: 0 auto;
}

.record-detail-toolbar {
  position: sticky;
  top: 96px;
  z-index: 7;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0 14px;
  background: linear-gradient(var(--canvas) 72%, rgba(245, 247, 248, 0));
}

.record-back-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.record-back-button span {
  font-size: 18px;
  line-height: 1;
}

.record-detail-toolbar-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.record-detail-document {
  border: 0;
  border-radius: 16px;
  padding: clamp(24px, 4vw, 48px);
  background: #fff;
  box-shadow: var(--shadow-card);
}

.record-document-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.record-document-header h1 {
  margin: 5px 0 0;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.2;
}

.record-document-header time {
  flex: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.record-language-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.record-language-panel {
  min-width: 0;
  border: 0;
  border-radius: 12px;
  padding: 20px;
  background: var(--surface-subtle);
}

.record-language-panel.translation {
  border-color: #cfe2dc;
  background: #f1f8f5;
}

.record-language-panel.single {
  margin-top: 28px;
}

.record-language-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.record-language-heading h2 {
  margin: 2px 0 0;
  font-size: 17px;
}

.record-language-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 8px;
  place-items: center;
  background: var(--surface);
  color: var(--blue);
  font-size: 16px;
  font-weight: 800;
  box-shadow: var(--shadow-low);
}

.record-language-panel.translation .record-language-icon {
  color: var(--brand);
}

.record-language-text {
  padding-top: 16px;
  color: #344448;
  font-size: 14px;
  line-height: 1.72;
  white-space: pre-wrap;
}

.record-rich-text {
  white-space: normal;
}

.record-rich-text > :first-child {
  margin-top: 0;
}

.record-rich-text > :last-child {
  margin-bottom: 0;
}

.record-rich-text h2,
.record-rich-text h3 {
  margin: 18px 0 8px;
  color: var(--text);
  line-height: 1.35;
}

.record-rich-text h2,
.record-editor-page h2 {
  font-size: 22px;
}

.record-rich-text h3,
.record-editor-page h3 {
  font-size: 18px;
}

.record-rich-text [data-align="left"] {
  text-align: left;
}

.record-rich-text [data-align="center"] {
  text-align: center;
}

.record-rich-text [data-align="right"] {
  text-align: right;
}

.record-rich-text ul,
.record-rich-text ol {
  margin: 10px 0;
  padding-left: 24px;
}

.record-rich-text blockquote {
  margin: 14px 0;
  border-left: 3px solid var(--brand);
  padding-left: 14px;
  color: var(--text-soft);
}

.record-source-section {
  margin-top: 28px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}

.record-source-section .section-heading {
  margin-bottom: 0;
}

.record-body {
  margin: 22px 0;
  color: #344448;
  font-size: 15px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.record-photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.record-photo-grid > :only-child {
  grid-column: 1 / -1;
}

.record-photo-button {
  position: relative;
  display: grid;
  overflow: hidden;
  min-height: 280px;
  border: 0;
  border-radius: 12px;
  padding: 0;
  place-items: center;
  background: #edf1f1;
  color: var(--muted);
  cursor: zoom-in;
  text-decoration: none;
}

.record-photo-button:hover {
  border-color: var(--brand);
  box-shadow: 0 4px 7px rgba(24, 48, 54, 0.12);
}

.record-photo-button img {
  width: 100%;
  height: clamp(280px, 44vw, 520px);
  object-fit: contain;
  background: #e8eded;
}

.record-photo-loading {
  padding: 24px;
  font-size: 13px;
  font-weight: 700;
}

.record-photo-caption {
  position: absolute;
  right: 10px;
  bottom: 10px;
  left: 10px;
  overflow: hidden;
  border-radius: 6px;
  padding: 8px 10px;
  background: rgba(18, 34, 38, 0.78);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  backdrop-filter: blur(6px);
}

.record-document-footer {
  margin-top: 22px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.document-upload input[type="file"] {
  padding: 7px;
}

.document-upload input[type="file"]::file-selector-button {
  min-height: 30px;
  margin-right: 9px;
  border: 0;
  border-radius: 12px;
  padding: 6px 11px;
  background: #e4f2ed;
  color: var(--brand-strong);
  font-weight: 700;
  cursor: pointer;
}

.ai-processing-note {
  display: grid;
  gap: 3px;
  padding: 11px 12px;
  border: 0;
  border-radius: 10px;
  background: var(--blue-soft);
  color: #284b69;
  font-size: 11px;
  line-height: 1.45;
}

.attachment-button {
  min-height: 30px;
  border: 0;
  border-radius: 999px;
  padding: 5px 10px;
  background: #e4f2ed;
  color: var(--brand-strong);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition:
    background 140ms ease,
    box-shadow 140ms ease;
}

.attachment-button:hover {
  background: #d7ebe4;
  box-shadow: 0 3px 7px rgba(20, 118, 97, 0.14);
}

.attachment-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.form-error {
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 12px;
  line-height: 1.45;
}

.entity-badge {
  background: var(--blue-soft);
  color: var(--blue);
}

.alerts {
  display: flex;
  flex: 1 1 280px;
  align-items: center;
  gap: 7px;
  min-width: 0;
  margin: 0;
  flex-wrap: wrap;
}

.alerts:empty {
  display: none;
}

.alert {
  display: flex;
  align-items: center;
  gap: 7px;
  max-width: min(520px, 42vw);
  padding: 7px 10px;
  border: 0;
  border-radius: 9px;
  background: var(--surface-brand);
  box-shadow: none;
  color: #194f44;
  font-size: 11px;
  line-height: 1.35;
}

.alert > span,
.alert-copy span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.notice-alert.is-error {
  border-color: #efc5c8;
  background: #fff0f1;
  color: #9f3038;
}

.notification-alert {
  align-items: center;
  background: var(--blue-soft);
  color: #284b69;
}

.alert-copy {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 6px;
}

.notification-alert .text-button {
  color: inherit;
  white-space: nowrap;
}

.empty-state {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 34px 18px;
  text-align: center;
}

.empty-state h3,
.empty-state p {
  margin: 0;
}

.empty-state p {
  max-width: 460px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.empty-visual {
  position: relative;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 12px;
  background: var(--surface-subtle);
  box-shadow: var(--shadow-low);
}

.empty-visual::before,
.empty-visual::after {
  position: absolute;
  inset: 50% auto auto 50%;
  background: var(--line-strong);
  content: "";
  transform: translate(-50%, -50%);
}

.empty-visual::before {
  width: 22px;
  height: 3px;
}

.empty-visual::after {
  width: 3px;
  height: 22px;
}

dialog {
  width: min(720px, calc(100vw - 28px));
  max-height: min(86vh, 820px);
  padding: 0;
  overflow: auto;
  border-radius: 18px;
  box-shadow: var(--shadow-dialog);
}

#recordEditorDialog {
  width: min(920px, calc(100vw - 28px));
  max-height: min(92vh, 940px);
}

.record-editor-dialog {
  gap: 14px;
  padding: 20px 22px 22px;
}

.record-editor-dialog .dialog-head {
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.record-editor-form,
.patient-document-form {
  display: grid;
  gap: 14px;
}

.record-editor-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.55fr);
  gap: 12px;
}

.record-editor-title-field input {
  min-height: 48px;
  font-size: 17px;
  font-weight: 750;
}

.record-rich-editor {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 30px rgba(24, 48, 43, 0.06);
}

.record-editor-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  padding: 8px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-subtle);
}

.record-editor-toolbar button {
  display: grid;
  width: 34px;
  min-height: 34px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  padding: 7px;
  background: transparent;
  color: var(--text-soft);
}

.record-editor-toolbar button:hover {
  background: var(--surface);
  color: var(--brand-strong);
  box-shadow: 0 2px 6px rgba(22, 42, 44, 0.09);
}

.record-editor-toolbar button:active {
  background: var(--surface-brand);
  color: var(--brand-strong);
}

.record-editor-toolbar button:focus-visible {
  outline: 2px solid rgba(20, 118, 97, 0.3);
  outline-offset: 1px;
}

.record-editor-toolbar svg {
  width: 19px;
  height: 19px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.record-editor-toolbar circle {
  fill: currentColor;
  stroke: none;
}

.record-editor-toolbar .toolbar-icon-text {
  fill: currentColor;
  stroke: none;
  font-family: "Roboto", sans-serif;
  font-weight: 800;
}

.record-editor-toolbar .toolbar-icon-number {
  font-size: 5px;
}

.record-editor-toolbar .toolbar-icon-heading {
  font-size: 15px;
}

.record-editor-toolbar .toolbar-icon-heading-index {
  font-size: 8px;
}

.record-editor-toolbar-divider {
  width: 1px;
  height: 22px;
  margin: 0 4px;
  background: var(--line-strong);
}

.record-editor-page {
  min-height: 280px;
  padding: 26px 30px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.7;
  outline: none;
}

.record-editor-page:empty::before {
  color: var(--muted);
  content: attr(data-placeholder);
  pointer-events: none;
}

.record-editor-page h2,
.record-editor-page h3 {
  margin: 18px 0 8px;
}

.record-editor-page ul,
.record-editor-page ol {
  padding-left: 24px;
}

.record-editor-attachments,
.patient-document-upload {
  border: 1px dashed #b7cbc5;
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(20, 118, 97, 0.03);
}

.selected-file-list {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.selected-file-list[hidden] {
  display: none;
}

.selected-file {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  border-radius: 999px;
  padding: 6px 10px;
  background: var(--surface-brand);
  color: var(--brand-strong);
  font-size: 11px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.record-editor-actions {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.patient-document-intro {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  border-radius: 14px;
  padding: 16px;
  background: var(--surface-brand);
}

.patient-document-intro p {
  margin: 4px 0 0;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.5;
}

.patient-document-icon {
  display: grid;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  place-items: center;
  background: var(--surface);
  color: var(--brand);
  font-size: 25px;
  box-shadow: var(--shadow-low);
}

dialog::backdrop {
  background: rgba(17, 31, 34, 0.48);
  backdrop-filter: blur(3px);
}

.dialog-body {
  display: grid;
  gap: 20px;
  padding: 24px;
}

.dialog-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
}

.dialog-actions {
  justify-content: flex-end;
  padding-top: 4px;
}

#shareProfileDialog {
  width: min(440px, calc(100vw - 28px));
}

.share-profile-dialog {
  justify-items: center;
  text-align: center;
}

.share-profile-dialog .dialog-head {
  width: 100%;
  text-align: left;
}

.share-profile-qr {
  display: grid;
  place-items: center;
  width: min(300px, 100%);
  aspect-ratio: 1;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-low);
}

.share-profile-qr img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.share-profile-id {
  font-family: "Roboto", sans-serif;
  font-size: 18px;
}

.share-profile-dialog .dialog-actions {
  width: 100%;
}

.shared-patient-match {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin: 14px 0 18px;
  padding: 12px;
  border: 0;
  border-radius: 12px;
  background: var(--success-soft);
  box-shadow: inset 0 0 0 1px rgba(20, 118, 97, 0.1);
}

.shared-patient-match strong,
.shared-patient-match .meta {
  display: block;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(310px, 0.75fr);
  gap: 18px;
  align-items: start;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
}

.table {
  width: 100%;
  min-width: 560px;
  border-collapse: separate;
  border-spacing: 0 5px;
}

.table th,
.table td {
  padding: 11px 12px;
  border: 0;
  text-align: left;
  vertical-align: top;
}

.table tbody td {
  background: var(--surface-subtle);
}

.table tbody td:first-child {
  border-radius: 9px 0 0 9px;
}

.table tbody td:last-child {
  border-radius: 0 9px 9px 0;
}

.table th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.table td {
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.45;
}

.code {
  font-family: "Roboto", sans-serif;
}

@media (max-width: 1180px) {
  .grid.three {
    grid-template-columns: repeat(3, minmax(160px, 1fr));
  }

  .dashboard-workspace {
    grid-template-columns: minmax(220px, 1fr) minmax(320px, 380px);
  }

  .split {
    grid-template-columns: 1fr;
  }

  .profile-account-panel {
    grid-column: 2;
    grid-template-columns: 1fr;
  }

  .profile-personal-main {
    grid-template-columns: 125px minmax(0, 1fr);
  }

  .profile-account-content {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 920px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: sticky;
    display: grid;
    grid-template-columns: minmax(180px, 0.7fr) minmax(320px, 1.3fr);
    gap: 12px 20px;
    width: 100%;
    height: auto;
    padding: 12px 20px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .brand {
    padding: 0;
  }

  .account-card {
    grid-template-columns: 38px minmax(180px, 1fr) auto;
    align-items: center;
    padding: 8px 10px;
  }

  .account-card .text-button {
    grid-column: 3;
    white-space: nowrap;
  }

  .nav {
    grid-column: 1 / -1;
    grid-auto-flow: column;
    grid-auto-columns: minmax(138px, 1fr);
    grid-template-columns: none;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .main {
    padding-right: 22px;
    padding-left: 22px;
  }

  .profile-columns {
    grid-template-columns: 1fr;
  }

  .profile-personal-main > .profile-avatar-editor {
    min-height: 125px;
  }

  .patient-workspace-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .patient-workspace-heading .row-actions {
    justify-content: flex-start;
  }

  .topbar {
    position: static;
  }

  .record-detail-toolbar {
    position: static;
  }
}

@media (max-width: 720px) {
  .profile-personal-main > .profile-form,
  .profile-account-content,
  .profile-contact-row,
  .profile-contact-row.is-clinic {
    grid-template-columns: 1fr;
  }

  .catalog-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .catalog-filter-field:nth-child(2n) .catalog-filter-options {
    right: 0;
    left: auto;
  }

  .access-page .access-grant-item,
  .access-page .access-grant-item .grant-actions,
  .access-page .access-grant-item .grant-level-control {
    grid-template-columns: 1fr;
  }

  .access-page .empty-state {
    display: grid;
    gap: 3px;
  }

  .alerts {
    flex: 1 1 100%;
    width: 100%;
  }

  .alert {
    flex: 1 1 100%;
    max-width: 100%;
  }

  .doctor-service-row {
    grid-template-columns: minmax(0, 1fr) 84px 34px;
  }

  .doctor-service-row input[name="serviceName"] {
    grid-column: 1 / -1;
  }

  .doctor-service-row input[name="servicePrice"] {
    grid-column: 1;
  }

  .doctor-profile-core-grid,
  .doctor-profile-text-grid,
  .doctor-profile-practice-grid {
    grid-template-columns: 1fr;
  }

  .doctor-professional-profile-form .doctor-profile-practice-grid {
    grid-template-columns: 1fr;
  }

  .doctor-profile-practice-grid > [data-field="services"] {
    grid-column: auto;
  }

  .doctor-credentials-upload {
    grid-template-areas:
      "type"
      "files"
      "selection"
      "action";
    grid-template-columns: 1fr;
  }

  .doctor-credentials-selection {
    grid-area: selection;
  }

  .doctor-credentials-upload > [data-action="upload-provider-credentials"] {
    width: 100%;
  }

  .doctor-specialties-list,
  .doctor-work-places-list {
    grid-template-columns: 1fr;
  }

  .catalog-directory-grid {
    grid-template-columns: 1fr;
  }

  .catalog-provider-main {
    grid-template-columns: var(--catalog-provider-avatar-size) minmax(0, 1fr);
  }

  .catalog-provider-side {
    grid-column: 2;
    justify-items: start;
  }

  .catalog-profile-details,
  .catalog-profile-content-grid,
  .catalog-profile-team-list {
    grid-template-columns: 1fr;
  }

  .catalog-profile-content-grid section:first-child {
    grid-column: auto;
  }

  .catalog-profile-hero {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .catalog-profile-contact-strip {
    flex-wrap: wrap;
  }

  .catalog-profile-title-line {
    flex-wrap: wrap;
  }

  .catalog-profile-hero > .badge {
    grid-column: 2;
    justify-self: start;
  }

  .sidebar {
    display: flex;
    padding: 12px 14px;
  }

  .account-card {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
  }

  .nav {
    display: grid;
    grid-auto-columns: minmax(132px, 1fr);
  }

  .main {
    padding: 0 14px 30px;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    min-height: auto;
    margin: 10px 0 16px;
    padding: 10px;
  }

  .topbar-actions {
    display: flex;
    flex-wrap: nowrap;
  }

  .topbar-actions .cloud-status {
    max-width: 150px;
  }

  .topbar-actions .account-menu {
    min-width: 0;
  }

  .topbar-actions button {
    justify-content: center;
  }

  .medical-record-heading-actions {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .medical-record-heading-actions .timeline-view-switch {
    flex: 1 1 250px;
  }

  .account-menu-trigger {
    justify-content: flex-start;
  }

  .account-menu-trigger .account-identity {
    flex: 1;
  }

  .account-menu-popover {
    right: auto;
    left: 0;
    width: 100%;
  }

  .account-menu-popover button {
    justify-content: normal;
  }

  .dashboard-intro,
  .list-item-head,
  .section-heading,
  .profile-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .record-editor-meta {
    grid-template-columns: 1fr;
  }

  .record-editor-page {
    min-height: 230px;
    padding: 20px 16px;
  }

  .record-editor-toolbar-divider {
    display: none;
  }

  .record-editor-actions .primary-button,
  .record-editor-actions .secondary-button {
    width: 100%;
  }

  .grid.two,
  .grid.three,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-grid .wide {
    grid-column: auto;
  }

  .doctor-professional-profile-form > [data-field],
  .doctor-professional-profile-form > .doctor-languages-field,
  .doctor-professional-profile-form > .doctor-appointment-formats-field,
  .doctor-professional-profile-form > .form-actions {
    grid-column: 1 / -1;
  }

  .patient-medical-profile-form > label,
  .patient-medical-profile-form label.wide {
    grid-column: 1 / -1;
  }

  .profile-form.patient-medical-profile-form {
    grid-template-columns: 1fr;
  }

  .form-actions .primary-button {
    width: 100%;
  }

  .danger-zone-action {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .danger-zone-action .danger-button {
    width: 100%;
  }

  .quick-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick-actions button {
    width: 100%;
  }

  .alert {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .record-summary {
    align-items: center;
  }

  .record-open-button {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .record-summary-side {
    width: auto;
    justify-content: flex-start;
    margin-left: 0;
  }

  .record-delete-button {
    margin-right: 10px;
  }

  .record-document-header {
    flex-direction: column;
    gap: 10px;
  }

  .record-detail-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-workspace {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .dashboard-journal-space {
    display: none;
  }

  .health-diary-heading,
  .diary-composer-heading,
  .diary-composer-footer,
  .diary-symptom-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .diary-patient-select {
    min-width: 0;
  }

  .diary-questions {
    grid-template-columns: 1fr;
  }

  .diary-questions::before {
    display: none;
  }

  .diary-composer-footer .primary-button {
    width: 100%;
  }

  .record-detail-toolbar-meta {
    justify-content: space-between;
  }

  .record-language-grid {
    grid-template-columns: 1fr;
  }

  .medical-folder-grid {
    grid-template-columns: 1fr;
  }

  .record-photo-grid {
    grid-template-columns: 1fr;
  }

  .record-photo-grid > :only-child {
    grid-column: auto;
  }

  .record-photo-button,
  .record-photo-button img {
    min-height: 220px;
    height: min(105vw, 440px);
  }
}

@media (max-width: 460px) {
  .profile-personal-main {
    grid-template-columns: 1fr;
  }

  .profile-personal-main > .profile-avatar-editor {
    justify-self: start;
  }

  .profile-account-panel {
    grid-column: auto;
  }

  .profile-account-facts,
  .profile-security-actions {
    grid-template-columns: 1fr;
  }

  .catalog-filter-grid {
    grid-template-columns: 1fr;
  }

  .catalog-filter-wide {
    grid-column: auto;
  }

  .catalog-filter-field:nth-child(2n) .catalog-filter-options {
    right: auto;
    left: 0;
  }

  .catalog-filter-options {
    width: 100%;
  }

  .patient-context-header {
    align-items: stretch;
    flex-direction: column;
    gap: 2px;
  }

  .patient-context-identity {
    gap: 8px;
  }

  .patient-context-identity h2 {
    font-size: 16px;
  }

  .patient-context-id {
    font-size: 16px;
  }

  .medical-record-heading-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .medical-record-heading-actions .timeline-view-switch,
  .medical-record-heading-actions .primary-button {
    width: 100%;
  }

  .brand small {
    display: none;
  }

  .diary-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .diary-number-scale {
    grid-template-columns: repeat(11, minmax(20px, 1fr));
    gap: 2px;
    width: 100%;
  }

  .account-card {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .account-card .text-button {
    grid-column: 2;
    white-space: normal;
  }

  .topbar h1 {
    font-size: 23px;
  }

  .topbar-actions,
  .quick-actions,
  .row-actions {
    grid-template-columns: 1fr;
  }

  .profile-security-actions {
    grid-template-columns: 1fr;
  }

  .profile-security-actions > .text-button {
    grid-column: auto;
  }

  .topbar-actions {
    display: grid;
  }

  .topbar-actions .cloud-status,
  .account-menu-trigger {
    width: 100%;
    max-width: none;
  }

  .row-actions {
    display: grid;
  }

  .row-actions button,
  .row-actions select {
    width: 100%;
  }

  .card {
    padding: 16px;
  }

  .card.danger-zone {
    padding: 0;
  }

  .dialog-body {
    padding: 18px;
  }

  .auth-panel {
    padding: 22px 18px;
  }

  .auth-heading h1 {
    font-size: 25px;
  }
}
