/* ========================================
   Admin Notification System
   - Toast notifications (thay alert)
   - Confirm modals (thay confirm)
   ======================================== */

/* Toast Container */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

/* Toast Item */
.toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 320px;
    max-width: 450px;
    padding: 14px 18px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #64748b;
    pointer-events: auto;
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.35s cubic-bezier(0.21, 1.02, 0.73, 1);
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.hide {
    transform: translateX(120%);
    opacity: 0;
}

.toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    margin-top: 1px;
}

.toast-body {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-weight: 600;
    font-size: 14px;
    color: #1e293b;
    margin-bottom: 2px;
}

.toast-message {
    font-size: 13px;
    color: #64748b;
    line-height: 1.4;
    word-break: break-word;
}

.toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 18px;
    padding: 0;
    line-height: 1;
    margin: -2px -4px 0 0;
    transition: color 0.2s;
}

.toast-close:hover {
    color: #475569;
}

/* Toast Types */
.toast.success {
    border-left-color: #22c55e;
}
.toast.success .toast-icon {
    background: #dcfce7;
    color: #16a34a;
}

.toast.error {
    border-left-color: #ef4444;
}
.toast.error .toast-icon {
    background: #fee2e2;
    color: #dc2626;
}

.toast.warning {
    border-left-color: #f59e0b;
}
.toast.warning .toast-icon {
    background: #fef3c7;
    color: #d97706;
}

.toast.info {
    border-left-color: #3b82f6;
}
.toast.info .toast-icon {
    background: #dbeafe;
    color: #2563eb;
}

/* Progress bar */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 4px;
    right: 0;
    height: 3px;
    border-radius: 0 0 12px 0;
    overflow: hidden;
}

.toast-progress-bar {
    height: 100%;
    border-radius: 0 0 12px 0;
    transition: width linear;
}

.toast.success .toast-progress-bar { background: #22c55e; }
.toast.error .toast-progress-bar { background: #ef4444; }
.toast.warning .toast-progress-bar { background: #f59e0b; }
.toast.info .toast-progress-bar { background: #3b82f6; }

/* ========================================
   Confirm Modal
   ======================================== */
.confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 100001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
}

.confirm-overlay.show {
    opacity: 1;
    visibility: visible;
}

.confirm-box {
    background: #fff;
    border-radius: 16px;
    padding: 28px;
    width: 90%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s cubic-bezier(0.21, 1.02, 0.73, 1);
}

.confirm-overlay.show .confirm-box {
    transform: scale(1) translateY(0);
}

.confirm-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 24px;
}

.confirm-icon.warning {
    background: #fef3c7;
    color: #d97706;
}

.confirm-icon.danger {
    background: #fee2e2;
    color: #dc2626;
}

.confirm-icon.info {
    background: #dbeafe;
    color: #2563eb;
}

.confirm-icon.success {
    background: #dcfce7;
    color: #16a34a;
}

.confirm-title {
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}

.confirm-message {
    text-align: center;
    font-size: 14px;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 24px;
}

.confirm-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.confirm-btn {
    padding: 10px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    min-width: 100px;
}

.confirm-btn:hover {
    transform: translateY(-1px);
}

.confirm-btn.cancel {
    background: #f1f5f9;
    color: #475569;
}
.confirm-btn.cancel:hover {
    background: #e2e8f0;
}

.confirm-btn.ok {
    background: #3b82f6;
    color: #fff;
}
.confirm-btn.ok:hover {
    background: #2563eb;
}

.confirm-btn.danger {
    background: #ef4444;
    color: #fff;
}
.confirm-btn.danger:hover {
    background: #dc2626;
}

.confirm-btn.success {
    background: #22c55e;
    color: #fff;
}
.confirm-btn.success:hover {
    background: #16a34a;
}

/* Mobile */
@media (max-width: 576px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    .toast {
        min-width: unset;
        max-width: 100%;
    }
    .confirm-box {
        padding: 20px;
    }
}
