/* 文档预览平台门户样式 */
:root {
    --portal-primary: #1677ff;
    --portal-primary-dark: #0958d9;
    --portal-success: #52c41a;
    --portal-text: #333;
    --portal-muted: #666;
    --portal-border: #e5e5e5;
    --portal-footer-bg: #1f2937;
    --portal-sidebar-bg: #fafafa;
    --portal-link: #1677ff;
}

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

body {
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    color: var(--portal-text);
    background: #fff;
    line-height: 1.6;
    min-height: 100vh;
}

a { color: var(--portal-link); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== Header ===== */
.site-header {
    border-bottom: 1px solid var(--portal-border);
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: 1140px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-logo {
    font-size: 22px;
    font-weight: 700;
    color: var(--portal-primary);
    text-decoration: none !important;
}

.site-logo:hover { color: var(--portal-primary-dark); }

.site-nav {
    display: flex;
    list-style: none;
    gap: 0;
}

.site-nav a {
    display: block;
    padding: 10px 18px;
    color: #444;
    font-size: 15px;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

.site-nav a:hover { color: var(--portal-primary); text-decoration: none; }

.site-nav a.active {
    color: var(--portal-primary);
    border-bottom-color: var(--portal-primary);
}

/* ===== Home Hero ===== */
.hero-section {
    text-align: center;
    padding: 50px 20px 30px;
}

.hero-section h1 {
    font-size: 36px;
    font-weight: 400;
    color: #444;
    margin-bottom: 8px;
    line-height: 1.4;
}

.hero-section h1 small {
    display: block;
    font-size: 20px;
    color: #888;
    font-weight: 300;
    margin-top: 8px;
}

.hero-desc {
    text-align: center;
    color: #666;
    font-size: 15px;
    margin: 12px auto 24px;
    max-width: 560px;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 30px;
}

.btn-outline {
    display: inline-block;
    padding: 10px 28px;
    border: 1px solid var(--portal-primary);
    color: var(--portal-primary) !important;
    border-radius: 4px;
    font-size: 15px;
    text-decoration: none !important;
}

.btn-outline:hover {
    background: #f0f7ff;
    text-decoration: none !important;
}

/* Hero devices */
.hero-devices {
    max-width: 900px;
    margin: 30px auto 0;
    padding: 0 20px;
}

.hero-devices img,
.hero-devices svg {
    width: 100%;
    max-width: 820px;
    height: auto;
}

/* Feature strip on home */
.feature-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: #f7f7f7;
    border-top: 1px solid var(--portal-border);
    border-bottom: 1px solid var(--portal-border);
    max-width: 100%;
}

.feature-strip-item {
    padding: 28px 20px;
    text-align: center;
    border-right: 1px solid var(--portal-border);
}

.feature-strip-item:last-child { border-right: none; }

.feature-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #555;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
}

.feature-strip-item h5 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #333;
}

.feature-strip-item p {
    font-size: 13px;
    color: #888;
}

/* ===== Inner page layout ===== */
.page-wrap {
    max-width: 1140px;
    margin: 0 auto;
    padding: 40px 20px 60px;
    display: flex;
    gap: 40px;
}

.page-main { flex: 1; min-width: 0; }

.page-sidebar {
    width: 180px;
    flex-shrink: 0;
}

.page-title {
    text-align: center;
    font-size: 28px;
    font-weight: 400;
    color: #444;
    margin-bottom: 36px;
}

.page-sidebar nav a {
    display: block;
    padding: 8px 0;
    color: #555;
    font-size: 14px;
    border-bottom: 1px dotted #ddd;
    text-decoration: none;
}

.page-sidebar nav a:hover,
.page-sidebar nav a.active {
    color: var(--portal-primary);
}

/* Content sections */
.content-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--portal-border);
}

.content-section:last-child { border-bottom: none; }

.content-section h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 14px;
    color: #333;
}

.content-section p,
.content-section li {
    font-size: 14px;
    color: #555;
    margin-bottom: 10px;
}

.content-section ul { padding-left: 20px; }

.manual-table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0 16px;
    font-size: 14px;
}

.manual-table th,
.manual-table td {
    border: 1px solid var(--portal-border);
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
}

.manual-table th {
    background: var(--portal-sidebar-bg);
    font-weight: 600;
    color: #333;
}

.manual-table code {
    background: #f5f5f5;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 13px;
}

