/* ============================================================
   WESTON — PORTAL CORPORATIVO
   Hoja de estilos global (base + portal)

   ESTRUCTURA DE COLUMNAS (independientes, nunca se superponen)

   >= 1101px                 861px — 1100px          <= 860px
   ┌──────┬────────┬──────┐   ┌────┬───────────┐      ┌───────────┐
   │ SB-L │ CENTRO │ SB-R │   │SB-L│  CENTRO   │      │ SB-L(strip)│
   │      │        │      │   ├────┴───────────┤      ├───────────┤
   │Acceso│        │Forms │   │ SB-R (grid)    │      │  CENTRO   │
   └──────┴────────┴──────┘   └────────────────┘      ├───────────┤
                                                     │   SB-R    │
                                                     └───────────┘

   SB-L = Accesos rápidos | SB-R = Formularios y solicitudes
   Ambas columnas laterales comparten la misma estética (app-card).

   Reglas de oro:
   - Cada columna es un item flex con min-width:0 / min-height:0
   - Ningún elemento de una columna usa position:absolute fuera de ella
   - Ningún ancho fijo en px sin su max-width:100% correspondiente
   ============================================================ */


/* ============================================================
   1. TOKENS
   ============================================================ */

:root {
  --bg:            #04080F;
  --bg-2:          #070E18;
  --panel:         #0A121C;
  --panel-soft:    rgba(11, 22, 34, .78);

  --cyan:          #1A9DD3;
  --cyan-light:    #2EC4F5;
  --green:         #34D399;

  --white:         #E9F4FB;
  --text:          #C3D3E0;
  --muted:         #7C90A2;

  --glass:         rgba(255, 255, 255, .035);
  --glass-border:  rgba(46, 196, 245, .18);
  --hairline:      rgba(255, 255, 255, .07);

  --header-h:      56px;
  --footer-h:      36px;

  --sidebar-w:     285px;
  --forms-w:       285px;

  --radius:        14px;

  --mono:          'JetBrains Mono', ui-monospace, Consolas, monospace;
}


/* ============================================================
   2. RESET / BASE
   ============================================================ */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;

  height: 100vh;
  height: 100svh;

  display: flex;
  flex-direction: column;

  overflow-x: hidden;

  font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  color: var(--text);

  background:
    radial-gradient(1100px 620px at 18% -10%, rgba(26,157,211,.13), transparent 62%),
    radial-gradient(900px 520px at 100% 100%, rgba(46,196,245,.08), transparent 60%),
    linear-gradient(180deg, var(--bg-2), var(--bg));
  background-attachment: fixed;
}

img { max-width: 100%; }

a { text-decoration: none; }

/* Scrollbars con forma propia, en un tono oscuro acorde a la UI (sin resaltar) */
* { scrollbar-width: thin; scrollbar-color: rgba(26,157,211,.45) rgba(255,255,255,.05); }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-track {
  background: rgba(255,255,255,.05);
  border-radius: 20px;
}
*::-webkit-scrollbar-thumb {
  background: rgba(26,157,211,.45);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 20px;
}
*::-webkit-scrollbar-thumb:hover { background: rgba(26,157,211,.7); }


/* ============================================================
   3. FONDO ANIMADO (nunca interfiere con el layout)
   ============================================================ */

#particles-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: .55;
}

.scan-line {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(46,196,245,.45), transparent);
  animation: scan 8s linear infinite;
}

@keyframes scan {
  0%   { transform: translateY(0); opacity: 0; }
  8%   { opacity: 1; }
  92%  { opacity: 1; }
  100% { transform: translateY(100vh); opacity: 0; }
}


/* ============================================================
   4. HEADER
   ============================================================ */

header {
  position: relative;
  z-index: 40;
  flex: 0 0 auto;

  min-height: var(--header-h);

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;

  padding: 8px clamp(12px, 2vw, 22px);

  background: rgba(4, 8, 16, .88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--glass-border);
}

.logo-wrap {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-width: 0;
}

.logo-wrap img {
  height: 34px;
  width: auto;
  max-width: 190px;
  object-fit: contain;
}

