:root {
  --bg: #07111f;
  --panel: rgba(14, 29, 49, 0.96);
  --line: rgba(138, 160, 188, 0.22);
  --text: #eef5ff;
  --muted: #9aacbf;
  --blue: #2563eb;
  --cyan: #22d3ee;
  --green: #19c37d;
  --red: #ef5f73;
  --yellow: #f5c84c;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: radial-gradient(circle at 20% 0%, rgba(37, 99, 235, 0.22), transparent 30rem), linear-gradient(180deg, #06101d, var(--bg));
  color: var(--text);
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
}

.login-shell {
  width: min(500px, 100%);
}

.login-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 1.2rem;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.3);
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  font-weight: 900;
}

.eyebrow {
  margin: 0 0 0.15rem;
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: 1.45rem;
}

.role-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.flow-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
  margin-bottom: 1rem;
}

button,
.links a {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(15, 31, 52, 0.74);
  color: var(--text);
}

button { cursor: pointer; }

.role-tabs button.active,
.flow-tabs button.active,
.primary-button {
  background: linear-gradient(135deg, var(--blue), #0f766e);
  border-color: rgba(96, 165, 250, 0.45);
  color: white;
  font-weight: 800;
}

.text-button {
  background: transparent;
  color: var(--cyan);
}

.form-stack {
  display: grid;
  gap: 0.75rem;
}

label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.88rem;
}

input {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(5, 12, 22, 0.78);
  color: var(--text);
  padding: 0 0.75rem;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.check-row {
  grid-template-columns: auto 1fr;
  align-items: start;
  color: var(--text);
}

.check-row input {
  margin-top: 0.2rem;
}

.toggle-row input {
  min-height: auto;
  width: 18px;
  height: 18px;
}

.status-box {
  margin-top: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(15, 31, 52, 0.58);
  color: var(--muted);
  padding: 0.8rem;
}

.status-box.success {
  border-color: rgba(25, 195, 125, 0.45);
  color: var(--green);
}

.status-box.warning {
  border-color: rgba(245, 200, 76, 0.45);
  color: var(--yellow);
}

.status-box.danger {
  border-color: rgba(239, 95, 115, 0.45);
  color: var(--red);
}

.links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-top: 1rem;
}

.links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.hidden {
  display: none;
}

@media (max-width: 560px) {
  .login-panel {
    padding: 1rem;
  }

  .flow-tabs {
    grid-template-columns: 1fr;
  }

  .links {
    grid-template-columns: 1fr;
  }
}
