/* ══════════════════════════════════════════════════════════════════════════
   Кабинет партнёра Shepel Property. База — app.css + rm.css (кабинет менеджеров).
   Здесь только новые блоки: нижнее меню, ссылки на продукты, путь клиента, заглушки.
   ══════════════════════════════════════════════════════════════════════════ */

/* нижнее меню */
.ptabs {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  margin-top: 10px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(237, 234, 226, 0.035);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  animation: enter 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.ptab {
  position: relative;
  background: none;
  border: 0;
  color: var(--faint);
  font: 600 10px/1.1 var(--f-ui);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 7px 0 6px;
  border-radius: 17px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.2s ease, background 0.25s ease, transform 0.15s ease;
}
.ptab:active {
  transform: scale(0.94);
}
.ptab svg {
  width: 21px;
  height: 21px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ptab.on {
  color: var(--ink);
  background: var(--lime);
}
.ptab .lk {
  position: absolute;
  top: 6px;
  right: calc(50% - 17px);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--faint);
}
.ptab.on .lk {
  background: var(--ink);
}

/* «Что сделать сегодня» */
.todo {
  border: 1px solid rgba(209, 224, 90, 0.3);
  background: linear-gradient(140deg, rgba(209, 224, 90, 0.1), rgba(209, 224, 90, 0.02));
  border-radius: 20px;
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: enter 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.todohd {
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--lime);
  font-weight: 700;
}
.todoit {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.todoit em {
  font-style: normal;
  font-size: 18px;
  line-height: 1.2;
}
.todoit b {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
}
.todoit span {
  display: block;
  font-size: 12px;
  line-height: 1.4;
  color: var(--mist);
}

.cabstats.four {
  grid-template-columns: repeat(2, 1fr);
}

/* продукты и ссылки */
.prod {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 12px;
  background: rgba(237, 234, 226, 0.03);
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: enter 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.prodtop {
  display: flex;
  align-items: center;
  gap: 10px;
}
.prodtop > i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: 0 0 10px;
  box-shadow: 0 0 12px currentColor;
}
.prodtop > div {
  flex: 1;
  min-width: 0;
}
.prodtop b {
  display: block;
  font-size: 14px;
  font-weight: 600;
}
.prodtop span {
  display: block;
  font-size: 11.5px;
  line-height: 1.3;
  color: var(--mist);
}
.prodtop .act {
  flex: 0 0 auto;
  white-space: nowrap;
}

/* график: подписи продуктов */
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 8px;
  font-size: 11px;
  color: var(--mist);
}
.legend i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 5px;
}

/* путь клиента */
.stagebar {
  display: flex;
  gap: 3px;
  margin: 8px 0 4px;
}
.stagebar i {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--line-2);
  transform-origin: left;
  animation: grow 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.stagebar i.on {
  background: var(--lime);
}
.stagebar i.cur {
  box-shadow: 0 0 10px rgba(209, 224, 90, 0.7);
}
.stagebar.lost i.on {
  background: var(--faint);
}
@keyframes grow {
  from {
    transform: scaleX(0);
  }
}
.note-sm {
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--faint);
}

/* закрытые разделы */
.lockscr {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  padding: 30px 8px;
  animation: enter 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.lkic {
  font-size: 46px;
  line-height: 1;
  animation: float 3.2s ease-in-out infinite;
}
@keyframes float {
  50% {
    transform: translateY(-6px);
  }
}
.lkt {
  font-family: var(--f-display);
  font-size: 26px;
  font-weight: 600;
}
.lkd {
  font-size: 14px;
  line-height: 1.5;
  color: var(--mist);
  max-width: 320px;
}
.lkbadge {
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--lime);
  border: 1px solid rgba(209, 224, 90, 0.35);
  border-radius: 999px;
  padding: 5px 10px;
}
.lockscr .cta {
  width: 100%;
  max-width: 340px;
  margin-top: 8px;
}
.lockscr .cta.done {
  opacity: 0.7;
}

/* профиль */
.prows {
  display: flex;
  flex-direction: column;
}
.prow {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 2px;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
}
.prow span {
  color: var(--mist);
}
.pacts {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}
.pacts .act {
  width: 100%;
  height: 46px;
}