.header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.dept-badge,
header .footer-block {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  padding: 5px 10px;

  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: rgba(26, 157, 211, .07);

  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--cyan-light);
  white-space: nowrap;
}

header .footer-block .label { color: var(--muted); }

header .footer-block .value {
  font-family: var(--mono);
  letter-spacing: .5px;
  color: var(--white);
}

/* Botón de acceso (login) en el header */
.header-login {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid var(--cyan);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(26,157,211,.28), rgba(46,196,245,.10));
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--white);
  white-space: nowrap;
  transition: box-shadow .2s, transform .2s;
}

.header-login:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 0 18px rgba(46, 196, 245, .35);
}


/* ============================================================
   5. LAYOUT PRINCIPAL — 3 COLUMNAS INDEPENDIENTES
   ============================================================ */

/* Flexbox en vez de Grid a propósito: con columnas fijas en px +
   una pista flexible, CSS Grid sufre errores de redondeo bajo el
   zoom del navegador que desplazan el contenido central hacia la
   izquierda. Flexbox reparte el espacio sobrante de forma estable. */
.main-layout {
  position: relative;
  z-index: 1;

  flex: 1 1 auto;

  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;

  width: 100%;
  min-width: 0;
  min-height: 0;

  overflow: hidden;
}

/* Cada columna: caja propia, scroll propio, sin desbordes laterales */
.sidebar,
.main-content {
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}


/* ------------------------------------------------------------
   5.1 COLUMNAS LATERALES — SIDEBARS (izq. y der. gemelas)
   ------------------------------------------------------------ */

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 12px 22px;
  background: rgba(6, 12, 20, .55);
}

/* Izquierda: accesos rápidos */
.sidebar-left {
  flex: 0 0 var(--sidebar-w);
  width: var(--sidebar-w);
  max-width: var(--sidebar-w);
  border-right: 1px solid var(--glass-border);
}

/* Derecha: formularios y solicitudes (misma estética) */
.sidebar-right {
  flex: 0 0 var(--forms-w);
  width: var(--forms-w);
  max-width: var(--forms-w);
  border-left: 1px solid var(--glass-border);
  background: rgba(6, 12, 20, .45);
}

.sidebar-title {
  display: flex;
  align-items: center;
  gap: 8px;

  padding: 0 4px 12px;
  margin-bottom: 4px;

  border-bottom: 1px solid var(--hairline);

  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--cyan-light);
  white-space: nowrap;
}

.app-card {
  position: relative;

  display: flex;
  align-items: center;
  gap: 10px;

  padding: 10px 12px;

  min-width: 0;

  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--glass);

  color: inherit;
  cursor: pointer;

  transition: border-color .2s, background .2s, transform .2s;
}

.app-card:hover {
  border-color: var(--glass-border);
  background: rgba(26, 157, 211, .09);
  transform: translateX(3px);
}

.sidebar-right .app-card:hover {
  transform: translateX(-3px);
}

.app-icon {
  flex: 0 0 auto;

  width: 40px;
  height: 40px;

  display: grid;
  place-items: center;

  border: 1px solid var(--hairline);
  border-radius: 10px;
  overflow: hidden;
}

.app-icon img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.app-info {
  flex: 1 1 auto;
  min-width: 0;
}

.app-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--white);

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-url {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-arrow {
  flex: 0 0 auto;
  font-size: 11px;
  color: var(--cyan);
  opacity: 0;
  transition: opacity .2s, transform .2s;
}

.app-card:hover .app-arrow {
  opacity: 1;
  transform: translateX(2px);
}

/* Tarjeta deshabilitada (próximos formularios) */
.app-card.is-disabled {
  opacity: .45;
  cursor: not-allowed;
  border-style: dashed;
}

.app-card.is-disabled:hover {
  transform: none;
  background: var(--glass);
  border-color: var(--hairline);
}

/* Etiqueta "Nuevo" para formularios recientes */
.app-badge {
  flex: 0 0 auto;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #04121c;
  background: var(--cyan-light);
  border-radius: 20px;
  padding: 3px 8px;
}

/* Globo del acceso "Suite" */
.planet-globe {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 32% 28%, #2EC4F5, #0C5C82 70%, #05293C);
  box-shadow: 0 0 12px rgba(46, 196, 245, .35);
  overflow: hidden;
}

.planet-grid {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.16) 0 1px, transparent 1px 7px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.12) 0 1px, transparent 1px 7px);
  opacity: .7;
  animation: spin-grid 12s linear infinite;
}

