/* =========================================
   RETIRO DE ESTUDIANTES — formulario (BS5)
   ========================================= */

#formDataWithdrawstudent .col-form-label,
#formDataWithdrawstudent .control-label {
    color: #333333 !important;
}

#formDataWithdrawstudent .input-group-text,
#formDataWithdrawstudent .input-group-addon {
    border-radius: 20px 0 0 20px !important;
    border-color: #D6D6D6;
}

#formDataWithdrawstudent .form-control,
#formDataWithdrawstudent .form-select {
    border-radius: 0 20px 20px 0 !important;
    border-color: #D6D6D6;
}

/* =========================================
   Tabla monitoreo (misma línea gráfica FCAQ)
   ========================================= */

/* Granate igual que updateData/index.css (.panel-clr.on #910b26, thead tabla #900028) */
.table-withdraw-monitoring {
    --withdraw-thead-bg: #900028;
    --withdraw-thead-fg: #ffffff;
    --withdraw-border: #dee2e6;
    margin-bottom: 0;
    border-color: var(--withdraw-border) !important;
    background-color: #fff;
}

.table-withdraw-monitoring > thead > tr > th {
    background-color: var(--withdraw-thead-bg) !important;
    color: var(--withdraw-thead-fg) !important;
    font-weight: 600;
    text-align: center;
    vertical-align: middle;
    border-color: var(--withdraw-thead-bg) !important;
    padding: 0.65rem 0.5rem;
    font-size: 0.9rem;
    text-transform: none;
    letter-spacing: 0.02em;
}

.table-withdraw-monitoring > tbody > tr > td {
    vertical-align: middle;
    border-color: var(--withdraw-border);
    background-color: #fff;
    padding: 0.5rem 0.45rem;
}

/* Código y fecha de retiro centrados (como portal empleados) */
.table-withdraw-monitoring > thead > tr > th:nth-child(2),
.table-withdraw-monitoring > thead > tr > th:nth-child(3) {
    text-align: center;
}

.table-withdraw-monitoring > tbody > tr > td:nth-child(2),
.table-withdraw-monitoring > tbody > tr > td:nth-child(3) {
    text-align: center;
}

.table-withdraw-monitoring > tbody > tr:nth-of-type(even) > td {
    background-color: #fafafa;
}

.withdraw-student-name {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #222;
    font-size: 0.95rem;
}

.table-withdraw-monitoring .withdraw-photo img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: 1px solid var(--withdraw-border);
    border-radius: 4px;
}

/* Subtabla estados / tutores */
.table-withdraw-nested {
    --bs-table-bg: transparent;
    margin-bottom: 0 !important;
    font-size: 0.85rem;
}

.table-withdraw-nested > tbody > tr > td {
    vertical-align: middle;
    padding: 0.35rem 0.5rem;
    border-color: var(--withdraw-border);
}

.table-withdraw-nested > tbody > tr:last-child > td {
    font-weight: 600;
    background-color: #f3f4f6;
}

.table-withdraw-monitoring .table-responsive {
    margin: 0;
}

/* Botones en columna opciones */
.table-withdraw-monitoring .d-grid .btn {
    white-space: normal;
}

/* Expediente retiro — cabecera CHECKLIST = .panel-clr.on de updateData/index.css (#910b26) */
.withdraw-file-page .withdraw-checklist-heading,
.withdraw-file-page .panel-heading.panel-clr.on {
    background-color: #910b26 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 4px 4px 0 0;
    padding: 0.65rem 1rem !important;
}

/* Bootstrap 5 a veces pisa thead; forzar mismo rojo que table>thead del portal */
.withdraw-file-page .table-withdraw-monitoring > thead > tr > th {
    background-color: #900028 !important;
    color: #fff !important;
    border-color: #900028 !important;
}

.withdraw-file-page .btn-americano,
.withdraw-file-page .btn-americano-rs {
    background-color: #720034 !important;
    border: 1px solid #720034 !important;
    border-radius: 25px !important;
    padding: 10px 36px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    letter-spacing: 1px !important;
    color: #FFFFFF !important;
}

.withdraw-file-page .btn-americano:hover,
.withdraw-file-page .btn-americano-rs:hover,
.withdraw-file-page .btn-americano:focus,
.withdraw-file-page .btn-americano-rs:focus {
    background-color: #51022A !important;
    border-color: #51022A !important;
    color: #FFFFFF !important;
}

