@font-face {
  font-family: 'Steinbeck';
  src: url('fonts/Steinbeck.woff2') format('woff2'),
       url('fonts/Steinbeck.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

[hidden] {
  display: none !important;
}

:root {
  --bg: #000000;
  --text: #ffffff;
  --muted: #8e8e93;
  --soft: #c5c5c7;
  --surface: #121212;
  --surface-2: #1c1c1e;
  --accent: #fff;
  --accent-text: #000;
  --danger: #ff6b6b;
  --radius: 24px;
  --f: "Unbounded", sans-serif;
  --f-heading: "Unbounded", sans-serif;
}

html {
  background: var(--bg);
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f);
  font-size: 13px;
  font-weight: 300;
  letter-spacing: -0.2px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-user-select: none;
  user-select: none;
}

button,
a {
  border: 0;
  color: inherit;
  font: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

.auth-gate {
  min-height: 100vh;
  padding: 24px;
  display: none;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
}

.auth-checking .auth-gate,
.auth-required .auth-gate {
  display: flex;
}

.auth-checking .app-shell,
.auth-checking .bottom-menu,
.auth-required .app-shell,
.auth-required .bottom-menu {
  display: none;
}

.auth-ready .auth-gate {
  display: none;
}

.auth-spinner {
  width: 42px;
  height: 42px;
  border: 4px solid rgba(255, 255, 255, 0.08);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.btn-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Auth main screen */
/* Auth main screen (merged below) */

.auth-visual {
  width: 260px;
  height: 260px;
  margin-bottom: 32px;
  position: relative;
}

.auth-static-icon {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes pulse-slow {
  0% { transform: scale(0.95); opacity: 0.7; }
  100% { transform: scale(1.05); opacity: 1; filter: drop-shadow(0 0 25px rgba(255, 255, 255, 0.2)); }
}

.auth-title {
  font-family: var(--f-heading);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.15;
  margin-top: 292px;
  margin-bottom: 12px;
}

.auth-subtitle {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  margin-bottom: 40px;
  opacity: 0.85;
}

.auth-methods {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-method-btn {
  width: 100%;
  min-height: 58px;
  padding: 16px 20px;
  border-radius: 20px;
  background: var(--text);
  color: var(--bg);
  font-size: 15px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.auth-method-btn:active {
  transform: scale(0.98);
}

.auth-method-btn:hover {
  opacity: 0.9;
}

.auth-method-tg {
  background: var(--surface);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-method-tg:hover {
  background: var(--surface-2);
  opacity: 1;
}

.auth-legal {
  margin-top: 28px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.6;
  opacity: 0.65;
}

.auth-legal a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 500;
}

/* Modal overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.65);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: modal-bg-in 0.25s ease-out;
}

@keyframes modal-bg-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-sheet {
  width: 100%;
  max-width: 460px;
  padding: 32px 28px;
  border-radius: 28px;
  background: var(--bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  animation: modal-slide-up 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-sheet-sm {
  max-width: 380px;
}

@keyframes modal-slide-up {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: background 0.18s, color 0.18s;
}

.modal-close:hover {
  background: transparent;
  color: var(--text);
}

.modal-header {
  text-align: center;
  margin-bottom: 24px;
}

.modal-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-header h2 {
  font-family: var(--f-heading);
  font-size: 24px;
  font-weight: 500;
  margin-bottom: 8px;
}

.modal-header p {
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.6;
}

/* Auth form (reused inside modals) */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-form + .auth-form {
  margin-top: 14px;
}

.auth-form label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.auth-form input {
  width: 100%;
  min-height: 58px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 18px;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 16px;
  outline: none;
}

.auth-form input:focus {
  border-color: rgba(255, 255, 255, 0.3);
}

.auth-message {
  min-height: 20px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.auth-message.is-error {
  color: var(--danger);
}

.app-shell {
  width: 100%;
  max-width: 600px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 64px 20px 118px;
}

.tab-view {
  display: none;
  animation: fade-in 0.22s ease-out;
}

.tab-view.is-active {
  display: block;
}

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

.intro {
  margin-bottom: 28px;
  text-align: center;
}

.intro.compact {
  margin-bottom: 20px;
}

.intro h1,
.intro h2,
.no-sub-content h1 {
  font-family: var(--f-heading);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.15;
  margin-bottom: 10px;
}

.intro h2 {
  font-size: 18px;
}

.intro p,
.no-sub-content p,
.news-card p {
  max-width: 340px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 400;
  line-height: 1.45;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  margin-bottom: 14px;
  padding: 5px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--accent);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.home-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 24px;
}

.top-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.account-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  font-family: var(--f-heading);
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
}

.account-status-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  background-color: var(--accent);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
  animation: pulse-dot-anim 1.5s infinite;
}

@keyframes pulse-dot-anim {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
  }
}

.home-greeting-section {
  text-align: left;
  margin-bottom: 28px;
}

.home-greeting-eyebrow {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block;
  margin-bottom: 4px;
}

.home-greeting-title {
  font-family: var(--f-heading);
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.15;
  margin: 0;
}

.home-status {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.status-card,
.news-card,
.summary,
.stat-card,
.info-block {
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.status-card {
  min-height: 140px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.status-card-main {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.card-icon-wrapper {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
}

.status-card-main .card-icon-wrapper {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.card-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.status-card-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.15;
}

.status-card-label {
  font-size: 9px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.3;
}

/* News Section styles */
.news-list-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}

.news-list-header h2 {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.news-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
}

.news-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  flex: 1;
}

.news-tag {
  font-size: 9px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.news-card strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-top: 2px;
}

.news-card p {
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.4;
  margin-top: 4px;
}

.news-action-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: all 0.2s ease;
  cursor: pointer;
  flex-shrink: 0;
}

.news-action-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(2px);
}

.stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 26px;
}

.step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
}

.step-dot.is-active {
  background: var(--accent);
  color: var(--accent-text);
}

.step-line {
  width: 36px;
  height: 2px;
  margin: 0 8px;
  background: var(--surface-2);
}

.step-line.is-active {
  background: var(--accent);
}

.connect-step {
  display: none;
}

.connect-step.is-active {
  display: block;
}

.platform-grid,
.pay-grid,
.buttons-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.platform-card,
.pay-card,
.menu-btn,
.main-download-btn,
.secondary-action,
.primary-action,
.text-link {
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, opacity 0.18s ease;
}

.platform-card,
.pay-card,
.menu-btn,
.main-download-btn {
  width: 100%;
  min-height: 68px;
  padding: 14px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
}

.platform-card:active,
.pay-card:active,
.menu-btn:active,
.main-download-btn:active,
.primary-action:active,
.secondary-action:active {
  transform: scale(0.98);
}

.platform-card.selected,
.pay-card.selected,
.plan-card.selected {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 
    0 8px 24px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.platform-icon {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
}

.platform-card.selected .platform-icon {
  background: rgba(255, 255, 255, 0.12);
  color: var(--accent);
}

.platform-card span:last-child {
  font-size: 15px;
  font-weight: 800;
}

.text-link {
  display: block;
  width: 100%;
  margin-top: 22px;
  padding: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.setup-group,
.group {
  margin-bottom: 28px;
}

.group-header {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.7px;
  text-align: center;
  text-transform: uppercase;
}



.alt-download-link {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.alt-download-link span {
  color: var(--soft);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.primary-action,
.secondary-action {
  width: 100%;
  padding: 16px;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  border: none;
}

.primary-action {
  background: var(--accent);
  color: var(--accent-text);
}

.primary-action:disabled {
  background: var(--surface);
  color: var(--muted);
  cursor: not-allowed;
}

.secondary-action {
  background: var(--surface-2);
  color: var(--text);
}

.connect-hint {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.link-box {
  min-height: 64px;
  padding: 8px 8px 8px 16px;
  border-radius: 18px;
  background: var(--surface);
  display: flex;
  align-items: center;
  gap: 10px;
}

.link-box code {
  min-width: 0;
  flex: 1;
  color: var(--soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-box button {
  flex: 0 0 auto;
  padding: 11px 14px;
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.no-sub-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 140px);
  text-align: center;
}

.no-sub-icon {
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.no-sub-icon svg {
  width: 48px;
  height: 48px;
  fill: currentColor;
}

.no-sub-content .primary-action {
  max-width: 260px;
  margin-top: 26px;
}

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

.plan-card {
  min-width: 0;
  min-height: 144px;
  padding: 16px 8px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
}

.plan-header,
.plan-save {
  font-size: 12px;
  font-weight: 800;
}

.plan-save {
  opacity: 0.72;
}

.plan-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0;
}

.plan-price small {
  font-size: 15px;
}

.plan-price em {
  width: 100%;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  opacity: 0.62;
}

.pay-card span {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.pay-card strong {
  font-size: 15px;
  font-weight: 800;
}

.pay-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.pay-card.selected small {
  color: rgba(255, 255, 255, 0.65);
}

.pay-icon-img {
  width: 52px;
  height: 52px;
  padding: 4px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  object-fit: contain;
}

.promo-block {
  display: flex;
  align-items: center;
  margin-top: 16px;
  margin-bottom: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 6px;
  gap: 8px;
}

.promo-input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 0 16px 3px 16px;
  margin: 0;
  color: #fff;
  outline: none;
  height: 48px;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

.promo-input::placeholder {
  font-family: var(--f) !important;
  font-size: var(--s-size) !important;
  font-weight: var(--s-weight) !important;
  color: rgba(255, 255, 255, 0.4);
}

.promo-input:focus {
  background: transparent;
}

.promo-btn {
  height: 48px;
  padding: 0 24px;
  margin: 0;
  border-radius: calc(var(--radius) - 6px);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.promo-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.promo-btn:active {
  transform: scale(0.96);
}

.promo-btn:disabled {
  opacity: 0.5;
  pointer-events: none;
}

.promo-msg {
  position: fixed;
  top: max(24px, env(safe-area-inset-top, 24px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  font-size: 13.5px;
  font-weight: 600;
  text-align: center;
  padding: 12px 24px;
  border-radius: 100px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  max-width: 90%;
  pointer-events: none;
  animation: auth-error-slide-down 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.promo-msg.is-hiding {
  animation: auth-error-slide-up 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.promo-msg.success {
  background: rgba(74, 222, 128, 0.12);
  border: 1px solid rgba(74, 222, 128, 0.2);
  color: #4ade80;
}

.promo-msg.error {
  background: rgba(255, 107, 107, 0.12);
  border: 1px solid rgba(255, 107, 107, 0.2);
  color: #ff6b6b;
}

.summary {
  margin-bottom: 20px;
  padding: 20px;
}

.sum-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sum-row span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.sum-row strong {
  font-size: 14px;
  font-weight: 800;
  text-align: right;
}

.sum-row.total {
  border-bottom: 0;
  padding-bottom: 0;
  padding-top: 16px;
  margin-top: 4px;
}

.sum-row.total span {
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
}

.sum-row.total strong {
  font-size: 25px;
}

.sum-old {
  margin-right: 7px;
  color: var(--muted);
  font-size: 15px;
  text-decoration: line-through;
}

.pay-hint {
  margin: 16px auto 34px;
  max-width: 390px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.6;
  text-align: center;
}

.pay-hint button {
  background: transparent;
  color: var(--soft);
  font-size: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.referral-block {
  padding-top: 4px;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.stat-card {
  padding: 20px 14px;
  text-align: center;
}

.stat-value {
  display: block;
  color: var(--accent);
  font-size: 26px;
  font-weight: 800;
}

.stat-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

#shareReferralBtn {
  margin-top: 12px;
}

.buttons-grid {
  margin-bottom: 22px;
}

.menu-btn {
  justify-content: center;
  min-height: 58px;
  background: var(--surface-2);
  font-size: 14px;
  font-weight: 800;
  text-align: center;
}

.toast {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 107, 107, 0.12);
  color: var(--danger);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.toast.floating {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  width: calc(100% - 32px);
  max-width: 400px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  margin-top: 0;
}

.bottom-menu {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 20;
  width: calc(100% - 32px);
  max-width: 440px;
  padding: 6px 12px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--bg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.menu-tab {
  flex: 1;
  height: 52px;
  border-radius: 18px;
  padding: 4px;
  background: transparent;
  border: 1px solid transparent;
  color: rgba(255, 255, 255, 0.45);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-tab[hidden] {
  display: none !important;
}

.menu-tab:active {
  transform: scale(0.94);
}

.menu-tab.is-active {
  background: transparent;
  color: var(--text);
  border-color: transparent;
}

.menu-tab.is-active svg {
  color: var(--text);
  transform: translateY(-1px);
}

.menu-tab svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  transition: all 0.2s ease;
}

.menu-tab span {
  display: block;
  font-family: var(--f);
  font-size: 7.5px;
  font-weight: 500;
  letter-spacing: 0.2px;
  text-transform: uppercase;
  transition: all 0.2s ease;
}

.menu-tab.is-active span {
  font-weight: 700;
  letter-spacing: 0.4px;
}

@media (max-width: 430px) {
  .app-shell {
    padding: 24px 14px 112px;
  }

  .intro h1,
  .no-sub-content h1 {
    font-size: 27px;
  }

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

  .plans-grid {
    gap: 8px;
  }

  .plan-card {
    min-height: 132px;
    padding: 14px 6px;
    border-radius: 19px;
  }

  .plan-price {
    font-size: 24px;
  }
}

@media (min-width: 720px) {
  /* Desktop styles for bottom-menu are inherited from the floating centered base rule */
}

/* ── Home Page Premium Widgets ── */

.featured-connect-card {
  width: 100%;
  min-height: 164px;
  padding: 22px 20px;
  border-radius: 24px;
  background: #ffffff;
  color: #000000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
}

.featured-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.featured-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 99px;
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: #000000;
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 12px;
}

.featured-title {
  font-family: var(--f-heading);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 6px;
}

.featured-subtitle {
  font-size: 11px;
  font-weight: 400;
  opacity: 0.68;
  line-height: 1.35;
  margin-bottom: 18px;
  max-width: 200px;
}

.featured-btn {
  background: #000000;
  color: #ffffff;
  padding: 9px 22px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
}

.featured-btn:active {
  transform: scale(0.95);
}

.featured-visual {
  flex: 0 0 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.featured-hero-img {
  width: 115px;
  height: 115px;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.18));
}

/* Traffic Stats Chart Widget */
.traffic-stats-card {
  padding: 22px 20px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.stats-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  flex: 1;
}

.stats-title {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.4px;
}

.stats-avg {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.stats-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stats-detail-item {
  font-size: 10.5px;
  color: var(--muted);
}

.stats-detail-item strong {
  color: var(--soft);
}

.stats-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 88px;
  padding-bottom: 12px;
}

.chart-bar {
  width: 12px;
  height: var(--height);
  background: repeating-linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0.06) 2px,
    rgba(255, 255, 255, 0.12) 2px,
    rgba(255, 255, 255, 0.12) 4px
  );
  border-radius: 6px 6px 0 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  position: relative;
}

.chart-bar span {
  font-size: 7.5px;
  font-weight: 600;
  color: var(--muted);
  position: absolute;
  bottom: -16px;
  left: 50%;
  transform: translateX(-50%);
}

.chart-bar.is-active {
  background: var(--accent);
  box-shadow: none;
}

.chart-bar.is-active span {
  color: var(--accent);
  font-weight: 700;
}

/* Referral Banner Card */
.referral-banner-card {
  padding: 22px 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.referral-banner-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.referral-banner-title {
  font-family: var(--f-heading);
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}

.referral-banner-subtitle {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.35;
  margin-bottom: 14px;
  max-width: 230px;
}

.referral-banner-btn {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  padding: 6px 14px;
  font-size: 10.5px;
  font-weight: 700;
  transition: all 0.2s ease;
}

.referral-banner-btn:active {
  transform: scale(0.96);
}

.referral-banner-avatars {
  flex: 0 0 auto;
}

.avatar-stack {
  display: flex;
  align-items: center;
}

.stack-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  color: var(--bg);
  margin-left: -10px;
  border: 2px solid var(--bg);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.stack-avatar:first-child {
  margin-left: 0;
}

.stack-avatar.stack-more {
  background: var(--surface-2);
  color: var(--muted);
  font-size: 8px;
  font-weight: 500;
}

/* ── News Carousel ── */
.news-carousel-container {
  padding: 22px 20px 14px 20px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  height: 122px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.news-carousel-slides {
  position: relative;
  flex: 1;
  width: 100%;
}

.news-slide {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.news-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.news-carousel-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: auto;
  padding-top: 10px;
}

.carousel-dots {
  display: flex;
  gap: 6px;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  cursor: pointer;
  transition: all 0.25s ease;
}

.dot:hover {
  background: rgba(255, 255, 255, 0.45);
}

.dot.is-active {
  background: var(--accent);
  transform: scale(1.25);
  box-shadow: none;
}

/* ── Unified Typography Design System (Max 3 Styles + 1 Menu Style) ── */

:root {
  --t-size: 16px;
  --t-weight: 700;
  --t-lh: 1.3;
  --t-ls: -0.2px;

  --s-size: 13px;
  --s-weight: 600;
  --s-lh: 1.35;
  --s-ls: 0px;

  --b-size: 11px;
  --b-weight: 400;
  --b-lh: 1.45;
  --b-ls: 0px;

  --m-size: 9px;
  --m-weight: 600;
  --m-ls: 0.1px;
}

/* 1. Large Titles / Headings / Values */
h1, h2, h3,
.auth-title,
.intro h1,
.intro h2,
.no-sub-content h1,
.status-card-value,
.news-slide strong,
.stat-value,
.plan-price,
.sum-row.total strong,
.referral-banner-title,
.group-header {
  font-family: var(--f-heading) !important;
  font-size: var(--t-size) !important;
  font-weight: var(--t-weight) !important;
  line-height: var(--t-lh) !important;
  letter-spacing: var(--t-ls) !important;
}

/* 2. Sub-headings / Badges / Action Buttons / Bold Labels */
.badge,
.news-tag,
.stats-title,
.stat-label,
.plan-header,
.plan-save,
.primary-action,
.secondary-action,
.os-continue-btn,
.os-instructions-btn span,
.promo-btn,
.promo-input,
.sum-row span,
.sum-row strong,
.sum-row.total span,
.pay-card span,
.pay-card strong,
.stats-avg,
.featured-badge,
.platform-card span:last-child,
.main-download-btn,
.link-box button,
.menu-btn,
.platform-icon {
  font-family: var(--f) !important;
  font-size: var(--s-size) !important;
  font-weight: var(--s-weight) !important;
  line-height: var(--s-lh) !important;
  letter-spacing: var(--s-ls) !important;
}

/* 3. Body text / Descriptions / Muted subtexts */
body,
p,
.auth-subtitle,
.auth-message,
.status-card-label,
.connect-hint,
.alt-download-link,
.pay-hint,
.referral-banner-subtitle,
.stats-detail-item,
.pay-card small,
code {
  font-family: var(--f) !important;
  font-size: var(--b-size) !important;
  font-weight: var(--b-weight) !important;
  line-height: var(--b-lh) !important;
  letter-spacing: var(--b-ls) !important;
}

/* 4. Bottom Navigation Menu Style */
.menu-tab span {
  font-family: var(--f) !important;
  font-size: var(--m-size) !important;
  font-weight: var(--m-weight) !important;
  letter-spacing: var(--m-ls) !important;
  text-transform: uppercase !important;
}

/* ── Settings / Info Tab ── */
.settings-section {
  margin-bottom: 24px;
}

.settings-section-title {
  color: rgba(255, 255, 255, 0.4);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 8px;
  padding-left: 16px;
  letter-spacing: 0.5px;
}

.settings-block {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.settings-rbody {
  min-height: 100vh;
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: var(--f);
  background: var(--bg);
  position: relative;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

input, button {
  font-family: inherit;
}

.settings-row {
  width: 100%;
  display: flex;
  align-items: center;
  padding: 14px 16px;
  background: transparent;
  color: var(--text);
  border: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}

.settings-row:active {
  background: rgba(255, 255, 255, 0.04);
}

.settings-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 14px;
}

.settings-arrow {
  margin-left: auto;
  color: var(--muted);
  font-size: 20px;
}

.settings-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.03);
  margin-left: 0;
}

/* --- AUTH REDESIGN STYLES (MINIMALISTIC) --- */
.auth-gate {
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-screen {
  width: 100%;
  max-width: 460px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  position: relative;
  animation: fade-in 0.4s ease-out;
}

.auth-title-large {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
  text-align: center;
  letter-spacing: -0.5px;
}

.auth-subtitle-new {
  font-size: 15px;
  color: var(--muted);
  text-align: center;
  margin-bottom: 32px;
}

.auth-form-new {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 0;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon svg.field-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--muted);
  pointer-events: none;
}

.input-with-icon input {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 16px 48px 16px 16px;
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  outline: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.input-with-icon input::placeholder {
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.4);
}

.input-with-icon input:focus {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
}

.password-toggle {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.password-toggle:hover {
  color: #fff;
}

.password-toggle svg {
  width: 20px;
  height: 20px;
}

.primary-action-new {
  background: #fff;
  color: #000;
  border: none;
  border-radius: 16px;
  padding: 16px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  width: 100%;
  transition: transform 0.1s, opacity 0.2s;
  margin-top: 8px;
}

.primary-action-new:active {
  transform: scale(0.98);
  opacity: 0.9;
}

.text-link-new {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: color 0.2s, text-decoration-color 0.2s;
}

.text-link-new:hover {
  color: #fff;
  text-decoration-color: rgba(255,255,255,0.3);
}

.auth-divider {
  width: 100%;
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  margin: 16px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-divider span {
  padding: 0 16px;
}

.auth-socials {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.social-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  border-radius: 16px;
  padding: 16px;
  font-size: 15px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  width: 100%;
  transition: background 0.2s;
  box-sizing: border-box;
}

.social-btn svg {
  width: 20px;
  height: 20px;
}

.social-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.auth-footer-text {
  text-align: center;
  cursor: pointer;
  padding: 0;
  margin-top: 24px;
  font-size: 15px;
  font-weight: 500;
}
.code-inputs {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 24px;
}
.code-box {
  width: 100%;
  aspect-ratio: 1;
  background: #1c1c1e;
  border: 1px solid #2c2c2e;
  border-radius: 12px;
  text-align: center;
  font-size: 24px;
  font-weight: 600;
  color: #fff;
  outline: none;
}
.code-box:focus {
  border-color: #555;
}
.back-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  cursor: pointer;
  position: absolute;
  top: 24px;
  left: 24px;
}
.back-btn svg {
  width: 20px;
  height: 20px;
}
.auth-error-text {
  position: fixed;
  top: max(24px, env(safe-area-inset-top, 24px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: rgba(255, 107, 107, 0.12);
  border: 1px solid rgba(255, 107, 107, 0.2);
  color: var(--danger);
  font-size: 13.5px;
  font-weight: 600;
  text-align: center;
  padding: 12px 24px;
  border-radius: 100px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  max-width: 90%;
  pointer-events: none;
  animation: auth-error-slide-down 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-error-text.is-hiding {
  animation: auth-error-slide-up 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes auth-error-slide-down {
  from {
    opacity: 0;
    transform: translate(-50%, -20px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@keyframes auth-error-slide-up {
  from {
    opacity: 1;
    transform: translate(-50%, 0);
  }
  to {
    opacity: 0;
    transform: translate(-50%, -20px);
  }
}
.center-text {
  text-align: center;
}

/* ── Admin Panel ────────────────────────────────────────────────────── */

.admin-role-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.admin-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 20px 16px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
  min-height: 110px;
}

.admin-card:active {
  transform: scale(0.97);
}

.admin-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}

.admin-card-icon {
  width: 24px;
  height: 24px;
  color: var(--accent);
  margin-bottom: 6px;
}

.admin-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.admin-card-desc {
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.3;
}

/* Admin Sub-views */
.admin-subview {
  animation: fade-in 0.22s ease-out;
}

.admin-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
  margin-bottom: 12px;
  background: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: none;
  cursor: pointer;
  transition: color 0.18s;
}

.admin-back-btn:hover {
  color: var(--text);
}

.admin-search-bar {
  margin-bottom: 16px;
  position: relative;
}

.admin-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--muted);
  pointer-events: none;
}

.admin-search-bar input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px 0 40px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.18s;
}

.admin-search-bar input:focus {
  border-color: rgba(255, 255, 255, 0.25);
}

.admin-search-bar input::placeholder {
  color: var(--muted);
}

/* Admin List Items */
.admin-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.15s;
}

.admin-list-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.admin-list-item-info {
  flex: 1;
  min-width: 0;
}

.admin-list-item-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-list-item-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-list-item-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.admin-action-btn {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}

.admin-action-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.admin-action-btn.danger {
  background: rgba(255, 107, 107, 0.15);
  color: var(--danger);
}

.admin-action-btn.danger:hover {
  background: rgba(255, 107, 107, 0.25);
}

.admin-add-btn {
  padding: 6px 14px;
  border-radius: 12px;
  background: var(--text);
  color: var(--bg);
  font-size: 13px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s;
}

.admin-add-btn:hover {
  opacity: 0.85;
}

/* Permissions checkboxes */
.admin-permissions-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 12px;
  margin-top: 4px;
}

.admin-permissions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.admin-perm-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
}

.admin-perm-item:has(input:checked) {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
}

.admin-perm-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #fff;
  cursor: pointer;
  flex-shrink: 0;
}

/* Admin Stats Grid */
.admin-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.admin-stat-card {
  padding: 20px 16px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

.admin-stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 4px;
}

.admin-stat-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
}

/* Admin Select */
.admin-select-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}

.admin-select {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.admin-select:focus {
  border-color: rgba(255, 255, 255, 0.25);
}

/* Admin quick buttons */
.admin-quick-btn {
  padding: 8px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.admin-quick-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* Admin form */
.admin-form {
  display: flex;
  flex-direction: column;
}

/* Admin Pagination */
.admin-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.admin-page-btn {
  padding: 6px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.admin-page-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.admin-page-btn.is-active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.admin-page-btn:disabled {
  opacity: 0.3;
  pointer-events: none;
}

/* Admin placeholder */
.admin-placeholder {
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.1);
}

/* Sub status badge in user list */
.admin-sub-badge {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.admin-sub-badge.active {
  background: rgba(52, 199, 89, 0.15);
  color: #34c759;
}

.admin-sub-badge.expired {
  background: rgba(255, 107, 107, 0.15);
  color: var(--danger);
}

/* Promo type badges */
.admin-promo-type {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

/* Manager perms tags */
.admin-perm-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.admin-perm-tag {
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

/* Empty state */
.admin-empty {
  padding: 32px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.1);
  transition: .3s;
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-slider {
  background-color: var(--accent);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

.toggle-switch input:disabled + .toggle-slider {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Rich Text Editor */
.editor-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 14px;
  transition: .2s;
  font-family: inherit;
}
.editor-btn:hover {
  background: rgba(255,255,255,0.1);
  color: var(--text);
}
#mailMessageEditor:empty:before {
  content: "Текст сообщения...";
  color: var(--muted);
  pointer-events: none;
  display: block; /* For Firefox */
}
#mailMessageEditor a {
  color: var(--accent);
  text-decoration: underline;
}

#tab-connect.is-active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: calc(100vh - 120px);
  padding-top: 8px;
}

#tab-connect .connect-shell {
  width: 100%;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

#tab-connect .stepper {
  margin-bottom: 24px;
}

#tab-connect .connect-step.is-active {
  display: flex;
  flex-direction: column;
}

#tab-connect .intro {
  text-align: center;
  margin-bottom: 32px;
}

#tab-connect .intro h1 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 8px;
}

#tab-connect .intro p {
  font-size: 14px;
  color: var(--muted);
  margin: 0 auto;
  max-width: 100%;
  text-align: center;
}

#tab-connect .intro h1 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 8px;
}

/* 2-Column OS Grid Design */
.os-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

.os-card {
  position: relative;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 20px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #fff;
  text-align: center;
}

.os-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.os-card.selected {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 
    0 8px 24px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.os-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.6);
  transition: all 0.2s ease;
}

.os-card.selected .os-icon {
  background: var(--accent);
  color: var(--accent-text);
}

.os-icon svg {
  width: 24px;
  height: 24px;
}

.os-name {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
}

.os-card.selected .os-name {
  color: #fff;
}

.os-check {
  display: none !important;
}

.os-card.selected .os-check {
  transform: scale(1);
}

.os-instructions-btn {
  margin: 12px auto 0;
  width: 100%;
  max-width: 500px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: all 0.2s ease;
}

.os-instructions-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.os-instructions-btn .btn-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.os-instructions-btn span {
  flex: 1;
  text-align: left;
}

.os-instructions-btn .chevron {
  opacity: 0.5;
}

.os-continue-btn {
  margin: 12px auto 0;
  width: 100%;
  max-width: 500px;
  background: var(--accent);
  border: none;
  border-radius: 16px;
  padding: 16px;
  color: var(--accent-text);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  opacity: 0.4;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.os-continue-btn.ready {
  opacity: 1;
}

.os-continue-btn.ready:active {
  transform: scale(0.98);
}

.qr-wrapper {
  position: relative;
  width: 100%;
  border-radius: 18px;
  overflow: hidden;
  background: transparent;
  margin-top: 16px;
  height: 160px;
  transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.qr-wrapper.expanded {
  height: auto;
}

.qr-container {
  width: 100%;
  padding: 0;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
}

.qr-container img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  image-rendering: pixelated;
  border-radius: 18px;
}

.qr-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, #000000 80%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 8px;
}

.qr-wrapper.expanded .qr-overlay {
  display: none;
}

.qr-expand-btn {
  background: var(--surface);
  color: var(--text);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: transform 0.2s;
}

.qr-expand-btn:active {
  transform: scale(0.95);
}

