/* ============================================
   UNIDAD ADMINISTRADORA — Desktop Stylesheet
   Target: 1920x1080
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@300;400;600;700;800&family=Nunito+Sans:wght@300;400;600;700&family=Titillium+Web:wght@300;400;600;700&display=swap');

/* ── CSS Variables ── */
:root {
  --brand-blue-dark:   #1a3a5c;
  --brand-blue:        #1e6fbf;
  --brand-blue-mid:    #3a8fd4;
  --brand-blue-light:  #a8d8f0;
  --brand-blue-pale:   #daeef9;
  --brand-cyan:        #29b6e8;
  --brand-white:       #ffffff;
  --brand-gray-light:  #f0f4f8;
  --brand-gray:        #8fa3b8;
  --brand-coin:        #f5a623;
  --brand-coin-shadow: #d4841a;
  --brand-pink:        #f06080;

  --header-height: clamp(60px, 5.5vw, 90px);
  --sidebar-width: clamp(200px, 16.25vw, 312px);

  --shadow-card: 0 8px 32px rgba(30, 111, 191, 0.12), 0 2px 8px rgba(0,0,0,0.06);
  --shadow-btn:  0 4px 16px rgba(30, 111, 191, 0.4);

  --radius-card: 20px;
  --radius-btn:  50px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { width: 100%; height: 100%; overflow: hidden; background: #0a1f3c; }
body {
  font-family: 'Nunito', sans-serif;
  background: var(--brand-white);
  color: var(--brand-blue-dark);
  -webkit-font-smoothing: antialiased;
  width: 100%;
  max-width: 1920px;
  height: 100%;
  min-width: 1280px;
  overflow: hidden;
  margin: 0 auto;
  position: relative;
}

/* ── Header ── */
.header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1920px;
  min-width: 1280px;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 100;
  overflow: hidden;
}

/* Capas de fondo SVG */
.header-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Degradado izquierdo — ancho fijo para no escalar con zoom */
.header-bg-degrade {
  position: absolute;
  left: 0; top: 0;
  height: var(--header-height);
  width: clamp(400px, 42vw, 684px);
  display: block;
  object-fit: fill;
}

/* Marino superpuesto — ancho fijo en 1920px para que la zona navy
   izquierda no escale con el zoom del navegador */
.header-bg-marino {
  position: absolute;
  left: 0; top: 0;
  height: var(--header-height);
  display: block;
}

/* Celeste derecho — se estira hasta el margen derecho */
.header-bg-celeste {
  position: absolute;
  right: 0; top: 0;
  height: var(--header-height);
  display: block;
  object-fit: fill;
}

/* Carita azul sobre la zona marino izquierda */
.header-bg-carita {
  position: absolute;
  left: clamp(40px, 4.5vw, 70px); top: 50%;
  transform: translateY(-50%);
  height: clamp(44px, 4.5vw, 72px);
  width: auto;
  display: block;
  z-index: 1;
}

/* Logo blanco sobre la viñeta degradada */
.header-bg-logo {
  position: absolute;
  left: clamp(140px, 14vw, 245px); top: 50%;
  transform: translateY(-50%);
  height: clamp(30px, 3vw, 48px);
  width: auto;
  display: block;
  z-index: 1;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  position: relative;
  z-index: 2;
}


.header-user {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 2;
}

.header-user-icon {
  width: clamp(30px, 3vw, 48px);
  height: clamp(30px, 3vw, 48px);
  object-fit: contain;
  flex-shrink: 0;
}

.header-user-name {
  font-family: 'Titillium Web', sans-serif;
  font-size: clamp(0.8rem, 0.9vw, 1.15rem);
  font-weight: 600;
  color: white;
  white-space: normal;
  line-height: 1.3;
  max-width: clamp(100px, 11vw, 180px);
}

.header-close {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  opacity: 0.9;
  transition: opacity 0.2s, transform 0.2s;
}

.header-close:hover { opacity: 1; transform: scale(1.08); }

/* ── Layout ── */
.layout {
  display: flex;
  height: 100vh;
  padding-top: var(--header-height);
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-width);
  height: calc(100vh - var(--header-height));
  background: var(--brand-white);
  border-right: 1px solid rgba(168, 216, 240, 0.3);
  padding: clamp(16px, 2vh, 32px) clamp(10px, 1.2vw, 20px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  z-index: 10;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.3vw, 21px);
  padding: clamp(10px, 1.1vh, 18px) clamp(14px, 1.4vw, 24px);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  color: var(--brand-blue-dark);
}

.sidebar-item:hover {
  background: var(--brand-blue-pale);
  transform: translateX(4px);
}

.sidebar-item.active {
  background: var(--brand-blue-pale);
}

