:root {
  --bg: #f6f7f9;
  --panel: rgba(255, 255, 255, 0.86);
  --panel-strong: #ffffff;
  --text: #16181d;
  --muted: #747984;
  --line: #e6e8ec;
  --yellow: #fce000;
  --yellow-deep: #f4cb00;
  --green: #19b36b;
  --blue: #2f80ed;
  --red: #ff5a5f;
  --shadow: 0 18px 45px rgba(24, 28, 38, 0.1);
  --radius: 22px;
  color-scheme: light;
}

.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: none;
  place-items: center;
  overflow: hidden;
  padding: calc(env(safe-area-inset-top, 0px) + clamp(50px, 8vh, 84px)) 24px calc(env(safe-area-inset-bottom, 0px) + clamp(48px, 8vh, 92px));
  background: #ffffff;
  color: #111111;
  opacity: 1;
  visibility: visible;
}

.splash-screen.is-hiding {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-content {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: clamp(17px, 2.55vh, 27px);
  width: min(640px, 92vw);
  align-self: start;
  margin-top: clamp(82px, 14vh, 132px);
}

.splash-logo {
  display: block;
  width: min(256px, 47vw);
  height: auto;
  filter: drop-shadow(0 14px 22px rgba(17, 17, 17, 0.08));
}

.splash-tagline {
  display: grid;
  justify-items: center;
  gap: 12px;
  font-size: clamp(17px, 2.72vw, 29px);
  letter-spacing: 0.34em;
  text-align: center;
}

.splash-tagline span {
  color: #111111;
  font-weight: 500;
}

.splash-tagline strong {
  color: #e3a300;
  font-weight: 500;
}

.splash-ecg {
  position: absolute;
  left: 50%;
  bottom: 27vh;
  z-index: 1;
  width: min(620px, 86vw);
  height: clamp(78px, 13vh, 122px);
  pointer-events: none;
  overflow: visible;
  transform: translateX(-50%);
}

.splash-ecg-line {
  fill: none;
  stroke: #e3a300;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
  filter: drop-shadow(0 0 15px rgba(227, 163, 0, 0.32));
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 118 650;
  stroke-dashoffset: 650;
  animation: splash-ecg-monitor 1.85s linear infinite;
}

@keyframes splash-ecg-monitor {
  0% {
    opacity: 0;
    stroke-dashoffset: 650;
  }

  10%,
  76% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    stroke-dashoffset: -118;
  }
}

@media (max-width: 820px) {
  .splash-screen {
    display: grid;
  }
}

@media (max-width: 560px) {
  .splash-screen {
    padding: calc(env(safe-area-inset-top, 0px) + 38px) 18px calc(env(safe-area-inset-bottom, 0px) + 44px);
  }

  .splash-content {
    gap: 15px;
    margin-top: clamp(92px, 16vh, 138px);
  }

  .splash-logo {
    width: min(196px, 49vw);
  }

  .splash-tagline {
    gap: 9px;
    font-size: clamp(15px, 4.4vw, 22px);
    letter-spacing: 0.24em;
  }

  .splash-ecg {
    bottom: 28vh;
    width: 88vw;
    height: 96px;
  }

}

.admin-page {
  min-height: 100vh;
  background: #f5f7fb;
  color: #102033;
}

.admin-auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.admin-auth-panel {
  width: min(480px, 100%);
  background: #ffffff;
  border: 1px solid #dfe7f3;
  border-radius: 8px;
  padding: 28px;
  box-shadow: 0 20px 60px rgba(27, 46, 77, 0.12);
}

.admin-auth-panel h1 {
  margin: 8px 0 20px;
  font-size: 30px;
  line-height: 1.12;
}

.admin-brand {
  display: block;
  width: 164px;
  height: 58px;
  margin: 0 0 24px;
  background: url("assets/ave-logo-black.png") left center / contain no-repeat;
}

.admin-login-form,
.admin-setup-form {
  display: grid;
  gap: 14px;
}

.admin-setup-form {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #e6edf6;
}

.admin-cabinet {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
}

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px 18px;
  background: #ffffff;
  border-right: 1px solid #dde7f2;
}

.admin-nav {
  display: grid;
  gap: 6px;
}

.admin-nav-group {
  display: grid;
  gap: 6px;
}

.admin-nav button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 8px;
  padding: 12px 14px;
  background: transparent;
  color: #41536a;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.admin-nav-parent-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.admin-nav-chevron {
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.admin-nav-group.is-open .admin-nav-chevron {
  transform: rotate(225deg);
}

.admin-nav-subnav {
  display: grid;
  gap: 4px;
  padding-left: 12px;
}

.admin-nav-subnav[hidden] {
  display: none;
}

.admin-nav-subnav button {
  padding: 10px 12px;
  font-size: 13px;
}

.admin-nav-badge {
  min-width: 24px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #ffdb32;
  color: #111827;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.admin-nav button:hover,
.admin-nav button.active {
  background: #eef5ff;
  color: #0c63ce;
}

.admin-nav-group.is-active > .admin-nav-parent {
  background: #eef5ff;
  color: #0c63ce;
}

.admin-main {
  padding: 26px;
}

.admin-cabinet-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}

.admin-cabinet-header h1 {
  margin: 4px 0 0;
  font-size: 32px;
}

.admin-site-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  text-align: center;
  text-decoration: none;
}

.admin-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.admin-stat-card {
  border: 1px solid #dce6f1;
  box-shadow: none;
}

.admin-workspace {
  display: grid;
  grid-template-columns: minmax(340px, 0.9fr) minmax(520px, 1.4fr);
  gap: 18px;
  align-items: start;
}

.admin-list-pane,
.admin-detail-pane {
  background: #ffffff;
  border: 1px solid #dfe7f3;
  border-radius: 8px;
}

.admin-list-pane {
  min-height: 640px;
  overflow: hidden;
}

.admin-toolbar {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-bottom: 1px solid #e8eef6;
}

.admin-toolbar h2 {
  margin: 0 0 4px;
}

.admin-search {
  display: grid;
  gap: 6px;
}

.admin-doctor-list {
  display: grid;
  gap: 8px;
  max-height: calc(100vh - 260px);
  overflow: auto;
  padding: 12px;
}

.admin-list-filters {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #e5edf6;
  border-radius: 8px;
  background: #f7fbff;
}

.admin-list-filters label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.admin-doctor-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  width: 100%;
  border: 1px solid #e5edf6;
  border-radius: 8px;
  padding: 10px;
  background: #ffffff;
  text-align: left;
  cursor: pointer;
}

.admin-doctor-card.active,
.admin-doctor-card:hover {
  border-color: #77aef1;
  background: #f2f8ff;
}

.admin-doctor-card img {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  object-fit: cover;
  background: #eef4fb;
}

.admin-doctor-card strong,
.admin-doctor-card small {
  display: block;
}

.admin-doctor-card small {
  margin: 4px 0 8px;
  color: #66768a;
}

.admin-system-notification-card {
  display: block;
  width: 100%;
  border: 1px solid #e5edf6;
  border-radius: 8px;
  padding: 12px 14px;
  background: #ffffff;
  cursor: default;
}

.admin-system-notification-card.active {
  border-color: #77aef1;
  background: #f2f8ff;
}

.admin-system-notification-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  list-style: none;
  cursor: pointer;
}

.admin-system-notification-card summary::-webkit-details-marker {
  display: none;
}

.admin-system-notification-card summary strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-system-notification-card p {
  margin: 10px 0 0;
  color: #66768a;
  font-size: 13px;
  line-height: 1.45;
}

.admin-system-notification-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.admin-system-notification-actions .soft-btn {
  width: auto;
  min-height: 36px;
}

.admin-permission-grid {
  display: grid;
  gap: 10px;
}

.admin-permission-row {
  display: grid;
  grid-template-columns: minmax(160px, 0.7fr) minmax(0, 1.8fr);
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid #e5edf6;
  border-radius: 8px;
  background: #ffffff;
}

.admin-permission-row header strong {
  display: block;
  color: #14243a;
  font-size: 14px;
}

.admin-permission-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.admin-permission-options.compact {
  margin-top: 8px;
}

.admin-permission-check,
.admin-permission-select,
.admin-permission-multi {
  min-width: min(100%, 190px);
}

.admin-permission-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid #dfe8f4;
  border-radius: 8px;
  background: #f8fbff;
  color: #34465d;
  font-size: 12px;
  font-weight: 800;
}

.admin-permission-check input {
  width: auto;
}

.admin-permission-select {
  display: grid;
  gap: 6px;
  color: #637287;
  font-size: 12px;
  font-weight: 800;
}

.admin-permission-multi {
  display: grid;
  gap: 2px;
}

.admin-permission-multi > strong {
  color: #637287;
  font-size: 12px;
}

.admin-log-list {
  display: grid;
  gap: 8px;
}

.admin-log-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid #e5edf6;
  border-radius: 8px;
  background: #ffffff;
}

.admin-log-card strong,
.admin-log-card p,
.admin-log-card span {
  display: block;
}

.admin-log-card p {
  margin: 4px 0 0;
  color: #637287;
  font-size: 12px;
  line-height: 1.35;
}

.admin-log-card span {
  color: #637287;
  font-size: 11px;
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
}

.admin-status-pill {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 4px 8px;
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
}

.admin-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.admin-status-pill.success {
  background: #e8f8ee;
  color: #128241;
}

.admin-status-pill.warning {
  background: #fff4d8;
  color: #9a6500;
}

.admin-status-pill.danger {
  background: #ffe7e7;
  color: #bd2424;
}

.admin-status-pill.muted {
  background: #edf2f7;
  color: #526173;
}

.admin-complaint-card {
  border: 1px solid #dbe7f3;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.admin-complaint-card + .admin-complaint-card {
  margin-top: 10px;
}

.admin-complaint-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
}

.admin-complaint-card summary::-webkit-details-marker {
  display: none;
}

.admin-complaint-card summary span {
  display: grid;
  gap: 3px;
}

.admin-complaint-card summary small {
  color: #66768a;
  font-size: 12px;
}

.admin-complaint-body {
  display: grid;
  gap: 12px;
  padding: 0 14px 14px;
}

.admin-complaint-comment,
.admin-complaint-profile,
.admin-complaint-message {
  display: grid;
  gap: 8px;
  border: 1px solid #edf2f7;
  border-radius: 8px;
  padding: 12px;
  background: #f8fbff;
}

.admin-complaint-comment p {
  margin: 0;
  color: #41536a;
  line-height: 1.45;
}

.admin-complaint-profile span {
  color: #526173;
  font-size: 13px;
}

.admin-complaint-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.admin-detail-pane {
  min-height: 640px;
  padding: 18px;
}

.admin-empty-detail,
.admin-empty-list {
  padding: 24px;
  color: #637287;
}

.admin-doctor-editor {
  display: grid;
  gap: 16px;
}

.admin-detail-head {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid #e8eef6;
}

.admin-detail-head img {
  width: 86px;
  height: 86px;
  border-radius: 8px;
  object-fit: cover;
  background: #eef4fb;
}

.admin-detail-head h2 {
  margin: 4px 0;
  font-size: 26px;
}

.admin-editor-section {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #e5edf6;
  border-radius: 8px;
  background: #fbfdff;
}

.admin-editor-section h3 {
  margin: 0;
  font-size: 18px;
}

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

.admin-editor-grid .wide-field {
  grid-column: 1 / -1;
}

.admin-editor-grid textarea {
  min-height: 96px;
  resize: vertical;
}

.admin-switch {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
}

.admin-switch input {
  width: auto;
}

.admin-files {
  display: grid;
  gap: 8px;
}

.admin-editor-actions {
  position: sticky;
  bottom: 0;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 0 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), #ffffff 28%);
}

.admin-message-modal {
  border: 0;
  border-radius: 8px;
  width: min(520px, calc(100vw - 28px));
  padding: 0;
  background: transparent;
  color: var(--text);
}

.admin-message-modal::backdrop {
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(6px);
}

