/* =========================================================
   MB MODALS — PREMIUM (Account Settings)
   - Scoped for account-settings page
   - Glass + neon edge + clean motion
========================================================= */

:root{
  --mb-bg: #050509;
  --mb-elev: rgba(10,10,18,.72);
  --mb-stroke: rgba(255,255,255,.10);
  --mb-stroke-2: rgba(232,197,105,.20);
  --mb-text: rgba(245,245,255,.92);
  --mb-dim: rgba(200,203,255,.70);
  --mb-accent: rgba(232,197,105,.85);
  --mb-accent-soft: rgba(232,197,105,.22);
  --mb-danger: rgba(255,65,111,.85);
  --mb-danger-soft: rgba(255,65,111,.18);
}

/* overlay */
.mb-modal{
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}

.mb-modal.is-open{ display:block; }

.mb-modal__backdrop{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: mbFadeIn .18s ease-out both;
}

@keyframes mbFadeIn{
  from{ opacity: 0; }
  to{ opacity: 1; }
}

/* dialog */
.mb-modal__dialog{
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%,-50%);
  width: min(560px, calc(100vw - 28px));
  max-height: min(78vh, 680px);
  overflow: hidden;
  border-radius: 20px;

  background:
    radial-gradient(circle at 18% 12%, rgba(232,197,105,.18), transparent 55%),
    radial-gradient(circle at 86% 88%, rgba(255,255,255,.06), transparent 60%),
    var(--mb-elev);

  border: 1px solid var(--mb-stroke);
  box-shadow:
    0 30px 80px rgba(0,0,0,.70),
    0 0 0 1px rgba(255,255,255,.04) inset,
    0 0 26px rgba(232,197,105,.14);

  animation: mbPop .20s ease-out both;
}

@keyframes mbPop{
  from{ opacity:.0; transform: translate(-50%,-47%) scale(.985); }
  to  { opacity:1;  transform: translate(-50%,-50%) scale(1); }
}

.mb-modal__edge{
  position:absolute;
  inset:-2px;
  border-radius: 22px;
  pointer-events:none;
  background: conic-gradient(
    from 200deg,
    rgba(232,197,105,0.00),
    rgba(232,197,105,0.26),
    rgba(202,161,74,0.18),
    rgba(246,236,208,0.12),
    rgba(232,197,105,0.00)
  );
  filter: blur(14px);
  opacity: .55;
}

.mb-modal__content{
  position: relative;
  z-index: 1;
  display:flex;
  flex-direction: column;
  max-height: inherit;
}

/* header */
.mb-modal__header{
  display:flex;
  align-items:flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}

.mb-modal__title{
  margin:0;
  font-size: 16px;
  letter-spacing: .02em;
  color: var(--mb-text);
}

.mb-modal__subtitle{
  margin-top: 6px;
  font-size: 12px;
  color: var(--mb-dim);
}

.mb-modal__status{
  display:flex;
  align-items:center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(232,197,105,.22);
  background: rgba(5,5,15,.55);
  color: rgba(245,245,255,.90);
  font-size: 12px;
  white-space: nowrap;
}

.mb-dot{
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(232,197,105,.95);
  box-shadow: 0 0 10px rgba(232,197,105,.45);
}

/* close */
.mb-modal__close{
  margin-left: 8px;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(5,5,15,.55);
  color: rgba(245,245,255,.92);
  display:grid;
  place-items:center;
  cursor:pointer;
  transition: .18s ease;
}

.mb-modal__close:hover{
  transform: translateY(-1px);
  border-color: rgba(232,197,105,.35);
  box-shadow: 0 10px 22px rgba(0,0,0,.45);
}

/* body scroll area */
.mb-modal__body{
  padding: 14px 14px 12px;
  overflow:auto;
}

.mb-section-title{
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(200,203,255,.70);
  margin: 12px 2px 10px;
}

/* cards list */
.mb-session{
  position: relative;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(5,5,15,.52);
  box-shadow: 0 18px 40px rgba(0,0,0,.45);
  padding: 12px;
  display:flex;
  gap: 12px;
  align-items: center;
}

.mb-session + .mb-session{ margin-top: 10px; }

.mb-session__icon{
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(232,197,105,.22);
  background:
    radial-gradient(circle at 30% 25%, rgba(232,197,105,.22), transparent 55%),
    rgba(5,5,15,.66);
  display:grid;
  place-items:center;
  color: rgba(245,245,255,.92);
  flex: 0 0 auto;
}

