/* frontend/css/manual.css -- Manual tecnico (Recursos -> Manual tecnico, solo super_admin).
   Estilo de documentacion: legible, con indice lateral, tablas con scroll y diagramas. */
.mt { position: fixed; inset: 0; z-index: 9000; background: #fff; color: #1f2328; font-family: var(--font-sans, Inter, sans-serif); display: flex; flex-direction: column; }
.mt * { box-sizing: border-box; }
.mt-top { flex: none; height: 58px; display: flex; align-items: center; gap: 14px; padding: 0 16px; background: #257C4D; color: #DDE2D2; border-bottom: 4px solid #F2B230; }
.mt-brand { font-weight: 800; letter-spacing: .02em; white-space: nowrap; }
.mt-brand i { color: #F2B230; margin-right: 8px; }
.mt-brand span { font-weight: 500; opacity: .6; margin-left: 6px; font-size: .8rem; letter-spacing: .12em; }
.mt-search { flex: 1; max-width: 560px; margin: 0 auto; position: relative; }
.mt-search i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #8E8E8D; font-size: .85rem; }
.mt-search input { width: 100%; padding: 9px 12px 9px 34px; border-radius: 8px; border: 1px solid rgba(221,226,210,.5); background: rgba(29,29,27,.25); color: #DDE2D2; font-size: .9rem; outline: none; }
.mt-search input:focus { border-color: #F2B230; }
.mt-search input::placeholder { color: #8E8E8D; }
.mt-btn { width: 38px; height: 38px; border-radius: 8px; border: 1px solid rgba(221,226,210,.5); background: transparent; color: #DDE2D2; cursor: pointer; font-size: .95rem; }
.mt-btn:hover { background: rgba(29,29,27,.25); }
.mt-close { background: #E14448; border-color: #E14448; }
.mt-close:hover { background: #E14448; }
.mt-burger { display: none; }
.mt-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 300px minmax(0, 1fr) 250px; }
.mt-side { overflow-y: auto; padding: 16px 12px 40px; background: #f6f8fa; border-right: 1px solid #d8dee4; }
.mt-grp { margin-bottom: 18px; }
.mt-grp-h { font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #257C4D; padding: 0 10px 6px; }
.mt-item { display: block; padding: 7px 10px; border-radius: 6px; color: #3d444d; text-decoration: none; font-size: .86rem; line-height: 1.3; }
.mt-item:hover { background: #e9edf1; }
.mt-item.on { background: #257C4D; color: #DDE2D2; font-weight: 600; }
.mt-main { overflow-y: auto; scroll-behavior: smooth; }
.mt-article { max-width: 960px; margin: 0 auto; padding: 32px 36px 90px; line-height: 1.65; font-size: .96rem; }
.mt-toc { overflow-y: auto; padding: 24px 14px; border-left: 1px solid #eaeef2; font-size: .8rem; }
.mt-toc-h { font-weight: 800; text-transform: uppercase; letter-spacing: .1em; font-size: .68rem; color: #257C4D; margin-bottom: 8px; }
.mt-toc a { display: block; padding: 3px 0; color: #59636e; text-decoration: none; line-height: 1.35; }
.mt-toc a:hover { color: #257C4D; }
.mt-toc-h3 { padding-left: 12px !important; font-size: .76rem; }
.mt-loading, .mt-err { padding: 40px; text-align: center; color: #59636e; }
.mt-err { color: #E14448; }

/* tipografia del contenido */
.mt-article h1 { font-size: 2rem; margin: 0 0 18px; padding-bottom: 12px; border-bottom: 3px solid #F2B230; line-height: 1.2; color: #1f2328; }
.mt-article h2 { font-size: 1.4rem; margin: 38px 0 12px; padding-bottom: 6px; border-bottom: 1px solid #d8dee4; color: #1f2328; }
.mt-article h3 { font-size: 1.1rem; margin: 26px 0 8px; color: #1f2328; }
.mt-article h4 { font-size: 1rem; margin: 20px 0 6px; color: #1f2328; }
.mt-article p { margin: 0 0 14px; }
.mt-article a { color: #257C4D; }
.mt-article a:hover { color: #1D1D1B; }
.mt-fuera { border-bottom: 1px dotted #8E8E8D; cursor: help; }
.mt-article ul, .mt-article ol { padding-left: 24px; margin: 0 0 14px; }
.mt-article li { margin: 4px 0; }
.mt-article code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .86em; background: #eff1f3; padding: 2px 6px; border-radius: 5px; }
.mt-article pre { position: relative; background: #1e1e1e; color: #e6e6e6; padding: 14px 16px; border-radius: 8px; overflow-x: auto; margin: 0 0 16px; font-size: .84rem; line-height: 1.5; }
.mt-article pre code { background: none; padding: 0; color: inherit; font-size: inherit; }
.mt-copy { position: absolute; top: 6px; right: 6px; border: 0; background: #3a3a3a; color: #ddd; border-radius: 6px; padding: 4px 8px; cursor: pointer; opacity: 0; transition: opacity .15s; }
.mt-code:hover .mt-copy { opacity: 1; }
.mt-article blockquote { margin: 0 0 16px; padding: 10px 16px; border-left: 4px solid #F2B230; background: rgba(221,226,210,.35); color: #3d444d; border-radius: 0 8px 8px 0; }
.mt-article blockquote p:last-child { margin-bottom: 0; }
.mt-tabla { overflow-x: auto; margin: 0 0 18px; border: 1px solid #d8dee4; border-radius: 8px; }
.mt-article table { border-collapse: collapse; width: 100%; font-size: .85rem; }
.mt-article th { background: #f6f8fa; text-align: left; font-weight: 700; }
.mt-article th, .mt-article td { padding: 8px 12px; border-bottom: 1px solid #eaeef2; vertical-align: top; }
.mt-article tr:last-child td { border-bottom: 0; }
.mt-article tbody tr:nth-child(even) { background: #fafbfc; }
.mt-article hr { border: 0; border-top: 1px solid #d8dee4; margin: 28px 0; }
.mt-article mark, .mt-res mark { background: #ffe58f; padding: 0 2px; border-radius: 3px; }
.mt-diagrama { background: #fff; border: 1px solid #d8dee4; border-radius: 10px; padding: 16px; margin: 0 0 20px; overflow-x: auto; text-align: center; }
.mt-diagrama { cursor: zoom-in; position: relative; }
.mt-diagrama::after { content: 'clic para ampliar'; position: absolute; right: 10px; top: 6px; font-size: .68rem; color: #8b949e; }
.mt-diagrama.mt-zoom { cursor: zoom-out; }
.mt-diagrama.mt-zoom::after { content: 'clic para reducir'; }
.mt-diagrama svg { max-width: 100%; height: auto; }
.mt-diagrama.mt-zoom svg { max-width: none !important; width: 1700px !important; }
.mt-diag-err { white-space: pre-wrap; text-align: left; font-family: monospace; font-size: .8rem; color: #E14448; }

/* resultados de busqueda */
.mt-res-h { font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #257C4D; padding: 4px 8px 8px; }
.mt-res-item { display: block; padding: 9px 10px; border-radius: 8px; text-decoration: none; color: #1f2328; margin-bottom: 4px; border: 1px solid transparent; }
.mt-res-item:hover { background: #fff; border-color: #d8dee4; }
.mt-res-item b { display: block; font-size: .85rem; }
.mt-res-item span { font-size: .72rem; color: #257C4D; font-weight: 700; }
.mt-res-item small { display: block; margin-top: 4px; color: #59636e; font-size: .74rem; line-height: 1.4; }

/* Pagina "Manuales" (Recursos): tarjetas de igual diseno para cada manual */
.man-page { max-width: 1040px; margin: 0 auto; padding: 8px 4px 40px; }
.man-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .74rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #257C4D; margin-bottom: 10px; }
.man-eyebrow::before { content: ''; width: 20px; height: 2px; background: #F2B230; }
.man-page h1 { font-family: var(--font-serif); font-size: clamp(1.8rem, 3.4vw, 2.5rem); line-height: 1.1; margin: 0 0 8px; color: var(--text-primary); }
.man-page > p { color: var(--text-secondary); max-width: 68ch; margin: 0 0 26px; }
.man-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.man-card { display: flex; flex-direction: column; background: #257C4D; color: #DDE2D2; border-radius: 18px; padding: 26px; border: 3px solid #1D1D1B; box-shadow: 6px 6px 0 #1D1D1B; }
.man-card .man-ico { width: 46px; height: 46px; border-radius: 12px; background: #F2B230; color: #257C4D; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; margin-bottom: 14px; }
.man-card h2 { font-family: var(--font-serif); font-size: 1.35rem; line-height: 1.2; margin: 0 0 8px; color: #DDE2D2; }
.man-card p { flex: 1; opacity: .88; font-size: .92rem; line-height: 1.55; margin: 0 0 16px; }
.man-tag { align-self: flex-start; background: rgba(221,226,210,.14); color: #DDE2D2; font-size: .66rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; padding: 3px 10px; border-radius: 50px; margin-bottom: 12px; }
.man-tag.lock { background: #E14448; }
.man-meta { font-size: .76rem; opacity: .65; margin-bottom: 14px; }
.man-card .btn { align-self: flex-start; }
.man-err { padding: 22px; color: #E14448; }

@media (max-width: 1180px) { .mt-body { grid-template-columns: 280px minmax(0, 1fr); } .mt-toc { display: none; } }
@media (max-width: 900px) {
    .mt-burger { display: inline-block; }
    .mt-brand span { display: none; }
    .mt-body { grid-template-columns: minmax(0, 1fr); }
    .mt-side { position: absolute; top: 58px; bottom: 0; left: 0; width: min(88vw, 320px); z-index: 5; transform: translateX(-102%); transition: transform .2s; border-right: 3px solid #1D1D1B; }
    .mt-side-open .mt-side { transform: none; }
    .mt-article { padding: 20px 16px 80px; }
}
/* Un solo documento (Manual de Operacion / Reglamento): el lateral es su tabla de contenido y no hay TOC a la derecha */
.mt-solo .mt-body { grid-template-columns: 280px minmax(0, 1fr); }
.mt-solo .mt-toc { display: none; }
@media (max-width: 900px) { .mt-solo .mt-body { grid-template-columns: minmax(0, 1fr); } }