/* светлая тема */
html.light .ptabs {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(20, 20, 24, 0.1);
}
html.light .ptab {
  color: rgba(44, 44, 48, 0.45);
}
html.light .ptab.on {
  color: #0b0b0c;
}
html.light .prod,
html.light .todo {
  background: rgba(255, 255, 255, 0.6);
  border-color: rgba(20, 20, 24, 0.1);
}
html.light .todohd,
html.light .lkbadge {
  color: #6a7a06;
}
html.light .todoit span,
html.light .prodtop span,
html.light .legend,
html.light .lkd,
html.light .prow span {
  color: rgba(44, 44, 48, 0.62);
}
html.light .stagebar i {
  background: rgba(20, 20, 24, 0.1);
}
html.light .stagebar i.on {
  background: #b5c43a;
}

/* ---------- шапка кабинета: всё прижато кверху ---------- */
html.cab .card {
  padding-top: 4px;
}
html.cab.in-tg .card {
  padding-top: calc(4px + var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px));
}
html.cab .rail {
  flex-wrap: nowrap;
  min-height: 22px;
  gap: 8px;
}
html.cab .rail .ticks,
html.cab .rail .back[hidden] {
  display: none;
}
html.cab .railtag {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 9px;
  letter-spacing: 0.14em;
}
html.cab .scene {
  padding-top: 6px;
}
html.cab .head.cab {
  gap: 3px;
  padding-bottom: 10px;
}
html.cab .head.cab .eyebrow {
  height: 12px;
  line-height: 12px;
  font-size: 9.5px;
  letter-spacing: 0.16em;
}
html.cab .head.cab .title {
  font-size: 25px;
  line-height: 1.08;
}
html.cab .head.cab .who {
  margin-top: 3px;
}
html.cab .themebtn {
  top: 11px;
  width: 34px;
  height: 34px;
}

/* ══ фото профиля (одно, в шапке; менять — только на вкладке «Профиль») ══ */
html.cab .head.cab .hrow {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding-right: 40px;
}
html.cab .head.cab .hmeta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
html.cab .head.cab .hmeta .title {
  min-height: 0;
  overflow-wrap: anywhere;
}
.ava {
  position: relative;
  flex: 0 0 auto;
  width: 88px;
  height: 88px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: var(--ink-3);
  color: var(--lime);
  display: flex;
  align-items: center;
  justify-content: center;
  font: 700 30px/1 var(--f-display);
  letter-spacing: 0.02em;
  -webkit-tap-highlight-color: transparent;
}
.ava img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  -webkit-user-select: none;
  user-select: none;
}
.ava.edit {
  cursor: pointer;
  transition: transform 0.15s ease;
}
.ava.edit:active {
  transform: scale(0.95);
}
.ava .ava-pen {
  position: absolute;
  right: -1px;
  bottom: 2px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--lime) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b0b0c' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20h4L19 9l-4-4L4 16z'/%3E%3Cpath d='m13.5 6.5 4 4'/%3E%3C/svg%3E") center / 14px no-repeat;
  border: 2px solid var(--ink);
}
.ava.busy::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(11, 11, 12, 0.5);
}
.ava.busy::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 24px;
  margin: -12px 0 0 -12px;
  border-radius: 50%;
  border: 2px solid rgba(237, 234, 226, 0.3);
  border-top-color: var(--lime);
  animation: avaspin 0.8s linear infinite;
}
@keyframes avaspin {
  to {
    transform: rotate(360deg);
  }
}
.avasheet .acts {
  grid-template-columns: 1fr;
}
.avasheet .ghost {
  align-self: center;
}
.avaprev {
  width: 132px;
  height: 132px;
  margin: 0 auto;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--line-2);
  background: var(--ink-3);
  color: var(--lime);
  display: flex;
  align-items: center;
  justify-content: center;
  font: 700 44px/1 var(--f-display);
  box-shadow: 0 30px 80px -30px rgba(209, 224, 90, 0.45);
}
.avaprev img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.avacap {
  text-align: center;
  font-size: 12.5px;
  color: var(--mist);
}
.avapick {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.avapick input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  font-size: 100px;
}
html.light .ava,
html.light .avaprev {
  background: #e4e0d5;
  border-color: rgba(11, 11, 12, 0.12);
  color: #0b0b0c;
}
html.light .ava .ava-pen {
  border-color: #f3f3f0;
}
html.light .avacap {
  color: rgba(11, 11, 12, 0.55);
}