.withdraw-file-page .withdraw-checklist-heading a,
.withdraw-file-page .panel-heading.panel-clr .accordion-title {
    color: #fff !important;
    text-decoration: none !important;
}

.withdraw-file-page .withdraw-checklist-heading a:hover,
.withdraw-file-page .panel-heading.panel-clr .accordion-title:hover {
    color: #fff !important;
    opacity: 0.92;
}

.withdraw-file-page .panel.panel-default {
    border: 1px solid #dee2e6;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
}
.withdraw-file-page .panel-body {
    background: #fff;
} 

.withdraw-file-page .withdraw-file-photo {
    width: 120px;
    max-width: 120px;
    height: auto;
    object-fit: contain;
}

.withdraw-file-page .withdraw-accordion-chevron {
    color: #fff;
    font-size: 0.9rem;
}

/* Acordeón: abierto = chevron abajo; cerrado = chevron a la derecha (.collapsed lo pone Bootstrap 5 en el disparador) */
.withdraw-file-page .withdraw-accordion-toggle .withdraw-accordion-chevron {
    display: inline-block;
    transition: transform 0.2s ease;
    transform: rotate(0deg);
}

.withdraw-file-page .withdraw-accordion-toggle.collapsed .withdraw-accordion-chevron {
    transform: rotate(-90deg);
}

/* Back + Save (y enviar si aplica) en fila, repartiendo todo el ancho como en el portal */
.withdraw-file-page .withdraw-file-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    gap: 0.5rem;
    width: 100%;
    max-width: 100%;
}

.withdraw-file-page .withdraw-file-actions > .btn-group {
    width: 100%;
    min-width: 0;
    display: flex;
}

.withdraw-file-page .withdraw-file-actions .btn-group .btn {
    flex: 1 1 auto;
    width: 100%;
    min-height: 2.75rem;
}

.withdraw-file-page .withdraw-file-actions .btn-secondary {
    background-color: #e9ecef;
    border-color: #dee2e6;
    color: #212529;
}

@media (max-width: 576px) {
    .withdraw-file-page .withdraw-file-actions {
        grid-template-columns: 1fr;
    }
}

/* En expediente no aplicar centrado de columnas 2–3 del listado de monitoreo */
.withdraw-file-page .table-withdraw-monitoring > thead > tr > th:nth-child(2),
.withdraw-file-page .table-withdraw-monitoring > thead > tr > th:nth-child(3),
.withdraw-file-page .table-withdraw-monitoring > tbody > tr > td:nth-child(2),
.withdraw-file-page .table-withdraw-monitoring > tbody > tr > td:nth-child(3) {
    text-align: inherit;
}

/*
 * Formulario retiro cargado en modal (jQuery load): mismo nodo lleva id + .withdraw-file-page,
 * así que NO usar `.withdraw-file-page #contentToExport …` (nunca coincide).
 * Survey/object.ulinput usan `col-md-8 col-md-offset-1` SIN clase .employee-data sobre ese div.
 */
#contentToExport.withdraw-file-page .withdraw-form-panel-body {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    /* Aire lateral en modal (equiv. ~px-3 en móvil, ~px-4 en md+) */
    padding-left: clamp(0.85rem, 3vw, 1.5rem);
    padding-right: clamp(0.85rem, 3vw, 1.5rem);
}

/* BS5 offset-md-* dentro de encuesta con .employee-data (selects, etc.) */
#contentToExport.withdraw-file-page .withdraw-form-panel-body .employee-data > .container,
#contentToExport.withdraw-file-page .withdraw-form-panel-body .employee-data.container,
#contentToExport.withdraw-file-page .withdraw-form-panel-body .employee-data .container {
    width: 100%;
    max-width: none !important;
    padding-left: 0;
    padding-right: 0;
    margin-left: 0;
    margin-right: 0;
}

#contentToExport.withdraw-file-page .withdraw-form-panel-body .employee-data [class*="offset-md-"],
#contentToExport.withdraw-file-page .withdraw-form-panel-body .employee-data [class*="offset-sm-"],
#contentToExport.withdraw-file-page .withdraw-form-panel-body .employee-data [class*="offset-lg-"],
#contentToExport.withdraw-file-page .withdraw-form-panel-body .employee-data [class*="offset-xl-"] {
    margin-left: 0 !important;
}

