:root {
  color-scheme: light;
  --bg: #f2f6f7;
  --surface: #ffffff;
  --surface-strong: #f8fbfb;
  --surface-tint: #eef8f5;
  --text: #172027;
  --muted: #64717c;
  --line: #d5e0e3;
  --line-strong: #b9c8cd;
  --primary: #0b6b62;
  --primary-dark: #084d48;
  --accent: #315f9c;
  --accent-soft: #e8f0ff;
  --warning: #b7791f;
  --code: #101923;
  --code-text: #d9e9f5;
  --shadow: 0 14px 34px rgba(35, 51, 61, 0.11);
  --shadow-soft: 0 8px 22px rgba(35, 51, 61, 0.08);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  width: 100%;
  max-width: 100%;
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: "Aptos", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    linear-gradient(rgba(32, 67, 83, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(32, 67, 83, 0.055) 1px, transparent 1px),
    linear-gradient(135deg, #eef5f5 0%, #fafbf7 52%, #edf4f7 100%);
  background-size: 28px 28px, 28px 28px, auto;
}

button,
.nav-item,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  border-radius: var(--radius);
  color: #ffffff;
  background: var(--primary);
  cursor: pointer;
  min-height: 42px;
  padding: 0 16px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 10px 18px rgba(11, 107, 98, 0.18);
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

button:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(11, 107, 98, 0.22);
}

button:focus-visible,
.nav-item:focus-visible,
.overview-grid a:focus-visible {
  outline: 3px solid rgba(49, 95, 156, 0.28);
  outline-offset: 2px;
}

button.secondary,
.copy-btn {
  color: var(--primary-dark);
  border: 1px solid rgba(15, 118, 110, 0.24);
  background: var(--surface-tint);
  box-shadow: none;
}

button.secondary:hover,
.copy-btn:hover {
  color: #ffffff;
  background: var(--primary-dark);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--text);
  padding: 11px 12px;
  outline: none;
  min-width: 0;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

label {
  display: grid;
  gap: 7px;
  color: #3b4852;
  font-size: 14px;
  font-weight: 700;
}

.shell {
  display: grid;
  grid-template-columns: clamp(232px, 17vw, 280px) minmax(0, 1fr);
  min-height: 100vh;
  width: 100%;
  min-width: 0;
  overflow-x: clip;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow-y: auto;
  padding: clamp(18px, 2vw, 26px) clamp(14px, 1.5vw, 20px);
  background: rgba(255, 255, 255, 0.9);
  border-right: 1px solid rgba(216, 224, 229, 0.78);
  box-shadow: 8px 0 30px rgba(35, 51, 61, 0.05);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary-dark), var(--accent));
  font-weight: 900;
  box-shadow: 0 12px 22px rgba(49, 95, 156, 0.2);
}

.brand strong,
.brand span {
  display: block;
}

.brand span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.brand strong {
  overflow-wrap: anywhere;
}