.admin-message-card {
  position: relative;
  display: grid;
  gap: 14px;
  overflow: hidden;
  padding: 24px;
  border: 1px solid rgba(242, 169, 0, 0.42);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
}

.admin-message-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(135deg, rgba(252, 224, 0, 0.18) 0 2px, transparent 2px 18px),
    linear-gradient(90deg, rgba(252, 224, 0, 0.28), transparent 36%);
  pointer-events: none;
}

.admin-message-card > * {
  position: relative;
  z-index: 1;
}

.admin-message-card.warning {
  border-top: 6px solid #f2a900;
}

.admin-message-card.danger {
  border-top: 6px solid #cf2e2e;
}

.admin-message-card.info {
  border-top: 6px solid #0c63ce;
}

.top-confirm-dialog {
  width: min(520px, calc(100vw - 28px));
  border: 0;
  border-radius: 10px;
  padding: 0;
  background: transparent;
}

.top-confirm-dialog::backdrop {
  background: rgba(8, 18, 32, 0.42);
  backdrop-filter: blur(3px);
}

.top-confirm-card {
  display: grid;
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 24px 80px rgba(8, 18, 32, 0.24);
  text-align: center;
}

.top-confirm-card h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
}

.phone-confirmation-dialog {
  z-index: 2147483646;
}

.phone-confirmation-dialog .top-confirm-card p {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
}

.top-confirm-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.top-confirm-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  justify-self: center;
  width: fit-content;
  max-width: 100%;
  color: var(--muted);
  font-size: 14px;
}

.top-confirm-option input {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
}

.cancel-reason-list {
  display: grid;
  gap: 6px;
  text-align: left;
}

.cancel-reason-option {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  align-items: flex-start;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  color: var(--text);
  font-size: 14px;
  line-height: 1.25;
  cursor: pointer;
}

.cancel-reason-option input {
  width: 12px;
  height: 12px;
  min-width: 12px;
  min-height: 12px;
  margin: 2px 0 0;
  padding: 0;
  cursor: pointer;
}

.cancel-reason-option span {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: normal;
}

.cancel-reason-stat {
  display: grid;
  gap: 10px;
  align-content: start;
}

.cancel-reason-stat-list {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

.cancel-reason-stat-list div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
}

.cancel-reason-stat-list em {
  color: var(--text);
  font-style: normal;
  white-space: nowrap;
}

.status-advance-btn {
  justify-self: start;
  background: #0f9f6e;
  color: #fff;
  box-shadow: 0 12px 28px rgba(15, 159, 110, 0.24);
}

.status-advance-btn:hover {
  background: #0b8b60;
}

.cancel-other-reason {
  display: grid;
  gap: 6px;
  text-align: left;
}

@media (max-width: 1120px) {
  .admin-cabinet {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
    height: auto;
  }

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

  .admin-stats-row,
  .admin-workspace {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .admin-main {
    padding: 14px;
  }

  .admin-cabinet-header,
  .admin-detail-head {
    grid-template-columns: 1fr;
    display: grid;
  }

  .admin-stats-row,
  .admin-editor-grid,
  .admin-nav,
  .admin-permission-row,
  .admin-log-card {
    grid-template-columns: 1fr;
  }

  .admin-log-card span {
    text-align: left;
    white-space: normal;
  }
}

[data-theme="dark"] {
  --bg: #101114;
  --panel: rgba(31, 33, 38, 0.84);
  --panel-strong: #202228;
  --text: #f4f5f7;
  --muted: #a7acb7;
  --line: #343741;
  --yellow: #ffdc35;
  --yellow-deep: #e0b900;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(252, 224, 0, 0.24), transparent 32%),
    linear-gradient(180deg, var(--bg), var(--bg));
  overflow-x: hidden;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
}

body[data-active-screen="patientApp"],
body[data-active-screen="doctorApp"] {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

body[data-active-screen="patientApp"] .app-shell,
body[data-active-screen="doctorApp"] .app-shell {
  flex: 1 0 auto;
  width: 100%;
  min-height: 0;
}

body[data-active-screen="patientApp"] .site-footer,
body[data-active-screen="doctorApp"] .site-footer {
  flex: 0 0 auto;
  width: 100%;
}

.toast-stack {
  position: fixed;
  right: clamp(14px, 3vw, 32px);
  bottom: clamp(14px, 3vw, 32px);
  z-index: 2147483647;
  display: grid;
  width: min(420px, calc(100vw - 28px));
  gap: 10px;
  pointer-events: none;
}

.toast {
  padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--yellow-deep) 54%, var(--line));
  border-radius: 18px;
  background: var(--panel-strong);
  color: var(--text);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  pointer-events: auto;
  animation: toast-in 0.22s ease-out;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 68px;
  padding: 4px clamp(14px, 4vw, 40px);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel-strong) 86%, transparent);
  backdrop-filter: blur(22px);
  transition: min-height 0.18s ease, padding 0.18s ease;
}

.brand,
.soft-btn,
.primary-btn,
.icon-btn,
.role-card,
.social,
.segmented {
  border: 0;
  color: var(--text);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  background: transparent;
  font-size: 19px;
  font-weight: 800;
}

.brand-logo {
  display: block;
  width: 174px;
  height: 60px;
  background: url("assets/ave-logo-black.png") center / contain no-repeat;
  transition: width 0.18s ease, height 0.18s ease;
}

:root[data-theme="dark"] .brand-logo {
  background-image: url("assets/ave-logo-white.png");
}

.logo-thin {
  stroke-width: 3;
}

.logo-line {
  stroke-width: 4;
}

.logo-letter {
  stroke-width: 8;
}

.logo-word {
  stroke-width: 5;
}

.dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--green);
}

.client-greeting {
  display: grid;
  gap: 4px;
  margin-bottom: 16px;
}

.client-greeting p {
  margin: 0;
  color: var(--text);
  font-size: 24px;
  font-weight: 800;
  line-height: 1.16;
}

.client-greeting span {
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
}

.top-actions {
  margin-left: auto;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.soft-btn,
.primary-btn,
.icon-btn,
.social,
.segmented {
  min-height: 42px;
  border-radius: 14px;
  padding: 0 16px;
  font-weight: 700;
}

.soft-btn,
.icon-btn,
.segmented {
  background: var(--panel);
  border: 1px solid var(--line);
}

.profile-icon {
  display: grid;
  position: relative;
  flex: 0 0 60px;
  width: 60px;
  height: 60px;
  min-width: 60px;
  max-width: 60px;
  min-height: 60px;
  max-height: 60px;
  place-items: center;
  border: 0;
  border-radius: 16px;
  padding: 0;
  background: var(--panel-strong);
  color: #111;
  box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden;
  line-height: 0;
  appearance: none;
  transition: width 0.18s ease, height 0.18s ease, min-width 0.18s ease, max-width 0.18s ease, min-height 0.18s ease, max-height 0.18s ease, flex-basis 0.18s ease, border-radius 0.18s ease;
}

.profile-icon span {
  display: block;
  position: absolute;
  inset: 5px;
  flex: 0 0 auto;
  width: auto;
  height: auto;
  background-image: url("assets/icon-patient.png");
  background-position: center center;
  background-size: contain;
  background-repeat: no-repeat;
  border-radius: 12px;
  pointer-events: none;
  transition: inset 0.18s ease, border-radius 0.18s ease;
}

.profile-icon[data-has-photo="true"] span {
  inset: 4px;
  border-radius: 14px;
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  background-clip: padding-box;
  overflow: hidden;
}

.profile-icon[data-profile-role="doctor"] span {
  background-image: url("assets/icon-therapist.png");
}

.profile-icon[data-profile-role="patient"] span {
  background-image: url("assets/icon-patient.png");
}

.danger-primary {
  background: var(--red);
  color: #fff;
}

.danger-primary:hover {
  background: #e3494f;
}

.primary-btn {
  background: var(--yellow);
  color: #111;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.08);
}

.primary-btn:hover {
  background: var(--yellow-deep);
}

.primary-btn.danger-primary:hover {
  background: #e3494f;
}

.compact {
  min-height: 38px;
}

.wide {
  width: 100%;
}

.hidden {
  display: none !important;
}

.screen {
  display: none;
  padding: clamp(18px, 4vw, 44px);
}

.screen.active {
  display: block;
}

@media (min-width: 981px) {
  body[data-active-screen="patientApp"] .app-shell,
  body[data-active-screen="doctorApp"] .app-shell {
    min-height: 0;
  }

  .patient-app,
  .doctor-app {
    padding-top: 8px;
  }

  .patient-app.active,
  .doctor-app.active {
    padding-bottom: 10px;
  }

  body[data-active-screen="patientApp"] .site-footer,
  body[data-active-screen="doctorApp"] .site-footer {
    padding-top: 4px;
  }

  body[data-active-screen="doctorApp"] .doctor-app.active {
    padding-bottom: 2px;
  }

  body[data-active-screen="patientApp"] .patient-app.active {
    align-items: stretch;
    padding-bottom: 2px;
  }

  body[data-active-screen="patientApp"] .site-footer,
  body[data-active-screen="doctorApp"] .site-footer {
    padding-top: 0;
  }

  .patient-app.active > .left-rail,
  .patient-app.active > .patient-workspace {
    height: 100%;
  }

  .patient-workspace {
    grid-template-rows: auto auto minmax(340px, 1fr);
    align-content: stretch;
  }

  .patient-order-row {
    order: 1;
    display: grid;
    grid-template-columns: minmax(250px, 0.85fr) minmax(0, 1.4fr);
    min-width: 0;
    overflow: visible;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 12px 32px rgba(24, 28, 38, 0.06);
  }

  .patient-order-row .patient-services {
    align-content: center;
    padding: 16px;
  }

  .patient-order-row .service-dropdown {
    position: relative;
    overflow: visible;
  }

  .patient-order-row .service-dropdown[open] {
    z-index: 40;
  }

  .patient-order-row .service-dropdown[open] summary {
    border-bottom: 0;
  }

  .patient-order-row .service-dropdown .service-grid {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 45;
    width: 100%;
    max-height: min(430px, 55vh);
    overflow-y: auto;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--panel-strong);
    box-shadow: var(--shadow);
  }

  .patient-order-row .order-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    min-height: 100%;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .patient-order-row .panel-actions {
    margin-left: auto;
  }

  .patient-workspace .status-panel {
    order: 2;
  }

  .patient-workspace .patient-map-panel {
    order: 3;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    min-height: 340px;
  }

  .patient-workspace .patient-map-panel .map,
  .patient-workspace .patient-map-panel .maplibre-map,
  .patient-workspace .patient-map-panel .yandex-map {
    height: 100%;
    min-height: 285px;
  }
}

.role-screen,
.auth-screen,
.onboarding {
  display: none;
  min-height: calc(100vh - 72px);
  place-items: center;
}

.role-screen.active,
.auth-screen.active,
.onboarding.active {
  display: grid;
}

.onboarding-card,
.auth-panel {
  width: min(980px, 100%);
  padding: clamp(24px, 5vw, 56px);
  border: 1px solid var(--line);
  border-radius: 34px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(26px);
}

.role-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(360px, 0.72fr);
  gap: clamp(24px, 5vw, 58px);
  align-items: center;
  width: min(1180px, 100%);
}

.role-hero-content {
  display: grid;
  gap: 14px;
}

.role-hero h1 {
  max-width: 860px;
  margin: 0;
  font-size: clamp(44px, 6.7vw, 82px);
  line-height: 0.92;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.55;
}

.hero-services {
  display: grid;
  gap: 12px;
  max-width: 780px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: color-mix(in srgb, var(--panel-strong) 82%, transparent);
}

.hero-services strong {
  font-size: 16px;
}

.hero-services div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 10px;
}

.hero-service-item {
  position: relative;
  display: grid;
  gap: 7px;
  justify-items: center;
  min-width: 0;
  padding: 10px 6px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-strong);
  color: var(--text);
  text-align: center;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.hero-service-item:hover,
.hero-service-item:focus-visible {
  transform: scale(1.06);
  border-color: var(--yellow-deep);
  box-shadow: 0 14px 28px rgba(24, 28, 38, 0.12);
  outline: none;
  z-index: 5;
}