.mb-session__meta{
  min-width: 0;
  flex: 1 1 auto;
}

.mb-session__top{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
}

.mb-session__name{
  font-size: 14px;
  color: var(--mb-text);
  white-space: nowrap;
  overflow:hidden;
  text-overflow: ellipsis;
}

.mb-tag{
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  padding: 6px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.10);
  color: rgba(245,245,255,.85);
  background: rgba(255,255,255,.04);
  white-space: nowrap;
}

.mb-tag--current{
  border-color: rgba(232,197,105,.30);
  background: rgba(232,197,105,.10);
}

.mb-session__sub{
  margin-top: 6px;
  font-size: 12px;
  color: rgba(200,203,255,.70);
  display:flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mb-pill{
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.12);
}

.mb-session__actions{
  display:flex;
  flex-direction: column;
  gap: 8px;
  flex: 0 0 auto;
}

/* buttons inside modal */
.mb-btn{
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(5,5,15,.60);
  color: rgba(245,245,255,.92);
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 12px;
  cursor: pointer;
  transition: .18s ease;
  white-space: nowrap;
}

.mb-btn:hover{
  transform: translateY(-1px);
  border-color: rgba(232,197,105,.35);
  box-shadow: 0 14px 30px rgba(0,0,0,.42);
}

.mb-btn:disabled{
  opacity: .55;
  cursor: default;
  transform: none;
}

.mb-btn--danger{
  border-color: rgba(255,65,111,.28);
  background:
    radial-gradient(circle at 20% 20%, rgba(255,65,111,.14), transparent 60%),
    rgba(5,5,15,.62);
}

.mb-btn--danger:hover{
  border-color: rgba(255,65,111,.42);
  box-shadow: 0 16px 34px rgba(0,0,0,.55), 0 0 22px rgba(255,65,111,.12);
}

/* footer bar */
.mb-modal__footer{
  padding: 12px 14px 14px;
  border-top: 1px solid rgba(255,255,255,.07);
  display:flex;
  gap: 10px;
  justify-content: space-between;
  align-items:center;
}

.mb-footer-note{
  font-size: 12px;
  color: rgba(200,203,255,.70);
  line-height: 1.25;
  /* длинная сноска в узкой модалке ужималась в колонку 2–3 слов рядом с кнопками */
  flex: 1 1 auto;
  min-width: 0;
}

.mb-footer-note:empty{ display: none; }

.mb-footer-note strong{ color: rgba(245,245,255,.92); }

.mb-footer-actions{
  display:flex;
  gap: 10px;
  flex: 0 0 auto;
}

/* subtle “scan” line (premium detail) */
.mb-modal__dialog::after{
  content:"";
  position:absolute;
  inset: -120% -60%;
  background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.08) 48%, transparent 62%);
  transform: translateX(-40%) rotate(10deg);
  opacity: 0;
  pointer-events:none;
  animation: mbDialogScan 6.5s ease-in-out infinite;
}

@keyframes mbDialogScan{
  0%   { opacity:0; transform: translateX(-55%) rotate(10deg); }
  18%  { opacity:.22; }
  40%  { opacity:.10; }
  100% { opacity:0; transform: translateX(55%) rotate(10deg); }
}

/* form inside modal */
.mb-form{ display:flex; flex-direction:column; gap:12px; }

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

.mb-label{
  font-size: 12px;
  color: rgba(200,203,255,.78);
}

.mb-input{
  width:100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(5,5,15,.55);
  color: rgba(245,245,255,.92);
  outline: none;
  box-shadow: 0 18px 40px rgba(0,0,0,.25);
}

.mb-input:focus{
  border-color: rgba(232,197,105,.40);
  box-shadow: 0 18px 40px rgba(0,0,0,.35), 0 0 22px rgba(232,197,105,.12);
}

.mb-hint{
  margin-top: 2px;
  font-size: 12px;
  color: rgba(200,203,255,.65);
  line-height: 1.35;
}

/* ===== Backup codes layout (inside mb-modal) ===== */
.mb-backup{
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(5,5,15,.46);
  box-shadow: 0 18px 40px rgba(0,0,0,.45);
  padding: 12px;
}

