/* // Copyright (c) Raxiny. All rights reserved. */
:root {
  color-scheme: light;
  --canvas: #fafafa;
  --paper: #fff;
  --ink: #18181b;
  --sub: #64646c;
  --faint: #929298;
  --line: #e4e4e7;
  --line2: #efeff1;
  --nav: #f6f6f7;
  --accent: #18794e;
  --accent-dark: #11633f;
  --accent-soft: #edf7f1;
  --green: #18794e;
  --green-soft: #edf7f1;
  --blue: #52525b;
  --blue-soft: #f0f0f2;
  --red: #b42336;
  --red-soft: #fff1f2;
  --amber: #92600e;
  --amber-soft: #fffaeb;
  --radius: 6px;
  --background: 0 0% 100%;
  --foreground: 240 10% 10%;
  --primary: 153 67% 28%;
  --primary-foreground: 0 0% 100%;
  --secondary: 240 5% 96%;
  --secondary-foreground: 240 6% 10%;
  --ui-accent: 240 5% 96%;
  --accent-foreground: 240 6% 10%;
  --muted: 240 5% 96%;
  --muted-foreground: 240 4% 42%;
  --border: 240 6% 89%;
  --input: 240 6% 86%;
  --ring: 153 67% 28%;
  --destructive: 352 68% 42%;
  --destructive-foreground: 0 0% 100%;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--canvas); color: var(--ink); }
