:root {
  color-scheme: light;
  --bg: #f2f5f9;
  --panel: #fff;
  --text: #1f2630;
  --muted: #8892a0;
  --line: #e3e8f0;
  --blue: #087bff;
  --deep: #172b4d;
  --green: #27c864;
  --orange: #ff9f1a;
  --red: #e5484d;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

.narrow { width: min(720px, calc(100% - 32px)); margin: 48px auto; }
.panel, .access-card, .content-block, .account-card, .metric {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 14px 36px rgba(32, 47, 74, .07);
}
.panel { padding: 24px; margin-bottom: 20px; overflow-x: auto; }
.alert { padding: 12px 14px; border-radius: 8px; margin: 12px 0; }
.alert.error { background: #fff0f0; color: var(--red); border: 1px solid #ffd2d2; }
.muted { color: var(--muted); }
.button, button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  line-height: 1.25;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  min-height: 40px;
  padding: 0 18px;
  cursor: pointer;
}
.button.primary, button.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.small { min-height: 32px; padding: 0 10px; font-size: 14px; }
.danger { color: var(--red); border-color: #ffd2d2; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid h2, .form-grid .span-2, fieldset { grid-column: 1 / -1; }
label { display: grid; gap: 6px; color: #555; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
}
textarea { min-height: 88px; resize: vertical; }
fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: grid; gap: 12px; }
.content-group { margin-top: 8px; padding: 12px 14px; border-radius: 10px; background: #f5f8ff; color: #0e52d4; }
.content-group h3 { margin: 0; }
.content-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: #f7f9fc; }
.content-tab { min-height: 38px; padding: 0 14px; border-color: transparent; background: transparent; color: #596577; font-weight: 700; white-space: nowrap; }
.content-tab.active { color: #fff; background: var(--blue); border-color: var(--blue); box-shadow: 0 6px 14px rgba(8, 123, 255, .18); }
.content-group-panel { display: none; }
.content-group-panel.active { display: block; }

.access-bg { background: linear-gradient(160deg, #e8f3ff 0%, #f6f8fc 42%, #edf8f4 100%); }
.access-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.access-card { width: min(560px, 100%); padding: 34px; border-radius: 24px; box-shadow: 0 26px 70px rgba(27, 47, 82, .16); }
.access-mark { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: linear-gradient(135deg, #087bff, #12b981); color: #fff; font-weight: 900; margin-bottom: 18px; box-shadow: 0 12px 24px rgba(8, 123, 255, .24); }
.access-card h1 { margin: 0 0 8px; font-size: 32px; }
.access-card form { display: grid; gap: 12px; margin: 20px 0; }
.access-card input { min-height: 52px; font-size: 18px; }
.access-card .button { min-height: 52px; font-size: 17px; font-weight: 800; border-radius: 12px; }
.content-block { padding: 18px; margin: 16px 0; border-radius: 14px; }
.content-block h2 { font-size: 18px; margin: 0 0 8px; }
.content-block p { color: #4b5563; line-height: 1.75; margin: 0; }
.content-block img { width: 100%; max-height: 280px; object-fit: cover; border-radius: 12px; display: block; background: linear-gradient(135deg, #e7f0ff, #f1fff6); }
.qr-card img { max-width: 220px; margin: 10px auto 0; aspect-ratio: 1 / 1; object-fit: cover; }
.media-card img { aspect-ratio: 16 / 8; }
.notice-card { background: #fff7f7; border-color: #ffd3d3; }
.notice-card h2,
.notice-card p { color: #d92828; font-weight: 800; }
.icp-footer {
  margin: 22px auto 0;
  text-align: center;
  color: #8b95a3;
  font-size: 13px;
  line-height: 1.6;
}
.icp-footer a:hover { color: var(--blue); }

.site-page { background: linear-gradient(180deg, #dfeeff 0, #f4f7fb 300px, #f4f7fb 100%); }
.site-shell { width: min(1220px, calc(100% - 30px)); margin: 24px auto 64px; }
.site-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
  padding: 28px;
  border-radius: 24px;
  color: #fff;
  background: linear-gradient(135deg, #0769e8 0%, #0a8fed 46%, #17b77a 100%);
  box-shadow: 0 24px 58px rgba(14, 99, 232, .24);
  overflow: hidden;
}
.hero-copy { max-width: 780px; }
.site-hero h1 { margin: 7px 0 10px; font-size: 36px; line-height: 1.18; }
.site-hero p { margin: 0; color: rgba(255,255,255,.9); line-height: 1.7; font-size: 16px; }
.eyebrow { display: inline-flex; align-items: center; font-size: 12px; letter-spacing: 0; text-transform: uppercase; opacity: .78; font-weight: 800; }
.hero-link { padding: 10px 18px; border-radius: 999px; color: #0e63e8; background: rgba(255,255,255,.94); font-weight: 800; white-space: nowrap; box-shadow: 0 10px 22px rgba(0,0,0,.12); }
.region-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0; padding: 6px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.76); }
.region-tabs button { padding: 9px 18px; border: 1px solid transparent; border-radius: 14px; background: transparent; color: #4b5563; min-height: 40px; font-weight: 700; }
.region-tabs button.active { background: var(--blue); color: #fff; border-color: var(--blue); box-shadow: 0 8px 20px rgba(8,123,255,.18); }
.account-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.account-card { padding: 22px; border-radius: 22px; box-shadow: 0 18px 44px rgba(21, 32, 54, .09); border-color: #e6ebf3; }
.account-card:hover { transform: translateY(-2px); transition: transform .18s ease, box-shadow .18s ease; box-shadow: 0 22px 52px rgba(21, 32, 54, .12); }
.account-top, .account-meta, .account-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.account-top h2 { margin: 0; font-size: 23px; line-height: 1.25; overflow-wrap: anywhere; }
.status { font-size: 18px; font-weight: 800; white-space: nowrap; }
.status i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; background: currentColor; }
.status.ok { color: var(--green); }
.status.warn { color: var(--orange); }
.status.bad { color: var(--red); }
.account-meta { margin: 14px 0 18px; color: var(--muted); align-items: flex-start; }
.checked { text-align: right; line-height: 1.4; }
.region { background: var(--blue); color: #fff; border-radius: 999px; padding: 5px 17px; font-weight: 800; box-shadow: 0 10px 20px rgba(8,123,255,.18); white-space: nowrap; }
.account-actions { display: grid; grid-template-columns: 1fr 1fr; }
.account-actions button { min-height: 58px; font-size: 18px; font-weight: 800; border-radius: 14px; border-color: #dce3ed; }
.account-actions button:hover { border-color: var(--blue); color: var(--blue); }
.feedback-btn { margin-top: 12px; width: 100%; min-height: 40px; color: #6b7280; border-radius: 12px; background: #f8fafc; }
.empty { padding: 32px; text-align: center; color: var(--muted); background: #fff; border-radius: 12px; }
.tutorial-section {
  margin-top: 28px;
  padding: 26px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 18px 44px rgba(21, 32, 54, .08);
}
.tutorial-copy {
  padding: 18px;
  border-radius: 18px;
  background: #f8fbff;
  border: 1px solid #dceaff;
}
.tutorial-copy h2 { margin: 8px 0 12px; font-size: 26px; line-height: 1.25; }
.tutorial-copy p { line-height: 1.85; color: #3f4754; margin: 0; white-space: normal; }
.tutorial-images { display: grid; gap: 18px; margin-top: 18px; }
.tutorial-images figure {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 10px;
  overflow: hidden;
  border-radius: 18px;
  background: #111827;
  border: 1px solid #d8dee8;
}
.tutorial-images img {
  width: 100%;
  max-height: 560px;
  display: block;
  object-fit: contain;
  background: #111827;
  border-radius: 10px;
}
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  background: rgba(0,0,0,.82); color: #fff; padding: 10px 14px; border-radius: 999px; z-index: 50;
}

.admin-shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.admin-shell aside { background: #111827; color: #fff; padding: 24px; }
.admin-shell aside h1 { font-size: 20px; margin: 0 0 20px; }
.admin-shell nav { display: grid; gap: 8px; }
.admin-shell nav a { color: #d1d5db; padding: 10px 12px; border-radius: 6px; }
.admin-shell nav a:hover { background: #1f2937; color: #fff; }
.admin-main { padding: 28px; overflow-x: auto; }
.admin-main > header { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 18px; }
.admin-main > header h1 { margin: 0; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.metric { padding: 18px; display: grid; gap: 8px; }
.metric span { color: var(--muted); }
.metric strong { font-size: 28px; }
.secret { font-size: 34px; font-weight: 800; letter-spacing: 2px; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.inline { display: inline; }

@media (max-width: 900px) {
  .account-grid { grid-template-columns: 1fr; }
  .site-shell { width: min(100% - 24px, 720px); margin-top: 14px; }
  .site-hero { display: grid; padding: 22px; border-radius: 20px; }
  .site-hero h1 { font-size: 28px; }
  .hero-link { width: max-content; }
  .account-card { padding: 20px; }
  .account-top { align-items: flex-start; }
  .account-top h2 { font-size: 22px; }
  .account-meta { display: grid; justify-content: start; justify-items: start; }
  .region { width: auto; min-width: 88px; max-width: max-content; text-align: center; }
  .checked { text-align: left; }
  .account-actions button { min-height: 54px; font-size: 17px; }
  .tutorial-section { padding: 16px; border-radius: 20px; }
  .tutorial-copy { padding: 16px; }
  .tutorial-copy h2 { font-size: 22px; }
  .tutorial-images figure { padding: 6px; border-radius: 14px; }
  .tutorial-images img { max-height: none; height: auto; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-shell aside { position: static; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid { grid-template-columns: 1fr; }
}

@media (min-width: 901px) and (max-width: 1180px) {
  .account-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Public information homepage */
.public-page {
  background: #eef3f8;
  color: #1f2937;
  overflow-x: hidden;
}
.public-page-shell {
  width: min(1120px, calc(100% - 32px));
  max-width: 1120px;
  margin: 0 auto;
  padding: 26px 0 58px;
}
.public-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, .8fr);
  gap: 28px;
  align-items: stretch;
  padding: 42px;
  border: 1px solid #dce5ef;
  border-top: 5px solid #087bff;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 18px 46px rgba(31, 55, 84, .09);
}
.public-hero > *,
.public-hero-copy,
.public-hero-panel,
.public-stats > div,
.public-info-grid > *,
.public-detail-grid > *,
.public-cta > div,
.public-cta-copy,
.public-cta-action { min-width: 0; max-width: 100%; }
.public-hero-copy,
.public-hero-panel,
.public-actions,
.public-cta,
.public-cta-copy,
.public-cta-action { width: 100%; }
.public-kicker {
  display: inline-block;
  color: #087bff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.2px;
}
.public-hero h1 {
  width: 100%;
  max-width: 720px;
  margin: 13px 0 15px;
  color: #152235;
  font-size: clamp(32px, 3.4vw, 44px);
  line-height: 1.16;
  text-wrap: balance;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.public-hero-copy > p {
  width: 100%;
  max-width: 720px;
  margin: 0;
  color: #5e6b7b;
  font-size: 17px;
  line-height: 1.85;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.public-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 164px));
  align-items: stretch;
  justify-content: start;
  width: min(340px, 100%);
  max-width: 100%;
  gap: 12px;
  margin-top: 26px;
}
.public-actions .button {
  width: 100%;
  min-width: 0;
  min-height: 52px;
  font-weight: 800;
}
.public-secondary {
  color: #2365a8;
  border-color: #b9d2ed;
  background: #f7fbff;
}
.public-hero-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 220px;
  padding: 26px;
  border: 1px solid #dce5ef;
  border-radius: 14px;
  background: #f7fafd;
}
.public-panel-label,
.public-panel-note { color: #758398; font-size: 13px; }
.public-hero-panel strong { margin-top: 12px; color: #152235; font-size: 25px; overflow-wrap: anywhere; }
.public-hero-panel p,
.public-panel-note { overflow-wrap: anywhere; }
.public-hero-panel p { margin: 12px 0 0; color: #5e6b7b; line-height: 1.7; }
.public-panel-rule { width: 44px; height: 3px; margin: 22px 0 13px; background: #27c864; }
.public-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}
.public-stats > div {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 21px 24px;
  border: 1px solid #dce5ef;
  border-radius: 14px;
  background: #fff;
}
.public-stats span,
.public-stats small { color: #7b8798; }
.public-stats strong { color: #152235; font-size: 29px; line-height: 1.2; overflow-wrap: anywhere; }
.public-stats small { line-height: 1.45; overflow-wrap: anywhere; }
.public-stat-time { font-size: 18px !important; }
.public-section {
  margin-top: 18px;
  padding: 30px;
  border: 1px solid #dce5ef;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(31, 55, 84, .05);
}
.public-section-heading { max-width: 760px; margin-bottom: 24px; }
.public-section-heading h2 { margin: 9px 0 8px; color: #152235; font-size: 28px; line-height: 1.25; }
.public-section-heading h2,
.public-section-heading p,
.public-cta h2,
.public-cta p { overflow-wrap: anywhere; }
.public-section-heading p { margin: 0; color: #748195; line-height: 1.7; }
.public-info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.public-info-card { min-width: 0; padding-top: 20px; border-top: 3px solid #dceaff; }
.public-info-card h3 { margin: 0 0 11px; color: #1e3551; font-size: 21px; line-height: 1.35; }
.public-info-card p { margin: 0; color: #536174; line-height: 1.9; white-space: normal; overflow-wrap: anywhere; }
.public-status-list { display: grid; gap: 0; border-top: 1px solid #e5ebf2; }
.public-status-row {
  display: grid;
  grid-template-columns: minmax(110px, .8fr) 1fr 1fr;
  gap: 16px;
  align-items: center;
  min-height: 58px;
  border-bottom: 1px solid #e5ebf2;
  color: #687589;
}
.public-status-row > * { min-width: 0; overflow-wrap: anywhere; }
.public-region-tag {
  width: max-content;
  max-width: 100%;
  min-width: 72px;
  padding: 5px 13px;
  border-radius: 999px;
  color: #1261ac;
  background: #e8f3ff;
  font-weight: 800;
  text-align: center;
}
.public-status-good { color: #1a9b50; font-weight: 700; text-align: right; }
.public-detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.public-detail-grid .public-info-card { padding-top: 0; border-top: 0; }
.public-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  align-items: center;
  gap: 24px;
  margin-top: 18px;
  padding: 28px 30px;
  border: 1px solid #c8ddf4;
  border-radius: 16px;
  background: #f4f9ff;
}
.public-cta h2 { margin: 8px 0 7px; color: #173451; font-size: 24px; }
.public-cta p { margin: 0; color: #60748c; line-height: 1.7; }
.public-cta-copy { min-width: 0; }
.public-cta-action {
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: stretch;
}
.public-cta .button {
  width: min(200px, 100%);
  min-width: 0;
  min-height: 52px;
  max-width: 100%;
  font-weight: 800;
}
.hero-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.hero-link.secondary { color: #fff; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.48); box-shadow: none; }
.access-home-link { display: inline-block; margin-bottom: 20px; color: #087bff; font-size: 14px; font-weight: 800; }

@media (max-width: 900px) {
  .public-page-shell { width: calc(100% - 24px); max-width: 720px; padding-top: 14px; }
  .public-hero { grid-template-columns: 1fr; gap: 22px; padding: 28px 22px; border-radius: 18px; }
  .public-hero h1 { font-size: clamp(30px, 7vw, 34px); }
  .public-hero-copy > p { font-size: 16px; }
  .public-actions { width: 100%; }
  .public-hero-panel { min-height: 0; padding: 21px; }
  .public-stats { grid-template-columns: 1fr; gap: 10px; }
  .public-stats > div { padding: 17px 19px; }
  .public-section { padding: 23px 20px; }
  .public-section-heading h2 { font-size: 24px; }
  .public-info-grid,
  .public-detail-grid { grid-template-columns: 1fr; gap: 22px; }
  .public-status-row { grid-template-columns: minmax(82px, .7fr) 1fr; gap: 10px; }
  .public-status-good { grid-column: 2; text-align: left; }
  .public-cta {
    grid-template-columns: 1fr;
    padding: 23px 20px;
  }
  .public-cta-action { justify-content: flex-start; }
  .hero-actions { justify-content: flex-start; }
}

@media (max-width: 520px) {
  .public-hero h1 { font-size: 30px; }
  .public-actions { grid-template-columns: 1fr; }
  .public-actions .button { width: 100%; text-align: center; }
  .public-cta .button { width: 100%; }
  .public-cta-action { width: 100%; }
  .public-status-row { font-size: 14px; }
}

@media (max-width: 380px) {
  .public-page-shell { width: calc(100% - 16px); }
  .public-hero { padding: 24px 17px; }
  .public-section { padding-left: 17px; padding-right: 17px; }
  .public-hero h1 { font-size: 28px; }
  .public-hero-copy > p { font-size: 15px; }
}

/* Admin workspace refresh: keep the existing routes and forms, but make the control surface calmer and easier to scan. */
.admin-shell {
    display: grid;
    grid-template-columns: 248px minmax(0, 1fr);
    min-height: 100vh;
    background: #eef2f6;
}

.admin-shell aside.admin-sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    box-sizing: border-box;
    padding: 24px 16px 18px;
    color: #fff;
    background: #101b2d;
    border-right: 1px solid #23334c;
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 10px 26px;
}

.admin-brand .brand-mark {
    display: grid;
    place-items: center;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    color: #fff;
    background: #1687f8;
    border-radius: 10px;
    font-size: 17px;
    font-weight: 800;
}

.admin-brand .brand-copy {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.admin-brand .brand-copy strong {
    color: #fff;
    font-size: 16px;
    line-height: 1.1;
}

.admin-brand .brand-copy small {
    color: #93a6bf;
    font-size: 11px;
}

.admin-sidebar-label {
    margin: 0 10px 9px;
    color: #8194ae;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.1px;
    text-transform: uppercase;
}

.admin-nav {
    display: grid;
    gap: 5px;
}

.admin-nav .admin-nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
    padding: 11px 10px;
    color: #b8c5d7;
    border: 1px solid transparent;
    border-radius: 8px;
    transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}

.admin-nav .admin-nav-item:hover {
    color: #fff;
    background: #17263d;
}

.admin-nav .admin-nav-item.active {
    color: #fff;
    background: #1d3353;
    border-color: #2b4a75;
}

.nav-mark {
    display: grid;
    place-items: center;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    color: #a9bad0;
    border: 1px solid #46617e;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 800;
}

.admin-nav-item.active .nav-mark {
    color: #fff;
    background: #1687f8;
    border-color: #1687f8;
}

.nav-copy {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.nav-copy strong {
    color: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
}

.nav-copy small {
    overflow: hidden;
    color: #8194ae;
    font-size: 11px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-nav-item.active .nav-copy small {
    color: #b6c9e3;
}

.admin-sidebar-footer {
    display: grid;
    gap: 7px;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid #26354b;
}

.admin-sidebar-footer a {
    display: flex;
    align-items: center;
    min-height: 38px;
    box-sizing: border-box;
    padding: 0 11px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
}

.sidebar-public-link {
    color: #d9e8fb;
    background: #17263d;
}

.sidebar-public-link:hover {
    color: #fff;
    background: #203653;
}

.sidebar-logout {
    color: #91a1b6;
}

.sidebar-logout:hover {
    color: #fff;
    background: #17263d;
}

.admin-shell .admin-main {
    min-width: 0;
    min-height: 100vh;
    box-sizing: border-box;
    padding: 30px clamp(20px, 4vw, 56px) 56px;
    overflow-x: hidden;
    background: #eef2f6;
}

.admin-main > header.admin-topbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 22px;
    max-width: 1460px;
    margin: 0 auto 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #d9e1ea;
}

.admin-heading {
    min-width: 0;
}

.admin-kicker,
.login-kicker {
    display: block;
    margin-bottom: 8px;
    color: #1687f8;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.1px;
}

.admin-heading h1 {
    margin: 0;
    color: #16253b;
    font-size: clamp(25px, 3vw, 34px);
    line-height: 1.1;
}

.admin-heading p {
    margin: 9px 0 0;
    color: #73859a;
    font-size: 13px;
}

.admin-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-live-state {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    box-sizing: border-box;
    padding: 0 11px;
    color: #1b8d57;
    background: #e7f7ee;
    border: 1px solid #c9ebd7;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.admin-live-state i {
    width: 7px;
    height: 7px;
    background: #29bb71;
    border-radius: 50%;
}

.admin-refresh {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 40px;
    padding: 0 15px;
    color: #fff;
    background: #12233d;
    border-color: #12233d;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
}

.admin-refresh:hover {
    color: #fff;
    background: #1c365a;
    border-color: #1c365a;
}

.admin-content {
    max-width: 1460px;
    margin: 0 auto;
}

.admin-content .panel {
    margin-bottom: 18px;
    padding: 22px;
    background: #fff;
    border: 1px solid #dbe3ec;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(24, 45, 72, .04);
}

.admin-content .panel h2 {
    margin: 0 0 12px;
    color: #16253b;
    font-size: 18px;
}

.admin-content .secret {
    margin: 8px 0 12px;
    color: #12233d;
    font-size: 42px;
    font-weight: 800;
    letter-spacing: 3px;
    line-height: 1;
}

.admin-content .metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.admin-content .metric {
    position: relative;
    min-height: 110px;
    box-sizing: border-box;
    padding: 17px 18px;
    background: #fff;
    border: 1px solid #dbe3ec;
    border-radius: 10px;
    box-shadow: none;
}

.admin-content .metric::before {
    display: block;
    width: 30px;
    height: 3px;
    margin-bottom: 15px;
    background: #1687f8;
    content: '';
}

.admin-content .metric:nth-child(2)::before {
    background: #2da875;
}

.admin-content .metric:nth-child(3)::before {
    background: #d99a34;
}

.admin-content .metric:nth-child(4)::before {
    background: #8068d9;
}

.admin-content .metric span {
    color: #73859a;
    font-size: 12px;
    font-weight: 700;
}

.admin-content .metric strong {
    display: block;
    margin-top: 8px;
    color: #16253b;
    font-size: 28px;
    line-height: 1;
}

.admin-content table {
    min-width: 860px;
    overflow: hidden;
    border: 1px solid #dbe3ec;
    border-radius: 8px;
}

.admin-content th {
    color: #73859a;
    background: #f7f9fb;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.admin-content td,
.admin-content th {
    padding: 14px 12px;
    border-color: #e4eaf0;
}

.admin-content td {
    color: #33445b;
    font-size: 13px;
}

.admin-content tbody tr:hover td {
    background: #f8fbff;
}

.admin-content label {
    color: #607187;
    font-size: 13px;
    font-weight: 700;
}

.admin-content input,
.admin-content select,
.admin-content textarea {
    margin-top: 5px;
    min-height: 42px;
    box-sizing: border-box;
    color: #1f2e43;
    background: #fbfcfe;
    border-color: #d8e1eb;
    border-radius: 8px;
}

.admin-content textarea {
    min-height: 110px;
}

.admin-content input:focus,
.admin-content select:focus,
.admin-content textarea:focus {
    border-color: #1687f8;
    box-shadow: 0 0 0 3px rgba(22, 135, 248, .12);
    outline: 0;
}

.admin-content fieldset {
    background: #fbfcfe;
    border-color: #dbe3ec;
    border-radius: 10px;
}

.admin-content legend {
    padding: 0 8px;
    color: #243955;
    font-weight: 800;
}

.admin-content .content-group {
    margin: 10px 0 0;
    padding: 11px 13px;
    color: #19558d;
    background: #eaf3ff;
    border-left: 3px solid #1687f8;
    border-radius: 8px;
}

.admin-login {
    display: grid;
    place-items: center;
    min-height: 100vh;
    box-sizing: border-box;
    padding: 24px;
    background: #eef2f6;
}

.admin-login-card {
    width: min(420px, 100%);
    box-sizing: border-box;
    padding: 34px;
    background: #fff;
    border: 1px solid #dbe3ec;
    border-radius: 10px;
    box-shadow: 0 16px 38px rgba(24, 45, 72, .08);
}

.admin-login-card .admin-brand {
    padding: 0 0 28px;
}

.admin-login-card h1 {
    margin: 0;
    color: #16253b;
    font-size: 28px;
}

.login-lead {
    margin: 8px 0 24px;
    color: #73859a;
    font-size: 14px;
}

.login-form {
    display: grid;
    gap: 15px;
}

.login-form label {
    display: grid;
    gap: 4px;
    color: #607187;
    font-size: 13px;
    font-weight: 700;
}

.login-form input {
    min-height: 44px;
    box-sizing: border-box;
    padding: 0 12px;
    color: #1f2e43;
    background: #fbfcfe;
    border: 1px solid #d8e1eb;
    border-radius: 8px;
}

.login-form input:focus {
    border-color: #1687f8;
    box-shadow: 0 0 0 3px rgba(22, 135, 248, .12);
    outline: 0;
}

.login-form .button {
    width: 100%;
    min-height: 44px;
    margin-top: 4px;
    border-radius: 8px;
    font-weight: 800;
}

@media (max-width: 900px) {
    .admin-shell {
        display: block;
    }

    .admin-shell aside.admin-sidebar {
        position: static;
        height: auto;
        padding: 16px;
    }

    .admin-brand {
        padding: 0 4px 16px;
    }

    .admin-sidebar-label {
        display: none;
    }

    .admin-nav {
        display: flex;
        gap: 6px;
        overflow-x: auto;
        padding-bottom: 3px;
    }

    .admin-nav .admin-nav-item {
        flex: 0 0 auto;
        min-width: 102px;
        padding: 9px 10px;
    }

    .nav-mark {
        flex-basis: 24px;
        width: 24px;
        height: 24px;
    }

    .nav-copy small {
        display: none;
    }

    .admin-sidebar-footer {
        display: flex;
        gap: 8px;
        margin-top: 13px;
        padding-top: 13px;
    }

    .admin-sidebar-footer a {
        flex: 1;
        justify-content: center;
    }

    .admin-shell .admin-main {
        min-height: auto;
        padding: 22px 14px 38px;
    }

    .admin-main > header.admin-topbar {
        display: grid;
        align-items: start;
        gap: 16px;
        margin-bottom: 18px;
        padding-bottom: 18px;
    }

    .admin-toolbar {
        justify-content: flex-start;
    }

    .admin-content .metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-content .panel {
        padding: 17px 15px;
    }

    .admin-content .content-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
    }

    .admin-content .content-tab {
        flex: 0 0 auto;
    }
}

@media (max-width: 520px) {
    .admin-content .metrics {
        gap: 8px;
    }

    .admin-content .metric {
        min-height: 92px;
        padding: 14px 12px;
    }

    .admin-content .metric strong {
        font-size: 25px;
    }

    .admin-content .secret {
        font-size: 32px;
    }

    .admin-refresh {
        flex: 1;
    }

    .admin-login-card {
        padding: 26px 22px;
    }
}
