/* ================================
   CONTENEDOR PRINCIPAL
================================ */
.pqrs-wrapper {
    max-width: 900px;
    margin: 5px auto;
    padding: 35px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.10);
    border: 1px solid #e6e6e6;
    font-family: "Segoe UI", Arial, sans-serif;
}

/* ================================
   TITULO
================================ */
.pqrs-title {
    font-size: 28px;
    font-weight: 800;
    color: #1b3e6f; /* Azul institucional tipo hospital */
    text-align: center;
    margin-bottom: 10px;
}

.pqrs-subtitle-line {
    width: 80px;
    height: 4px;
    background: #3b7bbf;
    margin: 8px auto 25px auto;
    border-radius: 4px;
}

/* ================================
   CARD
================================ */
.pqrs-card {
    width: 100%;
    padding: 90px 30px;
    background: #f9fafc;
    border-radius: 12px;
    border: 1px solid #dfe6f0;
}

/* Subtítulo del card */
.pqrs-card h3 {
    font-size: 22px;
    font-weight: 700;
    color: #234a7d;
    margin-bottom: 20px;
}

/* ================================
   GRID DEL FORMULARIO
================================ */
.pqrs-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px 30px;
}

/* Campo completo */
.pqrs-full {
    grid-column: span 2;
}

.pqrs-form-grid-buttons {
    width: 100%;
    display: flex;
    justify-content: center;   /* Centra horizontalmente */
    align-items: center;        /* Alinea verticalmente */
    gap: 20px;                  /* Espaciado entre botones */
    margin-top: 20px;
}

/* ================================
   LABELS
================================ */
.pqrs-label {
    font-size: 14px;
    font-weight: 600;
    color: #2a2a2a;
    margin-bottom: 6px;
    display: block;
}

/* ================================
   INPUTS / SELECT / TEXTAREA
================================ */
.pqrs-input, 
.pqrs-select, 
.pqrs-textarea {
    width: 100%;
    height: 45px;
    padding: 14px;
    border-radius: 8px;
    border: 1px solid #c7d1dd;
    background: #ffffff;
    font-size: 15px;
    transition: all .25s ease-in-out;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
input[type="text"],
input[type="email"],
input[type="number"],
select {
    width: 100%;
    height: 40px;
    outline: none;
}

/* Focus */
.pqrs-input:focus, 
.pqrs-select:focus, 
.pqrs-textarea:focus {
    border-color: #1f64a6;
    box-shadow: 0 0 6px rgba(31,100,166,0.25);
    outline: none;
}

/* Textarea */
.pqrs-textarea {
    min-height: 160px;
    resize: vertical;
}

/* Select institucional full width */
.pqrs-select {
    width: 100%;
    display: block;
    padding: 14px;
    border-radius: 8px;
    border: 1px solid #c7d1dd;
    background-color: #ffffff;
    font-size: 15px;
    font-family: "Segoe UI", Arial, sans-serif;
    transition: all .25s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    appearance: none; /* Oculta flecha nativa */
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%231f64a6" height="20" viewBox="0 0 24 24" width="20" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 18px;
}

/* Efecto focus */
.pqrs-select:focus {
    border-color: #1f64a6;
    box-shadow: 0 0 6px rgba(31, 100, 166, 0.25);
    outline: none;
}


/* ================================
   BOTÓN
================================ */
.pqrs-btn {
    padding: 14px 28px;
    background: #164d7f;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 15px;
    transition: 0.3s ease;
    align-self: flex-end;
}

.pqrs-btn-consulta{
    padding: 14px 28px;
    background: #164d7f;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 15px;
    transition: 0.3s ease;
}
.pqrs-btn-volver{
    padding: 14px 28px;
    background: #dc2727;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 15px;
    transition: 0.3s ease;
}

.pqrs-btn:hover {
    background: #38408d;
}
.pqrs-btn-consulta:hover {
    background: #38408d;
}
.pqrs-btn-volver:hover {
    background: #a81f1f;
}

/* ================================
   RESPONSIVE
================================ */
@media (max-width: 768px) {

    .pqrs-wrapper {
        padding: 25px;
    }

    .pqrs-form-grid {
        grid-template-columns: 1fr;
    }

    .pqrs-full {
        grid-column: span 1;
    }
}

/* ================================
   ESTILOS ADICIONALES MODAL
================================ */
/* Contenedor del modal */
.modal-pqrs {
    display: none;
    position: fixed;
    z-index: 9999;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.55);
    padding: 20px;
    box-sizing: border-box;
}

