/* =========================================================
   supkim 管理面板 全站样式(零外部依赖)— v5 组件层
   设计基调(源自 logo F5:深蓝夜空 + 金星):
     浅色:底 #f4f6fb / 卡片纯白 / 主蓝 #2563eb / 点缀金 #F5B237
     深色:底 #0f1115 / 卡片 #171a21 / 边 #262b36
   规则:颜色一律 CSS 变量(:root 浅色 / html[data-theme="dark"] 深色),
         既有类名全部保留;新增类一律 .v5- 前缀。
   可复用类清单见 base.html 顶部注释。
   ========================================================= */

/* ---------- v5 变量体系(深浅成对,逐个对应) ---------- */

:root {
  /* 底与文字 */
  --bg: #f4f6fb;             /* 页面底色 */
  --text: #0f172a;           /* 正文 */
  --text-heading: #334155;   /* 卡片标题 */
  --text-muted: #64748b;     /* 次要文字 */
  --text-faint: #94a3b8;     /* 弱文字/计数 */
  /* 卡片 */
  --card-bg: #ffffff;
  --card-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 1px 3px rgba(15, 23, 42, 0.07);
  --card-shadow-hover: 0 4px 14px rgba(15, 23, 42, 0.10), 0 2px 4px rgba(15, 23, 42, 0.06);
  --border: #e2e8f0;         /* 分隔线/卡片描边 */
  --border-soft: #f1f5f9;    /* 更浅分隔线(任务行) */
  /* 品牌色 */
  --primary: #2563eb;        /* 主蓝 */
  --primary-press: #1d4ed8;  /* 主蓝 hover/active */
  --gold: #F5B237;           /* 点缀金(logo 金星) */
  --danger: #dc2626;
  --danger-press: #b91c1c;
  --green: #16a34a;          /* 收入绿 */
  --red: #dc2626;            /* 支出红 */
  --blue: #2563eb;           /* 中性蓝 */
  --ring: rgba(37, 99, 235, 0.16);   /* focus 蓝环 */
  /* 控件 */
  --input-border: #cbd5e1;
  --input-bg: #ffffff;
  --link: #2563eb;
  --btn-bg: #ffffff;
  --btn-hover: #f8fafc;
  /* 表格 */
  --table-head-bg: #f8fafc;
  --table-head-text: #64748b;
  --zebra: #fafbfd;
  --row-hover: #eff6ff;
  --hover-soft: #f1f5f9;     /* 清单项 hover */
  --active-bg: #dbeafe;      /* 选中清单项 */
  --active-text: #1d4ed8;
  --chip-bg: #f1f5f9;        /* 项目小徽标底 */
  --chip2-bg: #e2e8f0;       /* 未来日期 chip 底 */
  --chip2-text: #475569;
  /* 徽标(浅底深字,成对) */
  --badge-red-bg: #fee2e2;    --badge-red-fg: #b91c1c;
  --badge-green-bg: #dcfce7;  --badge-green-fg: #15803d;
  --badge-gray-bg: #e2e8f0;   --badge-gray-fg: #475569;
  --badge-orange-bg: #ffedd5; --badge-orange-fg: #c2410c;
  --badge-blue-bg: #dbeafe;   --badge-blue-fg: #1d4ed8;
  --badge-gold-bg: #fdf0d5;   --badge-gold-fg: #a16207;
  /* 提示条 */
  --flash-bg: #eff6ff;
  --flash-text: #1d4ed8;
  --flash-border: #bfdbfe;
  /* 侧栏(两个主题都保持深色夜空) */
  --sidebar-bg: #1e293b;
  --sidebar-hover: #334155;
  --sidebar-border: #334155;
  --sidebar-text: #cbd5e1;
  --sidebar-active-bg: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] {
  /* 底与文字 */
  --bg: #0f1115;
  --text: #f5f5f7;
  --text-heading: #d9d9de;
  --text-muted: #8e8e93;
  --text-faint: #6b6b72;
  /* 卡片 */
  --card-bg: #171a21;
  --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
  --card-shadow-hover: 0 6px 18px rgba(0, 0, 0, 0.55), 0 2px 4px rgba(0, 0, 0, 0.4);
  --border: #262b36;
  --border-soft: #1e232d;
  /* 品牌色 */
  --primary: #2563eb;
  --primary-press: #3b82f6;
  --gold: #F5B237;
  --danger: #dc2626;
  --danger-press: #ef4444;
  --green: #22c55e;
  --red: #ef4444;
  --blue: #3b82f6;
  --ring: rgba(96, 165, 250, 0.28);
  /* 控件 */
  --input-border: #333947;
  --input-bg: #10131a;
  --link: #60a5fa;
  --btn-bg: #1c212b;
  --btn-hover: #262c39;
  /* 表格 */
  --table-head-bg: #1b202a;
  --table-head-text: #8e8e93;
  --zebra: #191d26;
  --row-hover: #202737;
  --hover-soft: #202634;
  --active-bg: #1e3a8a;
  --active-text: #bfdbfe;
  --chip-bg: #262b36;
  --chip2-bg: #262b36;
  --chip2-text: #8e8e93;
  /* 徽标(半透明底浅字,成对) */
  --badge-red-bg: rgba(239, 68, 68, 0.18);     --badge-red-fg: #fca5a5;
  --badge-green-bg: rgba(34, 197, 94, 0.18);   --badge-green-fg: #86efac;
  --badge-gray-bg: rgba(148, 163, 184, 0.18);  --badge-gray-fg: #cbd5e1;
  --badge-orange-bg: rgba(249, 115, 22, 0.18); --badge-orange-fg: #fdba74;
  --badge-blue-bg: rgba(59, 130, 246, 0.20);   --badge-blue-fg: #93c5fd;
  --badge-gold-bg: rgba(245, 178, 55, 0.16);   --badge-gold-fg: #f7c968;
  /* 提示条 */
  --flash-bg: #152036;
  --flash-text: #93c5fd;
  --flash-border: #1e3a8a;
  /* 侧栏 */
  --sidebar-bg: #12151d;
  --sidebar-hover: #1d2230;
  --sidebar-border: #262b36;
  --sidebar-text: #b6b9c2;
  --sidebar-active-bg: rgba(255, 255, 255, 0.07);
}

