/* ═══════════════════════════════════════════════════════════════════════════
   Actuarios Web Zoho – Biblioteca de Documentos [actuarios_documentos_lista] / [doc_library]
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
    --awz-doc-primary: #1E5475;        /* Azul principal de Breakdance */
    --awz-doc-primary-dark: #153A52;   /* Azul oscuro de Breakdance */
    --awz-doc-primary-light: #2c6f99;
    --awz-doc-gold: #75631E;           /* Marrón compuesto de Breakdance */
    --awz-doc-green: #1E7568;          /* Verde compuesto de Breakdance */
    --awz-doc-bg: #f8fafc;
    --awz-doc-card-bg: #ffffff;
    --awz-doc-text: #222222;           /* Negro texto de Breakdance */
    --awz-doc-text-muted: #69727D;     /* Gris piedra de Breakdance */
    --awz-doc-border: #E8E8E8;         /* Gris piedra claro de Breakdance */
    --awz-doc-border-focus: #1E5475;
    --awz-doc-radius: 12px;
    --awz-doc-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --awz-doc-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    --awz-doc-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* ─── Contenedor Principal ─────────────────────────────────────────────────── */
.awz-docs-directory-container {
    font-family: var(--awz-doc-font);
    color: var(--awz-doc-text);
    width: 100%;
    margin: 24px 0;
    box-sizing: border-box;
    position: relative;
}

.awz-docs-directory-container *,
.awz-docs-directory-container *::before,
.awz-docs-directory-container *::after {
    box-sizing: border-box;
}

/* ─── Barra de Filtros y Controles ────────────────────────────────────────── */
.awz-doc-controls-card {
    background: var(--awz-doc-card-bg);
    border: 1px solid var(--awz-doc-border);
    border-radius: var(--awz-doc-radius);
    padding: 18px 20px;
    margin-bottom: 20px;
    box-shadow: var(--awz-doc-shadow);
    transition: box-shadow 0.2s ease;
}

.awz-doc-controls-card:hover {
    box-shadow: var(--awz-doc-shadow-hover);
}

.awz-doc-controls-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

/* Buscador */
.awz-doc-search-box {
    flex: 1 1 280px;
    min-width: 240px;
}

.awz-doc-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.awz-doc-icon-search {
    position: absolute;
    left: 14px;
    font-size: 14px;
    color: var(--awz-doc-text-muted);
    pointer-events: none;
    transition: color 0.2s ease;
}

.awz-doc-input {
    width: 100%;
    height: 44px;
    padding: 0 38px 0 40px !important;
    background: #f8fafc !important;
    border: 1px solid var(--awz-doc-border) !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    color: var(--awz-doc-text) !important;
    transition: all 0.2s ease !important;
}

.awz-doc-input:focus {
    background: #ffffff !important;
    border-color: var(--awz-doc-border-focus) !important;
    box-shadow: 0 0 0 3px rgba(30, 84, 117, 0.15) !important;
    outline: none !important;
}

.awz-doc-input-wrap:focus-within .awz-doc-icon-search,
.awz-doc-input:focus + .awz-doc-icon-search {
    color: var(--awz-doc-primary);
}

.awz-doc-search-clear {
    position: absolute;
    right: 10px;
    background: var(--awz-doc-border);
    border: none;
    color: var(--awz-doc-text-muted);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: background 0.2s ease, color 0.2s ease;
}

.awz-doc-search-clear i {
    font-size: 10px;
    pointer-events: none;
}

.awz-doc-search-clear:hover {
    background: #d4d4d4;
    color: var(--awz-doc-text);
}

/* Selectores (Categoría, Año) */
.awz-doc-category-box,
.awz-doc-year-box {
    flex: 0 1 auto;
    min-width: 160px;
}

.awz-doc-category-box {
    min-width: 200px;
}

.awz-doc-select-wrap {
    position: relative;
    width: 100%;
}