.mb-backup__top{
  display:flex;
  align-items:flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.mb-backup__hint{
  display:flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mb-backup__actions{
  display:flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content:flex-end;
}

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

@media (max-width: 420px){
  .mb-backup__grid{ grid-template-columns: 1fr; }
}

.mb-code{
  position: relative;
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(232,197,105,.18);
  background:
    radial-gradient(circle at 18% 18%, rgba(232,197,105,.14), transparent 55%),
    rgba(5,5,15,.58);
}

.mb-code__idx{
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(200,203,255,.70);
  white-space: nowrap;
}

.mb-code__val{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 14px;
  letter-spacing: .12em;
  color: rgba(245,245,255,.92);
  white-space: nowrap;
}

.mb-code__dot{
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(232,197,105,.95);
  box-shadow: 0 0 12px rgba(232,197,105,.45);
  flex: 0 0 auto;
}

/* =========================================================
   Self-Exclusion block (uses existing modal skin)
========================================================= */

.mb-excl-warning{
  display:flex;
  gap:12px;
  padding:12px;
  border-radius:16px;
  border:1px solid rgba(255,65,111,.22);
  background:
    radial-gradient(circle at 18% 18%, rgba(255,65,111,.12), transparent 55%),
    rgba(10,6,10,.55);
  box-shadow: 0 18px 40px rgba(0,0,0,.45);
}
.mb-excl-warning__ic{
  width:42px; height:42px;
  border-radius:14px;
  display:grid; place-items:center;
  border:1px solid rgba(255,65,111,.22);
  background: rgba(5,5,15,.60);
  flex:0 0 auto;
}
.mb-excl-warning__t{
  color: rgba(245,245,255,.92);
  font-weight:700;
  margin-bottom:4px;
}
.mb-excl-warning__s{
  color: rgba(200,203,255,.75);
  font-size:12px;
  line-height:1.35;
}

.mb-excl-grid{
  display:grid;
  grid-template-columns: 1fr;
  gap:10px;
}
@media (min-width: 520px){
  .mb-excl-grid{ grid-template-columns: 1fr 1fr 1fr; }
}

.mb-excl-opt{
  text-align:left;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(5,5,15,.52);
  box-shadow: 0 18px 40px rgba(0,0,0,.45);
  padding:12px;
  cursor:pointer;
  transition:.18s ease;
}
.mb-excl-opt:hover{
  transform: translateY(-1px);
  border-color: rgba(232,197,105,.28);
}
.mb-excl-opt[aria-checked="true"]{
  border-color: rgba(255,65,111,.30);
  background:
    radial-gradient(circle at 18% 18%, rgba(255,65,111,.10), transparent 55%),
    rgba(5,5,15,.58);
  box-shadow:
    0 18px 44px rgba(0,0,0,.55),
    0 0 22px rgba(255,65,111,.10);
}
.mb-excl-opt__top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.mb-excl-opt__name{
  color: rgba(245,245,255,.92);
  font-weight:700;
}
.mb-excl-opt__sub{
  margin-top:6px;
  color: rgba(200,203,255,.72);
  font-size:12px;
}

.mb-excl-form{
  display:grid;
  gap:12px;
}

.mb-field__label{
  font-size:12px;
  color: rgba(245,245,255,.86);
  margin-bottom:6px;
}
.mb-field__hint{
  font-size:12px;
  color: rgba(200,203,255,.72);
  margin-bottom:8px;
}
.mb-field__control{
  width:100%;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(5,5,15,.58);
  color: rgba(245,245,255,.92);
  padding:10px 12px;
  outline:none;
}
.mb-field__control:focus{
  border-color: rgba(232,197,105,.32);
  box-shadow: 0 0 0 3px rgba(232,197,105,.10);
}

.mb-check{
  display:flex;
  gap:10px;
  align-items:flex-start;
  color: rgba(200,203,255,.78);
  font-size:12px;
  line-height:1.25;
}
.mb-check input{ margin-top:2px; }

.mb-excl-summary{
  display:flex;
  justify-content:space-between;
  gap:10px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.12);
  color: rgba(245,245,255,.90);
}
.mb-excl-summary__l{ color: rgba(200,203,255,.72); }
.mb-dim{ color: rgba(200,203,255,.70); }
.mb-sess-current-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin: 10px 0 8px;
}
.mb-sess-current-head .mb-section-title{
  margin: 0;
}
/* =========================
   FIX PACK: mobile / iOS / landscape
   (append to end of modals.css)
========================= */

