/* style.css — ZYRON 内部工具系统（浅色主题，品牌色 #1a1a2e / #e85d04） */

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

:root {
  --dark: #1a1a2e;
  --gray: #666;
  --gray-light: #999;
  --line: #e5e7eb;
  --bg: #f5f6f8;
  --card: #ffffff;
  --accent: #e85d04;
  --accent-light: #fdf0e6;
  --radius: 10px;
}

html, body { height: 100%; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--dark);
  font-size: 14px;
}

.hidden { display: none !important; }

/* ==================== 登录屏 ==================== */
.login-screen {
  position: fixed; inset: 0; z-index: 1000;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 55%, #0f3460 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.login-box {
  background: #fff; border-radius: 16px; padding: 42px 38px 30px;
  width: 400px; max-width: 100%;
  box-shadow: 0 24px 60px rgba(0,0,0,.35);
  text-align: center;
}
.login-logo { font-size: 42px; font-weight: 700; letter-spacing: 8px; color: var(--dark); margin-bottom: 6px; }
.login-sub { color: var(--gray-light); font-size: 12px; letter-spacing: 2px; margin: 6px 0 28px; }
.login-field { text-align: left; margin-bottom: 14px; }
.login-field label { display: block; font-size: 13px; color: var(--gray); margin-bottom: 6px; }
.login-field input {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--line);
  border-radius: 8px; font-size: 15px; outline: none; transition: border-color .2s;
}
.login-field input:focus { border-color: var(--accent); }
.login-remember { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--gray); margin-bottom: 18px; cursor: pointer; }
.login-error { color: #d62828; font-size: 13px; min-height: 20px; margin-top: 12px; }
.login-foot { margin-top: 22px; font-size: 11px; color: var(--gray-light); }

/* ==================== HS Code 多选 ==================== */
.form-row-full { grid-column: 1 / -1; }
.hs-checks { display: flex; flex-wrap: wrap; gap: 8px; }
.hs-check {
  display: inline-flex; align-items: center; gap: 7px;
  background: #fff; border: 1.5px solid var(--line); border-radius: 8px;
  padding: 7px 12px; font-size: 13px; cursor: pointer; transition: all .15s;
}
.hs-check:hover { border-color: var(--accent); }
.hs-check:has(input:checked) { border-color: var(--accent); background: var(--accent-light); }
.hs-check input { accent-color: var(--accent); cursor: pointer; }
.hs-code { font-weight: 700; color: var(--dark); letter-spacing: .5px; }
.hs-desc { color: var(--gray); }

/* ==================== 按钮 ==================== */
.btn {
  border: none; border-radius: 8px; padding: 10px 20px; font-size: 14px;
  cursor: pointer; transition: all .15s; font-family: inherit;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  text-decoration: none;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #f06a12; }
.btn-outline { background: #fff; color: var(--dark); border: 1.5px solid var(--line); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost { background: transparent; color: var(--gray); }
.btn-ghost:hover { color: #d62828; }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-xs { padding: 3px 10px; font-size: 12px; }
.btn-danger-ghost { background: transparent; color: #d62828; }
.btn:active { transform: scale(.97); }

/* ==================== 顶部导航 ==================== */
.app { min-height: 100vh; display: flex; flex-direction: column; }
.topbar { background: var(--dark); position: sticky; top: 0; z-index: 100; }
.topbar-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; gap: 26px; height: 56px;
}
.brand { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 8px; background: var(--accent);
  color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.brand-text { color: #fff; font-weight: 700; font-size: 16px; letter-spacing: 1px; }
.brand-text em { font-style: normal; font-size: 12px; color: rgba(255,255,255,.55); margin-left: 6px; font-weight: 400; }
.mainnav { display: flex; gap: 4px; flex: 1; }
.mainnav a {
  color: rgba(255,255,255,.7); padding: 8px 14px; border-radius: 8px;
  cursor: pointer; font-size: 14px; transition: all .15s; user-select: none;
}
.mainnav a:hover { color: #fff; background: rgba(255,255,255,.08); }
.mainnav a.active { color: #fff; background: rgba(232,93,4,.9); font-weight: 600; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.operator-badge { color: rgba(255,255,255,.75); font-size: 13px; }

/* ==================== 内容区 ==================== */
.content { flex: 1; max-width: 1280px; width: 100%; margin: 0 auto; padding: 24px 20px 40px; }
.view-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 14px; flex-wrap: wrap; }
.view-head h2 { font-size: 20px; display: flex; align-items: center; gap: 8px; }
.count-badge { background: var(--accent-light); color: var(--accent); font-size: 12px; padding: 2px 10px; border-radius: 20px; font-weight: 600; }
.search-box input {
  width: 320px; max-width: 100%; padding: 9px 16px; border: 1.5px solid var(--line);
  border-radius: 20px; outline: none; font-size: 14px; background: #fff; transition: border-color .2s;
}
.search-box input:focus { border-color: var(--accent); }

/* 分类 chips */
.cat-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.chip {
  padding: 7px 16px; border-radius: 20px; background: #fff; border: 1.5px solid var(--line);
  font-size: 13px; cursor: pointer; color: var(--gray); transition: all .15s; user-select: none;
  display: flex; align-items: center; gap: 6px;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.active { background: var(--dark); color: #fff; border-color: var(--dark); }
.chip .c-icon {
  width: 20px; height: 20px; border-radius: 5px; background: var(--accent-light); color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700;
}
.chip.active .c-icon { background: rgba(255,255,255,.15); color: #fff; }
.chip .c-count { font-size: 11px; opacity: .65; }

/* 产品网格 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.p-card {
  background: var(--card); border-radius: var(--radius); overflow: hidden; cursor: pointer;
  border: 1px solid var(--line); transition: all .18s;
}
.p-card:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(0,0,0,.09); border-color: #d8dbe0; }
.p-card .p-img {
  height: 150px; background: #fff; display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid var(--line); padding: 10px;
}
.p-card .p-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.p-card .p-img .img-ph {
  width: 64px; height: 64px; border: 1.5px dashed #ccc; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 11px;
}
.p-card .p-body { padding: 12px 14px 14px; }
.p-card .p-model { font-weight: 700; font-size: 14px; letter-spacing: .3px; }
.p-card .p-name { color: var(--gray); font-size: 12px; margin-top: 4px; height: 32px; overflow: hidden; }
.p-card .p-tags { display: flex; gap: 6px; margin-top: 8px; }
.tag { font-size: 11px; padding: 2px 8px; border-radius: 4px; background: var(--accent-light); color: var(--accent); }
.tag.t-gray { background: #eef0f3; color: var(--gray); }

/* ==================== 卡片/表单 ==================== */
.card {
  background: var(--card); border-radius: var(--radius); padding: 20px 22px;
  border: 1px solid var(--line); margin-bottom: 16px;
}
.card-title { font-size: 15px; font-weight: 700; margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; }
.card-title-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.card-title-row .card-title { margin-bottom: 0; }
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 13px; color: var(--gray); margin-bottom: 6px; }
.form-row input, .form-row select, .form-row textarea {
  width: 100%; padding: 9px 12px; border: 1.5px solid var(--line); border-radius: 8px;
  font-size: 14px; outline: none; font-family: inherit; transition: border-color .2s; background: #fff;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { border-color: var(--accent); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 18px; }
@media (max-width: 800px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.btn-row { display: flex; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.btn-row-inline { display: flex; gap: 8px; }

/* ==================== 表格 ==================== */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  text-align: left; background: #f2f3f5; color: var(--gray); font-weight: 600;
  padding: 9px 10px; border-bottom: 1.5px solid var(--line); white-space: nowrap;
}
.table td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:hover { background: #fafbfc; }
.table input {
  width: 100%; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px;
  font-size: 13px; outline: none;
}
.table input:focus { border-color: var(--accent); }
.table .row-del { background: none; border: none; color: #ccc; font-size: 17px; cursor: pointer; padding: 2px 6px; }
.table .row-del:hover { color: #d62828; }
.empty-tip { color: var(--gray-light); text-align: center; padding: 26px 0; font-size: 13px; }

/* ==================== 计算器 ==================== */
.calc-layout { display: grid; grid-template-columns: 380px 1fr; gap: 16px; align-items: start; }
@media (max-width: 1000px) { .calc-layout { grid-template-columns: 1fr; } }
.divisor-btns { display: flex; flex-wrap: wrap; gap: 7px; }
.divisor-btn {
  padding: 7px 13px; border-radius: 18px; border: 1.5px solid var(--line); background: #fff;
  font-size: 12.5px; cursor: pointer; color: var(--gray); transition: all .15s;
}
.divisor-btn:hover { border-color: var(--accent); color: var(--accent); }
.divisor-btn.active { background: var(--dark); border-color: var(--dark); color: #fff; }
.calc-result { display: flex; gap: 12px; margin: 6px 0 16px; }
.cr-item {
  flex: 1; background: var(--accent-light); border-radius: 10px; padding: 14px 16px; text-align: center;
}
.cr-item span { display: block; font-size: 12px; color: var(--gray); margin-bottom: 4px; }
.cr-item b { font-size: 22px; }
.cr-item b.accent { color: var(--accent); }

/* ==================== 询盘 ==================== */
.cloud-note {
  background: #eef4fb; border: 1px solid #d5e3f5; color: #35618f;
  padding: 9px 16px; border-radius: 8px; font-size: 12.5px; margin-bottom: 14px;
}
.status-filter { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.status-filter a {
  padding: 6px 15px; border-radius: 18px; background: #fff; border: 1.5px solid var(--line);
  font-size: 13px; color: var(--gray); cursor: pointer; user-select: none;
}
.status-filter a.active { background: var(--dark); color: #fff; border-color: var(--dark); }
.inq-card {
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 16px 18px; margin-bottom: 12px;
}
.inq-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.inq-name { font-weight: 700; font-size: 15px; }
.inq-company { color: var(--gray); font-size: 13px; }
.inq-time { color: var(--gray-light); font-size: 12px; margin-left: auto; }
.inq-status {
  font-size: 12px; padding: 3px 11px; border-radius: 14px; color: #fff; font-weight: 600;
}
.inq-body { margin-top: 8px; font-size: 13px; color: var(--gray); }
.inq-model { display: inline-block; margin-top: 6px; background: var(--accent-light); color: var(--accent); font-size: 12px; padding: 2px 9px; border-radius: 5px; font-weight: 600; }
.inq-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; align-items: center; }
.status-select { display: flex; gap: 6px; margin-left: auto; }
.status-select button {
  font-size: 11.5px; padding: 4px 10px; border-radius: 12px; border: 1.5px solid var(--line);
  background: #fff; color: var(--gray); cursor: pointer;
}
.status-select button.cur { color: #fff; border: none; }
.status-select button:hover { border-color: var(--dark); }

/* ==================== 关于 ==================== */
.about-company { display: flex; gap: 26px; align-items: flex-start; flex-wrap: wrap; }
.about-logo {
  font-size: 30px; font-weight: 800; letter-spacing: 4px; color: var(--dark);
  border-right: 3px solid var(--accent); padding-right: 24px; align-self: center;
}
.about-info { flex: 1; min-width: 280px; }
.about-info h3 { font-size: 16px; margin-bottom: 8px; }
.about-info p { color: var(--gray); font-size: 13px; line-height: 1.8; }
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
@media (max-width: 700px) { .stats-row { grid-template-columns: repeat(2, 1fr); } }
.stat-card {
  background: var(--dark); color: #fff; border-radius: 10px; padding: 20px 10px; text-align: center;
}
.stat-card b { display: block; font-size: 26px; color: var(--accent); }
.stat-card span { font-size: 12px; opacity: .8; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.team-card {
  border: 1px solid var(--line); border-radius: 10px; padding: 20px; text-align: center;
}
.team-card .avatar {
  width: 52px; height: 52px; border-radius: 50%; background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; margin: 0 auto 10px;
}
.team-card b { display: block; font-size: 15px; }
.team-card span { display: block; color: var(--accent); font-size: 12px; margin: 3px 0 8px; }
.team-card p { color: var(--gray); font-size: 12px; line-height: 1.6; }

/* ==================== 详情模态 ==================== */
.modal {
  position: fixed; inset: 0; z-index: 900; background: rgba(20,22,30,.55);
  display: flex; align-items: center; justify-content: center; padding: 22px;
}
.modal-box {
  background: #fff; border-radius: 14px; padding: 26px 28px; position: relative;
  max-height: 90vh; overflow-y: auto; width: 520px; max-width: 100%;
  box-shadow: 0 24px 60px rgba(0,0,0,.3); animation: pop .18s ease;
}
.modal-lg { width: 760px; }
.modal-xl { width: 900px; }
@keyframes pop { from { transform: scale(.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-close {
  position: absolute; top: 12px; right: 14px; background: none; border: none;
  font-size: 24px; color: var(--gray-light); cursor: pointer; line-height: 1;
}
.modal-close:hover { color: #d62828; }

/* 详情内容 */
.detail-layout { display: grid; grid-template-columns: 300px 1fr; gap: 22px; }
@media (max-width: 700px) { .detail-layout { grid-template-columns: 1fr; } }
.detail-img {
  border: 1px solid var(--line); border-radius: 10px; padding: 14px; min-height: 220px;
  display: flex; align-items: center; justify-content: center; background: #fff;
}
.detail-img img { max-width: 100%; max-height: 260px; object-fit: contain; }
.detail-img .img-ph { width: 120px; height: 120px; border: 1.5px dashed #ccc; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 12px; }
.detail-title { font-size: 18px; font-weight: 700; }
.detail-model { color: var(--accent); font-weight: 700; margin: 4px 0 8px; letter-spacing: .5px; }
.detail-desc { color: var(--gray); font-size: 13px; line-height: 1.7; margin-bottom: 12px; }
.detail-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.spec-table { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-bottom: 16px; }
.spec-table td { padding: 7px 10px; border-bottom: 1px solid var(--line); }
.spec-table td:first-child { color: var(--gray); width: 45%; background: #fafbfc; }

/* 选择器 */
.picker-head { font-size: 15px; font-weight: 700; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.picker-head .picker-title { white-space: nowrap; }
.picker-head input { flex: 1; padding: 8px 14px; border: 1.5px solid var(--line); border-radius: 18px; outline: none; font-size: 13px; min-width: 120px; }
.picker-head input:focus { border-color: var(--accent); }
.picker-head .btn { white-space: nowrap; }
.picker-list { max-height: 55vh; overflow-y: auto; }
.picker-item {
  display: flex; align-items: center; gap: 14px; padding: 10px 8px; border-bottom: 1px solid var(--line);
  cursor: pointer; border-radius: 8px; border-left: 3px solid transparent;
}
.picker-item:hover { background: var(--accent-light); }
.picker-item.selected { background: var(--accent-light); border-left-color: var(--accent); }
.picker-item img { width: 52px; height: 52px; object-fit: contain; }
.picker-item .img-ph { width: 52px; height: 52px; border: 1.5px dashed #ccc; border-radius: 6px; }
.picker-item .pi-model { font-weight: 700; font-size: 13.5px; }
.picker-item .pi-name { color: var(--gray); font-size: 12px; margin-top: 2px; }
.picker-item .pi-check {
  margin-left: auto; width: 22px; height: 22px; border-radius: 50%;
  border: 1.5px solid #c5ccd3; display: flex; align-items: center; justify-content: center;
  color: transparent; font-size: 13px; font-weight: 700; flex-shrink: 0;
}
.picker-item.selected .pi-check { background: var(--accent); border-color: var(--accent); color: #fff; }

/* 预览 */
.preview-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.preview-head > span { font-size: 15px; font-weight: 700; flex: 1; }
.preview-pages { display: flex; gap: 6px; }
.preview-pages button {
  width: 30px; height: 30px; border-radius: 6px; border: 1.5px solid var(--line);
  background: #fff; cursor: pointer; font-size: 13px;
}
.preview-pages button.cur { background: var(--dark); color: #fff; border-color: var(--dark); }
.preview-body { text-align: center; background: #eef0f3; border-radius: 10px; padding: 18px; }
.preview-body canvas { max-width: 100%; height: auto; box-shadow: 0 8px 30px rgba(0,0,0,.15); background: #fff; }

/* PI 汇总 */
.pi-sum { display: flex; gap: 26px; flex-wrap: wrap; padding: 12px 0 4px; font-size: 14px; color: var(--gray); }
.pi-sum b { font-size: 16px; color: var(--dark); }
.pi-sum b.accent { color: var(--accent); font-size: 19px; }
.mode-switch { display: flex; gap: 0; border-radius: 8px; overflow: hidden; border: 1.5px solid var(--line); }
.mode-btn { flex: 1; padding: 9px 6px; background: #fff; border: none; font-size: 13px; cursor: pointer; color: var(--gray); }
.mode-btn.active { background: var(--dark); color: #fff; }
.total-show { font-size: 20px; font-weight: 700; color: var(--accent); padding: 5px 0; }

/* Toast */
.toast {
  position: fixed; top: 74px; left: 50%; transform: translateX(-50%) translateY(-16px);
  background: var(--dark); color: #fff; padding: 10px 24px; border-radius: 22px;
  font-size: 13.5px; opacity: 0; pointer-events: none; transition: all .25s; z-index: 2000;
  box-shadow: 0 10px 26px rgba(0,0,0,.25);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: #b3261e; }

/* Footer */
.footer {
  text-align: center; color: var(--gray-light); font-size: 12px;
  padding: 18px 0 26px; letter-spacing: .5px;
}

/* 响应式导航 */
@media (max-width: 860px) {
  .topbar-inner { gap: 10px; height: auto; flex-wrap: wrap; padding: 10px 14px; }
  .mainnav { order: 3; width: 100%; overflow-x: auto; }
  .brand-text em { display: none; }
}