/* Bootstrap 3: col-*-*-offset (questionsread ulinput / inputcheckbox en retiro) */
#contentToExport.withdraw-file-page .withdraw-form-panel-body [class*="col-md-offset-"],
#contentToExport.withdraw-file-page .withdraw-form-panel-body [class*="col-sm-offset-"],
#contentToExport.withdraw-file-page .withdraw-form-panel-body [class*="col-lg-offset-"] {
    margin-left: 0 !important;
}

/* Encuesta lectura / checkboxes guardianes: mismo body, anchura útil completa del modal */
#contentToExport.withdraw-file-page .withdraw-form-panel-body .col-lg-8,
#contentToExport.withdraw-file-page .withdraw-form-panel-body .col-lg-10,
#contentToExport.withdraw-file-page .withdraw-form-panel-body .col-md-8,
#contentToExport.withdraw-file-page .withdraw-form-panel-body .col-md-9,
#contentToExport.withdraw-file-page .withdraw-form-panel-body .col-md-10,
#contentToExport.withdraw-file-page .withdraw-form-panel-body .col-sm-10 {
    flex: 0 0 100%;
    width: 100% !important;
    max-width: 100%;
}

/* =============================================================================
   BootstrapDialog4 — patrón tipo “Information” (cabecera clara, título granate,
   cuerpo gris suave, bordes redondeados). Aplica solo con clase .fcaq-bd-dialog
   (ver public/js/withdrawstudent/file/index.js → fcaqWithdrawBootstrapDialog).
   ============================================================================= */
.modal.bootstrap-dialog.fcaq-bd-dialog .modal-content {
    border: none;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 0.35rem 1.5rem rgba(18, 12, 40, 0.16);
    background-color: #eef0f6;
}

.modal.bootstrap-dialog.fcaq-bd-dialog .modal-header {
    background: linear-gradient(180deg, #ece8f7 0%, #e2dcf2 100%) !important;
    border-bottom: none !important;
    padding: 1rem 2.75rem 1rem 1.25rem;
    min-height: 3.25rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    position: relative;
    border-radius: 1rem 1rem 0 0;
}

.modal.bootstrap-dialog.fcaq-bd-dialog .bootstrap-dialog-title {
    color: #910b26 !important;
    font-weight: 700;
    font-size: 1.125rem;
    letter-spacing: 0.02em;
    text-align: center;
    width: 100%;
    margin: 0;
    line-height: 1.35;
}

.modal.bootstrap-dialog.fcaq-bd-dialog .bootstrap-dialog-close-button {
    position: absolute;
    right: 0.65rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    float: none !important;
}

.modal.bootstrap-dialog.fcaq-bd-dialog .bootstrap-dialog-close-button .btn-close {
    opacity: 0.55;
}

.modal.bootstrap-dialog.fcaq-bd-dialog .bootstrap-dialog-close-button .btn-close:hover {
    opacity: 0.95;
}

.modal.bootstrap-dialog.fcaq-bd-dialog .modal-body {
    background-color: #f5f6fa;
    padding: 1.35rem 1.5rem 1.5rem;
}

.modal.bootstrap-dialog.fcaq-bd-dialog .bootstrap-dialog-message {
    font-size: 0.95rem;
}

.modal.bootstrap-dialog.fcaq-bd-dialog .modal-footer {
    /* Panel inferior claramente gris (respecto al cuerpo blanco / claro del formulario) */
    background-color: #dee1e8 !important;
    border-top: 1px solid #cfd4de;
    padding: 0.65rem 1.5rem 1.35rem;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
}

.modal.bootstrap-dialog.fcaq-bd-dialog .modal-footer .bootstrap-dialog-footer-buttons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    background-color: transparent;
}