body { font: 13px/1.55 "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }
button, summary { cursor: pointer; }
button { border-style: solid; }
svg { width: 18px; height: 18px; flex-shrink: 0; }
h1, h2, h3, p { margin-top: 0; }
h3 { font-size: 14px; font-weight: 650; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.muted { color: var(--sub); }
.nowrap { white-space: nowrap; }
.clip { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
code, .mono { font: 12px/1.6 "SFMono-Regular", Menlo, Consolas, monospace; }
.skip-link { position: fixed; top: -60px; left: 16px; background: var(--ink); color: #fff; padding: 10px 16px; z-index: 150; }
.skip-link:focus { top: 12px; }
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 224px; background: var(--nav); border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 60; }
.brand-block { min-height: 76px; padding: 20px 18px; display: flex; align-items: center; gap: 10px; }
.brand-mark { height: 30px; width: 30px; border-radius: 5px; background: var(--ink); color: white; display: grid; place-items: center; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.brand-title { font-size: 13px; font-weight: 650; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 12px 16px; scrollbar-width: thin; }
.nav-section { padding: 22px 10px 7px; color: var(--sub); font-size: 11px; font-weight: 500; }
.nav-section:first-child { padding-top: 8px; }
.nav-link { min-height: 36px; padding: 8px 10px; border-radius: 4px; display: flex; align-items: center; gap: 10px; margin: 2px 0; color: #55555d; transition: background .15s; }
.nav-link svg { width: 16px; height: 16px; stroke-width: 1.6; }
.nav-link:hover { background: #ebebed; color: var(--ink); }
.nav-link.is-active { background: #e5eee8; color: #12613d; font-weight: 650; }
.sidebar-foot { padding: 10px 12px; border-top: 1px solid var(--line); }
.workspace { margin-left: 224px; min-width: 0; }
.commandbar { height: 76px; padding: 0 32px; border-bottom: 1px solid var(--line); background: #fff; display: flex; justify-content: space-between; align-items: center; gap: 16px; position: sticky; top: 0; z-index: 40; }
.page-heading { display: flex; align-items: center; gap: 10px; min-width: 0; }
.page-heading h1 { margin: 0; font-size: 18px; font-weight: 650; letter-spacing: -.03em; }
.system-pill { display: flex; align-items: center; gap: 12px; font-size: 11px; color: var(--sub); font-variant-numeric: tabular-nums; }
.time-divider { width: 1px; height: 12px; background: var(--line); }
.mobile-menu { display: none; border: 0; background: transparent; padding: 8px; }
.content { padding: 28px 32px 48px; width: 100%; max-width: 1920px; margin: auto; }
.scrim { position: fixed; inset: 0; background: rgb(9 12 11 / .35); z-index: 55; opacity: 0; pointer-events: none; }
.scrim.is-open { opacity: 1; pointer-events: auto; }
.card { padding: 20px; margin-bottom: 24px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.card .card { border: 0; padding: 0; box-shadow: none; }
.hd { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.hd h3 { margin: 0; }
.page-intro { display: flex; justify-content: flex-end; gap: 12px; margin-bottom: 20px; }
.page-intro:empty { display: none; }
.grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); margin-bottom: 24px; gap: 0; background: #fff; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.stat { padding: 22px 24px; border-right: 1px solid var(--line); transition: background .15s; }
.stat:last-child { border-right: 0; }
.resource-stats { grid-template-columns: repeat(5,minmax(0,1fr)); }
.stat:hover { background: #f7faf8; }
.stat .label { display: flex; align-items: center; gap: 9px; color: var(--sub); font-size: 12px; }
.stat .ico { display: grid; place-items: center; color: var(--sub); }
.stat .ico svg { width: 15px; height: 15px; }
.stat b { display: block; font-size: 32px; font-weight: 600; letter-spacing: -.04em; margin-top: 13px; font-variant-numeric: tabular-nums; }
.trend-grid { display: grid; grid-template-columns: minmax(0,1.8fr) minmax(260px,1fr); gap: 24px; background: transparent; border: 0; border-radius: 0; overflow: visible; }
.trend-grid > .card { margin-bottom: 0; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar-grow { flex: 1; min-width: 180px; }
.field, input, select, textarea { border: 1px solid #d4d4d8; border-radius: 5px; min-height: 36px; padding: 7px 10px; color: var(--ink); background: white; outline: none; transition: border-color .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: 2px solid #d7ebdf; outline-offset: 1px; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); }
textarea { resize: vertical; }
input[type=file] { max-width: 100%; font-size: 12px; }
input::file-selector-button { border: 0; border-right: 1px solid var(--line); background: #f4f4f5; padding: 4px 12px; margin: -4px 12px -4px -6px; color: var(--ink); cursor: pointer; }
.btn { min-height: 36px; border: 1px solid var(--accent); border-radius: 5px; background: var(--accent); color: white; padding: 7px 13px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-size: 12px; font-weight: 550; cursor: pointer; transition: background .15s; white-space: nowrap; }
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn.ghost { background: white; border-color: #d4d4d8; color: var(--ink); }
.btn.ghost:hover { background: #f4f4f5; }
.btn.green { background: var(--green); border-color: var(--green); }
.btn.red { background: white; color: var(--red); border-color: #f0cbd1; }
.btn.red:hover { background: var(--red-soft); }
.btn.orange { background: white; color: var(--amber); border-color: #eadbb7; }
.btn.blue { background: #3f3f46; border-color: #3f3f46; }
.btn.sm { min-height: 28px; padding: 4px 8px; font-size: 11px; border-radius: 4px; }
.btn.btn-link { border: 0; background: transparent; color: var(--accent); padding: 3px; min-height: 0; }
.actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.actions form { margin: 0; }
.quick-tabs { display: flex; align-items: center; gap: 22px; border-bottom: 1px solid var(--line); width: 100%; overflow-x: auto; margin-bottom: 20px; }
.quick-tabs a { padding: 10px 0 12px; border-bottom: 2px solid transparent; color: var(--sub); white-space: nowrap; font-size: 12px; }
.quick-tabs a:hover { color: var(--ink); }
.quick-tabs a.is-active { border-bottom-color: var(--ink); color: var(--ink); font-weight: 650; }
.quick-tabs a.switch-action { margin-left: auto; color: var(--accent); }
.table-wrap { width: 100%; overflow: auto; overscroll-behavior-inline: contain; background: white; }
.account-category-filters { padding: 12px 16px; display: grid; gap: 6px; }
.account-category-reset { justify-self: start; color: var(--accent-dark); font-size: 12px; padding: 4px 0; }
.password-category-tabs { display: flex; align-items: center; gap: 4px; overflow-x: auto; }
.password-category-tabs a { padding: 5px 10px; border-radius: 4px; color: var(--sub); font-size: 12px; white-space: nowrap; }
.password-category-tabs a:hover { background: #f4f4f5; color: var(--ink); }
.password-category-tabs a.is-active { background: var(--accent-soft); color: var(--accent-dark); font-weight: 650; }
.password-status-control { display: inline-flex; padding: 2px; gap: 2px; border: 1px solid var(--line); border-radius: 5px; white-space: nowrap; }
.password-status-control button { min-height: 28px; padding: 4px 8px; border: 0; border-radius: 3px; background: transparent; color: var(--sub); font-size: 11px; }
.password-status-control button:hover { background: #f4f4f5; color: var(--ink); }
.password-status-control button[aria-pressed=true] { background: var(--accent-soft); color: var(--accent-dark); cursor: default; font-weight: 600; }
.account-mark-controls { display: grid; gap: 5px; }
.account-mark-row { display: flex; align-items: center; gap: 8px; margin: 0; }
.account-mark-label { min-width: 24px; color: var(--sub); font-size: 11px; white-space: nowrap; }
.table-wrap table { min-width: 860px; }
.data-card { padding: 0; overflow: hidden; }
.data-card .toolbar { padding: 16px; margin: 0; border-bottom: 1px solid var(--line); }
.data-card .pager { padding: 14px 16px; margin: 0; border-top: 1px solid var(--line); }
@media (min-width: 821px) {
  [data-sticky-actions] :is(th,td):last-child { position: sticky; right: 0; background: var(--paper); border-left: 1px solid var(--line); z-index: 3; }
  [data-sticky-actions] th:last-child { background: #fafafa; z-index: 4; }
}
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12px; }
th { background: #fafafa; color: var(--sub); font-size: 11px; font-weight: 500; position: sticky; top: 0; z-index: 2; white-space: nowrap; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
tbody tr { height: 60px; }
tbody tr:hover { background: #fafcfb; }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
.empty-state { padding: 64px 20px !important; color: var(--sub); text-align: center !important; }
.tag { display: inline-flex; align-items: center; gap: 5px; border-radius: 4px; padding: 3px 7px; font-size: 10px; font-weight: 500; white-space: nowrap; }
.tag:before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.tag.ok { background: var(--green-soft); color: var(--green); }
.tag.bad { background: var(--red-soft); color: var(--red); }
.tag.warn { background: var(--amber-soft); color: var(--amber); }
.tag.blue, .tag.gray { background: #f0f0f2; color: #52525b; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.pager .info { font-size: 11px; color: var(--sub); }
.pager .ctrl { display: flex; gap: 6px; }
.data-preview { display: flex; align-items: center; gap: 8px; max-width: 300px; }
.data-preview code { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; background: #f4f4f5; padding: 5px 8px; border-radius: 3px; }
.icon-btn { width: 28px; height: 28px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 4px; background: white; color: var(--sub); flex-shrink: 0; cursor: pointer; }
.icon-btn svg { width: 14px; height: 14px; }
.icon-btn:hover { background: var(--accent-soft); color: var(--accent); }
.drawer-mask { position: fixed; inset: 0; background: rgb(9 12 11 / .35); z-index: 80; opacity: 0; pointer-events: none; }
.drawer-mask.is-open { opacity: 1; pointer-events: auto; }
.detail-drawer { position: fixed; inset: 0 0 0 auto; width: min(520px,94vw); background: white; z-index: 81; transform: translateX(102%); transition: transform .2s ease; border-left: 1px solid var(--line); display: flex; flex-direction: column; }
.detail-drawer.is-open { transform: none; }
.drawer-head { padding: 20px 24px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.drawer-head h3 { margin: 0; }
.drawer-body { padding: 8px 24px 24px; overflow: auto; }
.drawer-label { font-size: 11px; color: var(--sub); margin: 20px 0 6px; }
.drawer-value { word-break: break-all; padding: 0 0 12px; border-bottom: 1px solid var(--line2); }
.drawer-actions { display: flex; gap: 8px; margin-top: 24px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%,12px); border-radius: 5px; background: var(--ink); color: white; padding: 10px 16px; z-index: 120; opacity: 0; pointer-events: none; transition: .15s; }
.toast.is-show { opacity: 1; transform: translate(-50%,0); }
.bars { height: 228px; display: grid; grid-template-columns: repeat(7,1fr); gap: 12px; align-items: end; padding-top: 16px; background: repeating-linear-gradient(to top,transparent 0,transparent 47px,#efeff1 47px,#efeff1 48px); }
.bars .col { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.bar { background: var(--green); border-radius: 2px 2px 0 0; }
.bar2 { background: #c4c4cb; }
.mini { text-align: center; color: var(--sub); font-size: 10px; margin-top: 10px; background: white; }
.mini b { display: block; color: var(--ink); font-size: 11px; font-weight: 500; }
.chart-legend { display: flex; gap: 18px; margin-top: 20px; font-size: 11px; color: var(--sub); }
.chart-legend span { display: flex; align-items: center; gap: 6px; }
.chart-legend i { width: 7px; height: 7px; border-radius: 1px; background: var(--green); }
.chart-legend span:last-child i { background: #c4c4cb; }
.alert { padding: 10px 12px; border-radius: 5px; margin-bottom: 14px; }
.alert.err { background: var(--red-soft); color: var(--red); }
.alert.ok { background: var(--green-soft); color: var(--green); }
.alert.info { background: #f0f0f2; color: var(--ink); }
.rawtext { width: 100%; min-height: 130px; font: 12px/1.6 "SFMono-Regular", Menlo, monospace; }
.bulk-actions { border-top: 1px solid var(--line); padding: 16px 0; margin-top: 28px; }
.bulk-actions summary { color: var(--red); font-size: 12px; width: fit-content; }
.bulk-actions[open] summary { margin-bottom: 18px; }
.bulk-actions .toolbar { margin-bottom: 0; }
.bulk-actions label { font-size: 12px; }
.export-fallback { border: 1px solid var(--line); border-radius: 5px; padding: 12px; margin-bottom: 20px; }
.export-fallback summary { font-size: 12px; }
.export-fallback[open] summary { margin-bottom: 16px; }
.export-fallback .toolbar { margin-bottom: 0; }
.login-wrap { min-height: 100dvh; padding: 24px; display: grid; place-items: center; background: radial-gradient(#dadade .7px,transparent .7px) 0 0 / 18px 18px,#fafafa; }
.login { background: white; width: min(380px,100%); padding: 32px; border: 1px solid var(--line); border-radius: 6px; }
.login .logo { width: 34px; height: 34px; background: var(--ink); color: white; border-radius: 5px; display: grid; place-items: center; font-weight: 700; margin-bottom: 24px; }
.login h1 { font-size: 20px; font-weight: 650; margin-bottom: 28px; }
.login label { display: grid; gap: 7px; margin-bottom: 16px; font-size: 12px; }
.login input, .login .btn { width: 100%; min-height: 40px; }
.login .btn { margin-top: 8px; }
.login-copyright { font-size: 10px; color: var(--sub); margin: 24px 0 0; text-align: center; }
@media (max-width: 1180px) {
  .content { padding: 24px; }
  .commandbar { padding: 0 24px; }
  .stat { padding: 20px 16px; }
}
@media (max-width: 1024px) {
  .trend-grid { grid-template-columns: 1fr !important; }
  .trend-grid > div:last-child { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
  .trend-grid > div:last-child .card { margin-bottom: 0; }
}
@media (max-width: 820px) {
  .sidebar { transform: translateX(-102%); transition: transform .2s; }
  .sidebar.is-open { transform: none; }
  .workspace { margin-left: 0; }
  .mobile-menu { display: grid; place-items: center; }
  .commandbar { height: 64px; padding: 0 16px; }
  .content { padding: 20px 16px 36px; }
  .system-pill { font-size: 10px; gap: 8px; }
  .grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .resource-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .resource-stats .stat { border-bottom: 1px solid var(--line); }
  .resource-stats .stat:nth-child(even) { border-right: 0; }
  .resource-stats .stat:last-child { grid-column: 1 / -1; border-bottom: 0; }
  .card { padding: 16px; }
  .data-card { padding: 0; }
  .toolbar input:not([type=hidden]), .toolbar select { flex: 1; min-width: 150px; }
  .toolbar input[type=checkbox] { flex: 0; min-width: 18px; }
}
@media (max-width: 520px) {
  .system-pill { display: none; }
  .stat { padding: 18px 14px; }
  .stat b { font-size: 28px; }
  .trend-grid > div:last-child { grid-template-columns: 1fr; }
  .quick-tabs { gap: 20px; }
  .data-card .toolbar { padding: 12px; }
  .toolbar { gap: 8px; }
  .toolbar-grow { flex-basis: 100% !important; }
  .page-intro { flex-wrap: wrap; }
  .page-intro .actions { justify-content: flex-end; }
  .pager { flex-wrap: wrap; }
  .pager .ctrl .btn { min-height: 36px; }
  .bulk-actions .toolbar > label { width: 100%; display: flex; align-items: center; justify-content: space-between; }
  .bulk-actions .toolbar > label input { min-width: 0; }
  .login { padding: 28px 24px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
