/* ═══════════════════════════════════════════════════════════════
   APP.CSS — Núcleo del sistema iCertifica
   Variables (:root), tipografía base, resets y utilidades.
   Reglas reutilizables de componentes → reutilizables.css
   Reglas específicas de cada módulo + responsive → modulos.css
   IMPORTANTE: estos tres archivos se cargan EN ESTE ORDEN
   (app.css → reutilizables.css → modulos.css). Su concatenación
   equivale al app.css original, así que la cascada no cambia.
   ═══════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════
   APP.CSS — Estilos UNIFICADOS del sistema iCertifica
   (Merge de: app.css + estilos-main.css + components.css)

   Tras este merge puedes ELIMINAR:
     • estilos-main.css
     • components.css

   MAPEO DE VARIABLES:
     tema.css inyecta:  --color-primario, --color-secundario, --color-acento,
                        --color-texto, --fuente-principal, --fuente-titulos, paleta extendida

   COLORES POR DEFECTO (marca iCertifica):
     --c-principal:    #6836D9
     --c-secundario-a: #fd5100
     --c-secundario-b: #00ceb3
     --c-blanco:       #ffffff
     --c-gris:         #878787

   TIPOGRAFÍAS POR DEFECTO:
     Títulos: Source Sans 3 — Cuerpo: Source Sans 3
   ═══════════════════════════════════════════════════════════════ */


/* ═══════════════════════════════════════════════════════════════
   1. VARIABLES
   ═══════════════════════════════════════════════════════════════ */
:root {
    /* ── Colores Base ──────────────────────────────────────── */
    --c-principal: #6836D9;
    --c-secundario-a: #4e29a3;
    --c-secundario-b: #7f54ec;
    --c-blanco: #ffffff;
    --c-gris: #878787;

    --font: 'Source Sans 3', sans-serif;
    --font-titulos: 'Source Sans 3', sans-serif;

    /* ── Colores Derivados ─────────────────────────────────── */
    --c-texto: color-mix(in srgb, var(--c-principal) 15%, black);
    --c-principal-claro: color-mix(in srgb, var(--c-principal) 30%, white);
    --c-principal-light: color-mix(in srgb, var(--c-principal), transparent 85%);
    --c-principal-hover: color-mix(in srgb, var(--c-principal) 82%, black);
    --c-secundario-a-light: color-mix(in srgb, var(--c-secundario-a), transparent 94%);
    --c-secundario-b-claro: color-mix(in srgb, var(--c-secundario-b) 40%, white);
    --c-secundario-b-oscuro: color-mix(in srgb, var(--c-secundario-b) 80%, black);

    /* ── Grises y Neutros ──────────────────────────────────── */
    --fondo: #ffffff;
    --gris-claro: #FAFAFA;
    --gris-texto: #767a83;
    --gris-tabla: #ededed;
    --gris-td: #706f6f;
    --gris-suave: #a0a4ac;
    --gris-oscuro: #878787;
    --borde: #dadada;
    --borde-soft: #c6c6c6;
    --texto: #3c3c3b;
    --texto-sidebar: #3c3c3b;
    --texto-soft: #a0a4ac;
    --exito: #10b981;
    --exito-soft: #d1fae5;
    --peligro: #ef4444;
    --peligro-soft: #fee2e2;
    --info: #3b82f6;
    --info-soft: #dbeafe;

    /* ── Layout ────────────────────────────────────────────── */
    --cabecera-h: 80px;
    --sidebar-w: 310px;

    /* ── Escala Tipográfica (base 16px) ────────────────────── */
    --text-2xs: 0.625rem;
    /* 10px */
    --text-xs: 0.75rem;
    /* 12px */
    --text-body: 0.8125rem;
    /* 13px */
    --text-sm: 0.875rem;
    /* 14px */
    --text-base: 1rem;
    /* 16px */
    --text-md: 1.125rem;
    /* 18px */
    --text-lg: 1.25rem;
    /* 20px */
    --text-xl: 1.375rem;
    /* 22px */
    --text-2xl: 1.5rem;
    /* 24px */
    --text-3xl: 1.5625rem;
    /* 25px */
    --text-4xl: 2rem;
    /* 32px */

    /* ── Pesos Tipográficos ────────────────────────────────── */
    --fw-light: 300;
    --fw-regular: 400;
    --fw-medium: 500;
    --fw-semibold: 600;
    --fw-bold: 700;
    --fw-extrabold: 800;

    /* ── Line Heights ──────────────────────────────────────── */
    --lh-tight: 1.2;
    --lh-normal: 1.5;
    --lh-relaxed: 1.65;

    /* ── Sombras ───────────────────────────────────────────── */
    --sombra-sm: 0 1px 2px rgba(0, 0, 0, .04);
    --sombra-md: 0 1px 3px rgba(0, 0, 0, .06), 0 1px 2px rgba(0, 0, 0, .04);
    --sombra-lg: 0 10px 30px rgba(0, 0, 0, .12);

    /* ── Radios ────────────────────────────────────────────── */
    --radio-sm: 6px;
    --radio: 10px;
    --radio-lg: 14px;
    --radio-pill: 999px;
}


