/* ==========================================================================
   CENDIPP · Portal institucional
   Base neutra cálida, con el rojo institucional como único acento fuerte.
   Tipografía grande, objetivos táctiles amplios y una sola jerarquía clara:
   el portal lo usa personal poco familiarizado con la tecnología.
   ========================================================================== */

:root {
  /* Marca */
  --brand: #B8392F;
  --brand-strong: #972C24;
  --brand-soft: #FDECEA;
  --brand-line: #F2D3CE;

  /* Neutros */
  --bg: #F5F3F0;
  --surface: #FFFFFF;
  --surface-2: #FAF8F6;
  --ink: #23201D;
  --text: #4A423C;
  --muted: #7C736C;
  --line: #E8E2DB;

  /* Acentos por herramienta — apagados, para poder distinguirlas de un
     vistazo sin llenar la pantalla de color. */
  --a-mail: #B8392F;   --a-mail-bg: #FDECEA;
  --a-docs: #2C5C8F;   --a-docs-bg: #E9F0F8;
  --a-team: #2A6B4F;   --a-team-bg: #E7F2EC;
  --a-meet: #8A5A17;   --a-meet-bg: #FAF0DE;
  --a-forms: #4B4B7A;  --a-forms-bg: #EDEDF7;
  --a-help: #1F6360;   --a-help-bg: #E4F1F0;

  --font-display: 'Newsreader', Georgia, serif;
  --font-body: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Controlado por los botones A- / A+ */
  --scale: 1;

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-xl: 24px;
  --r-pill: 999px;

  --sh-1: 0 1px 2px rgba(35, 32, 29, 0.06), 0 1px 3px rgba(35, 32, 29, 0.05);
  --sh-2: 0 6px 16px rgba(35, 32, 29, 0.08), 0 2px 4px rgba(35, 32, 29, 0.04);
  --sh-3: 0 18px 44px rgba(35, 32, 29, 0.16);

  --sidebar-w: 268px;
}

* { box-sizing: border-box; }
html { font-size: calc(17px * var(--scale)); }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
a { color: var(--brand); text-decoration: none; }
button { font-family: inherit; }
img { max-width: 100%; }

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Ocultar por clase, no con estilos en línea: así el layout de celular
   (que cambia el display de .app-shell) nunca queda anulado. */
.is-hidden { display: none !important; }

/* Sin esto, cualquier elemento con display propio (por ejemplo el
   formulario, que es flex) sigue viéndose aunque lleve el atributo
   hidden: el display del CSS gana sobre el del navegador. */
[hidden] { display: none !important; }

/* --------------------------------------------------------------------------
   BOTONES
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px;
  border: 1px solid transparent; border-radius: var(--r-md);
  font-size: 0.98rem; font-weight: 600; cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-strong); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn-secondary:hover { background: var(--surface-2); color: var(--ink); }
.btn-quiet { background: transparent; color: var(--muted); border-color: transparent; padding: 10px 14px; min-height: 44px; border-radius: var(--r-sm); font-weight: 600; font-size: 0.9rem; cursor: pointer; }
.btn-quiet:hover { background: var(--surface-2); color: var(--ink); }
.btn-block { width: 100%; }

/* --------------------------------------------------------------------------
   ESTRUCTURA — barra lateral fija + columna de contenido
   -------------------------------------------------------------------------- */
.app-shell { display: flex; align-items: flex-start; min-height: 100vh; }

.sidebar {
  position: sticky; top: 0;
  display: flex; flex-direction: column; gap: 26px;
  width: var(--sidebar-w); flex-shrink: 0; height: 100vh;
  padding: 26px 20px 22px;
  background: var(--surface); border-right: 1px solid var(--line);
  z-index: 50;
}
.sidebar-brand { display: flex; align-items: center; gap: 12px; color: inherit; }
.brand-mark {
  display: flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; flex-shrink: 0;
  background: var(--brand); color: #fff; border-radius: var(--r-md);
}
/* La C de CENDIPP se dibuja sola al abrir el portal. Es un guiño de una
   vez, no un bucle: algo moviéndose todo el rato en la esquina cansa. */
