:root {
  --blue: #0a84ff;
  --blue-dark: #0066d6;
  --blue-soft: #e8f2ff;
  --bg: #f2f3f5;
  --card: #ffffff;
  --text: #1c1c1e;
  --text-2: #8e8e93;
  --text-3: #3a3a3c;
  --separator: rgba(60, 60, 67, 0.12);
  --danger: #ff3b30;
  --green: #00b341;
  --radius: 16px;
  --radius-sm: 12px;
  --radius-lg: 22px;
  --tabbar-space: 98px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #e8e9ec;
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

h1,
h2,
h3,
p {
  margin: 0;
}

svg {
  display: block;
}

.app {
  position: relative;
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  overflow-x: clip;
  background: var(--bg);
}

@media (min-width: 600px) {
  .app {
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.2);
  }
}

.icon {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: inherit;
}

.icon svg {
  width: 100%;
  height: 100%;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-secondary {
  color: var(--text-2);
}

.mt-12 {
  margin-top: 12px;
}

.mt-16 {
  margin-top: 16px;
}

.stack > * + * {
  margin-top: 12px;
}

/* ---------- Статус-бар ---------- */

.statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
  padding: 0 20px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.1px;
}

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

.statusbar--light {
  background: #fff;
  color: #000;
}

.statusbar__time {
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.statusbar__right {
  display: flex;
  align-items: center;
  gap: 7px;
}

.sb-signal {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 11px;
}

.sb-signal i {
  display: block;
  width: 3px;
  border-radius: 1px;
  background: currentColor;
}

.sb-signal i:nth-child(1) {
  height: 4px;
}

.sb-signal i:nth-child(2) {
  height: 6px;
}

.sb-signal i:nth-child(3) {
  height: 8px;
}

.sb-signal i:nth-child(4) {
  height: 10px;
}

.sb-lte {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.sb-battery {
  position: relative;
  display: flex;
  align-items: center;
  width: 24px;
  height: 12px;
  padding: 1.5px;
  border: 1.2px solid currentColor;
  border-radius: 3.5px;
}

.sb-battery::after {
  content: "";
  position: absolute;
  top: 3px;
  right: -3.5px;
  width: 2px;
  height: 5px;
  border-radius: 0 1px 1px 0;
  background: currentColor;
}

.sb-battery i {
  display: block;
  width: 72%;
  height: 100%;
  border-radius: 1.5px;
  background: #32d74b;
}

.sb-muted {
  width: 15px;
  height: 15px;
  opacity: 0.9;
}

/* ---------- Шапка с профилем ---------- */

.main-header {
  padding: 0 16px 28px;
  background: var(--blue);
}

.profile-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
}

.profile-link {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 9px;
  min-width: 0;
  color: #fff;
}

.profile-card-icon {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 27px;
  height: 27px;
  color: #fff;
}

.profile-card-icon .icon {
  width: 27px;
  height: 27px;
}

.profile-name {
  max-width: 178px;
  overflow: hidden;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.2px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.profile-chevron {
  display: flex;
  flex: none;
  width: 16px;
  height: 16px;
  color: rgba(255, 255, 255, 0.9);
}

.profile-chevron .icon {
  width: 16px;
  height: 16px;
}

.header-actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: 9px;
}

.icon-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
}

.icon-btn .icon {
  width: 24px;
  height: 24px;
}

.bell-dot {
  position: absolute;
  top: 3px;
  right: 2px;
  width: 9px;
  height: 9px;
  border: 1.5px solid var(--blue);
  border-radius: 50%;
  background: #ff3b30;
}

