/* ============================================================================
   野好后台 · 设计系统（2026-11 重做，对齐前台 VI）
   ----------------------------------------------------------------------------
   改这套样式前先读这四行：
   1. 只用深绿 / 草绿 / 米白三色系，色值全部取自 :root，别在下面写裸色值；
   2. 分层只靠 1px 描边 + 留白，卡片不用阴影（唯一例外：弹层 / 抽屉）；
   3. 字重只有 400 / 500，字号只有 11 / 12 / 13 / 15 / 20 / 32；
   4. 类名是页面和 app.js 共用的契约（yh-card / yh-row / yh-btn …），只改样式别改名。
   ========================================================================== */

:root {
  /* 颜色 */
  --ink: #0E3D2A;          /* 主色：侧栏、主按钮、关键数字 */
  --ink-2: #16523B;        /* 主色 hover */
  --grass: #76B915;        /* 强调：聚焦环、选中态、描边高亮 */
  --accent: #4E7F0B;       /* 草绿文字（白底上可读） */
  --bg: #F5F3EC;           /* 页面底色：米白 */
  --surface: #FFFFFF;
  --surface-2: #FAF9F4;    /* 表头 / 次级填充 */
  --text: #202923;
  --text-2: #626E65;
  --text-3: #97A199;
  --line: #D9DFD3;
  --line-soft: #EAE8DF;
  --danger: #A32D2D;
  --danger-bg: #FBEFEF;
  --warn: #BA7517;
  --warn-bg: #FBF3E4;

  /* 尺寸 */
  --r-sm: 6px;
  --r: 10px;
  --r-lg: 14px;
  --side-w: 232px;
  --top-h: 60px;
  --focus: 0 0 0 3px rgba(118, 185, 21, 0.16);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font: 400 13px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--accent); }

h1, h2, h3, h4 { margin: 0; font-weight: 500; }

/* 数字统一等宽，表格里的金额、时间才对得齐 */
b, .n, .yh-tabular { font-variant-numeric: tabular-nums; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #DAD7CB; border-radius: 8px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #C4C1B3; background-clip: content-box; border: 3px solid transparent; }
::-webkit-scrollbar-track { background: transparent; }

/* ============================================================================
   1. 骨架：侧栏 + 主区
   ========================================================================== */

.yh-admin { display: flex; min-height: 100vh; }

.yh-side {
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
  width: var(--side-w);
  flex: 0 0 var(--side-w);
  display: flex;
  flex-direction: column;
  background: var(--ink);
  color: #fff;
}

.yh-brand {
  padding: 24px 20px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

/* VI logo：透明 PNG（yehoo 白 + 亮绿原色），随侧栏宽度自适应。
   232px 侧栏减两侧 20px = 192px，对应 1080px 原图缩到 1/5.6，仍是 2 倍图以上。 */
.yh-brand-logo {
  display: block;
  width: 100%;
  height: auto;
}

.yh-nav {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px 20px;
}

.yh-nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 10px;
  border-radius: var(--r-sm);
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.yh-nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.yh-nav-item.active {
  background: rgba(118, 185, 21, 0.2);
  color: #fff;
  font-weight: 500;
}

/* 选中态：左侧一道草绿细条，比整块变色安静 */
.yh-nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 16px;
  border-radius: 0 2px 2px 0;
  background: var(--grass);
}

.yh-nav-code {
  flex: none;
  width: 26px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.36);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.yh-nav-item.active .yh-nav-code { color: var(--grass); }

.yh-nav-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.yh-nav-item.is-plain { padding-left: 46px; }

.yh-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.yh-top {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--top-h);
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}

.yh-top-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: 0.01em;
}

.yh-top-user {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-2);
  font-size: 13px;
}

.yh-top-user #yh-logout {
  color: var(--text-3);
  padding-left: 10px;
  border-left: 1px solid var(--line);
  transition: color 0.15s;
}

.yh-top-user #yh-logout:hover { color: var(--danger); }

.yh-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(14, 61, 42, 0.06);
  border: 1px solid rgba(14, 61, 42, 0.1);
  color: var(--ink);
  font-size: 11px;
  font-weight: 400;
}

.yh-content {
  flex: 1;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 22px 24px 56px;
}

/* ============================================================================
   2. 卡片
   ========================================================================== */

.yh-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 20px;
  margin-bottom: 16px;
}

.yh-card:last-child { margin-bottom: 0; }

.yh-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 16px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}

.yh-card-title .yh-tag { font-weight: 400; }