.hero-service-item .service-emoji {
  width: 50px;
  height: 50px;
  border-radius: 13px;
}

.hero-service-item span {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.18;
}

.hero-service-price {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.15;
}

.hero-service-item em {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 18px);
  z-index: 10;
  width: min(224px, 70vw);
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-strong);
  color: var(--text);
  box-shadow: var(--shadow);
  font-size: 11.5px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  text-align: left;
  transform: translate(-50%, 6px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.hero-service-item em::after {
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 10px;
  height: 10px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--panel-strong);
  content: "";
  transform: translateX(-50%) rotate(45deg);
}

.hero-service-item:hover em,
.hero-service-item:focus-visible em {
  opacity: 1;
  transform: translate(-50%, 0);
}

.hero-benefits {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  max-width: 760px;
  margin-top: 8px;
}

.hero-benefits-desktop {
  display: none;
}

@media (min-width: 981px) {
  .role-hero-content > .hero-benefits {
    display: none;
  }

  .role-choice .hero-benefits-desktop {
    display: grid;
    grid-template-columns: 1fr;
    max-width: none;
    margin-top: 0;
  }
}

.hero-benefits div {
  padding-top: 14px;
  border-top: 2px solid var(--yellow);
}

.hero-benefits strong {
  display: block;
  margin-bottom: 6px;
  font-size: 18px;
}

.hero-benefits p,
.hero-benefits ul {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.hero-benefits ul {
  display: grid;
  gap: 6px;
  padding-left: 18px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

.role-choice {
  display: grid;
  gap: 16px;
  min-width: 0;
  align-self: start;
  margin-top: clamp(0px, 3vh, 28px);
}

.hero-stat {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--yellow);
  color: #111;
  box-shadow: 0 16px 36px rgba(24, 28, 38, 0.08);
}

.hero-stat strong {
  font-size: clamp(36px, 5vw, 54px);
  line-height: 0.9;
}

.hero-stat span {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.role-card {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel-strong);
  text-align: left;
  box-shadow: 0 12px 30px rgba(24, 28, 38, 0.06);
}

.role-card::after {
  position: absolute;
  inset: 48% 0 0;
  content: "";
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--panel-strong) 94%, transparent) 44%, var(--panel-strong));
  pointer-events: none;
}

.role-card:hover {
  transform: translateY(-2px);
}

.role-icon {
  position: absolute;
  inset: 0;
  display: block;
  border-radius: inherit;
  background-position: center top;
  background-repeat: no-repeat;
  background-size: auto 100%;
  pointer-events: none;
}

.role-icon-patient {
  background-image: url("assets/role-patient.png");
}

.role-icon-doctor {
  background-image: url("assets/role-doctor.png");
  background-size: auto 92%;
  background-position: center 8px;
}

.role-card strong,
.role-card small {
  position: relative;
  z-index: 1;
  display: block;
  padding: 0 22px;
}

.role-card strong {
  margin-top: 258px;
  font-size: 22px;
}

.role-card small {
  margin-top: 8px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

.onboarding-card {
  width: min(680px, 100%);
}

.slide-visual {
  height: 230px;
  margin-bottom: 26px;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(252, 224, 0, 0.92), rgba(255, 255, 255, 0.5)),
    repeating-linear-gradient(45deg, rgba(0, 0, 0, 0.08) 0 1px, transparent 1px 28px);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  position: relative;
  overflow: hidden;
}

.slide-visual[class*="patient-slide-"],
.slide-visual[class*="doctor-slide-"] {
  height: auto;
  aspect-ratio: 1.84;
  max-height: min(46vh, 360px);
  border: 1px solid var(--line);
  background-color: #f8f5ee;
  background-size: contain;
  box-shadow: 0 12px 30px rgba(24, 28, 38, 0.06);
}

.patient-slide-1 { background-image: url("assets/onboarding-patient-1.png"); }
.patient-slide-2 { background-image: url("assets/onboarding-patient-2.png"); }
.patient-slide-3 { background-image: url("assets/onboarding-patient-3.png"); }
.patient-slide-4 { background-image: url("assets/onboarding-patient-4.png"); }
.doctor-slide-1 { background-image: url("assets/onboarding-doctor-1.png"); }
.doctor-slide-2 { background-image: url("assets/onboarding-doctor-2.png"); }
.doctor-slide-3 { background-image: url("assets/onboarding-doctor-3.png"); }
.doctor-slide-4 { background-image: url("assets/onboarding-doctor-4.png"); }

.slide-visual::before,
.slide-visual::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.slide-visual::before {
  width: 150px;
  height: 150px;
  left: 14%;
  top: 42px;
}

.slide-visual::after {
  width: 92px;
  height: 92px;
  right: 18%;
  bottom: 30px;
}

.slide-visual[class*="patient-slide-"]::before,
.slide-visual[class*="patient-slide-"]::after,
.slide-visual[class*="doctor-slide-"]::before,
.slide-visual[class*="doctor-slide-"]::after {
  display: none;
}

.onboarding-card h2,
.auth-panel h2 {
  margin: 0 0 10px;
  font-size: clamp(30px, 5vw, 48px);
  letter-spacing: 0;
}

.muted {
  color: var(--muted);
  line-height: 1.5;
}

.slide-dots {
  display: flex;
  gap: 8px;
  margin: 28px 0;
}

.slide-dots span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--line);
}

.slide-dots span.active {
  width: 30px;
  background: var(--yellow);
}

.onboarding-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.auth-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 2px;
  margin-bottom: 4px;
}

.auth-panel {
  display: grid;
  grid-template-columns: minmax(320px, 520px);
  justify-content: center;
  gap: 0;
  align-items: center;
  width: min(680px, 100%);
  padding: clamp(18px, 4vw, 42px);
  border: 0;
  border-radius: 34px;
  background:
    radial-gradient(circle at 16% 12%, rgba(255, 211, 90, 0.34), transparent 32%),
    linear-gradient(135deg, rgba(255, 246, 206, 0.95), rgba(255, 255, 255, 0.96) 42%, rgba(255, 237, 161, 0.58));
  box-shadow: var(--shadow);
}

.auth-card {
  display: grid;
  gap: 14px;
  padding: clamp(22px, 4vw, 42px);
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 24px 70px rgba(24, 28, 38, 0.12);
  backdrop-filter: blur(16px);
}

.auth-card h2 {
  margin: 0;
  color: var(--text);
  font-size: 36px;
  line-height: 1;
  text-align: center;
}

.auth-card .muted,
.auth-card .eyebrow {
  text-align: center;
}

.auth-intro,
.auth-social-lead {
  margin: 0;
}

.auth-social-lead {
  font-weight: 700;
}

.auth-fields-lead {
  margin: 0;
}

[data-theme="dark"] .auth-panel {
  background:
    radial-gradient(circle at 16% 12%, rgba(255, 220, 53, 0.16), transparent 32%),
    linear-gradient(135deg, rgba(28, 29, 34, 0.98), rgba(18, 19, 23, 0.96) 48%, rgba(61, 52, 20, 0.78));
}

[data-theme="dark"] .auth-card {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(22, 24, 29, 0.9);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

[data-theme="dark"] .auth-card h2,
[data-theme="dark"] .auth-card label {
  color: #ffffff;
}

[data-theme="dark"] .auth-card .muted,
[data-theme="dark"] .auth-card .eyebrow,
[data-theme="dark"] .auth-legal,
[data-theme="dark"] .auth-divider {
  color: #d5d9e2;
}

[data-theme="dark"] .auth-toggle .segmented {
  background: rgba(255, 255, 255, 0.08);
  color: #f7f8fb;
  border-color: rgba(255, 255, 255, 0.16);
}

[data-theme="dark"] .auth-toggle .segmented.active {
  background: var(--yellow);
  color: #111;
  border-color: var(--yellow);
}

.auth-name-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

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

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

.auth-legal {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.auth-legal-link {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

[data-theme="dark"] .auth-legal-link {
  color: #ffffff;
}

.auth-form,
.profile-grid {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-width: 0;
  height: 46px;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 13px;
  background: var(--panel-strong);
  color: var(--text);
  outline: none;
}

.password-field {
  position: relative;
  display: block;
}

.password-field input {
  padding-right: 52px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 7px;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel) url("assets/password-eye.png") center / 25px 25px no-repeat;
  color: var(--muted);
  cursor: pointer;
}

.password-toggle::before {
  content: none;
}

.password-toggle::after {
  content: none;
}

.password-toggle.is-visible {
  color: var(--text);
  background-color: var(--yellow);
  border-color: var(--yellow-deep);
}

textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 13px;
  background: var(--panel-strong);
  color: var(--text);
  font: inherit;
  resize: vertical;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--yellow-deep);
  box-shadow: 0 0 0 4px rgba(252, 224, 0, 0.18);
}

.phone-field {
  display: grid;
  grid-template-columns: 54px 1fr;
  align-items: center;
}

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

.phone-flag {
  display: grid;
  height: 46px;
  place-items: center;
  border: 1px solid var(--line);
  border-right: 0;
  border-radius: 14px 0 0 14px;
  background: var(--panel-strong);
  font-size: 22px;
}

.profile-phone-confirm-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.profile-phone-confirm-row .phone-field {
  min-width: 0;
}

.profile-phone-confirm-btn {
  min-width: 112px;
  min-height: 46px;
  padding: 0 14px;
  white-space: nowrap;
}

.profile-phone-confirm-btn.is-confirmed {
  border-color: color-mix(in srgb, var(--green) 72%, var(--line));
  background: color-mix(in srgb, var(--green) 18%, var(--panel-strong));
  color: var(--green);
  box-shadow: none;
}

.phone-verification-note {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.profile-phone-confirm-row.requires-confirmation {
  border-radius: 14px;
  outline: 3px solid color-mix(in srgb, var(--yellow) 72%, transparent);
  outline-offset: 3px;
}

.doctor-fields {
  display: none;
  gap: 12px;
}

.doctor-fields.active {
  display: grid;
}

.social-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 2px;
}

.vk-id-container,
.google-id-container {
  position: relative;
  min-width: 0;
}

.vk-id-container iframe,
.vk-id-container > div,
.google-id-container iframe,
.google-id-container > div {
  max-width: 100%;
}

.google-id-container {
  width: 100%;
  min-height: 46px;
  height: 46px;
}

.google-id-rendered {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 46px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.google-id-container.google-native-ready .google-id-rendered {
  pointer-events: auto;
}

.google-id-rendered iframe,
.google-id-rendered > div {
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
  height: 46px !important;
  min-height: 46px !important;
}

.password-recovery {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--yellow-deep) 50%, var(--line));
  border-radius: 14px;
  background: color-mix(in srgb, var(--yellow) 18%, var(--panel-strong));
}

.password-recovery p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.password-recovery div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.recovery-status {
  min-height: 16px;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.file-picker {
  position: relative;
  align-items: center;
  justify-items: center;
  min-height: 88px;
  padding: 14px;
  border: 1px dashed color-mix(in srgb, var(--yellow-deep) 55%, var(--line));
  border-radius: 16px;
  background: color-mix(in srgb, var(--yellow) 9%, var(--panel-strong));
  color: var(--text);
  text-align: center;
}

.file-picker input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.file-picker span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 14px;
  background: var(--yellow);
  color: #111;
  font-weight: 900;
  overflow-wrap: anywhere;
  text-align: center;
}

.file-picker small {
  color: var(--muted);
  font-weight: 800;
}

.profile-photo-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: stretch;
  gap: 14px;
  margin: 14px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.profile-photo-preview {
  display: grid;
  place-items: center;
  width: 92px;
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--yellow) 8%, var(--panel));
  overflow: hidden;
}

.profile-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service-checklist-wrap {
  display: grid;
  gap: 10px;
}

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

.service-check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-strong);
  color: var(--text);
}

.service-check input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  accent-color: var(--yellow-deep);
}

.social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  height: 46px;
  width: 100%;
  border: 0;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 900;
  color: white;
  cursor: pointer;
}

