/* ============================================================
   沁润泽环保 · 企业工具平台  —— 共享样式（莫兰迪绿）
   配色取自企业 Logo（qrzlogo.jpg）：
     深绿 #306C3C / 亮绿 #78B430 / 米白底 #FCFCF0
   莫兰迪化：降低饱和度、加入灰度，形成柔和高级的灰绿调。
   ============================================================ */
:root {
  /* 品牌绿（深墨绿系 · 参考 stylekit.top auth-pages）
     主色：深墨绿渐变 #175A44 → #0E4736 → #0B3B2D
     点缀：金色 #E8C468 */
  --brand: #175a44;            /* 主绿：深墨绿 */
  --brand-dark: #0e4736;       /* 深绿 */
  --brand-deep: #0b3b2d;       /* 墨绿（渐变终点/页脚） */
  --brand-light: #e9f0e9;      /* 浅绿背景（选中态、图标底） */
  --brand-tint: #d8e4d8;       /* 更浅的绿调 */
  --brand-gradient: linear-gradient(135deg, #1b6b50 0%, #0e4736 60%, #0b3b2d 100%);
  --gold: #e8c468;             /* 点缀色：金色（强调/标签/光晕） */
  --gold-soft: rgba(232, 196, 104, .14);

  /* 中性灰（暖灰调） */
  --bg: #f3f1eb;               /* 页面背景：燕麦米白 */
  --card-bg: #fdfcf8;          /* 卡片：暖白 */
  --border: #e2ded2;           /* 边框：暖灰 */
  --text: #2e3a33;             /* 主文字：墨绿黑 */
  --text-sub: #68746c;         /* 次要文字 */
  --text-light: #9aa49d;       /* 弱化文字 */

  /* 状态色 */
  --success: #3d7a52;
  --success-bg: #e9f2e4;
  --success-border: #bcd6b2;
  --danger: #b0806e;
  --danger-bg: #f7ece6;
  --danger-border: #e5c7ba;
  --warning: #c09d5e;

  --radius: 14px;
  --shadow: 0 6px 24px rgba(18, 63, 46, .12);
  --shadow-hover: 0 14px 36px rgba(18, 63, 46, .18);
}

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

html { height: 100%; }

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  /* 允许内容撑高，避免 flex 子项被压缩导致内容溢出/遮挡 */
  flex-shrink: 0;
}

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

/* ---------------- 顶部导航 ---------------- */
.site-header {
  background: #fdfcf8;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 6px rgba(74, 94, 76, .05);
}
.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
}
.brand:hover { color: var(--text); }
.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(74, 94, 76, .12);
}
.brand-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-size: 17px; font-weight: 700; letter-spacing: .5px; }
.brand-sub { font-size: 12px; color: var(--text-light); letter-spacing: 2px; }

.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--text-sub);
  font-size: 14px;
  transition: all .2s;
}
.nav-links a:hover { background: var(--brand-light); color: var(--brand-dark); }
.nav-links a.active { background: var(--brand-light); color: var(--brand-dark); font-weight: 600; }

/* 头部版本号与更新时间 */
.header-version {
  font-size: 12px;
  color: var(--text-light);
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--brand-light);
  white-space: nowrap;
  margin-left: 4px;
}