/* ---------- 基础 ---------- */

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  font-variant-numeric: tabular-nums;  /* 数字一律等宽 */
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- 布局:左侧固定 200px 深色侧栏 + 右侧内容区 ---------- */

.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: 200px;
  flex: 0 0 200px;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
}

.sidebar-brand {
  padding: 20px 16px;
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 1px;
}

.sidebar-nav { flex: 0 0 auto; padding: 4px 8px 12px; }

.sidebar-nav a {
  display: block;
  padding: 9px 12px;
  margin: 1px 0;
  border-radius: 8px;
  color: var(--sidebar-text);
  transition: background 0.15s ease, color 0.15s ease;
}
.sidebar-nav a:hover {
  background: var(--sidebar-hover);
  color: #ffffff;
  text-decoration: none;
}
/* 选中态:左缘 3px 金条 + 高亮底(inset 阴影不挤布局) */
.sidebar-nav a.active {
  background: var(--sidebar-active-bg);
  color: #ffffff;
  box-shadow: inset 3px 0 0 var(--gold);
}
.sidebar-logout {
  margin-top: 8px;
  border-top: 1px solid var(--sidebar-border);
  border-radius: 0 0 8px 8px;
}

.content {
  flex: 1 1 auto;
  min-width: 0;
  padding: 24px;
}

/* 登录/设置页(body.auth):无侧栏,内容居中 */
body.auth .content {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 10vh;
}
.auth-card { width: 100%; max-width: 360px; }
body.auth .flash { width: 100%; max-width: 360px; }

/* ---------- 卡片 ---------- */

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  padding: 16px 20px;
  margin-bottom: 16px;
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}
.card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-1px);
}

.card-title {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-heading);
}