.vk {
  background: #0077ff;
}

.vk-id-container .VkIdSdk_spinner,
.vk-id-container .VkIdSdk_oauth_link_text {
  display: none !important;
}

.vk-id-container .VkIdSdk_oauth_container,
.vk-id-container .VkIdSdk_oauth_list,
.vk-id-container .VkIdSdk_oauth_item {
  width: 100% !important;
  max-width: 100% !important;
  height: 46px !important;
  min-height: 46px !important;
}

.vk-id-container .VkIdSdk_oauth_item {
  margin-right: 0 !important;
  border-radius: 14px !important;
}

.vk-id-container .VkIdSdk_oauth_button_text {
  display: block !important;
  font-weight: 800;
}

.google {
  position: relative;
  z-index: 1;
  background: var(--panel-strong);
  color: var(--text);
  border: 1px solid color-mix(in srgb, var(--yellow-deep) 48%, var(--line));
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
}

.yandex {
  background: #e42313;
}

.social span {
  display: inline-grid;
  min-width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: inherit;
  font-weight: 900;
}

.google span {
  background: var(--yellow);
  color: #111;
}

.patient-app,
.doctor-app {
  grid-template-columns: minmax(310px, 390px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.patient-app.active,
.doctor-app.active {
  display: grid;
}

.doctor-workspace {
  display: grid;
  gap: 18px;
}

.doctor-visit-section {
  display: grid;
  gap: 18px;
}

.patient-services {
  position: relative;
  display: grid;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.patient-services-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.patient-services h2 {
  margin: 0;
  font-size: 25px;
}

.service-info-btn {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--panel-strong);
  color: var(--text);
  font-weight: 900;
  cursor: pointer;
}

.service-info-popover {
  position: absolute;
  top: 38px;
  right: 0;
  z-index: 15;
  width: min(310px, calc(100vw - 34px));
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.active-order-switcher {
  display: grid;
  gap: 8px;
}

.active-order-switcher > div {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.active-order-switcher .soft-btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.active-order-switcher .soft-btn.active {
  border-color: rgba(47, 128, 237, 0.48);
  background: rgba(47, 128, 237, 0.14);
}

.left-rail,
.workspace,
.search-panel,
.order-panel,
.status-panel,
.verify-card,
.doctor-state {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 12px 32px rgba(24, 28, 38, 0.06);
}

.left-rail {
  display: grid;
  gap: 18px;
  padding: 18px;
}

.left-rail h2 {
  margin: 0;
  font-size: 25px;
}

.search-panel,
.doctor-state,
.verify-card {
  padding: 16px;
}

.push-permission-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--yellow-deep) 36%, var(--line));
  border-radius: 16px;
  background: color-mix(in srgb, var(--yellow) 12%, var(--panel-strong));
}

.push-permission-card strong {
  display: block;
  font-size: 14px;
}

.push-permission-card p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.45;
}

.push-switch {
  justify-content: space-between;
  font-size: 13px;
  font-weight: 800;
}

.profile-password-card {
  display: grid;
  gap: 14px;
  margin: 14px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.profile-password-card strong {
  display: block;
  font-size: 14px;
}

.profile-password-card p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.45;
}

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

.profile-password-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-service-row-icon {
  width: 26px;
  height: 26px;
  object-fit: contain;
  vertical-align: middle;
  margin-right: 8px;
}

.push-switch em {
  color: var(--text);
  font-style: normal;
}

.address-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
}

.address-input-two {
  grid-template-columns: 1fr auto;
}

#cityInput,
#addressInput {
  min-width: 0;
  font-size: clamp(11px, 2.8vw, 14px);
}

.city-confirm {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.city-confirm-with-geo {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.address-input button {
  border: 1px solid var(--line);
  border-radius: 14px;
}

.geo-icon-btn {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: #111;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
  cursor: pointer;
}

.geo-icon-btn span {
  display: block;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  background: url("assets/location-pin-map.png") center / contain no-repeat;
  pointer-events: none;
}

.geo-icon-btn:hover {
  color: #111827;
  background: #f8fafc;
}

.geo-icon-btn:disabled {
  cursor: progress;
  opacity: 0.62;
}

.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 18px clamp(14px, 4vw, 40px) 24px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
}

.site-footer .seo-faq {
  display: none;
}

body[data-active-screen="roleScreen"] .site-footer .seo-faq {
  display: block;
}

.seo-faq {
  width: min(885px, 100%);
  margin: 0 auto 18px;
  padding: clamp(18px, 3vw, 34px) 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  box-shadow: none;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.55;
  text-align: left;
}

.seo-faq-head {
  position: relative;
  display: grid;
  gap: 10px;
  min-height: 136px;
  margin: 0 0 18px;
  padding-right: min(28vw, 260px);
}

.seo-faq-pill {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 10px;
  min-height: 38px;
  margin: 0;
  padding: 0 16px;
  border: 1px solid rgba(244, 203, 0, 0.34);
  border-radius: 999px;
  background: rgba(252, 224, 0, 0.05);
  color: #e0aa12;
  font-size: 14px;
  font-weight: 800;
}

.seo-faq-pill span {
  font-size: 24px;
  line-height: 1;
}

.seo-faq h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(36px, 4vw, 54px);
  line-height: 0.98;
}

.seo-faq-head > p:not(.seo-faq-pill) {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(16px, 1.8vw, 19px);
  font-weight: 600;
  line-height: 1.45;
}

.seo-faq-visual {
  position: absolute;
  right: clamp(14px, 5vw, 82px);
  top: 14px;
  width: clamp(128px, 16vw, 210px);
  height: 128px;
}

.seo-faq-clipboard {
  position: absolute;
  left: 5px;
  top: 10px;
  display: grid;
  width: 63px;
  height: 84px;
  place-items: center;
  border: 2px solid #d6dae2;
  border-radius: 10px;
  color: #c8cdd6;
  font-size: 30px;
  font-weight: 900;
}

.seo-faq-clipboard::before {
  position: absolute;
  top: -8px;
  left: 50%;
  width: 26px;
  height: 12px;
  border: 2px solid #c9ced8;
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
  content: "";
  transform: translateX(-50%);
}

.seo-faq-clipboard::after {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 22px;
  height: 1px;
  background: #d7dbe2;
  box-shadow: 0 12px 0 #d7dbe2;
  content: "";
}

.seo-faq-question {
  position: absolute;
  right: 20px;
  top: 0;
  display: grid;
  width: 74px;
  height: 74px;
  place-items: center;
  border: 2px solid var(--yellow-deep);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 42%, rgba(252, 224, 0, 0.24), #fff7d6 72%);
  color: var(--yellow-deep);
  font-size: 38px;
  font-weight: 900;
  box-shadow: 0 12px 26px rgba(244, 203, 0, 0.16);
}

.seo-faq-question::after {
  position: absolute;
  left: 4px;
  bottom: -10px;
  width: 22px;
  height: 22px;
  border-left: 2px solid var(--yellow-deep);
  border-bottom: 2px solid var(--yellow-deep);
  background: #fff7d6;
  content: "";
  transform: rotate(25deg);
}

.seo-faq-question::before {
  position: absolute;
  right: -42px;
  bottom: 0;
  width: 50px;
  height: 34px;
  border: 1px solid #d9dde5;
  border-left-color: transparent;
  border-radius: 50%;
  content: "";
}

.seo-faq-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.seo-faq-item {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(230, 232, 236, 0.82);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(24, 28, 38, 0.06);
}

.seo-faq-item[open] {
  border-color: rgba(244, 203, 0, 0.55);
  box-shadow: 0 14px 34px rgba(244, 203, 0, 0.08);
}

.seo-faq-item summary {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 34px;
  gap: 16px;
  align-items: center;
  min-height: 74px;
  padding: 16px 22px;
  cursor: pointer;
  list-style: none;
}

.seo-faq-item summary::-webkit-details-marker {
  display: none;
}

.seo-faq-icon {
  display: block;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: #f4f5f7;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 70%;
}

.seo-faq-item[open] .seo-faq-icon {
  background-color: rgba(252, 224, 0, 0.18);
}

.seo-faq-item h3 {
  margin: 0;
  color: var(--text);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.18;
}

.seo-faq-toggle {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  justify-self: end;
  border-radius: 50%;
  background: #f1f2f4;
  color: var(--text);
  font-size: 0;
}

.seo-faq-toggle::before {
  font-size: 23px;
  font-weight: 500;
  line-height: 1;
  content: "+";
}

.seo-faq-item[open] .seo-faq-toggle {
  background: var(--yellow);
}

.seo-faq-item[open] .seo-faq-toggle::before {
  content: "-";
}

.seo-faq-answer {
  display: grid;
  gap: 8px;
  padding: 20px 28px 24px 76px;
  border-top: 1px solid rgba(244, 203, 0, 0.3);
  color: #555c67;
  font-size: clamp(15px, 1.6vw, 17px);
}

.seo-faq-answer p {
  margin: 0;
}

.faq-icon-patient { background-image: url("assets/icon-patient.png"); }
.faq-icon-injection { background-image: url("assets/icon-injection.png"); }
.faq-icon-doctor { background-image: url("assets/icon-therapist.png"); }
.faq-icon-pay { background-image: url("assets/info-offer.png"); }
.faq-icon-iv { background-image: url("assets/icon-iv.png"); }
.faq-icon-lock { background-image: url("assets/auth-icon-lock.png"); }

[data-theme="dark"] .seo-faq {
  color: #f4f5f7;
}

[data-theme="dark"] .seo-faq h2,
[data-theme="dark"] .seo-faq-item h3 {
  color: #f8fafc;
}

[data-theme="dark"] .seo-faq-head > p:not(.seo-faq-pill),
[data-theme="dark"] .seo-faq-answer {
  color: #d2d7e1;
}

[data-theme="dark"] .seo-faq-item {
  border-color: #3b3f4a;
  background: #202228;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

[data-theme="dark"] .seo-faq-item[open] {
  border-color: rgba(255, 220, 53, 0.64);
  background: #24262e;
}

[data-theme="dark"] .seo-faq-toggle {
  background: #343741;
  color: #f8fafc;
}

[data-theme="dark"] .seo-faq-item[open] .seo-faq-toggle {
  background: var(--yellow);
  color: #111111;
}

[data-theme="dark"] .seo-faq-icon {
  background-color: #2d3038;
}

[data-theme="dark"] .seo-faq-answer {
  border-top-color: rgba(255, 220, 53, 0.28);
}

.web-install-only {
  display: none !important;
}

html.web-install-promo-enabled .footer-app-downloads {
  display: flex !important;
}

.footer-app-downloads {
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.store-badge-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(168px, 18vw, 226px);
  aspect-ratio: 1180 / 420;
  overflow: visible;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  transform: translateY(0) scale(1);
  transition: transform 0.22s ease;
}

.store-badge-btn:hover,
.store-badge-btn:focus-visible {
  transform: translateY(-4px) scale(1.035);
  outline: none;
}

.store-badge-btn:active {
  transform: translateY(-1px) scale(0.99);
}

.store-badge-btn img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.store-badge-btn picture {
  display: block;
  width: 100%;
  height: 100%;
}

.footer-app-downloads .store-badge-btn {
  width: clamp(84px, 9vw, 113px);
}

html.web-install-promo-enabled .app-promo-overlay.is-visible {
  display: grid !important;
}

.app-promo-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  place-items: start center;
  overflow-y: auto;
  padding: clamp(72px, 10vh, 104px) clamp(16px, 4vw, 42px) clamp(16px, 4vw, 42px);
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(10px);
  animation: app-promo-fade-in 0.22s ease-out;
}

.app-promo-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.72fr);
  width: min(860px, 100%);
  min-height: 430px;
  max-height: min(680px, calc(100vh - 64px));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 34px 100px rgba(15, 23, 42, 0.28);
  color: #111827;
  isolation: isolate;
}

.app-promo-card::before {
  display: none;
}

.app-promo-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 3;
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: #111827;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.16);
  font-size: 36px;
  line-height: 1;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.app-promo-close:hover,
