/* corp.css — Identidad corporativa OEA Energy (portal WEB_OEA_110926) */
:root {
  --paper: #07111c;
  --ink: #e7eef6;
  --muted: #9eb0c4;
  --rule: #1c3348;
  --side: #081018;
  --accent: #2ec4e6;
  --gold: #c8a86a;
  --gold-2: #e7cf9b;
  --danger: #ff6b6b;
  --ok: #3ddc97;
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: "Segoe UI", Arial, sans-serif;
}

body { min-height: 100vh; min-height: 100dvh; }

a { color: var(--accent); }

.shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

/* ---------------------------------------------------------------- escenario */
.stage {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 20px 48px;
}
.stage .bleed {
  position: absolute;
  inset: -6%;
  background: center / cover no-repeat;
  filter: blur(26px) saturate(1.05) brightness(.55);
  transform: scale(1.12);
}
.stage .bgimg {
  position: absolute;
  inset: 0;
  background: center / cover no-repeat;
}
.stage .vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(7,17,28,.15) 30%, rgba(7,17,28,.78) 100%);
}
.stage .frame {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 560px;
}
.stage .frame > main { width: 100%; }

/* ---------------------------------------------------------------- selector idioma */
.langs {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 40;
  display: flex;
  gap: 6px;
}
.langs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 52px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--rule);
  color: var(--muted);
  text-decoration: none;
  font-size: 11.5px;
  letter-spacing: .08em;
  background: rgba(8,16,24,.86);
  backdrop-filter: blur(6px);
}
.langs a .ic { width: 14px; height: 14px; }
.langs a.on {
  background: linear-gradient(180deg, #7ae6f6, var(--accent));
  color: var(--paper);
  border-color: var(--accent);
  font-weight: 700;
  box-shadow: 0 1px 0 rgba(255,255,255,.45) inset, 0 4px 10px rgba(46,196,230,.3);
}

/* ---------------------------------------------------------------- tarjeta */
.auth-panel {
  position: relative;
  background: linear-gradient(180deg, rgba(12,24,38,.95), rgba(9,19,30,.97));
  border: 1px solid var(--rule);
  border-radius: 18px;
  padding: 30px 28px;
  box-shadow: 0 24px 60px rgba(0,0,0,.5);
  overflow: hidden;
  backdrop-filter: blur(4px);
}
.auth-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  opacity: .9;
}

.kicker {
  font-size: 11px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 6px;
}
.auth-panel h2 {
  margin: 0.25rem 0;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  color: var(--ink);
}

.note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

/* ---------------------------------------------------------------- formulario */
.auth-form { display: block; margin-top: 14px; }
.auth-label {
  display: block;
  margin: 14px 0 6px;
  font-size: 11.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.auth-input,
.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="tel"],
.auth-form select,
.auth-form textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(158,176,196,.32);
  background: rgba(255,255,255,.035);
  color: var(--ink);
  font: inherit;
  font-size: 14.5px;
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.auth-input:focus,
.auth-form input:focus,
.auth-form select:focus,
.auth-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(46,196,230,.18);
  background: rgba(255,255,255,.05);
}
.auth-form input::placeholder { color: rgba(158,176,196,.65); }
.auth-form input[type="file"] { padding: 9px 12px; }

.auth-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
}
.auth-checkbox input { margin-top: 3px; accent-color: var(--accent); }

.auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  margin-top: 20px;
  padding: 13px 22px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #7ae6f6, var(--accent));
  color: #06202a;
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(255,255,255,.55) inset, 0 10px 22px rgba(46,196,230,.24), 0 3px 0 #12819a;
  transition: transform .08s, filter .15s, box-shadow .15s;
}
.auth-btn:hover { filter: brightness(1.06); }
.auth-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(255,255,255,.4) inset, 0 4px 10px rgba(46,196,230,.2); }

.auth-btn.secondary {
  background: rgba(255,255,255,.04);
  color: var(--ink);
  border: 1px solid var(--rule);
  box-shadow: none;
}
.auth-btn.secondary:hover { border-color: rgba(46,196,230,.5); color: var(--accent); }

