/* —— Inspector notifications: toast + dialog —— */
.si-toast-host {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 12100;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(380px, calc(100vw - 32px));
    pointer-events: none;
}

.si-toast {
    pointer-events: auto;
    position: relative;
    display: grid;
    grid-template-columns: 4px 40px 1fr 28px;
    align-items: start;
    gap: 0 10px;
    padding: 14px 12px 14px 0;
    background: #fff;
    border: 1px solid #e6eef5;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(12, 92, 148, 0.14);
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
    transition: opacity 0.25s ease, transform 0.25s ease;
    overflow: hidden;
    font-family: Inter, "Segoe UI", Roboto, sans-serif;
}

.si-toast.is-in {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.si-toast.is-out {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
}

.si-toast__accent {
    align-self: stretch;
    border-radius: 12px 0 0 12px;
    background: var(--st-navy, #0c5c94);
}

.si-toast--success .si-toast__accent { background: #1f8a4c; }
.si-toast--error .si-toast__accent { background: #c0392b; }
.si-toast--warning .si-toast__accent { background: #f7941d; }
.si-toast--info .si-toast__accent { background: #4d8fbd; }

.si-toast__icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}

.si-toast__icon svg {
    width: 28px;
    height: 28px;
}

.si-toast--success .si-toast__icon { color: #1f8a4c; }
.si-toast--error .si-toast__icon { color: #c0392b; }
.si-toast--warning .si-toast__icon { color: #d97706; }
.si-toast--info .si-toast__icon { color: #0284c7; }

.si-toast__body {
    min-width: 0;
    padding-top: 2px;
}

.si-toast__title {
    color: #0f1b2d;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 2px;
}

.si-toast__msg {
    color: #5b6b7c;
    font-size: 13px;
    line-height: 1.45;
    margin: 0;
}

.si-toast__close {
    border: 0;
    background: transparent;
    color: #475569;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
    border-radius: 6px;
}

.si-toast__close:hover {
    color: #334155;
    background: #f1f5f9;
}

@media (max-width: 576px) {
    .si-toast-host {
        top: 12px;
        right: 12px;
        left: 12px;
        width: auto;
    }
}

/* Dialogs (confirm / redirect success) — sit above inspector nav/dropdowns */
.si-dialog-container.swal2-container {
    backdrop-filter: blur(2px);
    z-index: 12000 !important;
}
.swal2-container {
    z-index: 12000 !important;
}

.si-dialog.swal2-popup {
    width: min(420px, calc(100vw - 32px)) !important;
    padding: 28px 28px 24px !important;
    border-radius: 16px !important;
    border: 1px solid #e6eef5 !important;
    box-shadow: 0 28px 64px rgba(12, 92, 148, 0.2) !important;
    font-family: Inter, "Segoe UI", Roboto, sans-serif !important;
}

.si-dialog-in {
    animation: siDialogIn 0.22s ease;
}

.si-dialog-out {
    animation: siDialogOut 0.16s ease forwards;
}

@keyframes siDialogIn {
    from { opacity: 0; transform: translateY(8px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes siDialogOut {
    from { opacity: 1; transform: scale(1); }
    to { opacity: 0; transform: scale(0.96); }
}

.si-dialog__title {
    color: #0c5c94 !important;
    font-size: 1.2rem !important;
    font-weight: 700 !important;
    margin: 0.35rem 0 0.4rem !important;
}

.si-dialog__text {
    color: #5b6b7c !important;
    font-size: 0.95rem !important;
    line-height: 1.5 !important;
}

.si-dialog__actions {
    margin: 1.35rem 0 0 !important;
    gap: 8px !important;
}

.si-dialog__btn {
    min-width: 110px;
    border-radius: 9px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    padding: 0.55rem 1.1rem !important;
    margin: 0 4px !important;
    border: 1px solid transparent !important;
    cursor: pointer;
}

.si-dialog__btn--primary {
    background: #0c5c94 !important;
    border-color: #0c5c94 !important;
    color: #fff !important;
}

.si-dialog__btn--primary:hover {
    background: #0f5388 !important;
}

.si-dialog__btn--ghost {
    background: #fff !important;
    border-color: #d7e0ea !important;
    color: #334155 !important;
}

.si-dialog__btn--ghost:hover {
    background: #f8fafc !important;
}

/* SweetAlert2 icons — undo theme/template breakage (left:-30px, rem sizing) */
.swal2-popup .swal2-icon {
    width: 5em !important;
    height: 5em !important;
    margin: 0.5em auto 0.6em !important;
    border-width: 0.25em !important;
    font-size: 0.75em !important; /* scale; keep em geometry intact */
    box-sizing: content-box !important;
    position: relative !important;
}

.swal2-popup .swal2-icon.swal2-success {
    border-color: #a5dc86 !important;
    color: #1f8a4c !important;
}

.swal2-popup .swal2-icon.swal2-success .swal2-success-ring {
    position: absolute !important;
    left: -0.25em !important;
    top: -0.25em !important;
    z-index: 2 !important;
    width: 100% !important;
    height: 100% !important;
    box-sizing: content-box !important;
    border: 0.25em solid rgba(165, 220, 134, 0.3) !important;
    border-radius: 50% !important;
}

.swal2-popup .swal2-icon.swal2-success [class^='swal2-success-line'] {
    display: block !important;
    position: absolute !important;
    z-index: 2 !important;
    height: 0.3125em !important;
    border-radius: 0.125em !important;
    background-color: #1f8a4c !important;
}

.swal2-popup .swal2-icon.swal2-success .swal2-success-line-tip {
    top: 2.875em !important;
    left: 0.875em !important;
    width: 1.5625em !important;
    transform: rotate(45deg) !important;
}

.swal2-popup .swal2-icon.swal2-success .swal2-success-line-long {
    top: 2.375em !important;
    right: 0.5em !important;
    width: 2.9375em !important;
    transform: rotate(-45deg) !important;
}

.swal2-popup .swal2-icon.swal2-error {
    border-color: #f27474 !important;
    color: #c0392b !important;
}

.swal2-popup .swal2-icon.swal2-error .swal2-x-mark {
    position: relative !important;
    flex-grow: 1 !important;
}

.swal2-popup .swal2-icon.swal2-error [class^='swal2-x-mark-line'] {
    display: block !important;
    position: absolute !important;
    top: 2.3125em !important;
    width: 2.9375em !important;
    height: 0.3125em !important;
    border-radius: 0.125em !important;
    background-color: #f27474 !important;
}

.swal2-popup .swal2-icon.swal2-error .swal2-x-mark-line-left {
    left: 1.0625em !important;
    transform: rotate(45deg) !important;
}

.swal2-popup .swal2-icon.swal2-error .swal2-x-mark-line-right {
    right: 1em !important;
    transform: rotate(-45deg) !important;
}

.swal2-popup .swal2-icon.swal2-warning {
    border-color: #facea8 !important;
    color: #f8bb86 !important;
    font-size: 0.75em !important;
}

.swal2-popup .swal2-icon.swal2-info {
    border-color: #9de0f6 !important;
    color: #3fc3ee !important;
}

.si-dialog .swal2-icon.swal2-success {
    border-color: #1f8a4c !important;
    color: #1f8a4c !important;
}

.si-dialog .swal2-icon.swal2-success .swal2-success-ring {
    border-color: rgba(31, 138, 76, 0.3) !important;
}

.si-dialog .swal2-icon.swal2-error {
    border-color: #c0392b !important;
    color: #c0392b !important;
}

.si-dialog .swal2-icon.swal2-warning {
    border-color: #f7941d !important;
    color: #f7941d !important;
}


.content-wrapper .form-control.is-invalid,
.content-wrapper select.is-invalid,
.content-wrapper textarea.is-invalid,
.content-wrapper .select2.is-invalid .select2-selection {
    border-color: #c0392b !important;
    box-shadow: 0 0 0 0.15rem rgba(192, 57, 43, 0.12);
}

/* —— Flash alerts (page-level) —— */
.si-flash,
.si-flash.alert {
    position: relative;
    display: grid;
    grid-template-columns: 4px 36px 1fr 32px;
    align-items: start;
    gap: 0 12px;
    margin: 0 0 18px;
    padding: 14px 12px 14px 0;
    border: 1px solid #e6eef5;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(12, 92, 148, 0.06);
    overflow: hidden;
    color: inherit;
}
.si-flash__accent {
    align-self: stretch;
    border-radius: 12px 0 0 12px;
    background: var(--st-navy, #0c5c94);
}
.si-flash--success .si-flash__accent { background: #1f8a4c; }
.si-flash--error .si-flash__accent { background: #c0392b; }
.si-flash--warning .si-flash__accent { background: #f7941d; }
.si-flash--info .si-flash__accent { background: #4d8fbd; }
.si-flash__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-top: 1px;
    border-radius: 10px;
    background: #edf5fb;
    color: var(--st-navy, #0c5c94);
    font-size: 20px;
    line-height: 1;
}
.si-flash--success .si-flash__icon { background: #e8f7ef; color: #1f8a4c; }
.si-flash--error .si-flash__icon { background: #fdecea; color: #c0392b; }
.si-flash--warning .si-flash__icon { background: #fff4e8; color: #d97706; }
.si-flash--info .si-flash__icon { background: #eaf5fb; color: #0284c7; }
.si-flash__body {
    min-width: 0;
    padding-top: 1px;
}
.si-flash__title {
    display: block;
    margin: 0 0 2px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    color: #0f1b2d;
}
.si-flash__msg {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #5b6b7c;
}
.si-flash__close {
    width: 32px;
    height: 32px;
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #64748b;
    font-size: 22px;
    line-height: 1;
    opacity: 1;
    text-shadow: none;
}
.si-flash__close:hover {
    background: #f1f5f9;
    color: #334155;
}
.si-flash .close span {
    display: block;
    line-height: 1;
}

/* Toast refinements */
.si-toast {
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(12, 92, 148, 0.16);
}
.si-toast__title {
    letter-spacing: -0.01em;
}
.si-dialog.swal2-popup {
    border-radius: 18px !important;
}
.si-dialog__btn--primary:hover {
    background: #0a4f7c !important;
    border-color: #0a4f7c !important;
}

