:root {
  color-scheme: dark;
  --bg: #0b1320;
  --bg-soft: #101b2c;
  --surface: rgba(18, 28, 44, 0.86);
  --surface-strong: rgba(22, 34, 53, 0.94);
  --surface-accent: rgba(24, 39, 62, 0.92);
  --line: rgba(151, 177, 214, 0.16);
  --line-strong: rgba(125, 170, 255, 0.32);
  --text: #e9eef8;
  --muted: #98a6be;
  --accent: #6e9df6;
  --accent-deep: #4e7fdb;
  --accent-soft: rgba(110, 157, 246, 0.18);
  --teal: #49b0c5;
  --success: #42b883;
  --danger: #ef6a6a;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  --shadow-soft: 0 16px 34px rgba(0, 0, 0, 0.2);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Manrope, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 14% 12%, rgba(110, 157, 246, 0.2), transparent 24%),
    radial-gradient(circle at 86% 18%, rgba(73, 176, 197, 0.14), transparent 20%),
    linear-gradient(180deg, #0b1320 0%, #0f1828 45%, #121d2f 100%);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(163, 184, 215, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(163, 184, 215, 0.05) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(circle at center, black 58%, transparent 100%);
  pointer-events: none;
  opacity: 0.4;
}

.page-noise,
.orb {
  position: fixed;
  pointer-events: none;
}

.page-noise {
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.06), transparent 22%),
    radial-gradient(circle at 80% 30%, rgba(255, 255, 255, 0.04), transparent 26%);
  opacity: 1;
}

.orb {
  border-radius: 999px;
  filter: blur(14px);
  opacity: 0.68;
}

.orb-one {
  width: 240px;
  height: 240px;
  top: 82px;
  left: -72px;
  background: rgba(110, 157, 246, 0.18);
}

.orb-two {
  width: 200px;
  height: 200px;
  right: 4%;
  top: 140px;
  background: rgba(73, 176, 197, 0.14);
}

.orb-three {
  width: 180px;
  height: 180px;
  left: 38%;
  bottom: 10%;
  background: rgba(124, 146, 184, 0.14);
}

.page-shell {
  position: relative;
  width: min(2400px, calc(100% - 32px));
  margin: 16px auto 34px;
  display: grid;
  gap: 16px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(240px, 18vw) minmax(0, 1fr) minmax(240px, 18vw);
  gap: 16px;
  align-items: start;
}

.auth-grid,
.app-center,
.history-list,
.admin-users,
.admin-slot-grid,
.ad-rail,
.topup-grid {
  display: grid;
  gap: 18px;
}

