:root {
  color-scheme: dark;
  --bg: #0f1214;
  --surface: #171b1e;
  --surface-2: #1d2326;
  --line: #2d3539;
  --text: #edf1ef;
  --muted: #99a5a1;
  --green: #4dd08a;
  --cyan: #58bfd0;
  --amber: #e7b65a;
  --red: #ed6c72;
  --radius: 7px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; overflow-x: hidden; background: var(--bg); color: var(--text); font-size: 14px; letter-spacing: 0; }
a { color: var(--cyan); text-decoration: none; }
a:hover { color: #8cdce8; }
button, input, select { font: inherit; letter-spacing: 0; }
.app-shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 22px 16px; border-right: 1px solid var(--line); background: #121619; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 8px 22px; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid #3c6853; border-radius: var(--radius); color: var(--green); background: #173026; font-size: 18px; font-weight: 800; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 15px; }.brand small { margin-top: 1px; color: var(--muted); font-size: 12px; }
.nav { display: grid; gap: 4px; }
.nav-link { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 11px; border-radius: 6px; color: #bac4c0; font-weight: 600; }
.nav-link span { width: 18px; color: #81908a; font-size: 17px; text-align: center; }
.nav-link:hover { background: var(--surface); color: var(--text); }
.nav-link.active { background: #203029; color: #dcf8e9; }.nav-link.active span { color: var(--green); }
.sidebar-footer { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line); }
.admin-identity { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.avatar-shell { position: relative; flex: 0 0 34px; width: 34px; height: 34px; }.admin-identity .avatar { position: absolute; inset: 0; display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; background: #293135; color: var(--text); font-weight: 700; }.admin-identity img.avatar { object-fit: cover; }
.admin-identity strong, .admin-identity small { display: block; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-identity strong { font-size: 13px; }.admin-identity small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.admin-menu summary { margin: 0; list-style: none; cursor: pointer; }.admin-menu summary::-webkit-details-marker { display: none; }.admin-menu .admin-identity { margin-bottom: 0; }.menu-chevron { margin-left: auto; color: var(--muted); transition: transform .15s ease; }.admin-menu[open] .menu-chevron { transform: rotate(180deg); }.admin-menu-panel { display: grid; gap: 10px; margin-top: 11px; padding: 11px; border: 1px solid var(--line); border-radius: 6px; background: #0f1416; }.admin-menu-panel > span { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 10px; }.admin-menu-panel > span strong { max-width: 110px; overflow: hidden; color: var(--text); text-overflow: ellipsis; white-space: nowrap; }.admin-menu-panel > a { font-size: 11px; font-weight: 650; }
.logout { width: 100%; height: 36px; border: 1px solid var(--line); border-radius: 6px; color: #bdc5c2; background: transparent; cursor: pointer; }.logout:hover { color: var(--text); border-color: #4b565a; }
.main { min-width: 0; padding: 28px clamp(18px, 4vw, 50px) 50px; }
.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; max-width: 1440px; margin: 0 auto 25px; }
.topbar h1 { margin: 3px 0 0; font-size: 27px; line-height: 1.2; }.eyebrow { margin: 0; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.chat-switcher { position: relative; width: min(290px, 40vw); }.chat-switcher::after { position: absolute; top: 50%; right: 12px; color: var(--muted); content: "⌄"; pointer-events: none; transform: translateY(-58%); }.chat-switcher select { width: 100%; height: 38px; padding: 0 34px 0 12px; overflow: hidden; appearance: none; border: 1px solid var(--line); border-radius: 6px; color: #dce5e1; background: #141a1d; font-weight: 600; text-overflow: ellipsis; cursor: pointer; }.chat-switcher select:hover, .chat-switcher select:focus-visible { border-color: #466158; outline: 0; }.chat-switcher.is-loading { opacity: .65; pointer-events: none; }
.metric-grid, .split-grid, .section-block, .filters, .profile-head { max-width: 1440px; margin-right: auto; margin-left: auto; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.metric { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.metric span, .metric small { display: block; color: var(--muted); }.metric span { font-size: 12px; font-weight: 650; }.metric strong { display: block; margin: 10px 0 3px; font-size: 28px; font-weight: 680; }.metric small { font-size: 12px; }
.split-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.section-block { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }.section-block + .section-block { margin-top: 14px; }.split-grid .section-block { margin: 0; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }.section-heading h2 { margin: 3px 0 0; font-size: 17px; }
.status { padding: 5px 8px; border: 1px solid; border-radius: 5px; font-size: 11px; font-weight: 700; }.status.online { border-color: #2d654b; color: var(--green); background: #183127; }.status.offline { border-color: #743b3f; color: var(--red); background: #321e21; }
.status.warning { border-color: #725b32; color: var(--amber); background: #30291c; }.status.neutral { border-color: #3c484d; color: #b7c2be; background: #20272a; }
.server-value { display: flex; align-items: baseline; gap: 10px; }.server-value strong { font-size: 44px; }.server-value span, .muted { color: var(--muted); }.muted { margin: 7px 0 0; font-size: 12px; }
.facts { margin: 0; }.facts div { display: flex; justify-content: space-between; gap: 20px; padding: 10px 0; border-top: 1px solid var(--line); }.facts div:first-child { border-top: 0; }.facts dt { color: var(--muted); }.facts dd { margin: 0; text-align: right; }
.activity-list { display: grid; }.activity-row { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px 0; border-top: 1px solid var(--line); }.activity-row:first-child { border-top: 0; }.activity-dot { width: 7px; height: 7px; margin-top: 5px; border-radius: 50%; background: var(--green); }.activity-row strong { font-size: 13px; }.activity-row p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }.activity-row time { color: var(--muted); font-size: 11px; white-space: nowrap; }
.text-link { font-size: 12px; font-weight: 650; }
.overview-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 1440px; margin: 0 auto 14px; }
.segmented, .audit-tabs { display: flex; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 6px; background: #121719; }
.segmented a, .audit-tabs a { min-height: 32px; padding: 7px 13px; border-radius: 4px; color: var(--muted); font-size: 12px; font-weight: 650; text-align: center; }
.segmented a:hover, .audit-tabs a:hover { color: var(--text); background: var(--surface-2); }
.segmented a.active, .audit-tabs a.active { color: #e7fff2; background: #295640; }
.freshness { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.freshness-label { display: inline-flex; align-items: center; gap: 7px; }
.freshness button { height: 31px; padding: 0 10px; border: 1px solid var(--line); border-radius: 5px; color: #c5cecb; background: transparent; cursor: pointer; }
.freshness button:hover { border-color: #4b565a; color: var(--text); }
.live-dot, .health-dot { display: inline-block; flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.overview-metrics { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.metric-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.metric-help { display: grid; flex: 0 0 auto; width: 19px; height: 19px; padding: 0; place-items: center; border: 1px solid #3a4549; border-radius: 50%; color: #84918c; background: transparent; font-size: 10px; cursor: help; }
.trend { display: block; color: var(--muted); font-size: 11px; white-space: nowrap; }.trend.up { color: var(--green); }.trend.down { color: var(--red); }
.chart-section { margin-bottom: 14px; }.chart-section .section-heading { margin-bottom: 12px; }
.chart-legend { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 14px; color: var(--muted); font-size: 11px; }
.chart-legend span::before { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 2px; content: ""; }.chart-legend .messages::before { background: rgba(77,208,138,.65); }.chart-legend .authors::before { height: 2px; border-radius: 0; background: var(--cyan); vertical-align: middle; }.chart-legend .flood::before { background: var(--red); }
.overview-chart { min-height: 380px; overflow: hidden; }.overview-chart svg { display: block; width: 100%; height: auto; max-height: 380px; }
.chart-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 0 0 10px; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: var(--line); }
.chart-stats div { min-width: 0; padding: 10px 12px; background: #151c20; }.chart-stats span, .chart-stats strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.chart-stats span { color: var(--muted); font-size: 9px; font-weight: 700; text-transform: uppercase; }.chart-stats strong { margin-top: 4px; color: #e8efed; font-size: 14px; font-variant-numeric: tabular-nums; }
.chart-grid-line { stroke: #30383c; stroke-width: 1; }.chart-axis-label { fill: #84908c; font-size: 10px; }.chart-axis-label.right { fill: #72b9c5; }.chart-axis-title { fill: #7da18e; font-size: 10px; font-weight: 700; text-transform: uppercase; }.chart-axis-title.right { fill: #72b9c5; }.chart-bar { fill: rgba(77,208,138,.42); transition: fill .12s ease; }.chart-bar:hover { fill: rgba(77,208,138,.72); }.chart-bar.peak { fill: rgba(77,208,138,.76); }.chart-bar.minimum { fill: rgba(239,198,111,.52); }.chart-author-line { fill: none; stroke: var(--cyan); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }.chart-author-point { fill: var(--cyan); stroke: #16333a; stroke-width: 1.5; }.chart-flood-baseline { stroke: #4f3032; stroke-width: 1; }.chart-flood-bar { fill: rgba(241,110,114,.72); }.chart-flood-zero { fill: #3d2b2d; }.chart-lane-label { fill: #b77d80; font-size: 10px; font-weight: 650; }.chart-extreme-label { font-size: 9px; font-weight: 750; }.chart-extreme-label.peak { fill: var(--green); }.chart-extreme-label.minimum { fill: var(--amber); }
.overview-details { align-items: stretch; }.overview-details .section-block { min-height: 290px; }
.summary-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin-bottom: 14px; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: var(--line); }.summary-pair div { padding: 14px; background: var(--surface-2); }.summary-pair strong, .summary-pair span { display: block; }.summary-pair strong { margin-bottom: 3px; font-size: 23px; }.summary-pair span { color: var(--muted); font-size: 11px; }
.compact-facts div { padding: 8px 0; }.system-facts dd { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }.health-dot.bad { background: var(--red); }.danger-text { color: var(--red); }
.audit-preview { margin-bottom: 14px; }.audit-tabs { width: fit-content; margin: -4px 0 12px; }.audit-tabs a { min-width: 90px; }
#overview-root { transition: opacity .16s ease; }#overview-root.refreshing { opacity: .62; }#overview-root.refresh-failed .freshness { color: var(--red); }
.filters { display: grid; grid-template-columns: 180px 180px minmax(220px, 1fr) auto; gap: 10px; align-items: end; margin-bottom: 14px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }.filters.wide { grid-template-columns: repeat(4, minmax(150px, 1fr)) auto; }.filters.compact { grid-template-columns: minmax(240px, 500px) auto; justify-content: start; }
.filters label { display: grid; gap: 6px; color: var(--muted); font-size: 11px; font-weight: 650; }.filters input, .filters select { width: 100%; height: 38px; padding: 0 10px; border: 1px solid #394247; border-radius: 5px; outline: 0; background: #111619; color: var(--text); }.filters input:focus, .filters select:focus { border-color: var(--cyan); box-shadow: 0 0 0 2px rgba(88,191,208,.12); }.filters button { height: 38px; padding: 0 18px; border: 1px solid #39765a; border-radius: 5px; color: #e7fff2; background: #25533f; cursor: pointer; }.filters button:hover { background: #2d654b; }
.audit-filters { grid-template-columns: repeat(6, minmax(135px, 1fr)); }.audit-search { grid-column: span 2; }.filter-actions { display: flex; align-items: center; gap: 12px; }.filter-actions a { color: var(--muted); font-size: 12px; font-weight: 650; }.filter-actions a:hover { color: var(--text); }
.table-block { padding: 0; overflow: hidden; }.table-block .section-heading { padding: 18px 20px 0; }.table-wrap { overflow-x: auto; }
.access-result { min-width: 96px; }.access-result small { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 9px; }
table { width: 100%; border-collapse: collapse; }th, td { padding: 12px 14px; border-top: 1px solid var(--line); text-align: left; vertical-align: top; }th { color: var(--muted); background: #151a1d; font-size: 10px; font-weight: 700; text-transform: uppercase; white-space: nowrap; }td { font-size: 12px; }td small { display: block; margin-top: 3px; color: var(--muted); }.reason { min-width: 180px; max-width: 340px; overflow-wrap: anywhere; }
.audit-row { cursor: pointer; transition: background .12s ease; }.audit-row:hover, .audit-row:focus-visible { outline: 0; background: #1b2225; }.event-id { font-weight: 750; }.audit-result { font-weight: 650; }.audit-result.success { color: var(--green); }.audit-result.pending, .audit-result.cancelled { color: var(--amber); }.audit-result.failed, .audit-result.rejected { color: var(--red); }.change-preview { color: #dce5e2; }
.tag { display: inline-block; padding: 4px 7px; border: 1px solid #5d4930; border-radius: 4px; color: var(--amber); background: #2e261b; font-size: 10px; font-weight: 700; white-space: nowrap; }.tag.neutral { border-color: #35525a; color: #90d4df; background: #1c2c31; }.tag.warning { border-color: #743b3f; color: #f09a9e; background: #321e21; }
.tag.success { border-color: #2d654b; color: var(--green); background: #183127; }.tag.subtle { border-color: #3c484d; color: #aeb9b5; background: #20272a; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 9px; padding: 16px; border-top: 1px solid var(--line); }.pagination a, .pagination .disabled { display: grid; place-items: center; width: 34px; height: 32px; border: 1px solid var(--line); border-radius: 5px; color: var(--text); }.pagination .disabled { color: #56605d; }.pagination > span:not(.disabled) { min-width: 70px; text-align: center; color: var(--muted); font-size: 12px; }
.pagination a.active { border-color: #39765a; color: #e7fff2; background: #25533f; }.pagination .ellipsis { min-width: auto !important; padding: 0 2px; }
.empty { margin: 0; padding: 24px 20px; color: var(--muted); }.profile-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }.profile-head h2 { margin: 0; font-size: 19px; }.profile-head p { margin: 4px 0 0; color: var(--muted); }.profile-head .text-link { margin-left: auto; }.profile-avatar { position: relative; display: grid; flex: 0 0 46px; width: 46px; height: 46px; overflow: hidden; place-items: center; border-radius: 50%; background: #224234; color: var(--green); font-size: 19px; font-weight: 750; }.profile-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }.profile-metrics { margin-bottom: 14px; }
.users-summary { grid-template-columns: repeat(5, minmax(0, 1fr)); }.users-filters { grid-template-columns: repeat(5, minmax(140px, 1fr)); }.users-search { grid-column: span 2; }.users-filter-actions { align-self: end; min-height: 38px; }.export-link { padding: 10px 11px; border: 1px solid #35525a; border-radius: 5px; color: #90d4df !important; }.users-table-block .section-heading > small { margin: 0; }.users-table-wrap { max-height: calc(100vh - 310px); }.users-table thead { position: sticky; top: 0; z-index: 2; }.user-row { cursor: pointer; transition: background .12s ease; }.user-row:hover, .user-row:focus-visible { outline: 0; background: #1b2225; }.user-name { display: inline-block; max-width: 230px; overflow: hidden; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }.copy-id { display: block; margin-top: 5px; padding: 0; border: 0; color: #71807a; background: none; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 10px; cursor: pointer; }.copy-id:hover { color: var(--cyan); }.user-tags { display: flex; flex-wrap: wrap; gap: 5px; }.row-open { display: grid; width: 28px; height: 28px; padding: 0; place-items: center; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); background: transparent; cursor: pointer; }.row-open:hover { color: var(--text); border-color: #4b565a; }.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.drawer-backdrop { position: fixed; z-index: 20; inset: 0; background: rgba(4, 7, 8, .58); }.user-drawer { position: fixed; z-index: 21; top: 0; right: 0; width: min(440px, 100vw); height: 100vh; padding: 20px; overflow-y: auto; border-left: 1px solid var(--line); background: #121719; box-shadow: -20px 0 45px rgba(0, 0, 0, .28); transform: translateX(102%); transition: transform .18s ease; }.user-drawer.open { transform: translateX(0); }.user-drawer > header { display: flex; align-items: center; justify-content: space-between; padding-bottom: 16px; border-bottom: 1px solid var(--line); }.user-drawer h2 { margin: 3px 0 0; font-size: 20px; }.user-drawer > header button { display: grid; width: 34px; height: 34px; padding: 0; place-items: center; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); background: transparent; font-size: 22px; cursor: pointer; }.drawer-profile { display: flex; align-items: center; gap: 12px; padding: 20px 0; }.drawer-profile h3 { margin: 0; font-size: 18px; }.drawer-profile p { margin: 4px 0 7px; color: var(--muted); font-size: 12px; }.drawer-metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: var(--line); }.drawer-metrics div { padding: 14px; background: var(--surface); }.drawer-metrics span, .drawer-metrics strong { display: block; }.drawer-metrics span { color: var(--muted); font-size: 10px; text-transform: uppercase; }.drawer-metrics strong { margin-top: 5px; font-size: 22px; }.drawer-section { margin-top: 18px; }.drawer-section h4 { margin: 0 0 7px; font-size: 13px; }.drawer-full-link { display: block; margin-top: 20px; padding: 11px; border: 1px solid #39765a; border-radius: 5px; color: #e7fff2; background: #25533f; text-align: center; font-weight: 650; }.drawer-error { color: var(--red); }
.detail-toolbar { max-width: 1000px; margin: 0 auto 12px; }.back-link { color: var(--muted); font-size: 12px; font-weight: 650; }.audit-event-card { max-width: 1000px; }.audit-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }.audit-detail-grid > div { min-width: 0; padding: 15px 0; border-bottom: 1px solid var(--line); }.audit-detail-grid > div:nth-child(odd) { padding-right: 20px; }.audit-detail-grid > div:nth-child(even) { padding-left: 20px; border-left: 1px solid var(--line); }.audit-detail-grid span, .audit-detail-grid small, .related-entity span { display: block; color: var(--muted); font-size: 11px; }.audit-detail-grid strong { display: block; margin-top: 5px; overflow-wrap: anywhere; }.audit-detail-grid small { margin-top: 3px; }.audit-change, .audit-details, .related-entity { padding-top: 20px; }.audit-change > div { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 16px; align-items: center; }.audit-change section { min-width: 0; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }.audit-change section span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 11px; }.audit-change section strong { overflow-wrap: anywhere; }.change-arrow { color: var(--cyan); font-size: 20px; }.audit-details p:last-child { margin: 8px 0 0; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }.related-entity { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.state-page { max-width: 600px; margin: 80px auto; text-align: center; }.state-page > span { color: var(--red); font-size: 13px; font-weight: 800; }.state-page h2 { margin: 10px 0; font-size: 24px; }.state-page p { color: var(--muted); }.state-page a { display: inline-block; margin-top: 12px; }
.login-page { display: grid; min-height: 100vh; place-items: center; padding: 20px; }.login-panel { width: min(100%, 430px); padding: 32px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }.login-brand { padding: 0 0 28px; }.login-panel h1 { margin: 7px 0 12px; font-size: 27px; }.login-copy, .login-note { color: var(--muted); line-height: 1.55; }.telegram-login { min-height: 44px; margin: 26px 0 16px; }.form-error { padding: 10px; border: 1px solid #743b3f; border-radius: 5px; color: #f2b1b4; background: #321e21; }.login-note { margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: 11px; }
@media (max-width: 1180px) { .overview-metrics, .users-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }.audit-filters, .users-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 980px) { .app-shell { grid-template-columns: 1fr; }.sidebar { position: static; width: 100%; height: auto; padding: 12px 16px; border-right: 0; border-bottom: 1px solid var(--line); }.brand { padding: 0 0 10px; }.nav { display: flex; overflow-x: auto; }.nav-link { flex: 0 0 auto; min-height: 36px; }.sidebar-footer { display: none; }.main { padding-top: 20px; }.metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.overview-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }.filters, .filters.wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }.filters button { align-self: end; } }
@media (max-width: 680px) { .sidebar { position: sticky; z-index: 10; top: 0; padding: 10px 12px 8px; }.brand { padding-bottom: 8px; }.brand-mark { width: 30px; height: 30px; font-size: 16px; }.nav { gap: 3px; margin: 0 -4px; padding: 0 4px 3px; scrollbar-width: none; }.nav::-webkit-scrollbar { display: none; }.nav-link { min-height: 34px; padding: 0 10px; font-size: 12px; white-space: nowrap; }.nav-link span { width: 14px; font-size: 15px; }.sidebar-footer { display: block; margin: 7px 0 0; padding: 7px 0 0; }.admin-menu-panel { position: absolute; right: 12px; left: 12px; z-index: 11; }.admin-identity { margin: 0; }.main { padding: 18px 10px 34px; }.topbar { align-items: stretch; flex-direction: column; margin-bottom: 16px; }.topbar h1 { font-size: 22px; }.chat-id { display: none; }.chat-switcher { width: 100%; min-width: 0; }.overview-toolbar { align-items: stretch; flex-direction: column; }.segmented { display: grid; grid-template-columns: repeat(3, 1fr); }.freshness { justify-content: space-between; }.metric-grid, .split-grid, .overview-metrics, .users-summary { grid-template-columns: 1fr 1fr; gap: 8px; }.metric { padding: 14px; }.metric strong { font-size: 23px; }.split-grid { grid-template-columns: 1fr; }.section-block { padding: 16px; }.chart-section .section-heading { align-items: flex-start; flex-direction: column; }.chart-legend { justify-content: flex-start; }.overview-chart { min-height: 220px; overflow-x: auto; }.overview-chart svg { min-width: 690px; }.audit-tabs { display: grid; width: 100%; grid-template-columns: repeat(2, 1fr); }.filters, .filters.wide, .filters.compact, .audit-filters, .users-filters { grid-template-columns: 1fr; padding: 12px; }.users-search { grid-column: auto; }.audit-search { grid-column: auto; }.filter-actions { justify-content: space-between; }.table-block { padding: 0; }.table-wrap, .users-table-wrap { max-height: none; overflow: visible; }table, thead, tbody, tr, th, td { display: block; }thead { display: none; }tr { padding: 10px 14px; border-top: 1px solid var(--line); }td { display: grid; grid-template-columns: 108px minmax(0, 1fr); gap: 10px; padding: 5px 0; border: 0; }td::before { content: attr(data-label); color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; }.reason { min-width: 0; max-width: none; }.activity-row { grid-template-columns: 8px minmax(0, 1fr); }.activity-row time { grid-column: 2; }.profile-head { padding: 14px; }.profile-head .text-link { display: none; }.audit-detail-grid { grid-template-columns: 1fr; }.audit-detail-grid > div:nth-child(n) { padding-right: 0; padding-left: 0; border-left: 0; }.audit-change > div { grid-template-columns: 1fr; gap: 8px; }.change-arrow { transform: rotate(90deg); text-align: center; }.related-entity { align-items: flex-start; flex-direction: column; gap: 6px; }.users-table-block .section-heading > small { display: none; }.row-open { margin-left: auto; }.pagination { flex-wrap: wrap; gap: 5px; } }
@media (max-width: 420px) { .metric-grid { grid-template-columns: 1fr; }.nav-link { padding: 0 9px; }.nav-link span { display: none; }.login-panel { padding: 24px 20px; } }

/* Operations workspace */
:root {
  --bg: #05070a;
  --surface: #0c1118;
  --surface-raised: #111821;
  --surface-soft: #151d27;
  --line: rgb(255 255 255 / 10%);
  --line-strong: rgb(255 255 255 / 17%);
  --text: #f5f7fa;
  --muted: #99a4b1;
  --accent: #9b6cff;
  --accent-soft: #241a3b;
  --blue: #61c5df;
  --amber: #dfb35f;
  --red: #eb7272;
  --violet: #c38bff;
  --green: #42d788;
  --radius: 8px;
}

* { letter-spacing: 0; }
body { background: var(--bg); color: var(--text); font-family: Inter, "Segoe UI", Arial, sans-serif; }
a { color: #c7a8ff; }
a:hover { color: #e0ceff; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
button, input, select, textarea { font: inherit; }
button, .button, input, select, textarea { border-radius: var(--radius); }
.operations-shell { grid-template-columns: 224px minmax(0, 1fr); }
.sidebar { z-index: 20; padding: 18px 12px; background: #080c11; border-color: var(--line); }
.brand { min-height: 48px; padding: 4px 9px 18px; gap: 8px; color: var(--text); }
.brand strong { font-size: 13px; font-weight: 850; }
.brand small { color: #737e8a; font-size: 9px; font-weight: 750; }
.brand-dot { width: 4px; height: 4px; flex: 0 0 auto; border-radius: 50%; background: var(--violet); box-shadow: 0 0 11px rgb(195 139 255 / 80%); }
.nav { gap: 3px; }
.nav-caption { display: block; margin: 18px 10px 5px; color: #626d79; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.nav-link { min-height: 39px; padding: 0 10px; border: 1px solid transparent; border-radius: 8px; color: #aab3be; font-size: 12px; }
.nav-link b { font-weight: 600; }
.nav-icon { width: 17px; height: 17px; flex: 0 0 auto; fill: none; stroke: #747f8b; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.nav-link:hover { background: #101620; color: var(--text); }
.nav-link:hover .nav-icon { stroke: #c6a7ff; }
.nav-link.active { border-color: rgb(155 108 255 / 30%); background: var(--accent-soft); color: #f1eaff; box-shadow: inset 2px 0 var(--accent); }
.nav-link.active span { color: var(--accent); }
.nav-link.active .nav-icon { stroke: var(--violet); }
.sidebar-footer { padding-top: 12px; border-color: var(--line); }
.admin-identity { min-height: 48px; border-radius: 8px; }
.admin-identity .avatar { background: #211a33; color: #d7beff; }
.admin-menu-panel { border-color: var(--line-strong); border-radius: 8px; background: var(--surface-raised); box-shadow: 0 18px 48px rgb(0 0 0 / 45%); }
.logout:hover { border-color: rgb(155 108 255 / 45%); color: #fff; }
.main { min-width: 0; padding: 0 28px 42px; }
.topbar { position: sticky; z-index: 15; top: 0; display: grid; grid-template-columns: minmax(190px, auto) minmax(260px, 520px) minmax(160px, auto); gap: 18px; align-items: center; max-width: 1440px; min-height: 76px; margin: 0 auto 22px; padding: 12px 0; background: rgb(5 7 10 / 92%); border-bottom: 1px solid var(--line); backdrop-filter: blur(16px); }
.page-heading { min-width: 0; }
.topbar .eyebrow { margin-bottom: 2px; color: #858f9a; }
.topbar h1 { overflow: hidden; margin: 0; font-size: 24px; line-height: 1.1; text-overflow: ellipsis; white-space: nowrap; }
.global-search { display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: center; min-height: 38px; padding: 0 11px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--muted); }
.global-search:focus-within { border-color: rgb(155 108 255 / 60%); box-shadow: 0 0 0 3px rgb(155 108 255 / 10%); }
.global-search input { width: 100%; min-width: 0; padding: 0; border: 0; outline: 0; background: transparent; color: var(--text); }
.topbar-actions { display: flex; justify-content: flex-end; min-width: 0; }
.chat-switcher, .chat-switcher select { width: min(290px, 100%); }
.chat-switcher select, .chat-label { min-height: 38px; border-color: var(--line); background: var(--surface); }
.chat-switcher.is-loading { opacity: .65; pointer-events: none; }
.page-content { max-width: 1440px; margin: 0 auto; }
.section-block, .metric, .filters, .profile-head, .system-banner, .search-summary { border-color: var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 16px 42px rgb(0 0 0 / 16%); }
.section-block { padding: 18px; }
.section-heading { gap: 14px; margin-bottom: 14px; }
.section-heading h2 { font-size: 17px; }
.section-heading .eyebrow, .eyebrow { color: #b687ff; font-size: 9px; }
.section-note { color: var(--muted); font-size: 11px; }
.metric-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.metric { position: relative; overflow: hidden; min-height: 112px; padding: 16px; }
.metric::before { position: absolute; top: 0; right: 0; left: 0; height: 2px; background: var(--accent); content: ""; opacity: .8; }
.metric:nth-child(4n + 2)::before { background: var(--blue); }
.metric:nth-child(4n + 3)::before { background: var(--amber); }
.metric:nth-child(4n + 4)::before { background: var(--violet); }
.metric > span { color: #9aabb3; font-size: 11px; font-weight: 600; }
.metric strong { margin: 8px 0 5px; font-size: 27px; line-height: 1; }
.metric small { color: var(--muted); font-size: 10px; }
.filters { gap: 10px; padding: 14px; }
.filters label { color: #91a3ac; font-size: 10px; font-weight: 700; }
.filters input, .filters select, .global-search input, .chat-switcher select { font-size: 12px; }
.filters input, .filters select { min-height: 36px; border-color: var(--line-strong); background: #080c11; color: var(--text); }
.filter-actions button, .filters button, .system-banner a { min-height: 36px; border: 1px solid rgb(155 108 255 / 48%); border-radius: 8px; background: #6f47ce; color: #fff; font-size: 11px; font-weight: 700; box-shadow: 0 8px 22px rgb(111 71 206 / 18%); }
.filter-actions button:hover, .filters button:hover, .system-banner a:hover { background: #8157df; color: #fff; }
.filter-actions a { color: var(--muted); font-size: 11px; }
.filter-panel { margin-bottom: 12px; }
.filter-panel > summary { display: none; }
.saved-filter-bar, .saved-filter-list { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.saved-filter-bar { margin: 0 0 10px; }
.saved-filter-list small { color: var(--muted); font-size: 10px; }
.saved-filter-label { margin-right: 2px; color: #71838c; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.saved-filter-chip, .save-filter-menu { display: inline-flex; align-items: center; min-height: 30px; border: 1px solid var(--line); border-radius: 6px; background: #0b1016; color: #a8b2bd; font-size: 10px; }
.saved-filter-chip a { padding: 7px 8px; color: #d2baff; text-decoration: none; }
.saved-filter-chip form { display: flex; }
.saved-filter-chip button { width: 28px; height: 28px; padding: 0; border: 0; border-left: 1px solid var(--line); background: transparent; color: var(--muted); }
.save-filter-menu { position: relative; }
.save-filter-menu summary { padding: 7px 9px; cursor: pointer; list-style: none; }
.save-filter-menu > form { position: absolute; z-index: 12; top: 36px; right: 0; display: flex; width: 280px; gap: 6px; padding: 9px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface-raised); box-shadow: 0 12px 32px rgb(0 0 0 / 35%); }
.save-filter-menu input { min-width: 0; flex: 1; }
.table-block { overflow: hidden; padding: 0; }
.table-block > .section-heading { margin: 0; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.table-wrap { border: 0; }
table { font-size: 11px; }
th { height: 36px; padding: 8px 12px; background: #090d12; color: #7f8995; font-size: 9px; }
td { padding: 9px 12px; border-color: var(--line); }
tbody tr { transition: background-color 120ms ease; }
tbody tr:hover { background: #121823; }
.audit-row, .user-row { cursor: pointer; }
.status-pill { display: inline-flex; width: max-content; max-width: 100%; align-items: center; min-height: 22px; padding: 2px 7px; border: 1px solid var(--line-strong); border-radius: 999px; background: #182128; color: #aebcc3; font-size: 9px; font-weight: 800; white-space: nowrap; }
.status-pill.success, .status-pill.active, .status-pill.completed { border-color: #2d6c54; background: #153226; color: #70dba5; }
.status-pill.pending, .status-pill.warning { border-color: #715b2b; background: #352b17; color: #efc66f; }
.status-pill.failed, .status-pill.rejected { border-color: #713839; background: #351b1d; color: #f18a8d; }
.status-pill.info { border-color: #60478d; background: #241a39; color: #c6a6ff; }
.status-dot, .health-dot { flex: 0 0 auto; }
.empty-state, .loading-state, .error-state { display: grid; min-height: 170px; place-items: center; align-content: center; gap: 7px; padding: 24px; color: var(--muted); text-align: center; }
.empty-state > span, .loading-state > span, .error-state > span { color: var(--violet); font-size: 22px; }
.empty-state h2, .empty-state h3, .loading-state h3, .error-state h3 { margin: 0; color: var(--text); font-size: 16px; }
.empty-state p, .loading-state p, .error-state p { max-width: 520px; margin: 0; font-size: 11px; }
.compact-empty { padding: 20px 0; color: var(--muted); font-size: 11px; }
.detail-drawer { position: fixed; z-index: 41; top: 0; right: 0; overflow-y: auto; width: min(520px, 94vw); height: 100%; padding: 18px; border-left: 1px solid var(--line-strong); background: #080c11; box-shadow: -22px 0 55px rgb(0 0 0 / 50%); transform: translateX(102%); transition: transform 180ms ease; }
.detail-drawer.open { transform: translateX(0); }
.detail-drawer > header { display: flex; align-items: center; justify-content: space-between; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.detail-drawer > header h2 { margin: 2px 0 0; font-size: 18px; }
.detail-drawer > header button { display: grid; width: 34px; height: 34px; padding: 0; place-items: center; border: 1px solid var(--line); background: transparent; color: var(--text); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.drawer-close { display: grid; width: 34px; height: 34px; padding: 0; place-items: center; border: 1px solid var(--line); background: transparent; color: var(--text); }
.audit-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: var(--line); }
.audit-detail-grid > div { padding: 11px; background: var(--surface); }
.audit-detail-grid dt { color: var(--muted); font-size: 9px; text-transform: uppercase; }
.audit-detail-grid dd { margin: 4px 0 0; font-size: 12px; }
.timeline-list { position: relative; display: grid; gap: 0; }
.timeline-item { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.timeline-item:last-child { border-bottom: 0; }
.timeline-marker { width: 8px; height: 8px; margin-top: 5px; border: 2px solid var(--surface); border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 1px #7655b6; }
.timeline-content strong { display: block; font-size: 12px; }
.timeline-content p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.timeline-item time { color: #73858e; font-size: 9px; white-space: nowrap; }
.profile-identity { display: flex; gap: 12px; align-items: center; }
.profile-identity .avatar, .profile-identity .avatar-shell { width: 48px; height: 48px; }
.search-summary { display: flex; gap: 10px; align-items: baseline; margin-bottom: 10px; padding: 13px 16px; }
.search-summary p, .search-summary h2 { margin: 0; }
.search-summary p, .search-summary span { color: var(--muted); font-size: 11px; }
.search-summary h2 { overflow: hidden; font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
.search-summary span { margin-left: auto; }
.search-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.search-audit { grid-column: 1 / -1; }
.result-list { display: grid; }
.result-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 9px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; }
.result-row:last-child { border-bottom: 0; }
.result-row:hover strong { color: var(--violet); }
.result-avatar { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; background: #241a39; color: #c8acff; font-weight: 800; }
.result-row strong, .result-row small { display: block; }
.result-row strong { font-size: 11px; }
.result-row small, .result-row time { color: var(--muted); font-size: 9px; }
.system-banner { display: flex; gap: 13px; align-items: center; margin-bottom: 10px; padding: 14px 16px; }
.system-banner h2, .system-banner p { margin: 0; }
.system-banner h2 { font-size: 16px; }
.system-banner p { margin-top: 3px; color: var(--muted); font-size: 10px; }
.system-banner a { display: inline-flex; align-items: center; margin-left: auto; padding: 0 12px; text-decoration: none; }
.system-pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px rgb(155 108 255 / 11%); }
.system-banner.attention .system-pulse { background: var(--amber); box-shadow: 0 0 0 5px rgb(223 179 95 / 10%); }
.task-grid { display: grid; gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: var(--line); }
.task-row { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 10px; background: #090e14; }
.task-row strong { font-size: 10px; }
.task-row small { color: var(--muted); font-size: 9px; }
.segmented, .audit-tabs { border-color: var(--line); background: #080c11; }
.segmented a:hover, .audit-tabs a:hover { background: var(--surface-raised); }
.segmented a.active, .audit-tabs a.active { color: #f2eaff; background: var(--accent-soft); box-shadow: inset 0 0 0 1px rgb(155 108 255 / 30%); }
.freshness button:hover, .row-open:hover { border-color: rgb(155 108 255 / 48%); color: #fff; }
.filters input:focus, .filters select:focus, .chat-switcher select:focus-visible { border-color: rgb(155 108 255 / 62%); box-shadow: 0 0 0 3px rgb(155 108 255 / 10%); }
.pagination a.active { border-color: rgb(155 108 255 / 50%); color: #fff; background: #6f47ce; }
.export-link { border-color: rgb(155 108 255 / 35%); color: #cbb2ff !important; }
.copy-id:hover, .change-arrow { color: var(--violet); }
.profile-avatar { background: #241a39; color: #c8acff; }
.drawer-full-link { border-color: rgb(155 108 255 / 48%); color: #fff; background: #6f47ce; }
.drawer-full-link:hover { color: #fff; background: #8157df; }
.mobile-nav { display: none; }
.sr-only { position: absolute; overflow: hidden; width: 1px; height: 1px; padding: 0; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.login-page {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  padding: 34px;
  background: var(--bg);
}

.login-page::before,
.login-page::after {
  position: fixed;
  width: 44vw;
  height: 1px;
  background: rgb(155 108 255 / 18%);
  content: "";
  pointer-events: none;
}

.login-page::before { top: 19%; left: -8%; transform: rotate(-18deg); }
.login-page::after { right: -7%; bottom: 18%; transform: rotate(-18deg); }

.login-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 500px);
  display: grid;
  gap: 18px;
}

.login-back {
  width: max-content;
  color: #8f99a5;
  font-size: 11px;
  font-weight: 700;
}

.login-back::before { margin-right: 7px; color: var(--violet); content: "←"; }

.login-panel {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgb(12 17 24 / 96%);
  box-shadow: 0 30px 90px rgb(0 0 0 / 50%);
}

.login-panel::before {
  position: absolute;
  top: 0;
  right: 44px;
  left: 44px;
  height: 2px;
  background: var(--accent);
  content: "";
  box-shadow: 0 0 22px rgb(155 108 255 / 65%);
}

.login-brand {
  min-height: 0;
  padding: 0 0 42px;
}

.login-heading h1 {
  margin: 8px 0 15px;
  font-size: 36px;
  line-height: 1.08;
}

.login-copy {
  max-width: 380px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.telegram-login {
  min-height: 54px;
  margin: 30px 0 20px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.form-error { border-color: #713839; border-radius: 8px; color: #f3a6aa; background: #351b1d; }

.login-note {
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  color: #7f8a96;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.login-note span {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px rgb(66 215 136 / 70%);
}

.login-footer { margin: 0; color: #626d79; font-size: 10px; text-align: center; }

@media (max-width: 1060px) {
  .operations-shell { grid-template-columns: 190px minmax(0, 1fr); }
  .main { padding-right: 18px; padding-left: 18px; }
  .topbar { grid-template-columns: minmax(160px, auto) minmax(220px, 1fr); }
  .topbar-actions { grid-column: 2; grid-row: 1; }
  .global-search { grid-column: 1 / -1; grid-row: 2; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .operations-shell { display: block; }
  .sidebar { display: none; }
  .main { padding: 0 10px 78px; }
  .topbar { position: static; grid-template-columns: minmax(0, 1fr) minmax(120px, 44%); gap: 9px; min-height: auto; margin-bottom: 12px; padding: 13px 0 10px; }
  .topbar h1 { font-size: 20px; }
  .topbar .eyebrow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar-actions { grid-column: 2; grid-row: 1; }
  .global-search { grid-column: 1 / -1; grid-row: 2; min-height: 40px; }
  .chat-switcher select, .chat-label { min-height: 36px; font-size: 10px; }
  .mobile-nav { position: fixed; z-index: 35; right: 0; bottom: 0; left: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 6px max(6px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left)); border-top: 1px solid var(--line-strong); background: rgb(5 7 10 / 97%); backdrop-filter: blur(16px); }
  .mobile-nav a { display: grid; min-height: 45px; place-items: center; align-content: center; gap: 2px; border-radius: 5px; color: #8798a1; font-size: 8px; font-weight: 700; text-decoration: none; }
  .mobile-nav .nav-icon { width: 16px; height: 16px; }
  .mobile-nav a.active { background: var(--accent-soft); color: #d8c3ff; }
  .mobile-nav a.active .nav-icon { stroke: var(--violet); }
  .section-block { padding: 14px; }
  .chart-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chart-stats div:last-child { grid-column: 1 / -1; }
  .overview-chart { min-height: 360px; overflow-x: auto; }
  .overview-chart svg { min-width: 720px; max-height: none; }
  .table-block { padding: 0; }
  .filter-panel > summary { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 11px 13px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--text); font-size: 11px; font-weight: 700; cursor: pointer; }
  .filter-panel > summary small { color: var(--muted); font-size: 8px; font-weight: 500; text-align: right; }
  .filter-panel[open] > summary { border-radius: 6px 6px 0 0; }
  .filter-panel .filters { margin-top: -1px; border-radius: 0 0 6px 6px; }
  .filters, .filters.wide, .filters.compact, .audit-filters, .users-filters { grid-template-columns: 1fr; }
  .metric-grid, .overview-metrics, .users-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .metric { min-height: 96px; padding: 13px; }
  .metric strong { font-size: 23px; }
  .split-grid, .search-grid { grid-template-columns: 1fr; }
  .search-audit { grid-column: auto; }
  table, thead, tbody, tr, th, td { display: block; }
  thead { display: none; }
  tbody tr { padding: 9px 12px; border-top: 1px solid var(--line); }
  td { display: grid; grid-template-columns: minmax(90px, 35%) minmax(0, 1fr); gap: 8px; padding: 4px 0; border: 0; }
  td::before { content: attr(data-label); color: #71838c; font-size: 8px; font-weight: 800; text-transform: uppercase; }
  .save-filter-menu > form { position: fixed; right: 10px; bottom: 66px; left: 10px; width: auto; }
  .detail-drawer, .user-drawer { width: 100%; padding: 14px; }
  .audit-detail-grid { grid-template-columns: 1fr; }
  .timeline-item { grid-template-columns: 10px minmax(0, 1fr); }
  .timeline-item time { grid-column: 2; }
  .system-banner { align-items: flex-start; }
  .system-banner a { align-self: center; }
  .task-row { grid-template-columns: 10px minmax(0, 1fr); }
  .task-row small { grid-column: 2; }
  .search-summary { align-items: flex-start; flex-direction: column; }
  .search-summary span { margin-left: 0; }
}

@media (max-width: 420px) {
  .metric-grid, .overview-metrics, .users-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric { min-height: 92px; }
  .metric strong { font-size: 21px; }
  .mobile-nav a { font-size: 7px; }
  .login-page { padding: 18px; }
  .login-panel { padding: 34px 24px; }
  .login-panel::before { right: 24px; left: 24px; }
  .login-heading h1 { font-size: 30px; }
}

/* Dashboard information hierarchy */
body { background: #05070a; }
.operations-shell { grid-template-columns: 238px minmax(0, 1fr); }
.sidebar { padding: 20px 14px; background: #070b10; }
.brand { padding: 5px 10px 22px; }
.brand strong { font-size: 14px; }
.nav-caption { margin: 20px 11px 7px; color: #6f7a86; }
.nav-link { min-height: 42px; padding: 0 12px; }
.nav-link.active { border-color: rgb(155 108 255 / 38%); background: #211833; box-shadow: inset 3px 0 #9b6cff; }
.admin-identity { padding: 7px 8px; }
.main { padding: 0 clamp(18px, 2.7vw, 44px) 48px; }
.topbar, .page-content { max-width: 1520px; }
.topbar { min-height: 88px; margin-bottom: 20px; }
.topbar h1 { font-size: 25px; }
.page-description { margin: 5px 0 0; color: #788591; font-size: 11px; line-height: 1.35; }
.global-search { min-height: 42px; background: #0a0f15; }
.search-icon { width: 16px; height: 16px; fill: none; stroke: #75818e; stroke-linecap: round; stroke-width: 1.8; }
.chat-switcher select, .chat-label { min-height: 42px; background: #0a0f15; }

.overview-toolbar { margin-bottom: 12px; padding: 4px 0; }
.segmented, .audit-tabs { padding: 4px; border-radius: 8px; }
.segmented a, .audit-tabs a { display: inline-flex; min-height: 34px; align-items: center; justify-content: center; }
.freshness button { min-height: 34px; padding: 0 12px; border-radius: 7px; }

.metric-grid { gap: 12px; margin-bottom: 16px; }
.overview-metrics, .users-summary { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.metric { min-height: 124px; padding: 17px 18px; border-color: #202936; background: #0c121a; box-shadow: 0 10px 28px rgb(0 0 0 / 18%); transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease; }
.metric:hover { border-color: #39475a; background: #0f1620; transform: translateY(-1px); }
.metric::before { display: none; }
.metric-label > span, .metric > span { display: flex; align-items: center; gap: 8px; color: #a9b5c2; font-size: 11px; }
.overview-metrics .metric-label > span::before { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 2px; background: var(--metric-color, #9b6cff); content: ""; box-shadow: 0 0 10px color-mix(in srgb, var(--metric-color, #9b6cff) 45%, transparent); }
.metric-profiles { --metric-color: #9b6cff; }
.metric-users { --metric-color: #56c6df; }
.metric-messages { --metric-color: #55d594; }
.metric-punishments { --metric-color: #e2b75f; }
.metric-antiflood { --metric-color: #ed777c; }
.metric strong { margin: 15px 0 7px; color: #f7f9fb; font-size: 31px; font-variant-numeric: tabular-nums; }
.metric small, .trend { min-height: 16px; color: #778590; line-height: 1.4; }
.metric-help { border-color: #303b49; color: #8d9aa7; background: #101720; }

.section-block, .filters, .profile-head, .system-banner, .search-summary { border-color: #202936; background: #0b1118; box-shadow: 0 12px 34px rgb(0 0 0 / 16%); }
.section-block { padding: 20px; }
.section-heading { align-items: flex-start; margin-bottom: 17px; }
.section-heading h2 { margin-top: 4px; color: #f4f6f9; font-size: 18px; line-height: 1.25; }
.section-description { margin: 6px 0 0; color: #74818d; font-size: 10px; line-height: 1.45; }
.section-note { padding-top: 3px; }
.card-action, .text-link { display: inline-flex; min-height: 30px; align-items: center; padding: 0 10px; border: 1px solid #2b3644; border-radius: 7px; color: #c7a8ff; background: #0e151e; font-size: 10px; font-weight: 700; }
.card-action::after, .text-link::after { margin-left: 7px; content: "›"; font-size: 15px; line-height: 1; }
.card-action:hover, .text-link:hover { border-color: rgb(155 108 255 / 52%); background: #171126; color: #eadfff; }

.overview-details { gap: 12px; }
.overview-details .section-block { min-height: 268px; }
.overview-card { position: relative; overflow: hidden; }
.overview-card::before { position: absolute; top: 20px; bottom: 20px; left: 0; width: 2px; border-radius: 0 2px 2px 0; background: var(--card-accent, #9b6cff); content: ""; opacity: .75; }
.moderation-card { --card-accent: #e2b75f; }
.antiflood-card { --card-accent: #ed777c; }
.server-card { --card-accent: #55d594; }
.system-card { --card-accent: #56c6df; }
.summary-pair { margin-bottom: 10px; border: 0; border-radius: 0; background: transparent; }
.summary-pair div { padding: 11px 14px 11px 0; border-right: 1px solid #202936; background: transparent; }
.summary-pair div + div { padding-left: 14px; border-right: 0; }
.summary-pair strong { font-size: 27px; }
.facts div { border-color: #1d2631; }
.facts dt { color: #83909c; }
.facts dd { color: #dce2e8; font-weight: 650; }

.chart-section { margin-bottom: 16px; padding-bottom: 14px; }
.chart-section .section-heading { margin-bottom: 14px; }
.chart-legend { gap: 16px; padding-top: 4px; }
.chart-legend span { display: inline-flex; align-items: center; }
.chart-legend span::before { margin-right: 7px; }
.chart-legend .messages::before { background: #4fba83; }
.chart-legend .authors::before { height: 3px; border-radius: 2px; background: #59c7df; }
.chart-legend .flood::before { border-radius: 50%; background: #ed777c; box-shadow: 0 0 0 2px rgb(237 119 124 / 16%); }
.overview-chart { position: relative; min-height: 0; overflow: visible; }
.overview-chart svg { width: 100%; max-height: 330px; overflow: visible; }
.chart-stats { width: min(100%, 720px); grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 0 0 8px; border-color: #202936; background: #0a0f15; }
.chart-stats div { padding: 11px 14px; border-right: 1px solid #202936; background: transparent; }
.chart-stats div:last-child { border-right: 0; }
.chart-stats span { color: #71808d; }
.chart-stats strong { margin-top: 5px; font-size: 15px; }
.chart-grid-line { stroke: #202a35; }
.chart-axis-label { fill: #6f7e89; }
.chart-axis-label.right { fill: #6fa8b5; }
.chart-axis-title { fill: #74b08f; }
.chart-axis-title.right { fill: #77b7c6; }
.chart-bar { fill: rgb(78 188 132 / 38%); }
.chart-bar:hover, .chart-bar.peak { fill: rgb(78 188 132 / 68%); }
.chart-author-line { stroke: #59c7df; stroke-width: 2.2; }
.chart-author-point { fill: #79d6e9; stroke: #0b1118; stroke-width: 2; }
.chart-flood-point { fill: #ed777c; stroke: #0b1118; stroke-width: 2; }
.chart-hit-area { fill: transparent; outline: none; cursor: crosshair; }
.chart-hit-area:hover, .chart-hit-area:focus { fill: rgb(155 108 255 / 4%); }
.chart-tooltip { position: absolute; z-index: 4; display: grid; width: 170px; gap: 7px; padding: 11px 12px; border: 1px solid #39465a; border-radius: 7px; background: #111823; box-shadow: 0 14px 34px rgb(0 0 0 / 42%); color: #aab6c2; font-size: 10px; pointer-events: none; }
.chart-tooltip[hidden] { display: none; }
.chart-tooltip strong { color: #fff; font-size: 12px; }
.chart-tooltip span { display: flex; justify-content: space-between; gap: 10px; }
.chart-tooltip b { color: #e8edf2; font-variant-numeric: tabular-nums; }

.filter-panel { overflow: hidden; margin-bottom: 14px; border: 1px solid #202936; border-radius: 8px; background: #0b1118; }
.filter-panel > summary { display: flex; min-height: 43px; align-items: center; justify-content: space-between; gap: 16px; padding: 0 14px; border: 0; color: #dce3ea; font-size: 11px; font-weight: 700; cursor: pointer; list-style: none; }
.filter-panel > summary::-webkit-details-marker { display: none; }
.filter-panel > summary::after { color: #8e9aa6; content: "+"; font-size: 17px; font-weight: 400; }
.filter-panel[open] > summary::after { content: "−"; }
.filter-panel > summary small { margin-left: auto; color: #71808c; font-size: 9px; font-weight: 500; }
.filter-panel .filters { margin: 0; border: 0; border-top: 1px solid #202936; border-radius: 0; box-shadow: none; }
.filters { padding: 16px; }
.filters label { gap: 7px; color: #96a4b0; }
.filters input, .filters select { min-height: 40px; border-color: #293544; background: #080d13; }
.filter-actions button, .filters button { min-height: 40px; padding: 0 16px; }

.table-block > .section-heading { padding: 18px 20px; background: #0d131b; }
.table-wrap { scrollbar-color: #39475a #080c11; }
th { height: 39px; padding: 9px 14px; background: #080d13; color: #7d8b98; }
td { padding: 11px 14px; border-color: #1b242e; line-height: 1.45; }
tbody tr:nth-child(even) { background: rgb(255 255 255 / 1%); }
tbody tr:hover, .audit-row:hover, .user-row:hover { background: #111925; }
.tag, .status, .status-pill { border-radius: 999px; }
.row-open { border-radius: 7px; }
.pagination { background: #090e14; }
.pagination a, .pagination .disabled { border-radius: 7px; }

.empty-state, .loading-state, .error-state { min-height: 190px; }
.empty-state > span, .loading-state > span, .error-state > span { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid #302744; border-radius: 50%; background: #171125; color: #c9acff; font-size: 18px; }
.profile-head { padding: 20px; }
.profile-avatar, .result-avatar { border: 1px solid rgb(155 108 255 / 30%); }
.system-banner { min-height: 82px; }
.task-row { min-height: 43px; }
.activity-row { padding: 14px 0; }
.activity-dot { margin-top: 6px; background: #9b6cff; box-shadow: 0 0 0 3px rgb(155 108 255 / 10%); }
.mobile-more { position: relative; }
.mobile-more > summary { list-style: none; cursor: pointer; }
.mobile-more > summary::-webkit-details-marker { display: none; }
.mobile-more-menu { position: fixed; z-index: 40; right: 8px; bottom: 64px; display: none; width: 180px; padding: 6px; border: 1px solid #303b49; border-radius: 8px; background: #0c121a; box-shadow: 0 18px 46px rgb(0 0 0 / 55%); }
.mobile-more[open] .mobile-more-menu { display: grid; }
.mobile-more-menu a { display: flex; min-height: 40px; align-items: center; justify-content: flex-start; gap: 9px; padding: 0 10px; border-radius: 6px; color: #aab6c2; font-size: 10px; font-weight: 700; }
.mobile-more-menu a.active, .mobile-more-menu a:hover { background: #211833; color: #eadfff; }

@media (max-width: 1180px) {
  .overview-metrics, .users-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .main { padding: 0 10px 78px; }
  .topbar { min-height: auto; }
  .page-description { display: none; }
  .overview-toolbar { gap: 10px; }
  .overview-metrics, .users-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-metrics .metric:last-child, .users-summary .metric:last-child { grid-column: 1 / -1; }
  .metric { min-height: 108px; }
  .metric strong { font-size: 25px; }
  .section-heading { align-items: flex-start; }
  .chart-section { padding: 15px 12px 12px; }
  .chart-section .section-description { display: none; }
  .chart-stats { width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .chart-stats div { padding: 9px 8px; }
  .chart-stats span { white-space: normal; }
  .chart-stats strong { font-size: 12px; white-space: normal; }
  .overview-chart { overflow-x: auto; }
  .overview-chart svg { min-width: 650px; }
  .overview-details .empty-server { min-height: 170px; }
  .mobile-more > summary { display: grid; min-height: 45px; place-items: center; align-content: center; gap: 2px; border-radius: 5px; color: #8798a1; font-size: 8px; font-weight: 700; }
  .mobile-more > summary .nav-icon { width: 16px; height: 16px; }
  .mobile-more.active > summary, .mobile-more[open] > summary { background: var(--accent-soft); color: #d8c3ff; }
  .mobile-more.active > summary .nav-icon, .mobile-more[open] > summary .nav-icon { stroke: var(--violet); }
  .filter-panel > summary { display: flex; }
  .filter-panel[open] > summary { border-radius: 0; }
  tbody tr { background: transparent !important; }
  tbody tr:nth-child(even) { background: rgb(255 255 255 / 1.5%) !important; }
}

@media (max-width: 420px) {
  .overview-metrics, .users-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric { padding: 13px; }
  .metric-label > span, .metric > span { font-size: 10px; }
  .chart-legend { gap: 10px; font-size: 9px; }
}

/* Public member profile */
.account-page {
  position: relative;
  min-height: 100vh;
  margin: 0;
  padding: 14px 24px 64px;
  overflow-x: hidden;
  background: #05070a;
  color: var(--text);
}
.account-stars { position: fixed; z-index: 0; inset: 0; overflow: hidden; pointer-events: none; }
.account-stars span { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: rgb(195 139 255 / 55%); box-shadow: 0 0 12px rgb(155 108 255 / 45%); animation: account-star-pulse 4s ease-in-out infinite; }
.account-stars span:nth-child(1) { top: 14%; left: 8%; }
.account-stars span:nth-child(2) { top: 27%; right: 12%; animation-delay: -1.2s; }
.account-stars span:nth-child(3) { top: 52%; left: 4%; animation-delay: -2.4s; }
.account-stars span:nth-child(4) { top: 68%; right: 5%; animation-delay: -0.7s; }
.account-stars span:nth-child(5) { bottom: 8%; left: 28%; animation-delay: -3.1s; }
.account-stars span:nth-child(6) { bottom: 18%; right: 31%; animation-delay: -1.8s; }
.account-header { position: sticky; z-index: 10; top: 14px; display: flex; width: min(1080px, 100%); min-height: 56px; align-items: center; justify-content: space-between; gap: 20px; margin: 0 auto; padding: 7px 8px 7px 18px; border: 1px solid rgb(255 255 255 / 13%); border-radius: 16px; background: rgb(9 13 18 / 90%); box-shadow: 0 16px 44px rgb(0 0 0 / 38%); backdrop-filter: blur(18px); }
.account-brand { display: flex; align-items: center; gap: 8px; color: #f5f7fa; text-decoration: none; }
.account-brand strong { font-size: 12px; letter-spacing: 0; }
.account-brand > span { width: 4px; height: 4px; border-radius: 50%; background: #c38bff; box-shadow: 0 0 10px rgb(195 139 255 / 70%); }
.account-brand small { color: #788693; font-size: 9px; font-weight: 700; }
.account-actions { display: flex; align-items: center; gap: 8px; }
.account-actions form { margin: 0; }
.account-site-button, .panel-access-button, .account-logout { display: inline-flex; min-height: 38px; align-items: center; justify-content: center; padding: 0 16px; border: 1px solid transparent; border-radius: 999px; color: #c8d0d8; background: transparent; font: inherit; font-size: 11px; font-weight: 750; text-decoration: none; cursor: pointer; transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease, color 180ms ease; }
.account-site-button::before { margin-right: 7px; content: "\2190"; font-size: 14px; line-height: 1; }
.account-site-button:hover, .account-logout:hover { color: #fff; background: rgb(255 255 255 / 7%); transform: translateY(-1px); }
.panel-access-button { border-color: #2f7659; color: #eafff3; background: #1d5f45; box-shadow: 0 8px 24px rgb(50 190 124 / 16%); }
.panel-access-button:hover { border-color: #4bd393; background: #277c5a; transform: translateY(-1px); }
.account-shell { position: relative; z-index: 1; width: min(1180px, 100%); margin: 0 auto; padding-top: 34px; }
.account-hero { display: grid; min-height: 430px; grid-template-columns: minmax(320px, 0.9fr) minmax(520px, 1.2fr); gap: 72px; align-items: center; padding: 76px 8px 72px; border-bottom: 1px solid rgb(255 255 255 / 13%); animation: account-card-enter 600ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.account-profile-summary { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 28px; row-gap: 18px; align-items: start; text-align: left; }
.account-avatar { position: relative; z-index: 1; display: grid; width: 116px; height: 116px; overflow: hidden; place-items: center; border: 1px solid rgb(195 139 255 / 58%); border-radius: 50%; color: #e3d3ff; background: #241a39; font-size: 38px; font-weight: 800; box-shadow: 0 0 0 9px rgb(155 108 255 / 8%), 0 20px 52px rgb(0 0 0 / 38%); }
.account-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.account-identity { position: relative; z-index: 1; padding-top: 3px; }
.account-kicker { grid-column: 1 / -1; margin: 0; color: #c38bff; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.account-identity h1 { max-width: 460px; margin: 0; color: #f6f8fa; font-size: 48px; line-height: 1.04; font-weight: 850; text-shadow: 0 8px 36px rgb(0 0 0 / 45%); overflow-wrap: anywhere; }
.account-handle { margin: 9px 0 0; color: #8795a2; font-size: 13px; }
.account-identity-badges { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.account-role { display: inline-flex; min-height: 36px; align-items: center; gap: 8px; padding: 7px 14px; border: 1px solid rgb(255 255 255 / 16%); border-radius: 999px; color: #d0d6dd; background: rgb(255 255 255 / 6%); font-size: 12px; font-weight: 700; }
.account-role i { width: 8px; height: 8px; border-radius: 50%; background: #45d990; box-shadow: 0 0 13px rgb(69 217 144 / 85%); }
.account-achievement { --medal: #b9773f; --medal-soft: rgb(185 119 63 / 10%); display: inline-flex; min-height: 32px; align-items: center; padding: 5px 12px; border: 1px solid var(--medal); border-radius: 999px; color: #e6b783; background: var(--medal-soft); box-shadow: inset 0 1px rgb(255 255 255 / 4%); font-size: 10px; font-weight: 750; white-space: nowrap; }
.account-achievement.tier-2 { --medal: #aeb9c4; --medal-soft: rgb(174 185 196 / 9%); color: #d9e0e6; }
.account-achievement.tier-3 { --medal: #d4a92f; --medal-soft: rgb(212 169 47 / 10%); color: #f4cf68; box-shadow: inset 0 1px rgb(255 255 255 / 7%), 0 0 14px rgb(212 169 47 / 9%); }
.account-last-seen { margin: 14px 0 0; color: #84909c; font-size: 11px; }
.account-last-seen strong { color: #cfd6dd; }
.account-health { display: inline-flex; min-height: 48px; align-items: center; gap: 11px; margin-top: 18px; padding: 8px 14px 8px 10px; border: 1px solid rgb(69 217 144 / 26%); border-radius: 7px; background: rgb(69 217 144 / 7%); }
.account-health > i { width: 27px; height: 27px; border: 1px solid rgb(69 217 144 / 38%); border-radius: 50%; background: radial-gradient(circle, #45d990 0 3px, rgb(69 217 144 / 12%) 4px 100%); box-shadow: 0 0 18px rgb(69 217 144 / 12%); }
.account-health > span, .account-health strong, .account-health small { display: block; }
.account-health strong { color: #dffbed; font-size: 11px; }
.account-health small { margin-top: 3px; color: #7d9a8c; font-size: 9px; }
.account-health.has-alert { border-color: rgb(226 183 95 / 33%); background: rgb(226 183 95 / 8%); }
.account-health.has-alert > i { border-color: rgb(226 183 95 / 44%); background: radial-gradient(circle, #e2b75f 0 3px, rgb(226 183 95 / 12%) 4px 100%); box-shadow: 0 0 18px rgb(226 183 95 / 13%); }
.account-health.has-alert strong { color: #f4dfb4; }
.account-health.has-alert small { color: #a68e62; }
.account-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
.account-metrics div { min-width: 0; min-height: 138px; padding: 24px 30px; display: flex; align-items: flex-start; flex-direction: column; justify-content: center; }
.account-metrics div:nth-child(even) { border-left: 1px solid rgb(255 255 255 / 10%); }
.account-metrics div:nth-child(n + 3) { border-top: 1px solid rgb(255 255 255 / 10%); }
.account-metrics dt, .account-metrics dd { margin: 0; }
.account-metrics dt, .account-metrics small { display: block; color: #8994a0; font-size: 10px; }
.account-metrics dd { margin: 8px 0 5px; color: #f6f8fa; font-size: 32px; font-weight: 850; font-variant-numeric: tabular-nums; }
.account-metrics div:nth-child(2) dd { color: #68cfe4; }
.account-metrics div:nth-child(3) dd { color: #c2a2ff; }
.account-metrics div:nth-child(4) dd { color: #f0c96c; }
.account-section-heading { max-width: 800px; padding: 72px 6px 34px; }
.account-section-heading p { margin: 0 0 10px; color: #c38bff; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.account-section-heading h2 { margin: 0; color: #f6f8fa; font-size: 40px; line-height: 1.08; }
.account-section-heading span { display: block; margin-top: 14px; color: #929ca7; font-size: 15px; }
.account-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.account-card { position: relative; min-width: 0; overflow: hidden; padding: 34px; border: 1px solid rgb(255 255 255 / 14%); border-radius: 8px; background: #0c1118; box-shadow: 0 22px 64px rgb(0 0 0 / 24%), inset 0 1px rgb(255 255 255 / 3%); transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease; }
.account-card::before { position: absolute; top: 0; right: 34px; left: 34px; height: 1px; background: rgb(155 108 255 / 55%); content: ""; }
.account-card:hover { border-color: rgb(195 139 255 / 34%); box-shadow: 0 28px 72px rgb(0 0 0 / 31%); transform: translateY(-3px); }
.account-progress, .account-achievements, .account-tasks, .account-purchases { grid-column: 1 / -1; }
.account-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 30px; }
.account-card header p { margin: 0 0 7px; color: #c38bff; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.account-card h2 { margin: 0; color: #f2f5f8; font-size: 25px; }
.account-card > header > span { padding: 7px 11px; border: 1px solid #34404d; border-radius: 999px; color: #aab4be; background: #101720; font-size: 10px; white-space: nowrap; }
.account-card > header > span.is-clear { border-color: #28634b; color: #63dda0; background: #102a20; }
.account-card > header > span.has-alert { border-color: #704f29; color: #e9bd66; background: #2b2113; }
.account-card > header > a { display: inline-flex; min-height: 36px; align-items: center; padding: 0 15px; border: 1px solid rgb(195 139 255 / 36%); border-radius: 999px; color: #ddceff; background: rgb(155 108 255 / 10%); font-size: 10px; font-weight: 750; text-decoration: none; white-space: nowrap; transition: background-color 180ms ease, transform 180ms ease; }
.account-card > header > a:hover { background: rgb(155 108 255 / 20%); transform: translateY(-1px); }
.activity-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: hidden; margin-bottom: 30px; border: 1px solid #26313d; border-radius: 7px; background: #111820; }
.activity-summary > div { position: relative; min-width: 0; min-height: 116px; padding: 22px; display: flex; align-items: flex-start; flex-direction: column; justify-content: center; }
.activity-summary > div + div { border-left: 1px solid #26313d; }
.activity-summary span, .activity-summary small { color: #7f8c98; font-size: 9px; }
.activity-summary span { font-weight: 750; text-transform: uppercase; }
.activity-summary strong { margin: 9px 0 5px; color: #f3f6f8; font-size: 27px; font-variant-numeric: tabular-nums; }
.activity-summary-primary strong { color: #68cfe4; }
.activity-summary > div:nth-child(3) strong { color: #c2a2ff; }
.activity-summary > div:nth-child(4) strong { color: #f0c96c; }
.activity-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(270px, 0.55fr); gap: 0; overflow: hidden; border: 1px solid #26313d; border-radius: 7px; background: #090f15; }
.activity-calendar-wrap { min-width: 0; overflow-x: auto; padding: 28px 30px 24px; }
.activity-calendar-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.activity-calendar-heading strong { color: #e8edf1; font-size: 14px; }
.activity-calendar-heading span { color: #75828e; font-size: 9px; }
.activity-calendar { display: grid; width: max-content; grid-template-rows: repeat(7, 14px); grid-auto-flow: column; grid-auto-columns: 14px; gap: 6px; }
.activity-day, .activity-legend i { display: block; width: 14px; height: 14px; border: 1px solid rgb(255 255 255 / 4%); border-radius: 3px; background: #17202a; }
.activity-day.level-1, .activity-legend .level-1 { background: #302348; }
.activity-day.level-2, .activity-legend .level-2 { background: #573991; }
.activity-day.level-3, .activity-legend .level-3 { background: #8959db; box-shadow: 0 0 9px rgb(137 89 219 / 18%); }
.activity-day.level-4, .activity-legend .level-4 { background: #c38bff; box-shadow: 0 0 12px rgb(195 139 255 / 32%); }
.activity-day.is-future { opacity: 0.18; }
.activity-weekdays { display: flex; width: 24px; height: 134px; float: left; flex-direction: column; justify-content: space-around; margin: -4px 12px 0 0; color: #6f7c88; font-size: 8px; }
.activity-legend { display: flex; width: max-content; align-items: center; gap: 5px; margin: 13px 0 0 36px; color: #74818d; font-size: 8px; }
.activity-legend i { width: 10px; height: 10px; }
.milestone-panel { display: flex; min-height: 250px; flex-direction: column; justify-content: center; padding: 30px; border-left: 1px solid #27313c; background: linear-gradient(145deg, rgb(155 108 255 / 8%), transparent 64%); }
.milestone-panel > p { margin: 0 0 12px; color: #8b97a3; font-size: 10px; text-transform: uppercase; }
.milestone-panel > strong { color: #fff; font-size: 29px; font-variant-numeric: tabular-nums; }
.milestone-panel > strong span { color: #77838f; font-size: 13px; }
.account-progress .progress-track { width: 100%; height: 11px; overflow: hidden; margin: 26px 0 11px; border: 0; border-radius: 999px; appearance: none; background: #19212b; }
.account-progress .progress-track::-webkit-progress-bar { border-radius: inherit; background: #19212b; }
.account-progress .progress-track::-webkit-progress-value { border-radius: inherit; background: #9b6cff; box-shadow: 0 0 18px rgb(155 108 255 / 45%); }
.account-progress .progress-track::-moz-progress-bar { border-radius: inherit; background: #9b6cff; box-shadow: 0 0 18px rgb(155 108 255 / 45%); }
.progress-caption { display: flex; justify-content: space-between; color: #788591; font-size: 9px; }
.progress-caption strong { color: #bfa1fa; }
.milestone-panel > small { display: block; margin-top: 20px; color: #77838f; font-size: 9px; line-height: 1.55; }
.achievement-overview { display: grid; grid-template-columns: auto minmax(220px, 1fr) minmax(240px, 0.8fr); gap: 28px; align-items: center; margin-bottom: 28px; padding: 22px 0; border-top: 1px solid #27313c; border-bottom: 1px solid #27313c; }
.achievement-overview > div { display: flex; align-items: baseline; gap: 9px; }
.achievement-overview strong { color: #f4edff; font-size: 34px; font-variant-numeric: tabular-nums; }
.achievement-overview span, .achievement-overview p { color: #8d99a5; font-size: 11px; }
.achievement-overview p { margin: 0; line-height: 1.55; }
.achievement-overview progress, .achievement-progress progress { overflow: hidden; width: 100%; height: 7px; border: 0; border-radius: 999px; appearance: none; background: #1a222c; }
.achievement-overview progress::-webkit-progress-bar, .achievement-progress progress::-webkit-progress-bar { border-radius: inherit; background: #1a222c; }
.achievement-overview progress::-webkit-progress-value, .achievement-progress progress::-webkit-progress-value { border-radius: inherit; background: #9b6cff; box-shadow: 0 0 12px rgb(155 108 255 / 28%); }
.achievement-overview progress::-moz-progress-bar, .achievement-progress progress::-moz-progress-bar { border-radius: inherit; background: #9b6cff; }
.achievement-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid #27313c; border-radius: 7px; background: #27313c; gap: 1px; overflow: hidden; }
.achievement-item { --medal-light: #e0ad76; --medal: #a96331; --medal-dark: #4e2b18; --category-color: #68cfe4; position: relative; display: grid; min-width: 0; min-height: 226px; grid-template-columns: auto minmax(0, 1fr); gap: 21px; align-content: center; padding: 30px; color: #66727e; background: #0b1118; filter: saturate(0.28); }
.achievement-item::after { position: absolute; top: 0; right: 24px; left: 24px; height: 2px; pointer-events: none; background: transparent; content: ""; }
.achievement-item.is-unlocked { color: #d9e1e8; background: color-mix(in srgb, var(--category-color) 4%, #0d131a); filter: none; }
.achievement-item.is-unlocked::after { background: linear-gradient(90deg, transparent, var(--category-color), transparent); box-shadow: 0 0 14px color-mix(in srgb, var(--category-color) 28%, transparent); }
.achievement-item.tier-2 { --medal-light: #f0f3f5; --medal: #aeb9c4; --medal-dark: #4e5964; }
.achievement-item.tier-3 { --medal-light: #ffe18a; --medal: #d4a92f; --medal-dark: #6f5212; }
.achievement-item.category-rhythm { --category-color: #c49aff; }
.achievement-item.category-tasks { --category-color: #f0c96c; }
.achievement-item.category-shop { --category-color: #ee8dba; }
.achievement-badge { position: relative; display: grid; width: 64px; height: 72px; place-items: center; background: linear-gradient(145deg, var(--medal-light), var(--medal) 45%, var(--medal-dark)); clip-path: polygon(50% 0, 91% 22%, 91% 72%, 50% 100%, 9% 72%, 9% 22%); filter: grayscale(0.5) brightness(0.5); }
.achievement-badge::before { position: absolute; inset: 4px; background: linear-gradient(155deg, #1a222b, #0a0f15); clip-path: inherit; content: ""; }
.achievement-mark { position: relative; z-index: 1; display: grid; width: 43px; height: 43px; place-items: center; border: 1px solid color-mix(in srgb, var(--medal-light) 75%, transparent); border-radius: 50%; color: var(--medal-light); background: radial-gradient(circle at 35% 28%, color-mix(in srgb, var(--medal) 34%, #18212a), #0e141b 72%); box-shadow: inset 0 0 0 3px rgb(0 0 0 / 18%); font-size: 11px; font-weight: 850; }
.achievement-item.is-unlocked .achievement-badge { filter: drop-shadow(0 0 13px color-mix(in srgb, var(--medal) 27%, transparent)); }
.achievement-item.tier-3.is-unlocked .achievement-badge { filter: drop-shadow(0 0 17px rgb(212 169 47 / 32%)); }
.achievement-copy { min-width: 0; }
.achievement-copy > span, .achievement-copy strong, .achievement-copy small { display: block; }
.achievement-copy > span { overflow: hidden; margin-bottom: 9px; color: #735b9e; font-size: 9px; font-weight: 800; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.achievement-item.is-unlocked .achievement-copy > span { color: var(--category-color); }
.achievement-copy strong { overflow: hidden; color: #aeb7c0; font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
.achievement-item.is-unlocked .achievement-copy strong { color: #f0f3f6; }
.achievement-copy small { margin-top: 7px; color: #7d8995; font-size: 11px; line-height: 1.5; }
.achievement-progress { grid-column: 1 / -1; align-self: end; }
.achievement-progress span { display: block; margin-bottom: 10px; color: #85919c; font-size: 10px; font-weight: 750; text-align: right; }
.achievement-item.is-unlocked .achievement-progress span { color: var(--category-color); }
.achievement-item.is-unlocked .achievement-progress progress::-webkit-progress-value { background: var(--category-color); box-shadow: 0 0 12px color-mix(in srgb, var(--category-color) 30%, transparent); }
.achievement-item.is-unlocked .achievement-progress progress::-moz-progress-bar { background: var(--category-color); }
.task-list { border-top: 1px solid #27313c; }
.task-row { display: grid; grid-template-columns: minmax(220px, 1fr) 120px minmax(220px, 0.75fr); gap: 24px; align-items: center; min-height: 96px; border-bottom: 1px solid #27313c; }
.task-main span, .task-main strong { display: block; }
.task-main span { margin-bottom: 7px; color: #9e7bdf; font-size: 9px; font-weight: 750; text-transform: uppercase; }
.task-main strong { color: #edf1f4; font-size: 14px; }
.task-reward { color: #f0c96c; font-size: 17px; font-weight: 800; text-align: right; }
.task-reward span { display: block; margin-top: 3px; color: #7b8792; font-size: 8px; font-weight: 600; text-transform: uppercase; }
.task-progress span { display: block; color: #87939e; font-size: 9px; text-align: right; }
.task-progress progress { width: 100%; height: 7px; margin-top: 9px; border: 0; border-radius: 999px; appearance: none; background: #19212b; }
.task-progress progress::-webkit-progress-bar { border-radius: inherit; background: #19212b; }
.task-progress progress::-webkit-progress-value { border-radius: inherit; background: #68cfe4; }
.task-progress progress::-moz-progress-bar { border-radius: inherit; background: #68cfe4; }
.account-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 30px 0 0; border-top: 1px solid #27313c; }
.account-facts div { min-width: 0; padding: 22px 16px 0 0; }
.account-facts dt { color: #84909b; font-size: 10px; }
.account-facts dd { overflow: hidden; margin: 7px 0 0; color: #ecf0f3; font-size: 14px; font-weight: 750; text-overflow: ellipsis; }
.account-facts.stacked { grid-template-columns: 1fr; margin-top: 0; }
.account-facts.stacked div { display: flex; justify-content: space-between; gap: 18px; padding: 13px 0; border-bottom: 1px solid #1d2631; }
.account-facts.stacked dd { margin: 0; text-align: right; }
.purchase-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(440px, 1fr)); gap: 14px; }
.purchase-row { position: relative; display: grid; min-width: 0; min-height: 190px; grid-template-columns: auto minmax(0, 1fr) auto; gap: 22px; align-items: center; overflow: hidden; padding: 28px; border: 1px solid #293440; border-radius: 7px; background: linear-gradient(145deg, rgb(155 108 255 / 8%), transparent 48%), #0a1017; box-shadow: inset 0 1px rgb(255 255 255 / 3%); }
.purchase-row::before { position: absolute; top: 0; right: 28px; left: 28px; height: 1px; background: linear-gradient(90deg, transparent, rgb(195 139 255 / 70%), transparent); content: ""; }
.purchase-icon { display: grid; width: 64px; height: 64px; place-items: center; border: 1px solid rgb(195 139 255 / 34%); border-radius: 7px; color: #d9c4ff; background: radial-gradient(circle at 35% 25%, #362351, #171020 68%); box-shadow: 0 14px 32px rgb(0 0 0 / 30%), inset 0 1px rgb(255 255 255 / 8%); font-size: 23px; }
.purchase-row > div { min-width: 0; }
.purchase-row strong, .purchase-row small { display: block; }
.purchase-main > strong { overflow: hidden; margin-top: 11px; color: #f3f6f8; font-size: 20px; text-overflow: ellipsis; white-space: nowrap; }
.purchase-main > small { margin-top: 9px; color: #7f8b96; font-size: 10px; }
.purchase-value { text-align: right; }
.purchase-value > span { display: block; margin-bottom: 8px; color: #7f8b96; font-size: 9px; text-transform: uppercase; }
.purchase-value > strong { color: #f0c96c; font-size: 22px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.purchase-value > strong small { display: inline; color: #aa8c49; font-size: 10px; }
.purchase-value del { display: block; margin-top: 7px; color: #697580; font-size: 10px; }
.purchase-status { display: inline-flex; width: max-content; min-height: 26px; align-items: center; gap: 7px; padding: 4px 9px; border: 1px solid #34404d; border-radius: 999px; color: #82909c; background: #111820; font-size: 9px; font-weight: 750; }
.purchase-status::before { width: 6px; height: 6px; border-radius: 50%; background: currentcolor; box-shadow: 0 0 9px currentcolor; content: ""; }
.purchase-status.completed { border-color: rgb(85 213 148 / 28%); color: #55d594; background: rgb(85 213 148 / 7%); }
.purchase-status.cancelled { border-color: rgb(237 119 124 / 28%); color: #ed777c; background: rgb(237 119 124 / 7%); }
.purchase-status.pending { border-color: rgb(226 183 95 / 28%); color: #e2b75f; background: rgb(226 183 95 / 7%); }
.account-empty { display: grid; min-height: 180px; place-items: center; align-content: center; gap: 7px; color: #788591; text-align: center; }
.account-empty > span { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid #302744; border-radius: 50%; color: #b895f7; background: #171125; font-size: 20px; }
.account-empty strong { color: #dfe5eb; font-size: 13px; }
.account-empty p, .account-hint { margin: 0; color: #6f7c87; font-size: 9px; line-height: 1.5; }
.restriction-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; overflow: hidden; border: 1px solid #202936; border-radius: 8px; background: #202936; }
.restriction-grid div { padding: 16px; background: #0d141c; }
.restriction-grid span, .restriction-grid strong { display: block; }
.restriction-grid span { color: #74818d; font-size: 9px; }
.restriction-grid strong { margin-top: 8px; color: #f5f7f9; font-size: 24px; }
.account-hint { margin-top: 14px; }
.account-footer { position: relative; z-index: 1; display: flex; width: min(1180px, 100%); align-items: center; justify-content: space-between; margin: 72px auto 0; padding: 28px 6px 0; border-top: 1px solid rgb(255 255 255 / 10%); color: #737e89; font-size: 11px; }
.account-footer a { color: #c5ccd4; text-decoration: none; }
.account-footer a:hover { color: #fff; }
@keyframes account-star-pulse {
  0%, 100% { opacity: 0.25; transform: scale(0.8); }
  50% { opacity: 0.85; transform: scale(1.15); }
}
@keyframes account-card-enter {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 980px) {
  .account-hero { grid-template-columns: 1fr; gap: 46px; }
  .account-profile-summary { justify-content: center; }
  .account-metrics { width: min(720px, 100%); margin: 0 auto; }
  .activity-layout { grid-template-columns: 1fr; }
  .milestone-panel { min-height: 0; border-top: 1px solid #27313c; border-left: 0; }
  .purchase-list { grid-template-columns: 1fr; }
  .achievement-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .achievement-overview { grid-template-columns: auto minmax(180px, 1fr); }
  .achievement-overview p { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .account-page { padding: 10px 12px 32px; }
  .account-header { top: 10px; min-height: 56px; padding-left: 14px; }
  .account-brand small { display: none; }
  .account-shell { padding-top: 22px; }
  .account-hero { min-height: 0; gap: 38px; padding: 48px 8px 42px; }
  .account-profile-summary { grid-template-columns: 1fr; gap: 20px; justify-items: center; text-align: center; }
  .account-kicker { grid-column: 1; }
  .account-identity { padding-top: 0; }
  .account-identity-badges { justify-content: center; }
  .account-avatar { width: 88px; height: 88px; font-size: 30px; }
  .account-identity h1 { font-size: 34px; }
  .account-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .account-metrics div { min-height: 96px; padding: 16px 20px; align-items: center; }
  .account-metrics div:nth-child(even) { border-left: 1px solid rgb(255 255 255 / 9%); }
  .account-metrics div:nth-child(n + 3) { border-top: 1px solid rgb(255 255 255 / 9%); }
  .account-metrics dd { font-size: 26px; }
  .account-section-heading { padding: 58px 4px 28px; }
  .account-section-heading h2 { font-size: 31px; }
  .account-section-heading span { font-size: 13px; }
  .account-grid { grid-template-columns: 1fr; }
  .account-card { padding: 24px; }
  .account-card::before { right: 24px; left: 24px; }
  .activity-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .activity-summary > div:nth-child(3) { border-top: 1px solid #26313d; border-left: 0; }
  .activity-summary > div:nth-child(4) { border-top: 1px solid #26313d; }
  .purchase-row { min-height: 168px; gap: 16px; padding: 22px; }
  .purchase-icon { width: 52px; height: 52px; }
  .account-footer { margin-top: 48px; padding-inline: 4px; }
  .task-row { grid-template-columns: minmax(0, 1fr) auto; gap: 14px; padding: 18px 0; }
  .task-progress { grid-column: 1 / -1; }
  .purchase-row { grid-template-columns: auto minmax(0, 1fr); min-height: 0; }
  .purchase-value { grid-column: 2; display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; text-align: left; }
  .purchase-value > span { width: 100%; margin-bottom: 0; }
  .purchase-value del { margin-top: 0; }
}
@media (max-width: 420px) {
  .account-site-button, .panel-access-button, .account-logout { min-height: 34px; padding: 0 11px; }
  .account-site-button::before { display: none; }
  .account-brand strong { font-size: 12px; }
  .account-actions { gap: 2px; }
  .account-hero { text-align: center; }
  .account-avatar { margin: 0 auto; }
  .account-metrics { margin-top: 32px; }
  .account-card > header { align-items: flex-start; flex-direction: column; }
  .account-health { max-width: 100%; }
  .account-facts.stacked div { align-items: flex-start; flex-direction: column; gap: 3px; }
  .account-facts.stacked dd { text-align: left; }
  .restriction-grid div { padding: 12px 8px; }
  .restriction-grid span { min-height: 22px; }
  .activity-calendar-wrap { margin-right: -24px; padding-right: 24px; }
  .activity-calendar-heading { align-items: flex-start; flex-direction: column; gap: 5px; }
  .activity-summary > div { min-height: 104px; padding: 17px; }
  .activity-summary strong { font-size: 23px; }
  .purchase-row { min-height: 0; grid-template-columns: 1fr; padding: 22px; }
  .purchase-icon { width: 48px; height: 48px; }
  .purchase-value { grid-column: 1; padding-top: 16px; border-top: 1px solid #26313d; }
  .achievement-list { grid-template-columns: 1fr; }
  .achievement-item { min-height: 190px; padding: 25px; }
  .achievement-overview { grid-template-columns: 1fr; gap: 13px; }
  .achievement-overview p { grid-column: auto; }
  .account-footer { align-items: flex-start; flex-direction: column; gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .account-stars span, .account-hero { animation: none; }
  .account-card, .account-site-button, .panel-access-button, .account-logout { transition: none; }
}