/* iOS viewport stability */
.mb-modal__dialog{
  max-height: min(78svh, 680px);
  padding-bottom: env(safe-area-inset-bottom);
}
@supports (height: 100dvh){
  .mb-modal__dialog{ max-height: min(78dvh, 680px); }
}

/* mobile: sessions cards should stack cleanly */
@media (max-width: 420px){
  .mb-modal__dialog{
    width: calc(100vw - 18px);
    max-height: 86svh;
    border-radius: 18px;
  }

  .mb-modal__header{ padding: 14px 14px 10px; }
  .mb-modal__body{ padding: 12px; }

  .mb-session{
    align-items: flex-start;
  }

  /* actions: row instead of tall right column */
  .mb-session__actions{
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    margin-left: auto;
  }

  .mb-btn{
    padding: 9px 10px;
    border-radius: 13px;
  }

  .mb-modal__footer{
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .mb-footer-actions{ justify-content: space-between; }

  .mb-backup__top{
    flex-direction: column;
    align-items: stretch;
  }
  .mb-backup__actions{ justify-content: flex-start; }
}

/* landscape phones */
@media (max-height: 430px) and (orientation: landscape){
  .mb-modal__dialog{ max-height: 92svh; }
  .mb-modal__body{ padding: 12px; }
  .mb-modal__footer{ padding: 10px 12px 12px; }
}

/* optional: small "Secure" pill for section header right side */
.mb-modal__status--mini{
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1;
}

/* header layout: left text + right tools (2 rows) */
.mb-modal__head-left{
  min-width:0;
}

.mb-modal__head-right{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:8px;
}

.mb-modal__head-right-top{
  display:flex;
  align-items:center;
  gap:10px;
}

.mb-modal__head-right-sub{
  display:flex;
  justify-content:flex-end;
}

/* section head: "Текущая сессия" left + "Secure" right */
.mb-sess-section-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin: 10px 0 8px;
}
.mb-sess-section-head .mb-section-title{ margin:0; }

/* Sessions header tools */
.mb-sess-last{
  font-size:12px;
  color: rgba(200,203,255,.70);
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
}

.mb-sess-refresh{
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: rgba(245,245,255,.92);
  padding: 7px 10px;
  border-radius: 12px;
  cursor:pointer;
  font-weight:700;
  font-size:12px;
  transition: .18s ease;
}

.mb-sess-refresh:hover{ background: rgba(255,255,255,.09); }
.mb-sess-refresh:disabled{ opacity:.55; cursor:not-allowed; }

/* =========================
   Password modal addons (NO SPINNER)
   append to end of modals.css
========================= */

/* wrapper to place eye button inside input */
.mb-passwrap{
  position: relative;
  display:flex;
  align-items:center;
}
.mb-passwrap .mb-input{ padding-right: 56px; }

/* eye button */
.mb-eye{
  position:absolute;
  right: 10px;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 12px;
  -webkit-tap-highlight-color: transparent;
}
.mb-eye:active{ transform: scale(.96); }
.mb-eye:focus-visible{
  outline:none;
  box-shadow: 0 0 0 2px rgba(232,197,105,.30);
}

/* SVG eye (premium like registration) */
.mb-eye{
  --eye-red: rgba(255,65,111,.96);
  --eye-blue: rgba(232,197,105,.96);
  --eye-color: var(--eye-red);
  filter: drop-shadow(0 0 8px rgba(255,65,111,.28));
}
.mb-eye[data-state="visible"]{
  --eye-color: var(--eye-blue);
  filter: drop-shadow(0 0 8px rgba(232,197,105,.26));
}
.mb-eye .eye{ width: 28px; height: 28px; overflow: visible; }
.mb-eye .eye-outline{
  stroke: var(--eye-color);
  stroke-width: 1.9;
  fill: none;
  opacity: .96;
}
.mb-eye .eye-pupil{ fill: var(--eye-color); opacity: .96; }
.mb-eye .eye-slash{
  stroke: var(--eye-color);
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
}
.mb-eye[data-state="visible"] .eye-slash{ opacity: .96; }

/* scan line (restarts via .is-scan) */
.mb-eye .eye-scan{
  fill: rgba(245,246,255,.94);
  opacity: 0;
  filter: drop-shadow(0 0 10px rgba(255,255,255,.30));
  will-change: transform, opacity;
  transform: translateX(0);
  transform-box: fill-box;
  transform-origin: center;
}
@keyframes eyeScanX{
  0%   { transform: translateX(-2px); opacity: 0; }
  12%  { opacity: .85; }
  70%  { opacity: .55; }
  100% { transform: translateX(30px); opacity: 0; }
}
.mb-eye:hover .eye-scan{ animation: eyeScanX .55s ease-out 1; }
.mb-eye.is-scan .eye-scan{ animation: eyeScanX .55s ease-out 1; }