.avatar {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(140deg, #b86bff 0%, #8b3ff0 55%, #6d28d9 100%);
  color: #fff;
}

.avatar .icon {
  width: 18px;
  height: 18px;
  color: #fff;
}

/* ---------- Верхняя панель внутренних экранов ---------- */

.topbar {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 112px;
  padding: 0 64px 14px;
  background: #fff;
}

.topbar--tab {
  height: 112px;
}

.topbar__title {
  max-width: 100%;
  overflow: hidden;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.2px;
  text-align: center;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.back-btn,
.close-btn {
  position: absolute;
  bottom: 7px;
  left: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid #e5e5ea;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 9px rgba(0, 0, 0, 0.07);
  color: var(--blue);
}

.back-btn .icon,
.close-btn .icon {
  width: 21px;
  height: 21px;
}

.back-btn .icon {
  margin-left: -1px;
}

.brand-mark {
  position: absolute;
  top: 24px;
  right: 16px;
  display: flex;
  align-items: center;
  width: 30px;
  height: 22px;
  color: var(--green);
}

.brand-mark .icon {
  width: 30px;
  height: 22px;
}

/* ---------- Страницы ---------- */

.page {
  padding: 16px 16px calc(var(--tabbar-space) + env(safe-area-inset-bottom, 0px));
}

.page--sheet {
  position: relative;
  z-index: 1;
  min-height: 70vh;
  margin-top: -18px;
  padding-top: 22px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: var(--bg);
}

.page--white-sheet {
  position: relative;
  z-index: 1;
  min-height: calc(100dvh - 72px);
  margin-top: -18px;
  padding-top: 20px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: #fff;
}

.page--white-sheet.page--under-status {
  margin-top: -12px;
}

.page--flat {
  min-height: calc(100dvh - 112px);
  padding-top: 0;
  background: #fff;
}

.page--more {
  padding-top: 14px;
  background: var(--bg);
}

body[data-nav="off"] .page {
  padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
}

/* ---------- Секции и карточки ---------- */

.section {
  margin-top: 24px;
}

.section:first-child {
  margin-top: 4px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.3px;
}

.link-blue {
  flex: none;
  color: var(--blue);
  font-size: 17px;
  font-weight: 500;
}

.card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--card);
}

.card--pad {
  padding: 16px;
}

.card + .card {
  margin-top: 12px;
}

.list-card {
  padding: 0;
}

.list-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 62px;
  padding: 14px 16px;
  color: inherit;
  text-align: left;
}

.list-row + .list-row::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 64px;
  height: 0.5px;
  background: var(--separator);
}

.list-row--flush + .list-row--flush::before {
  left: 16px;
}

.row-icon {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  color: var(--blue);
}

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

.row-body {
  flex: 1;
  min-width: 0;
}

.row-title {
  color: var(--text);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
}

.row-sub {
  margin-top: 3px;
  color: var(--text-2);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.35;
}

.row-sub--tight {
  margin-top: 1px;
}

.row-chevron {
  display: flex;
  flex: none;
  width: 18px;
  height: 18px;
  color: #c7c7cc;
}

.row-chevron .icon {
  width: 18px;
  height: 18px;
}

.badge {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 9px;
  border-radius: 14px;
  background: #ececf0;
  color: var(--text-3);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
}

.badge--blue {
  background: var(--blue);
  color: #fff;
  font-weight: 600;
}

/* ---------- Главная ---------- */

.goals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.goal-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-height: 116px;
  padding: 15px 7px 12px;
  border-radius: 14px;
  background: #fff;
  text-align: center;
}

.goal-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  color: var(--blue);
}

.goal-icon .icon {
  width: 35px;
  height: 35px;
}

.goal-label {
  color: var(--text);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.25;
}

.home-actions {
  margin-top: 2px;
}