.brand-c-arco {
  stroke-dasharray: 78;
  stroke-dashoffset: 78;
  animation: dibujar-c 0.9s 0.15s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.brand-c-punto {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: aparecer-punto 0.35s 0.85s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes dibujar-c { to { stroke-dashoffset: 0; } }
@keyframes aparecer-punto {
  from { opacity: 0; transform: scale(0.3); }
  to { opacity: 1; transform: scale(1); }
}
.sidebar-brand .brand-c { transition: transform 0.25s ease; }
.sidebar-brand:hover .brand-c { transform: rotate(-10deg) scale(1.06); }

/* Quien pidió menos movimiento ve la marca ya dibujada, sin animación. */
@media (prefers-reduced-motion: reduce) {
  .brand-c-arco { animation: none; stroke-dashoffset: 0; }
  .brand-c-punto { animation: none; opacity: 1; }
  .sidebar-brand:hover .brand-c { transform: none; }
}

.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-name { font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; color: var(--ink); letter-spacing: 0.01em; }
.brand-sub { font-size: 0.72rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }

.sidebar-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: 13px;
  min-height: 50px; padding: 11px 14px;
  border-radius: var(--r-md);
  color: var(--text); font-size: 1rem; font-weight: 600;
  transition: background 0.15s, color 0.15s;
}
.nav-item svg { flex-shrink: 0; opacity: 0.85; }
.nav-item:hover { background: var(--surface-2); color: var(--ink); }
.nav-item.active { background: var(--brand-soft); color: var(--brand-strong); }
.nav-item.active svg { opacity: 1; }

.sidebar-help { padding: 18px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-lg); }
.sidebar-help-title { font-size: 0.95rem; font-weight: 700; color: var(--ink); }
.sidebar-help-text { font-size: 0.85rem; color: var(--muted); margin: 4px 0 12px; line-height: 1.5; }
/* El correo es largo para lo angosta que es la barra: se deja partir
   antes que desbordar la tarjeta. */
.sidebar-help-mail { display: block; font-size: 0.92rem; font-weight: 700; color: var(--brand); overflow-wrap: anywhere; margin-bottom: 12px; }
.sidebar-help-mail:hover { color: var(--brand-strong); text-decoration: underline; }