/* 卡片里的次级说明 */
.yh-card-note {
  margin: -6px 0 14px;
  font-size: 12px;
  color: var(--text-3);
}

/* ============================================================================
   3. 行 / 表单
   ========================================================================== */

.yh-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin-bottom: 12px;
}

.yh-row:last-child { margin-bottom: 0; }

.yh-row label {
  color: var(--text-2);
  font-size: 13px;
  white-space: nowrap;
}

.yh-row > .grow { flex: 1; min-width: 0; }

.yh-divider {
  height: 1px;
  margin: 16px 0;
  background: var(--line-soft);
  border: 0;
}

.yh-input,
.yh-select,
.yh-textarea {
  height: 34px;
  min-width: 0;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.yh-input::placeholder,
.yh-textarea::placeholder { color: var(--text-3); }

.yh-input:focus,
.yh-select:focus,
.yh-textarea:focus {
  outline: none;
  border-color: var(--grass);
  box-shadow: var(--focus);
}

.yh-input:disabled,
.yh-select:disabled { background: var(--surface-2); color: var(--text-3); cursor: not-allowed; }

.yh-select {
  appearance: none;
  padding-right: 28px;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23626E65' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
}

.yh-textarea {
  display: block;
  width: 100%;
  height: auto;
  min-height: 96px;
  padding: 10px;
  line-height: 1.65;
  resize: vertical;
}

.yh-input.sm,
.yh-select.sm { height: 30px; font-size: 12px; }

/* 表单里的说明文字 */
.yh-help {
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.6;
}

/* ============================================================================
   4. 按钮
   ========================================================================== */

.yh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 16px;
  border: 1px solid var(--ink);
  border-radius: var(--r-sm);
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, opacity 0.15s;
}

.yh-btn:hover { background: var(--ink-2); border-color: var(--ink-2); color: #fff; }

.yh-btn:focus-visible { outline: none; box-shadow: var(--focus); }

.yh-btn.ghost {
  background: var(--surface);
  border-color: var(--line);
  color: var(--text);
  font-weight: 400;
}

.yh-btn.ghost:hover {
  border-color: var(--grass);
  color: var(--accent);
  background: var(--surface);
}

.yh-btn.danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.yh-btn.danger:hover { background: #8F2626; border-color: #8F2626; }

.yh-btn.sm { height: 28px; padding: 0 10px; font-size: 12px; }

.yh-btn:disabled,
.yh-btn[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
}

.yh-btn:disabled:hover,
.yh-btn[disabled]:hover { background: var(--ink); border-color: var(--ink); }

.yh-btn.ghost:disabled:hover,
.yh-btn.ghost[disabled]:hover { background: var(--surface); border-color: var(--line); color: var(--text); }

/* 行内文字按钮（表格里的「查看 / 编辑」） */
.yh-link {
  color: var(--accent);
  font-size: 13px;
  cursor: pointer;
}

.yh-link:hover { text-decoration: underline; }

.yh-link.danger { color: var(--danger); }

/* ============================================================================
   5. 标签
   ========================================================================== */

.yh-tag {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 11px;
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
  vertical-align: 1px;
}

.yh-tag.warn {
  color: var(--warn);
  border-color: #EBD9B4;
  background: var(--warn-bg);
}

.yh-tag.red {
  color: var(--danger);
  border-color: #E8C9C9;
  background: var(--danger-bg);
}

.yh-tag.ok {
  color: var(--accent);
  border-color: rgba(118, 185, 21, 0.35);
  background: rgba(118, 185, 21, 0.1);
}

.yh-tag.solid {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
}

/* ============================================================================
   6. 分段（tabs）
   ========================================================================== */

.yh-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.yh-tab {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  font-size: 12px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.yh-tab:hover { border-color: var(--grass); color: var(--accent); }

.yh-tab.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
  font-weight: 500;
}

.yh-tab .num {
  margin-left: 4px;
  font-variant-numeric: tabular-nums;
  opacity: 0.7;
}

/* ============================================================================
   7. 表格
   ========================================================================== */

.yh-table-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: auto;
}

.yh-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.yh-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 11px 14px;
  background: #F7F5EE;
  border-bottom: 1px solid var(--line);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-align: left;
  white-space: nowrap;
}

.yh-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--text);
  font-size: 13px;
  line-height: 1.55;
  vertical-align: top;
}

