/* Sistema de alertas y confirmaciones globales SGV. No modifica el CSS maestro. */
.sgv-modal-layer[hidden] { display: none !important; }
/* Evita que los estilos de botón muestren controles ocultos por JavaScript. */
.sgv-modal-btn[hidden] { display: none !important; }
.sgv-modal-layer {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: grid;
    place-items: center;
    padding: 22px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .18s ease, visibility .18s ease;
    font-family: inherit;
}
.sgv-modal-layer.is-open { opacity: 1; visibility: visible; }
.sgv-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .58);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}
.sgv-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 620px);
    max-height: min(86vh, 720px);
    overflow-y: auto;
    box-sizing: border-box;
    padding: 30px 30px 24px;
    border: 1px solid rgba(148, 163, 184, .26);
    border-radius: 20px;
    background: #fff;
    color: #172033;
    box-shadow: 0 24px 80px rgba(2, 6, 23, .28);
    text-align: center;
    transform: translateY(9px) scale(.985);
    transition: transform .18s ease;
    outline: none;
}
.sgv-modal-layer.is-open .sgv-modal-dialog { transform: translateY(0) scale(1); }
.sgv-modal-icon {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    margin: 0 auto 17px;
    border-radius: 50%;
    font-size: 30px;
    line-height: 1;
    font-weight: 800;
    box-sizing: border-box;
}
.sgv-modal-icon-success { color: #147d48; background: #e5f8ed; border: 1px solid #b9ebce; }
.sgv-modal-icon-error { color: #b42318; background: #fff0ef; border: 1px solid #ffd1ce; }
.sgv-modal-icon-warning { color: #9a6700; background: #fff7dd; border: 1px solid #f8e4a0; }
.sgv-modal-icon-info { color: #175cd3; background: #eff6ff; border: 1px solid #c8ddff; }
.sgv-modal-title { margin: 0 0 10px; font-size: 21px; line-height: 1.3; font-weight: 750; color: #172033; }
.sgv-modal-message .seq-result-table {
    width: 100%;
    margin: 8px 0 2px;
    border-collapse: collapse;
    table-layout: fixed;
    text-align: left;
    color: #344054;
    font-size: 14px;
    line-height: 1.4;
}
.sgv-modal-message .seq-result-table th,
.sgv-modal-message .seq-result-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #e4e7ec;
    vertical-align: middle;
}
.sgv-modal-message .seq-result-table th {
    width: 62%;
    color: #344054;
    font-weight: 650;
    background: #f8fafc;
}
.sgv-modal-message .seq-result-table td {
    color: #172033;
    text-align: right;
    font-weight: 600;
    overflow-wrap: anywhere;
}
.sgv-modal-message .seq-result-table tr:last-child th,
.sgv-modal-message .seq-result-table tr:last-child td {
    border-bottom: 0;
}
.sgv-modal-message {
    margin: 0;
    color: #475467;
    font-size: 15px;
    line-height: 1.6;
    white-space: pre-line;
    overflow-wrap: anywhere;
}
.sgv-modal-actions { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 26px; flex-wrap: wrap; }
.sgv-modal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 124px;
    min-height: 43px;
    padding: 10px 18px;
    border-radius: 10px;
    border: 1px solid transparent;
    font: inherit;
    font-size: 14px;
    line-height: 1.2;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.sgv-modal-btn:focus-visible { outline: 3px solid rgba(37, 99, 235, .28); outline-offset: 2px; }
.sgv-modal-btn:active { transform: translateY(1px); }
.sgv-modal-btn-primary { color: #fff; background: #1d4ed8; border-color: #1d4ed8; }
.sgv-modal-btn-primary:hover { background: #1e40af; border-color: #1e40af; }
.sgv-modal-btn-danger { color: #fff; background: #b42318; border-color: #b42318; }
.sgv-modal-btn-danger:hover { background: #912018; border-color: #912018; }
.sgv-modal-btn-secondary { color: #344054; background: #fff; border-color: #d0d5dd; }
.sgv-modal-btn-secondary:hover { background: #f8fafc; }
body.sgv-modal-open { overflow: hidden; }
@media (max-width: 480px) {
    .sgv-modal-layer { padding: 14px; }
    .sgv-modal-dialog { padding: 25px 20px 20px; border-radius: 16px; }
    .sgv-modal-title { font-size: 19px; }
    .sgv-modal-actions { flex-direction: column-reverse; align-items: stretch; }
    .sgv-modal-btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .sgv-modal-layer, .sgv-modal-dialog, .sgv-modal-btn { transition: none !important; }
}
