/* 客户门户专属样式（复用 styles.css 的控制台骨架：sidebar/topbar/content/card/table） */
:root { --cp: #0A2A5A; --cp2: #0F4B86; --ca: #00A0C8; }

/* ---- 登录（布局对齐超管登录页：左品牌图 + 右登录窗） ---- */
#c-login { position: fixed; inset: 0; display: flex; background: #061E42; }
/* 三种登录共用一个固定高度容器：切换 tab 时窗口不上下跳动（二维码已缩小到 150）
   🔴 display:flow-root 阻断首个子元素 margin-top（密码 14 / 二维码 8）向上穿透合并，
      否则卡片高度会随页签差 6px。 */
.cl-panes { display: flow-root; min-height: 254px; }
.cl-pane { animation: clFade .16s ease; }
@keyframes clFade { from { opacity: .35 } to { opacity: 1 } }
.cl-aside {
  flex: 0 0 46%; max-width: 620px; padding: 56px 48px;
  background: linear-gradient(150deg, #061E42 0%, #0A3D6E 52%, #00A0C8 130%);
  color: #fff; display: flex; flex-direction: column; justify-content: center;
}
.cl-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 38px; }
.cl-brand img { height: 44px; }
.cl-brand span { font-size: 24px; font-weight: 800; letter-spacing: 1px; }
.cl-aside h2 { font-size: 34px; line-height: 1.3; margin: 0 0 16px; font-weight: 800; }
.cl-sub { font-size: 15px; line-height: 1.9; color: #d6ecf7; margin: 0 0 30px; }
.cl-feat { list-style: none; padding: 0; margin: 0; }
.cl-feat li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px;
  color: #eaf6fb; line-height: 1.8; margin-bottom: 14px; }
.cl-feat li span { flex: 0 0 22px; font-size: 16px; }
.cl-foot { margin-top: 34px; font-size: 12px; color: #9fc7dd; letter-spacing: .3px; }

.cl-main { flex: 1; display: flex; align-items: center; justify-content: center;
  background: #f4f7fb; padding: 30px; }
.cl-card { width: 100%; max-width: 380px; background: #fff; border-radius: 14px;
  padding: 34px 32px 26px; box-shadow: 0 12px 40px rgba(10, 42, 90, .1); }
.cl-card h1 { font-size: 22px; color: var(--cp); margin: 0 0 8px; }
.cl-tip { font-size: 13px; color: #7b8794; margin-bottom: 22px; line-height: 1.7; }
.cl-tip b { color: var(--cp); }
.cl-card label { display: block; font-size: 13px; color: #4a5568; margin: 14px 0 6px; }
.cl-card input { width: 100%; box-sizing: border-box; height: 42px; padding: 0 12px;
  border: 1px solid #d7dee8; border-radius: 8px; font-size: 14px; outline: none; }
.cl-card input:focus { border-color: var(--ca); box-shadow: 0 0 0 3px rgba(0, 160, 200, .12); }
.cl-card .btn-primary { width: 100%; height: 44px; margin-top: 22px; border-radius: 8px;
  background: linear-gradient(90deg, var(--cp), var(--cp2)); color: #fff; border: 0;
  font-size: 15px; letter-spacing: 4px; cursor: pointer; }
.cl-card .btn-primary:disabled { opacity: .6; cursor: default; }
.cl-err { color: #d63031; font-size: 13px; min-height: 18px; margin-top: 10px; }
.cl-links { display: flex; justify-content: space-between; margin-top: 6px; font-size: 12px; }
.cl-links a { color: #5a6b80; text-decoration: none; }
.cl-links a:hover { color: var(--ca); }
.cl-note { margin-top: 18px; font-size: 12px; color: #98a2b3; text-align: center; }

/* ---- 门户内 ---- */
.c-hello { font-size: 13px; color: #5a6b80; margin-right: 8px; }
.nav-badge { margin-left: auto; background: #e5484d; color: #fff; font-size: 11px;
  border-radius: 9px; padding: 1px 6px; line-height: 16px; }
.c-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 14px; }
.c-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.c-kpi { background: #fff; border: 1px solid #e8eef6; border-radius: 12px; padding: 16px 18px; }
.c-kpi .k { font-size: 12px; color: #7b8794; }
.c-kpi .v { font-size: 26px; font-weight: 800; color: var(--cp); margin-top: 6px; line-height: 1.1; }
.c-kpi .v.warn { color: #e5484d; }
.c-kpi .v.ok { color: #0e9f6e; }
.c-kpi .s { font-size: 12px; color: #98a2b3; margin-top: 4px; }

.c-drop { border: 2px dashed #c8d6e8; border-radius: 14px; background: #fbfdff;
  padding: 34px 20px; text-align: center; transition: .15s; }
.c-drop.on { border-color: var(--ca); background: #f0fafd; }
.c-drop .ic { font-size: 40px; }
.c-drop h3 { margin: 10px 0 6px; color: var(--cp); font-size: 16px; }
.c-drop p { margin: 0; color: #7b8794; font-size: 13px; line-height: 1.8; }
.c-drop .row { margin-top: 16px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.c-msg { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid #eef2f7; }
.c-msg.unread { background: #f7fbff; }
.c-msg .dot { width: 8px; height: 8px; border-radius: 50%; background: #c9d4e2; margin-top: 7px; flex: 0 0 8px; }
.c-msg.unread .dot { background: var(--ca); }
.c-msg .t { font-size: 14px; color: #22303f; font-weight: 600; }
.c-msg .b { font-size: 13px; color: #5a6b80; margin-top: 4px; line-height: 1.7; white-space: pre-wrap; }
.c-msg .m { font-size: 12px; color: #98a2b3; margin-top: 6px; }
.c-msg .ops { margin-left: auto; display: flex; gap: 8px; align-items: flex-start; }

.c-tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.c-tab { padding: 7px 16px; border-radius: 8px; background: #eef2f8; color: #445;
  font-size: 13px; cursor: pointer; border: 0; }
.c-tab.on { background: var(--cp); color: #fff; }

.c-reg { border: 1px solid #e8eef6; border-radius: 10px; padding: 14px 16px; margin-bottom: 10px; background: #fff; }
.c-reg .h { display: flex; align-items: center; gap: 8px; }
.c-reg .h b { font-size: 14px; color: #22303f; }
.c-reg .sum { font-size: 13px; color: #5a6b80; margin-top: 6px; line-height: 1.7; }
.c-reg .meta { font-size: 12px; color: #98a2b3; margin-top: 6px; }
.c-reg .body { margin-top: 10px; padding-top: 10px; border-top: 1px dashed #e2e9f2;
  font-size: 13px; color: #44515f; line-height: 1.95; }
.c-reg .body p { margin: 0 0 8px; }

.c-empty { text-align: center; color: #98a2b3; padding: 40px 0; font-size: 13px; }
.c-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.c-bar .sp { flex: 1; }

/* 门户弹窗（复用 .overlay/.modal，补标题栏与表单栅格） */
.m-head { display: flex; align-items: center; gap: 10px; margin: -22px -22px 14px; padding: 13px 18px;
  background: linear-gradient(180deg, #eef2fa, #e6ecf7); border-bottom: 1px solid #dde5f5;
  border-radius: 14px 14px 0 0; }
.m-head b { font-size: 16px; color: #0A2A5A; flex: 1; }
.m-body { font-size: 13px; }
.c-form { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 10px 12px; align-items: center; }
.c-form label { font-size: 13px; color: #4a5568; text-align: right; }
.c-form .inp { width: 100%; box-sizing: border-box; height: 34px; }
@media (max-width: 640px) {
  .c-form { grid-template-columns: 1fr; }
  .c-form label { text-align: left; }
}

@media (max-width: 900px) {
  #c-login { flex-direction: column; }
  .cl-aside { flex: none; max-width: none; padding: 34px 24px; }
  .cl-aside h2 { font-size: 26px; }
  .cl-feat { display: none; }
  .c-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .c-hello { display: none; }
}

/* ===== 2026-11-03：登录三方式 / 扫码上传 / 凭证详情改造 ===== */
.cl-tabs { display: flex; gap: 6px; background: #f1f5fb; border-radius: 10px; padding: 4px; margin-bottom: 4px; }
.cl-tab { flex: 1; border: 0; background: transparent; color: #5a6b80; font-size: 13px;
  padding: 9px 0; border-radius: 8px; cursor: pointer; transition: .15s; }
.cl-tab.on { background: #fff; color: var(--cp); font-weight: 700; box-shadow: 0 1px 4px rgba(10,42,90,.10); }
.cl-code-row { display: flex; gap: 8px; }
.cl-code-row input { flex: 1; }
.cl-code-btn { flex: 0 0 116px; height: 42px; border: 1px solid #cfdcee; background: #f7fafd;
  color: var(--cp); border-radius: 8px; font-size: 13px; cursor: pointer; }
.cl-code-btn:disabled { opacity: .6; cursor: default; }
.cl-qr-box { margin: 8px auto 0; width: 150px; height: 150px; display: flex; align-items: center;
  justify-content: center; border: 1px solid #e3ebf5; border-radius: 12px; background: #fff; padding: 6px; }
.cl-qr-box img { width: 138px !important; height: 138px !important; }
.cl-qr-note { font-size: 12px; color: #7b8794; line-height: 1.7; margin-top: 10px; text-align: center; }
/* 顶部「财税顾问」联系信息 */
.c-advisor { font-size: 12.5px; color: #0A2A5A; background: #eef6fb; border: 1px solid #d7e8f4;
  border-radius: 16px; padding: 4px 12px; margin-right: 10px; white-space: nowrap; }
.c-advisor b { font-weight: 700; }
.c-advisor a { color: #0F4B86; text-decoration: none; margin-left: 6px; }
.c-advisor a:hover { text-decoration: underline; }
@media (max-width: 900px) { .c-advisor { display: none; } }

/* 扫码上传面板 */
.c-scan { display: flex; gap: 20px; align-items: center; padding: 16px; border: 1px solid #e3ebf5;
  border-radius: 12px; background: #f9fcff; }
.c-scan .qr { flex: 0 0 190px; width: 190px; height: 190px; background: #fff; border: 1px solid #e3ebf5;
  border-radius: 10px; display: flex; align-items: center; justify-content: center; padding: 8px; }
.c-scan .qr img { width: 174px; height: 174px; }
.c-scan .tip { font-size: 13px; color: #44515f; line-height: 1.9; }
.mono { font-family: Consolas, monospace; font-size: 12px; color: #7b8794; }

/* 凭证详情 */
.vch-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 14px;
  padding: 10px 12px; background: #f7fafd; border: 1px solid #e8eef6; border-radius: 10px; margin-bottom: 12px; }
.vch-meta span { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.vch-meta span.wide { grid-column: 1 / -1; }
.vch-meta i { font-style: normal; font-size: 12px; color: #98a2b3; }
.vch-meta b { color: #22303f; font-weight: 600; }
.vch-tbl .tot td { font-weight: 700; background: #f7f9fc; }
.vch-foot { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: #5a6b80; }

.c-reg-h { font-size: 13px; font-weight: 700; color: #0A2A5A; margin: 6px 0 10px; }
.tbl-empty, td.empty { text-align: center; color: #98a2b3; padding: 18px 0; }

@media (max-width: 760px) {
  .c-scan { flex-direction: column; }
  .vch-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ===== 2026-11-04：多账套切换 / 我的票据预览 / 标准记账凭证 ===== */
/* 顶部账套选择器（同一手机号代账多家企业时才出现） */
.tenant.c-booksw { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px 3px 10px;
  background: #eef6fb; border: 1px solid #d7e8f4; border-radius: 18px; max-width: 380px; }
.c-booksw .c-book-ic { font-size: 13px; line-height: 1; }
.c-booksw .c-book-sel { border: 0; background: transparent url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%230A2A5A'/%3E%3C/svg%3E") no-repeat right 4px center;
  -webkit-appearance: none; appearance: none; padding: 0 16px 0 0; margin: 0; height: 24px;
  font-size: 14px; font-weight: 700; color: #0A2A5A; cursor: pointer; outline: none; max-width: 300px; text-overflow: ellipsis; }
.c-booksw .c-book-sel:disabled { opacity: .55; cursor: default; }
.c-booksw .c-book-n { font-size: 11.5px; color: #7b8794; font-weight: 400; white-space: nowrap; }

/* 我的票据 · 预览窗（支持一条记录多份文件） */
.modal.ctpv-modal { width: 1080px; max-width: 96vw; height: 88vh; display: flex; flex-direction: column;
  padding: 16px 18px; overflow: hidden; text-align: left; }
.ctpv { display: flex; flex-direction: column; height: 100%; min-height: 0; text-align: left; }
.ctpv-head { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; padding-bottom: 10px;
  border-bottom: 1px solid #e8eef6; }
.ctpv-head b { font-size: 16px; color: #0A2A5A; }
.ctpv-head .sp { flex: 1; }
.ctpv-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 14px;
  padding: 10px 12px; margin: 10px 0; background: #f7fafd; border: 1px solid #e8eef6; border-radius: 10px;
  flex: 0 0 auto; }
.ctpv-meta > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ctpv-meta i { font-style: normal; font-size: 11.5px; color: #98a2b3; }
.ctpv-meta b { font-size: 13px; color: #22303f; font-weight: 600; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.ctpv-main { display: flex; gap: 12px; flex: 1 1 auto; min-height: 0; }
.ctpv-list { flex: 0 0 246px; width: 246px; border: 1px solid #e8eef6; border-radius: 10px;
  background: #fbfdff; padding: 8px; overflow: auto; }
.ctpv-item { display: flex; gap: 8px; padding: 8px 9px; border-radius: 8px; border: 1px solid transparent;
  cursor: pointer; margin-bottom: 6px; background: #fff; }
.ctpv-item:hover { border-color: #d7e8f4; }
.ctpv-item.on { border-color: #00A0C8; background: #f0fafd; box-shadow: 0 0 0 2px rgba(0,160,200,.10); }
.ctpv-item .ic { flex: 0 0 22px; font-size: 16px; line-height: 1.2; }
.ctpv-item .tx { min-width: 0; flex: 1; }
.ctpv-item .n { font-size: 12.5px; color: #22303f; font-weight: 600; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.ctpv-item .m { font-size: 11px; color: #98a2b3; margin-top: 2px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.ctpv-view { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; min-height: 0; }
.ctpv-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; flex: 0 0 auto; }
.ctpv-tools .sp { flex: 1; }
.ctpv-idx { font-size: 12.5px; color: #5a6b80; }
.ctpv-stage { flex: 1 1 auto; min-height: 0; max-height: none; overflow: auto; display: flex; align-items: flex-start;
  justify-content: center; background: #f6f8fb; border: 1px solid #e8eef6; border-radius: 10px; padding: 10px; }
.ctpv-stage .ctpv-img { display: block; background: #fff; border-radius: 4px; box-shadow: 0 4px 18px rgba(0,0,0,.12); }
.ctpv-stage .ctpv-pdf { width: 100%; height: 100%; min-height: 58vh; border: 0; background: #fff; border-radius: 4px; }

/* 标准记账凭证：弹窗内不留白、按册居中 */
#c-modal.voucher-preview { text-align: left; }
#c-modal.voucher-preview .vp-stage { padding: 4px 0 8px; }
#c-modal.voucher-preview .vou-x { margin: 0 auto; }

@media (max-width: 900px) {
  .ctpv-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ctpv-list { flex: 0 0 190px; width: 190px; }
  .c-booksw .c-book-n { display: none; }
}
