/* ==================== 全局通知样式 ==================== */
.global-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.global-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.global-notification-content {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    gap: 12px;
    min-width: 280px;
    max-width: 450px;
}

.global-notification-content i {
    font-size: 20px;
}

.global-notification-content span {
    font-size: 14px;
    color: #333;
    line-height: 1.4;
    word-break: break-word;
}

.global-notification-success {
    border-left: 4px solid #52c41a;
}
.global-notification-success i {
    color: #52c41a;
}

.global-notification-error {
    border-left: 4px solid #ff4d4f;
}
.global-notification-error i {
    color: #ff4d4f;
}

.global-notification-warning {
    border-left: 4px solid #faad14;
}
.global-notification-warning i {
    color: #faad14;
}

.global-notification-info {
    border-left: 4px solid #1890ff;
}
.global-notification-info i {
    color: #1890ff;
}

/* ==================== 全局加载遮罩 ==================== */
.global-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.global-loading.show {
    opacity: 1;
    pointer-events: auto;
}

.global-loading-content {
    background: rgba(0, 0, 0, 0.8);
    border-radius: 12px;
    padding: 20px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    backdrop-filter: blur(4px);
    animation: global-loading-scale 0.3s ease;
}

.global-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #fff;
    border-radius: 50%;
    animation: global-spin 0.8s linear infinite;
}

.global-loading-text {
    color: white;
    font-size: 14px;
    font-weight: 500;
}

@keyframes global-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes global-loading-scale {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ==================== 确认对话框样式 ==================== */
.confirm-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.confirm-modal-overlay.show {
    opacity: 1;
}

.confirm-modal {
    background: white;
    border-radius: 12px;
    width: 400px;
    max-width: 90%;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transform: scale(0.95);
    transition: transform 0.2s ease;
}

.confirm-modal-overlay.show .confirm-modal {
    transform: scale(1);
}

.confirm-modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.confirm-modal-header i {
    font-size: 20px;
    color: #faad14;
}

.confirm-modal-header span {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.confirm-modal-body {
    padding: 20px;
}

.confirm-modal-body p {
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    word-break: break-word;
}

.confirm-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 12px 20px 20px;
}

.confirm-modal-btn {
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-weight: 500;
}

.confirm-modal-btn-cancel {
    background: #f5f5f5;
    color: #666;
}

.confirm-modal-btn-cancel:hover {
    background: #e8e8e8;
}

.confirm-modal-btn-confirm {
    background: #1890ff;
    color: white;
}

.confirm-modal-btn-confirm:hover {
    background: #40a9ff;
}

/* ==================== 表单错误样式 ==================== */
input.error,
textarea.error,
select.error {
    border-color: #ff4d4f !important;
}

input.error:focus,
textarea.error:focus,
select.error:focus {
    border-color: #ff4d4f !important;
    box-shadow: 0 0 0 2px rgba(255, 77, 79, 0.2) !important;
}

.error-message {
    color: #ff4d4f;
    font-size: 12px;
    margin-top: 4px;
}

/* ==================== 响应式适配 ==================== */
@media (max-width: 768px) {
    .global-notification {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    
    .global-notification-content {
        min-width: auto;
        width: 100%;
    }
    
    .confirm-modal {
        width: 90%;
    }
}