.awz-doc-select {
    width: 100%;
    height: 44px;
    padding: 0 32px 0 14px !important;
    background: #f8fafc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2369727D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center !important;
    border: 1px solid var(--awz-doc-border) !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    color: var(--awz-doc-text) !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    cursor: pointer;
    transition: all 0.2s ease !important;
}

.awz-doc-select:focus {
    background-color: #ffffff !important;
    border-color: var(--awz-doc-border-focus) !important;
    box-shadow: 0 0 0 3px rgba(30, 84, 117, 0.15) !important;
    outline: none !important;
}

/* Botón Reset */
.awz-doc-reset-box {
    margin-left: auto;
}

.awz-doc-btn-reset {
    height: 44px;
    padding: 0 16px;
    background: #f8fafc;
    border: 1px solid var(--awz-doc-border);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--awz-doc-text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.awz-doc-btn-reset:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: var(--awz-doc-text);
}

.awz-doc-btn-reset i {
    font-size: 13px;
}

/* ─── Tarjeta y Tabla de Documentos ───────────────────────────────────────── */
.awz-doc-table-card {
    background: var(--awz-doc-card-bg);
    border: 1px solid var(--awz-doc-border);
    border-radius: var(--awz-doc-radius);
    box-shadow: var(--awz-doc-shadow);
    overflow: hidden;
    position: relative;
    min-height: 200px;
}

.awz-doc-table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: none !important;
}

.awz-doc-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 14px;
    border: none !important;
}

/* Cabecera de la tabla */
.awz-doc-table thead tr {
    background: var(--awz-doc-primary);
    color: #ffffff;
    user-select: none;
}

.awz-doc-th {
    padding: 14px 18px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #ffffff;
    white-space: nowrap;
    border-bottom: none;
}

.awz-doc-th-fecha {
    width: 100px;
}

.awz-doc-th-title {
    width: auto;
    min-width: 280px;
}

.awz-doc-th-cat {
    width: 190px;
}

.awz-doc-th-formato {
    width: 95px;
    text-align: center;
}

.awz-doc-th-action {
    width: 200px;
    text-align: right;
    padding-right: 22px;
}

/* Cabeceras ordenables */
.awz-doc-sortable {
    cursor: pointer;
    transition: background 0.15s ease;
}

.awz-doc-sortable:hover {
    background: var(--awz-doc-primary-dark);
}

.awz-doc-sort-icon {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 6px;
    vertical-align: middle;
    opacity: 0.5;
    position: relative;
    transition: opacity 0.15s ease;
}

.awz-doc-sort-icon::before {
    content: "⇅";
    font-size: 11px;
    line-height: 14px;
    display: block;
    text-align: center;
}

.awz-doc-sortable.is-sorted {
    background: var(--awz-doc-primary-dark);
}

.awz-doc-sortable.is-sorted .awz-doc-sort-icon {
    opacity: 1;
}

.awz-doc-sortable.is-sorted.is-asc .awz-doc-sort-icon::before {
    content: "▲";
    font-size: 9px;
}

.awz-doc-sortable.is-sorted.is-desc .awz-doc-sort-icon::before {
    content: "▼";
    font-size: 9px;
}

/* Filas del cuerpo */
.awz-doc-table tbody tr {
    border-bottom: 1px solid var(--awz-doc-border);
    transition: background-color 0.15s ease;
}

.awz-doc-table tbody tr:last-child {
    border-bottom: none;
}

.awz-doc-table tbody tr:hover {
    background-color: #f8fafc;
}

.awz-doc-table td {
    padding: 16px 18px;
    vertical-align: middle;
    color: var(--awz-doc-text);
}

/* Celda Fecha */
.awz-doc-td-fecha {
    white-space: nowrap;
}

.awz-doc-val-fecha {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    color: var(--awz-doc-text-muted);
    font-variant-numeric: tabular-nums;
}