.app-promo-close:focus-visible {
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.22);
  transform: rotate(90deg) scale(1.04);
}

.app-promo-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  padding: clamp(28px, 4vw, 48px);
}

.app-promo-content .eyebrow {
  margin: 0;
  color: #7b6f58;
}

.app-promo-content h2 {
  max-width: 520px;
  margin: 0;
  color: #111827;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
  letter-spacing: 0;
}

.app-promo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.app-promo-actions .store-badge-btn {
  width: clamp(184px, 15vw, 198px);
}

.app-promo-visual {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 100%;
  min-height: 0;
  padding: 22px 22px 22px 0;
  overflow: hidden;
}

.app-promo-visual img {
  display: block;
  width: auto;
  height: min(520px, 72vh);
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

.app-promo-visual picture {
  display: grid;
  max-width: 100%;
  max-height: 100%;
  place-items: center;
}

@keyframes app-promo-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

html.iphone-guide-open {
  overflow: hidden;
}

html.web-install-promo-enabled .iphone-guide-overlay.is-visible {
  display: grid !important;
}

.iphone-guide-overlay {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: none;
  padding: clamp(12px, 2vw, 24px);
  background: #ffffff;
}

.iphone-guide-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, 0.86fr) minmax(0, 1.14fr);
  width: min(980px, 100%);
  height: min(760px, calc(100vh - 24px));
  margin: auto;
  overflow: hidden;
  border: 1px solid #edf0f5;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
  color: #111827;
}

.iphone-guide-shell::before {
  display: none;
}

.iphone-guide-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 5;
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: #ffffff;
  color: #111827;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.16);
  font-size: 32px;
  line-height: 1;
}

.iphone-guide-visual {
  position: sticky;
  top: 0;
  z-index: 1;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  place-items: center;
  min-height: 100%;
  padding: 42px 28px;
  background: #ffffff;
}

.iphone-guide-shot {
  grid-column: 1;
  grid-row: 1;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: translateY(14px) scale(0.985);
  transition: opacity 0.28s ease, transform 0.28s ease;
  pointer-events: none;
}

.iphone-guide-shot.is-active {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.iphone-guide-shot img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: min(650px, calc(100vh - 140px));
  object-fit: contain;
}

.iphone-guide-shot picture {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
}

.iphone-guide-phone {
  position: relative;
  width: min(270px, 72vw);
  aspect-ratio: 9 / 18.5;
  padding: 16px 12px;
  border: 8px solid #111827;
  border-radius: 42px;
  background: #111827;
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.28);
}

.iphone-guide-speaker {
  position: absolute;
  top: 10px;
  left: 50%;
  width: 82px;
  height: 18px;
  border-radius: 0 0 16px 16px;
  background: #111827;
  transform: translateX(-50%);
  z-index: 2;
}

.iphone-guide-phone-screen {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: 30px;
  background:
    linear-gradient(180deg, #ffffff, #f8fafc 62%, #fff8c7),
    #ffffff;
}

.iphone-guide-screen-step {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  padding: 26px 20px;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.iphone-guide-screen-step::before {
  content: "";
  position: absolute;
  top: 44px;
  left: 24px;
  right: 24px;
  height: 148px;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(252, 224, 0, 0.82), rgba(255, 255, 255, 0.72)),
    url("assets/ave-logo-black.png") center / 72% auto no-repeat;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.iphone-guide-screen-step.is-active {
  opacity: 1;
  transform: translateY(0);
}

.iphone-guide-screen-step span {
  width: max-content;
  padding: 7px 10px;
  border-radius: 999px;
  background: #111827;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.iphone-guide-screen-step strong {
  font-size: 26px;
  line-height: 1.02;
}

.iphone-guide-screen-step p {
  margin: 0;
  color: #5f6673;
  line-height: 1.38;
}

.iphone-guide-dots {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}

.iphone-guide-dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.24);
}

.iphone-guide-dots button.is-active {
  width: 28px;
  background: #f2c900;
}

.iphone-guide-scroll {
  position: relative;
  z-index: 1;
  height: 100%;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  padding: 42px clamp(18px, 3vw, 38px) 42px 0;
}

.iphone-guide-intro,
.iphone-guide-slide {
  scroll-snap-align: start;
}

.iphone-guide-intro {
  min-height: 36%;
  padding: 22px 64px 24px 0;
}

.iphone-guide-intro h2 {
  max-width: 560px;
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.02;
  letter-spacing: 0;
}

.iphone-guide-intro p:not(.eyebrow) {
  max-width: 560px;
  margin: 14px 0 0;
  color: #5f6673;
  font-size: 17px;
  line-height: 1.48;
}

.iphone-guide-slide {
  min-height: 74%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  max-width: 560px;
  padding: 26px 64px 26px 0;
}

.iphone-guide-slide span {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #fce000;
  color: #111827;
  font-weight: 950;
}

.iphone-guide-slide h3 {
  margin: 0;
  font-size: clamp(26px, 3.2vw, 38px);
  line-height: 1.04;
}

.iphone-guide-slide p {
  margin: 0;
  color: #5f6673;
  font-size: 17px;
  line-height: 1.52;
}

@media (max-width: 720px) {
  .seo-faq {
    width: 100%;
    padding-top: 14px;
  }

  .seo-faq-head {
    min-height: auto;
    padding-right: 0;
    margin-bottom: 14px;
  }

  .seo-faq h2 {
    font-size: 32px;
  }

  .seo-faq-head > p:not(.seo-faq-pill) {
    font-size: 15px;
  }

  .seo-faq-visual {
    display: none;
  }

  .seo-faq-item summary {
    grid-template-columns: 40px minmax(0, 1fr) 30px;
    gap: 10px;
    min-height: 66px;
    padding: 12px;
  }

  .seo-faq-icon {
    width: 40px;
    height: 40px;
  }

  .seo-faq-item h3 {
    font-size: 15px;
  }

  .seo-faq-answer {
    padding: 14px 14px 16px;
    font-size: 14px;
  }

  .seo-faq-toggle {
    width: 28px;
    height: 28px;
  }

  .seo-faq-toggle::before {
    font-size: 20px;
  }

  .footer-app-downloads {
    width: 100%;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 8px;
    padding: 0 6px;
  }

  .store-badge-btn {
    width: min(calc((100vw - 28px) / 2), 190px);
    aspect-ratio: 1124 / 364;
    flex: 0 0 auto;
  }

  .footer-app-downloads .store-badge-btn {
    width: min(calc((100vw - 28px) / 2), 190px);
  }

  .app-promo-actions {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .app-promo-actions .store-badge-btn {
    width: min(calc(100vw - 52px), 360px);
  }

  .app-promo-overlay {
    align-items: start;
    padding: calc(env(safe-area-inset-top, 0px) + 64px) 10px 10px;
  }

  .app-promo-card {
    grid-template-columns: 1fr;
    min-height: 0;
    max-height: calc(100vh - 24px);
    overflow-y: auto;
    border-radius: 22px;
  }

  .app-promo-card::before {
    right: -128px;
    bottom: 34px;
    width: 330px;
    height: 190px;
  }

  .app-promo-content {
    gap: 10px;
    padding: 24px 18px 0;
  }

  .app-promo-content h2 {
    max-width: 100%;
    padding-right: 46px;
    font-size: clamp(22px, 7.4vw, 31px);
    line-height: 1.08;
  }

  .app-promo-actions {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
  }

  .app-promo-actions .store-badge-btn {
    width: min(calc((100vw - 56px) / 2), 190px);
  }

  .app-promo-close {
    top: 12px;
    right: 12px;
    width: 46px;
    height: 46px;
    font-size: 30px;
  }

  .app-promo-visual {
    align-items: flex-end;
    height: auto;
    margin-top: -44px;
    min-height: 0;
    padding: 0 12px 8px;
  }

  .app-promo-visual img {
    width: min(260px, 72vw);
    height: auto;
    max-height: min(100%, 300px);
    transform: none;
  }

  .iphone-guide-overlay {
    padding: calc(env(safe-area-inset-top, 0px) + 8px) 8px 8px;
  }

  .iphone-guide-shell {
    grid-template-columns: 1fr;
    height: calc(100vh - env(safe-area-inset-top, 0px) - 16px);
    border-radius: 22px;
  }

  .iphone-guide-close {
    top: 12px;
    right: 12px;
    width: 44px;
    height: 44px;
  }

  .iphone-guide-visual {
    min-height: 48vh;
    padding: 16px 16px 18px;
  }

  .iphone-guide-shot img {
    max-width: min(100%, 310px);
    max-height: 39vh;
  }

  .iphone-guide-dots {
    margin-top: 18px;
    transform: translateY(8px);
  }

  .iphone-guide-scroll {
    height: 52vh;
    padding: 0 18px 24px;
  }

  .iphone-guide-intro {
    min-height: 52%;
    padding: 20px 48px 16px 0;
  }

  .iphone-guide-intro h2 {
    font-size: clamp(26px, 8vw, 34px);
  }

  .iphone-guide-intro p:not(.eyebrow),
  .iphone-guide-slide p {
    font-size: 15px;
  }

  .iphone-guide-slide {
    min-height: 76%;
    padding: 18px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .store-badge-btn,
  .app-promo-close {
    transition: none;
  }

  .app-promo-overlay {
    animation: none;
  }
}

.admin-footer {
  border-top: 1px solid #dde7f2;
  background: #ffffff;
}

.field-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.access-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.access-grid .full-field {
  grid-column: 1 / -1;
}

@media (max-width: 680px) {
  .topbar {
    min-height: 76px;
    padding-left: 14px;
    padding-right: 14px;
  }

  .brand-logo {
    width: 174px;
    height: 60px;
    background-image: url("assets/ave-logo-black.png");
  }

  :root[data-theme="dark"] .brand-logo {
    background-image: url("assets/ave-logo-black.png");
  }

  .profile-icon {
    flex-basis: 60px;
    width: 60px;
    height: 60px;
    min-width: 60px;
    max-width: 60px;
    border-radius: 16px;
  }

  .profile-icon span {
    inset: 5px;
    width: auto;
    height: auto;
  }

  body.mobile-topbar-compact .topbar {
    min-height: 46px;
    padding-top: 2px;
    padding-bottom: 2px;
  }

  body.mobile-topbar-compact .brand-logo {
    width: 104px;
    height: 36px;
  }

  body.mobile-topbar-compact .profile-icon {
    flex-basis: 36px;
    width: 36px;
    height: 36px;
    min-width: 36px;
    max-width: 36px;
    min-height: 36px;
    max-height: 36px;
    border-radius: 10px;
  }

  body.mobile-topbar-compact .profile-icon span {
    inset: 3px;
    border-radius: 8px;
  }

  .address-input:not(.address-input-two),
  .city-confirm-with-geo {
    grid-template-columns: 1fr 1fr;
  }

  .address-input:not(.address-input-two) input,
  .city-confirm-with-geo input {
    grid-column: 1 / -1;
  }

  .address-input:not(.address-input-two) .geo-icon-btn,
  .city-confirm-with-geo .geo-icon-btn,
  .address-input:not(.address-input-two) #cityConfirm,
  .city-confirm-with-geo #doctorCityConfirm {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .address-input:not(.address-input-two),
  .city-confirm-with-geo {
    grid-template-columns: 1fr 1fr;
  }

  .address-input:not(.address-input-two) input,
  .city-confirm-with-geo input {
    grid-column: 1 / -1;
  }

  .address-input:not(.address-input-two) .geo-icon-btn,
  .city-confirm-with-geo .geo-icon-btn,
  .address-input:not(.address-input-two) #cityConfirm,
  .city-confirm-with-geo #doctorCityConfirm {
    width: 100%;
  }

  #addressInput {
    grid-column: 1 / -1;
    font-size: 12px;
  }
}

@media (max-width: 768px) {
  input,
  select,
  textarea {
    font-size: 16px !important;
  }
}

.time-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 14px 0;
}

.segmented.active {
  background: var(--text);
  color: var(--bg);
}

#dateTimeInput {
  display: none;
}

