/* ============================================
   REPORTES.CSS — Estilos para la sección de reportes
   Optimizado para verse bien al 100% de zoom en desktop
   y completamente responsive en tablet y móvil.
   ============================================ */

/* ===== HERO DE REPORTES (banner compacto) ===== */
.reportes-hero {
    height: auto;
    min-height: 0;
    padding: 5.5rem 1rem 1.4rem;   /* arriba: deja espacio al navbar fijo */
    background: linear-gradient(135deg, rgba(29, 29, 27, 0.85), rgba(185, 26, 26, 0.75)),
                url('../IMG/PRUEBA.jpeg') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
}

.reportes-hero .hero-content {
    width: 100%;
    max-width: 900px;
}

.reportes-hero h1 {
    color: var(--white);
    font-size: clamp(1.05rem, 2.2vw, 1.55rem);
    font-weight: 900;
    letter-spacing: 0.4px;
    margin: 0;
    line-height: 1.2;
}

.reportes-hero .subtagline {
    font-size: clamp(0.62rem, 1vw, 0.78rem);
    font-weight: 400;
    letter-spacing: 1.8px;
    margin-top: 0.4rem;
    opacity: 0.9;
}

/* ===== CONTENEDOR PRINCIPAL ===== */
.reportes-section {
    background-color: var(--light-alt);
    padding: 3rem 0;
}

.reportes-container {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 1.8rem;
    align-items: start;
    width: 92%;
    max-width: 1150px;
    margin: 0 auto;
    padding: 0;
}

/* ===== CAJA DE POLÍTICAS ===== */
.politicas-box {
    background: var(--white);
    border-radius: 10px;
    padding: 1.6rem 1.8rem;
    box-shadow: var(--shadow-medium);
    border-top: 4px solid var(--cornell-red);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.politicas-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}

.politicas-box h2 {
    color: var(--eerie-black);
    font-size: clamp(1.2rem, 1.8vw, 1.45rem);
    margin: 0 0 0.6rem 0;
    border-bottom: 2px solid var(--cornell-red);
    padding-bottom: 0.4rem;
    display: inline-block;
    line-height: 1.2;
}

.politicas-intro {
    color: var(--principal-gray);
    font-size: 0.85rem;
    margin: 0 0 1rem 0;
    line-height: 1.5;
}

.politicas-list {
    padding-left: 1.1rem;
    margin: 0;
}

.politicas-list li {
    margin-bottom: 0.7rem;
    line-height: 1.5;
    color: var(--eerie-black);
    font-size: 0.85rem;
}

.politicas-list li strong {
    color: var(--cornell-red);
}

.politicas-list li em {
    color: var(--dark-primary);
    font-style: normal;
    font-weight: 700;
}

.politicas-footer {
    margin-top: 1.2rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--bglight);
    font-size: 0.82rem;
    color: var(--principal-gray);
    line-height: 1.5;
}

.politicas-footer strong {
    color: var(--cornell-red);
}

/* ===== CAJA DE ACCIONES ===== */
.acciones-box {
    background: var(--white);
    border-radius: 10px;
    padding: 1.6rem 1.8rem;
    box-shadow: var(--shadow-medium);
    border-top: 4px solid var(--dark-primary);
    position: sticky;
    top: 100px;
}

.acciones-box h2 {
    color: var(--eerie-black);
    font-size: clamp(1.2rem, 1.8vw, 1.45rem);
    margin: 0 0 0.6rem 0;
    border-bottom: 2px solid var(--dark-primary);
    padding-bottom: 0.4rem;
    display: inline-block;
    line-height: 1.2;
}

.acciones-intro {
    color: var(--principal-gray);
    font-size: 0.85rem;
    margin: 0 0 1.2rem 0;
    line-height: 1.5;
}

.acciones-botones {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.btn-accion {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 1rem 1.1rem;
    background: var(--white);
    border: 2px solid var(--bglight);
    border-radius: 9px;
    cursor: pointer;
    text-align: left;
    transition: all 0.25s ease;
    font-family: var(--font-body);
    width: 100%;
}

.btn-accion:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 14px rgba(0,0,0,0.12);
}