.planet-letter {
  position: relative;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
}

@keyframes spin-grid {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ------------------------------------------------------------
   5.2 COLUMNA CENTRAL — CONTENIDO
   ------------------------------------------------------------ */

.main-content {
  position: relative;

  flex: 1 1 0%;
  min-width: 0;

  display: flex;
  flex-direction: column;
  align-items: center;

  padding: clamp(16px, 2.2vw, 34px);
}

.geo {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(40px);
}

.geo-1 {
  width: 300px;
  max-width: 60%;
  aspect-ratio: 1;
  top: -60px;
  right: -60px;
  background: rgba(26, 157, 211, .12);
}

.geo-2 {
  width: 220px;
  max-width: 45%;
  aspect-ratio: 1;
  bottom: 40px;
  left: -70px;
  background: rgba(46, 196, 245, .08);
}

/* Se centra según su propio contenido (no estira a todo el ancho de la
   columna): así el video y el texto quedan centrados aunque la ventana
   se achique y la columna central sea más angosta que 1080px. */
.innovation-slider {
  position: relative;
  z-index: 1;

  width: fit-content;
  max-width: min(100%, 1080px);
  margin-inline: auto;
  min-width: 0;
}

.slide { display: none; }

.slide.active {
  display: block;
  animation: fadeUp .5s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.slide-inner {
  position: relative;
  z-index: 2;
  min-width: 0;
}

.slide-eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;

  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--muted);
}

.slide-eyebrow::before,
.slide-eyebrow::after {
  content: '';
  width: 28px;
  height: 2px;
  background: var(--cyan);
  flex: 0 0 auto;
  box-shadow: 0 0 6px rgba(26, 157, 211, .35);
}

.slide-headline {
  margin: 16px 0 24px;

  font-size: clamp(26px, 3.8vw, 46px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.5px;
  text-align: center;
  color: var(--white);

  overflow-wrap: break-word;
}

.slide-headline .accent { color: var(--cyan-light); }

.slide-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 22px;
}

.slide-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;

  padding: 13px 22px;
  max-width: 100%;

  border: 1px solid var(--cyan);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(26,157,211,.28), rgba(46,196,245,.10));
  box-shadow: 0 0 22px rgba(26, 157, 211, .22);

  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--white);

  transition: box-shadow .2s, transform .2s;
}

.slide-cta:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(46, 196, 245, .4);
}

.slide-video { min-width: 0; }

.slide-video-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;

  margin-bottom: 12px;
  font-size: 14px;
  color: var(--text);
  text-align: center;
}

.ghost-underline {
  color: var(--cyan-light);
  border-bottom: 1px dashed rgba(46, 196, 245, .6);
  cursor: pointer;
}

/* Video: proporción fija, ancho fluido — nunca desborda la columna */
.video-wrapper {
  position: relative;
  width: 100%;
  max-width: 640px;
  margin-inline: auto;
  aspect-ratio: 16 / 9;

  border: 1px solid var(--glass-border);
  border-radius: 14px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .45);
}

.video-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.video-steps {
  display: flex;
  align-items: stretch;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;

  width: 100%;
  max-width: 640px;
  margin-inline: auto;
  margin-top: 18px;
}

.vstep {
  flex: 1 1 150px;
  min-width: 0;

  display: flex;
  align-items: center;
  gap: 10px;

  padding: 12px;

  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--glass);
}

.vstep-num {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--cyan-light);
  flex: 0 0 auto;
}

.vstep-label {
  font-size: 11px;
  line-height: 1.4;
  color: var(--muted);
  min-width: 0;
}

.vstep-label strong { color: var(--white); }

.vstep-arrow {
  display: flex;
  align-items: center;
  color: var(--cyan);
  opacity: .5;
  flex: 0 0 auto;
}

/* Marca de agua: recortada por el slider, sin efecto sobre el flujo */
.slide-visual {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  z-index: 0;

  font-size: clamp(140px, 15vw, 230px);
  color: var(--cyan);
  opacity: .05;
  pointer-events: none;
  user-select: none;
}


