/* ============================================================================
   FICHAS TECNICAS (software y portales) - hoja de estilos compartida
   Usada por /software/ficha-tecnica-*.html

   Cada ficha define SOLO su color de marca en un <style> de la propia pagina:

     :root {
         --accent:       #xxxxxx;   relleno (botones, barras, fondos)
         --accent-dark:  #xxxxxx;   variante oscura
         --accent-soft:  #xxxxxx;   fondo suave (iconos, etiquetas)
         --accent-text:  var(--accent);   OPCIONAL. Color del texto/iconos de acento.
                                          Por defecto usa --accent-dark.
         --accent-line:  rgba(...); borde en hover
         --accent-glow:  rgba(...); OPCIONAL. Solo fichas con bloque de versiones.
     }

   Y, si procede, algun ajuste de color de marca (.brand .xxx) que difiera del
   valor comun definido aqui.
   ============================================================================ */

:root {
    --primary:      #003657;
    --primary-mid:  #0f4d74;
    --primary-light:#1a6696;

    /* Acento por defecto (verde CAIFAC). Cada ficha lo sobrescribe. */
    --accent:       #a6cf31;
    --accent-dark:  #88ab20;
    --accent-soft:  #f2f9db;
    --accent-text:  var(--accent-dark);
    --accent-line:  rgba(166,207,49,.4);
    --accent-glow:  rgba(0,54,87,.25);

    --border:       #d9e5ee;
    --text:         #003657;
    --muted:        #5d7487;
    --bg-light:     #f4f8fb;
    --white:        #ffffff;
    --shadow-sm:    0 4px 14px rgba(0,54,87,.07);
    --shadow-md:    0 10px 32px rgba(0,54,87,.12);
    --shadow-lg:    0 20px 60px rgba(0,54,87,.18);
    --radius-sm:    12px;
    --radius-md:    18px;
    --radius-lg:    24px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    background: transparent;
    font-family: "sen-regular", Arial, sans-serif;
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

body { padding: 16px; }

/* ─── MARCAS (logotipos en texto) ─── */
.brand {
    font-family: 'Trebuchet MS', Trebuchet, Arial, sans-serif;
    font-weight: 700;
    letter-spacing: .01em;
    white-space: nowrap;
}
.brand .cai       { color: #003657; }
.brand .portal    { color: #003657; }
.brand .master    { color: #003657; }
.brand .asesor    { color: #dca658; }
.brand .mas       { color: #fd7818; }
.brand .soc       { color: #fd7817; }
.brand .conta     { color: #01B3BA; }
.brand .lab       { color: #002D7C; }
.brand .fac       { color: #A6D031; }
.brand .fis       { color: #854000; }
.brand .fiscal    { color: #854000; }
.brand .erp       { color: #289925; }
.brand .ren       { color: #c22663; }
.brand .sii       { color: #fd7818; }
.brand .eem       { color: #fd7818; }
.brand .portalcai { color: #fd7818; }
.brand .auto      { color: var(--primary); }
.brand .sif-s     { color: #76bd42; }
.brand .sif-i     { color: #6ea944; }
.brand .sif-f     { color: #5f9339; }

/* ─── LAYOUT ─── */
.page { display: flex; flex-direction: column; gap: 0; }

.sections-wrap {
    background: var(--white);
    border: 1px solid rgba(217,229,238,.9);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    margin-bottom: 6px;
}

/* ─── BARRA DE ACCIONES (volver / acceder) ─── */
.top-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px 9px 12px;
    border-radius: 999px;
    background: var(--bg-light);
    border: 1.5px solid var(--border);
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: border-color .2s ease, color .2s ease, background .2s ease;
}

.btn-back svg {
    width: 15px; height: 15px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.2;
    transition: transform .2s ease;
}

.btn-back:hover {
    border-color: var(--accent);
    color: var(--accent-text);
    background: var(--accent-soft);
}

.btn-back:hover svg { transform: translateX(-3px); }

.btn-access {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .01em;
    text-decoration: none;
    transition: background .2s ease;
}

.btn-access svg {
    width: 15px; height: 15px;
    stroke: #fff;
    fill: none;
    stroke-width: 2.2;
}

.btn-access:hover { background: #ff6a13; }

/* ─── HERO ─── */
.hero {
    background: var(--white);
    padding: 28px 32px 26px;
    border-bottom: 1px solid var(--border);
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-text);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.hero-title {
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.08;
    color: var(--primary);
    margin-bottom: 8px;
}

.hero-sub {
    font-size: 15px;
    line-height: 1.65;
    color: var(--muted);
    max-width: 900px;
}

/* ─── SECCIONES ─── */
.section {
    padding: 40px 36px;
    background: var(--white);
}

.section.alt { background: var(--bg-light); }

.section + .section { border-top: 1px solid var(--border); }

.sec-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--accent-text);
    margin-bottom: 8px;
}

.sec-label::before {
    content: '';
    display: inline-block;
    width: 16px; height: 2px;
    background: var(--accent);
    border-radius: 1px;
}

.sec-title {
    font-size: clamp(22px, 3vw, 30px);
    line-height: 1.15;
    color: var(--primary);
    margin-bottom: 12px;
}

.sec-desc {
    font-size: 15px;
    line-height: 1.7;
    color: var(--muted);
    max-width: 900px;
    margin-bottom: 32px;
}

/* ─── VENTAJAS ─── */
.feat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.feat-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: var(--shadow-sm);
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.feat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-line);
}

/* Tarjeta a todo el ancho (Integracion con el ecosistema CAISOFT) */
.feat-card--wide {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: flex-start;
    gap: 18px;
}

.feat-card--wide .feat-icon { margin-top: 2px; flex-shrink: 0; }

.feat-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    background: var(--accent-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feat-icon svg {
    width: 22px; height: 22px;
    stroke: var(--accent-text);
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.feat-card h3 {
    font-size: 15px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.3;
}

.feat-card p {
    font-size: 14px;
    line-height: 1.7;
    color: var(--muted);
}

/* ─── CARACTERISTICAS (ACORDEON) ─── */
.char-list { display: flex; flex-direction: column; gap: 10px; }

details.char {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--white);
    overflow: hidden;
    transition: box-shadow .2s;
}

details.char[open] {
    box-shadow: var(--shadow-sm);
    border-color: var(--accent-line);
}

summary.char-head {
    list-style: none;
    cursor: pointer;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    user-select: none;
    background: linear-gradient(180deg, #fff 0%, #f9fbfd 100%);
}

summary.char-head::-webkit-details-marker { display: none; }

.char-head-icon {
    width: 36px; height: 36px;
    border-radius: 9px;
    background: var(--accent-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.char-head-icon svg {
    width: 18px; height: 18px;
    stroke: var(--accent-text);
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

summary.char-head span.char-name {
    font-size: 15px;
    font-weight: 800;
    color: var(--primary);
    flex: 1;
}

summary.char-head span.char-name { transition: color .2s ease; }
summary.char-head:hover span.char-name { color: #ff6a13; }

.char-chevron {
    width: 10px; height: 10px;
    border-right: 2px solid var(--accent-text);
    border-bottom: 2px solid var(--accent-text);
    transform: rotate(45deg);
    transition: transform .2s ease;
    flex-shrink: 0;
}

details.char[open] .char-chevron { transform: rotate(-135deg); }

.char-body {
    padding: 6px 18px 20px 68px;
    border-top: 1px solid var(--border);
}

.char-body ul {
    padding-left: 18px;
    margin-top: 12px;
}

.char-body li {
    font-size: 14px;
    line-height: 1.75;
    color: var(--text);
    margin: 6px 0;
}

.char-body p {
    font-size: 14px;
    line-height: 1.75;
    color: var(--text);
    margin-top: 12px;
}

/* ─── VERSIONES (Base / Advanced) ─── */
.ver-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.ver-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: var(--shadow-sm);
    transition: transform .22s ease, box-shadow .22s ease;
}

.ver-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.ver-card--featured {
    border: 2px solid var(--accent);
    box-shadow: 0 0 48px var(--accent-glow), var(--shadow-md);
    background: var(--accent);
}

.ver-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    background: var(--bg-light);
    color: var(--muted);
    border: 1.5px solid var(--border);
    width: fit-content;
}

.ver-badge--featured {
    background: #fff;
    color: var(--accent);
    border-color: rgba(255,255,255,.6);
}

.ver-card h3 {
    font-size: 18px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
}

.ver-card p {
    font-size: 14px;
    line-height: 1.75;
    color: var(--muted);
}

.ver-card--featured h3 { color: #fff; }
.ver-card--featured p  { color: rgba(255,255,255,.88); }
.ver-card--featured strong { color: #fff; }

/* ─── MODELOS (CAIREN) ─── */
.modelo-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.modelo-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 28px 26px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.modelo-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-line);
}

.modelo-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px; height: 56px;
    border-radius: 14px;
    background: var(--accent-soft);
    font-size: 18px;
    font-weight: 900;
    color: var(--accent);
}

.modelo-card h3 {
    font-size: 16px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.3;
}

.modelo-card p {
    font-size: 14px;
    line-height: 1.7;
    color: var(--muted);
}

.modelo-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    background: var(--accent-soft);
    color: var(--accent-dark);
    border: 1px solid var(--accent-line);
    width: fit-content;
}

/* ─── ESTADOS DE CONTRASTE (Portal SII) ─── */
.state-list {
    list-style: none;
    padding: 0;
    margin: 14px 0 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.state-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    line-height: 1.7;
    margin: 0;
}

.state-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 7px;
    background: var(--muted);
}

.state-dot.ok      { background: #37a34a; }
.state-dot.partial { background: #fd7818; }
.state-dot.no      { background: #c22663; }
.state-dot.wait    { background: #1a6696; }
.state-dot.na      { background: #9fb2c0; }

/* ─── INTEGRACION ─── */
.integ-list {
    list-style: none;
    padding: 0;
    margin: 28px 0 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.integ-list li {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 18px 22px;
    background: var(--white);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--accent);
    box-shadow: var(--shadow-sm);
}

.integ-prog {
    flex-shrink: 0;
    font-size: 18px;
    min-width: 88px;
    padding-top: 2px;
}

.integ-desc {
    font-size: 13.5px;
    line-height: 1.65;
    color: var(--text);
}

.integ-desc strong { color: var(--text); }
.integ-desc strong a { color: inherit; text-decoration: none; }
.integ-desc strong a:hover { text-decoration: underline; color: #ff6a13; cursor: pointer; }

.integ-desc small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.enlace-estandar { color: inherit; text-decoration: none; }
.enlace-estandar:hover { color: #ff6a13; font-weight: 700; text-decoration: underline; cursor: pointer; }

/* ─── TECNOLOGIA ─── */
.tech-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.tech-block {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px 22px;
    box-shadow: var(--shadow-sm);
}

.tech-block h3 {
    font-size: 14px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tech-block h3 svg {
    width: 18px; height: 18px;
    stroke: var(--accent-text);
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.tech-note {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 12px;
    line-height: 1.6;
}

.tech-note--small {
    font-size: 12px;
    color: var(--muted);
    margin-top: 12px;
    line-height: 1.6;
}

.pill-wrap { display: flex; flex-wrap: wrap; gap: 8px; }

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    border: 1.5px solid var(--border);
    background: var(--bg-light);
    color: var(--primary);
    transition: background .18s, border-color .18s, color .18s;
}

.pill--hl {
    background: var(--accent-soft);
    border-color: var(--accent-line);
    color: var(--accent-text);
}

.pill svg {
    width: 14px; height: 14px;
    stroke: var(--muted);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

/* ─── SERVICIOS ─── */
.svc-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.svc-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: var(--shadow-sm);
    transition: transform .2s ease, box-shadow .2s ease;
}

a.svc-card {
    text-decoration: none;
    color: inherit;
}

a.svc-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
}

a.svc-card h3 { transition: color .2s ease; }
a.svc-card:hover h3 { color: #ff6a13; }

.svc-icon {
    width: 40px; height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-soft);
}

.svc-icon svg {
    width: 20px; height: 20px;
    stroke: var(--accent-text);
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.svc-card h3 {
    font-size: 14px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.3;
}

.svc-card p {
    font-size: 13px;
    line-height: 1.65;
    color: var(--muted);
}

.svc-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 2px;
}

.svc-links a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    border: 1.5px solid var(--border);
    background: var(--bg-light);
    color: var(--primary);
    text-decoration: none;
    transition: background .18s, border-color .18s, color .18s;
}

.svc-links a:hover {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: #ff6a13;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
    .feat-grid   { grid-template-columns: repeat(2, 1fr); }
    .svc-grid    { grid-template-columns: repeat(2, 1fr); }
    .ver-grid    { grid-template-columns: 1fr; }
    .modelo-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    body { padding: 10px; }
    .hero { padding: 36px 22px 32px; }
    .section { padding: 30px 20px; }
    .feat-grid  { grid-template-columns: 1fr; }
    .svc-grid   { grid-template-columns: 1fr; }
    .tech-row   { grid-template-columns: 1fr; }
    .char-body  { padding-left: 20px; }
    .integ-list li { flex-direction: column; gap: 8px; }
}

@media (max-width: 560px) {
    .top-actions { flex-wrap: wrap; }
    .btn-back, .btn-access { font-size: 12.5px; padding: 8px 14px; }
}

/* ─── PIE ─── */
footer {
    background: #fff;
    border-top: 1px solid #f0f0f0;
    padding: 14px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    margin-top: 6px;
}

.footer-copy { font-size: 0.75rem; color: #9ca3af; }

.footer-links { display: flex; gap: 20px; }

.footer-links a {
    font-size: 0.75rem;
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.15s;
}

.footer-links a:hover { color: #003657; }
