:root {
  font-family: Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  color: #1b263b;
  font-size: 14px;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --ink: #1b263b;
  --muted: #758198;
  --primary: #597dff;
  --primary-dark: #3f63e4;
  --primary-light: #eef3ff;
  --line: #e6eaf1;
  --line-strong: #d7deea;
  --bg: #f4f7fb;
  --radius: 12px;
  --sidebar-width: 236px;
  --header-height: 64px;
  --shadow: 0 1px 2px #1b263b0a, 0 4px 14px #2737580d;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--bg); line-height: 1.55; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { outline-offset: 3px; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
a { color: var(--primary); text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--primary); }
svg.ui-icon, [data-icon] svg, .login-page svg { width: 18px; height: 18px; display: block; flex: 0 0 auto; }
[data-icon] { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.eyebrow, .page-eyebrow { color: var(--primary); font-size: 12px; font-weight: 700; letter-spacing: .08em; }
.skip-link { position: fixed; top: -60px; left: 16px; z-index: 200; padding: 10px 16px; background: white; border-radius: 8px; box-shadow: var(--shadow); }
.skip-link:focus { top: 12px; }
.sidebar { position: fixed; z-index: 90; inset: 0 auto 0 0; width: var(--sidebar-width); display: flex; flex-direction: column; background: white; border-right: 1px solid var(--line); box-shadow: 2px 0 14px #2031520b; transition: width .22s, transform .22s; }
.sidebar-brand { height: var(--header-height); min-height: var(--header-height); display: flex; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; min-width: 0; }
.brand-full { display: block; width: 195px; max-width: 100%; height: auto; }
.brand-compact { display: none; width: 38px; height: 25px; overflow: hidden; flex-shrink: 0; }
.brand-compact img { display: block; width: 113px; max-width: none; height: auto; }
#navigation { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 10px 10px 20px; scrollbar-width: thin; scrollbar-color: #d8dee9 transparent; overscroll-behavior: contain; }
.nav-item { position: relative; display: flex; align-items: center; gap: 11px; width: 100%; min-height: 40px; padding: 8px 11px; margin-bottom: 3px; border: 0; border-radius: 9px; color: #68748a; background: transparent; text-align: left; font-size: 14px; font-weight: 600; line-height: 1.3; }
.nav-item:hover { background: #f5f7fc; color: #3c4e70; }
.nav-item.active { background: var(--primary-light); color: #4869d7; }
.nav-item.active::before { content: ""; position: absolute; top: 10px; bottom: 10px; left: -10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--primary); }
.nav-icon { display: inline-flex; width: 18px; flex: 0 0 18px; }
.nav-text { min-width: 0; }
.nav-chevron { margin-left: auto; transition: transform .15s; }
.nav-chevron svg { width: 14px; height: 14px; }
[aria-expanded="true"] > .nav-chevron { transform: rotate(90deg); }
.nav-group-toggle.has-active { color: #4869d7; }
.nav-children { padding: 2px 0 6px 19px; }
.nav-child { min-height: 36px; padding-left: 20px; font-size: 13px; font-weight: 500; }
.nav-child.active::before { left: -29px; }
.nav-child::after { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; position: absolute; left: 7px; opacity: .5; }
.sidebar-bottom { min-height: 68px; flex-shrink: 0; margin: 0 12px 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; display: flex; align-items: center; gap: 10px; background: #fafbfd; overflow: hidden; }
.sidebar-bottom strong, .sidebar-bottom small { display: block; white-space: nowrap; }
.sidebar-bottom strong { font-size: 13px; color: #4c596f; }
.sidebar-bottom small { font-size: 11px; color: #98a2b3; margin-top: 3px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--portal-accent, #597dff); box-shadow: 0 0 0 4px #597dff0d; flex-shrink: 0; }
.workspace { margin-left: var(--sidebar-width); min-width: 0; min-height: 100vh; display: flex; flex-direction: column; transition: margin-left .22s; }
.topbar { position: sticky; top: 0; z-index: 70; height: var(--header-height); flex-shrink: 0; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; gap: 18px; background: #fffffff0; backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.topbar-left, .header-right, .breadcrumb-area { display: flex; align-items: center; min-width: 0; }
.topbar-left { gap: 10px; }
.header-right { gap: 8px; }
.breadcrumb-area { gap: 9px; color: #8b96a8; font-size: 13px; white-space: nowrap; }
.breadcrumb-area a { color: #8b96a8; }
.breadcrumb-area a:hover { color: var(--primary); }
#breadcrumb { display: flex; align-items: center; gap: 9px; overflow: hidden; }
#breadcrumb strong { color: #4b5970; font-weight: 650; overflow: hidden; text-overflow: ellipsis; }
.breadcrumb-area svg { width: 12px; height: 12px; flex-shrink: 0; }
.icon-button { width: 40px; height: 40px; padding: 0; flex-shrink: 0; border: 1px solid transparent; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: transparent; color: #64718a; }
.icon-button:hover { background: #f1f4fa; color: var(--primary); }
#sidebar-close { display: none; }
.command-trigger { height: 36px; width: 190px; display: flex; align-items: center; gap: 9px; padding: 0 9px 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; color: #8490a4; font-size: 13px; }
.command-trigger kbd { margin-left: auto; background: white; border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; font: inherit; font-size: 12px; }
.env-chip { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; height: 36px; padding: 0 11px; border: 1px solid #f0e3d3; border-radius: 10px; background: #fffbf4; color: #725f45; font-size: 12px; }
.env-chip > span { width: 6px; height: 6px; border-radius: 50%; background: #d9a354; }
.profile-menu { position: relative; }
.profile-trigger { display: flex; align-items: center; gap: 9px; padding: 4px 6px; height: 40px; cursor: pointer; font-size: 13px; font-weight: 650; list-style: none; border-radius: 10px; }
.profile-trigger::-webkit-details-marker { display: none; }
.profile-trigger:hover, .profile-menu[open] .profile-trigger { background: #f5f7fc; }
.profile-trigger svg { width: 13px; height: 13px; color: #8c98aa; }
.avatar { display: inline-flex; width: 32px; height: 32px; border-radius: 10px; align-items: center; justify-content: center; background: linear-gradient(135deg,#394766,#647795); color: white; font-size: 13px; font-weight: 650; }
.profile-name { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-dropdown { position: absolute; right: 0; top: 48px; width: 190px; padding: 7px; background: white; box-shadow: 0 16px 44px #1e325c29; border: 1px solid var(--line); border-radius: 12px; }
.profile-caption { padding: 8px 11px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; margin-bottom: 5px; }
.profile-dropdown button { display: flex; gap: 10px; align-items: center; background: transparent; border: 0; border-radius: 7px; padding: 10px; color: #526078; width: 100%; text-align: left; font-size: 13px; }
.profile-dropdown button:hover { background: var(--primary-light); color: var(--primary); }
.profile-dropdown form { margin: 0; }
.workspace-tabs { position: sticky; top: var(--header-height); z-index: 60; min-height: 40px; display: flex; align-items: center; gap: 5px; padding: 5px 20px; border-bottom: 1px solid var(--line); background: #fafbfd; overflow-x: auto; scrollbar-width: thin; }
.workspace-tab { display: flex; align-items: center; flex-shrink: 0; border: 1px solid var(--line); border-radius: 6px; background: white; color: #7a879b; height: 28px; overflow: hidden; }
.workspace-tab > button { border: 0; background: transparent; color: inherit; height: 100%; font-size: 12px; padding: 0 9px; white-space: nowrap; }
.workspace-tab > .tab-close { padding: 0 6px; display: flex; align-items: center; margin-left: -3px; }
.tab-close svg { width: 12px; height: 12px; }
.workspace-tab > button:hover { background: #597dff14; }
.workspace-tab.active { background: var(--primary); border-color: var(--primary); color: white; box-shadow: 0 3px 8px #597dff26; }
.workspace-tab.active > button:hover { background: #ffffff1a; }
#content { flex: 1; min-width: 0; padding: 24px 26px 30px; }
#content:focus { outline: none; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.page-heading h1 { margin: 4px 0 5px; font-size: 24px; line-height: 1.35; font-weight: 700; letter-spacing: -.035em; }
.page-heading p { color: var(--muted); margin: 0; font-size: 13px; line-height: 1.7; max-width: 980px; }
.page-heading > div:first-child { min-width: 0; }
.page-heading > .actions { flex-shrink: 0; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.primary, .secondary, .danger { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 8px 13px; border: 1px solid transparent; border-radius: 8px; font-size: 13px; font-weight: 650; line-height: 1.3; white-space: nowrap; }
.primary { color: white; background: var(--primary); box-shadow: 0 4px 10px #597dff20; }
.primary:hover { background: var(--primary-dark); }
.secondary { color: #4d5b73; background: white; border-color: var(--line-strong); }
.secondary:hover { color: var(--primary); border-color: #b5c5ff; background: #fbfcff; }
.danger { color: #cb4454; background: #fff1f3; border-color: #f8dadd; }
.button-link { display: inline-flex; }
.text-button { border: 0; background: transparent; padding: 5px; color: var(--muted); font-size: 13px; }
.text-button:hover { color: var(--primary); }
.metric-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; margin-bottom: 20px; }
#content[data-view="quota"] > .metric-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.metric-card, .panel { background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.metric-card { position: relative; padding: 18px; min-height: 124px; }
.metric-label { color: #6b788e; font-size: 13px; font-weight: 600; padding-right: 35px; }
.metric-value { margin: 8px 0 5px; font-size: clamp(23px,2.2vw,30px); font-weight: 700; line-height: 1.35; letter-spacing: -.04em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.metric-foot { font-size: 12px; color: #98a2b1; line-height: 1.5; }
.metric-icon { position: absolute; right: 18px; top: 18px; width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; background: #ecf8f3; border-radius: 12px; color: #48a389; }
.metric-icon svg { width: 22px; height: 22px; }
.dashboard-metrics .metric-card:first-child { background: linear-gradient(120deg,#5b78e6,#7490f9); color: white; border-color: #7794ff; box-shadow: 0 8px 20px #597dff29; }
.dashboard-metrics .metric-card:first-child .metric-label { color: #fff; }
.dashboard-metrics .metric-card:first-child .metric-foot { color: #e1e8ff; }
.dashboard-metrics .metric-card:first-child .metric-icon { color: white; background: #ffffff26; }
.dashboard-metrics .metric-card:nth-child(3) .metric-icon { color: #8a70c5; background: #f2edfc; }
.dashboard-metrics .metric-card:nth-child(4) .metric-icon { color: #6984e7; background: #eff3ff; }
.panel { padding: 20px; }
.panel h2 { margin: 0 0 5px; color: #29364d; font-size: 17px; font-weight: 650; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 20px; }
.panel-head .small { font-size: 12px; }
.dashboard-columns { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(0,1fr); gap: 20px; margin-bottom: 20px; }
.quick-links-panel { margin-bottom: 20px; }
.quick-links { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.quick-link { display: flex; align-items: center; gap: 12px; padding: 15px; border: 1px solid var(--line); border-radius: 10px; background: #fcfdff; color: var(--ink); text-align: left; }
.quick-link:hover { border-color: #b8c8ff; background: #f5f8ff; }
.quick-link > .quick-icon { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 9px; color: var(--primary); background: var(--primary-light); flex-shrink: 0; }
.quick-link > .ui-icon { margin-left: auto; color: #a1acbf; width: 15px; }
.quick-link strong, .quick-link small { display: block; }
.quick-link strong { font-size: 13px; font-weight: 650; }
.quick-link small { font-size: 12px; color: var(--muted); margin-top: 3px; }
.chart-legend { display: flex; gap: 14px; color: var(--muted); font-size: 12px; }
.chart-legend b { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; }
.chart { height: 195px; display: flex; align-items: flex-end; gap: 18px; padding: 20px 10px 24px; border-bottom: 1px solid var(--line); margin-bottom: 13px; position: relative; }
.chart::before { content: ""; position: absolute; inset: 20px 0 24px; background: repeating-linear-gradient(to top,transparent 0,transparent 44px,#edf1f7 45px); pointer-events: none; }
.chart-col { flex: 1; min-width: 0; height: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 6px; position: relative; }
.bar { width: 17px; max-width: 32%; border-radius: 4px 4px 0 0; background: #6485ef; min-height: 2px; z-index: 1; }
.bar.light { background: #91d6c6; }
.chart-col label { position: absolute; bottom: -26px; font-size: 11px; color: #94a0b3; white-space: nowrap; }
.chart-caption { margin: 20px 0 0; color: #98a2b3; font-size: 12px; }
.quota-panel { background: linear-gradient(140deg,#f6f9ff,#eef3ff); border-color: #dfe7fc; }
.quota-panel .panel-head { align-items: flex-start; }
.quota-main { font-size: 46px; line-height: 1.3; margin: 24px 0 10px; font-weight: 700; color: #4268d3; letter-spacing: -.04em; }
.quota-main small { font-size: 13px; font-weight: 400; color: #8596b7; margin-left: 8px; letter-spacing: 0; }
.quota-detail { display: flex; gap: 30px; border-top: 1px solid #dfe7f5; padding-top: 18px; margin-top: 25px; }
.quota-detail span { display: block; font-size: 12px; color: #8593ac; margin-bottom: 5px; }
.quota-detail strong { font-size: 22px; color: #465f95; font-weight: 650; }
.workflow { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 20px; padding: 4px 0; }
.workflow-item { padding-left: 18px; border-left: 1px solid var(--line); }
.workflow-item:first-child { border: 0; padding-left: 0; }
.workflow-item b { color: #859cea; margin-right: 8px; font-size: 12px; }
.workflow-item strong { font-size: 13px; font-weight: 600; }
.workflow-item p { color: #8b97ab; font-size: 12px; line-height: 1.8; margin: 8px 0 0; }
.notice { padding: 13px 16px; margin: 16px 0; border: 1px solid #dfe8f7; border-radius: 10px; background: #f5f9ff; color: #667b9f; font-size: 13px; line-height: 1.8; }
.notice.warning { background: #fffbf2; border-color: #f3e6c8; color: #9a7843; }
.filter-panel { padding: 16px 18px; margin-bottom: 20px; }
.search-box { display: flex; align-items: flex-end; gap: 9px; }
.search-field { flex: 1; min-width: 0; display: grid; gap: 7px; color: #526078; font-size: 12px; font-weight: 600; }
.search-field .input-with-icon input { padding-left: 36px; }
.table-panel { padding: 0; overflow: hidden; }
.table-tools { padding: 14px 18px; min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid #edf0f5; }
.table-tools h2 { font-size: 17px; margin: 0; }
.table-tools small { display: block; color: #929cad; font-size: 12px; margin-top: 3px; }
.table-wrap { overflow: auto; max-width: 100%; scrollbar-width: thin; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; font-size: 13px; color: #566278; }
th { padding: 11px 13px; text-align: left; background: #fafbfd; border-bottom: 1px solid var(--line); color: #596477; font-size: 12px; line-height: 1.35; font-weight: 650; }
td { padding: 12px 13px; border-bottom: 1px solid #edf0f5; line-height: 1.5; }
tr:last-child td { border-bottom: 0; }
tr:hover td { background: #fafbff; }
td strong { font-weight: 600; color: #34445e; }
td small { display: block; color: #98a2b3; font-size: 11px; margin-top: 4px; }
.user-identity-cell, .user-relation-cell { min-width: 116px; max-width: 180px; white-space: normal; overflow-wrap: anywhere; }
.user-role-cell { min-width: 92px; max-width: 146px; white-space: normal; }
.user-role-cell small { line-height: 1.65; }
.actions-cell { white-space: normal; min-width: 180px; width: 230px; }
.table-action { display: inline-flex; align-items: center; padding: 4px 5px; border: 0; border-radius: 5px; margin: 0 3px 0 0; color: #587be5; background: transparent; font-size: 12px; line-height: 1.5; white-space: nowrap; }
.table-action:hover { background: var(--primary-light); }
.table-action[data-action^="delete-"], .table-action.danger-text { color: #d46b78; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 6px; background: #ebf8f1; color: #39a17b; font-size: 11px; line-height: 1.5; }
.tag.warn { background: #fff5e3; color: #c18b31; }
.tag.bad { background: #fff0f2; color: #cf6371; }
.tag.neutral { background: #f0f3f8; color: #8b98aa; }
.empty { text-align: center; color: #8e9ab0; padding: 60px 20px; line-height: 2; }
.empty-icon { margin: 0 auto 12px; color: #bdc9df; }
.empty-icon svg { width: 36px; height: 36px; margin: auto; }
.pagination { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-top: 1px solid var(--line); color: #8793a8; font-size: 12px; gap: 12px; }
.pagination .secondary { min-height: 32px; padding: 5px 10px; font-size: 12px; font-weight: 500; }
.page-number { min-width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; background: var(--primary-light); border: 1px solid #d8e2ff; color: var(--primary); border-radius: 6px; }
input, select, textarea { border: 1px solid var(--line-strong); background: white; border-radius: 8px; padding: 9px 11px; max-width: 100%; min-width: 0; color: var(--ink); font-size: 14px; line-height: 1.55; }
input::placeholder, textarea::placeholder { color: #a3aab7; font-weight: 400; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: #869cfa; box-shadow: 0 0 0 3px #597dff15; }
input:read-only { background: #f7f9fc; color: #7e8ba3; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--primary); width: 15px; height: 15px; padding: 0; flex-shrink: 0; }
.field { display: grid; gap: 7px; margin: 16px 0; color: #4b5970; font-size: 13px; font-weight: 550; min-width: 0; }
.field input, .field select, .field textarea { width: 100%; font-weight: 400; }
.field input[type="checkbox"], .field input[type="radio"] { width: 15px; }
.field small { font-size: 12px; font-weight: 400; color: #8c97aa; }
.field-label { display: inline; }
.required-mark { color: #d16c7b; font-weight: 500; margin-left: 3px; }
.field-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 18px; }
.field-grid .wide { grid-column: 1 / -1; }
.field-grid .field { margin: 10px 0; }
.checks { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; padding: 10px 0; }
.checks label { display: flex; gap: 8px; align-items: center; color: #68758a; font-size: 13px; }
.input-with-icon { position: relative; display: block; }
.input-with-icon > svg { position: absolute; top: 50%; left: 12px; transform: translateY(-50%); color: #98a2b3; width: 17px; height: 17px; }
.input-with-icon > input { width: 100%; }
.form-actions { display: flex; justify-content: flex-end; gap: 9px; position: sticky; bottom: -20px; z-index: 1; border-top: 1px solid var(--line); background: #fbfcfe; margin: 22px -20px -20px; padding: 12px 20px; min-height: 64px; }
.form-error, .error-box { padding: 11px 13px; border: 1px solid #ffd4d8; background: #fff5f6; color: #b93442; border-radius: 8px; font-size: 13px; line-height: 1.8; white-space: pre-line; margin: 12px 0; }
.form-error:empty { display: none; }
dialog { width: 780px; max-width: calc(100vw - 48px); max-height: min(86vh,900px); border: 1px solid #ffffffbf; border-radius: 16px; padding: 0; background: white; color: var(--ink); box-shadow: 0 16px 44px #1e325c29; overflow: hidden; }
dialog[open] { display: flex; flex-direction: column; }
dialog::backdrop { background: #121c2f75; backdrop-filter: blur(3px); }
body:has(dialog[open]) { overflow: hidden; }
.modal-top { padding: 17px 20px; min-height: 70px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-shrink: 0; }
.modal-top h2 { font-size: 18px; font-weight: 650; margin: 0; color: #29364d; }
.modal-top .icon-button { width: 32px; height: 32px; }
#modal-content { padding: 20px; overflow: auto; min-height: 0; overscroll-behavior: contain; }
#modal-content > .notice:first-child, #operation-form > .notice:first-child { margin-top: 0; }
.section-label { font-size: 14px; font-weight: 600; padding: 16px 0 12px; border-top: 1px solid var(--line); margin-top: 16px; }
.section-label:first-child { margin-top: 0; border-top: 0; }
.finger-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.finger-card { padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #f8faff; min-width: 0; }
.finger-card h4 { font-size: 13px; margin: 0 0 10px; }
.collection-image-card { margin-bottom: 10px; }
.collection-image-button { display: block; width: 100%; min-height: 80px; padding: 6px; border: 1px solid var(--line); background: #fff; border-radius: 8px; cursor: zoom-in; }
.collection-image-button img { display: block; width: 100%; height: 180px; object-fit: contain; }
.collection-image-button img[hidden] { display: none; }
.collection-image-expanded .collection-image-button { cursor: zoom-out; }
.collection-image-expanded .collection-image-button img { height: min(65vh, 580px); }
.finger-inputs { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.finger-card input, .finger-card select { width: 100%; font-size: 12px; padding: 8px; }
.file-status { font-size: 12px; color: #8c98ac; margin-top: 7px; }
.info-list, .detail-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.info-list dt, .detail-grid dt { font-size: 12px; color: #8c98aa; margin-bottom: 8px; }
.info-list dd, .detail-grid dd { margin: 0; color: #4b5c76; font-size: 13px; overflow-wrap: anywhere; }
.pre-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.9; font-size: 13px; max-height: 45vh; overflow: auto; padding: 15px; background: #f6f8fc; border-radius: 8px; }
.settings-row { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr) auto; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--line); align-items: center; }
.settings-row:last-child { border-bottom: 0; }
.settings-row h3 { font-size: 14px; margin: 0 0 7px; font-weight: 600; }
.settings-row small { color: #8c98aa; font-size: 12px; }
.agency-search { display: flex; gap: 8px; }
.agency-search input { flex: 1; min-width: 0; }
.agency-search button { flex-shrink: 0; }
.agency-picker { margin: 12px 0 20px; }
.agency-picker .field { margin-bottom: 8px; }
.agency-details > div { display: grid; grid-template-columns: 155px minmax(0,1fr); gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.agency-details span { color: var(--muted); }
.agency-details strong { font-weight: 500; overflow-wrap: anywhere; }
dialog:has(.account-center) { width: 920px; }
.account-identity { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 16px; margin-bottom: 18px; overflow-wrap: anywhere; }
.account-identity strong { font-size: 20px; }
.account-identity span { font-size: 13px; }
.account-tabs { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.account-tabs [aria-pressed="true"] { background: var(--primary); color: white; border-color: var(--primary); }
.account-metrics { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-bottom: 18px; }
.account-metrics .metric-label { padding-right: 0; }
.account-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.account-toolbar .field { margin-bottom: 0; }
.account-ledger td:last-child { min-width: 180px; max-width: 280px; white-space: normal; overflow-wrap: anywhere; }
.account-center .pagination { flex-wrap: wrap; gap: 12px; padding-inline: 0; }
.activation-rights-grid { display: grid; gap: 12px; }
.activation-right-row { display: grid; grid-template-columns: minmax(150px,1.2fr) minmax(130px,1fr) minmax(150px,1fr); align-items: start; gap: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; }
.activation-right-row.is-disabled { background: #f8fafc; }
.activation-tier { display: flex; align-items: start; gap: 10px; padding-top: 8px; cursor: pointer; }
.activation-tier input { width: 18px; height: 18px; margin: 2px 0; accent-color: var(--primary); flex-shrink: 0; }
.activation-tier small { display: block; margin-top: 6px; color: var(--muted); }
.activation-right-row .field { margin-bottom: 0; min-width: 0; }
.activation-right-row input[type=number] { width: 100%; }
.activation-reload { margin: 16px 0; }
@media (max-width: 600px) {
  .activation-right-row { grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 12px; padding: 12px; }
  .activation-tier { grid-column: 1 / -1; padding-top: 0; }
}
.agency-policy-panel .panel-head { margin: 0; padding: 16px 18px; }
.agency-policy-panel + .agency-policy-panel { margin-top: 20px; }
.wrap-cell { white-space: normal; max-width: 380px; min-width: 210px; line-height: 1.8; }
.loading { padding: 90px 20px; text-align: center; color: #8c98ab; font-size: 13px; }
.loading::before { content: ""; display: block; margin: 0 auto 20px; width: 25px; height: 25px; border-radius: 50%; border: 3px solid #e7ecf7; border-right-color: var(--primary); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.page-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 26px; font-size: 11px; color: #a0a9b9; }
#toast { position: fixed; z-index: 120; right: 24px; bottom: 24px; max-width: min(400px,calc(100vw - 32px)); padding: 13px 20px; border-radius: 10px; background: #344765; color: white; box-shadow: 0 10px 35px #1e325c29; font-size: 13px; }
.page-search-dialog { width: 570px; margin-top: min(18vh,150px); max-height: 70vh; }
#page-search-form { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--line); color: #8d9bb1; }
#page-search-input { flex: 1; border: 0; box-shadow: none; outline: 0; padding: 3px 0; background: white; }
.search-escape { border: 1px solid var(--line); border-radius: 5px; padding: 2px 5px; background: #f8fafd; color: #95a0b1; font-size: 11px; }
#page-search-results { overflow: auto; padding: 8px; }
.search-result { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 0; border-radius: 8px; background: white; color: #50607b; padding: 11px 12px; font-size: 13px; }
.search-result small { margin-left: auto; color: #a1abbb; }
.search-result:hover, .search-result:focus { background: var(--primary-light); color: var(--primary); outline: 0; }
.search-hint { display: flex; justify-content: space-between; padding: 10px 18px; border-top: 1px solid var(--line); color: #98a4b6; font-size: 11px; }
.login-page { position: relative; min-height: 100svh; padding: 32px 20px; display: grid; place-items: center; isolation: isolate; overflow-x: hidden; background: radial-gradient(circle at 18% 18%,#6491ff33,transparent 30%),radial-gradient(circle at 82% 80%,#5bcade2b,transparent 28%),linear-gradient(145deg,#eff5ff 0%,#f8fbff 52%,#eef9fc 100%); }
.login-decoration { position: absolute; z-index: -1; inset: 0; overflow: hidden; pointer-events: none; }
.login-decoration::before, .login-decoration::after { content: ""; position: absolute; width: 360px; height: 360px; border: 1px solid #597dff1c; border-radius: 50%; }
.login-decoration::before { top: -190px; right: -70px; }
.login-decoration::after { bottom: -210px; left: -80px; }
.login-grid-lines { position: absolute; z-index: -1; inset: 0; opacity: .3; background-image: linear-gradient(#5a76a414 1px,transparent 1px),linear-gradient(90deg,#5a76a414 1px,transparent 1px); background-size: 72px 72px; mask-image: radial-gradient(circle,black,transparent 78%); }
.login-card { width: min(100%,460px); padding: 35px 36px 26px; border: 1px solid #ffffffe6; border-radius: 22px; background: #ffffffe6; box-shadow: 0 30px 70px #3b527f2e; backdrop-filter: blur(16px); }
.login-brand { display: flex; align-items: center; margin-bottom: 34px; }
.login-brand img { display: block; width: 250px; max-width: 100%; height: auto; }
.login-copy { margin-bottom: 26px; }
.login-copy h2 { font-size: 27px; letter-spacing: -.04em; margin: 6px 0 7px; line-height: 1.4; }
.login-copy p { margin: 0; color: var(--muted); font-size: 16px; }
.login-form { display: grid; gap: 17px; }
.login-form .field { margin: 0; }
.login-form input { padding: 9px 11px 9px 40px; }
.login-options { display: flex; justify-content: space-between; gap: 12px; color: #919bac; font-size: 13px; margin: 3px 0; }
.login-submit { width: 100%; min-height: 48px; font-size: 16px; margin-top: 1px; justify-content: space-between; padding: 12px 14px; }
.login-security { margin-top: 20px; padding: 13px; border-radius: 10px; display: flex; align-items: center; gap: 10px; color: #6d7990; background: #f6f8fc; font-size: 12px; line-height: 1.65; }
.login-security svg { color: var(--primary); }
.login-security strong { display: block; color: #455269; font-size: 13px; }
.login-card footer { margin-top: 22px; color: #a0a9b8; font-size: 12px; text-align: center; }
.error-page { max-width: 550px; margin: 15vh auto; background: white; padding: 40px; border-radius: 14px; }
.error-page p { margin: 20px 0 30px; color: var(--muted); }
@media (min-width: 901px) {
  .sidebar-collapsed { --sidebar-width: 72px; }
  .sidebar-collapsed .sidebar-brand { padding: 12px 17px; }
  .sidebar-collapsed .brand-full { display: none; }
  .sidebar-collapsed .brand-compact { display: block; }
  .sidebar-collapsed .nav-text, .sidebar-collapsed .nav-chevron, .sidebar-collapsed .nav-children, .sidebar-collapsed .sidebar-bottom > div { display: none; }
  .sidebar-collapsed .nav-item { justify-content: center; padding: 11px; }
  .sidebar-collapsed .sidebar-bottom { justify-content: center; padding: 12px 0; min-height: 44px; }
}
@media (max-width: 1300px) {
  .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .metric-value { font-size: 28px; }
  .quick-links { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .command-trigger { width: 160px; }
  .topbar { padding: 0 16px; }
  .profile-name { max-width: 100px; }
}
@media (max-width: 1100px) {
  .breadcrumb-area .breadcrumb-parent { display: none; }
  .header-right .env-chip { display: none; }
  .dashboard-columns { grid-template-columns: minmax(0,1.3fr) minmax(0,1fr); gap: 16px; }
  #content { padding: 22px 20px; }
  .page-heading { align-items: flex-start; }
}
@media (max-width: 900px) {
  .sidebar { width: 236px; transform: translateX(-100%); }
  .sidebar-brand { padding: 12px; gap: 8px; }
  .sidebar .brand-full { width: 165px; }
  #sidebar-close { display: inline-flex; width: 30px; height: 32px; margin-left: auto; }
  .workspace { margin-left: 0; }
  #content[data-view="quota"] > .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .menu-open .sidebar { transform: translateX(0); }
  #nav-backdrop:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 80; border: 0; background: #14283d66; }
  body.menu-open { overflow: hidden; }
  .workspace-tabs { padding: 5px 16px; }
  .page-footer { padding: 16px 20px; }
}
@media (max-width: 650px) {
  :root { --header-height: 58px; }
  .topbar { gap: 8px; padding: 0 10px; }
  .topbar-left { gap: 2px; flex: 1; }
  .header-right { gap: 3px; }
  .header-right .env-chip, #refresh-page, .profile-name, .profile-trigger > [data-icon] { display: none; }
  .command-trigger { width: 36px; height: 36px; padding: 8px; border: 0; background: transparent; }
  .command-trigger > span:not([data-icon]), .command-trigger kbd { display: none; }
  .breadcrumb-area { overflow: hidden; gap: 5px; font-size: 12px; }
  .breadcrumb-area #home-link:not(:only-child) { display: none; }
  .breadcrumb-area #home-link:has(+ #breadcrumb:empty) { display: block; }
  #breadcrumb > .ui-icon:first-child { display: none; }
  #breadcrumb { gap: 5px; }
  .profile-trigger { padding: 3px; }
  .workspace-tabs { padding: 5px 12px; }
  #content { padding: 20px 14px; }
  .page-heading { flex-wrap: wrap; gap: 12px; }
  .page-heading h1 { font-size: 22px; }
  .page-heading p { font-size: 12px; }
  .metric-grid { gap: 10px; }
  .metric-card { padding: 14px; min-height: 126px; }
  .metric-label { font-size: 12px; padding-right: 22px; }
  .metric-value { font-size: 25px; margin-top: 14px; }
  .metric-foot { font-size: 11px; }
  .metric-icon { width: 29px; height: 29px; top: 12px; right: 11px; border-radius: 8px; }
  .metric-icon svg { width: 16px; height: 16px; }
  .dashboard-columns { grid-template-columns: 1fr; }
  .chart { gap: 10px; }
  .quick-links { grid-template-columns: 1fr; gap: 9px; }
  .quick-link { padding: 12px; }
  .panel { padding: 16px; }
  .table-panel { padding: 0; }
  .table-tools { flex-wrap: wrap; padding: 14px; gap: 10px; }
  .table-tools h2 { font-size: 15px; }
  .table-tools .actions { gap: 6px; }
  .search-box { flex-wrap: wrap; }
  .search-field { flex-basis: 100%; }
  .filter-panel { padding: 14px; }
  .pagination { flex-wrap: wrap; padding: 14px; gap: 10px; }
  .pagination .actions { margin-left: auto; }
  .workflow { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px 12px; }
  .workflow-item { padding-left: 12px; }
  .workflow-item:nth-child(3) { border: 0; padding-left: 0; }
  .workflow-item strong { font-size: 12px; }
  .panel-head { gap: 10px; flex-wrap: wrap; }
  .field-grid, .finger-grid, .info-list, .detail-grid, .settings-row { grid-template-columns: 1fr; }
  .checks { grid-template-columns: 1fr; }
  .agency-details > div { grid-template-columns: 105px minmax(0,1fr); gap: 10px; }
  dialog { max-width: calc(100vw - 24px); max-height: 90dvh; border-radius: 13px; }
  .modal-top { padding: 14px 16px; min-height: 62px; }
  .modal-top h2 { font-size: 17px; }
  #modal-content { padding: 16px; }
  .form-actions { margin: 22px -16px -16px; padding: 12px 16px; bottom: -16px; }
  .page-footer { padding: 16px 14px; }
  .page-footer > span:last-child { display: none; }
  .login-page { padding: 24px 16px; }
  .login-card { padding: 28px 24px 24px; }
  .login-brand img { width: 230px; }
  .login-copy h2 { font-size: 25px; }
  .login-copy p { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

.user-uid-cell { min-width: 125px; max-width: 155px; white-space: normal; overflow-wrap: anywhere; font: 12px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); }
.user-phone-link { border: 0; background: transparent; padding: 4px 0; color: #3468dc; font: inherit; cursor: pointer; white-space: nowrap; }
.user-phone-link:hover { text-decoration: underline; }
.user-phone-link:focus-visible { outline: 2px solid #3468dc; outline-offset: 3px; border-radius: 3px; }
.user-counts-cell { min-width: 115px; }
.user-counts-cell span { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #64748b; font-size: 12px; line-height: 1.8; }
.user-counts-cell b { color: #25334c; font-weight: 600; font-variant-numeric: tabular-nums; }
.user-role-cell .tag { white-space: nowrap; }
[data-view="users"] .actions-cell, [data-view="users-trash"] .actions-cell {
  position: sticky; right: 0; z-index: 1; min-width: 130px; width: 150px; background: #fff; box-shadow: -1px 0 0 #edf0f5;
}
[data-view="users"] table:has(.actions-cell) th:last-child, [data-view="users-trash"] table:has(.actions-cell) th:last-child {
  position: sticky; right: 0; z-index: 2; box-shadow: -1px 0 0 #edf0f5;
}

/* 内容管理 › 文章管理。编辑器照小程序详情版式排列，小节与引言句是成块的结构，
   所以给它们一个可见的边框；其余字段沿用通用的 .field / .field-grid。 */
.article-section { border: 1px solid var(--line); border-radius: 10px; padding: 0 14px 8px; margin: 12px 0; background: #fcfdff; }
.article-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; font-size: 13px; }
.article-quote { border: 1px dashed #cfd9ea; border-radius: 10px; padding: 0 14px 12px; margin: 12px 0; background: #f7faff; }
.article-quote p { margin: 0; }
.article-image { display: grid; gap: 8px; margin: 14px 0; color: #4b5970; font-size: 13px; font-weight: 550; }
.article-image input[type="file"] { font-weight: 400; font-size: 12px; }
.article-image-preview { display: inline-flex; align-items: center; gap: 10px; }
.article-image-preview img { width: 104px; height: 68px; object-fit: cover; border: 1px solid var(--line); border-radius: 8px; }
.article-image-note { font-size: 12px; font-weight: 400; color: #8c97aa; line-height: 1.8; white-space: pre-line; }
.article-image-note.bad { color: #b93442; }
.form-actions-inline { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 4px 0 8px; }
.article-gate { margin: 14px 0 0; font-size: 13px; line-height: 1.8; color: #667b9f; }
.article-gate.bad { color: #b93442; }

/* 分享海报编辑器（share-poster.js）。纯追加，不改既有选择器。
   弹窗宽度靠 :has() 就地放宽，不给 #modal 加类——关闭弹窗的逻辑在 platform.js 里，
   加了类就得有人负责摘掉它，而那不是本模块能管到的地方。 */
dialog:has(.poster-editor) { width: 1080px; }
.poster-editor { display: grid; grid-template-columns: minmax(0,320px) minmax(0,1fr); gap: 20px; align-items: start; margin: 16px 0; }
.poster-stage-col { position: sticky; top: 0; }
.poster-stage { display: flex; justify-content: center; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: repeating-conic-gradient(#f2f5fa 0 25%, #fff 0 50%) 0 0 / 18px 18px; }
/* canvas 的固有尺寸就是画布像素，所以 width/height 留 auto，靠 max-* 等比缩放。
   写死 width:100% 会把高画布压扁——预览与导出就不是同一张图了。 */
.poster-stage canvas { max-width: 100%; max-height: 54vh; width: auto; height: auto; border-radius: 6px; box-shadow: 0 2px 10px #1e325c1f; touch-action: none; cursor: move; }
.poster-stage canvas:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.poster-note { margin: 8px 0 0; font-size: 12px; line-height: 1.8; color: #8c97aa; }
.poster-note.bad { color: #b93442; }
.poster-note code { font-size: 11px; padding: 1px 4px; border-radius: 4px; background: #f0f3f8; }
.poster-side { min-width: 0; }
.poster-side .section-label { padding-top: 12px; }
.poster-num-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px 12px; padding: 4px 0 2px; }
.poster-num { display: flex; flex-direction: column; gap: 5px; min-width: 0; font-size: 12px; color: #68758a; }
.poster-num-wide { grid-column: 1 / -1; }
.poster-num input, .poster-num select { width: 100%; padding: 7px 9px; border: 1px solid var(--line-strong); border-radius: 8px; background: white; color: var(--ink); }
.poster-num input[type="color"] { padding: 2px; height: 34px; }
.poster-num input[type="checkbox"] { width: 18px; height: 18px; margin: 8px 0 0; }
.poster-num .secondary { width: 100%; }
.poster-layer { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; margin: 6px 0; background: #fcfdff; }
.poster-layer.selected { border-color: var(--primary); background: var(--primary-light); }
.poster-layer-name { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 2px 0; border: 0; background: transparent; color: var(--ink); font-size: 13px; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.poster-layer-tools { flex: 0 0 auto; white-space: nowrap; }
@media (max-width: 900px) {
  .poster-editor { grid-template-columns: 1fr; }
  .poster-stage-col { position: static; }
  .poster-stage canvas { max-height: 46vh; }
  .poster-num-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

/* Default invitation editor: daily operations first; positioning remains optional. */
.invite-list-thumb{display:block;width:42px;height:67px;object-fit:cover;border-radius:7px}
dialog:has(.invite-simple){width:940px}
.invite-simple{display:grid;grid-template-columns:minmax(0,340px) minmax(0,1fr);gap:28px;margin:16px 0}
.invite-simple-preview canvas{display:block;width:100%;height:auto;max-height:64vh;object-fit:contain;border-radius:14px;background:#f5f5ea}
.invite-simple-fields{min-width:0}.invite-simple-fields .field{margin-bottom:16px}
.invite-activate{display:flex;gap:9px;align-items:center;font-size:14px;margin:16px 0}
.invite-activate input{width:18px;height:18px;flex:none}
.invite-options{border-top:1px solid var(--line);margin-top:24px;padding-top:16px}
.invite-options summary{cursor:pointer;font-size:13px;color:var(--muted);margin-bottom:14px}
.invite-options .secondary{margin-top:16px}
@media(max-width:700px){.invite-simple{grid-template-columns:1fr}.invite-simple-preview canvas{max-height:45vh}.invite-simple-preview{max-width:300px;margin:auto}}

.user-remark-cell { min-width: 160px; max-width: 240px; white-space: normal; }
.user-remark-text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }
