/**
 * documentos-atencion.css
 * Estilos para el modal "Documentos de la Atención".
 * Modal fullscreen: sidebar con búsqueda + iframe de previsualización.
 */

/* ==================== BOTÓN EN HEADER ==================== */
.btn-documentos-atencion {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.3rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    border: 1.5px solid rgba(255, 255, 255, 0.45);
    border-radius: 2rem;
    backdrop-filter: blur(6px);
    cursor: pointer;
    transition: all 0.25s ease;
    line-height: 1.4;
    white-space: nowrap;
    text-decoration: none;
}
.btn-documentos-atencion:hover {
    background: rgba(255, 255, 255, 0.32);
    border-color: rgba(255, 255, 255, 0.7);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    text-decoration: none;
}
.btn-documentos-atencion:active {
    transform: translateY(0);
}
.btn-documentos-atencion i {
    font-size: 0.85rem;
}

/* ==================== MODAL FULLSCREEN ==================== */
/* El indicador flotante de autoguardado de la historia clínica va en z-index 1060
   y quedaba encima del modal, justo sobre el botón de enviar de la trazabilidad. */
#modal-documentos-atencion {
    z-index: 1065;
}

#modal-documentos-atencion .modal-header {
    background: linear-gradient(135deg, #0d5f5f 0%, #0a4a4a 100%);
    color: #fff;
    border-bottom: none;
    padding: 12px 18px;
}
#modal-documentos-atencion .modal-header .modal-title {
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}
#modal-documentos-atencion .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* ==================== LAYOUT INTERNO ==================== */
.docaten-body {
    display: flex;
    height: calc(100vh - 56px);
    overflow: hidden;
}