/* small help / error line under field */
.mb-field-msg{
  min-height: 16px;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.2;
  color: rgba(200,203,255,.70);
}
.mb-field-msg.is-warn{ color: rgba(255,190,90,.92); }
.mb-field-msg.is-err{ color: rgba(255,65,111,.92); }
.mb-field-msg.is-ok{ color: rgba(232,197,105,.92); }

/* strength (adapted to modals palette) */
.mb-strength{
  margin-top: 10px;
  padding: 10px 10px 8px;
  border-radius: 14px;
  border: 1px solid rgba(232,197,105,.16);
  background:
    radial-gradient(circle at 15% 20%, rgba(232,197,105,.10), transparent 55%),
    rgba(5,5,15,.40);
}
.mb-strength__top{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.mb-strength__label{
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(200,203,255,.60);
}
.mb-strength__hint{
  font-size: 12px;
  color: rgba(200,203,255,.62);
  white-space: nowrap;
  overflow:hidden;
  text-overflow: ellipsis;
}
.mb-strength__bar{
  position: relative;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,.06);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
}
.mb-strength__fill{
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg,
    rgba(255,65,111,.70),
    rgba(232,197,105,.70),
    rgba(232,197,105,.85)
  );
  filter: saturate(1.1);
  box-shadow: 0 0 18px rgba(232,197,105,.10);
  transition: width .22s ease;
}
.mb-strength__scan{
  position:absolute;
  top: -8px;
  left: -20%;
  width: 18%;
  height: 26px;
  border-radius: 12px;
  opacity: 0;
  background: linear-gradient(180deg,
    rgba(245,246,255,0),
    rgba(245,246,255,.30),
    rgba(245,246,255,0)
  );
  filter: blur(.2px) drop-shadow(0 0 14px rgba(245,246,255,.16));
  will-change: transform, opacity;
}
@keyframes mbScan{
  0%   { transform: translateX(0); opacity: 0; }
  20%  { opacity: .70; }
  100% { transform: translateX(640%); opacity: 0; }
}
.mb-strength.is-scan .mb-strength__scan{ animation: mbScan .55s ease-out 1; }

/* checklist */
.mb-checklist{
  margin-top: 10px;
  display:grid;
  gap: 8px;
}
.mb-checkline{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.10);
  color: rgba(200,203,255,.78);
  font-size: 12px;
  line-height: 1.2;
}
.mb-checkic{
  width: 18px;
  height: 18px;
  border-radius: 999px;
  display:grid;
  place-items:center;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  color: rgba(200,203,255,.70);
  flex: 0 0 auto;
}
.mb-checkline.is-ok{
  border-color: rgba(232,197,105,.22);
  background: radial-gradient(circle at 18% 18%, rgba(232,197,105,.10), transparent 55%), rgba(0,0,0,.10);
  color: rgba(245,245,255,.92);
}
.mb-checkline.is-ok .mb-checkic{
  border-color: rgba(232,197,105,.35);
  background: rgba(232,197,105,.10);
  color: rgba(245,245,255,.92);
  box-shadow: 0 0 14px rgba(232,197,105,.10);
}

/* tools row */
.mb-pass-tools{
  display:flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

/* respect aria-busy (setModalBusy) without spinner */
.mb-modal[aria-busy="true"] .mb-modal__title::after{
  content:"";
  display:inline-block;
  width: 8px;
  height: 8px;
  margin-left: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,.14);
  box-shadow: 0 0 0 6px rgba(255,255,255,.06);
  vertical-align: middle;
}

/* mobile tweaks for password blocks */
@media (max-width: 420px){
  .mb-passwrap .mb-input{ padding-right: 54px; }
  .mb-checkline{ padding: 9px 10px; }
}

/* make password dots spacing closer to auth inputs */
.mb-input[type="password"]{
  letter-spacing: .16em;
  font-variant-ligatures: none;
}
.mb-input[type="text"]{
  letter-spacing: normal;
}

/* ensure eye button does NOT overlay the whole input */
#modal-password .mb-passwrap{
  position: relative;
}