.panel,
.benefit-card,
.info-item,
.summary-card,
.estimate-card,
.topup-card,
.plan-compare-card,
.stat-card,
.history-item,
.admin-user-card,
.admin-slot-card,
.side-ad-card,
.empty-card {
  background: linear-gradient(180deg, rgba(18, 28, 44, 0.9), rgba(15, 24, 38, 0.9));
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.panel,
.benefit-card,
.info-item,
.summary-card,
.estimate-card,
.topup-card,
.plan-compare-card,
.stat-card,
.history-item,
.admin-user-card,
.admin-slot-card,
.side-ad-card,
.empty-card {
  animation: rise-in 0.6s ease both;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.panel {
  padding: 24px;
}

h1,
h2,
h3,
strong {
  font-family: "Space Grotesk", Manrope, sans-serif;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  color: #9fc2ff;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 11px;
  font-weight: 800;
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
  opacity: 0.55;
}

.helper-text,
.hero-text,
.topbar-text,
.auth-panel-copy p,
.side-ad-copy p,
.plan-compare-card p,
.promo-block p,
.terms-copy p,
.profile-mini-ident small,
.summary-card small {
  color: var(--muted);
}

.topbar {
  display: grid;
  grid-template-columns: minmax(250px, 310px) minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}

.slim-topbar {
  padding: 10px 12px;
}

.brand-block {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.brand-home {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  align-content: center;
  min-height: 100%;
  padding: 4px 8px;
  border-radius: 18px;
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.brand-home:hover {
  background: rgba(255, 255, 255, 0.025);
  transform: translateY(-1px);
}

.brand-block h1 {
  font-size: clamp(1.05rem, 1.28vw, 1.72rem);
  line-height: 1;
  letter-spacing: -0.06em;
  max-width: none;
  white-space: nowrap;
  margin-inline: auto;
}

.topbar-text {
  max-width: 24ch;
  font-size: 0.82rem;
  line-height: 1.35;
}

.topbar-actions {
  display: flex;
  gap: 8px;
  align-items: stretch;
  min-width: 0;
}

.profile-mini {
  min-width: 0;
  width: 100%;
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(145deg, rgba(22, 34, 54, 0.94), rgba(18, 28, 44, 0.92));
  box-shadow: var(--shadow-soft);
}

.profile-mini-head,
.history-head,
.task-head,
.admin-user-top,
.admin-slot-head,
.compact-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.profile-mini-ident {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.profile-mini-ident strong {
  font-size: 1rem;
  line-height: 1.02;
  word-break: break-word;
}

.profile-mini-ident small {
  font-size: 0.8rem;
}

.profile-mini-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.topbar-meta-strip {
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(151, 177, 214, 0.12);
}

.topbar-meta-strip small {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-mini-grid,
.hero-summary-grid,
.auth-benefits-grid,
.info-list,
.estimate-grid,
.stats-grid,
.task-grid,
.selectors,
.plans-compare-grid,
.admin-settings-grid {
  display: grid;
  gap: 12px;
}

.topbar-stats-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.topbar-stats-grid > div,
.summary-card,
.benefit-card,
.info-item,
.estimate-card,
.stat-card {
  min-width: 0;
}

.topbar-stats-grid > div {
  display: grid;
  align-content: space-between;
  min-height: 76px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(151, 177, 214, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.topbar-stats-grid .wide-card {
  grid-column: span 1;
}

.topbar-stats-grid span,
.profile-mini-grid span,
.summary-card span,
.benefit-card span,
.info-item span,
.estimate-card span,
.stat-card span,
.history-title-block span,
.history-meta-block span,
.admin-user-top span,
.admin-user-meta span,
.field span,
.plan-badge,
.benefit-label,
.topup-card-label,
.topup-tag,
.side-ad-badge,
.admin-slot-card label,
.toggle-row {
  color: var(--muted);
  font-size: 11px;
}

.topbar-stats-grid strong,
.summary-card strong,
.benefit-card strong,
.info-item strong,
.estimate-card strong,
.stat-card strong {
  display: block;
  font-size: clamp(0.95rem, 1.2vw, 1.45rem);
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  word-break: break-word;
}

#topbarDaily {
  font-size: clamp(0.92rem, 1.05vw, 1.3rem);
}

#topbarQueueLabel {
  line-height: 1.08;
}

.status-badge,
.hero-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(125, 170, 255, 0.24);
  background: rgba(110, 157, 246, 0.1);
  color: #d4e4ff;
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
}

.danger-badge {
  color: var(--danger);
  border-color: rgba(239, 106, 106, 0.24);
  background: rgba(239, 106, 106, 0.08);
}

button,
.button,
input,
select,
textarea {
  font: inherit;
}

button,
.button {
  min-height: 52px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 16px;
  cursor: pointer;
  font-weight: 800;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

button:hover,
.button:hover {
  transform: translateY(-1px);
}

button:disabled,
.button:disabled {
  opacity: 0.58;
  cursor: default;
  transform: none;
}

.primary,
.button {
  color: #f5f8ff;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  box-shadow: 0 14px 34px rgba(78, 127, 219, 0.24);
}

.ghost {
  color: var(--text);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: none;
}

.danger {
  color: var(--danger);
  border-color: rgba(200, 79, 61, 0.22);
  background: rgba(200, 79, 61, 0.08);
  box-shadow: none;
}

.small {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 0.82rem;
}

.compact-logout {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 0.78rem;
}

input,
select,
textarea {
  width: 100%;
  min-height: 56px;
  padding: 0 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

textarea {
  min-height: 100px;
  padding: 14px 16px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(125, 170, 255, 0.52);
  box-shadow: 0 0 0 4px rgba(110, 157, 246, 0.14);
  background: rgba(255, 255, 255, 0.07);
}

select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--accent-deep) 50%),
    linear-gradient(135deg, var(--accent-deep) 50%, transparent 50%);
  background-position:
    calc(100% - 22px) calc(50% - 3px),
    calc(100% - 16px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 42px;
}

select option {
  background: #162338;
  color: #e9eef8;
}

.auth-grid {
  grid-template-columns: minmax(0, 1.06fr) minmax(360px, 0.94fr);
}

.auth-copy,
.auth-panel,
.hero-panel,
.input-priority-panel,
.monetization-panel,
.history-panel,
.admin-panel,
.compact-ad-panel {
  display: grid;
  gap: 18px;
}

.auth-copy {
  align-content: center;
  justify-items: center;
  text-align: center;
}

.auth-copy > * {
  width: min(100%, 980px);
}

.auth-copy h2,
.hero-copy h2 {
  font-size: clamp(1.55rem, 2.2vw, 2.7rem);
  line-height: 1;
  letter-spacing: -0.05em;
  max-width: 13ch;
  margin-inline: auto;
}

.auth-benefits-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.info-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.benefit-card,
.info-item,
.summary-card,
.estimate-card,
.topup-card,
.plan-compare-card,
.stat-card,
.side-ad-card,
.empty-card,
.history-item,
.admin-user-card,
.admin-slot-card {
  padding: 18px;
}

.benefit-card,
.info-item,
.summary-card,
.estimate-card,
.stat-card {
  display: grid;
  gap: 8px;
  align-content: start;
}

.benefit-card {
  min-height: 168px;
}

.benefit-card-premium,
.plan-premium,
.topup-card-featured {
  border-color: var(--line-strong);
  background:
    radial-gradient(circle at top right, rgba(110, 157, 246, 0.16), transparent 40%),
    linear-gradient(180deg, rgba(22, 34, 54, 0.95), rgba(18, 28, 44, 0.9));
}

.auth-panel {
  align-content: start;
}

.auth-panel-copy {
  display: grid;
  gap: 8px;
}

.auth-copy .eyebrow,
.brand-home .eyebrow {
  justify-content: center;
  margin-inline: auto;
}

.auth-copy .hero-text,
.brand-home .topbar-text {
  max-width: 26ch;
  margin-inline: auto;
}

.auth-copy .hero-text {
  max-width: 56ch;
}

.auth-copy .auth-benefits-grid,
.auth-copy .info-list {
  width: 100%;
}

.auth-copy .benefit-card,
.auth-copy .info-item {
  text-align: left;
}

.auth-panel-copy h3 {
  font-size: clamp(1.4rem, 2vw, 2rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 6px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  width: 100%;
  max-width: 320px;
}

.tab-btn {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  color: #c5d3ea;
  border: 1px solid transparent;
  box-shadow: none;
}

.tab-btn.active {
  color: #f5f8ff;
  background: linear-gradient(135deg, rgba(110, 157, 246, 0.26), rgba(78, 127, 219, 0.34));
  border-color: rgba(125, 170, 255, 0.34);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form label,
.field,
.admin-slot-card label,
.terms-check {
  display: grid;
  gap: 8px;
  min-width: 0;
  font-weight: 600;
}

.hero-chips,
.support-actions,
.premium-actions,
.topup-card-actions,
.actions,
.admin-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.topup-card-actions .button[data-copied="true"],
.support-actions .button[data-copied="true"],
.premium-actions .button[data-copied="true"] {
  border-color: rgba(66, 184, 131, 0.45);
  background: linear-gradient(135deg, rgba(66, 184, 131, 0.24), rgba(53, 138, 104, 0.34));
  color: #f4fffb;
}

.topbar-mirror {
  display: none !important;
}

.input-row,
.admin-toolbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.input-row-large input {
  min-height: 62px;
  font-size: 1rem;
}

.video-card {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.video-preview img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  min-height: clamp(220px, 24vw, 340px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.video-meta,
.video-meta-top,
.section-head,
.history-title-block,
.history-meta-block {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.video-meta-top h3,
.task-head h3,
.history-title-block strong,
.admin-user-top strong {
  font-size: clamp(1.35rem, 1.8vw, 2rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
  word-break: break-word;
}

.meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.meta-list span,
.topup-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(151, 177, 214, 0.14);
}

.selectors {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.estimate-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.task-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.task-grid > div {
  min-width: 0;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.task-grid strong {
  display: block;
  font-size: 1rem;
  line-height: 1.45;
  word-break: break-word;
}

.progress-wrap {
  margin-top: 4px;
}

.progress-bar {
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.75);
}

.progress-bar div {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--teal) 0%, var(--accent) 100%);
  transition: width 0.3s ease;
}

.history-item {
  display: grid;
  grid-template-columns: 1.35fr repeat(3, minmax(0, 0.76fr)) auto;
  gap: 12px;
  align-items: center;
}

.history-panel {
  min-height: 224px;
}

.history-actions-block {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.plans-compare-grid {
  grid-template-columns: 0.92fr 1.08fr;
  align-items: stretch;
}

.plan-compare-card {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 100%;
}

.plan-compare-card ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.plan-compare-card strong {
  font-size: clamp(1.8rem, 2.4vw, 2.8rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.topup-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.topup-card {
  display: grid;
  gap: 10px;
  min-height: 200px;
  align-content: start;
}

.topup-card strong {
  font-size: clamp(1.8rem, 2.4vw, 2.6rem);
  line-height: 1;
}

.topup-card small {
  font-size: 1rem;
  color: var(--muted);
}

.topup-tag {
  width: fit-content;
  color: var(--accent-deep);
  font-weight: 800;
}

.promo-block {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.stats-grid.compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-settings-card {
  padding: 14px;
  background: rgba(255, 255, 255, 0.02);
  box-shadow: none;
}

.admin-settings-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.settings-field-card,
.settings-actions-card {
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  padding: 12px;
}

.settings-field-card label {
  display: grid;
  gap: 8px;
}

.settings-field-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.settings-actions-card {
  display: grid;
  align-items: end;
}

.settings-actions-card .primary {
  width: 100%;
}

.admin-user-card {
  display: grid;
  gap: 14px;
}

.admin-user-top > div,
.admin-slot-head {
  min-width: 0;
}

.admin-user-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.primary-actions-row,
.danger-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.danger-actions-row {
  padding-top: 6px;
  border-top: 1px solid rgba(126, 97, 68, 0.12);
}

.admin-slot-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-slot-card {
  display: grid;
  gap: 10px;
}

.toggle-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.toggle-row input {
  width: auto;
  min-height: auto;
}

.ad-rail {
  position: sticky;
  top: 18px;
  grid-template-columns: 1fr;
  gap: 12px;
  align-self: start;
  height: calc(100vh - 36px);
}

.side-ad-card {
  display: grid;
  gap: 10px;
  min-height: 0;
  height: calc((100vh - 60px) / 3);
  padding: 14px;
  align-content: start;
  overflow: hidden;
}

.side-ad-card img,
.side-ad-empty {
  width: 100%;
  aspect-ratio: 1 / 1.18;
  min-height: 0;
  height: min(58%, 212px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  object-fit: cover;
  background: rgba(255, 255, 255, 0.03);
}

.side-ad-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
}

.side-ad-badge {
  width: fit-content;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(110, 157, 246, 0.1);
  border: 1px solid rgba(125, 170, 255, 0.16);
}

.side-ad-copy {
  display: grid;
  gap: 4px;
  min-height: 0;
}

.side-ad-copy strong {
  font-size: 0.96rem;
  line-height: 1.15;
}

.side-ad-copy p {
  font-size: 0.84rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.side-ad-card .button.small {
  min-height: 36px;
  font-size: 0.76rem;
}

.terms-check {
  grid-template-columns: auto 1fr;
  align-items: start;
  font-weight: 500;
  color: var(--text);
}

.terms-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
  border-radius: 6px;
  box-shadow: none;
  background: transparent;
  margin-top: 2px;
}

.terms-details {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  padding: 14px 16px;
}

.auth-terms-details {
  margin-top: -2px;
}

.terms-details summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--text);
}

.terms-copy {
  display: grid;
  gap: 10px;
  padding-top: 12px;
}

.auth-terms-details .terms-copy {
  max-height: 170px;
  overflow: auto;
  padding-right: 8px;
}

.side-ad-card.placeholder {
  opacity: 0.82;
}

.empty-card {
  text-align: center;
  color: var(--muted);
}

.error,
.helper-text[data-kind="error"] {
  color: var(--danger);
}

.helper-text[data-kind="success"] {
  color: var(--success);
}

.hidden {
  display: none !important;
}

@media (max-width: 1500px) {
  .workspace {
    grid-template-columns: minmax(220px, 17vw) minmax(0, 1fr) minmax(220px, 17vw);
  }

  .topup-grid,
  .admin-settings-grid,
  .topbar-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar-stats-grid .wide-card {
    grid-column: span 2;
  }

  .side-ad-card img,
  .side-ad-empty {
    height: 220px;
  }

  .side-ad-card {
    height: auto;
  }
}

@media (min-width: 1800px) {
  .page-shell {
    width: calc(100% - 40px);
  }

  .workspace {
    grid-template-columns: minmax(260px, 16vw) minmax(0, 1fr) minmax(260px, 16vw);
  }
}

@media (max-width: 1280px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .ad-rail {
    position: static;
    height: auto;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ad-rail-left {
    order: 2;
  }

  .app-center {
    order: 1;
  }

  .ad-rail-right {
    order: 3;
  }

  .auth-grid,
  .video-card,
  .selectors,
  .estimate-grid,
  .task-grid,
  .plans-compare-grid,
  .admin-slot-grid,
  .admin-settings-grid,
  .history-item,
  .stats-grid,
  .stats-grid.compact,
  .auth-benefits-grid,
  .info-list,
  .compact-summary-grid,
  .topup-grid {
    grid-template-columns: 1fr;
  }

  .summary-card.emphasis {
    grid-column: span 1;
  }

  .topbar,
  .history-head,
  .task-head,
  .admin-user-top,
  .compact-head,
  .promo-block {
    flex-direction: column;
  }

  .topbar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .input-row,
  .admin-toolbar {
    grid-template-columns: 1fr;
  }

  .brand-home {
    padding: 0;
  }
}

.admin-jumpbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0 18px;
}

.topup-copy {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.92rem;
  line-height: 1.45;
}

.store-section {
  display: grid;
  gap: 14px;
}

.store-stack,
#topupPackages {
  grid-template-columns: 1fr;
  gap: 26px;
}

.store-grid,
#topupPackages .store-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.store-section-head {
  display: grid;
  gap: 4px;
}

.store-section-head strong {
  font-size: 1.05rem;
}

.store-section-head span {
  color: var(--text-soft);
  font-size: 0.92rem;
}

.site-footer,
.site-footer-grid,
.site-footer-brand,
.site-footer-links,
.footer-faq,
.footer-faq-head {
  display: grid;
  gap: 16px;
}

.site-footer {
  padding: 28px 30px;
}

.site-footer-grid {
  grid-template-columns: minmax(0, 1.35fr) repeat(2, minmax(220px, 1fr));
  align-items: start;
}

.site-footer-brand h3,
.footer-faq-head h3 {
  font-size: clamp(1.25rem, 1.6vw, 1.8rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.site-footer-brand p,
.footer-sidecopy,
.footer-legal span,
.faq-item p {
  color: var(--muted);
}

.site-footer-links a {
  width: fit-content;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease, transform 0.2s ease;
}

.site-footer-links a:hover {
  color: #b8d1ff;
  transform: translateX(2px);
}

.footer-badges,
.footer-actions,
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-badge {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(125, 170, 255, 0.2);
  background: rgba(255, 255, 255, 0.035);
  color: #dbe7ff;
  font-size: 0.92rem;
  font-weight: 600;
}

.footer-faq {
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.faq-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.faq-item {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.028);
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  font-family: "Space Grotesk", Manrope, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item p {
  margin: 10px 0 0;
  font-size: 0.94rem;
}

.footer-legal {
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.footer-legal strong {
  font-size: 1rem;
}

@media (max-width: 1180px) {
  .store-grid,
  #topupPackages .store-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer-brand {
    grid-column: 1 / -1;
  }

  .faq-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .page-shell {
    width: calc(100% - 16px);
    margin: 10px auto 28px;
    gap: 14px;
  }

  .panel {
    padding: 18px;
    border-radius: 24px;
  }

  .brand-block h1,
  .auth-copy h2,
  .hero-copy h2 {
    max-width: none;
  }

  .profile-mini {
    min-width: 0;
    width: 100%;
  }

  .topbar-actions {
    width: 100%;
    flex-direction: column;
  }

  .topbar-stats-grid,
  .admin-slot-grid,
  .ad-rail {
    grid-template-columns: 1fr;
  }

  .store-grid,
  #topupPackages .store-grid {
    grid-template-columns: 1fr;
  }

  .topbar-stats-grid .wide-card {
    grid-column: span 1;
  }

  .site-footer {
    padding: 22px 18px;
  }

  .site-footer-grid,
  .faq-list {
    grid-template-columns: 1fr;
  }

  .footer-legal {
    align-items: flex-start;
  }
}
