:root {
  --ink: #f4f8fc;
  --ink-2: #e8f0fa;
  --panel: rgba(255, 255, 255, 0.88);
  --panel-solid: #ffffff;
  --line: rgba(37, 99, 235, 0.14);
  --text: #0f172a;
  --muted: #64748b;
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --danger: #dc2626;
  --ok: #15803d;
  --radius: 18px;
  --shadow: 0 24px 60px rgba(37, 99, 235, 0.12);
  --font-display: "Syne", sans-serif;
  --font-body: "Manrope", sans-serif;
}

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

html,
body {
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-strong);
}

.atmosphere {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  background:
    radial-gradient(1100px 680px at 10% 15%, rgba(59, 130, 246, 0.18), transparent 55%),
    radial-gradient(900px 560px at 90% 80%, rgba(147, 197, 253, 0.35), transparent 50%),
    linear-gradient(160deg, #f8fbff 0%, #eef5ff 48%, #f5f8fc 100%);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.75;
  animation: drift 14s ease-in-out infinite alternate;
}

.orb-a {
  width: 420px;
  height: 420px;
  left: -80px;
  top: 12%;
  background: rgba(59, 130, 246, 0.22);
}

.orb-b {
  width: 520px;
  height: 520px;
  right: -120px;
  bottom: -60px;
  background: rgba(96, 165, 250, 0.28);
  animation-delay: -4s;
}

.grid-fade {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(37, 99, 235, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at 50% 40%, black 20%, transparent 75%);
}

.noise {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(24px, -18px, 0) scale(1.06); }
}

.login-body {
  min-height: 100vh;
}

.login-stage {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
  padding: clamp(24px, 5vw, 72px);
  max-width: 1180px;
  margin: 0 auto;
}

.brand-panel {
  animation: rise 0.8s ease both;
}

.eyebrow {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}

.brand-title {
  font-family: var(--font-display);
  font-size: clamp(42px, 7vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  font-weight: 800;
  margin-bottom: 20px;
  color: #0b1f44;
}

.brand-lead {
  max-width: 34ch;
  font-size: 17px;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 28px;
}

.brand-points {
  list-style: none;
  display: grid;
  gap: 10px;
  color: #334155;
  font-size: 14px;
}

.brand-points li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-points li::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.auth-panel,
.simple-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  padding: clamp(24px, 4vw, 36px);
  animation: rise 0.9s ease 0.08s both;
}

.auth-header {
  margin-bottom: 24px;
}

.auth-header h2 {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  color: #0b1f44;
}

.auth-header p {
  color: var(--muted);
  font-size: 14px;
}

.auth-form {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  font-size: 13px;
  color: #334155;
  font-weight: 600;
}

.field input {
  width: 100%;
  height: 48px;
  border-radius: 12px;
  border: 1px solid #dbe5f3;
  background: #ffffff;
  color: var(--text);
  padding: 0 14px;
  font: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.field input:focus {
  border-color: rgba(37, 99, 235, 0.7);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
  background: #ffffff;
}

.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 64px;
}

.toggle-pass {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.toggle-pass:hover {
  color: var(--accent-strong);
}

.btn-primary {
  margin-top: 8px;
  height: 50px;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #ffffff;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.18s ease, filter 0.18s ease, opacity 0.18s ease;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: wait;
}

.btn-primary.loading span {
  opacity: 0.55;
}

.form-msg {
  font-size: 13px;
  color: var(--danger);
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.2);
  border-radius: 10px;
  padding: 10px 12px;
}

.form-msg.ok {
  color: var(--ok);
  background: rgba(21, 128, 61, 0.08);
  border-color: rgba(21, 128, 61, 0.2);
}

.auth-footer {
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
}

.simple-body {
  min-height: 100vh;
  background:
    radial-gradient(900px 500px at 80% -10%, rgba(59, 130, 246, 0.14), transparent 50%),
    linear-gradient(180deg, #f8fbff, #eef4fb);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px clamp(18px, 4vw, 40px);
  border-bottom: 1px solid rgba(37, 99, 235, 0.1);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
}

.brand-mini {
  font-family: var(--font-display);
  font-weight: 700;
  color: #0b1f44;
  letter-spacing: -0.02em;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
}

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

.linkish {
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  cursor: pointer;
}

.simple-stage {
  max-width: 480px;
  margin: 0 auto;
  padding: 48px 20px 64px;
}

.simple-card {
  background: var(--panel-solid);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .login-stage {
    grid-template-columns: 1fr;
    align-content: center;
    padding-top: 48px;
    padding-bottom: 48px;
  }

  .brand-panel {
    text-align: left;
  }

  .brand-title {
    font-size: clamp(36px, 12vw, 52px);
  }

  .brand-points {
    display: none;
  }
}
