:root {
  --bg: #f3f5f8;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --line: #e3e8ef;
  --line-strong: #cfd6e0;
  --ink: #172033;
  --ink-2: #3d475c;
  --muted: #6b7588;
  --primary: #1e5eff;
  --primary-ink: #ffffff;
  --primary-soft: #e8efff;
  --navy: #1e3a5f;
  --green: #1f9d55;
  --green-soft: #e3f5eb;
  --orange: #f08c00;
  --orange-soft: #fff1dc;
  --red: #d64545;
  --red-soft: #fdeaea;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --shadow-lg: 0 20px 40px -12px rgba(16, 24, 40, .25);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 14px;
  border: 1px solid var(--line-strong); border-radius: 8px;
  background: var(--surface); color: var(--ink-2);
  cursor: pointer; white-space: nowrap; font-weight: 500;
  transition: background .12s, border-color .12s, color .12s;
}
.btn:hover { background: var(--surface-2); border-color: #b9c2cf; }
.btn:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { background: #1a51dd; border-color: #1a51dd; }
.btn-danger { color: var(--red); border-color: #f0c2c2; }
.btn-danger:hover { background: var(--red-soft); border-color: #e8a5a5; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: rgba(255,255,255,.12); border-color: transparent; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn-block { width: 100%; height: 42px; font-size: 15px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.plus { font-size: 18px; line-height: 1; margin-top: -2px; }
.icon-btn {
  width: 30px; height: 30px; display: inline-grid; place-items: center;
  border: 1px solid transparent; border-radius: 7px; background: transparent;
  color: var(--muted); cursor: pointer; flex: none;
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--line); color: var(--ink); }
.icon-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- 登录 ---------- */
.login { min-height: 100%; display: grid; place-items: center; padding: 24px 16px; background: linear-gradient(160deg, #1e3a5f 0%, #14263f 100%); }
.login-card { width: 100%; max-width: 360px; background: var(--surface); border-radius: 14px; padding: 32px 28px; box-shadow: var(--shadow-lg); display: grid; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; letter-spacing: .02em; }
.brand-lg { font-size: 20px; margin-bottom: 8px; color: var(--navy); }
.brand-mark { width: 22px; height: 22px; border-radius: 6px; background: var(--navy); position: relative; flex: none; }
.brand-mark::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: #34c27a; }
.topbar .brand-mark { background: rgba(255,255,255,.15); }

/* ---------- 表单 ---------- */
.field { display: grid; gap: 6px; min-width: 0; }
.field > span { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.field input, .field textarea, .field select, .dates-tools input {
  width: 100%; height: 38px; padding: 0 11px;
  border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface);
  transition: border-color .12s, box-shadow .12s;
}
.field textarea { height: auto; min-height: 76px; padding: 9px 11px; resize: vertical; line-height: 1.5; }
.field input:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); outline: none; }
.field.invalid input, .field.invalid textarea { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.field .hint { font-size: 12px; color: var(--muted); }
.field .hint.err { color: var(--red); font-weight: 500; }
.form-error { margin: 0; padding: 8px 11px; border-radius: 8px; background: var(--red-soft); color: var(--red); font-size: 13px; }
.mono { font-family: var(--mono); font-size: 13px; }

.seg { justify-self: start; display: inline-flex; padding: 3px; gap: 3px; background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 9px; }
.seg button { height: 30px; padding: 0 14px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; font-weight: 500; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.seg button.on.good { color: var(--green); }
.seg button.on.warn { color: var(--orange); }

/* ---------- 布局 ---------- */
.app { min-height: 100%; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  height: 58px; padding: 0 20px;
  background: var(--navy); color: #fff;
}
.topbar .btn-ghost { color: #fff; }
.search { flex: 1; max-width: 560px; margin-left: 16px; position: relative; }
.search svg { position: absolute; left: 11px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); fill: none; stroke: #9fb0c8; stroke-width: 2; stroke-linecap: round; }
.search input {
  width: 100%; height: 38px; padding: 0 12px 0 34px;
  border: 1px solid rgba(255,255,255,.14); border-radius: 9px;
  background: rgba(255,255,255,.1); color: #fff;
}
.search input::placeholder { color: #9fb0c8; }
.search input:focus { background: #fff; color: var(--ink); outline: none; border-color: #fff; }
.topbar #btnImport { margin-left: auto; }
.btn-import { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.18); color: #fff; }
.btn-import:hover { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.28); }
.btn-import svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* 批量导入 */
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 12px; }
.im-defaults { border: 1px solid var(--line); border-radius: 8px; padding: 0 12px; }
.im-defaults summary { cursor: pointer; padding: 9px 0; font-size: 13px; color: var(--ink-2); font-weight: 500; }
.im-defaults[open] { padding-bottom: 12px; }
.im-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; margin-bottom: 6px; }
.im-list { border: 1px solid var(--line); border-radius: 8px; max-height: 280px; overflow-y: auto; }
.im-row { display: grid; grid-template-columns: 22px 78px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 7px 10px; border-bottom: 1px solid var(--line); font-size: 13px; }
.im-row:last-child { border-bottom: 0; }
.im-row.off { color: var(--muted); background: var(--surface-2); }
.im-row input { width: 16px; height: 16px; margin: 0; }
.im-code { font-weight: 600; font-variant-numeric: tabular-nums; }
.im-info { font-family: var(--mono); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.im-tag { font-size: 11.5px; padding: 0 7px; border-radius: 5px; white-space: nowrap; }
.im-tag.warn { background: var(--orange-soft); color: #b36800; }
.im-tag.bad { background: var(--red-soft); color: var(--red); }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: #34c27a; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.menu { position: relative; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 6px); min-width: 150px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-lg); padding: 5px; z-index: 30; }
.menu-pop button { display: block; width: 100%; text-align: left; padding: 8px 11px; border: 0; background: transparent; border-radius: 7px; cursor: pointer; }
.menu-pop button:hover { background: var(--surface-2); }

.layout { flex: 1; display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 0; }
.dates { border-right: 1px solid var(--line); background: var(--surface); padding: 14px 10px; position: sticky; top: 58px; height: calc(100vh - 58px); overflow-y: auto; }
.dates-tools { display: flex; gap: 6px; padding: 0 4px 12px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.dates-tools input { height: 30px; font-size: 13px; padding: 0 8px; }
.date-list { display: grid; gap: 2px; }
.date-item {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 8px;
  padding: 9px 11px; border-radius: 8px; border: 0; background: transparent; text-align: left; cursor: pointer; width: 100%;
}
.date-item:hover { background: var(--surface-2); }
.date-item.on { background: var(--primary-soft); }
.date-item.on .d-main { color: var(--primary); }
.d-main { font-weight: 600; }
.d-week { color: var(--muted); font-weight: 400; font-size: 12px; margin-left: 4px; }
.d-count { font-size: 12px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; }
.date-item.on .d-count { background: #fff; }
.d-profit { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }
.date-empty { padding: 16px 12px; color: var(--muted); font-size: 13px; }

.main { padding: 22px 28px 60px; min-width: 0; }
.main-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.main-head h1 { margin: 0; font-size: 20px; letter-spacing: .01em; }
.main-head p { margin: 2px 0 0; }
.date-nav { display: flex; gap: 6px; }
.date-nav .btn { width: 34px; padding: 0; font-size: 18px; }

/* ---------- 列表 ---------- */
.list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); max-width: 880px; }
.row {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 14px 18px; border: 0; border-bottom: 1px solid var(--line);
  background: transparent; text-align: left; cursor: pointer;
}
.row:last-child { border-bottom: 0; }
.row:hover { background: var(--surface-2); }
.row.active { background: var(--primary-soft); }
.dot { width: 11px; height: 11px; border-radius: 50%; flex: none; }
.dot.done { background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.dot.todo { background: var(--orange); box-shadow: 0 0 0 3px var(--orange-soft); }
.row-code { font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; }
.row-date { font-size: 12px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px; }
.row-profit { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; font-size: 15px; }
.row-profit small { font-weight: 400; color: var(--muted); font-size: 12px; margin-right: 6px; }
.pos { color: var(--green); }
.neg { color: var(--red); }
.chev { color: #b0b8c6; flex: none; }
.empty { padding: 48px 20px; text-align: center; color: var(--muted); }
.empty .btn { margin-top: 12px; }

/* ---------- 抽屉 ---------- */
.mask { position: fixed; inset: 0; background: rgba(15, 23, 42, .35); z-index: 40; }
.mask-top { z-index: 60; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 50;
  width: min(640px, 100vw); background: var(--bg);
  display: flex; flex-direction: column; box-shadow: var(--shadow-lg);
  animation: slideIn .18s ease-out;
}
@keyframes slideIn { from { transform: translateX(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.drawer-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: var(--surface); border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; font-size: 18px; display: flex; align-items: center; gap: 10px; min-width: 0; }
.drawer-head .actions { margin-left: auto; display: flex; gap: 8px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 18px 28px; display: grid; gap: 14px; align-content: start; }
.drawer-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 18px; background: var(--surface); border-top: 1px solid var(--line); }
.drawer-foot .left { margin-right: auto; }
.banner { padding: 10px 12px; border-radius: 8px; background: var(--orange-soft); color: #8a5300; font-size: 13px; display: flex; gap: 10px; align-items: center; }
.banner .btn { margin-left: auto; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 11px 16px; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 13.5px; }
.card-head .muted { font-weight: 400; font-size: 12.5px; }
.card-body { padding: 14px 16px; }
.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; }
.kv > div { min-width: 0; }
.kv dt { font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.kv dd { margin: 0; font-weight: 500; word-break: break-all; }
.kv .full { grid-column: 1 / -1; }
.kv .calc dd { color: var(--navy); }
.calc-tag { font-size: 10.5px; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; margin-left: 4px; font-weight: 400; vertical-align: 1px; }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; padding: 1px 9px; border-radius: 999px; font-weight: 500; }
.pill.paid { background: var(--green-soft); color: var(--green); }
.pill.unpaid { background: var(--orange-soft); color: #b36800; }

.summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.summary > div { padding: 14px 16px; border-right: 1px solid var(--line); }
.summary > div:last-child { border-right: 0; }
.summary dt { font-size: 12px; color: var(--muted); }
.summary dd { margin: 2px 0 0; font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.summary .formula { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

.seg-list { display: grid; gap: 6px; }
.secret-row { display: flex; align-items: center; gap: 8px; padding: 7px 8px 7px 11px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; min-width: 0; }
.secret-row .label { font-size: 12px; color: var(--muted); flex: none; width: 44px; }
.secret-row .val { flex: 1; min-width: 0; font-family: var(--mono); font-size: 13px; word-break: break-all; }
.secret-row .idx { font-size: 12px; color: var(--muted); flex: none; min-width: 22px; font-variant-numeric: tabular-nums; }
.meta { font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 0 2px; }

/* 编辑表单 */
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.grid2 .full { grid-column: 1 / -1; }
.readout { height: 38px; display: flex; align-items: center; padding: 0 11px; border-radius: 8px; background: var(--surface-2); border: 1px dashed var(--line-strong); font-weight: 600; font-variant-numeric: tabular-nums; color: var(--navy); }
.key-edit { display: grid; gap: 6px; }
.key-line { display: flex; gap: 6px; align-items: center; }
.key-line .idx { width: 26px; text-align: right; font-size: 12px; color: var(--muted); flex: none; font-variant-numeric: tabular-nums; }
.key-line input { flex: 1; min-width: 0; height: 34px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 7px; font-family: var(--mono); font-size: 13px; }
.key-line input:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px var(--primary-soft); }
.key-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.bulk { display: grid; gap: 8px; padding: 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; }
.bulk textarea { width: 100%; min-height: 110px; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 7px; font-family: var(--mono); font-size: 13px; resize: vertical; }

/* ---------- 弹窗 ---------- */
.modal {
  position: fixed; z-index: 70; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(460px, calc(100vw - 32px)); max-height: calc(100vh - 48px);
  background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; overflow: hidden;
}
.modal.wide { width: min(760px, calc(100vw - 32px)); }
.modal-head { padding: 16px 20px 0; font-weight: 700; font-size: 16px; display: flex; align-items: center; justify-content: space-between; }
.modal-body { padding: 12px 20px; overflow-y: auto; display: grid; gap: 12px; }
.modal-body p { margin: 0; color: var(--ink-2); }
.modal-foot { padding: 12px 20px 16px; display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }

.logs { display: grid; }
.log { padding: 10px 2px; border-bottom: 1px solid var(--line); display: grid; gap: 3px; }
.log:last-child { border-bottom: 0; }
.log-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.log-act { font-size: 12px; padding: 0 7px; border-radius: 5px; font-weight: 600; }
.log-act.create { background: var(--green-soft); color: var(--green); }
.log-act.update { background: var(--primary-soft); color: var(--primary); }
.log-act.delete { background: var(--red-soft); color: var(--red); }
.log-act.restore { background: var(--orange-soft); color: #b36800; }
.log-time { margin-left: auto; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.log-changes { font-size: 12.5px; color: var(--ink-2); padding-left: 2px; }
.log-changes span { display: inline-block; margin-right: 14px; }
.log-changes b { font-weight: 500; color: var(--muted); }

/* ---------- 提示 ---------- */
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 90; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { background: #1f2937; color: #fff; padding: 9px 16px; border-radius: 9px; box-shadow: var(--shadow-lg); font-size: 13.5px; animation: toastIn .2s ease-out; max-width: calc(100vw - 32px); }
.toast.error { background: var(--red); }
@keyframes toastIn { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- 手机 ---------- */
@media (max-width: 760px) {
  .topbar { padding: 0 12px; gap: 8px; }
  .brand-text, .hide-sm { display: none; }
  .search { margin-left: 4px; }
  .topbar #btnNew, .topbar #btnImport { width: 38px; padding: 0; }
  .topbar #btnImport { margin-left: 0; }
  .grid3 { grid-template-columns: 1fr; }
  .im-row { grid-template-columns: 22px 70px minmax(0, 1fr); }
  .im-row .im-tag { grid-column: 3; justify-self: start; }
  .layout { grid-template-columns: 1fr; align-content: start; }
  .dates { position: sticky; top: 58px; z-index: 10; height: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px 16px; display: grid; gap: 8px; overflow: hidden; }
  .dates-tools { padding: 0; border: 0; margin: 0; }
  .dates-tools input { max-width: 170px; }
  .date-list { display: flex; overflow-x: auto; gap: 6px; scrollbar-width: none; }
  .date-item { width: auto; flex: none; grid-template-columns: auto auto; padding: 5px 10px; border: 1px solid var(--line); }
  .d-profit, .d-week { display: none; }
  .main { padding: 16px 16px 48px; }
  .main-head h1 { font-size: 18px; }
  .row { padding: 14px; }
  .kv, .grid2 { grid-template-columns: 1fr 1fr; gap: 10px 12px; }
  .summary dd { font-size: 17px; }
  .drawer-head, .drawer-body, .drawer-foot { padding-left: 14px; padding-right: 14px; }
}
@media (max-width: 420px) {
  .kv, .grid2 { grid-template-columns: 1fr; }
  .summary > div { padding: 12px 10px; }
}

/* OpenAI 卡片 */
.oa-line { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.oa-spend { font-size: 18px; font-weight: 650; }
.key-once { word-break: break-all; padding: 10px 12px; background: var(--bg); border-radius: 8px; }

/* 账号管理：沿用当前主题变量与列表、抽屉、表单结构。 */
.manager-tools { max-width: 1000px; margin-bottom: 14px; display: grid; gap: 10px; }
.manager-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.manager-filters .field { min-width: 0; }
.manager-filters input, .manager-filters select { width: 100%; min-width: 0; }
select { height: 36px; border: 1px solid var(--line-strong); border-radius: 8px; padding: 0 9px; background: var(--surface); color: var(--ink); }
.manager-list-tools, .manager-bulk, .manager-task-strip, .manager-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.manager-list-tools { font-size: 12.5px; }
.manager-list-tools > .muted { margin-right: auto; }
.check-line { display: flex; align-items: center; gap: 7px; font-size: 13px; cursor: pointer; line-height: 1.5; }
.check-line input, [data-mselect], [data-bulk-field] { width: 16px; height: 16px; flex: none; accent-color: var(--primary); }
.manager-summary-options { position: relative; }
.manager-summary-options summary { cursor: pointer; color: var(--ink-2); padding: 5px; }
.manager-summary-options > div { display: grid; gap: 8px; min-width: 180px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px; position: absolute; right: 0; top: 100%; z-index: 15; }
.manager-bulk { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--primary-soft); }
.manager-bulk b { color: var(--primary); font-size: 13px; }
.manager-task-strip { padding: 8px 0; }
.manager-task-strip .btn { max-width: 100%; white-space: normal; height: auto; min-height: 30px; text-align: left; }
.list { max-width: 1000px; }
.account-list-item { display: flex; align-items: center; border-bottom: 1px solid var(--line); padding-left: 14px; }
.account-list-item:last-child { border-bottom: 0; }
.account-list-item.active { background: var(--primary-soft); }
.account-list-item > .row { border-bottom: 0; flex: 1; min-width: 0; }
.account-list-item > input { margin: 0; }
.manager-row-content { min-width: 0; flex: 1; }
.manager-row-summary { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 4px; color: var(--muted); font-size: 12px; font-weight: 400; }
.manager-row-summary > span { overflow: hidden; overflow-wrap: anywhere; }
.manager-row-email { flex-basis: 100%; }
.account-list-item .row-profit { white-space: nowrap; flex: none; }
.manager-help, .manager-note { color: var(--muted); font-size: 12.5px; line-height: 1.6; margin: 10px 0 0; overflow-wrap: anywhere; }
.manager-kv { margin: 16px 0 0; }
.manager-kv dd small { display: block; margin-top: 3px; color: var(--muted); font-size: 11.5px; font-weight: 400; }
.manager-credit-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 6px; font-size: 12px; color: var(--muted); }
.manager-warning { padding: 9px 11px; background: var(--orange-soft); color: var(--ink-2); border: 1px solid var(--orange); border-radius: 8px; font-size: 12.5px; line-height: 1.6; overflow-wrap: anywhere; }
.manager-totp { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 14px; display: grid; gap: 10px; }
.manager-totp b { font-size: 13px; }
.manager-totp .manager-note { margin-top: 3px; }
.manager-code-line { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.manager-code-line code { font-family: var(--mono); color: var(--primary); font-size: 23px; font-weight: 700; letter-spacing: .12em; }
.manager-code-line .muted { font-size: 12px; }
.manager-task-status { color: var(--ink); }
.manager-task-logs { max-height: 300px; overflow: auto; margin: 0; padding: 0 0 0 20px; font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; color: var(--ink-2); }
#managerOAuthControls { display: grid; gap: 10px; }
#managerOAuthControls .btn { justify-self: start; text-decoration: none; }
.manager-bulk-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.manager-bulk-fields .field > span { display: flex; align-items: center; gap: 4px; }
.manager-detail .form-error { margin-top: 10px; }
.manager-tools .btn, .manager-detail .btn, .manager-credit-meta .btn { transition: background-color .15s, border-color .15s; }
.manager-tools input::placeholder, #managerDialogBody input::placeholder { color: var(--muted); opacity: 1; }
.manager-tools input, #managerDialogBody input, #managerDialogBody textarea { caret-color: var(--primary); }
.manager-tools ::selection, .manager-detail ::selection, #managerDialogBody ::selection { background: var(--primary-soft); color: var(--ink); }
#managerDialogBody .field input, #managerDialogBody .field textarea, #managerDialogBody .field select { width: 100%; min-width: 0; }
.manager-detail .card-head { color: var(--ink); }
.manager-detail .card-head > span { color: var(--primary); }
.drawer-head h2 { overflow-wrap: anywhere; }
@media (max-width: 1100px) { .manager-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .manager-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .manager-list-tools { gap: 8px 10px; }
  .account-list-item { padding-left: 10px; }
  .account-list-item .row { gap: 9px; padding: 12px 10px; }
  .manager-row-summary { display: grid; gap: 2px; }
  .account-list-item .row-profit { font-size: 14px; }
  .account-list-item .row-profit small { display: block; text-align: right; margin: 0; font-size: 11px; }
  #managerDialogBody input, #managerDialogBody textarea, #managerDialogBody select, .manager-filters input, .manager-filters select { font-size: 16px; }
  .manager-row-email { max-width: 44vw; text-overflow: ellipsis; white-space: nowrap; }
}
@media (max-width: 420px) {
  .manager-bulk-fields { grid-template-columns: 1fr; }
  .account-list-item .chev { display: none; }
  .manager-list-tools > .muted { flex-basis: calc(100% - 100px); }
  .manager-actions .btn { height: auto; min-height: 34px; white-space: normal; padding-top: 6px; padding-bottom: 6px; }
}
@media (prefers-reduced-motion: reduce) { .drawer, .toast { animation: none; } .manager-tools .btn, .manager-detail .btn { transition: none; } }
