/* Личный кабинет закрытого клуба. Базовые цвета, шрифты, кнопки и карта клуба — из ../styles.css */
.cab { min-height: 100vh; min-height: 100svh; }
.cab .nav { background: linear-gradient(#000 40%, transparent); }
.cab-main { padding: 112px var(--gutter) 80px; max-width: 1180px; margin: 0 auto; }
[hidden] { display: none !important; }

/* <button> с классом .btn выглядит как ссылки-кнопки на главной (без «браузерного» фона) */
:where(button.btn) { background: transparent; border: 0; cursor: pointer; color: inherit; }
.btn-sm { height: 40px; padding: 0 16px; font-size: 14px; }
.btn-grey { background: rgba(255, 255, 255, .14); color: #fff; }
.btn-grey:hover { background: rgba(255, 255, 255, .22); }
.btn-wide { width: 100%; }
.btn-icon { width: 48px; padding: 0; flex: none; }
.btn-icon svg { width: 20px; height: 20px; }
.btn[disabled], .btn.busy { opacity: .5; pointer-events: none; }
.row { display: flex; flex-wrap: wrap; gap: 10px; }
.small { font-size: 13px; line-height: 1.55; }
.link-btn { background: none; border: 0; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: #fff; }

.field {
  width: 100%; height: 48px; padding: 0 16px;
  background: rgba(255, 255, 255, .06); color: #fff;
  border: 1px solid var(--line); border-radius: 14px;
  font: 400 16px/1.4 var(--font);   /* 16px — iPhone не зумит поле при фокусе */
  outline: none; transition: border-color .2s, background .2s;
}
.field::placeholder { color: var(--faint); }
.field:focus { border-color: rgba(242, 193, 78, .6); background: rgba(255, 255, 255, .09); }
.field.code { text-align: center; letter-spacing: .5em; font-family: var(--display); font-weight: 600; font-size: 22px; }

/* ── загрузка ── */
#view-loading { display: grid; place-items: center; min-height: 50vh; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── вход ── */
.login { max-width: 440px; margin: 6vh auto 0; }
.login .h-lg { margin: 14px 0 12px; }
.box { margin-top: 32px; padding: 24px; border: 1px solid var(--line); border-radius: 22px; background: rgba(255, 255, 255, .02); }
.box form { display: grid; gap: 10px; }
.divider { display: flex; align-items: center; gap: 14px; margin: 22px 0 18px; color: var(--faint); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.wait { line-height: 1.6; margin-bottom: 14px; }
.dot-pulse { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--accent); animation: pulse 1.2s ease-in-out infinite; vertical-align: 1px; }
@keyframes pulse { 50% { opacity: .25; } }
.form-error { min-height: 1.4em; margin-top: 12px; color: #ff8a7a; font-size: 14px; }
.form-error:empty { display: none; }

/* ── кабинет ── */
.dash-head { margin-bottom: 32px; }
.dash-head .h-lg { margin-top: 12px; overflow-wrap: anywhere; }
.grid { display: grid; grid-template-columns: 5fr 7fr; gap: 16px; align-items: start; }
.col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.card {
  min-width: 0;
  padding: 26px; border: 1px solid var(--line); border-radius: 22px;
  background: rgba(255, 255, 255, .02);
}
.card h2 { font-family: var(--display); font-weight: 600; font-size: 22px; letter-spacing: -.025em; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.card > h2 { margin-bottom: 14px; }

.badge { padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; background: rgba(255, 255, 255, .1); color: var(--muted); white-space: nowrap; }
.badge.ok { background: var(--accent-dim); color: var(--accent); }
.badge.off { background: rgba(255, 120, 100, .12); color: #ff8a7a; }

.sub-big { font-family: var(--display); font-weight: 600; font-size: clamp(48px, 6vw, 72px); letter-spacing: -.05em; line-height: 1; }
.sub-big small { font-size: .32em; letter-spacing: -.01em; color: var(--muted); margin-left: 8px; }
.sub-until { margin: 10px 0 20px; color: var(--muted); }
.meta { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; border-radius: 14px; overflow: hidden; background: var(--line); margin-bottom: 18px; }
.meta div { padding: 14px 16px; background: #050505; }
.meta span { display: block; font-size: 12px; color: var(--faint); margin-bottom: 4px; }
.meta b { font-weight: 600; }
.bar { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; margin: -6px 0 18px; }
.bar i { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width .8s var(--ease); }
.bar.low i { background: #ff8a7a; }
.online { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; font-size: 14px; color: var(--muted); }
.online .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.online.live { color: #fff; }
.online.live .dot { background: #5fd38a; box-shadow: 0 0 0 4px rgba(95, 211, 138, .15); animation: pulse 1.6s ease-in-out infinite; }
.meta b { overflow-wrap: anywhere; }
.slots { display: inline-flex; gap: 4px; margin-right: 8px; vertical-align: 1px; }
.slots i { width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--faint); }
.slots i.on { background: var(--accent); border-color: var(--accent); }
.dev-icon { flex: none; width: 22px; height: 22px; fill: var(--muted); }
.dev-info { flex: 1; min-width: 0; display: grid; gap: 2px; }
.dev-info b { font-weight: 600; overflow-wrap: anywhere; }
.dev-info span { font-size: 12px; color: var(--faint); overflow-wrap: anywhere; }
.hist { list-style: none; display: grid; }
.hist li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.hist li:last-child { border-bottom: 0; }
.hist b { display: block; font-weight: 500; }
.hist span { font-size: 12px; color: var(--faint); }
.hist em { font-style: normal; font-weight: 600; color: var(--accent); white-space: nowrap; }
.sub-empty p { color: var(--muted); line-height: 1.6; margin-bottom: 18px; }

.steps-mini { list-style: none; counter-reset: s; display: grid; gap: 22px; }
.steps-mini li { counter-increment: s; position: relative; padding-left: 44px; min-width: 0; }
.steps-mini li::before {
  content: counter(s); position: absolute; left: 0; top: -2px;
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid rgba(242, 193, 78, .5); color: var(--accent); font-size: 13px; font-weight: 600;
}
.steps-mini p { line-height: 1.55; margin-bottom: 12px; }
.steps-mini li > p:last-child { margin-bottom: 0; }
.apps { display: grid; gap: 8px; }
.app-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.app-row > span { width: 52px; font-weight: 600; font-size: 14px; }
.chip { height: 34px; padding: 0 14px; display: inline-flex; align-items: center; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; color: var(--muted); transition: border-color .2s, color .2s; }
.chip:hover { border-color: #fff; color: #fff; }
.chip.mine { border-color: rgba(242, 193, 78, .55); color: var(--accent); }
.key { display: flex; gap: 10px; align-items: center; margin-top: 4px; padding: 6px 6px 6px 14px; border: 1px solid var(--line); border-radius: 14px; }
.key code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

/* карта клуба — та же, что на главной (оформление .cc-* — в ../styles.css) */
.mcard { position: relative; display: block; width: 100%; max-width: 440px; aspect-ratio: 1.6; margin: 4px auto 24px; perspective: 900px; container-type: inline-size; }
.mcard .cc-face { transition: transform .4s var(--ease), filter .4s; }
.mcard.none { opacity: .6; }
.mcard.guest .cc-face { filter: grayscale(.92) brightness(1.08); }
.mcard.guest .cc-brand { color: #e2e0d8; }
.mcard.paused .cc-face { filter: grayscale(1) brightness(.62); }
.card-sub .card-top { margin-bottom: 14px; }

/* членство и лист ожидания */
.price-sm { font-family: var(--display); font-weight: 600; font-size: 48px; letter-spacing: -.05em; line-height: 1; margin: 6px 0 18px; }
.price-sm small { font-size: .32em; letter-spacing: 0; color: var(--muted); font-weight: 500; }
.small-ticks { font-size: 14px; gap: 10px; margin-bottom: 22px; }
#plans-body > .row { margin-bottom: 14px; }
.notice { padding: 14px 16px; margin-bottom: 18px; border: 1px solid rgba(242, 193, 78, .45); border-radius: 14px; background: var(--accent-dim); line-height: 1.55; }
.queue-pos { font-family: var(--display); font-weight: 600; font-size: 64px; letter-spacing: -.05em; line-height: 1; margin: 14px 0; color: var(--accent); }
.queue-pos small { display: block; margin-top: 6px; font-family: var(--font); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); font-weight: 500; }
#plans-body > .muted { margin-bottom: 12px; }
.dash-head .seats-line { margin-top: 14px; }

.dev-list { list-style: none; display: grid; gap: 8px; margin-bottom: 14px; }
.dev-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 10px 10px 14px; border: 1px solid var(--line); border-radius: 14px; font-size: 14px; }
.dev-list li span { min-width: 0; overflow-wrap: anywhere; }
.dev-list .empty { color: var(--faint); border-style: dashed; }
.x { flex: none; width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .08); color: var(--muted); cursor: pointer; font-size: 16px; }
.x:hover { background: rgba(255, 120, 100, .2); color: #ff8a7a; }

.chat { display: flex; flex-direction: column; gap: 8px; height: 340px; overflow-y: auto; padding: 4px 2px 12px; overscroll-behavior: contain; }
.chat-empty { margin: auto 0; color: var(--faint); font-size: 14px; line-height: 1.6; text-align: center; padding: 0 12px; }
.msg { max-width: 82%; padding: 10px 14px; border-radius: 16px; font-size: 15px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg time { display: block; margin-top: 4px; font-size: 11px; opacity: .55; }
.msg.me { align-self: flex-end; background: var(--accent); color: #000; border-bottom-right-radius: 6px; }
.msg.them { align-self: flex-start; background: rgba(255, 255, 255, .08); border-bottom-left-radius: 6px; }
.msg.pending { opacity: .6; }
.chat-form { display: flex; gap: 10px; align-items: flex-end; padding-top: 12px; border-top: 1px solid var(--line); }
.chat-form textarea { height: auto; min-height: 48px; max-height: 160px; padding: 12px 16px; resize: none; }

.acc-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.acc-row p { overflow-wrap: anywhere; }
.acc-label { font-size: 12px; color: var(--faint); margin-bottom: 3px; }
.link-mail { display: grid; gap: 8px; margin-top: 12px; }
.card-account > .muted { margin-top: 14px; }

@media (max-width: 900px) {
  /* на узком экране — одна колонка в порядке важности */
  .grid { grid-template-columns: 1fr; }
  .col { display: contents; }
  .card-sub { order: 1; } .card-connect { order: 2; } .card-plans { order: 3; }
  .card-chat { order: 4; } .card-devices { order: 5; } .card-history { order: 6; } .card-account { order: 7; }
}
@media (max-width: 640px) {
  .cab-main { padding-top: 96px; }
  .card { padding: 20px; border-radius: 18px; }
  .box { padding: 20px; }
  .chat { height: 300px; }
  .steps-mini li { padding-left: 38px; }
  .app-row > span { width: 100%; }
  .msg { max-width: 90%; }
}

/* подвал: документы и контакты */
.cab-foot { display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: center; padding: 28px 16px 40px; font-size: 13px; color: var(--muted, #8a8a8a); }
.cab-foot a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.cab-foot a:hover { color: #F2C14E; }

/* поддержка без входа */
.guest-support .gs-title { font-family: var(--display); font-weight: 600; font-size: 20px; margin: 0 0 6px; }
.guest-support form { margin-top: 14px; }
.guest-support textarea.field { resize: vertical; min-height: 96px; font: inherit; }
.guest-support .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.guest-support .gs-done { margin: 14px 0 0; color: var(--accent); }
.chat-alt { margin: 10px 0 0; }
.chat-alt a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.guest-support .gs-alt { margin: 14px 0 0; }
.guest-support .gs-alt a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
