:root {
  --bg-dark: #071826;
  --bg-mid: #0c1d2d;
  --card-dark: #102338;
  --card-light: rgba(255, 255, 255, 0.04);
  --text-main: #edf4ff;
  --text-soft: #b9c7d8;
  --text-muted: #8ea4bf;
  --primary: #3b82f6;
  --primary-dark: #0f172a;
  --success: #22c55e;
  --warning: #fbbf24;
  --danger: #ef4444;
  --border: rgba(255, 255, 255, 0.1);
  --shadow: 0 24px 60px rgba(2, 6, 23, 0.55);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: Arial, Helvetica, sans-serif;
  background: linear-gradient(180deg, #020b15 0%, #081f2f 100%);
  color: var(--text-main);
}

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

button, input {
  font: inherit;
}

button {
  cursor: pointer;
}

.login-shell {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 18px;
  background:
    radial-gradient(circle at 50% 20%, rgba(59, 130, 246, 0.15), transparent 25%),
    linear-gradient(180deg, #020b15 0%, #071826 100%);
}

.login-card {
  width: min(100%, 540px);
  background: rgba(11, 18, 31, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 26px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.brand-block {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 28px 18px 8px;
}

.brand-mark,
.mini-logo,
.orb-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  background: linear-gradient(135deg, #e5effd, #ffffff);
  color: #0f172a;
  border-radius: 18px;
}

.brand-mark {
  width: 64px;
  height: 64px;
  font-size: 2rem;
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(96, 165, 250, 0.3);
}

.brand-copy {
  text-align: left;
}

.brand-copy h1 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  line-height: 1;
}

.brand-copy span {
  color: var(--text-soft);
  font-size: 0.82rem;
}

.login-content {
  padding: 14px 42px 36px;
  text-align: center;
}

.security-badge {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.login-content h2 {
  margin: 0 0 18px;
  font-size: clamp(1.8rem, 4vw, 3rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 800;
}

.glow-orb {
  width: 180px;
  height: 180px;
  margin: 8px auto 20px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(46, 103, 194, 0.5), rgba(8, 20, 36, 0.95) 60%);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(147, 197, 253, 0.3);
  box-shadow: inset 0 0 30px rgba(59, 130, 246, 0.3), 0 0 32px rgba(37, 99, 235, 0.3);
}

.orb-logo {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  font-size: 2.5rem;
  background: linear-gradient(135deg, #ffffff 0%, #dfeafc 100%);
}

.welcome-copy {
  color: var(--text-soft);
  font-size: clamp(1.2rem, 2vw, 1.7rem);
  line-height: 1.35;
  margin: 0 auto 26px;
  max-width: 420px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.login-form input {
  width: 100%;
  padding: 16px 18px;
  font-size: 1rem;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
}

.login-form input::placeholder {
  color: #9bb0c8;
}

.login-form button,
.ghost-button,
.install-btn {
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 16px 18px;
  font-weight: 700;
  transition: 0.2s ease;
}

.login-form button {
  background: linear-gradient(180deg, #2c3f66, #1b2c44);
  color: white;
  box-shadow: 0 12px 30px rgba(59, 130, 246, 0.2);
}

.login-form button:hover,
.ghost-button:hover,
.install-btn:hover {
  transform: translateY(-1px);
}

.divider {
  display: flex;
  align-items: center;
  margin: 20px 0 14px;
}

.divider::before,
.divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: rgba(255, 255, 255, 0.12);
}

.divider span {
  color: var(--text-soft);
  padding: 0 14px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
}

.ghost-button {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.security-note {
  margin-top: 28px;
  color: var(--text-soft);
  font-size: 0.98rem;
  line-height: 1.6;
}

.authorized-list {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.list-title {
  width: 100%;
  margin: 0 0 10px;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.authorized-list span {
  display: inline-block;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--text-soft);
  font-size: 0.75rem;
}

.alert {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 0.92rem;
}

.alert.error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fecaca;
}

.dashboard-shell {
  width: 100%;
  min-height: 100vh;
  background: #f8fafc;
  color: #0f172a;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  padding: 18px 28px;
  backdrop-filter: blur(10px);
}

.brand-mini {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.1rem;
}

.mini-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 1.1rem;
}

.profile-box {
  display: flex;
  align-items: center;
  gap: 18px;
}

.profile-box strong,
.profile-box small {
  display: block;
}

.profile-box small {
  color: #64748b;
}

.logout-btn {
  background: #fee2e2;
  color: #b91c1c;
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 700;
}

.dashboard {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.7rem;
}

.hero h2 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 2.8rem);
}

.status-pill {
  background: #dcfce7;
  color: #166534;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.8rem;
  font-weight: 700;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
  margin-bottom: 30px;
}

.stat-card {
  background: white;
  border-radius: 18px;
  padding: 18px 20px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.05);
}

.stat-card span {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  margin-bottom: 10px;
}

.stat-card strong {
  font-size: clamp(1.4rem, 2vw, 2rem);
}

.stat-card.blue { background: #eff6ff; }
.stat-card.green { background: #ecfdf5; }
.stat-card.amber { background: #fffbeb; }
.stat-card.purple { background: #faf5ff; }

.panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.panel {
  background: white;
  border-radius: 18px;
  padding: 22px 20px;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.panel h3 {
  margin: 0 0 18px;
  font-size: 1.2rem;
}

.panel ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.panel li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: #f8fafc;
  border-radius: 12px;
  padding: 12px 14px;
}

.install-toast {
  position: fixed;
  right: 20px;
  top: 18px;
  z-index: 30;
  background: rgba(15, 23, 42, 0.95);
  color: white;
  padding: 12px 14px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow);
}

.install-btn {
  background: #2563eb;
  color: white;
  width: auto;
  padding: 9px 12px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 640px) {
  .login-content {
    padding: 14px 20px 28px;
  }

  .brand-block {
    padding-top: 22px;
  }

  .brand-copy {
    text-align: center;
  }
}