/* ---------------- Hero ---------------- */
.hero {
  background: var(--brand-gradient);
  color: #f7faf5;
  padding: 52px 24px 96px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  right: -120px;
  top: -120px;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--gold-soft), transparent 60%);
}
.hero::before {
  content: "";
  position: absolute;
  left: -100px;
  bottom: -160px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle at 60% 40%, var(--gold-soft), transparent 65%);
}
.hero-inner { position: relative; z-index: 1; max-width: 900px; margin: 0 auto; }
.hero h1 { font-size: 40px; font-weight: 700; letter-spacing: 1px; margin-bottom: 14px; }
.hero p { font-size: 18px; opacity: .94; margin-bottom: 24px; }
.hero-badges { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.hero-badge {
  background: rgba(232, 196, 104, .12);
  border: 1px solid rgba(232, 196, 104, .4);
  border-radius: 999px;
  padding: 8px 20px;
  font-size: 15px;
  backdrop-filter: blur(4px);
  /* 徽章相对 hero 提升层级，避免被下方上浮的工具区域覆盖 */
  position: relative;
  z-index: 3;
}

/* ---------------- 主体容器 ---------------- */
.page-main { flex: 1; width: 100%; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ---------------- 工具区域 ---------------- */
.tools-section { margin-top: -40px; padding-bottom: 64px; position: relative; z-index: 2; }
.section-head { text-align: center; margin: 40px 0 28px; }
.section-head h2 { font-size: 24px; font-weight: 700; }
.section-head p { color: var(--text-sub); font-size: 14px; margin-top: 6px; }

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 20px;
}
.tool-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 26px 22px;
  box-shadow: var(--shadow);
  transition: transform .22s, box-shadow .22s, border-color .22s;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.tool-card.online { cursor: pointer; }
.tool-card.online:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(109, 139, 106, .55);
}
.tool-card.coming { opacity: .82; }
.tool-card .card-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 16px; }
.tool-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.tool-icon.online { background: var(--brand-light); color: var(--brand-dark); }
.tool-icon.coming { background: #eeebe2; color: #a8a294; }
.tool-icon svg { width: 28px; height: 28px; }
.tool-tag {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 600;
}
.tool-tag.online { background: var(--gold-soft); color: #8a6d1d; border: 1px solid rgba(232, 196, 104, .45); }
.tool-tag.coming { background: #efede6; color: var(--text-light); }

.tool-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.tool-card p { font-size: 13.5px; color: var(--text-sub); flex: 1; }

.card-footer { margin-top: 18px; display: flex; align-items: center; justify-content: space-between; }
.card-link { font-size: 14px; font-weight: 700; color: #8a6d1d; display: flex; align-items: center; gap: 4px; }
.card-link svg { width: 15px; height: 15px; transition: transform .2s; }
.tool-card.online:hover .card-link svg { transform: translateX(4px); }
.soon-note { font-size: 13px; color: var(--text-light); }

/* ---------------- 工具页通用（工具内部页） ---------------- */
.tool-page-header {
  background: var(--brand-gradient);
  color: #f7faf5;
  padding: 34px 24px;
}
.tool-page-header .container { display: flex; align-items: center; gap: 16px; }
.tool-page-header .back-link {
  color: #f7faf5;
  opacity: .85;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}
.tool-page-header .back-link:hover { opacity: 1; color: #fff; }
.tool-page-header h1 { font-size: 26px; font-weight: 700; }
.tool-page-header p { font-size: 14px; opacity: .9; margin-top: 4px; }

.tool-body { padding: 36px 24px 56px; }
.tool-card-panel {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 36px;
  max-width: 760px;
  margin: 0 auto;
}

/* ---------------- 表单 ---------------- */
label { display: block; font-size: 14px; font-weight: 600; margin: 18px 0 8px; }
label:first-child { margin-top: 0; }
input[type=text] {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid #d9d5c9;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  background: #fbfaf6;
}
input[type=text]:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(109, 139, 106, .16);
  background: #fff;
}
.hint { font-size: 12.5px; margin-top: 6px; min-height: 18px; color: var(--text-light); }
.hint.ok { color: var(--success); }
.hint.error { color: var(--danger); }

.btn {
  width: 100%;
  margin-top: 22px;
  padding: 12px;
  background: var(--gold);
  color: #3a2c06;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .2s, transform .15s;
  box-shadow: 0 4px 14px rgba(232, 196, 104, .35);
}
.btn:hover:not(:disabled) { opacity: .9; transform: translateY(-1px); }
.btn:disabled { background: #c9c4b4; cursor: not-allowed; box-shadow: none; color: #f2f0ea; }

/* ---------------- 进度 ---------------- */
.progress-wrap { display: none; margin-top: 24px; }
.progress-bar-bg {
  height: 10px;
  background: #ece9df;
  border-radius: 5px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #d4af52, #e8c468);
  border-radius: 5px;
  transition: width .4s;
}
.progress-text { font-size: 13px; color: var(--text-sub); margin-top: 10px; }

/* ---------------- 结果 ---------------- */
.result {
  display: none;
  margin-top: 24px;
  padding: 16px 18px;
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  border-radius: 8px;
  font-size: 14px;
}
.result.error { background: var(--danger-bg); border-color: var(--danger-border); }
.result a { color: var(--brand-dark); font-weight: 600; }
.result .download-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.btn-sm {
  display: inline-block;
  margin-top: 0;
  padding: 8px 18px;
  width: auto;
  font-size: 14px;
  background: var(--gold);
  color: #3a2c06;
}

/* ---------------- 页脚 ---------------- */
.site-footer {
  background: var(--brand-deep);
  color: #c2d0bd;
  padding: 30px 24px;
  margin-top: auto;
}
.footer-main {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
  text-align: left;
  font-size: 13px;
}
.site-footer a { color: #e0eadb; }
.site-footer a:hover { color: #fff; }
.footer-title { font-size: 15px; font-weight: 700; color: #eef4eb; margin-bottom: 10px; }
.footer-line { margin: 4px 0; }
.footer-line b { color: #eef4eb; font-weight: 600; }
.footer-brand { flex: 1; min-width: 260px; }
.footer-contact {
  display: flex;
  align-items: center;
  gap: 22px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 10px;
  padding: 14px 20px;
}
.contact-info { display: flex; flex-direction: column; gap: 6px; }
.contact-item { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.footer-wechat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  border-left: 1px solid rgba(255, 255, 255, .14);
  padding-left: 22px;
}
.footer-wechat img {
  width: 74px;
  height: 74px;
  border-radius: 8px;
  border: 2px solid #fff;
  display: block;
  background: #fff;
}
.footer-wechat span { font-size: 12px; color: #c2d0bd; }
@media (max-width: 720px) {
  .footer-main { flex-direction: column; gap: 20px; }
  .footer-contact { flex-wrap: wrap; }
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 720px) {
  .hero { padding: 34px 18px 72px; }
  .hero h1 { font-size: 27px; }
  .hero p { font-size: 15px; }
  .tool-grid { grid-template-columns: 1fr; }
  .tool-card-panel { padding: 24px 20px; }
  .brand-sub { display: none; }
  .nav-links a { padding: 8px 10px; }
}

/* ---------------- 工具页内部（排污许可证详情说明） ---------------- */
.info-box {
  margin-top: 22px;
  padding: 14px 16px;
  background: #f5f4ee;
  border: 1px dashed #cdd4c4;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-sub);
}
.info-box b { color: var(--brand-dark); }
.info-box a { color: var(--brand-dark); font-weight: 600; text-decoration: underline; }
.info-box a:hover { color: var(--brand); }

/* ---------------- 历史文档记录 ---------------- */
.history-panel {
  margin: 28px auto 0;
  max-width: 760px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 28px;
}
.history-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.history-head h2 { font-size: 18px; font-weight: 700; }
.history-sub { font-size: 12.5px; color: var(--text-light); flex: 1; }
.btn-refresh {
  border: 1px solid var(--border);
  background: #f6f4ec;
  color: var(--text-sub);
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 12.5px;
  cursor: pointer;
  transition: all .2s;
}
.btn-refresh:hover { background: var(--brand-light); color: var(--brand-dark); border-color: var(--brand); }
.history-list { display: flex; flex-direction: column; }
.history-empty {
  text-align: center;
  color: var(--text-light);
  font-size: 13.5px;
  padding: 26px 0;
  background: #faf9f4;
  border: 1px dashed var(--border);
  border-radius: 8px;
}
.history-empty.error { color: var(--danger); }
.history-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid #efece2;
  transition: background .15s;
}
.history-row:last-child { border-bottom: none; }
.history-row:hover { background: #faf9f4; }
.history-index {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--gold-soft);
  color: #8a6d1d;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.history-name {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.history-meta { font-size: 12.5px; color: var(--text-light); white-space: nowrap; }
.history-dl {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 6px;
  background: var(--gold);
  color: #3a2c06;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  transition: opacity .2s;
  box-shadow: 0 2px 6px rgba(232, 196, 104, .3);
}
.history-dl:hover { opacity: .88; color: #2a2004; }
@media (max-width: 720px) {
  .history-panel { padding: 18px 14px; }
  .history-meta { display: none; }
}
