/*
 * SITRAM 2.0 — Identidad visual del panel (Filament 5). Solo presentación.
 * Paleta: azul #006DB6, cielo #00A7E8, profundo #073B70, fondo #F7FAFF, texto #475569;
 * culturales (solo detalles): jade #16845B, maíz #E9B949, rojo textil #B93846, naranja #DB783A.
 */
:root {
    --sitram-azul: #006db6;
    --sitram-cielo: #00a7e8;
    --sitram-profundo: #073b70;
    --sitram-fondo: #f7faff;
    --sitram-texto: #475569;
    --sitram-borde: #e2eaf5;
    --sitram-jade: #16845b;
    --sitram-maiz: #e9b949;
    --sitram-rojo: #b93846;
    --sitram-naranja: #db783a;
    --sitram-sombra: 0 1px 2px rgba(7, 59, 112, .05), 0 6px 20px rgba(7, 59, 112, .06);
    --sitram-radio: 14px;
    /* Banda textil (rombos y grecas inspirados en tejidos guatemaltecos). */
    --sitram-tejido: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='16' viewBox='0 0 48 16'%3E%3Crect width='48' height='16' fill='%23073B70'/%3E%3Cpath d='M0 8 8 0l8 8-8 8z' fill='%23006DB6'/%3E%3Cpath d='M16 8l8-8 8 8-8 8z' fill='%2316845B'/%3E%3Cpath d='M32 8l8-8 8 8-8 8z' fill='%23B93846'/%3E%3Cpath d='M4 8l4-4 4 4-4 4z' fill='%23E9B949'/%3E%3Cpath d='M20 8l4-4 4 4-4 4z' fill='%23DB783A'/%3E%3Cpath d='M36 8l4-4 4 4-4 4z' fill='%23E9B949'/%3E%3Ccircle cx='8' cy='8' r='1.3' fill='%23fff'/%3E%3Ccircle cx='24' cy='8' r='1.3' fill='%23fff'/%3E%3Ccircle cx='40' cy='8' r='1.3' fill='%23fff'/%3E%3C/svg%3E");
    /* Greca fina para separadores (azul sobre transparente). */
    --sitram-greca: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='8' viewBox='0 0 24 8'%3E%3Cpath d='M0 7 6 1l6 6 6-6 6 6' fill='none' stroke='%2300A7E8' stroke-width='1.4'/%3E%3C/svg%3E");
}

.sitram-tejido { height: 10px; background: var(--sitram-tejido) repeat-x center / auto 10px; border-radius: 3px; }
.sitram-greca { height: 8px; background: var(--sitram-greca) repeat-x center / auto 8px; opacity: .55; }

/* ---------- Base ---------- */
.fi-body { background: var(--sitram-fondo); color: var(--sitram-texto); }
.fi-header-heading { color: var(--sitram-profundo); letter-spacing: -.01em; }
.fi-header-subheading, .fi-section-header-description { color: var(--sitram-texto); }
.fi-body :focus-visible { outline: 3px solid var(--sitram-cielo); outline-offset: 2px; border-radius: 6px; }
.fi-main { overflow-x: clip; }

