/* ============================================================
   栖居 · 设计系统
   ============================================================ */

:root {
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --font-serif: "Songti SC", "STSong", "Noto Serif SC", "SimSun", serif;
  --bg: #f3efe5;
  --bg-soft: #ebe4d6;
  --card: #fffcf5;
  --card-2: #f8f3e8;
  --ink: #14231e;
  --ink-2: #34473f;
  --muted: #6d7a73;
  --muted-2: #989d92;
  --line: #e4dccb;
  --line-strong: #cfc3ad;
  --primary: #0e5a47;
  --primary-2: #0a4637;
  --primary-soft: #e2efe8;
  --primary-ink: #0a4a3a;
  --accent: #b37b3c;
  --accent-soft: #f5e8d3;
  --danger: #b44b3a;
  --danger-soft: #f7e5df;
  --blue: #3b6a80;
  --blue-soft: #e8f0f3;
  --violet: #6e5b7b;
  --violet-soft: #f1ebf3;
  --green: #2c6e55;
  --green-soft: #e5f1e9;
  --sidebar: #091b16;
  --sidebar-2: #0d2b23;
  --sidebar-ink: #e4eee7;
  --sidebar-muted: #86a398;
  --gold: #c9a46b;
  --gold-soft: rgba(201, 164, 107, .14);
  --shadow-sm: 0 1px 2px rgba(52, 42, 27, .05);
  --shadow: 0 18px 40px -28px rgba(38, 31, 21, .35), 0 2px 6px rgba(38, 31, 21, .04);
  --shadow-lg: 0 40px 90px -38px rgba(23, 19, 13, .55);
  --radius: 14px;
  --radius-sm: 9px;
  --radius-lg: 20px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --topbar-h: 70px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1100px 620px at 8% -12%, rgba(201, 164, 107, .08), transparent 62%),
    radial-gradient(900px 540px at 100% 0%, rgba(14, 90, 71, .045), transparent 58%),
    var(--bg);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: rgba(14, 90, 71, .18); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--primary); text-decoration: none; }
img { max-width: 100%; display: block; }
svg { flex-shrink: 0; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid rgba(15, 118, 110, .55); outline-offset: 2px; }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #cbd8d3; border-radius: 99px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #aebfb8; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