#dateTimeInput.active {
  display: block;
}

.service-grid,
.feed {
  display: grid;
  gap: 10px;
}

.service-dropdown {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-strong);
  overflow: hidden;
}

.service-dropdown summary {
  min-height: 58px;
  padding: 17px 18px;
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.service-dropdown summary::-webkit-details-marker {
  display: none;
}

.service-dropdown summary::after {
  content: "⌄";
  float: right;
  color: var(--muted);
}

.service-dropdown[open] summary {
  border-bottom: 1px solid var(--line);
}

.service-dropdown .service-grid {
  max-height: min(430px, 55vh);
  overflow-y: auto;
  padding: 10px;
}

.service-card,
.feed-card,
.review-card,
.info-card,
.history-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  background: var(--panel-strong);
}

.service-card {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 14px;
  align-items: center;
  width: 100%;
  min-height: 78px;
  text-align: left;
}

.service-card.active {
  border-color: var(--yellow-deep);
  box-shadow: 0 0 0 4px rgba(252, 224, 0, 0.18);
}

.service-emoji {
  display: block;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  box-shadow: inset 0 0 0 1px rgba(22, 24, 30, 0.04);
}

.service-icon-injection { background-image: url("assets/icon-injection.png"); }
.service-icon-iv { background-image: url("assets/icon-iv.png"); }
.service-icon-bandage { background-image: url("assets/icon-bandage.png"); }
.service-icon-narcologist { background-image: url("assets/icon-narcologist.png"); }
.service-icon-therapist { background-image: url("assets/icon-therapist.png"); }
.service-icon-pediatrician { background-image: url("assets/icon-pediatrician.png"); }
.service-icon-tests { background-image: url("assets/icon-tests.png"); }
.service-icon-massage { background-image: url("assets/icon-massage.png"); }
.service-icon-caregiver { background-image: url("assets/icon-caregiver.png"); }
.service-icon-pcr { background-image: url("assets/icon-pcr.png"); }
.service-icon-other { background-image: url("assets/icon-other.png"); }

.service-list-card strong {
  font-size: 16px;
}

.service-card strong,
.feed-card strong {
  display: block;
  margin-bottom: 5px;
}

.service-meta,
.feed-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

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

.patient-workspace .order-panel {
  order: 1;
}

.patient-workspace .status-panel {
  order: 2;
}

.patient-map-panel {
  order: 3;
}

.map-panel {
  overflow: hidden;
  width: 100%;
  min-width: 0;
  min-height: 510px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-strong);
}

.map-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.map-toolbar strong {
  color: var(--text);
}

.map {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-height: 455px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(116, 121, 132, 0.12) 1px, transparent 1px),
    linear-gradient(rgba(116, 121, 132, 0.12) 1px, transparent 1px),
    linear-gradient(135deg, #e9f4ff, #f9fbf4 52%, #fff5d8);
  background-size: 54px 54px, 54px 54px, auto;
}

.maplibre-map {
  width: 100%;
  max-width: 100%;
  min-height: 455px;
  z-index: 1;
  background: #eef3f7;
}

.maplibre-map .maplibregl-canvas {
  outline: 0;
}

[data-theme="dark"] .maplibre-map .maplibregl-canvas {
  filter: invert(0.92) hue-rotate(180deg) saturate(0.72) brightness(0.78);
}

.maplibre-map .maplibregl-ctrl-group {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--soft-shadow);
}

.maplibre-map .maplibregl-popup-content {
  max-width: min(260px, 72vw);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-strong);
  color: var(--text);
  box-shadow: var(--shadow);
  font: 700 13px/1.45 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.map-loading {
  display: grid;
  min-height: inherit;
  place-items: center;
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

[data-theme="dark"] .map {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(135deg, #182538, #1f2b24 52%, #302b1b);
  background-size: 54px 54px, 54px 54px, auto;
}

.map::before {
  content: "";
  position: absolute;
  inset: 18% -12% auto -10%;
  height: 86px;
  transform: rotate(-8deg);
  border: 20px solid rgba(255, 255, 255, 0.72);
  border-left: 0;
  border-right: 0;
}

.map.map-ready::before {
  display: none;
}

.pin {
  position: absolute;
  display: grid;
  min-width: 46px;
  height: 46px;
  place-items: center;
  border: 3px solid var(--panel-strong);
  border-radius: 999px;
  background: var(--yellow);
  color: #111;
  font-weight: 900;
  box-shadow: var(--shadow);
  transition: left 0.7s ease, top 0.7s ease, transform 0.2s ease;
}

.pin.patient {
  background: var(--blue);
  color: #fff;
}

.pin.patient-fallback-dot {
  min-width: 48px;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  transform: translate(-50%, -88%);
}

.pin.patient-fallback-dot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.pin.service-pin {
  width: 52px;
  height: 52px;
  padding: 4px;
  border-color: #fff;
  background: #fff;
}

.pin.service-pin img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 999px;
}

.pin.doctor {
  background: var(--green);
  color: #fff;
}

.pin.doctor-fallback-pin {
  width: 54px;
  height: 54px;
  min-width: 54px;
  padding: 3px;
  border-color: #fff;
  background: #fff;
}

.pin.doctor-fallback-pin img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 999px;
}

.pin.profile-photo-pin {
  padding: 0;
  border: 0;
  background: transparent;
}

.pin.doctor-fallback-pin.profile-photo-pin {
  border: 0;
}

.pin.profile-photo-pin img {
  box-sizing: border-box;
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  border: 3px solid var(--yellow-deep);
  border-radius: 8px;
  object-fit: cover;
}

.pin.selected {
  transform: scale(1.14);
}

.map-marker {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 999px;
  background: var(--panel-strong);
  color: var(--text);
  font-weight: 900;
  box-shadow: 0 16px 34px rgba(26, 31, 42, 0.22);
  transform: translateY(-4px);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.map-marker:hover {
  transform: translateY(-8px) scale(1.04);
  box-shadow: 0 20px 42px rgba(26, 31, 42, 0.3);
}

.map-marker img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.map-marker-patient-dot {
  width: 50px;
  height: 50px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.map-marker-doctor-pin {
  border-color: var(--green);
}

.map-marker-order-pin {
  padding: 5px;
  border-color: #fff;
  background: #fff;
}

.map-marker-patient-photo,
.map-marker-doctor-photo {
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
}

.map-marker-patient-photo img,
.map-marker-doctor-photo img {
  box-sizing: border-box;
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  border: 3px solid var(--yellow-deep);
  border-radius: 8px;
  object-fit: cover;
}

.maplibregl-marker.map-marker-patient-photo img,
.maplibregl-marker.map-marker-doctor-photo img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: cover !important;
}

.radius {
  position: absolute;
  width: 260px;
  height: 260px;
  border: 2px dashed rgba(47, 128, 237, 0.45);
  border-radius: 999px;
  left: calc(50% - 130px);
  top: calc(50% - 130px);
  background: rgba(47, 128, 237, 0.08);
}

.order-panel,
.status-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-width: 0;
  padding: 16px;
}

.order-panel > div:first-child {
  min-width: 0;
}

.status-panel {
  align-items: stretch;
  flex-direction: column;
}

.order-panel h3 {
  margin: 0 0 5px;
  font-size: 22px;
}

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

.status-list {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(5, minmax(116px, 1fr));
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.status-step {
  min-height: 42px;
  padding: 10px;
  border-radius: 14px;
  background: var(--panel-strong);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  white-space: normal;
}

.status-step.active {
  background: var(--yellow);
  color: #111;
}

#doctorStatusPanel .status-step {
  background: #eef1f4;
  color: #8a929d;
}

#doctorStatusPanel .status-step.active:nth-child(1),
#doctorStatusPanel .status-step.active:nth-child(2) {
  background: #cceeff;
  color: #0b4866;
}

#doctorStatusPanel .status-step.active:nth-child(3),
#doctorStatusPanel .status-step.active:nth-child(4) {
  background: #cfe0ff;
  color: #123f88;
}

#doctorStatusPanel .status-step.active:nth-child(5) {
  background: #c9f0d8;
  color: #0d5634;
}

.doctor-state {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  min-width: 0;
  overflow: hidden;
}

.doctor-state > div:first-child {
  flex: 1 1 auto;
  min-width: 0;
}

.doctor-state h2 {
  margin: 0;
  min-width: 0;
}

.doctor-name-line {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.verified-badge {
  display: inline-grid;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-size: 15px;
  font-weight: 900;
}

.doctor-app .doctor-workspace .map-panel {
  min-height: 380px;
}

.doctor-app .doctor-workspace .map,
.doctor-app .doctor-workspace .yandex-map {
  min-height: 322px;
}

.current-visit-label {
  color: var(--green);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0;
}

.active-orders-title {
  margin: 0;
  font-size: 22px;
  overflow-wrap: anywhere;
}

.switch {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.switch input {
  display: none;
}

.switch input + span {
  position: relative;
  flex: 0 0 48px;
  width: 48px;
  min-width: 48px;
  height: 28px;
  border-radius: 999px;
  background: var(--line);
}

.switch input + span::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  left: 3px;
  top: 3px;
  border-radius: 999px;
  background: white;
  transition: transform 0.2s ease;
}

.doctor-state > .switch {
  flex: 0 0 auto;
  max-width: 100%;
}

.switch-label {
  min-width: 0;
  color: var(--muted);
  line-height: 1.2;
  white-space: nowrap;
}

.switch input:disabled + span {
  opacity: 0.55;
}

.switch input:disabled + span::after {
  opacity: 0.85;
}

.switch input:checked + span {
  background: var(--green);
}

.switch input:checked + span::after {
  transform: translateX(20px);
}

.feed-card button {
  margin-top: 12px;
}

.order-response-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 0.55fr);
  gap: 8px;
  align-items: center;
}

.order-response-actions button {
  margin-top: 12px;
}

.feed-card.is-confirmed {
  border-color: var(--yellow-deep);
  box-shadow: 0 0 0 4px rgba(252, 224, 0, 0.16);
}

.feed-card.is-awarded {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(25, 179, 107, 0.14);
}

.privacy-grid,
.candidate-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
}

.privacy-card,
.candidate-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  background: var(--panel-strong);
}

.privacy-card strong,
.candidate-card strong {
  display: block;
  margin-bottom: 5px;
}

.privacy-card p,
.candidate-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.offers-panel,
.offer-list {
  display: grid;
  gap: 10px;
}

.offers-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.offers-toolbar label {
  min-width: min(260px, 100%);
}

.offer-card {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  background: var(--panel-strong);
}

.offer-card-warning {
  border-color: color-mix(in srgb, var(--yellow-deep) 48%, var(--line));
  background: color-mix(in srgb, var(--yellow) 10%, var(--panel-strong));
}

.offer-doctor-photo {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: var(--panel);
}

.assigned-doctor-card {
  display: grid;
  grid-template-columns: 56px 1fr;
  align-items: center;
  gap: 12px;
}

.assigned-doctor-photo {
  align-self: start;
}

.offer-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

@media (max-width: 560px) {
  .offer-card {
    grid-template-columns: 48px 1fr;
  }

  .offer-actions {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .offer-card .offer-warning {
    grid-column: 1 / -1;
  }

  .offer-actions button {
    flex: 1 1 120px;
  }
}

.offer-card p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.offer-card .offer-warning {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(252, 224, 0, 0.24);
  color: var(--text);
  font-weight: 750;
  overflow-wrap: anywhere;
}

.rating-panel {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  background: var(--panel-strong);
}

.rating-criterion {
  display: grid;
  gap: 7px;
}

.rating-criterion > span,
.status-heading {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
}

.status-heading-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.status-cancel-btn.danger-btn {
  flex: 0 0 auto;
  border-color: var(--red);
  background: var(--red);
  color: #ffffff;
}

.status-cancel-btn.danger-btn:hover,
.status-cancel-btn.danger-btn:focus-visible {
  border-color: #e3494f;
  background: #e3494f;
  color: #ffffff;
}

@media (min-width: 981px) {
  .patient-workspace .status-list,
  .status-heading-row {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
  }

  .status-heading-row .status-heading {
    grid-column: 1;
  }

  .status-heading-row .status-cancel-btn {
    grid-column: 5;
    width: 100%;
  }
}

.star-row {
  display: flex;
  gap: 6px;
}

.star-btn {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--muted);
  font-size: 22px;
}

