:root {
  --bg: #09111b;
  --bg-elev: #101b28;
  --line: rgba(125, 164, 198, 0.18);
  --line-strong: rgba(125, 164, 198, 0.34);
  --text: #eff6ff;
  --muted: #9eb2c6;
  --accent: #48c2ff;
  --accent-strong: #24a8ea;
  --green: #4bd18f;
  --danger: #ff6d6d;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top, rgba(72, 194, 255, 0.16), transparent 28%),
    linear-gradient(180deg, #07101a, #0a1320 42%, #0b1521);
  color: var(--text);
  font-family: "Segoe UI", Arial, sans-serif;
}

body {
  padding: 20px 14px 32px;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.cabinet-app {
  max-width: 760px;
  margin: 0 auto;
}

.shell-loader,
.empty-note {
  padding: 28px 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(16, 27, 40, 0.72);
  box-shadow: var(--shadow);
  color: var(--muted);
}

.page-stack {
  display: grid;
  gap: 14px;
}

.hero-card,
.card,
.auth-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(16, 27, 40, 0.84);
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 22px 20px;
}

.hero-top,
.card-head,
.row-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(72, 194, 255, 0.22), rgba(36, 168, 234, 0.1));
  border: 1px solid var(--line-strong);
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.06em;
}

.brand-title {
  margin: 0;
  font-size: 26px;
  line-height: 1.05;
}

.brand-subtitle,
.muted,
.card-subtitle,
.hint {
  color: var(--muted);
}

.hero-actions,
.button-grid,
.plan-grid,
.info-grid {
  display: grid;
  gap: 10px;
}

.hero-actions {
  margin-top: 18px;
}

.button-grid.two,
.info-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.plan-grid {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.card,
.auth-card {
  padding: 18px;
}

.card-title,
.section-title {
  margin: 0;
  font-size: 19px;
}

.auth-card {
  padding: 22px 18px;
}

.field {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.auth-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  color: var(--muted);
}

.checkbox-control {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.debug-block {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px dashed rgba(255, 195, 90, 0.4);
  background: rgba(255, 195, 90, 0.08);
}

.debug-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffd27c;
}

.debug-code {
  margin-top: 8px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.input {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  padding: 14px 16px;
  color: var(--text);
  background: rgba(7, 16, 26, 0.94);
}

.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(72, 194, 255, 0.12);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  border: 1px solid transparent;
  border-radius: 16px;
  padding: 0 16px;
  cursor: pointer;
  transition: transform 0.14s ease, background 0.14s ease, border-color 0.14s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
  color: #031019;
  font-weight: 700;
}

.btn-secondary {
  background: rgba(19, 34, 51, 0.92);
  border-color: var(--line-strong);
  color: var(--text);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--muted);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(7, 16, 26, 0.6);
}

.pill.success {
  color: #bff4d7;
  border-color: rgba(75, 209, 143, 0.28);
  background: rgba(75, 209, 143, 0.12);
}

.notice,
.error {
  margin-top: 14px;
  border-radius: 16px;
  padding: 12px 14px;
}

.notice {
  background: rgba(72, 194, 255, 0.12);
  border: 1px solid rgba(72, 194, 255, 0.24);
}

.error {
  background: rgba(255, 109, 109, 0.12);
  border: 1px solid rgba(255, 109, 109, 0.24);
  color: #ffd2d2;
}

.info-tile,
.plan-tile {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  background: rgba(11, 21, 33, 0.82);
}

.tile-label {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 6px;
}

.tile-value {
  font-size: 18px;
  font-weight: 700;
}

.plan-price {
  font-size: 22px;
  font-weight: 800;
  margin: 8px 0 2px;
}

.plan-meta {
  color: var(--muted);
  font-size: 14px;
}

.tiny {
  font-size: 13px;
}

@media (max-width: 640px) {
  body {
    padding: 16px 12px 28px;
  }

  .hero-card,
  .card,
  .auth-card {
    border-radius: 20px;
  }

  .brand-title {
    font-size: 23px;
  }

  .button-grid.two,
  .info-grid {
    grid-template-columns: 1fr;
  }
}
