:root {
  color-scheme: dark;
  font-family: system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  background: #05070A;
  color: #fff;
  /* 以下 5 个无前缀变量（--bg/--card/--card2/--line/--muted）为历史遗留写法，现全部转为指向 ui-unified.css 的 --zp-* 单一真相源；--soft 为死定义已于 Commit 4B 删除（admin.html 走内联 --soft:#7F8A95）。
     之所以放在 app.css 而由别名指向别处：本文件未被 admin.html 加载，
     若把权威定义写在本层，管理员端会取到未定义值。详见 ui-unified.css 顶部注释。 */
  --bg: var(--zp-bg);
  --card: var(--zp-card-translucent);
  --card2: var(--zp-card-translucent-2);
  --line: var(--zp-line);
  --muted: var(--zp-muted);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: #fff;
  min-height: 100vh;
  min-height: 100dvh;
}

.shell {
  width: min(100% - 28px,560px);
  margin: auto;
  padding: 14px 0 40px;
}

/* 阶段 6 · 5A：移除遗留 .topbar 死规则（无任何 HTML 使用裸 .topbar）。
   标准 Header 钩子 .topbar 现统一定义于 css/ui-unified.css（权威层）。详见资产审计台账第二十四章。 */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 12px;
  box-shadow: none;
}

.card h2 {
  margin: 0 0 10px;
  font-size: 17px;
  line-height: 24px;
}

.message {
  min-height: 20px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 20px;
}

.message.error {
  color: #ffb4ab;
}

.route-card {
  padding: 16px;
}

.primary-btn,.grid a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 0;
  border-radius: 11px;
  background: var(--zp-primary);
  color: #fff;
  text-align: center;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
}

.primary-btn {
  margin-top: 12px;
}

.primary-btn:disabled {
  opacity: .45;
  cursor: default;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.grid a {
  background: rgba(20,28,37,.80);
  border: 1px solid var(--line);
}

/* font-size 22→20。两点必须说清：
   1. 这里的字号是字符图标（☰）的大小，不是文字标签大小。方案第十三章有两条字号标准
      —— 文字 14–16px、icon 18–20px，3A 的审计把两者混为一谈才误判成「font 22 违规」。
      按 icon 标准取区间上限 20px，变化最小且达标。
   2. 本规则当前**没有任何页面元素引用**：全站实际用的是 home.css 的 .home-menu-button，
      且它渲染的是 22×22 的 svg 而非字符。也就是说这次改动不产生任何视觉变化，
      属于死代码。真正的清理（连同 .data-page-back 那条被 font-size:0 盖掉的 30px）
      归入阶段 10 CSS 清理，本轮不动结构。 */

.store-list {
  margin-top: 4px;
}

.store-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 9px 2px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  font-size: 14px;
}

.store-row:last-child {
  border-bottom: 0;
}

.store-row small {
  flex: none;
  color: #8F9AA5;
  font-size: 11px;
}

.store-nav {
  color: #fff;
  text-decoration: none;
}

.store-nav:active {
  text-decoration: underline;
}

.summary {
  margin: 0;
  color: #B8C2CC;
  font-size: 13px;
  line-height: 20px;
}

.confirm-panel {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #303943;
  border-radius: 12px;
  background: var(--card2);
}

.pending-box {
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,.07);
}

.pending-box:first-child {
  padding-top: 0;
}

.pending-box:last-child {
  border-bottom: 0;
}

.pending-title {
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 14px;
}

.candidate-list {
  display: grid;
  gap: 7px;
}

.choice-btn {
  width: 100%;
  padding: 11px 12px;
  background: var(--card);
  border: 1px solid #35404C;
  border-radius: 9px;
  color: #fff;
  text-align: left;
  font-size: 13px;
}

.choice-btn.selected {
  border-color: #7F8B98;
  background: rgba(26,38,46,.82);
}

.secondary-btn {
  width: 100%;
  border: 1px solid #35404C;
  background: rgba(10,14,19,.88);
  color: #fff;
}

.confirm-submit {
  width: 100%;
  margin-top: 0;
}

.confirm-submit:disabled {
  opacity: .5;
}

.diagnostics {
  display: none;
  margin-top: 14px;
  padding: 12px;
  white-space: pre-wrap;
  overflow: auto;
  max-height: 420px;
  border: 1px solid #303943;
  border-radius: 10px;
  background: rgba(10,14,19,.88);
  color: #B8C2CC;
  font-size: 12px;
}

.auth-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: var(--bg);
}

.auth-card {
  width: min(100%,430px);
  padding: 32px 28px 28px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: none;
}