/* ── Sidebar ───────────────────────────────────────────── */
.docaten-sidebar {
    width: 300px;
    min-width: 260px;
    flex-shrink: 0;
    background: #f4fafa;
    border-right: 1px solid #cde5e5;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.docaten-sidebar-header {
    padding: 12px 12px 10px;
    border-bottom: 1px solid #cde5e5;
    background: linear-gradient(180deg, #e6f4f4 0%, #ddf0f0 100%);
    flex-shrink: 0;
}
.docaten-sidebar-header h6 {
    font-size: 0.7rem;
    font-weight: 700;
    color: #0d5f5f;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin: 0 0 8px;
}

/* ── Buscador ──────────────────────────────────────────── */
.docaten-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.docaten-search-icon {
    position: absolute;
    left: 9px;
    font-size: 0.76rem;
    color: #7aabab;
    pointer-events: none;
    z-index: 1;
}
.docaten-search {
    width: 100%;
    padding: 6px 10px 6px 28px;
    font-size: 0.8rem;
    border: 1.5px solid #b8d8d8;
    border-radius: 20px;
    background: #fff;
    color: #2d5a5a;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.docaten-search::placeholder { color: #a8c8c8; }
.docaten-search:focus {
    border-color: #0d8080;
    box-shadow: 0 0 0 3px rgba(13, 128, 128, 0.12);
}

.docaten-sidebar-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0 14px;
}
.docaten-sidebar-list::-webkit-scrollbar { width: 4px; }
.docaten-sidebar-list::-webkit-scrollbar-track { background: transparent; }
.docaten-sidebar-list::-webkit-scrollbar-thumb { background: #c8dede; border-radius: 4px; }

/* ── Grupo de categoría ────────────────────────────────── */
.docaten-cat-group {
    margin: 0 8px 10px;
}
.docaten-cat-group:first-child { margin-top: 0; }

.docaten-cat {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px 5px;
    border-radius: 6px 6px 0 0;
    font-size: 0.67rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: #fff;
    background: linear-gradient(90deg, #0d7070 0%, #0b9494 100%);
    box-shadow: 0 2px 5px rgba(13, 95, 95, 0.2);
    user-select: none;
}
.docaten-cat > i {
    font-size: 0.8rem;
    flex-shrink: 0;
}
.docaten-cat-count {
    margin-left: auto;
    font-size: 0.6rem;
    background: rgba(255, 255, 255, 0.22);
    border-radius: 20px;
    padding: 1px 7px;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1.6;
}

/* ── Ítems dentro del grupo ────────────────────────────── */
.docaten-items-list {
    border: 1px solid #c8e0e0;
    border-top: none;
    border-radius: 0 0 6px 6px;
    overflow: hidden;
    background: #fff;
}

/* ── Item de documento ─────────────────────────────────── */
.docaten-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 12px;
    cursor: pointer;
    border-left: 3px solid transparent;
    border-bottom: 1px solid #eef6f6;
    transition: background 0.15s, border-color 0.15s;
    font-size: 0.82rem;
    color: #2d5858;
    text-decoration: none;
}
.docaten-item:last-child { border-bottom: none; }
.docaten-item:hover {
    background: #e6f4f4;
    border-left-color: #0d9090;
    color: #0a5050;
}
.docaten-item.active {
    background: #cbecec;
    border-left-color: #0d5f5f;
    color: #0d5f5f;
    font-weight: 600;
}
.docaten-item > i {
    font-size: 0.95rem;
    flex-shrink: 0;
    color: #3a9090;
    transition: color 0.15s;
    width: 18px;
    text-align: center;
}
.docaten-item.active > i { color: #0d5f5f; }
.docaten-item-label {
    flex: 1;
    min-width: 0;
    line-height: 1.35;
}
.docaten-item-title {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-transform: none;
}

/* Subtítulo del item (ej. categoría del consentimiento) */
.docaten-item-sub {
    font-size: 0.65rem;
    color: #85aaaa;
    display: block;
    line-height: 1.2;
    margin-top: 1px;
    text-transform: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Ítem pendiente ─────────────────────────────────────── */
.docaten-item--pendiente {
    opacity: 0.52;
    cursor: not-allowed;
    pointer-events: none;
    background: #f8fbfb;
}
.docaten-item--pendiente > i { color: #b0cece; }
.docaten-item-badge-pending {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.56rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    text-transform: uppercase;
    background: #fff8e1;
    color: #906a00;
    border: 1px solid rgba(200, 160, 0, 0.2);
    border-radius: 20px;
    padding: 1px 6px;
    margin-left: 4px;
    vertical-align: middle;
    line-height: 1.7;
    flex-shrink: 0;
    white-space: nowrap;
}
.docaten-item-badge-draft {
    display: inline-flex;
    align-items: center;
    font-size: 0.56rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    text-transform: uppercase;
    background: #fdecea;
    color: #b71c1c;
    border: 1px solid rgba(183, 28, 28, 0.2);
    border-radius: 20px;
    padding: 1px 6px;
    margin-left: 4px;
    vertical-align: middle;
    line-height: 1.7;
    flex-shrink: 0;
    white-space: nowrap;
}

/* ── Sin resultados de búsqueda ─────────────────────────── */
.docaten-no-results {
    padding: 24px 14px;
    text-align: center;
    color: #8ab0b0;
    font-size: 0.82rem;
}
.docaten-no-results i {
    display: block;
    font-size: 1.8rem;
    margin-bottom: 8px;
    color: #c5d8d8;
}

/* ── Área de previsualización ──────────────────────────── */
.docaten-preview {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #e8ecec;
    overflow: hidden;
}

.docaten-preview-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: #fff;
    border-bottom: 1px solid #d8e8e8;
    min-height: 44px;
}
.docaten-preview-bar .preview-title {
    flex: 1;
    font-size: 0.85rem;
    font-weight: 600;
    color: #0d5f5f;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.docaten-preview-bar .btn-open-pdf {
    font-size: 0.78rem;
    padding: 4px 12px;
    border-radius: 20px;
}

/* ── Tercera columna: trazabilidad de la revisión ───────── */
/* Oculta salvo que la página anfitriona la pida: el modal sigue siendo de dos
   columnas para todo lo demás. */
.docaten-revision-panel {
    width: 0;
    flex-shrink: 0;
    background: #fff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    visibility: hidden;
    transition: width .22s ease;
}

.docaten-body--revision .docaten-revision-panel {
    width: 400px;
    min-width: 340px;
    border-left: 1px solid #cde5e5;
    visibility: visible;
}

.docaten-revision-panel-body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

/* Con las tres columnas el sidebar cede ancho: el documento del centro es lo
   que hay que poder leer. */
.docaten-body--revision .docaten-sidebar {
    width: 250px;
    min-width: 220px;
}

@media (max-width: 1400px) {
    .docaten-body--revision .docaten-revision-panel {
        width: 350px;
        min-width: 320px;
    }
}

.docaten-iframe-wrap {
    flex: 1;
    position: relative;
    overflow: hidden;
}
.docaten-iframe-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
    background: #fff;
}

/* ── Estado: loading / vacío ───────────────────────────── */
.docaten-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #aabcbc;
    gap: 14px;
    text-align: center;
    padding: 20px;
}
.docaten-placeholder > i { font-size: 3.5rem; color: #ccdede; }
.docaten-placeholder > p { font-size: 0.88rem; margin: 0; }

.docaten-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 10px;
    color: #0d5f5f;
    font-size: 0.9rem;
}
.docaten-loading .spinner-border {
    width: 1.5rem;
    height: 1.5rem;
}

/* ── Animación de carga del PDF ──────────────────────── */
.docaten-pdf-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f0f5f5;
    gap: 18px;
    z-index: 10;
    overflow: hidden;
    transition: opacity 0.35s ease;
}

/* Barra de progreso animada en la parte superior */
.docaten-pdf-loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 3px;
    width: 55%;
    background: linear-gradient(90deg, transparent 0%, #0d8080 40%, #0de8c8 100%);
    border-radius: 0 2px 2px 0;
    animation: docaten-bar 1.6s ease-in-out infinite;
}
@keyframes docaten-bar {
    0%   { left: -55%; opacity: 0.8; }
    80%  { left: 110%; opacity: 1; }
    100% { left: 110%; opacity: 0; }
}

/* Icono de documento pulsante */
.docaten-pdf-loading-icon {
    width: 56px;
    height: 70px;
    background: #fff;
    border-radius: 6px;
    border: 2px solid #c0dede;
    box-shadow: 0 6px 20px rgba(13, 95, 95, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: docaten-iconpulse 1.4s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}
.docaten-pdf-loading-icon::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(100deg, transparent 0%, rgba(255,255,255,0.6) 50%, transparent 100%);
    animation: docaten-shimmer 1.6s ease-in-out infinite;
}
@keyframes docaten-shimmer {
    0%   { left: -100%; }
    100% { left: 150%; }
}
.docaten-pdf-loading-icon > i { font-size: 1.8rem; color: #0d8080; }
.docaten-pdf-loading-dots {
    display: flex;
    gap: 5px;
}
.docaten-pdf-loading-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #0d8080;
    display: inline-block;
    animation: docaten-dot 1.2s ease-in-out infinite both;
}
.docaten-pdf-loading-dots span:nth-child(2) { animation-delay: 0.18s; }
.docaten-pdf-loading-dots span:nth-child(3) { animation-delay: 0.36s; }
@keyframes docaten-dot {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40%            { transform: scale(1);   opacity: 1; }
}
.docaten-pdf-loading > p { font-size: 0.82rem; color: #6a9898; margin: 0; }
@keyframes docaten-iconpulse {
    0%, 100% { transform: translateY(0);    box-shadow: 0 6px 20px rgba(13,95,95,0.12); }
    50%       { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(13,95,95,0.2); }
}

/* ── Barra de navegación mobile ──────────────────────────── */
.docaten-mobile-nav {
    display: none; /* JS la muestra al seleccionar un doc en mobile */
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
    background: #fff;
    border-top: 1px solid #cde5e5;
    box-shadow: 0 -3px 14px rgba(13, 95, 95, 0.1);
    flex-shrink: 0;
    z-index: 10;
}
.docaten-mobile-nav-back {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    background: #f0fafa;
    border: 1.5px solid #b8d8d8;
    border-radius: 20px;
    color: #0d5f5f;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 7px 14px;
    cursor: pointer;
    white-space: nowrap;
    line-height: 1.4;
    transition: background 0.15s, border-color 0.15s;
}
.docaten-mobile-nav-back:active {
    background: #daf0f0;
    border-color: #0d8080;
}
.docaten-mobile-nav-title {
    flex: 1;
    min-width: 0;
    font-size: 0.78rem;
    font-weight: 600;
    color: #0d5f5f;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
}
.docaten-mobile-nav-open {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    background: #0d5f5f;
    color: #fff;
    border-radius: 50%;
    text-decoration: none;
    font-size: 1rem;
    transition: background 0.15s;
}
.docaten-mobile-nav-open:hover,
.docaten-mobile-nav-open:focus {
    background: #0a4a4a;
    color: #fff;
    text-decoration: none;
}

/* ── Responsive mobile ──────────────────────────────────── */
@media (max-width: 768px) {

    /* Header compacto */
    #modal-documentos-atencion .modal-header {
        padding: 8px 12px;
    }
    #modal-documentos-atencion .modal-header .modal-title {
        font-size: 0.85rem;
    }

    /* Ocultar elementos no esenciales del header en mobile */
    .docaten-switcher-container,
    .docaten-precarga-container,
    #docaten-zip-btn-container,
    #btn-descargar-zip-atencion {
        display: none !important;
    }

    /* modal-body sin scroll propio: el scroll es interno (docaten-sidebar-list) */
    #modal-documentos-atencion .modal-body {
        overflow: hidden;
    }

    /* docaten-body llena el modal-body completamente */
    .docaten-body {
        flex-direction: column;
        height: 100%;
    }

    /* Sidebar: ancho completo y ocupa todo el alto disponible */
    .docaten-sidebar {
        width: 100%;
        min-width: unset;
        border-right: none;
        border-bottom: 1px solid #cde5e5;
        flex: 1;
    }

    /* Preview oculto por defecto; JS lo muestra al seleccionar documento */
    .docaten-preview {
        display: none;
        flex: 1;
    }

    /* Estado: mostrando preview → sidebar oculto, preview visible */
    .docaten-body--preview .docaten-sidebar {
        display: none;
    }
    .docaten-body--preview .docaten-preview {
        display: flex;
    }

    /* La barra interna del preview no se muestra (la reemplaza la mobile-nav) */
    .docaten-body--preview .docaten-preview-bar {
        display: none;
    }

    /* Sin sitio para tres columnas: la trazabilidad tapa la pantalla completa y
       su botón de cerrar devuelve al documento. */
    .docaten-body--revision .docaten-revision-panel {
        position: absolute;
        inset: 0;
        z-index: 5;
        width: 100%;
        min-width: 0;
        border-left: none;
    }

    .docaten-body--revision .docaten-sidebar {
        width: 100%;
        min-width: unset;
    }
}