/* Botones tipo píldora: contorno “Cancel” + relleno granate (“Accept” / imprimir PDF) */
.modal.bootstrap-dialog.fcaq-bd-dialog .fcaq-bd-btn {
    border-radius: 50rem;
    padding: 0.55rem 1.85rem;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    min-width: unset;
    min-height: unset;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    line-height: 1.25;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.modal.bootstrap-dialog.fcaq-bd-dialog .fcaq-bd-btn-outline {
    background-color: transparent;
    color: #6b0330 !important;
    border: 2px solid #6b0330;
    box-shadow: none;
}

.modal.bootstrap-dialog.fcaq-bd-dialog .fcaq-bd-btn-outline:hover {
    background-color: rgba(107, 3, 48, 0.07);
    color: #521027 !important;
    border-color: #521027;
}

.modal.bootstrap-dialog.fcaq-bd-dialog .fcaq-bd-btn-solid {
    background-color: #6b0330 !important;
    border: 2px solid #6b0330 !important;
    color: #fff !important;
    box-shadow: none;
}

.modal.bootstrap-dialog.fcaq-bd-dialog .fcaq-bd-btn-solid:hover {
    background-color: #521027 !important;
    border-color: #521027 !important;
    color: #fff !important;
}

.modal.bootstrap-dialog.fcaq-bd-dialog .fcaq-bd-btn-solid .bootstrap-dialog-button-icon,
.modal.bootstrap-dialog.fcaq-bd-dialog .fcaq-bd-btn-solid .fa {
    color: inherit;
}


/* =========================================
   Expediente — celdas del checklist (BS5)
   ========================================= */

/* Input-group dentro de celdas: ✓ pegado al input, redondeo discreto */
.withdraw-file-page .table-withdraw-monitoring td .input-group.np-table-input-group {
    flex-wrap: nowrap;
    width: 100%;
    margin: 0;
}

.withdraw-file-page .table-withdraw-monitoring td .input-group.np-table-input-group .input-group-text {
    background-color: #f3f4f6;
    border-color: #d6d6d6;
    color: #555;
    padding: 0.2rem 0.55rem;
    border-radius: 6px 0 0 6px;
}

.withdraw-file-page .table-withdraw-monitoring td .input-group.np-table-input-group .form-control {
    border-color: #d6d6d6;
    border-radius: 0 6px 6px 0;
    padding: 0.25rem 0.55rem;
    min-height: 1.85rem;
    font-size: 0.85rem;
}

/* Columna Opciones: botones apilados, compactos, todos al mismo ancho */
.withdraw-file-page .table-withdraw-monitoring td .btn-group {
    display: flex;
    width: 100%;
    margin-bottom: 0.3rem;
}

.withdraw-file-page .table-withdraw-monitoring td .btn-group:last-child {
    margin-bottom: 0;
}

.withdraw-file-page .table-withdraw-monitoring td .btn-group > .btn {
    flex: 1 1 auto;
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    white-space: nowrap;
}

/* Botón "Ver" solitario también ocupa todo el ancho de la celda */
.withdraw-file-page .table-withdraw-monitoring td > .btn {
    display: block;
    width: 100%;
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
    border-radius: 4px;
    margin-bottom: 0.3rem;
}


/* Celdas del checklist: alinear contenido arriba para que inputs queden a la misma altura entre filas */
.withdraw-file-page .table-withdraw-monitoring > tbody > tr > td {
    vertical-align: top !important;
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
}

/* Historial bajo inputs/selects */
.withdraw-file-page .table-withdraw-monitoring td .withdraw-checklist-history {
    margin: 0.35rem 0 0;
    padding: 0;
}

.withdraw-file-page .table-withdraw-monitoring td .withdraw-checklist-history li {
    font-size: 0.78rem;
    color: #555;
    line-height: 1.25;
    margin-top: 0.1rem;
}

.withdraw-file-page .table-withdraw-monitoring td .np-table-input-group + .withdraw-checklist-history,
.withdraw-file-page .table-withdraw-monitoring td .np-dep-input-group + .withdraw-checklist-history {
    margin-top: 0.35rem;
}

/* Resaltado de inputs con caracteres no permitidos */
.withdraw-file-page .student-data.is-invalid,
.withdraw-file-page .table-withdraw-monitoring .student-data.is-invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.15rem rgba(220, 53, 69, 0.18);
    background-image: none;
}

.withdraw-file-page .np-table-input-group:has(.student-data.is-invalid) .input-group-text {
    border-color: #dc3545 !important;
    color: #dc3545;
    background-color: #fff5f6;
}
