/* ═══════════════════════════════════════════════════════════
   LOTONUBE — Portal Clientes
   Fichero de estilos principal
   ═══════════════════════════════════════════════════════════ */

/* ─── PALETA DE COLOR ───────────────────────────────────────
   Modifica aquí para cambiar toda la apariencia del portal.
   ─────────────────────────────────────────────────────────── */
:root {
  --blue:    #0d47a1;   /* Azul ASG — color principal */
  --blue-dk: #083079;   /* Azul ASG oscuro — navbar, hover, footer */
  --blue-lt: #e3edf8;   /* Azul ASG claro — fondos de iconos */
  --gold:    #C4A23A;   /* Oro — CTAs, badges, acento */
  --white:   #FFFFFF;
  --gray:    #6B7280;   /* Texto secundario */
  --gray-lt: #F4F5F9;   /* Fondo de página */
  --border:  #DDE1EF;   /* Bordes de tarjetas */
}

/* ─── TIPOGRAFÍA ────────────────────────────────────────────
   Cambia la fuente aquí.
   ─────────────────────────────────────────────────────────── */
:root {
  --font: 'Segoe UI', system-ui, sans-serif;
  --font-size-base: 14px;
}

/* ─── RADIOS Y SOMBRAS ──────────────────────────────────────
   Ajusta el nivel de redondeo y profundidad de sombras.
   ─────────────────────────────────────────────────────────── */
:root {
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   14px;
  --radius-xl:   16px;
  --shadow-card: 0 12px 32px rgba(13, 71, 161, 0.12);
  --shadow-login: 0 24px 64px rgba(8, 48, 121, 0.40);
  --shadow-nav:   0 2px 12px rgba(0, 0, 0, 0.25);
}

/* ─── RESET & BASE ──────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  font-size: var(--font-size-base);
  background: var(--gray-lt);
  color: #1A1A2E;
  min-height: 100vh;
}

/* ─── BANNER MOCKUP ─────────────────────────────────────────── */
.mockup-banner {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9999;
  background: var(--gold);
  color: var(--blue-dk);
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  padding: 4px;
}

/* ═══════════════════════════════════════════════════════════
   VISTA 1 — LOGIN
   ═══════════════════════════════════════════════════════════ */

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 20px;
  background: linear-gradient(135deg, var(--blue-dk) 0%, var(--blue) 60%, #2A4199 100%);
}

.login-bg-pattern {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(196, 162, 58, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
}

/* — Tarjeta de login — */
.login-card {
  position: relative;
  z-index: 1;
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 48px 44px;
  width: 420px;
  box-shadow: var(--shadow-login);
}

/* — Logo en la tarjeta — */
.login-card .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
}

.login-card .logo-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 900;
  font-size: 18px;
}

.login-card .logo-text {
  font-size: 22px;
  font-weight: 700;
  color: var(--blue);
}

.login-card .logo-text span {
  color: var(--gold);
}

/* — Textos — */
.login-card h2 {
  font-size: 20px;
  font-weight: 600;
  color: var(--blue);
  margin-bottom: 6px;
}

.login-card p {
  font-size: 13px;
  color: var(--gray);
  margin-bottom: 28px;
}

/* — Formulario — */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--blue);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: #1A1A2E;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus {
  border-color: var(--blue);
}

/* — Botón de acceso — */
.btn-login {
  width: 100%;
  padding: 13px;
  background: var(--blue);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.2s;
}

.btn-login:hover {
  background: var(--blue-dk);
}

/* — Pie de la tarjeta — */
.login-footer {
  margin-top: 20px;
  text-align: center;
  font-size: 12px;
  color: var(--gray);
}

.login-footer a {
  color: var(--gold);
  text-decoration: none;
  font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════
   VISTA 2 — PORTAL (tras login)
   ═══════════════════════════════════════════════════════════ */

.portal-page {
  display: none;
  flex-direction: column;
  min-height: 100vh;
  padding-top: 20px;
}

.portal-page.visible {
  display: flex;
}

/* ─── NAVBAR ────────────────────────────────────────────────── */
.navbar {
  background: var(--blue-dk);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: 60px;
  box-shadow: var(--shadow-nav);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
}

.nav-logo-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 14px;
  color: var(--white);
}

.nav-logo-text {
  font-size: 17px;
  font-weight: 700;
}

.nav-logo-text span {
  color: var(--gold);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
}

.nav-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: var(--blue-dk);
}

.nav-badge {
  background: var(--gold);
  color: var(--blue-dk);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ─── CONTENIDO PRINCIPAL ───────────────────────────────────── */
.portal-main {
  flex: 1;
  padding: 36px 40px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.welcome-header {
  margin-bottom: 32px;
}

.welcome-header h1 {
  font-size: 26px;
  font-weight: 700;
  color: var(--blue);
}

.welcome-header p {
  font-size: 14px;
  color: var(--gray);
  margin-top: 4px;
}

/* — Título de sección — */
.section-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 16px;
}

/* ─── TARJETAS DE PRODUCTOS ─────────────────────────────────── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.product-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  border: 1.5px solid var(--border);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
  border-color: var(--blue);
}

.product-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--blue-lt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.product-card h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--blue);
}

.product-card p {
  font-size: 12px;
  color: var(--gray);
  line-height: 1.5;
}

.product-arrow {
  margin-top: auto;
  align-self: flex-end;
  color: var(--gold);
  font-size: 18px;
  font-weight: 700;
}

/* — Tarjeta con acento (ej. Control Horario) — */
.product-card.accent {
  background: var(--blue);
  border-color: var(--blue);
}

.product-card.accent h3,
.product-card.accent p {
  color: rgba(255, 255, 255, 0.9);
}

.product-card.accent .product-icon {
  background: rgba(255, 255, 255, 0.15);
}

.product-card.accent .product-arrow {
  color: var(--gold);
}

/* ─── SECCIÓN BLOG ──────────────────────────────────────────── */
.blog-section {
  margin-bottom: 40px;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.blog-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1.5px solid var(--border);
  transition: box-shadow 0.15s;
}

.blog-card:hover {
  box-shadow: 0 8px 24px rgba(31, 49, 114, 0.10);
}

.blog-img {
  height: 120px;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dk) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
}

.blog-body {
  padding: 16px;
}

.blog-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 6px;
}

.blog-card h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--blue);
  line-height: 1.4;
  margin-bottom: 8px;
}

.blog-card p {
  font-size: 12px;
  color: var(--gray);
  line-height: 1.5;
}

.blog-meta {
  font-size: 11px;
  color: var(--gray);
  margin-top: 10px;
}

/* ─── FOOTER ────────────────────────────────────────────────── */
.portal-footer {
  background: var(--blue-dk);
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  font-size: 12px;
  padding: 16px 32px;
}

.portal-footer span {
  color: var(--gold);
}

/* ─── DEMO TOGGLE (solo mockup) ─────────────────────────────── */
.demo-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9998;
  display: flex;
  gap: 8px;
}

.demo-btn {
  padding: 8px 14px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  background: var(--blue);
  color: var(--white);
}

.demo-btn.active {
  background: var(--gold);
  color: var(--blue-dk);
}

/* ─── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 768px) {
  .login-card {
    width: 90%;
    padding: 36px 28px;
  }

  .portal-main {
    padding: 24px 20px;
  }

  .navbar {
    padding: 0 20px;
  }

  .products-grid,
  .blog-grid {
    grid-template-columns: 1fr;
  }
}
