:root {
  --primary:  #0f4c81;
  --primary-h:#0a3560;
  --radius:   12px;
  --shadow:   0 8px 32px rgba(0,0,0,.12);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f0f4f8;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── PANTALLAS ── */
.auth-screen,
.routing-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100vh;
  padding: 24px;
}

.routing-screen { display: none; }

/* ── CARD ── */
.auth-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
  text-align: center;
}

.auth-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: var(--primary);
  color: #fff;
  border-radius: 14px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 24px;
}

.auth-card h1 {
  font-size: 22px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 10px;
}

.auth-card > p {
  color: #64748b;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 32px;
}

/* ── BOTÓN MICROSOFT ── */
.auth-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 13px 28px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
  width: 100%;
  justify-content: center;
}
.auth-btn:hover:not(:disabled) { background: var(--primary-h); }
.auth-btn:disabled { opacity: .6; cursor: not-allowed; }

/* ── ERROR ── */
.auth-error {
  display: none;
  margin-top: 18px;
  background: #fee2e2;
  color: #991b1b;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 13px;
  text-align: left;
}

/* ── ROUTING SCREEN ── */
.routing-msg {
  font-size: 16px;
  color: #1a1a2e;
  margin-bottom: 28px;
}

.routing-sub {
  color: #64748b;
  font-size: 14px;
  margin-top: 16px;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #e2e8f0;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin: 0 auto;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── SELECTION SCREEN ── */
.selection-screen {
  display: none;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100vh;
  padding: 24px;
}

.selection-wrap {
  text-align: center;
  width: 100%;
  max-width: 600px;
}

.selection-greeting {
  font-size: 18px;
  color: #1a1a2e;
  margin-bottom: 6px;
}

.selection-sub {
  color: #64748b;
  font-size: 14px;
  margin-bottom: 32px;
}

.select-cards {
  display: flex;
  gap: 16px;
}

.select-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: var(--radius);
  padding: 32px 24px;
  text-decoration: none;
  color: #1a1a2e;
  box-shadow: var(--shadow);
  transition: border-color .2s, transform .15s, box-shadow .2s;
}

.select-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(15,76,129,.18);
}

.select-icon {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  background: #eff6ff;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.select-title {
  font-size: 16px;
  font-weight: 700;
}

.select-desc {
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
  text-align: center;
}

@media (max-width: 480px) {
  .select-cards { flex-direction: column; }
}
