:root {
  color-scheme: light;
  --bg-1: #e0ecff;
  --bg-2: #eef2ff;
  --bg-3: #e5e7eb;
  --bg-4: #c7d2fe;
  --ink-1: #0f172a;
  --ink-2: #334155;
  --ink-3: #64748b;
  --panel: rgba(255, 255, 255, 0.95);
  --accent: #4f46e5;
  --accent-2: #2563eb;
  --success: #16a34a;
  --danger: #dc2626;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background:
    radial-gradient(circle at top left, var(--bg-1) 0, var(--bg-2) 30%, var(--bg-3) 65%, var(--bg-4) 100%);
  color: var(--ink-1);
}

.shell {
  width: 100%;
  max-width: 1100px;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.82), rgba(30, 64, 175, 0.92));
  box-shadow:
    0 32px 80px rgba(15, 23, 42, 0.55),
    0 0 0 1px rgba(15, 23, 42, 0.7);
  padding: 1px;
  overflow: hidden;
}

.login {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 0;
  background: radial-gradient(circle at top, rgba(239, 246, 255, 0.9), rgba(248, 250, 252, 0.95));
  border-radius: 27px;
  overflow: hidden;
}

.brand {
  padding: 32px 28px 28px;
  border-right: 1px solid rgba(148, 163, 184, 0.35);
  background:
    radial-gradient(circle at top left, rgba(129, 140, 248, 0.32), transparent 55%),
    linear-gradient(to bottom right, rgba(255, 255, 255, 0.95), rgba(239, 246, 255, 0.98));
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.logo-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 12px;
  background: conic-gradient(from 210deg, #4f46e5, #22c55e, #f97316, #ec4899, #4f46e5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.9rem;
  box-shadow: 0 16px 30px rgba(79, 70, 229, 0.6);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0f172a;
}

.logo-subtitle {
  font-size: 0.78rem;
  color: #6b7280;
}

.title {
  font-size: 2.05rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #020617;
}

.subtitle {
  font-size: 0.95rem;
  color: #6b7280;
  line-height: 1.55;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  border-radius: 999px;
  padding: 4px 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(239, 246, 255, 0.95);
  color: #1d4ed8;
  border: 1px solid rgba(191, 219, 254, 0.9);
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.3);
}

.badge-muted {
  background: rgba(248, 250, 252, 0.9);
  color: #4b5563;
  border-color: rgba(203, 213, 225, 0.9);
}

.hint-text {
  font-size: 0.82rem;
  color: #94a3b8;
}

.panel {
  padding: 28px 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.panel-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.panel-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #9ca3af;
  font-weight: 600;
}

.panel-meta {
  font-size: 1rem;
  color: var(--ink-2);
  font-weight: 600;
}

.ms-button {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: white;
  color: var(--ink-1);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  box-shadow:
    0 16px 30px rgba(15, 23, 42, 0.12),
    0 0 0 1px rgba(226, 232, 240, 0.9);
}

.ms-button:hover {
  transform: translateY(-2px);
  border-color: rgba(79, 70, 229, 0.5);
  box-shadow:
    0 20px 40px rgba(15, 23, 42, 0.16),
    0 0 0 1px rgba(129, 140, 248, 0.6);
}

.ms-button:active {
  transform: translateY(0);
}

.ms-logo {
  display: grid;
  grid-template-columns: repeat(2, 10px);
  grid-template-rows: repeat(2, 10px);
  gap: 3px;
}

.ms-square {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.ms-1 { background: #f25022; }
.ms-2 { background: #7fba00; }
.ms-3 { background: #00a4ef; }
.ms-4 { background: #ffb900; }

.result {
  background: var(--panel);
  border-radius: 16px;
  padding: 16px;
  box-shadow:
    0 16px 30px rgba(15, 23, 42, 0.12),
    0 0 0 1px rgba(226, 232, 240, 0.9);
  min-height: 120px;
  color: var(--ink-2);
}

.result h3 {
  margin: 10px 0 6px;
  font-size: 0.95rem;
  color: var(--ink-1);
}

.result p {
  margin: 4px 0;
  font-size: 0.92rem;
}

.ok {
  color: var(--success);
  font-weight: 600;
}

.error {
  color: var(--danger);
  font-weight: 600;
}

pre {
  margin-top: 10px;
  text-align: left;
  background: #0f172a;
  color: #bbf7d0;
  padding: 12px;
  border-radius: 10px;
  overflow-x: auto;
  max-height: 320px;
  font-size: 0.82rem;
}

@media (max-width: 900px) {
  .login {
    grid-template-columns: minmax(0, 1fr);
  }

  .brand {
    border-right: none;
    border-bottom: 1px solid rgba(148, 163, 184, 0.35);
  }
}

@media (max-width: 640px) {
  body {
    padding: 10px;
  }

  .shell {
    border-radius: 22px;
  }

  .login {
    border-radius: 21px;
  }

  .brand,
  .panel {
    padding: 20px 18px;
  }

  .title {
    font-size: 1.6rem;
  }

  .ms-button {
    width: 100%;
    justify-content: center;
  }
}
