/* =============================================
   EXTERNO - Estilos Específicos
   Vistas de CSI/TurnosBundle/Resources/views/Externo
   Complementa a tramite-previsional.css
   ============================================= */

/* ===================
   1. VERIFICAR MAIL (Icono destacado)
   =================== */
.info-card h4 {
    color: #0c6ddf;
    margin-bottom: 25px;
    margin-top: 0;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}
.info-card h4 i {
    font-size: 3rem;
    background: #e3f2fd;
    color: #1565c0;
    padding: 15px;
    border-radius: 50%;
}

/* ===================
   2. MIS SOLICITUDES (Tabla Cards & DataTables)
   =================== */
.wrapper-solicitudes {
    width: 95%;
    max-width: 1200px;
    margin: 20px auto 30px auto;
}
.titulo-solicitudes {
    color: #0c6ddf;
    font-weight: bold;
    margin-bottom: 20px;
}
.search-box {
    background: white;
    padding: 10px 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    border: 1px solid #e0e0e0;
}
.dataTables_wrapper .dataTables_filter { display: none; }
.dataTables_wrapper .dataTables_length select {
    display: inline-block;
    width: auto;
    height: 35px;
    padding: 0 10px;
    border-radius: 6px;
}

/* Tabla Custom Cards */
.table-custom-cards {
    border-collapse: separate !important;
    border-spacing: 0 15px !important;
    width: 100% !important;
    margin-top: -10px !important;
}
.table-custom-cards thead tr { background-color: transparent !important; }
.table-custom-cards thead th {
    border: none !important;
    color: #555 !important;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 10px 15px !important;
    border-bottom: 2px solid #0c6ddf !important;
    text-align: left;
}
.table-custom-cards.collapsed thead th:first-child { padding-left: 45px !important; }
.table-custom-cards thead th.center-align { text-align: center !important; }