.btn-consultar:hover {
    border-color: var(--dark-primary);
    background: linear-gradient(135deg, var(--white), #f0f5fa);
}

.btn-crear:hover {
    border-color: var(--cornell-red);
    background: linear-gradient(135deg, var(--white), #fdf2f2);
}

.btn-icono {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
}

.btn-consultar .btn-icono { background: var(--dark-primary); }
.btn-crear     .btn-icono { background: var(--cornell-red); }

.btn-icono svg {
    width: 22px;
    height: 22px;
}

.btn-texto h3 {
    margin: 0 0 0.15rem 0;
    color: var(--eerie-black);
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.2;
}

.btn-texto p {
    margin: 0;
    color: var(--principal-gray);
    font-size: 0.78rem;
    line-height: 1.4;
}

/* ===== MODALES ===== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.65);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    overflow-y: auto;
    animation: fadeIn 0.25s ease;
}

.modal-overlay.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.modal-content {
    background: var(--white);
    border-radius: 10px;
    padding: 1.6rem 1.7rem;
    width: 100%;
    max-width: 440px;
    position: relative;
    box-shadow: 0 10px 36px rgba(0,0,0,0.3);
    animation: slideUp 0.3s ease;
    max-height: 92vh;
    overflow-y: auto;
}

.modal-large {
    max-width: 640px;
}

@keyframes slideUp {
    from { transform: translateY(25px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

.modal-close {
    position: absolute;
    top: 8px;
    right: 14px;
    background: none;
    border: none;
    font-size: 1.7rem;
    color: var(--principal-gray);
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
    padding: 4px 8px;
    z-index: 5;
}

.modal-close:hover {
    color: var(--cornell-red);
}

.modal-content h2 {
    color: var(--eerie-black);
    margin: 0 0 0.4rem 0;
    font-size: 1.25rem;
    line-height: 1.2;
}

.modal-content > p {
    color: var(--principal-gray);
    margin: 0 0 1.1rem 0;
    font-size: 0.85rem;
    line-height: 1.5;
}

/* ===== FORMULARIOS DENTRO DE MODALES ===== */
.modal-content form {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.modal-content label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--eerie-black);
    margin-bottom: 0.3rem;
}

.modal-content input,
.modal-content select,
.modal-content textarea {
    padding: 0.55rem 0.75rem;
    border: 1.5px solid var(--bglight);
    border-radius: 7px;
    font-family: var(--font-body);
    font-size: 0.88rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: var(--white);
    color: var(--eerie-black);
    width: 100%;
    box-sizing: border-box;
}

.modal-content input:focus,
.modal-content select:focus,
.modal-content textarea:focus {
    outline: none;
    border-color: var(--cornell-red);
    box-shadow: 0 0 0 3px rgba(185, 26, 26, 0.12);
}

.modal-content textarea {
    resize: vertical;
    min-height: 85px;
    font-family: var(--font-body);
}

.campo-hint {
    margin: 0 0 0.5rem 0 !important;
    font-size: 0.78rem !important;
    color: var(--principal-gray) !important;
    line-height: 1.45;
    font-style: italic;
}

.campo-hint strong {
    color: var(--cornell-red);
    font-style: normal;
}

/* Contador de caracteres del textarea */
.contador-caracteres {
    display: block;
    text-align: right;
    font-size: 0.74rem;
    color: var(--principal-gray);
    margin-top: 0.25rem;
    font-family: monospace;
    transition: color 0.2s ease;
}

.contador-caracteres.advertencia {
    color: #d97706;
    font-weight: 600;
}

.contador-caracteres.limite {
    color: var(--cornell-red);
    font-weight: 700;
}

.btn-submit {
    margin-top: 0.4rem;
    padding: 0.75rem 1.4rem;
    background: var(--cornell-red);
    color: var(--white);
    border: none;
    border-radius: 7px;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.15s ease;
    letter-spacing: 0.3px;
}

.btn-submit:hover {
    background: #9a1515;
    transform: translateY(-1px);
}

.btn-submit:disabled {
    background: var(--principal-gray);
    cursor: not-allowed;
    transform: none;
}

/* ============================================
   ZONA DE EVIDENCIAS (subida de fotos)
   ============================================ */
.evidencias-zone {
    border: 2px dashed var(--bglight);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.25s ease, background-color 0.25s ease;
    background: #fafafa;
}

.evidencias-zone:hover,
.evidencias-zone.dragover {
    border-color: var(--cornell-red);
    background: #fff5f5;
}

.evidencias-zone.disabled {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}

.evidencias-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    color: var(--principal-gray);
}

