/* ═══════════════════════════════════════════════════════
   MINDS Portal — Self-contained stylesheet
   ═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --red:        #C41E3A;
  --red-dark:   #9B1528;
  --red-light:  #E8304A;
  --dark:       #111318;
  --dark-2:     #1C2028;
  --dark-3:     #252B35;
  --gray:       #6B7280;
  --gray-light: #9CA3AF;
  --border:     #E5E7EB;
  --bg:         #F9FAFB;
  --white:      #FFFFFF;
  --font:       'Inter', system-ui, -apple-system, sans-serif;
  --nav-h:      72px;
  --radius:     16px;
  --radius-sm:  8px;
  --shadow:     0 4px 24px rgba(0,0,0,.08);
  --shadow-md:  0 8px 40px rgba(0,0,0,.12);
  --shadow-lg:  0 20px 60px rgba(0,0,0,.16);
  --transition: .3s cubic-bezier(.4,0,.2,1);
}

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--white); background: var(--dark); overflow-x: hidden; }
img  { max-width: 100%; display: block; }
a    { text-decoration: none; color: inherit; }
ul   { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: var(--font); }

/* ─── Container ─── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ─── Buttons ─── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border-radius: 50px; font-weight: 600;
  font-size: .95rem; letter-spacing: .01em; transition: var(--transition);
  white-space: nowrap; font-family: var(--font); cursor: pointer;
}
.btn-primary {
  background: var(--red); color: var(--white); border: none;
  box-shadow: 0 4px 20px rgba(196,30,58,.35);
}
.btn-primary:hover {
  background: var(--red-dark); transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(196,30,58,.45);
}
.btn-full { width: 100%; justify-content: center; }

/* ══════════════════════════════════════
   PORTAL NAVBAR
══════════════════════════════════════ */
.portal-navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--nav-h);
  background: var(--dark-2);
  box-shadow: 0 1px 0 rgba(255,255,255,.07), 0 4px 24px rgba(0,0,0,.3);
}
.nav-container {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  height: 100%; display: flex; align-items: center; justify-content: space-between;
}
.nav-logo { display: flex; align-items: center; }
.brand-logo {
  height: 48px; width: auto;
  
  transition: transform var(--transition);
}
.brand-logo:hover { transform: scale(1.02); }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link {
  padding: 8px 16px; border-radius: 8px;
  font-size: .9rem; font-weight: 500;
  color: rgba(255,255,255,.7); transition: var(--transition);
}
.nav-link:hover { color: var(--white); background: rgba(255,255,255,.08); }

.nav-cta {
  background: var(--red) !important; color: var(--white) !important;
  padding: 8px 20px; border-radius: 50px;
  box-shadow: 0 2px 12px rgba(196,30,58,.3);
  font-weight: 600;
}
.nav-cta:hover { background: var(--red-dark) !important; transform: translateY(-1px); }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px; padding: 4px;
  cursor: pointer;
}
.nav-toggle span {
  display: block; width: 24px; height: 2px;
  background: var(--white); border-radius: 2px; transition: var(--transition);
}

/* ══════════════════════════════════════
   LOGIN PAGE
══════════════════════════════════════ */
.portal-login-bg {
  position: fixed; inset: 0;
  background-image: url('/web2026/images/visibility_banner.png');
  background-size: cover; background-position: center;
  opacity: .22; filter: grayscale(10%) contrast(110%);
  z-index: 0;
}
.portal-login-overlay {
  position: fixed; inset: 0;
  background: linear-gradient(135deg, rgba(17,19,24,.92) 0%, rgba(17,19,24,.75) 50%, rgba(196,30,58,.22) 100%);
  z-index: 1;
}
.portal-login-wrap {
  position: relative; z-index: 2;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: calc(var(--nav-h) + 40px) 24px 60px;
}
.portal-login-card {
  width: 100%; max-width: 460px;
  background: rgba(28,32,40,.88);
  padding: 48px 40px;
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(0,0,0,.5), 0 0 40px rgba(196,30,58,.2);
  border: 1px solid rgba(196,30,58,.18);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  text-align: center;
}
.portal-login-logo {
  max-height: 52px; width: auto;
  margin: 0 auto 20px; display: block;
  
}
.portal-login-title {
  font-size: 1.6rem; color: var(--white);
  font-weight: 700; letter-spacing: -.02em;
  margin: 0 0 8px;
}
.portal-login-sub {
  color: rgba(255,255,255,.55); font-size: .88rem; margin: 0 0 32px;
}
.portal-login-form {
  display: flex; flex-direction: column; gap: 20px; text-align: left;
}
.portal-login-form .form-group {
  display: flex; flex-direction: column; gap: 8px;
}
.portal-login-form label {
  font-size: .82rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em;
  color: rgba(255,255,255,.85);
}
.portal-login-form input {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-family: var(--font); font-size: .95rem; color: var(--white);
  outline: none; transition: var(--transition); width: 100%;
}
.portal-login-form input::placeholder { color: rgba(255,255,255,.3); }
.portal-login-form input:focus {
  border-color: var(--red);
  background: rgba(255,255,255,.09);
  box-shadow: 0 0 0 3px rgba(196,30,58,.2);
}
.portal-back-link {
  display: block; text-align: center; margin-top: 20px;
  color: rgba(255,255,255,.4); font-size: .85rem; font-weight: 600;
  text-decoration: none; transition: color var(--transition);
}
.portal-back-link:hover { color: var(--white); }

