/* ========== Sweet Modal – refined, professional ========== */
.sweet-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.sweet-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.sweet-modal {
    background: #fff;
    border-radius: 16px;
    padding: 28px 24px 24px;
    max-width: 380px;
    width: calc(100% - 32px);
    text-align: center;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.12), 0 0 1px rgba(0, 0, 0, 0.08);
    transform: scale(0.96) translateY(8px);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.sweet-modal-overlay.show .sweet-modal {
    transform: scale(1) translateY(0);
}

.sweet-modal-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    position: relative;
}

.sweet-modal-icon svg {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    stroke: currentColor;
}

.sweet-modal-icon::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(135deg, rgba(255,255,255,0.6), rgba(255,255,255,0));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.5;
}

.sweet-modal-icon.warning {
    background: #fef9e7;
    color: #b45309;
}

.sweet-modal-icon.danger {
    background: #fef2f2;
    color: #b91c1c;
}

.sweet-modal-icon.success {
    background: #ecfdf5;
    color: #047857;
}

.sweet-modal-icon.info {
    background: #eff6ff;
    color: #1d4ed8;
}

.sweet-modal-icon.question {
    background: #f8fafc;
    color: #64748b;
}

.sweet-modal-icon.logout {
    background: #f8fafc;
    color: #64748b;
}

.sweet-modal-icon.logout svg {
    stroke: currentColor;
}

.sweet-modal-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.sweet-modal-text {
    font-size: 14px;
    color: #64748b;
    line-height: 1.55;
    margin-bottom: 24px;
    padding: 0 4px;
}

.sweet-modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.sweet-modal-btn {
    flex: 0 0 auto;
    min-width: 100px;
    padding: 10px 18px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
    white-space: nowrap;
}

.sweet-modal-btn:hover {
    transform: translateY(-0.5px);
}

.sweet-modal-btn:active {
    transform: translateY(0);
}

.sweet-modal-btn.cancel {
    background: transparent;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.sweet-modal-btn.cancel:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #334155;
}

.sweet-modal-btn.confirm {
    color: #fff;
    min-width: 140px;
    background: #0891b2;
    border: 1px solid #0e7490;
}

.sweet-modal-btn.confirm:hover {
    background: #0e7490;
    filter: brightness(1.08);
    border-color: #155e75;
}

.sweet-modal-btn.confirm.danger {
    background: #dc2626;
}

.sweet-modal-btn.confirm.danger:hover {
    background: #b91c1c;
}

.sweet-modal-btn.confirm.success {
    background: #059669;
}

.sweet-modal-btn.confirm.success:hover {
    background: #047857;
}

.sweet-modal-btn.confirm.warning {
    background: #d97706;
}

.sweet-modal-btn.confirm.warning:hover {
    background: #b45309;
}

/* Input elements in modal */
.sweet-modal-select,
.sweet-modal-textarea,
.sweet-modal-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.sweet-modal-select {
    margin-bottom: 12px;
    background: #fff;
    cursor: pointer;
}

.sweet-modal-textarea {
    margin-bottom: 16px;
    min-height: 80px;
    resize: vertical;
    font-family: inherit;
}

.sweet-modal-input {
    margin-bottom: 16px;
}

.sweet-modal-select:focus,
.sweet-modal-textarea:focus,
.sweet-modal-input:focus {
    outline: none;
    border-color: #0891b2;
}

@media (max-width: 480px) {
    .sweet-modal {
        padding: 24px 20px 20px;
        max-width: 300px;
    }

    .sweet-modal-icon {
        width: 48px;
        height: 48px;
        font-size: 24px;
        margin-bottom: 16px;
    }

    .sweet-modal-icon svg {
        width: 24px;
        height: 24px;
    }

    .sweet-modal-title {
        font-size: 1rem;
    }

    .sweet-modal-text {
        font-size: 13px;
        margin-bottom: 20px;
    }

    .sweet-modal-btn {
        padding: 9px 14px;
        font-size: 13px;
        min-width: 90px;
    }

    .sweet-modal-buttons {
        gap: 8px;
    }
}