.awz-doc-icon-cal {
    color: var(--awz-doc-primary);
    font-size: 13px;
}

/* Celda Título y Detalle */
.awz-doc-title-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.awz-doc-val-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--awz-doc-text);
    line-height: 1.4;
    transition: color 0.15s ease;
}

.awz-doc-table tbody tr:hover .awz-doc-val-title {
    color: var(--awz-doc-primary);
}

.awz-doc-badge-lock {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #fed7aa;
    width: fit-content;
    margin-top: 2px;
}

/* Detalle y Descripción: en pantalla ancha visible automáticamente */
.awz-doc-desc-container {
    margin-top: 4px;
}

.awz-doc-desc-toggle {
    display: none;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    padding: 3px 0;
    color: var(--awz-doc-primary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.15s ease;
}

.awz-doc-desc-toggle:hover {
    color: var(--awz-doc-primary-dark);
}

.awz-doc-desc-toggle i {
    font-size: 10px;
    transition: transform 0.2s ease;
}

.awz-doc-desc-container.is-expanded .awz-doc-desc-toggle i,
.awz-doc-desc-toggle.is-open i {
    transform: rotate(180deg);
}

.awz-doc-desc-text {
    display: block;
    margin-top: 4px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--awz-doc-text-muted);
    background: transparent;
    border: none;
    padding: 0;
}

/* Celda Categorías */
.awz-doc-cats-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.awz-doc-cat-tag {
    display: inline-block;
    padding: 4px 10px;
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
    transition: all 0.15s ease;
}

.awz-doc-cat-tag:hover {
    background: #e2e8f0;
    color: var(--awz-doc-primary);
}

/* Celda Formato y Tamaño: en pantalla ancha el tamaño aparece debajo del icono */
.awz-doc-td-formato {
    text-align: center;
}

.awz-doc-format-wrap {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--awz-doc-text-muted);
    text-align: center;
}

.awz-doc-format-icon {
    font-size: 18px;
    line-height: 1;
    color: var(--awz-doc-text-muted) !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.awz-doc-format-size {
    color: var(--awz-doc-text-muted);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
}

/* Celda Acción / Botones */
.awz-doc-td-action {
    text-align: right;
    padding-right: 22px;
    white-space: nowrap;
}

.awz-doc-actions-group {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.awz-doc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none !important;
    transition: all 0.2s ease;
    cursor: pointer;
    line-height: 1.2;
}

/* Botón Ver (Modal) */
.awz-doc-btn-view {
    background: #f1f5f9;
    color: var(--awz-doc-primary) !important;
    border: 1px solid #cbd5e1;
}

.awz-doc-btn-view:hover {
    background: #e2e8f0;
    color: var(--awz-doc-primary-dark) !important;
    border-color: #94a3b8;
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.05);
}

/* Botón Descarga */
.awz-doc-btn-download {
    background: var(--awz-doc-primary);
    color: #ffffff !important;
    border: 1px solid var(--awz-doc-primary);
}

.awz-doc-btn-download:hover {
    background: var(--awz-doc-primary-dark);
    border-color: var(--awz-doc-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(30, 84, 117, 0.2);
}

/* Botón Enlace Externo */
.awz-doc-btn-external {
    background: #f0f7fb;
    color: var(--awz-doc-primary) !important;
    border: 1px solid var(--awz-doc-primary);
}

.awz-doc-btn-external:hover {
    background: var(--awz-doc-primary);
    border-color: var(--awz-doc-primary-dark);
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(30, 84, 117, 0.2);
}

/* Botón Acceso Colegiados (Restringido) */
.awz-doc-btn-restricted {
    background: #fff7ed;
    color: #c2410c !important;
    border: 1px solid #fed7aa;
}

.awz-doc-btn-restricted:hover {
    background: #fed7aa;
    color: #9a3412 !important;
    transform: translateY(-1px);
}

.awz-doc-muted {
    color: var(--awz-doc-text-muted);
}

/* ─── Spinner de Carga ────────────────────────────────────────────────────── */
.awz-doc-loader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(2px);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--awz-doc-primary);
}

