/* 云记账 v3 — 深空科技感主题 */
:root {
  color-scheme: dark; /* 原生日期/时间控件深色化 */
  --bg: #0a0f1e;
  --panel: rgba(21, 30, 55, .55);
  --panel-solid: #131c33;
  --line: rgba(125, 150, 200, .16);
  --line-strong: rgba(125, 150, 200, .3);
  --text: #e8eefb;
  --muted: #93a0ba;
  --hint: #5d6b88;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --ok: #34d399;
  --warn: #fbbf24;
  --err: #fb7185;
  --radius: 14px;
  --glow-blue: 0 0 22px rgba(59, 130, 246, .35);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background:
    radial-gradient(1100px 520px at 85% -8%, rgba(59, 130, 246, .16), transparent 60%),
    radial-gradient(900px 500px at -10% 108%, rgba(34, 211, 238, .10), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 14.5px;
  min-height: 100vh;
}
body::before { /* 网格纹理 */
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(rgba(125, 150, 200, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 150, 200, .045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 30%, transparent 80%);
}
a { color: #7cc7ff; text-decoration: none; }
a:hover { color: #a9dcff; }

/* ===== 骨架 ===== */
.shell { display: flex; min-height: 100vh; position: relative; z-index: 1; }
.content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.main { flex: 1; padding: 22px 30px 40px; width: 100%; animation: pagein .3s ease; }
@keyframes pagein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ===== 侧边栏 ===== */
.sidebar { width: 212px; flex-shrink: 0; position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: rgba(10, 15, 30, .8); backdrop-filter: blur(10px);
  border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 18px 12px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px 18px; }
.brand-logo { width: 32px; height: 32px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 15px;
  box-shadow: var(--glow-blue); }
.brand-logo.sm { width: 26px; height: 26px; font-size: 13px; }
.brand-name { color: #fff; font-size: 16px; font-weight: 500; letter-spacing: 1px; }
.side-actions { display: flex; flex-direction: column; gap: 9px; margin-bottom: 14px; }
.side-big { display: block; text-align: center; padding: 11px; border-radius: 11px; font-size: 14px; color: #fff;
  position: relative; overflow: hidden; transition: transform .15s, box-shadow .15s; }
.side-big:active { transform: scale(.97); }
.act-entry { background: linear-gradient(135deg, #2563eb, #06b6d4); box-shadow: 0 4px 18px rgba(37, 99, 235, .35); }
.act-entry:hover { box-shadow: 0 6px 26px rgba(34, 211, 238, .5); color: #fff; }
.act-pay { background: linear-gradient(135deg, #059669, #14b8a6); box-shadow: 0 4px 18px rgba(16, 185, 129, .3); }
.act-pay:hover { box-shadow: 0 6px 26px rgba(20, 184, 166, .45); color: #fff; }
.act-entry.on, .act-pay.on { outline: 1px solid rgba(255,255,255,.45); }
.side-sect { font-size: 11px; color: var(--hint); padding: 12px 10px 5px; letter-spacing: 2px; }
.side-link { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px;
  color: var(--muted); font-size: 14px; margin-bottom: 2px; border: 1px solid transparent; transition: all .15s; }
.side-link:hover { background: rgba(125, 150, 200, .08); color: #fff; }
.side-link.on { background: linear-gradient(90deg, rgba(59, 130, 246, .22), rgba(34, 211, 238, .08));
  color: #fff; border-color: rgba(34, 211, 238, .35); box-shadow: inset 0 0 18px rgba(34, 211, 238, .06); }
.side-link .ico { width: 18px; text-align: center; font-size: 13px; }
.side-foot { margin-top: auto; border-top: 1px solid var(--line); padding-top: 12px; }
.me-chip { display: flex; align-items: center; gap: 9px; padding: 0 6px; }
.me-avatar { width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--blue), var(--cyan)); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }
.me-name { color: #fff; font-size: 13px; }
.me-role { font-size: 11px; color: var(--hint); }
.me-ops { display: flex; gap: 12px; padding: 9px 8px 0; }
.me-ops a { color: var(--hint); font-size: 12px; }
.me-ops a:hover { color: var(--cyan); }

.mobile-top { display: none; }

/* ===== 页头 & Tab ===== */
.pagehead { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.pagehead h2 { font-size: 21px; margin: 0; font-weight: 500; letter-spacing: .5px; }
.date-chip { color: var(--muted); font-size: 12.5px; background: var(--panel); border: 1px solid var(--line);
  padding: 6px 14px; border-radius: 20px; backdrop-filter: blur(6px); }
.tabbar { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; flex-wrap: wrap; }
.tabbar a { padding: 10px 18px; color: var(--muted); font-size: 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: all .15s; }
.tabbar a.on { color: var(--cyan); border-bottom-color: var(--cyan); text-shadow: 0 0 14px rgba(34, 211, 238, .55); }
.tabbar a:hover { color: var(--text); }
.action-tabs { display: flex; gap: 10px; margin-bottom: 16px; }
.action-tabs a { padding: 8px 20px; border-radius: 20px; background: var(--panel); border: 1px solid var(--line);
  color: var(--muted); font-size: 14px; transition: all .15s; }
.action-tabs a.on { background: linear-gradient(135deg, rgba(37, 99, 235, .35), rgba(6, 182, 212, .25));
  border-color: rgba(34, 211, 238, .5); color: #fff; box-shadow: 0 0 16px rgba(34, 211, 238, .18); }

/* ===== 卡片 ===== */
.cards3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 18px; }
.card { position: relative; overflow: hidden;
  background: linear-gradient(160deg, rgba(30, 42, 72, .65), rgba(15, 22, 42, .65));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 19px; backdrop-filter: blur(8px); }
.card::after { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(125, 160, 255, .4), transparent); }
.card .label { color: var(--muted); font-size: 13px; margin-bottom: 7px; }
.card .num { font-size: 25px; font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: .5px; }
.card .num.ok { color: var(--ok); text-shadow: 0 0 16px rgba(52, 211, 153, .35); }
.card .num.warn { color: var(--warn); text-shadow: 0 0 16px rgba(251, 191, 36, .3); }
.card .num.err, .neg { color: var(--err); text-shadow: 0 0 16px rgba(251, 113, 133, .3); }
.ok { color: var(--ok); }
.warn { color: var(--warn); }
.err { color: var(--err); }

.headcards { display: flex; gap: 10px; flex-wrap: wrap; }
.mini { background: var(--panel); border: 1px solid var(--line); border-radius: 11px; padding: 8px 15px;
  display: flex; flex-direction: column; min-width: 110px; backdrop-filter: blur(6px); }
.mini span { font-size: 12px; color: var(--muted); }
.mini b { font-size: 17px; font-weight: 500; font-variant-numeric: tabular-nums; }
.mini.ok b { color: var(--ok); } .mini.warn b { color: var(--warn); } .mini.neg b { color: var(--err); }

/* ===== 面板 / 表格 ===== */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 22px; margin: 14px 0; backdrop-filter: blur(8px); }
.panel.narrow { max-width: 480px; }
.panel h3 { font-size: 15.5px; margin: 0 0 12px; font-weight: 500; }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin: 20px 0 10px; }
.panel-head h3 { font-size: 15.5px; margin: 0; font-weight: 500; }
.tablewrap { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  margin: 0 0 18px; overflow-x: auto; backdrop-filter: blur(8px); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 11px 16px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--hint); font-weight: 500; font-size: 12px; letter-spacing: 1px;
  background: rgba(125, 150, 200, .05); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(34, 211, 238, .045); }
td.empty { text-align: center; color: var(--hint); padding: 34px; white-space: normal; }
.empty-line { color: var(--hint); padding: 6px 0; }
.rowlink { cursor: pointer; }
.tag { display: inline-block; padding: 2px 11px; border-radius: 20px; background: rgba(125, 150, 200, .12);
  color: var(--muted); font-size: 12px; border: 1px solid transparent; }
.tag.ok { background: rgba(52, 211, 153, .12); color: var(--ok); border-color: rgba(52, 211, 153, .3); }
.small { color: var(--muted); font-size: 12.5px; font-weight: 400; }

/* ===== 表单 ===== */
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
input, select { display: block; width: 100%; margin-top: 5px; padding: 9px 13px; font-size: 15px;
  background: rgba(10, 16, 32, .6); border: 1px solid var(--line-strong); border-radius: 9px; color: var(--text);
  transition: border-color .15s, box-shadow .15s, background .15s; }
input::placeholder { color: var(--hint); }
input:hover, select:hover { border-color: rgba(34, 211, 238, .4); background: rgba(10, 16, 32, .75); }
input:focus, select:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34, 211, 238, .15); background: rgba(10, 16, 32, .9); }
select option { background: var(--panel-solid); color: var(--text); }
/* 下拉框自绘箭头 */
select { appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 34px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235d6b88' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center; }
/* 日期框 */
input[type=date] { min-height: 41px; cursor: pointer; font-variant-numeric: tabular-nums; }
input[type=date]::-webkit-calendar-picker-indicator { filter: invert(.65) sepia(.4) saturate(4) hue-rotate(140deg); cursor: pointer; }
/* 数字输入隐藏上下箭头，更干净 */
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; }
input[readonly] { color: var(--cyan); background: rgba(34, 211, 238, .05); border-style: dashed; }
/* 提示框 */
.alert { padding: 13px 17px; border-radius: 11px; font-size: 14px; line-height: 1.75; margin: 0 0 16px;
  border: 1px solid; backdrop-filter: blur(8px); animation: pagein .25s ease; }
.alert.ok { background: rgba(13, 40, 34, .8); border-color: rgba(52, 211, 153, .4); color: #a7f3d0; }
.alert.err { background: rgba(48, 16, 26, .8); border-color: rgba(251, 113, 133, .4); color: #fecdd3; }
.form-grid4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0 16px; }
.form-grid4 .full { grid-column: 1 / -1; }
.panel-actions { margin-top: 4px; display: flex; gap: 10px; }
.filterbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 16px; backdrop-filter: blur(8px); }
.filterbar.slim { padding: 10px 14px; margin-bottom: 12px; }
.filterbar label { margin: 0; min-width: 145px; }
.filterbar .btn { margin-bottom: 1px; }
.totaltag { color: var(--muted); font-size: 13.5px; margin-left: auto; }
.searchbox input { width: 240px; margin: 0; border-radius: 20px; padding: 8px 16px; }
.inforow { display: flex; gap: 14px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.inforow span { color: var(--muted); flex: 0 0 70px; }
.inforow:last-of-type { margin-bottom: 12px; }

/* ===== 按钮 ===== */
.btn { display: inline-block; padding: 8px 18px; border: 1px solid var(--line-strong); border-radius: 9px;
  background: rgba(125, 150, 200, .08); color: var(--text); font-size: 14px; cursor: pointer;
  transition: all .15s; user-select: none; }
.btn:hover { border-color: rgba(34, 211, 238, .5); color: #fff; box-shadow: 0 0 14px rgba(34, 211, 238, .18); }
.btn:active { transform: scale(.97); }
.btn.primary { background: linear-gradient(135deg, #2563eb, #06b6d4); border: none; color: #fff;
  box-shadow: 0 4px 16px rgba(37, 99, 235, .35); }
.btn.primary:hover { box-shadow: 0 6px 24px rgba(34, 211, 238, .5); color: #fff; }
.btn.green { background: linear-gradient(135deg, #059669, #14b8a6); border: none; color: #fff;
  box-shadow: 0 4px 16px rgba(16, 185, 129, .3); }
.btn.green:hover { box-shadow: 0 6px 24px rgba(20, 184, 166, .45); color: #fff; }
.btn.danger { color: var(--err); border-color: rgba(251, 113, 133, .35); background: rgba(251, 113, 133, .06); }
.btn.danger:hover { border-color: var(--err); box-shadow: 0 0 14px rgba(251, 113, 133, .25); color: var(--err); }
.btn.solid-danger { background: linear-gradient(135deg, #e11d48, #f97316); border: none; color: #fff;
  box-shadow: 0 4px 16px rgba(225, 29, 72, .4); }
.btn.solid-danger:hover { box-shadow: 0 6px 24px rgba(249, 115, 22, .5); color: #fff; }
.btn.ghost { background: transparent; }
.btn.sm { padding: 4px 13px; font-size: 12.5px; }
.btn.big { padding: 12px 30px; font-size: 15px; border-radius: 11px; }
.btn.block { display: block; width: 100%; text-align: center; }
form.inline, td form { display: inline; margin: 0; }
.ops { display: flex; gap: 6px; white-space: nowrap; }

/* ===== Toast 通知 ===== */
.toastbox { position: fixed; top: 18px; right: 18px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast { min-width: 250px; max-width: 380px; padding: 13px 18px 13px 44px; border-radius: 12px; font-size: 14px;
  position: relative; animation: toastin .3s cubic-bezier(.2, .9, .3, 1.2); backdrop-filter: blur(10px); }
.toast::before { position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
  width: 19px; height: 19px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #04121f; }
.toast.t-ok { background: rgba(13, 40, 34, .92); border: 1px solid rgba(52, 211, 153, .45); color: #a7f3d0; }
.toast.t-ok::before { content: '✓'; background: var(--ok); box-shadow: 0 0 12px rgba(52, 211, 153, .6); }
.toast.t-err { background: rgba(48, 16, 26, .92); border: 1px solid rgba(251, 113, 133, .45); color: #fecdd3; }
.toast.t-err::before { content: '!'; background: var(--err); box-shadow: 0 0 12px rgba(251, 113, 133, .6); }
.toast.out { animation: toastout .3s ease forwards; }
@keyframes toastin { from { opacity: 0; transform: translateX(60px); } to { opacity: 1; transform: none; } }
@keyframes toastout { to { opacity: 0; transform: translateX(60px); } }

/* ===== 确认弹窗 ===== */
.modal-mask { display: none; position: fixed; inset: 0; z-index: 300; background: rgba(4, 8, 18, .72);
  backdrop-filter: blur(4px); align-items: center; justify-content: center; padding: 20px; }
.modal-mask.show { display: flex; animation: fadein .18s ease; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.modal { width: min(400px, 94vw); border-radius: 18px; padding: 28px 26px 22px; text-align: center;
  background: linear-gradient(165deg, #1a2542, #10182e); border: 1px solid rgba(125, 150, 200, .28);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .55), 0 0 40px rgba(59, 130, 246, .12);
  animation: modalin .22s cubic-bezier(.2, .9, .3, 1.15); }
@keyframes modalin { from { opacity: 0; transform: scale(.88) translateY(14px); } to { opacity: 1; transform: none; } }
.modal-icon { width: 46px; height: 46px; margin: 0 auto 14px; border-radius: 50%;
  background: rgba(251, 113, 133, .12); border: 1px solid rgba(251, 113, 133, .45); color: var(--err);
  display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700;
  box-shadow: 0 0 20px rgba(251, 113, 133, .25); }
.modal h3 { margin: 0 0 8px; font-size: 17px; font-weight: 500; }
.modal p { margin: 0 0 22px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.modal-btns { display: flex; gap: 12px; }
.modal-btns .btn { flex: 1; padding: 10px; font-size: 14.5px; border-radius: 10px; }

/* ===== 录入页 ===== */
.entry-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 6px; }
.calc { background: rgba(251, 191, 36, .08); border: 1px dashed rgba(251, 191, 36, .45); color: #fde68a;
  border-radius: 11px; padding: 10px 18px; font-size: 15px; }
.calc b { font-size: 19px; font-variant-numeric: tabular-nums; }
.uploadrow { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.uploadrow input[type=file] { margin: 0; max-width: 320px; padding: 8px; }

/* ===== 价格 ===== */
.price-gname { color: var(--hint); font-size: 12px; margin: 14px 0 6px; letter-spacing: 2px; }
.pricegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 4px 18px; }
.pricerow { display: flex; align-items: center; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--line); flex-wrap: wrap; }
.pricerow span { flex: 0 0 100px; }
.price-cur { min-width: 80px; font-weight: 500; color: var(--cyan); font-variant-numeric: tabular-nums; }
.price-form { display: flex; gap: 8px; margin-left: auto; }
.price-form input { width: 110px; margin: 0; padding: 6px 10px; font-size: 13.5px; }

/* ===== 报表条形 ===== */
.bar { display: inline-block; vertical-align: middle; width: 120px; height: 8px; background: rgba(125, 150, 200, .14);
  border-radius: 4px; overflow: hidden; margin-right: 8px; }
.bar > div { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--blue), var(--cyan));
  box-shadow: 0 0 10px rgba(34, 211, 238, .5); }
.foot { text-align: center; color: var(--hint); font-size: 12px; padding: 10px 0 20px; }

/* ===== 可搜索下拉 ===== */
.combo { position: relative; }
.combo select { display: none !important; }
.combo-input { margin-top: 5px; cursor: pointer; padding-right: 34px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235d6b88' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center; }
.combo.open .combo-input { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34, 211, 238, .15); border-radius: 9px 9px 0 0; }
.combo-list { display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 90;
  max-height: 242px; overflow-y: auto; background: #16203c; border: 1px solid rgba(34, 211, 238, .5); border-top: none;
  border-radius: 0 0 10px 10px; box-shadow: 0 16px 38px rgba(0, 0, 0, .55), 0 0 18px rgba(34, 211, 238, .12);
  backdrop-filter: blur(10px); }
.combo.open .combo-list { display: block; animation: pagein .15s ease; }
.combo-opt { padding: 9px 14px; font-size: 14px; color: var(--text); cursor: pointer; border-bottom: 1px solid rgba(125, 150, 200, .08);
  display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.combo-opt:last-child { border-bottom: none; }
.combo-opt:hover, .combo-opt.hl { background: rgba(34, 211, 238, .14); }
.combo-opt.on { color: var(--cyan); }
.combo-opt.on::after { content: '✓'; font-size: 12px; }
.combo-empty { padding: 14px; color: var(--hint); font-size: 13px; text-align: center; }
.combo-clear { position: absolute; right: 32px; top: 50%; transform: translateY(calc(-50% - 2px)); width: 18px; height: 18px;
  border-radius: 50%; background: rgba(125, 150, 200, .18); color: var(--muted); border: none; cursor: pointer;
  font-size: 11px; line-height: 1; display: none; align-items: center; justify-content: center; }
.combo.has-value .combo-clear { display: inline-flex; }
.combo-clear:hover { background: rgba(251, 113, 133, .3); color: #fff; }

/* ===== 趋势图 ===== */
.chart-panel { padding-bottom: 10px; }
.trend-wrap { width: 100%; }
.trend-wrap svg { display: block; width: 100%; height: auto; max-height: 240px; }
.tc-axis { fill: var(--hint); font-size: 11.5px; font-family: inherit; font-variant-numeric: tabular-nums; }
.tc-axis.today { fill: var(--cyan); font-weight: 600; }
.tc-val { font-size: 11px; font-weight: 600; font-family: inherit; paint-order: stroke; stroke: rgba(10, 15, 30, .85); stroke-width: 3px; }
.tc-val.cons { fill: #7dd3fc; }
.tc-val.pay { fill: #6ee7b7; }
.legend { display: flex; gap: 18px; justify-content: center; padding: 4px 0 8px; }
.lg { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.lg::before { content: ''; width: 10px; height: 10px; border-radius: 3px; }
.lg.cons::before { background: linear-gradient(135deg, #2563eb, #22d3ee); box-shadow: 0 0 8px rgba(34, 211, 238, .6); }
.lg.pay::before { background: linear-gradient(135deg, #059669, #34d399); box-shadow: 0 0 8px rgba(52, 211, 153, .6); }

/* ===== 财务 ===== */
.fin-cards { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.fin-cards .card .num { font-size: 23px; }

/* ===== 登录页 ===== */
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh;
  background:
    radial-gradient(900px 480px at 80% 0%, rgba(59, 130, 246, .22), transparent 60%),
    radial-gradient(700px 420px at 10% 100%, rgba(34, 211, 238, .14), transparent 60%),
    var(--bg); }
.login-card { background: linear-gradient(165deg, rgba(26, 37, 66, .85), rgba(13, 20, 40, .9));
  border: 1px solid rgba(125, 150, 200, .25); border-radius: 20px; padding: 40px 34px; width: min(380px, 92vw);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .6), 0 0 50px rgba(59, 130, 246, .1); backdrop-filter: blur(12px); }
.login-logo { width: 54px; height: 54px; border-radius: 16px; margin: 0 auto 14px;
  background: linear-gradient(135deg, var(--blue), var(--cyan)); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 25px; box-shadow: 0 0 30px rgba(34, 211, 238, .45); }
.login-card h1 { margin: 0; font-size: 24px; text-align: center; font-weight: 500; letter-spacing: 2px; }
.login-card .sub { text-align: center; color: var(--muted); margin: 8px 0 24px; font-size: 13px; letter-spacing: 1px; }
.login-card .btn { margin-top: 8px; padding: 12px; font-size: 16px; }

/* ===== 手机端 ===== */
.bottomnav, .more-sheet, .sheet-mask { display: none; }
@media (max-width: 860px) {
  .sidebar { display: none; }
  .main { padding: 14px 14px 86px; }
  .mobile-top { display: flex; align-items: center; gap: 8px; padding: 10px 14px; position: sticky; top: 0; z-index: 20;
    background: rgba(10, 15, 30, .9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
  .mobile-top b { font-size: 15px; font-weight: 500; color: #fff; }
  .mobile-top .m-user { margin-left: auto; color: var(--muted); font-size: 12.5px; }
  .bottomnav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; bottom: 0; left: 0; right: 0;
    background: rgba(13, 20, 40, .95); backdrop-filter: blur(12px); border-top: 1px solid var(--line);
    z-index: 30; padding: 6px 0 max(6px, env(safe-area-inset-bottom)); }
  .bottomnav a { text-align: center; color: var(--muted); font-size: 11px; padding: 2px 0; }
  .bottomnav a.on { color: var(--cyan); text-shadow: 0 0 10px rgba(34, 211, 238, .5); }
  .bottomnav .ico { display: block; font-size: 17px; font-style: normal; }
  .bottomnav .ico.plus { width: 27px; height: 27px; margin: 0 auto 1px; border-radius: 9px;
    background: linear-gradient(135deg, #2563eb, #06b6d4); color: #fff; display: flex; align-items: center;
    justify-content: center; font-size: 15px; box-shadow: 0 0 14px rgba(34, 211, 238, .4); }
  .bottomnav a:nth-child(3) .ico.plus { background: linear-gradient(135deg, #059669, #14b8a6); box-shadow: 0 0 14px rgba(20, 184, 166, .4); }
  .more-sheet { display: flex; flex-direction: column; position: fixed; left: 0; right: 0; bottom: -100%;
    background: #141d38; border-radius: 20px 20px 0 0; padding: 18px 22px calc(20px + env(safe-area-inset-bottom));
    z-index: 40; transition: bottom .22s ease; border-top: 1px solid var(--line-strong);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, .5); }
  .more-sheet.open { bottom: 0; }
  .more-sheet a { padding: 14px 6px; border-bottom: 1px solid var(--line); color: var(--text); font-size: 15px; }
  .more-sheet a.danger { color: var(--err); border-bottom: none; }
  .sheet-title { color: var(--hint); font-size: 12px; padding-bottom: 6px; letter-spacing: 2px; }
  .sheet-mask { display: none; position: fixed; inset: 0; background: rgba(4, 8, 18, .65); z-index: 35; backdrop-filter: blur(3px); }
  .sheet-mask.show { display: block; }
  .cards3 { gap: 9px; }
  .card { padding: 13px 15px; }
  .card .num { font-size: 20px; }
  th, td { padding: 9px 11px; }
  .filterbar label { min-width: 0; flex: 1 1 45%; }
  .searchbox input { width: 100%; }
  .pagehead h2 { font-size: 18px; }
  .headcards { width: 100%; }
  .mini { flex: 1; min-width: 90px; }
  .pricegrid { grid-template-columns: 1fr; }
  .price-form { margin-left: 0; width: 100%; }
  .price-form input { flex: 1; width: auto; }
  .entry-foot { flex-direction: column; align-items: stretch; }
  .entry-foot .btn { width: 100%; }
  .foot { padding-bottom: 8px; }
}

/* ==================== v2.2 视觉精修 ==================== */

/* ---- 动态极光背景 ---- */
body::after { content: ''; position: fixed; width: 720px; height: 720px; border-radius: 50%;
  top: -260px; right: -180px; pointer-events: none; z-index: 0;
  background: radial-gradient(circle, rgba(34, 211, 238, .10), transparent 65%);
  filter: blur(30px); animation: aurora 16s ease-in-out infinite alternate; }
@keyframes aurora { from { transform: translate(0, 0) scale(1); opacity: .8; }
  to { transform: translate(-120px, 90px) scale(1.25); opacity: .45; } }

/* ---- 滚动条 ---- */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(125, 150, 200, .22); border-radius: 5px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: rgba(34, 211, 238, .45); }

/* ---- 页头 ---- */
.pagehead h2 { display: flex; align-items: center; gap: 12px; }
.pagehead h2::before { content: ''; width: 4px; height: 22px; border-radius: 3px; flex-shrink: 0;
  background: linear-gradient(180deg, var(--blue), var(--cyan)); box-shadow: 0 0 12px rgba(34, 211, 238, .6); }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-left: auto; }
.toolbar .searchbox { margin-left: 0; }

/* ---- 列表工具行：搜索框圆润 ---- */
.searchbox input { width: 250px; transition: box-shadow .2s, border-color .2s; }
.searchbox input:focus { box-shadow: 0 0 0 3px rgba(34, 211, 238, .15), 0 0 18px rgba(34, 211, 238, .12); }

/* ---- 表格精修 ---- */
.tablewrap { transition: border-color .2s; }
.tablewrap:hover { border-color: var(--line-strong); }
th { text-transform: none; background: linear-gradient(180deg, rgba(125, 150, 200, .08), rgba(125, 150, 200, .03)); }
th.th-ops, td.td-ops { text-align: right; }
td.td-ops { display: flex; gap: 6px; justify-content: flex-end; align-items: center; border-bottom: none; }
td.td-ops form { margin: 0; }
tr.rowlink { transition: background .15s; }
tr.rowlink:hover { cursor: pointer; }

/* ---- 卡片悬浮 ---- */
.card, .mini { transition: transform .18s, border-color .18s, box-shadow .18s; }
.card:hover { transform: translateY(-2px); border-color: rgba(34, 211, 238, .3);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .3), 0 0 18px rgba(34, 211, 238, .08); }
.card:hover::after { background: linear-gradient(90deg, transparent, rgba(34, 211, 238, .55), transparent); }

/* ---- 主按钮流光 ---- */
.btn.primary, .btn.green { position: relative; overflow: hidden; }
.btn.primary::after, .btn.green::after { content: ''; position: absolute; top: 0; left: -80%; width: 50%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .28), transparent);
  transform: skewX(-20deg); transition: left .45s ease; }
.btn.primary:hover::after, .btn.green:hover::after { left: 130%; }

/* ---- 侧边栏选中光条 ---- */
.side-link { position: relative; }
.side-link.on::before { content: ''; position: absolute; left: -12px; top: 20%; bottom: 20%; width: 3px;
  border-radius: 2px; background: linear-gradient(180deg, var(--blue), var(--cyan));
  box-shadow: 0 0 10px rgba(34, 211, 238, .8); }

/* ---- Tab 下划线动画 ---- */
.tabbar a { position: relative; }
.tabbar a::after { content: ''; position: absolute; left: 50%; right: 50%; bottom: -1px; height: 2px;
  background: var(--cyan); box-shadow: 0 0 10px rgba(34, 211, 238, .7); transition: left .2s, right .2s; opacity: 0; }
.tabbar a.on::after { left: 12px; right: 12px; opacity: 1; }

/* ---- 表单弹窗 ---- */
.form-mask { align-items: flex-start; padding-top: 9vh; }
.form-modal { width: min(460px, 94vw); max-height: 82vh; overflow-y: auto; text-align: left; padding: 20px 24px 22px; }
.fm-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.fm-head h3 { margin: 0; font-size: 16.5px; font-weight: 500; display: flex; align-items: center; gap: 10px; }
.fm-head h3::before { content: ''; width: 4px; height: 16px; border-radius: 2px;
  background: linear-gradient(180deg, var(--blue), var(--cyan)); box-shadow: 0 0 10px rgba(34, 211, 238, .6); }
.fm-close { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line-strong);
  background: rgba(125, 150, 200, .08); color: var(--muted); cursor: pointer; font-size: 12px;
  transition: all .15s; display: flex; align-items: center; justify-content: center; }
.fm-close:hover { background: rgba(251, 113, 133, .18); border-color: var(--err); color: #fff; transform: rotate(90deg); }
.form-modal label { margin-bottom: 11px; }
.form-modal .modal-btns { margin-top: 16px; }

/* ---- 日志标签配色 ---- */
.tag.log-gray { background: rgba(125, 150, 200, .13); color: var(--muted); }
.tag.log-blue { background: rgba(59, 130, 246, .14); color: #93c5fd; border-color: rgba(59, 130, 246, .35); }
.tag.log-cyan { background: rgba(34, 211, 238, .12); color: #67e8f9; border-color: rgba(34, 211, 238, .35); }
.tag.log-green { background: rgba(52, 211, 153, .12); color: #6ee7b7; border-color: rgba(52, 211, 153, .35); }
.tag.log-amber { background: rgba(251, 191, 36, .12); color: #fcd34d; border-color: rgba(251, 191, 36, .35); }
.tag.log-violet { background: rgba(167, 139, 250, .14); color: #c4b5fd; border-color: rgba(167, 139, 250, .38); }
td.log-detail { white-space: normal; min-width: 200px; color: var(--muted); }

/* ---- 登录卡片微动 ---- */
.login-card { animation: pagein .4s ease; }

/* ---- 手机端 ---- */
@media (max-width: 860px) {
  .toolbar { width: 100%; margin-left: 0; }
  .toolbar .searchbox { flex: 1; }
  .toolbar .searchbox input { width: 100%; }
  .form-mask { padding-top: 4vh; align-items: flex-end; }
  .form-modal { width: 100vw; max-height: 88vh; border-radius: 20px 20px 0 0; padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
  td.td-ops { justify-content: flex-start; }
  .pagehead h2::before { height: 18px; }
}

/* ==================== v2.3：日期选择器 / 对账单 / 列表丰富化 ==================== */

/* ---- 自定义日期选择器 ---- */
.dp-input { cursor: pointer; background-image: linear-gradient(transparent, transparent); }
input[type="date"] { color-scheme: dark; }   /* 未接管前（公开页）也用深色 */
.datepick { position: fixed; z-index: 9000; display: none; width: 292px; padding: 14px 14px 10px;
  background: rgba(16, 24, 46, .92); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--line-strong); border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .55), 0 0 0 1px rgba(34, 211, 238, .06), 0 0 30px rgba(34, 211, 238, .08);
  opacity: 0; transform: translateY(-6px) scale(.98); }
.datepick.open { animation: dpin .18s ease forwards; }
@keyframes dpin { to { opacity: 1; transform: translateY(0) scale(1); } }
.dp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.dp-title { font-weight: 600; font-size: 14.5px; letter-spacing: .5px; color: var(--text); }
.dp-nav { width: 30px; height: 30px; border-radius: 9px; border: 1px solid var(--line-strong);
  background: rgba(125, 150, 200, .08); color: var(--muted); font-size: 16px; cursor: pointer; transition: all .15s; }
.dp-nav:hover { color: var(--cyan); border-color: rgba(34, 211, 238, .45); background: rgba(34, 211, 238, .1); }
.dp-week { display: grid; grid-template-columns: repeat(7, 1fr); margin-bottom: 4px; }
.dp-week span { text-align: center; font-size: 11.5px; color: var(--hint); padding: 4px 0; }
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.dp-day { height: 34px; border: none; border-radius: 9px; background: transparent; color: var(--text);
  font-size: 13px; cursor: pointer; transition: all .12s; font-family: inherit; }
.dp-day:hover { background: rgba(34, 211, 238, .16); color: var(--cyan); }
.dp-day.dp-out { color: var(--hint); opacity: .45; }
.dp-day.dp-today { box-shadow: inset 0 0 0 1px rgba(34, 211, 238, .55); color: var(--cyan); font-weight: 600; }
.dp-day.dp-sel { background: linear-gradient(135deg, var(--blue), var(--cyan)); color: #fff;
  font-weight: 600; box-shadow: 0 4px 14px rgba(34, 211, 238, .45); }
.dp-foot { display: flex; align-items: center; gap: 6px; margin-top: 10px; padding-top: 10px;
  border-top: 1px solid var(--line); }
.dp-sp { flex: 1; }
.dp-act { padding: 5px 11px; border-radius: 8px; border: 1px solid var(--line-strong);
  background: rgba(125, 150, 200, .07); color: var(--muted); font-size: 12.5px; cursor: pointer; transition: all .15s; }
.dp-act:hover { color: var(--text); border-color: var(--line-strong); background: rgba(125, 150, 200, .14); }
.dp-act.accent { background: linear-gradient(135deg, var(--blue), var(--cyan)); border: none;
  color: #fff; font-weight: 600; }
.dp-act.accent:hover { box-shadow: 0 4px 14px rgba(34, 211, 238, .4); }

/* ---- 数字高亮 / 提示灰 / 合计行 ---- */
.num-cyan { color: var(--cyan); text-shadow: 0 0 12px rgba(34, 211, 238, .35); }
.hint { color: var(--hint); opacity: .7; }
tr.sumrow td { border-top: 1px solid rgba(34, 211, 238, .25); background: rgba(34, 211, 238, .05);
  font-weight: 600; color: var(--text); padding: 11px 14px; }
.tag.err-tag { background: rgba(251, 113, 133, .14); color: #fda4af; border-color: rgba(251, 113, 133, .4); }

/* ---- 对账单（公开页 + 生成面板） ---- */
.stmt-wrap { min-height: 100vh; padding: 40px 16px; display: flex; justify-content: center; align-items: flex-start; }
.stmt-card { width: min(860px, 100%); max-height: none; text-align: left; padding: 28px clamp(16px, 4vw, 36px) 30px; }
.stmt-title { margin: 6px 0 4px; }
.stmt-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 18px 0 6px; }
.stmt-cards .card { padding: 14px 16px; }
.stmt-cards .num { font-size: 22px; }
.stmt-foot { text-align: center; color: var(--hint); margin-top: 18px; }
.stmt-gen { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.stmt-gen label { margin: 0; }
.stmt-gen select { width: auto; min-width: 110px; }
.stmt-row { display: flex; justify-content: space-between; gap: 12px; align-items: center;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; margin-top: 10px;
  background: rgba(10, 16, 32, .4); flex-wrap: wrap; }
.stmt-row.dead { opacity: .55; }
.stmt-info b { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.stmt-link { display: block; font-size: 12px; color: var(--cyan); word-break: break-all;
  background: rgba(34, 211, 238, .06); padding: 5px 9px; border-radius: 7px; border: 1px dashed rgba(34, 211, 238, .25); }
.stmt-ops { display: flex; gap: 6px; align-items: center; }
.btn.copied { color: var(--ok) !important; border-color: rgba(52, 211, 153, .5) !important; }

@media (max-width: 640px) {
  .stmt-cards { grid-template-columns: 1fr; }
  .datepick { width: min(292px, calc(100vw - 20px)); }
  .stmt-row { flex-direction: column; align-items: stretch; }
  .stmt-ops { justify-content: flex-end; }
}