.tip-note {
    background: #fff8e6;
    border-left: 3px solid var(--portal-primary);
    padding: 10px 14px;
    color: #856404;
    font-size: 13px;
}

/* ===== Buttons ===== */
.btn-primary {
    display: inline-block;
    padding: 10px 28px;
    background: var(--portal-primary);
    color: #fff !important;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    cursor: pointer;
    text-decoration: none !important;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: var(--portal-primary-dark);
    text-decoration: none !important;
}

.btn-primary.btn-sm { padding: 8px 20px; font-size: 14px; }

.btn-group { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }

/* Upload */
.upload-area { margin: 16px 0; }

.upload-file-input {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    overflow: hidden;
}

.upload-file-label {
    cursor: pointer;
    display: inline-block;
}

.upload-btn-wrap {
    position: relative;
    display: inline-block;
}

.upload-btn-wrap input[type="file"] {
    position: absolute;
    left: 0; top: 0;
    width: 100%; height: 100%;
    opacity: 0;
    cursor: pointer;
}

.format-list {
    margin-top: 20px;
    font-size: 14px;
    line-height: 2;
    color: #555;
}

.format-list .label { font-weight: 600; color: #333; }

.url-input {
    width: 100%;
    max-width: 680px;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 14px;
    margin: 10px 0;
}

.preview-link-box {
    background: #f9f9f9;
    border: 1px solid #eee;
    padding: 12px 14px;
    font-size: 13px;
    color: #666;
    word-break: break-all;
    margin: 10px 0;
    border-radius: 3px;
}

.tip-red { color: #d9534f; font-size: 13px; }

.upload-status {
    margin-top: 14px;
    padding: 10px 14px;
    border-radius: 4px;
    font-size: 14px;
    display: none;
}

.upload-status.success {
    background: #dff0d8;
    color: #3c763d;
    border: 1px solid #d6e9c6;
}

.upload-status.success .admin-preview-link {
    color: #2563eb;
    font-weight: 600;
    text-decoration: underline;
    margin-left: 4px;
}

.upload-status.error {
    background: #f2dede;
    color: #a94442;
    border: 1px solid #ebccd1;
}

/* Price */
.price-block {
    text-align: center;
    padding: 30px 20px;
    border-bottom: 1px solid var(--portal-border);
}

.price-block h3 { font-size: 20px; font-weight: 600; margin-bottom: 12px; }

.price-block p { font-size: 14px; color: #666; margin-bottom: 8px; }

.price-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--portal-green);
    margin-top: 12px;
}

/* About */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 40px;
    align-items: start;
}

.about-text p { margin-bottom: 14px; font-size: 14px; color: #555; line-height: 1.8; }

.cert-placeholder {
    background: #f5f5f5;
    border: 1px solid #ddd;
    height: 160px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    font-size: 13px;
}

.client-logos {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.client-logo {
    height: 60px;
    background: #f8f8f8;
    border: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #999;
    font-weight: 600;
}

/* ===== Footer ===== */
.site-footer {
    background: var(--portal-footer-bg);
    color: #aaa;
    padding: 40px 20px 30px;
    margin-top: auto;
}

.footer-inner {
    max-width: 1140px;
    margin: 0 auto;
    text-align: center;
}

.footer-nav {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 24px;
    margin-bottom: 24px;
}

.footer-nav a { color: #ccc; font-size: 14px; text-decoration: none; }
.footer-nav a:hover { color: #fff; }

.footer-info {
    font-size: 13px;
    line-height: 2;
    color: #888;
}

.footer-copy {
    margin-top: 16px;
    font-size: 12px;
    color: #666;
}

/* Customer service tab - removed for enterprise deployment */

/* Loading overlay */
.upload-loading {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.85);
    z-index: 200;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
}

.upload-loading.show { display: flex; }

.spinner {
    width: 40px; height: 40px;
    border: 3px solid #eee;
    border-top-color: var(--portal-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 768px) {
    .feature-strip { grid-template-columns: repeat(2, 1fr); }
    .feature-strip-item:nth-child(2) { border-right: none; }
    .page-wrap { flex-direction: column; }
    .page-sidebar { width: 100%; }
    .about-grid { grid-template-columns: 1fr; }
    .client-logos { grid-template-columns: repeat(2, 1fr); }
    .site-nav a { padding: 8px 10px; font-size: 13px; }
}