.sidebar-user { display: flex; align-items: center; gap: 11px; padding-top: 18px; border-top: 1px solid var(--line); }
.sidebar-user-text { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.3; }
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 1px solid var(--line); }
.user-name { font-size: 0.94rem; font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-team { font-size: 0.76rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.app-main { flex: 1; min-width: 0; }
.content { max-width: 1020px; margin: 0 auto; padding: 40px 40px 72px; }

/* --------------------------------------------------------------------------
   ENCABEZADO DE PÁGINA
   -------------------------------------------------------------------------- */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 32px; }
.eyebrow { font-size: 0.78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 8px; }
.page-title { font-family: var(--font-display); font-size: 2.3rem; font-weight: 600; color: var(--ink); line-height: 1.2; }
.page-lead { font-size: 1.05rem; color: var(--muted); margin-top: 10px; max-width: 62ch; }
.page-head-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.text-size-controls { display: flex; align-items: center; gap: 6px; padding: 5px 6px 5px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-pill); }
.text-size-label { font-size: 0.78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.text-size-controls button { width: 40px; height: 40px; border: 1px solid var(--line); background: var(--surface); border-radius: 50%; font-weight: 700; font-size: 0.95rem; color: var(--ink); cursor: pointer; }
.text-size-controls button:hover { background: var(--surface-2); border-color: var(--muted); }

/* --------------------------------------------------------------------------
   AVISO INSTITUCIONAL
   -------------------------------------------------------------------------- */
.notice {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 20px 24px; margin-bottom: 44px;
  background: var(--surface); border: 1px solid var(--line);
  border-left: 4px solid var(--brand); border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
}
.notice-icon { flex-shrink: 0; color: var(--brand); margin-top: 2px; }
.notice-label { font-size: 0.74rem; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 4px; }
#notice-text { font-size: 1.02rem; color: var(--ink); }

/* --------------------------------------------------------------------------
   SECCIONES
   -------------------------------------------------------------------------- */
.section { margin-bottom: 48px; }
.section:last-child { margin-bottom: 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.section-head h2 { font-size: 1.3rem; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; }
.section-sub { font-size: 0.92rem; color: var(--muted); margin-top: 3px; }
.section-meta { font-size: 0.8rem; color: var(--muted); }

/* --------------------------------------------------------------------------
   TARJETAS DE HERRAMIENTA — ícono, nombre, explicación y flecha
   -------------------------------------------------------------------------- */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 14px; }
.tool-card {
  display: flex; align-items: center; gap: 16px;
  padding: 20px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.tool-card:hover { border-color: var(--muted); box-shadow: var(--sh-2); transform: translateY(-2px); }
.tool-card:active { transform: translateY(0); }
.tool-icon {
  display: flex; align-items: center; justify-content: center;
  width: 54px; height: 54px; flex-shrink: 0;
  border-radius: var(--r-md);
  background: var(--a-mail-bg); color: var(--a-mail);
}
.tool-body { flex: 1; min-width: 0; }
.tool-title { display: block; font-size: 1.08rem; font-weight: 700; color: var(--ink); }
.tool-desc { display: block; font-size: 0.9rem; color: var(--muted); line-height: 1.45; margin-top: 2px; }
.tool-arrow { flex-shrink: 0; color: var(--muted); }
.tool-card:hover .tool-arrow { color: var(--brand); }

.tool-card[data-accent="docs"] .tool-icon { background: var(--a-docs-bg); color: var(--a-docs); }
.tool-card[data-accent="team"] .tool-icon { background: var(--a-team-bg); color: var(--a-team); }
.tool-card[data-accent="meet"] .tool-icon { background: var(--a-meet-bg); color: var(--a-meet); }
.tool-card[data-accent="forms"] .tool-icon { background: var(--a-forms-bg); color: var(--a-forms); }
.tool-card[data-accent="help"] .tool-icon { background: var(--a-help-bg); color: var(--a-help); }

/* --------------------------------------------------------------------------
   NOTICIAS — lista compacta, no un muro de fotos
   -------------------------------------------------------------------------- */
.news-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-1); }
.news-item { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-top: 1px solid var(--line); transition: background 0.15s; }
.news-item:first-child { border-top: none; }
.news-item:hover { background: var(--surface-2); }
.news-thumb { width: 76px; height: 60px; flex-shrink: 0; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.news-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-body { flex: 1; min-width: 0; }
.news-meta { font-size: 0.75rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; }
.news-title { font-size: 1rem; font-weight: 600; color: var(--ink); line-height: 1.4; }
.news-item:hover .news-title { color: var(--brand-strong); }
.news-arrow { flex-shrink: 0; color: var(--muted); }
.news-empty { padding: 26px 20px; text-align: center; font-size: 0.95rem; color: var(--muted); }

/* --------------------------------------------------------------------------
   LISTAS DE PÁGINAS INTERNAS (documentos, solicitudes, guías)
   -------------------------------------------------------------------------- */
.stack { display: flex; flex-direction: column; gap: 12px; }
.row-card {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 20px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.row-card:hover { border-color: var(--muted); box-shadow: var(--sh-2); }
.row-icon { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; flex-shrink: 0; border-radius: var(--r-md); background: var(--a-docs-bg); color: var(--a-docs); font-size: 0.92rem; font-weight: 700; }
.row-body { flex: 1; min-width: 0; }
.row-title { display: block; font-size: 1.05rem; font-weight: 700; color: var(--ink); }
.row-desc { display: block; font-size: 0.9rem; color: var(--muted); margin-top: 2px; }
.row-arrow { flex-shrink: 0; color: var(--muted); }

.urgent-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 22px 24px; margin-bottom: 44px; background: var(--brand-soft); border: 1px solid var(--brand-line); border-radius: var(--r-lg); }
.urgent-title { font-size: 1.05rem; font-weight: 700; color: var(--brand-strong); }
.urgent-text { font-size: 0.94rem; color: var(--text); margin-top: 2px; }

/* Guías desplegables */
.guide-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-1); }
.guide-toggle { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 64px; padding: 18px 20px; background: none; border: none; text-align: left; cursor: pointer; }
.guide-toggle:hover { background: var(--surface-2); }
.guide-toggle .row-title { flex: 1; }
.guide-icon { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex-shrink: 0; border-radius: var(--r-md); background: var(--a-help-bg); color: var(--a-help); }
.guide-chevron { flex-shrink: 0; color: var(--muted); transition: transform 0.2s; }
.guide-toggle[aria-expanded="true"] .guide-chevron { transform: rotate(90deg); }
.guide-detail { display: none; padding: 4px 20px 24px 78px; }
.guide-detail.open { display: block; }
.guide-video-placeholder { padding: 28px 20px; margin-bottom: 20px; background: var(--surface-2); border: 1px dashed var(--line); border-radius: var(--r-md); text-align: center; font-size: 0.92rem; color: var(--muted); }
.guide-detail h3 { font-size: 1.02rem; font-weight: 700; color: var(--ink); margin: 20px 0 10px; }
.guide-detail h3:first-child { margin-top: 0; }
.guide-detail ol { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 9px; }
.guide-detail li { font-size: 0.98rem; color: var(--text); line-height: 1.6; }

