:root {
  color-scheme: dark;
  --bg: #05080f;
  --soft: #0f1624;
  --card: #121b30;
  --stroke: #1d2944;
  --accent: #7f5dff;
  --accent-strong: #b084ff;
  --text: #f5f7ff;
  --muted: #8ea0c7;
  --success: #4ade80;
  --danger: #fb7185;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: radial-gradient(circle at top, rgba(127, 93, 255, 0.15), transparent 45%), var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.hidden {
  display: none !important;
}

.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 18px;
}

.login-card {
  width: min(420px, 100%);
  padding: 32px;
  border-radius: 20px;
  background: var(--soft);
  border: 1px solid var(--stroke);
  box-shadow: 0 30px 70px rgba(5, 8, 15, 0.8);
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
}

.login-card h1 {
  margin: 0;
}

.app-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 20px 80px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 32px;
  background: var(--soft);
  border: 1px solid var(--stroke);
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(15, 22, 36, 0.6);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
}

.hero-status {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-end;
}

.nav {
  display: flex;
  gap: 10px;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
}

.nav a.active {
  color: var(--text);
  border-color: var(--stroke);
  background: rgba(255, 255, 255, 0.04);
}

.hero h1 {
  margin: 8px 0;
  font-size: clamp(2rem, 3vw, 2.6rem);
}

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

.status-card {
  background: linear-gradient(135deg, rgba(127, 93, 255, 0.3), rgba(139, 92, 246, 0.15));
  padding: 16px 20px;
  border-radius: 12px;
  border: 1px solid rgba(127, 93, 255, 0.3);
  min-width: 180px;
  text-align: center;
}

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

.card {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.card header h2 {
  margin: 0;
  font-size: 1.2rem;
}

.card header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

label {
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

input,
select,
button,
textarea {
  font: inherit;
}

input,
select,
textarea {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

select option {
  background: var(--card);
  color: var(--text);
}

form h3 {
  margin: 8px 0 4px;
  color: var(--text);
}

button {
  padding: 12px 16px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #05080f;
  font-weight: 600;
  transition: transform 0.15s ease;
}

button:hover {
  transform: translateY(-1px);
}

button.ghost {
  background: transparent;
  border: 1px solid var(--stroke);
  color: var(--text);
}

.hero-status button.ghost {
  width: 100%;
}

.divider {
  height: 1px;
  background: var(--stroke);
  margin: 12px 0;
}

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

.activity {
  background: var(--card);
  border-radius: 18px;
  border: 1px solid var(--stroke);
  padding: 24px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.activity header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.activity header h2 {
  margin: 0;
}

.activity ul {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.activity li {
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.9rem;
}

.activity li.success {
  border-color: rgba(74, 222, 128, 0.4);
  color: var(--success);
}

.activity li.error {
  border-color: rgba(251, 113, 133, 0.4);
  color: var(--danger);
}

#toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 14px 18px;
  border-radius: 12px;
  background: rgba(15, 22, 36, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  transform: translateY(12px);
}

#toast.visible {
  opacity: 1;
  transform: translateY(0);
}

#toast.error {
  border-color: rgba(251, 113, 133, 0.6);
}

@media (max-width: 720px) {
  .hero {
    flex-direction: column;
    text-align: center;
  }
  .hero-status {
    align-items: center;
    width: 100%;
  }

  button,
  input,
  select {
    width: 100%;
  }
}