.star-btn.active {
  border-color: var(--yellow-deep);
  background: var(--yellow);
  color: #111;
}

.response-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(252, 224, 0, 0.22);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.order-actions {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: end;
  width: 100%;
}

.reschedule-field {
  min-width: 0;
}

.danger-btn {
  color: var(--red);
}

.doctor-controls,
.history-panel,
.chats-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--panel);
  box-shadow: 0 12px 32px rgba(24, 28, 38, 0.06);
}

.history-panel,
.chats-panel,
.chat-content,
.chat-list,
.info-list {
  display: grid;
  gap: 10px;
}

.history-panel h3,
.chats-panel h3,
.admin-grid h3 {
  margin: 0;
}

.chat-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
  gap: 10px;
}

.chat-tab {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 7px;
  min-height: 128px;
  padding: 10px 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-strong);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.18;
  text-align: center;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.chat-tab:hover {
  transform: scale(1.04);
  border-color: var(--yellow-deep);
  box-shadow: 0 12px 26px rgba(24, 28, 38, 0.12);
}

.chat-tab img {
  display: block;
  width: 62px;
  height: 62px;
  object-fit: contain;
}

.chat-tab span {
  display: grid;
  min-height: 30px;
  place-items: center;
  font-size: 12px;
  line-height: 1.18;
}

.chat-tab.active {
  border-color: var(--yellow-deep);
  background: color-mix(in srgb, var(--yellow) 18%, var(--panel-strong));
  color: var(--text);
}

.chat-message,
.chat-item {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  background: var(--panel-strong);
}

.chat-message p,
.chat-item p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.chat-message small,
.chat-item small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.chat-compose {
  display: grid;
  gap: 10px;
}

.eta-field {
  margin-top: 12px;
}

.confirm-field {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  color: var(--text);
}

.confirm-field input {
  width: 18px;
  min-height: 18px;
  flex: 0 0 auto;
}

.support-modal,
.admin-modal {
  display: grid;
  gap: 14px;
}

.support-thread,
.admin-list {
  display: grid;
  gap: 10px;
  max-height: min(420px, 52vh);
  overflow: auto;
}

.support-message,
.stat-card,
.admin-row {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  background: var(--panel);
}

.support-message p,
.admin-row p {
  margin: 5px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.support-message small,
.admin-row span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.admin-message {
  background: color-mix(in srgb, var(--yellow) 18%, var(--panel));
}

.support-ticket-summary,
.support-resolved-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--panel-strong);
}

.support-ticket-summary span,
.support-resolved-note strong {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, #58a6ff 16%, var(--panel));
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.support-ticket-summary.is-closed span,
.support-resolved-note strong {
  background: color-mix(in srgb, #44c279 18%, var(--panel));
}

.support-resolved-note {
  display: grid;
  justify-items: start;
}

.support-resolved-note p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.support-kanban {
  display: grid;
  grid-template-columns: repeat(3, minmax(240px, 1fr));
  gap: 12px;
}

.admin-list-pane .support-kanban {
  grid-template-columns: 1fr;
}

.support-column {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 240px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.support-column h4 {
  display: flex;
  justify-content: space-between;
  margin: 0;
}

.support-new {
  background: color-mix(in srgb, #ffd35a 18%, var(--panel));
}

.support-in_progress {
  background: color-mix(in srgb, #58a6ff 16%, var(--panel));
}

.support-closed {
  background: color-mix(in srgb, #44c279 14%, var(--panel));
}

.support-ticket-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-strong);
}

.support-ticket-card.active,
.support-ticket-card:hover {
  border-color: var(--yellow-deep);
  box-shadow: 0 10px 22px rgba(24, 28, 38, 0.08);
}

.support-ticket-compact .support-ticket-actions {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.support-ticket-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.support-ticket-head p,
.support-ticket-head span {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.text-link-btn {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  font-weight: 800;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

[data-theme="dark"] .text-link-btn {
  color: #ffffff;
}

.support-ticket-window {
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
}

.support-ticket-title {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.support-title-edit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.support-ticket-actions {
  display: grid;
  gap: 8px;
}

.support-ticket-actions textarea {
  min-height: 68px;
}

.support-empty {
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.support-messenger {
  display: grid;
  gap: 14px;
  height: min(720px, calc(100vh - 210px));
  min-height: 540px;
  padding: 16px;
}

.support-messenger-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.support-messenger-head h3 {
  margin: 4px 0;
}

.support-messenger-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.support-messenger-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.messenger-window {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 0;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--panel) 78%, #f4f8fd);
}

.messenger-row {
  display: flex;
}

.messenger-row.user {
  justify-content: flex-start;
}

.messenger-row.admin {
  justify-content: flex-end;
}

.messenger-row.system {
  justify-content: center;
}

.messenger-bubble {
  max-width: min(78%, 520px);
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  font-size: 12px;
}

.messenger-row.admin .messenger-bubble {
  background: color-mix(in srgb, var(--yellow) 22%, var(--panel));
  border-color: var(--yellow-deep);
}

.messenger-row.system .messenger-bubble {
  max-width: 88%;
  text-align: center;
  background: color-mix(in srgb, #58a6ff 12%, var(--panel));
}

.messenger-bubble p {
  margin: 4px 0;
  color: var(--text);
  font-size: 12px;
  line-height: 1.35;
}

.messenger-bubble small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.messenger-compose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.messenger-compose textarea {
  min-height: 74px;
}

.admin-stats-controls {
  display: grid;
  gap: 12px;
}

.admin-stats-chart {
  display: grid;
  gap: 12px;
}

.admin-summary-table-wrap {
  width: 100%;
  overflow: auto;
}

.admin-summary-table {
  width: 100%;
  min-width: 940px;
  border-collapse: collapse;
  font-size: 12px;
}

.admin-summary-table th,
.admin-summary-table td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
}

.admin-summary-table th:first-child,
.admin-summary-table td:first-child {
  text-align: left;
}

.admin-summary-table th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.admin-summary-table tfoot td {
  font-weight: 800;
  background: var(--panel);
}

.admin-chart-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 42px;
  gap: 10px;
  align-items: center;
  font-size: 13px;
  font-weight: 800;
}

.admin-chart-bar {
  height: 18px;
  min-width: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--yellow), #69c0ff);
}

.admin-doctors-details {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
}

.admin-doctors-details summary {
  min-height: 46px;
  padding: 13px 14px;
  cursor: pointer;
  font-weight: 800;
}

.admin-collapsible-body {
  padding: 0 12px 12px;
}

.compact-admin-list {
  max-height: 360px;
  padding: 0 12px 12px;
}

.admin-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 16px;
}

.admin-filter-panel {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
}

.admin-filter-panel strong {
  font-size: 13px;
}

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

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

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

.stat-card strong {
  display: block;
  font-size: 28px;
}

.stat-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.admin-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

.admin-row-stacked {
  grid-template-columns: 1fr;
}

.admin-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

button:disabled,
input:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.verify-card p,
.review-card p,
.info-card p,
.history-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.profile-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.profile-metric,
.profile-status-pill {
  display: inline-grid;
  gap: 2px;
  min-height: 42px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-strong);
  color: var(--text);
  font-size: 12px;
}

.profile-metric strong {
  font-size: 14px;
  line-height: 1;
}

.profile-metric span,
.profile-status-pill {
  color: var(--muted);
  font-weight: 800;
}

button.profile-metric {
  cursor: pointer;
}

button.profile-metric:hover {
  border-color: var(--yellow-deep);
}

.profile-status-pill {
  align-content: center;
}

.profile-status-pill.is-active {
  border-color: color-mix(in srgb, var(--green) 45%, var(--line));
  color: var(--green);
}

.profile-client-avatar {
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  border-radius: 18px;
  background: color-mix(in srgb, var(--yellow) 32%, var(--panel-strong));
  color: var(--text);
  font-size: 38px;
  font-weight: 900;
}

.legal-document {
  display: grid;
  gap: 12px;
}

.legal-document > strong {
  font-size: 16px;
}

.legal-document-body {
  display: grid;
  gap: 8px;
  max-height: min(520px, 58vh);
  overflow: auto;
  padding-right: 6px;
}

.legal-document-body p.legal-heading {
  margin-top: 12px;
  color: var(--text);
  font-weight: 800;
}

dialog {
  width: min(920px, calc(100% - 24px));
  max-width: calc(100vw - 24px);
  border: 0;
  border-radius: 28px;
  padding: 0;
  background: transparent;
  overflow: hidden;
}

#adminDialog {
  width: min(1180px, calc(100% - 24px));
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(8px);
}

.profile-modal {
  position: relative;
  width: 100%;
  max-width: 100%;
  max-height: min(86vh, 980px);
  overflow: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  touch-action: pan-y;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel-strong);
  color: var(--text);
  box-shadow: var(--shadow);
}

#profileDialog .profile-modal {
  padding-top: 0;
}

.profile-modal-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: 0 -24px 18px;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--line);
  border-radius: 28px 28px 0 0;
  background: color-mix(in srgb, var(--panel-strong) 96%, transparent);
  box-shadow: 0 10px 22px rgba(24, 28, 38, 0.08);
  backdrop-filter: blur(14px);
}

.profile-modal-header .eyebrow {
  margin: 0 0 4px;
}

.profile-modal-header h2 {
  margin: 0;
  padding-right: 8px;
}

.profile-modal-header .close-btn {
  position: static;
  flex: 0 0 auto;
}

.consent-modal {
  max-width: 560px;
}

.legal-modal {
  max-width: 760px;
}

.consent-modal h2 {
  margin: 0 44px 12px 0;
}

.consent-modal p {
  line-height: 1.55;
}

.close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text);
  font-size: 24px;
}

.profile-grid {
  grid-template-columns: repeat(2, 1fr);
  margin: 18px 0;
}

.profile-modal-header + .profile-grid {
  margin-top: 0;
}

.profile-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}

.profile-columns.single-column {
  grid-template-columns: 1fr;
}

.profile-columns section {
  display: grid;
  align-content: start;
  gap: 10px;
}

.profile-columns h3 {
  margin: 0;
}

.profile-chat-section {
  margin-bottom: 18px;
}

.doctor-profile-fields {
  display: grid;
  gap: 10px;
  margin: 18px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.doctor-profile-fields.hidden {
  display: none;
}

.doctor-profile-fields h3 {
  margin: 0;
}

.doctor-profile-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  align-items: stretch;
}

.profile-grid .full-field {
  grid-column: 1 / -1;
}

.doctor-profile-field {
  gap: 5px;
  min-width: 0;
}

.doctor-profile-grid input:not([type="checkbox"]):not([type="file"]),
.doctor-profile-grid select {
  height: 42px;
  min-height: 42px;
  border-radius: 10px;
}

.doctor-workplaces-fields {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.doctor-workplaces-fields strong {
  font-size: 14px;
  line-height: 1.2;
}

.doctor-workplace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.85fr) minmax(250px, 1fr);
  gap: 6px;
}

.doctor-workplace-period-range {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  min-width: 0;
}

.doctor-workplace-period-range input {
  padding: 0 8px;
}

.doctor-bio-field textarea {
  width: 100%;
  min-width: 0;
  min-height: 112px;
  resize: vertical;
}

.doctor-bio-field small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.doctor-services-wrap {
  gap: 6px;
  min-width: 0;
  margin: 0;
}

.doctor-services-wrap strong {
  line-height: 1.2;
}

.doctor-services-wrap .field-note {
  margin: 0;
}

.doctor-service-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.doctor-service-grid .service-check {
  min-height: 40px;
  padding: 7px 9px;
  border-radius: 8px;
  line-height: 1.2;
}

.doctor-legal-details {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--panel) 94%, var(--accent) 6%);
}

