/* Кабинет — в стиле skyvpn1.online (Atlas + miniapp-site) */

.cab-body {
  min-height: 100vh;
  background: var(--sv-bg, #101113) !important;
}

.cab-body--app {
  background: transparent !important;
}

.cab-body--app .cab-wrap,
.cab-body--app #cab-app {
  position: relative;
  z-index: 1;
}

.text-brand {
  font-family: var(--sv-font-brand, inherit);
  background: var(--sv-gradient-text, linear-gradient(110deg, #f8f9fa 0%, #67e8f9 45%, #22d3ee 100%));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* --- Шапка как на сайте --- */

.cab-site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12, 13, 15, 0.94);
  border-bottom: 1px solid var(--sv-line, rgba(255, 255, 255, 0.08));
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
}

.cab-site-header::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(6, 182, 212, 0.35), transparent);
  pointer-events: none;
}

.cab-site-header__inner {
  max-width: min(24rem, 100%);
  margin: 0 auto;
  padding: 0 16px;
}

.cab-site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 3.35rem;
  padding: max(0.45rem, env(safe-area-inset-top)) 0 0.45rem;
}

.cab-site-header__actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.cab-site-header__brand {
  font-size: 1rem;
  text-decoration: none;
  justify-self: start;
}

.cab-site-header__tag {
  font-family: var(--sv-font-mono, monospace);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sv-muted, #909296);
  padding: 0.2rem 0.45rem;
  border: 1px solid var(--sv-line, rgba(255, 255, 255, 0.08));
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.02);
}

.cab-home-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 0.35rem;
  min-height: 2.15rem !important;
  padding: 0 0.7rem !important;
  font-size: 0.75rem !important;
  letter-spacing: 0.04em;
  text-decoration: none;
  white-space: nowrap;
  border-radius: 2px !important;
  color: var(--sv-mint-bright, #22d3ee) !important;
  border-color: rgba(6, 182, 212, 0.35) !important;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.cab-home-btn:hover {
  background: var(--sv-mint-dim, rgba(6, 182, 212, 0.12)) !important;
  border-color: rgba(6, 182, 212, 0.55) !important;
  transform: translateY(-1px);
}

.cab-home-btn__icon {
  width: 0.95rem;
  height: 0.95rem;
  flex-shrink: 0;
  opacity: 0.9;
}

.cab-wrap {
  position: relative;
  z-index: 1;
  width: min(24rem, 100%);
  margin: 0 auto;
  padding: 1.25rem 16px calc(1.75rem + env(safe-area-inset-bottom));
}

.cab-ext-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(6, 182, 212, 0.35);
  border-radius: 2px;
  background: rgba(6, 182, 212, 0.1);
}

.cab-ext-banner[hidden] {
  display: none !important;
}

.cab-ext-banner__text {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--sv-heading, #f1f3f5);
}

