:root{
  --bg: #f3f6ff;
  --card: #ffffff;
  --text: #0b1f35;
  --muted: #5d6a78;
  --primary: #005bff;        /* gosuslugi-ish blue */
  --primary-2: #1a7afc;
  --ok: #0aa35b;
  --warn: #f2994a;
  --border: #dfe6f2;
  --shadow: 0 10px 30px rgba(11, 31, 53, .08);
  --radius: 18px;
}

*{ box-sizing: border-box; }
html, body{ height: 100%; }
body{
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 380px at 20% 0%, rgba(0,91,255,.18), transparent 60%),
    radial-gradient(700px 300px at 80% 10%, rgba(10,163,91,.12), transparent 55%),
    var(--bg);
}

.container{
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar{
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
  background: rgba(243,246,255,.78);
  border-bottom: 1px solid rgba(223,230,242,.8);
}
.topbar__inner{
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.brand{
  display: flex;
  gap: 12px;
  align-items: center;
}

/* clickable header */
.brand__link{
  text-decoration: none;
  color: inherit;
}
.brand__link:focus-visible{
  outline: 3px solid rgba(0,91,255,.35);
  outline-offset: 4px;
  border-radius: 16px;
}
.brand__link:hover .brand__title{
  text-decoration: underline;
  text-underline-offset: 3px;
}
.brand__logo{
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(0,91,255,.14), rgba(10,163,91,.10));
  border: 1px solid rgba(223,230,242,.9);
  display: grid;
  place-items: center;
}
.logo-stroke{
  stroke: var(--primary);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.brand__title{ font-weight: 700; letter-spacing: .2px; }
.brand__subtitle{ color: var(--muted); font-size: 13px; margin-top: 2px; }

.badge{
  font-size: 12px;
  color: rgba(11,31,53,.85);
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(223,230,242,.95);
  background: rgba(255,255,255,.7);
  box-shadow: 0 6px 16px rgba(11,31,53,.05);
  white-space: nowrap;
}

main.container{ padding: 28px 0 38px; }

.card{
  background: var(--card);
  border: 1px solid rgba(223,230,242,.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 22px 18px;
  margin: 16px 0;
}

.h1{
  font-size: 28px;
  margin: 2px 0 8px;
  letter-spacing: -0.4px;
}
.h2{
  font-size: 22px;
  margin: 10px 0 8px;
  letter-spacing: -0.2px;
}
.muted{
  color: var(--muted);
  margin: 0 0 14px;
  line-height: 1.45;
}
.hidden{ display: none; }

.stars{
  display: flex;
  gap: 10px;
  padding: 10px 0 4px;
  justify-content: flex-start;
  flex-wrap: wrap;
}
.star{
  appearance: none;
  border: 1px solid rgba(223,230,242,.95);
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  border-radius: 18px;
  width: 82px;
  height: 82px;
  font-size: 48px;
  line-height: 1;
  cursor: pointer;
  transition: transform .08s ease, box-shadow .12s ease, border-color .12s ease, background .12s ease;
  box-shadow: 0 8px 18px rgba(11,31,53,.08);
  color: rgba(0,91,255,.25);
}
.star:hover{
  transform: translateY(-1px);
  border-color: rgba(0,91,255,.35);
}
.star:active{ transform: translateY(0px) scale(.99); }
.star.is-on{ color: rgba(0,91,255,.96); }
.star.is-dim{ color: rgba(0,91,255,.18); }
.rating-hint{
  margin-top: 8px;
  font-weight: 600;
  color: rgba(11,31,53,.85);
}

.note{
  display: flex;
  gap: 10px;
  margin-top: 16px;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px dashed rgba(0,91,255,.25);
  background: rgba(0,91,255,.06);
}
.note__icon{ margin-top: 1px; }
.note__text{ color: rgba(11,31,53,.86); line-height: 1.45; }

.pill{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .2px;
  border: 1px solid rgba(223,230,242,.95);
  background: rgba(255,255,255,.65);
}
.pill--ok{
  color: var(--ok);
  border-color: rgba(10,163,91,.22);
  background: rgba(10,163,91,.08);
}
.pill--warn{
  color: #b55600;
  border-color: rgba(242,153,74,.28);
  background: rgba(242,153,74,.12);
}

.field{
  display: grid;
  gap: 6px;
  margin: 14px 0;
}
.field__label{
  font-weight: 600;
}
.field__control{
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(223,230,242,.95);
  background: #fbfdff;
  padding: 12px 12px;
  font: inherit;
  outline: none;
  transition: box-shadow .12s ease, border-color .12s ease;
}
.field__control:focus{
  border-color: rgba(0,91,255,.45);
  box-shadow: 0 0 0 4px rgba(0,91,255,.12);
}
textarea.field__control{ resize: vertical; min-height: 120px; }
.field__help{
  font-size: 12px;
  color: var(--muted);
}

.grid-2{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 720px){
  .grid-2{ grid-template-columns: 1fr; }
}

@media (max-width: 420px){
  /* Make all 5 stars fit in one row on small screens */
  .stars{ gap: 6px; flex-wrap: nowrap; justify-content: space-between; }
  .star{ width: 56px; height: 56px; font-size: 34px; border-radius: 16px; }
}

@media (max-width: 360px){
  .stars{ gap: 4px; }
  .star{ width: 52px; height: 52px; font-size: 32px; border-radius: 15px; }
}


.actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.btn{
  appearance: none;
  border: 1px solid rgba(223,230,242,.95);
  border-radius: 14px;
  padding: 12px 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform .08s ease, box-shadow .12s ease, border-color .12s ease, background .12s ease;
  user-select: none;
}
.btn:active{ transform: scale(.99); }
.btn--primary{
  background: linear-gradient(180deg, var(--primary), var(--primary-2));
  color: white;
  border-color: rgba(0,91,255,.35);
  box-shadow: 0 12px 26px rgba(0,91,255,.18);
}
.btn--primary:hover{
  box-shadow: 0 14px 34px rgba(0,91,255,.22);
}
.btn--ghost{
  background: rgba(255,255,255,.72);
  color: rgba(11,31,53,.92);
}
.btn--ghost:hover{
  border-color: rgba(0,91,255,.25);
  box-shadow: 0 10px 24px rgba(11,31,53,.10);
}

.form-status{
  margin-top: 10px;
  color: rgba(11,31,53,.9);
  font-size: 14px;
}
.form-status.error{
  color: #b00020;
}

.fineprint{
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}

.footer{
  margin-top: 18px;
  padding-top: 8px;
  color: var(--muted);
}
.footer__cols{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.footer__cols--single{ grid-template-columns: 1fr; }

.list{ margin: 0; padding-left: 18px; }
.list--compact{ margin: 0; padding-left: 18px; }
.list--compact li{ margin: 6px 0; }

.promo{
  margin-top: 14px;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid rgba(223,230,242,.95);
  background: rgba(255,255,255,.72);
  box-shadow: 0 10px 24px rgba(11,31,53,.08);
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
}
.promo__title{ font-weight: 900; letter-spacing: .2px; }
.promo__text{ color: rgba(11,31,53,.9); margin-top: 4px; line-height: 1.45; }
.promo__form{
  display: grid;
  gap: 10px;
  min-width: min(460px, 100%);
}
.promo__form .field__control{ margin: 0; }
.promo__status{ font-size: 13px; }
.promo__status.error{ color: #b00020; }

.check--sm{
  padding: 10px;
  margin-top: 0;
  background: rgba(0,91,255,.03);
}
.check--sm .check__text{ font-size: 12px; }
.footer__title{
  font-weight: 700;
  color: rgba(11,31,53,.88);
  margin-bottom: 6px;
}
.footer__text{ line-height: 1.45; }
.footer__bottom{
  margin-top: 14px;
  padding: 14px 0 6px;
  border-top: 1px solid rgba(223,230,242,.9);
  font-size: 12px;
}

@media (max-width: 720px){
  .topbar__inner{ flex-direction: column; align-items: flex-start; }
  .badge{ align-self: stretch; text-align: center; }
  .star{
    width: 66px; height: 66px;
    font-size: 40px;
  }
  .footer__cols{ grid-template-columns: 1fr; }
}

.top-actions{
  display: flex;
  gap: 10px;
  align-items: center;
}
.badge--ok{
  color: var(--ok);
  border-color: rgba(10,163,91,.25);
}
.pd-logo{
  height: 34px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(223,230,242,.95);
  background: rgba(255,255,255,.7);
  box-shadow: 0 6px 16px rgba(11,31,53,.05);
  display: flex;
  align-items: center;
}
.pd-logo img{
  height: 18px;
  width: auto;
  display: block;
}

.doctor{
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px;
  margin: 14px 0 8px;
  border-radius: 16px;
  border: 1px solid rgba(223,230,242,.95);
  background: linear-gradient(180deg, rgba(255,255,255,.85), rgba(248,251,255,.9));
}
.doctor__photo{
  width: 92px;
  height: 92px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(223,230,242,.95);
  box-shadow: 0 10px 22px rgba(11,31,53,.10);
  background: #fff;
}
.doctor__photo img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.doctor__name{
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.2px;
  margin-bottom: 4px;
}
.doctor__meta{
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}
.doctor__langs{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.tag{
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0,91,255,.20);
  background: rgba(0,91,255,.06);
  color: rgba(11,31,53,.88);
}

/* Карточка врача (как на ПроДокторов) */
.profile-card{
  margin: 14px 0 10px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(223,230,242,.95);
  background: linear-gradient(180deg, rgba(255,255,255,.88), rgba(248,251,255,.92));
  display: flex;
  gap: 18px;
  align-items: stretch;
}
.profile-card__photo{
  flex: 0 0 240px;
  width: 240px;
  height: 240px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(223,230,242,.95);
  box-shadow: 0 12px 26px rgba(11,31,53,.10);
  background: #fff;
}
.profile-card__photo img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.profile-card__body{ min-width: 0; display:flex; flex-direction: column; gap: 8px; }
.profile-card__name{ font-weight: 900; font-size: 28px; letter-spacing: -0.02em; line-height: 1.15; }
.profile-card__city{ color: rgba(11,31,53,.70); font-weight: 700; }
.profile-card__tags{ display:flex; gap: 10px; flex-wrap: wrap; }
.tag--pill{
  border-color: rgba(223,230,242,.95);
  background: rgba(11,31,53,.04);
  color: rgba(11,31,53,.92);
}
.verify-card{
  margin-top: 6px;
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(10,163,91,.10);
  border: 1px solid rgba(10,163,91,.22);
}
.verify-card__top{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
}
.verify-card__title{ font-weight: 900; font-size: 18px; }
.verify-card__arrow{ font-size: 22px; opacity: .6; }
.verify-card__sub{ display:flex; gap: 8px; align-items:center; font-weight: 800; color: rgba(3,92,45,.95); margin-top: 6px; }
.verify-card__icon{ font-size: 16px; }
.profile-card__desc{ color: rgba(11,31,53,.72); line-height: 1.4; }
.profile-card__langs{ display:flex; gap: 8px; flex-wrap: wrap; margin-top: 2px; }

@media (max-width: 860px){
  .profile-card__photo{ flex-basis: 200px; width: 200px; height: 200px; }
  .profile-card__name{ font-size: 24px; }
}
@media (max-width: 640px){
  .profile-card{ flex-direction: column; }
  .profile-card__photo{ width: 100%; height: 260px; flex-basis: auto; }
  .profile-card__name{ font-size: 22px; }
}

/* Spoiler / details */
.spoiler{
  margin-top: 10px;
  border-radius: 14px;
  border: 1px solid rgba(223,230,242,.95);
  background: rgba(255,255,255,.65);
  overflow: hidden;
}
.spoiler > summary{
  cursor: pointer;
  padding: 12px 12px;
  font-weight: 800;
  color: rgba(11,31,53,.90);
  list-style: none;
}
.spoiler > summary::-webkit-details-marker{ display:none; }
.spoiler > summary:after{
  content: '▾';
  float: right;
  opacity: .7;
}
.spoiler[open] > summary:after{ content: '▴'; }
.spoiler__body{ padding: 12px 12px 2px; }

.pd-logo-inline{
  margin: 10px 0 2px;
}
.pd-logo-inline img{
  height: 22px;
  width: auto;
  opacity: .95;
}

@media (max-width: 720px){
  .top-actions{ width: 100%; justify-content: space-between; }
  .doctor{
    grid-template-columns: 74px 1fr;
  }
  .doctor__photo{ width: 74px; height: 74px; border-radius: 16px; }
}

/* Checkbox (consent) */
.check{
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(223,230,242,.95);
  background: rgba(0,91,255,.04);
  margin-top: 12px;
}
.check__box{
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--primary);
}
.check__text{
  color: rgba(11,31,53,.92);
  font-size: 13px;
  line-height: 1.45;
}
.check__text a{
  color: var(--primary);
  text-decoration: none;
  font-weight: 700;
}
.check__text a:hover{ text-decoration: underline; }

a{ color: var(--primary); }
a:hover{ text-decoration: underline; }

.btn--sm{
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 13px;
}

.legal .list{
  margin: 8px 0 14px 18px;
  color: rgba(11,31,53,.9);
  line-height: 1.5;
}
.legal p{
  line-height: 1.55;
}

.kv{
  margin-top: 10px;
  border-radius: 14px;
  border: 1px solid rgba(223,230,242,.95);
  overflow: hidden;
  background: rgba(255,255,255,.7);
}
.kv__row{
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 12px;
  padding: 10px 12px;
  border-top: 1px solid rgba(223,230,242,.85);
}
.kv__row:first-child{ border-top: 0; }
.kv__k{
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
}
.kv__v{
  color: rgba(11,31,53,.92);
  font-size: 13px;
}
@media (max-width: 720px){
  .kv__row{ grid-template-columns: 1fr; gap: 6px; }
}

/* Admin UI */
.admin-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
}
.admin-filters{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}
.input--sm{ padding: 10px 12px; font-size: 13px; height: 40px; }
.btn--sm{ padding: 10px 12px; font-size: 13px; }
.admin-grid{
  margin-top: 14px;
  display:grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 12px;
}
.stat{
  border: 1px solid rgba(223,230,242,.95);
  border-radius: 16px;
  padding: 12px;
  background: rgba(255,255,255,.75);
}
.stat__k{ color: var(--muted); font-weight: 700; font-size: 12px; }
.stat__v{ font-size: 26px; font-weight: 800; letter-spacing: -0.02em; margin-top: 4px; }
.stat__m{ color: rgba(11,31,53,.65); font-size: 12px; margin-top: 2px; }
.admin-chips{
  margin-top: 12px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.chip{
  display:flex;
  gap:10px;
  align-items:center;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(223,230,242,.95);
  background: rgba(255,255,255,.7);
}
.chip__k{ font-weight: 800; font-size: 12px; color: rgba(11,31,53,.72); }
.chip__v{ font-weight: 900; font-size: 12px; }
.table-wrap{ overflow:auto; border-radius: 14px; border: 1px solid rgba(223,230,242,.95); }
.table{
  width: 100%;
  border-collapse: collapse;
  background: rgba(255,255,255,.75);
}
.table th, .table td{
  padding: 10px 10px;
  border-bottom: 1px solid rgba(223,230,242,.75);
  vertical-align: top;
  font-size: 13px;
}
.table th{
  position: sticky;
  top: 0;
  background: rgba(244,247,253,.95);
  text-align:left;
  font-size: 12px;
  color: rgba(11,31,53,.72);
  font-weight: 800;
}
.cell-wide{ min-width: 260px; max-width: 420px; white-space: pre-wrap; word-break: break-word; }
.mono{ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 12px; }
.badge{
  display:inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(0, 122, 255, .08);
  border: 1px solid rgba(0, 122, 255, .22);
  color: rgba(0, 60, 128, .9);
  font-weight: 800;
  font-size: 12px;
}
.alert{
  border-radius: 14px;
  padding: 10px 12px;
  margin: 10px 0 16px;
  border: 1px solid rgba(223,230,242,.95);
}
.alert--danger{
  background: rgba(255, 59, 48, .08);
  border-color: rgba(255, 59, 48, .22);
  color: rgba(120, 20, 18, .95);
}
@media (max-width: 980px){
  .admin-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 560px){
  .admin-grid{ grid-template-columns: 1fr; }
}



/* Links */
a{ color: var(--primary); }
a:hover{ text-decoration: underline; }
.brand__link, .brand__link:visited, .brand__link:hover,
.hero__title a, .hero__title a:visited, .hero__title a:hover,
.header__title a, .header__title a:visited, .header__title a:hover{
  color: inherit;
  text-decoration: none;
}

/* Footer cards + legal links */
.footer__card{
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}
.footer__links{
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  font-size: 13px;
  color: var(--muted);
}
.footer__links a{ color: var(--muted); text-decoration: none; }
.footer__links a:hover{ text-decoration: underline; }

/* Simple grid for fields */
.grid-2{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 640px){
  .grid-2{ grid-template-columns: 1fr; }
}

/* Modal */
.modal{
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
}
.modal.hidden{ display: none; }
.modal__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}
.modal__panel{
  position: relative;
  width: min(560px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  overflow: auto;
  background: #fff;
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 22px 60px rgba(0,0,0,0.2);
}
.modal__close{
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 10px;
  background: #f1f5f9;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.modal__title{
  margin: 0 40px 6px 0;
  font-size: 20px;
}
.modal__subtitle{
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
}
.modal__form .btn{ width: 100%; }