/* свернуть раскрытую ссылку — серый крестик в кружке */
.prodx {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: rgba(237, 234, 226, 0.06);
  color: var(--mist);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s ease, background 0.2s ease;
}
.prodx:active {
  transform: scale(0.9);
}
.prodx svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}
html.light .prodx {
  background: rgba(11, 11, 12, 0.05);
  border-color: rgba(11, 11, 12, 0.12);
  color: rgba(11, 11, 12, 0.5);
}

/* ══ материалы к ссылке: плитка «QR | Стикер» ══ */
.mat {
  flex: 0 0 104px;
  width: 104px;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.matseg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  padding: 2px;
  border-radius: 11px;
  background: rgba(11, 11, 12, 0.5);
  border: 1px solid var(--line);
}
.matseg button {
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: none;
  color: var(--mist);
  font: 700 9.5px/1 var(--f-ui);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.2s ease, color 0.2s ease;
}
.matseg button.on {
  background: var(--lime);
  color: var(--ink);
}
.matview {
  position: relative;
  flex: 1 1 auto;
  min-height: 112px;
  padding: 0;
  border-radius: 15px;
  border: 1px solid var(--line-2);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s ease;
  animation: fadein 0.25s ease both;
}
.matview:active {
  transform: scale(0.97);
}
.matview.qr {
  background: #edeae2;
  padding: 9px;
}
.matview.qr img {
  width: 100%;
  aspect-ratio: 1;
  display: block;
}
.matview.st {
  background: #0b0b0c;
}
.matview.st img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.matview.st::after {
  content: "";
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(11, 11, 12, 0.72) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23edeae2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 4h5v5M9 20H4v-5M20 4l-6 6M4 20l6-6'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.matview.make {
  background: radial-gradient(120% 90% at 50% 0%, rgba(209, 224, 90, 0.16), rgba(209, 224, 90, 0.03) 70%);
  border: 1px dashed rgba(209, 224, 90, 0.55);
}
.matview.make em {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--lime) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b0b0c' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center / 16px no-repeat;
  box-shadow: 0 0 22px rgba(209, 224, 90, 0.45);
}
.matview.make span {
  font: 700 10.5px/1.25 var(--f-ui);
  color: var(--sand);
  text-align: center;
}
.matview.make.busy {
  cursor: default;
}
.matview.make.busy em {
  background: none;
  box-shadow: none;
  border: 2px solid rgba(237, 234, 226, 0.22);
  border-top-color: var(--lime);
  animation: avaspin 0.8s linear infinite;
}
.stbox {
  align-items: center;
}
.stbig {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 30px 80px -30px rgba(209, 224, 90, 0.5);
  line-height: 0;
}
.stbig img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 290px);
  width: auto;
  height: auto;
}
.stbox .acts,
.stbox .qrcap {
  align-self: stretch;
}
html.light .matseg {
  background: rgba(11, 11, 12, 0.05);
  border-color: rgba(11, 11, 12, 0.1);
}
html.light .matseg button {
  color: rgba(11, 11, 12, 0.55);
}
html.light .matseg button.on {
  color: #0b0b0c;
}
html.light .matview {
  border-color: rgba(11, 11, 12, 0.12);
}
html.light .matview.make {
  background: radial-gradient(120% 90% at 50% 0%, rgba(160, 175, 40, 0.18), rgba(160, 175, 40, 0.04) 70%);
  border-color: rgba(120, 135, 20, 0.55);
}
html.light .matview.make span {
  color: #0b0b0c;
}

/* подсказка под ссылкой переносится по словам, а не по буквам */
.linkurl small {
  word-break: normal;
  overflow-wrap: normal;
}

/* перерисовка на месте (переключатель QR|Стикер, крестик, сборка стикера):
   ничего не «въезжает» заново — экран стоит */
.body.top.still,
.body.top.still * {
  animation: none !important;
}
.body.top.still .matview.make.busy em {
  animation: avaspin 0.8s linear infinite !important;
}
.body.top.still .lkic {
  animation: float 3.2s ease-in-out infinite !important;
}
.body.top.still .prod.fresh .linkcard {
  animation: enter 0.38s cubic-bezier(0.22, 1, 0.36, 1) both !important;
}