#modal-password .mb-passwrap .mb-eye{
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 12px;
  display: grid;
  place-items: center;
  z-index: 3;

  /* критично: кнопка кликается только в своих 40x40 */
  pointer-events: auto;
}

/* input под глазом должен иметь место справа, чтобы текст не заходил под кнопку */
#modal-password .mb-passwrap .mb-input{
  padding-right: 58px;
}

/* на всякий случай: svg внутри не должен “ловить” события */
#modal-password .mb-eye svg{
  pointer-events: none;
}

/* ===== Password input typography (match auth look) ===== */
.mb-input{
  font-size: 16px;            /* iOS не зумит и читабельно */
  line-height: 1.25;
}

.mb-input--pw{
  font-size: 18px;            /* крупнее точки */
  letter-spacing: .14em;      /* “воздух” между точками */
  font-variant-ligatures: none;
}

/* когда показываем пароль (type="text") — убираем “разрядку” */
.mb-input--pw[type="text"]{
  letter-spacing: .02em;
}

/* iOS/Safari autofill: remove yellow */
.auth-input:-webkit-autofill,
.auth-input:-webkit-autofill:hover,
.auth-input:-webkit-autofill:focus,
.mb-input:-webkit-autofill,
.mb-input:-webkit-autofill:hover,
.mb-input:-webkit-autofill:focus{
  -webkit-text-fill-color: rgba(245,245,255,.92) !important;
  caret-color: rgba(245,245,255,.92) !important;
  -webkit-box-shadow: 0 0 0 1000px rgba(5,5,15,.85) inset !important;
  box-shadow: 0 0 0 1000px rgba(5,5,15,.85) inset !important;
  transition: background-color 99999s ease-out 0s;
}
/* =========================================================
   Password modal inputs — match registration (.auth-input)
   Put at the VERY END of /css/modals.css
========================================================= */

/* same feel as .auth-input */
#modal-password .mb-input{
  background: linear-gradient(180deg, rgba(14,18,38,.92), rgba(8,10,20,.96));
  border: 1px solid rgba(232,197,105,.22);
  color: rgba(240,243,255,.96);
  box-shadow:
    inset 0 0 0 1px rgba(18,22,54,.40),
    0 12px 26px rgba(0,0,0,.34);
  transition: box-shadow .18s ease, border-color .18s ease, background .18s ease;

  /* важное: чтобы не было “мелко и плотно” */
  font-size: 16px;           /* как на регистрации по ощущению (iOS не зумит) */
  letter-spacing: normal;    /* убираем “растянутый/плотный” эффект */
  font-variant-ligatures: none;
}

#modal-password .mb-input::placeholder{
  color: rgba(246,236,208,.42);  /* как .auth-input::placeholder */
  letter-spacing: normal;        /* плейсхолдер НЕ должен реагировать/меняться */
  text-transform: none;
}

/* focus like registration */
#modal-password .mb-input:focus{
  outline:none;
  border-color: rgba(232,197,105,.72);
  box-shadow:
    0 0 0 1px rgba(232,197,105,.40),
    0 0 18px rgba(232,197,105,.22),
    0 18px 34px rgba(0,0,0,.36);
}

/* убираем жёлтый autofill в модалке (как на регистрации) */
#modal-password input.mb-input:-webkit-autofill{
  -webkit-text-fill-color: rgba(240,243,255,.96) !important;
  transition: background-color 9999s ease-in-out 0s;
  box-shadow: inset 0 0 0 1000px rgba(10,12,22,.98) !important;
  caret-color: rgba(240,243,255,.96);
  border: 1px solid rgba(232,197,105,.22) !important;
}

#secActivityList{
  max-height: 260px;
  overflow-y: auto;
  padding-right: 2px;
}

#secActivityList::-webkit-scrollbar{ width: 8px; }
#secActivityList::-webkit-scrollbar-thumb{
  background: rgba(255,255,255,.10);
  border-radius: 10px;
}

/* ===== Auto-detect pills for modalBackupCodes ===== */
.mb-pill.is-active {
  border-color: rgba(232,197,105,.85);
  box-shadow: 0 0 0 1px rgba(232,197,105,.30), 0 0 16px rgba(232,197,105,.18);
  color: rgba(245,245,255,.96);
}

.mb-input.is-auth {
  border-color: rgba(232,197,105,.55);
  box-shadow: 0 0 0 1px rgba(232,197,105,.22), 0 0 18px rgba(232,197,105,.12);
}