.auth-card h1 {
  text-align: center;
  margin: 0;
  font-size: 26px;
  line-height: 1.25;
}

.auth-card>p {
  text-align: center;
  margin: 7px 0 24px;
  color: #9DA8B3;
  font-size: 13px;
}

.auth-card form {
  margin: 0;
}

.auth-card label {
  display: block;
  margin: 0 0 15px;
  color: #B8C2CC;
  font-size: 14px;
}

.auth-card input {
  height: 50px;
  margin-top: 7px;
  padding: 0 16px;
  font-size: 16px;
  outline: none;
}

.auth-card input:focus {
  border-color: #536273;
}

.auth-card .message {
  min-height: 22px;
  margin: 2px 0 9px;
  font-size: 14px;
  line-height: 20px;
}

.auth-card button {
  height: 50px;
  padding: 0 16px;
  font-size: 16px;
}

.auth-card>p:last-child {
  margin: 20px 0 0;
}

.auth-card a {
  color: #B8C2CC;
  text-decoration: none;
}

@media (max-width:380px) {
  .shell {
    width: min(100% - 22px,560px);
  }

  .pipeline {
    gap: 3px;
    font-size: 11px;
  }

  .pipeline span {
    padding: 5px 5px;
  }
}

@media (max-height:600px) {
  .auth-shell {
    align-items: flex-start;
    padding-top: 18px;
  }

  .auth-card {
    padding-top: 22px;
  }

  .auth-card>p {
    margin-bottom: 18px;
  }
}

.account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}

.account-row:last-child {
  border-bottom: 0;
}

.account-row span {
  color: var(--muted);
  font-size: 14px;
}

.account-row strong {
  font-size: 15px;
  font-weight: 500;
  color: #fff;
  word-break: break-all;
  text-align: right;
}

.account-logout {
  width: 100%;
  height: 48px;
  border-radius: 12px;
}

.data-help {
  margin: 10px 0 0;
  color: #8A97A5;
  font-size: 13px;
  line-height: 1.6;
}

.data-import {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0,0,0,.62);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.data-import-panel {
  width: min(100%,620px);
  max-height: 90vh;
  overflow: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
}

.data-import-panel h3 {
  margin: 0 0 12px;
  font-size: 17px;
}

.data-file {
  width: 100%;
  margin: 8px 0 12px;
  color: #fff;
}

.data-textarea {
  width: 100%;
  min-height: 280px;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #10161D;
  color: #E8EDF2;
  padding: 12px;
  font-size: 15px;
  line-height: 1.6;
}

.data-preview {
  margin-top: 10px;
}

.data-import-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.data-import-actions button {
  height: var(--zp-control-height);
  border: 1px solid #35404C;
  border-radius: 10px;
  background: rgba(10,14,19,.88);
  color: #fff;
  font-size: 15px;
}

.data-import-actions #importSave {
  background: var(--zp-primary);
}

.request-row {
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,.07);
  font-size: 14px;
  line-height: 21px;
}

.request-row:last-child {
  border-bottom: 0;
}

/* 行内小按钮：radius 8→10、font 12→14、padding 5px 8px→8px 16px。
   它是「没有显式 height、高度由 padding+font 撑出来」的那类按钮，
   实测高度仅约 27px —— 3A 只统计显式 min-height/height，把它整条漏掉了
   （已在 css-button-resolve.cjs 补隐式高度估算才暴露出来）。
   补到 8px 16px 后约 36px，仍不足 48px：再往上撑会顶破 .request-row 的单行布局，
   故留到 Row 阶段（方案第十五章）连同行高一起处理，此处不硬凑数值。 */
.request-row button {
  border: 1px solid #35404C;
  border-radius: 10px;
  background: rgba(10,14,19,.88);
  color: #fff;
  padding: 8px 16px;
  font-size: 14px;
}

.request-row div {
  color: var(--muted);
  font-size: 12px;
}

.login-shell {
  min-height: 100vh;
  min-height: 100dvh;
  box-sizing: border-box;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(48px, 9vh, 96px) 24px calc(20px + env(safe-area-inset-bottom));
  background: transparent;
}

.login-card {
  width: min(100%,380px);
  box-sizing: border-box;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.login-brand {
  text-align: left;
  margin: 0 0 30px;
}

.login-brand-row {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 38px;
}

.login-brand-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 15px;
  /* 徽章底色始终为 logo 原图底色 #05070A：logo 含白色描边，
     白底（浅色外观）下描边会消失，故不随外观翻转 */
  background: #05070A;
}

.login-logo {
  display: block;
  width: 38px;
  height: auto;
  object-fit: contain;
}