/* --------------------------------------------------------------------------
   FORMULARIOS DE SOLICITUD — campos grandes, una pregunta debajo de otra
   -------------------------------------------------------------------------- */
.content-narrow { max-width: 700px; }
.back-link { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; margin-bottom: 12px; font-size: 0.94rem; font-weight: 600; color: var(--muted); }
.back-link:hover { color: var(--brand); }

.solicitud-form { display: flex; flex-direction: column; gap: 30px; }
.form-field { display: flex; flex-direction: column; gap: 8px; }
.form-label { font-size: 1.08rem; font-weight: 700; color: var(--ink); }
.form-optional { margin-left: 8px; font-size: 0.76rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.form-help { font-size: 0.92rem; color: var(--muted); line-height: 1.5; margin-top: -2px; }
.form-input, .form-textarea {
  width: 100%; padding: 15px 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  font-family: inherit; font-size: 1.02rem; color: var(--ink);
}
.form-input { min-height: 56px; }
.form-textarea { resize: vertical; min-height: 130px; line-height: 1.6; }
.form-input:focus, .form-textarea:focus { border-color: var(--brand); outline: 2px solid var(--brand-line); }

/* Opciones como filas grandes: más fáciles de acertar que una lista
   desplegable, y se ven todas a la vez. */
.option-list { display: flex; flex-direction: column; gap: 10px; }
.option-row {
  display: flex; align-items: center; gap: 13px;
  min-height: 60px; padding: 14px 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  cursor: pointer; transition: border-color 0.15s, background 0.15s;
}
.option-row:hover { border-color: var(--muted); }
.option-row input { width: 22px; height: 22px; flex-shrink: 0; accent-color: var(--brand); cursor: pointer; }
.option-text { font-size: 1.02rem; color: var(--ink); }
.option-row:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.option-row:has(input:focus-visible) { outline: 3px solid var(--brand); outline-offset: 2px; }

.form-field-error, .form-error { font-size: 0.94rem; font-weight: 600; color: var(--brand-strong); }
.form-error { padding: 16px 18px; background: var(--brand-soft); border: 1px solid var(--brand-line); border-radius: var(--r-md); line-height: 1.6; font-weight: 500; }
.form-error-accion { display: inline-flex; margin-top: 14px; }
.form-signature { font-size: 0.92rem; color: var(--muted); line-height: 1.55; padding-top: 4px; border-top: 1px solid var(--line); }
.btn-enviar { min-height: 60px; font-size: 1.08rem; }

.form-done { padding: 40px 32px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); text-align: center; }
.form-done-icon { display: inline-flex; align-items: center; justify-content: center; width: 66px; height: 66px; margin-bottom: 18px; border-radius: 50%; background: var(--a-team-bg); color: var(--a-team); }
.form-done h2 { font-size: 1.4rem; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.form-done p { font-size: 1rem; color: var(--muted); line-height: 1.6; max-width: 44ch; margin: 0 auto; }
.form-done-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 26px; }

/* --------------------------------------------------------------------------
   INGRESO — panel institucional + pasos
   -------------------------------------------------------------------------- */
/* "margin: auto" en vez de "align-items: center": centra igual, pero si la
   tarjeta es más alta que la pantalla se puede desplazar sin que se corte
   por arriba. */