/* ---------- Menú lateral compacto ---------- */
.fi-sidebar { background: #fff; border-inline-end: 1px solid var(--sitram-borde); }
.sitram-sidebar-logo { display: flex; justify-content: center; padding: .75rem 1rem .5rem; }
.sitram-sidebar-logo img { width: 128px; height: auto; }
.fi-sidebar-nav { gap: .25rem; padding-top: .25rem; }
.fi-sidebar-nav-groups { gap: .35rem; }
.fi-sidebar-group { padding-top: .45rem; border-top: 1px solid var(--sitram-borde); }
.fi-sidebar-group-label { color: var(--sitram-profundo); font-weight: 700; letter-spacing: .05em; text-transform: uppercase; font-size: .68rem; }
.fi-sidebar-item-btn { border-radius: 10px; padding-block: .45rem; }
.fi-sidebar-item-btn:hover { background: #eef5fc; }
.fi-sidebar-item-label { font-size: .875rem; }
.fi-sidebar-item.fi-active > .fi-sidebar-item-btn { background: var(--sitram-azul); box-shadow: 0 4px 12px rgba(0, 109, 182, .25); }
.fi-sidebar-item.fi-active > .fi-sidebar-item-btn .fi-sidebar-item-label,
.fi-sidebar-item.fi-active > .fi-sidebar-item-btn svg { color: #fff !important; }
.fi-sidebar-footer { padding: 0 !important; }
.sitram-sidebar-pie { border-top: 1px solid var(--sitram-borde); background: #fff; }
.sitram-usuario { display: flex; gap: .65rem; align-items: center; padding: .7rem 1rem; }
.sitram-usuario-avatar { flex: none; width: 36px; height: 36px; border-radius: 999px; display: grid; place-items: center; background: linear-gradient(135deg, var(--sitram-azul), var(--sitram-profundo)); color: #fff; font-weight: 700; font-size: .8rem; }
.sitram-usuario-datos { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.sitram-usuario-datos strong { color: var(--sitram-profundo); font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sitram-usuario-datos small { color: var(--sitram-texto); font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sitram-sidebar-pie .sitram-tejido { height: 12px; background-size: auto 12px; border-radius: 0; }

/* ---------- Barra superior ---------- */
.fi-topbar { background: #fff; border-bottom: 1px solid var(--sitram-borde); box-shadow: none; }
.fi-topbar .fi-logo { height: 2.5rem !important; }
@media (min-width: 1024px) { .fi-topbar .fi-logo { display: none; } }
.sitram-lema { display: none; flex-direction: column; align-items: flex-end; line-height: 1.1; margin-inline-end: .75rem; }
@media (min-width: 1280px) { .sitram-lema { display: flex; } }
.sitram-lema-pais { font-family: Georgia, "Times New Roman", serif; font-style: italic; font-weight: 700; font-size: 1.15rem; color: var(--sitram-azul); }
.sitram-lema-texto { font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; color: var(--sitram-profundo); }

/* ---------- Banner del escritorio ---------- */
.sitram-banner { position: relative; overflow: hidden; display: grid; grid-template-columns: auto 1fr minmax(0, 30%); gap: 1.5rem; align-items: center;
    background: linear-gradient(90deg, #fff 0%, #fff 24%, #f3f8fe 55%, #e4f1fc 100%); border: 1px solid var(--sitram-borde); border-radius: 18px; padding: 1.25rem 1.75rem; box-shadow: var(--sitram-sombra); min-height: 170px; }
.sitram-banner::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 8px; background: var(--sitram-tejido) repeat-x center / auto 8px; }
.sitram-banner-logo { width: 118px; height: auto; }
.sitram-banner-texto h2 { color: var(--sitram-profundo); font-size: clamp(1.25rem, 1.1rem + .8vw, 1.85rem); font-weight: 800; line-height: 1.15; letter-spacing: -.01em; }
.sitram-banner-texto h2 span { color: var(--sitram-azul); }
.sitram-banner-texto h2::after { content: ""; display: block; width: 56px; height: 4px; margin-top: .6rem; border-radius: 4px; background: var(--sitram-azul); }
.sitram-banner-texto p { color: var(--sitram-texto); margin-top: .5rem; font-size: .9rem; }
.sitram-banner-decoracion { position: relative; align-self: stretch; min-height: 130px; }
.sitram-banner-cinta { position: absolute; right: -40px; width: 140%; height: 18px; background: var(--sitram-tejido) repeat-x center / auto 18px; transform: rotate(-24deg); border-radius: 4px; opacity: .9; }
.sitram-banner-cinta.uno { top: 30%; }
.sitram-banner-cinta.dos { top: 60%; opacity: .45; height: 10px; background-size: auto 10px; }
.sitram-banner-decoracion ul { position: absolute; right: 0; bottom: .9rem; display: flex; gap: .4rem; flex-wrap: wrap; justify-content: flex-end; }
.sitram-banner-decoracion li { background: #fff; border: 1px solid var(--sitram-borde); color: var(--sitram-profundo); font-size: .7rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: .2rem .55rem; border-radius: 999px; }
@media (max-width: 1023px) { .sitram-banner { grid-template-columns: auto 1fr; } .sitram-banner-decoracion { display: none; } }
@media (max-width: 640px) { .sitram-banner { grid-template-columns: 1fr; text-align: center; padding: 1.25rem 1rem 1.5rem; } .sitram-banner-logo { margin: 0 auto; width: 96px; } .sitram-banner-texto h2::after { margin-inline: auto; } }

/* ---------- Tarjetas de indicadores ---------- */
.sitram-tarjetas { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .9rem; }
@media (max-width: 1535px) { .sitram-tarjetas { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 767px) { .sitram-tarjetas { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; } }
.sitram-tarjeta { display: flex; gap: .85rem; align-items: center; background: #fff; border: 1px solid var(--sitram-borde); border-radius: var(--sitram-radio); padding: .95rem 1rem; box-shadow: var(--sitram-sombra); min-width: 0; }
.sitram-tarjeta-icono { flex: none; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; }
.sitram-tarjeta-datos { display: flex; flex-direction: column; min-width: 0; }
.sitram-tarjeta-valor { color: var(--sitram-profundo); font-size: 1.6rem; font-weight: 800; line-height: 1.1; }
.sitram-tarjeta-etiqueta { color: var(--sitram-texto); font-size: .8rem; font-weight: 600; line-height: 1.25; }
.sitram-tarjeta-detalle { color: #64748b; font-size: .72rem; margin-top: .15rem; }
@media (max-width: 767px) { .sitram-tarjeta { flex-direction: column; align-items: flex-start; gap: .5rem; padding: .8rem; } .sitram-tarjeta-icono { width: 38px; height: 38px; } .sitram-tarjeta-valor { font-size: 1.35rem; } }
.tono-azul { background: #e6f1fa; color: var(--sitram-azul); }
.tono-cielo { background: #e3f5fd; color: #0284c7; }
.tono-profundo { background: #e7edf6; color: var(--sitram-profundo); }
.tono-jade { background: #e7f5ee; color: var(--sitram-jade); }
.tono-maiz { background: #fcf5e1; color: #9a6b00; }
.tono-rojo { background: #f9e9eb; color: var(--sitram-rojo); }
.tono-gris { background: #f1f5f9; color: #526175; }

/* ---------- Listas y estados ---------- */
.sitram-lista { display: flex; flex-direction: column; }
.sitram-lista li { display: grid; grid-template-columns: 1fr auto; column-gap: .75rem; padding: .65rem 0; border-bottom: 1px solid var(--sitram-borde); }
.sitram-lista li:last-child { border-bottom: 0; }
.sitram-lista-principal { color: var(--sitram-profundo); font-weight: 600; font-size: .88rem; }
.sitram-lista-secundario { grid-column: 1; color: var(--sitram-texto); font-size: .76rem; }
.sitram-estado { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: .72rem; font-weight: 700; border-radius: 999px; padding: .15rem .6rem; }
.sitram-vacio { display: grid; place-items: center; gap: .35rem; padding: 1.5rem 1rem; text-align: center; color: var(--sitram-texto); font-size: .88rem; }
.sitram-vacio-icono { width: 46px; height: 46px; border-radius: 999px; display: grid; place-items: center; background: #eef5fc; color: var(--sitram-azul); }
.sitram-vacio strong { color: var(--sitram-profundo); }

/* ---------- Tarjetas, secciones, tablas, controles de Filament ---------- */
.fi-section, .fi-ta-ctn, .fi-wi-chart, .fi-wi-stats-overview-stat {
    border-radius: var(--sitram-radio) !important; box-shadow: var(--sitram-sombra) !important; border: 1px solid var(--sitram-borde); }
.fi-section-header-heading, .fi-ta-header-heading { color: var(--sitram-profundo); }
.fi-ta-header-cell { background: #f3f7fc; color: var(--sitram-texto); font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; }
.fi-ta-row:hover { background: #f8fbff; }
.fi-ta-empty-state-heading { color: var(--sitram-profundo); }
.fi-badge { border-radius: 999px; }
.fi-btn { border-radius: 10px; }
.fi-input-wrp { border-radius: 10px; }
.fi-modal-window { border-radius: 18px; }
.fi-pagination-item-btn { border-radius: 8px; }
.fi-fo-field-wrp-error-message { font-weight: 500; }

/* ---------- Acceso, MFA y recuperación ---------- */
.fi-simple-layout { background: var(--sitram-fondo); position: relative; }
.fi-simple-layout::before, .fi-simple-layout::after { content: ""; position: absolute; inset-inline: 0; height: 12px; background: var(--sitram-tejido) repeat-x center / auto 12px; }
.fi-simple-layout::before { top: 0; }
.fi-simple-layout::after { bottom: 0; }
.fi-simple-main { background: #fff; border-radius: 20px; box-shadow: 0 10px 40px rgba(7, 59, 112, .10); border: 1px solid var(--sitram-borde); }
.fi-simple-layout .fi-logo { height: 7.5rem !important; margin-inline: auto; }
.sitram-acceso-nota { margin-top: 1rem; text-align: center; font-size: .8rem; color: var(--sitram-texto); }
.sitram-acceso-nota .sitram-greca { margin: 0 auto .5rem; max-width: 160px; }

/* ---------- Pie institucional ---------- */
.sitram-pie { padding: 1.5rem 1rem 1rem; text-align: center; font-size: .75rem; color: var(--sitram-texto); }
.sitram-pie .sitram-greca { max-width: 220px; margin: 0 auto .5rem; }

@media (prefers-reduced-motion: reduce) {
    .fi-body *, .fi-body *::before, .fi-body *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Rejilla del escritorio: tarjetas a altura completa de su fila ---------- */
.fi-wi-widget > .fi-section, .fi-wi-widget > .fi-ta, .fi-wi-widget > div > .fi-ta-ctn, .fi-wi-widget > .fi-wi-chart { height: 100%; }
.fi-wi-widget .fi-pagination-records-per-page-select-ctn { display: none; }
/* Menú lateral en móvil: un solo logotipo (el institucional grande) y más compacto. */
.fi-sidebar-header .fi-logo { display: none; }
@media (max-width: 1023px) { .sitram-sidebar-logo img { width: 96px; } .sitram-sidebar-logo { padding-top: .25rem; } }
/* Botón principal en azul institucional con texto blanco (contraste AA 5.4:1). */
.fi-btn.fi-color-primary.fi-bg-color-400 { background-color: var(--sitram-azul) !important; color: #fff !important; }
.fi-btn.fi-color-primary.fi-bg-color-400:hover { background-color: var(--sitram-profundo) !important; }
.fi-btn.fi-color-primary.fi-bg-color-400 svg, .fi-btn.fi-color-primary.fi-bg-color-400 .fi-btn-label { color: #fff !important; }
.fi-simple-header-heading { color: var(--sitram-profundo); }
/* Pantallas de acceso: el pie institucional ya lo cubre la nota de acceso. */
.fi-simple-layout .sitram-pie { display: none; }
