/* ────────────────────────────────────
       VARIABLES — Brandbook Givers
    ──────────────────────────────────── */
    :root {
      --navy:        #B06C96;
      --navy-dark:   #75415F;
      --orange:      #FF9B0B;
      --orange-dark: #e08b0a;
      --terra:       #D9753B;
      --green-ok:    #16A34A;

      --bg:          #FAFBFD;
      --white:       #FFFFFF;
      --border:      #E2E8F0;
      --border-soft: #F0F4F8;
      --muted:       #94A3B8;
      --muted-light: #CBD5E1;
      --text:        #0F172A;

      --font: 'Ubuntu', system-ui, sans-serif;
    }

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

    body {
      font-family: var(--font);
      /* NUEVO FONDO CREMA/BLANQUITO SUTIL */
      background: #F9F7F3; 
      min-height: 100vh;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 24px;
      -webkit-font-smoothing: antialiased;
    }

    /* ────────────────────────────────────
       WRAPPER
    ──────────────────────────────────── */
    .login-card {
      display: flex;
      width: 100%;
      max-width: 920px;
      min-height: 570px;
      border-radius: 22px;
      overflow: hidden;
      /* Eliminamos el borde oscuro que tenía antes y suavizamos la sombra para el fondo claro */
      background: var(--white);
      box-shadow: 0 20px 60px rgba(0, 21, 48, 0.08);
    }

    /* ════════════════════════════════════
       PANEL IZQUIERDO — dark navy + glow
    ════════════════════════════════════ */
    .left-panel {
      flex: 1.25;
      background: linear-gradient(
      135deg,
      #5478A5 0%,
      #7FA3C7 100%
    );
      position: relative;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      padding: 36px 36px 28px;
      overflow: hidden;
    }

    /* Dot grid */
    .left-panel::before {
      content: '';
      position: absolute; inset: 0;
      background-image: radial-gradient(rgba(255,255,255,0.07) 1px, transparent 1px);
      background-size: 22px 22px;
      z-index: 0;
    }

    /* Glow naranja principal */
    .glow-main {
      position: absolute;
      width: 420px; height: 420px;
      background: var(--orange);
      filter: blur(120px);
      border-radius: 50%; opacity: 0.20;
      top: -120px; right: -90px; z-index: 0;
      animation: gpulse 7s ease-in-out infinite alternate;
    }

    /* Glow terracota secundario */
    .glow-sec {
      position: absolute;
      width: 220px; height: 220px;
      background: var(--terra);
      filter: blur(90px);
      border-radius: 50%; opacity: 0.14;
      bottom: 50px; left: -50px; z-index: 0;
    }

    @keyframes gpulse {
      0%   { opacity: .16; transform: scale(.90); }
      100% { opacity: .27; transform: scale(1.10); }
    }

    .left-inner {
      position: relative; z-index: 2;
      display: flex; flex-direction: column;
      height: 100%; justify-content: space-between;
    }

    /* ── Logo Givers ── */
    .givers-logo {
      display: flex; align-items: center; gap: 11px; margin-bottom: 24px;
    }
    .g-icon {
      width: 42px; height: 42px; border-radius: 11px;
      background: var(--orange);
      display: flex; align-items: center; justify-content: center;
      font-size: 20px; font-weight: 700; color: #fff;
      position: relative; flex-shrink: 0;
      box-shadow: 0 4px 16px rgba(255,155,11,.50);
    }
    .g-dot { position: absolute; width: 8px; height: 8px; background: #fff; border-radius: 50%; top: 6px; right: 6px; }
    .g-name    { font-size: 18px; font-weight: 700; color: #fff; }
    .g-name em { font-style: normal; color: var(--orange); }
    .g-sub     { font-size: 10px; color: rgba(255,255,255,.38); margin-top: 2px; }

    /* Badge norma */
    .norm-badge {
      display: inline-flex; align-items: center; gap: 7px;
      background: rgba(255,155,11,.12); border: 1px solid rgba(255,155,11,.30);
      border-radius: 100px; padding: 5px 12px 5px 8px;
      margin-bottom: 18px; width: fit-content;
    }
    .n-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); animation: blink 2s ease-in-out infinite; }
    @keyframes blink { 0%,100%{opacity:1} 50%{opacity:.3} }
    .n-txt { font-size: 10px; font-weight: 700; color: var(--orange); letter-spacing: .4px; }

    /* Headline */
    .left-title    { font-size: 25px; font-weight: 700; color: #fff; line-height: 1.3; margin-bottom: 10px; }
    .left-title em { font-style: normal; color: var(--orange); }
    .left-sub      { font-size: 13px; color: rgba(255,255,255,.42); line-height: 1.72; max-width: 275px; }

    /* Feature cards sobre oscuro */
    .features { display: flex; flex-direction: column; gap: 9px; margin-top: 26px; }
    .feat {
      display: flex; align-items: center; gap: 13px;
      background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.09);
      border-radius: 11px; padding: 11px 14px;
    }
    .feat-icon { width: 32px; height: 32px; border-radius: 9px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 15px; }
    .feat-title { font-size: 12px; font-weight: 700; color: rgba(255,255,255,.90); }
    .feat-desc  { font-size: 10px; color: rgba(255,255,255,.38); margin-top: 2px; }

    /* Footer izquierdo */
    .left-footer {
      display: flex; align-items: center; justify-content: space-between;
      padding-top: 14px; border-top: 1px solid rgba(255,255,255,.08);
    }
    .footer-copy { font-size: 9px; color: rgba(255,255,255,.20); }

    .rpg-chip {
      display: flex; align-items: center; gap: 7px;
      background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12);
      border-radius: 8px; padding: 6px 10px;
    }
    .rpg-chip-ico {
      width: 20px; height: 20px; border-radius: 5px;
      background: linear-gradient(135deg, var(--orange), var(--terra));
      display: flex; align-items: center; justify-content: center;
      font-size: 9px; font-weight: 700; color: #fff;
    }
    .rpg-chip-name { font-size: 10px; font-weight: 700; color: rgba(255,255,255,.85); }
    .rpg-chip-sub  { font-size: 8px; color: rgba(255,255,255,.32); }

    /* ════════════════════════════════════
       PANEL DERECHO — Formulario
    ════════════════════════════════════ */
    .right-panel {
      width: 368px; min-width: 300px;
      background: var(--bg);
      display: flex; flex-direction: column; justify-content: center;
      padding: 40px 32px;
      border-left: 1px solid rgba(0,0,0,.03);
    }

    /* Mini brand en form */
    .form-brand { display: flex; align-items: center; gap: 9px; margin-bottom: 20px; }
    .fb-icon {
      width: 36px; height: 36px; border-radius: 9px;
      background: var(--navy);
      display: flex; align-items: center; justify-content: center;
      font-size: 15px; font-weight: 700; color: var(--orange);
      position: relative; flex-shrink: 0;
    }
    .fb-dot    { position: absolute; width: 5px; height: 5px; background: var(--orange); border-radius: 50%; top: 5px; right: 5px; }
    .fb-name   { font-size: 14px; font-weight: 700; color: #1E293B; }
    .fb-name em { font-style: normal; color: var(--orange); }
    .fb-sub    { font-size: 10px; color: var(--muted); }

    .form-title { font-size: 19px; font-weight: 700; color: var(--text); margin-bottom: 3px; }
    .form-sub   { font-size: 12px; color: var(--muted); margin-bottom: 22px; }

    /* ── Selector de rol — cards ── */
    .role-grid { display: flex; gap: 8px; margin-bottom: 24px; }

    .role-card {
      flex: 1; cursor: pointer; border-radius: 13px;
      border: 1.5px solid var(--border); background: var(--white);
      padding: 12px 8px 11px; text-align: center;
      transition: all .2s cubic-bezier(.22,.68,0,1.2);
      position: relative; overflow: hidden; user-select: none;
    }
    .role-card:hover { border-color: #FFD89B; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(255,155,11,.10); }
    .role-card.active {
      border-color: var(--orange); background: #FFF7ED;
      box-shadow: 0 4px 18px rgba(255,155,11,.18); transform: translateY(-2px);
    }
    .role-card.active::after {
      content: ''; position: absolute; bottom: 0; left: 0; right: 0;
      height: 3px; background: var(--orange); border-radius: 0 0 13px 13px;
    }
    .rc-icon { width: 36px; height: 36px; border-radius: 9px; margin: 0 auto 8px; display: flex; align-items: center; justify-content: center; background: #F1F5F9; transition: background .2s; }
    .rc-icon svg { width: 17px; height: 17px; stroke: var(--muted); transition: stroke .2s; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
    .role-card.active .rc-icon { background: #FFE8C0; }
    .role-card.active .rc-icon svg { stroke: var(--orange); }
    .rc-label { font-size: 11px; font-weight: 700; color: #64748B; letter-spacing: .2px; transition: color .2s; }
    .rc-desc  { font-size: 9px; color: var(--muted-light); margin-top: 2px; transition: color .2s; }
    .role-card.active .rc-label { color: #92400E; }
    .role-card.active .rc-desc  { color: #B45309; }

    /* ── Campos ── */
    .fields-section { display: none; }
    .fields-section.visible { display: block; }

    .f-label { display: block; font-size: 10px; font-weight: 700; color: #64748B; margin-bottom: 6px; letter-spacing: .6px; text-transform: uppercase; }

    .f-group { margin-bottom: 14px; }

    .f-wrap { position: relative; }

    .f-input {
      width: 100%; padding: 12px 14px 12px 44px;
      border: 1.5px solid var(--border); border-radius: 10px;
      font-size: 13.5px; font-family: var(--font);
      background: var(--white); color: var(--text);
      outline: none; transition: all .18s;
      box-shadow: 0 1px 3px rgba(0,0,0,.04);
    }
    .f-input::placeholder { color: var(--muted-light); }
    .f-input:focus {
      border-color: var(--orange);
      box-shadow: 0 0 0 3px rgba(255,155,11,.12), 0 1px 3px rgba(0,0,0,.04);
    }

    .f-icon-box {
      position: absolute; left: 0; top: 0; bottom: 0;
      width: 44px; display: flex; align-items: center; justify-content: center;
      pointer-events: none;
    }
    .f-icon-inner {
      width: 26px; height: 26px; border-radius: 7px;
      background: #F1F5F9;
      display: flex; align-items: center; justify-content: center;
      transition: background .18s;
    }
    .f-icon-inner svg { width: 13px; height: 13px; stroke: var(--muted); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: stroke .18s; }
    .f-wrap:focus-within .f-icon-inner { background: #FFE8C0; }
    .f-wrap:focus-within .f-icon-inner svg { stroke: var(--orange); }

    /* Ojo de contraseña */
    .f-eye {
      position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
      background: none; border: none; cursor: pointer; padding: 4px;
      color: var(--muted); display: flex; align-items: center; transition: color .15s;
    }
    .f-eye:hover { color: var(--navy); }
    .f-eye svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

    /* Olvidé contraseña */
    .forgot-row { display: flex; justify-content: flex-end; margin: -4px 0 14px; }
    .forgot-link { font-size: 10px; font-weight: 600; color: var(--muted); text-decoration: none; transition: color .15s; }
    .forgot-link:hover { color: var(--orange); }

    /* Chip colaborador */
    .colab-info {
      background: #F0F9FF; border: 1px solid #BAE6FD;
      border-radius: 10px; padding: 11px 13px;
      font-size: 11px; color: #0369A1; line-height: 1.62;
      margin-bottom: 14px;
    }
    .colab-info strong { font-weight: 700; display: block; margin-bottom: 2px; color: #075985; }

    /* Botón */
    .btn-submit {
      width: 100%; padding: 13px 16px;
      border: none; border-radius: 10px;
      background: var(--orange); color: #fff;
      font-size: 14px; font-weight: 700; font-family: var(--font);
      cursor: pointer; transition: all .18s;
      display: flex; align-items: center; justify-content: center; gap: 8px;
      box-shadow: 0 4px 14px rgba(255,155,11,.30);
    }
    .btn-submit svg { width: 15px; height: 15px; stroke: #fff; fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; transition: transform .18s; }
    .btn-submit:hover { background: var(--orange-dark); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(255,155,11,.38); }
    .btn-submit:hover svg { transform: translateX(2px); }

    /* Divider + SSO */
    .divider { display: flex; align-items: center; gap: 10px; margin: 15px 0; }
    .div-line { flex: 1; height: 1px; background: var(--border); }
    .div-text { font-size: 10px; color: var(--muted-light); }

    .btn-sso {
      width: 100%; padding: 10px 14px;
      border: 1.5px solid var(--border); border-radius: 10px;
      background: var(--white); font-size: 12px; font-weight: 600;
      font-family: var(--font); color: #334155;
      cursor: pointer; transition: all .15s;
      display: flex; align-items: center; justify-content: center; gap: 9px;
      box-shadow: 0 1px 3px rgba(0,0,0,.04);
    }
    .btn-sso:hover { background: var(--bg); border-color: var(--muted-light); }
    .btn-sso svg { width: 16px; height: 16px; flex-shrink: 0; }

    /* Footer form */
    .form-footer {
      margin-top: 18px; padding-top: 15px;
      border-top: 1px solid var(--border-soft);
      display: flex; align-items: center; justify-content: space-between;
    }
    .form-footer-by { font-size: 9px; color: var(--muted-light); font-weight: 600; letter-spacing: .5px; text-transform: uppercase; }
    .rpg-badge { display: flex; align-items: center; gap: 6px; background: var(--white); border: 1px solid var(--border); border-radius: 7px; padding: 5px 9px; }
    .rpg-badge-icon { width: 17px; height: 17px; border-radius: 4px; background: linear-gradient(135deg,var(--orange),var(--terra)); display: flex; align-items: center; justify-content: center; font-size: 8px; font-weight: 700; color: #fff; }
    .rpg-badge-name { font-size: 10px; font-weight: 700; color: #1E293B; }

    /* ── Responsive ── */
    @media (max-width: 720px) {
      .left-panel { display: none; }
      .right-panel { width: 100%; border-left: none; }
      .login-card { max-width: 420px; box-shadow: 0 10px 30px rgba(0, 21, 48, 0.05); }
    }

  /* ==========================
   TOAST
========================== */
.toast{
    position:fixed;
    top:25px;
    right:25px;
    min-width:300px;
    max-width:420px;
    padding:16px 20px;
    border-radius:12px;
    color:white;
    font-size:14px;
    font-weight:600;
    opacity:0;
    transform:translateY(-20px);
    transition:.3s;
    z-index:99999;
    box-shadow:0 12px 30px rgba(0,0,0,.18);
}
.toast.show{
    opacity:1;
    transform:translateY(0);
}
.toast.success{
    background:#16A34A;
}
.toast.error{
    background:#DC2626;
}
.toast.warning{
    background:#F59E0B;
}
.toast.info{
    background:#2563EB;
}

/* V22 · logos reemplazables */
.rpg-badge{padding:4px 8px!important}.rpg-badge-img{height:30px;width:auto;display:block;border-radius:9px}


/* V23 · Iconos reemplazables */
.feat-icon img { width:19px; height:19px; object-fit:contain; display:block; }
.givers-logo img, .form-brand img, .left-footer img { object-fit:contain; }


/* V24 · Iconos negros y limpieza visual */
:root { --icon-color: #111827; }
.nav-ico.nav-img img,
.sb-item-icon img,
.top-nav-icon,
.notif-icon-img,
.logout-icon-img,
.feat-icon img,
.rc-icon-img img,
.f-icon-inner svg,
.f-eye svg {
  filter: brightness(0) saturate(100%) !important;
  opacity: .92;
}
.nav-btn span::before,
.nav-ico::before,
.sb-item-icon::before,
.stat-icon::before,
.corp-icon::before,
.professional-icon::before,
.rc-icon::before {
  display: none !important;
  content: none !important;
}
.nav-ico.nav-img,
.sb-item-icon,
.feat-icon,
.rc-icon {
  background: rgba(17,24,39,.045) !important;
  box-shadow: none !important;
}
.nav-btn.active .nav-ico.nav-img,
.sb-item.active .sb-item-icon,
.role-card.active .rc-icon {
  background: rgba(255,155,11,.14) !important;
}
.nav-ico.nav-img img,
.sb-item-icon img,
.top-nav-icon,
.notif-icon-img,
.logout-icon-img {
  width: 18px !important;
  height: 18px !important;
  object-fit: contain !important;
}
.notif-btn {
  display: inline-grid !important;
  place-items: center !important;
}
.brand-mark {
  width: 42px !important;
  height: 42px !important;
  border-radius: 14px !important;
  object-fit: contain !important;
}
.rc-icon-img img {
  width: 25px;
  height: 25px;
  display: block;
}


/* V26 · Contraste inteligente, logos sobre base blanca y reportes corporativos */
:root{
  --sidebar-icon-filter: brightness(0) saturate(100%);
  --surface-icon-filter: brightness(0) saturate(100%);
}
body.primary-dark{
  --sidebar-icon-filter: brightness(0) invert(1);
}
body.primary-light{
  --sidebar-icon-filter: brightness(0) saturate(100%);
}
.nav-ico.nav-img img,
.sb-icon-img,
.mobile-nav-icon-img,
.colab-icon-img{
  filter: var(--sidebar-icon-filter) !important;
}
.notif-icon-img,
.form-brand img.brand-mark,
.role-card img,
.feature-icon img{
  filter: var(--surface-icon-filter) !important;
}
.partner-logo,
.rpg-mini-logo,
.rpg-badge,
.left-footer img,
.powered-card,
.brand-partner-pill{
  background:#fff !important;
  border:1px solid rgba(226,232,240,.95) !important;
  box-shadow:0 10px 24px rgba(15,23,42,.10) !important;
  border-radius:12px !important;
  padding:5px 8px !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
}
.partner-logo img,
.rpg-mini-logo img,
.rpg-badge-img,
.left-footer img,
.powered-card img{
  max-height:22px !important;
  width:auto !important;
  object-fit:contain !important;
  display:block !important;
}
.brand-logo-img,
.sb-brand-logo,
.brand-logo-img img{
  object-fit:contain !important;
}
/* El logo RPG es oscuro: siempre se muestra compacto sobre fondo blanco */
.rpg-mini-logo img{ max-height:20px !important; }
.partner-logo.rpg-logo img{ max-height:22px !important; }

@media(max-width:760px){
  .rpg-mini-logo{ display:inline-flex !important; max-width:76px; }
  .partner-logo img, .rpg-mini-logo img, .rpg-badge-img{ max-height:18px !important; }
}


/* ================================================================
   V27 · responsive real, marca RPG/Givers y móvil simplificado
   ================================================================ */
:root {
  --mobile-safe-bottom: max(16px, env(safe-area-inset-bottom));
}

/* Branding RPG: secundario, translúcido y sin efecto de estampita */
.partner-label,
.form-footer-by,
.sb-user-role {
  letter-spacing: .02em !important;
}
.partner-logo,
.rpg-mini-logo,
.rpg-badge,
.left-footer img,
.powered-card,
.brand-partner-pill {
  background: rgba(255,255,255,.64) !important;
  border: 1px solid rgba(226,232,240,.52) !important;
  box-shadow: none !important;
  backdrop-filter: blur(8px);
}
.partner-logo.rpg-logo {
  width: auto !important;
  max-width: 118px !important;
  padding: 4px 7px !important;
  opacity: .82;
}
.partner-logo.rpg-logo img,
.rpg-mini-logo img,
.rpg-badge-img,
.left-footer img {
  max-height: 16px !important;
}

/* Badges neutrales para NOM/periodo que no choquen con color de empresa */
.wb-tag,
.hero-tag,
.topbar-badge,
.topbar-period,
.norm-badge {
  background: rgba(255,255,255,.86) !important;
  border: 1px solid rgba(226,232,240,.82) !important;
  color: #334155 !important;
  box-shadow: 0 10px 22px rgba(15,23,42,.06) !important;
}
.wb-tag-dot,
.hero-tag-dot,
.topbar-badge-dot,
.n-dot { background: var(--orange) !important; }

/* Login: roles legibles en móvil */
.role-grid { align-items: stretch; }
.role-card { min-width: 0; }
.role-card .rc-label { line-height: 1.18; white-space: normal; text-align: center; }
.role-card .rc-desc { line-height: 1.18; text-align:center; }

/* Admin móvil: no intenta meter todo como escritorio */
@media (max-width: 900px) {
  body { display:block !important; overflow-x:hidden !important; }
  .sidebar {
    position: sticky !important;
    top: 0 !important;
    left: auto !important;
    bottom: auto !important;
    width: 100% !important;
    min-height: auto !important;
    max-height: none !important;
    border-radius: 0 0 22px 22px;
    overflow: visible !important;
  }
  .sidebar-header { padding: 14px 16px 10px !important; margin-bottom: 0 !important; }
  .sidebar-header > div:last-child > div:first-child { font-size: 16px !important; }
  .sidebar-header > div:last-child > div:last-child { font-size: 11px !important; }
  .brand-logo-img { width: 34px !important; height: 34px !important; }
  .nav-links {
    display: flex !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    padding: 8px 12px 12px !important;
    gap: 8px !important;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  .nav-links::before { display:none !important; }
  .nav-btn {
    flex: 0 0 auto !important;
    min-width: 136px !important;
    max-width: 172px !important;
    justify-content: flex-start !important;
    border-radius: 14px !important;
    background: rgba(255,255,255,.06) !important;
    scroll-snap-align: start;
  }
  .nav-btn.active { background: rgba(255,155,11,.22) !important; }
  .nav-btn span { width: 26px !important; height: 26px !important; }
  .sidebar-footer { display:none !important; }
  .main-content { margin-left:0 !important; width:100% !important; }
  .topbar {
    position: sticky !important;
    top: 0 !important;
    height: auto !important;
    min-height: 64px !important;
    padding: 12px 14px !important;
    gap: 10px !important;
    align-items: flex-start !important;
  }
  .topbar-left h2 { font-size: 18px !important; line-height:1.18; }
  .topbar-left p { font-size: 11px !important; }
  .content-area { padding: 16px 14px 96px !important; }
  .hero-admin { display:block !important; padding: 18px !important; }
  .hero-admin-title { font-size: 23px !important; line-height: 1.15 !important; }
  .stats-grid, .stats-grid-4, .dashboard-chart-grid, .dashboard-chart-grid-v22, .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr !important;
  }
  .card, .stat-box, .chart-card { border-radius: 18px !important; }
  .table-wrap, .empresas-table-wrap, .data-table-wrap { overflow-x:auto !important; }
  .modal-content, .modal-card { width: calc(100vw - 24px) !important; max-height: 86vh !important; overflow:auto !important; }
}

/* Empresa móvil: resumen ejecutivo, no tabla aplastada */
@media (max-width: 900px) {
  .sidebar { position: sticky !important; top:0 !important; width:100% !important; min-height:auto !important; border-radius:0 0 22px 22px; }
  .sidebar-inner { min-height:auto !important; }
  .sb-brand { padding: 12px 14px 8px !important; }
  .sb-brand-logo { max-width: 128px !important; }
  .sb-nav { display:flex !important; flex-direction:row !important; gap:8px !important; overflow-x:auto !important; padding: 8px 12px 12px !important; }
  .sb-section-label { display:none !important; }
  .sb-item { flex:0 0 auto !important; min-width: 136px !important; border-radius:14px !important; background:rgba(255,255,255,.06) !important; }
  .sb-item.active { background:rgba(255,155,11,.22) !important; }
  .sb-footer { display:none !important; }
  .main { margin-left:0 !important; width:100% !important; }
  .topbar { position:sticky !important; top:0 !important; height:auto !important; min-height:62px !important; padding: 12px 14px !important; flex-wrap:wrap !important; gap:10px !important; }
  .topbar-left h1 { font-size:18px !important; }
  .topbar-right { width:100%; justify-content:space-between; gap:8px; }
  .content { padding: 16px 14px 100px !important; }
  .hero-banner { display:block !important; padding:20px !important; border-radius:22px !important; }
  .hero-title { font-size: clamp(22px, 8vw, 34px) !important; line-height:1.12 !important; }
  .grid-2, .grid-3, .grid-4, .dash-extra { grid-template-columns:1fr !important; }
  .stat-card, .card, .report-card, .risk-summary { border-radius:18px !important; }
  .tbl { min-width: 720px; }
  .filters-row { grid-template-columns:1fr !important; }
  .calendar-grid { min-width:0 !important; grid-template-columns: repeat(7, minmax(38px, 1fr)) !important; gap:5px !important; }
  .cal-cell { min-height:58px !important; padding:5px !important; }
  .cal-event { display:none !important; }
  .cal-event.dot-only { display:inline-block !important; }
  .modal-overlay.active { align-items:flex-end !important; }
  .modal-content, .modal-card { width:100% !important; max-height:84vh !important; border-radius:24px 24px 0 0 !important; overflow:auto !important; }
}

/* Colaborador móvil: encuesta atractiva y bloques en carrusel */
.survey-topbar {
  background: rgba(255,255,255,.95) !important;
  border: 1px solid rgba(226,232,240,.86) !important;
  box-shadow: 0 12px 32px rgba(15,23,42,.06) !important;
}
.section-progress-label { color:#64748B !important; font-size:11px !important; letter-spacing:.06em; text-transform:uppercase; }
.section-pills {
  display:flex !important;
  flex-wrap:nowrap !important;
  gap:10px !important;
  overflow-x:auto !important;
  overflow-y:hidden !important;
  padding: 6px 2px 12px !important;
  scroll-snap-type:x proximity;
  -webkit-overflow-scrolling: touch;
}
.section-pill {
  flex: 0 0 min(320px, 82vw) !important;
  width: min(320px, 82vw) !important;
  min-height: 70px !important;
  display:grid !important;
  grid-template-columns: 40px 1fr auto !important;
  gap:10px !important;
  align-items:center !important;
  scroll-snap-align:start;
}
.section-pill-info strong { font-size:13px !important; line-height:1.24 !important; }
.section-pill-info small { max-width:none !important; white-space:normal !important; font-size:11px !important; }
.section-pill-index { width:36px !important; height:36px !important; border-radius:14px !important; }
.question-card { border-radius: 22px !important; border-color: rgba(226,232,240,.9) !important; }
.question-text { font-size: clamp(14px, 3.8vw, 17px) !important; }
.option-btn { border-radius: 14px !important; }

@media (max-width: 760px) {
  .topbar-inner { height:auto !important; min-height:58px !important; padding: 8px 12px !important; }
  .brand-logo-img { width: 96px !important; }
  .brand .rpg-mini-logo img { max-height: 15px !important; }
  .user-chip { padding: 3px 8px 3px 3px !important; max-width: 132px; }
  .user-name { max-width: 78px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .quick-logout { width: 36px !important; height:36px !important; display:grid !important; place-items:center !important; border-radius:12px !important; }
  .content { padding: 16px 14px 102px !important; }
  .welcome-banner { padding:18px !important; border-radius:22px !important; }
  .wb-tag { max-width:100%; flex-wrap:wrap; line-height:1.25; }
  .wb-greeting { font-size:16px !important; }
  .wb-name { font-size:23px !important; line-height:1.12 !important; }
  .survey-meta { grid-template-columns:1fr 1fr !important; }
  .survey-topbar { position: sticky !important; top:58px !important; z-index:18 !important; margin: 0 -14px 14px !important; padding: 12px 14px !important; border-radius: 0 0 22px 22px !important; }
  .survey-actions-top { gap:8px !important; }
  .survey-actions-top .btn { flex: 1 1 170px; justify-content:center; }
  .save-pill { flex: 1 1 100%; justify-content:center; }
  .section-pills { margin: 0 -14px !important; padding-left: 14px !important; padding-right: 14px !important; }
  .questions-container { display:block !important; }
  .question-card { padding: 16px !important; margin-bottom:14px !important; }
  .question-num { width: 32px !important; height:32px !important; border-radius:12px !important; font-size:12px !important; }
  .options-scale { grid-template-columns: 1fr !important; gap:8px !important; }
  .option-btn { min-height:44px !important; font-size:13px !important; }
  .survey-nav { position: sticky !important; bottom: 74px !important; background:rgba(255,255,255,.96); border:1px solid #E2E8F0; border-radius:20px !important; padding: 10px !important; box-shadow:0 -12px 32px rgba(15,23,42,.08); }
  .survey-nav .btn { flex:1 1 120px; justify-content:center; }
}

/* Login móvil refinado */
@media (max-width: 720px) {
  body { background:#F8FAFC !important; }
  .login-card { width:100% !important; min-height:100vh !important; border-radius:0 !important; }
  .right-panel { padding: 28px 22px !important; justify-content:flex-start !important; }
  .form-brand { justify-content:center; text-align:center; }
  .form-title, .form-sub { text-align:center !important; }
  .role-grid { display:grid !important; grid-template-columns: repeat(3, minmax(0,1fr)) !important; gap:10px !important; }
  .role-card { padding: 12px 7px !important; min-height:108px !important; display:flex; flex-direction:column; justify-content:center; align-items:center; }
  .rc-icon { width:44px !important; height:44px !important; border-radius:14px !important; }
  .rc-label { font-size:12px !important; line-height:1.12 !important; }
  .rc-desc { font-size:10px !important; }
  .form-footer { justify-content:center !important; gap:12px; flex-wrap:wrap; }
}

/* V27.2 · RPG discreto */
.rpg-badge,
.rpg-chip,
.partner-logo.rpg-logo,
.powered-card{
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  opacity:.72!important;
  padding:0!important;
}
.rpg-badge-img,.rpg-chip img,.partner-logo.rpg-logo img,.powered-card img{
  max-height:18px!important;
  border-radius:0!important;
}

/* V28 · modal de recuperación de contraseña */
.login-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .48);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  padding: 22px;
  z-index: 1000;
}
.login-modal-overlay[hidden] { display: none !important; }
.login-modal-card {
  width: min(460px, 100%);
  background: #fff;
  border-radius: 24px;
  padding: 26px;
  box-shadow: 0 26px 80px rgba(15, 23, 42, .24);
  position: relative;
  border: 1px solid rgba(15, 23, 42, .08);
}
.login-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  border: 0;
  background: #f1f5f9;
  color: #334155;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  font-size: 20px;
  cursor: pointer;
}
.login-modal-icon {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: #eef2ff;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
}
.login-modal-icon img { width: 22px; height: 22px; }
.login-modal-card h3 { margin: 0 0 8px; color: #0f172a; font-size: 24px; }
.login-modal-card p { margin: 0 0 18px; color: #64748b; line-height: 1.55; }
.login-modal-actions { display: flex; gap: 10px; justify-content: flex-end; align-items: center; margin-top: 18px; }
.btn-light { border: 1px solid #e2e8f0; background: #fff; color: #334155; border-radius: 12px; padding: 11px 16px; font-weight: 800; cursor: pointer; }
.btn-submit.mini { width: auto; min-height: 42px; padding: 0 18px; margin: 0; }
@media (max-width: 560px) { .login-modal-actions { flex-direction: column-reverse; align-items: stretch; } .btn-submit.mini, .btn-light { width: 100%; } }


/* Liga exclusiva para colaboradores en /colaborador. */
body.colab-only .role-grid,
body.colab-only #fields-admin,
body.colab-only #fields-empresa,
body.colab-only .forgot-row {
  display: none !important;
}

body.colab-only #fields-colab {
  display: block !important;
}

body.colab-only .right-panel {
  justify-content: center;
}

body.colab-only .form-title {
  margin-top: 8px;
}

body.colab-only .colab-info {
  border-color: rgba(255, 155, 11, .35);
  background: linear-gradient(135deg, rgba(255, 251, 235, .96), rgba(255, 247, 237, .96));
}

body.colab-only .btn-submit {
  margin-top: 18px;
}

body.colab-only .form-footer {
  margin-top: 32px;
}


/* V31 · acceso corporativo */
.left-panel{background:linear-gradient(145deg,#75415F 0%,#B06C96 56%,#D4A6C2 100%)!important}
.brand-full-logo{width:118px!important;height:38px!important;object-fit:contain!important;border-radius:0!important}
.access-mode-links{display:flex;align-items:center;justify-content:center;gap:8px;margin:-7px 0 18px;font-size:10px;color:var(--muted)}
.access-mode-links a{color:var(--navy);font-weight:700;text-decoration:none;padding:5px 8px;border-radius:999px;background:#F1F5F9}
.access-mode-links a:hover{background:#E2E8F0}
.rpg-badge,.left-footer img{background:rgba(255,255,255,.86);border:1px solid rgba(255,255,255,.55);border-radius:13px;padding:6px 10px;box-sizing:content-box}
.form-brand{align-items:center}.form-brand .brand-mark{display:block}
body.colab-only #link-index-colaborador{background:var(--orange);color:#fff}
body:not(.colab-only) #link-index-completo{background:var(--orange);color:#fff}


/* V31.1 · En el enlace exclusivo no mostrar la opción "Acceso completo". */
.collab-access-badge{display:none;align-items:center;justify-content:center;width:max-content;max-width:100%;margin:-7px auto 18px;padding:7px 12px;border-radius:999px;background:rgba(255,155,11,.12);border:1px solid rgba(255,155,11,.3);color:#9A4E00;font-size:11px;font-weight:800;text-align:center}
body.colab-only .access-mode-links{display:none!important}
body.colab-only .collab-access-badge{display:flex}

/* Logotipo combinado oficial con fondo transparente. */
.combined-brand-logo{
  display:block!important;
  object-fit:contain!important;
  object-position:center!important;
  background:transparent!important;
  border:0!important;
  border-radius:0!important;
  filter:none!important;
}
.combined-brand-logo-left{width:230px!important;height:74px!important}
.combined-brand-logo-form{width:164px!important;height:52px!important}
.left-panel::before,.glow-main,.glow-sec{pointer-events:none!important}
.right-panel{position:relative!important;z-index:3!important;pointer-events:auto!important}
.role-grid,.role-card,.fields-section,.f-wrap,.f-input,.f-eye,.btn-submit,.forgot-link{pointer-events:auto!important}
.role-card{font-family:var(--font);color:inherit}
.login-modal-overlay[hidden]{display:none!important;visibility:hidden!important;pointer-events:none!important}
@media(max-width:700px){
  .combined-brand-logo-left{width:190px!important;height:61px!important}
  .combined-brand-logo-form{width:150px!important;height:48px!important}
}