.boot {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  background:
    radial-gradient(680px 420px at 18% 12%, rgba(45, 212, 191, .13), transparent 60%),
    radial-gradient(520px 380px at 88% 88%, rgba(217, 119, 6, .08), transparent 60%),
    var(--sidebar);
  color: var(--sidebar-ink);
}
.boot-mark {
  width: 66px; height: 66px; border-radius: 19px;
  display: grid; place-items: center;
  color: #5eead4;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(214, 255, 248, .12);
  box-shadow: 0 20px 60px -20px rgba(45, 212, 191, .5);
}
.boot-mark svg { width: 36px; height: 36px; }
.boot-name { font-size: 21px; font-weight: 700; letter-spacing: .22em; padding-left: .22em; }
.boot-bar { width: 140px; height: 3px; border-radius: 9px; background: rgba(255, 255, 255, .1); overflow: hidden; margin-top: 8px; }
.boot-bar span {
  display: block; width: 40%; height: 100%; border-radius: 9px;
  background: linear-gradient(90deg, #2dd4bf, #99f6e4);
  animation: bootSlide 1.1s var(--ease) infinite;
}
@keyframes bootSlide { 0% { transform: translateX(-120%); } 100% { transform: translateX(360%); } }

/* ============================================================
   登录 / 初始化
   ============================================================ */

.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr);
  background: var(--card);
}
.auth-art {
  position: relative;
  overflow: hidden;
  padding: 46px 56px;
  display: flex;
  flex-direction: column;
  color: var(--sidebar-ink);
  background:
    radial-gradient(700px 500px at 12% 4%, rgba(45, 212, 191, .2), transparent 62%),
    radial-gradient(520px 420px at 96% 74%, rgba(217, 119, 6, .12), transparent 62%),
    linear-gradient(155deg, #0d2520 0%, #0a1a17 62%, #071310 100%);
}
.auth-art::after {
  content: "";
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(ellipse at 30% 22%, #000 10%, transparent 72%);
  pointer-events: none;
}
.auth-brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; }
.auth-brand .brand-logo { width: 42px; height: 42px; }
.auth-brand strong { font-size: 18px; letter-spacing: .08em; font-weight: 700; }
.auth-brand small { display: block; color: var(--sidebar-muted); font-size: 11px; letter-spacing: .18em; margin-top: 2px; }
.auth-main { position: relative; z-index: 1; margin-top: auto; margin-bottom: auto; max-width: 560px; padding: 54px 0 34px; }
.auth-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; color: #99f6e4; letter-spacing: .12em;
  padding: 6px 11px; border-radius: 99px;
  background: rgba(45, 212, 191, .09); border: 1px solid rgba(45, 212, 191, .18);
}
.auth-headline {
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.18;
  letter-spacing: -.045em;
  font-weight: 750;
  margin: 22px 0 18px;
}
.auth-headline em { font-style: normal; color: #5eead4; }
.auth-sub { color: #9fc4bb; font-size: 15px; line-height: 1.8; max-width: 430px; }
.auth-points { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 26px; }
.auth-points span {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; color: #b9d8d0;
  padding: 7px 11px; border-radius: 9px;
  background: rgba(255, 255, 255, .045); border: 1px solid rgba(255, 255, 255, .07);
}
.auth-points svg { width: 14px; height: 14px; color: #5eead4; }
.auth-mock { position: relative; z-index: 1; display: grid; grid-template-columns: 1.25fr .75fr; gap: 12px; max-width: 520px; margin-top: 42px; }
.mock-card {
  border-radius: 14px; padding: 16px;
  background: rgba(255, 255, 255, .055);
  border: 1px solid rgba(255, 255, 255, .09);
  backdrop-filter: blur(10px);
}
.mock-label { font-size: 10px; letter-spacing: .14em; color: #8fb8ae; text-transform: uppercase; }
.mock-value { font-size: 24px; font-weight: 700; margin-top: 6px; letter-spacing: -.03em; }
.mock-value small { font-size: 11px; color: #8fb8ae; font-weight: 500; margin-left: 4px; }
.mock-bars { display: flex; align-items: flex-end; gap: 5px; height: 48px; margin-top: 13px; }
.mock-bars i { flex: 1; border-radius: 4px 4px 2px 2px; background: linear-gradient(180deg, #2dd4bf, rgba(45, 212, 191, .18)); }
.mock-list { display: grid; gap: 10px; margin-top: 12px; }
.mock-list div { display: flex; align-items: center; gap: 8px; font-size: 11px; color: #b9d8d0; }
.mock-list i { width: 6px; height: 6px; border-radius: 50%; background: #5eead4; }
.mock-list b { margin-left: auto; font-weight: 600; color: #e5fff9; }
.auth-quote { position: relative; z-index: 1; margin-top: 30px; font-size: 11px; color: #5f867d; letter-spacing: .04em; }

.auth-panel {
  display: grid;
  place-items: center;
  padding: 34px;
  background:
    radial-gradient(420px 320px at 100% 0%, rgba(15, 118, 110, .055), transparent 64%),
    var(--card);
}
.auth-box { width: min(404px, 100%); }
.auth-mobile-brand { display: none; align-items: center; gap: 10px; margin-bottom: 28px; }
.auth-mobile-brand .brand-logo { width: 38px; height: 38px; }
.auth-mobile-brand strong { font-size: 17px; letter-spacing: .06em; }
.auth-title { font-size: 28px; font-weight: 730; letter-spacing: -.035em; }
.auth-desc { color: var(--muted); font-size: 13px; margin-top: 8px; line-height: 1.7; }
.auth-form { margin-top: 28px; display: grid; gap: 16px; }
.auth-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.auth-foot { margin-top: 26px; text-align: center; color: var(--muted-2); font-size: 11px; line-height: 1.8; }
.auth-error {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 10px 12px; border-radius: 10px;
  background: var(--danger-soft); color: #b91c1c;
  border: 1px solid #fecaca; font-size: 12px; line-height: 1.6;
}
.auth-success {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 10px 12px; border-radius: 10px;
  background: var(--green-soft); color: #166534;
  border: 1px solid #bbf7d0; font-size: 12px; line-height: 1.6;
}
.auth-error svg, .auth-success svg { width: 15px; height: 15px; margin-top: 1px; }

/* 配置提示页 */
.setup-page { min-height: 100vh; display: grid; place-items: center; padding: 28px; background: var(--sidebar); }
.setup-card { width: min(620px, 100%); background: var(--card); border-radius: 20px; padding: 32px; box-shadow: var(--shadow-lg); }
.setup-card h1 { font-size: 22px; letter-spacing: -.02em; }
.setup-card p { color: var(--muted); font-size: 13px; margin-top: 8px; line-height: 1.8; }
.setup-steps { display: grid; gap: 14px; margin-top: 24px; }
.setup-step { display: flex; gap: 12px; align-items: flex-start; }
.setup-step b { width: 24px; height: 24px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-size: 11px; flex: 0 0 auto; }
.setup-step div { font-size: 13px; color: var(--ink-2); line-height: 1.75; }
.setup-step code, .code-block { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.setup-step code { background: var(--bg-soft); padding: 2px 6px; border-radius: 5px; font-size: 12px; color: var(--primary-ink); }
.code-block { margin-top: 12px; background: #0d211d; color: #b9f5e9; padding: 14px 16px; border-radius: 10px; font-size: 12px; line-height: 1.8; overflow-x: auto; white-space: pre-wrap; word-break: break-all; }
.setup-actions { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; }

/* ============================================================
   全局布局
   ============================================================ */

.layout { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 60;
  width: 248px;
  padding: 18px 14px 14px;
  display: flex; flex-direction: column;
  color: var(--sidebar-ink);
  background:
    radial-gradient(420px 320px at 20% 0%, rgba(45, 212, 191, .11), transparent 62%),
    linear-gradient(180deg, #0c211c 0%, #081713 100%);
  border-right: 1px solid rgba(255, 255, 255, .05);
  transition: transform .28s var(--ease);
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; }
.brand-logo {
  width: 38px; height: 38px; border-radius: 11px; flex: 0 0 auto;
  display: grid; place-items: center;
  background: linear-gradient(145deg, rgba(45, 212, 191, .2), rgba(15, 118, 110, .08));
  border: 1px solid rgba(94, 234, 212, .2);
  color: #8ff5e3;
}
.brand-logo svg { width: 22px; height: 22px; }
.sidebar-brand-text { min-width: 0; }
.sidebar-brand-text strong { display: block; font-size: 15px; font-weight: 680; letter-spacing: .05em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-brand-text small { display: block; color: var(--sidebar-muted); font-size: 9px; letter-spacing: .18em; margin-top: 2px; }
.brand-badge {
  margin-left: auto; font-size: 9px; letter-spacing: .06em;
  padding: 3px 6px; border-radius: 5px;
  color: #99f6e4; background: rgba(45, 212, 191, .09);
  border: 1px solid rgba(45, 212, 191, .16);
  white-space: nowrap;
}
.sidebar-nav { flex: 1; overflow-y: auto; padding: 6px 0 10px; }
.sidebar-nav::-webkit-scrollbar { width: 0; }
.nav-group-label { font-size: 10px; letter-spacing: .16em; color: #5c7d74; padding: 16px 12px 7px; text-transform: uppercase; }
.nav-group-label:first-child { padding-top: 6px; }
.nav-item {
  position: relative;
  display: flex; align-items: center; gap: 11px;
  height: 40px; padding: 0 12px; margin: 2px 0;
  border-radius: 10px;
  color: rgba(215, 232, 227, .72);
  font-size: 13.5px; font-weight: 500;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.nav-item svg { width: 18px; height: 18px; opacity: .74; transition: opacity .18s; }
.nav-item:hover { background: rgba(255, 255, 255, .05); color: var(--sidebar-ink); }
.nav-item:hover svg { opacity: .95; }
.nav-item.active {
  color: #ecfffb;
  background: linear-gradient(90deg, rgba(45, 212, 191, .15), rgba(45, 212, 191, .035));
  box-shadow: inset 2px 0 0 #2dd4bf;
}
.nav-item.active svg { opacity: 1; color: #5eead4; }
.nav-item .nav-dot { margin-left: auto; width: 6px; height: 6px; border-radius: 50%; background: #fbbf24; box-shadow: 0 0 0 3px rgba(251, 191, 36, .12); }
.nav-divider { height: 1px; background: rgba(255, 255, 255, .06); margin: 12px 10px; }
.sidebar-foot { padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .06); }
.side-user { display: flex; align-items: center; gap: 10px; padding: 8px 6px 4px; border-radius: 10px; }
.side-user-text { min-width: 0; flex: 1; }
.side-user-name { font-size: 12.5px; font-weight: 600; color: #e5f7f2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user-role { font-size: 10px; color: var(--sidebar-muted); margin-top: 1px; }
.side-logout {
  width: 32px; height: 32px; border-radius: 8px; border: 0;
  display: grid; place-items: center;
  color: #8fb8ae; background: transparent;
  transition: background .18s, color .18s;
}
.side-logout:hover { background: rgba(255, 255, 255, .07); color: #fca5a5; }
.side-logout svg { width: 16px; height: 16px; }

.sidebar-overlay { position: fixed; inset: 0; z-index: 55; background: rgba(6, 18, 15, .5); backdrop-filter: blur(2px); opacity: 0; visibility: hidden; transition: opacity .25s; }
.sidebar-overlay.show { opacity: 1; visibility: visible; }

.main { padding-left: 248px; min-height: 100vh; }
.topbar {
  position: sticky; top: 0; z-index: 40;
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 16px;
  padding: 0 28px;
  background: rgba(244, 247, 245, .82);
  border-bottom: 1px solid rgba(203, 216, 211, .6);
  backdrop-filter: blur(14px);
}
.menu-toggle { display: none; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); place-items: center; }
.topbar-crumb { display: flex; align-items: center; gap: 8px; min-width: 0; }
.topbar-crumb .crumb-root { font-size: 11px; color: var(--muted-2); letter-spacing: .08em; white-space: nowrap; }
.topbar-crumb .crumb-sep { color: var(--line-strong); }
.topbar-crumb .crumb-current { font-size: 13px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-spacer { flex: 1; }
.topbar-date { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 11px; border-radius: 9px; background: rgba(255, 255, 255, .7); border: 1px solid var(--line); color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.topbar-date svg { width: 14px; height: 14px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.quick-wrap { position: relative; }
.quick-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 80;
  width: 208px; padding: 6px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-lg);
  animation: popIn .16s var(--ease);
}
.quick-menu button {
  width: 100%; display: flex; align-items: center; gap: 9px;
  padding: 9px 10px; border: 0; border-radius: 8px; background: transparent;
  color: var(--ink-2); font-size: 12.5px; text-align: left;
}
.quick-menu button:hover { background: var(--bg-soft); color: var(--ink); }
.quick-menu button svg { width: 15px; height: 15px; color: var(--muted); }
.quick-menu .q-sep { height: 1px; background: var(--line); margin: 5px 6px; }

.content { padding: 28px 32px 52px; max-width: 1560px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 22px; flex-wrap: wrap; }
.page-title { font-size: 26px; line-height: 1.2; letter-spacing: -.035em; font-weight: 730; }
.page-sub { color: var(--muted); font-size: 12.5px; margin-top: 5px; }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.mobile-only { display: none !important; }
.desktop-only { display: block; }

/* ============================================================
   按钮 / 表单
   ============================================================ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 14px;
  border: 1px solid transparent; border-radius: 10px;
  font-size: 12.5px; font-weight: 600; white-space: nowrap;
  transition: background .16s var(--ease), border-color .16s, color .16s, transform .16s, box-shadow .16s;
  user-select: none;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 15px; height: 15px; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 8px 18px -10px rgba(15, 118, 110, .65); }
.btn-primary:hover { background: var(--primary-2); box-shadow: 0 10px 22px -10px rgba(15, 118, 110, .7); }
.btn-secondary { background: var(--card); color: var(--ink-2); border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.btn-secondary:hover { border-color: #aebfb8; background: #fff; }
.btn-soft { background: var(--primary-soft); color: var(--primary-ink); }
.btn-soft:hover { background: #d7ece6; }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--bg-soft); color: var(--ink-2); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-danger-soft { background: var(--danger-soft); color: #b91c1c; }
.btn-danger-soft:hover { background: #fee2e2; }
.btn-sm { height: 31px; padding: 0 10px; font-size: 11.5px; border-radius: 8px; }
.btn-sm svg { width: 13px; height: 13px; }
.btn-lg { height: 44px; padding: 0 18px; font-size: 13px; border-radius: 11px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: .55; pointer-events: none; }
.btn-icon { width: 36px; height: 36px; padding: 0; border-radius: 9px; }
.btn-icon svg { width: 16px; height: 16px; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--card); color: var(--muted);
  display: inline-grid; place-items: center;
  transition: background .16s, color .16s, border-color .16s;
}
.icon-btn:hover { background: var(--bg-soft); color: var(--ink); border-color: var(--line-strong); }
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn.danger:hover { background: var(--danger-soft); color: var(--danger); border-color: #fecaca; }

.field { display: grid; gap: 6px; min-width: 0; }
.field > label, .field-label { font-size: 11.5px; font-weight: 600; color: var(--ink-2); display: flex; align-items: center; gap: 5px; }
.field > label .req { color: var(--danger); font-weight: 700; }
.field .hint { font-size: 10.5px; color: var(--muted-2); line-height: 1.55; }
.input, .select, .textarea {
  width: 100%; height: 40px; padding: 0 12px;
  background: #fff; border: 1px solid var(--line-strong); border-radius: 9px;
  color: var(--ink); font-size: 13px;
  transition: border-color .16s, box-shadow .16s, background .16s;
}
.textarea { height: auto; min-height: 78px; padding: 10px 12px; resize: vertical; line-height: 1.65; }
.input::placeholder, .textarea::placeholder { color: #a7b5b0; }
.input:hover, .select:hover, .textarea:hover { border-color: #b6c7c0; }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, .12);
  background: #fff;
}
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2372837d' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center;
  padding-right: 32px;
}
.input[disabled], .select[disabled], .textarea[disabled] { background: var(--bg-soft); color: var(--muted); cursor: not-allowed; }
.input-wrap { position: relative; }
.input-wrap > svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--muted-2); pointer-events: none; }
.input-wrap .input { padding-left: 36px; }
.input-wrap .input.has-right { padding-right: 38px; }
.input-right-btn { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); display: grid; place-items: center; }
.input-right-btn:hover { background: var(--bg-soft); color: var(--ink); }
.input-right-btn svg { width: 15px; height: 15px; }
.money-input { position: relative; }
.money-input > span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 12px; font-weight: 600; }
.money-input .input { padding-left: 28px; font-variant-numeric: tabular-nums; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-section { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 16px; }
.form-section:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.form-section-title { font-size: 11px; letter-spacing: .12em; color: var(--muted-2); text-transform: uppercase; margin-bottom: 12px; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.form-note { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 9px; font-size: 11.5px; line-height: 1.65; color: var(--muted); background: var(--bg-soft); border: 1px solid var(--line); }
.form-note svg { width: 14px; height: 14px; margin-top: 1px; color: var(--primary); }
.form-note.warn { background: var(--accent-soft); border-color: #fde68a; color: #92400e; }
.form-note.warn svg { color: var(--accent); }
.form-error { font-size: 11.5px; color: var(--danger); background: var(--danger-soft); padding: 8px 10px; border-radius: 8px; border: 1px solid #fecaca; }

.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; }
.switch-row + .switch-row { border-top: 1px solid var(--line); }
.switch-label { font-size: 12.5px; font-weight: 600; }
.switch-desc { font-size: 10.5px; color: var(--muted); margin-top: 2px; }

/* ============================================================
   卡片 / 统计 / 徽标
   ============================================================ */

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.card-title { font-size: 14.5px; font-weight: 680; letter-spacing: -.01em; }
.card-sub { font-size: 11px; color: var(--muted); margin-top: 3px; }
.card-link { font-size: 11.5px; color: var(--primary); display: inline-flex; align-items: center; gap: 3px; }
.card-link svg { width: 13px; height: 13px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat-card {
  position: relative; overflow: hidden;
  display: flex; align-items: flex-start; gap: 13px;
  padding: 18px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease), box-shadow .2s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: 0 0 auto; }
.stat-icon svg { width: 20px; height: 20px; }
.stat-body { min-width: 0; flex: 1; }
.stat-label { font-size: 11.5px; color: var(--muted); font-weight: 500; }
.stat-value { font-size: 25px; line-height: 1.2; font-weight: 740; letter-spacing: -.035em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat-value small { font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-left: 3px; }
.stat-foot { display: flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--muted); margin-top: 7px; flex-wrap: wrap; }
.stat-foot b { font-weight: 650; color: var(--ink-2); }
.trend-up { color: var(--green); }
.trend-down { color: var(--danger); }
.stat-icon.teal { background: var(--primary-soft); color: var(--primary); }
.stat-icon.blue { background: var(--blue-soft); color: var(--blue); }
.stat-icon.amber { background: var(--accent-soft); color: var(--accent); }
.stat-icon.red { background: var(--danger-soft); color: var(--danger); }
.stat-icon.violet { background: var(--violet-soft); color: var(--violet); }
.stat-icon.green { background: var(--green-soft); color: var(--green); }

.avatar {
  display: inline-grid; place-items: center;
  border-radius: 50%; flex: 0 0 auto;
  font-weight: 720; letter-spacing: -.02em;
  border: 1px solid rgba(16, 32, 28, .05);
  user-select: none;
}
.avatar-sm { width: 30px; height: 30px; font-size: 11.5px; }
.avatar-md { width: 36px; height: 36px; font-size: 13px; }
.avatar-lg { width: 46px; height: 46px; font-size: 17px; }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 8px; border-radius: 6px;
  font-size: 10.5px; font-weight: 600; white-space: nowrap;
  background: var(--bg-soft); color: var(--ink-2);
  border: 1px solid transparent;
}
.badge i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .85; }
.badge.green { background: var(--green-soft); color: #166534; }
.badge.amber { background: var(--accent-soft); color: #92400e; }
.badge.red { background: var(--danger-soft); color: #b91c1c; }
.badge.blue { background: var(--blue-soft); color: #1d4ed8; }
.badge.violet { background: var(--violet-soft); color: #6d28d9; }
.badge.gray { background: #f1f5f4; color: #5f716b; }
.badge.teal { background: var(--primary-soft); color: var(--primary-ink); }
.badge.no-dot i { display: none; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 6px; border-radius: 5px; font-size: 10px; color: var(--muted); background: var(--bg-soft); }
.tag svg { width: 11px; height: 11px; }

/* ============================================================
   仪表盘
   ============================================================ */

.dash-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .85fr); gap: 16px; margin-top: 16px; }
.dash-grid-2 { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 16px; margin-top: 16px; }
.chart-card { padding: 20px; }
.chart-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.chart-legend { display: flex; align-items: center; gap: 14px; font-size: 10.5px; color: var(--muted); }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { width: 8px; height: 8px; border-radius: 2px; }
.chart-legend .income { background: var(--primary); }
.chart-legend .expense { background: #f4b26a; }
.bar-chart { position: relative; height: 208px; margin-top: 18px; padding: 0 2px 0 0; }
.bar-grid { position: absolute; inset: 0 0 24px 0; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.bar-grid i { display: block; border-top: 1px dashed rgba(203, 216, 211, .62); }
.bar-groups { position: absolute; inset: 0 0 0 0; display: flex; align-items: stretch; gap: 4px; }
.bar-group { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 0; }
.bar-pair { height: 184px; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 4px; padding: 0 3px; }
.bar {
  width: min(15px, 38%); min-height: 0; border-radius: 5px 5px 2px 2px;
  transition: height .45s var(--ease), filter .2s;
  position: relative;
}
.bar:hover { filter: brightness(.92); }
.bar-income { background: linear-gradient(180deg, #2ba79b, var(--primary)); }
.bar-expense { background: linear-gradient(180deg, #f6c98f, #eda145); }
.bar-label { height: 24px; display: flex; align-items: center; font-size: 9.5px; color: var(--muted-2); white-space: nowrap; }
.bar-group:hover .bar-label { color: var(--ink-2); }
.chart-empty { height: 208px; display: grid; place-items: center; color: var(--muted-2); font-size: 12px; }

.donut-card { padding: 20px; display: flex; flex-direction: column; }
.donut-wrap { display: flex; align-items: center; gap: 20px; margin: 16px 0 4px; }
.donut { width: 138px; height: 138px; border-radius: 50%; flex: 0 0 auto; background: conic-gradient(var(--primary) calc(var(--p) * 1%), #eaf0ed 0); display: grid; place-items: center; position: relative; }
.donut::after { content: ""; position: absolute; inset: 13px; border-radius: 50%; background: var(--card); }
.donut-hole { position: relative; z-index: 1; text-align: center; }
.donut-hole strong { display: block; font-size: 26px; font-weight: 740; letter-spacing: -.04em; line-height: 1.1; }
.donut-hole span { font-size: 10px; color: var(--muted); }
.donut-legend { display: grid; gap: 10px; flex: 1; }
.donut-legend div { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--muted); }
.donut-legend i { width: 7px; height: 7px; border-radius: 50%; }
.donut-legend b { margin-left: auto; color: var(--ink); font-weight: 650; font-variant-numeric: tabular-nums; }
.donut-foot { display: flex; gap: 8px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.donut-foot div { flex: 1; }
.donut-foot span { display: block; font-size: 10px; color: var(--muted); }
.donut-foot b { display: block; font-size: 15px; font-weight: 680; margin-top: 2px; font-variant-numeric: tabular-nums; }

.reminder-list { display: grid; gap: 2px; margin-top: 12px; }
.reminder {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 8px; border-radius: 9px;
  transition: background .16s;
  color: inherit;
}
.reminder:hover { background: var(--bg-soft); }
.reminder-icon { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: 0 0 auto; }
.reminder-icon svg { width: 15px; height: 15px; }
.reminder-icon.red { background: var(--danger-soft); color: var(--danger); }
.reminder-icon.amber { background: var(--accent-soft); color: var(--accent); }
.reminder-icon.blue { background: var(--blue-soft); color: var(--blue); }
.reminder-icon.green { background: var(--green-soft); color: var(--green); }
.reminder-text { min-width: 0; flex: 1; }
.reminder-title { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reminder-sub { font-size: 10.5px; color: var(--muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reminder-val { font-size: 11.5px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }

.recent-list { display: grid; gap: 1px; margin-top: 8px; }
.recent-item { display: flex; align-items: center; gap: 11px; padding: 10px 6px; border-radius: 9px; transition: background .16s; color: inherit; }
.recent-item:hover { background: var(--bg-soft); }
.recent-icon { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: 0 0 auto; }
.recent-icon svg { width: 15px; height: 15px; }
.recent-icon.in { background: var(--green-soft); color: var(--green); }
.recent-icon.out { background: var(--danger-soft); color: var(--danger); }
.recent-main { flex: 1; min-width: 0; }
.recent-title { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-sub { font-size: 10.5px; color: var(--muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-amount { text-align: right; }
.recent-amount b { display: block; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.recent-amount span { display: block; font-size: 9.5px; color: var(--muted); margin-top: 1px; }
.amount.in { color: var(--green); }
.amount.out { color: var(--danger); }

.announce-bar {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 12px; margin-bottom: 16px;
  border-radius: 10px; font-size: 11.5px; color: var(--primary-ink);
  background: var(--primary-soft); border: 1px solid #cdece5;
}
.announce-bar svg { width: 14px; height: 14px; }
.announce-bar a { margin-left: auto; font-weight: 600; }

/* ============================================================
   列表 / 表格
   ============================================================ */

.toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 14px; margin-bottom: 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.toolbar-spacer { flex: 1; }
.search-box { position: relative; width: min(260px, 100%); }
.search-box svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--muted-2); }
.search-box .input { height: 34px; padding-left: 34px; font-size: 12px; border-color: var(--line); background: var(--bg-soft); }
.search-box .input:focus { background: #fff; }
.segmented { display: inline-flex; align-items: center; gap: 2px; padding: 3px; background: var(--bg-soft); border-radius: 9px; }
.segmented button {
  height: 28px; padding: 0 10px; border: 0; border-radius: 7px;
  background: transparent; color: var(--muted); font-size: 11px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
}
.segmented button:hover { color: var(--ink-2); }
.segmented button.active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.segmented button .count { font-size: 9.5px; color: var(--muted-2); }
.segmented.teal button.active { background: var(--primary); color: #fff; box-shadow: 0 4px 10px -5px rgba(15, 118, 110, .6); }
.segmented.teal button.active .count { color: rgba(255, 255, 255, .7); }

.table-wrap { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.table-scroll { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; min-width: 760px; }
.table th {
  padding: 10px 14px; text-align: left;
  font-size: 10px; font-weight: 650; color: var(--muted-2); letter-spacing: .07em;
  background: #f9fbfa; border-bottom: 1px solid var(--line);
  white-space: nowrap; position: sticky; top: 0; z-index: 1;
}
.table td { padding: 12px 14px; border-bottom: 1px solid #eef3f1; vertical-align: middle; font-size: 12.5px; color: var(--ink-2); }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .14s; }
.table tbody tr:hover { background: #f8fbf9; }
.table tbody tr[data-id] { cursor: pointer; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .muted { color: var(--muted); }
.table .nowrap { white-space: nowrap; }
.table .strong { font-weight: 650; color: var(--ink); }
.table-empty { padding: 46px 20px; }
.cell-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cell-icon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex: 0 0 auto; background: var(--primary-soft); color: var(--primary); }
.cell-icon svg { width: 16px; height: 16px; }
.cell-icon.blue { background: var(--blue-soft); color: var(--blue); }
.cell-icon.amber { background: var(--accent-soft); color: var(--accent); }
.cell-icon.violet { background: var(--violet-soft); color: var(--violet); }
.cell-text { min-width: 0; }
.cell-title { font-size: 12.5px; font-weight: 620; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
.cell-sub { font-size: 10.5px; color: var(--muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
.row-actions { display: flex; align-items: center; gap: 2px; justify-content: flex-end; opacity: .58; transition: opacity .16s; }
.table tbody tr:hover .row-actions { opacity: 1; }
.row-actions .icon-btn { width: 29px; height: 29px; border-color: transparent; background: transparent; }
.row-actions .icon-btn:hover { background: var(--bg-soft); border-color: var(--line); }
.row-actions .icon-btn.danger:hover { background: var(--danger-soft); }
.row-actions .icon-btn svg { width: 14px; height: 14px; }

.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line); background: #fbfcfb; flex-wrap: wrap; }
.pagination-info { font-size: 11px; color: var(--muted); }
.pagination-btns { display: flex; align-items: center; gap: 4px; }
.page-btn { min-width: 28px; height: 28px; padding: 0 7px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--muted); font-size: 11px; display: grid; place-items: center; }
.page-btn:hover { background: var(--bg-soft); color: var(--ink); }
.page-btn.active { background: var(--primary); color: #fff; font-weight: 650; }
.page-btn[disabled] { opacity: .35; pointer-events: none; }

.mobile-list { display: none; padding: 8px; }
.m-card { padding: 13px; border-radius: 11px; border: 1px solid var(--line); background: #fff; margin-bottom: 8px; }
.m-card[data-id] { cursor: pointer; }
.m-card:last-child { margin-bottom: 0; }
.m-top { display: flex; align-items: flex-start; gap: 10px; }
.m-title { font-size: 13px; font-weight: 650; flex: 1; min-width: 0; }
.m-sub { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.m-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.m-grid span { display: block; font-size: 9.5px; color: var(--muted-2); }
.m-grid b { display: block; font-size: 11.5px; font-weight: 620; margin-top: 1px; }
.m-actions { display: flex; gap: 6px; margin-top: 10px; }
.m-actions .btn { flex: 1; }

/* ============================================================
   模态框 / 抽屉 / 通知
   ============================================================ */

.modal-backdrop, .drawer-backdrop {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(7, 20, 17, .46);
  backdrop-filter: blur(5px);
  display: flex; align-items: center; justify-content: center;
  padding: 22px;
  animation: fadeIn .18s var(--ease);
}
.drawer-backdrop { justify-content: flex-end; padding: 0; }
.modal {
  width: min(660px, 100%); max-height: min(90vh, 900px);
  background: var(--card); border-radius: 18px;
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: modalIn .26s var(--ease);
}
.modal.modal-sm { width: min(440px, 100%); }
.modal.modal-lg { width: min(820px, 100%); }
.modal-head { display: flex; align-items: flex-start; gap: 12px; padding: 20px 22px 14px; border-bottom: 1px solid var(--line); flex: 0 0 auto; }
.modal-head-main { flex: 1; min-width: 0; }
.modal-title { font-size: 17px; font-weight: 700; letter-spacing: -.02em; }
.modal-sub { font-size: 11px; color: var(--muted); margin-top: 3px; }
.modal-close { width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); display: grid; place-items: center; }
.modal-close:hover { background: var(--bg-soft); color: var(--ink); }
.modal-close svg { width: 17px; height: 17px; }
.modal-body { padding: 20px 22px; overflow-y: auto; flex: 1; }
.modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--line); background: #fbfcfb; flex: 0 0 auto; }
.modal-foot .left { margin-right: auto; }
.drawer {
  width: min(720px, 100%); height: 100%;
  background: var(--card);
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
  animation: drawerIn .3s var(--ease);
}
.drawer .modal-head { padding: 18px 22px; background: linear-gradient(180deg, #fbfdfc, #fff); }
.drawer .modal-body { padding: 0 22px 24px; }
.drawer .modal-foot { background: #fff; }
.drawer-hero { margin: 0 -22px; padding: 16px 22px 20px; background: linear-gradient(135deg, rgba(229, 244, 240, .85), rgba(248, 250, 249, .5)); border-bottom: 1px solid var(--line); }
.drawer-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.drawer-title h2 { font-size: 20px; letter-spacing: -.03em; font-weight: 720; }
.drawer-address { font-size: 11.5px; color: var(--muted); margin-top: 5px; display: flex; align-items: center; gap: 4px; }
.drawer-address svg { width: 13px; height: 13px; }
.detail-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; margin-top: 16px; }
.detail-tile { background: rgba(255, 255, 255, .76); border: 1px solid rgba(203, 216, 211, .7); border-radius: 10px; padding: 10px 11px; }
.detail-tile span { display: block; font-size: 9.5px; color: var(--muted); }
.detail-tile b { display: block; font-size: 13.5px; font-weight: 680; margin-top: 2px; font-variant-numeric: tabular-nums; }
.detail-tile b.teal { color: var(--primary); }
.detail-tile b.amber { color: var(--accent); }
.detail-section { padding: 18px 0; border-bottom: 1px solid var(--line); }
.detail-section:last-child { border-bottom: 0; padding-bottom: 4px; }
.detail-section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.detail-section-title { font-size: 11px; font-weight: 650; letter-spacing: .1em; color: var(--muted-2); text-transform: uppercase; }
.kv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
.kv span { display: block; font-size: 9.5px; color: var(--muted-2); }
.kv b { display: block; font-size: 12px; font-weight: 600; margin-top: 1px; word-break: break-all; }
.tabs-line { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 0 -22px; padding: 0 22px; position: sticky; top: 0; background: #fff; z-index: 2; }
.tabs-line button { border: 0; background: transparent; padding: 11px 10px 10px; font-size: 11.5px; font-weight: 600; color: var(--muted); position: relative; }
.tabs-line button.active { color: var(--primary); }
.tabs-line button.active::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; background: var(--primary); border-radius: 2px 2px 0 0; }
.tab-panel { padding-top: 16px; }

.toast-root { position: fixed; right: 18px; bottom: 18px; z-index: 400; display: flex; flex-direction: column; gap: 8px; width: min(350px, calc(100vw - 36px)); pointer-events: none; }
.toast {
  pointer-events: auto;
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 13px;
  background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--primary);
  border-radius: 10px; box-shadow: var(--shadow-lg);
  animation: toastIn .24s var(--ease);
}
.toast.out { animation: toastOut .2s var(--ease) forwards; }
.toast-icon { width: 18px; height: 18px; margin-top: 1px; color: var(--primary); }
.toast-icon svg { width: 18px; height: 18px; }
.toast-msg { flex: 1; font-size: 12px; line-height: 1.55; color: var(--ink-2); }
.toast-close { border: 0; background: transparent; color: var(--muted-2); width: 20px; height: 20px; display: grid; place-items: center; border-radius: 5px; }
.toast-close:hover { background: var(--bg-soft); }
.toast.success { border-left-color: var(--green); }
.toast.success .toast-icon { color: var(--green); }
.toast.error { border-left-color: var(--danger); }
.toast.error .toast-icon { color: var(--danger); }
.toast.warn { border-left-color: var(--accent); }
.toast.warn .toast-icon { color: var(--accent); }

.confirm-text { font-size: 13px; color: var(--ink-2); line-height: 1.75; }
.confirm-text b { color: var(--ink); }

/* ============================================================
   空状态 / 骨架屏
   ============================================================ */

.empty { display: grid; place-items: center; text-align: center; padding: 48px 20px; }
.empty-icon { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: var(--bg-soft); color: var(--muted); margin-bottom: 13px; }
.empty-icon svg { width: 25px; height: 25px; }
.empty-title { font-size: 13.5px; font-weight: 650; }
.empty-desc { font-size: 11px; color: var(--muted); margin-top: 4px; max-width: 300px; line-height: 1.65; }
.empty .btn { margin-top: 14px; }
.empty.compact { padding: 26px 16px; }
.empty.compact .empty-icon { width: 42px; height: 42px; border-radius: 12px; margin-bottom: 9px; }
.empty.compact .empty-icon svg { width: 19px; height: 19px; }
.empty.compact .empty-title { font-size: 12px; }
.empty.compact .empty-desc { font-size: 10.5px; }

.skeleton { position: relative; overflow: hidden; background: #e9efec; border-radius: 7px; }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .62), transparent); animation: shimmer 1.3s infinite; }
.skeleton-line { height: 11px; margin-bottom: 9px; }
.skeleton-line.w-40 { width: 40%; }
.skeleton-line.w-60 { width: 60%; }
.skeleton-line.w-80 { width: 80%; }
.skeleton-card { height: 92px; border-radius: var(--radius); }
.skeleton-row { height: 52px; margin-bottom: 1px; border-radius: 0; }
.skeleton-block { height: 208px; border-radius: var(--radius); }

/* ============================================================
   详情 / 附件 / 维修
   ============================================================ */

.attachment-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 9px; margin-top: 10px; }
.att-item { position: relative; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--bg-soft); }
.att-thumb { height: 92px; display: grid; place-items: center; color: var(--muted); background: #fff; }
.att-thumb img { width: 100%; height: 100%; object-fit: cover; }
.att-thumb svg { width: 28px; height: 28px; }
.att-info { padding: 7px 8px; background: #fff; border-top: 1px solid var(--line); }
.att-name { font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
.att-meta { font-size: 9px; color: var(--muted-2); margin-top: 1px; }
.att-del { position: absolute; top: 5px; right: 5px; width: 23px; height: 23px; border-radius: 6px; border: 0; background: rgba(255, 255, 255, .9); color: var(--danger); display: grid; place-items: center; opacity: 0; transition: opacity .15s; box-shadow: var(--shadow-sm); }
.att-item:hover .att-del { opacity: 1; }
.att-del svg { width: 12px; height: 12px; }
.dropzone {
  margin-top: 10px; padding: 18px; border: 1.5px dashed var(--line-strong); border-radius: 11px;
  text-align: center; color: var(--muted); background: #fbfcfb;
  transition: border-color .16s, background .16s;
  cursor: pointer;
}
.dropzone:hover, .dropzone.drag { border-color: var(--primary); background: var(--primary-soft); }
.dropzone svg { width: 22px; height: 22px; color: var(--muted-2); margin-bottom: 5px; }
.dropzone b { display: block; font-size: 11.5px; color: var(--ink-2); font-weight: 600; }
.dropzone span { display: block; font-size: 10px; margin-top: 2px; }
.dropzone input { display: none; }
.upload-progress { height: 3px; background: var(--line); border-radius: 4px; overflow: hidden; margin-top: 8px; }
.upload-progress i { display: block; height: 100%; background: var(--primary); width: 40%; animation: progress 1s infinite; }
@keyframes progress { 0% { transform: translateX(-100%); } 100% { transform: translateX(300%); } }

.priority-0 { color: var(--muted); }
.priority-1 { color: var(--blue); }
.priority-2 { color: var(--accent); }
.priority-3 { color: var(--danger); }
.maint-strip { width: 3px; align-self: stretch; border-radius: 3px; background: var(--line); }
.maint-strip.p0 { background: #b8c6c1; }
.maint-strip.p1 { background: #93b4f7; }
.maint-strip.p2 { background: #f3b45c; }
.maint-strip.p3 { background: #f17070; }

/* ============================================================
   报表 / 设置
   ============================================================ */

.report-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); gap: 16px; }
.report-bars { display: grid; gap: 12px; margin-top: 16px; }
.report-bar-row { display: grid; grid-template-columns: 62px 1fr 90px; align-items: center; gap: 10px; }
.report-bar-label { font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.report-bar-track { height: 8px; border-radius: 9px; background: var(--bg-soft); overflow: hidden; }
.report-bar-track i { display: block; height: 100%; border-radius: 9px; background: linear-gradient(90deg, #2ba79b, var(--primary)); }
.report-bar-track.expense i { background: linear-gradient(90deg, #f6c98f, #e89a3c); }
.report-bar-value { text-align: right; font-size: 11px; font-weight: 620; font-variant-numeric: tabular-nums; }
.report-big { font-size: 30px; font-weight: 750; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.report-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.report-summary .detail-tile { background: var(--card); border-color: var(--line); }
.report-summary .detail-tile b { font-size: 17px; }

.settings-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr); gap: 16px; align-items: start; }
.settings-stack { display: grid; gap: 16px; }
.settings-row { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.settings-row:last-child { border-bottom: 0; }
.settings-row-main { flex: 1; min-width: 0; }
.settings-row-title { font-size: 12.5px; font-weight: 620; }
.settings-row-sub { font-size: 10.5px; color: var(--muted); margin-top: 2px; line-height: 1.6; }
.settings-row .btn { flex: 0 0 auto; }
.team-list { display: grid; gap: 1px; margin-top: 6px; }
.team-item { display: flex; align-items: center; gap: 10px; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.team-item:last-child { border-bottom: 0; }
.team-main { flex: 1; min-width: 0; }
.team-name { font-size: 12.5px; font-weight: 620; display: flex; align-items: center; gap: 6px; }
.team-sub { font-size: 10px; color: var(--muted); margin-top: 1px; }
.team-actions { display: flex; gap: 2px; }
.team-actions .icon-btn { width: 28px; height: 28px; border-color: transparent; background: transparent; }
.team-actions .icon-btn:hover { background: var(--bg-soft); border-color: var(--line); }
.quota-box { padding: 12px; border-radius: 10px; background: var(--primary-soft); border: 1px solid #cdece5; color: var(--primary-ink); font-size: 11px; line-height: 1.7; }
.quota-box b { font-weight: 700; }
.quota-box code { font-family: ui-monospace, Consolas, monospace; background: rgba(255, 255, 255, .55); padding: 1px 4px; border-radius: 4px; }
.count-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.count-grid div { background: var(--card-2); border: 1px solid var(--line); border-radius: 9px; padding: 9px 10px; }
.count-grid span { display: block; font-size: 9.5px; color: var(--muted); }
.count-grid b { display: block; font-size: 16px; font-weight: 700; margin-top: 1px; font-variant-numeric: tabular-nums; }

/* ============================================================
   动画
   ============================================================ */

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes drawerIn { from { transform: translateX(36px); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes toastIn { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(18px); } }
@keyframes shimmer { 100% { transform: translateX(100%); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ============================================================
   响应式
   ============================================================ */

@media (max-width: 1240px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-grid { grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); }
  .report-grid { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: none; }
  .main { padding-left: 0; }
  .menu-toggle { display: inline-grid; }
  .topbar { padding: 0 18px; }
  .content { padding: 22px 20px 44px; }
  .auth { grid-template-columns: .9fr 1.1fr; }
  .auth-art { padding: 36px; }
  .auth-headline { font-size: 36px; }
}

@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .auth-panel { min-height: 100vh; padding: 26px; background: radial-gradient(520px 380px at 50% -10%, rgba(45, 212, 191, .09), transparent 70%), var(--card); }
  .auth-mobile-brand { display: flex; }
  .auth-box { width: min(420px, 100%); }
  .auth-title { font-size: 26px; }
  .dash-grid, .dash-grid-2 { grid-template-columns: 1fr; }
  .donut-wrap { justify-content: center; }
  .detail-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .content { padding: 18px 14px 40px; }
  .input, .select, .textarea { font-size: 16px; }
  .search-box .input { font-size: 16px; height: 36px; }
  .topbar { height: 60px; padding: 0 12px; gap: 10px; }
  .topbar-date { display: none; }
  .topbar-crumb .crumb-root, .topbar-crumb .crumb-sep { display: none; }
  .topbar-actions .btn span { display: none; }
  .topbar-actions .btn { width: 38px; padding: 0; }
  .topbar-actions .btn svg:last-child { display: none; }
  .page-head { align-items: flex-start; margin-bottom: 16px; }
  .page-title { font-size: 22px; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; }
  .stat-grid { gap: 9px; }
  .stat-card { padding: 13px; gap: 10px; }
  .stat-icon { width: 36px; height: 36px; border-radius: 10px; }
  .stat-icon svg { width: 17px; height: 17px; }
  .stat-value { font-size: 21px; }
  .stat-label { font-size: 10.5px; }
  .stat-foot { font-size: 9.5px; }
  .card-pad, .chart-card, .donut-card { padding: 16px; }
  .toolbar { padding: 10px; gap: 8px; }
  .search-box { width: 100%; }
  .segmented { overflow-x: auto; max-width: 100%; }
  .segmented::-webkit-scrollbar { width: 0; }
  .desktop-only { display: none !important; }
  .mobile-only { display: block !important; }
  .table-wrap { display: none; }
  .mobile-list { display: block; }
  .pagination { display: none; }
  .modal-backdrop { padding: 0; align-items: flex-end; }
  .modal { width: 100%; max-height: 92vh; border-radius: 18px 18px 0 0; }
  .modal-head { padding: 17px 18px 12px; }
  .modal-body { padding: 16px 18px; }
  .modal-foot { padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); flex-wrap: wrap; }
  .modal-foot .left { width: 100%; margin-right: 0; }
  .modal-foot .btn { flex: 1 1 auto; }
  .drawer { width: 100%; }
  .drawer .modal-body { padding: 0 18px 22px; }
  .drawer-hero { margin: 0 -18px; padding: 14px 18px 17px; }
  .tabs-line { margin: 0 -18px; padding: 0 18px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
  .detail-section { padding: 15px 0; }
  .kv-grid { grid-template-columns: 1fr 1fr; }
  .report-summary { grid-template-columns: 1fr 1fr; }
  .toast-root { bottom: 12px; right: 12px; width: calc(100vw - 24px); }
  .toast-root { bottom: calc(12px + env(safe-area-inset-bottom)); }
  .auth-panel { padding: 20px; }
  .auth-form { margin-top: 22px; gap: 14px; }
  .auth-title { font-size: 24px; }
  .count-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 420px) {
  .stat-grid { grid-template-columns: 1fr; }
  .stat-card { align-items: center; }
  .detail-grid { grid-template-columns: 1fr 1fr; }
  .bar-label { font-size: 8.5px; }
  .bar { width: 10px; }
  .page-title { font-size: 21px; }
  .donut-wrap { gap: 12px; }
  .donut { width: 120px; height: 120px; }
  .auth-points { display: none; }
}

/* ============================================================
   墨绿账本 · 视觉精修 v2
   ============================================================ */

::-webkit-scrollbar-thumb { background: #d0c4b0; }
::-webkit-scrollbar-thumb:hover { background: #b9aa91; }
:focus-visible { outline: 2px solid rgba(14, 90, 71, .5); outline-offset: 2px; }

.boot {
  background:
    radial-gradient(680px 420px at 18% 12%, rgba(201, 164, 107, .13), transparent 60%),
    radial-gradient(520px 380px at 88% 88%, rgba(14, 90, 71, .14), transparent 60%),
    #081713;
}
.boot-mark {
  color: #f1d9b1;
  background: rgba(201, 164, 107, .08);
  border-color: rgba(201, 164, 107, .24);
  box-shadow: 0 22px 60px -24px rgba(201, 164, 107, .45);
}
.boot-name { font-family: var(--font-serif); font-weight: 600; letter-spacing: .32em; color: #f0e7d5; }
.boot-bar { background: rgba(255, 255, 255, .08); }
.boot-bar span { background: linear-gradient(90deg, #c9a46b, #ead3a9); }

/* 登录 / 初始化 */
.auth { background: var(--bg); }
.auth-art {
  background:
    radial-gradient(740px 540px at 10% 0%, rgba(201, 164, 107, .17), transparent 62%),
    radial-gradient(560px 440px at 96% 78%, rgba(14, 90, 71, .24), transparent 64%),
    linear-gradient(155deg, #0d2b23 0%, #081a15 60%, #06110e 100%);
}
.auth-art::after {
  background-image:
    linear-gradient(rgba(201, 164, 107, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201, 164, 107, .05) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: radial-gradient(ellipse at 28% 20%, #000 12%, transparent 72%);
}
.auth-brand .brand-logo { box-shadow: 0 16px 40px -20px rgba(201, 164, 107, .55); }
.auth-brand strong { font-family: var(--font-serif); font-size: 20px; letter-spacing: .16em; font-weight: 600; }
.auth-brand small { color: #9ab4a8; letter-spacing: .18em; }
.auth-kicker {
  color: #e2c99d;
  background: rgba(201, 164, 107, .1);
  border-color: rgba(201, 164, 107, .24);
  letter-spacing: .16em;
}
.auth-headline { font-weight: 730; letter-spacing: -.055em; color: #f3ecdd; }
.auth-headline em { color: #d7b47a; font-family: var(--font-serif); font-weight: 600; letter-spacing: -.02em; }
.auth-sub { color: #a4bfb3; }
.auth-points span { color: #c0d5ca; background: rgba(255, 255, 255, .04); border-color: rgba(201, 164, 107, .12); }
.auth-points svg { color: #d7b47a; }
.auth-mock .mock-card {
  background: rgba(255, 252, 245, .055);
  border-color: rgba(201, 164, 107, .15);
}
.mock-label { color: #9ab4a8; }
.mock-value { color: #f4ecdd; font-family: var(--font-display); font-size: 26px; }
.mock-value small { color: #9ab4a8; }
.mock-bars i { background: linear-gradient(180deg, #d7b47a, rgba(201, 164, 107, .16)); }
.mock-list div { color: #c0d5ca; }
.mock-list i { background: #d7b47a; }
.mock-list b { color: #f5efe2; }
.auth-quote { color: #718c80; }
.auth-panel {
  background:
    radial-gradient(520px 380px at 100% 0%, rgba(201, 164, 107, .08), transparent 62%),
    radial-gradient(420px 320px at 0% 100%, rgba(14, 90, 71, .04), transparent 62%),
    var(--bg);
}
.auth-box {
  background: rgba(255, 252, 245, .78);
  border: 1px solid rgba(228, 220, 203, .9);
  border-radius: 20px;
  padding: 34px;
  box-shadow: 0 30px 70px -50px rgba(38, 31, 21, .55);
  backdrop-filter: blur(10px);
}
.auth-mobile-brand strong { font-family: var(--font-serif); letter-spacing: .1em; }
.auth-title { font-size: 30px; letter-spacing: -.045em; }
.auth-title::after { content: ""; display: block; width: 34px; height: 2px; background: var(--gold); border-radius: 2px; margin-top: 14px; }
.auth-desc { color: var(--muted); }
.auth-form { margin-top: 24px; }
.auth-foot { color: #9b968a; }
.auth-error { background: var(--danger-soft); border-color: #ecc9be; color: #8f382a; }
.auth-success { background: var(--green-soft); border-color: #cbe3d5; color: #235f45; }
.setup-page { background: radial-gradient(720px 520px at 50% -10%, rgba(201,164,107,.08), transparent 62%), #081713; }
.setup-card { background: var(--card); border: 1px solid var(--line); }
.setup-step b { background: var(--accent-soft); color: var(--accent); }
.setup-step code { background: var(--card-2); color: var(--primary-ink); }
.code-block { background: #0b241c; color: #d7e8de; border: 1px solid rgba(201, 164, 107, .14); }

/* 侧边栏 */
.sidebar {
  background:
    radial-gradient(460px 360px at 16% 0%, rgba(201, 164, 107, .14), transparent 64%),
    linear-gradient(180deg, #0b241c 0%, #081a15 52%, #06110e 100%);
  border-right-color: rgba(201, 164, 107, .1);
}
.sidebar-brand { padding-bottom: 18px; margin-bottom: 8px; border-bottom: 1px solid rgba(201, 164, 107, .1); }
.brand-logo {
  background: linear-gradient(145deg, rgba(201, 164, 107, .27), rgba(201, 164, 107, .055));
  border-color: rgba(201, 164, 107, .32);
  color: #f1d9b1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}
.sidebar-brand-text strong { font-family: var(--font-serif); font-size: 17px; letter-spacing: .12em; font-weight: 600; color: #f3ecdd; }
.sidebar-brand-text small { color: #829c90; font-size: 7.5px; letter-spacing: .12em; white-space: nowrap; }
.brand-badge {
  color: var(--gold);
  background: var(--gold-soft);
  border-color: rgba(201, 164, 107, .24);
  letter-spacing: .12em;
  font-size: 8px;
}
.nav-group-label { color: #5e796e; letter-spacing: .2em; }
.nav-item { color: rgba(228, 238, 231, .66); border: 1px solid transparent; }
.nav-item:hover { background: rgba(255, 255, 255, .045); color: #f2f6f0; }
.nav-item:hover svg { color: #d7b47a; }
.nav-item.active {
  color: #fbf5e8;
  background: linear-gradient(90deg, rgba(201, 164, 107, .16), rgba(201, 164, 107, .025));
  border-color: rgba(201, 164, 107, .1);
  box-shadow: inset 2px 0 0 var(--gold);
}
.nav-item.active svg { color: #d7b47a; opacity: 1; }
.nav-item .nav-dot { background: var(--gold); box-shadow: 0 0 0 3px rgba(201, 164, 107, .13); }
.nav-divider { background: rgba(201, 164, 107, .12); }
.sidebar-foot { border-top-color: rgba(201, 164, 107, .12); }
.side-user { background: rgba(255, 255, 255, .028); border: 1px solid rgba(255, 255, 255, .055); border-radius: 11px; }
.sidebar .avatar { box-shadow: 0 0 0 1px rgba(201, 164, 107, .38); }
.side-user-name { color: #f0f5ef; }
.side-user-role { color: #8aa69a; }
.side-logout { color: #95afa3; }
.side-logout:hover { color: #e9a28f; }

/* 顶栏 / 页面头 */
.topbar {
  background: rgba(243, 239, 229, .8);
  border-bottom-color: rgba(207, 195, 173, .55);
  backdrop-filter: blur(18px);
}
.crumb-root { color: #9a907f; letter-spacing: .16em; }
.crumb-current { color: var(--ink); font-weight: 650; }
.topbar-date { background: rgba(255, 252, 245, .66); border-color: var(--line); color: #7d786b; }
.quick-menu { background: var(--card); border-color: var(--line); box-shadow: var(--shadow-lg); }
.quick-menu button:hover { background: var(--card-2); }
.content { padding: 30px 34px 58px; }
.page-head {
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(207, 195, 173, .55);
  margin-bottom: 20px;
}
.page-title { font-size: 29px; font-weight: 740; letter-spacing: -.04em; }
.page-sub { color: #7e786b; font-size: 12px; margin-top: 6px; }
.page-actions .input { background: rgba(255, 252, 245, .8); }

/* 卡片 / 按钮 / 表单 */
.card { background: var(--card); border-color: var(--line); box-shadow: var(--shadow-sm); }
.card-title { font-weight: 680; letter-spacing: -.015em; }
.card-sub { color: #938b7c; }
.card-link { color: var(--primary); font-weight: 600; }
.card-link:hover { color: var(--accent); }
.btn { border-radius: 9px; }
.btn-primary { background: var(--primary); box-shadow: 0 12px 24px -16px rgba(14, 90, 71, .75); }
.btn-primary:hover { background: var(--primary-2); }
.btn-secondary { background: var(--card); border-color: var(--line-strong); color: var(--ink-2); }
.btn-secondary:hover { background: #fffdf8; border-color: #b9aa91; }
.btn-soft { background: var(--primary-soft); color: var(--primary-ink); }
.btn-soft:hover { background: #d5e9df; }
.btn-danger-soft { background: var(--danger-soft); color: #92392b; }
.btn-danger-soft:hover { background: #f1d5cc; }
.btn-ghost:hover { background: var(--card-2); }
.input, .select, .textarea {
  background: #fffdf8;
  border-color: var(--line-strong);
  border-radius: 8px;
}
.input:hover, .select:hover, .textarea:hover { border-color: #b9aa91; }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14, 90, 71, .12);
  background: #fffdf8;
}
.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238b8274' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
.field > label, .field-label { color: #4d5c54; letter-spacing: .01em; }
.field .hint { color: #9b968a; }
.money-input > span { color: var(--accent); font-weight: 700; }
.form-note { background: var(--card-2); border-color: var(--line); color: #7d786b; }
.form-note svg { color: var(--primary); }
.form-note.warn { background: var(--accent-soft); border-color: #e7d0ae; color: #7d541f; }
.form-section-title { color: #9a907f; letter-spacing: .14em; }
.form-error { background: var(--danger-soft); border-color: #ecc9be; color: #8f382a; }
.segmented { background: #eee7d9; }
.segmented button { color: #847d6e; }
.segmented button.active { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(52, 42, 27, .1); }
.segmented.teal button.active { background: var(--primary); color: #fff; box-shadow: 0 6px 14px -8px rgba(14, 90, 71, .7); }

/* 表格 */
.toolbar { background: var(--card); border-color: var(--line); box-shadow: var(--shadow-sm); }
.search-box .input { background: var(--card-2); border-color: transparent; }
.search-box .input:focus { background: #fffdf8; border-color: var(--primary); }
.table-wrap { background: var(--card); border-color: var(--line); box-shadow: var(--shadow-sm); }
.table th {
  background: #f8f2e6;
  color: #968c7b;
  border-bottom-color: var(--line);
  letter-spacing: .09em;
}
.table td { border-bottom-color: #f0e8da; color: var(--ink-2); }
.table tbody tr:hover { background: #fbf5e9; }
.table tbody tr:hover td:first-child { box-shadow: inset 2px 0 0 var(--gold); }
.row-actions { opacity: .88; }
.row-actions .icon-btn { color: #7d786b; }
.row-actions .icon-btn:hover { background: var(--card-2); border-color: var(--line); color: var(--ink); }
.cell-icon { background: var(--primary-soft); color: var(--primary); border: 1px solid rgba(14, 90, 71, .07); }
.cell-icon.blue { background: var(--blue-soft); color: var(--blue); }
.cell-icon.amber { background: var(--accent-soft); color: var(--accent); }
.cell-icon.violet { background: var(--violet-soft); color: var(--violet); }
.cell-title { color: var(--ink); }
.cell-sub { color: #958d7e; }
.pagination { background: #fbf6ec; border-top-color: var(--line); }
.page-btn:hover { background: var(--card-2); }
.page-btn.active { background: var(--primary); }
.m-card { background: var(--card); border-color: var(--line); }
.m-card[data-id]:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.m-top .m-title { color: var(--ink); }
.m-sub { color: #958d7e; }
.m-grid { border-top-color: var(--line); }
.m-grid span { color: #9b968a; }

/* 状态标签 */
.badge.green { background: var(--green-soft); color: #236046; }
.badge.amber { background: var(--accent-soft); color: #85591f; }
.badge.red { background: var(--danger-soft); color: #92392b; }
.badge.blue { background: var(--blue-soft); color: #2f5a6c; }
.badge.violet { background: var(--violet-soft); color: #5b4a67; }
.badge.gray { background: #f0eade; color: #6f6a5f; }
.badge.teal { background: var(--primary-soft); color: var(--primary-ink); }
.tag { background: var(--card-2); color: #8f887a; }

/* 仪表盘 · 墨绿账本主卡 */
.ledger-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(360px, .7fr);
  gap: 28px;
  padding: 27px 30px;
  border-radius: 20px;
  color: #eef5ee;
  background:
    radial-gradient(620px 320px at 90% 16%, rgba(201, 164, 107, .16), transparent 62%),
    radial-gradient(500px 300px at 8% 100%, rgba(14, 90, 71, .22), transparent 64%),
    linear-gradient(135deg, #0c241d 0%, #0a1b16 58%, #07130f 100%);
  border: 1px solid rgba(201, 164, 107, .18);
  box-shadow: 0 30px 64px -40px rgba(8, 24, 18, .8), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.ledger-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(201, 164, 107, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201, 164, 107, .045) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse at 84% 20%, #000 8%, transparent 65%);
  pointer-events: none;
}
.ledger-hero::after {
  content: "栖";
  position: absolute;
  right: 16px;
  bottom: -58px;
  font-family: var(--font-serif);
  font-size: 220px;
  line-height: 1;
  color: rgba(255, 255, 255, .025);
  pointer-events: none;
}
.ledger-main { position: relative; z-index: 1; min-width: 0; }
.ledger-overline {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 10px;
  letter-spacing: .2em;
  color: var(--gold);
  text-transform: uppercase;
}
.ledger-overline::before { content: ""; width: 24px; height: 1px; background: var(--gold); }
.ledger-label { margin-top: 22px; font-size: 12px; letter-spacing: .08em; color: #a4bfb3; }
.ledger-value {
  font-family: var(--font-display);
  font-size: clamp(38px, 4.2vw, 52px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -.025em;
  color: #f7f1e3;
  font-variant-numeric: tabular-nums;
  margin-top: 3px;
}
.ledger-value.is-neg { color: #e9a28f; }
.ledger-sub { display: flex; align-items: center; flex-wrap: wrap; gap: 11px; margin-top: 11px; color: #a4bfb3; font-size: 11px; }
.ledger-sub i { width: 3px; height: 3px; border-radius: 50%; background: var(--gold); opacity: .8; }
.ledger-spark { display: block; width: min(100%, 380px); height: 66px; margin-top: 17px; overflow: visible; }
.ledger-side {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  align-self: stretch;
  background: rgba(201, 164, 107, .14);
  border: 1px solid rgba(201, 164, 107, .16);
  border-radius: 12px;
  overflow: hidden;
}
.ledger-stat { background: rgba(255, 255, 255, .035); padding: 14px 16px; min-height: 86px; }
.ledger-stat span { display: block; font-size: 9.5px; letter-spacing: .14em; color: #91ada1; }
.ledger-stat b {
  display: block;
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 600;
  line-height: 1.15;
  color: #f4edde;
  margin-top: 5px;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.ledger-stat b small { font-family: var(--font); font-size: 10px; font-weight: 500; color: #91ada1; margin-left: 2px; }
.ledger-stat b.gold { color: var(--gold); }
.ledger-stat em { display: block; font-style: normal; font-size: 10px; color: #879f94; margin-top: 4px; line-height: 1.5; }

.dash-grid { gap: 16px; margin-top: 16px; }
.dash-grid-2 { gap: 16px; margin-top: 16px; }
.chart-card, .donut-card { background: var(--card); }
.chart-legend .income { background: var(--primary); }
.chart-legend .expense { background: var(--accent); }
.bar-grid i { border-top-color: rgba(207, 195, 173, .48); }
.bar-income { background: linear-gradient(180deg, #2a8a70, var(--primary)); }
.bar-expense { background: linear-gradient(180deg, #d8b985, var(--accent)); }
.bar-label { color: #9b968a; }
.donut { background: conic-gradient(var(--primary) calc(var(--p) * 1%), #eee6d7 0); }
.donut::after { background: var(--card); }
.donut-hole strong { font-family: var(--font-display); font-size: 30px; font-weight: 600; }
.donut-hole span { color: #938b7c; }
.donut-legend div { color: #847d6e; }
.donut-legend b { color: var(--ink); }
.donut-foot { border-top-color: var(--line); }
.donut-foot b { font-family: var(--font-display); font-size: 16px; font-weight: 600; }
.chart-empty { color: #9b968a; }

.reminder:hover { background: var(--card-2); }
.reminder-title { color: var(--ink); }
.reminder-sub { color: #928a7b; }
.reminder-icon.red { background: var(--danger-soft); color: var(--danger); }
.reminder-icon.amber { background: var(--accent-soft); color: var(--accent); }
.reminder-icon.blue { background: var(--blue-soft); color: var(--blue); }
.reminder-icon.green { background: var(--green-soft); color: var(--green); }
.recent-item:hover { background: var(--card-2); }
.recent-icon.in { background: var(--green-soft); color: var(--green); }
.recent-icon.out { background: var(--danger-soft); color: var(--danger); }
.recent-title { color: var(--ink); }
.recent-sub { color: #958d7e; }
.recent-amount b { font-family: var(--font-display); font-weight: 600; }
.announce-bar { background: var(--accent-soft); border-color: #e7d0ae; color: #7d541f; }

/* 统计卡（账单 / 维修 / 报表 / 设置仍在使用） */
.stat-card { background: var(--card); border-color: var(--line); }
.stat-card:hover { box-shadow: var(--shadow); }
.stat-icon.teal { background: var(--primary-soft); color: var(--primary); }
.stat-icon.green { background: var(--green-soft); color: var(--green); }
.stat-icon.blue { background: var(--blue-soft); color: var(--blue); }
.stat-icon.amber { background: var(--accent-soft); color: var(--accent); }
.stat-icon.red { background: var(--danger-soft); color: var(--danger); }
.stat-icon.violet { background: var(--violet-soft); color: var(--violet); }
.stat-label { color: #877f70; }
.stat-value { font-family: var(--font-display); font-size: 27px; font-weight: 600; letter-spacing: -.02em; }
.stat-value small { font-family: var(--font); color: #948c7d; }
.stat-foot { color: #938b7c; }
.stat-foot b { color: var(--ink-2); }

/* 弹窗 / 抽屉 */
.modal-backdrop, .drawer-backdrop { background: rgba(8, 22, 18, .55); }
.modal { background: var(--card); border: 1px solid var(--line); }
.modal-head { background: linear-gradient(180deg, #fffdf8, #fffbf3); border-bottom-color: var(--line); }
.modal-title { font-size: 18px; letter-spacing: -.025em; }
.modal-sub { color: #938b7c; }
.modal-close:hover { background: var(--card-2); }
.modal-body { background: var(--card); }
.modal-foot { background: #fbf6ec; border-top-color: var(--line); }
.drawer { background: var(--card); }
.drawer .modal-head { background: linear-gradient(180deg, #fffdf8, #fffbf3); }
.drawer-hero {
  background:
    radial-gradient(420px 220px at 100% 0%, rgba(201, 164, 107, .12), transparent 62%),
    linear-gradient(135deg, rgba(226, 239, 232, .8), rgba(248, 243, 232, .7));
  border-bottom-color: var(--line);
}
.drawer-title h2 { letter-spacing: -.035em; }
.drawer-address { color: #7d786b; }
.detail-tile { background: rgba(255, 252, 245, .78); border-color: var(--line); }
.detail-tile span { color: #938b7c; }
.detail-tile b { font-family: var(--font-display); font-size: 14px; font-weight: 600; }
.detail-section { border-bottom-color: var(--line); }
.detail-section-title { color: #9a907f; letter-spacing: .14em; }
.kv span { color: #9b968a; }
.kv b { color: var(--ink-2); }
.tabs-line { border-bottom-color: var(--line); background: var(--card); }
.tabs-line button { color: #938b7c; }
.tabs-line button.active { color: var(--primary); }
.tabs-line button.active::after { background: var(--gold); }
.attachment-grid { gap: 9px; }
.att-item { border-color: var(--line); background: var(--card-2); }
.att-thumb { background: #fffdf8; }
.att-info { background: var(--card); border-top-color: var(--line); }
.att-name { color: var(--ink-2); }
.dropzone { background: #fbf6ec; border-color: var(--line-strong); }
.dropzone:hover, .dropzone.drag { background: var(--primary-soft); border-color: var(--primary); }
.dropzone b { color: var(--ink-2); }
.dropzone span { color: #938b7c; }

/* 设置 / 报表 */
.settings-row { border-bottom-color: var(--line); }
.settings-row-title { color: var(--ink); }
.settings-row-sub { color: #938b7c; }
.team-item { border-bottom-color: var(--line); }
.team-name { color: var(--ink); }
.team-sub { color: #938b7c; }
.quota-box { background: var(--primary-soft); border-color: #cde3d7; color: var(--primary-ink); }
.quota-box code { background: rgba(255, 252, 245, .7); }
.count-grid div { background: var(--card-2); border-color: var(--line); }
.count-grid span { color: #938b7c; }
.count-grid b { font-family: var(--font-display); font-weight: 600; }
.report-bar-track { background: #eee6d7; }
.report-bar-track i { background: linear-gradient(90deg, #2a8a70, var(--primary)); }
.report-bar-track.expense i { background: linear-gradient(90deg, #d8b985, var(--accent)); }
.report-bar-label { color: #938b7c; }
.report-bar-value { font-family: var(--font-display); }
.report-big { font-family: var(--font-display); font-weight: 600; }
.report-summary .detail-tile { background: var(--card); }
.empty-icon { background: var(--card-2); color: #948c7d; }
.empty-title { color: var(--ink); }
.empty-desc { color: #938b7c; }
.skeleton { background: #eae2d3; }
.skeleton::after { background: linear-gradient(90deg, transparent, rgba(255, 252, 245, .65), transparent); }
.toast { background: var(--card); border-color: var(--line); box-shadow: var(--shadow-lg); }
.toast-msg { color: var(--ink-2); }

/* 响应式：墨绿账本 */
@media (max-width: 1100px) {
  .ledger-hero { grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr); gap: 20px; padding: 24px; }
  .ledger-stat { padding: 12px 14px; }
  .ledger-stat b { font-size: 21px; }
}

@media (max-width: 860px) {
  .ledger-hero { grid-template-columns: 1fr; gap: 18px; padding: 22px; }
  .ledger-value { font-size: 40px; }
  .ledger-side { grid-template-columns: 1fr 1fr; }
  .ledger-stat { min-height: 78px; }
  .ledger-hero::after { font-size: 180px; bottom: -50px; }
  .auth-box { padding: 26px; }
}

@media (max-width: 768px) {
  .content { padding: 18px 14px 44px; }
  .page-head { padding-bottom: 14px; margin-bottom: 16px; }
  .page-title { font-size: 24px; }
  .ledger-hero { padding: 20px 18px; border-radius: 16px; }
  .ledger-label { margin-top: 16px; }
  .ledger-value { font-size: 35px; }
  .ledger-spark { height: 54px; margin-top: 13px; }
  .ledger-stat { padding: 11px 12px; min-height: 72px; }
  .ledger-stat b { font-size: 19px; }
  .ledger-stat span { font-size: 9px; }
  .ledger-stat em { font-size: 9.5px; }
  .ledger-hero::after { font-size: 150px; bottom: -42px; }
  .auth-box { padding: 24px 20px; border-radius: 18px; }
  .auth-title { font-size: 26px; }
  .topbar { background: rgba(243, 239, 229, .88); }
}

@media (max-width: 420px) {
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat-card { padding: 12px; gap: 8px; align-items: flex-start; }
  .stat-icon { width: 32px; height: 32px; border-radius: 9px; }
  .stat-icon svg { width: 15px; height: 15px; }
  .stat-value { font-size: 18px; }
  .stat-label { font-size: 10px; }
  .stat-foot { font-size: 9px; line-height: 1.4; }
  .ledger-hero { padding: 18px 15px; }
  .ledger-value { font-size: 30px; }
  .ledger-sub { gap: 7px; font-size: 10px; }
  .ledger-side { gap: 1px; }
  .ledger-stat { padding: 10px 11px; min-height: 68px; }
  .ledger-stat b { font-size: 18px; }
  .ledger-stat b small { font-size: 9px; }
  .ledger-stat em { font-size: 9px; }
  .ledger-hero::after { display: none; }
  .auth-box { background: transparent; border: 0; box-shadow: none; padding: 0; backdrop-filter: none; }
  .auth-title::after { margin-top: 12px; }
}
