/* ============================================================
   快递001 · 门户页统一样式 (导航中心 / 系统全景)
   ============================================================ */

.portal-page {
    min-height: 100vh;
    background: var(--eh-bg-base);
    color: var(--eh-text-primary);
    font-family: var(--eh-font-sans);
    overflow-x: hidden;
}

.portal-page .container,
.portal-page .wrap {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: clamp(24px, 3vw, 48px) clamp(16px, 2vw, 32px);
    position: relative;
    z-index: 1;
}

.portal-page .header,
.portal-page .hero {
    text-align: center;
    margin-bottom: 36px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--eh-border);
}

.portal-page .header h1,
.portal-page .hero h1 {
    font-size: clamp(1.75rem, 3vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
    color: var(--eh-text-primary);
}

.portal-page .header h1 .gradient,
.portal-page .hero h1 .gradient {
    color: var(--eh-brand);
    -webkit-text-fill-color: var(--eh-brand);
    background: none;
}

.portal-page .header p,
.portal-page .hero p {
    color: var(--eh-text-secondary);
    font-size: var(--eh-text-sm);
    line-height: 1.7;
    max-width: 720px;
    margin: 0 auto;
}

.portal-page .tabs {
    display: flex;
    justify-content: center;
    gap: var(--eh-space-2);
    margin-bottom: var(--eh-space-8);
    flex-wrap: wrap;
}

.portal-page .tab {
    padding: 10px 18px;
    background: var(--eh-surface);
    border: 1px solid var(--eh-border);
    border-radius: var(--eh-radius-full);
    color: var(--eh-text-secondary);
    font-size: var(--eh-text-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--eh-duration);
    font-family: var(--eh-font-sans);
}

.portal-page .tab:hover {
    border-color: var(--eh-border-brand);
    color: var(--eh-brand-light);
}

.portal-page .tab.active {
    background: var(--eh-brand-muted);
    border-color: var(--eh-border-brand);
    color: var(--eh-brand);
}

.portal-page .nav-section {
    margin-bottom: var(--eh-space-8);
}

.portal-page .section-head {
    display: flex;
    align-items: center;
    gap: var(--eh-space-3);
    margin-bottom: var(--eh-space-4);
    padding-bottom: var(--eh-space-3);
    border-bottom: 1px solid var(--eh-border);
}

.portal-page .section-head .icon {
    width: 40px;
    height: 40px;
    border-radius: var(--eh-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    background: var(--eh-brand-subtle);
    color: var(--eh-brand);
}

.portal-page .section-head h2 {
    font-size: var(--eh-text-lg);
    font-weight: 800;
    flex: 1;
}

.portal-page .section-head .count {
    font-size: var(--eh-text-xs);
    color: var(--eh-text-muted);
    background: var(--eh-bg-subtle);
    padding: 4px 10px;
    border-radius: var(--eh-radius-full);
    font-weight: 600;
}

.portal-page .page-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--eh-space-3);
}

.portal-page .page-card,
.portal-page .sys-card {
    background: var(--eh-surface-solid);
    border: 1px solid var(--eh-border);
    border-radius: var(--eh-radius-lg);
    padding: 16px 18px;
    transition: border-color var(--eh-duration), box-shadow var(--eh-duration);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--eh-shadow-xs);
}

.portal-page .page-card:hover,
.portal-page .sys-card:hover {
    border-color: var(--eh-border-strong);
    box-shadow: var(--eh-shadow-sm);
}

.portal-page .page-card .code,
.portal-page .sys-card .code {
    font-family: var(--eh-font-mono);
    font-size: var(--eh-text-xs);
    font-weight: 700;
    color: var(--eh-brand-light);
    background: var(--eh-brand-muted);
    padding: 3px 8px;
    border-radius: var(--eh-radius-sm);
    display: inline-block;
    margin-bottom: 8px;
}

.portal-page .page-card .title,
.portal-page .sys-card .name {
    font-size: var(--eh-text-base);
    font-weight: 700;
    color: var(--eh-text-primary);
    margin-bottom: 6px;
}

.portal-page .page-card .desc,
.portal-page .sys-card .desc {
    font-size: var(--eh-text-sm);
    color: var(--eh-text-muted);
    line-height: 1.55;
}

.portal-page .stats {
    display: flex;
    justify-content: center;
    gap: var(--eh-space-8);
    flex-wrap: wrap;
    margin-top: var(--eh-space-5);
}

.portal-page .stats .n {
    font-size: 2rem;
    font-weight: 800;
    font-family: var(--eh-font-mono);
    color: var(--eh-brand-light);
}

.portal-page .stats .l {
    font-size: var(--eh-text-xs);
    color: var(--eh-text-muted);
    margin-top: 4px;
    font-weight: 600;
}

.portal-page .toolbar {
    display: flex;
    gap: var(--eh-space-3);
    flex-wrap: wrap;
    margin-bottom: var(--eh-space-6);
    align-items: center;
}

.portal-page .toolbar input,
.portal-page .toolbar select {
    flex: 1;
    min-width: 200px;
    max-width: 360px;
}