.table-custom-cards tbody tr { background-color: #fff; }
.table-custom-cards tbody tr:hover td { background-color: #fcfcfc !important; }

.table-custom-cards tbody td {
    border-top: 1px solid #e0e0e0 !important;
    border-bottom: 1px solid #e0e0e0 !important;
    padding: 18px 15px !important;
    vertical-align: middle !important;
    text-align: left;
    font-size: 0.95rem;
}
.table-custom-cards tbody td.center-align { text-align: center !important; }

.table-custom-cards tbody td:first-child {
    border-top-left-radius: 8px !important;
    border-bottom-left-radius: 8px !important;
}
.table-custom-cards tbody td:last-child {
    border-right: 1px solid #e0e0e0 !important;
    border-top-right-radius: 8px !important;
    border-bottom-right-radius: 8px !important;
}

/* Colores por estado */
.table-custom-cards tbody tr.fila-nuevo,
.table-custom-cards tbody tr.fila-nuevo td {
    background-color: #f1f8e9 !important;
    border-color: #c8e6c9 !important;
}

/* Bordes laterales por modalidad */
.table-custom-cards tbody tr.border-espontaneo td:first-child { border-left: 6px solid #2196f3 !important; }
.table-custom-cards tbody tr.border-virtual td:first-child { border-left: 6px solid #fbc02d !important; }
.table-custom-cards tbody tr.border-personal td:first-child { border-left: 6px solid #ff9800 !important; }

/* Botón (+) Expandir */
.table-custom-cards.dataTable.dtr-inline.collapsed > tbody > tr:not(.child) > td:first-child {
    padding-left: 45px !important;
    position: relative;
}
.table-custom-cards.dataTable.dtr-inline.collapsed > tbody > tr:not(.child) > td:first-child::before {
    left: 15px !important;
    top: 28px !important;
    transform: translateY(-50%) !important;
    background-color: #26c6da !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2) !important;
    border: none !important;
    height: 20px !important;
    width: 20px !important;
    line-height: 22px !important;
}
.table-custom-cards.dataTable.dtr-inline.collapsed > tbody > tr.parent > td:first-child::before {
    background-color: #f44336 !important;
}

/* Fila Expandida (Child Card) */
.table-custom-cards tbody tr.parent td { border-bottom: none !important; }
.table-custom-cards tbody tr.parent td:first-child { border-bottom-left-radius: 0 !important; }
.table-custom-cards tbody tr.parent td:last-child { border-bottom-right-radius: 0 !important; }

.table-custom-cards tbody tr.child > td.child {
    display: table-cell !important;
    position: relative !important;
    top: -15px !important;
    background-color: #ffffff !important;
    border-radius: 0 0 8px 8px !important;
    border-bottom: 1px solid #e0e0e0 !important;
    border-right: 1px solid #e0e0e0 !important;
    border-top: 1px dashed rgba(0,0,0,0.08) !important;
    padding: 15px 25px 20px 45px !important;
    box-shadow: 0 8px 15px rgba(0,0,0,0.08) !important;
    z-index: 2 !important;
}
.table-custom-cards tbody tr.fila-nuevo + tr.child > td.child {
    background-color: #f1f8e9 !important;
    border-right-color: #c8e6c9 !important;
    border-bottom-color: #c8e6c9 !important;
}
.table-custom-cards tbody tr.border-espontaneo + tr.child > td.child { border-left: 6px solid #2196f3 !important; }
.table-custom-cards tbody tr.border-virtual + tr.child > td.child { border-left: 6px solid #fbc02d !important; }
.table-custom-cards tbody tr.border-personal + tr.child > td.child { border-left: 6px solid #ff9800 !important; }

.table-custom-cards tbody tr.child ul.dtr-details {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}
.table-custom-cards tbody tr.child ul.dtr-details li {
    border-bottom: 1px solid rgba(0,0,0,0.04);
    padding: 10px 0;
    display: flex !important;
    flex-direction: row;
    align-items: center;
}
.table-custom-cards tbody tr.child ul.dtr-details li:last-child { border-bottom: none; padding-bottom: 0; }
.table-custom-cards tbody tr.child span.dtr-title {
    font-weight: 700;
    color: #555;
    width: 140px;
    flex-shrink: 0;
    margin: 0;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.table-custom-cards tbody tr.child span.dtr-data {
    flex-grow: 1;
    color: #222;
    font-weight: 500;
    font-size: 0.95rem;
    text-align: left;
}

/* Badges de modalidad */
.badge-tipo {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 800;
    margin-top: 6px;
    letter-spacing: 0.5px;
}
.badge-tipo i { font-size: 1rem; margin-right: 4px; }
.badge-espontaneo { background-color: #e3f2fd; color: #1565c0; border: 1px solid #bbdefb; }
.badge-personal { background-color: #fff3e0; color: #e65100; border: 1px solid #ffe0b2; }
.badge-virtual { background-color: #fff9c4; color: #f57f17; border: 1px solid #fff59d; }

/* Botones de acción en tabla */
.contenedor-acciones {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: center;
}
.btn-accion-tabla {
    margin: 0 !important;
    border-radius: 6px;
    padding: 8px 16px !important;
    font-size: 0.85rem;
    font-weight: 600;
    height: auto !important;
    line-height: 1.3 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: normal !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}
.btn-accion-tabla:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}
.btn-accion-tabla i.left { margin-right: 6px !important; font-size: 1.2rem !important; }

/* Responsive móvil */
@media (max-width: 600px) {
    .table-custom-cards tbody tr.child ul.dtr-details li {
        flex-direction: column;
        align-items: flex-start;
        padding: 12px 0;
    }
    .table-custom-cards tbody tr.child span.dtr-title { width: 100%; margin-bottom: 4px; }
    .contenedor-acciones { flex-direction: column; align-items: flex-end; }
    .btn-accion-tabla { width: 100%; max-width: 250px; }
}

/* ===================
   3. LOGIN EXTERNO (loginExterno)
   =================== */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px auto;
    padding: 0 15px;
}

.login-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 40px 30px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    max-width: 550px;
    width: 100%;
    text-align: center;
    border: 1px solid #e0e0e0;
    border-top: 6px solid #00acc1;
}

.login-header-icon {
    font-size: 3.8rem;
    color: #00acc1;
    margin-bottom: 10px;
}

.login-titulo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0c6ddf;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.login-subtitulo {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 25px;
}

.btn-sso {
    width: 100%;
    min-height: 50px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.05rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: 0.5px;
    text-transform: none;
    box-shadow: 0 4px 12px rgba(0, 172, 193, 0.3);
    transition: all 0.2s ease-in-out;
}

.btn-sso:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 172, 193, 0.4);
}

.btn-volver-login {
    width: 100%;
    min-height: 44px;
    border-radius: 8px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-transform: none;
    margin-top: 12px;
}

.acceso-restringido-box {
    background-color: #e3f2fd;
    border-left: 4px solid #1976d2;
    color: #0d47a1;
    padding: 14px 18px;
    border-radius: 8px;
    margin-top: 25px;
    text-align: left;
    font-size: 0.9rem;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.acceso-restringido-box i {
    font-size: 1.3rem;
    flex-shrink: 0;
    margin-top: 1px;
}

