/* Estilos base para el formulario paso 2 */
.meag-form {
    max-width: 1200px;
    margin: 40px auto;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

.meag-form--step-2 {
    background: #fff;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.meag-form-footer {
    display: flex;
    gap: 14px;
    margin-top: 30px;
    justify-content: flex-end;
}

/* =========================
   STEPS
========================= */

.meag-steps {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
}

.meag-step {
    display: flex;
    align-items: center;
}

.meag-step-circle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid #0051a8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #0051a8;
    background: #fff;
    font-size: 15px;
}

.meag-step--active .meag-step-circle {
    background: #0051a8;
    color: #fff;
}

.meag-step-line {
    width: 80px;
    height: 2px;
    background: #cbd5e1;
    margin: 0 8px;
}

/* =========================
   TITULO
========================= */

.meag-form-title {
    text-align: center;
    font-size: 28px;
    font-weight: 600;
    margin: 10px 0 40px;
    color: #0f172a;
}

/* =========================
   SECCIONES
========================= */

.meag-section {
    background: #eef5ff;
    padding: 30px;
    border-radius: 14px;
    margin-bottom: 30px;
}

.meag-section h3 {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 600;
    color: #0f172a;
}

.meag-section h4 {
    margin: 28px 0 10px;
    font-size: 16px;
    font-weight: 600;
    color: #334155;
}

.meag-help {
    font-size: 14px;
    color: #475569;
    margin-bottom: 24px;
}

/* =========================
   GRID / COLUMNAS
========================= */

.meag-columns {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 30px;
}

.meag-field-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

/* =========================
   CAMPOS
========================= */

.meag-field {
    margin-bottom: 18px;
}

.meag-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
}

.meag-field input[type="text"],
.meag-field input[type="date"],
.meag-field input[type="number"],
.meag-field select {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    font-size: 14px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    box-sizing: border-box !important;
    transition: all 0.2s ease;
}

/* Selector de Archivos Personalizado */
.meag-field input[type="file"] {
    width: 100%;
    height: 42px;
    padding: 0;
    font-size: 14px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    box-sizing: border-box !important;
    transition: all 0.2s ease;
    cursor: pointer;
    line-height: 40px;
}

.meag-field input[type="file"]::-webkit-file-upload-button,
.meag-field input[type="file"]::file-selector-button {
    background: #0051a8;
    color: #ffffff;
    border: none;
    height: 100%;
    padding: 0 16px;
    margin-right: 15px;
    border-radius: 5px 0 0 5px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: background 0.2s;
}

.meag-field input[type="file"]::-webkit-file-upload-button:hover,
.meag-field input[type="file"]::file-selector-button:hover {
    background: #003d7e;
}

.meag-field--action {
    display: flex;
    align-items: flex-end;
}

.meag-field--action button {
    width: auto;
    padding: 10px 18px;
    white-space: nowrap;
}

.meag-field input:focus,
.meag-field select:focus {
    outline: none;
    border-color: #0051a8;
    box-shadow: 0 0 0 3px rgba(0, 81, 168, 0.15);
}

/* =========================
   CHECKBOX
========================= */

.meag-checkbox-group label {
    font-weight: 500;
    font-size: 14px;
    margin-right: 16px;
    color: #334155;
}

.meag-checkbox-group input {
    margin-right: 6px;
}

/* =========================
   SELECT + TAGS (REGIONES / COMUNAS)
========================= */

.meag-select-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.meag-field--select-small select {
    width: 260px;
    max-width: 100%;
}

.meag-field--select-small {
    max-width: 280px;
}

.meag-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Chips */

.meag-tag {
    background: #e8f1ff;
    border: 1px solid #2f6fdf;
    color: #2f6fdf;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.meag-tag span {
    cursor: pointer;
    font-weight: bold;
}

/* =========================
   TABLAS
========================= */

.meag-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    font-size: 14px;
}

.meag-table thead {
    background: #0051a8;
    color: #ffffff;
}

.meag-table th {
    padding: 12px;
    font-weight: 600;
    text-align: left;
}

.meag-table td {
    padding: 12px;
    border-bottom: 1px solid #e2e8f0;
    color: #334155;
}

.meag-table tbody tr:hover {
    background: rgba(0, 81, 168, 0.05);
}

.meag-table th:last-child,
.meag-table td:last-child {
    text-align: center;
}

.meag-btn-primary {
    background: #0051a8;
    color: #ffffff !important;
    border: 1px solid #0051a8;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.meag-btn-primary:hover {
    background: #003d7e;
    border-color: #003d7e;
}

.meag-btn-secondary {
    background: #ffffff;
    color: #0051a8;
    border: 1px solid #0051a8;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.meag-btn-secondary:hover {
    background: rgba(0, 81, 168, 0.05);
}

/* =========================
   ACTION ICONS (DASHICONS)
========================= */
.meag-table td .dashicons {
    cursor: pointer;
    font-size: 20px;
    color: #0051a8;
    transition: color 0.2s;
    text-decoration: none;
    width: 20px;
    height: 20px;
}

.meag-table td a {
    text-decoration: none;
    display: inline-block;
}

.meag-table td .dashicons:hover {
    color: #003d7e;
}

.meag-table td .dashicons-trash:hover {
    color: #cc0000;
}

/* =========================
   AGRUPACIÓN DE COMUNAS
   ========================= */
.meag-region-group {
    margin-top: 15px;
    width: 100%;
}

.meag-region-group-title {
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #0051a8 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #e2e8f0;
    font-family: inherit !important;
}

.meag-region-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
