/* === DIALOG OVERLAY === */
.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}
.dialog-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* === DIALOG BOX === */
.dialog-box {
    background: #fff;
    border-radius: 16px;
    padding: 0;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    transform: scale(0.8) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}
.dialog-overlay.active .dialog-box {
    transform: scale(1) translateY(0);
}

.dialog-body {
    padding: 36px 28px 24px;
    text-align: center;
}

/* === DIALOG ICON === */
.dialog-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 28px;
    color: #fff;
}
.dialog-icon.loading-icon {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    animation: pulse-ring 1.5s ease-in-out infinite;
}
.dialog-icon.success-icon {
    background: linear-gradient(135deg, #28a745, #1e7e34);
}
.dialog-icon.error-icon {
    background: linear-gradient(135deg, #dc3545, #c82333);
}
.dialog-icon.warning-icon {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    color: #333;
}
.dialog-icon.confirm-icon {
    background: linear-gradient(135deg, #17a2b8, #117a8b);
}

/* === SPINNER === */
.spinner {
    width: 36px;
    height: 36px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
@keyframes pulse-ring {
    0%, 100% { box-shadow: 0 0 0 0 rgba(71, 130, 210, 0.4); }
    50% { box-shadow: 0 0 0 12px rgba(71, 130, 210, 0); }
}

/* === DIALOG TEXT === */
.dialog-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text);
}
.dialog-message {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.5;
}

/* === DIALOG ACTIONS === */
.dialog-actions {
    padding: 0 28px 28px;
    display: flex;
    gap: 10px;
}
.dialog-actions .btn {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
}
.btn-confirm-cancel {
    background: var(--bg);
    color: var(--text);
    border: 2px solid var(--border);
}
.btn-confirm-cancel:hover {
    background: #e2e6ea;
}
.btn-confirm-ok {
    background: var(--primary);
    color: #fff;
}
.btn-confirm-ok:hover {
    background: var(--primary-dark);
}
.btn-confirm-danger {
    background: var(--danger);
    color: #fff;
}
.btn-confirm-danger:hover {
    background: #c82333;
}

/* === CHECKMARK ANIMATION === */
.checkmark-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 28px;
    color: #fff;
    background: linear-gradient(135deg, #28a745, #1e7e34);
    position: relative;
}
.checkmark-circle::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 3px solid #28a745;
    animation: check-pop 0.4s ease-out;
}
@keyframes check-pop {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* === X MARK ANIMATION === */
.xmark-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 28px;
    color: #fff;
    background: linear-gradient(135deg, #dc3545, #c82333);
    position: relative;
}
.xmark-circle::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 3px solid #dc3545;
    animation: check-pop 0.4s ease-out;
}

/* === TOAST NOTIFICATION === */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.toast {
    background: #fff;
    border-radius: 10px;
    padding: 14px 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 420px;
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-left: 4px solid;
}
.toast.show { transform: translateX(0); }
.toast-success { border-left-color: var(--success); }
.toast-error { border-left-color: var(--danger); }
.toast-warning { border-left-color: var(--warning); }
.toast-info { border-left-color: var(--info); }

.toast-icon {
    font-size: 18px;
    flex-shrink: 0;
}
.toast-success .toast-icon { color: var(--success); }
.toast-error .toast-icon { color: var(--danger); }
.toast-warning .toast-icon { color: var(--warning); }
.toast-info .toast-icon { color: var(--info); }

.toast-content { flex: 1; }
.toast-title { font-size: 13px; font-weight: 700; margin-bottom: 2px; }
.toast-msg { font-size: 12px; color: var(--text-light); }
.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
    flex-shrink: 0;
}
.toast-close:hover { color: var(--text); }

/* === RESPONSIVE === */
@media (max-width: 480px) {
    .dialog-box { width: 95%; max-width: none; }
    .toast-container { left: 10px; right: 10px; }
    .toast { min-width: auto; }
}