.login-brand-name {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: .01em;
  color: #fff;
}

.login-eyebrow {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.login-headline {
  margin: 0 0 12px;
  color: #fff;
  font-size: 31px;
  line-height: 1.32;
  font-weight: 700;
  letter-spacing: .01em;
}

.login-sub {
  margin: 0 0 32px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.login-form {
  margin: 0;
}

.login-field {
  display: block;
  margin: 0 0 15px;
  color: var(--muted);
  font-size: 13px;
}

.login-field span {
  display: block;
  margin-bottom: 7px;
}

.login-field input {
  display: block;
  width: 100%;
  height: 54px;
  box-sizing: border-box;
  margin: 0;
  padding: 0 16px;
  border: 1px solid #35404C;
  border-radius: 13px;
  outline: none;
  background: rgba(10,14,19,.88);
  color: #fff;
  font: inherit;
  font-size: 16px;
  line-height: 54px;
  appearance: none;
}

.login-field input::placeholder {
  color: #6F7B87;
}

.login-field input:focus {
  border-color: #687584;
  background: #141B22;
}

.login-message {
  min-height: 20px;
  margin: 0 0 7px;
  color: #FFB4AB;
  font-size: 13px;
  line-height: 20px;
}

.login-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 54px;
  margin: 0;
  border: 0;
  border-radius: 14px;
  background: var(--zp-primary);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.login-submit:active {
  background: #31455A;
}

.login-submit:disabled {
  opacity: .5;
  cursor: default;
}

.login-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 19px;
  flex-wrap: wrap;
}

.login-links a {
  color: #fff;
  font-size: 13px;
  text-decoration: none;
}

.login-links .register-hint {
  color: var(--muted);
  font-size: 13px;
}

.login-links span:not(.register-hint) {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #596572;
}

.login-links a:active {
  color: #fff;
}

@media (max-width:380px) {
  .login-shell {
    padding-left: 18px;
    padding-right: 18px;
  }

  .login-brand-row {
    margin-bottom: 30px;
  }

  .login-brand-badge {
    width: 48px;
    height: 48px;
    border-radius: 13px;
  }

  .login-logo {
    width: 34px;
  }

  .login-headline {
    font-size: 28px;
  }
}

@media (max-height:620px) {
  .login-shell {
    align-items: flex-start;
    padding-top: 16px;
  }

  .login-brand-row {
    margin-bottom: 20px;
  }

  .login-brand {
    margin-bottom: 18px;
  }

  .login-sub {
    margin-bottom: 20px;
  }
}


/* 浅色外观适配：登录页及通用文本输入 */
:root[data-zp-theme="light"] .login-shell{background:var(--zp-bg)!important;color:var(--zp-text)}
:root[data-zp-theme="light"] .login-card{background:transparent!important;border:0!important;box-shadow:none!important}
:root[data-zp-theme="light"] .login-brand-row{margin-bottom:38px}
:root[data-zp-theme="light"] .login-brand-name{color:var(--zp-text)!important}
:root[data-zp-theme="light"] .login-eyebrow{color:#69747F!important}
:root[data-zp-theme="light"] .login-headline{color:var(--zp-text)!important}
:root[data-zp-theme="light"] .login-sub{color:#596674!important}
:root[data-zp-theme="light"] .login-field,
:root[data-zp-theme="light"] .login-field span,
:root[data-zp-theme="light"] .login-links,
:root[data-zp-theme="light"] .register-hint{color:var(--zp-text)}
:root[data-zp-theme="light"] .login-field input,
:root[data-zp-theme="light"] .data-textarea{background:#FFFFFF!important;color:#17202A!important;border-color:#C9D1D9!important}
:root[data-zp-theme="light"] .login-field input:focus{background:#FFFFFF!important;border-color:#7D8A98!important}
:root[data-zp-theme="light"] .password-toggle{color:#536170}
:root[data-zp-theme="light"] .login-submit{background:var(--zp-primary)!important;color:#FFFFFF!important}
:root[data-zp-theme="light"] .login-links a{color:var(--zp-text)!important}

/* ---- 登录系页面浅色补充（index/register/setup 不加载 ui-unified.js，
     data-zp-theme 由页内引导脚本设置，token 驱动的样式自动翻转；
     此处只补硬编码残留） ---- */
:root[data-zp-theme="light"] .login-message{color:#C2453A}
:root[data-zp-theme="light"] .login-field span{color:#596674}
:root[data-zp-theme="light"] .password-toggle{color:#596674}
:root[data-zp-theme="light"] .password-toggle:hover{color:#17202A}