.awz-doc-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(30, 84, 117, 0.2);
    border-top-color: var(--awz-doc-primary);
    border-radius: 50%;
    animation: awzDocSpin 0.7s linear infinite;
}

@keyframes awzDocSpin {
    to { transform: rotate(360deg); }
}

/* ─── Paginación y Resumen ────────────────────────────────────────────────── */
.awz-doc-pagination-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #f8fafc;
    border-top: 1px solid var(--awz-doc-border);
    gap: 16px;
}

.awz-doc-summary {
    font-size: 13px;
    color: var(--awz-doc-text-muted);
}

.awz-doc-summary strong {
    color: var(--awz-doc-text);
}

.awz-doc-pagination-controls {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.awz-doc-pagination-controls .awz-doc-cadence-box {
    min-width: 135px;
    flex: 0 0 auto;
}

.awz-doc-pagination-controls .awz-doc-select {
    height: 34px !important;
    font-size: 13px !important;
    padding: 0 28px 0 10px !important;
    border-radius: 6px !important;
    background-color: #ffffff !important;
}

.awz-doc-pagination-list {
    display: flex;
    align-items: center;
    gap: 4px;
}

.awz-doc-page-btn {
    min-width: 34px;
    height: 34px;
    padding: 0 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 1px solid var(--awz-doc-border);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--awz-doc-text);
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.awz-doc-page-btn i {
    font-size: 12px;
    line-height: 1;
    pointer-events: none;
}

.awz-doc-page-nav-btn {
    padding: 0 8px;
}

.awz-doc-page-btn:hover:not(.is-disabled):not(.is-active) {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: var(--awz-doc-primary);
}

.awz-doc-page-btn.is-active {
    background: var(--awz-doc-primary);
    border-color: var(--awz-doc-primary);
    color: #ffffff;
    font-weight: 700;
    cursor: default;
}

.awz-doc-page-btn.is-disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f8fafc;
}

.awz-doc-page-ellipsis {
    padding: 0 4px;
    color: var(--awz-doc-text-muted);
    font-size: 13px;
}

/* Empty State */
.awz-doc-empty-cell {
    padding: 48px 24px !important;
    text-align: center;
}

.awz-doc-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--awz-doc-text-muted);
}

.awz-doc-empty-state p {
    font-size: 15px;
    margin: 0;
}

/* Control de orden móvil (oculto en desktop) */
.awz-doc-mobile-sort-wrap {
    display: none;
}

.awz-doc-mobile-label {
    display: none;
}