.promo-blue {
  position: relative;
  min-height: 108px;
  padding: 18px;
  overflow: hidden;
  border-radius: var(--radius);
  background: linear-gradient(112deg, #0a84ff 0%, #0a78f7 58%, #0a67ea 100%);
  color: #fff;
}

.promo-blue__title {
  position: relative;
  z-index: 1;
  max-width: 78%;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.25;
}

.promo-blue__text {
  position: relative;
  z-index: 1;
  max-width: 70%;
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 15px;
  line-height: 1.35;
}

.promo-blue__icon {
  position: absolute;
  top: 50%;
  right: 13px;
  width: 82px;
  height: 82px;
  color: #fff;
  opacity: 0.95;
  transform: translateY(-50%);
}

.promo-blue__icon .icon {
  width: 100%;
  height: 100%;
}

.promo-alisa {
  position: relative;
  padding: 18px 16px 16px;
  border-radius: var(--radius);
  background: #fff;
}

.promo-alisa__title {
  padding-right: 26px;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: -0.2px;
}

.promo-alisa__text {
  margin: 10px 0 14px;
  color: var(--text-3);
  font-size: 15px;
  line-height: 1.4;
}

.promo-close {
  position: absolute;
  top: 11px;
  right: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #c7c7cc;
}

.promo-close .icon {
  width: 20px;
  height: 20px;
}

/* ---------- Кнопки ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 14px;
  font-family: inherit;
  font-weight: 600;
  text-align: center;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.btn:active {
  opacity: 0.88;
  transform: scale(0.985);
}

.btn:disabled {
  opacity: 0.55;
  pointer-events: none;
}

.btn-primary {
  width: 100%;
  height: 50px;
  background: var(--blue);
  color: #fff;
  font-size: 17px;
}

.btn-soft {
  width: 100%;
  height: 50px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 17px;
}

.btn-inline {
  height: 38px;
  padding: 0 16px;
  border-radius: 10px;
  background: var(--blue);
  color: #fff;
  font-size: 15px;
}

.btn-danger-text {
  width: 100%;
  height: 56px;
  border-radius: var(--radius);
  background: #fff;
  color: var(--danger);
  font-size: 17px;
  font-weight: 500;
}

/* ---------- Медкарта ---------- */

.passport {
  position: relative;
  min-height: 142px;
  padding: 20px 18px;
  overflow: hidden;
  border-radius: 18px;
  background: radial-gradient(135% 170% at 82% 33%, #164474 0%, #0b2546 47%, #06162a 100%);
  color: #fff;
}

.passport__title {
  position: relative;
  z-index: 1;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.passport__sub {
  position: relative;
  z-index: 1;
  max-width: 62%;
  margin-top: 9px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 15px;
  line-height: 1.38;
}

.passport__art {
  position: absolute;
  top: 50%;
  right: -8px;
  width: 130px;
  height: 152px;
  transform: translateY(-50%);
  opacity: 0.96;
}

.passport__art .icon {
  width: 100%;
  height: 100%;
}

.documents {
  margin-top: 24px;
}

.documents__title {
  margin-bottom: 12px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

/* ---------- Пустые состояния ---------- */

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100dvh - 260px);
  padding: 28px 24px;
  text-align: center;
}

.empty__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 98px;
  height: 98px;
  margin-bottom: 22px;
  color: #d1d1d6;
}

.empty__icon .icon {
  width: 100%;
  height: 100%;
}

.empty__title {
  color: #6b6b70;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.empty__text {
  max-width: 330px;
  margin-top: 10px;
  color: var(--text-2);
  font-size: 17px;
  line-height: 1.38;
}

.empty--chats {
  min-height: calc(100dvh - 230px);
}

.empty--appointments {
  min-height: calc(100dvh - 340px);
}

/* ---------- Списки приёмов, анализов, исследований ---------- */

.month-pill {
  width: fit-content;
  margin: 22px auto 14px;
  padding: 8px 16px;
  border-radius: 999px;
  background: #ececef;
  color: var(--text-3);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
}

.month-pill:first-child {
  margin-top: 4px;
}

.archive-list {
  background: #fff;
}

.archive-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 0;
  color: inherit;
}

.archive-item + .archive-item::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 0.5px;
  background: var(--separator);
}

.archive-body {
  flex: 1;
  min-width: 0;
}

.archive-title {
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.27;
  letter-spacing: -0.1px;
}

.archive-clinic {
  display: -webkit-box;
  margin-top: 3px;
  overflow: hidden;
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.archive-doctor {
  margin-top: 1px;
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.35;
}

.archive-date {
  margin-top: 3px;
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.35;
}

.archive-chevron {
  display: flex;
  flex: none;
  color: #c7c7cc;
}

.archive-chevron .icon {
  width: 18px;
  height: 18px;
}

.loading {
  padding: 28px 16px;
  color: var(--text-2);
  font-size: 15px;
  text-align: center;
}

/* ---------- Сегментированный переключатель ---------- */

.segmented {
  display: flex;
  align-items: stretch;
  height: 44px;
  padding: 3px;
  border-radius: 12px;
  background: #ececef;
}

.segment {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  height: 38px;
  border-radius: 9px;
  color: #2c2c2e;
  font-size: 16px;
  font-weight: 400;
  white-space: nowrap;
}

.segment--active {
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.13);
  font-weight: 500;
}