.yh-table tbody tr:last-child td { border-bottom: 0; }
.yh-table tbody tr:hover td { background: #FCFBF6; }

.yh-table td .sub {
  display: block;
  margin-top: 3px;
  color: var(--text-3);
  font-size: 12px;
}

.yh-table .yh-empty {
  padding: 44px 16px;
  color: var(--text-3);
  font-size: 13px;
  text-align: center;
  background: var(--surface);
}

.yh-table .yh-empty::before {
  content: "";
  display: block;
  width: 28px;
  height: 28px;
  margin: 0 auto 10px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-2);
}

.yh-table .num,
.yh-table .right { text-align: right; }

.yh-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid var(--line-soft);
  color: var(--text-3);
  font-size: 12px;
}

.yh-pager .yh-btn { height: 28px; padding: 0 12px; font-size: 12px; }

.yh-pager > span { font-variant-numeric: tabular-nums; }

/* ============================================================================
   8. 数据卡（A00 / A09 的 KPI）
   ========================================================================== */

.yh-grid4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.yh-stat {
  display: block;
  padding: 18px 18px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  color: var(--text);
  transition: border-color 0.15s, background 0.15s;
}

.yh-stat:hover {
  border-color: var(--grass);
  color: var(--text);
  background: #FFFEFA;
}

.yh-stat .t {
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.5;
}

.yh-stat .t .yh-tag { margin-left: 4px; }

.yh-stat .n {
  margin: 8px 0 6px;
  color: var(--ink);
  font-size: 32px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

/* 有数字时「0」也要有存在感，否则整张卡空 */
.yh-stat .n[data-role="count"]:not(:empty) { min-height: 38px; }

.yh-stat .t[data-role="empty"] {
  color: var(--text-3);
  font-size: 12px;
}

.yh-stat .t[data-role="tip"] {
  margin-top: 4px;
  color: var(--text-3);
  font-size: 11px;
  line-height: 1.55;
  /* 说明最多两行：五张卡等高，别让最长的一句把整排撑歪；全文放 title 里 */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.yh-stat.is-alert { border-color: #E8C9C9; background: #FDF7F7; }
.yh-stat.is-alert .n { color: var(--danger); }

/* ============================================================================
   9. 弹层 / 抽屉 / 轻提示
   ========================================================================== */

.yh-mask {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(16, 24, 20, 0.44);
  animation: yh-fade 0.16s ease-out;
}

@keyframes yh-fade { from { opacity: 0; } to { opacity: 1; } }

.yh-modal {
  display: flex;
  flex-direction: column;
  width: 640px;
  max-width: 100%;
  max-height: 88vh;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: 0 24px 64px rgba(14, 61, 42, 0.2);
  overflow: hidden;
  animation: yh-pop 0.18s ease-out;
}

@keyframes yh-pop {
  from { opacity: 0; transform: translateY(8px) scale(0.99); }
  to { opacity: 1; transform: none; }
}

.yh-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  width: 760px;
  max-width: 96vw;
  background: var(--surface);
  border-left: 1px solid var(--line);
  box-shadow: -24px 0 64px rgba(14, 61, 42, 0.16);
  animation: yh-slide 0.2s ease-out;
}

@keyframes yh-slide {
  from { transform: translateX(24px); opacity: 0.6; }
  to { transform: none; opacity: 1; }
}

.yh-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}

.yh-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--r-sm);
  color: var(--text-3);
  font-size: 20px;
  line-height: 1;
  transition: background 0.15s, color 0.15s;
}

.yh-x:hover { background: var(--surface-2); color: var(--text); }

.yh-modal-body,
.yh-drawer-body {
  flex: 1;
  padding: 20px;
  overflow: auto;
}

.yh-modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--line-soft);
  background: var(--surface);
}

.yh-toast {
  position: fixed;
  left: 50%;
  top: 22px;
  z-index: 999;
  transform: translateX(-50%);
  max-width: 80vw;
  padding: 10px 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  box-shadow: 0 12px 32px rgba(14, 61, 42, 0.24);
  animation: yh-toast-in 0.18s ease-out;
}

.yh-toast.err { background: var(--danger); border-color: rgba(255, 255, 255, 0.16); }

