:root {
  color-scheme: light;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  --bg-primary: radial-gradient(circle at top, #1d4ed8 0%, #0f172a 55%, #020617 100%);
  --surface: rgba(15, 23, 42, 0.82);
  --surface-muted: rgba(15, 23, 42, 0.68);
  --border: rgba(148, 163, 184, 0.25);
  --text-primary: #e2e8f0;
  --text-muted: #94a3b8;
  --accent: linear-gradient(135deg, #38bdf8 0%, #6366f1 100%);
  --accent-hover: linear-gradient(135deg, #60a5fa 0%, #7c3aed 100%);
  --danger: #fb7185;
  --success: #34d399;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg-primary);
  color: var(--text-primary);
  display: flex;
  justify-content: center;
  padding: 3rem 1.5rem 4rem;
}

.app {
  width: 100%;
  max-width: 960px;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.hero {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  padding: 0 0.75rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-logo {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: rgba(59, 130, 246, 0.18);
  border: 1px solid rgba(96, 165, 250, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.15rem;
  color: #bfdbfe;
  backdrop-filter: blur(8px);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.brand-name {
  font-weight: 700;
  font-size: 1.35rem;
}

.brand-tagline {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.hero-copy h1 {
  margin: 0;
  font-size: 2.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero-copy p {
  margin: 0.4rem 0 0;
  max-width: 560px;
  color: var(--text-muted);
  line-height: 1.6;
}

.surface-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.card {
  background: var(--surface);
  border-radius: 18px;
  padding: 1.75rem;
  border: 1px solid var(--border);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.45);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  backdrop-filter: blur(12px);
}

.auth-card h2 {
  margin: 0;
  font-size: 1.35rem;
}

.auth-card form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-toggle {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.monitor-card {
  gap: 1.35rem;
}

.user-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: var(--surface-muted);
  border: 1px solid rgba(148, 163, 184, 0.18);
  font-size: 0.95rem;
}

.user-meta {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.user-meta strong {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(148, 163, 184, 0.8);
}

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

.field-row {
  display: flex;
  gap: 1rem;
}

.field-row .input-group {
  flex: 1;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

label {
  font-weight: 600;
  font-size: 0.95rem;
  color: rgba(226, 232, 240, 0.92);
}

input[type="email"],
input[type="password"],
input[type="number"],
input[type="text"],
select {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.65);
  color: var(--text-primary);
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

input::placeholder,
select:invalid {
  color: rgba(148, 163, 184, 0.75);
}

select option {
  color: #0f172a;
}

input:focus,
select:focus {
  outline: none;
  border-color: rgba(96, 165, 250, 0.8);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
  transform: translateY(-1px);
}

button {
  cursor: pointer;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.95rem 1.15rem;
  transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

button:active {
  transform: translateY(1px);
}

.primary {
  background: var(--accent);
  color: #0b1120;
  box-shadow: 0 18px 30px rgba(79, 70, 229, 0.35);
}

.primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 12px 24px rgba(79, 70, 229, 0.45);
}

.secondary {
  background: rgba(59, 130, 246, 0.16);
  color: #bfdbfe;
  border: 1px solid rgba(96, 165, 250, 0.35);
}

.secondary:hover {
  opacity: 0.9;
}

.ghost-button {
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-primary);
  border: 1px solid rgba(148, 163, 184, 0.15);
  padding: 0.7rem 1rem;
  border-radius: 10px;
  font-size: 0.95rem;
}

.ghost-button:hover {
  background: rgba(148, 163, 184, 0.2);
}

.full-width {
  width: 100%;
}

.hidden {
  display: none !important;
}

.status-card h2 {
  margin: 0;
}

.status-grid {
  display: grid;
  gap: 0.9rem;
}

.status-grid strong {
  color: rgba(226, 232, 240, 0.95);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem;
}

.badge.ok {
  background: rgba(52, 211, 153, 0.16);
  color: var(--success);
  border: 1px solid rgba(52, 211, 153, 0.35);
}

.badge.alert {
  background: rgba(251, 113, 133, 0.18);
  color: var(--danger);
  border: 1px solid rgba(251, 113, 133, 0.4);
}

ol {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.note {
  margin: 0;
  color: rgba(148, 163, 184, 0.9);
  font-size: 0.95rem;
}

.data-source {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(148, 163, 184, 0.8);
}

.info-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.22);
}

@media (max-width: 720px) {
  body {
    padding: 2.5rem 1rem 3rem;
  }

  .hero {
    padding: 0;
  }

  .hero-copy h1 {
    font-size: 1.85rem;
  }

  .field-row {
    flex-direction: column;
  }

  .user-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .ghost-button {
    width: 100%;
    text-align: center;
  }
}
