/* =========================
   FORMULARIO DOCUMENTO
========================= */

.gd-back-container {
    max-width: 1200px;
    margin: 20px auto 10px;
}

.gd-back-link {
    text-decoration: none;
    color: #1f5fae;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
}

.gd-back-link:hover {
    color: #154682;
}

.gd-back-link .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.gd-formulario-documentos {
    max-width: 1200px;
    margin: 40px auto;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

/* CONTENEDOR GENERAL */
.gd-contenedor {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 32px;
}

/* COLUMNAS */
.gd-columna {
    background: #eef5ff;
    padding: 32px;
    border-radius: 14px;
}

/* COLUMNA IZQUIERDA */
.gd-form h2 {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 600;
    color: #0f172a;
}

.gd-form p {
    margin-bottom: 28px;
    font-size: 14px;
    color: #475569;
}

/* CAMPOS */
.gd-campo {
    margin-bottom: 18px;
}

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

.gd-campo input[type="text"],
.gd-campo input[type="file"],
.gd-campo select,
.gd-campo textarea {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
}

.gd-campo textarea {
    resize: vertical;
    min-height: 90px;
}

/* FILA DOBLE */
.gd-fila {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ACCIONES FORMULARIO */
.gd-acciones {
    display: flex;
    gap: 14px;
    margin-top: 22px;
    justify-content: flex-end;
    /* Alineado a la derecha como en listado */
}

.gd-acciones button {
    padding: 10px 22px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
}

.gd-acciones button span {
    font-size: 20px;
}

/* Guardar Borrador (Outline) */
.gd-btn-save-draft {
    background: #ffffff !important;
    color: #0051a8 !important;
    border: 1px solid #0051a8 !important;
}

.gd-btn-save-draft:hover {
    background: rgba(0, 81, 168, 0.05) !important;
}

/* Guardar y Publicar (Solid) */
.gd-btn-save-publish {
    background: #0051a8 !important;
    color: #ffffff !important;
    border: 1px solid #0051a8 !important;
}

.gd-btn-save-publish:hover {
    background: #003d7e !important;
}

.gd-acciones button:active {
    transform: scale(0.97);
}}

/* =========================
   PREVIEW DOCUMENTO
========================= */

.gd-preview {
    position: sticky;
    top: 20px;
    align-self: start;
}

.gd-preview h3 {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 600;
    color: #7E8FA0;
}

.gd-preview p {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 12px;
}

.gd-preview-box {
    height: 750px;
    border-radius: 14px;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 14px;
    overflow: hidden;
}

.gd-preview-box iframe {
    border-radius: 14px;
}

/* =========================
   MODAL DE ÉXITO
========================= */

.gd-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.gd-modal.activa {
    display: flex;
}

/* CARD */
.gd-modal-card {
    background: #ffffff;
    width: 520px;
    max-width: 92%;
    border-radius: 16px;
    padding: 24px 28px 28px;
    position: relative;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2);
}

/* CERRAR */
.gd-modal-cerrar {
    position: absolute;
    top: 14px;
    right: 16px;
    border: none;
    background: none;
    font-size: 22px;
    color: #6b7280;
    cursor: pointer;
}

/* HEADER */
.gd-modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gd-modal-icono {
    width: 26px;
    height: 26px;
    background: #22c55e;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
}

.gd-modal-titulo {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

/* DIVISOR */
.gd-modal-divider {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 24px 0 22px;
}

/* TEXTO */
.gd-modal-texto {
    font-size: 14px;
    color: #374151;
    margin-bottom: 24px;
}

/* ACCIONES MODAL */
.gd-modal-acciones {
    display: flex;
    gap: 14px;
}

/* BOTONES MODAL */
.gd-btn-outline {
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    border: 2px solid #0051a8;
    background: #ffffff;
    color: #0051a8;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s ease, transform 0.1s ease;
}

/* MODAL ÉXITO ESPECÍFICO */
.gd-modal-icono.gd-success {
    background: #22c55e;
    /* Verde */
}

.gd-success-footer {
    justify-content: flex-end;
    align-items: center;
    gap: 30px;
}

.gd-btn-success-main {
    border: 1px solid #1f5fae;
    color: #1f5fae;
    background: transparent;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gd-btn-success-main:hover {
    background: rgba(31, 95, 174, 0.05);
}

/* MODAL ERROR ESPECÍFICO */
.gd-modal-icono.gd-error {
    background: #dc2626;
    /* Rojo */
    font-size: 20px;
    font-weight: 300;
}

.gd-error-footer {
    justify-content: flex-end;
    align-items: center;
    gap: 30px;
}

.gd-btn-link {
    color: #0066cc;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.gd-btn-link span,
.gd-btn-continuar span {
    font-size: 18px;
}

.gd-btn-continuar {
    border: 1px solid #0066cc;
    color: #0066cc;
    background: transparent;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gd-btn-continuar:hover {
    background: rgba(0, 102, 204, 0.05);
}

.gd-btn-outline:hover {
    background: rgba(0, 81, 168, 0.06);
}

.gd-btn-outline:active {
    transform: scale(0.97);
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 900px) {
    .gd-contenedor {
        grid-template-columns: 1fr;
    }

    .gd-preview-box {
        height: 280px;
    }
}
