.ui-modal-backdrop {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(6px);
    z-index: 5000;
}

.ui-modal-backdrop.is-open {
    display: flex;
}

.ui-modal-card {
    width: min(100%, 480px);
    background: linear-gradient(180deg, #171717 0%, #101010 100%);
    border: 1px solid #2d2d2d;
    border-radius: 22px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
    overflow: hidden;
}

.ui-modal-head {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 20px 22px 10px;
}

.ui-modal-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.2);
    color: #f0cb63;
}

.ui-modal-title {
    margin: 0;
    color: #f4f4f4;
    font-size: 1.08rem;
}

.ui-modal-text {
    margin: 4px 0 0;
    color: #a3a3a3;
    line-height: 1.55;
    font-size: 0.94rem;
}

.ui-modal-body {
    padding: 0 22px 20px;
}

.ui-modal-highlight {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #111;
    border: 1px solid #242424;
    color: #d9d9d9;
}

.ui-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 0 22px 22px;
}

.ui-modal-btn {
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 11px 16px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s ease;
}

.ui-modal-btn-secondary {
    background: #151515;
    color: #d0d0d0;
    border-color: #2b2b2b;
}

.ui-modal-btn-secondary:hover {
    background: #1d1d1d;
    color: #fff;
}

.ui-modal-btn-primary {
    background: #d4af37;
    color: #000;
}

.ui-modal-btn-primary:hover {
    background: #e6c24f;
}

.ui-modal-btn-danger {
    background: #d65745;
    color: #fff;
}

.ui-modal-btn-danger:hover {
    background: #e06856;
}

.ui-toast-wrap {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: grid;
    gap: 10px;
    justify-items: center;
    width: min(92vw, 460px);
    pointer-events: none;
    z-index: 5200;
}

.ui-toast {
    width: 100%;
    background: rgba(17, 17, 17, 0.96);
    border: 1px solid #2d2d2d;
    border-radius: 16px;
    color: #ededed;
    padding: 16px 18px;
    text-align: center;
    font-weight: 600;
    line-height: 1.5;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
    animation: ui-toast-pop 0.18s ease-out;
}

.ui-toast.success { border-color: rgba(37, 211, 102, 0.35); }
.ui-toast.warning { border-color: rgba(212, 175, 55, 0.35); }
.ui-toast.error { border-color: rgba(214, 87, 69, 0.35); }

@keyframes ui-toast-pop {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 640px) {
    .ui-modal-actions {
        flex-direction: column-reverse;
    }

    .ui-modal-btn,
    .ui-toast {
        width: 100%;
        box-sizing: border-box;
    }

    .ui-toast-wrap {
        width: calc(100vw - 24px);
    }
}
