/* =========================================================
   MOTOR ALTERNY — Identidad visual
   Paleta extraida directamente del logo oficial (assets/img/alterny-logo.png)
   ========================================================= */
:root{
  --alt-blue-300:#5CA8FF;
  --alt-blue-500:#0082FC;   /* azul brillante del swoosh */
  --alt-blue-600:#006FFB;   /* azul de la "Y" del logo */
  --alt-blue-700:#0057E8;   /* extremo oscuro del degradado */
  --alt-navy-900:#081B42;   /* azul rey oscuro derivado, para fondos */
  --alt-navy-800:#0E2657;
  --alt-white:#FFFFFF;
  --alt-gray-100:#F4F6FA;
  --alt-gray-200:#E8ECF3;
  --alt-gray-300:#D7DEEA;
  --alt-gray-500:#8493AC;
  --alt-ink:#0B1633;
  --alt-ink-soft:#4A5876;
  --alt-green:#1F9D66;
  --alt-amber:#C98A1B;
  --alt-red:#C43D3D;
  --alt-radius:10px;
  --alt-shadow:0 1px 2px rgba(8,27,66,0.06), 0 8px 24px rgba(8,27,66,0.06);
}

/* =========================================================
   PANTALLA DE ACCESO ([motor_acceso]) — diseño dividido
   ========================================================= */
.alt-acceso{
  min-height: 100vh; display:flex; align-items:stretch;
  font-family:-apple-system,"Inter","IBM Plex Sans",sans-serif;
  margin: -20px calc(-50vw + 50%);
}
.alt-acceso-marca{
  flex:1.1; background: linear-gradient(160deg, var(--alt-navy-900), var(--alt-navy-800) 60%, var(--alt-blue-700));
  color:var(--alt-white); display:flex; flex-direction:column; justify-content:center;
  padding: 60px 64px; position:relative; overflow:hidden;
}
.alt-acceso-marca::after{
  content:""; position:absolute; right:-120px; bottom:-120px; width:420px; height:420px; border-radius:50%;
  background: radial-gradient(circle, rgba(0,130,252,0.35), transparent 70%);
}
.alt-acceso-icon{ height:80px; margin-bottom:36px; }
.alt-acceso-marca h1{ font-size:30px; line-height:1.25; font-weight:700; letter-spacing:-0.01em; margin:0 0 16px; max-width:420px; }
.alt-acceso-marca p{ font-size:14.5px; color:rgba(255,255,255,0.75); max-width:380px; line-height:1.5; }
.alt-acceso-panel{ flex:1; display:flex; align-items:center; justify-content:center; background:var(--alt-gray-100); padding:40px; }
.alt-acceso-card{ width:100%; max-width:380px; background:var(--alt-white); border-radius:14px; box-shadow:var(--alt-shadow); padding:40px 36px; }
.alt-acceso-logo{ height:128px; margin-bottom:24px; }
.alt-acceso-card h2{ font-size:20px; font-weight:700; margin:0 0 4px; color:var(--alt-ink); }
.alt-acceso-sub{ font-size:13.5px; color:var(--alt-ink-soft); margin:0 0 24px; }
.alt-acceso-error{ background:rgba(196,61,61,0.08); color:var(--alt-red); border:1px solid rgba(196,61,61,0.25); border-radius:8px; padding:10px 14px; font-size:13px; margin-bottom:18px; }
.alt-acceso-card form label{ display:block; font-size:12.5px; font-weight:600; color:var(--alt-ink); margin:16px 0 6px; }
.alt-acceso-card form label:first-of-type{ margin-top:0; }
.alt-acceso-card form input{
  width:100%; padding:12px 14px; font-size:14px; border:1px solid var(--alt-gray-300); border-radius:8px;
  background:var(--alt-white); color:var(--alt-ink);
}
.alt-acceso-card form input:focus{ outline:none; border-color:var(--alt-blue-500); box-shadow:0 0 0 3px rgba(0,130,252,0.12); }
.alt-acceso-card form button{
  width:100%; margin-top:22px; padding:13px; font-size:14.5px; font-weight:700; border:none; border-radius:8px;
  background:var(--alt-blue-600); color:#fff; cursor:pointer; transition:background .15s ease;
}
.alt-acceso-card form button:hover{ background:var(--alt-blue-700); }
.alt-acceso-footer{ text-align:center; font-size:12px; color:var(--alt-gray-500); margin:22px 0 0; }
@media (max-width:820px){
  .alt-acceso{ flex-direction:column; margin:0; min-height:auto; }
  .alt-acceso-marca{ padding:40px 28px; text-align:center; align-items:center; }
  .alt-acceso-marca h1{ font-size:22px; max-width:none; }
  .alt-acceso-marca p{ max-width:none; }
  .alt-acceso-icon{ margin-bottom:20px; }
  .alt-acceso-panel{ padding:28px 20px 48px; }
}

/* =========================================================
   ENCABEZADO (aplica a Motor, Operativos y Panel)
   ========================================================= */
