/* =====================================================
   RESET & BASE
   ===================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ms-blue:        #0067b8;
  --ms-blue-hover:  #005da6;
  --ms-blue-active: #004f8c;
  --ms-text:        #1b1b1b;
  --ms-text-muted:  #6e6e6e;
  --ms-border:      #767676;
  --ms-error:       #a4262c;
  --ms-card-w:      440px;

  --edu-safe:   #16a34a;
  --edu-card-w: 760px;

  /* Paleta corporativa Grupo Talentum (grupo-talentum.com) */
  --gt-magenta:      #c50046;
  --gt-magenta-dark: #9e0038;
  --gt-orange:       #f99956;
  --gt-orange-dark:  #d9722e;
  --gt-green:        #b6e175;
  --gt-green-dark:   #5f8a2a;
  --gt-green-text:   #3f5c1c;
  --gt-gold:         #fde171;
  --gt-gold-dark:    #8a6d1f;
  --gt-gold-text:    #6b4f10;
  --gt-turquoise:    #46c7de;
  --gt-gray-text:    #565655;
  --gt-dark:         #232425;
  --gt-dark-2:       #1c1c1c;
}

html, body {
  min-height: 100%;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif;
  font-size: 15px;
  color: var(--ms-text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ms-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.hidden { display: none !important; }

/* =====================================================
   MICROSOFT LOGIN — BACKGROUND
   Real Microsoft 365 login background asset
   ===================================================== */
.ms-bg {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 16px 60px;
  position: relative;
  overflow: hidden;

  background-color: #f3f2f1;
  background-image: url("https://logincdn.msftauth.net/shared/5/images/fluent_web_light_2_145a07dcb971527a82b8.svg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* ── Card stack container ── */
.ms-center {
  width: 100%;
  max-width: var(--ms-card-w);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── Card ── */
.ms-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .12);
  padding: 44px 44px 36px;
  width: 100%;
}

/* Smaller options card */
.ms-card--options {
  padding: 0;
}

/* ── Logo ── */
.ms-logo {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin-bottom: 20px;
}
.ms-logo span {
  font-size: 20px;
  font-weight: 600;
  color: var(--ms-text);
  letter-spacing: -0.2px;
}

/* ── Title ── */
.ms-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--ms-text);
  line-height: 1.2;
  text-align: left;
}

/* ── Subtitle ── */
.ms-subtitle {
  font-size: 15px;
  color: var(--ms-text);
  text-align: center;
  margin-bottom: 24px;
  line-height: 1.4;
}

/* ── Input, bordered box (Fluent style) ── */
.ms-field-group {
  position: relative;
  margin-bottom: 4px;
}

.ms-input {
  width: 100%;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--ms-border);
  border-radius: 4px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ms-text);
  background: transparent;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

.ms-input::placeholder {
  color: var(--ms-text-muted);
  font-size: 14px;
}

.ms-input:focus {
  border-color: var(--ms-blue);
  box-shadow: 0 0 0 1px var(--ms-blue);
}

#password-input { padding-right: 40px; }

.ms-input.is-error {
  border-color: var(--ms-error);
}

.ms-input-line { display: none; }

/* Password eye toggle */
.ms-pw-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ms-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
}
.ms-pw-toggle:hover { color: var(--ms-text); }
.ms-pw-toggle:focus-visible { outline: 2px solid var(--ms-blue); border-radius: 2px; }

/* ── Error message ── */
.ms-error {
  color: var(--ms-error);
  font-size: 12px;
  min-height: 14px;
  margin-top: 5px;
  line-height: 1.3;
}

/* ── Link rows ── */
.ms-link-row {
  margin-top: 12px;
  font-size: 14px;
}
.ms-link-row a { font-size: 14px; color: var(--ms-blue); }

/* ── Button row ── */
.ms-btn-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 24px;
}
.ms-btn-row--spread {
  justify-content: space-between;
  align-items: center;
}

/* Primary blue button */
.ms-btn-primary {
  height: 42px;
  width: auto;
  min-width: 108px;
  padding: 0 20px;
  background: var(--ms-blue);
  color: #fff;
  font-size: 15px;
  font-family: inherit;
  font-weight: 600;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  letter-spacing: .01em;
  transition: background .1s;
  white-space: nowrap;
}
.ms-btn-primary:hover  { background: var(--ms-blue-hover); }
.ms-btn-primary:active { background: var(--ms-blue-active); }
.ms-btn-primary:focus-visible { outline: 2px solid var(--ms-text); outline-offset: 2px; }

/* ── Sign-up row (below button) ── */
.ms-signup-row {
  margin-top: 24px;
  text-align: center;
  font-size: 14px;
  color: var(--ms-text);
}
.ms-signup-row a { color: var(--ms-blue); }

