/* ============================================================
   APCO 亮色主题（Light Theme）
   ------------------------------------------------------------
   参照 outridersteel.com 的配色：
   - 页面底色：#f7fcfc（浅青白）
   - 面板/卡片：#ffffff
   - 文字：#2d3433（深墨灰）
   - 次级文字：#606665
   - 强调色：#003a96 / #001d4b（深蓝）
   仅在 html[data-theme="light"] 时生效；暗色主题（默认）完全不受影响。
   ============================================================ */

html[data-theme="light"] {
  --bg: #f4f8f9;
  --bg2: #eef4f5;
  --panel: #ffffff;
  --panel2: #ffffff;
  --panel3: #f4f8f9;
  --line: #d6e0e2;
  --line-hi: #b9c6c9;
  --text: #2d3433;
  --muted: #606665;
  /* 保留橙作为品牌点缀，但整体强调色改为参考站的深蓝 */
  --orange: #003a96;
  --orange-gold: #1c5bb5;
  --orange-deep: #002d75;
  --yellow: #d99b00;
  --shadow: 0 8px 24px rgba(20, 58, 90, .12);
}

/* ---------- 基础背景与网格纹理 ---------- */
html[data-theme="light"] body {
  background-color: var(--bg);
  color: var(--text);
  background-image:
    linear-gradient(rgba(45, 52, 51, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45, 52, 51, .035) 1px, transparent 1px);
  background-size: 44px 44px, 44px 44px;
}
html[data-theme="light"] ::selection { background: rgba(0, 58, 150, .22); color: #12203a; }

/* 滚动条 */
html[data-theme="light"] ::-webkit-scrollbar-track { background: #e6edef; }
html[data-theme="light"] ::-webkit-scrollbar-thumb { background: #aebec2; }
html[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: var(--orange); }

/* ---------- 页头 ---------- */
html[data-theme="light"] .site-header {
  background: linear-gradient(180deg, #ffffff 0%, #f4f8f9 100%);
  border-bottom: 1px solid var(--line);
}
html[data-theme="light"] .main-nav a { color: #2d3433; }
/* 导航悬停条纹：亮色主题改为「蓝 + 橘黄」（暗色主题仍是「橘黄 + 深灰」，不受影响） */
html[data-theme="light"] .main-nav a::before {
  background: repeating-linear-gradient(-45deg,
    rgba(0, 58, 150, .94) 0 6px,
    rgba(255, 107, 0, .92) 6px 12px);
}
html[data-theme="light"] .main-nav a:hover {
  color: #ffffff;
  border-color: rgba(0, 58, 150, .55);
  /* 条纹自下而上滑入，文字延后变白，避免滑动过程中白字压在白色页头上看不见 */
  transition: color .1s ease .18s, border-color .2s ease;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
}
/* 当前栏目：点击进入后保持与悬停一致的「蓝 + 橘黄」条纹 */
html[data-theme="light"] .main-nav a.active {
  color: #ffffff;
  background: repeating-linear-gradient(-45deg,
    rgba(0, 58, 150, .94) 0 6px,
    rgba(255, 107, 0, .92) 6px 12px);
  border-color: rgba(0, 58, 150, .70);
  box-shadow: 0 2px 10px rgba(0, 58, 150, .28);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
}
html[data-theme="light"] .nav-toggle { color: #2d3433; }
html[data-theme="light"] .lang-switch { background: rgba(255,255,255,.92); border-color: var(--line-hi); box-shadow: 0 6px 20px rgba(20,58,90,.14); }
html[data-theme="light"] .lang-switch a { color: #2d3433; }
html[data-theme="light"] .lang-switch a:hover { color: #003a96; background: rgba(0,58,150,.08); }
html[data-theme="light"] .lang-switch .sep { color: #b9c6c9; }

/* ---------- 页首横幅 ---------- */
html[data-theme="light"] .g-hero {
  background:
    linear-gradient(135deg, rgba(255,255,255,.97), rgba(232,242,244,.97)),
    repeating-linear-gradient(-45deg, rgba(0,58,150,.05) 0 14px, transparent 14px 28px);
  border-bottom: 3px solid var(--orange);
}
/* 参照 outridersteel.com 的双层文字效果：深色主字 + 右下偏移灰色重影 */
html[data-theme="light"] .g-hero h2,
html[data-theme="light"] .display-title h2,
html[data-theme="light"] .display-title h3,
html[data-theme="light"] .block-title,
html[data-theme="light"] .g-section-title {
  color: #1f2a2a;
  text-shadow: 15px 15px 12px rgba(45,52,51,.38);
}
html[data-theme="light"] .g-hero p { color: #4a5555; }
html[data-theme="light"] .g-hero h2 em,
html[data-theme="light"] .display-title h2 em,
html[data-theme="light"] .display-title h3 em {
  color: #003a96;
  text-shadow: 15px 15px 12px rgba(45,52,51,.3);
}
/* ---------- 两张横幅大图（首页 .hero / 简介页 .about-hero-bg）统一“半亮”处理 ----------
   既不压成原来的近黑（brightness .62 + 全黑遮罩），也不洗成纯白，
   两张图用同一套亮度与雾化数值，观感一致。 */
html[data-theme="light"] .hero { background: #e9f1f3; }
html[data-theme="light"] .hero-bg { filter: brightness(1.02) saturate(1.04); }
html[data-theme="light"] .hero-overlay {
  background: linear-gradient(180deg,
    rgba(244,250,251,.56) 0%,
    rgba(244,250,251,.74) 30%,
    rgba(244,250,251,.77) 58%,
    rgba(244,250,251,.62) 100%);
}
html[data-theme="light"] .hero h1,
html[data-theme="light"] .hero h2,
html[data-theme="light"] .hero .display-title h1,
html[data-theme="light"] .hero .display-title h2,
html[data-theme="light"] .hero .display-title h3 {
  color: #1f2a2a;
  text-shadow: 0 1px 0 rgba(255,255,255,.55), 0 8px 24px rgba(255,255,255,.55);
}
html[data-theme="light"] .hero h1 em,
html[data-theme="light"] .hero h2 em,
html[data-theme="light"] .hero .display-title em {
  color: #003a96;
  text-shadow: 0 1px 0 rgba(255,255,255,.5), 0 8px 24px rgba(255,255,255,.5);
}
html[data-theme="light"] .hero p.hero-sub {
  color: #33403f;
  text-shadow: 0 1px 0 rgba(255,255,255,.6), 0 4px 14px rgba(255,255,255,.5);
}
html[data-theme="light"] .hero-kicker {
  color: #003a96;
  border-color: rgba(0,58,150,.42);
  background: rgba(255,255,255,.78);
}
html[data-theme="light"] .hero .dt-kick {
  color: #003a96;
  border-color: rgba(0,58,150,.38);
  background: rgba(255,255,255,.72);
}
html[data-theme="light"] .g-kicker { color: #003a96; border-color: rgba(0,58,150,.35); background: rgba(0,58,150,.06); }
html[data-theme="light"] .dt-kick,
html[data-theme="light"] .qtc-kick { color: #003a96; }
html[data-theme="light"] .dt-bar { filter: saturate(.85); }

/* 质检 / 证书页纯色横幅：亮色下改浅底深字 */
html[data-theme="light"] .qc-hero,
html[data-theme="light"] .cert-hero {
  background:
    linear-gradient(135deg, rgba(255,255,255,.97), rgba(232,242,244,.97)),
    repeating-linear-gradient(-45deg, rgba(0,58,150,.05) 0 14px, transparent 14px 28px);
  border-bottom-color: var(--orange);
}
html[data-theme="light"] .qc-hero h2,
html[data-theme="light"] .cert-hero h2 { color: #1f2a2a; text-shadow: 15px 15px 12px rgba(45,52,51,.38); }
html[data-theme="light"] .qc-hero p,
html[data-theme="light"] .cert-hero p { color: #4a5555; }
html[data-theme="light"] .qc-hero .qc-kicker { color: #003a96; }

/* 公司简介大图横幅：保留图片与遮罩，仅把遮罩调浅、文字清晰 */
html[data-theme="light"] .g-hero.about-hero-bg {
  background:
    linear-gradient(180deg,
      rgba(244,250,251,.60) 0%,
      rgba(244,250,251,.74) 28%,
      rgba(244,250,251,.77) 62%,
      rgba(244,250,251,.64) 100%),
    url('../img/office-banner.jpg') center/cover no-repeat;
}
html[data-theme="light"] .g-hero.about-hero-bg .hero-text p,
html[data-theme="light"] .g-hero.about-hero-bg .hero-text p b {
  color: #26312f;
  text-shadow: 0 0 12px rgba(255,255,255,.95), 0 0 5px rgba(255,255,255,.9);
}
/* about 横幅内标题/文字统一深色，标题带双层重影（em 保持主题蓝） */
html[data-theme="light"] .g-hero.about-hero-bg .display-title .dt-kick,
html[data-theme="light"] .g-hero.about-hero-bg .display-title h2,
html[data-theme="light"] .g-hero.about-hero-bg > p,
html[data-theme="light"] .g-hero.about-hero-bg .hero-sub {
  color: #1f2a2a !important;
  text-shadow: 15px 15px 12px rgba(45,52,51,.2) !important;
  opacity: 1;
}
html[data-theme="light"] .g-hero.about-hero-bg .display-title h2 em { color: #003a96 !important; text-shadow: 15px 15px 12px rgba(45,52,51,.3) !important; }

/* ---------- 卡片 / 面板 ---------- */
html[data-theme="light"] .card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfc 100%);
  border-color: var(--line);
  box-shadow: 0 3px 14px rgba(20,58,90,.07);
}
html[data-theme="light"] .card:hover {
  border-color: rgba(0,58,150,.4);
  box-shadow: 0 10px 26px rgba(20,58,90,.13);
}
html[data-theme="light"] .card h4,
html[data-theme="light"] .card h3 { color: #1f2a2a; }
html[data-theme="light"] .card p { color: #55605f; }
html[data-theme="light"] .why-ic { filter: none; }

/* ---------- CTA 区块 ---------- */
html[data-theme="light"] .cta-band {
  background:
    repeating-linear-gradient(-45deg, rgba(0,58,150,.06) 0 14px, transparent 14px 28px),
    linear-gradient(180deg, #ffffff, #eef4f5);
  border-color: var(--line);
}
html[data-theme="light"] .cta-band h3 { color: #1f2a2a; }
html[data-theme="light"] .cta-band p { color: #55605f; }

/* ---------- 按钮 ---------- */
html[data-theme="light"] .btn {
  color: #ffffff;
  background: linear-gradient(135deg, #003a96, #1c5bb5);
  box-shadow: 0 6px 16px rgba(0,58,150,.22);
}
html[data-theme="light"] .btn.ghost { color: #003a96; background: transparent; border-color: rgba(0,58,150,.5); }
/* 亮色下横幅已是浅底，按钮回到“实心橘 + 蓝描边”的常规组合 */
html[data-theme="light"] .hero-actions .btn {
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange), var(--orange-gold));
  border: 1px solid transparent;
  box-shadow: 0 8px 22px rgba(0,58,150,.28);
}
html[data-theme="light"] .hero-actions .btn.ghost {
  color: #003a96;
  background: rgba(255,255,255,.55);
  border-color: rgba(0,58,150,.5);
  box-shadow: none;
}
html[data-theme="light"] .hero-actions .btn:hover {
  color: #ffffff;
  background: linear-gradient(135deg, #002d75, #003a96);
  border-color: transparent;
  box-shadow: 0 12px 30px rgba(0,58,150,.38);
}
html[data-theme="light"] .hero-actions .btn.ghost:hover {
  color: #ffffff;
  background: linear-gradient(135deg,#003a96,#1c5bb5);
  border-color: transparent;
}
html[data-theme="light"] .qtc-btn { color: #ffffff; }

/* ---------- 表单 ---------- */
html[data-theme="light"] .form-grid label,
html[data-theme="light"] .admin-field label { color: #2d3433; }
html[data-theme="light"] .form-grid input[type="text"],
html[data-theme="light"] .form-grid input[type="email"],
html[data-theme="light"] .form-grid textarea,
html[data-theme="light"] .admin-field input[type="text"],
html[data-theme="light"] .admin-field select,
html[data-theme="light"] .admin-field textarea,
html[data-theme="light"] .cert-search-box input[type="text"],
html[data-theme="light"] .admin-login-box input[type="password"] {
  background: #ffffff;
  color: #2d3433;
  border-color: var(--line);
}
html[data-theme="light"] .form-grid input::placeholder,
html[data-theme="light"] .form-grid textarea::placeholder,
html[data-theme="light"] .cert-search-box input::placeholder { color: #9aa4a4; }

/* ---------- 页脚 ---------- */
html[data-theme="light"] .site-footer {
  background: linear-gradient(180deg, #ffffff 0%, #eef4f5 100%);
  border-top: 1px solid var(--line);
}
html[data-theme="light"] .footer-inner p { color: #606665; }
html[data-theme="light"] .footer-inner p.icp { color: #8a9595; }
html[data-theme="light"] .footer-links a { color: #4a5555; }
html[data-theme="light"] .footer-links a:hover { color: #003a96; }

/* ---------- 认证/口号滚动条 ---------- */
html[data-theme="light"] .supplier-wall { background: linear-gradient(180deg, #ffffff, #eef4f5); }
html[data-theme="light"] .supplier-name,
html[data-theme="light"] .top-wall .supplier-name { color: #55605f; }
html[data-theme="light"] .top-wall .supplier-name { color: #7a8585; }
html[data-theme="light"] .slogan-track .supplier-name,
html[data-theme="light"] .top-wall .slogan-track .supplier-name { color: #003a96; }

/* ---------- 分区通用深色小块 ---------- */
html[data-theme="light"] .g-section { background: transparent; }
html[data-theme="light"] .g-section-sub { color: #606665; }

/* ---------- 设备预览工具条（桌面） ---------- */
html[data-theme="light"] .device-switch { background: rgba(255,255,255,.94); border-color: var(--line-hi); }
html[data-theme="light"] .device-switch .ds-lbl,
html[data-theme="light"] .device-switch .ds-btn { color: #4a5555; }
html[data-theme="light"] .device-switch .ds-btn:hover { color: #003a96; }
html[data-theme="light"] .device-switch .ds-btn.active { color: #ffffff; background: linear-gradient(135deg,#003a96,#1c5bb5); }

/* ---------- 回到顶部按钮 ---------- */
html[data-theme="light"] #back-to-top { color: #ffffff; background: linear-gradient(135deg,#003a96,#1c5bb5); box-shadow: 0 6px 18px rgba(0,58,150,.28); }

/* ---------- 主题切换胶囊：亮色下仅覆盖颜色，位置由 style.css 统一控制（两种主题一致） ---------- */
html[data-theme="light"] .theme-toggle {
  color: #003a96;
  background: rgba(255,255,255,.96);
  border-color: rgba(0,58,150,.35);
  box-shadow: 0 6px 20px rgba(20,58,90,.18);
}
html[data-theme="light"] .theme-toggle:hover { background: #ffffff; }

/* ---------- 联系页 CTA/报价卡 ---------- */
html[data-theme="light"] .quote-card { background: linear-gradient(180deg,#ffffff,#f4f8f9); border-color: var(--line); }
html[data-theme="light"] .quote-card h4 { color: #1f2a2a; }
html[data-theme="light"] .qtc-lead,
html[data-theme="light"] .qtc-sub,
html[data-theme="light"] .qtc-list li,
html[data-theme="light"] .qtc-steps li span { color: #55605f; }


/* ============================================================
   亮色主题可读性修复：硬编码浅色文字在白底上改为深色
   （暗色主题下这些元素仍是白字压深色卡片/图片，不受影响）
   ============================================================ */

/* 1. 制造范围 / 材料 / 尺寸标准 三列卡片的小字（index / products） */
html[data-theme="light"] .spec-panel li { color: #2d3433; border-bottom-color: rgba(45,52,51,.14); }

/* 2. 产品中心：轮播左右箭头小圆钮（产品大图按钮 pc-name 保持白字） */
html[data-theme="light"] .pc-scrollbar .pc-snav { color: #2d3433; background: rgba(255,255,255,.9); border-color: rgba(45,52,51,.3); }
html[data-theme="light"] .pc-scrollbar .pc-snav:hover { color: #003a96; background: rgba(0,58,150,.08); border-color: rgba(0,58,150,.5); }
html[data-theme="light"] .pc-nav.prev,
html[data-theme="light"] .pc-nav.next { color: #2d3433; background: rgba(255,255,255,.9); border-color: rgba(45,52,51,.3); }

/* 3. 质检页：分区标题 + 检测能力卡文字 + 设备卡文字 */
html[data-theme="light"] .qc-section-title { color: #1f2a2a; }
html[data-theme="light"] .qc-cap p { color: #55605f; }
html[data-theme="light"] .equip-card .ep-name { color: #1f2a2a; }
html[data-theme="light"] .equip-card .ep-body { background: linear-gradient(180deg,#ffffff 0%,#f4f8f9 100%); }
html[data-theme="light"] .eq-d-name,
html[data-theme="light"] .eq-d-v { color: #1f2a2a; }
html[data-theme="light"] .eq-dcard,
html[data-theme="light"] .eq-detail { background: #ffffff; }

/* 4. 联系页：地址卡片标题与正文 */
html[data-theme="light"] .contact-block h4 { color: #1f2a2a; }
html[data-theme="light"] .contact-block p { color: #4a5555; }
html[data-theme="light"] .contact-block a:hover { color: #003a96; }

/* 5. 材质单查询页：输入提示 + 公司上传双入口 */
html[data-theme="light"] .cert-enter-label { color: #2d3433; }
html[data-theme="light"] .cert-hero p { color: #4a5555; }
html[data-theme="light"] .admin-entry a.admin-link.big { color: #4a5555; border-color: rgba(45,52,51,.28); background: rgba(255,255,255,.7); box-shadow: 0 6px 18px rgba(20,58,90,.1); }
html[data-theme="light"] .admin-entry a.admin-link.big .admin-label { color: #1f2a2a; }
html[data-theme="light"] .admin-entry a.admin-link.big .admin-lock { filter: none; }
html[data-theme="light"] .admin-entry a.admin-link { color: #55605f; border-color: rgba(45,52,51,.35); }
html[data-theme="light"] .cert-hint { color: #606665; }

/* 6. 材质单存储柜：月份按钮、证书编号、操作按钮 */
html[data-theme="light"] .mon-btn { color: #2d3433; background: rgba(255,255,255,.9); border-color: rgba(45,52,51,.3); }
html[data-theme="light"] .mon-btn:hover { color: #003a96; }
html[data-theme="light"] .cc-no { color: #1f2a2a; }
html[data-theme="light"] .cc-desc { color: #55605f; }
html[data-theme="light"] .cc-btn.view { color: #003a96; background: rgba(0,58,150,.07); border-color: rgba(0,58,150,.4); }
html[data-theme="light"] .cc-btn.view:hover { color: #ffffff; background: #003a96; }
html[data-theme="light"] .cc-btn.qr { color: #1f2a2a; }


/* ============================================================
   PDF 样本预览弹层：两种主题下都保持深色阅读器风格
   （PDF 页面本身是白纸，深色外壳更专业；也避免亮色主题下
     边框/文字用变量变浅后看不清）
   ============================================================ */
html[data-theme="light"] .pdfv-box {
  background: #1c2027;
  border-color: rgba(255,255,255,.14);
}
html[data-theme="light"] .pdfv-bar { background: #161a20; border-bottom-color: rgba(255,255,255,.1); }
html[data-theme="light"] .pdfv-btn { color: #cfd4da; border-color: rgba(255,255,255,.18); }
html[data-theme="light"] .pdfv-btn:hover { color: #fff; border-color: #ff6b00; background: rgba(255,107,0,.16); }
html[data-theme="light"] .pdfv-close { color: #aab0b8; border-color: rgba(255,255,255,.18); }
html[data-theme="light"] .pdfv-tb { color: #c6ccd3; border-color: rgba(255,255,255,.16); }
html[data-theme="light"] .pdfv-tb:hover { color: #fff; border-color: #ff6b00; background: rgba(255,107,0,.16); }
html[data-theme="light"] .pdfv-tb.is-on { color: #1a1208; background: #ff6b00; border-color: #ff6b00; }
html[data-theme="light"] .pdfv-pagebox,
html[data-theme="light"] .pdfv-pageno { color: #c6ccd3; }
html[data-theme="light"] .pdfv-pageno { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.16); }
html[data-theme="light"] .pdfv-pagetotal,
html[data-theme="light"] .pdfv-zoomval { color: #8a8f96; }
html[data-theme="light"] .pdfv-sep { background: rgba(255,255,255,.16); }
html[data-theme="light"] .pdfv-bar-status { color: #8a8f96; }
html[data-theme="light"] .pdfv-bar.is-off .pdfv-bar-status { color: #ff9838; }

/* ============================================================
   MTC 授权访问遮罩（亮色主题）
   ------------------------------------------------------------
   白面板 + 深蓝强调，替代暗色主题的「深灰金属 + 红色警示条」；
   红色只保留给错误提示，与亮色主题的配色体系一致。
   ============================================================ */
html[data-theme="light"] .mtc-lock {
  background: rgba(20, 58, 90, .34);
  backdrop-filter: blur(2px);
}
html[data-theme="light"] .mtc-lock-box {
  background: linear-gradient(180deg, #ffffff 0%, #f4f8f9 100%);
  color: #2d3433;
  border-color: #d6e0e2;
  border-top-color: #003a96;
  box-shadow: 0 22px 60px rgba(20, 58, 90, .22), inset 0 1px 0 rgba(255, 255, 255, .9);
}
html[data-theme="light"] .mtc-rivet {
  background: radial-gradient(circle at 35% 35%, #ffffff, #b9c6c9);
  box-shadow: inset 0 1px 1px rgba(20, 58, 90, .22), 0 1px 0 #ffffff;
}
html[data-theme="light"] .mtc-lock-icon { color: #003a96; }
html[data-theme="light"] .mtc-lock-title { color: #1f2a2a; }
html[data-theme="light"] .mtc-lock-sub { color: #606665; }
html[data-theme="light"] .mtc-lock-input {
  background: #ffffff; color: #2d3433; border-color: #b9c6c9;
}
html[data-theme="light"] .mtc-lock-input::placeholder { color: #97a3a2; letter-spacing: 2px; }
html[data-theme="light"] .mtc-lock-input:focus {
  border-color: #003a96;
  box-shadow: 0 0 0 2px rgba(0, 58, 150, .18);
}
html[data-theme="light"] .mtc-lock-err { color: #b3261e; }
html[data-theme="light"] .mtc-lock-btn {
  background: linear-gradient(135deg, #003a96, #1c5bb5);
  border-color: #002d75;
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(0, 58, 150, .28);
}
html[data-theme="light"] .mtc-lock-btn:hover {
  background: linear-gradient(135deg, #002d75, #17408a);
}
html[data-theme="light"] .mtc-lock-home { color: #55605f; border-color: #c3d0d2; }
html[data-theme="light"] .mtc-lock-home:hover { color: #003a96; border-color: #003a96; }