.auth-link { color: var(--accent); text-decoration: none; font-size: 13px; }
.auth-link:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- avisos */
.alert {
  border-radius: 12px;
  padding: 11px 14px;
  margin: 0 0 12px;
  font-size: 13.5px;
  line-height: 1.45;
}
.alert.success { color: #b8f5d8; background: rgba(61,220,151,.1); border: 1px solid rgba(61,220,151,.35); }
.alert.error { color: #ffd0d0; background: rgba(255,107,107,.1); border: 1px solid rgba(255,107,107,.35); }
.alert.info { color: #cfe9ff; background: rgba(46,196,230,.1); border: 1px solid rgba(46,196,230,.35); }

/* ---------------------------------------------------------------- OTP */
.otp-group {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin: 10px 0 4px;
}
.otp-input {
  width: 100%;
  max-width: 58px;
  height: 60px;
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(158,176,196,.35);
  border-radius: 12px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.otp-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(46,196,230,.2);
}
.otp-input.filled { border-color: var(--gold); }

/* ---------------------------------------------------------------- menú inferior */
.side {
  position: relative;
  flex-shrink: 0;
  background: var(--side);
  border-top: 1px solid var(--rule);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  min-width: 0;
}
.side .logo { width: 38px; height: 38px; object-fit: contain; flex-shrink: 0; }
.menu {
  display: flex;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--rule) transparent;
}
.menu::-webkit-scrollbar { height: 5px; }
.menu::-webkit-scrollbar-thumb { background: var(--rule); border-radius: 99px; }
.side a.item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  text-decoration: none;
  padding: 9px 11px;
  letter-spacing: .04em;
  font-size: 12.5px;
  text-transform: uppercase;
  white-space: nowrap;
  border-radius: 10px;
  flex-shrink: 0;
}
.side a.item .ic { width: 18px; height: 18px; }
.side a.item span.en { display: none; color: var(--gold); font-size: 10.5px; text-transform: none; letter-spacing: .02em; }
.side a.item.active, .side a.item:hover { color: var(--accent); background: rgba(46,196,230,.08); }

/* ---------------------------------------------------------------- botón ON 3D */
.on-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 20px 0 6px;
  text-decoration: none;
  width: 100%;
}
.on-cta .ico-wrap {
  width: 104px;
  height: 104px;
  border-radius: 26px;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 30% 20%, #173348, #08121c 70%);
  border: 1px solid rgba(46,196,230,.35);
  transform: perspective(700px) rotateX(6deg);
  animation: onBlink 2.4s ease-in-out infinite, onGlow 2.4s ease-in-out infinite;
}
.on-cta img {
  width: 78px;
  height: 78px;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(46,196,230,.45)) drop-shadow(0 2px 2px rgba(0,0,0,.6));
  transition: transform .2s;
}
.on-cta:hover img { transform: scale(1.06); }
.on-cta:active { transform: translateY(2px); }
.on-cta .lbl {
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold-2);
}
@keyframes onBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: .55; }
}
@keyframes onGlow {
  0%, 100% { box-shadow: 0 8px 20px rgba(0,0,0,.5), 0 0 0 1px rgba(46,196,230,.18) inset, 0 0 14px rgba(46,196,230,.18); }
  50% { box-shadow: 0 8px 20px rgba(0,0,0,.5), 0 0 0 1px rgba(200,168,106,.4) inset, 0 0 30px rgba(46,196,230,.5), 0 0 46px rgba(200,168,106,.22); }
}

/* ---------------------------------------------------------------- tablas */
.corp-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.corp-table th { text-align: left; color: var(--gold); font-weight: 600; padding: 8px; border-bottom: 1px solid var(--rule); }
.corp-table td { padding: 8px; border-top: 1px solid var(--rule); color: var(--ink); }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 620px) {
  .stage { padding: 48px 12px 36px; }
  .auth-panel { padding: 22px 18px; }
  .otp-group { gap: 6px; }
  .otp-input { height: 52px; font-size: 20px; }
  .side a.item { padding: 8px; }
  .side a.item b { display: none; }
  .langs a { width: 42px; height: 32px; }
  .langs a .ic { display: none; }
}
@media (min-width: 621px) {
  .side a.item b { display: inline-grid; line-height: 1.05; font-weight: 600; }
  .side a.item span.en { display: block; }
}

/* ---------------------------------------------------------------- marca intranet */
.corp-brand { position: absolute; top: 14px; left: 18px; z-index: 6; display: flex; align-items: center; gap: 10px; }
.corp-brand img { width: 54px; height: 54px; object-fit: contain; filter: drop-shadow(0 6px 16px rgba(46,196,230,.28)); }
.corp-brand-kicker { font-size: 10px; letter-spacing: .28em; text-transform: uppercase; color: var(--gold); }
.corp-brand-title { font-family: 'Playfair Display', Georgia, serif; font-size: 20px; color: var(--ink); line-height: 1.1; }
@media (max-width: 620px) {
  .corp-brand img { width: 40px; height: 40px; }
  .corp-brand-title { font-size: 16px; }
}

/* ---------------------------------------------------------------- botones ON por rol */
.on-cta.green .ico-wrap { border-color: rgba(61,220,151,.55); animation: onBlinkGreen 2.4s ease-in-out infinite, onGlowGreen 2.4s ease-in-out infinite; }
.on-cta.purple .ico-wrap { border-color: rgba(178,132,255,.55); animation: onBlinkPurple 2.4s ease-in-out infinite, onGlowPurple 2.4s ease-in-out infinite; }
@keyframes onBlinkGreen { 0%,100% { opacity: 1; } 50% { opacity: .55; } }
@keyframes onBlinkPurple { 0%,100% { opacity: 1; } 50% { opacity: .55; } }
@keyframes onGlowGreen {
  0%,100% { box-shadow: 0 8px 20px rgba(0,0,0,.5), 0 0 0 1px rgba(61,220,151,.2) inset, 0 0 14px rgba(61,220,151,.2); }
  50% { box-shadow: 0 8px 20px rgba(0,0,0,.5), 0 0 0 1px rgba(61,220,151,.55) inset, 0 0 30px rgba(61,220,151,.55); }
}
@keyframes onGlowPurple {
  0%,100% { box-shadow: 0 8px 20px rgba(0,0,0,.5), 0 0 0 1px rgba(178,132,255,.2) inset, 0 0 14px rgba(178,132,255,.2); }
  50% { box-shadow: 0 8px 20px rgba(0,0,0,.5), 0 0 0 1px rgba(178,132,255,.55) inset, 0 0 30px rgba(178,132,255,.55); }
}

/* ---------------------------------------------------------------- formatos */
.formats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 14px; }
.format-card { display: block; text-decoration: none; color: var(--ink); background: rgba(20,10,16,.55); border: 1px solid var(--rule); border-radius: 12px; padding: 14px 16px; transition: border-color .15s, transform .15s; }
.format-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.format-card .ic { width: 22px; height: 22px; color: var(--accent); }
.format-card b { display: block; margin-top: 8px; font-size: 14px; }
.format-card small { color: var(--muted); font-size: 11.5px; }
