:root {
  --bg: #040711;
  --bg-elevated: #0b1120;
  --bg-panel: rgba(15, 23, 42, 0.72);
  --card-bg: rgba(255, 255, 255, 0.03);
  --card-bg-hover: rgba(255, 255, 255, 0.055);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(56, 189, 248, 0.35);
  --primary: #38bdf8;
  --primary-dark: #0284c7;
  --primary-glow: rgba(56, 189, 248, 0.25);
  --emerald: #10b981;
  --emerald-glow: rgba(16, 185, 129, 0.2);
  --purple: #a855f7;
  --amber: #f59e0b;
  --rose: #f43f5e;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background-image:
    radial-gradient(circle at 15% 15%, rgba(56, 189, 248, 0.12) 0%, transparent 42%),
    radial-gradient(circle at 85% 80%, rgba(168, 85, 247, 0.1) 0%, transparent 45%),
    radial-gradient(circle at 50% 40%, rgba(16, 185, 129, 0.05) 0%, transparent 50%);
  background-attachment: fixed;
}

a {
  color: inherit;
}

.glow-orb {
  position: fixed;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  filter: blur(130px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.32;
}
.orb-1 { top: -140px; left: 8%; background: #0284c7; }
.orb-2 { bottom: -180px; right: 6%; background: #7c3aed; }

.page-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Shared Top Navigation */
.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.4px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.nav-link {
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.2s;
}
.nav-link:hover,
.nav-link.active {
  color: #fff;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  font-size: 12.5px;
  font-weight: 600;
  color: #e2e8f0;
}

.user-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: #04101e;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 11px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
}

.btn-primary {
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  color: #04101e;
  box-shadow: 0 8px 24px rgba(56, 189, 248, 0.28);
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(56, 189, 248, 0.42);
}

.btn-emerald {
  background: linear-gradient(135deg, #059669, #10b981);
  color: #03150e;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.25);
}
.btn-emerald:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(16, 185, 129, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border);
  color: #f8fafc;
}
.btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: transparent;
}
.btn-ghost:hover:not(:disabled) {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.btn-danger {
  background: rgba(244, 63, 94, 0.14);
  border-color: rgba(244, 63, 94, 0.35);
  color: #fda4af;
}
.btn-danger:hover:not(:disabled) {
  background: rgba(244, 63, 94, 0.25);
}

.btn-google {
  background: #ffffff;
  color: #0f172a;
  border-color: rgba(255, 255, 255, 0.2);
  width: 100%;
  padding: 12px 18px;
}
.btn-google:hover:not(:disabled) {
  background: #f1f5f9;
  transform: translateY(-1px);
}

.btn-sm {
  padding: 7px 13px;
  font-size: 12.5px;
  border-radius: 9px;
}

.btn-lg {
  padding: 13px 26px;
  font-size: 15px;
  border-radius: 13px;
}

/* Cards & Panels */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  backdrop-filter: blur(12px);
}

.card-highlight {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.08), rgba(168, 85, 247, 0.06));
  border-color: rgba(56, 189, 248, 0.32);
}

/* Badges & Pills */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.2px;
  border: 1px solid transparent;
}

.badge-live {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
  color: #34d399;
}

.badge-primary {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.3);
  color: #7dd3fc;
}

.badge-purple {
  background: rgba(168, 85, 247, 0.14);
  border-color: rgba(168, 85, 247, 0.35);
  color: #d8b4fe;
}

.badge-amber {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.35);
  color: #fcd34d;
}

.badge-rose {
  background: rgba(244, 63, 94, 0.14);
  border-color: rgba(244, 63, 94, 0.35);
  color: #fda4af;
}

.badge-muted {
  background: rgba(148, 163, 184, 0.12);
  border-color: rgba(148, 163, 184, 0.25);
  color: #cbd5e1;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 10px var(--emerald);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.82); }
}

/* Forms */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: #cbd5e1;
  margin-bottom: 6px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f8fafc;
  font-family: inherit;
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.16);
}

.form-textarea {
  min-height: 92px;
  resize: vertical;
}

.form-select option {
  background: #0f172a;
  color: #f8fafc;
}

/* Alerts */
.alert {
  padding: 13px 16px;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.5;
  border: 1px solid;
  margin-bottom: 16px;
}
.alert-info {
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.35);
  color: #bae6fd;
}
.alert-success {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
  color: #a7f3d0;
}
.alert-warning {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.35);
  color: #fde68a;
}
.alert-error {
  background: rgba(244, 63, 94, 0.12);
  border-color: rgba(244, 63, 94, 0.35);
  color: #fecdd3;
}

/* Utilities */
.mono {
  font-family: 'JetBrains Mono', monospace;
}

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

.text-dim {
  color: var(--text-dim);
}

.hidden {
  display: none !important;
}

/* Loading Spinner */
.spinner {
  width: 22px;
  height: 22px;
  border: 2.5px solid rgba(56, 189, 248, 0.25);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  display: inline-block;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 55vh;
  color: var(--text-muted);
  font-size: 14px;
}

/* Toast Notification */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #f8fafc;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(12px);
  max-width: 380px;
}
.toast-success { border-color: rgba(16, 185, 129, 0.55); }
.toast-error { border-color: rgba(244, 63, 94, 0.55); }

/* Footer */
.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding: 26px 0;
  margin-top: 64px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 12.5px;
  color: var(--text-dim);
}

@media (max-width: 768px) {
  .page-shell { padding: 0 16px; }
  .top-nav { gap: 12px; }
  .nav-links { display: none; }
}