.doctor-legal-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 12px 14px;
  cursor: pointer;
  font-weight: 800;
  list-style: none;
}

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

.doctor-legal-details summary::after {
  content: "+";
  flex: 0 0 auto;
  font-size: 22px;
  line-height: 1;
}

.doctor-legal-details[open] summary::after {
  content: "−";
}

.doctor-legal-details summary small {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
}

.doctor-legal-details-body {
  display: grid;
  gap: 14px;
  padding: 0 14px 14px;
  border-top: 1px solid var(--line);
}

.doctor-tax-status-fieldset {
  min-width: 0;
  margin: 14px 0 0;
  padding: 0;
  border: 0;
}

.doctor-tax-status-fieldset legend {
  margin-bottom: 8px;
  font-weight: 800;
}

.doctor-tax-status-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.doctor-tax-status-options label,
.doctor-legal-consent {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  cursor: pointer;
  font-weight: 700;
}

.doctor-tax-status-options input,
.doctor-legal-consent input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.doctor-legal-status-panel {
  display: grid;
  gap: 10px;
  padding-top: 4px;
}

.doctor-legal-status-panel h4 {
  margin: 6px 0 0;
  font-size: 15px;
}

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

.doctor-legal-grid label {
  display: grid;
  gap: 5px;
  min-width: 0;
  font-size: 13px;
  font-weight: 700;
}

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

.doctor-legal-grid input:not([type="file"]),
.doctor-legal-grid select,
.doctor-legal-grid textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
}

.doctor-legal-grid input:not([type="file"]),
.doctor-legal-grid select {
  min-height: 42px;
  padding: 0 11px;
}

.doctor-legal-grid textarea {
  padding: 10px 11px;
  resize: vertical;
}

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

.admin-legal-value {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #e5edf6;
  border-radius: 8px;
  background: #ffffff;
}

.admin-legal-value small {
  color: #6b778c;
  font-weight: 700;
}

.admin-legal-value strong {
  overflow-wrap: anywhere;
}

.admin-legal-empty {
  margin: 0;
  color: #6b778c;
}

@media (max-width: 680px) {
  .doctor-tax-status-options,
  .doctor-legal-grid,
  .admin-legal-values {
    grid-template-columns: minmax(0, 1fr);
  }

  .doctor-legal-grid .wide-field {
    grid-column: auto;
  }
}

.doctor-service-grid .service-check span {
  min-width: 0;
}

.doctor-file-picker {
  gap: 6px;
  min-height: 76px;
  padding: 10px;
  border-radius: 10px;
}

.doctor-file-picker span {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 10px;
}

.doctor-file-picker small {
  margin: -2px 0 0;
}

.profile-verification-submit {
  align-self: stretch;
  min-height: 76px;
  padding: 10px 14px;
  border-radius: 10px;
  line-height: 1.25;
}

@media (max-width: 980px) {
  .doctor-service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.doctor-response-list {
  display: grid;
  gap: 10px;
}

.response-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-strong);
}

.response-card-warning {
  border-color: color-mix(in srgb, var(--yellow-deep) 48%, var(--line));
  background: color-mix(in srgb, var(--yellow) 10%, var(--panel-strong));
}

.response-card strong,
.response-card p {
  margin: 0 0 6px;
}

.response-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.response-card .response-warning,
.feed-card .response-warning {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(252, 224, 0, 0.24);
  color: var(--text);
  font-weight: 750;
}

.admin-price-field {
  display: grid;
  grid-template-columns: auto minmax(100px, 150px);
  gap: 8px;
  align-items: center;
  color: var(--text);
}

.doctor-doc-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.doc-link {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.profile-expand-btn {
  margin-top: 10px;
}

.doctor-public-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
}

.doctor-public-card img,
.doctor-public-photo-empty {
  width: 96px;
  height: 96px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.doctor-public-card img {
  object-fit: cover;
}

.doctor-public-photo-empty {
  display: grid;
  place-items: center;
  padding: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
}

.doctor-public-card h2,
.doctor-public-card p {
  margin: 0 0 6px;
  overflow-wrap: anywhere;
}

.doctor-public-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.doctor-score-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.doctor-score-grid .privacy-card p {
  overflow-wrap: anywhere;
}

.doctor-public-bio {
  margin-bottom: 12px;
}

.doctor-public-bio p {
  margin: 8px 0 0;
  color: var(--text);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.review-scores {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.review-summary-card {
  display: grid;
  grid-template-columns: minmax(130px, 0.55fr) minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 12px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--yellow-deep) 38%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--yellow) 10%, var(--panel-strong));
}

.review-summary-main,
.review-summary-grid div {
  display: grid;
  gap: 4px;
  align-content: center;
}

.review-summary-main strong {
  font-size: 28px;
  line-height: 1;
}

.review-summary-main span,
.review-summary-main small,
.review-summary-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
}

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

.review-summary-grid div {
  min-height: 58px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.review-summary-grid strong {
  font-size: 16px;
}

.review-scores span,
.doctor-score-list span {
  padding: 6px 8px;
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

@media (max-width: 560px) {
  .doctor-workplace-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .doctor-workplace-period-range {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  #profileDialog input[type="date"] {
    padding: 0 6px;
    font-size: 12px;
  }

  .doctor-service-grid {
    grid-template-columns: 1fr;
  }

  .review-summary-card {
    grid-template-columns: 1fr;
  }
}

.profile-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: center;
}

.profile-save-inline {
  align-self: end;
  min-height: 46px;
}

.profile-preferences-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 14px 0;
}

.profile-preferences-row .profile-preference-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px minmax(72px, auto);
  align-items: center;
  gap: 16px;
  min-width: 0;
  min-height: 104px;
  margin: 0;
  padding: 18px 20px;
  border: 1px solid color-mix(in srgb, var(--yellow-deep) 36%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--yellow) 7%, var(--panel-strong));
}

.profile-preference-copy {
  min-width: 0;
}

.profile-preference-copy strong {
  display: block;
  color: var(--text);
  font-size: 16px;
  line-height: 1.25;
}

.profile-preferences-row .profile-preference-copy p {
  display: -webkit-box;
  min-height: 32px;
  margin: 6px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.profile-preferences-row .switch {
  position: relative;
  align-self: center;
  justify-self: center;
  width: 48px;
  height: 28px;
  cursor: pointer;
}

.profile-preferences-row .switch input {
  position: absolute;
  display: block;
  width: 1px;
  min-width: 1px;
  height: 1px;
  min-height: 1px;
  opacity: 0;
}

.profile-preferences-row .switch input:focus-visible + span {
  outline: 3px solid color-mix(in srgb, var(--green) 38%, transparent);
  outline-offset: 3px;
}

.profile-preference-state {
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.2;
  text-align: right;
  white-space: nowrap;
}

.profile-push-card .profile-preference-state.active {
  color: var(--green);
}

@media (max-width: 680px) {
  .profile-preferences-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 420px) {
  .profile-preferences-row .profile-preference-card {
    grid-template-columns: minmax(0, 1fr) 48px minmax(64px, auto);
    gap: 10px;
    min-height: 104px;
    padding: 14px 12px;
  }

  .profile-preference-copy strong {
    font-size: 14px;
  }

  .profile-preferences-row .profile-preference-copy p,
  .profile-preference-state {
    font-size: 12px;
  }
}

@media (max-width: 980px) {
  .topbar {
    flex-wrap: wrap;
  }

  .role-hero {
    grid-template-columns: 1fr;
  }

  .patient-app.active,
  .doctor-app.active,
  .auth-panel {
    grid-template-columns: 1fr;
  }

  .patient-app.active,
  .doctor-app.active {
    display: flex;
    flex-direction: column;
  }

  .patient-app.active > .left-rail,
  .patient-app.active > .workspace,
  .doctor-app.active > .left-rail,
  .doctor-app.active > .workspace {
    display: contents;
  }

  .patient-order-row {
    display: contents;
  }

  .patient-app .search-panel {
    order: 1;
  }

  .patient-map-panel {
    order: 2;
  }

  .patient-services {
    order: 3;
    width: 100%;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 12px 32px rgba(24, 28, 38, 0.06);
  }

  .patient-workspace .order-panel {
    order: 4;
  }

  .patient-workspace .status-panel {
    order: 5;
  }

  .patient-workspace .history-panel {
    order: 6;
  }

  .patient-workspace .chats-panel {
    order: 6;
  }

  .doctor-state {
    order: 1;
  }

  .doctor-controls {
    order: 2;
  }

  .doctor-workspace .map-panel {
    order: 3;
  }

  .doctor-workspace .doctor-visit-section {
    order: 4;
  }

  .doctor-left-rail .active-orders-title {
    order: 5;
  }

  .doctor-left-rail .feed {
    order: 6;
  }

  .social-row {
    grid-column: auto;
  }
}

@media (max-width: 680px) {
  #profileDialog {
    width: calc(100vw - 10px);
    max-width: calc(100vw - 10px);
    height: calc(100dvh - 10px);
    max-height: calc(100dvh - 10px);
    margin: 5px auto;
    overflow: hidden;
  }

  #profileDialog .profile-modal {
    height: 100%;
    max-height: none;
    padding: 0 14px calc(24px + env(safe-area-inset-bottom, 0px));
    border-radius: 18px;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  }

  #profileDialog .profile-modal-header {
    margin: 0 -14px 14px;
    padding: 14px;
    border-radius: 18px 18px 0 0;
    align-items: center;
  }

  #profileDialog .profile-modal-header h2 {
    font-size: 22px;
    overflow-wrap: anywhere;
  }

  #profileDialog .profile-modal-header .close-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
  }

  #profileDialog .profile-grid,
  #profileDialog .profile-password-grid,
  #profileDialog .profile-columns,
  #profileDialog .doctor-profile-grid,
  #profileDialog .doctor-workplaces-fields,
  #profileDialog .doctor-workplace-grid,
  #profileDialog .doctor-workplace-period-range,
  #profileDialog .service-checklist,
  #profileDialog .profile-actions {
    max-width: 100%;
    min-width: 0;
  }

  #profileDialog .doctor-workplace-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  #profileDialog .doctor-workplace-period-range {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
  }

  #profileDialog .doctor-workplace-period-range input[type="date"] {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding: 0 4px;
    font-size: 12px;
  }

  #profileDialog .profile-actions {
    padding-bottom: 4px;
  }

  .doctor-diploma-field {
    order: 10;
  }

  .doctor-documents-field {
    order: 11;
  }

  .doctor-certificate-field {
    order: 12;
  }

  .doctor-certificate-photo-field {
    order: 13;
  }

  .doctor-services-wrap {
    order: 14;
  }

  .doctor-photo-field {
    order: 15;
  }

  .profile-verification-submit {
    order: 16;
  }

  .order-response-actions {
    grid-template-columns: 1fr;
  }

  .screen {
    padding: 14px;
  }

  .top-actions {
    margin-left: auto;
  }

  .role-grid,
  .profile-grid,
  .profile-password-grid,
  .profile-columns,
  .status-list,
  .privacy-grid,
  .candidate-grid,
  .access-grid,
  .city-confirm,
  .offer-card,
  .support-kanban {
    grid-template-columns: 1fr;
  }

  .role-hero h1 {
    font-size: 42px;
  }

  .hero-benefits,
  .hero-stat {
    grid-template-columns: 1fr;
  }

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

  .role-card {
    min-height: 300px;
  }

  .role-card strong {
    margin-top: 212px;
  }

  .order-panel,
  .status-panel,
  .map-toolbar,
  .doctor-state,
  .panel-actions,
  .offers-toolbar,
  .order-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .order-actions {
    display: flex;
  }

  .admin-grid,
  .admin-row,
  .dashboard-grid,
  .profile-actions {
    grid-template-columns: 1fr;
  }

  .profile-photo-card {
    grid-template-columns: 1fr;
  }

  .profile-photo-preview {
    width: 100%;
    aspect-ratio: 1;
    max-height: 220px;
  }

  .map-panel,
  .map,
  .yandex-map {
    min-height: 390px;
    width: 100%;
    max-width: 100%;
  }
}
