/* ============================================================
   FORMULARIO PARDONFLOW - ESTILO UNIFICADO (ESTÁNDAR)
   ============================================================ */

:root {
    --pais-primary: #007bff; /* Azul por defecto, el PHP lo sobrescribirá */
    --pais-secondary: #D4AF37;
    
    --gris: #f5f5f5;
    --borde: #dcdcdc;
    --texto: #333;
    --radius: 6px;
    --font: "Poppins", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font);
    background: #f0f2f5;
    margin: 0;
    padding: 0;
    color: var(--texto);
}

.container {
    width: 95%;
    max-width: 1100px;
    margin: 20px auto;
    padding-bottom: 40px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* ============================================================
   HEADER (Estándar 3 Columnas)
   ============================================================ */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    color: #fff;
    background: var(--pais-primary);
    flex-wrap: wrap;
    gap: 15px;
}

.header-left { flex: 0 0 auto; display: flex; align-items: center; }
.header-center { flex: 1 1 auto; text-align: center; min-width: 200px; }
.header-center h1 { margin: 0; font-size: 24px; font-weight: 700; line-height: 1.2; }
.header-center .small { font-size: 13px; opacity: 0.9; margin-top: 4px; display: block; }
.header-right { flex: 0 0 auto; display: flex; justify-content: flex-end; }

/* ============================================================
   FORMULARIO GRID
   ============================================================ */
.form-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
    padding: 30px;
}

.col-1 { grid-column: span 1; } .col-2 { grid-column: span 2; }
.col-3 { grid-column: span 3; } .col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; } .col-6 { grid-column: span 6; }
.col-12 { grid-column: span 12; }

/* CAMPOS */
.field { display: flex; flex-direction: column; gap: 5px; }
.label { font-size: 13px; font-weight: 600; color: var(--texto); }
.label.required::after { content: ' *'; color: #E53935; }

.input {
    width: 100%; padding: 10px 12px; border: 1px solid var(--borde);
    border-radius: 6px; font-size: 14px; font-family: var(--font);
    background: #fafafa; transition: all 0.2s; box-sizing: border-box;
}
.input:focus { outline: none; border-color: var(--pais-primary); background: #fff; box-shadow: 0 0 0 3px rgba(0,0,0,0.05); }
.input::placeholder { color: #999; }

select.input {
    cursor: pointer; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px;
}

/* NOTICE */
.notice-box {
    background: var(--pais-primary);
    color: white; padding: 14px 18px; border-radius: 6px;
    display: flex; align-items: center; gap: 10px; font-size: 14px;
}

/* ACTIONS */
.actions-bar { display: flex; justify-content: flex-end; gap: 15px; margin-top: 20px; padding-top: 20px; border-top: 1px solid #eee; }

.btn-main {
    display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px;
    background: var(--pais-primary); color: white; border: none;
    border-radius: 6px; font-size: 15px; font-weight: 600; cursor: pointer;
    transition: all 0.2s;
}
.btn-main:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.btn-main:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* MESSAGE */
.form-message { padding: 12px; border-radius: 6px; font-size: 14px; display: none; align-items: center; gap: 8px; }
.form-message.success { display: flex; background: #E8F5E9; color: #2E7D32; border: 1px solid #A5D6A7; }
.form-message.error { display: flex; background: #FFEBEE; color: #C62828; border: 1px solid #EF9A9A; }

/* SPINNER */
.spinner { width: 18px; height: 18px; border: 3px solid rgba(255,255,255,0.3); border-radius: 50%; border-top-color: white; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   ESTILOS DEL MODAL (ESTÁNDAR)
   ============================================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay[style*="display: flex"] {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay[style*="display: flex"] .modal-content {
    transform: scale(1);
}

.modal-header {
    padding: 15px 20px;
    background: var(--pais-primary);
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 { margin: 0; font-size: 18px; }
.btn-close-modal { background: none; border: none; color: #fff; font-size: 24px; cursor: pointer; }

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 15px 20px;
    background: #f9f9f9;
    text-align: right;
    border-top: 1px solid #eee;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .form-grid { grid-template-columns: repeat(6, 1fr); padding: 15px; gap: 15px; }
    .col-1, .col-2, .col-3, .col-4, .col-5, .col-6 { grid-column: span 6; }
    .col-12 { grid-column: span 6; }
    
    .header { flex-direction: column; text-align: center; padding: 15px; }
    .header-left, .header-right { width: 100%; justify-content: center; }
    .header-center { order: 3; margin-top: 10px; }
}