/* ============================================
   Documentos Legales - Estilos
   ============================================ */

.uv-documentos-registro,
.uv-documentos-agendamiento,
.uv-mis-documentos {
    margin: 20px 0;
}

.uv-documento-item {
    border-top: 1px solid #e5e7eb;
    padding: 16px 0;
}

.uv-documento-item:first-of-type {
    border-top: none;
}

.uv-documento-titulo {
    margin: 0 0 10px 0;
    font-size: 1.05rem;
    font-weight: 600;
}

.uv-documento-contenido {
    max-height: 320px;
    overflow-y: auto;
    padding: 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 12px;
}

.uv-documento-contenido p {
    margin: 0 0 10px 0;
}

.uv-documento-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.95rem;
    cursor: pointer;
}

.uv-documento-checkbox input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
}

.uv-documento-aviso {
    padding: 8px 0;
}

.uv-aviso-breve {
    margin: 0;
    padding: 10px 12px;
    background: #fff7ed;
    border-left: 3px solid #f59e0b;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #78350f;
    line-height: 1.5;
}

.uv-documentos-acciones {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.uv-documentos-mensaje {
    font-size: 0.9rem;
    color: #b91c1c;
}

.uv-documentos-mensaje.uv-exito {
    color: #15803d;
}

/* Tabs del panel privado */

.uv-mis-documentos .uv-card-body {
    padding: 20px 22px 22px;
}

.uv-mis-documentos > .uv-card-body > .uv-nota {
    margin: 0 0 16px 0;
    font-size: 0.9rem;
    color: #4b5563;
    line-height: 1.55;
}

.uv-tabs {
    display: flex;
    gap: 4px;
    margin: 16px 0 20px 0;
    border-bottom: 1px solid #e5e7eb;
}

.uv-tabs button {
    background: transparent;
    border: none;
    padding: 10px 16px;
    font-size: 0.95rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    color: #4b5563;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.uv-tabs button:hover {
    color: #1f2937;
}

.uv-tabs button.uv-tab-activo {
    border-bottom-color: #2563eb;
    color: #1d4ed8;
    font-weight: 600;
}

.uv-tab-panel {
    padding: 4px 0 0 0;
}

/* Lista de documentos en el panel privado */

.uv-lista-documentos {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.uv-documento-lista-item {
    padding: 16px 18px;
    background: #fafbfc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.uv-documento-lista-item:hover {
    border-color: #d1d5db;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.uv-documento-lista-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.uv-documento-lista-titulo {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
    line-height: 1.4;
}

.uv-documento-lista-contexto {
    font-size: 0.9rem;
    color: #4b5563;
    margin-bottom: 8px;
    line-height: 1.45;
}

.uv-documento-lista-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: #6b7280;
    margin-bottom: 12px;
}

.uv-meta-sep {
    color: #d1d5db;
}

.uv-documento-hash {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.78rem;
    padding: 2px 6px;
    background: #f3f4f6;
    border-radius: 4px;
    color: #4b5563;
    cursor: help;
}

.uv-documento-lista-acciones {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.uv-documento-lista-acciones .uv-nav-boton {
    font-size: 0.88rem;
    padding: 8px 14px;
}

/* Variante secundaria del boton UVALAR */

.uv-nav-boton--secundario {
    background: #ffffff;
    color: #1f2937;
    border: 1px solid #d1d5db;
}

.uv-nav-boton--secundario:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    color: #111827;
}

.uv-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
}

.uv-badge-vigente {
    background: #dcfce7;
    color: #166534;
}

/* Pagina publica del documento */

.uv-doc-volver {
    position: fixed;
    top: 16px;
    left: 16px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    text-decoration: none;
    color: #1f2937;
    font-size: 1.2rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    z-index: 100;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.uv-doc-volver:hover {
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
    transform: translateY(-1px);
}

.uv-doc-publico-contenedor {
    max-width: 820px;
    margin: 80px auto 60px;
    padding: 0 20px;
}

.uv-doc-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px 0;
    font-size: 0.85rem;
    color: #6b7280;
}

.uv-doc-breadcrumb a {
    color: #4b5563;
    text-decoration: none;
    transition: color 0.2s ease;
}

.uv-doc-breadcrumb a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.uv-breadcrumb-sep {
    color: #d1d5db;
}

.uv-breadcrumb-actual {
    color: #1f2937;
    font-weight: 500;
}

.uv-doc-publico-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.uv-doc-publico-card .uv-card-header {
    padding: 28px 32px 20px;
    border-bottom: 1px solid #e5e7eb;
}

.uv-doc-publico-card .uv-card-header h1 {
    margin: 0 0 8px 0;
    font-size: 1.5rem;
    line-height: 1.3;
    color: #1f2937;
}

