/* 子比超级插件 - 前端公共样式 */
.zm-card {
    background: var(--body-bg, #fff);
    border-radius: var(--main-radius, 8px);
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: var(--main-shadow, 0 1px 3px rgba(0,0,0,0.05));
}

.zm-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 16px;
    border-radius: var(--main-radius, 6px);
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.zm-btn-primary {
    background: var(--focus-color, #2271b1);
    color: #fff;
}

.zm-btn-primary:hover { opacity: 0.85; }

.zm-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    line-height: 1.5;
}

.zm-badge-success { background: #d4edda; color: #155724; }
.zm-badge-warning { background: #fff3cd; color: #856404; }
.zm-badge-danger { background: #f8d7da; color: #721c24; }
.zm-badge-info { background: #d1ecf1; color: #0c5460; }

/* 弹窗 */
.zm-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
}

.zm-modal-overlay.active { display: flex; }

.zm-modal {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.zm-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #999;
}

.zm-modal h3 { margin: 0 0 16px; }

/* 确认弹窗 */
.zm-confirm-modal { max-width: 380px; text-align: center; }
.zm-confirm-modal h3 { font-size: 18px; }
.zm-confirm-body { font-size: 14px; color: #666; margin: 12px 0 20px; line-height: 1.6; }
.zm-confirm-actions { display: flex; gap: 12px; justify-content: center; }
.zm-confirm-actions .zm-btn { flex: 1; padding: 10px; border-radius: 8px; font-size: 15px; font-weight: 600; cursor: pointer; }
.zm-confirm-cancel { background: #f0f0f0; color: #333; border: none; }
.zm-confirm-cancel:hover { background: #e0e0e0; }
.zm-confirm-actions .zm-btn-primary { background: linear-gradient(135deg,#e74c3c,#e67e22); color: #fff; border: none; }
.zm-confirm-actions .zm-btn-primary:hover { opacity: 0.9; }

/* Loading */
.zm-loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ddd;
    border-top-color: var(--focus-color, #2271b1);
    border-radius: 50%;
    animation: zm-spin 0.6s linear infinite;
}

@keyframes zm-spin {
    to { transform: rotate(360deg); }
}

/* Toast 通知 */
.zm-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    z-index: 100000;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s;
}

.zm-toast.show { opacity: 1; transform: translateY(0); }
.zm-toast-success { background: #00a32a; }
.zm-toast-error { background: #dc3545; }
.zm-toast-info { background: #2271b1; }