@keyframes yh-toast-in {
  from { opacity: 0; transform: translate(-50%, -8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ============================================================================
   10. 空态 / 加载
   ========================================================================== */

.yh-empty-state {
  padding: 56px 20px;
  text-align: center;
  color: var(--text-3);
}

.yh-empty-state .t { font-size: 14px; color: var(--text-2); }
.yh-empty-state .s { margin-top: 6px; font-size: 12px; }

.yh-skeleton {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, #EFEDE4 25%, #F7F5EE 37%, #EFEDE4 63%);
  background-size: 400% 100%;
  animation: yh-shimmer 1.2s ease infinite;
}

@keyframes yh-shimmer {
  from { background-position: 100% 50%; }
  to { background-position: 0 50%; }
}

/* ============================================================================
   11. 登录页
   ========================================================================== */

.yh-login-page {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  min-height: 100vh;
  background: var(--bg);
}

.yh-login-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 56px 64px;
  background: var(--ink);
  color: #fff;
  overflow: hidden;
}

/* 一道很淡的草绿弧线，别做花哨插画 */
.yh-login-hero::after {
  content: "";
  position: absolute;
  right: -160px;
  bottom: -180px;
  width: 460px;
  height: 460px;
  border: 70px solid rgba(118, 185, 21, 0.14);
  border-radius: 50%;
  pointer-events: none;
}

.yh-login-mark img {
  display: block;
  width: 240px;
  height: auto;
}

.yh-login-mark small {
  display: block;
  margin-top: 14px;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.22em;
  color: rgba(255, 255, 255, 0.5);
}

.yh-login-points {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.74);
}

.yh-login-points li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 10px;
}

.yh-login-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--grass);
}

.yh-login-foot {
  font-size: 10px;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.4);
}

.yh-login-form-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.yh-login {
  width: 100%;
  max-width: 340px;
  padding: 0;
  background: transparent;
}

.yh-login h1 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 500;
  color: var(--text);
}

.yh-login-tip {
  margin: 0 0 26px;
  color: var(--text-3);
  font-size: 12px;
}

.yh-login label {
  display: block;
  margin-bottom: 16px;
  color: var(--text-2);
  font-size: 12px;
}

