:root {
  --bg: #0f1419;
  --surface: #1a2332;
  --border: #2d3a4f;
  --text: #e7ecf3;
  --muted: #8b9cb3;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --success: #22c55e;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.25rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  margin-top: 1.5rem;
}

h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.subtitle {
  color: var(--muted);
  margin-bottom: 1.5rem;
}

label {
  display: block;
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

input[type="email"],
input[type="password"] {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
}

input[type="email"]:focus,
input[type="password"]:focus {
  outline: none;
  border-color: var(--accent);
}

.btn {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.75rem 1.5rem;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.btn:hover {
  background: var(--accent-hover);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-block {
  width: 100%;
  text-align: center;
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.plan-card h2 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.plan-desc {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.steps {
  margin: 0.5rem 0 0 1.25rem;
  color: var(--muted);
}

.steps li {
  margin: 0.35rem 0;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.stat {
  background: var(--bg);
  border-radius: 12px;
  padding: 1rem;
  border: 1px solid var(--border);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-value {
  font-size: 1.125rem;
  font-weight: 600;
  margin-top: 0.25rem;
}

.status-active {
  color: var(--success);
}

.sub-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  word-break: break-all;
  font-family: monospace;
  font-size: 0.8125rem;
  margin: 1rem 0;
}

.qr-wrap {
  text-align: center;
  margin: 1.5rem 0;
}

.qr-wrap img {
  border-radius: 12px;
  background: white;
  padding: 8px;
}

.clients {
  margin-top: 1.5rem;
}

.clients h3 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.clients ul {
  list-style: none;
  color: var(--muted);
}

.clients li {
  padding: 0.25rem 0;
}

.footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.8125rem;
  margin-top: 2rem;
}

/* ─── Landing (яркая тема) ─────────────────────────────────── */

.landing {
  --bg: #12082a;
  --surface: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.18);
  --text: #ffffff;
  --muted: #ddd6fe;
  --accent: #22d3ee;
  --accent-hover: #06b6d4;
  --accent-2: #f472b6;
  --accent-3: #a78bfa;
  --success: #4ade80;

  background:
    radial-gradient(circle at 20% 10%, rgba(244, 114, 182, 0.35), transparent 40%),
    radial-gradient(circle at 80% 0%, rgba(34, 211, 238, 0.3), transparent 45%),
    radial-gradient(circle at 50% 100%, rgba(167, 139, 250, 0.25), transparent 50%),
    linear-gradient(160deg, #1e0b4b 0%, #12082a 45%, #0c1445 100%);
  position: relative;
  overflow-x: hidden;
}

.landing-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.landing-glow--1 {
  width: 320px;
  height: 320px;
  top: -80px;
  left: -60px;
  background: rgba(244, 114, 182, 0.45);
}

.landing-glow--2 {
  width: 380px;
  height: 380px;
  top: 120px;
  right: -100px;
  background: rgba(34, 211, 238, 0.35);
}

.landing-container {
  position: relative;
  z-index: 1;
  max-width: 960px;
}

.landing .hero {
  text-align: center;
  margin-bottom: 0.5rem;
}

.landing .hero-badge {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.25), rgba(244, 114, 182, 0.25));
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.landing h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  background: linear-gradient(90deg, #ffffff 0%, #22d3ee 45%, #f472b6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.75rem;
}

.landing .hero-subtitle {
  font-size: 1.05rem;
  color: #e9d5ff;
  margin-bottom: 0;
}

.landing .card {
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.landing .plan-card {
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.landing .plan-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(34, 211, 238, 0.18);
}

.landing .plan-card--monthly {
  border-color: rgba(34, 211, 238, 0.45);
}

.landing .plan-card--quarterly {
  border-color: rgba(244, 114, 182, 0.55);
  background: linear-gradient(180deg, rgba(244, 114, 182, 0.12) 0%, rgba(255, 255, 255, 0.06) 100%);
}

.landing .plan-card--semiannual {
  border-color: rgba(251, 191, 36, 0.5);
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.1) 0%, rgba(255, 255, 255, 0.06) 100%);
}

.landing .plan-card--yearly {
  border-color: rgba(167, 139, 250, 0.5);
}

.landing .plan-card--trial {
  border-color: rgba(52, 211, 153, 0.55);
  background: linear-gradient(180deg, rgba(52, 211, 153, 0.12) 0%, rgba(255, 255, 255, 0.06) 100%);
  margin-bottom: 1.5rem;
}

.landing .section-title {
  font-size: 1.25rem;
  margin: 0 0 1rem;
  color: var(--text, #e7ecf3);
}

.landing .plan-badge {
  position: absolute;
  top: -0.65rem;
  right: 1rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #f472b6, #a78bfa);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.landing .price {
  font-size: 2.25rem;
  background: linear-gradient(90deg, #22d3ee, #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.landing .plan-desc {
  color: #ddd6fe;
}

.landing label {
  color: #c4b5fd;
}

.landing input[type="email"],
.landing input[type="password"] {
  background: rgba(15, 10, 40, 0.65);
  border: 1px solid rgba(167, 139, 250, 0.45);
  color: #fff;
}

.landing input[type="email"]:focus,
.landing input[type="password"]:focus {
  border-color: #22d3ee;
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.25);
}

.landing .btn {
  background: linear-gradient(90deg, #06b6d4 0%, #8b5cf6 50%, #ec4899 100%);
  box-shadow: 0 8px 24px rgba(236, 72, 153, 0.35);
}

.landing .btn:hover {
  background: linear-gradient(90deg, #0891b2 0%, #7c3aed 50%, #db2777 100%);
  transform: translateY(-1px);
}

.landing .btn-glow {
  margin-top: 1.25rem;
}

.landing .info-card h3 {
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.landing .steps,
.landing .client-list {
  color: #ddd6fe;
}

.landing .steps li,
.landing .client-list li {
  margin: 0.4rem 0;
}

.landing .client-list {
  list-style: none;
}

.landing .footer-link {
  color: #c4b5fd;
  text-decoration: none;
  transition: color 0.2s;
}

.landing .footer-link:hover {
  color: #22d3ee;
}

/* ── Landing: checkout & plan picker ── */

.plan-checkout-card {
  margin-top: 1.5rem;
}

.plan-checkout-card__title {
  font-size: 1.35rem;
  margin-bottom: 0.35rem;
  color: #fff;
  text-align: center;
}

.plan-checkout-card__hint {
  color: #c4b5fd;
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
  line-height: 1.5;
  text-align: center;
}

.plan-checkout-stack {
  max-width: 20rem;
  margin: 0 auto;
}

.plan-checkout-email {
  margin-bottom: 1.25rem;
}

.plan-checkout-email label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #a78bfa;
  margin-bottom: 0.45rem;
  text-align: center;
}

.plan-checkout-email input[type="email"] {
  width: 100%;
  margin-bottom: 0;
  text-align: center;
}

.plan-tariffs {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.landing .plan-tariff-btn {
  display: block;
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid #b7a4d4;
  background: #4a4168;
  color: #fff;
  font-size: 1rem;
  font-weight: 500;
  font-family: inherit;
  line-height: 1.35;
  text-align: center;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.landing .plan-tariff-btn:hover {
  background: #554b75;
  border-color: #d4c4ec;
}

.landing .plan-tariff-btn:active {
  background: #3f3759;
}

.plan-tariff-btn--featured {
  border-color: #d8b4e8;
  background: #524870;
}

.plan-tariff-btn--trial {
  border-color: #8fd4b0;
  background: #3d5248;
}

.plan-tariff-btn--trial:hover {
  background: #476052;
  border-color: #b8e8cc;
}

/* Legacy plan-btn (admin preview) */
.plan-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.plan-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(167, 139, 250, 0.35);
  background: rgba(15, 10, 40, 0.55);
  color: #fff;
  cursor: default;
  font-family: inherit;
}

.plan-btn__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.plan-btn__name {
  font-weight: 600;
  font-size: 1rem;
}

.plan-btn__price {
  font-weight: 700;
  font-size: 1.05rem;
  color: #22d3ee;
  white-space: nowrap;
}

.plan-btn__desc {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.82rem;
  color: #c4b5fd;
  line-height: 1.4;
}

.plan-btn--trial {
  border-color: rgba(52, 211, 153, 0.55);
  background: linear-gradient(90deg, rgba(52, 211, 153, 0.12), rgba(15, 10, 40, 0.55));
}

.plan-btn--trial .plan-btn__price {
  color: #4ade80;
}

.plan-btn--featured {
  border-color: rgba(244, 114, 182, 0.6);
}

.hero-login {
  margin-top: 0.75rem;
}

.hero-login a {
  color: #c4b5fd;
  text-decoration: none;
  font-size: 0.95rem;
}

.hero-login a:hover {
  color: #22d3ee;
}

.alert {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.alert-success {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #86efac;
}

.alert-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.form-footer {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
}

.form-footer a {
  color: var(--accent);
  text-decoration: none;
}

.form-footer a:hover {
  text-decoration: underline;
}

.client-import-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0 0.5rem;
}

.btn-app {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  padding: 0.85rem 1rem;
  margin-top: 0;
  text-align: left;
  text-decoration: none;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(34, 211, 238, 0.15));
  border: 1px solid rgba(99, 102, 241, 0.35);
}

.btn-app:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.4), rgba(34, 211, 238, 0.25));
}

.btn-app-name {
  font-weight: 700;
  font-size: 1rem;
}

.btn-app-hint {
  font-size: 0.75rem;
  font-weight: 400;
  opacity: 0.85;
}

label + input[type="password"] {
  margin-bottom: 0.75rem;
}

.container--wide {
  max-width: 960px;
}

input[type="text"],
input[type="number"] {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
}

input[type="text"]:focus,
input[type="number"]:focus {
  outline: none;
  border-color: var(--accent);
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.admin-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

/* ── Admin panel ── */

.admin-panel {
  background: #0a0a12;
  min-height: 100vh;
}

.admin-panel--auth {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.admin-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.admin-glow--1 {
  width: 420px;
  height: 420px;
  top: -120px;
  right: -80px;
  background: rgba(99, 102, 241, 0.22);
}

.admin-glow--2 {
  width: 360px;
  height: 360px;
  bottom: -100px;
  left: -60px;
  background: rgba(34, 211, 238, 0.12);
}

.admin-shell {
  position: relative;
  z-index: 1;
  padding-top: 1.25rem;
  padding-bottom: 3rem;
}

.admin-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 0.65rem 1rem;
  margin-bottom: 1.75rem;
  border-radius: 14px;
  border: 1px solid rgba(167, 139, 250, 0.25);
  background: rgba(26, 35, 50, 0.85);
  backdrop-filter: blur(8px);
}

.admin-topbar__brand {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.admin-topbar__logo {
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.admin-topbar__logo:hover {
  color: #22d3ee;
}

.admin-topbar__sep,
.admin-topbar__crumb {
  color: var(--muted);
  font-size: 0.9rem;
}

.admin-topbar__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.75rem;
}

.admin-topbar__link {
  color: #c4b5fd;
  text-decoration: none;
  font-size: 0.875rem;
  padding: 0.35rem 0.5rem;
  border-radius: 8px;
  transition: color 0.15s ease, background 0.15s ease;
}

.admin-topbar__link:hover {
  color: #22d3ee;
  background: rgba(34, 211, 238, 0.08);
}

.admin-topbar__logout {
  display: inline;
  margin: 0;
}

.admin-topbar__link--btn {
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
}

.admin-page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.25rem;
}

.admin-page-head h1 {
  margin-bottom: 0.25rem;
}

.admin-page-head__subtitle {
  margin-bottom: 0;
}

.admin-page-head__cta {
  margin-top: 0;
  white-space: nowrap;
}

.admin-breadcrumb {
  margin-bottom: 0.35rem;
  font-size: 0.875rem;
}

.admin-breadcrumb a {
  color: #c4b5fd;
  text-decoration: none;
}

.admin-breadcrumb a:hover {
  color: #22d3ee;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin: 1.25rem 0;
}

.admin-stat {
  padding: 1rem 1.1rem;
  border-radius: 12px;
  border: 1px solid rgba(167, 139, 250, 0.25);
  background: rgba(15, 10, 40, 0.45);
}

.admin-stat--muted {
  opacity: 0.65;
}

.admin-stat__value {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
  color: #22d3ee;
  line-height: 1.2;
}

.admin-stat__label {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.admin-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.admin-section-head h2 {
  font-size: 1.15rem;
  margin: 0;
}

.admin-section-head__meta {
  color: var(--muted);
  font-size: 0.875rem;
}

.admin-preview {
  margin-top: 0;
}

.admin-preview__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.35rem;
}

.admin-preview__head h2 {
  font-size: 1.15rem;
  margin: 0;
}

.admin-preview__link {
  font-size: 0.875rem;
  color: #22d3ee;
  text-decoration: none;
  white-space: nowrap;
}

.admin-preview__link:hover {
  text-decoration: underline;
}

.admin-preview__hint {
  color: var(--muted);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.admin-preview__empty {
  color: var(--muted);
  font-size: 0.9rem;
  padding: 0.5rem 0;
}

.plan-buttons--preview {
  pointer-events: none;
}

.plan-btn--static {
  cursor: default;
}

.plan-btn--static:hover {
  transform: none;
}

.admin-plan-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.admin-plan-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.75rem 1.25rem;
  align-items: center;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(15, 20, 25, 0.55);
  transition: border-color 0.15s ease;
}

.admin-plan-item:hover {
  border-color: rgba(59, 130, 246, 0.45);
}

.admin-plan-item--hidden {
  opacity: 0.55;
}

.admin-plan-item__title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
}

.admin-plan-item__name {
  font-size: 1rem;
}

.admin-plan-item__id {
  font-size: 0.75rem;
  color: var(--muted);
  background: rgba(139, 156, 179, 0.12);
  padding: 0.1rem 0.4rem;
  border-radius: 6px;
}

.admin-plan-item__tags {
  margin-top: 0.35rem;
}

.admin-plan-item__tags .tag {
  margin-left: 0;
  margin-right: 0.35rem;
}

.admin-plan-item__specs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.admin-plan-item__specs strong {
  color: #22d3ee;
}

.admin-plan-item__order {
  font-size: 0.78rem;
}

.admin-plan-item__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.admin-plan-item__actions form {
  display: inline;
}

.btn-sm {
  margin-top: 0;
  padding: 0.45rem 0.85rem;
  font-size: 0.875rem;
}

.btn-danger-ghost {
  background: transparent;
  border: 1px solid rgba(248, 113, 113, 0.45);
  color: #fca5a5;
}

.btn-danger-ghost:hover {
  background: rgba(248, 113, 113, 0.12);
  border-color: #f87171;
}

.admin-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--muted);
}

.admin-empty p {
  margin-bottom: 1rem;
}

.admin-empty .btn {
  margin-top: 0;
}

.admin-trial-card__hint {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.admin-trial-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.admin-trial-form__fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.admin-trial-form .btn {
  align-self: flex-start;
  margin-top: 0;
}

.admin-toggle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  user-select: none;
}

.admin-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.admin-toggle__track {
  flex-shrink: 0;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: rgba(139, 156, 179, 0.35);
  position: relative;
  transition: background 0.2s ease;
}

.admin-toggle__track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s ease;
}

