:root {
  --ink: #0f1a26;
  --fog: #f0f3f6;
  --slate: #6b7280;
  --mint: #2dd4bf;
  --sun: #f7b801;
  --rose: #ef4444;
  --navy: #0b1220;
  --ice: #d9e4f5;
  --glow: rgba(45, 212, 191, 0.35);
  --shadow: 0 20px 60px rgba(15, 26, 38, 0.18);
}

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

body {
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: #f2f3f8 url("background.svg") center/cover no-repeat fixed;
  line-height: 1.5;
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: inherit;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 48px 6vw;
  position: relative;
  overflow: hidden;
}

.login-stack {
  display: grid;
  gap: 16px;
  justify-items: center;
  z-index: 1;
}

.login-stack.is-password .login-options {
  display: none;
}

.login-panel {
  background: #ffffff;
  border-radius: 2px;
  padding: 44px 40px 40px;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.18);
  border: 1px solid #e5e7eb;
  width: 440px;
  min-height: 380px;
}

.is-hidden {
  display: none;
}

.panel-top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.panel-top::after {
  content: "";
  width: 30px;
  height: 30px;
}

.ms-brand-row.center {
  justify-self: center;
  margin-right: 0;
}

.ms-brand-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.ms-logo {
  display: grid;
  grid-template-columns: repeat(2, 12px);
  gap: 2px;
  width: 26px;
}

.ms-logo span {
  display: block;
  width: 12px;
  height: 12px;
}

.ms-logo span:nth-child(1) {
  background: #f25022;
}

.ms-logo span:nth-child(2) {
  background: #7fba00;
}

.ms-logo span:nth-child(3) {
  background: #00a4ef;
}

.ms-logo span:nth-child(4) {
  background: #ffb900;
}

.ms-brand {
  font-size: 0.9rem;
  color: #5f6368;
}

.login-panel h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 18px;
  color: #111827;
}

.login-header {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 20px;
}

.logo-square {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-weight: 700;
  text-transform: uppercase;
}

.login-title {
  font-weight: 700;
  color: #111827;
}

.login-sub {
  color: var(--slate);
  font-size: 0.95rem;
}

.login-body {
  display: grid;
  gap: 12px;
}

.login-panel input {
  width: 100%;
  display: block;
  padding: 10px 10px;
  border: 1px solid #d1d5db;
  border-radius: 2px;
  font-size: 0.95rem;
  background: #ffffff;
}

.login-panel input::placeholder {
  color: #5f6368;
}

.login-hint {
  font-size: 0.85rem;
  color: #374151;
  margin-top: 12px;
}

.login-hint span {
  color: #0067b8;
  font-weight: 500;
}

.login-link {
  font-size: 0.85rem;
  color: #0067b8;
  margin-top: 8px;
}

.login-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}

.btn {
  border: none;
  padding: 10px 26px;
  font-size: 0.85rem;
  min-width: 110px;
  cursor: default;
}

.btn.full {
  width: 100%;
  margin-top: 10px;
}

.btn.ghost {
  background: #c9c9c9;
  color: #111827;
}

.btn.primary {
  background: #0067b8;
  color: #ffffff;
}

.icon-btn {
  border: none;
  background: transparent;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  cursor: default;
}

.icon-arrow {
  width: 10px;
  height: 10px;
  border-left: 2px solid #6b7280;
  border-bottom: 2px solid #6b7280;
  transform: rotate(45deg);
}

.pill-email {
  display: inline-block;
  align-self: center;
  margin: 0 auto 16px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  font-size: 0.8rem;
  color: #374151;
  background: #f9fafb;
}

.link-btn {
  margin-top: 12px;
  border: none;
  background: transparent;
  color: #0067b8;
  font-size: 0.85rem;
  cursor: default;
}

.login-panel[data-step="password"] {
  text-align: center;
}

.login-panel[data-step="password"] .login-panel input,
.login-panel[data-step="password"] input {
  text-align: left;
}

.login-panel[data-step="password"] .login-actions {
  justify-content: center;
}

.login-options {
  width: 440px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.12);
  font-size: 0.9rem;
  color: #374151;
}

.options-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #6b7280;
  position: relative;
}

.options-icon::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 2px;
  background: #6b7280;
  bottom: -4px;
  right: -2px;
  transform: rotate(40deg);
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(45, 212, 191, 0.6);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(45, 212, 191, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(45, 212, 191, 0);
  }
}

@media (max-width: 540px) {
  .login-panel,
  .login-options {
    width: 100%;
  }
}
