* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f3f4f6;
    color: #1f2937;
}

a { color: inherit; text-decoration: none; }

/* ==================== 登录页 ==================== */
.login-page {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a7a2e 0%, #0f2e17 100%);
}
.login-card {
    width: 380px;
    background: white;
    border-radius: 16px;
    padding: 40px 36px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}
.login-brand {
    text-align: center;
    margin-bottom: 28px;
}
.login-brand .brand-icon { font-size: 2.2rem; }
.login-brand h1 { font-size: 1.3rem; color: #111827; margin-top: 8px; }
.login-brand p { font-size: 0.8rem; color: #9ca3af; margin-top: 2px; letter-spacing: 1px; }
.login-form { display: flex; flex-direction: column; gap: 6px; }
.login-form label { color: #4b5563; font-size: 0.85rem; margin-top: 10px; }
.login-form input {
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.95rem;
}
.login-form input:focus { outline: none; border-color: #2d9c3e; }
.pc-btn-primary {
    margin-top: 20px;
    padding: 11px 0;
    border-radius: 8px;
    border: none;
    background: #2d9c3e;
    color: white;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}
.pc-btn-primary:hover { background: #248c34; }
.pc-btn-primary:disabled { background: #9ca3af; cursor: not-allowed; }
.login-error { color: #b91c1c; font-size: 0.85rem; margin-top: 10px; }

/* ==================== 应用整体布局 ==================== */
.pc-app {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.pc-sidebar {
    width: 210px;
    flex-shrink: 0;
    background: #14321c;
    color: #cbd5e1;
    display: flex;
    flex-direction: column;
}
.pc-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 20px 18px;
    font-size: 1.05rem;
    font-weight: bold;
    color: white;
    border-bottom: 3px solid #ffcd3c;
}
.pc-nav { flex: 1; padding: 10px 0; }
.pc-nav-item {
    display: block;
    padding: 12px 22px;
    font-size: 0.92rem;
    color: #cbd5e1;
    cursor: pointer;
    transition: background 0.15s;
}
.pc-nav-item:hover { background: #1f4a29; color: white; }
.pc-nav-item.active { background: #2d9c3e; color: white; }

.pc-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.pc-topbar {
    height: 56px;
    flex-shrink: 0;
    background: white;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}
.pc-topbar-title { font-size: 1rem; font-weight: 600; color: #111827; }
.pc-topbar-user {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 0.88rem;
    color: #6b7280;
}
.pc-topbar-user a { color: #2d9c3e; }

.pc-content {
    flex: 1;
    overflow-y: auto;
    padding: 32px 40px;
}

/* ==================== 比价查询页 ==================== */
.pc-hero { text-align: center; margin-bottom: 28px; }
.pc-hero h2 { font-size: 1.6rem; color: #111827; }
.pc-hero p { color: #6b7280; margin-top: 6px; font-size: 0.9rem; }

.pc-card {
    background: white;
    border-radius: 14px;
    padding: 26px 28px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    margin-bottom: 24px;
    max-width: 920px;
    margin-left: auto;
    margin-right: auto;
}
.pc-card-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 10px;
}
.pc-textarea {
    width: 100%;
    min-height: 90px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 0.95rem;
    resize: vertical;
    font-family: inherit;
}
.pc-textarea:focus { outline: none; border-color: #2d9c3e; }

.pc-hot-tags { margin-top: 14px; font-size: 0.85rem; color: #6b7280; }
.pc-tag {
    display: inline-block;
    background: #eef3ea;
    color: #2d6a2f;
    border: 1px solid #cde0cd;
    border-radius: 14px;
    padding: 3px 12px;
    margin: 4px 4px 0 0;
    font-size: 0.82rem;
    cursor: pointer;
}
.pc-tag:hover { background: #e2f0e2; }

.pc-platform-group { display: flex; gap: 10px; margin-top: 16px; }
.pc-platform-option {
    flex: 1;
    text-align: center;
    padding: 10px 0;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #4b5563;
    transition: all 0.15s;
}
.pc-platform-option.active {
    border-color: #2d9c3e;
    background: #eef3ea;
    color: #1a5c2a;
    font-weight: 600;
}

.pc-steps {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin: 24px 0 18px;
}
.pc-step { flex: 1; text-align: center; position: relative; }
.pc-step::after {
    content: '';
    position: absolute;
    top: 15px;
    right: -50%;
    width: 100%;
    height: 2px;
    background: #e5e7eb;
    z-index: 0;
}
.pc-step:last-child::after { display: none; }
.pc-step.done::after { background: #22c55e; }
.pc-step-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    font-size: 0.85rem;
    font-weight: bold;
    position: relative;
    z-index: 1;
}
.pc-step.done .pc-step-circle { background: #22c55e; color: white; }
.pc-step.active .pc-step-circle { background: #2d9c3e; color: white; }
.pc-step-title { font-size: 0.85rem; color: #374151; font-weight: 600; }
.pc-step-desc { font-size: 0.75rem; color: #9ca3af; margin-top: 2px; }

.pc-progress-line {
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    background: #eef3ea;
    color: #1a5c2a;
    font-size: 0.88rem;
    margin-top: 4px;
}

.pc-actions { text-align: center; margin-top: 18px; }

.pc-parsed-box {
    margin-top: 18px;
    padding: 18px;
    background: #f0fdf4;
    border-radius: 10px;
    border: 1px solid #bbf7d0;
}
.pc-confidence-badge {
    display: inline-block;
    font-size: 0.8rem;
    padding: 3px 10px;
    border-radius: 10px;
    margin-bottom: 12px;
    font-weight: 600;
}
.pc-confidence-badge.high { background: #dcfce7; color: #15803d; }
.pc-confidence-badge.medium { background: #fef3c7; color: #92400e; }
.pc-confidence-badge.low { background: #fee2e2; color: #b91c1c; }
.pc-parsed-fields {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}
.pc-field label { display: block; font-size: 0.78rem; color: #6b7280; margin-bottom: 4px; }
.pc-field input {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.88rem;
    background: white;
}

/* ==================== 结果详情区 ==================== */
.pc-result-header {
    max-width: 920px;
    margin: 0 auto 20px;
}
.pc-result-header h3 { font-size: 1.2rem; color: #111827; }
.pc-result-meta { margin-top: 6px; display: flex; gap: 8px; flex-wrap: wrap; }
.pc-meta-tag {
    font-size: 0.78rem;
    background: #f3f4f6;
    color: #6b7280;
    padding: 3px 10px;
    border-radius: 10px;
}

.pc-result-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto 20px;
}
.pc-price-range { text-align: center; padding: 20px 0; }
.pc-price-range .range-value { font-size: 1.8rem; color: #2d9c3e; font-weight: bold; }
.pc-price-sub { display: flex; justify-content: center; gap: 40px; margin-top: 18px; }
.pc-price-sub div { text-align: center; }
.pc-price-sub .label { font-size: 0.78rem; color: #9ca3af; }
.pc-price-sub .value { font-size: 1.1rem; font-weight: 600; color: #111827; margin-top: 2px; }

.pc-ai-analysis { font-size: 0.9rem; line-height: 1.7; color: #374151; max-height: 320px; overflow-y: auto; }
.pc-ai-analysis h1, .pc-ai-analysis h2, .pc-ai-analysis h3 { font-size: 1rem; margin: 10px 0 6px; color: #111827; }
.pc-ai-analysis table { border-collapse: collapse; margin: 8px 0; width: 100%; }
.pc-ai-analysis th, .pc-ai-analysis td { border: 1px solid #e5e7eb; padding: 4px 8px; font-size: 0.82rem; }
.pc-ai-analysis code { background: #f3f4f6; padding: 1px 4px; border-radius: 4px; }

.pc-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 16px;
}

.pc-bar-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    height: 200px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px 0;
}
.pc-bar-item { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; width: 80px; }
.pc-bar-value { font-size: 0.82rem; color: #374151; margin-bottom: 6px; font-weight: 600; }
.pc-bar { width: 44px; border-radius: 4px 4px 0 0; }
.pc-bar.min { background: #22c55e; }
.pc-bar.median { background: #3b82f6; }
.pc-bar.max { background: #ef4444; }
.pc-bar.recommend { background: #f59e0b; }
.pc-bar-label { font-size: 0.8rem; color: #6b7280; margin-top: 8px; }

.pc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    max-width: 1200px;
    margin: 0 auto;
}
.pc-table th, .pc-table td {
    text-align: left;
    padding: 10px 14px;
    border-bottom: 1px solid #f1f5f9;
}
.pc-table th { color: #6b7280; font-weight: 600; background: #f9fafb; }
.pc-table .price-min-tag {
    background: #dcfce7; color: #15803d; font-size: 0.72rem; padding: 1px 6px; border-radius: 6px; margin-left: 6px;
}
.pc-match-badge {
    font-size: 0.78rem;
    padding: 2px 8px;
    border-radius: 8px;
    background: #eef3ea;
    color: #1a5c2a;
}
.pc-source-link { font-size: 0.78rem; color: #2d9c3e; }

/* ==================== 历史查询页 ==================== */
.pc-history-toolbar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 18px;
}
.pc-search-input {
    width: 260px;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.88rem;
}
.pc-badge {
    font-size: 0.78rem;
    padding: 2px 10px;
    border-radius: 10px;
    font-weight: 600;
}
.pc-badge.high { background: #dcfce7; color: #15803d; }
.pc-badge.medium { background: #fef3c7; color: #92400e; }
.pc-badge.low { background: #fee2e2; color: #b91c1c; }
.pc-badge.done { background: #dcfce7; color: #15803d; }
.pc-badge.failed { background: #fee2e2; color: #b91c1c; }

.pc-link-btn {
    border: none;
    background: none;
    color: #2d9c3e;
    cursor: pointer;
    font-size: 0.85rem;
    margin-right: 10px;
}
.pc-link-btn.danger { color: #ef4444; }

.pc-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 20px;
    font-size: 0.85rem;
    color: #6b7280;
}
.pc-pager button {
    padding: 6px 14px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    background: white;
    cursor: pointer;
}
.pc-pager button:disabled { color: #d1d5db; cursor: not-allowed; }

.pc-empty { text-align: center; color: #9ca3af; padding: 40px 0; }

/* ==================== 批量查询页 ==================== */
.pc-tabs { display: flex; gap: 6px; margin-bottom: 22px; max-width: 920px; margin-left: auto; margin-right: auto; }
.pc-tab {
    padding: 9px 22px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #6b7280;
    background: #f3f4f6;
}
.pc-tab.active { background: #2d9c3e; color: white; }

.pc-upload-box {
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    padding: 36px 20px;
    text-align: center;
    cursor: pointer;
}
.pc-upload-box:hover { border-color: #2d9c3e; background: #f4f8f2; }
.pc-upload-box .icon { font-size: 2.2rem; }
.pc-upload-box p { color: #4b5563; margin-top: 6px; }
.pc-upload-hint { font-size: 0.78rem; color: #9ca3af; margin-top: 4px; }

.pc-selected-file {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f3f4f6;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 0.88rem;
    margin-top: 12px;
}
.pc-selected-file button {
    background: #ef4444; color: white; border: none; border-radius: 50%;
    width: 18px; height: 18px; font-size: 0.65rem; cursor: pointer;
}

.pc-task-progress { margin-top: 22px; }
.pc-progress-bar-outer {
    height: 10px;
    background: #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
}
.pc-progress-bar-inner {
    height: 100%;
    background: #2d9c3e;
    transition: width 0.3s;
}
.pc-task-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    color: #6b7280;
    margin-top: 8px;
}

.pc-spinner {
    width: 16px; height: 16px;
    border: 2px solid #e2f0e2;
    border-top-color: #2d9c3e;
    border-radius: 50%;
    display: inline-block;
    animation: pc-spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}
@keyframes pc-spin { to { transform: rotate(360deg); } }
