/*
Theme Name: PP Dashboard 数据看板
Theme URI: https://example.com/pp-dashboard
Author: PP Theme Studio
Author URI: https://example.com
Description: 面向 PP 酸洗槽厂家的浅色数据看板风 WordPress 主题。冷灰白底配数据蓝,KPI 指标卡、柱状趋势图、仪表盘弧线与适配度进度条,把选型与质检变成可视化参数面板,适合强调"用数据说话、参数可核"的现代工厂。
Version: 1.0.0
Requires at least: 5.9
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: pp-dashboard
Tags: light, one-column, custom-logo, custom-menu, featured-images, translation-ready
*/

:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --blue: #2563c9;
  --blue-deep: #1b4c9e;
  --blue-mist: #e2ebf8;
  --ink: #16202e;
  --gray: #6b7787;
  --line: #e2e7ef;
  --green: #17915c;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(22,32,46,.06), 0 6px 18px rgba(22,32,46,.05);
  --container: 1180px;
  --font: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --mono: "SF Mono", Menlo, Consolas, monospace;
}

/* ===== Base ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.8;
  color: var(--ink);
  background: var(--bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
svg { max-width: 100%; height: auto; }
.container { width: min(100% - 40px, var(--container)); margin-inline: auto; }
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px;
  overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}

.btn {
  display: inline-block; padding: 11px 24px; font-size: 15px; font-weight: 600;
  border: 1px solid var(--line); border-radius: 8px; background: var(--card);
  color: var(--ink); cursor: pointer; transition: box-shadow .15s ease, transform .15s ease;
}
.btn:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.btn-main { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-main:hover { background: var(--blue-deep); border-color: var(--blue-deep); }

/* ===== Header ===== */
.site-header { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; gap: 22px; padding: 14px 0; }
.site-branding { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.brand-mark {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px;
  background: var(--blue); color: #fff; font-weight: 800; font-size: 16px;
}
.site-title { font-size: 19px; font-weight: 700; line-height: 1.3; }
.site-desc { font-family: var(--mono); font-size: 11px; color: var(--gray); letter-spacing: .06em; }
.site-nav .menu { display: flex; gap: 8px; list-style: none; }
.site-nav a { font-size: 15px; font-weight: 500; padding: 7px 14px; border-radius: 8px; }
.site-nav a:hover, .site-nav .current-menu-item > a { background: var(--blue-mist); color: var(--blue-deep); }
.header-cta { display: flex; align-items: center; gap: 14px; }
.hd-status { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--gray); }
.hd-status i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.nav-toggle-input, .nav-toggle-label { display: none; }

/* ===== Hero ===== */
.hero { padding: 52px 0 44px; }
.hero-inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.hero-pill {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--blue-deep);
  background: var(--blue-mist); border-radius: 20px; padding: 5px 14px; margin-bottom: 20px;
}
.hero-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.hero h1 { font-size: clamp(30px, 4.6vw, 46px); line-height: 1.22; font-weight: 800; letter-spacing: -.015em; }
.hero h1 em { font-style: normal; color: var(--blue); }
.hero-sub { margin-top: 16px; font-size: 16px; color: var(--gray); max-width: 27em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero-panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.panel-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--gray); margin-bottom: 10px; }
.panel-live { display: flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11px; color: var(--green); }
.panel-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.panel-foot { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.panel-foot small { display: block; font-size: 12px; color: var(--gray); }
.panel-foot b { font-size: 15px; font-weight: 700; }
.panel-foot b.ok { color: var(--green); }

/* ===== KPI ===== */
.kpibar { padding-bottom: 16px; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); }
.kpi-label { display: block; font-size: 13px; color: var(--gray); }
.kpi-val { display: block; font-size: 33px; font-weight: 800; line-height: 1.25; letter-spacing: -.02em; }
.kpi-val i { font-style: normal; font-size: 15px; color: var(--gray); margin-left: 2px; }
.kpi-trend { font-size: 12px; }
.kpi-trend.up { color: var(--green); }
.kpi-trend.flat { color: var(--gray); }

/* ===== Sections ===== */
.section { padding: 54px 0; }
.section-tint { background: #eef2f8; }
.sec-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 26px; }
.sec-head h2 { font-size: 24px; font-weight: 800; letter-spacing: -.015em; }
.sec-note { font-size: 13px; color: var(--gray); }

