/* ===================================================
   虚拟资料赚钱机 - Frontend Styles
   =================================================== */

/* -- 格式标识角标 -- */
.vdp-format-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.6;
    border-radius: 3px;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.vdp-format-pdf   { background: #e74c3c; }
.vdp-format-doc   { background: #2980b9; }
.vdp-format-docx  { background: #2980b9; }
.vdp-format-ppt   { background: #e67e22; }
.vdp-format-pptx  { background: #e67e22; }
.vdp-format-xls   { background: #27ae60; }
.vdp-format-xlsx  { background: #27ae60; }
.vdp-format-txt   { background: #7f8c8d; }
.vdp-format-zip   { background: #8e44ad; }
.vdp-format-rar   { background: #8e44ad; }
.vdp-format-7z    { background: #8e44ad; }
.vdp-format-file  { background: #95a5a6; }

/* -- 缩略图上的角标 -- */
.zib-post .vdp-format-badge,
.item-thumbnail .vdp-format-badge,
.post-graphic .vdp-format-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
    pointer-events: none;
}

/* 卡片模式下的角标 */
.posts-item.card .item-thumbnail {
    position: relative;
}

/* 列表模式下的角标 */
.posts-item.list .post-graphic {
    position: relative;
}

/* -- 文档预览区域 -- */
.vdp-preview-wrapper {
    margin: 20px 0;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    overflow: hidden;
    background: #fafafa;
}

.vdp-file-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
}

.vdp-file-header .vdp-format-badge {
    font-size: 13px;
    padding: 4px 12px;
    flex-shrink: 0;
}

.vdp-file-name {
    font-weight: 500;
    color: #333;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vdp-file-size {
    color: #999;
    font-size: 13px;
    flex-shrink: 0;
}

/* -- 数据万象 CI 文档预览缩略图 -- */
.vdp-ci-preview {
    padding: 16px;
    background: #f5f5f5;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.vdp-ci-preview-page {
    flex: 0 0 auto;
    max-width: 45%;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    transition: box-shadow 0.2s;
}

.vdp-ci-preview-page:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.vdp-ci-preview-img {
    display: block;
    width: 100%;
    height: auto;
}

.vdp-preview-placeholder {
    padding: 60px 20px;
    text-align: center;
}

.vdp-file-icon {
    width: 80px;
    height: 100px;
    margin: 0 auto 16px;
    background: #e8e8e8;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.vdp-file-icon .vdp-icon-text {
    font-size: 28px;
    font-weight: 700;
    color: #666;
}

.vdp-icon-pdf   { background: #fde8e8; }
.vdp-icon-pdf .vdp-icon-text   { color: #e74c3c; }
.vdp-icon-doc,
.vdp-icon-docx  { background: #e8f0fa; }
.vdp-icon-doc .vdp-icon-text,
.vdp-icon-docx .vdp-icon-text  { color: #2980b9; }
.vdp-icon-ppt,
.vdp-icon-pptx  { background: #fdf0e8; }
.vdp-icon-ppt .vdp-icon-text,
.vdp-icon-pptx .vdp-icon-text  { color: #e67e22; }
.vdp-icon-xls,
.vdp-icon-xlsx  { background: #e8f5ee; }
.vdp-icon-xls .vdp-icon-text,
.vdp-icon-xlsx .vdp-icon-text  { color: #27ae60; }
.vdp-icon-zip,
.vdp-icon-rar,
.vdp-icon-7z    { background: #f0e8f5; }
.vdp-icon-zip .vdp-icon-text,
.vdp-icon-rar .vdp-icon-text,
.vdp-icon-7z .vdp-icon-text    { color: #8e44ad; }

.vdp-preview-tip {
    color: #999;
    font-size: 14px;
}

/* ===================================================
   Admin 后台样式
   =================================================== */

/* Dashboard */
.vdp-dashboard .vdp-stats-grid {
    display: flex;
    gap: 20px;
    margin: 20px 0;
}

.vdp-stat-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 24px 32px;
    text-align: center;
    min-width: 160px;
}

.vdp-stat-number {
    font-size: 36px;
    font-weight: 700;
    color: #2271b1;
}

.vdp-stat-label {
    color: #666;
    margin-top: 8px;
}

.vdp-quick-actions {
    margin: 24px 0;
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.vdp-quick-actions .button-hero {
    margin-right: 12px;
}

.vdp-setup-checklist {
    margin: 24px 0;
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.vdp-setup-checklist ol {
    margin: 12px 0 0 20px;
    line-height: 2;
}

.vdp-setup-checklist .vdp-done {
    color: #27ae60;
    text-decoration: line-through;
}

/* 拖拽上传区域 */
.vdp-dropzone {
    border: 3px dashed #bbb;
    border-radius: 12px;
    padding: 60px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 20px 0;
    background: #fafafa;
}

.vdp-dropzone:hover,
.vdp-dropzone.vdp-dragover {
    border-color: #2271b1;
    background: #f0f6fc;
}

/* 不可见的文件 input，覆盖整个拖拽区 */
.vdp-file-input-invisible {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 1;
}.vdp-dropzone-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 12px;
}

.vdp-dropzone-content p {
    font-size: 16px;
    color: #555;
    margin: 8px 0;
}

.vdp-dropzone-content .vdp-dropzone-hint {
    font-size: 13px;
    color: #999;
}

/* 上传设置区域 */
.vdp-upload-settings {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.vdp-upload-field {
    flex: 1;
    min-width: 200px;
}

.vdp-upload-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
}

.vdp-upload-field select,
.vdp-upload-field input[type="number"] {
    width: 100%;
}

.vdp-field-desc {
    font-size: 12px;
    color: #999;
    margin: 4px 0 0 0;
}

.vdp-pay-fields {
    display: flex;
    gap: 8px;
}

.vdp-pay-fields select {
    flex: 0 0 120px;
}

.vdp-pay-fields input[type="number"] {
    flex: 1;
}

/* 文件列表 */
.vdp-file-list {
    margin: 16px 0;
}

.vdp-file-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 6px;
    margin-bottom: 8px;
    gap: 12px;
    animation: vdpSlideIn 0.3s ease;
}

@keyframes vdpSlideIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.vdp-file-item .vdp-format-badge {
    flex-shrink: 0;
}

.vdp-file-item-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vdp-file-item-size {
    color: #999;
    font-size: 13px;
    flex-shrink: 0;
}

.vdp-file-item-status {
    flex-shrink: 0;
    font-size: 13px;
    min-width: 80px;
    text-align: right;
}

.vdp-file-item.vdp-uploading {
    border-left: 3px solid #2271b1;
}

.vdp-file-item.vdp-success {
    border-left: 3px solid #27ae60;
}

.vdp-file-item.vdp-error {
    border-left: 3px solid #e74c3c;
}

.vdp-file-item.vdp-duplicate {
    border-left: 3px solid #f39c12;
}

/* 操作按钮 */
.vdp-actions {
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 16px;
}

.vdp-upload-status {
    color: #666;
    font-size: 14px;
}

/* 进度条 */
.vdp-progress-wrap {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.vdp-progress-bar {
    height: 8px;
    background: #eee;
    border-radius: 4px;
    overflow: hidden;
    margin: 12px 0;
}

.vdp-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #2271b1, #4caf50);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.vdp-progress-text {
    color: #666;
    font-size: 14px;
    margin-bottom: 12px;
}

.vdp-results .vdp-result-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    gap: 8px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
}

.vdp-results .vdp-result-item:last-child {
    border-bottom: none;
}

.vdp-result-success { color: #27ae60; }
.vdp-result-error   { color: #e74c3c; }
.vdp-result-link    { color: #2271b1; text-decoration: none; }
.vdp-result-link:hover { text-decoration: underline; }

/* 连接测试按钮 */
.vdp-connection-test {
    margin: 20px 0;
    padding: 16px;
    background: #f9f9f9;
    border-radius: 6px;
}
