/* CONFIGURACION DE FUENTE Y ESTILOS BASE UNIFICADOS */
html { font-family: sans-serif; }

.modern-table { border-collapse: collapse; }
.modern-table th, .modern-table td {
    border: 1px solid #d1d5db;
    padding: 0.75rem 0.5rem;
    text-align: center;
}

.modern-table thead th {
    background-color: #eff6ff;
    font-weight: 700;
    color: #1f2937;
    text-transform: uppercase;
    font-size: 0.875rem;
}

.modern-table input[type="text"],
.modern-table input[type="datetime-local"],
.modern-table textarea {
    width: 100%;
    border: none !important;
    padding: 0.25rem 0.5rem;
    background-color: transparent;
    font-size: 1rem;
    box-shadow: none;
    text-align: center;
    min-height: 50px;
}

.modern-table textarea {
    text-align: left;
    resize: vertical;
}

#exp-control-1,
#exp-control-2 {
    font-family: Consolas, "Courier New", monospace;
    font-weight: 600;
    letter-spacing: 0.01em;
    font-size: 0.92rem;
    text-align: left;
    padding-left: 0.25rem;
}

/* Da mas espacio visual a la columna de expediente en vista web (PC). */
.modern-table th:nth-child(2),
.modern-table td:nth-child(2) {
    min-width: 220px;
}

.table-container { overflow-x: auto; }
.modern-table { min-width: 1050px; }

/* ESTILOS DE IMPRESION OPTIMIZADOS */
@media print {
    .container, .print-button-container, .signature-section-web { display: none !important; }

    @page { size: A4 portrait; margin: 0.5cm !important; }

    body {
        background: #fff !important;
        color: #000 !important;
        font-family: "Times New Roman", serif !important;
        font-size: 11.5pt !important;
        line-height: 1.2;
        margin: 0 !important;
        padding: 0 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .print-area { display: block !important; width: auto; padding: 1cm !important; box-sizing: border-box; }

    .header-print { display: flex !important; justify-content: space-between; align-items: center; border-bottom: 2px solid #000; padding-bottom: 8px; margin-bottom: 15px; }
    .header-print img { height: 65px; }

    .header-print h1 { font-size: 1.1em; text-align: right; color: #000; font-weight: bold; line-height: 1.1; margin-top: 0; }
    .section-title-print { font-size: 1.05em; font-weight: bold; color: #000; background-color: #f2f2f2; border: 1px solid #999; padding: 4px 8px; border-radius: 3px; margin-top: 12px; margin-bottom: 10px; }
    .form-group-print { display: flex; align-items: flex-start; margin-bottom: 8px; font-size: 11pt; }
    .form-group-print label { font-weight: bold; width: 220px; color: #111; flex-shrink: 0; }
    .form-value-print { flex-grow: 1; padding-left: 6px; min-height: 1.3em; border-bottom: 1px solid #444; }

    .modern-table-print { width: 100%; border-collapse: collapse; table-layout: fixed; }
    .modern-table-print th, .modern-table-print td { border: 1px solid #000; padding: 4px 8px; text-align: center; font-size: 10pt; }
    .modern-table-print thead th { background-color: #e0e0e0; font-weight: bold; color: #000; text-transform: uppercase; }
    .modern-table-print tbody td { height: 35px; }
    .fecha-hora-line-format { font-size: 8pt; font-weight: bold; }

    .signature-section-print { display: flex !important; justify-content: space-between; margin-top: 35px; gap: 40px; }
    .signature-box-print { width: 45%; text-align: center; }
    .signature-box-print .placeholder { width: 180px; height: 90px; border: 1px solid #000; margin: 0 auto 8px auto; background: none; }
    .signature-box-print p { border-top: 1px solid #000; font-size: 10.5pt; padding-top: 4px; margin-top: 3px; }

    .entrega-nota-print {
        text-align: center;
        font-size: 11pt;
        color: #000;
        font-weight: bold;
        margin-top: 30px;
        padding-top: 10px;
        border-top: 1px dashed #999;
    }

    #print-otro-rol-group { display: none !important; }
    #registro-fecha-hora-print { display: block !important; text-align: right; font-size: 10pt; color: #000; margin-top: 15px; font-style: italic; }
}

/* ===== ESTILOS MEJORADOS PARA BLOQUE DE EXPEDIENTES ===== */

.expediente-block {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%) !important;
    border-left: 6px solid #0284c7 !important;
    border-radius: 12px !important;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.15);
}

.expediente-block:hover {
    box-shadow: 0 8px 20px rgba(2, 132, 199, 0.25);
    transform: translateY(-2px);
}

.expediente-block input,
.expediente-block select {
    transition: all 0.2s ease;
    background-color: rgba(255, 255, 255, 0.95) !important;
}

.expediente-block input:focus,
.expediente-block select:focus {
    background-color: white !important;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.1) !important;
    transform: scale(1.02);
}

.expediente-block input::placeholder {
    color: #7dd3fc;
    font-weight: 500;
}

/* Estilo para el checkbox de Cautelar */
#checkCautelar {
    cursor: pointer;
    accent-color: #f59e0b;
}

/* Etiqueta de materia y juzgado con mejor visibilidad */
.expediente-block label.text-xs {
    display: block;
    color: #006fb3;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* Vista previa del expediente generado */
#expediente-guia {
    background: linear-gradient(90deg, #dbeafe 0%, #e0f2fe 100%);
    border-left: 4px solid #0284c7;
    font-size: 13px;
    line-height: 1.6;
}

#expediente-preview {
    color: #0c4a6e;
    font-size: 14px;
    letter-spacing: 1px;
}
