:root {
    --primary: #C62828;
    --primary-dark: #a31f1f;
    --primary-soft: #fde8e8;
    --bg: #fafafa;
    --card: #ffffff;
    --text: #2D2D2D;
    --muted: #8a8a8a;
    --line: #ececec;
    --input-border: #dcdcdc;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                 "Hiragino Sans GB", "Microsoft YaHei", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============ 顶部导航（白色基调，红色强调） ============ */
.site-header {
    background: #fff;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 20;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.site-header-inner {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 20px;
    height: 62px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    min-width: 0;
}
.brand-logo {
    height: 32px;
    width: auto;
    display: block;
}
.brand-name {
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.site-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}
.site-nav a {
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
    padding: 7px 12px;
    border-radius: 8px;
    white-space: nowrap;
    transition: background .15s, color .15s;
}
.site-nav a:hover { background: #f3f3f3; color: var(--text); }
.site-nav a.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }

/* 返回平台 — 红色描边按钮，hover 填充 */
.site-nav a.back-link {
  color: var(--primary);
  font-weight: 600;
  border: 1px solid #f0caca;
  background: var(--primary-soft);
  margin-right: 6px;
}
.site-nav a.back-link:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ============ 页面主体 ============ */
.page { flex: 1 0 auto; padding: 28px 0; }
.container { max-width: 880px; margin: 0 auto; padding: 0 18px; }

/* ============ 卡片（白底 + 红色左边栏） ============ */
.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-left: 4px solid var(--primary);
    border-radius: 14px;
    padding: 22px 24px;
    margin-bottom: 18px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.card h2 { font-size: 16px; margin: 0 0 16px; color: var(--primary); font-weight: 600; }
.card h3 { font-size: 15px; margin: 0 0 10px; color: var(--text); font-weight: 600; }

/* ============ 表单 ============ */
.form-row { display: flex; gap: 14px; flex-wrap: wrap; }
.field { flex: 1; min-width: 150px; margin-bottom: 14px; }
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
input, select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--input-border);
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    color: var(--text);
    font-family: inherit;
}
input:focus, select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(198,40,40,0.10); }