.yh-login input {
  width: 100%;
  height: 42px;
  margin-top: 7px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.yh-login input:focus {
  outline: none;
  border-color: var(--grass);
  box-shadow: var(--focus);
}

.yh-login button {
  width: 100%;
  height: 44px;
  margin-top: 6px;
  border: 1px solid var(--ink);
  border-radius: var(--r-sm);
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.yh-login button:hover { background: var(--ink-2); }

.yh-login-err {
  min-height: 18px;
  margin: 12px 0 0;
  color: var(--danger);
  font-size: 12px;
  line-height: 1.5;
}

.yh-login-devnote {
  margin-top: 22px;
  padding: 10px 12px;
  border: 1px dashed var(--line);
  border-radius: var(--r-sm);
  color: var(--text-3);
  font-size: 11px;
  line-height: 1.7;
}

/* ============================================================================
   12. 响应式
   ========================================================================== */

@media (max-width: 1180px) {
  .yh-grid4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
  .yh-drawer { width: 92vw; }
}

@media (max-width: 980px) {
  :root { --side-w: 200px; }
  .yh-content { padding: 16px 16px 48px; }
  .yh-login-page { grid-template-columns: 1fr; }
  .yh-login-hero { display: none; }
}

@media (max-width: 760px) {
  .yh-admin { display: block; }
  .yh-side {
    position: static;
    width: 100%;
    height: auto;
    flex-direction: row;
    overflow-x: auto;
    align-items: center;
  }
  .yh-brand { padding: 12px 16px; border-bottom: 0; }
  .yh-brand-logo { width: 132px; }
  .yh-nav { display: flex; gap: 4px; padding: 8px 12px; overflow: visible; }
  .yh-nav-item { height: 34px; padding: 0 10px; }
  .yh-nav-item.active::before { display: none; }
  .yh-nav-code { display: none; }
  .yh-top { position: static; padding: 0 16px; }
  .yh-modal { max-height: 92vh; }
}

/* 打印（对账单偶尔要打出来） */
@media print {
  .yh-side, .yh-top, .yh-pager { display: none; }
  .yh-content { padding: 0; max-width: none; }
  .yh-card, .yh-table-wrap { border-color: #ccc; box-shadow: none; }
}

/* ============================================================================
   13. 页面级工具类
   ----------------------------------------------------------------------------
   页面里不要再写 style="color:#666;font-size:13px" 这种内联样式：
   主题一改就得全站找，而且色值绕过了 :root。用下面这些类。
   ========================================================================== */

.yh-row.between { justify-content: space-between; }
.yh-row.tight { margin-bottom: 0; }
.mb0 { margin-bottom: 0; }
.hide { display: none !important; }
.w220 { min-width: 220px; }

/* 卡片底部的一句说明（原来散落在各页的内联 style） */
.yh-note {
  margin: 10px 0 0;
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.7;
}

/* 表格里的控件不要撑破单元格 */
.yh-table .yh-input,
.yh-table .yh-select { width: 100%; min-width: 88px; }
.yh-table .yh-textarea { min-height: 62px; }
/* 单元格默认不折行：金额、时间、状态折成两三行最难看；长说明统一塞进 .sub 再换行 */
.yh-table td { white-space: nowrap; }
.yh-table td .sub,
.yh-table td p,
.yh-table td .cell-wrap { white-space: normal; }

/* 操作列不折行：按钮排一行，表格窄了就横向滚动，比挤成两行好认 */
.yh-table td:last-child { white-space: nowrap; }

/* 卡片里再套表格时去掉第二层边框（设置页 / 看板都是这种结构） */
.yh-card > .yh-table-wrap,
.yh-card .yh-table-wrap { border: 0; border-radius: 0; }
.yh-card .yh-table-wrap .yh-pager { border-top: 1px solid var(--line-soft); }

/* 日期区间：Chrome 的 date 控件需要更宽，否则被压成 yyyy/mm/dd 截断 */
.yh-input[type="date"] { min-width: 138px; flex: 0 0 auto; }
.yh-row .date-sep { color: var(--text-3); }

/* 表单字段标签（JS 拼表单时统一用这个，别再写 display:block;margin:8px 0 4px） */
.yh-label {
  display: block;
  margin: 8px 0 4px;
  color: var(--text-2);
  font-size: 12px;
}

/* 表单整体错误行：始终占位，出现红字时不跳版 */
.yh-form-err {
  min-height: 18px;
  margin: 8px 0 0;
  color: var(--danger);
  font-size: 12px;
  line-height: 1.5;
}

/* 表格里的次要行 / 说明 */
.muted { color: var(--text-3); font-size: 12px; }

.err-text { color: var(--danger); }
.warn-text { color: var(--warn); }

/* 参数表列宽（A10）：参数说明占主要宽度，值列给足，单位/时间/操作固定 */
.yh-table td.col-param { min-width: 260px; white-space: normal; }
.yh-table td.col-value { width: 34%; }
.yh-table td.col-unit { width: 80px; }
.yh-table td.col-time { width: 160px; font-size: 12px; }
.yh-table td.col-op { width: 100px; }

/* 看板指标卡里的「今日」一行：比说明文字再淡一点 */
.yh-stat .t[data-role="today"] { margin-top: 2px; color: var(--text-3); font-size: 12px; }

/* ============================================================================
   A10 账号与角色：卡片标题行工具栏、多选角色、权限勾选面板
   ========================================================================== */

/* 卡片标题右侧放按钮（表格卡片头部） */
.yh-card-title.yh-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* 多选组（角色 / 权限）：等宽两列，长标题也不挤成一列 */
.yh-checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px;
}

.yh-check {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}

.yh-check input {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  margin: 3px 0 0;
  accent-color: var(--ink);
  cursor: pointer;
}

.yh-check .sub { display: block; color: var(--text-3); font-size: 11px; }
.yh-check input:disabled,
.yh-check input:disabled + span { color: var(--text-3); cursor: not-allowed; }

/* 权限面板：按 A00–A10 分组，组头带「全选」 */
.yh-perm {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 44vh;
  margin-top: 6px;
  padding: 0 4px 0 0;
  overflow: auto;
}

.yh-perm-group {
  /* 面板是 flex 列 + max-height 滚动；不加这句，各组会被压扁成一条，勾选项叠在一起 */
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  overflow: hidden;
}

.yh-perm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 10px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line-soft);
}

.yh-perm-head b { color: var(--ink); font-size: 12px; font-weight: 500; }
.yh-perm-head .yh-link { font-size: 12px; }

.yh-perm-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px;
  padding: 10px 12px;
}

/* 弹层加宽（权限面板用；640px 两列会挤成竖排） */
.yh-modal.is-wide { width: 780px; }

.yh-perm-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  color: var(--text-2);
  font-size: 12px;
}

/* 弹层里的竖排表单：输入框占满一行。
   弹层是块级流，input 默认只有 140px 左右，placeholder 会被切一半（A10 新增账号踩过）。 */
.yh-modal-body > .yh-input,
.yh-modal-body > .yh-select,
.yh-modal-body > .yh-textarea,
.yh-drawer-body > .yh-input,
.yh-drawer-body > .yh-select { width: 100%; }