.cab-ext-banner__btn {
  flex-shrink: 0;
  min-height: 2rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid rgba(6, 182, 212, 0.45);
  border-radius: 2px;
  background: rgba(6, 182, 212, 0.15);
  color: var(--sv-mint-bright, #22d3ee);
  font-family: var(--sv-font, inherit);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.cab-tg-link-status {
  margin: 0.45rem 0 0.65rem;
  padding: 0.45rem 0.55rem;
  border-radius: 2px;
  border: 1px solid rgba(248, 113, 113, 0.22);
  background: rgba(248, 113, 113, 0.06);
  font-size: 0.78rem;
  color: #fca5a5;
}

.cab-tg-link-status--ok {
  border-color: rgba(52, 211, 153, 0.28);
  background: rgba(52, 211, 153, 0.08);
  color: #86efac;
}

.cab-tg-link-steps {
  margin: 0.65rem 0 0;
  font-size: 0.78rem;
  line-height: 1.45;
}

.cab-body:not(.cab-body--app) {
  background: transparent !important;
}

/* --- Auth frame (sv-frame + atlas) --- */

.cab-auth-shell {
  margin-top: 4px;
}

@media (prefers-reduced-motion: no-preference) {
  .cab-auth-frame {
    animation: sv-card-fly-in 0.7s var(--sv-ease-smooth, cubic-bezier(0.16, 1, 0.3, 1)) both;
  }

  .cab-auth-foot {
    animation: cabFadeIn 0.5s var(--sv-ease-smooth, ease) 0.15s both;
  }
}

.cab-auth-frame {
  max-width: 100%;
  padding: clamp(1.15rem, 3.5vw, 1.5rem) clamp(0.95rem, 3vw, 1.15rem) clamp(1rem, 3vw, 1.2rem);
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.03) 0%, transparent 42%),
    linear-gradient(180deg, rgba(28, 29, 32, 0.88) 0%, rgba(16, 17, 19, 0.72) 100%);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 2px;
  box-shadow:
    0 28px 64px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.cab-auth-frame.sv-frame::before,
.cab-auth-frame.sv-frame::after,
.cab-auth-frame .sv-frame__corner--tr,
.cab-auth-frame .sv-frame__corner--bl {
  width: 1.65rem;
  height: 1.65rem;
  border-color: rgba(6, 182, 212, 0.55);
}

.cab-auth-hero {
  text-align: center;
  margin-bottom: 1rem;
}

.cab-auth-title {
  margin: 0;
  font-family: var(--sv-font-brand, inherit);
  font-size: clamp(1.2rem, 4.2vw, 1.38rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--sv-heading, #f1f3f5);
}

.cab-auth-title .text-brand {
  display: inline-block;
  margin-top: 0.1rem;
}

.cab-auth-subtitle {
  margin: 0.5rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--sv-muted, #909296);
}

.cab-auth-rule {
  height: 1px;
  margin: 0.9rem auto 0;
  max-width: 11rem;
  background: linear-gradient(90deg, transparent, rgba(6, 182, 212, 0.42), transparent);
  opacity: 0.85;
}

/* --- Шаги восстановления --- */

.cab-auth-steps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.cab-auth-steps[hidden] {
  display: none !important;
}

.cab-auth-step {
  font-family: var(--sv-font-mono, monospace);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.35rem 0.6rem;
  color: var(--sv-muted, #909296);
  border: 1px solid var(--sv-line, rgba(255, 255, 255, 0.08));
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.02);
  transition: all 0.2s ease;
}

.cab-auth-step.is-active {
  color: var(--sv-mint-bright, #22d3ee);
  border-color: rgba(6, 182, 212, 0.4);
  background: var(--sv-mint-dim, rgba(6, 182, 212, 0.12));
}

.cab-auth-step.is-done {
  color: #6ee7b7;
  border-color: rgba(52, 211, 153, 0.3);
}

/* --- Форма --- */

.cab-auth-view {
  animation: cabFadeIn 0.3s var(--sv-ease-smooth, ease);
}

@keyframes cabFadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.cab-auth-lead {
  margin: 0 0 0.85rem;
  text-align: center;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--sv-muted, #909296);
}

.cab-auth-lead strong {
  color: var(--sv-mint-bright, #22d3ee);
  font-weight: 600;
}

.cab-auth-form {
  display: grid;
  gap: 0.75rem;
}

.cab-field {
  display: grid;
  gap: 0.35rem;
}

.cab-field__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.cab-field__label {
  font-family: var(--sv-font-mono, monospace);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sv-muted, #909296);
}

.cab-field__box {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.75rem;
  padding: 0 0.85rem;
  border-radius: 2px;
  background: var(--sv-dark-8, #141517);
  border: 1px solid var(--sv-line, rgba(255, 255, 255, 0.08));
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cab-field__box:focus-within {
  border-color: rgba(6, 182, 212, 0.45);
  box-shadow: 0 0 0 1px rgba(6, 182, 212, 0.15);
  background: rgba(10, 12, 16, 0.95);
}

.cab-field__box:focus-within .cab-field__icon {
  color: var(--sv-mint-bright, #22d3ee);
}

.cab-field__box--code {
  justify-content: center;
  padding: 0;
}

.cab-field__icon {
  width: 1rem;
  height: 1rem;
  color: rgba(144, 146, 150, 0.85);
  flex-shrink: 0;
}

.cab-input {
  width: 100%;
  min-height: 2.5rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--sv-heading, #f1f3f5);
  font-family: var(--sv-font, inherit);
  font-size: 0.875rem;
  outline: none;
}

.cab-input::placeholder {
  color: rgba(144, 146, 150, 0.55);
}

.cab-input--code {
  text-align: center;
  letter-spacing: 0.38em;
  font-family: var(--sv-font-mono, monospace);
  font-size: 1.1rem;
  font-weight: 500;
  padding: 0.65rem 0;
}

.cab-field__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  margin: 0 -0.15rem 0 0;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--sv-muted, #909296);
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.cab-field__toggle:hover {
  color: var(--sv-mint-bright, #22d3ee);
  background: rgba(6, 182, 212, 0.08);
}

.cab-field__toggle-ic {
  width: 1.05rem;
  height: 1.05rem;
}

.cab-field__toggle-ic[hidden] {
  display: none !important;
}

.cab-forgot-link {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--sv-mint-bright, #22d3ee);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  opacity: 0.9;
}

.cab-forgot-link:hover {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cab-auth-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin-top: 0.35rem;
}

.cab-auth-actions--stack {
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

.cab-auth-actions .sv-btn-atlas {
  width: 100%;
  min-height: 2.875rem;
  border-radius: 2px !important;
}

.cab-auth-actions--stack .sv-btn-atlas--secondary {
  min-height: 2.55rem;
  font-size: 0.8125rem;
}

.cab-auth-shell .sv-btn-atlas--primary {
  color: #061014 !important;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.cab-auth-shell .sv-btn-atlas--secondary {
  border-radius: 2px !important;
}

.sv-btn-atlas--block {
  max-width: none !important;
  width: 100%;
}

/* --- OAuth --- */

.cab-oauth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.1rem 0 0.85rem;
  font-family: var(--sv-font-mono, monospace);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sv-muted, #909296);
}

.cab-oauth-divider::before,
.cab-oauth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--sv-line, rgba(255, 255, 255, 0.08));
}

.cab-auth-oauth {
  display: grid;
  gap: 0.45rem;
  padding: 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.14);
}

.cab-oauth-note {
  margin: 0.45rem 0 0;
  font-size: 0.72rem;
  line-height: 1.4;
  text-align: center;
  color: var(--sv-muted, #909296);
}

.cab-oauth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  min-height: 2.5rem;
  padding: 0 0.85rem;
  border: 0;
  border-radius: 2px;
  font-family: var(--sv-font, inherit);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s var(--sv-ease-smooth, ease), filter 0.2s ease, box-shadow 0.2s ease;
}

.cab-oauth-btn__icon {
  display: grid;
  place-items: center;
  width: 1.2rem;
  height: 1.2rem;
  flex-shrink: 0;
}

.cab-oauth-btn__icon svg {
  width: 1.2rem;
  height: 1.2rem;
}

.cab-oauth-btn:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.cab-oauth-btn--yandex {
  background: #fc3f1d;
  color: #fff;
  box-shadow: 0 2px 12px rgba(252, 63, 29, 0.28);
}

.cab-oauth-btn--google {
  background: #fff;
  color: #3c4043;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.14);
}

.cab-oauth-btn--telegram,
.cab-oauth-btn--telegram-face {
  background: linear-gradient(135deg, #2aabee, #229ed9);
  color: #fff;
  box-shadow: 0 2px 12px rgba(34, 158, 217, 0.3);
}

.cab-oauth-btn--telegram-face {
  pointer-events: none;
  width: 100%;
}

.cab-tg-wrap {
  position: relative;
  min-height: 2.5rem;
}

.cab-tg-wrap[hidden] {
  display: none !important;
}

.cab-login-slot {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0.001;
  overflow: hidden;
  border-radius: 2px;
}

.cab-login-slot iframe {
  width: 100% !important;
  height: 2.5rem !important;
  min-height: 2.5rem;
  cursor: pointer;
}

.cab-auth-foot {
  margin-top: 0.75rem;
  display: grid;
  gap: 0.55rem;
  justify-items: center;
}

.cab-auth-foot--compact {
  margin-top: 0.5rem;
  gap: 0.45rem;
}

[data-auth-foot-social][hidden] {
  display: none !important;
}

.cab-note {
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  font-size: 0.78rem;
  line-height: 1.45;
  text-align: center;
}

.cab-note:empty {
  display: none;
}

.cab-note:not(:empty) {
  padding: 0.55rem 0.7rem;
  border-radius: 2px;
  border: 1px solid rgba(248, 113, 113, 0.22);
  background: rgba(248, 113, 113, 0.07);
  color: #fca5a5;
}

.cab-note.cab-note--ok:not(:empty) {
  border-color: rgba(52, 211, 153, 0.25);
  background: rgba(52, 211, 153, 0.07);
  color: #86efac;
}

.cab-tg-foot-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0.35rem 0.5rem;
  border: 0;
  background: none;
  color: var(--sv-muted, #909296);
  font-family: var(--sv-font, inherit);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s ease, gap 0.2s ease;
}

.cab-tg-foot-link svg {
  width: 1rem;
  height: 1rem;
  color: var(--sv-mint-bright, #22d3ee);
  opacity: 0.85;
}

.cab-tg-foot-link:hover {
  color: var(--sv-heading, #f1f3f5);
  gap: 0.55rem;
}

.cab-auth-legal {
  margin: 0;
  max-width: 20rem;
  font-size: 0.68rem;
  line-height: 1.45;
  text-align: center;
  color: var(--sv-muted, #909296);
}

.cab-auth-legal a {
  color: var(--sv-mint-bright, #22d3ee);
  text-decoration: none;
}

.cab-auth-legal a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* --- Авторизованный кабинет (как miniapp v2, полноэкранно) --- */

.cab-body--app .cab-site-header {
  display: none;
}

.cab-body--app .cab-wrap {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.cab-body--app .ma-v2-backdrop {
  opacity: 1;
}

.cab-app.ma-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: none;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background: transparent;
}

.cab-app-top {
  position: relative;
  flex-shrink: 0;
  background: rgba(12, 13, 15, 0.96);
  border-bottom: 1px solid var(--sv-line, rgba(255, 255, 255, 0.08));
}

.cab-app-top::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(6, 182, 212, 0.35), transparent);
  pointer-events: none;
}

.cab-app-top__inner,
.cab-nav__inner,
.cab-app-main.ma-scroll {
  width: 100%;
  max-width: min(56rem, 100%);
  margin: 0 auto;
}

.cab-app-top__inner {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 3.35rem;
  padding: max(0.5rem, env(safe-area-inset-top)) 1.25rem 0.5rem;
}

.cab-app-top__brand {
  font-size: 1.05rem;
  text-decoration: none;
  margin-right: auto;
}

.cab-app-top__tag {
  font-family: var(--sv-font-mono, monospace);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sv-muted, #909296);
  padding: 0.2rem 0.45rem;
  border: 1px solid var(--sv-line, rgba(255, 255, 255, 0.08));
  border-radius: 2px;
}

.cab-app-top__link {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--sv-mint-bright, #22d3ee);
  text-decoration: none;
  padding: 0.35rem 0.65rem;
  border: 1px solid rgba(6, 182, 212, 0.35);
  border-radius: 2px;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.cab-app-top__link:hover {
  background: var(--sv-mint-dim, rgba(6, 182, 212, 0.12));
  border-color: rgba(6, 182, 212, 0.55);
}

.cab-nav {
  flex-shrink: 0;
  background: rgba(16, 17, 19, 0.92);
  border-bottom: 1px solid var(--sv-line, rgba(255, 255, 255, 0.08));
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.cab-nav__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  padding: 0.5rem 1.25rem 0.65rem;
  border-radius: 4px;
}

.cab-nav__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  flex: 1 1 calc(20% - 0.35rem);
  min-width: 5.5rem;
  min-height: 2.45rem;
  padding: 0.4rem 0.55rem;
  border: 1px solid transparent;
  border-radius: 2px;
  background: transparent;
  color: var(--sv-muted, #909296);
  font-family: var(--sv-font, inherit);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.cab-nav__btn:hover {
  color: var(--sv-heading, #f1f3f5);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--sv-line, rgba(255, 255, 255, 0.08));
}

.cab-nav__btn.is-active {
  color: var(--sv-mint-bright, #22d3ee);
  background: rgba(6, 182, 212, 0.14);
  border-color: rgba(6, 182, 212, 0.4);
  box-shadow:
    inset 0 0 0 1px rgba(6, 182, 212, 0.15),
    0 4px 14px rgba(6, 182, 212, 0.12);
}

.cab-nav__icon {
  width: 1.05rem;
  height: 1.05rem;
  flex-shrink: 0;
  opacity: 0.9;
}

.cab-nav__btn.is-active .cab-nav__icon {
  opacity: 1;
}

.cab-app-main.ma-scroll {
  flex: 1;
  padding: 1.1rem 1.25rem 2rem;
  padding-bottom: calc(2rem + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
}

/* --- Главная: hero + двухколоночная сетка --- */

.cab-home-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.cab-home-hero__user {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.cab-home-hero__badge {
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.cab-home-hero__avatar {
  flex-shrink: 0;
}

.cab-home-hero__title {
  margin: 0;
  font-family: var(--sv-font-brand, inherit);
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--sv-heading, #f1f3f5);
}

.cab-home-hero__sub {
  margin: 0.25rem 0 0;
  font-family: var(--sv-font-mono, monospace);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--sv-muted, #909296);
}

.cab-home-layout {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cab-home-layout__main {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cab-sub-card {
  margin-bottom: 0;
}

.cab-sub-meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin: 0;
}

.cab-sub-meta__days {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--sv-heading, #f1f3f5);
}

.cab-sub-meta__until {
  font-size: 0.82rem;
  color: var(--sv-muted, #909296);
}

.cab-sub-progress {
  margin-top: 0.65rem;
}

.cab-sub-progress__track {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.cab-sub-progress__bar {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #0891b2, #22d3ee);
  transition: width 0.45s var(--sv-ease-smooth, ease);
}

.cab-home-layout__aside {
  display: flex;
  flex-direction: column;
}

.cab-home-layout__aside .cab-home-tiles {
  margin-bottom: 0;
  flex: 1;
}

.cab-home-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 1.25rem;
}

.cab-stat-card {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.85rem 0.9rem;
  border-radius: var(--v2-radius, 10px);
  border: 1px solid var(--v2-border, rgba(255, 255, 255, 0.08));
  background: color-mix(in srgb, var(--v2-surface, #1a1b1e) 88%, transparent);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}

.cab-stat-card__ic {
  width: 1.1rem;
  height: 1.1rem;
  color: var(--sv-mint-bright, #22d3ee);
  margin-bottom: 0.15rem;
}

.cab-stat-card__label {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sv-muted, #909296);
}

.cab-stat-card__value {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--sv-heading, #f1f3f5);
  line-height: 1.25;
}

.cab-home-connect-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border-radius: var(--v2-radius, 10px);
  border: 1px solid rgba(6, 182, 212, 0.28);
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.1), rgba(6, 182, 212, 0.04));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.cab-home-connect-strip__text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.cab-home-connect-strip__title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--sv-heading, #f1f3f5);
}

.cab-home-connect-strip__sub {
  font-size: 0.78rem;
  color: var(--sv-muted, #909296);
}

.cab-home-connect-strip__btn {
  flex-shrink: 0;
  min-height: 2.5rem;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 2px;
  background: linear-gradient(135deg, #0891b2, #22d3ee);
  color: #0b0e11;
  font-family: var(--sv-font, inherit);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.cab-home-connect-strip__btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.35);
}

.cab-home-chips {
  margin-top: 1rem;
}

.cab-app-foot {
  flex-shrink: 0;
  margin-top: auto;
  border-top: 1px solid var(--sv-line, rgba(255, 255, 255, 0.08));
  background: rgba(12, 13, 15, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.cab-app-foot__inner {
  width: 100%;
  max-width: min(56rem, 100%);
  margin: 0 auto;
  padding: 1rem 1.25rem calc(1rem + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
}

.cab-app-foot__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
}

.cab-app-foot__links a {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--sv-muted, #909296);
  text-decoration: none;
  transition: color 0.2s ease;
}

.cab-app-foot__links a:hover {
  color: var(--sv-mint-bright, #22d3ee);
}

.cab-app-foot__copy {
  margin: 0;
  font-size: 0.72rem;
  color: var(--sv-muted, #909296);
  opacity: 0.85;
}

.cab-app .cab-home-tiles .ma-v2-tile {
  min-height: 5.25rem;
  justify-content: center;
}

.cab-app .ma-pane {
  animation: cabFadeIn 0.28s var(--sv-ease-smooth, ease);
}

.cab-app-hint {
  margin: 0.65rem 0 0;
  padding: 0.55rem 0.7rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(6, 182, 212, 0.22);
  background: rgba(6, 182, 212, 0.08);
  color: var(--sv-mint-bright, #67e8f9);
  font-size: 0.8rem;
  text-align: center;
}

.cab-app-hint[hidden] {
  display: none !important;
}

.cab-trial-btn {
  margin-top: 0.55rem;
}

.cab-pay-method-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.cab-support-link {
  display: flex;
  margin-top: 0.85rem;
  text-decoration: none;
}

.cab-logout-btn {
  margin-top: 0.75rem;
}

.cab-app .ma-v2-premium {
  width: 100%;
  margin-top: 0;
  margin-bottom: 0;
}

.cab-app .ma-acc.is-open .ma-acc__panel {
  display: block;
}

.cab-app .ma-acc.is-open .ma-acc__panel[hidden] {
  display: block !important;
}

.cab-settings-fold {
  margin-bottom: 0.75rem;
}

.cab-friends-levels {
  margin-bottom: 0.85rem;
}

.cab-app .ma-toast-host {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  z-index: 200;
  width: min(22rem, calc(100% - 2rem));
  pointer-events: none;
}

.cab-app .ma-toast-host .ma-toast {
  margin-top: 0.35rem;
  padding: 0.65rem 0.85rem;
  border-radius: 0.65rem;
  background: rgba(20, 22, 28, 0.94);
  border: 1px solid rgba(6, 182, 212, 0.28);
  color: #e8ecff;
  font-size: 0.8rem;
  text-align: center;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  animation: cabToastIn 0.28s ease;
}

.cab-app .ma-toast-host .ma-toast--out {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

@keyframes cabToastIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.cab-body.theme-light {
  background: #f5f7fa !important;
}

.theme-light .cab-site-header {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(15, 23, 42, 0.08);
}

.theme-light .cab-home-btn {
  color: #0891b2 !important;
}

.theme-light .cab-auth-frame {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(15, 23, 42, 0.08);
}

.theme-light .cab-field__box {
  background: #fff;
  border-color: rgba(15, 23, 42, 0.1);
}

.theme-light .cab-input {
  color: #0f172a;
}

.theme-light .cab-tg-foot-link {
  color: #64748b;
}

.theme-light .cab-auth-oauth {
  background: rgba(15, 23, 42, 0.03);
}

.theme-light .cab-oauth-btn--google {
  border-color: rgba(15, 23, 42, 0.1);
}

@media (min-width: 520px) {
  .cab-nav__btn {
    flex: 1 1 0;
    min-height: 2.55rem;
    font-size: 0.8125rem;
    padding: 0.45rem 0.75rem;
  }
}

@media (min-width: 768px) {
  .cab-home-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 1.25rem;
    align-items: stretch;
  }

  .cab-home-layout__aside .cab-home-tiles {
    grid-template-columns: 1fr 1fr;
    height: 100%;
  }

  .cab-app .cab-home-tiles .ma-v2-tile {
    min-height: 6rem;
  }
}

@media (max-width: 420px) {
  .cab-wrap {
    padding-left: 12px;
    padding-right: 12px;
  }

  .cab-site-header__inner {
    padding-left: 12px;
    padding-right: 12px;
  }

  .cab-home-btn span {
    display: none;
  }

  .cab-home-btn {
    padding: 0 0.55rem !important;
  }

  .cab-nav__inner {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    gap: 0.3rem;
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  .cab-nav__inner::-webkit-scrollbar {
    display: none;
  }

  .cab-nav__btn {
    flex: 0 0 auto;
    min-width: auto;
    padding: 0.4rem 0.65rem;
  }

  .cab-nav__label {
    white-space: nowrap;
  }

  .cab-app-top__tag {
    display: none;
  }

  .cab-home-stats {
    grid-template-columns: 1fr;
  }

  .cab-home-connect-strip {
    flex-direction: column;
    align-items: stretch;
  }

  .cab-home-connect-strip__btn {
    width: 100%;
  }

  .cab-home-hero__badge {
    display: none;
  }
}

.theme-light .cab-app.ma-shell {
  background: transparent;
}

.theme-light .cab-stat-card {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(15, 23, 42, 0.08);
}

.theme-light .cab-home-connect-strip {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.08), rgba(255, 255, 255, 0.9));
  border-color: rgba(6, 182, 212, 0.22);
}

.theme-light .cab-app-foot {
  background: rgba(255, 255, 255, 0.88);
}

.theme-light .cab-app-top,
.theme-light .cab-nav {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(15, 23, 42, 0.08);
}

.theme-light .cab-nav__btn.is-active {
  color: #0891b2;
  background: rgba(6, 182, 212, 0.1);
}