.evidencias-placeholder svg {
    color: var(--cornell-red);
    opacity: 0.7;
}

.evidencias-placeholder p {
    margin: 0;
    font-size: 0.88rem;
    color: var(--eerie-black);
}

.evidencias-placeholder p strong {
    color: var(--cornell-red);
}

.evidencias-info {
    font-size: 0.74rem;
    color: var(--principal-gray);
}

/* Grid de previews */
.evidencias-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.7rem;
    margin-top: 0.7rem;
}

.evidencias-grid:empty {
    display: none;
}

.evidencia-item {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 7px;
    overflow: hidden;
    border: 1.5px solid var(--bglight);
    background: #f4f4f4;
    animation: fadeIn 0.25s ease;
}

.evidencia-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.evidencia-eliminar {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.7);
    color: var(--white);
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: bold;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    padding: 0;
}

.evidencia-eliminar:hover {
    background: var(--cornell-red);
}

.evidencia-peso {
    position: absolute;
    bottom: 4px;
    left: 4px;
    background: rgba(0, 0, 0, 0.65);
    color: var(--white);
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
}

/* ===== Video opcional ===== */
.video-zone {
    margin-top: 0.3rem;
}

.video-preview {
    margin-top: 0.7rem;
    border: 1.5px solid var(--bglight);
    border-radius: 7px;
    overflow: hidden;
    background: #000;
    animation: fadeIn 0.25s ease;
}

.video-preview video {
    width: 100%;
    max-height: 280px;
    display: block;
    background: #000;
}

.video-preview .video-info {
    background: #f4f4f4;
    color: var(--eerie-black);
    padding: 0.5rem 0.7rem;
    font-size: 0.78rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-family: monospace;
}

.video-preview .evidencia-eliminar {
    position: static;
    width: 26px;
    height: 26px;
    flex-shrink: 0;
}

/* ============================================
   reCAPTCHA — Contenedor responsive
   ============================================ */
.recaptcha-container {
    margin: 0.3rem 0;
    display: flex;
    justify-content: center;
}

/* En pantallas chicas escalamos el captcha */
@media (max-width: 360px) {
    .recaptcha-container {
        transform: scale(0.85);
        transform-origin: center top;
    }
}

/* ===== LOADER ===== */
.loader {
    display: none;
    width: 30px;
    height: 30px;
    border: 3.5px solid var(--bglight);
    border-top-color: var(--cornell-red);
    border-radius: 50%;
    margin: 1rem auto 0.4rem;
    animation: spin 0.9s linear infinite;
}

.loader.show {
    display: block;
}

.loader-text {
    display: none;
    text-align: center;
    font-size: 0.82rem;
    color: var(--principal-gray);
    margin-top: 0.3rem;
    font-style: italic;
}