/* ============ 按钮 ============ */
button { font-family: inherit; cursor: pointer; }
button.primary, .btn.primary {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 11px 22px;
    border-radius: 8px;
    font-size: 14px;
    transition: background .15s;
}
button.primary:hover, .btn.primary:hover { background: var(--primary-dark); }
button.ghost, .btn.ghost {
    background: #efefef;
    color: var(--text);
    border: none;
    padding: 11px 22px;
    border-radius: 8px;
    font-size: 14px;
}
button.ghost:hover, .btn.ghost:hover { background: #e4e4e4; }
button:disabled { background: #c8c8c8 !important; cursor: not-allowed; }

/* ============ 提示信息 ============ */
.msg { margin-top: 14px; font-size: 14px; padding: 10px 14px; border-radius: 8px; line-height: 1.5; }
.msg.error { background: #fdecea; color: #ab091e; }
.msg.ok { background: #e3f9e5; color: #0b6b2f; }
.msg.warn { background: #fff4e5; color: #a35000; }

/* ============ 结果表 ============ */
.result-table { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 14px; }
.result-table th, .result-table td {
    border: 1px solid var(--line);
    padding: 10px 12px;
    text-align: left;
}
.result-table th { background: #f7f7f7; color: var(--muted); font-weight: 600; }
.price-big { font-size: 22px; font-weight: 700; color: var(--primary); }
.tag {
    display: inline-block;
    background: #fff4e5;
    color: #a35000;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 6px;
}
.muted { color: var(--muted); font-size: 12px; }
.footnote { font-size: 12px; color: var(--muted); margin-top: 10px; line-height: 1.6; }
.datalist-wrap { position: relative; }

/* ============ 询价单填价页用的辅助类 ============ */
.nav { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.nav a {
    padding: 7px 14px;
    border-radius: 8px;
    background: #f1f1f1;
    color: #555;
    text-decoration: none;
    font-size: 14px;
    transition: background .15s, color .15s;
}
.nav a:hover { background: #e8e8e8; }
.nav a.active { background: var(--primary); color: #fff; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.legend { display: flex; gap: 14px; font-size: 12px; margin: 8px 0; color: var(--muted); }
.dot { display: inline-block; width: 11px; height: 11px; border-radius: 3px; vertical-align: middle; margin-right: 4px; }

/* ============ 落地页卡片网格 ============ */
.intro {
    background: var(--card);
    border: 1px solid var(--line);
    border-left: 4px solid var(--primary);
    border-radius: 14px;
    padding: 22px 24px;
    margin-bottom: 18px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.intro h2 { margin: 0 0 8px; font-size: 20px; color: var(--text); }
.intro p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
.tile-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}
@media (max-width: 720px) { .tile-grid { grid-template-columns: 1fr; } }
.tile {
    background: var(--card);
    border: 1px solid var(--line);
    border-left: 4px solid var(--primary);
    border-radius: 14px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: transform .15s ease, box-shadow .15s ease;
}
.tile:hover { transform: translateY(-2px); box-shadow: 0 6px 22px rgba(15,23,42,0.08); }
.tile h3 { margin: 0; font-size: 17px; display: flex; align-items: center; gap: 8px; color: var(--text); }
.tile .ico { font-size: 20px; }
.tile .desc { color: var(--muted); font-size: 13px; line-height: 1.6; }
.tile .meta { font-size: 12px; color: #aaa; }

/* ============ 智能体平台门户网格 ============ */
.portal-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
@media (max-width: 920px) { .portal-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .portal-grid { grid-template-columns: 1fr; } }
.mod-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-left: 4px solid var(--primary);
    border-radius: 14px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    min-height: 230px;
    transition: transform .15s ease, box-shadow .15s ease;
}
.mod-card:hover { transform: translateY(-2px); box-shadow: 0 6px 22px rgba(15,23,42,0.08); }
.mod-card.highlight { box-shadow: 0 0 0 2px rgba(198,40,40,0.12); }
.mod-card-top { display: flex; align-items: flex-start; justify-content: space-between; }
.mod-card .icon {
    width: 44px; height: 44px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; color: #fff; background: var(--primary);
}
.status {
    font-size: 12px; padding: 4px 10px; border-radius: 999px; font-weight: 500;
}
.status.on { background: #e3f9e5; color: #0b6b2f; }
.status.dev { background: #fff4e5; color: #a35000; }
.mod-card h3 { margin: 14px 0 8px; font-size: 17px; font-weight: 600; color: var(--text); }
.mod-card .desc { font-size: 13px; color: var(--muted); line-height: 1.55; flex-grow: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 14px; }
.tags .tag-chip {
    font-size: 12px; padding: 3px 9px;
    background: #f1f1f1; color: #555; border-radius: 6px;
}
.enter {
    display: inline-flex; align-items: center; gap: 4px;
    color: var(--primary); font-size: 13px; text-decoration: none; font-weight: 500;
    margin-top: auto;
}
.enter:hover { text-decoration: underline; }
.enter.disabled { color: #bbb; pointer-events: none; }
.divider { height: 1px; background: var(--line); margin: 14px 0 12px; }

/* ============ 页脚（居中版权） ============ */
.site-footer {
    flex-shrink: 0;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    padding: 26px 0 34px;
    border-top: 1px solid var(--line);
    background: #fff;
    margin-top: 12px;
}

/* ============ 响应式 ============ */
@media (max-width: 600px) {
    .site-header-inner { height: auto; padding: 10px 14px; flex-direction: column; align-items: flex-start; gap: 8px; }
    .brand-name { font-size: 15px; }
    .site-nav a { padding: 6px 9px; font-size: 13px; }
    .container { padding: 0 14px; }
}


/* Shared platform header alignment. */
.site-header-inner { max-width: 1024px; }


/* Shared platform typography. */
body, button, input, select, textarea {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

/* Shared return control: an explicit, comfortably sized button. */
.back-link {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 34px; padding: 0 12px; border: 1px solid #f0caca;
  background: #fef6f6; border-radius: 7px; line-height: 1; white-space: nowrap;
}