/* ─── Responsivo para Tablets y Smartphones (Cards de 1 columna) ──────────── */
@media (max-width: 768px) {
    .awz-doc-controls-card {
        padding: 14px;
        margin-bottom: 16px;
    }

    .awz-doc-controls-grid {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .awz-doc-search-box,
    .awz-doc-category-box,
    .awz-doc-year-box,
    .awz-doc-mobile-sort-wrap,
    .awz-doc-reset-box {
        flex: 1 1 100%;
        width: 100%;
        margin-left: 0;
    }

    .awz-doc-mobile-sort-wrap {
        display: block;
    }

    .awz-doc-btn-reset {
        width: 100%;
        justify-content: center;
    }

    /* Transformación a tarjetas */
    .awz-doc-table-card {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        overflow: visible;
        min-height: 160px;
    }

    .awz-doc-table-responsive {
        overflow-x: visible;
        border: none !important;
        background: transparent !important;
        box-shadow: none !important;
        padding: 0 !important;
    }

    .awz-doc-table {
        display: block !important;
        width: 100% !important;
        border: none !important;
        background: transparent !important;
        box-shadow: none !important;
        outline: none !important;
    }

    .awz-doc-table thead {
        display: none !important;
        border: none !important;
    }

    .awz-doc-table tbody {
        display: flex;
        flex-direction: column;
        gap: 12px;
        width: 100%;
        border: none !important;
        background: transparent !important;
    }

    .awz-doc-table tbody tr {
        display: flex;
        flex-direction: column;
        background: var(--awz-doc-card-bg);
        border: 1px solid var(--awz-doc-border);
        border-radius: 12px;
        padding: 16px 18px;
        box-shadow: 0 2px 6px -1px rgba(0, 0, 0, 0.05);
        gap: 10px;
        margin-bottom: 0;
        transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    }

    .awz-doc-table tbody tr:hover {
        background-color: #ffffff;
        box-shadow: 0 6px 14px -2px rgba(0, 0, 0, 0.08);
        border-color: #cbd5e1;
        transform: translateY(-1px);
    }

    .awz-doc-table td {
        padding: 0 !important;
        border: none !important;
        display: flex;
        align-items: flex-start;
        text-align: left !important;
    }

    .awz-doc-mobile-label {
        display: inline-block;
        font-size: 11px;
        font-weight: 600;
        text-transform: uppercase;
        color: var(--awz-doc-text-muted);
        min-width: 80px;
        flex-shrink: 0;
        margin-right: 8px;
    }

    /* 1. Título destacado en primer orden */
    .awz-doc-td-title {
        order: 1;
        display: block !important;
        margin-bottom: 4px;
    }

    .awz-doc-td-title .awz-doc-mobile-label {
        display: none;
    }

    .awz-doc-val-title {
        font-size: 16px;
        color: var(--awz-doc-primary);
        display: block;
    }

    /* 2. Fecha */
    .awz-doc-td-fecha {
        order: 2;
        display: flex !important;
        align-items: center;
    }

    /* 3. Categoría */
    .awz-doc-td-cat {
        order: 3;
        display: flex !important;
        align-items: center;
    }

    /* 4. Formato (en móvil horizontal junto a la etiqueta) */
    .awz-doc-td-formato {
        order: 4;
        display: flex !important;
        align-items: center;
        text-align: left !important;
    }

    .awz-doc-td-formato .awz-doc-format-wrap {
        flex-direction: row;
        align-items: center;
        gap: 6px;
    }

    .awz-doc-td-formato .awz-doc-format-icon {
        font-size: 15px;
    }

    .awz-doc-td-formato .awz-doc-format-size {
        font-size: 13px;
    }

    /* Toggle de descripción en móvil */
    .awz-doc-desc-toggle {
        display: inline-flex !important;
    }

    .awz-doc-desc-text {
        display: none !important;
    }

    .awz-doc-desc-container.is-expanded .awz-doc-desc-text {
        display: block !important;
        margin-top: 6px;
        padding-top: 6px;
        border-top: 1px dashed var(--awz-doc-border);
    }

    /* 5. Acción (Botón Ver y Descarga juntos) */
    .awz-doc-td-action {
        order: 5;
        display: block !important;
        margin-top: 6px;
        padding-top: 10px !important;
        border-top: 1px solid #f1f5f9 !important;
        text-align: center !important;
        width: 100%;
    }

    .awz-doc-td-action .awz-doc-mobile-label {
        display: none;
    }

    /* En móvil se oculta el botón Ver (modal), permitiendo únicamente descargar */
    .awz-doc-btn-view {
        display: none !important;
    }

    .awz-doc-actions-group {
        display: flex;
        width: 100%;
        gap: 8px;
    }

    .awz-doc-actions-group .awz-doc-btn {
        flex: 1;
        width: 100%;
        padding: 10px 16px;
        font-size: 14px;
        justify-content: center;
    }

    .awz-doc-pagination-bar {
        flex-direction: column;
        align-items: center;
        gap: 12px;
        padding: 14px 10px;
        background: #ffffff;
        border-radius: 12px;
        border: 1px solid var(--awz-doc-border);
        box-sizing: border-box;
        width: 100%;
        overflow: hidden;
    }

    .awz-doc-summary {
        text-align: center;
        font-size: 13px;
        line-height: 1.4;
    }

    .awz-doc-pagination-controls {
        flex-direction: column;
        align-items: center;
        width: 100%;
        gap: 12px;
    }

    .awz-doc-pagination-controls .awz-doc-cadence-box {
        width: 100%;
        max-width: 200px;
    }

    .awz-doc-pagination-nav {
        width: 100%;
        display: flex;
        justify-content: center;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .awz-doc-pagination-nav::-webkit-scrollbar {
        display: none;
    }

    .awz-doc-pagination-list {
        display: flex;
        flex-wrap: nowrap;
        justify-content: center;
        align-items: center;
        gap: 3px;
        max-width: 100%;
    }

    /* Ocultar botones primera (<<) y última (>>) página en móvil para evitar desbordamiento */
    .awz-doc-page-nav-first,
    .awz-doc-page-nav-last {
        display: none !important;
    }

    .awz-doc-page-btn {
        min-width: 30px;
        height: 32px;
        padding: 0 4px;
        font-size: 13px;
        border-radius: 6px;
        flex-shrink: 0;
    }

    .awz-doc-page-ellipsis {
        padding: 0 2px;
        font-size: 12px;
        flex-shrink: 0;
    }

    /* Ajustes del modal en pantallas móviles */
    .awz-doc-modal-container {
        padding: 10px;
    }

    .awz-doc-modal-dialog {
        width: 98vw;
        height: 94vh;
        max-height: none;
        border-radius: 8px;
    }

    .awz-doc-modal-header {
        padding: 10px 14px;
    }

    .awz-doc-modal-btn span {
        display: none;
    }

    .awz-doc-modal-btn {
        padding: 7px 10px;
    }

    h3.awz-doc-modal-title,
    .awz-doc-modal-title,
    .awz-doc-modal-header h3 {
        font-size: 13px !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Modal para Visualización de Documentos dentro de la Página
   ═══════════════════════════════════════════════════════════════════════════ */
.awz-doc-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.awz-doc-modal.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.awz-doc-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1;
}

.awz-doc-modal-container {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
}

.awz-doc-modal-dialog {
    background: #ffffff;
    width: 94vw;
    max-width: 1100px;
    height: 88vh;
    max-height: 900px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    transform: scale(0.96) translateY(8px);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.awz-doc-modal.is-active .awz-doc-modal-dialog {
    transform: scale(1) translateY(0);
}

.awz-doc-modal-header {
    background: var(--awz-doc-primary);
    color: #ffffff;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.awz-doc-modal-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

.awz-doc-modal-header-icon {
    font-size: 15px;
    color: #ffffff;
    opacity: 0.85;
    flex-shrink: 0;
}

h3.awz-doc-modal-title,
.awz-doc-modal-title,
.awz-doc-modal-header h3 {
    font-family: var(--awz-doc-font) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.35 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: normal !important;
    text-transform: none !important;
}

.awz-doc-modal-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.awz-doc-modal-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none !important;
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.25);
    transition: all 0.2s ease;
    cursor: pointer;
    line-height: 1;
}

.awz-doc-modal-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}

.awz-doc-modal-close {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.awz-doc-modal-close:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: #ffffff;
    transform: rotate(90deg);
}

.awz-doc-modal-body {
    position: relative;
    flex: 1;
    width: 100%;
    height: 100%;
    background: #f8fafc;
    overflow: hidden;
}

.awz-doc-modal-loader {
    position: absolute;
    inset: 0;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    z-index: 2;
    color: var(--awz-doc-text-muted);
    font-size: 14px;
    transition: opacity 0.2s ease;
}

.awz-doc-modal-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    background: #ffffff;
}

body.awz-doc-modal-open {
    overflow: hidden !important;
}