.loader-text.show {
    display: block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== RESULTADOS ===== */
.resultado-consulta,
.resultado-creacion {
    margin-top: 1.2rem;
    padding: 1rem 1.1rem;
    border-radius: 7px;
    display: none;
    font-size: 0.88rem;
    line-height: 1.5;
}

.resultado-consulta.show,
.resultado-creacion.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

.resultado-consulta.success,
.resultado-creacion.success {
    background: #e8f5e9;
    border-left: 4px solid #2e7d32;
    color: #1b5e20;
}

.resultado-consulta.error,
.resultado-creacion.error {
    background: #ffebee;
    border-left: 4px solid #c62828;
    color: #b71c1c;
}

.resultado-consulta h4,
.resultado-creacion h4 {
    margin: 0 0 0.4rem 0;
    font-size: 0.98rem;
}

.resultado-consulta p,
.resultado-creacion p {
    margin: 0.3rem 0;
}

.resultado-consulta .ticket-numero,
.resultado-creacion .ticket-numero {
    display: inline-block;
    background: var(--white);
    padding: 0.35rem 0.8rem;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: var(--cornell-red);
    font-size: 1rem;
    border: 1px dashed var(--cornell-red);
    margin: 0.4rem 0;
    letter-spacing: 0.5px;
}

.resultado-consulta .estatus-tag {
    display: inline-block;
    padding: 0.25rem 0.7rem;
    border-radius: 18px;
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.estatus-tag.pendiente   { background: #fff3cd; color: #856404; }
.estatus-tag.en-proceso  { background: #cce5ff; color: #004085; }
.estatus-tag.resuelto    { background: #d4edda; color: #155724; }
.estatus-tag.cerrado     { background: #d6d8db; color: #383d41; }
.estatus-tag.rechazado   { background: #f8d7da; color: #721c24; }

/* ===== Bloque de RESPUESTA del admin ===== */
.respuesta-box {
    background: #eaf3ff;
    border-left: 4px solid #1565c0;
    padding: 0.75rem 0.95rem;
    border-radius: 6px;
    margin-top: 0.3rem;
    font-size: 0.88rem;
    line-height: 1.55;
    color: #0d3a72;
    white-space: pre-wrap;
    word-break: break-word;
}

.sin-respuesta {
    margin-top: 0.9rem !important;
    padding: 0.55rem 0.8rem;
    background: #fff8e1;
    border-left: 3px solid #f9a825;
    border-radius: 5px;
    color: #6d4c00 !important;
    font-size: 0.83rem !important;
}

/* ============================================
   RESPONSIVE — breakpoints más finos
   ============================================ */
@media (max-width: 1024px) {
    .reportes-container { gap: 1.4rem; }
    .politicas-box,
    .acciones-box { padding: 1.4rem 1.5rem; }
}

@media (max-width: 860px) {
    .reportes-container {
        grid-template-columns: 1fr;
        gap: 1.4rem;
    }
    .acciones-box { position: static; }
    .reportes-section { padding: 2.2rem 0; }
    .reportes-hero {
        padding: 5rem 1rem 1.2rem;
        min-height: 0;
    }
}

@media (max-width: 600px) {
    .reportes-hero {
        padding: 4.5rem 1rem 1rem;
        min-height: 0;
    }
    .reportes-section { padding: 1.8rem 0; }
    .reportes-container {
        width: 94%;
        gap: 1.2rem;
    }
    .politicas-box,
    .acciones-box { padding: 1.2rem 1.2rem; }
    .politicas-list { padding-left: 1rem; }
    .politicas-list li {
        font-size: 0.82rem;
        margin-bottom: 0.6rem;
    }
    .btn-accion {
        gap: 0.8rem;
        padding: 0.85rem 0.95rem;
    }
    .btn-icono { width: 40px; height: 40px; }
    .btn-icono svg { width: 20px; height: 20px; }
    .btn-texto h3 { font-size: 0.92rem; }
    .btn-texto p { font-size: 0.74rem; }
    .modal-content { padding: 1.3rem 1.2rem; }
    .modal-content h2 { font-size: 1.1rem; }
    .form-row {
        grid-template-columns: 1fr;
        gap: 0.7rem;
    }
}

@media (max-width: 380px) {
    .reportes-hero h1 { font-size: 1rem; }
    .reportes-hero .subtagline {
        font-size: 0.6rem;
        letter-spacing: 1.2px;
    }
    .politicas-box,
    .acciones-box { padding: 1rem; }
    .btn-accion {
        flex-direction: column;
        text-align: center;
        gap: 0.6rem;
        padding: 1rem 0.8rem;
    }
    .btn-texto h3 { font-size: 0.95rem; }
    .modal-content { padding: 1.1rem 1rem; }
}