.uv-doc-publico-card .uv-card-header .uv-nota {
    margin: 8px 0 0 0;
    font-size: 0.95rem;
    color: #4b5563;
    line-height: 1.5;
}

.uv-doc-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #6b7280;
    margin: 12px 0 0 0;
}

.uv-doc-publico-contenido {
    padding: 24px 32px 32px;
    font-size: 0.98rem;
    line-height: 1.65;
    color: #1f2937;
}

.uv-doc-publico-contenido h2 {
    margin: 28px 0 12px 0;
    font-size: 1.2rem;
    line-height: 1.35;
    color: #1f2937;
}

.uv-doc-publico-contenido h3 {
    margin: 22px 0 10px 0;
    font-size: 1.05rem;
    line-height: 1.35;
    color: #1f2937;
}

.uv-doc-publico-contenido p {
    margin: 0 0 12px 0;
}

.uv-doc-publico-contenido ul,
.uv-doc-publico-contenido ol {
    margin: 0 0 14px 22px;
    padding: 0;
}

.uv-doc-publico-contenido li {
    margin-bottom: 6px;
}

.uv-doc-publico-contenido a {
    color: #1d4ed8;
}

.uv-doc-publico-contenido strong {
    color: #111827;
}

/* Pagina indice de documentos */

.uv-indice-documentos {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.uv-indice-item {
    margin: 0;
}

.uv-indice-enlace {
    display: block;
    padding: 16px 18px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fafbfc;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.uv-indice-enlace:hover {
    border-color: #9ca3af;
    background: #f9fafb;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.uv-indice-titulo {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
}

.uv-indice-desc {
    display: block;
    font-size: 0.9rem;
    color: #4b5563;
    line-height: 1.5;
    margin-bottom: 6px;
}

.uv-indice-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: #6b7280;
}

/* Documentos dentro del formulario de registro: presentacion profesional */

.uv-form-registro .uv-documentos-registro {
    margin: 20px 0 24px 0;
}

.uv-form-registro .uv-documentos-registro .uv-card-header {
    padding: 16px 20px 12px 20px;
    border-bottom: 1px solid #e5e7eb;
}

.uv-form-registro .uv-documentos-registro .uv-card-header h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: #1f2937;
}

.uv-form-registro .uv-documentos-registro .uv-card-body {
    padding: 16px 20px 20px 20px;
}

.uv-form-registro .uv-documentos-registro > .uv-card-body > .uv-nota {
    margin: 0 0 16px 0;
    font-size: 0.9rem;
    color: #4b5563;
}

.uv-form-registro .uv-documento-item {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    background: #fafbfc;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.uv-form-registro .uv-documento-item:last-child {
    margin-bottom: 0;
}

.uv-form-registro .uv-documento-item.uv-documento-marcado {
    border-color: #4CAF50;
    background: #f1f8e9;
    box-shadow: 0 0 0 1px #4CAF50 inset;
}