.login-view { position: fixed; inset: 0; z-index: 900; display: flex; justify-content: center; padding: 24px; background: var(--bg); overflow-y: auto; }
.login-card { display: grid; grid-template-columns: 0.9fr 1.1fr; width: 100%; max-width: 940px; margin: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--sh-3); overflow: hidden; }
.login-aside { display: flex; flex-direction: column; gap: 30px; padding: 42px 36px; background: linear-gradient(165deg, var(--brand) 0%, #8A2A22 100%); color: #fff; }
.login-aside .brand-mark { background: rgba(255, 255, 255, 0.16); }
.login-aside .brand-name { color: #fff; }
.login-aside .brand-sub { color: rgba(255, 255, 255, 0.78); }
.login-aside-name {
  font-family: var(--font-display); font-size: 1.22rem; line-height: 1.35;
  color: rgba(255, 255, 255, 0.96);
  margin-top: 20px; padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
}
.login-features { display: flex; flex-direction: column; gap: 13px; }
.login-features-title { font-size: 0.76rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255, 255, 255, 0.7); }
.login-feature { display: flex; align-items: center; gap: 12px; font-size: 0.97rem; color: rgba(255, 255, 255, 0.94); }
.login-feature-icon { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; flex-shrink: 0; border-radius: var(--r-sm); background: rgba(255, 255, 255, 0.15); }
/* El pie queda abajo del todo; si la tarjeta crece (al abrir la ayuda),
   el espacio sobrante se acumula aquí y no en medio de la identidad. */
.login-aside-foot { margin-top: auto; padding-top: 10px; font-size: 0.8rem; line-height: 1.65; color: rgba(255, 255, 255, 0.72); }
.login-sedes { font-weight: 700; letter-spacing: 0.04em; color: rgba(255, 255, 255, 0.92); }
.login-main { padding: 44px 42px 34px; }
.login-title { font-family: var(--font-display); font-size: 1.8rem; font-weight: 600; line-height: 1.25; color: var(--ink); }
.login-desc { font-size: 0.98rem; color: var(--muted); margin: 10px 0 26px; }
.login-steps { display: flex; flex-direction: column; gap: 16px; margin-bottom: 28px; }
.login-step { display: flex; align-items: flex-start; gap: 14px; }
.login-step-num { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%; background: var(--brand-soft); color: var(--brand-strong); font-size: 0.86rem; font-weight: 700; }
.login-step-title { font-size: 1rem; font-weight: 700; color: var(--ink); }
.login-step-desc { font-size: 0.9rem; color: var(--muted); margin-top: 2px; }
.google-btn { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 58px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--sh-1); font-size: 1.05rem; font-weight: 700; color: var(--ink); cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s; }
.google-btn:hover { border-color: var(--muted); box-shadow: var(--sh-2); }
.login-help-toggle { display: block; width: 100%; margin-top: 18px; padding: 12px; background: none; border: none; color: var(--brand); font-size: 0.94rem; font-weight: 600; text-decoration: underline; cursor: pointer; }
.login-help-box { display: none; padding: 18px 20px; margin-top: 8px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); font-size: 0.94rem; color: var(--text); line-height: 1.65; }
.login-help-box.open { display: block; }
.login-help-box ol { margin: 10px 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }

/* --------------------------------------------------------------------------
   VENTANAS (aviso institucional, tutorial)
   -------------------------------------------------------------------------- */
