/* ─── abDatabase brand bar para documentos técnicos ──────────────
   Se inserta al principio del <body> de cada techdoc.
   No toca nada del contenido propio del documento.
─────────────────────────────────────────────────────────────── */

.abd-brand-bar {
    width: 100%;
    background: #2c3e50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    height: 52px;
    box-sizing: border-box;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    position: relative;
    z-index: 999;
}

.abd-brand-bar a {
    text-decoration: none;
    transition: opacity .2s;
}
.abd-brand-bar a:hover { opacity: .8; }

.abd-brand-logo {
    display: flex;
    align-items: center;
    gap: .6rem;
}
.abd-brand-logo img {
    height: 28px;
    /* Fuerza logo a blanco sobre fondo oscuro */
    filter: brightness(0) invert(1);
}
.abd-brand-logo-text {
    font-size: .95rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -.02em;
}

.abd-brand-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: .5rem;
}
.abd-brand-tag {
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #1abc9c;
    border: 1px solid rgba(26,188,156,.4);
    padding: .15rem .55rem;
    border-radius: 2rem;
}

.abd-brand-back {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .75rem;
    font-weight: 600;
    color: rgba(255,255,255,.65);
    letter-spacing: .02em;
}
.abd-brand-back svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}
.abd-brand-back:hover { color: #fff; }

/* ─── Thin accent line at top ───────────────────────────────── */
.abd-brand-bar::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: #1abc9c;
}

/* ─── Responsive: ocultar centro en pantallas pequeñas ──────── */
@media (max-width: 600px) {
    .abd-brand-center { display: none; }
    .abd-brand-bar { padding: 0 1rem; }
}

/* ═══════════════════════════════════════════════════════════════
   CORRECCIONES DE COLOR — aplicadas a todos los docs
═══════════════════════════════════════════════════════════════ */