/* ══════════════════════════════════════
   FRAME / DASHBOARD VIEW
══════════════════════════════════════ */
.portal-frame-wrap {
  position: fixed;
  top: var(--nav-h); left: 0; right: 0; bottom: 0;
  /* iOS Safari: respetar barra inferior del browser */
  bottom: env(safe-area-inset-bottom, 0);
  background: var(--dark);
  overflow: hidden;
  /* altura explícita como fallback */
  height: calc(100dvh - var(--nav-h));
}
.frm_container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.pbi_frm {
  border: none;
  flex: 1;
  width: 100%;
  min-height: 0;
  height: 100%;
  display: block;
}

/* ══════════════════════════════════════
   TOAST / ALERT
══════════════════════════════════════ */
.portal-toast {
  position: fixed; bottom: 24px; right: 24px;
  background: rgba(196,30,58,.95);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.1);
  color: var(--white); padding: 16px 24px;
  border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
  font-size: .95rem; font-weight: 500; z-index: 9999;
  display: flex; align-items: center; gap: 12px;
  animation: fadeInUp .4s ease forwards;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════
   RESPONSIVE — TABLET
══════════════════════════════════════ */
@media (max-width: 768px) {
  :root { --nav-h: 60px; }
  .brand-logo { height: 34px; }

  /* Menú mobile desplegable — arranca desde top:0 para que
     translateY(-100%) lo oculte COMPLETAMENTE fuera del viewport */
  .nav-links {
    position: fixed;
    top: 0; left: 0; right: 0;
    background: rgba(17,19,24,.98); backdrop-filter: blur(16px);
    flex-direction: column;
    padding: calc(var(--nav-h) + 12px) 24px 24px;
    gap: 4px;
    transform: translateY(-100%);
    transition: transform var(--transition);
    z-index: 998; /* navbar es 1000, la cubre arriba */
  }
  .nav-links.open { transform: translateY(0); }
  .nav-link { width: 100%; padding: 12px 16px; color: rgba(255,255,255,.8); }
  .nav-cta { border-radius: 8px !important; padding: 12px 16px !important; text-align: left; }
  .nav-toggle { display: flex; }

  /* Login card */
  .portal-login-card { padding: 32px 20px; border-radius: 16px; }
  .portal-login-title { font-size: 1.4rem; }
  .portal-login-logo { max-height: 44px; }

  /* Frame */
  .portal-frame-wrap { top: var(--nav-h); }
}

/* ══════════════════════════════════════
   RESPONSIVE — MOBILE
══════════════════════════════════════ */
@media (max-width: 480px) {
  :root { --nav-h: 56px; }
  .brand-logo { height: 30px; }

  .portal-login-wrap { padding: calc(var(--nav-h) + 24px) 16px 40px; }
  .portal-login-card { padding: 28px 20px; }
  .portal-login-title { font-size: 1.3rem; }
  .portal-login-logo { max-height: 38px; margin-bottom: 14px; }
  .portal-login-sub { font-size: .84rem; margin-bottom: 24px; }
  .btn { padding: 13px 24px; font-size: .9rem; }
}
