/* ============================================================
   ALERCITO SHELL — tokens + riel lateral + panel de contexto
   Reutilizar este archivo en TODAS las páginas del portal
   (index.html, vacaciones.html, pagos.html, boletas.html, etc.)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,600&family=DM+Sans:wght@300;400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  /* base heredada de tu marca */
  --verde: #2C5F4A;
  --verde-claro: #7EC8A4;

  /* nuevos tokens de la mezcla Vitrina Editorial + Torre de Control */
  --shell-dark: #1B2420;      /* fondo del riel y del hero */
  --shell-dark-2: #23302B;    /* superficie ligeramente más clara sobre el dark */
  --crema: #F6F2EA;           /* fondo de página */
  --tinta: #1B2420;           /* texto principal sobre crema */
  --texto-suave: #6b7280;
  --borde: #E4DFD1;

  --bronce: #C9A15A;          /* acento cálido — único acento de marca */
  --bronce-texto: #7A5F2E;    /* bronce oscurecido para texto sobre fondos claros */

  --estado-ok: #7CC98A;       /* operativo */
  --estado-ok-texto: #2B6A38;
  --estado-dev: #E3A23D;      /* en desarrollo */
  --estado-dev-texto: #8A5A12;
  --estado-accion: #B5502F;   /* requiere tu acción */
  --estado-accion-texto: #7A3115;

  --font-voice: 'Cormorant Garamond', serif;
  --font-sans: 'DM Sans', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --rail-w: 72px;
}

* , *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-sans); background: var(--crema); color: var(--tinta); overflow-x: hidden; }

/* ---------- LAYOUT RAÍZ ---------- */
.shell {
  display: flex;
  min-height: 100vh;
}

/* ---------- RIEL LATERAL ---------- */
#shell-rail {
  width: var(--rail-w);
  flex-shrink: 0;
  background: var(--shell-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 0;
  position: sticky;
  top: 0;
  height: 100vh;
}
.rail-logo { color: var(--verde-claro); font-size: 22px; margin-bottom: 28px; }
.rail-logo img { width: 26px; height: 26px; object-fit: contain; display: block; }
.rail-nav { display: flex; flex-direction: column; gap: 6px; flex: 1; width: 100%; align-items: center; }
.rail-item {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(246,242,234,0.5); text-decoration: none;
  border: none; background: transparent; cursor: pointer;
  font-size: 19px; transition: background 0.15s, color 0.15s;
  position: relative;
}
.rail-item:hover { background: rgba(255,255,255,0.06); color: var(--crema); }
.rail-item.rail-active { background: var(--bronce); color: var(--shell-dark); }
.rail-bottom { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.rail-dot { position: absolute; top: 6px; right: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--estado-accion); }
.rail-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--verde); color: white; font-size: 12px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid rgba(255,255,255,0.15); overflow: hidden;
}
.rail-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- CONTENIDO CENTRAL ---------- */
#shell-main { flex: 1; min-width: 0; }
.shell-topstrip {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 32px; border-bottom: 0.5px solid var(--borde);
}
.shell-topstrip-brand { display: flex; align-items: center; gap: 10px; }
.shell-topstrip-brand img { height: 28px; width: auto; max-height: 28px; display: block; }
.shell-topstrip-title { font-family: var(--font-voice); font-size: 20px; color: var(--tinta); }
.shell-topstrip-extra { display: flex; align-items: center; gap: 14px; font-size: 12px; color: var(--texto-suave); }
.shell-topstrip-extra i { font-size: 15px; vertical-align: -2px; margin-right: 4px; }

/* ---------- HERO (dentro de shell-main, específico de cada página) ---------- */
.status-ticker { display: flex; gap: 16px; font-family: var(--font-mono); font-size: 11px; color: #8FAF88; margin-bottom: 14px; flex-wrap: wrap; }
.status-ticker .dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; margin-right: 5px; }
.dot-ok { background: var(--estado-ok); }
.dot-dev { background: var(--estado-dev); }
.dot-accion { background: var(--estado-accion); }

/* ---------- ACCESOS RÁPIDOS ---------- */
.acceso-card {
  background: #fff; border-radius: 12px; overflow: hidden; text-decoration: none;
  display: block; position: relative; transition: transform 0.15s;
}
.acceso-card:hover { transform: translateY(-2px); }
.acceso-bar { height: 5px; }
.acceso-bar.ok { background: var(--estado-ok); }
.acceso-bar.dev { background: var(--estado-dev); }
.acceso-bar.neutro { background: #D8D2C0; }
.acceso-body { padding: 16px 14px; }
.acceso-body i { font-size: 22px; color: var(--tinta); }
.acceso-name { font-size: 13px; color: var(--tinta); margin-top: 10px; }
.acceso-sub { font-family: var(--font-mono); font-size: 10px; color: var(--estado-dev-texto); margin-top: 3px; }

/* ---------- LOGIN OVERLAY ---------- */
#login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--shell-dark); }
.login-card { width: 420px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1); border-radius: 20px; padding: 48px 44px; text-align: center; }
.login-card img { height: 52px; margin-bottom: 20px; }
.login-title { font-family: var(--font-voice); font-size: 24px; color: white; margin-bottom: 8px; }
.login-sub { font-size: 13px; color: rgba(255,255,255,0.5); margin-bottom: 28px; line-height: 1.6; }
.btn-microsoft {
  width: 100%; background: var(--bronce); border: none; border-radius: 10px; padding: 14px;
  font-size: 14px; font-weight: 500; color: var(--shell-dark); cursor: pointer; font-family: var(--font-sans);
}
.btn-microsoft:hover { filter: brightness(1.05); }
.login-footer { font-size: 11px; color: rgba(255,255,255,0.3); margin-top: 24px; }
.login-error { color: #f0997b; font-size: 12px; margin-top: 14px; display: none; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 860px) {
  .shell { flex-direction: column; }
  #shell-rail {
    width: 100%; height: auto; position: sticky; top: 0; flex-direction: row;
    padding: 8px 12px; justify-content: space-between;
  }
  .rail-nav { flex-direction: row; flex: none; }
  .rail-bottom { flex-direction: row; }
  .rail-logo { margin-bottom: 0; margin-right: 8px; }
}