.nav {
  display: grid;
  gap: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  min-height: 38px;
  border-radius: var(--radius);
  padding: 0 12px;
  width: 100%;
  justify-content: flex-start;
  color: #31424e;
  background: transparent;
  font-weight: 700;
  text-align: left;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav-item:hover,
.nav-item.active {
  color: var(--primary-dark);
  background: linear-gradient(90deg, #def4ee 0%, #edf5ff 100%);
}

.nav-item:hover {
  transform: translateX(2px);
}

.side-note,
.footer-note {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
  padding: 14px;
  color: var(--muted);
  line-height: 1.55;
}

.side-note {
  margin-top: auto;
  font-size: 13px;
}

.side-note strong,
.footer-note strong {
  color: var(--text);
}

.workspace {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  max-width: none;
  padding: clamp(18px, 3vw, 36px);
}

.workspace > *,
.tool-panel,
.grid,
.card,
.result-wrap,
.content-grid,
.metric-list {
  min-width: 0;
  max-width: 100%;
}

.topbar {
  order: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: clamp(18px, 2vw, 26px);
  padding-bottom: clamp(18px, 2vw, 24px);
  border-bottom: 1px solid rgba(181, 197, 203, 0.64);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 800;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(30px, 3.6vw, 48px);
  line-height: 1.12;
}

h2 {
  font-size: clamp(22px, 2vw, 26px);
  line-height: 1.22;
}

p {
  line-height: 1.7;
}

.intro {
  max-width: 820px;
  margin: 12px 0 0;
  color: var(--muted);
}

.overview-grid {
  order: 3;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: clamp(10px, 1.5vw, 14px);
  margin: clamp(22px, 3vw, 30px) 0 0;
}

.overview-grid a {
  position: relative;
  display: grid;
  min-height: 122px;
  align-content: start;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 251, 251, 0.88));
  color: var(--text);
  padding: 15px;
  text-decoration: none;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.overview-grid a::before {
  content: "";
  width: 34px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.overview-grid a:hover {
  border-color: rgba(15, 118, 110, 0.38);
  background: #fbfefd;
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.overview-grid strong {
  line-height: 1.35;
}

.overview-grid span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.tool-panel {
  order: 2;
  display: none;
}

.tool-panel.active {
  display: grid;
  gap: clamp(16px, 2vw, 20px);
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.panel-head p {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.two {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  padding: clamp(16px, 2vw, 20px);
}

.inline,
.inline-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: end;
  gap: 12px;
}

.inline-form {
  grid-template-columns: minmax(92px, 120px) minmax(0, 1fr) max-content;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: 16px;
}

.form-grid > button {
  align-self: end;
  justify-self: start;
}

.wide {
  grid-column: 1 / -1;
}

.checks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.checks label {
  display: flex;
  flex: 1 1 220px;
  min-width: min(100%, 220px);
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.checks input {
  width: auto;
  flex: 0 0 auto;
}

.metric-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
  gap: 12px;
}

.metric {
  border-left: 3px solid var(--primary);
  border-radius: 6px;
  background: linear-gradient(180deg, #f6fbfa, #eef8f7);
  padding: 10px 12px;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.metric strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.result-wrap {
  overflow: hidden;
  border: 1px solid #263446;
  border-radius: var(--radius);
  background: var(--code);
  box-shadow: var(--shadow);
}

.result-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  border-bottom: 1px solid rgba(219, 234, 254, 0.15);
  padding: 12px 14px;
  color: #e5eef8;
}

.copy-btn {
  min-height: 34px;
  padding: 0 12px;
}

pre {
  min-height: clamp(170px, 24vh, 280px);
  max-height: 58vh;
  margin: 0;
  overflow: auto;
  padding: clamp(14px, 2vw, 18px);
  color: var(--code-text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.65;
  font-size: 14px;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 16px;
}

.info-block {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  padding: 18px;
  box-shadow: var(--shadow-soft);
}

.info-block h3 {
  margin: 0 0 10px;
  font-size: 17px;
}

.info-block p,
.info-block li {
  color: var(--muted);
  line-height: 1.7;
}

.info-block ul,
.info-block ol {
  margin: 0;
  padding-left: 20px;
}

.mini-code {
  min-height: auto;
  border-radius: 6px;
  max-height: none;
  padding: 12px;
  font-size: 13px;
}

.footer-note {
  order: 4;
  margin-top: 24px;
}

@media (max-width: 1100px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 18px;
  }

  .nav {
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  }

  .side-note {
    margin-top: 0;
  }

  .workspace {
    padding: 22px 16px 34px;
    max-width: none;
  }

  .topbar,
  .panel-head {
    flex-direction: column;
  }

  .topbar {
    gap: 14px;
  }

  .inline,
  .inline-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .sidebar {
    gap: 12px;
  }

  .nav {
    display: flex;
    gap: 8px;
    margin-inline: -2px;
    overflow-x: auto;
    padding: 2px 2px 8px;
    scrollbar-width: thin;
  }

  .nav-item {
    flex: 0 0 auto;
    width: auto;
    min-height: 36px;
    padding: 0 12px;
    white-space: nowrap;
  }

  .nav-item:hover {
    transform: none;
  }

  .side-note {
    display: none;
  }

  .grid.two,
  .metric-list,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .workspace {
    padding: 18px 14px 32px;
  }
}

@media (max-width: 640px) {

  button {
    width: 100%;
    justify-content: center;
  }

  .form-grid > button,
  .copy-btn {
    justify-self: stretch;
  }

  .topbar button {
    width: 100%;
  }

  .overview-grid,
  .content-grid {
    grid-template-columns: 1fr;
  }
}

/* Dashboard refresh based on the provided product-style mockup. */
[hidden] {
  display: none !important;
}

body {
  background: #f7fafc;
}

.shell {
  grid-template-columns: clamp(304px, 20vw, 336px) minmax(0, 1fr);
  width: 100%;
  min-width: 0;
  border: 1px solid #dbe6ec;
  border-radius: 14px;
  overflow: hidden;
  background: #ffffff;
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 252, 251, 0.96));
  border-right: 1px solid #dbe6ec;
  padding: 26px 20px;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
}

.brand-mark {
  width: 54px;
  height: 54px;
  border-radius: 10px;
  font-size: 24px;
  background: linear-gradient(135deg, #0a6d6b 0%, #1e5fa8 100%);
}

.brand strong {
  font-size: 19px;
  letter-spacing: 0;
  line-height: 1.25;
  white-space: nowrap;
}

.brand span {
  font-size: 15px;
  white-space: nowrap;
}

.nav {
  gap: 12px;
  margin-top: 16px;
}

.nav-item {
  min-height: 54px;
  gap: 14px;
  padding: 0 16px;
  border-radius: 8px;
  color: #263b4f;
  font-size: 17px;
}

.nav-item.active {
  position: relative;
  color: #08796e;
  background: linear-gradient(90deg, #e1f8f2 0%, #edf9fb 100%);
}

.nav-item.active::before {
  content: "";
  position: absolute;
  left: -16px;
  top: 2px;
  bottom: 2px;
  width: 4px;
  border-radius: 999px;
  background: #07967f;
}

.nav-icon {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #9eb8c8;
  border-radius: 9px;
  color: #0c766b;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  background: #ffffff;
}

.nav-item.active .nav-icon {
  border-color: #20a790;
  color: #078370;
  background: #eefbf8;
}

.side-note {
  padding: 20px;
  border-color: #d7e6ea;
  background: linear-gradient(180deg, #ffffff 0%, #f2fbfa 100%);
}

.side-note strong {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
}

.side-note strong::before {
  content: "◇";
  color: #0f987e;
}

.side-note-metrics {
  display: grid;
  gap: 8px;
  margin-top: 6px;
}

.side-note-metrics span {
  display: flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid #d6ebe7;
  border-radius: 8px;
  padding: 0 10px;
  color: #295063;
  background: rgba(255, 255, 255, 0.72);
  font-weight: 700;
}

.side-note-metrics span::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-right: 9px;
  border-radius: 999px;
  background: #0f987e;
}

.brand:hover .brand-mark,
.topbar-title:hover strong {
  transform: translateY(-1px);
}

.brand:focus-visible,
.topbar-title:focus-visible {
  border-radius: 10px;
  outline: 3px solid rgba(49, 95, 156, 0.28);
  outline-offset: 4px;
}

.workspace {
  min-width: 0;
  padding: 32px 36px 22px;
  background:
    radial-gradient(circle at 78% 8%, rgba(87, 151, 255, 0.11), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
}

.workspace > * {
  width: 100%;
  max-width: none;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(300px, 560px) auto;
  align-items: center;
  gap: 18px;
  margin-bottom: 32px;
  padding-bottom: 0;
  border-bottom: 0;
}

.topbar-title strong {
  display: block;
  color: #101c2d;
  font-size: 24px;
  line-height: 1.2;
}

.topbar-title {
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.topbar-title strong {
  transition: transform 160ms ease, color 160ms ease;
}

.topbar-title span {
  display: block;
  margin-top: 4px;
  color: #617185;
  font-size: 15px;
}

.tool-search {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  height: 44px;
  border: 1px solid #d9e4ea;
  border-radius: 10px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 28px rgba(30, 72, 111, 0.06);
}

.tool-search span {
  color: #426073;
  font-size: 22px;
}

.tool-search input {
  min-height: 0;
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.tool-search input:focus {
  box-shadow: none;
}

kbd {
  border-radius: 6px;
  padding: 2px 8px;
  color: #607084;
  background: #eef2f5;
  font-size: 12px;
  font-family: inherit;
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

.icon-btn {
  display: grid;
  width: 42px;
  height: 42px;
  min-height: 42px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: #1d3448;
  background: transparent;
  box-shadow: none;
  font-size: 22px;
}

.icon-btn:hover {
  color: #08796e;
  background: #ecf7f5;
  box-shadow: none;
}

.help-dialog {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
}

.help-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 27, 40, 0.32);
  backdrop-filter: blur(8px);
}

.help-panel {
  position: relative;
  width: min(560px, 100%);
  border: 1px solid #d6e6ef;
  border-radius: 12px;
  padding: 22px;
  background: #ffffff;
  box-shadow: 0 24px 80px rgba(26, 50, 70, 0.22);
}

.help-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.help-head strong {
  display: block;
  color: #101c2d;
  font-size: 22px;
}

.help-head span,
.help-body {
  color: #617185;
}

.help-head .icon-btn {
  width: 36px;
  height: 36px;
  min-height: 36px;
  color: #496171;
  font-size: 24px;
}

.help-body {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  line-height: 1.75;
}

.help-body p {
  margin: 0;
}

.dialog-open {
  overflow: hidden;
}

body.theme-dark {
  --text: #e8f2f4;
  --muted: #b5c6cf;
  --line: rgba(163, 196, 210, 0.28);
  --primary: #26bfa5;
  --primary-dark: #78e1d3;
  --surface: #142331;
  --surface-strong: #101e2a;
  --surface-tint: #14382f;
  --code: #07131d;
  --code-text: #e5f1f5;
  color: var(--text);
  background: #0c1720;
}

body.theme-dark .shell,
body.theme-dark .workspace,
body.theme-dark .sidebar,
body.theme-dark .dashboard-card,
body.theme-dark .overview-grid a,
body.theme-dark .card,
body.theme-dark .info-block,
body.theme-dark .footer-note,
body.theme-dark .side-note,
body.theme-dark .tool-panel.active,
body.theme-dark .help-panel {
  border-color: rgba(154, 188, 205, 0.24);
  color: #e8f2f4;
  background: linear-gradient(180deg, rgba(22, 38, 52, 0.98), rgba(13, 26, 36, 0.98));
}

body.theme-dark .workspace {
  background:
    radial-gradient(circle at 78% 8%, rgba(38, 191, 165, 0.13), transparent 30%),
    linear-gradient(180deg, #111f2b 0%, #0c1720 100%);
}

body.theme-dark .topbar-title strong,
body.theme-dark h1,
body.theme-dark h2,
body.theme-dark h3,
body.theme-dark .hero-copy h1,
body.theme-dark .section-title h2,
body.theme-dark .card-head strong,
body.theme-dark .help-head strong,
body.theme-dark .brand strong,
body.theme-dark label,
body.theme-dark .panel-head h2,
body.theme-dark .info-block h3,
body.theme-dark .metric strong,
body.theme-dark .status-card li,
body.theme-dark .recent-card li,
body.theme-dark .side-note strong,
body.theme-dark .footer-note strong {
  color: #f2f8fa;
}

body.theme-dark .brand span,
body.theme-dark .topbar-title span,
body.theme-dark .hero-copy p,
body.theme-dark .intro,
body.theme-dark .panel-head p,
body.theme-dark .info-block p,
body.theme-dark .info-block li,
body.theme-dark .metric span,
body.theme-dark .footer-note span,
body.theme-dark .help-head span,
body.theme-dark .help-body,
body.theme-dark .overview-grid a span:not(.tool-icon),
body.theme-dark .recent-card time {
  color: #b5c6cf;
}

body.theme-dark .tool-search,
body.theme-dark input,
body.theme-dark select,
body.theme-dark textarea,
body.theme-dark .quick-actions a,
body.theme-dark .metric,
body.theme-dark .side-note-metrics span {
  border-color: rgba(154, 188, 205, 0.3);
  color: #e8f2f4;
  background: rgba(8, 18, 26, 0.82);
}

body.theme-dark input::placeholder,
body.theme-dark textarea::placeholder {
  color: #7f96a4;
}

body.theme-dark select option {
  color: #e8f2f4;
  background: #101e2a;
}

body.theme-dark .nav-item {
  color: #c7d8df;
}

body.theme-dark .nav-item:hover,
body.theme-dark .nav-item.active {
  color: #eafffb;
  background: linear-gradient(90deg, rgba(38, 191, 165, 0.22), rgba(76, 132, 223, 0.18));
}

body.theme-dark .nav-icon,
body.theme-dark .tool-icon {
  border-color: rgba(124, 211, 196, 0.5);
  color: #9cf0e3;
  background: rgba(9, 25, 35, 0.9);
}

body.theme-dark .result-wrap {
  border-color: rgba(120, 225, 211, 0.24);
  background: #07131d;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.24);
}

body.theme-dark .result-title {
  color: #f2f8fa;
  border-bottom-color: rgba(181, 198, 207, 0.18);
}

body.theme-dark pre {
  color: #d9e8ee;
}

body.theme-dark button.secondary,
body.theme-dark .copy-btn {
  border-color: rgba(120, 225, 211, 0.35);
  color: #dffdfa;
  background: rgba(38, 191, 165, 0.14);
}

body.theme-dark button.secondary:hover,
body.theme-dark .copy-btn:hover {
  color: #07131d;
  background: #78e1d3;
}

body.theme-dark kbd {
  color: #d9e8ee;
  background: rgba(181, 198, 207, 0.14);
}

body.theme-dark .hero-card {
  border-color: rgba(93, 169, 203, 0.28);
  background: linear-gradient(100deg, rgba(16, 44, 48, 0.94), rgba(18, 38, 58, 0.94));
}

body.theme-dark .icon-btn {
  color: #d9ebee;
}

body.theme-dark .icon-btn:hover {
  color: #8ce6d9;
  background: rgba(38, 191, 165, 0.12);
}

@media (min-width: 901px) and (max-height: 860px) {
  .sidebar {
    gap: 12px;
    padding-block: 18px;
  }

  .brand-mark {
    width: 46px;
    height: 46px;
    font-size: 21px;
  }

  .nav {
    gap: 6px;
    margin-top: 8px;
  }

  .nav-item {
    min-height: 43px;
    font-size: 16px;
  }

  .side-note {
    display: none;
  }
}

@media (min-width: 901px) {
  .sidebar {
    height: 100dvh;
    overflow: hidden;
  }

  .side-note {
    display: none !important;
  }
}

button.compact {
  width: auto;
  min-height: 42px;
  border-radius: 9px;
  padding-inline: 18px;
}

.dashboard-home {
  order: 2;
  display: grid;
  gap: 22px;
}

.hero-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(520px, 1.18fr) minmax(280px, 0.82fr);
  gap: clamp(18px, 2vw, 34px);
  min-height: 270px;
  overflow: hidden;
  border: 1px solid #d6e6ef;
  border-radius: 10px;
  padding: 34px 40px;
  background:
    linear-gradient(100deg, rgba(245, 255, 252, 0.94) 0%, rgba(239, 248, 255, 0.92) 48%, rgba(227, 241, 255, 0.96) 100%);
}

.hero-copy {
  align-self: center;
  max-width: 820px;
  min-width: 0;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 9px;
  padding: 0 16px;
  color: #08796e;
  background: #dff8f0;
  font-size: 14px;
  font-weight: 700;
}

.hero-copy h1 {
  margin-top: 22px;
  color: #101c2d;
  font-size: clamp(32px, 3vw, 46px);
  line-height: 1.14;
}

.hero-copy p {
  max-width: 700px;
  color: #4c6075;
  font-size: 16px;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: 26px;
}

.hero-points span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #243f54;
  font-weight: 800;
}

.hero-points span::before {
  content: "●";
  color: #12997f;
  font-size: 13px;
}

.hero-visual {
  position: relative;
  min-width: 0;
  min-height: 220px;
}

.server-stack,
.monitor-card,
.shield-mark {
  position: absolute;
  filter: drop-shadow(0 18px 30px rgba(68, 116, 197, 0.2));
}

.server-stack {
  left: 8%;
  top: 22%;
  width: min(150px, 36%);
  display: grid;
  gap: 10px;
}

.server-stack span {
  height: 58px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(210, 251, 244, 0.9), rgba(96, 151, 241, 0.82));
}

.shield-mark {
  left: 32%;
  bottom: 20px;
  display: grid;
  width: min(110px, 30%);
  height: min(130px, 58%);
  place-items: center;
  border-radius: 52% 52% 46% 46%;
  color: #ffffff;
  background: linear-gradient(160deg, #48d7d3, #4c84df);
  font-size: 62px;
  font-weight: 900;
}

.monitor-card {
  right: 6%;
  top: 22%;
  width: min(210px, 50%);
  height: 145px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(179, 210, 255, 0.95), rgba(120, 160, 240, 0.86));
}

.monitor-card i {
  position: absolute;
  left: 28px;
  right: 28px;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
}

.monitor-card i:nth-child(1) { top: 34px; }
.monitor-card i:nth-child(2) { top: 70px; width: 54%; }
.monitor-card i:nth-child(3) { top: 106px; width: 70%; }

.section-title h2 {
  font-size: 22px;
}

.overview-grid {
  order: initial;
  grid-template-columns: repeat(auto-fit, minmax(238px, 1fr));
  gap: 16px;
  margin: 0;
}

.overview-grid a {
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  min-height: 116px;
  align-items: center;
  gap: 4px 16px;
  border-color: #dbe6ec;
  border-radius: 9px;
  padding: 20px 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 24px rgba(42, 73, 96, 0.06);
}

@media (min-width: 1480px) {
  .overview-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (min-width: 1380px) and (max-width: 1479px) {
  .overview-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1081px) and (max-width: 1379px) {
  .overview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero-card {
    grid-template-columns: minmax(0, 1fr) minmax(250px, 30%);
  }

  .hero-copy h1 {
    font-size: 36px;
  }

  .dashboard-widgets {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .recent-card {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1081px) and (max-width: 1240px) {
  .topbar {
    grid-template-columns: 1fr;
  }

  .top-actions {
    justify-content: flex-start;
  }
}

.overview-grid a::before {
  display: none;
}

.overview-grid a:hover {
  border-color: #9bdad2;
  transform: translateY(-2px);
}

.tool-icon {
  grid-row: 1 / 3;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 2px solid #3d87e8;
  border-radius: 14px;
  color: #236ed4;
  font-size: 12px;
  font-weight: 900;
  background: #f4f9ff;
}

.overview-grid a:nth-child(3) .tool-icon,
.overview-grid a:nth-child(11) .tool-icon {
  border-color: #7569e8;
  color: #6b5de6;
  background: #f7f5ff;
}

.overview-grid a:nth-child(4) .tool-icon,
.overview-grid a:nth-child(5) .tool-icon,
.overview-grid a:nth-child(6) .tool-icon,
.overview-grid a:nth-child(8) .tool-icon,
.overview-grid a:nth-child(10) .tool-icon {
  border-color: #0f9b83;
  color: #078370;
  background: #f0fffb;
}

.overview-grid a strong {
  font-size: 16px;
}

.overview-grid a span:not(.tool-icon) {
  color: #657588;
  font-size: 13px;
}

.overview-grid a b {
  grid-row: 1 / 3;
  color: #527083;
  font-size: 26px;
  font-weight: 400;
}

.dashboard-widgets {
  display: grid;
  grid-template-columns: 1fr 1fr 1.25fr;
  gap: 16px;
}

.dashboard-card {
  min-height: 220px;
  border: 1px solid #dbe6ec;
  border-radius: 10px;
  padding: 20px 22px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 24px rgba(42, 73, 96, 0.06);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.card-head strong {
  font-size: 18px;
}

.card-head a,
.text-btn {
  width: auto;
  min-height: 0;
  border: 0;
  padding: 0;
  color: #5a7189;
  background: transparent;
  box-shadow: none;
  font-size: 13px;
  text-decoration: none;
}

.status-card ul,
.recent-card ol {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.status-card li,
.recent-card li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: #2e4559;
}

.status-card li::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #0e9a7b;
}

.status-card li span {
  margin-right: auto;
}

.status-card b {
  color: #0e9a7b;
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.quick-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  border: 1px solid #d9e5ec;
  border-radius: 10px;
  padding: 0 16px;
  color: #34617e;
  background: #f8fbfd;
  font-weight: 700;
  text-decoration: none;
}

.recent-card li {
  border-bottom: 1px solid #eef3f6;
  padding-bottom: 9px;
}

.recent-card time {
  color: #7c8da0;
  font-size: 13px;
  white-space: nowrap;
}

.tool-panel {
  order: 2;
}

.tool-panel.active {
  border: 1px solid #dbe6ec;
  border-radius: 10px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 24px rgba(42, 73, 96, 0.06);
}

.footer-note {
  display: flex;
  justify-content: center;
  border: 0;
  border-top: 1px solid #e5edf2;
  border-radius: 0;
  background: transparent;
  text-align: center;
}

@media (max-width: 1080px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .topbar {
    grid-template-columns: 1fr;
  }

  .top-actions {
    justify-content: flex-start;
  }

  .overview-grid {
    grid-template-columns: repeat(3, minmax(170px, 1fr));
  }

  .dashboard-widgets {
    grid-template-columns: 1fr;
  }

  .hero-card {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    display: none;
  }
}

@media (max-width: 900px) {
  .shell {
    border-radius: 0;
    border-inline: 0;
  }

  .topbar {
    gap: 16px;
  }

  .tool-search {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .tool-search kbd,
  .top-actions .icon-btn {
    display: none;
  }

  .hero-card {
    min-height: auto;
    padding: 24px 18px;
  }

  .hero-copy h1 {
    font-size: 32px;
  }

  .overview-grid {
    grid-template-columns: 1fr;
  }

  .tool-panel.active {
    padding: 18px 14px;
  }
}

/* Final dashboard polish aligned to the supplied design crops. */
@media (min-width: 901px) {
  .sidebar {
    height: 100dvh;
    overflow: hidden;
    gap: 12px;
    padding: 22px 18px;
  }

  .brand-mark {
    width: 50px;
    height: 50px;
  }

  .nav {
    gap: 7px;
    margin-top: 10px;
  }

  .nav-item {
    min-height: 44px;
    padding: 0 14px;
    font-size: 16px;
  }

  .nav-icon {
    width: 27px;
    height: 27px;
  }

  .side-note {
    display: none !important;
  }
}

@media (min-width: 901px) and (min-height: 900px) {
  .side-note {
    display: grid !important;
    gap: 9px;
    margin-top: auto;
    min-height: 120px;
    border: 1px solid #d8e7eb;
    border-radius: 8px;
    padding: 15px 16px 12px;
    color: #607385;
    background: linear-gradient(180deg, #ffffff 0%, #f6fcfb 100%);
    box-shadow: 0 12px 26px rgba(31, 73, 92, 0.05);
  }

  .side-note strong {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #1f3344;
    font-size: 13px;
    line-height: 1.2;
  }

  .side-note strong::before {
    content: "▱";
    color: #0f987e;
    font-size: 16px;
    line-height: 1;
  }

  .side-note-copy {
    max-width: 205px;
    color: #697d8d;
    font-size: 12px;
    line-height: 1.65;
  }

  .sparkline {
    position: relative;
    display: block;
    height: 28px;
    margin-top: 1px;
    overflow: hidden;
    border-radius: 6px;
    background:
      linear-gradient(180deg, transparent 0 58%, rgba(19, 170, 148, 0.1) 59% 100%);
  }

  .sparkline::before {
    content: "";
    position: absolute;
    inset: 3px 1px 1px 74px;
    background:
      linear-gradient(135deg, transparent 0 10%, rgba(39, 190, 172, 0.34) 11% 14%, transparent 15% 25%, rgba(39, 190, 172, 0.24) 26% 29%, transparent 30% 39%, rgba(39, 190, 172, 0.42) 40% 43%, transparent 44% 52%, rgba(39, 190, 172, 0.22) 53% 56%, transparent 57% 65%, rgba(39, 190, 172, 0.48) 66% 70%, transparent 71%);
  }
}

@media (min-width: 901px) and (max-height: 899px) {
  .side-note {
    display: none !important;
  }
}

.dashboard-home {
  gap: 18px;
}

.section-title h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

.overview-grid {
  gap: 14px;
}

.overview-grid a {
  min-height: 104px;
  border-radius: 8px;
  padding: 18px 16px;
  gap: 3px 14px;
  box-shadow: 0 8px 20px rgba(42, 73, 96, 0.05);
}

.tool-icon {
  width: 38px;
  height: 38px;
  border-radius: 13px;
}

.overview-grid a strong {
  font-size: 15px;
  line-height: 1.35;
}

.overview-grid a span:not(.tool-icon) {
  font-size: 12px;
  line-height: 1.55;
}

.overview-grid a b {
  font-size: 23px;
}

.dashboard-widgets {
  grid-template-columns: 1fr 1fr 1.12fr;
  gap: 14px;
}

.dashboard-card {
  min-height: 190px;
  border-radius: 8px;
  padding: 17px 19px;
  box-shadow: 0 8px 20px rgba(42, 73, 96, 0.05);
}

.card-head {
  margin-bottom: 14px;
}

.card-head strong {
  font-size: 16px;
}

.status-card ul,
.recent-card ol {
  gap: 12px;
}

.quick-actions {
  gap: 10px;
}

.quick-actions a {
  min-height: 36px;
  border-radius: 8px;
  padding: 0 13px;
  font-size: 13px;
}

.footer-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  margin-top: 18px;
  border: 0;
  border-top: 1px solid #e4edf2;
  border-radius: 0;
  padding: 16px 0 4px;
  color: #6f8190;
  background: transparent;
  font-size: 12px;
  text-align: center;
}

.footer-note span {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.footer-note span:nth-child(1)::before {
  content: "©";
  color: #8da0ae;
}

.footer-note span:nth-child(2)::before,
.footer-note span:nth-child(3)::before {
  content: "";
  width: 10px;
  height: 10px;
  border: 1.5px solid #16a085;
  border-radius: 4px;
}

body.theme-dark .side-note {
  border-color: rgba(154, 188, 205, 0.24);
  background: linear-gradient(180deg, rgba(22, 38, 52, 0.98), rgba(13, 26, 36, 0.98));
}

body.theme-dark .side-note strong {
  color: #f2f8fa;
}

body.theme-dark .side-note-copy,
body.theme-dark .footer-note {
  color: #b5c6cf;
}

body.theme-dark .sparkline {
  background: linear-gradient(180deg, transparent 0 58%, rgba(38, 191, 165, 0.14) 59% 100%);
}

body.theme-dark .footer-note {
  border-top-color: rgba(154, 188, 205, 0.18);
}

@media (max-width: 1080px) {
  .dashboard-widgets {
    grid-template-columns: 1fr;
  }

  .footer-note {
    flex-wrap: wrap;
    gap: 10px 18px;
  }
}

/* Final interaction and icon pass for the dashboard design crop. */
.overview-grid a {
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: start;
}

.tool-icon {
  position: relative;
  overflow: hidden;
  border-width: 1.5px;
  font-size: 0;
}

.tool-icon::before,
.tool-icon::after,
.quick-icon::before,
.quick-icon::after,
.recent-icon::before,
.recent-icon::after {
  content: "";
  position: absolute;
  box-sizing: border-box;
}

.icon-ip::before {
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 999px;
}

.icon-ip::after {
  width: 10px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform: translate(8px, 8px) rotate(45deg);
}

.icon-port::before {
  width: 22px;
  height: 14px;
  border: 2px solid currentColor;
  border-inline: 0;
}

.icon-port::after {
  width: 20px;
  height: 18px;
  border-left: 2px solid currentColor;
  border-right: 2px solid currentColor;
  box-shadow: inset 8px 0 0 -6px currentColor;
}

.icon-ssl::before {
  width: 20px;
  height: 22px;
  border: 2px solid currentColor;
  border-radius: 10px 10px 12px 12px;
  clip-path: polygon(50% 0, 100% 18%, 88% 88%, 50% 100%, 12% 88%, 0 18%);
}

.icon-ssl::after {
  width: 9px;
  height: 5px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(1px) rotate(-45deg);
}

.icon-dns::before {
  width: 22px;
  height: 22px;
  border: 2px solid currentColor;
  border-radius: 50%;
  opacity: 0.9;
}

.icon-dns::after {
  width: 24px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 -7px 0 currentColor, 0 7px 0 currentColor;
  opacity: 0.8;
}

.icon-nginx::before,
.icon-lnmp::before {
  width: 22px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 5px;
}

.icon-nginx::after {
  content: "<>";
  position: relative;
  color: currentColor;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.icon-cidr::before {
  width: 22px;
  height: 22px;
  border: 2px solid currentColor;
  border-radius: 5px;
}

.icon-cidr::after {
  width: 22px;
  height: 22px;
  background:
    linear-gradient(currentColor 0 0) 50% 0 / 2px 100% no-repeat,
    linear-gradient(currentColor 0 0) 0 50% / 100% 2px no-repeat;
  opacity: 0.75;
}

.icon-docker::before {
  width: 22px;
  height: 5px;
  border-radius: 2px;
  background: currentColor;
  box-shadow: 0 -7px 0 currentColor, 0 7px 0 currentColor;
}

.icon-docker::after {
  width: 24px;
  height: 18px;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 0 0 8px 8px;
  transform: translateY(5px);
}

.icon-lnmp::after {
  content: "$";
  position: relative;
  color: currentColor;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.icon-crontab::before {
  width: 22px;
  height: 22px;
  border: 2px solid currentColor;
  border-radius: 999px;
}

.icon-crontab::after {
  width: 8px;
  height: 8px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translate(2px, -2px);
}

.icon-http::before {
  width: 22px;
  height: 16px;
  border: 2px solid currentColor;
  border-radius: 5px;
}

.icon-http::after {
  width: 14px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor;
}

.icon-troubleshoot::before {
  width: 22px;
  height: 22px;
  border: 2px solid currentColor;
  border-radius: 7px;
  transform: rotate(45deg);
}

.icon-troubleshoot::after {
  width: 3px;
  height: 13px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 8px 0 -1px currentColor;
}

.quick-actions a {
  gap: 8px;
  padding-inline: 12px 14px;
}

.quick-icon,
.recent-icon {
  position: relative;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
}

.quick-icon {
  width: 18px;
  height: 18px;
  border: 1.5px solid currentColor;
  border-radius: 6px;
  opacity: 0.9;
}

.quick-ip::before,
.quick-dns::before,
.quick-http::before {
  width: 8px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 -4px 0 currentColor, 0 4px 0 currentColor;
}

.quick-port::before {
  width: 2px;
  height: 10px;
  background: currentColor;
  box-shadow: -4px 0 0 currentColor, 4px 0 0 currentColor;
}

.quick-ssl::before {
  width: 8px;
  height: 5px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
}

.recent-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.recent-card ol {
  min-height: 0;
}

.recent-card li {
  min-height: 28px;
}

.recent-entry {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
  font-weight: 700;
}

.recent-entry > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-icon {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  color: #0f8d79;
  background: #effdfa;
}

.recent-icon::before {
  inset: 6px;
  border: 1.8px solid currentColor;
  border-radius: 5px;
}

.recent-port,
.recent-http {
  color: #2f73d5;
  background: #f1f7ff;
}

.recent-ssl,
.recent-troubleshoot {
  color: #6b5de6;
  background: #f6f4ff;
}

.recent-empty {
  justify-content: center !important;
  min-height: 112px;
  border: 1px dashed #d3e2ea;
  border-radius: 8px;
  padding: 20px;
  color: #7890a1 !important;
  text-align: center;
}

.recent-more {
  justify-self: center;
  width: auto;
  min-height: 32px;
  margin-top: 12px;
  border: 0;
  padding: 0 10px;
  color: #0e8977;
  background: transparent;
  box-shadow: none;
  font-size: 13px;
  font-weight: 800;
}

.recent-more:hover {
  color: #075f54;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footer-note {
  gap: 0;
  padding-inline: 12px;
  line-height: 1.8;
}

.footer-note span {
  display: inline;
  white-space: normal;
}

.footer-note span::before,
.footer-note span::after {
  content: none !important;
}

.footer-note a {
  color: #0e8977;
  font-weight: 800;
  text-decoration: none;
  text-underline-offset: 4px;
}

.footer-note a:hover,
.footer-note a:focus-visible {
  color: #075f54;
  text-decoration: underline;
}

body.theme-dark .quick-icon,
body.theme-dark .recent-icon {
  color: #9cf0e3;
  background: rgba(14, 46, 55, 0.92);
}

body.theme-dark .recent-port,
body.theme-dark .recent-http {
  color: #9fc5ff;
}

body.theme-dark .recent-ssl,
body.theme-dark .recent-troubleshoot {
  color: #c5bcff;
}

body.theme-dark .recent-empty {
  border-color: rgba(154, 188, 205, 0.28);
  color: #b5c6cf !important;
}

body.theme-dark .recent-more {
  color: #8ff0df;
}

body.theme-dark .footer-note a {
  color: #8ff0df;
}

body.theme-dark .footer-note a:hover,
body.theme-dark .footer-note a:focus-visible {
  color: #c4fff4;
}

/* Sidebar reward card adapted from the DNS resource hub sponsor slot. */
.reward-slot {
  display: none;
}

@media (min-width: 901px) and (min-height: 900px) {
  .reward-slot {
    display: grid;
    gap: 11px;
    border: 1px solid #d8e7eb;
    border-radius: 8px;
    padding: 14px;
    color: #607385;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 252, 251, 0.98)),
      radial-gradient(circle at 16% 0%, rgba(24, 160, 139, 0.12), transparent 34%);
    box-shadow: 0 12px 26px rgba(31, 73, 92, 0.05);
  }

  .reward-head {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
  }

  .reward-head h3 {
    margin: 0 0 2px;
    color: #1f3344;
    font-size: 14px;
    line-height: 1.2;
  }

  .reward-head small {
    display: block;
    color: #697d8d;
    font-size: 12px;
    line-height: 1.35;
  }

  .reward-icon {
    position: relative;
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 9px;
    color: #0f987e;
    background: #ecfbf7;
    box-shadow: inset 0 0 0 1px rgba(15, 152, 126, 0.2);
  }

  .reward-icon::before {
    content: "";
    width: 15px;
    height: 15px;
    background: currentColor;
    clip-path: polygon(50% 0, 63% 35%, 100% 35%, 70% 56%, 82% 94%, 50% 70%, 18% 94%, 30% 56%, 0 35%, 37% 35%);
  }

  .reward-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .reward-actions button {
    min-height: 34px;
    border: 1px solid #d9e5ec;
    border-radius: 8px;
    color: #34617e;
    background: #f8fbfd;
    box-shadow: none;
    font-size: 12px;
    font-weight: 800;
  }

  .reward-actions button.active,
  .reward-actions button:hover {
    border-color: transparent;
    color: #ffffff;
    background: linear-gradient(135deg, #0f987e, #338de5);
  }

  .reward-reveal {
    display: grid;
    gap: 7px;
    max-height: calc(100dvh - 330px);
    overflow: hidden;
    animation: reward-reveal 0.18s ease-out;
  }

  @keyframes reward-reveal {
    from {
      opacity: 0;
      transform: translateY(-4px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .reward-qr {
    display: grid;
    justify-items: center;
    gap: 6px;
    margin: 0;
    border: 1px solid #e0edf2;
    border-radius: 8px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.82);
  }

  .reward-qr span {
    justify-self: stretch;
    border-radius: 6px;
    padding: 5px 8px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    text-align: center;
  }

  .reward-qr.wx span {
    background: #19be72;
  }

  .reward-qr.ali span {
    background: #1688ff;
  }

  .reward-qr img {
    display: block;
    width: min(100%, clamp(88px, 14dvh, 128px));
    aspect-ratio: 1;
    border-radius: 7px;
    object-fit: cover;
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(21, 53, 92, 0.1);
  }

  .sidebar.reward-open .side-note {
    display: none !important;
  }

  .sidebar.reward-open .reward-slot {
    gap: 8px;
    margin-top: auto;
    padding: 12px;
  }
}

@media (min-width: 901px) and (max-height: 899px) {
  .reward-slot {
    display: none !important;
  }
}

@media (min-width: 901px) and (min-height: 900px) and (max-height: 980px) {
  .sidebar.reward-open .reward-slot {
    gap: 6px;
    padding: 8px;
  }

  .sidebar.reward-open .reward-head {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 8px;
  }

  .sidebar.reward-open .reward-head h3 {
    font-size: 13px;
  }

  .sidebar.reward-open .reward-head small {
    display: none;
  }

  .sidebar.reward-open .reward-icon {
    width: 28px;
    height: 28px;
  }

  .sidebar.reward-open .reward-actions button {
    min-height: 28px;
    font-size: 12px;
  }

  .sidebar.reward-open .reward-reveal {
    gap: 5px;
  }

  .sidebar.reward-open .reward-close {
    min-height: 20px;
  }

  .sidebar.reward-open .reward-qr {
    gap: 4px;
    padding: 6px;
  }

  .sidebar.reward-open .reward-qr span {
    padding: 4px 6px;
  }

  .sidebar.reward-open .reward-qr img {
    width: min(100%, 92px);
  }
}

body.theme-dark .reward-slot {
  border-color: rgba(154, 188, 205, 0.24);
  color: #b5c6cf;
  background:
    linear-gradient(180deg, rgba(22, 38, 52, 0.98), rgba(13, 26, 36, 0.98)),
    radial-gradient(circle at 16% 0%, rgba(38, 191, 165, 0.12), transparent 34%);
}

body.theme-dark .reward-head h3 {
  color: #f2f8fa;
}

body.theme-dark .reward-head small {
  color: #b5c6cf;
}

body.theme-dark .reward-icon {
  color: #9cf0e3;
  background: rgba(14, 46, 55, 0.92);
  box-shadow: inset 0 0 0 1px rgba(124, 211, 196, 0.28);
}

body.theme-dark .reward-actions button {
  border-color: rgba(154, 188, 205, 0.3);
  color: #e8f2f4;
  background: rgba(8, 18, 26, 0.82);
}

body.theme-dark .reward-actions button.active,
body.theme-dark .reward-actions button:hover {
  color: #06161d;
  background: linear-gradient(135deg, #8ff0df, #9fc5ff);
}

body.theme-dark .reward-qr {
  border-color: rgba(154, 188, 205, 0.24);
  background: rgba(255, 255, 255, 0.06);
}

.reward-close {
  justify-self: end;
  width: auto;
  min-height: 26px;
  border: 0;
  padding: 0 4px;
  color: #0e8977;
  background: transparent;
  box-shadow: none;
  font-size: 12px;
  font-weight: 900;
}

.reward-close:hover,
.reward-close:focus-visible {
  color: #075f54;
  text-decoration: underline;
  text-underline-offset: 4px;
}

body.theme-dark .reward-close {
  color: #8ff0df;
}

body.theme-dark .reward-close:hover,
body.theme-dark .reward-close:focus-visible {
  color: #c4fff4;
}