.admin-toggle input:checked + .admin-toggle__track {
  background: rgba(34, 211, 238, 0.55);
}

.admin-toggle input:checked + .admin-toggle__track::after {
  transform: translateX(18px);
}

.admin-toggle input:focus-visible + .admin-toggle__track {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.admin-toggle__label {
  color: var(--text);
  font-size: 0.95rem;
}

.input-with-suffix {
  position: relative;
}

.input-with-suffix input {
  padding-right: 2.75rem;
}

.input-with-suffix__unit {
  position: absolute;
  right: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 0.875rem;
  pointer-events: none;
}

.input-disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.field-hint {
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.admin-form-card form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.admin-form-section {
  border: none;
  margin: 0;
  padding: 0 0 1.5rem;
  border-bottom: 1px solid var(--border);
}

.admin-form-section--last {
  border-bottom: none;
  padding-bottom: 0;
}

.admin-form-section legend {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #c4b5fd;
  padding: 0;
  margin-bottom: 1rem;
}

.admin-form-toggles {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.admin-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.admin-form-actions .btn {
  margin-top: 0;
}

.admin-toast {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.admin-auth {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
}

.admin-auth__card {
  margin-top: 0;
}

.admin-auth__head {
  text-align: center;
  margin-bottom: 1.5rem;
}

.admin-auth__badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #22d3ee;
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.35);
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  margin-bottom: 0.85rem;
}

.admin-auth__head h1 {
  font-size: 1.5rem;
  margin-bottom: 0.35rem;
}

.admin-auth__subtitle {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 0;
}

.admin-auth__sso {
  text-align: center;
  padding: 1.25rem 0.5rem;
}

.admin-auth__sso-title {
  font-weight: 600;
  margin-top: 1rem;
  margin-bottom: 0.35rem;
}

.admin-auth__sso-hint {
  color: var(--muted);
  font-size: 0.85rem;
}

.admin-spinner {
  width: 36px;
  height: 36px;
  margin: 0 auto;
  border: 3px solid rgba(167, 139, 250, 0.25);
  border-top-color: #22d3ee;
  border-radius: 50%;
  animation: admin-spin 0.8s linear infinite;
}

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

.admin-auth__divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.25rem 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.admin-auth__divider::before,
.admin-auth__divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.admin-auth__form .btn {
  margin-top: 0.5rem;
}

.admin-auth__footer {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}

.admin-auth__footer a {
  color: #22d3ee;
  text-decoration: none;
}

.admin-auth__footer a:hover {
  text-decoration: underline;
}

.admin-header__actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.admin-table th,
.admin-table td {
  padding: 0.65rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.admin-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-table__actions {
  white-space: nowrap;
}

.admin-table__actions a {
  color: var(--accent);
  text-decoration: none;
  margin-right: 0.75rem;
}

.inline-form {
  display: inline;
}

.link-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
  color: var(--accent);
}

.link-btn--danger {
  color: #f87171;
}

.tag {
  display: inline-block;
  font-size: 0.7rem;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  margin-left: 0.35rem;
  vertical-align: middle;
}

.tag--ok {
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
}

.tag--muted {
  background: rgba(139, 156, 179, 0.15);
  color: var(--muted);
}

.tag--accent {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.25rem;
}

.admin-form-grid__full {
  grid-column: 1 / -1;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  cursor: pointer;
}

.checkbox-row input {
  width: auto;
}

.muted {
  color: var(--muted);
}

@media (max-width: 640px) {
  .admin-form-grid {
    grid-template-columns: 1fr;
  }

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

  .admin-plan-item {
    grid-template-columns: 1fr;
  }

  .admin-plan-item__actions {
    justify-content: flex-start;
  }

  .admin-trial-form__fields {
    grid-template-columns: 1fr;
  }

  .admin-page-head__cta {
    width: 100%;
    text-align: center;
  }
}