.mb-input.is-backup {
  border-color: rgba(255,65,111,.45);
  box-shadow: 0 0 0 1px rgba(255,65,111,.18), 0 0 18px rgba(255,65,111,.10);
}

/* modalBackupCodes: make dialog column so confirm can stick to bottom */
#modalBackupCodes .mb-modal__dialog,
#modalBackupCodes .mb-modal__content {
  display: flex;
  flex-direction: column;
}

/* grid/content grows, confirm block sits at bottom */
#modalBackupCodes #mbCodesGrid {
  flex: 1 1 auto;
  min-height: 120px;
}

/* confirm block */
#mb2faConfirmWrap.mb-2fa-confirm {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,.08);
}

/* hidden by default */
#mb2faConfirmWrap.is-hidden {
  display: none;
}

/* small hint */
#mb2faConfirmWrap .mb-2fa-confirm__hint {
  font-size: 12px;
  opacity: .85;
  margin-bottom: 8px;
}

/* pills row */
#mb2faConfirmWrap .mb-2fa-confirm__pills {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

/* optional: active highlight if you already have styles */
#mb2faPickAuth.is-active,
#mb2faPickBackup.is-active {
  outline: 1px solid rgba(232,197,105,.45);
}

#modalBackupCodes .mb-modal__head-right{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:8px;
}
#modalBackupCodes .mb-modal__head-right-top{
  display:flex;
  align-items:center;
  gap:10px;
}
#modalBackupCodes .mb-modal__head-right-sub{
  display:flex;
  justify-content:flex-end;
  width:100%;
}
/* =========================
   Profile: Player Search modal addons
   append to END of /css/modals.css
========================= */

#modal-player-search .mb-modal__dialog{
  width: min(640px, calc(100vw - 28px));
}

/* компактная строка: input + кнопка */
#modal-player-search .mb-search-row{
  display:flex;
  gap:10px;
  align-items:center;
}

#modal-player-search .mb-input--compact{
  padding: 10px 12px;     /* ниже, чем стандарт */
  border-radius: 14px;
}

/* визуально “короче”: ограничиваем максимальную ширину поля на больших экранах,
   но на мобиле оно 100% */
@media (min-width: 560px){
  #modal-player-search .mb-input--compact{
    max-width: 360px;
  }
}

#modal-player-search .mb-input--mono{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  letter-spacing: .02em;
}

/* кнопка поиска чуть компактнее и “primary-ощущение” */
#modal-player-search .mb-btn--search{
  padding: 10px 14px;
  border-radius: 14px;
  border-color: rgba(232,197,105,.28);
  background:
    radial-gradient(circle at 18% 18%, rgba(232,197,105,.14), transparent 60%),
    rgba(5,5,15,.62);
}

/* контейнер результатов */
#modal-player-search .mb-search-results{
  display:flex;
  flex-direction: column;
  gap: 10px;
  min-height: 88px;
}

/* на мобиле действия у карточки в строку (как ты делал в fix pack) */
@media (max-width: 420px){
  #modal-player-search .mb-search-row{
    flex-direction: column;
    align-items: stretch;
  }
  #modal-player-search .mb-btn--search{
    width: 100%;
  }
  #modal-player-search .mb-search-actions{
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
}

/* ============================================================
   Карточка игрока (поиск игроков → «Профиль»).
   До этого кнопка «Профиль» копировала ID в буфер — карточки не было вовсе.
   ============================================================ */