/* ── Back row: ← email (password screen) ── */
.ms-back-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-bottom: 16px;
  max-width: 100%;
  overflow: hidden;
}
.ms-back-row:focus-visible { outline: 2px solid var(--ms-blue); border-radius: 2px; }
.ms-back-arrow {
  font-size: 15px;
  color: var(--ms-text);
  flex-shrink: 0;
  line-height: 1;
}
.ms-back-email {
  font-size: 15px;
  color: var(--ms-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Options card button ── */
.ms-options-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 14px 20px;
  background: none;
  border: none;
  font-size: 14px;
  font-family: inherit;
  color: var(--ms-text);
  cursor: pointer;
  text-align: left;
  transition: background .1s;
}
.ms-options-btn:hover { background: rgba(0, 0, 0, .04); }
.ms-options-btn:focus-visible { outline: 2px solid var(--ms-blue); outline-offset: -2px; }

/* ── Crear cuenta: fila usuario@dominio ── */
.ms-signup-email-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ms-signup-email-row .ms-input { flex: 1; min-width: 0; }
.ms-signup-at { font-size: 15px; color: var(--ms-text); flex-shrink: 0; }

.ms-select {
  height: 40px;
  padding: 0 10px;
  border: 1px solid var(--ms-border);
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ms-text);
  background: #fff;
  outline: none;
  flex-shrink: 0;
}
.ms-select:focus { border-color: var(--ms-blue); box-shadow: 0 0 0 1px var(--ms-blue); }

/* ── Opciones de inicio de sesión ── */
.ms-options-title { font-size: 20px; font-weight: 600; margin-bottom: 12px; }

.ms-options-list { display: flex; flex-direction: column; }

.ms-options-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  padding: 16px 0;
  background: none;
  border: none;
  border-bottom: 1px solid #e1e1e1;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
.ms-options-item:last-child { border-bottom: none; }
.ms-options-item:hover { background: rgba(0, 0, 0, .03); }

.ms-options-icon { flex-shrink: 0; color: var(--ms-text); margin-top: 2px; }
.ms-options-help { flex-shrink: 0; color: var(--ms-text-muted); margin-top: 2px; }

.ms-options-text { flex: 1; }
.ms-options-text strong { display: block; font-size: 14px; font-weight: 600; color: var(--ms-text); margin-bottom: 2px; }
.ms-options-text span { font-size: 13px; color: var(--ms-text-muted); line-height: 1.4; }

.ms-options-back {
  margin-top: 20px;
  height: 36px;
  padding: 0 20px;
  background: #fff;
  border: 1px solid var(--ms-border);
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ms-text);
  cursor: pointer;
}
.ms-options-back:hover { background: #f3f2f1; }

/* ── Page footer ── */
.ms-page-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 20px;
  font-size: 12px;
}
.ms-page-footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}
.ms-page-footer-links a,
.ms-page-footer-note a {
  color: var(--ms-text-muted);
}
.ms-page-footer-links a:hover,
.ms-page-footer-note a:hover {
  color: var(--ms-text);
}
.ms-page-footer-note {
  color: var(--ms-text-muted);
  text-align: center;
}

/* ── Required asterisk ── */
.ms-required { color: var(--ms-error); }

/* ── Field label ── */
.ms-label {
  display: block;
  font-size: 13px;
  color: var(--ms-text);
  margin-bottom: 6px;
}

/* ── Button row: left aligned ── */
.ms-btn-row--start {
  justify-content: flex-start;
  align-items: center;
  gap: 20px;
}

/* =====================================================
   RECOVER ACCOUNT SCREEN
   Plain page (no card), matches Microsoft's real recovery flow
   ===================================================== */
.ms-recover-page {
  min-height: 100vh;
  background: #fff;
}

.ms-recover-content {
  max-width: 700px;
  padding: 48px 32px 100px;
}

.ms-recover-page .ms-title {
  font-size: 28px;
  font-weight: 400;
  margin-bottom: 4px;
}

.ms-recover-subtitle {
  font-size: 20px;
  font-weight: 400;
  color: var(--ms-text-muted);
  margin-bottom: 16px;
}

.ms-recover-desc {
  font-size: 13px;
  color: var(--ms-text-muted);
  line-height: 1.5;
  margin-bottom: 20px;
  max-width: 560px;
}

.ms-recover-page .ms-input { max-width: 320px; }

.ms-recover-example {
  font-size: 12px;
  color: var(--ms-text-muted);
  margin-top: 6px;
  margin-bottom: 20px;
}

.ms-captcha-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}

#captcha-canvas { border-radius: 2px; }

.ms-captcha-actions {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 70px;
}

