:root {
  color-scheme: light dark;
  font-family: "Roboto", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  --bg: #f7f9f4;
  --surface: #fff;
  --text: #1c2520;
  --sub: #4c5850;
  --line: #dce2d9;
  --input-line: #929d93;
  --primary: #286848;
  --on-primary: #fff;
  --tonal: #d7eddd;
  --on-tonal: #164c32;
  --soft: #eef3eb;
  --danger: #a92d2b;
  --danger-on: #fff;
  --tone-error: #ffebe8;
  --shadow: 0 10px 30px rgba(27, 56, 36, .055);
  background: var(--bg);
  color: var(--text);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141a16;
    --surface: #1c231e;
    --text: #e1e9df;
    --sub: #bac8bb;
    --line: #39433b;
    --input-line: #788b7c;
    --primary: #96d6ae;
    --on-primary: #103822;
    --tonal: #264632;
    --on-tonal: #b3eac3;
    --soft: #26312a;
    --danger: #ffb4a9;
    --danger-on: #5d1813;
    --tone-error: #45251f;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .62; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }
h1, h2, p, ul { margin: 0; }
.topbar { border-bottom: 1px solid var(--line); }
.topbar-inner {
  max-width: 1260px; margin: 0 auto; min-height: 75px; padding: 0 46px;
  display: flex; align-items: center; gap: 19px;
}
.brand { display: flex; align-items: center; gap: 11px; font-weight: 650; font-size: 21px; letter-spacing: .04em; }
.brand-mark {
  width: 37px; height: 37px; border-radius: 13px; display: inline-block;
  position: relative; color: var(--on-tonal); background: var(--tonal); flex: none;
}
.brand-mark i, .brand-mark::before, .brand-mark::after { position: absolute; }
.brand-mark i { width: 6%; height: 42%; background: currentColor; bottom: 19%; left: 48%; border-radius: 2px; }
.brand-mark::before, .brand-mark::after { content: ""; background: currentColor; }
.brand-mark::before { width: 26%; height: 23%; top: 36%; left: 27%; border-radius: 1px 80% 1px 80%; }
.brand-mark::after { width: 27%; height: 28%; top: 23%; left: 49%; border-radius: 85% 2px 82% 2px; }
.brand-divider { width: 1px; height: 21px; background: var(--line); }
.section-name { color: var(--sub); font-size: 14px; }
#logout { margin-left: auto; }
.btn {
  border: 0; min-height: 41px; padding: 0 18px; border-radius: 999px;
  font-size: 14px; line-height: 1.3; font-weight: 560; white-space: nowrap;
}
.text-btn { background: transparent; color: var(--primary); }
.text-btn:hover { background: var(--soft); }
.tonal { background: var(--tonal); color: var(--on-tonal); }
.filled { background: var(--primary); color: var(--on-primary); }
.btn.destructive { color: var(--danger); }
.filled.destructive { color: var(--danger-on); background: var(--danger); }
.tonal:hover, .filled:hover { filter: brightness(.95); }
.center-screen { display: grid; place-items: center; min-height: calc(100dvh - 76px); padding: 24px 18px 8vh; }
.boot-card { display: grid; justify-items: center; gap: 14px; color: var(--sub); }
.login-card {
  width: min(100%, 402px); padding: 37px; border: 1px solid var(--line);
  border-radius: 28px; background: var(--surface); box-shadow: var(--shadow);
}
.login-mark { width: 46px; height: 46px; border-radius: 16px; margin-bottom: 21px; }
h1 { font-size: clamp(29px, 3vw, 37px); letter-spacing: -.045em; font-weight: 580; line-height: 1.25; }
.login-card h1 { font-size: 29px; line-height: 1.4; }
.login-card form { margin-top: 25px; }
.login-card label { display: block; color: var(--sub); font-size: 14px; margin-bottom: 8px; }
#password {
  width: 100%; min-height: 48px; border: 1px solid var(--input-line); border-radius: 11px;
  padding: 10px 14px; background: var(--surface); color: var(--text); font-size: 16px;
}
.login-button { width: 100%; margin-top: 23px; min-height: 46px; }
.workspace {
  display: grid; grid-template-columns: minmax(178px, 217px) minmax(0, 1fr); align-items: start;
  gap: clamp(30px, 5vw, 68px); max-width: 1260px; margin: auto; padding: 56px 46px 80px;
}
.sidebar { padding-top: 10px; }
.sidebar h2 { font-size: 13px; color: var(--sub); font-weight: 540; margin: 0 16px 16px; }
#filters { display: grid; gap: 5px; }
.filter {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-size: 15px; min-height: 46px; padding: 0 16px; text-align: start;
  background: transparent; color: var(--sub); border: 0; border-radius: 17px;
}
.filter:hover { background: var(--soft); }
.filter[aria-pressed="true"] { background: var(--tonal); color: var(--on-tonal); font-weight: 650; }
.filter .count { font-size: 13px; font-variant-numeric: tabular-nums; }
.heading { display: flex; align-items: center; gap: 12px; justify-content: space-between; margin-bottom: 23px; }
.search-box {
  width: min(100%, 355px); min-height: 45px; display: flex; align-items: center;
  padding: 0 16px; gap: 13px; background: var(--soft); border-radius: 24px; color: var(--sub);
}
.search-box:focus-within { outline: 2px solid var(--primary); }
.search-icon { width: 15px; height: 15px; border: 1.7px solid currentColor; border-radius: 50%; position: relative; flex: none; }
.search-icon::after { content: ""; position: absolute; width: 7px; height: 1.7px; background: currentColor; transform: rotate(45deg); right: -5px; bottom: -2px; }
#query { min-width: 0; flex: 1; height: 43px; background: transparent; border: 0; outline: none; font-size: 15px; color: var(--text); }
#query::placeholder { color: var(--sub); opacity: 1; }
.list-surface { margin-top: 21px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); overflow: hidden; }
.row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(122px, .65fr) minmax(122px, auto); gap: 16px; padding: 14px 22px; align-items: center; }
.column-head { min-height: 46px; font-size: 12px; font-weight: 560; color: var(--sub); border-bottom: 1px solid var(--line); }
.column-head span:last-child { text-align: right; }
#accounts { list-style: none; padding: 0; }
.user-row { min-height: 74px; }
.user-row + .user-row { border-top: 1px solid var(--line); }
.person { display: flex; align-items: center; gap: 12px; min-width: 0; }
.avatar { display: grid; place-items: center; flex: none; width: 39px; height: 39px; border-radius: 13px; font-weight: 600; background: var(--soft); color: var(--on-tonal); }
.identity { min-width: 0; }
.name, .handle { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.name { font-weight: 570; font-size: 15px; }
.handle, .registered { color: var(--sub); font-size: 13px; }
.registered { font-variant-numeric: tabular-nums; line-height: 1.55; }
.handle { margin-top: 4px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 3px; justify-content: flex-end; }
.row-actions .btn { min-height: 38px; font-size: 13px; padding: 0 13px; }
.empty { display: grid; justify-items: center; align-content: center; min-height: 194px; padding: 20px; color: var(--sub); gap: 17px; font-size: 14px; }
.empty-mark { height: 16px; width: 22px; border: 1.5px solid currentColor; border-radius: 3px; position: relative; }
.empty-mark::before { content: ""; position: absolute; top: 4px; height: 1.5px; background: currentColor; width: 9px; left: 5px; }
.empty-mark::after { content: ""; position: absolute; bottom: 3px; height: 1.5px; background: currentColor; width: 6px; left: 5px; }
.error { background: var(--tone-error); color: var(--danger); padding: 10px 14px; border-radius: 10px; margin-top: 14px; font-size: 14px; }
dialog { width: min(395px, calc(100% - 32px)); padding: 0; border: 1px solid var(--line); border-radius: 26px; background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(10, 23, 15, .45); }
.dialog-body { padding: 26px; }
.dialog-body h2 { font-size: 23px; font-weight: 580; }
#confirm-account { margin-top: 11px; font-size: 15px; overflow-wrap: anywhere; line-height: 1.55; color: var(--sub); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 26px; }
.notice { position: fixed; bottom: max(22px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); padding: 12px 20px; font-size: 14px; color: var(--bg); background: var(--text); border-radius: 14px; pointer-events: none; }
.notice:empty { padding: 0; }
@media (max-width: 810px) {
  .topbar-inner { padding: 0 24px; }
  .workspace { display: block; padding: 22px 24px 52px; }
  .sidebar { padding: 0; }
  .sidebar h2 { display: none; }
  #filters { display: flex; overflow-x: auto; padding: 4px 2px; gap: 6px; }
  .filter { white-space: nowrap; min-height: 40px; padding: 0 14px; gap: 7px; border-radius: 16px; }
  .content { margin-top: 28px; }
}
@media (max-width: 575px) {
  .topbar-inner { padding: 0 16px; min-height: 62px; gap: 12px; }
  .topbar-inner .text-btn { padding: 0 7px; }
  .workspace { padding: 16px 13px 44px; }
  #filters { gap: 1px; }
  .filter { font-size: 13px; padding: 0 10px; gap: 5px; }
  .count { font-size: 12px; }
  .heading { margin-bottom: 16px; }
  .search-box { width: 100%; }
  .list-surface { margin-top: 16px; border-radius: 18px; }
  .column-head { display: none; }
  .user-row { grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; padding: 13px 12px; }
  .person { gap: 9px; }
  .avatar { width: 32px; height: 32px; border-radius: 10px; }
  .user-row .registered { grid-column: 1; grid-row: 2; margin-left: 41px; font-size: 12px; }
  .row-actions { grid-column: 2; grid-row: 1 / 3; }
  .row-actions .btn { min-height: 44px; padding: 0 10px; }
  .login-card { padding: 28px; }
  .center-screen { min-height: calc(100dvh - 63px); }
}