.sidebar-label {
  font-family: 'Titillium Web', sans-serif;
  font-size: clamp(0.9rem, 1.1vw, 1.35rem);
  font-weight: 600;
  color: var(--brand-blue-dark);
  line-height: 1.3;
}

/* ── Sidebar item icon (SVG directo, sin círculo) ── */
.sidebar-item-icon {
  width: clamp(44px, 4.5vw, 72px);
  height: clamp(44px, 4.5vw, 72px);
  object-fit: contain;
  flex-shrink: 0;
}

/* ── Sidebar bottom decoration ── */
.sidebar-deco {
  margin-top: auto;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding-right: 8px;
  padding-bottom: 16px;
  gap: 8px;
  pointer-events: none;
}

.sidebar-deco-celeste {
  height: clamp(100px, 21vh, 225px);
  width: auto;
}

.sidebar-deco-anaranjada {
  height: clamp(35px, 7vh, 75px);
  width: auto;
}

/* ── Main Content ── */
.main {
  flex: 1;
  position: relative;
  overflow: visible;
}

/* ── Background Scene ── */
.bg-scene {
  position: absolute;
  top: calc(-1 * var(--header-height));
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  z-index: 0;
}

.bg-scene img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}


/* ── Íconos decorativos flotantes ── */
.deco {
  position: absolute;
  pointer-events: none;
  z-index: 1;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50%       { transform: translateY(-14px) rotate(2deg); }
}

@keyframes float-reverse {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50%       { transform: translateY(-10px) rotate(-2deg); }
}

/* Moneda superior izquierda */
.deco-moneda-sup-izq {
  width: clamp(44px, 3.75vw, 72px);
  left: 4%;
  top: 8%;
  animation: float 4s ease-in-out infinite;
  animation-delay: 0s;
}

/* Moneda inferior izquierda */
.deco-moneda-inf-izq {
  width: clamp(55px, 4.7vw, 90px);
  left: 7%;
  top: 75%;
  animation: float-reverse 4.5s ease-in-out infinite;
  animation-delay: 1.2s;
}

/* Moneda superior centro derecha */
.deco-moneda-sup-cnt {
  width: clamp(42px, 3.54vw, 68px);
  left: 60%;
  top: -4%;
  animation: float 3.8s ease-in-out infinite;
  animation-delay: 0.6s;
}

/* Llave derecha superior */
.deco-llave {
  width: clamp(86px, 7.3vw, 140px);
  left: 74%;
  top: 12%;
  animation: float-reverse 5s ease-in-out infinite;
  animation-delay: 0.3s;
}

/* Casa inferior derecha */
.deco-casa {
  width: clamp(122px, 10.4vw, 200px);
  left: 80%;
  top: 65%;
  animation: float 4.8s ease-in-out infinite;
  animation-delay: 1s;
}

/* ── Cards Container ── */
.cards-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  display: flex;
  gap: clamp(16px, 2vw, 32px);
  align-items: center;
}

/* ── Action Card ── */

/* Variante: card se adapta al tamaño de la imagen */
.action-card--full {
  width: auto;
  height: auto;
  padding: 8px;
}

.action-card--full img {
  display: block;
  height: clamp(180px, 20vw, 300px);
  width: auto;
  border-radius: calc(var(--radius-card) - 8px);
}

.action-card {
  width: auto;
  height: auto;
  background: #ecedf1;
  backdrop-filter: none;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(255,255,255,0.9);
}

.action-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 48px rgba(30, 111, 191, 0.2), 0 4px 12px rgba(0,0,0,0.08);
}

/* ── Resoluciones medianas (1366–1599px) ── */
@media (min-width: 1366px) and (max-width: 1599px) {
  .action-card--full img {
    height: clamp(230px, 17vw, 250px);
  }
  .cards-container {
    gap: clamp(12px, 1.5vw, 24px);
  }
  .deco-moneda-sup-izq { width: clamp(44px, 3.5vw, 58px); }
  .deco-moneda-inf-izq { width: clamp(52px, 4.1vw, 68px); }
  .deco-moneda-sup-cnt { width: clamp(40px, 3.2vw, 52px); }
  .deco-llave           { width: clamp(80px, 6.5vw, 106px); }
  .deco-casa            { width: clamp(115px, 9.2vw, 152px); }
}

/* ── Resoluciones pequeñas (< 1366px) ── */
@media (max-width: 1365px) {
  .action-card--full img {
    height: 15vw;
  }
  .cards-container {
    gap: clamp(10px, 1.2vw, 18px);
  }
  .deco-moneda-sup-izq { width: 3.3vw; }
  .deco-moneda-inf-izq { width: 4.1vw; }
  .deco-moneda-sup-cnt { width: 3.1vw; }
  .deco-llave           { width: 6.2vw; }
  .deco-casa            { width: 8.8vw; }
}


