/*
Theme Name: WH Portal
Description: 海外仓客户门户专用主题。轻量、无区块依赖，自带导航与页脚，不加载 WordPress 默认主题的任何样式。
Version: 1.0.1
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: wh-portal
*/

:root {
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e6e9ef;
  --bg: #f7f8fa;
  --card: #ffffff;
  --brand: #0f766e;
  --brand-soft: #ecfdf5;
  --warn: #b45309;
  --radius: 10px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.65 -apple-system, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

img { max-width: 100%; height: auto; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* ---------- 头部 ---------- */
.site-head {
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.head-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 62px;
  flex-wrap: wrap;
}
.brand {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .2px;
  color: var(--ink);
}
.brand:hover { text-decoration: none; color: var(--brand); }
.brand .dot { color: var(--brand); }

.site-nav { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.site-nav ul { display: flex; gap: 20px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.site-nav a { color: #475569; font-size: 14px; }
.site-nav a:hover { color: var(--brand); text-decoration: none; }
.site-nav .current-menu-item a,
.site-nav .current_page_item a { color: var(--brand); font-weight: 600; }
.nav-out, .nav-in {
  font-size: 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
  color: #475569 !important;
}
.nav-out:hover, .nav-in:hover { border-color: var(--brand); color: var(--brand) !important; }

/* ---------- 主体 ---------- */
.site-main { padding: 26px 0 60px; min-height: 60vh; }

.page-title {
  font-size: 26px;
  line-height: 1.3;
  margin: 0 0 16px;
  font-weight: 700;
  letter-spacing: -.2px;
}

.entry { max-width: 100%; }
.entry > p:first-child { margin-top: 0; }

/* ---------- 文章列表（首页/归档） ---------- */
.post-list { display: grid; gap: 14px; }
.post-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.post-card h2 { font-size: 18px; margin: 0 0 6px; }
.post-card .meta { color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.post-card .excerpt { color: #334155; }

/* ---------- 页脚 ---------- */
.site-foot {
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 18px 0 40px;
  color: var(--muted);
  font-size: 12px;
}
.foot-in { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- 原生表单与按钮（不依赖主题样式） ---------- */
input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="search"], input[type="tel"], input[type="url"], select, textarea {
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  padding: 8px 10px;
  max-width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid #99f6e4; outline-offset: 0; border-color: var(--brand); }

button, .button, input[type="submit"] {
  font: inherit;
  cursor: pointer;
  background: var(--brand);
  color: #fff;
  border: 0;
  border-radius: 7px;
  padding: 9px 18px;
}
button:hover, .button:hover, input[type="submit"]:hover { background: #0d5f59; color: #fff; }

/* ---------- 窄屏 ---------- */
@media (max-width: 720px) {
  .site-main { padding: 18px 0 40px; }
  .page-title { font-size: 21px; }
  .head-in { padding: 10px 0; gap: 10px; }
  .site-nav { gap: 12px; }
  .site-nav ul { gap: 14px; }
  .site-nav a { font-size: 13px; }
  .wrap { padding: 0 14px; }
}

/* ---------- 打印（客户打账单/清单） ---------- */
@media print {
  .site-head, .site-foot, #wh3pl-help, .nav-out, .nav-in { display: none !important; }
  body { background: #fff; }
  .site-main { padding: 0; }
}