.seg-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  background: var(--blue);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
}

.segmented--booking .segment {
  position: relative;
}

.segmented--booking .segment + .segment::before {
  content: "";
  position: absolute;
  top: 9px;
  bottom: 9px;
  left: 0;
  width: 0.5px;
  background: rgba(60, 60, 67, 0.18);
}

.segmented--booking .segment--active::before,
.segmented--booking .segment--active + .segment::before {
  display: none;
}

/* ---------- Записи ---------- */

.rating-row {
  margin-bottom: 12px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.rating-row .list-row {
  min-height: 58px;
}

.rating-icon {
  color: #5c9df5;
}

.records-page {
  padding-top: 18px;
}

.records-control {
  margin: 0 0 8px;
}

.rating-row {
  display: block;
  color: inherit;
}

.archive-page {
  padding-top: 8px;
}

.booking-page {
  padding-top: 14px;
}

.policy-page {
  padding-top: 6px;
}

.chats-page {
  padding-top: 0;
}

/* ---------- Запись (цели) ---------- */

.booking-page .segmented {
  margin-top: 6px;
}

.booking-title {
  margin-top: 26px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.4px;
}

.booking-sub {
  margin-top: 6px;
  color: var(--text-3);
  font-size: 15px;
}

.booking-list {
  margin-top: 10px;
}

.booking-list .list-row {
  min-height: 58px;
  padding-right: 0;
}

.booking-list .list-row + .list-row::before {
  left: 45px;
}

.booking-list .row-icon {
  width: 30px;
  height: 30px;
}

.booking-list .row-icon .icon {
  width: 28px;
  height: 28px;
}

.booking-list .row-title {
  font-size: 18px;
  font-weight: 500;
}

.booking-list .row-sub {
  margin-top: 4px;
}

.booking-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 14px;
  color: var(--blue);
  font-size: 16px;
}

.booking-more .icon {
  width: 17px;
  height: 17px;
  transition: transform 0.2s ease;
}

.booking-more--open .icon {
  transform: rotate(180deg);
}

.band {
  height: 10px;
  margin: 22px -16px 0;
  background: var(--bg);
}

.booking-group {
  margin-top: 10px;
}

.booking-group .list-row {
  min-height: 62px;
}

/* ---------- Ещё ---------- */

.more-page {
  padding-top: 14px;
}

.more-card {
  margin-bottom: 12px;
  overflow: hidden;
  border-radius: var(--radius);
  background: #fff;
}

.more-card .list-row {
  min-height: 58px;
}

.more-profile-row {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 70px;
  padding: 13px 16px;
}

.more-profile-icon {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--blue);
}

.more-profile-icon .icon {
  width: 34px;
  height: 34px;
}

.more-profile-name {
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.25;
}

.more-profile-sub {
  margin-top: 2px;
  color: var(--text-2);
  font-size: 15px;
}

.support-block {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 15px 16px;
}

.support-block + .support-block::before,
.more-card .support-block + .list-row::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 64px;
  height: 0.5px;
  background: var(--separator);
}

.support-icon {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  color: var(--blue);
}

.support-icon .icon {
  width: 30px;
  height: 30px;
}

.support-body {
  flex: 1;
  min-width: 0;
}

.support-title {
  color: var(--blue);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.25;
}

.support-desc {
  margin-top: 4px;
  color: var(--text-3);
  font-size: 15px;
  line-height: 1.38;
}

.phone-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  margin-top: 8px;
}

.phone-number {
  color: var(--blue);
  font-size: 17px;
  font-weight: 500;
}

.phone-note {
  color: var(--text-2);
  font-size: 15px;
}

/* ---------- Выбор полиса ---------- */

.policy-page {
  background: #fff;
}

.policy-list {
  margin-top: 10px;
}

.policy-row {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 14px 0;
}

.avatar-initials {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: #f2f2f5;
  color: #8e8e93;
  font-size: 16px;
  font-weight: 600;
}

.policy-body {
  flex: 1;
  min-width: 0;
}

.policy-name {
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.25;
}

.policy-number {
  margin-top: 2px;
  color: var(--text-2);
  font-size: 15px;
  letter-spacing: 0.1px;
}