.alt-header{
  background: var(--alt-navy-900);
  color: var(--alt-white);
  display:flex; align-items:center; justify-content:space-between;
  padding: 14px 28px;
  border-radius: 0 0 var(--alt-radius) var(--alt-radius);
  margin-bottom: 28px;
}
.alt-header .alt-brand{ display:flex; align-items:center; gap:10px; }
.alt-header .alt-brand img{ height:68px; width:auto; display:block; }
.alt-header .alt-brand .alt-title{
  font-family:-apple-system,"Inter","IBM Plex Sans",sans-serif; font-weight:700; font-size:15px; letter-spacing:0.02em;
  border-left:1px solid rgba(255,255,255,0.25); padding-left:12px; margin-left:2px; color:var(--alt-white);
}
.alt-header .alt-user{ display:flex; align-items:center; gap:14px; font-size:13px; color:rgba(255,255,255,0.85); }
.alt-header .alt-user a{ color:rgba(255,255,255,0.85); text-decoration:underline; white-space:nowrap; }
.alt-header .alt-user a:hover{ color:var(--alt-white); }
@media (max-width:640px){
  .alt-header{ padding:12px 16px; flex-wrap:wrap; row-gap:10px; }
  .alt-header .alt-brand img{ height:22px; }
  .alt-header .alt-brand .alt-title{ display:none; }
  .alt-header .alt-user{ flex-wrap:wrap; gap:10px 14px; width:100%; justify-content:flex-start; }
}

/* =========================================================
   PANTALLA DE "DEBES INICIAR SESION" (cuando el shortcode se ve sin login)
   ========================================================= */
.alt-gate{
  max-width:420px; margin:60px auto; text-align:center; padding:36px 28px;
  background:var(--alt-white); border:1px solid var(--alt-gray-300); border-radius:var(--alt-radius); box-shadow:var(--alt-shadow);
}
.alt-gate img{ height:96px; margin-bottom:16px; }
.alt-gate p{ color:var(--alt-ink-soft); font-size:14px; }

/* =========================================================
   MOTOR — contenedor principal
   ========================================================= */
#alterny-motor-root{
  --am-ink: var(--alt-ink); --am-ink-soft: var(--alt-ink-soft);
  --am-paper: var(--alt-gray-100); --am-paper-2: var(--alt-white);
  --am-line: var(--alt-gray-300); --am-gold: var(--alt-blue-500); --am-gold-deep: var(--alt-blue-700);
  --am-green: var(--alt-green);
  max-width: 780px; margin: 0 auto 60px; font-family: -apple-system,"Inter","IBM Plex Sans",sans-serif; color:var(--am-ink);
}
#alterny-motor-root *{ box-sizing:border-box; }

/* Indicador de progreso */
.alt-progress{ max-width:780px; margin:0 auto 18px; }
.alt-progress .alt-progress-label{ font-size:12.5px; color:var(--alt-ink-soft); margin-bottom:6px; font-weight:600; }
.alt-progress .alt-progress-track{ height:6px; background:var(--alt-gray-200); border-radius:99px; overflow:hidden; }
.alt-progress .alt-progress-fill{ height:100%; background: linear-gradient(90deg, var(--alt-blue-700), var(--alt-blue-500)); border-radius:99px; transition: width .25s ease; }

#alterny-motor-root .am-card{
  background:var(--am-paper-2); border:1px solid var(--am-line); border-radius:var(--alt-radius);
  padding:28px 30px; margin-bottom:18px; box-shadow: var(--alt-shadow);
}
#alterny-motor-root h2{ font-size:19px; margin:0 0 6px; font-weight:700; letter-spacing:-0.01em; }
#alterny-motor-root p.am-sub{ margin:0 0 18px; color:var(--am-ink-soft); font-size:13.5px; }
#alterny-motor-root .am-field{ margin-bottom:16px; }
#alterny-motor-root .am-field label{ display:block; font-size:12.5px; font-weight:600; margin-bottom:6px; color:var(--am-ink); }
#alterny-motor-root .am-help{ font-size:12px; color:var(--am-ink-soft); margin-top:4px; }
#alterny-motor-root select, #alterny-motor-root input[type="text"], #alterny-motor-root input[type="number"]{
  width:100%; padding:10px 12px; font-size:14px; border:1px solid var(--am-line); border-radius:8px;
  background:var(--alt-white); color:var(--am-ink); transition:border-color .15s ease;
}
#alterny-motor-root select:focus, #alterny-motor-root input:focus{
  outline:none; border-color:var(--alt-blue-500); box-shadow:0 0 0 3px rgba(0,130,252,0.12);
}
#alterny-motor-root .am-row2{ display:grid; grid-template-columns:1fr 1fr; gap:14px; }
#alterny-motor-root .am-radiogroup{ display:flex; gap:10px; flex-wrap:wrap; }
#alterny-motor-root .am-radiogroup label{
  display:flex; align-items:center; gap:7px; border:1.5px solid var(--am-line); padding:12px 18px; border-radius:8px;
  font-size:13.5px; font-weight:600; cursor:pointer; transition: all .15s ease; background:var(--alt-white);
}
#alterny-motor-root .am-radiogroup label:has(input:checked){
  border-color: var(--alt-blue-500); background: rgba(0,130,252,0.06); color:var(--alt-blue-700);
}
#alterny-motor-root .am-conditional{ border-left:2px solid var(--alt-blue-300); padding-left:16px; margin-top:14px; margin-left:2px; }
#alterny-motor-root .am-actions{ display:flex; justify-content:space-between; align-items:center; margin-top:4px; }
#alterny-motor-root button{
  font-family:inherit; font-size:14px; font-weight:700; padding:12px 24px; border-radius:8px;
  border:none; background: var(--alt-blue-600) !important; color:#fff !important; cursor:pointer;
  transition: background .15s ease, transform .05s ease;
}
#alterny-motor-root button:hover{ background: var(--alt-blue-700) !important; }
#alterny-motor-root button:active{ transform: translateY(1px); }
#alterny-motor-root button.am-secondary{ background:transparent !important; color:var(--am-ink) !important; border:1.5px solid var(--am-line); }
#alterny-motor-root button.am-secondary:hover{ background:var(--alt-gray-100) !important; color:var(--am-ink) !important; }
#alterny-motor-root a{ color: var(--alt-blue-600); font-size:13.5px; text-decoration:none; font-weight:600; }
#alterny-motor-root a:hover{ text-decoration:underline; }

