/* ==========================================================================
   全局现代化居中提示/确认框组件 (带3秒自动倒计时关闭)
   ========================================================================== */

/* 遮罩背景 (屏幕正中居中 + 毛玻璃效果) */
.app-global-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.24s ease, visibility 0.24s ease;
}
.app-global-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 弹窗卡片本体 */
.app-global-modal-box {
    position: relative;
    background: #ffffff;
    width: 100%;
    max-width: 420px;
    border-radius: 22px;
    box-shadow: 0 25px 60px -12px rgba(15, 23, 42, 0.35), 0 0 0 1px rgba(226, 232, 240, 0.9);
    overflow: hidden;
    transform: scale(0.88) translateY(16px);
    transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.24s ease;
    text-align: center;
    padding: 28px 24px 20px;
    box-sizing: border-box;
    user-select: none;
}
.app-global-modal-overlay.active .app-global-modal-box {
    transform: scale(1) translateY(0);
}

/* 顶部圆形图标徽章 */
.app-modal-icon-badge {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.app-global-modal-overlay.active .app-modal-icon-badge {
    transform: scale(1);
    animation: iconBounce 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes iconBounce {
    0% { transform: scale(0.6); }
    60% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

/* 危险/删除模式 */
.app-modal-icon-badge.danger {
    background: #fef2f2;
    border: 4px solid #fee2e2;
    color: #ef4444;
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.18);
}
/* 警告模式 */
.app-modal-icon-badge.warning {
    background: #fffbeb;
    border: 4px solid #fef3c7;
    color: #f59e0b;
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.18);
}
/* 信息/通知模式 */
.app-modal-icon-badge.info {
    background: #eef2ff;
    border: 4px solid #e0e7ff;
    color: #6366f1;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.18);
}
/* 成功模式 */
.app-modal-icon-badge.success {
    background: #f0fdf4;
    border: 4px solid #dcfce7;
    color: #16a34a;
    box-shadow: 0 8px 20px rgba(22, 163, 74, 0.18);
}

/* 弹窗标题 */
.app-modal-title {
    font-size: 17.5px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 8px 0;
    line-height: 1.35;
}

/* 弹窗内容文字 (支持换行与多行美化) */
.app-modal-message {
    font-size: 14px;
    color: #475569;
    line-height: 1.6;
    margin: 0 0 18px 0;
    padding: 0 8px;
    word-break: break-word;
    white-space: pre-wrap;
}

/* 倒计时进度条外轨 (无倒计时或后台时平滑隐藏) */
.app-modal-timer-track {
    width: 100%;
    height: 4px;
    background: #f1f5f9;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 20px;
    position: relative;
}
.app-modal-timer-bar {
    height: 100%;
    width: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    transition: width 10s linear;
}
.app-modal-timer-bar.danger {
    background: linear-gradient(90deg, #f87171, #ef4444);
}
.app-modal-timer-bar.warning {
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
}
.app-modal-timer-bar.info {
    background: linear-gradient(90deg, #60a5fa, #3b82f6);
}
.app-modal-timer-bar.success {
    background: linear-gradient(90deg, #34d399, #10b981);
}

/* 按钮组 */
.app-modal-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

/* 取消按钮 */
.btn-app-modal-cancel {
    flex: 1;
    padding: 9px 18px;
    border-radius: 22px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #64748b;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.btn-app-modal-cancel:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #1e293b;
}

/* 确定按钮 - 默认 */
.btn-app-modal-confirm {
    flex: 1;
    padding: 9px 22px;
    border-radius: 22px;
    border: none;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #ffffff;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
    transition: all 0.2s ease;
    white-space: nowrap;
}
.btn-app-modal-confirm:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(79, 70, 229, 0.45);
}
.btn-app-modal-confirm:active {
    transform: translateY(0);
}

/* 危险/删除确定按钮 */
.btn-app-modal-confirm.danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}
.btn-app-modal-confirm.danger:hover {
    box-shadow: 0 6px 18px rgba(239, 68, 68, 0.45);
}

/* 警示/退出登录/恢复默认确定按钮 */
.btn-app-modal-confirm.warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}
.btn-app-modal-confirm.warning:hover {
    box-shadow: 0 6px 18px rgba(245, 158, 11, 0.45);
}

/* 主要操作/解封/开通确定按钮 */
.btn-app-modal-confirm.primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}
.btn-app-modal-confirm.primary:hover {
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.45);
}