/* ============================================================
   6. FOOTER
   ============================================================ */

footer {
  position: relative;
  z-index: 40;
  flex: 0 0 auto;

  min-height: var(--footer-h);

  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;

  padding: 6px clamp(10px, 2vw, 18px);

  background: rgba(4, 8, 16, .92);
  border-top: 1px solid var(--glass-border);

  font-size: 11px;
}

footer .footer-block {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  color: var(--muted);
}

footer .footer-block .value { color: var(--text); }

.footer-divider {
  width: 1px;
  height: 14px;
  background: var(--hairline);
  flex: 0 0 auto;
}

.security-tip {
  flex: 1 1 240px;
  min-width: 0;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  text-align: center;
  color: var(--muted);
}

.security-tip i { color: var(--cyan-light); }

.svc-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  padding: 3px 10px;

  border: 1px solid rgba(52, 211, 153, .4);
  border-radius: 20px;
  background: rgba(52, 211, 153, .08);

  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--green);
  white-space: nowrap;
}

.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: .35; }
}


/* ============================================================
   7. MODALES
   ============================================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: clamp(10px, 3vw, 24px);

  background: rgba(2, 6, 12, .82);
  backdrop-filter: blur(6px);

  opacity: 0;
  visibility: hidden;
  transition: opacity .25s, visibility .25s;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  position: relative;

  width: min(960px, 100%);
  max-height: 88vh;
  max-height: 88svh;
  overflow-y: auto;

  padding: clamp(18px, 3vw, 30px);

  border: 1px solid var(--glass-border);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
}

.modal-content-center {
  width: min(620px, 100%);
  text-align: center;
}

.modal-close {
  position: absolute;
  top: 8px;
  right: 12px;
  z-index: 2;

  width: 34px;
  height: 34px;

  border: 0;
  background: none;
  color: var(--muted);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.modal-close:hover { color: var(--white); }

.modal-header {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;

  padding-bottom: 16px;
  margin-bottom: 20px;

  border-bottom: 1px solid var(--hairline);
}

.modal-header img {
  height: 38px;
  width: auto;
  flex: 0 0 auto;
}

.modal-header-right { margin-left: auto; }

.modal-header h2 {
  margin: 0;
  min-width: 0;

  font-size: clamp(17px, 2.4vw, 24px);
  font-weight: 700;
  color: var(--white);
}

.modal-header h2 small {
  display: block;
  margin-top: 3px;

  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--muted);
}

.update-modal-header { justify-content: center; text-align: center; }

.modal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.modal-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;

  padding: 16px 10px;
  min-width: 0;

  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--glass);

  color: var(--text);
  text-align: center;

  transition: border-color .2s, background .2s, transform .2s;
}

.modal-item:hover {
  border-color: var(--glass-border);
  background: rgba(26, 157, 211, .1);
  transform: translateY(-3px);
  color: var(--white);
}

.modal-item-icon img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.modal-item-name {
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.35;
}

.update-img-container { margin-bottom: 18px; }

.update-img-container img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 42vh;
  object-fit: contain;
  margin-inline: auto;
  border-radius: 12px;
  border: 1px solid var(--hairline);
}

.update-alert-body {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 18px;
}

.update-alert-body strong { color: var(--cyan-light); }

.update-alert-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.update-hand-icon {
  color: var(--cyan-light);
  font-size: 20px;
  display: inline-block;
  transform: rotate(90deg);
  animation: handBounce 1.4s ease-in-out infinite;
}

@keyframes handBounce {
  0%, 100% {
    transform: rotate(90deg) translateX(0);
  }

  50% {
    transform: rotate(90deg) translateX(6px);
  }
}


/* ============================================================
   8. BREAKPOINTS
   ============================================================ */

/* ------------------------------------------------------------
   8.1  <= 1280px — columnas laterales más estrechas
   ------------------------------------------------------------ */
@media (max-width: 1280px) {
  :root {
    --sidebar-w: 248px;
    --forms-w: 248px;
  }

  .app-icon { width: 36px; height: 36px; }
  .app-name { font-size: 13px; }
  .slide-visual { display: none; }
}