.modal-pqrs.open {
    display: flex !important;
    justify-content: center;
    align-items: center;
}

.modal-content-pqrs {
    background: #fff;
    width: 830px;
    max-width: 95%;
    padding: 28px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.22);
    position: relative;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 22px;
    cursor: pointer;
}

#resultadoConsulta {
    margin-top: 12px;
    padding: 12px;
    border-radius: 10px;
    display: none;
    font-size: 14px;
}

#resultadoConsulta.ok {
    display: block;
    background: #e9fbf0;
    color: #05632d;
    margin-top: 100px;

}

#resultadoConsulta.error {
    display: block;
    background: #ffe7e7;
    color: #a30000;
}

.pqrs-btn {
    background: #0a6ece;
    color: #fff;
    border: none;
    padding: 12px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    width: 100%;
}

.pqrs-btn-consulta {
    background: #005b96;
    color: #fff;
    padding: 12px 16px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    width: 100%;
}

.pqrs-form-grid-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 25px;
}

.resultado-consulta {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-top: 10px;
    font-family: "Segoe UI", Arial, sans-serif;
    color: #333;
    line-height: 1.5;
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.05);
}

.resultado-consulta .titulo {
    font-size: 18px;
    font-weight: bold;
    color: #0d6efd;
    margin-bottom: 10px;
}

.resultado-consulta .campo {
    margin-bottom: 8px;
}

.resultado-consulta .campo span {
    font-weight: bold;
    color: #555;
}

.resultado-error {
    background: #ffe2e2;
    padding: 15px;
    color: #a10000;
    border-left: 5px solid #ff4d4d;
    border-radius: 8px;
    margin-top: 10px;
}

/* Contenedor principal */
.pqrs-wrapper-consulta {
    max-width: 800px;
    margin: 40px auto;
    background: #fff;
    padding: 35px;
    border-radius: 14px;
    box-shadow: 0 6px 25px rgba(0,0,0,0.12);
    height: 660px;
}

/* Tarjeta de resultados */
.pqrs-card-consulta {
    padding: 22px 28px;
    background: #f8fbff;
    border-radius: 12px;
    border: 1px solid #dce6f5;
    margin-bottom: 25px;
    font-size: 16px;
    color: #263043;
}

/* TAG de estado */
.estado-tag {
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 14px;
    display: inline-block;
    margin-left: 5px;
}

/* Estado PENDIENTE → ROJO */
.estado-rojo {
    background: #ffe3e3;
    color: #b30000;
    border: 1px solid #ffb3b3;
}

/* Estado EN PROCESO → AMARILLO / NARANJA */
.estado-amarillo {
    background: #fff8db;
    color: #9a6b00;
    border: 1px solid #f5d78a;
}

/* Estado TERMINADO → VERDE */
.estado-verde {
    background: #e1f7e8;
    color: #0f6c32;
    border: 1px solid #9ee6b6;
}

/* Estado desconocido o no mapeado */
.estado-gris {
    background: #e8e8ec;
    color: #4d4d4d;
    border: 1px solid #cfcfd4;
}

/* Título */
.pqrs-wrapper-consulta h2 {
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #0d6efd;
}

/* Campo de entrada */
.pqrs-wrapper-consulta input[type="text"],
.pqrs-wrapper-consulta input[type="number"] {
    width: 100%;
    padding: 12px 14px;
    margin-bottom: 18px;
    border: 1px solid #d4dbe4;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.pqrs-wrapper-consulta input:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 6px rgba(13, 110, 253, 0.4);
    outline: none;
}

/* Botón */
.pqrs-wrapper-consulta button {
    width: 100%;
    padding: 12px;
    font-size: 17px;
    font-weight: 600;
    background: #dc2727;
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.25s ease;
}

.pqrs-wrapper-consulta button:hover {
    background: #b71d1d;
}

/* Resultado de la consulta */
.resultado-consulta {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin-top: 25px;
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.08);
}

.resultado-consulta .titulo {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 12px;
    color: #0d6efd;
}

/* Campos */
.resultado-consulta .campo {
    font-size: 15px;
    margin-bottom: 10px;
}

.resultado-consulta .campo span {
    font-weight: 600;
    color: #444;
}

/* Panel de error */
.resultado-error {
    margin-top: 20px;
    background: #ffe1e1;
    padding: 15px 18px;
    border-radius: 10px;
    color: #a80000;
    border-left: 6px solid #ff4d4d;
    font-size: 15px;
    line-height: 1.5;
}



