﻿/* ── Reset & Base ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; }
button { cursor: pointer; font-family: inherit; border: none; outline: none; }
input { font-family: inherit; outline: none; }

/* ── Auth layout ───────────────────────────────────────────────────────────── */
.auth-body {
  background: #0a0a0f;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-glows {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.auth-glows::before,
.auth-glows::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
}
.auth-glows::before {
  width: 700px;
  height: 700px;
  top: -220px;
  right: -200px;
  background: radial-gradient(circle, rgba(130,50,255,.45) 0%, rgba(100,20,220,.15) 50%, transparent 70%);
}
.auth-glows::after {
  width: 550px;
  height: 550px;
  bottom: -180px;
  left: -160px;
  background: radial-gradient(circle, rgba(100,30,240,.35) 0%, rgba(70,10,180,.12) 50%, transparent 70%);
}

.auth-screen { position: relative; z-index: 1; }

.auth-screen {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

.auth-box {
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

/* Logo */
.auth-logo-wrap { margin-bottom: 8px; }

.auth-logo-img {
  width: 80px;
  height: 80px;
  border-radius: 22px;
  object-fit: contain;
}

.auth-logo-q {
  width: 80px;
  height: 80px;
  background: #110d1f;
  border: 1px solid #2a1854;
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  font-weight: 800;
  color: #9d6ef8;
}

/* Heading */
.auth-heading {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #f0f0f8;
  margin-top: 4px;
}

/* Desc */
.auth-desc {
  font-size: 13px;
  color: #5a5a80;
  line-height: 1.65;
  max-width: 280px;
  margin-bottom: 6px;
}

/* Primary button — white */
.auth-btn-primary {
  width: 100%;
  background: #fff;
  color: #111;
  border: none;
  border-radius: 12px;
  padding: 15px 20px;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: background 0.15s;
}
.auth-btn-primary:hover { background: #e8e8f2; }
.auth-btn-primary:active { background: #d8d8e8; }

/* Secondary button — dark outline */
.auth-btn-secondary {
  width: 100%;
  background: transparent;
  color: #b0b0cc;
  border: 1px solid #1e1e30;
  border-radius: 12px;
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.auth-btn-secondary:hover {
  border-color: #3a1f70;
  background: rgba(100, 50, 200, 0.06);
  color: #c8c0e8;
}

.btn-icon { width: 20px; height: 20px; flex-shrink: 0; }
.btn-arrow { margin-left: auto; opacity: 0.45; font-size: 16px; }


/* Email form */
.auth-email-form {
  width: 100%;
  flex-direction: column;
  gap: 10px;
}

.auth-input {
  width: 100%;
  background: #111118;
  border: 1px solid #1e1e30;
  border-radius: 10px;
  padding: 13px 16px;
  color: #e8e8f4;
  font-size: 14px;
  transition: border-color 0.15s;
}
.auth-input:focus { border-color: #6d28d9; }
.auth-input::placeholder { color: #3a3a58; }

/* Status */
.auth-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #00c896;
  margin-top: 4px;
}
.auth-status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #00c896;
  animation: blink 1.2s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

/* Error */
.auth-error {
  width: 100%;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 13px;
  color: #fca5a5;
  text-align: left;
}

/* ── Dashboard layout ──────────────────────────────────────────────────────── */
.dash-glows {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.dash-glows::before,
.dash-glows::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
}
.dash-glows::before {
  width: 600px;
  height: 600px;
  top: -200px;
  right: -180px;
  background: radial-gradient(circle, rgba(110,40,220,.22) 0%, rgba(80,20,180,.08) 55%, transparent 70%);
}
.dash-glows::after {
  width: 500px;
  height: 500px;
  bottom: -150px;
  left: -150px;
  background: radial-gradient(circle, rgba(90,25,200,.16) 0%, rgba(60,10,160,.06) 55%, transparent 70%);
}

.dash-body {
  background: #0a0a0f;
  min-height: 100vh;
  color: #e0e0f0;
}

/* Header */
.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 58px;
  border-bottom: 1px solid #131320;
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(10px);
}

.dash-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #e0e0f0;
}
.dash-logo-img { width: 30px; height: 30px; border-radius: 8px; object-fit: contain; }
.dash-logo-q {
  width: 30px; height: 30px;
  background: #1a0a3e;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: #9d6ef8;
}
.dash-logo-name { font-size: 14px; font-weight: 700; }

.dash-menu-wrap { position: relative; }

.dash-burger {
  background: transparent;
  border: 1px solid #1a1a28;
  border-radius: 8px;
  width: 38px;
  height: 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
  transition: border-color 0.15s;
}
.dash-burger:hover { border-color: #2a2a40; }
.dash-burger span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: #4a4a68;
  border-radius: 2px;
  transition: background 0.15s;
}
.dash-burger:hover span { background: #9090c0; }

.dash-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  background: #0f0f1a;
  border: 1px solid #1a1a2e;
  border-radius: 12px;
  padding: 6px;
  z-index: 100;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
}
.dash-dropdown.open { display: block; }

.dash-dd-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: #8080a8;
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.dash-dd-item:hover { background: #161626; color: #c0c0e0; }
.dash-dd-logout:hover { color: #e06060; }

.dash-dd-sep {
  height: 1px;
  background: #1a1a2e;
  margin: 4px 6px;
}

/* Main */
.dash-main { max-width: 560px; margin: 0 auto; padding: 32px 20px 40px; position: relative; z-index: 1; }

/* Footer */
.dash-footer {
  max-width: 560px;
  margin: 0 auto;
  padding: 16px 20px 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  color: #2e2e48;
}
.dash-footer a {
  color: #3d2e6e;
  transition: color 0.15s;
}
.dash-footer a:hover { color: #7c5cc4; }

/* ── Subscription card ──────────────────────────────────────────────────────── */
.sub-card {
  background: #0f0f1a;
  border: 1px solid #1a1a2e;
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 20px;
}
.sub-card-empty {
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  gap: 12px;
}
.sub-empty-icon { font-size: 40px; }
.sub-empty-text { color: #4a4a68; font-size: 14px; }

.sub-card-head { display: flex; flex-direction: column; gap: 14px; }

.sub-status-row { display: flex; align-items: center; gap: 8px; }
.sub-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}
.sub-dot-on  { background: #00c896; box-shadow: 0 0 8px rgba(0,200,150,.5); }
.sub-dot-off { background: #ef4444; box-shadow: 0 0 8px rgba(239,68,68,.4); }
.sub-status-text { font-weight: 600; font-size: 14px; }

.sub-meta { display: flex; gap: 24px; }
.sub-meta-item { display: flex; flex-direction: column; gap: 2px; }
.sub-meta-label { font-size: 11px; color: #3a3a58; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.sub-meta-val { font-size: 15px; font-weight: 600; }

/* Key */
.sub-key-section { border-top: 1px solid #131320; padding-top: 18px; }
.sub-key-label {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  color: #3a3a58; margin-bottom: 10px;
}
.sub-key-row { display: flex; gap: 8px; align-items: center; }
.sub-key-input {
  flex: 1;
  background: #0a0a12;
  border: 1px solid #1a1a28;
  border-radius: 8px;
  padding: 10px 12px;
  color: #8878e8;
  font-size: 12px;
  font-family: 'Courier New', monospace;
  min-width: 0;
  cursor: text;
}
.sub-key-copy {
  width: 38px; height: 38px;
  background: #111118;
  border: 1px solid #1a1a28;
  border-radius: 8px;
  color: #5a5a80;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: border-color 0.15s, color 0.15s;
}
.sub-key-copy:hover, .sub-key-copy.copied { border-color: #00c896; color: #00c896; }
.sub-key-hint { font-size: 12px; color: #3a3a58; margin-top: 8px; }
.sub-open-app {
  margin-top: 12px;
  min-height: 48px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 10px;
  border: 1px solid rgba(109,40,217,.28);
  background: rgba(109,40,217,.14);
  color: #a78bfa;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: 0;
  box-shadow: 0 8px 22px rgba(104,46,205,.18), inset 0 1px 0 rgba(255,255,255,.04);
  transition: transform .15s, box-shadow .15s, border-color .15s, color .15s, background .15s;
}
.sub-open-app:hover {
  transform: translateY(-1px);
  color: #c4b0ff;
  border-color: rgba(109,40,217,.4);
  background: rgba(109,40,217,.2);
  box-shadow: 0 10px 26px rgba(104,46,205,.24), inset 0 1px 0 rgba(255,255,255,.06);
}
.sub-open-app:active {
  transform: translateY(1px);
}
.sub-open-app svg { flex-shrink: 0; }

/* ── Devices in subscription card ──────────────────────────────────────────── */
.sub-devices-section { border-top: 1px solid #131320; margin-top: 18px; padding-top: 14px; }

.sub-devices-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  border: none;
  padding: 4px 0;
  color: #8080a8;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.sub-devices-toggle:hover { color: #c0c0e0; }
.sub-devices-label { letter-spacing: .01em; }
.sub-devices-right { display: flex; align-items: center; gap: 10px; }
.sub-devices-count {
  font-size: 12px;
  font-weight: 700;
  color: #a78bfa;
  background: rgba(109,40,217,.14);
  border: 1px solid rgba(109,40,217,.28);
  border-radius: 20px;
  padding: 2px 9px;
}
.sub-devices-max { color: #6b6b8c; font-weight: 600; }
.sub-devices-chevron { color: #4a4a68; transition: transform .2s; }
.sub-devices-toggle[aria-expanded="true"] .sub-devices-chevron { transform: rotate(180deg); }

.sub-devices-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}
.sub-devices-list[hidden] { display: none; }

.device-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #0a0a14;
  border: 1px solid #14142a;
  border-radius: 10px;
  padding: 10px 12px;
}
.device-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: #14142a;
  color: #9d6ef8;
}
.device-info { flex: 1; min-width: 0; }
.device-name {
  font-size: 13px;
  font-weight: 600;
  color: #d0d0e8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.device-meta {
  font-size: 11px;
  color: #4a4a68;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.device-delete {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  background: transparent;
  border: 1px solid #1e1e30;
  border-radius: 7px;
  color: #5a5a78;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.device-delete:hover { color: #ff6b7e; border-color: #4a1f2e; background: rgba(255,107,126,.06); }

.device-empty {
  font-size: 12px;
  color: #4a4a68;
  text-align: center;
  padding: 10px 0;
}

/* ── Plans in dashboard ─────────────────────────────────────────────────────── */
.cab-plans { margin-top: 8px; }
.cab-section-title { font-size: 13px; font-weight: 700; color: #3a3a58; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 12px; }

@property --neon-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

@keyframes neon-rotate {
  to { --neon-angle: 360deg; }
}

@keyframes neon-glow {
  0%, 100% { box-shadow: 0 0 8px rgba(109,40,217,.5), 0 0 24px rgba(109,40,217,.2); }
  50%       { box-shadow: 0 0 18px rgba(150,70,255,.75), 0 0 48px rgba(109,40,217,.35); }
}

.cab-plans-grid { display: flex; flex-direction: column; gap: 10px; }

.cab-plan {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #0f0f1a;
  border: 1px solid #1a1a2e;
  border-radius: 12px;
  padding: 16px 20px;
  transition: border-color 0.15s;
}
.cab-plan:hover { border-color: #2a1854; }

.cab-plan-hot {
  border: 2px solid transparent;
  background:
    linear-gradient(#0f0f1a, #0f0f1a) padding-box,
    conic-gradient(
      from var(--neon-angle),
      transparent 15%,
      #6d28d9 35%,
      #a78bfa 50%,
      #6d28d9 65%,
      transparent 85%
    ) border-box;
  animation: neon-rotate 3s linear infinite, neon-glow 2.5s ease-in-out infinite;
}

.cab-plan-info { display: flex; flex-direction: column; gap: 3px; }
.cab-plan-name { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.cab-plan-dev { font-size: 12px; color: #4a4a68; }
.cab-hot-tag {
  font-size: 10px; font-weight: 700;
  background: rgba(109,40,217,.3);
  color: #a78bfa;
  border: 1px solid rgba(109,40,217,.4);
  border-radius: 20px;
  padding: 2px 8px;
  letter-spacing: .04em;
}

.cab-plan-right { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.cab-plan-price { font-size: 18px; font-weight: 700; white-space: nowrap; }

.cab-plan-btn {
  background: transparent;
  color: #b0b0cc;
  border: 1px solid #1e1e30;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: border-color 0.15s, background 0.15s;
}
.cab-plan-btn:hover { border-color: #3a1f70; background: rgba(100,50,200,.08); color: #c8c0e8; }

.cab-plan-btn-primary {
  background: #fff;
  color: #111;
  border-color: #fff;
}
.cab-plan-btn-primary:hover { background: #e8e8f2; border-color: #e8e8f2; color: #111; }

/* ── Banner ─────────────────────────────────────────────────────────────────── */
.cab-wrap { display: flex; flex-direction: column; gap: 20px; }

.cab-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #0f0f1a;
  border: 1px solid #2a1854;
  border-radius: 12px;
  padding: 14px 18px;
  flex-wrap: wrap;
}
.cab-banner-text { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 160px; }
.cab-banner-title { font-size: 14px; font-weight: 600; }
.cab-banner-sub { font-size: 12px; color: #4a4a68; }
.cab-banner-btn {
  color: #a78bfa;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}
.cab-banner-btn:hover { color: #c4b0ff; }

/* Alert */
.cab-alert {
  background: rgba(239,68,68,.08);
  border: 1px solid rgba(239,68,68,.2);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 13px;
  color: #fca5a5;
}

/* ── Splash screen ──────────────────────────────────────────────────────────── */
.splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #0a0a0f;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .5s ease, transform .5s ease;
}
.splash-hide {
  opacity: 0;
  transform: scale(1.04);
  pointer-events: none;
}
.splash-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  animation: splash-in .6s cubic-bezier(.22,1,.36,1) both;
}
@keyframes splash-in {
  from { opacity: 0; transform: scale(.88); }
  to   { opacity: 1; transform: scale(1); }
}
.splash-logo-img {
  width: 90px;
  height: 90px;
  border-radius: 24px;
  object-fit: contain;
}
.splash-logo-q {
  width: 90px;
  height: 90px;
  background: #110d1f;
  border: 1px solid #2a1854;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  font-weight: 800;
  color: #9d6ef8;
  box-shadow: 0 0 40px rgba(109, 40, 217, .35);
}
.splash-name {
  font-size: 15px;
  font-weight: 700;
  color: #4a4a68;
  letter-spacing: .08em;
}
.splash-bar {
  width: 120px;
  height: 2px;
  background: #1a1a2e;
  border-radius: 2px;
  overflow: hidden;
  margin-top: 8px;
}
.splash-bar-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #6d28d9, #a78bfa);
  border-radius: 2px;
  animation: splash-progress 1.6s cubic-bezier(.4,0,.2,1) forwards;
}
@keyframes splash-progress {
  0%   { width: 0; }
  60%  { width: 80%; }
  100% { width: 100%; }
}

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .cab-plan { flex-direction: column; align-items: flex-start; }
  .cab-plan-right { width: 100%; justify-content: space-between; }
}








