/* =========================================================
   全国统一规范电子税务局 · 静态复刻
   页面：index.html（申报信息查询）/ detail.html（申报信息查询详情）
   ========================================================= */

:root {
  --brand: #4186f5;
  --brand-hover: #3273e6;
  --brand-link: #4285f4;
  --bg: #f7f7f9;
  --text: #303133;
  --text-sub: #606266;
  --placeholder: #c0c4cc;
  --border: #dcdfe6;
  --line: #ebebeb;
  --thead: #f9fafe;
  --danger: #f5222d;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-width: 1280px;
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
}

a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; }
input { font-family: inherit; }

/* =========================================================
   1. 顶部导航栏
   ========================================================= */
.topbar {
  height: 56px;
  background: var(--brand);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px 0 10px;
  position: relative;
  z-index: 20;
}

.topbar .logo { display: flex; align-items: center; }
.topbar .logo img { height: 43px; display: block; }

.topbar .user {
  display: flex;
  align-items: center;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  user-select: none;
}

.topbar .avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #b4d4fa;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
}
.topbar .avatar svg {
  width: 36px;
  height: 36px;
  fill: none;
  stroke: #fff;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}

.topbar .caret { margin-left: 7px; display: flex; align-items: center; }
.topbar .caret svg { width: 10px; height: 10px; display: block; }

/* =========================================================
   2. 面包屑导航
   ========================================================= */
.crumbbar {
  height: 61px;
  background: #fff;
  display: flex;
  align-items: center;
  padding: 0 40px 0 28px;
  font-size: 14px;
  position: relative;
  z-index: 10;
}

.crumbbar .back {
  display: flex;
  align-items: center;
  color: #1a1a1a;
  font-size: 20.2px;
  font-weight: 400;
  /* 原图此处为"中等"字重，系统字体只有常规/加粗两档，用极细描边合成 */
  -webkit-text-stroke: 0.5px currentColor;
  margin-right: 25.6px;
  cursor: pointer;
  text-decoration: none;
}
.crumbbar .back svg { width: 14px; height: 11px; margin-right: 2px; display: block; -webkit-text-stroke: 0; }

.crumbbar .crumbs { display: flex; align-items: center; }
.crumbbar .crumbs a { color: var(--brand-link); }
.crumbbar .crumbs .cur { color: var(--text); }
.crumbbar .crumbs a:hover { text-decoration: underline; }
.crumbbar .crumbs .sep {
  display: inline-block;
  width: 7px;
  height: 10px;
  margin: 0 8px;
  font-size: 0;            /* 隐藏作为兜底的 > 字符 */
  color: transparent;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='10' viewBox='0 0 7 10'%3E%3Cpath d='M1.4 1.2 4.6 5 1.4 8.8' fill='none' stroke='%23ababaf' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 7px 10px no-repeat;
}

/* =========================================================
   3. 主体 + 卡片
   ========================================================= */
.main {
  min-height: calc(100vh - 117px);
  padding: 39px 0 60px;
}

.card {
  width: 1186px;
  margin: 0 auto;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

/* 列表页卡片 */
.card.query { padding: 13px 27px 0; }

/* 详情页卡片 */
.card.detail { padding: 12px 0 0; overflow: hidden; }

.card-title {
  margin: 0;
  /* 上 2 / 下 14：总高与原来一致(22+16+1)，仅让文字在原图位置 */
  padding: 2px 0 14px;
  border-bottom: 1px solid var(--line);
  font-size: 18px;
  font-weight: 700;
  line-height: 22px;
  color: #000;
}

/* =========================================================
   4. 查询表单
   ========================================================= */
.query-form { margin-top: 13px; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, 375px);
  margin-left: 46px;
  margin-bottom: 30px;
}

.form-item {
  display: flex;
  align-items: center;
  height: 56px;
  padding-right: 20px;
}

.form-item > label {
  flex: 0 0 90px;
  width: 90px;
  text-align: right;
  padding-right: 10px;
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
}

.form-item > label.req::before {
  content: "*";
  color: var(--danger);
  margin-right: 3px;
}

/* ---- 控件基础 ---- */
.control {
  width: 234px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: #fff;
  display: flex;
  align-items: center;
  padding: 0 26px 0 10px;
  position: relative;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
}

.control:hover { border-color: #c0c4cc; }

.control .text {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* 下拉箭头 */
.control .chev {
  position: absolute;
  right: 9px;
  top: 50%;
  margin-top: -6px;
  width: 12px;
  height: 12px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5L6 8L9.5 4.5' fill='none' stroke='%23a8abb2' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
  transition: transform .2s;
}

/* 日期输入 */
.control.date input {
  width: 100%;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
}
.control.date input::placeholder { color: var(--placeholder); }
.control.date .cal {
  position: absolute;
  right: 8px;
  top: 50%;
  margin-top: -7px;
  width: 15px;
  height: 15px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect x='1.8' y='3.2' width='12.4' height='11' rx='1.4' fill='none' stroke='%23c0c4cc' stroke-width='1.1'/%3E%3Cpath d='M2 6.6h12' stroke='%23c0c4cc' stroke-width='1.1'/%3E%3Cpath d='M5.4 1.6v3.2M10.6 1.6v3.2' stroke='%23c0c4cc' stroke-width='1.1' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* ---- 日期选择面板 ---- */
.date-panel {
  position: fixed;
  z-index: 3000;
  width: 234px;
  padding: 8px 10px 6px;
  background: #fff;
  border: 1px solid #e4e7ed;
  border-radius: 4px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  font-size: 12px;
  color: var(--text);
  -webkit-user-select: none;
  user-select: none;
}
.dp-head {
  display: flex;
  align-items: center;
  height: 24px;
}
.dp-title {
  flex: 1;
  text-align: center;
  font-size: 13px;
}
.dp-nav {
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  background: none;
  color: #a8abb2;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}
.dp-nav:hover { color: var(--brand); }
.dp-week,
.dp-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}
.dp-week span {
  height: 24px;
  line-height: 24px;
  text-align: center;
  color: #909399;
}
.dp-day {
  height: 26px;
  line-height: 26px;
  text-align: center;
  border-radius: 2px;
  cursor: pointer;
}
.dp-day:hover { color: var(--brand); background: #f2f6fc; }
.dp-day.other { color: var(--placeholder); }
.dp-day.today { color: var(--brand); font-weight: 700; }
.dp-day.active,
.dp-day.active:hover {
  background: var(--brand);
  color: #fff;
  font-weight: 400;
}
.dp-foot {
  margin-top: 4px;
  padding-top: 5px;
  border-top: 1px solid var(--line);
  text-align: center;
}
.dp-today {
  padding: 0;
  border: 0;
  background: none;
  color: var(--brand);
  font-size: 12px;
  cursor: pointer;
}

/* 多选类型控件 */
.control.multi {
  width: 234px;
  padding: 0 26px 0 6px;
}

.control.multi .tag {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  border-radius: 2px;
  background: #e6e6e6;
  font-size: 12px;
  color: #303133;
  white-space: nowrap;
  flex: 0 0 auto;
}
.control.multi .tag .x {
  margin-left: 9px;
  font-size: 13px;
  line-height: 1;
  color: #8a8d93;
  cursor: pointer;
}
.control.multi .tag .x:hover { color: var(--text-sub); }

/* 多选超出数量的 "+N" 计数，原图为浅灰圆角底 */
.control.multi .more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  margin: 0 6px;
  padding: 0 8px;
  border-radius: 2px;
  background: #e6e6e6;
  font-size: 13px;
  color: #303133;
  flex: 0 0 auto;
}

/* 操作按钮组 */
.form-actions {
  grid-column: 3;          /* 固定在第 3 列，收起后仍停留在右侧 */
  display: flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  width: 232px;
  margin-left: 90px;
}

.btn {
  height: 32px;
  padding: 0 15px;
  border-radius: 2px;
  border: 1px solid transparent;
  font-size: 14px;
  line-height: 1;
  transition: all .15s;
}

.btn + .btn { margin-left: 10px; }

.btn-default {
  background: #fff;
  border-color: #d9dde3;
  color: var(--text);
}
.btn-default:hover { border-color: var(--brand); color: var(--brand); }

.btn-primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.btn-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }

.collapse {
  margin-left: 24px;
  display: inline-flex;
  align-items: center;
  color: var(--brand);
  font-size: 14px;
  user-select: none;
}
.collapse svg { width: 12px; height: 12px; margin-left: 3px; transition: transform .2s; }
.collapse.up svg { transform: rotate(180deg); }

/* 收起：只折叠四个日期条件，第一行下拉与按钮行保留（按钮行内可再次展开） */
.form-grid.collapsed .form-item.date-item { display: none; }

/* =========================================================
   5. 查询结果表格
   ========================================================= */
.table-wrap {
  position: relative;
  margin-top: 26px;
  padding-bottom: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;      /* Firefox：隐藏原生滚动条 */
  -ms-overflow-style: none;   /* 旧版 Edge / IE */
}
.table-wrap::-webkit-scrollbar { width: 0; height: 0; }  /* Chromium：隐藏原生滚动条 */

/* ---------------------------------------------------------
   自绘横向滚动条
   Chromium 新版默认使用 overlay 滚动条，会忽略
   ::-webkit-scrollbar-button，导致 Edge 下看不到两端箭头，
   因此改为 DOM 自绘（结构由 js/main.js 生成）。
   --------------------------------------------------------- */
.h-scrollbar {
  display: flex;
  align-items: center;
  height: 10px;
  margin-top: 3px;
  -webkit-user-select: none;
  user-select: none;
}
.hs-arrow {
  position: relative;
  flex: 0 0 auto;
  width: 16px;
  height: 10px;
  padding: 0;
  border: 0;
  background: #fff;
  cursor: pointer;
}
.hs-arrow::before {
  content: "";
  position: absolute;
  top: 50%;
  width: 0;
  height: 0;
  margin-top: -4px;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
}
.hs-prev::before { left: 3px; border-right: 6px solid #e4e4e4; }
.hs-next::before { right: 3px; border-left: 6px solid #e4e4e4; }
.hs-prev:hover::before { border-right-color: #cfcfcf; }
.hs-next:hover::before { border-left-color: #cfcfcf; }
.hs-track {
  position: relative;
  flex: 1 1 auto;
  height: 10px;
  background: #fff;
  overflow: hidden;
}
.hs-thumb {
  position: absolute;
  top: 1px;
  left: 0;
  height: 8px;
  background: #e4e4e4;
  border-radius: 4px;
  cursor: default;
}
.hs-thumb:hover { background: #d8d8d8; }

table.data-table {
  width: 1253px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

table.data-table th,
table.data-table td {
  text-align: center;
  font-size: 14px;
  color: var(--text);
  padding: 0 10px;
  white-space: nowrap;
}

table.data-table thead th {
  height: 42px;
  background: var(--thead);
  font-weight: 400;
  color: var(--text);
}

table.data-table tbody td {
  height: 70px;
  border-bottom: 1px solid #e1e1e1;
  vertical-align: middle;
}

/* 各列宽 */
table.data-table .c-index { width: 100px; }
table.data-table .c-type { width: 157px; }
table.data-table .c-d1 { width: 125px; }
table.data-table .c-d2 { width: 140px; }
table.data-table .c-d3 { width: 137px; }
table.data-table .c-money { width: 122px; }
table.data-table .c-fix { width: 110px; }
table.data-table .c-flag { width: 132px; }
table.data-table .c-void { width: 120px; }
table.data-table .c-op { width: 110px; }

/* 申报表种类 两行显示 */
table.data-table .c-type .link { display: inline-block; white-space: normal; line-height: 20px; }

/* 固定操作列 */
table.data-table thead th.c-op,
table.data-table tbody td.c-op {
  position: sticky;
  right: 0;
  padding: 0 10px;
  background: #fff;
  border-left: 1px solid #d7d8dd;
}
table.data-table thead th.c-op { background: var(--thead); }
table.data-table tbody td.c-op { border-bottom: 1px solid #e1e1e1; }

.link { color: var(--brand); cursor: pointer; }
.link:hover { color: var(--brand-hover); }

/* =========================================================
   6. 分页
   ========================================================= */
.pager {
  height: 65px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pager .total {
  margin-left: 24px;
  font-size: 13px;
  color: var(--text-sub);
}

.pager .right { display: flex; align-items: center; }

.pager .page-size {
  height: 32px;
  min-width: 104px;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 9px 0 11px;
  margin-right: 9px;
  font-size: 13px;
  color: var(--text-sub);
  cursor: pointer;
}
.pager .page-size .chev {
  width: 12px;
  height: 12px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5L6 8L9.5 4.5' fill='none' stroke='%23a8abb2' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
}

.pg-btn {
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  border-radius: 2px;
  font-size: 14px;
  color: #c0c4cc;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.pg-btn:disabled { cursor: default; }
.pg-btn.active {
  margin-left: 9px;
  background: var(--brand);
  color: #fff;
  cursor: default;
}

/* =========================================================
   7. 详情页（申报表）
   ========================================================= */
.detail-toolbar {
  height: 32px;
  padding: 0 33px 0 15px;
  display: flex;
  align-items: center;
}

.detail-toolbar .picker { display: flex; align-items: center; font-size: 14px; color: var(--text); }
.detail-toolbar .picker > span { margin-right: 6px; }

.mini-select {
  position: relative;
  min-width: 76px;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}
.mini-select .label { white-space: nowrap; }
.mini-select .chev {
  width: 12px;
  height: 12px;
  margin-left: 6px;
  flex: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5L6 8L9.5 4.5' fill='none' stroke='%23a8abb2' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
  transition: transform .2s;
}
.mini-select.open .chev { transform: rotate(180deg); }

/* 下拉选项面板 */
.mini-menu {
  display: none;
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  width: max-content;
  min-width: 100%;
  margin: 0;
  padding: 6px 0;
  list-style: none;
  background: #fff;
  border: 1px solid #e4e7ed;
  border-radius: 3px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  z-index: 60;
}
.mini-select.open .mini-menu { display: block; }
.mini-menu li {
  padding: 0 14px;
  height: 32px;
  line-height: 32px;
  font-size: 14px;
  color: var(--text-sub);
  white-space: nowrap;
  cursor: pointer;
}
.mini-menu li:hover { background: #f5f7fa; }
.mini-menu li.active { color: var(--brand-link); background: #e9f1fe; font-weight: 400; }

.btn-export {
  margin-left: auto;
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: #fff;
  color: var(--text);
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  transition: all .15s;
}
.btn-export img { width: 20px; height: 20px; margin-right: 4px; display: block; }
.btn-export:hover { border-color: var(--brand); color: var(--brand); }

/* ---------------- 申报表纸张 ---------------- */
.paper {
  width: 100%;
  margin: 0;
}

/* 表单图片：宽度固定撑满纸张区域，高度随图片比例自适应 */
.paper .form-img {
  display: block;
  width: 100%;
  height: auto;
}

.paper h1 {
  margin: 39px 0 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 26px;
  color: #1a1a1a;
  text-align: center;
  letter-spacing: 0.5px;
}

.paper .note {
  margin: 12px 0 0;
  font-size: 13px;
  letter-spacing: 0.6px;
  font-weight: 700;
  line-height: 18px;
  color: #1a1a1a;
  text-align: justify;
}

/* 信息行 */
.info-table {
  margin-top: 6px;
  border-top: 1px solid #333;
  border-bottom: 1px solid #333;
}

.info-row {
  display: flex;
  align-items: center;
  height: 35px;
  font-size: 12px;
  color: #1a1a1a;
}
.info-row .k { flex: 0 0 217px; }
.info-row .v { flex: 1; }

/* 声明 */
.paper .statement {
  margin: 23px 0 0;
  text-indent: 24px;
  font-size: 13px;
  font-weight: 700;
  line-height: 18px;
  color: #1a1a1a;
  text-align: justify;
}

/* 签章 */
.paper .sign {
  margin-top: 49px;
  padding-right: 115px;
  text-align: right;
  font-size: 13px;
  line-height: 18px;
  color: #1a1a1a;
}

.paper .sign-date {
  margin-top: 44px;
  padding-right: 2px;
  text-align: right;
  font-size: 13px;
  line-height: 18px;
  color: #1a1a1a;
}

/* 底部经办 / 受理信息 */
.foot-grid {
  margin-top: 20px;
  padding-top: 0;
  border-top: 1px solid #333;
  display: grid;
  grid-template-columns: 409px 398px;
}

.foot-grid > div { padding-top: 1px; }

.foot-row {
  display: flex;
  align-items: center;
  height: 23px;
  font-size: 12px;
  color: #1a1a1a;
}

.col-1 .foot-row .k { flex: 0 0 217px; }
.col-2 .foot-row .k { flex: 0 0 142px; }

.paper .supervise {
  margin: 34px 0 0;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  line-height: 18px;
  color: #1a1a1a;
}