/* ===== Products ===== */
.prod-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.prod {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; display: flex; flex-direction: column; gap: 10px;
  transition: box-shadow .16s ease, transform .16s ease;
}
.prod:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(22,32,46,.10); }
.prod-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.prod h3 { font-size: 18px; font-weight: 700; }
.prod h3 a:hover { color: var(--blue); }
.prod-badge { font-family: var(--mono); font-size: 11px; background: var(--blue-mist); color: var(--blue-deep); padding: 3px 9px; border-radius: 6px; }
.prod p { font-size: 14px; color: var(--gray); flex: 1; }
.prod-meter { height: 6px; background: var(--blue-mist); border-radius: 3px; overflow: hidden; }
.prod-meter span { display: block; height: 100%; background: var(--blue); border-radius: 3px; }
.prod-foot { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.prod-foot small { color: var(--gray); }
.prod-foot a { color: var(--blue); font-weight: 600; }

/* ===== Metrics ===== */
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.metric-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.metric-card.wide { grid-column: span 2; }
.metric-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 14px; }
.metric-card p { font-size: 13px; color: var(--gray); margin-top: 12px; }

/* ===== Pipeline ===== */
.pipeline { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.pipe { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 18px; position: relative; }
.pipe b {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px;
  background: var(--blue-mist); color: var(--blue-deep); font-family: var(--mono); font-size: 13px; font-weight: 700;
  margin-bottom: 12px;
}
.pipe h3 { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.pipe p { font-size: 13px; color: var(--gray); }
.pipe:not(:last-child)::after {
  content: ""; position: absolute; right: -11px; top: 50%; width: 8px; height: 8px;
  border-top: 2px solid var(--line); border-right: 2px solid var(--line);
  transform: translateY(-50%) rotate(45deg);
}

/* ===== Feed ===== */
.feed { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.feed-row {
  display: grid; grid-template-columns: 16px 1fr auto; align-items: center; gap: 14px;
  padding: 15px 22px; border-bottom: 1px solid var(--line); transition: background .15s ease;
}
.feed-row:last-child { border-bottom: 0; }
.feed-row:hover { background: #f8fafd; }
.feed-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }
.feed-row h3 { font-size: 16px; font-weight: 500; }
.feed-row:hover h3 { color: var(--blue); }
.feed-row time { font-family: var(--mono); font-size: 12px; color: var(--gray); }

/* ===== CTA ===== */
.cta-panel {
  margin: 52px 0; background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 30px 34px; box-shadow: var(--shadow);
  display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between;
}
.cta-tag { display: inline-block; font-size: 12px; background: var(--blue-mist); color: var(--blue-deep); padding: 3px 12px; border-radius: 20px; margin-bottom: 10px; }
.cta-panel h2 { font-size: 23px; font-weight: 800; letter-spacing: -.015em; }
.cta-panel p { font-size: 14px; color: var(--gray); margin-top: 6px; max-width: 44em; }
.cta-side { text-align: right; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.cta-label { font-size: 12px; color: var(--gray); }
.cta-phone { font-family: var(--mono); font-size: 23px; font-weight: 800; color: var(--blue); }

/* ===== Page hero / inner ===== */
.page-hero { background: var(--card); border-bottom: 1px solid var(--line); padding: 32px 0; }
.page-hero h1 { font-size: 26px; font-weight: 800; letter-spacing: -.015em; }
.breadcrumbs { margin-top: 6px; font-size: 13px; color: var(--gray); }
.breadcrumbs a:hover { color: var(--blue); }

.layout { display: grid; grid-template-columns: 1fr 290px; gap: 26px; padding: 40px 0 60px; align-items: start; }
.layout-full { padding: 40px 0 60px; }
.entry-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 16px; box-shadow: var(--shadow); }
.entry-card:hover { transform: translateY(-2px); }
.entry-card h2 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.entry-card h2 a:hover { color: var(--blue); }
.entry-meta { display: flex; gap: 14px; font-family: var(--mono); font-size: 12px; color: var(--gray); }
.entry-meta a { color: var(--blue); }
.entry-excerpt { margin-top: 10px; font-size: 15px; color: #45505f; }
.entry-thumb { margin-bottom: 16px; border-radius: 10px; overflow: hidden; }
.single-header { padding-bottom: 16px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.single-header h1 { font-size: 27px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 8px; }
.entry-content { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; font-size: 16px; box-shadow: var(--shadow); }
.entry-content > * + * { margin-top: 16px; }
.entry-content h2 { font-size: 21px; font-weight: 800; }
.entry-content h3 { font-size: 18px; font-weight: 700; }
.entry-content ul, .entry-content ol { padding-left: 22px; }
.entry-content blockquote { border-left: 4px solid var(--blue); background: #f5f8fd; padding: 14px 18px; border-radius: 0 8px 8px 0; color: #45505f; }
.entry-content code { font-family: var(--mono); background: var(--blue-mist); padding: 2px 6px; border-radius: 4px; }
.entry-content a { color: var(--blue); text-decoration: underline; }
.post-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 20px; font-size: 14px; }
.post-nav a { color: var(--blue); }
.pagination { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.pagination .page-numbers {
  display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--card); font-family: var(--mono);
}
.pagination .current, .pagination .page-numbers:hover { background: var(--blue); color: #fff; border-color: var(--blue); }

/* ===== Sidebar ===== */
.sidebar { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 92px; }
.sidebar-cta { background: var(--blue); color: #fff; border-radius: var(--radius); padding: 22px 20px; text-align: center; }
.sidebar-cta h3 { font-size: 17px; font-weight: 700; }
.sidebar-cta p { font-size: 13px; color: #cfe0f6; margin: 8px 0 12px; }
.sidebar-cta strong { display: block; font-family: var(--mono); font-size: 21px; margin-bottom: 14px; }
.sidebar-cta .btn { width: 100%; background: #fff; color: var(--blue); border-color: #fff; }
.widget { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.widget-title { font-size: 15px; font-weight: 700; padding-bottom: 10px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.widget ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.widget li a { font-size: 14px; color: #45505f; }
.widget li a:hover { color: var(--blue); }

.search-form { display: flex; gap: 8px; }
.search-field { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font-family: inherit; font-size: 14px; }
.search-field:focus { outline: none; border-color: var(--blue); }
.search-submit { padding: 10px 16px; border: 1px solid var(--blue); border-radius: 8px; background: var(--blue); color: #fff; font-weight: 600; cursor: pointer; }
.search-submit:hover { background: var(--blue-deep); }

/* ===== Comments ===== */
.comments-area { margin-top: 24px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.comments-area h2, .comment-reply-title { font-size: 18px; font-weight: 700; margin-bottom: 14px; }
.comment-list { list-style: none; display: flex; flex-direction: column; gap: 14px; margin-bottom: 20px; }
.comment-list .comment-body { border-left: 3px solid var(--blue-mist); padding-left: 14px; font-size: 15px; }
.comment-notes { font-size: 13px; color: var(--gray); margin-bottom: 10px; }
.comment-form p { margin-bottom: 12px; }
.comment-form label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.comment-form input[type="text"], .comment-form input[type="email"],
.comment-form input[type="url"], .comment-form textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font-family: inherit; font-size: 14px;
}
.comment-form input:focus, .comment-form textarea:focus { outline: none; border-color: var(--blue); }
.comment-form .submit { padding: 11px 26px; border: 0; border-radius: 8px; background: var(--blue); color: #fff; font-weight: 700; cursor: pointer; }

/* ===== 404 ===== */
.error-page { text-align: center; padding: 76px 0; }
.error-code { font-family: var(--mono); font-size: 86px; font-weight: 800; color: var(--blue); line-height: 1; }
.error-page h1 { font-size: 24px; font-weight: 800; margin: 10px 0 8px; }
.error-page p { color: var(--gray); margin-bottom: 18px; }
.error-page .search-form { max-width: 420px; margin: 0 auto 18px; }

/* ===== Footer ===== */
.site-footer { background: var(--card); border-top: 1px solid var(--line); margin-top: 20px; }
.footer-main { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 34px; padding: 44px 0 32px; }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.footer-brand strong { font-size: 17px; font-weight: 700; }
.footer-col p { font-size: 14px; color: var(--gray); }
.footer-col h3 { font-size: 14px; font-weight: 700; color: var(--gray); margin-bottom: 14px; }
.footer-col ul, .footer-menu { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.footer-col a { font-size: 14px; color: #45505f; }
.footer-col a:hover { color: var(--blue); }
.footer-contact li { font-size: 14px; display: flex; gap: 8px; color: var(--gray); }
.footer-contact b { color: var(--ink); font-weight: 600; min-width: 34px; }
.footer-bottom { border-top: 1px solid var(--line); padding: 15px 0; font-size: 13px; color: var(--gray); }
.footer-bottom .container { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .prod-grid { grid-template-columns: repeat(2, 1fr); }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .metric-card.wide { grid-column: span 2; }
  .pipeline { grid-template-columns: repeat(3, 1fr); }
  .pipe:nth-child(3)::after { content: none; }
  .footer-main { grid-template-columns: repeat(2, 1fr); }
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
}
@media (max-width: 780px) {
  .nav-toggle-label {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 40px; height: 40px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer;
  }
  .nav-toggle-label span { display: block; height: 2px; background: var(--ink); }
  .site-nav { display: none; order: 10; width: 100%; padding-top: 12px; margin-top: 12px; border-top: 1px solid var(--line); }
  .nav-toggle-input:checked ~ .site-nav { display: block; }
  .site-nav .menu { flex-direction: column; gap: 2px; }
  .site-nav a { display: block; padding: 10px 12px; }
  .header-inner { flex-wrap: wrap; }
  .header-cta { display: none; }
  .kpi-grid, .prod-grid, .metric-grid, .pipeline { grid-template-columns: 1fr; }
  .metric-card.wide { grid-column: auto; }
  .pipe::after { content: none !important; }
  .feed-row { grid-template-columns: 12px 1fr; }
  .feed-row time { display: none; }
  .cta-side { text-align: left; align-items: flex-start; }
  .footer-main { grid-template-columns: 1fr; gap: 26px; }
}