/* 卡片头:标题 + 可选右侧动作位(如「查看 →」) */
.v5-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.v5-card-head .card-title { margin-bottom: 0; }
.v5-card-act {
  flex: none;
  font-size: 12px;
  color: var(--link);
  white-space: nowrap;
}

.page-title {
  margin: 0 0 16px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

/* 页头模式:h1 + 右侧主操作按钮同一行 */
.v5-pagehead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.v5-pagehead .page-title,
.v5-pagehead h1 { margin: 0; }
.v5-pagehead-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

/* ---------- 统计卡:大数字 + 小标签 + 左缘 4px 色条 ---------- */

.v5-stat {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  padding: 14px 18px 12px 22px;
  overflow: hidden;
}
.v5-stat::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--v5-stat-accent, var(--blue));
}
.v5-stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 2px;
  white-space: nowrap;
}
.v5-stat-value {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  word-break: break-all;
}
.v5-stat-sub { font-size: 12px; color: var(--text-faint); margin-top: 2px; }
/* 语义色条:收入绿 / 支出红 / 中性蓝 / 警示金 */
.v5-stat-green { --v5-stat-accent: var(--green); }
.v5-stat-red   { --v5-stat-accent: var(--red); }
.v5-stat-blue  { --v5-stat-accent: var(--blue); }
.v5-stat-gold  { --v5-stat-accent: var(--gold); }
/* 数字可跟语义色 */
.v5-stat-green .v5-stat-value { color: var(--green); }
.v5-stat-red .v5-stat-value   { color: var(--red); }

/* 一行统计卡容器(4 → 2 → 1 列) */
.v5-stat-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
@media (max-width: 1100px) {
  .v5-stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .v5-stat-row { grid-template-columns: 1fr; }
}

/* ---------- 按钮 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--input-border);
  border-radius: 8px;
  background: var(--btn-bg);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  line-height: 1.2;
  cursor: pointer;
  vertical-align: middle;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { background: var(--btn-hover); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}
.btn-primary:hover { background: var(--primary-press); border-color: var(--primary-press); }

.btn-danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #ffffff;
}
.btn-danger:hover { background: var(--danger-press); border-color: var(--danger-press); }

.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 6px; }

/* ---------- 表格 ---------- */

.table { width: 100%; border-collapse: collapse; background: var(--card-bg); }
.table th,
.table td {
  padding: 6px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.table td { height: 44px; }
.table th {
  height: 40px;
  background: var(--table-head-bg);
  color: var(--table-head-text);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.table tbody tr { transition: background 0.12s ease; }
.table tbody tr:nth-child(even) { background: var(--zebra); }
.table tbody tr:hover { background: var(--row-hover); }
.table tbody tr:last-child td { border-bottom: none; }

/* 圆角包裹 + 窄屏横向滚动容器(<table class="table"> 外套一层) */
.v5-tablewrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card-bg);
}
.v5-tablewrap .table { margin: 0; }
.card .v5-tablewrap { margin: 4px 0 8px; }

/* 金额列:右对齐 + 等宽数字(th/td 通用) */
.v5-num { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- 徽标(状态/优先级):胶囊,浅底深字成对变量 ---------- */

.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.7;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.badge-red    { background: var(--badge-red-bg);    color: var(--badge-red-fg); }
.badge-green  { background: var(--badge-green-bg);  color: var(--badge-green-fg); }
.badge-gray   { background: var(--badge-gray-bg);   color: var(--badge-gray-fg); }
.badge-orange { background: var(--badge-orange-bg); color: var(--badge-orange-fg); }
.v5-badge-blue { background: var(--badge-blue-bg);  color: var(--badge-blue-fg); }
.v5-badge-gold { background: var(--badge-gold-bg);  color: var(--badge-gold-fg); }

/* ---------- 表单 ---------- */

.form-row { margin-bottom: 12px; }
.form-row label {
  display: block;
  margin-bottom: 4px;
  color: var(--text-muted);
  font-size: 12px;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="month"],
input[type="search"],
select,
textarea {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--input-border);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  background: var(--input-bg);
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--ring);
}
textarea { resize: vertical; min-height: 60px; }