/* ============================================================================
   A03 二级分组：一级页签是胶囊、二级是文字 + 选中下划线
   ----------------------------------------------------------------------------
   两级都用 .yh-tab 胶囊时用户分不清自己在哪一层（截图里几乎一模一样）。
   ========================================================================== */

.yh-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: -4px 0 14px;
}

.yh-subtabs .yh-tab {
  position: relative;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text-2);
  font-size: 13px;
}

.yh-subtabs .yh-tab:hover { background: transparent; color: var(--accent); }

.yh-subtabs .yh-tab.active {
  background: transparent;
  color: var(--ink);
  font-weight: 500;
}

.yh-subtabs .yh-tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 2px;
  border-radius: 1px;
  background: var(--ink);
}

/* 卡片标题右侧的按钮组 */
.yh-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 表单标签里的补充说明（"一句话写清这项做什么"这种），跟标签同一行、更小更淡 */
.yh-help-inline {
  margin-left: 6px;
  color: var(--text-3);
  font-size: 11px;
  font-weight: 400;
}

/* 数字列右对齐（金额 / 数量）：左对齐的金额在一列里参差不齐，没法一眼比大小 */
.yh-table th.t-right,
.yh-table td.t-right { text-align: right; }

/* A07 报告抽屉底部操作条：吸底，件多时不用滚到底才能保存 / 发布 */
.rp-foot {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
  padding: 12px 0 4px;
  background: var(--surface);
  border-top: 1px solid var(--line-soft);
}

/* ============================================================================
   图片上传控件（Admin.uploader）
   ----------------------------------------------------------------------------
   为什么要有：以前报告照片、加项单问题照都是「每行一个 URL」的文本框，
   师傅不可能知道 /storage/uploads/xxx.jpg 是什么。改成点选 / 拖拽，
   缩略图直接能看见，点开是大图。
   ========================================================================== */

.yh-up {
  /* 整块都是拖拽落点，平时不画框；拖动时才亮，避免页面上出现一堆虚线框 */
  padding: 8px;
  margin: -8px 0;
  border: 1px dashed transparent;
  border-radius: var(--r-sm);
  transition: background 0.15s, border-color 0.15s;
}

.yh-up.is-drag {
  border-color: var(--grass);
  background: rgba(126, 187, 38, 0.07);
}

.yh-up-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.yh-up-item {
  position: relative;
  width: 92px;
  height: 92px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  overflow: hidden;
}

.yh-up-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: zoom-in;
}

.yh-up-file {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--text-2);
  font-size: 12px;
  letter-spacing: 0.06em;
  cursor: zoom-in;
}

.yh-up-del {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(14, 61, 42, 0.72);
  color: #fff;
  font-size: 14px;
  line-height: 20px;
  text-align: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.12s;
}

.yh-up-item:hover .yh-up-del { opacity: 1; }
.yh-up-del:hover { background: var(--danger); }

.yh-up-item.is-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  font-size: 11px;
  border-style: dashed;
}

.yh-up-add {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 92px;
  height: 92px;
  flex: 0 0 auto;
  border: 1px dashed var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text-3);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}

.yh-up-add b {
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
  color: var(--text-2);
}

.yh-up-add:hover { border-color: var(--grass); color: var(--accent); }
.yh-up-add:hover b { color: var(--accent); }

.yh-up-tip {
  margin-top: 6px;
  color: var(--text-3);
  font-size: 11px;
  line-height: 1.5;
}

/* 大图预览 */
.yh-lightbox {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 20, 14, 0.78);
  cursor: zoom-out;
}

.yh-lightbox img {
  max-width: 86vw;
  max-height: 86vh;
  border-radius: 4px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.4);
  cursor: default;
}

.yh-lightbox .yh-x {
  position: absolute;
  top: 18px;
  right: 22px;
  color: #fff;
  font-size: 26px;
  text-decoration: none;
  opacity: 0.75;
}

.yh-lightbox .yh-x:hover { opacity: 1; }

/* A07 报告抽屉：每个照片组一块（标题在小字提示左边，下面是缩略图网格） */
.rp-field { margin-bottom: 14px; }
.rp-field:last-child { margin-bottom: 0; }

.rp-field-head {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 2px;
}

.rp-field-label {
  color: var(--text-2);
  font-size: 13px;
}

/* 售后抽屉终态 / 无售后单：整块表单置灰，提示「只能查看」 */
.yh-textarea:disabled {
  background: var(--surface-2);
  color: var(--text-3);
  cursor: not-allowed;
}
#as-form-card.is-readonly .yh-card-title { color: var(--text-3); }