/* ------------------------------------------------------------
   8.2  861px — 1100px
   Sidebar izq. + Centro arriba, Formularios a lo ancho debajo.
   El layout deja de tener altura fija: la página scrollea.
   ------------------------------------------------------------ */
@media (max-width: 1100px) {

  .main-layout {
    flex-wrap: wrap;
    height: auto;
    overflow: visible;
  }

  .sidebar,
  .main-content {
    height: auto;
    overflow: visible;
  }

  .sidebar-left {
    flex: 0 0 236px;
    width: 236px;
    max-width: 236px;
  }

  .main-content {
    flex: 1 1 320px;
    min-width: 280px;
  }

  .sidebar-right {
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;

    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    align-items: stretch;
    gap: 10px;

    border-left: 0;
    border-top: 1px solid var(--glass-border);
  }

  .sidebar-right .sidebar-title {
    grid-column: 1 / -1;
  }
}


/* ------------------------------------------------------------
   8.3  <= 860px
   Una sola columna. El sidebar izq. pasa a ser tira horizontal.
   ------------------------------------------------------------ */
@media (max-width: 860px) {

  .main-layout {
    flex-direction: column;
    flex-wrap: nowrap;
  }

  .sidebar-left {
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;

    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;

    padding: 10px 12px;

    border-right: 0;
    border-bottom: 1px solid var(--glass-border);

    overflow-x: auto;
    overflow-y: hidden;
  }

  .sidebar-left .sidebar-title {
    flex: 0 0 auto;
    padding: 6px 12px 6px 0;
    margin: 0;
    border-bottom: 0;
    border-right: 1px solid var(--hairline);
  }

  .sidebar-left .app-card {
    flex: 0 0 auto;
    width: 190px;
  }

  .sidebar-left .app-card:hover { transform: none; }

  .main-content {
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .sidebar-right {
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
  }
}


/* ------------------------------------------------------------
   8.4  <= 640px — móvil
   ------------------------------------------------------------ */
@media (max-width: 640px) {

  body { font-size: 13px; }

  header {
    justify-content: center;
    text-align: center;
  }

  .header-right { justify-content: center; }

  header .footer-block .label { display: none; }

  .sidebar-left .app-card { width: 168px; padding: 9px 10px; }
  .app-icon { width: 34px; height: 34px; }
  .app-icon img { width: 21px; height: 21px; }
  .app-name { font-size: 12.5px; }
  .app-url  { font-size: 9px; }

  .main-content { padding: 18px 14px 26px; }

  .slide-headline { margin: 14px 0 20px; }

  .slide-cta {
    width: 100%;
    justify-content: center;
    padding: 12px 16px;
    font-size: 12px;
  }

  .video-steps { gap: 8px; }
  .vstep { flex: 1 1 100%; }
  .vstep-arrow { display: none; }

  footer {
    justify-content: center;
    text-align: center;
    padding: 8px 12px;
  }

  .footer-divider { display: none; }

  .security-tip { flex: 1 1 100%; }

  .modal-grid { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); }
  .modal-header { justify-content: center; text-align: center; }
  .modal-header-right { display: none; }
  .update-img-container img { max-height: 32vh; }
}


/* ------------------------------------------------------------
   8.5  <= 400px — móviles muy angostos
   ------------------------------------------------------------ */
@media (max-width: 400px) {

  .logo-wrap img { height: 28px; }

  .dept-badge,
  header .footer-block {
    padding: 4px 8px;
    font-size: 9px;
  }

  .sidebar-left .app-card { width: 152px; }

  .slide-eyebrow { font-size: 10px; letter-spacing: 1.6px; }
  .slide-eyebrow::before { width: 18px; }

  .modal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


/* ------------------------------------------------------------
   8.6  Pantallas bajas en horizontal (móvil apaisado)
   ------------------------------------------------------------ */
@media (max-height: 560px) and (min-width: 861px) {
  .main-layout { overflow: visible; height: auto; }
  .sidebar, .main-content { overflow: visible; height: auto; }
}


/* ------------------------------------------------------------
   8.7  Accesibilidad — movimiento reducido
   ------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