.portal-page .toolbar .chip {
    font-size: var(--eh-text-xs);
    padding: 7px 14px;
    border-radius: var(--eh-radius-full);
    border: 1px solid var(--eh-border);
    color: var(--eh-text-muted);
    cursor: pointer;
    background: transparent;
    font-family: var(--eh-font-sans);
    font-weight: 600;
    transition: all var(--eh-duration);
}

.portal-page .toolbar .chip.active {
    border-color: var(--eh-border-brand);
    color: var(--eh-brand-light);
    background: var(--eh-brand-muted);
}

.portal-page .domain-block { margin-bottom: var(--eh-space-8); }

.portal-page .domain-head {
    display: flex;
    align-items: center;
    gap: var(--eh-space-3);
    margin-bottom: var(--eh-space-4);
    padding-bottom: var(--eh-space-3);
    border-bottom: 1px solid var(--eh-border);
}

.portal-page .domain-head .icon {
    width: 36px;
    height: 36px;
    border-radius: var(--eh-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--eh-brand-muted);
    color: var(--eh-brand-light);
}

.portal-page .domain-head h2 {
    font-size: var(--eh-text-base);
    font-weight: 800;
    flex: 1;
}

.portal-page .sys-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--eh-space-3);
}

.portal-page .sys-card .bar {
    height: 4px;
    background: var(--eh-bg-muted);
    border-radius: var(--eh-radius-full);
    overflow: hidden;
    margin: 10px 0 6px;
}

.portal-page .sys-card .bar .fill {
    height: 100%;
    background: var(--eh-grad-brand);
    border-radius: var(--eh-radius-full);
}

.portal-page .mod-tags span.done { background: var(--eh-success-muted); color: var(--eh-success); }
.portal-page .mod-tags span.partial { background: var(--eh-warning-muted); color: var(--eh-warning); }
.portal-page .mod-tags span.plan { background: rgba(100,116,139,0.12); color: var(--eh-text-muted); }

.portal-page .mod-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 10px;
}

.portal-page .mod-tags span {
    font-size: 0.625rem;
    padding: 2px 7px;
    border-radius: var(--eh-radius-full);
    font-weight: 600;
}

.portal-page .legend {
    display: flex;
    gap: var(--eh-space-4);
    font-size: var(--eh-text-xs);
    color: var(--eh-text-muted);
    margin-bottom: var(--eh-space-5);
    flex-wrap: wrap;
}

.portal-page .legend i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.portal-page .footer {
    text-align: center;
    font-size: var(--eh-text-xs);
    color: var(--eh-text-faint);
    margin-top: var(--eh-space-10);
    padding-top: var(--eh-space-5);
    border-top: 1px solid var(--eh-border);
}

.portal-page .back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--eh-text-secondary);
    text-decoration: none;
    font-size: var(--eh-text-sm);
    font-weight: 600;
    margin-bottom: var(--eh-space-4);
    transition: color var(--eh-duration);
}

.portal-page .back-link:hover { color: var(--eh-brand-light); }

/* —— navigation.html 兼容 —— */
.portal-page .nav-section {
    margin-bottom: var(--eh-space-8);
}

.portal-page .nav-section h2 {
    display: flex;
    align-items: center;
    gap: var(--eh-space-3);
    font-size: var(--eh-text-lg);
    font-weight: 800;
    margin-bottom: var(--eh-space-4);
    padding-bottom: var(--eh-space-3);
    border-bottom: 1px solid var(--eh-border);
    color: var(--eh-text-primary);
}

.portal-page .nav-section h2 .count {
    margin-left: auto;
    font-size: var(--eh-text-xs);
    font-weight: 600;
    color: var(--eh-text-muted);
    background: var(--eh-bg-subtle);
    padding: 4px 10px;
    border-radius: var(--eh-radius-full);
}

.portal-page .page-card {
    display: flex;
    align-items: center;
    gap: var(--eh-space-3);
    text-decoration: none;
    color: inherit;
}

.portal-page .page-code {
    font-family: var(--eh-font-mono);
    font-size: var(--eh-text-xs);
    font-weight: 700;
    color: var(--eh-brand-light);
    background: var(--eh-brand-muted);
    padding: 4px 9px;
    border-radius: var(--eh-radius-sm);
    flex-shrink: 0;
}

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

.portal-page .page-title {
    font-size: var(--eh-text-sm);
    font-weight: 700;
    color: var(--eh-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.portal-page .page-desc {
    font-size: var(--eh-text-xs);
    color: var(--eh-text-muted);
    margin-top: 2px;
}

.portal-page .page-arrow {
    color: var(--eh-text-faint);
    font-size: 0.75rem;
    transition: all var(--eh-duration);
    flex-shrink: 0;
}

.portal-page .page-card:hover .page-arrow {
    color: var(--eh-brand-light);
    transform: translateX(3px);
}

.portal-page .header a {
    color: var(--eh-brand-light) !important;
    font-weight: 600;
}
