:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-soft: #fafbfc;
  --ink: #20232d;
  --ink-2: #4e5565;
  --muted: #8a91a1;
  --line: #e9ebf0;
  --line-strong: #dfe3ea;
  --accent: #f34f68;
  --accent-dark: #df3e57;
  --accent-soft: #fff0f3;
  --green: #16866b;
  --green-soft: #eaf7f2;
  --red: #e14c5f;
  --red-soft: #fff0f2;
  --amber: #ad7418;
  --amber-soft: #fff7e8;
  --blue: #4c6fff;
  --blue-soft: #eef2ff;
  --shadow: 0 1px 2px rgba(28, 33, 43, .02), 0 5px 20px rgba(28, 33, 43, .035);
  --shadow-lg: 0 24px 80px rgba(24, 29, 40, .16);
  --radius: 16px;
  --sidebar: 232px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--bg); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; font-size: 14px; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button, select { cursor: pointer; }
button { border: 0; }
a { color: inherit; }
svg { display: block; }
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.svg-sprite { width: 0; height: 0; position: absolute; overflow: hidden; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.app-shell { min-height: 100vh; }
.sidebar { width: var(--sidebar); background: var(--surface); border-right: 1px solid var(--line); position: fixed; inset: 0 auto 0 0; z-index: 40; padding: 26px 16px 18px; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 10px; background: transparent; text-align: left; }
.brand-mark { width: 37px; height: 37px; border-radius: 11px; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, #ff687d, #ee405b); box-shadow: 0 7px 16px rgba(243, 79, 104, .24); }
.brand-mark svg { width: 26px; height: 26px; }
.brand strong { display: block; font-size: 20px; line-height: 1.1; letter-spacing: .12em; }
.brand small { display: block; margin-top: 5px; color: var(--muted); font-size: 8px; letter-spacing: .15em; font-weight: 700; }
.workspace-switch { margin: 28px 4px 24px; padding: 11px; border: 1px solid var(--line); border-radius: 12px; display: flex; align-items: center; gap: 9px; background: var(--surface-soft); }
.workspace-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: #eceef4; color: #596173; font-size: 12px; font-weight: 700; }
.workspace-switch strong, .workspace-switch small { display: block; }
.workspace-switch strong { font-size: 12px; font-weight: 650; }
.workspace-switch small { font-size: 10px; color: var(--muted); margin-top: 3px; }
.workspace-switch > .icon { margin-left: auto; width: 13px; color: var(--muted); }
.nav-label { color: #a0a6b2; font-size: 10px; font-weight: 700; letter-spacing: .12em; margin: 0 12px 9px; }
.main-nav { display: grid; gap: 5px; }
.nav-item { width: 100%; height: 44px; padding: 0 13px; display: flex; align-items: center; gap: 11px; border-radius: 10px; background: transparent; color: #616879; text-align: left; font-size: 13px; transition: .18s ease; }
.nav-item:hover { background: #f7f7f9; color: var(--ink); }
.nav-item.active { color: var(--accent-dark); background: var(--accent-soft); font-weight: 650; }
.nav-item.active::before { content: ""; width: 3px; height: 17px; background: var(--accent); border-radius: 4px; position: absolute; left: 0; }
.nav-item .icon { width: 18px; }
.nav-count { margin-left: auto; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 10px; display: grid; place-items: center; background: #eff1f5; color: #777f90; font-size: 10px; }
.nav-item.active .nav-count { background: #ffdae1; color: var(--accent-dark); }
.sidebar-bottom { margin-top: auto; }
.local-card { margin: 16px 3px; padding: 14px; border-radius: 12px; background: #f7f8fa; border: 1px solid #eff0f3; }
.local-card-title { font-size: 11px; font-weight: 650; display: flex; align-items: center; gap: 7px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #30ad83; box-shadow: 0 0 0 3px #def4eb; }
.local-card p { color: var(--muted); font-size: 10px; line-height: 1.65; margin: 9px 0; }
.text-button { display: inline-flex; align-items: center; gap: 5px; background: transparent; color: var(--ink-2); font-size: 12px; padding: 0; font-weight: 600; }
.text-button:hover { color: var(--accent); }
.text-button .icon { width: 14px; height: 14px; }
.local-card .text-button { font-size: 11px; color: var(--accent-dark); }
.sidebar-help { display: flex; align-items: center; gap: 9px; width: 100%; padding: 10px 13px; background: transparent; color: var(--muted); font-size: 11px; }
.sidebar-help:hover { color: var(--ink); }
.sidebar-help .icon { width: 16px; }
.sidebar-scrim { display: none; }

.main-shell { margin-left: var(--sidebar); min-width: 0; }
.topbar { height: 70px; padding: 0 32px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 20px; position: sticky; top: 0; z-index: 30; }
.topbar-left, .topbar-actions { display: flex; align-items: center; }
.topbar-actions { gap: 10px; }
.breadcrumb { display: flex; align-items: center; gap: 8px; white-space: nowrap; font-size: 12px; color: var(--muted); }
.breadcrumb strong { color: var(--ink-2); font-weight: 600; }
.breadcrumb .icon { width: 12px; height: 12px; color: #b1b6c0; }
.global-search { width: 226px; height: 36px; padding: 0 10px; display: flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: #f8f9fb; border-radius: 9px; color: var(--muted); }
.global-search:focus-within { border-color: #f6b2bd; box-shadow: 0 0 0 3px var(--accent-soft); background: #fff; }
.global-search .icon { width: 15px; }
.global-search input { border: 0; outline: 0; background: transparent; min-width: 0; width: 100%; font-size: 11px; color: var(--ink); }
.global-search input::placeholder { color: #9ca2af; }
.global-search kbd { font-family: inherit; border: 1px solid #e1e4ea; border-radius: 4px; padding: 1px 4px; color: #9da3af; font-size: 9px; white-space: nowrap; background: #fff; }
.button { height: 38px; padding: 0 15px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border-radius: 9px; font-size: 12px; font-weight: 600; white-space: nowrap; transition: .18s ease; }
.button .icon { width: 16px; height: 16px; }
.button-primary { background: var(--accent); color: #fff; box-shadow: 0 3px 8px rgba(243, 79, 104, .16); }
.button-primary:hover { background: var(--accent-dark); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(243, 79, 104, .22); }
.button-secondary { background: #fff; color: var(--ink-2); border: 1px solid var(--line-strong); }
.button-secondary:hover { border-color: #cbd0d9; background: #fafbfc; }
.button-danger { color: var(--red); background: var(--red-soft); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #5f6675; background: #eef0f4; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); font-weight: 650; font-size: 12px; margin-left: 3px; }
.icon-button { width: 34px; height: 34px; border-radius: 9px; background: transparent; display: grid; place-items: center; color: var(--muted); }
.icon-button:hover { background: #f3f4f7; color: var(--ink); }
.mobile-menu { display: none; }

.main-content { max-width: 1600px; margin: 0 auto; padding: 30px 32px 48px; }
.view { display: none; animation: viewIn .28s ease; }
.view.active { display: block; }
@keyframes viewIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 25px; }
.page-heading h1 { font-size: 25px; letter-spacing: -.03em; margin: 3px 0 7px; line-height: 1.25; }
.page-heading p:not(.eyebrow) { color: var(--muted); margin: 0; font-size: 12px; }
.eyebrow { margin: 0; font-size: 9px; font-weight: 750; letter-spacing: .14em; color: #9ba2b0; text-transform: uppercase; }
.heading-actions { display: flex; gap: 9px; align-items: center; }
.select { height: 38px; min-width: 108px; border: 1px solid var(--line-strong); background: #fff; color: var(--ink-2); border-radius: 9px; padding: 0 30px 0 12px; outline: none; font-size: 12px; }
.select:focus { border-color: #f4a5b2; box-shadow: 0 0 0 3px var(--accent-soft); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-header { padding: 21px 22px 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.card-header h2 { font-size: 14px; margin: 0 0 5px; letter-spacing: -.01em; }
.card-header p { color: var(--muted); font-size: 10px; margin: 0; }
.segmented { display: inline-flex; background: #f3f4f7; padding: 3px; border-radius: 8px; }
.segmented button { padding: 5px 10px; border-radius: 6px; background: transparent; font-size: 10px; color: var(--muted); }
.segmented button.active { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(30, 36, 48, .08); font-weight: 600; }

.metrics-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; margin-bottom: 16px; }
.metric-card { padding: 19px 20px 16px; position: relative; overflow: hidden; min-height: 137px; }
.metric-top { display: flex; justify-content: space-between; align-items: center; }
.metric-label { color: var(--ink-2); font-size: 11px; display: flex; align-items: center; gap: 7px; }
.metric-label .icon { width: 15px; height: 15px; color: var(--muted); }
.metric-badge { display: inline-flex; align-items: center; gap: 2px; font-size: 10px; font-weight: 650; border-radius: 5px; padding: 3px 6px; }
.metric-badge.up { color: var(--green); background: var(--green-soft); }
.metric-badge.down { color: var(--red); background: var(--red-soft); }
.metric-badge.neutral { color: var(--muted); background: #f3f4f6; }
.metric-value { margin-top: 13px; font-size: 27px; font-weight: 720; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.metric-bottom { margin-top: 9px; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.metric-bottom > span { color: var(--muted); font-size: 9px; line-height: 1.5; }
.mini-spark { width: 76px; height: 25px; overflow: visible; }

.overview-grid { display: grid; grid-template-columns: minmax(0, 1.95fr) minmax(280px, .85fr); gap: 16px; margin-bottom: 16px; }
.trend-card { min-width: 0; }
.chart-summary { padding: 16px 23px 0; display: flex; align-items: baseline; gap: 11px; }
.chart-summary strong { font-size: 24px; letter-spacing: -.04em; }
.chart-summary span { color: var(--muted); font-size: 10px; }
.chart-summary .positive { color: var(--green); font-weight: 600; }
.chart-summary .negative { color: var(--red); font-weight: 600; }
.chart-container { height: 248px; padding: 5px 16px 14px 10px; position: relative; }
.line-chart { width: 100%; height: 100%; overflow: visible; }
.chart-grid { stroke: #eef0f3; stroke-width: 1; }
.chart-axis-text { fill: #969daa; font-size: 9px; font-family: inherit; }
.chart-line { fill: none; stroke: var(--accent); stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; }
.chart-area { fill: url(#areaGradient); }
.chart-point { fill: #fff; stroke: var(--accent); stroke-width: 2; transition: r .15s; }
.chart-hit { fill: transparent; cursor: crosshair; }
.chart-hit:hover + .chart-point { r: 5px; }
.chart-focus-line { stroke: #f5c4cc; stroke-width: 1; stroke-dasharray: 3 3; pointer-events: none; }
.chart-tooltip { position: absolute; z-index: 4; min-width: 122px; pointer-events: none; background: rgba(32, 35, 45, .94); color: #fff; padding: 10px 12px; border-radius: 9px; box-shadow: 0 8px 25px rgba(20, 25, 35, .16); font-size: 10px; opacity: 0; transform: translate(-50%, -100%) translateY(-9px); transition: opacity .1s; }
.chart-tooltip strong { display: block; font-size: 10px; margin-bottom: 5px; }
.chart-tooltip span { color: #d5d8e0; }
.chart-tooltip b { color: #fff; font-size: 14px; margin-left: 5px; }
.highlights-card { min-width: 0; }
.highlight-list { padding: 14px 20px 6px; }
.highlight-item { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid #f0f1f4; cursor: pointer; }
.highlight-item:last-child { border: 0; }
.highlight-item:hover .highlight-title { color: var(--accent); }
.highlight-rank { color: #b0b5bf; font-size: 10px; font-weight: 700; width: 13px; }
.highlight-rank.first { color: var(--accent); }
.highlight-copy { min-width: 0; flex: 1; }
.highlight-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 600; transition: color .15s; }
.highlight-meta { margin-top: 4px; font-size: 9px; color: var(--muted); }
.highlight-value { text-align: right; }
.highlight-value strong { display: block; font-size: 12px; }
.highlight-value span { color: var(--green); font-size: 9px; font-weight: 600; }
.insight-box { margin: 5px 18px 17px; padding: 12px; border-radius: 10px; background: #fff8eb; border: 1px solid #f9edda; }
.insight-box-title { display: flex; align-items: center; gap: 6px; color: #a56b13; font-size: 10px; font-weight: 650; }
.insight-box-title .icon { width: 14px; }
.insight-box p { color: #8b7556; font-size: 10px; line-height: 1.6; margin: 6px 0 0; }

.notes-table-card { overflow: hidden; }
.table-card-header { padding-bottom: 16px; }
.table-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 0 22px 12px; }
.filter-chips { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.filter-chips button { background: transparent; color: var(--muted); font-size: 10px; border-radius: 7px; padding: 6px 11px; }
.filter-chips button:hover { background: #f5f6f8; }
.filter-chips button.active { background: #f0f1f4; color: var(--ink); font-weight: 650; }
.table-caption { font-size: 10px; color: var(--muted); }
.table-scroll { overflow-x: auto; }
.data-table { border-collapse: collapse; width: 100%; min-width: 820px; }
.data-table th { padding: 11px 16px; background: #fafbfc; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: #8c93a1; font-size: 9px; text-align: left; font-weight: 600; white-space: nowrap; }
.data-table th:first-child, .data-table td:first-child { padding-left: 22px; }
.data-table th:last-child, .data-table td:last-child { padding-right: 18px; }
.data-table th.numeric, .data-table td.numeric { text-align: right; }
.data-table td { padding: 13px 16px; border-bottom: 1px solid #f0f1f4; font-size: 11px; color: var(--ink-2); white-space: nowrap; }
.data-table tbody tr { cursor: pointer; transition: background .15s; }
.data-table tbody tr:hover { background: #fcfcfd; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.note-cell { display: flex; align-items: center; gap: 11px; max-width: 360px; min-width: 240px; }
.note-cover { width: 45px; height: 52px; flex: none; border-radius: 7px; position: relative; overflow: hidden; display: flex; align-items: flex-end; padding: 6px; color: #fff; background: var(--cover, linear-gradient(135deg, #d8a29d, #7c4550)); }
.note-cover::before { content: ""; position: absolute; width: 45px; height: 45px; border: 1px solid rgba(255,255,255,.28); border-radius: 50%; top: -17px; right: -19px; }
.note-cover::after { content: ""; position: absolute; width: 28px; height: 28px; background: rgba(255,255,255,.13); transform: rotate(35deg); top: 9px; left: -14px; }
.note-cover span { position: relative; z-index: 1; font-size: 8px; font-weight: 650; letter-spacing: .06em; }
.note-cell-copy { min-width: 0; }
.note-title { color: var(--ink); font-size: 11px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 280px; }
.note-sub { margin-top: 5px; display: flex; align-items: center; gap: 6px; color: #9aa1ae; font-size: 9px; }
.group-tag { display: inline-flex; padding: 2px 5px; background: #f3f4f6; border-radius: 4px; color: #7f8795; }
.scope-switch { display: inline-flex; align-items: center; gap: 2px; margin-left: 16px; padding: 3px; background: #f3f4f7; border-radius: 9px; }
.scope-switch button { height: 26px; padding: 0 11px; border-radius: 7px; font-size: 11px; color: var(--muted); white-space: nowrap; transition: color .15s ease, background .15s ease; }
.scope-switch button:hover { color: var(--ink-2); }
.scope-switch button.active { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 4px rgba(30, 36, 48, .08); }
.scope-switch button.active[data-scope="new"] { color: #3f5fd6; }
.scope-switch button.active[data-scope="old"] { color: #7a6248; }
.type-badge { display: inline-flex; align-items: center; height: 17px; margin-left: 6px; padding: 0 6px; border-radius: 5px; font-size: 9px; font-weight: 600; white-space: nowrap; vertical-align: 1px; }
.type-badge.new { color: #4c6fff; background: #eef2ff; }
.type-badge.old { color: #8a7255; background: #f6f1e9; }
.table-number { color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 600; }
.sub-number { display: block; color: #a0a6b1; font-size: 8px; margin-top: 3px; font-weight: 400; }
.growth { display: inline-flex; align-items: center; justify-content: flex-end; gap: 3px; font-weight: 650; font-size: 10px; }
.growth .icon { width: 12px; height: 12px; }
.growth.up { color: var(--green); }
.growth.down { color: var(--red); }
.growth.flat { color: var(--muted); }
.status-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 9px; border-radius: 20px; padding: 4px 8px; }
.status-pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-pill.up { background: var(--green-soft); color: var(--green); }
.status-pill.down { background: var(--red-soft); color: var(--red); }
.status-pill.flat { background: #f2f3f5; color: #7d8491; }
.row-action { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 7px; background: transparent; color: #a1a7b2; }
.row-action:hover { background: #f0f1f4; color: var(--ink); }
.row-action .icon { width: 15px; }
.empty-row { text-align: center !important; padding: 35px !important; color: var(--muted) !important; }

.library-card { padding: 0 20px 22px; }
.library-toolbar { display: flex; align-items: center; gap: 13px; padding: 18px 0 20px; border-bottom: 1px solid var(--line); }
.inline-search { width: 255px; flex: none; display: flex; align-items: center; gap: 7px; height: 35px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); }
.inline-search:focus-within { border-color: #f4a5b2; box-shadow: 0 0 0 3px var(--accent-soft); }
.inline-search .icon { width: 14px; }
.inline-search input { width: 100%; border: 0; outline: 0; font-size: 10px; background: transparent; color: var(--ink); }
.library-toolbar .filter-chips { flex: 1; }
.note-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; padding-top: 20px; }
.note-card { position: relative; border: 1px solid var(--line); border-radius: 13px; overflow: hidden; background: #fff; cursor: pointer; transition: .2s ease; min-width: 0; }
.note-card:hover { transform: translateY(-3px); border-color: #e1e4e9; box-shadow: 0 10px 28px rgba(31, 36, 47, .08); }
.note-card-visual { height: 103px; background: var(--cover); position: relative; overflow: hidden; padding: 16px; color: #fff; }
.note-card-visual::before { content: ""; position: absolute; width: 150px; height: 150px; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; right: -52px; top: -81px; }
.note-card-visual::after { content: ""; position: absolute; width: 90px; height: 90px; background: rgba(255,255,255,.1); transform: rotate(35deg); left: -50px; bottom: -50px; }
.note-card-category { position: relative; display: inline-flex; padding: 4px 7px; background: rgba(255,255,255,.17); backdrop-filter: blur(5px); border: 1px solid rgba(255,255,255,.2); border-radius: 5px; font-size: 8px; }
.note-card-id { position: absolute; bottom: 12px; left: 16px; font-size: 8px; opacity: .75; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.note-card-status { position: absolute; right: 12px; bottom: 12px; z-index: 1; background: rgba(255,255,255,.9); }
.note-card-body { padding: 14px 15px 15px; }
.note-card-title { height: 38px; margin: 0 0 13px; font-size: 12px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.note-card-stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.note-card-stat span { display: block; color: var(--muted); font-size: 8px; margin-bottom: 4px; }
.note-card-stat strong { font-size: 12px; font-variant-numeric: tabular-nums; }
.note-card-stat .growth { font-size: 10px; }
.note-card-footer { margin-top: 13px; padding-top: 11px; border-top: 1px solid #f0f1f4; display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 8px; }
.note-card-footer .icon { width: 12px; height: 12px; }

/* 批量删除 */
.batch-toggle { flex: none; height: 35px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; }
.batch-toggle:hover { border-color: #f4a5b2; color: var(--accent); }
.batch-toggle.active { border-color: rgba(207, 74, 100, .35); background: #fff7f8; color: var(--accent-dark); }
.batch-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding: 10px 14px; border: 1px solid #f6dde2; border-radius: 10px; background: #fff8f9; }
.batch-count { font-size: 11px; font-weight: 600; color: var(--accent-dark); font-variant-numeric: tabular-nums; }
.batch-actions { display: flex; align-items: center; gap: 14px; }
.batch-actions .text-button:disabled { color: #c3c8d0; cursor: not-allowed; }
.batch-delete-btn { height: 30px; padding: 0 12px; }
.button-danger:disabled { opacity: .45; cursor: not-allowed; }
.note-card.selected { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(243, 79, 104, .26), 0 8px 22px rgba(243, 79, 104, .13); }
.note-grid.batch-mode .note-card:not(.selected) { opacity: .62; }
.note-grid.batch-mode .note-card:not(.selected):hover { opacity: 1; }
.select-check { position: absolute; top: 10px; right: 10px; z-index: 2; width: 21px; height: 21px; display: grid; place-items: center; border-radius: 6px; border: 1px solid rgba(255, 255, 255, .65); background: rgba(255, 255, 255, .32); color: #fff; backdrop-filter: blur(4px); }
.select-check .icon { width: 13px; height: 13px; opacity: 0; }
.note-card.selected .select-check { background: var(--accent); border-color: var(--accent); }
.note-card.selected .select-check .icon { opacity: 1; }
.perm-badge { margin-left: 6px; display: inline-flex; padding: 3px 7px; border-radius: 5px; background: #f1f3f5; color: #757d8a; font-size: 9px; white-space: nowrap; }
.empty-state { padding: 70px 20px; text-align: center; color: var(--muted); }
.empty-state .icon { margin: 0 auto 12px; width: 30px; height: 30px; color: #c0c5ce; }
.empty-state h3 { color: var(--ink-2); font-size: 14px; margin: 0 0 8px; }
.empty-state p { font-size: 11px; margin: 0; }

.import-steps { padding: 20px 25px; display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.import-steps > div { display: grid; grid-template-columns: 33px auto; column-gap: 10px; align-items: center; min-width: 170px; }
.import-steps > div > span { grid-row: 1 / 3; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 700; }
.import-steps strong { font-size: 11px; }
.import-steps p { margin: 3px 0 0; color: var(--muted); font-size: 9px; }
.import-steps i { height: 1px; width: 60px; margin: 0 30px; background: #e6e8ed; position: relative; }
.import-steps i::after { content: ""; position: absolute; right: 0; top: -2px; width: 5px; height: 5px; border-top: 1px solid #d6dae1; border-right: 1px solid #d6dae1; transform: rotate(45deg); }
.import-options { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.import-option { padding: 25px; position: relative; }
.import-option-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; margin-bottom: 20px; }
.import-option-icon.note { color: var(--accent); background: var(--accent-soft); }
.import-option-icon.data { color: var(--blue); background: var(--blue-soft); }
.import-option-icon .icon { width: 21px; height: 21px; }
.import-option h2 { margin: 5px 0 9px; font-size: 17px; }
.import-option > p:not(.eyebrow) { max-width: 480px; color: var(--muted); font-size: 11px; line-height: 1.75; margin: 0 0 17px; }
.format-example { padding: 11px 13px; border: 1px solid var(--line); border-radius: 8px; background: #fafbfc; margin-bottom: 18px; overflow: hidden; }
.format-example code { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #757d8b; font-size: 9px; line-height: 1.9; }
.format-example code:first-child { color: var(--ink-2); }
.import-rules { padding-bottom: 23px; }
.rule-grid { display: grid; grid-template-columns: repeat(4, 1fr); padding: 20px 22px 0; gap: 24px; }
.rule-grid > div { position: relative; padding-left: 2px; }
.rule-grid span { color: #f2b4be; font-size: 10px; font-weight: 700; }
.rule-grid h3 { margin: 6px 0 7px; font-size: 11px; }
.rule-grid p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.7; }

.report-hero { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; margin-bottom: 16px; }
.report-summary { padding: 25px; background: linear-gradient(135deg, #fff 20%, #fff6f7); position: relative; overflow: hidden; }
.report-summary::after { content: ""; position: absolute; width: 180px; height: 180px; border: 1px solid #f9dce1; border-radius: 50%; right: -80px; top: -100px; box-shadow: 0 0 0 30px rgba(252, 234, 237, .35); }
.report-summary h2 { font-size: 18px; margin: 6px 0 8px; }
.report-summary > p { color: var(--muted); font-size: 10px; margin: 0 0 22px; }
.report-kpis { display: flex; gap: 40px; position: relative; z-index: 1; }
.report-kpi span { display: block; color: var(--muted); font-size: 9px; }
.report-kpi strong { display: block; font-size: 25px; margin: 6px 0; letter-spacing: -.03em; }
.report-kpi small { color: var(--green); font-size: 9px; }
.report-insights { padding: 22px; }
.report-insights h2 { font-size: 13px; margin: 0 0 14px; }
.report-insight { display: flex; gap: 9px; padding: 9px 0; }
.report-insight + .report-insight { border-top: 1px solid #f0f1f4; }
.report-insight > span { width: 21px; height: 21px; flex: none; display: grid; place-items: center; background: #f2f3f6; color: var(--ink-2); border-radius: 6px; font-size: 9px; font-weight: 700; }
.report-insight p { font-size: 10px; color: var(--ink-2); line-height: 1.65; margin: 0; }
.report-insight strong { color: var(--ink); }
.report-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 16px; }
.report-ranking { overflow: hidden; }
.report-ranking-list { padding: 15px 22px 20px; }
.report-rank-row { display: grid; grid-template-columns: 22px minmax(150px, 1fr) minmax(80px, .7fr) 70px; gap: 10px; align-items: center; padding: 10px 0; }
.report-rank-row > span:first-child { color: var(--muted); font-size: 10px; text-align: center; }
.report-rank-title { min-width: 0; }
.report-rank-title strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 10px; }
.report-rank-title small { display: block; color: var(--muted); font-size: 8px; margin-top: 3px; }
.rank-bar-track { height: 6px; border-radius: 6px; background: #f0f1f4; overflow: hidden; }
.rank-bar-fill { height: 100%; border-radius: 6px; background: linear-gradient(90deg, #fb8799, var(--accent)); }
.report-rank-value { text-align: right; font-size: 10px; font-weight: 650; }
.report-watch { padding-bottom: 17px; }
.watch-list { padding: 12px 20px 0; }
.watch-item { padding: 12px; border-radius: 9px; background: #fafbfc; margin-bottom: 9px; cursor: pointer; }
.watch-item:hover { background: #f6f7f9; }
.watch-item strong { display: block; font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.watch-item p { color: var(--muted); font-size: 9px; line-height: 1.55; margin: 6px 0 0; }
.watch-item .growth { margin-top: 7px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(28, 31, 39, .4); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; padding: 20px; animation: fadeIn .18s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal { width: 100%; max-height: calc(100vh - 40px); overflow-y: auto; background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); animation: modalIn .22s ease; }
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
.small-modal { max-width: 480px; }
.import-modal { max-width: 650px; }
.help-modal { max-width: 590px; }
.modal-header { padding: 23px 25px 18px; display: flex; align-items: flex-start; justify-content: space-between; border-bottom: 1px solid var(--line); }
.modal-header h2 { margin: 5px 0 0; font-size: 18px; }
.modal-header .icon-button { margin: -4px -7px 0 0; }
.modal form { padding: 22px 25px 0; }
.form-field { margin-bottom: 17px; }
.form-field label { display: block; font-size: 11px; font-weight: 600; color: var(--ink-2); margin-bottom: 7px; }
.form-field em { color: var(--accent); font-style: normal; }
.form-field input { width: 100%; height: 41px; border: 1px solid var(--line-strong); border-radius: 8px; padding: 0 12px; outline: none; color: var(--ink); font-size: 11px; }
.form-field input:focus { border-color: #f3a2af; box-shadow: 0 0 0 3px var(--accent-soft); }
.form-field input::placeholder { color: #abb1bc; }
.field-hint { margin: 6px 0 0; color: var(--muted); font-size: 9px; }
.note-type-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.note-type-switch button { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fbfbfc; text-align: left; transition: border-color .15s ease, background .15s ease; }
.note-type-switch button strong { font-size: 12px; color: var(--ink); }
.note-type-switch button small { font-size: 9px; color: var(--muted); line-height: 1.45; }
.note-type-switch button:hover { border-color: var(--line-strong); }
.note-type-switch button.active { border-color: #f4c3ca; background: var(--accent-soft); }
.note-type-switch button.active strong { color: var(--accent-dark); }
.type-switch-btn { margin-left: 6px; padding: 2px 7px; border: 1px dashed var(--line-strong); border-radius: 5px; font-size: 9px; color: var(--muted); transition: color .15s ease, border-color .15s ease, background .15s ease; }
.type-switch-btn:hover { color: var(--accent-dark); border-color: #f4c3ca; background: var(--accent-soft); }
.fixed-note-type span { color: var(--muted); font-size: 9px; font-weight: 400; }
.optional-label { margin-left: 5px; color: var(--muted); font-size: 9px; font-weight: 400; }
.baseline-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.notes-table-card .data-table { min-width: 1060px; }
.drawer-chart-header { align-items: center; }
.drawer-chart-header .segmented button { padding-left: 8px; padding-right: 8px; }
.form-error { margin: 0 0 15px; border-radius: 8px; padding: 10px 12px; color: var(--red); background: var(--red-soft); font-size: 10px; line-height: 1.5; }
.modal-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; padding: 17px 25px; border-top: 1px solid var(--line); margin-top: 22px; }
.modal form .modal-actions { margin-left: -25px; margin-right: -25px; }
.modal-footnote { margin-right: auto; color: var(--muted); font-size: 9px; }
.import-mode-wrap { padding: 17px 25px 0; display: flex; align-items: center; gap: 12px; }
.import-mode-wrap > span { color: var(--ink-2); font-size: 11px; font-weight: 600; }
.help-icon { padding: 0; background: transparent; color: var(--muted); }
.help-icon .icon { width: 15px; height: 15px; }
.import-format { margin: 13px 25px 0; padding: 10px 12px; border-radius: 8px; background: #f7f8fa; color: var(--muted); font-size: 9px; line-height: 1.6; }
.import-format code { color: var(--ink-2); user-select: all; }
.file-drop { margin: 14px 25px 0; border: 1px dashed #d8dce4; border-radius: 10px; padding: 16px; display: flex; align-items: center; gap: 12px; cursor: pointer; color: var(--muted); transition: .18s; }
.file-drop:hover, .file-drop.dragging { border-color: #f19aaa; background: #fffafb; }
.file-drop > .icon { width: 24px; height: 24px; color: #a3aab6; }
.file-drop span { font-size: 10px; }
.file-drop strong { color: var(--accent); font-weight: 600; }
.file-drop small { margin-left: auto; font-size: 9px; }
.file-drop input { display: none; }
.paste-label { display: flex; justify-content: space-between; align-items: center; margin: 15px 25px 7px; }
.paste-label > span { color: var(--ink-2); font-size: 10px; font-weight: 600; }
.paste-label .text-button { font-size: 9px; color: var(--accent); }
#importTextarea { display: block; width: calc(100% - 50px); height: 140px; resize: vertical; margin: 0 25px; border: 1px solid var(--line-strong); border-radius: 9px; padding: 11px 12px; outline: none; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink-2); font-size: 10px; line-height: 1.65; }
#importTextarea:focus { border-color: #f3a2af; box-shadow: 0 0 0 3px var(--accent-soft); }
.import-feedback { margin: 12px 25px 0; padding: 10px 12px; border-radius: 8px; font-size: 10px; line-height: 1.6; white-space: pre-line; }
.import-feedback.error { color: var(--red); background: var(--red-soft); }
.import-feedback.success { color: var(--green); background: var(--green-soft); }
.import-feedback.warning { color: var(--amber); background: var(--amber-soft); }
.help-content { padding: 20px 25px 0; }
.help-content h3 { font-size: 12px; margin: 18px 0 9px; }
.help-content h3:first-child { margin-top: 0; }
.help-content p, .help-content li { color: var(--ink-2); font-size: 10px; line-height: 1.8; }
.help-content ol { margin: 0; padding-left: 18px; }
.help-content code { display: block; padding: 11px; border-radius: 8px; background: #f7f8fa; color: var(--accent-dark); font-size: 10px; overflow-x: auto; }

.drawer-scrim { position: fixed; inset: 0; background: rgba(30, 34, 42, .25); z-index: 70; backdrop-filter: blur(2px); }
.detail-drawer { position: fixed; right: 0; top: 0; bottom: 0; width: min(620px, 92vw); z-index: 80; background: var(--bg); box-shadow: -20px 0 60px rgba(24, 29, 39, .15); transform: translateX(105%); transition: transform .28s cubic-bezier(.22,.8,.3,1); overflow-y: auto; }
.detail-drawer.open { transform: none; }
.drawer-header { padding: 22px 25px; background: #fff; border-bottom: 1px solid var(--line); display: flex; gap: 12px; align-items: flex-start; }
.drawer-header .note-cover { width: 51px; height: 60px; }
.drawer-heading { min-width: 0; flex: 1; }
.drawer-heading h2 { font-size: 15px; line-height: 1.5; margin: 1px 0 7px; }
.drawer-meta { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 9px; }
.drawer-meta code { max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.drawer-header .icon-button { margin-top: -5px; }
.drawer-body { padding: 18px; }
.drawer-actions { display: flex; gap: 8px; margin-bottom: 15px; }
.drawer-actions .button { flex: 1; }
.drawer-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; margin-bottom: 15px; }
.drawer-kpi { background: #fff; border: 1px solid var(--line); border-radius: 11px; padding: 13px; }
.drawer-kpi span { color: var(--muted); font-size: 8px; }
.drawer-kpi strong { display: block; font-size: 16px; margin: 6px 0 3px; }
.drawer-kpi small { color: var(--muted); font-size: 8px; }
.drawer-card { margin-bottom: 15px; overflow: hidden; }
.drawer-card .chart-container { height: 235px; }
.drawer-history { max-height: 300px; overflow-y: auto; }
.drawer-history .data-table { min-width: 600px; }
.drawer-history .data-table th:first-child, .drawer-history .data-table td:first-child { padding-left: 18px; }
.drawer-history .data-table td { padding-top: 10px; padding-bottom: 10px; }
.drawer-danger { display: flex; align-items: center; justify-content: space-between; padding: 4px 5px 10px; color: var(--muted); font-size: 9px; }
.drawer-danger button { background: transparent; color: #c7838c; display: flex; align-items: center; gap: 5px; font-size: 9px; }
.drawer-danger button:hover { color: var(--red); }
.drawer-danger .icon { width: 13px; height: 13px; }

.toast-region { position: fixed; right: 24px; bottom: 24px; z-index: 150; display: grid; gap: 9px; pointer-events: none; }
.toast { min-width: 260px; max-width: 380px; display: flex; align-items: flex-start; gap: 10px; padding: 13px 15px; background: #fff; border: 1px solid var(--line); border-radius: 11px; box-shadow: 0 12px 35px rgba(25, 30, 40, .14); animation: toastIn .25s ease; pointer-events: auto; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.toast > .icon { width: 17px; height: 17px; color: var(--green); margin-top: 1px; }
.toast.error > .icon { color: var(--red); }
.toast strong { display: block; font-size: 11px; margin-bottom: 3px; }
.toast p { color: var(--muted); font-size: 9px; line-height: 1.5; margin: 0; }
.toast.removing { opacity: 0; transform: translateY(5px); transition: .2s; }

.app-hidden { display: none !important; }
.auth-screen { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(430px, .92fr); background: var(--surface); }
.auth-art { min-height: 100vh; position: relative; overflow: hidden; padding: 38px 48px 34px; display: flex; flex-direction: column; background: radial-gradient(circle at 16% 12%, #fff8f5 0, transparent 34%), linear-gradient(145deg, #f5e9e4 0%, #f2dfdc 50%, #eacccb 100%); }
.auth-brand { display: flex; align-items: center; gap: 11px; position: relative; z-index: 3; }
.auth-brand strong { display: block; font-size: 22px; line-height: 1; letter-spacing: .12em; }
.auth-brand small { display: block; color: #8c7774; font-size: 8px; letter-spacing: .14em; font-weight: 700; margin-top: 6px; }
.auth-art-copy { margin-top: auto; margin-bottom: auto; padding: 60px 0 54px; position: relative; z-index: 3; max-width: 520px; }
.auth-art-copy .eyebrow { color: #a07872; }
.auth-art-copy h1 { font-family: "Songti SC", "STSong", "Noto Serif CJK SC", serif; font-size: clamp(38px, 4.1vw, 61px); line-height: 1.3; letter-spacing: -.05em; font-weight: 600; margin: 17px 0 22px; color: #442d2d; }
.auth-art-copy > p:last-child { color: #826b69; font-size: 13px; line-height: 2; margin: 0; }
.auth-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; position: relative; z-index: 3; border-top: 1px solid rgba(110, 78, 75, .15); padding-top: 22px; }
.auth-features strong { display: block; color: #5d4140; font-size: 11px; margin-bottom: 6px; }
.auth-features span { display: block; color: #947b77; font-size: 9px; line-height: 1.5; }
.auth-flower-graphic { position: absolute; width: 440px; height: 440px; right: -110px; bottom: 12%; z-index: 1; opacity: .72; }
.auth-flower-graphic span { position: absolute; left: 135px; top: 0; width: 170px; height: 230px; border-radius: 50% 50% 44% 44%; background: linear-gradient(160deg, rgba(220, 157, 150, .62), rgba(169, 96, 95, .22)); transform-origin: 50% 100%; border: 1px solid rgba(255,255,255,.35); }
.auth-flower-graphic span:nth-child(2) { transform: rotate(72deg); background: linear-gradient(160deg, rgba(233, 191, 178, .55), rgba(183, 122, 107, .19)); }
.auth-flower-graphic span:nth-child(3) { transform: rotate(144deg); background: linear-gradient(160deg, rgba(213, 166, 156, .58), rgba(160, 98, 92, .18)); }
.auth-flower-graphic span:nth-child(4) { transform: rotate(216deg); background: linear-gradient(160deg, rgba(235, 203, 185, .6), rgba(178, 123, 103, .18)); }
.auth-flower-graphic i { position: absolute; left: 178px; top: 140px; transform: rotate(288deg); transform-origin: 50% 100%; width: 84px; height: 140px; border-radius: 50% 50% 44% 44%; background: linear-gradient(160deg, rgba(228, 183, 168, .5), rgba(159, 98, 92, .15)); }
.auth-panel { min-height: 100vh; padding: 40px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #fffdfc; }
.auth-card { width: min(390px, 100%); }
.auth-loading { min-height: 300px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 15px; color: var(--muted); font-size: 11px; }
.auth-spinner { width: 28px; height: 28px; border: 2px solid #f0dadf; border-top-color: var(--accent); border-radius: 50%; animation: authSpin .8s linear infinite; }
@keyframes authSpin { to { transform: rotate(360deg); } }
.auth-mode h2 { font-family: "Songti SC", "STSong", serif; font-size: 27px; letter-spacing: -.03em; margin: 8px 0 8px; }
.auth-subtitle { color: var(--muted); font-size: 11px; line-height: 1.7; margin: 0 0 26px; }
.auth-field { margin-bottom: 16px; }
.auth-field label { display: block; color: var(--ink-2); font-size: 10px; font-weight: 600; margin-bottom: 7px; }
.auth-input { height: 44px; border: 1px solid var(--line-strong); border-radius: 9px; display: flex; align-items: center; gap: 8px; padding: 0 12px; background: #fff; transition: .18s; }
.auth-input:focus-within { border-color: #eda6b0; box-shadow: 0 0 0 3px var(--accent-soft); }
.auth-input .icon { width: 16px; height: 16px; color: #a5abb7; }
.auth-input input { border: 0; outline: 0; background: transparent; width: 100%; font-size: 11px; color: var(--ink); }
.auth-input input::placeholder { color: #afb4be; }
.auth-submit { width: 100%; height: 45px; margin-top: 6px; font-size: 12px; }
.auth-submit:disabled { opacity: .65; cursor: wait; transform: none; }
.auth-error { color: var(--red); background: var(--red-soft); border-radius: 8px; padding: 9px 11px; font-size: 10px; line-height: 1.55; margin: 4px 0 8px; }
.auth-note { display: flex; gap: 8px; align-items: flex-start; padding: 15px 0 0; margin-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; line-height: 1.6; }
.auth-note .icon { width: 15px; height: 15px; flex: none; color: #a78d8b; }
.auth-footnote { margin: auto 0 0; padding-top: 35px; color: #b5b0ad; font-size: 8px; letter-spacing: .05em; }
.auth-mobile-brand { display: none; }

.cloud-status { display: inline-flex; align-items: center; gap: 6px; color: var(--green); font-size: 9px; font-weight: 600; white-space: nowrap; padding: 0 4px; }
.cloud-status i { width: 6px; height: 6px; border-radius: 50%; background: #30ad83; box-shadow: 0 0 0 3px #e3f5ee; }
.cloud-status.saving { color: var(--amber); }
.cloud-status.saving i { background: #d4922f; box-shadow: 0 0 0 3px #fff3dd; animation: statusPulse 1s ease infinite; }
.cloud-status.offline { color: var(--red); }
.cloud-status.offline i { background: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
@keyframes statusPulse { 50% { opacity: .35; } }
.user-trigger { display: flex; align-items: center; gap: 7px; background: transparent; border-radius: 20px; padding: 2px 4px 2px 2px; margin-left: 2px; }
.user-trigger:hover { background: #f5f6f8; }
.user-trigger .avatar { margin-left: 0; width: 31px; height: 31px; background: linear-gradient(145deg, #f8d8db, #f0c1c7); color: #8b4d56; }
.topbar-user-name { max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; color: var(--ink-2); font-weight: 600; }
.user-chevron { width: 12px; height: 12px; color: var(--muted); }
.user-menu { position: absolute; z-index: 60; top: 60px; right: 25px; width: 230px; background: #fff; border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 18px 45px rgba(28,32,42,.13); padding: 14px; animation: menuIn .16s ease; }
@keyframes menuIn { from { opacity: 0; transform: translateY(-4px); } }
.user-menu-head { display: flex; align-items: center; gap: 10px; }
.user-menu-head .avatar { width: 36px; height: 36px; margin: 0; background: linear-gradient(145deg, #f8d8db, #f0c1c7); color: #8b4d56; }
.user-menu-head strong { display: block; font-size: 11px; }
.user-menu-head small { display: block; color: var(--muted); font-size: 9px; margin-top: 3px; }
.role-badge { display: inline-flex; margin: 11px 0 1px; padding: 4px 8px; border-radius: 5px; background: var(--accent-soft); color: var(--accent-dark); font-size: 8px; font-weight: 700; }
.user-menu-divider { height: 1px; background: var(--line); margin: 12px -14px 7px; }
.user-menu > button { width: 100%; height: 36px; display: flex; align-items: center; gap: 9px; background: transparent; border-radius: 7px; font-size: 10px; color: var(--ink-2); padding: 0 8px; }
.user-menu > button:hover { background: #f7f8fa; }
.user-menu > button .icon { width: 15px; height: 15px; color: var(--muted); }
.user-menu > button.danger-text { color: var(--red); }
.user-menu > button.danger-text .icon { color: var(--red); }
.admin-nav-label { margin-top: 21px; }
.form-select { width: 100%; height: 41px; }
.check-label { display: flex !important; align-items: center; gap: 8px; font-size: 11px; color: var(--ink-2); cursor: pointer; }
.check-label input { width: 15px; height: 15px; accent-color: var(--accent); }
.modal-description { color: var(--ink-2); font-size: 11px; line-height: 1.7; margin: 20px 25px 17px; }
.modal-description strong { color: var(--ink); }

.member-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; margin-bottom: 16px; }
.member-stat { padding: 20px; }
.member-stat-top { display: flex; align-items: center; justify-content: space-between; }
.member-stat-label { color: var(--ink-2); font-size: 10px; }
.member-stat-icon { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: #f5f6f8; color: var(--ink-2); }
.member-stat-icon .icon { width: 15px; height: 15px; }
.member-stat strong { display: block; font-size: 25px; letter-spacing: -.03em; margin: 10px 0 3px; }
.member-stat small { color: var(--muted); font-size: 9px; }
.members-card { overflow: hidden; }
.members-toolbar { padding: 18px 22px; display: flex; justify-content: space-between; align-items: center; gap: 14px; border-bottom: 1px solid var(--line); }
.members-toolbar h2 { font-size: 13px; margin: 0 0 4px; }
.members-toolbar p { margin: 0; font-size: 9px; color: var(--muted); }
.members-toolbar .inline-search { width: 220px; }
.member-cell { display: flex; align-items: center; gap: 10px; }
.member-avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #7d545b; background: #f7e5e7; font-size: 11px; font-weight: 700; flex: none; }
.member-cell strong { display: block; font-size: 11px; color: var(--ink); }
.member-cell small { display: block; font-size: 9px; color: var(--muted); margin-top: 3px; }
.role-pill { display: inline-flex; padding: 4px 8px; border-radius: 5px; font-size: 9px; font-weight: 600; }
.role-pill.admin { background: #fff0e5; color: #b26324; }
.role-pill.editor { background: var(--blue-soft); color: #4f67c9; }
.role-pill.viewer { background: #f1f3f5; color: #757d8a; }
.account-state { display: inline-flex; align-items: center; gap: 5px; font-size: 9px; }
.account-state::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.account-state.active { color: var(--green); }
.account-state.disabled { color: var(--muted); }
.member-actions { display: flex; align-items: center; gap: 4px; justify-content: flex-end; }
.member-action-btn { height: 28px; padding: 0 9px; background: #fbfbfc; border: 1px solid var(--line); border-radius: 7px; color: var(--ink-2); font-size: 10px; white-space: nowrap; transition: color .15s ease, background .15s ease, border-color .15s ease; }
.member-action-btn:hover { color: var(--ink); background: #f1f2f6; border-color: var(--line-strong); }
.member-action-btn.danger { color: #b4626f; }
.member-action-btn.danger:hover { color: var(--red); background: var(--red-soft); border-color: #f7d3d8; }
.member-action-btn:disabled { opacity: .4; cursor: not-allowed; }
.self-tag { color: #9b7278; background: #f9eff0; border-radius: 4px; padding: 2px 5px; font-size: 8px; margin-left: 5px; }
.permission-note { display: flex; gap: 10px; padding: 16px 22px; background: #fffaf8; border-top: 1px solid #f6ece9; color: #91736e; font-size: 10px; line-height: 1.7; }
.permission-note .icon { width: 15px; height: 15px; color: #b58d86; flex: none; }
.permission-note strong { color: #765651; }
.member-empty { padding: 50px 20px; text-align: center; color: var(--muted); font-size: 10px; }

.confirm-modal .confirm-body { padding: 20px 25px 6px; }
.confirm-modal .confirm-body p { margin: 0; color: var(--ink-2); font-size: 12px; line-height: 1.85; }
.confirm-modal .modal-actions { margin-top: 20px; }
.button.danger-button { background: var(--red); box-shadow: 0 3px 8px rgba(225, 76, 95, .18); }
.button.danger-button:hover { background: #cf3f52; box-shadow: 0 6px 16px rgba(225, 76, 95, .24); }

/* 城市维度 */
.city-filter { display: inline-flex; align-items: center; gap: 5px; height: 34px; margin-left: 14px; padding: 0 8px 0 10px; border: 1px solid var(--line); border-radius: 9px; background: #f8f9fb; color: var(--muted); transition: border-color .15s ease, background .15s ease; }
.city-filter:hover { border-color: var(--line-strong); background: #fff; }
.city-filter:focus-within { border-color: #f6b2bd; background: #fff; box-shadow: 0 0 0 3px var(--accent-soft); }
.city-filter .icon { width: 13px; height: 13px; flex: none; }
.city-filter select { border: 0; outline: 0; background: transparent; color: var(--ink-2); font-size: 11px; font-weight: 600; max-width: 104px; padding-right: 2px; cursor: pointer; }
.city-filter.active { border-color: #f6b2bd; background: #fff6f7; color: var(--accent-dark); }
.city-filter.active select { color: var(--accent-dark); }
.city-chip { display: inline-flex; align-items: center; height: 17px; margin-left: 6px; padding: 0 6px; border-radius: 5px; font-size: 9px; font-weight: 600; white-space: nowrap; vertical-align: 1px; color: #4a7d6b; background: #eef7f3; }
.city-chip.empty { color: #9aa1ae; background: #f3f4f6; font-weight: 500; }
.pending-title { display: inline-flex; align-items: center; height: 17px; margin-left: 6px; padding: 0 6px; border-radius: 5px; font-size: 9px; font-weight: 600; white-space: nowrap; vertical-align: 1px; color: #a9761f; background: #fdf3e2; }
.pending-titles-btn { margin-left: auto; color: #a9761f; font-size: 11px; }
.pending-titles-btn:hover { color: #8a5f13; }
.pending-titles-btn .icon { width: 13px; height: 13px; }
.city-chip.on-cover { margin-left: 0; color: #fff; background: rgba(255, 255, 255, .22); }
.type-switch-btn { display: inline-flex; align-items: center; height: 21px; margin-left: 6px; padding: 0 8px; border-radius: 6px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); font-size: 9px; font-weight: 600; white-space: nowrap; transition: color .15s ease, border-color .15s ease, background .15s ease; }
.type-switch-btn:hover { color: var(--accent-dark); border-color: #f6c3cb; background: #fff7f8; }
.type-switch-btn:disabled { opacity: .45; cursor: not-allowed; }
.inline-input { flex: 1; min-width: 0; height: 32px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; color: var(--ink); font-size: 11px; outline: none; }
.inline-input::placeholder { color: #a4aab5; }
.inline-input:focus { border-color: #f4a5b2; box-shadow: 0 0 0 3px var(--accent-soft); }

/* 排行筛选 */
.table-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.table-controls .table-caption { margin-left: 4px; }
.select.compact { height: 30px; min-width: 0; padding: 0 26px 0 10px; border-radius: 8px; font-size: 10px; font-weight: 600; background: #fff; color: var(--ink-2); }
.select.compact.active-dim { border-color: rgba(207, 74, 100, .34); background: #fff7f8; color: var(--accent-dark); }
.rank-index { display: inline-grid; place-items: center; flex: none; min-width: 19px; height: 19px; margin-right: 2px; padding: 0 4px; border-radius: 6px; background: #f2f3f6; color: #8b93a1; font-size: 9px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rank-index.top { background: #ffeef1; color: var(--accent-dark); }
.example-note { color: #9aa1ae !important; background: transparent !important; padding-left: 0 !important; font-style: normal; }

.is-hidden { display: none !important; }
.editor-only.is-hidden { display: none !important; }
.admin-only.is-hidden { display: none !important; }

@media (max-width: 1050px) {
  .auth-screen { grid-template-columns: minmax(0, 1fr) 430px; }
  .auth-art { padding-left: 34px; padding-right: 34px; }
  .auth-art-copy h1 { font-size: 40px; }
  .auth-flower-graphic { right: -170px; opacity: .55; }
  .member-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  .auth-screen { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .auth-panel { padding: 28px 22px; background: radial-gradient(circle at 80% 0, #fff1f2, transparent 40%), #fffdfc; }
  .auth-mobile-brand { display: flex; align-items: center; gap: 9px; align-self: flex-start; margin-bottom: auto; }
  .auth-mobile-brand strong { font-size: 19px; letter-spacing: .1em; }
  .auth-card { margin: auto 0; padding: 40px 0; }
  .auth-footnote { margin-top: auto; }
  .cloud-status { display: none; }
  .topbar-user-name, .user-chevron { display: none; }
  .user-menu { right: 12px; top: 56px; }
  .members-toolbar { flex-wrap: wrap; }
  .members-toolbar .inline-search { width: 100%; }
}

@media (max-width: 580px) {
  .member-stats { grid-template-columns: 1fr 1fr; gap: 9px; }
  .member-stat { padding: 14px; }
  .member-stat strong { font-size: 21px; }
  .member-stat-icon { display: none; }
  .members-toolbar { padding: 14px; }
  .member-card-table { min-width: 760px; }
  .modal-description { margin-left: 20px; margin-right: 20px; }
}

@media (min-width: 1500px) {
  .main-content { padding-left: 40px; padding-right: 40px; }
  .note-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .metric-card { min-height: 145px; }
  .chart-container { height: 270px; }
}

@media (max-width: 1180px) {
  :root { --sidebar: 210px; }
  .main-content { padding: 26px 24px 40px; }
  .topbar { padding: 0 24px; }
  .global-search { width: 185px; }
  .topbar-import { display: none; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .overview-grid { grid-template-columns: 1fr; }
  .highlights-card .highlight-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .highlight-item { border-bottom: 0; }
  .highlight-value { display: none; }
  .insight-box { margin-top: 0; }
  .note-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .library-toolbar { flex-wrap: wrap; }
  .library-toolbar .filter-chips { order: 3; flex-basis: 100%; }
  .inline-search { flex: 1; }
  .rule-grid { grid-template-columns: repeat(2, 1fr); }
  .report-hero, .report-grid { grid-template-columns: 1fr; }
  .table-controls { gap: 6px; }
}

@media (max-width: 820px) {
  :root { --sidebar: 232px; }
  .sidebar { transform: translateX(-105%); transition: transform .25s ease; box-shadow: 15px 0 45px rgba(20, 25, 35, .12); }
  .sidebar.open { transform: none; }
  .sidebar-scrim.visible { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(28, 32, 40, .32); }
  .main-shell { margin-left: 0; }
  .mobile-menu { display: grid; margin-left: -7px; }
  .topbar { height: 62px; padding: 0 18px; }
  .breadcrumb > span, .breadcrumb > .icon { display: none; }
  .global-search { display: none; }
  .avatar { display: none; }
  .main-content { padding: 24px 18px 35px; }
  .page-heading { align-items: flex-start; }
  .page-heading h1 { font-size: 23px; }
  .heading-actions { flex-wrap: wrap; justify-content: flex-end; }
  .import-steps { justify-content: space-between; padding: 17px; }
  .import-steps > div { min-width: 0; }
  .import-steps i { width: 25px; margin: 0 12px; }
  .import-steps p { display: none; }
  .import-steps > div > span { grid-row: auto; }
  .import-steps strong { font-size: 10px; }
  .import-options { grid-template-columns: 1fr; }
}

@media (max-width: 580px) {
  .topbar { padding: 0 13px; }
  .topbar-actions { gap: 6px; }
  .topbar .button { padding: 0 11px; height: 35px; font-size: 11px; }
  .main-content { padding: 20px 13px 30px; }
  .page-heading { flex-direction: column; gap: 15px; }
  .heading-actions { width: 100%; justify-content: flex-start; }
  .metrics-grid { gap: 10px; }
  .batch-bar { flex-wrap: wrap; }
  .batch-actions { width: 100%; justify-content: space-between; gap: 10px; }
  .batch-delete-btn { flex: 1; max-width: 165px; }
  .metric-card { min-height: 127px; padding: 15px; }
  .metric-value { font-size: 23px; }
  .metric-label { font-size: 10px; }
  .metric-badge { font-size: 8px; }
  .mini-spark { display: none; }
  .card-header { padding: 17px 16px 0; }
  .trend-card .card-header { flex-direction: column; }
  .chart-container { height: 225px; padding-left: 3px; padding-right: 8px; }
  .highlights-card .highlight-list { display: block; padding: 10px 16px 3px; }
  .highlight-item { border-bottom: 1px solid #f0f1f4; }
  .highlight-value { display: block; }
  .insight-box { margin: 5px 15px 15px; }
  .table-toolbar { padding: 0 16px 12px; flex-wrap: wrap; gap: 8px; }
  .table-caption { display: none; }
  .table-controls { width: 100%; justify-content: flex-start; }
  .select.compact { flex: 0 1 auto; min-width: 0; max-width: calc(50% - 6px); }
  .city-filter { margin-left: 8px; height: 31px; padding: 0 6px 0 8px; }
  .city-filter select { max-width: 72px; font-size: 10px; }
  .table-card-header { padding-bottom: 13px; }
  .library-card { padding: 0 13px 15px; }
  .library-toolbar { gap: 9px; }
  .inline-search { width: 100%; flex-basis: 100%; }
  .library-toolbar .select { flex: 1; }
  .note-grid { grid-template-columns: 1fr; gap: 12px; }
  .note-card-visual { height: 90px; }
  .import-steps { display: none; }
  .import-option { padding: 20px; }
  .rule-grid { grid-template-columns: 1fr; gap: 18px; }
  .report-kpis { gap: 18px; flex-wrap: wrap; }
  .report-kpi strong { font-size: 21px; }
  .report-rank-row { grid-template-columns: 18px minmax(120px, 1fr) 55px; }
  .rank-bar-track { display: none; }
  .modal-backdrop { padding: 10px; align-items: flex-end; }
  .modal { max-height: calc(100vh - 20px); border-radius: 17px 17px 12px 12px; }
  .modal-header { padding: 20px; }
  .modal form { padding: 19px 20px 0; }
  .modal form .modal-actions { margin-left: -20px; margin-right: -20px; }
  .modal-actions { padding: 15px 20px; }
  .modal-footnote { display: none; }
  .import-mode-wrap { padding-left: 20px; padding-right: 20px; }
  .import-format { margin-left: 20px; margin-right: 20px; }
  .file-drop { margin-left: 20px; margin-right: 20px; flex-wrap: wrap; }
  .file-drop small { display: none; }
  .paste-label { margin-left: 20px; margin-right: 20px; }
  #importTextarea { width: calc(100% - 40px); margin: 0 20px; }
  .import-feedback { margin-left: 20px; margin-right: 20px; }
  .drawer-body { padding: 12px; }
  .drawer-header { padding: 18px; }
  .drawer-kpis { grid-template-columns: repeat(2, 1fr); }
  .drawer-chart-header { flex-direction: column; align-items: flex-start; }
  .baseline-grid { gap: 6px; }
  .optional-label { display: block; margin: 4px 0 0; }
  .drawer-kpi { padding: 12px; }
  .toast-region { left: 13px; right: 13px; bottom: 13px; }
  .toast { min-width: 0; max-width: none; }
}

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