#alterny-motor-root .am-result-item{
  border:1.5px solid var(--am-line); border-radius:var(--alt-radius); padding:18px 20px; margin-bottom:12px;
  display:flex; justify-content:space-between; align-items:flex-start; gap:16px; background:var(--alt-white);
  transition: border-color .15s ease;
}
#alterny-motor-root .am-result-item.am-top{ border-color:var(--alt-blue-500); background: linear-gradient(180deg, rgba(0,130,252,0.05), rgba(0,130,252,0.01)); }
#alterny-motor-root .am-name{ font-weight:700; font-size:16px; }
#alterny-motor-root .am-terms{ font-size:12.5px; color:var(--am-ink-soft); margin-top:4px; }
#alterny-motor-root .am-badge{ font-size:11px; font-weight:700; padding:4px 10px; border-radius:99px; white-space:nowrap; }
#alterny-motor-root .am-badge.viable{ background:rgba(31,157,102,0.12); color:var(--alt-green); }
#alterny-motor-root .am-badge.condicional{ background:rgba(201,138,27,0.14); color:var(--alt-amber); }
#alterny-motor-root .am-badge.validar{ background:var(--alt-gray-200); color:var(--am-ink-soft); }
#alterny-motor-root .am-pickbtn{ padding:8px 16px; font-size:12.5px; }
#alterny-motor-root .am-choice-cards{ display:grid; grid-template-columns:1fr 1fr; gap:14px; }
#alterny-motor-root .am-choice-card{
  border:1.5px solid var(--am-line); border-radius:var(--alt-radius); padding:20px; text-align:left; background:var(--alt-white) !important; cursor:pointer;
}
#alterny-motor-root .am-choice-card:hover{ border-color:var(--alt-blue-500); }
#alterny-motor-root .am-choice-card, #alterny-motor-root .am-choice-card *{ color:var(--am-ink) !important; }
#alterny-motor-root .am-choice-card h3{ font-family:inherit; margin:0 0 6px; font-size:15px; font-weight:700; }
#alterny-motor-root .am-choice-card p{ margin:0; font-size:13px; color:var(--am-ink-soft) !important; }
#alterny-motor-root .am-doclist{ list-style:none; padding:0; margin:0; }
#alterny-motor-root .am-doclist li{ padding:9px 0; border-bottom:1px solid var(--am-line); font-size:13.5px; }
#alterny-motor-root .am-note{ font-size:13px; background:rgba(0,130,252,0.06); border:1px solid rgba(0,130,252,0.18); border-radius:8px; padding:12px 14px; color:var(--alt-navy-900); }
#alterny-motor-root .am-pill{ display:inline-block; font-size:11.5px; font-weight:700; padding:4px 12px; background:var(--alt-gray-200); border-radius:99px; color:var(--am-ink-soft); margin-bottom:14px; }
#alterny-motor-root .am-empty{ text-align:center; padding:40px 20px; color:var(--am-ink-soft); }
#alterny-motor-root hr{ border:none; border-top:1px solid var(--am-line); margin:20px 0; }
@media (max-width:640px){
  #alterny-motor-root .am-row2, #alterny-motor-root .am-choice-cards{ grid-template-columns:1fr; }
  #alterny-motor-root .am-card{ padding:20px 18px; }
  #alterny-motor-root select, #alterny-motor-root input[type="text"], #alterny-motor-root input[type="number"]{ font-size:16px; padding:12px; }
  #alterny-motor-root button{ width:100%; }
  #alterny-motor-root .am-actions{ flex-direction:column-reverse; gap:10px; align-items:stretch; }
  #alterny-motor-root .am-actions button, #alterny-motor-root .am-actions a{ text-align:center; }
}