/* ── Editor de título del concepto ─────────────────────── */
.docaten-titulo-editor {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    margin-right: auto;
}
.docaten-titulo-valor {
    font-size: 0.78rem;
    color: #0d5f5f;
    font-weight: 600;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.docaten-titulo-input-group {
    display: flex;
    align-items: center;
    gap: 5px;
}
.docaten-titulo-input {
    min-width: 240px;
    max-width: 360px;
    font-size: 0.8rem;
    border-color: #0d8080;
}
.docaten-titulo-input:focus {
    border-color: #0d5f5f;
    box-shadow: 0 0 0 3px rgba(13, 95, 95, 0.12);
}
.docaten-btn-cambiar-titulo,
.docaten-btn-aprobar {
    font-size: 0.76rem;
    padding: 4px 12px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}
.docaten-btn-cancelar-titulo {
    font-size: 0.76rem;
    padding: 4px 8px;
    border-radius: 20px;
    flex-shrink: 0;
}


/* ==================== BOTÓN ZIP ==================== */
.docaten-btn-zip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.3rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #0e8c8c 0%, #0a6060 100%);
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    border-radius: 2rem;
    cursor: pointer;
    transition: all 0.25s ease;
    line-height: 1.4;
    white-space: nowrap;
    text-decoration: none;
}
.docaten-btn-zip:hover {
    background: linear-gradient(135deg, #11a8a8 0%, #0d7a7a 100%);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    text-decoration: none;
}
.docaten-btn-zip:active {
    transform: translateY(0);
}
.docaten-btn-zip i {
    font-size: 0.85rem;
}

/* ==================== OVERLAY ZIP ==================== */
.docaten-zip-overlay {
    position: absolute;
    inset: 0;
    z-index: 1050;
    background: rgba(8, 40, 40, 0.72);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.docaten-zip-overlay--visible {
    opacity: 1;
}

/* Tarjeta central */
.docaten-zip-card {
    background: #fff;
    border-radius: 1.5rem;
    padding: 2.5rem 2.2rem;
    min-width: 340px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
    text-align: center;
    animation: docaten-zip-enter 0.35s ease both;
}
@keyframes docaten-zip-enter {
    from { opacity: 0; transform: translateY(30px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Ícono animado */
.docaten-zip-icon-wrap {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.docaten-zip-icon-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 4px solid transparent;
    border-top-color: #0e8c8c;
    border-right-color: #0e8c8c;
    animation: docaten-ring-spin 1s linear infinite;
}
@keyframes docaten-ring-spin {
    to { transform: rotate(360deg); }
}
.docaten-zip-icon-main {
    font-size: 2.2rem;
    color: #0e8c8c;
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
}

/* Títulos */
.docaten-zip-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0a5050;
    margin-bottom: 0.2rem;
    transition: all 0.3s ease;
}
.docaten-zip-subtitle {
    font-size: 0.82rem;
    color: #6c757d;
    margin-bottom: 1.4rem;
    transition: all 0.3s ease;
}

/* Pasos */
.docaten-zip-steps {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1.4rem;
    text-align: left;
}
.docaten-zip-step {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 0.84rem;
    color: #555;
    opacity: 0.4;
    transition: opacity 0.35s ease, color 0.35s ease;
}
.docaten-zip-step i {
    font-size: 1.1rem;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
    transition: color 0.3s ease;
}
.docaten-zip-step--active {
    opacity: 1;
    color: #0a5050;
    font-weight: 600;
}
.docaten-zip-step--active i {
    color: #0e8c8c;
    animation: docaten-step-pulse 0.7s ease infinite alternate;
}
@keyframes docaten-step-pulse {
    from { opacity: 1; }
    to   { opacity: 0.5; }
}
.docaten-zip-step--done {
    opacity: 0.65;
    color: #198754;
}
.docaten-zip-step--done i {
    color: #198754;
    animation: none;
}

/* Barra de progreso */
.docaten-zip-progress-wrap {
    width: 100%;
    height: 7px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
}
#docaten-zip-progress {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #0e8c8c 0%, #1dd3b0 100%);
    border-radius: 10px;
    transition: width 0.5s ease;
}

/* ==================== SWITCHER OTRAS ATENCIONES ==================== */
.docaten-switcher-container {
    display: flex;
    align-items: center;
}

.docaten-switcher {
    position: relative;
}

/* Botón trigger */
.docaten-sw-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 4px 10px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    white-space: nowrap;
    line-height: 1.4;
}
.docaten-sw-trigger:hover,
.docaten-sw-trigger--open {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
}
.docaten-sw-trigger .docaten-sw-caret {
    font-size: 0.65rem;
    transition: transform 0.2s;
}
.docaten-sw-trigger--open .docaten-sw-caret {
    transform: rotate(180deg);
}

/* Badge de conteo */
.docaten-sw-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    background: #1dd3b0;
    color: #0a4a4a;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
}

/* Menú desplegable */
.docaten-sw-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 260px;
    max-width: 320px;
    max-height: 280px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    z-index: 9999;
}
.docaten-sw-menu-header {
    padding: 8px 12px 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #888;
    border-bottom: 1px solid #eee;
}

/* Ítem de cada atención */
.docaten-sw-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 12px;
    background: none;
    border: none;
    border-bottom: 1px solid #f0f0f0;
    text-align: left;
    cursor: pointer;
    transition: background 0.12s;
    font-size: 0.85rem;
    color: #333;
}
.docaten-sw-item:last-child {
    border-bottom: none;
}
.docaten-sw-item:hover {
    background: #f0fafa;
}

/* ID de la atención */
.docaten-sw-id {
    font-weight: 700;
    color: #0d5f5f;
    font-size: 0.8rem;
    min-width: 40px;
}

/* Fecha */
.docaten-sw-fecha {
    color: #555;
    font-size: 0.8rem;
    flex: 1;
}

/* Tipo de examen */
.docaten-sw-tipo {
    font-size: 0.72rem;
    color: #888;
    background: #f4f4f4;
    border-radius: 4px;
    padding: 1px 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
}

/* ── Banner documentos provisionales ─────────────────────────── */
.docaten-banner-provisional {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fef3c7;
    border-left: 3px solid #d97706;
    color: #92400e;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 0 6px 6px 0;
    margin: 8px 8px 4px;
}