html[data-theme="dark"] input[type="date"],
html[data-theme="dark"] input[type="month"] { color-scheme: dark; }

/* 多控件横排(如快速添加/快速记账表单) */
.form-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-end;
}
.form-inline .form-row { margin-bottom: 0; }
.form-inline input,
.form-inline select { width: auto; }

.form-actions { margin-top: 16px; }

/* ---------- 提示条:左侧色条 + 图标符号 ---------- */

.flash {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: var(--flash-bg);
  color: var(--flash-text);
  border: 1px solid var(--flash-border);
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  padding: 9px 12px;
  margin-bottom: 12px;
}
.flash::before {
  content: "ⓘ";
  flex: none;
  font-weight: 700;
  opacity: 0.9;
}

/* ---------- 空态:居中金色小星 + 灰字 ---------- */

.v5-empty {
  padding: 40px 16px;
  text-align: center;
  color: var(--text-faint);
  font-size: 13px;
}
.v5-empty::before {
  content: "";
  display: block;
  width: 28px;
  height: 28px;
  margin: 0 auto 10px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23F5B237'%3E%3Cpath d='M12 2l2.6 7.4L22 12l-7.4 2.6L12 22l-2.6-7.4L2 12l7.4-2.6z'/%3E%3C/svg%3E")
    no-repeat center / contain;
}

/* ---------- 移动端:侧栏折叠为顶栏(可用即可,不做复杂响应式) ---------- */

@media (max-width: 768px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; flex: none; }
  .sidebar-brand { padding: 12px 16px 4px; }
  .sidebar-nav { display: flex; flex-direction: row; flex-wrap: wrap; padding: 4px 8px 8px; }
  .sidebar-nav a { padding: 8px 12px; margin: 0; }
  .sidebar-nav a.active { box-shadow: inset 0 -3px 0 var(--gold); }
  .sidebar-logout { margin-top: 0; border-top: none; margin-left: auto; border-radius: 8px; }
  .content { padding: 16px 12px; }
}

/* =========================================================
   任务页 2Do 风格(.t2-* 前缀,只追加不改上面既有类)
   —— 任务页已是标杆皮肤,本段保持原样不动。
   ========================================================= */

.t2-wrap { display: flex; gap: 16px; align-items: flex-start; }

/* ----- 左清单栏(约 210px 白底卡片) ----- */

.t2-lists {
  width: 210px;
  flex: 0 0 210px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  padding: 10px 8px;
}