.ms-icon-btn {
  background: none;
  border: none;
  padding: 4px;
  color: var(--ms-text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ms-icon-btn:hover { color: var(--ms-text); }

/* =====================================================
   EDUCATIONAL SCREEN
   ===================================================== */
.edu-wrapper {
  min-height: 100vh;
  background: #f4f4f4;
  font-family: "Arial Narrow", Arial, "Helvetica Neue", Helvetica, sans-serif;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 16px 60px;
}

.edu-card {
  width: 100%;
  max-width: 700px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 6px 32px rgba(0,0,0,.12);
  overflow: hidden;
}

/* ── Cabecera ── */
.edu-header {
  background: linear-gradient(135deg, var(--gt-dark) 0%, var(--gt-dark-2) 100%);
  border-bottom: 3px solid var(--gt-magenta);
  color: #fff;
  padding: 44px 40px 36px;
  text-align: center;
}
.edu-icon     { font-size: 52px; line-height: 1; margin-bottom: 16px; }
.edu-icon img { max-width: 220px; max-height: 60px; width: auto; height: auto; }
.edu-title    { font-size: clamp(20px, 3.5vw, 26px); font-weight: 700; margin-bottom: 12px; line-height: 1.3; letter-spacing: .01em; }
.edu-subtitle { font-size: 15px; opacity: .85; max-width: 480px; margin: 0 auto; line-height: 1.5; }

/* ── Aviso "todo ok" ── */
.edu-safe-box {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: #f2f9e8;
  border-left: 4px solid var(--gt-green-dark);
  margin: 24px 32px;
  padding: 18px 20px;
  border-radius: 8px;
}
.edu-safe-icon { font-size: 22px; flex-shrink: 0; line-height: 1; margin-top: 2px; }
.edu-safe-box p { font-size: 14px; color: var(--gt-green-text); line-height: 1.55; margin-bottom: 6px; }
.edu-safe-box p:last-child { margin-bottom: 0; }

/* ── Secciones comunes ── */
.edu-section { padding: 0 32px 28px; }
.edu-section--learn { background: #f9f9f9; padding-top: 24px; padding-bottom: 32px; }

.edu-section h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 700;
  color: var(--gt-dark);
  margin-bottom: 12px;
  padding-top: 24px;
  border-top: 1px solid #e5e5e5;
}
.edu-section:first-of-type h2 { border-top: none; padding-top: 8px; }

.edu-intro { font-size: 14px; color: var(--gt-gray-text); margin-bottom: 16px; line-height: 1.6; }

/* ── Lista de señales (numerada) ── */
.edu-clues-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.edu-clues-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: #fff4ec;
  border: 1px solid #f7c9a0;
  border-radius: 10px;
  padding: 14px 16px;
}
.edu-clue-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: var(--gt-orange-dark);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  margin-top: 1px;
}
.edu-clues-list li div:not(.edu-clue-num) { display: flex; flex-direction: column; gap: 3px; }
.edu-clues-list li strong { font-size: 14px; color: var(--gt-orange-dark); }
.edu-clues-list li span   { font-size: 13px; color: #a5602a; line-height: 1.5; }

/* ── Vídeo micro-aprendizaje ── */
.edu-learn-video-wrap { margin-top: 18px; }
.edu-learn-video-wrap video { width: 100%; max-width: 480px; display: block; margin: 0 auto; border-radius: 8px; }

/* ── Botón micro-aprendizaje ── */
.edu-learn-btn-wrap { text-align: center; margin-top: 18px; }
.edu-learn-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--gt-magenta);
  color: #fff;
  padding: 13px 28px;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s, transform .12s;
  box-shadow: 0 4px 14px rgba(197,0,70,.30);
}
.edu-learn-btn:hover { background: var(--gt-magenta-dark); transform: translateY(-1px); text-decoration: none; }

/* ── Regla de oro ── */
.edu-golden-rule {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: #fffbea;
  border: 1px solid #f5e2a0;
  border-left: 4px solid var(--gt-gold-dark);
  margin: 0 32px 28px;
  padding: 20px;
  border-radius: 10px;
}
.edu-golden-icon { font-size: 26px; flex-shrink: 0; line-height: 1; }
.edu-golden-rule h3 { font-size: 15px; font-weight: 700; color: var(--gt-gold-text); margin-bottom: 6px; }
.edu-golden-rule p  { font-size: 14px; color: var(--gt-gold-text); line-height: 1.6; }

/* ── Aviso de discreción ── */
.edu-discretion-box {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: #eefbfd;
  border: 1px solid #a9e6ef;
  border-left: 4px solid var(--gt-turquoise);
  margin: 0 32px 28px;
  padding: 20px;
  border-radius: 10px;
}
.edu-discretion-icon { font-size: 26px; flex-shrink: 0; line-height: 1; }
.edu-discretion-box h3 { font-size: 15px; font-weight: 700; color: #0f6d7d; margin-bottom: 6px; }
.edu-discretion-box p  { font-size: 14px; color: #0f6d7d; line-height: 1.6; }

/* ── Pie de gracias ── */
.edu-thanks {
  background: linear-gradient(135deg, var(--gt-dark) 0%, var(--gt-dark-2) 100%);
  padding: 22px 32px;
  text-align: center;
}
.edu-thanks p {
  color: rgba(255,255,255,.9);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .01em;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 500px) {
  .ms-card          { padding: 32px 24px 24px; }
  .ms-page-footer   { position: static; padding: 16px; justify-content: center; }
  .edu-header       { padding: 32px 20px 28px; }
  .edu-safe-box     { margin: 16px; }
  .edu-section      { padding: 0 16px 24px; }
  .edu-section--learn { padding: 20px 16px 28px; }
  .edu-golden-rule  { margin: 0 16px 24px; }
  .edu-thanks       { padding: 18px 20px; }
}