.pc-overlay { position: fixed; inset: 0; z-index: 12000;   /* выше модалки поиска (9999) */ display: grid; place-items: center; padding: 16px; }
.pc-backdrop { position: absolute; inset: 0; background: rgba(4, 3, 10, .72); backdrop-filter: blur(6px); }
.pc-dialog {
  position: relative; width: min(420px, 100%); max-height: 88vh; overflow-y: auto;
  border-radius: 20px; padding: 18px;
  background: linear-gradient(160deg, rgba(28, 24, 42, .98), rgba(12, 10, 20, .99));
  border: 1px solid rgba(232, 197, 105, .30);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.pc-loading { padding: 26px 8px; text-align: center; color: var(--tx-dim); font-size: 13px; }

.pc-head { display: flex; align-items: center; gap: 12px; }
.pc-ava {
  flex: none; width: 52px; height: 52px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-disp); font-size: 19px; letter-spacing: .04em; color: #f4e9cd;
  background: linear-gradient(150deg, rgba(232, 197, 105, .26), rgba(20, 16, 30, .95));
  border: 1px solid rgba(232, 197, 105, .45);
}
.pc-meta { min-width: 0; flex: 1 1 auto; }
.pc-name { font-size: 17px; font-weight: 700; color: var(--tx-hi); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-sub { font-size: 12px; color: var(--tx-dim); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; }
.pc-close {
  flex: none; width: 30px; height: 30px; border-radius: 50%; cursor: pointer;
  background: rgba(255, 255, 255, .06); border: 1px solid var(--hairline); color: var(--tx-hi);
}
.pc-close:hover { background: rgba(255, 255, 255, .12); }

.pc-stats { margin: 14px 0 6px; display: flex; flex-direction: column; gap: 1px; }
.pc-stat {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, .035);
}
.pc-stat:nth-child(odd) { background: rgba(255, 255, 255, .06); }
.pc-stat__l { font-size: 12.5px; color: var(--tx-dim); }
.pc-stat__v { font-size: 13px; font-weight: 600; color: #f0e6d0; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pc-hidden {
  padding: 16px 12px; border-radius: 12px; text-align: center; font-size: 12.5px; color: var(--tx-dim);
  background: rgba(255, 255, 255, .04); border: 1px dashed var(--hairline);
}

.pc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pc-actions .mb-btn { flex: 1 1 auto; min-width: 128px; padding: 10px 14px; font-size: 12.5px; }

/* ============================================================
   Друзья (профиль → «Друзья»): список, входящие и отправленные заявки.
   Раньше заявку можно было только отправить — принять её было негде.
   ============================================================ */
.fr-tabs { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.fr-tab {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: 999px; cursor: pointer;
  background: rgba(255,255,255,.05); border: 1px solid var(--hairline);
  color: var(--tx-dim); font-size: 12.5px; font-weight: 600;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.fr-tab:hover { background: rgba(255,255,255,.09); color: var(--tx-hi); }
.fr-tab.is-active {
  background: linear-gradient(135deg, rgba(232,197,105,.22), rgba(232,197,105,.08));
  border-color: rgba(232,197,105,.5); color: #f6ead0;
}
.fr-count {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.1); font-size: 11px; font-variant-numeric: tabular-nums;
}
.fr-tab.is-active .fr-count { background: rgba(232,197,105,.3); color: #fff6df; }

.fr-list { display: flex; flex-direction: column; gap: 8px; }
.fr-empty { padding: 26px 12px; text-align: center; color: var(--tx-dim); font-size: 13px; }

.fr-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid var(--hairline);
}
.fr-ava {
  flex: none; width: 38px; height: 38px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-disp); font-size: 14px; color: #f4e9cd;
  background: linear-gradient(150deg, rgba(232,197,105,.22), rgba(20,16,30,.95));
  border: 1px solid rgba(232,197,105,.38);
}
.fr-meta { flex: 1 1 auto; min-width: 0; cursor: pointer; }
.fr-name { font-size: 14px; font-weight: 600; color: var(--tx-hi); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fr-sub { font-size: 11.5px; color: var(--tx-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fr-acts { flex: none; display: flex; gap: 6px; }

/* счётчик входящих заявок на кнопке в профиле */
.fr-chip-count {
  min-width: 18px; height: 18px; margin-left: 6px; padding: 0 5px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--gold-grad); color: #181123; font-size: 11px; font-weight: 700;
}
.fr-chip-count[hidden] { display: none; }

@media (max-width: 520px) {
  .fr-row { flex-wrap: wrap; }
  .fr-acts { width: 100%; }
  .fr-acts .mb-btn { flex: 1 1 auto; }
}

/* заметка об игроке в карточке — приватная пометка «как играет» */
.pc-note { margin-top: 12px; }
.pc-note__head { font-size: 12px; color: var(--tx-dim); margin-bottom: 6px; }
.pc-note__text {
  width: 100%; padding: 9px 11px; border-radius: 10px; resize: vertical; min-height: 62px;
  background: rgba(8,8,16,.75); border: 1px solid var(--hairline);
  color: var(--tx-hi); font-family: var(--font-ui); font-size: 12.5px; line-height: 1.4;
}
.pc-note__text:focus { outline: none; border-color: rgba(232,197,105,.5); }
.pc-note__save { margin-top: 7px; width: 100%; }