/* ═══════════════════════════════════════════════════════════════
   2. RESET Y BASE
   ═══════════════════════════════════════════════════════════════ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

svg:not(.marca-logo-img):not(#paymentBrick_container *) {
    max-width: 24px;
    max-height: 24px;
    flex-shrink: 0;
}

body {
    font-family: var(--font);
    font-size: var(--text-body);
    font-weight: var(--fw-regular);
    line-height: var(--lh-normal);
    background-color: var(--fondo);
    color: var(--texto);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.01em;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: var(--c-principal);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}


/* ═══════════════════════════════════════════════════════════════
   3. TIPOGRAFÍA GLOBAL
   ═══════════════════════════════════════════════════════════════ */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-titulos);
}

h1 {
    font-size: var(--text-3xl);
    font-weight: var(--fw-bold);
    line-height: var(--lh-tight);
    color: var(--texto);
    letter-spacing: -0.3px;
}

h2 {
    font-size: var(--text-2xl);
    font-weight: var(--fw-bold);
    line-height: var(--lh-tight);
    color: var(--c-secundario-a);
    margin: 0;
}

h3 {
    font-size: var(--text-xl);
    font-weight: var(--fw-semibold);
    line-height: var(--lh-tight);
    color: var(--c-secundario-a);
    margin: 0;
}

h4 {
    font-size: var(--text-lg);
    font-weight: var(--fw-semibold);
    line-height: var(--lh-tight);
    color: var(--c-secundario-a);
}

h5 {
    font-size: var(--text-md);
    font-weight: var(--fw-semibold);
    color: var(--c-secundario-a);
}

h6 {
    font-size: var(--text-base);
    font-weight: var(--fw-semibold);
    color: var(--c-secundario-a);
}

p {
    font-size: var(--text-base);
    color: var(--texto);
    line-height: var(--lh-relaxed);
    font-family: var(--font);
}

small,
.text-small {
    font-size: var(--text-sm);
    color: var(--gris-texto);
}


/* ═══════════════════════════════════════════════════════════════
   4. UTILIDADES
   ═══════════════════════════════════════════════════════════════ */
.text-2xs {
    font-size: var(--text-2xs);
}

.text-xs {
    font-size: var(--text-xs);
}

.text-sm {
    font-size: var(--text-sm);
}

.text-base {
    font-size: var(--text-base);
}

.text-md {
    font-size: var(--text-md);
}

.text-lg {
    font-size: var(--text-lg);
}

.text-xl {
    font-size: var(--text-xl);
}

.text-2xl {
    font-size: var(--text-2xl);
}

.text-3xl {
    font-size: var(--text-3xl);
}

.text-4xl {
    font-size: var(--text-4xl);
}

.fw-light {
    font-weight: var(--fw-light);
}

.fw-regular {
    font-weight: var(--fw-regular);
}

.fw-medium {
    font-weight: var(--fw-medium);
}

.fw-semibold {
    font-weight: var(--fw-semibold);
}

.fw-bold {
    font-weight: var(--fw-bold);
}

.fw-extrabold {
    font-weight: var(--fw-extrabold);
}


input[type="checkbox"]:not(#paymentBrick_container *) {
    accent-color: var(--c-principal);
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.modal-checkbox-label {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 400;
    /* Regular weight for the checkbox text */
    margin-bottom: 0 !important;
}

.modal-checkbox-label input[type="checkbox"] {
    margin: 0;
}

.text-muted {
    color: var(--gris-texto);
}

.text-primary {
    color: var(--c-principal);
}

.text-dark {
    color: var(--c-secundario-a);
}

.text-white {
    color: var(--c-blanco);
}

.text-center {
    text-align: center;
}

.text-dark-blue {
    color: #334155;
}

.text-gray-slate {
    color: var(--gris-texto);
}

.mt-1 {
    margin-top: .5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mt-8 {
    margin-top: 8px;
}

.mt-25 {
    margin-top: 25px;
}

.mb-1 {
    margin-bottom: .5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mb-15 {
    margin-bottom: 15px;
}

.mb-20 {
    margin-bottom: 20px;
}

.m-0 {
    margin: 0;
}

.hidden {
    display: none !important;
}

.d-none,
.btn.d-none {
    display: none;
}

.d-flex {
    display: flex;
}

.section-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

