:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  --ink: #202e42;
  --muted: #596b80;
  --subtle: #5c6d7f;
  --line: #dce5ed;
  --surface: #ffffff;
  --canvas: #f3f6f9;
  --blue: #285a83;
  --blue-dark: #1e496e;
  --shadow: 0 8px 28px rgba(43, 66, 88, .055);
}

*, *::before, *::after { box-sizing: border-box; }
html { min-width: 320px; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--canvas); font-size: 15px; line-height: 1.6; -webkit-text-size-adjust: 100%; }
body, button, input, textarea, select { font-family: inherit; }
button, input, textarea, select { font-size: 16px; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
svg { display: block; width: 24px; height: 24px; flex: none; }
h1, h2, h3, p, dl, dd { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid #317ab4; outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 20; top: 8px; left: 8px; padding: 10px 16px; border-radius: 8px; background: #fff; color: #173a59; font-weight: 700; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }

.app-body { display: flex; flex-direction: column; }
.site-header { background: rgba(255, 255, 255, .97); border-bottom: 1px solid var(--line); }
.site-header__inner { width: min(100% - 64px, 1240px); min-height: 66px; margin: 0 auto; display: flex; align-items: center; gap: clamp(16px, 3vw, 38px); }
.brand { display: inline-flex; align-items: center; gap: 11px; flex: none; text-decoration: none; }
.brand__mark { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 13px; color: #fff; background: linear-gradient(145deg, #467da0, #244c73); box-shadow: 0 6px 14px rgba(43, 87, 123, .2); }
.brand__mark svg { width: 29px; height: 29px; }
.brand__text { display: grid; line-height: 1.15; }
.brand__text strong { font-size: 18px; letter-spacing: -.04em; }
.brand__text span { margin-top: 4px; color: var(--muted); font-size: 11px; letter-spacing: .11em; }
.primary-nav { display: flex; gap: 4px; }
.primary-nav__link { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 0 12px; border-radius: 9px; color: #526578; font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.primary-nav__link svg { width: 19px; height: 19px; }
.primary-nav__link:hover, .primary-nav__link.is-active { background: #eaf2f8; color: var(--blue-dark); }
.logout-form { margin-left: auto; }
.button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; gap: 8px; padding: 10px 17px; border: 1px solid transparent; border-radius: 10px; cursor: pointer; font-size: 14px; font-weight: 700; line-height: 1.3; text-align: center; text-decoration: none; transition: background-color .15s, border-color .15s, color .15s; }
.button svg { width: 19px; height: 19px; }
.button--primary { border-color: var(--blue); color: #fff; background: var(--blue); }
.button--primary:hover { border-color: var(--blue-dark); background: var(--blue-dark); }
.button--outline { border-color: #cbd8e3; color: #294d68; background: #fff; }
.button--outline:hover { border-color: #8ba8bf; background: #f4f8fb; }
.button--quiet { color: #405b72; background: transparent; }
.button--quiet:hover { background: #edf3f7; }
.button--disabled { border-color: #e4eaf0; color: #596b80; background: #f5f7f9; cursor: default; }
.logout-button { white-space: nowrap; }
.main-content { width: min(100% - 64px, 1240px); flex: 1; margin: 0 auto; padding: 30px 0 48px; }
.main-content:focus, .auth-main:focus { outline: none; }
.site-footer { display: flex; justify-content: space-between; gap: 16px; width: min(100% - 64px, 1240px); margin: 0 auto; padding: 21px 0 28px; border-top: 1px solid var(--line); color: var(--subtle); font-size: 12px; }
.flash-list { display: grid; gap: 10px; margin-bottom: 24px; }
.flash { padding: 13px 16px; overflow-wrap: anywhere; border: 1px solid #c9dce9; border-radius: 10px; color: #244d6a; background: #eaf4fa; }
.flash--error { border-color: #edc9c7; color: #8c3535; background: #fff1f0; }
.flash--success { border-color: #c2e1d1; color: #236447; background: #eff9f3; }

.page-stack { display: grid; gap: 22px; }
.page-intro { display: flex; align-items: end; justify-content: space-between; gap: 18px; }
.eyebrow, .section-kicker { color: #477695; font-size: 11px; font-weight: 800; letter-spacing: .14em; line-height: 1.4; }
.page-intro h1, .profile-heading h1 { margin-top: 5px; font-size: clamp(26px, 2.5vw, 32px); letter-spacing: -.04em; line-height: 1.3; overflow-wrap: anywhere; }
.page-intro__description { margin-top: 7px; color: var(--muted); }
.page-intro > .button { flex: none; }
.overview-intro { padding: clamp(16px, 3vw, 30px); border: 1px solid #dce7ef; border-radius: 17px; background: linear-gradient(115deg, #fff, #e9f3f8); }
.dashboard-shortcuts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.dashboard-shortcuts a { display: grid; gap: 2px; min-height: 60px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 11px; color: var(--blue-dark); background: var(--surface); text-decoration: none; }
.dashboard-shortcuts a:hover { border-color: #8ba8bf; background: #f6fafc; }
.dashboard-shortcuts a span { color: var(--muted); font-size: 12px; }
.status__dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: currentColor; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat-card, .panel { min-width: 0; border: 1px solid #e0e8ee; border-radius: 17px; background: var(--surface); box-shadow: var(--shadow); }
.stat-card { display: flex; min-height: 132px; flex-direction: column; padding: 16px 18px; }
.stat-card__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #4e6275; font-size: 13px; font-weight: 700; }
.stat-icon { display: grid; width: 39px; height: 39px; flex: none; place-items: center; border-radius: 12px; color: #3c7195; background: #eaf3f8; }
.stat-icon svg { width: 21px; height: 21px; }
.stat-card--green .stat-icon { color: #3c806c; background: #eaf6ef; }
.stat-card--violet .stat-icon { color: #70639c; background: #f1eef9; }
.stat-card--amber .stat-icon { color: #916b36; background: #fbf3e6; }
.stat-card__value { margin-top: 12px; overflow-wrap: anywhere; font-size: 29px; font-weight: 750; letter-spacing: -.04em; line-height: 1.25; }
.stat-card__value--text { font-size: 24px; }
.stat-card__value--date { font-size: 16px; letter-spacing: 0; }
.stat-card__hint { margin-top: auto; padding-top: 5px; color: var(--subtle); font-size: 12px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.panel { padding: 24px; }
.panel__header { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.panel__header > div, .directory-top > div { min-width: 0; }
.panel h2, .directory-top h2 { margin-top: 5px; font-size: 19px; letter-spacing: -.025em; line-height: 1.35; }
.panel__subtitle { margin-top: 5px; color: var(--subtle); font-size: 13px; }
.text-link, .back-link { display: inline-flex; min-height: 44px; align-items: center; gap: 6px; color: #285f86; font-size: 13px; font-weight: 700; text-decoration: none; }
.text-link:hover, .back-link:hover, .user-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.text-link { flex: none; }
.recent-list, .service-list { margin-top: 17px; }
.recent-item { display: flex; min-width: 0; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid #edf1f5; }
.recent-item:last-child, .service-item:last-child { border-bottom: 0; }
.avatar { display: grid; width: 39px; height: 39px; flex: none; place-items: center; border: 1px solid #dcebf0; border-radius: 13px; color: #3d7795; background: linear-gradient(145deg, #e9f6f6, #e7eff9); font-size: 18px; }
.recent-item__body { display: grid; min-width: 0; flex: 1; }
.user-link, .user-name { width: fit-content; max-width: 100%; color: #273d50; font-weight: 700; overflow-wrap: anywhere; text-decoration: none; }
.user-link { display: inline-flex; min-height: 44px; align-items: center; }
.muted-line { color: var(--subtle); font-size: 12px; overflow-wrap: anywhere; }
.status { display: inline-flex; max-width: 100%; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 1.4; white-space: nowrap; }
.status--positive { color: #22644e; background: #e9f5ed; }
.status--neutral, .status--unknown { color: #566979; background: #f0f3f5; }
.status--negative { color: #913f3c; background: #fbefee; }
.service-item { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-width: 0; padding: 15px 0; border-bottom: 1px solid #edf1f5; }
.service-item__name { display: grid; min-width: 0; gap: 2px; overflow-wrap: anywhere; }
.service-item__name strong { font-size: 14px; }
.service-item__name span { color: var(--subtle); font-size: 12px; }
.service-item__actions { display: flex; flex: none; align-items: center; gap: 8px; }
.service-item__actions .button { padding-inline: 11px; }
.season-windows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.season-windows li { min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 11px; background: #f7fafc; }
.season-windows__heading, .season-windows__time { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 10px; }
.season-windows__heading { justify-content: space-between; }
.season-windows__time { margin-top: 8px; color: var(--blue-dark); font-size: 13px; font-variant-numeric: tabular-nums; }
.collection-header { align-items: end; flex-wrap: wrap; }
.event-groups { display: grid; gap: 8px; margin-top: 16px; }
.event-group { min-width: 0; border: 1px solid var(--line); border-radius: 11px; }
.event-group__summary { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px 12px; min-height: 54px; padding: 10px 14px; border-radius: 10px; cursor: pointer; list-style: none; }
.event-group__summary::-webkit-details-marker { display: none; }
.event-group__summary::after { width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; color: var(--blue); content: ''; transform: rotate(45deg); }
.event-group[open] > .event-group__summary::after { transform: rotate(225deg); }
.event-group__summary:hover, .event-group[open] > .event-group__summary { background: #f4f8fb; }
.event-group__body { padding: 0 14px; border-top: 1px solid var(--line); }
.event-group__actions { padding: 10px 0; }
.event-group__actions + .event-row { border-top: 1px solid #edf1f5; }
.event-row > form { flex: none; }
.event-rules { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-top: 5px; font-size: 12px; }
.event-rules > div { display: flex; flex-wrap: wrap; gap: 2px 6px; min-width: 0; max-width: 100%; padding: 2px 6px; border-radius: 5px; background: #f0f4f7; }
.event-rules dt { color: var(--muted); font-weight: 700; }
.event-rules dd { min-width: 0; overflow-wrap: anywhere; }
.motd-counter { color: var(--subtle); font-size: 12px; }
.motd-preview { min-height: 68px; margin-top: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: #f7fafc; overflow-wrap: anywhere; white-space: pre-wrap; }
.panel__footnote { margin-top: 15px; padding: 12px 14px; border-radius: 10px; color: #566d7e; background: #f4f8fa; font-size: 12px; }
.maintenance-panel { display: grid; gap: 18px; }
.maintenance-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px 18px; align-items: end; padding-top: 18px; border-top: 1px solid #edf1f5; }
.maintenance-form__switch { grid-column: 1 / -1; }
.maintenance-form__switch strong, .maintenance-form__switch small { display: block; }
.maintenance-form__switch small { margin-top: 2px; color: var(--subtle); font-size: 12px; }
.empty-state { display: grid; justify-items: center; gap: 5px; padding: 38px 12px; color: var(--muted); text-align: center; }
.empty-state strong { color: #46596d; font-size: 14px; }
.empty-state > span:last-child { font-size: 13px; }
.empty-state__icon { display: grid; width: 44px; height: 44px; margin-bottom: 5px; place-items: center; border-radius: 14px; color: #58809a; background: #eff5f8; font-size: 24px; }

.directory-panel { padding: 25px; }
.directory-top { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.search-form { display: flex; max-width: 100%; align-items: center; gap: 8px; }
.search-field { position: relative; width: min(310px, 100%); min-width: 0; }
.search-field svg { position: absolute; top: 50%; left: 13px; width: 19px; height: 19px; color: #718596; transform: translateY(-50%); pointer-events: none; }
.search-field input, .field input { width: 100%; min-width: 0; min-height: 46px; border: 1px solid #8294a3; border-radius: 10px; outline: 0; color: var(--ink); background: #fff; }
.search-field input { padding: 10px 12px 10px 41px; font-size: 16px; }
.search-field input::placeholder, .field input::placeholder { color: #5c6d7f; opacity: 1; }
.search-field input:focus, .field input:focus { border-color: #397aa6; box-shadow: 0 0 0 3px rgba(57, 122, 166, .2); }
.directory-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 18px; margin: 21px 0 15px; padding-top: 16px; border-top: 1px solid #edf1f5; color: var(--subtle); font-size: 12px; }
.user-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.user-card { display: flex; min-width: 0; flex-direction: column; padding: 14px; border: 1px solid #e0e8ee; border-radius: 12px; background: #fff; }
.user-card:focus-within { border-color: #8ba8bf; }
.user-card__header { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.avatar--large { width: 44px; height: 44px; }
.user-card__identity { min-width: 0; flex: 1 1 120px; }
.user-card__identity h3 { font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }
.user-card__identity > span { display: block; color: var(--subtle); font-size: 12px; overflow-wrap: anywhere; }
.user-card__details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; margin: 12px 0; }
.user-card__detail-wide { grid-column: 1 / -1; }
.user-card__details dt, .resource-strip dt, .metric-grid dt { color: var(--subtle); font-size: 12px; }
.user-card__details dd { margin-top: 2px; color: #374d60; font-size: 13px; overflow-wrap: anywhere; }
.resource-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: auto; padding: 8px 10px; border-radius: 9px; background: #f5f8fa; }
.resource-strip dd { margin-top: 2px; font-size: 14px; font-weight: 700; overflow-wrap: anywhere; }
.user-card__footer { display: flex; justify-content: flex-end; margin-top: 7px; }
.empty-state--directory { min-height: 190px; align-content: center; }
.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 21px; padding-top: 18px; border-top: 1px solid #edf1f5; }
.pagination__summary { color: var(--muted); font-size: 13px; }
.pagination__actions { display: flex; flex-wrap: wrap; gap: 8px; }

.back-link { margin: -8px 0 -12px; }
.profile-heading { display: flex; min-width: 0; align-items: center; gap: 18px; }
.avatar--profile { width: 68px; height: 68px; border-radius: 22px; font-size: 29px; }
.profile-heading__identity { min-width: 0; flex: 1; }
.profile-heading__identity > p:last-child { margin-top: 4px; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.profile-heading__status { display: grid; justify-items: end; gap: 5px; color: var(--subtle); font-size: 12px; }
.profile-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.profile-side { display: grid; min-width: 0; gap: 18px; }
.detail-list { margin-top: 16px; }
.detail-list > div { display: grid; grid-template-columns: minmax(90px, .7fr) minmax(0, 1.3fr); gap: 16px; padding: 13px 0; border-bottom: 1px solid #edf1f5; }
.detail-list > div:last-child { border-bottom: 0; }
.detail-list dt { color: var(--muted); font-size: 13px; }
.detail-list dd { min-width: 0; color: #30465a; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 20px; }
.metric-grid > div { min-width: 0; padding: 13px 14px; border: 1px solid #edf2f5; border-radius: 11px; background: #f7fafb; }
.metric-grid dd { margin-top: 3px; color: #2c4b61; font-size: 20px; font-weight: 750; line-height: 1.3; overflow-wrap: anywhere; }
.metric-grid--progress { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.progress-action { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 16px; padding: 12px; border: 1px solid #dce8f1; border-radius: 11px; background: #f4f8fb; }
.progress-action .confirm-line { flex: 1 1 190px; min-height: 44px; align-items: center; cursor: pointer; }
.panel-disclosure { margin-top: 14px; border-top: 1px solid var(--line); }
.panel-disclosure summary { min-height: 44px; padding: 10px 0; color: var(--blue); cursor: pointer; font-weight: 700; }
.settings-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; gap: 12px; margin-top: 12px; }
.settings-form--outfit { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.settings-form--ban { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; }
.settings-form__note { grid-column: 1 / -1; }
.settings-form > button { justify-self: start; }
.inline-fields { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; min-width: 0; }
.inline-fields > .field { flex: 1 1 140px; min-width: 0; }
.service-item > .inline-fields { flex: 0 1 310px; }
.field select { width: 100%; min-width: 0; min-height: 44px; padding: 8px; border: 1px solid #8294a3; border-radius: 10px; color: var(--ink); background: var(--surface); }
.management-section { display: grid; gap: 8px; margin-top: 18px; }
.management-section + .management-section { padding-top: 18px; border-top: 1px solid #edf1f5; }
.management-section h3 { font-size: 15px; }
.management-row, .moderation-card { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 14px 0; border-bottom: 1px solid #edf1f5; }
.management-row:last-child, .moderation-card:last-child { border-bottom: 0; }
.management-row__body { display: grid; min-width: 0; flex: 1; gap: 2px; }
.management-row__body strong, .management-row__body span { overflow-wrap: anywhere; }
.management-row__body span { color: var(--subtle); font-size: 12px; }
.management-row__badges, .management-row__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.moderation-card { display: grid; align-items: stretch; gap: 12px; }
.moderation-card__heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.moderation-card__heading > div { display: grid; min-width: 0; gap: 2px; }
.moderation-card__heading span { color: var(--subtle); font-size: 12px; overflow-wrap: anywhere; }
.moderation-meta { display: flex; flex-wrap: wrap; gap: 7px; }
.moderation-meta > div { display: flex; flex-wrap: wrap; gap: 3px 6px; padding: 4px 7px; border-radius: 6px; background: #f3f7f9; font-size: 12px; }
.moderation-meta dt { color: var(--muted); font-weight: 700; }
.moderation-meta dd { min-width: 0; overflow-wrap: anywhere; }
.moderation-card__message { padding: 10px 12px; border-radius: 9px; color: #344d62; background: #f7fafb; overflow-wrap: anywhere; white-space: pre-wrap; }
.moderation-card__actions { align-items: end; }
.filter-form { align-items: end; }
.report-chat-context { display: grid; gap: 8px; padding: 13px; border: 1px solid #e0e8ee; border-radius: 11px; background: #fbfcfd; }
.report-chat-context h3 { font-size: 14px; }
.report-chat-context > .panel__subtitle { margin-top: -5px; }
.report-chat-context__message { display: grid; gap: 5px; padding: 10px 11px; border: 1px solid #e7edf2; border-radius: 8px; background: #fff; }
.report-chat-context__message > div { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 7px; color: var(--subtle); font-size: 12px; }
.report-chat-context__message strong { padding: 2px 7px; border-radius: 999px; color: #8c3535; background: #fff1f0; font-size: 11px; }
.report-chat-context__message p { color: #344d62; overflow-wrap: anywhere; white-space: pre-wrap; }
.report-chat-context__message small { color: var(--subtle); overflow-wrap: anywhere; }

.auth-body { display: flex; min-height: 100vh; flex-direction: column; background: radial-gradient(ellipse at 15% 10%, #e4f1f4 0, transparent 38%), radial-gradient(ellipse at 88% 88%, #e7edf7 0, transparent 40%), #f3f6f9; }
.auth-main { width: min(100% - 48px, 980px); margin: auto; padding: 40px 0; }
.login-shell { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .95fr); min-height: 540px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .85); border-radius: 23px; background: #fff; box-shadow: 0 25px 75px rgba(36, 64, 85, .14); }
.login-story { position: relative; display: flex; min-width: 0; flex-direction: column; justify-content: space-between; overflow: hidden; padding: 38px; color: #fff; background: radial-gradient(ellipse at 100% 100%, rgba(150, 200, 193, .38), transparent 45%), linear-gradient(155deg, #243e60 0%, #315b79 53%, #5a929a 100%); }
.login-story::before, .login-story::after { position: absolute; width: 380px; height: 380px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 50%; content: ""; pointer-events: none; }
.login-story::before { right: -230px; bottom: -140px; }
.login-story::after { right: -185px; bottom: -185px; }
.login-story__brand, .login-story__copy, .login-story__foot { position: relative; z-index: 1; }
.login-story__brand { display: flex; align-items: center; gap: 11px; font-size: 19px; font-weight: 750; letter-spacing: -.03em; }
.login-story__brand small { margin-left: 4px; color: #e0edf1; font-size: 12px; font-weight: 500; letter-spacing: .04em; }
.brand__mark--light { color: #fff; background: rgba(255, 255, 255, .16); box-shadow: none; }
.eyebrow--light { color: #d7eaeb; }
.login-story__headline { margin-top: 14px; font-size: clamp(30px, 3.3vw, 42px); font-weight: 700; letter-spacing: .02em; line-height: 1.45; }
.login-story__copy > p:last-child { max-width: 310px; margin-top: 16px; color: #e4eff2; font-size: 14px; line-height: 1.8; }
.login-story__foot { color: #e4eff2; font-size: 12px; letter-spacing: .08em; }
.story-star { margin-right: 7px; color: #e2f4e9; }
.login-panel { display: flex; min-width: 0; flex-direction: column; justify-content: center; padding: 52px clamp(32px, 5vw, 64px); }
.login-panel__heading h1 { margin-top: 6px; font-size: 28px; letter-spacing: -.04em; }
.login-panel__heading > p:last-child { margin-top: 6px; color: var(--muted); font-size: 14px; }
.login-form { display: grid; gap: 19px; margin-top: 34px; }
.confirm-line { display: flex; gap: 10px; align-items: flex-start; color: #40586e; font-size: 13px; line-height: 1.5; }
.confirm-line input[type='checkbox'] { flex: none; width: 18px; height: 18px; margin-top: 1px; }
.field { display: grid; gap: 7px; }
.field label { color: #33495d; font-size: 13px; font-weight: 700; }
.field input, .field textarea { width: 100%; min-height: 50px; padding: 12px 14px; border: 1px solid #8294a3; border-radius: 10px; }
.field textarea { resize: vertical; }
.log-content { max-height: 65vh; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; padding: 16px; background: #182a38; color: #eaf1f5; border-radius: 10px; }
.search-form select { min-height: 44px; max-width: 100%; }
.login-submit { width: 100%; min-height: 50px; justify-content: space-between; margin-top: 5px; padding-right: 17px; padding-left: 18px; }
.login-note { margin-top: 24px; color: var(--subtle); font-size: 12px; }
.login-note span { margin-right: 5px; color: #51819b; }

@media (max-width: 900px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid, .profile-grid { grid-template-columns: minmax(0, 1fr); }
  .maintenance-form { grid-template-columns: minmax(0, 1fr); }
  .maintenance-form > .button { justify-self: start; }
  .profile-grid, .profile-side { gap: 16px; }
  .user-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-grid:not(.metric-grid--progress) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 920px) {
  .site-header__inner { width: calc(100% - 32px); min-height: 0; flex-wrap: wrap; gap: 0; padding-top: 12px; }
  .brand { padding-bottom: 10px; }
  .brand__mark { width: 38px; height: 38px; border-radius: 12px; }
  .brand__mark svg { width: 27px; height: 27px; }
  .brand__text strong { font-size: 17px; }
  .logout-form { padding-bottom: 10px; }
  .logout-button { padding: 9px 10px; }
}

@media (max-width: 650px) {
  .main-content, .site-footer { width: calc(100% - 32px); }
  .main-content { padding: 20px 0 36px; }
  .page-stack { gap: 16px; }
  .page-intro { align-items: start; }
  .page-intro__description { font-size: 14px; }
  .stats-grid { gap: 10px; }
  .stat-card { min-height: 114px; padding: 12px; }
  .stat-card__top { align-items: start; gap: 4px; }
  .stat-card__top > span:first-child { overflow-wrap: anywhere; }
  .stat-icon { width: 33px; height: 33px; border-radius: 10px; }
  .stat-icon svg { width: 19px; height: 19px; }
  .stat-card__value { font-size: 25px; }
  .stat-card__value--text { font-size: 20px; }
  .stat-card__value--date { font-size: 14px; }
  .dashboard-grid { gap: 14px; }
  .dashboard-shortcuts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .season-windows { grid-template-columns: minmax(0, 1fr); }
  .event-row { flex-wrap: wrap; }
  .grant-form > .field { flex-basis: 100%; }
  .panel, .directory-panel { padding: 18px; border-radius: 14px; }
  .directory-top { align-items: stretch; flex-direction: column; }
  .search-form { width: 100%; }
  .search-field { width: auto; flex: 1; }
  .user-grid { grid-template-columns: minmax(0, 1fr); }
  .metric-grid--progress, .settings-form--outfit { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-form--ban { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
  .progress-action > .button { width: 100%; }
  .service-item--grant { align-items: stretch; flex-direction: column; }
  .service-item--grant > .inline-fields { flex-basis: auto; }
  .inline-fields > .button { flex: none; }
  .profile-heading { flex-wrap: wrap; gap: 12px; }
  .management-row { align-items: start; flex-wrap: wrap; }
  .management-row__actions, .management-row > form { width: 100%; justify-content: flex-start; }
  .moderation-card__heading { flex-direction: column; }
  .moderation-card__actions { align-items: stretch; }
  .moderation-card__actions > .field { flex-basis: 100%; }
  .avatar--profile { width: 54px; height: 54px; border-radius: 17px; font-size: 24px; }
  .profile-heading__status { width: 100%; justify-items: start; }
  .site-footer { flex-direction: column; gap: 3px; }
  .auth-main { width: min(100% - 32px, 480px); padding: 24px 0; }
  .login-shell { grid-template-columns: minmax(0, 1fr); min-height: 0; border-radius: 18px; }
  .login-story { min-height: 0; gap: 14px; padding: 18px 25px; }
  .login-story__headline { margin-top: 8px; font-size: 27px; line-height: 1.35; }
  .login-story__copy > p:last-child { margin-top: 9px; font-size: 13px; }
  .login-story__foot { display: none; }
  .login-panel { padding: 30px 25px 34px; }
  .login-form { margin-top: 24px; }
}

@media (max-width: 380px) {
  .panel, .directory-panel { padding: 15px; }
  .recent-item { flex-wrap: wrap; }
  .recent-item__body { flex-basis: calc(100% - 51px); }
  .recent-item > .status { margin-left: 51px; }
  .user-card { padding: 15px; }
  .directory-top .button { padding-right: 12px; padding-left: 12px; }
  .page-intro > .button { padding-inline: 10px; }
  .directory-search { flex-wrap: wrap; }
  .directory-search .search-field { flex: 1 1 100%; }
  .login-story__copy { display: none; }
  .login-panel { padding: 20px 18px 24px; }
  .settings-form { grid-template-columns: minmax(0, 1fr); }
  .service-item { flex-wrap: wrap; }
  .service-item--grant { flex-wrap: nowrap; }
  .profile-heading h1 { font-size: 25px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}



.app-body { display: block; }

.admin-layout { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }

.sidebar { position: sticky; top: 0; z-index: 40; display: flex; flex-direction: column; height: 100vh; padding: 22px 14px 16px; border: 0; background: linear-gradient(180deg, #16273f 0%, #101c2e 100%); color: #eef4fa; }
.sidebar__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 6px 20px; }
.sidebar .brand { width: auto; gap: 11px; text-decoration: none; }
.sidebar .brand__mark { width: 40px; height: 40px; border: 1px solid rgba(255,255,255,.14); border-radius: 12px; color: #0f2534; background: linear-gradient(145deg, #a5efd9, #68cdc0); box-shadow: 0 6px 16px rgba(104,205,192,.18); }
.sidebar .brand__mark svg { width: 24px; height: 24px; }
.sidebar .brand__text strong { color: #fff; font-size: 18px; letter-spacing: -.03em; }
.sidebar .brand__text span { margin-top: 2px; color: #93a7bb; font-size: 10px; letter-spacing: .14em; }

.sidebar .primary-nav { display: grid; gap: 2px; width: 100%; }
.sidebar .primary-nav__link { display: flex; min-height: 42px; align-items: center; justify-content: flex-start; gap: 12px; padding: 0 12px; border: 0; border-radius: 10px; color: #a9b9c9; font-size: 13px; font-weight: 600; text-align: left; white-space: nowrap; transition: background .15s ease, color .15s ease; }
.sidebar .primary-nav__link svg { width: 18px; height: 18px; flex: 0 0 18px; color: #8ba1b6; transition: color .15s ease; }
.sidebar .primary-nav__link:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar .primary-nav__link:hover svg { color: #d5e3ef; }
.sidebar .primary-nav__link.is-active { background: linear-gradient(90deg, rgba(119,223,197,.26), rgba(119,223,197,.08)); color: #ffffff; font-weight: 700; box-shadow: inset 3px 0 0 var(--mint); }
.sidebar .primary-nav__link.is-active svg { color: var(--mint); }

.sidebar__bottom { display: grid; gap: 6px; margin-top: auto; padding: 12px 4px 4px; border-top: 1px solid rgba(255,255,255,.07); }
.sidebar .logout-form { margin: 0; }
.sidebar .logout-button { justify-content: flex-start; gap: 9px; width: 100%; min-height: 38px; padding: 0 10px; border-radius: 9px; color: #cfdae6; font-size: 13px; }
.sidebar .logout-button svg { width: 17px; height: 17px; color: #93a7bb; }
.sidebar .logout-button:hover { background: rgba(255,90,90,.12); color: #ff8f8f; }
.sidebar__caption { padding-left: 10px; color: #8a9db1; font-size: 11px; letter-spacing: .03em; }

.sidebar__close { display: none; }

.admin-main { display: flex; min-width: 0; min-height: 100vh; flex-direction: column; background: var(--canvas); }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; min-height: 66px; align-items: center; justify-content: space-between; gap: 16px; padding: 0 clamp(20px, 3.4vw, 44px); border-bottom: 1px solid #e4eaf1; background: rgba(255, 255, 255, .92); backdrop-filter: blur(12px); }
.topbar__context { display: grid; gap: 2px; min-width: 0; }
.topbar__eyebrow { color: #8695a8; font-size: 9px; font-weight: 800; letter-spacing: .17em; line-height: 1.2; }
.topbar__context strong { color: #1b2c43; font-size: 16px; font-weight: 700; letter-spacing: -.02em; }
.topbar__hint { color: #8795a7; font-size: 12px; }
.admin-main .main-content { width: min(100% - 64px, 1440px); margin: 0 auto; padding: 30px 0 46px; }
.admin-main .site-footer { width: auto; margin: auto 0 0; padding: 16px clamp(20px, 3.4vw, 44px) 20px; border-top: 1px solid #e6ecf2; color: #8794a5; }

.mobile-menu-toggle, .mobile-menu-backdrop { display: none; }
.mobile-menu-toggle__close { display: none; }

@media (max-width: 1100px) {
  .admin-layout { grid-template-columns: 228px minmax(0, 1fr); }
  .admin-main .main-content { width: min(100% - 48px, 1180px); }
}

@media (max-width: 900px) {
  .admin-layout { display: block; min-height: 100vh; overflow-x: clip; }
  .sidebar { position: fixed; top: 0; left: 0; z-index: 60; width: min(304px, 84vw); height: 100dvh; padding: 20px 14px 16px; border-radius: 0 16px 16px 0; box-shadow: 18px 0 44px rgba(8, 17, 30, .28); transform: translateX(-102%); visibility: hidden; transition: transform .24s ease, visibility .24s ease; }
  .sidebar__top { padding: 0 2px 18px; }
  .sidebar .primary-nav { gap: 3px; }
  .sidebar .primary-nav__link { min-height: 46px; font-size: 14px; }
  .sidebar .primary-nav__link svg { width: 19px; height: 19px; flex: 0 0 19px; }
  .sidebar__bottom { padding-top: 12px; }
  .sidebar .logout-button { min-height: 42px; }
  .sidebar__close { display: grid; width: 30px; height: 30px; flex: none; place-items: center; padding: 0; border: 0; border-radius: 8px; color: #8fa3b8; background: transparent; cursor: pointer; }
  .sidebar__close:hover { color: #fff; background: rgba(255,255,255,.07); }
  .sidebar__close svg { width: 16px; height: 16px; }

  .mobile-menu-toggle { display: grid; width: 38px; height: 38px; flex: none; place-items: center; padding: 0; border: 1px solid #e1e8ef; border-radius: 10px; color: #344b63; background: #fff; cursor: pointer; touch-action: manipulation; }
  .mobile-menu-toggle svg { width: 19px; height: 19px; }
  .topbar { min-height: 58px; justify-content: flex-start; gap: 12px; padding-inline: 14px; }
  .topbar__context { flex: 1; }
  .topbar__hint { display: none; }

  .mobile-menu-backdrop { position: fixed; inset: 0; z-index: 55; display: block; width: 100%; height: 100%; padding: 0; border: 0; background: rgba(9, 19, 32, .5); opacity: 0; visibility: hidden; transition: opacity .24s ease, visibility .24s ease; }
  body.menu-open { overflow: hidden; }
  body.menu-open .sidebar { transform: translateX(0); visibility: visible; }
  body.menu-open .mobile-menu-backdrop { opacity: 1; visibility: visible; }

  .admin-main .main-content { width: calc(100% - 32px); padding: 20px 0 34px; }
  .admin-main .site-footer { padding-inline: 16px; }
}

@media (max-width: 650px) {
  .mobile-menu-toggle { width: 36px; height: 36px; }
  .topbar { min-height: 56px; }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar, .mobile-menu-backdrop { transition: none; }
}

.monitor-refresh { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.monitor-refresh__dot { width: 8px; height: 8px; border-radius: 50%; background: #a7b2bd; }
.monitor-refresh__dot.is-connected { background: #31936a; box-shadow: 0 0 0 3px rgba(49,147,106,.13); }
.monitor-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.monitor-card { display: grid; min-height: 142px; align-content: start; gap: 10px; padding: 18px; }
.monitor-card__heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.monitor-card__heading h2 { font-size: 14px; }
.monitor-card__icon { color: #6b8094; font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.monitor-value { color: #233f58; font-size: clamp(23px, 2vw, 31px); font-variant-numeric: tabular-nums; letter-spacing: -.04em; line-height: 1.3; overflow-wrap: anywhere; }
.monitor-value--text { font-size: 20px; letter-spacing: 0; }
.monitor-note { color: var(--subtle); font-size: 12px; }
.monitor-panel { min-width: 0; }
.monitor-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.monitor-table-wrap { max-width: 100%; margin-top: 16px; overflow-x: auto; }
.monitor-table { width: 100%; border-collapse: collapse; font-size: 13px; text-align: left; }
.monitor-table th { padding: 9px 10px; border-bottom: 1px solid var(--line); color: var(--subtle); font-size: 11px; font-weight: 700; white-space: nowrap; }
.monitor-table td { padding: 11px 10px; border-bottom: 1px solid #edf1f5; color: #344c60; font-variant-numeric: tabular-nums; white-space: nowrap; }
.monitor-table tbody tr:last-child td { border-bottom: 0; }
.monitor-table td:first-child, .monitor-table th:first-child { padding-left: 0; }
.monitor-table td:last-child, .monitor-table th:last-child { padding-right: 0; }
.monitor-table .status { padding: 4px 8px; }
.monitor-service-name { display: grid; gap: 1px; white-space: normal; }
.monitor-service-name span { color: var(--subtle); font-size: 11px; }
.monitor-empty { color: var(--subtle) !important; font-variant-numeric: normal !important; white-space: normal !important; }
.monitor-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.monitor-summary > div { min-width: 0; padding: 12px; border: 1px solid #edf2f5; border-radius: 10px; background: #f7fafb; }
.monitor-summary dt { color: var(--subtle); font-size: 12px; }
.monitor-summary dd { margin-top: 3px; color: #2c4b61; font-size: 17px; font-weight: 750; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.monitor-summary--wide { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.monitor-port-list { display: grid; gap: 0; margin-top: 12px; }
.monitor-port-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; padding: 11px 0; border-bottom: 1px solid #edf1f5; }
.monitor-port-list li:last-child { border-bottom: 0; }
.monitor-port-name { min-width: 0; color: #344c60; font-size: 13px; overflow-wrap: anywhere; }
.monitor-port-result { display: flex; flex: none; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 7px; color: var(--subtle); font-size: 12px; font-variant-numeric: tabular-nums; }
.monitor-file-sizes { display: grid; gap: 0; margin-top: 14px; }
.monitor-file-sizes li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid #edf1f5; color: var(--muted); font-size: 13px; }
.monitor-file-sizes li:last-child { border-bottom: 0; }
.monitor-file-sizes strong { color: #30465a; font-variant-numeric: tabular-nums; }
.monitor-fault-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.monitor-fault-list li { display: flex; justify-content: space-between; gap: 12px; min-width: 0; padding: 9px 10px; border-radius: 8px; background: #f7fafb; color: var(--muted); font-size: 12px; }
.monitor-fault-list strong { color: #30465a; font-variant-numeric: tabular-nums; }
.monitor-fault-note { margin-top: 14px; }

@media (max-width: 900px) {
  .monitor-columns { grid-template-columns: minmax(0, 1fr); }
  .monitor-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 650px) {
  .monitor-page > .page-intro { flex-direction: column; align-items: stretch; }
  .monitor-grid { gap: 10px; }
  .monitor-card { min-height: 126px; padding: 13px; }
  .monitor-summary--wide { grid-template-columns: minmax(0, 1fr); }
  .monitor-fault-list { grid-template-columns: minmax(0, 1fr); }
  .monitor-refresh { min-height: 24px; }
}

.trend-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.trend-card { min-width: 0; overflow: hidden; }
.trend-card h2 { font-size: 16px; }
.trend-card > strong { display: block; margin-top: 8px; color: #2c4b61; font-size: 24px; font-variant-numeric: tabular-nums; }
.trend-card svg { width: 100%; height: 190px; margin-top: 10px; overflow: visible; }
.trend-card svg text { fill: #718397; font-size: 11px; }
.timeline-filter { margin: 4px 0 12px; }
.timeline-event { border-bottom: 1px solid #edf1f5; }

@media (max-width: 760px) {
  .trend-grid { grid-template-columns: minmax(0, 1fr); }
  .trend-card svg { height: 160px; }
}

/* ---------------------------------------------------------------------------
 * 真源与桥接提示条（base.html 顶部横幅）。
 * 沿用本文件既有的色板（--blue / --blue-dark / --line / --shadow），只是把
 * "玩家数据的真源在账户服务、后台写操作走桥接" 这件事在页面上讲清楚。
 * ------------------------------------------------------------------------- */
.source-banner { width: min(100% - 64px, 1440px); margin: 22px auto 0; padding: 14px 18px; border: 1px solid #cfe0ea; border-left: 4px solid var(--blue); border-radius: 14px; background: #f4f9fc; box-shadow: var(--shadow); }
.source-banner__title { display: flex; align-items: center; gap: 10px; color: var(--blue-dark); font-size: 14px; font-weight: 700; }
.source-banner__tag { flex: none; padding: 2px 9px; border-radius: 999px; color: #fff; background: var(--blue); font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.source-banner__list { display: grid; gap: 5px; margin-top: 8px; color: var(--muted); font-size: 13px; }
.source-banner__list li { position: relative; padding-left: 15px; overflow-wrap: anywhere; }
.source-banner__list li::before { position: absolute; left: 2px; top: 0; color: var(--blue); content: '·'; }
.source-banner strong { color: var(--ink); }
.source-banner code { padding: 1px 6px; border-radius: 6px; color: #244d6a; background: #e8f0f6; font-size: 12px; }

@media (max-width: 1100px) {
  .source-banner { width: min(100% - 48px, 1180px); }
}

@media (max-width: 900px) {
  .source-banner { width: auto; margin: 16px clamp(16px, 4vw, 24px) 0; }
}