.modal-overlay { display: none; position: fixed; inset: 0; z-index: 1000; align-items: center; justify-content: center; padding: 24px; background: rgba(35, 32, 29, 0.5); }
.modal-overlay.open { display: flex; }
.modal-card { width: 100%; max-width: 500px; padding: 30px; background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--sh-3); }
.modal-card h2 { font-size: 1.35rem; font-weight: 700; color: var(--ink); }
.modal-card .hint { font-size: 0.94rem; color: var(--muted); margin: 6px 0 20px; }
.modal-card textarea { width: 100%; min-height: 130px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-md); font-family: inherit; font-size: 1rem; color: var(--text); resize: vertical; }
.modal-card textarea:focus { border-color: var(--brand); outline: none; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
/* Estado de la configuración, dentro del panel de administración */
.estado-config { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.estado-config summary { font-size: 0.88rem; font-weight: 700; color: var(--muted); cursor: pointer; min-height: 32px; }
.estado-config summary:hover { color: var(--ink); }
.estado-config dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 14px 0 0; font-size: 0.85rem; }
.estado-config dt { color: var(--muted); }
.estado-config dd { margin: 0; overflow-wrap: anywhere; }
.estado-ok { color: var(--ink); font-weight: 600; }
.estado-falta { color: var(--brand-strong); font-weight: 600; }

.tutorial-card { text-align: center; }
.tutorial-conteo { font-size: 0.74rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 20px; }
.tutorial-step { display: none; }
.tutorial-step.active { display: block; }
.tutorial-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 76px; height: 76px; margin-bottom: 20px;
  border-radius: 50%; background: var(--a-docs-bg); color: var(--a-docs);
}
.tutorial-icon[data-accent="help"] { background: var(--a-help-bg); color: var(--a-help); }
.tutorial-icon[data-accent="meet"] { background: var(--a-meet-bg); color: var(--a-meet); }
.tutorial-step h2 { font-size: 1.35rem; margin-bottom: 10px; }
.tutorial-step p { font-size: 1.02rem; color: var(--text); line-height: 1.6; max-width: 40ch; margin: 0 auto; }
.tutorial-acciones { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 28px; }
.tutorial-avance { display: flex; gap: 10px; margin-left: auto; }

@media (max-width: 560px) {
  .tutorial-acciones { flex-direction: column-reverse; align-items: stretch; }
  .tutorial-avance { margin-left: 0; }
  .tutorial-avance .btn { flex: 1; }
}

/* --------------------------------------------------------------------------
   AVISO DE CONEXIÓN
   -------------------------------------------------------------------------- */
.connection-banner { display: none; padding: 11px 20px; background: #FBF0DE; color: #7A4E12; border-bottom: 1px solid #EBD9B8; text-align: center; font-size: 0.9rem; font-weight: 600; }
.connection-banner.show { display: block; }

/* --------------------------------------------------------------------------
   BARRA INFERIOR — solo celular
   -------------------------------------------------------------------------- */
.mobile-tabbar { display: none; }

@media (max-width: 980px) {
  /* La barra lateral se convierte en la cabecera; navegar pasa a la barra
     inferior, que en celular queda siempre al alcance del pulgar. */
  .app-shell { display: block; }
  .sidebar {
    flex-direction: row; align-items: center; justify-content: space-between; gap: 16px;
    width: auto; height: auto; padding: 12px 18px;
    border-right: none; border-bottom: 1px solid var(--line);
  }
  .sidebar-nav, .sidebar-help { display: none; }
  .sidebar-user { padding-top: 0; border-top: none; }
  .sidebar-user-text { display: none; }
  .content { padding: 28px 18px 40px; max-width: none; }
  .page-title { font-size: 1.85rem; }
  .page-head { align-items: flex-start; margin-bottom: 26px; }
  .tool-grid { grid-template-columns: 1fr; }
  .guide-detail { padding-left: 20px; }

  body { padding-bottom: 92px; }
  .mobile-tabbar {
    display: flex; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 300;
    padding: 8px 4px; justify-content: space-around; align-items: center;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--r-lg); box-shadow: var(--sh-3);
  }
  .mobile-tab {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    flex: 1; min-height: 52px; padding: 6px 2px;
    border-radius: var(--r-md); color: var(--muted);
    font-size: 0.7rem; font-weight: 600; text-align: center;
  }
  .mobile-tab.active { background: var(--brand-soft); color: var(--brand-strong); }
}

@media (max-width: 860px) {
  /* En celular se conserva la identidad (marca y nombre completo) y se
     recortan el detalle de servicios y el pie, que allí solo alargarían
     la pantalla antes del botón de ingreso. */
  .login-card { grid-template-columns: 1fr; max-width: 480px; }
  .login-aside { gap: 20px; padding: 28px 26px; }
  .login-features, .login-aside-foot { display: none; }
  .login-aside-name { font-size: 1.08rem; margin-top: 16px; padding-top: 16px; }
  .login-main { padding: 30px 26px 26px; }
  .login-title { font-size: 1.6rem; }
}

@media (max-width: 560px) {
  .urgent-card, .modal-actions { flex-direction: column; align-items: stretch; }
  .modal-actions .btn { width: 100%; }
  .news-thumb { display: none; }
}
