@charset "UTF-8";

/* Shared design system · Taozi ID Pool 2.3 */
:root {
  color-scheme: light;
  --ink: #182237;
  --muted: #576579;
  --line: #e1e6ee;
  --surface: #ffffff;
  --bg: #f5f7fb;
  --nav: #151e32;
  --nav-muted: #aab6cc;
  --accent: #5146dc;
  --accent-dark: #3f34c1;
  --accent-soft: #eeedff;
  --peach: #ffbb9f;
  --danger: #b42336;
  --danger-soft: #fff0f2;
  --warning: #8c5b0c;
  --warning-soft: #fff6e4;
  --radius: 16px;
  --shadow: 0 3px 16px rgb(26 38 68 / 4%);
  --font: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", "Noto Sans SC", "Source Han Sans SC", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
  --sidebar-width: 252px;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.65 var(--font); text-rendering: optimizeLegibility; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
a { color: var(--accent); text-decoration: none; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4, strong { font-weight: 600; }
h1 { font-size: 28px; line-height: 1.35; letter-spacing: -.4px; }
h2 { font-size: 20px; line-height: 1.5; }
h3 { font-size: 16px; line-height: 1.5; }
small { font-size: 13px; }
.muted, .hint, .fine-print { color: var(--muted); }
.eyebrow { color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: .06em; }
.mono { font-family: var(--mono); overflow-wrap: anywhere; }
.number { font-variant-numeric: tabular-nums; }

/* Inputs and actions */
input, select, textarea {
  width: 100%; min-height: 44px; padding: 10px 13px;
  color: var(--ink); background: var(--surface); border: 1px solid #cbd3e0;
  border-radius: 10px; font-size: 15px; line-height: 1.5; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: #738097; opacity: 1; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgb(81 70 220 / 11%); }
textarea { min-height: 104px; resize: vertical; }
select { padding-right: 30px; }
label { display: flex; flex-direction: column; gap: 8px; color: #334157; font-size: 14px; font-weight: 600; }
label .hint { font-size: 13px; font-weight: 400; line-height: 1.65; }
input[type="checkbox"], input[type="radio"] { width: 17px; height: 17px; min-height: 0; padding: 0; accent-color: var(--accent); flex: none; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid #b5b0f5; outline-offset: 3px; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 40px; padding: 9px 15px; border: 1px solid transparent; border-radius: 10px;
  color: var(--ink); background: transparent; font-size: 14px; font-weight: 600;
  line-height: 1.4; white-space: nowrap; text-decoration: none;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.button:hover { text-decoration: none; }
.button.primary { color: #fff; background: var(--accent); box-shadow: 0 3px 8px rgb(81 70 220 / 12%); }
.button.primary:hover { background: var(--accent-dark); }
.button.ghost { color: #36445b; background: #fff; border-color: #d5dce6; }
.button.ghost:hover { background: #f8f9fd; border-color: #b8c1d1; }
.button.soft { color: var(--accent-dark); background: var(--accent-soft); }
.button.soft:hover { background: #e1dfff; }
.button.text { color: #526078; }
.button.text:hover { color: var(--accent-dark); background: var(--accent-soft); }
.button.danger { color: var(--danger); background: var(--danger-soft); border-color: #f3d7dc; }
.button.danger:hover { background: #ffe2e8; border-color: #e8b9c4; }
.button.small { min-height: 34px; padding: 6px 10px; font-size: 13px; }
.button.wide { width: 100%; min-height: 47px; font-size: 15px; }
.button svg, .icon-button svg { width: 18px; height: 18px; flex: none; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: 1px solid transparent; border-radius: 10px; color: #657086; background: transparent; font-size: 26px; line-height: 1; }
.icon-button:hover { color: var(--ink); background: #eff2f8; }
.button-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }

/* Status tokens */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 7px; color: #536078; background: #eef1f6; font-size: 13px; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.pill.good { color: #176443; background: #e8f6ed; }
.pill.warn { color: var(--warning); background: var(--warning-soft); }
.pill.bad { color: var(--danger); background: var(--danger-soft); }
.pill.blue { color: #3158a5; background: #edf2ff; }
.pill.neutral { color: #526078; background: #eef1f6; }
.count-badge { padding: 2px 7px; border-radius: 6px; color: #5d6482; background: #eff0f7; font-size: 13px; }
.spinner { display: inline-block; width: 21px; height: 21px; flex: none; border: 2px solid #e4e5f5; border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.boot-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--muted); }

/* Brand and login */
.brand { display: flex; align-items: center; gap: 11px; color: inherit; font-size: 19px; font-weight: 600; letter-spacing: .2px; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-mark { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex: none; color: #61372d; background: var(--peach); border-radius: 12px 12px 12px 4px; font-size: 19px; font-weight: 600; }
.brand-dot { width: 6px; height: 6px; margin-left: auto; border-radius: 50%; background: #b6b0ff; }
.login-screen { display: grid; grid-template-columns: minmax(400px, 1.05fr) minmax(420px, 1fr); min-height: 100vh; background: #fff; }
.login-story { display: flex; flex-direction: column; min-height: 100vh; padding: 42px 9%; overflow: hidden; position: relative; color: #fff; background: #182137; }
.login-story::after { content: ""; position: absolute; right: -210px; bottom: -220px; width: 630px; height: 630px; border: 1px solid #35425e; border-radius: 50%; box-shadow: 0 0 0 80px rgb(139 131 235 / 3%), 0 0 0 160px rgb(139 131 235 / 3%); pointer-events: none; }
.brand-large .brand-mark { width: 43px; height: 43px; font-size: 23px; }
.login-story .brand { font-size: 23px; z-index: 1; }
.story-copy { position: relative; z-index: 1; margin: auto 0 0; padding-top: 58px; }
.story-copy .eyebrow { color: #c3bcff; }
.story-copy h1 { margin: 18px 0; color: #fff; font-size: clamp(36px, 3.5vw, 50px); line-height: 1.35; letter-spacing: -.8px; }
.story-copy p { max-width: 390px; color: #c5cce0; font-size: 15px; line-height: 1.9; }
.login-visual { position: relative; z-index: 1; height: 200px; max-width: 360px; margin: 34px 0 18px; }
.visual-sheet { position: absolute; width: 264px; height: 132px; padding: 24px; border: 1px solid #8c8aba; border-radius: 18px; }
.sheet-back { left: 64px; top: 0; transform: rotate(8deg); background: #313750; border-color: #515b79; }
.sheet-mid { left: 26px; top: 24px; transform: rotate(-6deg); background: #474568; border-color: #6b638f; }
.sheet-front { left: 5px; top: 46px; transform: rotate(2deg); background: #f0efff; border-color: #fff; box-shadow: 0 20px 40px rgb(0 0 0 / 12%); }
.visual-icon { display: inline-block; width: 37px; height: 37px; border-radius: 12px; color: #fff; background: #6557df; vertical-align: middle; }
.visual-icon svg { width: 21px; height: 21px; margin: 8px; }
.visual-line { display: inline-block; width: 125px; height: 9px; margin-left: 12px; border-radius: 8px; background: #b6b1dd; vertical-align: middle; }
.visual-dots { display: flex; align-items: center; gap: 7px; margin-top: 22px; }
.visual-dots i { width: 9px; height: 9px; border-radius: 50%; background: #7168b2; }
.visual-dots::after { content: ""; width: 55px; height: 7px; margin-left: auto; background: #c8c3e8; border-radius: 4px; }
.login-story footer { position: relative; z-index: 1; display: flex; justify-content: space-between; margin-top: auto; padding-top: 30px; color: #aeb8cf; font-size: 13px; letter-spacing: .08em; }
.login-panel { display: flex; align-items: center; justify-content: center; padding: 56px 40px; }
.login-box { width: 100%; max-width: 372px; }
.login-box > .eyebrow { display: inline-flex; padding: 5px 10px; border: 1px solid #dfddf7; border-radius: 7px; color: var(--accent-dark); background: #f6f5ff; }
.login-box h2 { margin: 18px 0 10px; font-size: 30px; color: #172137; }
.login-box > .muted { margin-bottom: 29px; font-size: 14px; line-height: 1.75; }
.login-box label input { min-height: 49px; }
.login-box .form-stack { gap: 21px; }
.login-box .button.wide { min-height: 48px; margin-top: 6px; }
.login-footnote { margin-top: 20px; text-align: center; color: var(--muted); font-size: 13px; }

/* Registration uses the public entry, independently of management dialogs. */
.registration-panel { width: 100%; max-width: 410px; }
.registration-back { display: inline-flex; align-items: center; gap: 5px; min-height: 44px; margin: 0 0 23px -6px; padding: 5px 6px; border: 0; border-radius: 6px; color: #576579; background: transparent; font-size: 14px; line-height: 1.5; }
.registration-back svg { width: 19px; height: 19px; }
.registration-back:hover { color: var(--accent); background: #f5f4fe; }
.registration-heading { margin-bottom: 28px; }
.registration-heading h2 { color: #172137; font-size: 31px; line-height: 1.4; letter-spacing: -.4px; }
.registration-heading p { margin-top: 10px; color: #576579; font-size: 14px; line-height: 1.8; }
.registration-form { display: flex; flex-direction: column; gap: 19px; }
.registration-field { display: flex; flex-direction: column; gap: 8px; }
.registration-field > label { display: block; color: #27354b; font-size: 14px; font-weight: 600; }
.registration-field input { height: 52px; padding: 12px 15px; border-color: #d1d9e5; border-radius: 11px; color: #182237; background: #fff; font-size: 16px; font-weight: 400; }
.registration-field input:hover { border-color: #9aa7bc; }
.registration-field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgb(81 70 220 / 10%); }
.registration-field input[aria-invalid="true"] { border-color: #bd3141; }
.registration-field input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgb(180 35 54 / 9%); }
.registration-field input::placeholder { color: #7a879a; }
.registration-password { position: relative; }
.registration-password input { padding-right: 54px; }
.registration-password-toggle { position: absolute; top: 4px; right: 5px; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 8px; color: #65748b; background: transparent; }
.registration-password-toggle svg { width: 21px; height: 21px; }
.registration-password-toggle:hover { color: var(--accent); background: #f3f2fd; }
.registration-password-toggle[aria-pressed="true"] { color: var(--accent); background: #f5f4fe; }
.registration-feedback { min-height: 19px; font-size: 12px; line-height: 1.6; }
.registration-hint { color: #607087; }
.registration-field-error { color: #b42336; }
.registration-submit.button { width: 100%; min-height: 52px; justify-content: center; gap: 13px; margin-top: 2px; border-radius: 11px; font-size: 16px; font-weight: 600; }
.registration-submit .spinner { width: 17px; height: 17px; border-color: rgb(255 255 255 / 35%); border-top-color: #fff; }
.registration-form[aria-busy="true"] input { background: #f7f8fb; }
.registration-notice { padding: 11px 13px; color: #a42839; background: #fff4f5; border: 1px solid #f1d9dd; border-radius: 9px; font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
.registration-login-success { margin: 0 0 20px; padding: 11px 13px; color: #176443; background: #edf8f1; border: 1px solid #cbe9d6; border-radius: 9px; font-size: 13px; line-height: 1.7; }
@media (max-width: 720px) {
  .login-screen.registration-open .story-copy { display: none; }
  .login-screen.registration-open .login-panel { padding: 25px 24px 40px; }
  .registration-panel { max-width: 420px; }
  .registration-back { margin-bottom: 22px; }
  .registration-heading { margin-bottom: 25px; }
  .registration-heading h2 { font-size: 28px; }
  .registration-form { gap: 17px; }
}
.form-stack { display: flex; flex-direction: column; gap: 18px; }
.form-error, .form-success { padding: 11px 13px; border: 1px solid #f2d6dc; border-radius: 9px; color: var(--danger); background: var(--danger-soft); font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
.form-success { border-color: #c8e5d7; color: #176443; background: #edf8f2; }

/* Application shell */
.app-shell { display: flex; min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; display: flex; flex-direction: column; width: var(--sidebar-width); padding: 27px 17px 0; color: #e9edf8; background: var(--nav); }
.sidebar .brand { padding: 0 10px; margin-bottom: 30px; color: #fff; }
.sidebar-caption { padding: 0 13px 10px; color: #b3bed4; font-size: 13px; font-weight: 500; }
.sidebar nav { display: flex; flex: 1; min-height: 0; flex-direction: column; gap: 4px; padding: 0 2px 22px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #485371 transparent; }
.nav-item { display: flex; align-items: center; flex: none; gap: 12px; min-height: 43px; padding: 10px 13px; border: 1px solid transparent; border-radius: 10px; color: #ccd5e9; background: transparent; text-align: left; font-size: 14px; line-height: 1.5; transition: background .15s, color .15s; }
.nav-item:hover { color: #fff; background: #222d45; }
.nav-item.active { color: #fff; background: #3d3778; border-color: #5a529e; box-shadow: inset 3px 0 #a49aff; }
.nav-item svg { width: 18px; height: 18px; flex: none; stroke-width: 1.8; }
.nav-section { padding: 23px 13px 8px; color: #a8b3ca; font-size: 13px; }
.nav-group { display: grid; gap: 4px; }
.sidebar-bottom { display: flex; align-items: center; flex: none; gap: 10px; margin-top: auto; padding: 18px 7px 21px; border-top: 1px solid #2c3750; }
.user-avatar { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; flex: none; border-radius: 11px; color: #e5e0ff; background: #38375e; font-size: 14px; }
.sidebar-bottom strong { display: block; max-width: 118px; overflow: hidden; color: #f1f3fa; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-bottom span:not(.version) { display: block; margin-top: 2px; color: #b5bfd3; font-size: 13px; }
.sidebar-bottom .version { margin-left: auto; color: #a3aec5; font-size: 11px; }
.workspace { display: flex; flex: 1; flex-direction: column; min-width: 0; margin-left: var(--sidebar-width); }
.topbar { position: sticky; top: 0; z-index: 15; display: flex; align-items: center; justify-content: space-between; gap: 14px; height: 72px; min-height: 72px; padding: 0 34px; border-bottom: 1px solid var(--line); background: #fff; }
.topbar-left, .topbar-actions { display: flex; align-items: center; gap: 10px; }
.breadcrumb { color: #637087; font-size: 13px; white-space: nowrap; }
.breadcrumb span { padding: 0 10px; color: #8b96a8; }
.breadcrumb #breadcrumb-realm { padding-left: 0; color: #637087; }
.breadcrumb strong { color: #253148; font-size: 14px; }
.topbar-actions .button { min-height: 34px; font-size: 13px; }
.health-indicator { padding: 0 10px; color: #26704d; font-size: 13px; white-space: nowrap; }
.health-indicator::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 7px; vertical-align: 1px; border-radius: 50%; background: #2d9b6c; box-shadow: 0 0 0 3px #e5f5ec; }
.health-indicator.off { color: var(--warning); }
.health-indicator.off::before { background: #c58b2b; box-shadow: 0 0 0 3px #fff4df; }
.main-content { flex: 1; min-width: 0; width: 100%; max-width: 1660px; margin: 0 auto; padding: 32px 34px; }
.workspace-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 34px 23px; color: #68768b; font-size: 13px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 25px; }
.page-heading > div:first-child { flex: 1; min-width: 0; }
.page-heading h1 { font-size: 27px; }
.page-heading p { margin-top: 7px; color: var(--muted); font-size: 14px; }
.page-heading p:empty { display: none; }
.page-heading .heading-actions { display: flex; flex: none; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.mobile-menu, .nav-backdrop { display: none; }

/* Dashboard and reusable cards */
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-bottom: 24px; }
.stat-card { position: relative; min-width: 0; overflow: hidden; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.stat-label { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #4e5c72; font-size: 14px; }
.stat-label svg { width: 19px; height: 19px; flex: none; color: #857bc5; }
.stat-value { margin: 16px 0 8px; color: #18243b; font-size: 35px; font-weight: 600; line-height: 1.2; letter-spacing: -.8px; font-variant-numeric: tabular-nums; }
.stat-foot { color: var(--muted); font-size: 13px; line-height: 1.65; }
.stat-foot strong { color: #247450; font-weight: 500; }
.stat-card.emphasis { border-color: #d9d6f7; background: #f8f7ff; }
.stat-card.emphasis .stat-value { color: var(--accent-dark); }
.panel { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 20px 23px; border-bottom: 1px solid #e9edf3; }
.panel-header h2 { font-size: 17px; }
.panel-header p { margin-top: 4px; color: var(--muted); font-size: 13px; }
.panel-body { padding: 22px 23px; }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 22px; }
.pool-row { display: flex; align-items: center; gap: 13px; padding: 16px 0; border-bottom: 1px solid #edf0f5; }
.pool-row:last-child { border-bottom: 0; }
.pool-symbol { display: flex; align-items: center; justify-content: center; width: 39px; height: 39px; flex: none; border-radius: 12px; color: #6457c4; background: #f0edff; }
.pool-symbol svg { width: 20px; height: 20px; }
.pool-row .pool-name { flex: 1; min-width: 0; }
.pool-row strong { font-size: 14px; }
.pool-row small { display: block; margin-top: 3px; color: var(--muted); font-size: 13px; }
.pool-numbers { color: var(--accent-dark); font-size: 23px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.pool-numbers small { color: var(--muted); font-size: 13px; font-weight: 400; }
.event-row { display: flex; align-items: flex-start; gap: 12px; padding: 15px 0; border-bottom: 1px solid #edf0f5; }
.event-row:last-child { border-bottom: 0; }
.event-dot { width: 7px; height: 7px; flex: none; margin: 8px 3px 0; border-radius: 50%; background: #a69bdd; }
.event-row > div { flex: 1; min-width: 0; }
.event-row strong { font-size: 14px; font-weight: 500; }
.event-row p { margin-top: 3px; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.event-row time { color: var(--muted); font-size: 13px; white-space: nowrap; }

/* Search, tables and empty states */
.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 11px; margin-bottom: 18px; }
.search-field { position: relative; flex: 1; min-width: 190px; max-width: 350px; }
.search-field svg { position: absolute; top: 13px; left: 13px; width: 17px; height: 17px; color: #738097; pointer-events: none; }
.search-field input { min-height: 43px; padding-left: 39px; background: #fff; font-size: 14px; }
.filter-select { width: auto; min-width: 135px; max-width: 210px; min-height: 43px; font-size: 14px; }
.toolbar .spacer { flex: 1; }
.table-wrap { min-height: 80px; max-height: 73vh; overflow: auto; scrollbar-width: thin; scrollbar-color: #c4cbdc transparent; }
table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; font-variant-numeric: tabular-nums; }
th { position: sticky; top: 0; z-index: 1; padding: 14px 20px; border-bottom: 1px solid #e0e5ef; color: #445168; background: #f6f8fc; font-size: 13px; font-weight: 600; }
td { padding: 17px 20px; border-bottom: 1px solid #edf0f5; color: #2b384f; font-size: 14px; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f8f9fe; }
.table-main { color: #243047; font-size: 14px; font-weight: 600; }
.table-sub { max-width: 290px; margin-top: 5px; overflow: hidden; color: var(--muted); font-size: 13px; white-space: nowrap; text-overflow: ellipsis; }
.table-sub.error { max-width: 230px; color: var(--danger); }
.table-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.table-actions .button { min-height: 32px; padding: 5px 8px; font-size: 13px; font-weight: 500; }
.table-actions .more-button { padding: 5px 7px; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.pagination-controls { display: flex; align-items: center; gap: 10px; font-variant-numeric: tabular-nums; }
.pagination .button { min-height: 32px; padding: 5px 9px; font-size: 13px; }
.empty-state { padding: 48px 24px; color: var(--muted); text-align: center; }
.empty-state .empty-icon { display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; margin: 0 auto 16px; border: 1px solid #e1def8; border-radius: 16px; color: #847bc3; background: #f4f2fd; }
.empty-icon svg { width: 25px; height: 25px; }
.empty-state h3 { margin-bottom: 7px; color: #33405a; font-size: 16px; }
.empty-state p { color: var(--muted); font-size: 13px; line-height: 1.75; }
.empty-state .button { margin-top: 18px; }
.empty-state .spinner { margin-bottom: 12px; }
.error-state { padding: 36px 24px; text-align: center; }
.error-state p { margin-bottom: 15px; color: var(--danger); font-size: 14px; }
.subtle-info { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; padding: 12px 15px; border: 1px solid #dce2f4; border-radius: 10px; color: #44567d; background: #f2f5fc; font-size: 13px; line-height: 1.75; }
.subtle-info.warn { border-color: #ecddbb; color: var(--warning); background: var(--warning-soft); }
.subtle-info svg { width: 17px; height: 17px; flex: none; }
.group-grid, .share-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 19px; }
.group-card, .share-item { min-width: 0; padding: 23px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.group-card-top, .share-item-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 13px; }
.group-card h3, .share-item h3 { font-size: 17px; overflow-wrap: anywhere; }
.group-card-top .pool-symbol { margin-bottom: 15px; }
.group-metrics { display: flex; gap: 25px; margin: 23px 0; }
.group-metrics > div { color: #30415c; font-size: 25px; font-weight: 600; }
.group-metrics span { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; font-weight: 400; }
.group-card-footer, .share-item-footer { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; padding-top: 15px; border-top: 1px solid #e9edf5; }
.share-item .eyebrow { display: block; margin-bottom: 8px; font-size: 11px; }
.share-target { min-height: 40px; margin: 17px 0 15px; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.share-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 19px; color: var(--muted); font-size: 13px; }
.share-meta svg { width: 14px; height: 14px; }
.share-item-footer .button { padding: 6px 9px; font-size: 13px; }

/* Forms and settings */
.settings-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(260px, .9fr); gap: 22px; }
.settings-layout.single { max-width: 960px; grid-template-columns: 1fr; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.form-grid .full { grid-column: 1 / -1; }
.form-section { margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid #e9edf5; }
.form-section:last-child { margin-bottom: 0; padding-bottom: 0; border: 0; }
.form-section-title { margin-bottom: 17px; color: #35415b; font-size: 15px; font-weight: 600; }
.form-footer { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 24px; padding-top: 20px; border-top: 1px solid #e7ecf4; }
.checkbox-label { display: flex; flex-direction: row; align-items: center; gap: 9px; color: #344259; font-size: 14px; font-weight: 400; cursor: pointer; }
.checkbox-label input { cursor: pointer; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px 0; border-bottom: 1px solid #e9edf5; }
.switch-row:last-child { border-bottom: 0; }
.switch-row strong { font-size: 14px; }
.switch-row p { margin-top: 4px; color: var(--muted); font-size: 13px; }
.toggle { position: relative; display: inline-flex; width: 42px; height: 24px; flex: none; }
.toggle input { width: 0; height: 0; opacity: 0; }
.toggle span { position: absolute; inset: 0; border-radius: 14px; background: #cbd2df; transition: background .2s; }
.toggle span::before { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgb(31 45 75 / 16%); transition: transform .2s; }
.toggle input:checked + span { background: var(--accent); }
.toggle input:checked + span::before { transform: translateX(18px); }
.toggle input:focus-visible + span { outline: 3px solid #b5b0f5; outline-offset: 3px; }
.telegram-logo { display: flex; align-items: center; justify-content: center; width: 50px; height: 50px; margin-bottom: 18px; border-radius: 16px; color: #277bb1; background: #eaf5fe; }
.telegram-logo svg { width: 26px; height: 26px; }
.binding-title { margin-bottom: 10px; font-size: 20px; }
.binding-status { margin: 16px 0; }
.binding-meta { color: var(--muted); font-size: 14px; line-height: 1.85; overflow-wrap: anywhere; }
.binding-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 21px; }
.binding-link { display: block; margin-top: 17px; padding: 12px; border: 1px solid #dfdcf6; border-radius: 10px; background: #f8f7ff; font-size: 13px; overflow-wrap: anywhere; }
.fine-print { margin-top: 17px; font-size: 13px; line-height: 1.75; }

/* Dialogs and feedback */
.modal { width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); margin: auto; padding: 0; overflow: auto; border: 1px solid #dce2ed; border-radius: 19px; color: var(--ink); background: #fff; box-shadow: 0 28px 90px rgb(13 24 47 / 25%); }
.modal::backdrop { background: rgb(14 24 43 / 47%); backdrop-filter: blur(3px); }
.modal.wide-modal { width: min(1040px, calc(100vw - 32px)); }
.modal-head { position: sticky; top: 0; z-index: 3; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 23px 26px 19px; border-bottom: 1px solid #e6eaf2; background: #fff; }
.modal-head h2 { margin-top: 5px; font-size: 22px; }
.modal-head .eyebrow { color: #655d92; font-size: 13px; }
.modal-head .eyebrow:empty { display: none; }
#modal-body { padding: 24px 26px; }
.modal-description { margin-bottom: 20px; color: var(--muted); font-size: 14px; line-height: 1.8; }
.modal .form-error { margin-top: 18px; }
.modal .danger-note { margin-bottom: 20px; padding: 13px 15px; border: 1px solid #eddfbd; border-radius: 10px; color: var(--warning); background: var(--warning-soft); font-size: 14px; line-height: 1.75; }
.secret-row { display: flex; align-items: center; gap: 14px; padding: 15px 0; border-bottom: 1px solid #e9edf5; }
.secret-row:last-child { border: 0; }
.secret-row > div { flex: 1; min-width: 0; }
.secret-row span { display: block; margin-bottom: 7px; color: var(--muted); font-size: 13px; }
.secret-row code { font: 14px/1.7 var(--mono); white-space: normal; overflow-wrap: anywhere; }
.secret-row .button { flex: none; }
.advanced-options { margin-top: 21px; padding-top: 16px; border-top: 1px solid #e8ecf5; }
.advanced-options summary { margin-bottom: 15px; color: #4f507e; font-size: 14px; cursor: pointer; }
.code-input { font: 13px/1.7 var(--mono); }
.toast-region { position: fixed; top: 20px; right: 24px; z-index: 100; display: flex; flex-direction: column; gap: 10px; max-width: calc(100vw - 32px); pointer-events: none; }
.toast { max-width: 420px; padding: 13px 17px; border: 1px solid #344361; border-radius: 12px; color: #fff; background: #25334f; box-shadow: 0 8px 28px rgb(20 32 58 / 18%); font-size: 14px; overflow-wrap: anywhere; animation: toast-in .2s ease-out; }
.toast.error { border-color: #efccd4; color: var(--danger); background: #fff7f8; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
.inline-tags { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.select-search { display: flex; flex-direction: column; gap: 10px; }
.split-notice { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; }
.api-summary { margin-top: 9px; color: var(--muted); font-size: 13px; line-height: 1.8; }
.overview-foot { display: flex; align-items: center; gap: 8px; margin-top: 23px; color: var(--muted); font-size: 13px; }
.overview-foot svg { width: 15px; height: 15px; }
.page-loading { display: flex; align-items: center; justify-content: center; gap: 11px; min-height: 180px; color: var(--muted); font-size: 14px; }
:root .copy-helper { position: fixed; top: 0; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.action-list { display: flex; flex-direction: column; gap: 10px; }
.action-list > .button { justify-content: flex-start; min-height: 44px; }
.detail-cell { min-width: 140px; max-width: 420px; color: var(--muted); font-size: 13px; white-space: normal; overflow-wrap: anywhere; }
.provider-section { margin-top: 20px; }
.provider-enable { justify-content: flex-start; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: #2d9b6c; }

/* Public account sharing */
.share-body { display: flex; flex-direction: column; min-height: 100vh; background: #f5f6fc; }
.share-header { display: flex; align-items: center; justify-content: space-between; width: 100%; max-width: 1080px; height: 84px; margin: 0 auto; padding: 0 28px; }
.share-header .brand { font-size: 18px; }
.share-header .brand-mark { width: 33px; height: 33px; font-size: 17px; }
.share-header-note { padding: 5px 12px; border: 1px solid #dcdeed; border-radius: 20px; color: #5a627b; font-size: 13px; }
.share-main { flex: 1; width: min(580px, calc(100% - 32px)); margin: 24px auto 32px; }
.share-intro { margin-bottom: 27px; text-align: center; }
.share-intro .eyebrow { color: #6a608f; font-size: 13px; }
.share-intro h1 { margin: 12px 0 10px; font-size: 28px; overflow-wrap: anywhere; }
.share-intro p { color: var(--muted); font-size: 14px; }
.share-card { padding: 30px; border: 1px solid #e0e2ef; border-radius: 20px; background: #fff; box-shadow: 0 10px 35px rgb(40 38 85 / 5%); }
.share-card .empty-state { padding: 25px 0; }
.share-icon { display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; margin: 4px auto 20px; border: 1px solid #e3ddf8; border-radius: 18px; color: #7b68b7; background: #f2eefb; }
.share-icon svg { width: 26px; height: 26px; }
.share-state { text-align: center; }
.share-state h2 { margin-bottom: 10px; font-size: 20px; }
.share-state > p { color: var(--muted); font-size: 14px; line-height: 1.8; }
.share-stock { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 24px 0; color: #5b6480; font-size: 14px; }
.share-stock strong { color: var(--accent-dark); }
.share-card .button.wide { min-height: 47px; margin-top: 24px; }
.share-unlock label { margin-top: 24px; text-align: left; }
.share-unlock .form-error { margin-top: 15px; text-align: left; }
.lease-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 21px; }
.lease-head h2 { font-size: 18px; }
.lease-time { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.credential { margin: 13px 0; padding: 15px 17px; border: 1px solid #e3e5ef; border-radius: 12px; background: #f8f9fd; }
.credential-label { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; color: var(--muted); font-size: 13px; }
.credential-value { color: #27364e; font: 17px/1.7 var(--mono); overflow-wrap: anywhere; }
.credential-label .button { min-height: 28px; padding: 4px 8px; border-color: #dfdfef; color: var(--accent-dark); background: #fff; font-size: 13px; }
.code-waiting { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 25px 0 8px; color: #5f6487; font-size: 14px; }
.code-waiting .spinner { width: 17px; height: 17px; }
.lease-note { margin-top: 9px; color: var(--muted); font-size: 13px; line-height: 1.8; text-align: center; }
.code-box { margin: 24px 0 6px; padding: 23px; border: 1px solid #d8d3f6; border-radius: 14px; background: #f5f3ff; text-align: center; }
.code-box > span { display: block; color: #5d5185; font-size: 13px; }
.verification-code { margin: 9px 0 10px; padding-left: 7px; color: #4b3e9d; font: 600 37px/1.5 var(--mono); letter-spacing: 7px; user-select: all; }
.code-box .button { min-height: 34px; font-size: 13px; }
.share-help { display: flex; align-items: flex-start; justify-content: center; gap: 8px; padding: 19px 13px; color: var(--muted); }
.share-help p { font-size: 13px; line-height: 1.8; }
.help-mark { width: 16px; height: 16px; flex: none; margin-top: 3px; border: 1px solid #9ea6bd; border-radius: 50%; font-size: 11px; line-height: 14px; text-align: center; }
.share-footer { padding: 20px 0 25px; color: #68738a; font-size: 13px; text-align: center; }
.share-footer strong { margin-left: 5px; font-weight: 500; }
.share-network-warning { margin-top: 17px; padding: 13px; border-radius: 10px; color: var(--warning); background: var(--warning-soft); font-size: 13px; line-height: 1.8; }
.share-refresh { display: flex; justify-content: center; margin-top: 18px; }
.share-card .form-error { margin-top: 18px; }

/* Responsive layouts */
@media (min-width: 1600px) {
  .main-content { padding: 36px 42px; }
  .stat-card { padding: 25px; }
  .stat-value { font-size: 38px; }
}
@media (max-width: 1200px) {
  :root { --sidebar-width: 224px; }
  .main-content { padding: 27px 25px; }
  .topbar { padding: 0 25px; }
  .stat-card { padding: 19px; }
  .stat-value { font-size: 31px; }
  .group-grid, .share-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-layout { grid-template-columns: minmax(0, 1.2fr) minmax(250px, .9fr); }
  .login-story { padding: 38px 8%; }
  .login-story .brand { font-size: 21px; }
  .visual-sheet { width: 235px; }
  .visual-line { width: 103px; }
}
@media (max-width: 980px) {
  :root { --sidebar-width: 212px; }
  .overview-grid, .settings-layout { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar-actions .health-indicator { display: none; }
  .sidebar { padding-left: 13px; padding-right: 13px; }
  .sidebar .brand { font-size: 17px; }
  .nav-item { padding-left: 11px; }
  .sidebar-bottom .version { display: none; }
  .page-heading { align-items: flex-start; gap: 15px; }
  .main-content { padding: 25px 22px; }
  .login-screen { grid-template-columns: minmax(320px, .95fr) minmax(340px, 1fr); }
  .login-panel { padding: 36px 28px; }
  .story-copy h1 { font-size: 36px; }
  .login-visual { transform: scale(.88); transform-origin: left center; }
}
@media (max-width: 720px) {
  .login-screen { display: block; }
  .login-story { min-height: auto; padding: 26px 25px; }
  .login-story .brand { font-size: 20px; }
  .brand-large .brand-mark { width: 37px; height: 37px; font-size: 19px; }
  .story-copy { margin: 24px 0 0; padding: 0; }
  .story-copy .eyebrow, .story-copy p, .login-visual, .login-story footer { display: none; }
  .story-copy h1 { margin: 0; font-size: 25px; }
  .story-copy h1 br { display: none; }
  .login-panel { padding: 33px 24px 48px; }
  .login-box { max-width: 420px; }
  .login-box h2 { font-size: 26px; }
  .login-box label input { font-size: 16px; }
  .sidebar { width: 266px; padding-top: 25px; transform: translateX(-100%); transition: transform .2s ease; }
  .nav-open .sidebar { transform: translateX(0); }
  .nav-backdrop { position: fixed; inset: 0; z-index: 25; display: block; padding: 0; border: 0; background: rgb(18 27 47 / 48%); }
  .workspace { margin-left: 0; }
  .mobile-menu { display: inline-flex; }
  .topbar { height: 65px; min-height: 65px; padding: 0 14px; gap: 8px; }
  .topbar-left { gap: 5px; min-width: 0; }
  .breadcrumb { max-width: 48vw; overflow: hidden; font-size: 13px; text-overflow: ellipsis; }
  .breadcrumb span { padding: 0 5px; }
  .breadcrumb strong { font-size: 13px; }
  .topbar-actions { gap: 2px; }
  .topbar-actions .button { min-height: 32px; padding: 6px 7px; font-size: 13px; }
  .main-content { padding: 24px 16px; }
  .page-heading { flex-wrap: wrap; gap: 15px; margin-bottom: 21px; }
  .page-heading > div:first-child { flex-basis: 100%; }
  .page-heading .heading-actions { justify-content: flex-start; }
  .page-heading h1 { font-size: 24px; }
  .page-heading p { font-size: 13px; }
  .heading-actions .button { font-size: 13px; }
  .stats-grid { gap: 12px; margin-bottom: 19px; }
  .stat-card { padding: 17px; border-radius: 13px; }
  .stat-label { font-size: 13px; }
  .stat-value { margin-top: 14px; font-size: 29px; }
  .stat-foot { font-size: 13px; }
  .overview-grid { gap: 18px; }
  .panel-header { padding: 17px 18px; }
  .panel-header h2 { font-size: 16px; }
  .panel-body { padding: 19px 18px; }
  .toolbar { gap: 9px; }
  .search-field { width: 100%; max-width: none; flex-basis: 100%; }
  .filter-select { flex: 1; max-width: none; min-width: 130px; font-size: 14px; }
  .toolbar > .spacer { display: none; }
  .group-grid, .share-grid { grid-template-columns: 1fr; gap: 16px; }
  .group-card, .share-item { padding: 21px; }
  .form-grid, .form-grid.mobile-single { grid-template-columns: 1fr; }
  .form-grid .full, .form-grid.mobile-single .full { grid-column: auto; }
  input, select, textarea { font-size: 16px; }
  .form-footer { flex-wrap: wrap; }
  .modal, .modal.wide-modal { width: calc(100vw - 24px); max-height: calc(100dvh - 24px); border-radius: 16px; }
  .modal-head { padding: 19px 20px 16px; }
  .modal-head h2 { font-size: 20px; }
  #modal-body { padding: 21px 20px; }
  .workspace-footer { padding: 12px 17px 21px; }
  .toast-region { top: 12px; right: 16px; }
  .table-wrap { max-height: 70vh; }
  th { padding: 13px 16px; }
  td { padding: 15px 16px; }
  .pagination { flex-wrap: wrap; padding: 14px 16px; }
  .pagination-controls { gap: 8px; }
  .event-row { flex-wrap: wrap; }
  .share-header { height: 74px; padding: 0 20px; }
  .share-main { width: calc(100% - 28px); margin-top: 18px; }
  .share-intro { margin-bottom: 23px; }
  .share-intro h1 { font-size: 25px; }
  .share-card { padding: 24px; }
  .lease-head { flex-wrap: wrap; gap: 8px; }
  .credential-value { font-size: 16px; }
  .verification-code { font-size: 34px; letter-spacing: 6px; }
}
@media (max-width: 400px) {
  .main-content { padding-left: 13px; padding-right: 13px; }
  .stat-card { padding: 15px 13px; }
  .stat-label svg { display: none; }
  .topbar-actions [data-action="change-password"] { padding-left: 4px; padding-right: 4px; }
  .breadcrumb #breadcrumb-realm { display: none; }
  .breadcrumb > span:nth-child(2) { display: none; }
  .secret-row { flex-wrap: wrap; }
  .secret-row > div { flex-basis: 100%; }
  .share-card { padding: 21px; }
  .verification-code { font-size: 30px; letter-spacing: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