.t2-list-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 6px;
  color: #0f172a;
  font-size: 14px;
}
.t2-list-item:hover { background: #f1f5f9; text-decoration: none; }
.t2-list-item.active { background: #dbeafe; color: #1d4ed8; }

.t2-icon { flex: none; width: 20px; text-align: center; }
.t2-list-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.t2-count { flex: none; margin-left: auto; color: #94a3b8; font-size: 12px; }

.t2-divider { border-top: 1px solid #e2e8f0; margin: 10px 4px; }
.t2-lists-label { padding: 0 10px 4px; font-size: 12px; color: #94a3b8; }

/* 项目色点:8 色盘(project 名 hash 固定取色) */
.t2-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; }
.t2-dot-0 { background: #2563eb; }
.t2-dot-1 { background: #16a34a; }
.t2-dot-2 { background: #dc2626; }
.t2-dot-3 { background: #f59e0b; }
.t2-dot-4 { background: #7c3aed; }
.t2-dot-5 { background: #0891b2; }
.t2-dot-6 { background: #db2777; }
.t2-dot-7 { background: #64748b; }

/* ----- 右任务区 ----- */

.t2-main { flex: 1 1 auto; min-width: 0; }

.t2-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.t2-heading { margin: 0; font-size: 20px; font-weight: 700; }
.t2-search input { width: 220px; }

/* 快速添加行 */
.t2-quick { padding: 10px 12px; }
.t2-quick-form { display: flex; gap: 8px; align-items: center; }
.t2-quick-title { flex: 1 1 auto; min-width: 0; }
.t2-quick-date { width: 150px; flex: none; }
.t2-quick-pri { width: 76px; flex: none; }

/* 任务列表卡片:行铺满、行间分隔线 */
.t2-tasks { padding: 4px 0; }

.t2-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px 10px 11px;
  border-bottom: 1px solid #f1f5f9;
  border-left: 3px solid transparent; /* 优先级色条(行左缘 3px) */
}
.t2-row:last-child { border-bottom: none; }
.t2-pri-2 { border-left-color: #dc2626; }
.t2-pri-1 { border-left-color: #f59e0b; }

.t2-inline-form { display: inline; margin: 0; }

/* 圆形勾选框:空心圆,hover 变蓝;完成态实心蓝 + 白勾 */
.t2-check {
  width: 20px;
  height: 20px;
  margin-top: 1px;
  padding: 0;
  border: 2px solid #cbd5e1;
  border-radius: 50%;
  background: #ffffff;
  color: transparent;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}
.t2-check:hover { border-color: #2563eb; }
.t2-check.checked {
  border-color: #2563eb;
  background: #2563eb;
  color: #ffffff;
}

.t2-body { flex: 1 1 auto; min-width: 0; }

.t2-row-title { word-break: break-all; }
.t2-done .t2-row-title { color: #94a3b8; text-decoration: line-through; }

.t2-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 12px;
  color: #64748b;
}
.t2-notes {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap; /* 备注截断一行 */
}
.t2-proj {
  flex: none;
  padding: 0 6px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 11px;
  line-height: 1.7;
  white-space: nowrap;
}

/* 右侧:截止日 chip + 星标 + 悬停操作 */
.t2-side { display: flex; align-items: center; gap: 8px; flex: none; }

.t2-chip {
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.6;
  white-space: nowrap;
}
.t2-chip-overdue { background: #dc2626; color: #ffffff; }
.t2-chip-today   { background: #f59e0b; color: #ffffff; }
.t2-chip-future  { background: #e2e8f0; color: #475569; }

.t2-star {
  padding: 0;
  border: none;
  background: none;
  color: #cbd5e1; /* 空心灰 */
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}
.t2-star:hover { color: #f59e0b; }
.t2-star.on { color: #f59e0b; } /* 实心金色 */

.t2-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  visibility: hidden; /* 悬停行时出现 */
}
.t2-row:hover .t2-actions { visibility: visible; }

.t2-act {
  padding: 0;
  border: none;
  background: none;
  color: #2563eb;
  font-size: 12px;
  cursor: pointer;
}
.t2-act:hover { text-decoration: underline; }
.t2-act-danger { color: #dc2626; }

/* 行内展开编辑表单 */
.t2-edit { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.t2-edit textarea { min-height: 48px; }
.t2-edit-row { display: flex; gap: 8px; }
.t2-edit-proj { flex: 1 1 auto; min-width: 0; }
.t2-edit-pri { width: 76px; flex: none; }
.t2-edit-date { width: 150px; flex: none; }
.t2-edit-btns { display: flex; gap: 8px; }

.t2-empty { padding: 36px 0; text-align: center; color: #94a3b8; }

/* 窄屏(<900px):左清单栏折叠为顶部横向滚动条 */
@media (max-width: 900px) {
  .t2-wrap { flex-direction: column; }
  .t2-lists {
    width: 100%;
    flex: none;
    display: flex;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
    padding: 8px;
  }
  .t2-list-item { flex: none; white-space: nowrap; }
  .t2-list-name { overflow: visible; }
  .t2-count { margin-left: 4px; }
  .t2-divider {
    border-top: none;
    border-left: 1px solid #e2e8f0;
    align-self: stretch;
    margin: 0 6px;
  }
  .t2-lists-label { display: none; }
  .t2-head { flex-wrap: wrap; }
  .t2-quick-form { flex-wrap: wrap; }
  .t2-quick-title { flex: 1 1 100%; }
}

/* ---- 任务页 2Do 组件:变量重宣(浅色页面用;任务页本身恒深已覆盖) ---- */

.t2-lists { background: var(--card-bg); box-shadow: var(--card-shadow); }
.t2-list-item { color: var(--text); }
.t2-list-item:hover { background: var(--hover-soft); }
.t2-list-item.active { background: var(--active-bg); color: var(--active-text); }
.t2-count { color: var(--text-faint); }
.t2-divider { border-top-color: var(--border); }
.t2-lists-label { color: var(--text-faint); }
.t2-row { border-bottom-color: var(--border-soft); }
.t2-check { border-color: var(--input-border); background: var(--card-bg); color: transparent; }
.t2-check:hover { border-color: #2563eb; }
.t2-check.checked { border-color: #2563eb; background: #2563eb; color: #ffffff; }
.t2-done .t2-row-title { color: var(--text-faint); }
.t2-sub { color: var(--text-muted); }
.t2-proj { background: var(--chip-bg); color: var(--text-muted); }
.t2-chip-future { background: var(--chip2-bg); color: var(--chip2-text); }
.t2-empty { color: var(--text-faint); }
@media (max-width: 900px) {
  .t2-divider { border-left-color: var(--border); }
}

/* ---- v5 护栏:任务页恒深皮肤不吃 v5 卡片描边/浮起 ---- */

.t2-wrap .card { border: none; }
.t2-wrap .card:hover { transform: none; box-shadow: var(--card-shadow); }

/* ---- 侧栏底部工具区:全局搜索框 + 🌓 切换按钮 ---- */

.sidebar-tools {
  margin-top: auto;             /* 钉在侧栏底部 */
  padding: 12px 16px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--sidebar-border);
}
.sidebar-search { flex: 1 1 auto; min-width: 0; margin: 0; }
.sidebar-search input,
.sidebar-search input[type="search"] {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--sidebar-border);
  border-radius: 6px;
  background: var(--sidebar-hover);
  color: #e2e8f0;
  font-size: 13px;
}
.sidebar-search input::placeholder { color: #94a3b8; }
.sidebar-search input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25);
}

.theme-toggle {
  flex: none;
  padding: 5px 8px;
  border: 1px solid var(--sidebar-border);
  border-radius: 6px;
  background: none;
  color: var(--sidebar-text);
  font-size: 15px;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.15s ease;
}
.theme-toggle:hover { background: var(--sidebar-hover); }

@media (max-width: 768px) {
  .sidebar-tools { margin-top: 0; padding: 8px 12px; }
}


/* ---------- 银行 logo 徽章(品牌色圆形字标) ---------- */
.bank-logo {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%;
  color: #fff; font-size: 11px; font-weight: 700;
  vertical-align: -4px; margin-right: 4px; flex: none;
  background: #64748b; box-shadow: inset 0 0 0 1px rgba(255,255,255,.25);
}
.bank-logo[data-bank^="招商"] { background: #c8102e; }
.bank-logo[data-bank^="工商"] { background: #c7000b; }
.bank-logo[data-bank^="建设"] { background: #0066b3; }
.bank-logo[data-bank^="农业"] { background: #009e73; }
.bank-logo[data-bank^="中国银行"], .bank-logo[data-bank="中国银行"] { background: #a71e32; }
.bank-logo[data-bank^="交通"] { background: #003d7e; }
.bank-logo[data-bank^="邮储"] { background: #007a3d; }
.bank-logo[data-bank^="中信"] { background: #d5001c; }
.bank-logo[data-bank^="光大"] { background: #6f2c91; }
.bank-logo[data-bank^="民生"] { background: #009490; }
.bank-logo[data-bank^="平安"] { background: #ff6600; }
.bank-logo[data-bank^="兴业"] { background: #0f5ba5; }
.bank-logo[data-bank^="浦发"] { background: #003882; }
.bank-logo[data-bank^="广发"] { background: #e60012; }
.bank-logo[data-bank^="华夏"] { background: #cf0a2c; }
.bank-logo[data-bank^="厦门"] { background: #1e6bb8; }
.bank-logo[data-bank^="花呗"], .bank-logo[data-bank^="蚂蚁"] { background: #1677ff; }
.fin-cc .bank-logo { width: 22px; height: 22px; font-size: 12px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.5); }