/* Docs de red (mikrotik / wifi): alinear header a paleta abDatabase */
.header { background: linear-gradient(135deg, #1a2e3b 0%, #1a5e50 100%) !important; }
.header-tag { color: #1abc9c !important; }

/* ── Valores de luz base (se aplican siempre, ganan por !important) */
:root {
    /* Backgrounds */
    --bg:       #ffffff !important;
    --bg2:      #f5f4f0 !important;
    --bg3:      #eeecea !important;
    --surface:  #ffffff !important;
    --surface2: #f4f5f7 !important;
    --code-bg:  #f0f2f5 !important;
    /* Text */
    --text:     #1a1a18 !important;
    --text2:    #6b6a64 !important;
    --text3:    #9c9a92 !important;
    --muted:    #6c757d !important;
    /* Borders — valores fijos, sólidos, visibles */
    --border:   #c2c8ce !important;
    --border2:  #8d9399 !important;
    /* Semantic / accent */
    --accent:      #0066cc !important;
    --accent2:     #16a085 !important;
    --info-border: #378add !important;
    --blue-bg:   #e6f1fb !important;
    --blue-text: #0c447c !important;
    --green:     #27ae60 !important;
    --green-bg:  #eaf3de !important;
    --green-text:#3b6d11 !important;
    --amber-bg:  #faeeda !important;
    --amber-text:#854f0b !important;
    --red:       #e74c3c !important;
    --red-bg:    #fcebeb !important;
    --red-text:  #a32d2d !important;
    --yellow:    #e67e22 !important;
}

/* Forzar fondo/texto en body (cubre soft_instalar_mcp fondo #0f1117) */
body {
    background: #ffffff !important;
    color: #1a1a18 !important;
}

/* ── Dentro del bloque dark-mode del sistema: anular TODAS las
      variables oscuras. Debe ir AL FINAL del archivo para ganar
      en orden de fuente y con !important sobre las inline <style>. */
@media (prefers-color-scheme: dark) {
    :root {
        --bg:       #ffffff !important;
        --bg2:      #f5f4f0 !important;
        --bg3:      #eeecea !important;
        --surface:  #ffffff !important;
        --surface2: #f4f5f7 !important;
        --code-bg:  #f0f2f5 !important;
        --text:     #1a1a18 !important;
        --text2:    #6b6a64 !important;
        --text3:    #9c9a92 !important;
        --muted:    #6c757d !important;
        --border:   #c2c8ce !important;
        --border2:  #8d9399 !important;
        --accent:      #0066cc !important;
        --accent2:     #16a085 !important;
        --info-border: #378add !important;
        --blue-bg:   #e6f1fb !important;
        --blue-text: #0c447c !important;
        --green:     #27ae60 !important;
        --green-bg:  #eaf3de !important;
        --green-text:#3b6d11 !important;
        --amber-bg:  #faeeda !important;
        --amber-text:#854f0b !important;
        --red:       #e74c3c !important;
        --red-bg:    #fcebeb !important;
        --red-text:  #a32d2d !important;
        --yellow:    #e67e22 !important;
    }
    body {
        background: #ffffff !important;
        color: #1a1a18 !important;
    }
}

/* ═══════════════════════════════════════════════════════════════
   HEADER ESTÁNDAR DE DOCUMENTO TÉCNICO (.abd-doc-header)
   Réplica del header de mikrotik/wifi pero con clase propia,
   aplicado a guia_llm, comparativa y soft_instalar_mcp.
═══════════════════════════════════════════════════════════════ */

.abd-doc-header {
    background: linear-gradient(135deg, #1a2e3b 0%, #1a5e50 100%);
    color: white;
    padding: 40px 24px 36px;
    position: relative;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}
.abd-doc-header::before {
    content: '';
    position: absolute;
    right: -40px; top: -40px;
    width: 300px; height: 300px;
    border-radius: 50%;
    background: rgba(255,255,255,.04);
    pointer-events: none;
}
.abd-doc-header::after {
    content: '';
    position: absolute;
    right: 100px; bottom: -80px;
    width: 200px; height: 200px;
    border-radius: 50%;
    background: rgba(255,255,255,.03);
    pointer-events: none;
}
.abd-doc-header-inner {
    max-width: 920px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}
.abd-doc-header-tag {
    font-family: 'Poppins', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #1abc9c;
    margin-bottom: 10px;
}
.abd-doc-header h1 {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 8px;
    color: #fff;
}
.abd-doc-header-sub {
    font-size: 14px;
    color: rgba(255,255,255,.75);
    font-weight: 300;
    line-height: 1.5;
}
.abd-doc-header-meta {
    margin-top: 20px;
    font-size: 12px;
    color: rgba(255,255,255,.5);
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

/* ── Wrapper de contenido para guia_llm_local
      (body era el contenedor con max-width; ahora lo reemplaza este div) */
.abd-content-inner {
    max-width: 820px;
    margin: 0 auto;
    padding: 2rem 1.5rem 3rem;
}

/* ═══════════════════════════════════════════════════════════════
   BLOQUES DE CÓDIGO — fondo oscuro siempre (diseño intencional)
   Aplica a .code-block (soft_instalar_mcp) y <pre> (docs nuevos).
═══════════════════════════════════════════════════════════════ */

.code-block,
pre {
    background: #1a1d2e !important;
    border: 1px solid #2d3150 !important;
    border-left: 3px solid #1abc9c !important;
    border-radius: 8px !important;
    padding: 1.1rem 1.3rem !important;
    margin: 1rem 0 1.5rem !important;
    overflow-x: auto;
    position: relative;
    box-sizing: border-box;
    line-height: 1.6;
}

/* Texto de código: color claro sobre fondo oscuro */
.code-block code,
pre code {
    color: #a9b1d6 !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    font-size: .85rem;
    line-height: 1.6;
    white-space: pre;
}

/* Spans de sintaxis (usados en soft_instalar_mcp) */
.code-block code .cm { color: #565f89 !important; font-style: italic; }
.code-block code .kw { color: #7aa2f7 !important; }
.code-block code .st { color: #f9e2af !important; }
.code-block code .ky { color: #bb9af7 !important; }
.code-block code .vl { color: #a6e3a1 !important; }

/* ── Botón copiar (inyectado por techdoc.js) ── */
.abd-copy-btn {
    position: absolute;
    top: 8px;
    right: 10px;
    z-index: 5;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 4px;
    color: rgba(255,255,255,.55);
    font-family: 'Poppins', -apple-system, sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    padding: 3px 9px;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
    line-height: 1.6;
    white-space: nowrap;
    user-select: none;
}
.abd-copy-btn:hover {
    background: rgba(255,255,255,.16);
    color: #fff;
    border-color: rgba(255,255,255,.35);
}
.abd-copy-btn.abd-copied {
    color: #1abc9c;
    border-color: rgba(26,188,156,.45);
    background: rgba(26,188,156,.1);
}
