/* Futuristic Glassmorphic Popup Dialogs - Consistent across all browsers */
.ubk-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(18, 9, 14, 0.68);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.ubk-modal-backdrop.is-open {
    opacity: 1;
    visibility: visible;
}

.ubk-modal-box {
    position: relative;
    width: 100%;
    max-width: 460px;
    background: linear-gradient(155deg, rgba(255, 255, 255, 0.98) 0%, rgba(253, 246, 248, 0.96) 100%);
    border-radius: 22px;
    padding: 2px;
    box-shadow: 0 28px 70px rgba(18, 5, 10, 0.42), 0 0 0 1px rgba(255, 255, 255, 0.25);
    transform: translateY(18px) scale(0.95);
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    overflow: hidden;
}

.ubk-modal-box::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 22px;
    padding: 2px;
    background: linear-gradient(135deg, #AA1C41, #ff5e84, #8B1634, #f59e0b);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.ubk-modal-backdrop.is-open .ubk-modal-box {
    transform: translateY(0) scale(1);
}

.ubk-modal-inner {
    background: #ffffff;
    border-radius: 20px;
    padding: 1.75rem 1.75rem 1.5rem;
    text-align: center;
}

.ubk-modal-icon {
    width: 68px;
    height: 68px;
    margin: 0 auto 1rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.85rem;
    position: relative;
    animation: ubkPulseGlow 2.4s infinite ease-in-out;
}

.ubk-modal-icon.type-success {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    color: #059669;
    box-shadow: 0 10px 25px rgba(5, 150, 105, 0.2);
}

.ubk-modal-icon.type-error {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    color: #dc2626;
    box-shadow: 0 10px 25px rgba(220, 38, 38, 0.22);
}

.ubk-modal-icon.type-warning,
.ubk-modal-icon.type-confirm {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    color: #d97706;
    box-shadow: 0 10px 25px rgba(217, 119, 6, 0.22);
}

.ubk-modal-icon.type-info {
    background: linear-gradient(135deg, #fdf2f4, #fce7ec);
    color: #AA1C41;
    box-shadow: 0 10px 25px rgba(170, 28, 65, 0.22);
}

@keyframes ubkPulseGlow {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.ubk-modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f1216;
    margin: 0 0 0.5rem;
    letter-spacing: -0.01em;
}

.ubk-modal-message {
    font-size: 0.95rem;
    color: #57454b;
    line-height: 1.6;
    margin: 0 0 1.5rem;
    word-break: break-word;
}

.ubk-modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.ubk-modal-btn {
    -webkit-appearance: none;
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-width: 118px;
    padding: 0.72rem 1.35rem;
    border-radius: 12px;
    border: 1px solid transparent;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.ubk-modal-btn:active {
    transform: scale(0.97);
}

.ubk-modal-btn-primary {
    background: linear-gradient(135deg, #AA1C41 0%, #8B1634 100%);
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(170, 28, 65, 0.28);
}

.ubk-modal-btn-primary:hover {
    background: linear-gradient(135deg, #be2049 0%, #7a122d 100%);
    box-shadow: 0 10px 24px rgba(170, 28, 65, 0.36);
}

.ubk-modal-btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(220, 38, 38, 0.28);
}

.ubk-modal-btn-secondary {
    background: #f3eff1;
    color: #3f2e34;
    border-color: #e4dce0;
}

.ubk-modal-btn-secondary:hover {
    background: #e9e2e5;
}

/* Form / Content Modal Dialog (e.g., Unggahan Dokumen) */
.ubk-dialog-backdrop {
    position: fixed;
    inset: 0;
    z-index: 99980;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(18, 9, 14, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    overflow-y: auto;
}

.ubk-dialog-backdrop.is-open {
    display: flex;
}

.ubk-dialog-card {
    width: 100%;
    max-width: 720px;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 22px;
    box-shadow: 0 28px 70px rgba(15, 5, 10, 0.38);
    border: 1px solid rgba(170, 28, 65, 0.18);
    overflow: hidden;
    animation: ubkDialogIn 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes ubkDialogIn {
    from { opacity: 0; transform: translateY(16px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.ubk-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.15rem 1.5rem;
    background: linear-gradient(135deg, #AA1C41 0%, #8B1634 100%);
    color: #ffffff;
}

.ubk-dialog-header h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: #ffffff;
    border: none;
    padding: 0;
}

.ubk-dialog-close {
    -webkit-appearance: none;
    appearance: none;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: none;
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-size: 1.15rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.ubk-dialog-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.ubk-dialog-body {
    padding: 1.5rem;
    overflow-y: auto;
}