.uv-form-registro .uv-documento-titulo {
    margin: 0 0 12px 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.uv-form-registro .uv-documento-contenido {
    max-height: 220px;
    overflow-y: auto;
    padding: 12px 14px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #374151;
    margin-bottom: 14px;
}

.uv-form-registro .uv-documento-contenido p:last-child {
    margin-bottom: 0;
}

/* Checkbox tipo tarjeta clicable */

.uv-form-registro .uv-documento-checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 6px 8px;
    padding: 10px 12px;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #374151;
    line-height: 1.5;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.uv-form-registro .uv-documento-checkbox-wrapper:hover {
    border-color: #9ca3af;
    background: #f9fafb;
}

.uv-form-registro .uv-documento-checkbox-wrapper input[type="checkbox"] {
    margin: 2px 0 0 0;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    accent-color: #4CAF50;
    cursor: pointer;
}

.uv-form-registro .uv-documento-checkbox-label {
    cursor: pointer;
    flex: 0 1 auto;
    display: inline;
    user-select: none;
}

.uv-form-registro .uv-documento-enlace {
    color: #1d4ed8;
    text-decoration: none;
    cursor: pointer;
    font-weight: 500;
    display: inline;
    flex: 0 1 auto;
    word-break: break-word;
}

.uv-form-registro .uv-documento-enlace:hover {
    color: #1e40af;
    text-decoration: underline;
}

.uv-form-registro .uv-documento-enlace:focus {
    outline: 2px solid #1d4ed8;
    outline-offset: 2px;
    border-radius: 2px;
}

.uv-form-registro .uv-documento-item.uv-documento-marcado .uv-documento-checkbox-wrapper {
    border-color: #4CAF50;
    background: #f1f8e9;
}

.uv-form-registro .uv-documento-item.uv-documento-marcado .uv-documento-checkbox-label {
    color: #1b5e20;
    font-weight: 500;
}

/* Aviso breve dentro del formulario */

.uv-form-registro .uv-documento-aviso {
    border: none;
    background: transparent;
    padding: 0;
    margin-bottom: 12px;
}

.uv-form-registro .uv-aviso-breve {
    margin: 0;
    padding: 12px 14px;
    background: #fff7ed;
    border-left: 3px solid #f59e0b;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #78350f;
    line-height: 1.55;
}

/* Badges obligatorio / opcional */

.uv-badge-obligatorio {
    background: #fee2e2;
    color: #991b1b;
    margin-left: 8px;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
    vertical-align: middle;
}

.uv-badge-opcional {
    background: #e5e7eb;
    color: #4b5563;
    margin-left: 8px;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
    vertical-align: middle;
}

/* Documentos dentro del flujo de agendamiento */

.uv-documentos-agendamiento {
    margin: 20px 0;
}

.uv-documentos-agendamiento .uv-card-body {
    padding: 20px 22px 22px;
}

.uv-documentos-agendamiento .uv-documento-item {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    background: #fafbfc;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.uv-documentos-agendamiento .uv-documento-item:last-child {
    margin-bottom: 0;
}

.uv-documentos-agendamiento .uv-documento-item.uv-documento-marcado {
    border-color: #4CAF50;
    background: #f1f8e9;
    box-shadow: 0 0 0 1px #4CAF50 inset;
}

.uv-documentos-agendamiento .uv-documento-titulo {
    margin: 0 0 12px 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.uv-documentos-agendamiento .uv-documento-contenido {
    max-height: 220px;
    overflow-y: auto;
    padding: 12px 14px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #374151;
    margin-bottom: 14px;
}

.uv-documentos-agendamiento .uv-documento-checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 6px 8px;
    padding: 10px 12px;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #374151;
    line-height: 1.5;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.uv-documentos-agendamiento .uv-documento-checkbox-wrapper:hover {
    border-color: #9ca3af;
    background: #f9fafb;
}

.uv-documentos-agendamiento .uv-documento-checkbox-wrapper input[type="checkbox"] {
    margin: 2px 0 0 0;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    accent-color: #4CAF50;
    cursor: pointer;
}

.uv-documentos-agendamiento .uv-documento-checkbox-label {
    cursor: pointer;
    flex: 0 1 auto;
    display: inline;
    user-select: none;
}

.uv-documentos-agendamiento .uv-documento-enlace {
    color: #1d4ed8;
    text-decoration: none;
    cursor: pointer;
    font-weight: 500;
    display: inline;
    flex: 0 1 auto;
    word-break: break-word;
}

.uv-documentos-agendamiento .uv-documento-enlace:hover {
    color: #1e40af;
    text-decoration: underline;
}

.uv-documentos-agendamiento .uv-documento-enlace:focus {
    outline: 2px solid #1d4ed8;
    outline-offset: 2px;
    border-radius: 2px;
}

.uv-documentos-agendamiento .uv-documento-item.uv-documento-marcado .uv-documento-checkbox-wrapper {
    border-color: #4CAF50;
    background: #f1f8e9;
}

.uv-documentos-agendamiento .uv-documento-item.uv-documento-marcado .uv-documento-checkbox-label {
    color: #1b5e20;
    font-weight: 500;
}

.uv-documentos-agendamiento .uv-documento-aviso {
    border: none;
    background: transparent;
    padding: 0;
    margin-bottom: 12px;
}

.uv-documentos-agendamiento .uv-aviso-breve {
    margin: 0;
    padding: 12px 14px;
    background: #fff7ed;
    border-left: 3px solid #f59e0b;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #78350f;
    line-height: 1.55;
}

.uv-documentos-agendamiento .uv-documento-resultado {
    margin-top: 10px;
    padding: 8px 10px;
    background: #f0fdf4;
    border-left: 3px solid #4CAF50;
    border-radius: 4px;
    font-size: 0.82rem;
    color: #166534;
    font-family: "SFMono-Regular", Consolas, monospace;
    word-break: break-all;
}

.uv-documentos-agendamiento .uv-documentos-acciones {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.uv-documentos-agendamiento .uv-documentos-mensaje {
    font-size: 0.9rem;
    color: #b91c1c;
}

.uv-documentos-agendamiento .uv-documentos-mensaje.uv-exito {
    color: #15803d;
    font-weight: 500;
}

@media (max-width: 600px) {
    .uv-doc-publico-contenedor {
        margin: 70px auto 40px;
        padding: 0 14px;
    }
    .uv-doc-publico-card .uv-card-header,
    .uv-doc-publico-contenido {
        padding-left: 20px;
        padding-right: 20px;
    }
    .uv-documento-contenido {
        max-height: 240px;
    }
    .uv-form-registro .uv-documento-contenido {
        max-height: 180px;
    }
}