.policy-access {
  margin-top: 3px;
  color: #34a853;
  font-size: 15px;
}

.policy-check {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  color: var(--blue);
}

.policy-check .icon {
  width: 22px;
  height: 22px;
}

.sticky-bottom {
  position: fixed;
  bottom: 0;
  left: 50%;
  z-index: 30;
  width: min(100%, 430px);
  padding: 12px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to top, #fff 62%, rgba(255, 255, 255, 0));
  transform: translateX(-50%);
}

.btn-add-policy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 50px;
  border-radius: 14px;
  background: #e8f2ff;
  color: var(--blue);
  font-size: 17px;
  font-weight: 600;
}

.btn-add-policy .icon {
  width: 22px;
  height: 22px;
}

/* ---------- Профиль ---------- */

.profile-page .profile-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 0 18px;
}

.profile-page .avatar-initials {
  width: 54px;
  height: 54px;
  font-size: 19px;
}

.profile-page .profile-full-name {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
}

.profile-page .profile-meta {
  margin-top: 3px;
  color: var(--text-2);
  font-size: 15px;
}

/* ---------- Нижнее меню ---------- */

.tabbar {
  position: fixed;
  bottom: max(10px, env(safe-area-inset-bottom, 0px));
  left: 50%;
  z-index: 40;
  display: flex;
  align-items: center;
  width: min(calc(100vw - 24px), 406px);
  height: 66px;
  padding: 4px 7px;
  border: 0.5px solid rgba(0, 0, 0, 0.04);
  border-radius: 999px;
  background: rgba(252, 252, 252, 0.94);
  box-shadow: 0 3px 18px rgba(0, 0, 0, 0.09);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  transform: translateX(-50%);
}

.tabbar__item {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 0;
  color: #1c1c1e;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.15;
  text-align: center;
}

.tabbar__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 30px;
  border-radius: 15px;
  transition: background 0.15s ease, color 0.15s ease;
}

.tabbar__icon .icon {
  width: 24px;
  height: 24px;
  color: currentColor;
}

.tabbar__item--active {
  color: var(--blue);
  font-weight: 500;
}

.tabbar__item--active .tabbar__icon {
  background: #e8e8ec;
}

/* ---------- Модалка и форма ---------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  background: rgba(0, 0, 0, 0.34);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay--open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  width: min(100%, 430px);
  max-height: calc(100dvh - 40px);
  padding: 10px 16px calc(20px + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  border-radius: 20px 20px 0 0;
  background: #fff;
  transform: translateY(100%);
  transition: transform 0.25s ease;
}

.modal-overlay--open .modal {
  transform: translateY(0);
}

.modal__grip {
  width: 38px;
  height: 5px;
  margin: 0 auto 14px;
  border-radius: 3px;
  background: #d1d1d6;
}

.modal__title {
  margin-bottom: 16px;
  font-size: 20px;
  font-weight: 700;
  text-align: center;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field__label {
  color: var(--text-2);
  font-size: 14px;
}

.input,
.textarea {
  width: 100%;
  padding: 13px 14px;
  border: 0;
  border-radius: 12px;
  outline: none;
  background: #f2f3f5;
  color: var(--text);
  font: inherit;
  font-size: 16px;
}

.input:focus,
.textarea:focus {
  box-shadow: 0 0 0 2px rgba(10, 132, 255, 0.35);
}

.textarea {
  min-height: 108px;
  resize: vertical;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

.form-actions .btn {
  flex: 1;
}

/* ---------- Тост ---------- */

.toast {
  position: fixed;
  bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  z-index: 200;
  max-width: min(calc(100vw - 40px), 360px);
  padding: 11px 16px;
  border-radius: 12px;
  background: rgba(28, 28, 30, 0.94);
  color: #fff;
  font-size: 15px;
  line-height: 1.3;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast--visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- Адаптивность и доступность ---------- */

@media (max-width: 359px) {
  .profile-name {
    max-width: 126px;
    font-size: 18px;
  }

  .header-actions {
    gap: 4px;
  }

  .goal-label {
    font-size: 13px;
  }

  .row-title,
  .archive-title {
    font-size: 17px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
  }
}

:focus-visible {
  outline: 2px solid rgba(10, 132, 255, 0.7);
  outline-offset: 2px;
}
