:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --line: #e3e8f1;
  --line-strong: #d3dbe8;
  --text: #182235;
  --muted: #69768a;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #eaf1ff;
  --green: #159a68;
  --green-soft: #e7f8f1;
  --amber: #c57b08;
  --amber-soft: #fff4db;
  --red: #dc4b5e;
  --red-soft: #ffedf0;
  --shadow: 0 14px 38px rgba(30, 48, 80, .08);
  --sidebar: 248px;
  font-family: Inter, "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
}

button,
input,
textarea {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 10px 17px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}

button:hover,
.button:hover {
  background: var(--primary-dark);
  box-shadow: 0 8px 20px rgba(37, 99, 235, .19);
}

button:active,
.button:active {
  transform: translateY(1px);
}

button.secondary,
.button.secondary {
  border-color: var(--line-strong);
  background: var(--surface);
  color: #415069;
}

button.secondary:hover,
.button.secondary:hover {
  border-color: #b9c6d9;
  background: #f9fbff;
  box-shadow: none;
}

.primary {
  background: var(--primary);
}

.danger-outline {
  border-color: #efb7bf;
  background: var(--surface);
  color: var(--red);
}

.danger-outline:hover {
  border-color: var(--red);
  background: var(--red-soft);
  box-shadow: none;
}

.small {
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 7px;
  font-size: 12px;
}

.full {
  width: 100%;
}

label {
  display: grid;
  gap: 7px;
  color: #4b5870;
  font-size: 13px;
  font-weight: 650;
}

input,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  outline: none;
  background: #fff;
  color: var(--text);
  padding: 10px 12px;
  font-weight: 450;
  transition: border-color .18s ease, box-shadow .18s ease;
}

textarea {
  min-height: 78px;
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: #83a7f7;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .1);
}

input::placeholder,
textarea::placeholder {
  color: #a1abb9;
}

.muted {
  color: var(--muted);
}

.section-kicker {
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
}

.card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 5px 18px rgba(35, 54, 88, .04);
}

.flash {
  margin: 0 0 16px;
  border: 1px solid #bdd0fa;
  border-radius: 10px;
  background: var(--primary-soft);
  color: #23488f;
  padding: 12px 15px;
  overflow-wrap: anywhere;
}

.flash.success {
  border-color: #b8e7d3;
  background: var(--green-soft);
  color: #166648;
}

.flash.error {
  border-color: #f2c4cb;
  background: var(--red-soft);
  color: #9e3040;
}

.flash.secret {
  border-color: #f0d08e;
  background: var(--amber-soft);
  color: #7c5208;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

/* Public product page */
.landing {
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 84% 19%, rgba(37, 99, 235, .13), transparent 30rem),
    linear-gradient(180deg, #fff 0, #f7f9fd 65%, #fff 100%);
}

.public-nav {
  display: flex;
  width: min(1180px, calc(100% - 40px));
  height: 76px;
  align-items: center;
  justify-content: space-between;
  margin: auto;
  border-bottom: 1px solid rgba(223, 229, 239, .85);
}

.public-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.public-brand span,
.auth-brand .brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 850;
  box-shadow: 0 8px 20px rgba(37, 99, 235, .23);
}

.public-brand strong {
  font-size: 15px;
}

.public-nav > a {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: #46546a;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
}

.hero {
  display: grid;
  width: min(1180px, calc(100% - 40px));
  min-height: 610px;
  grid-template-columns: minmax(0, 1.06fr) minmax(420px, .94fr);
  align-items: center;
  gap: 70px;
  margin: auto;
  padding: 70px 0 90px;
}

.hero-copy h1 {
  margin: 17px 0 7px;
  color: #13213a;
  font-size: clamp(42px, 5.3vw, 70px);
  line-height: 1.08;
  letter-spacing: -.045em;
}

.edition {
  color: var(--primary);
  font-size: clamp(17px, 2vw, 23px);
  font-weight: 750;
}

.tagline {
  max-width: 610px;
  margin: 29px 0 13px;
  color: #34425a;
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 700;
}

.intro {
  max-width: 630px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 13px;
  margin-top: 31px;
}

.status-pill,
.outline-link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 9px;
  border-radius: 9px;
  padding: 10px 15px;
  font-size: 13px;
  font-weight: 700;
}

.status-pill {
  background: var(--green-soft);
  color: #17694c;
}

.status-pill i,
.online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1cb77d;
  box-shadow: 0 0 0 4px rgba(28, 183, 125, .12);
}

.outline-link {
  border: 1px solid var(--line-strong);
  background: #fff;
  color: #44516a;
}

.hero-visual {
  position: relative;
  min-height: 430px;
}

.hero-visual::before {
  position: absolute;
  inset: 20px 15px 0 25px;
  border-radius: 30px;
  background:
    linear-gradient(rgba(37, 99, 235, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, .06) 1px, transparent 1px);
  background-size: 28px 28px;
  content: "";
  transform: rotate(-3deg);
}

.visual-card {
  position: absolute;
  border: 1px solid rgba(206, 217, 234, .95);
  background: rgba(255, 255, 255, .95);
  box-shadow: 0 24px 60px rgba(35, 59, 100, .14);
  backdrop-filter: blur(8px);
}

.main-visual {
  inset: 45px 15px 35px 55px;
  z-index: 2;
  border-radius: 18px;
  padding: 25px;
}

.visual-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}

.visual-header b {
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  padding: 6px 9px;
  font-size: 10px;
  letter-spacing: .08em;
}

.signal-chart {
  display: flex;
  height: 220px;
  align-items: flex-end;
  gap: 12px;
  margin: 27px 0 19px;
  border-bottom: 1px solid var(--line);
  background: repeating-linear-gradient(to top, transparent 0 54px, #eef2f7 55px);
  padding: 0 16px;
}

.signal-chart i {
  flex: 1;
  min-width: 15px;
  border-radius: 5px 5px 0 0;
  background: linear-gradient(180deg, #4f84f4, #2563eb);
  box-shadow: 0 7px 15px rgba(37, 99, 235, .18);
}

.signal-chart i:nth-child(2n) {
  background: linear-gradient(180deg, #46c99a, #169b68);
}

.visual-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.visual-stats span {
  display: grid;
  gap: 4px;
  border-radius: 9px;
  background: var(--surface-soft);
  padding: 12px 14px;
}

.visual-stats small {
  color: var(--muted);
}

.visual-stats strong {
  color: #1d4ed8;
}

.floating {
  z-index: 3;
  border-radius: 10px;
  color: #31415c;
  padding: 11px 14px;
  font-size: 12px;
  font-weight: 700;
}

.floating.one {
  top: 18px;
  right: -22px;
}

.floating.two {
  bottom: 12px;
  left: 7px;
}

.features-section {
  padding: 96px 20px 105px;
  background: #fff;
}

.section-heading {
  width: min(740px, 100%);
  margin: 0 auto 43px;
  text-align: center;
}

.section-heading h2 {
  margin: 10px 0 11px;
  font-size: clamp(29px, 3vw, 39px);
  letter-spacing: -.025em;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
}

.features {
  display: grid;
  width: min(1120px, 100%);
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: auto;
}

.feature-card {
  min-height: 235px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 25px;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.feature-card:hover {
  border-color: #bfd0f4;
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.feature-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 9px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 12px;
  font-weight: 850;
}

.feature-card h3 {
  margin: 26px 0 11px;
  font-size: 18px;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.landing footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  padding: 28px max(20px, calc((100% - 1120px) / 2));
  font-size: 12px;
}

.landing footer strong {
  color: #39475d;
}

/* Authentication */
.auth-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  background:
    radial-gradient(circle at 50% 0, rgba(37, 99, 235, .12), transparent 33rem),
    var(--bg);
  padding: 24px;
}

.login-card {
  width: min(430px, 100%);
  padding: 34px;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 30px;
}

.auth-brand div {
  display: grid;
}

.auth-brand small {
  color: var(--muted);
}

.login-card h1 {
  margin: 0 0 5px;
  font-size: 27px;
}

.login-card > .muted {
  margin: 0 0 24px;
}

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

.back-link {
  display: block;
  margin-top: 20px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

/* Dashboard */
.dashboard-layout {
  height: 100vh;
  min-height: 680px;
  overflow: hidden;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  width: var(--sidebar);
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: #fff;
  padding: 23px 16px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  border-bottom: 1px solid var(--line);
  padding: 0 8px 22px;
}

.sidebar-brand > span {
  display: grid;
  width: 39px;
  height: 39px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 850;
}

.sidebar-brand div,
.sidebar-foot div {
  display: grid;
  min-width: 0;
}

.sidebar-brand strong {
  font-size: 14px;
}

.sidebar-brand small,
.sidebar-foot small {
  color: var(--muted);
  font-size: 11px;
}

.sidebar nav {
  display: grid;
  gap: 6px;
  margin-top: 25px;
}

.sidebar nav a {
  display: flex;
  height: 43px;
  align-items: center;
  gap: 11px;
  border-radius: 9px;
  color: #59677e;
  padding: 0 12px;
  font-weight: 650;
}

.sidebar nav a:hover,
.sidebar nav a.active {
  background: var(--primary-soft);
  color: var(--primary);
}

.sidebar nav i {
  color: #9aa6b8;
  font-size: 10px;
  font-style: normal;
  letter-spacing: .05em;
}

.sidebar nav a.active i {
  color: var(--primary);
}

.sidebar-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  border-radius: 10px;
  background: var(--surface-soft);
  padding: 13px;
}

.sidebar-foot .online-dot {
  flex: 0 0 auto;
}

.sidebar-foot strong {
  font-size: 12px;
}

.dashboard-main {
  height: 100vh;
  margin-left: var(--sidebar);
  overflow: hidden;
  padding: 0 32px;
}

.topbar {
  display: flex;
  min-height: 92px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}

.topbar p {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.topbar h1 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -.02em;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.top-actions form {
  margin: 0;
}

.dashboard-stage {
  height: calc(100vh - 92px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 0 2px 46px;
  scrollbar-gutter: stable;
}

.dashboard-section {
  max-width: 1480px;
  margin: auto;
  padding-top: 30px;
  scroll-margin-top: 20px;
}

.dashboard-panel:not(.is-active) {
  display: none;
}

.dashboard-panel.is-active {
  animation: panel-enter .18s ease-out;
}

@keyframes panel-enter {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
}

.metric-card {
  display: flex;
  min-height: 128px;
  align-items: flex-start;
  gap: 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  padding: 20px;
}

.metric-icon {
  display: grid;
  width: 39px;
  height: 39px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 850;
}

.metric-icon.blue {
  background: var(--primary-soft);
  color: var(--primary);
}

.metric-icon.green {
  background: var(--green-soft);
  color: var(--green);
}

.metric-icon.amber {
  background: var(--amber-soft);
  color: var(--amber);
}

.metric-icon.red {
  background: var(--red-soft);
  color: var(--red);
}

.metric-card div {
  display: grid;
}

.metric-card small {
  color: var(--muted);
  font-size: 12px;
}

.metric-card strong {
  margin: 2px 0 1px;
  font-size: 27px;
  line-height: 1.2;
}

.metric-card em {
  color: #98a3b2;
  font-size: 11px;
  font-style: normal;
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(300px, .86fr) minmax(420px, 1.14fr);
  gap: 15px;
  margin-top: 15px;
}

.overview-grid > .card,
.settings-grid > .card,
.dashboard-section > .card {
  padding: 23px;
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.card-head h2,
.card-head h3 {
  margin: 4px 0 0;
  font-size: 18px;
}

.card-head h3 {
  margin-top: 0;
}

.card-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.status-badge {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.status-badge.good {
  background: var(--green-soft);
  color: var(--green);
}

.status-badge.warn {
  background: var(--amber-soft);
  color: var(--amber);
}

.status-badge.off {
  background: var(--red-soft);
  color: var(--red);
}

.service-summary dl {
  display: grid;
  gap: 0;
  margin: 0;
}

.service-summary dl div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid #edf0f5;
  padding: 11px 0;
}

.service-summary dt {
  color: var(--muted);
  font-size: 12px;
}

.service-summary dd {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}

.compact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}

.compact-form button {
  align-self: end;
}

.primary-panel-link {
  width: 100%;
  margin-top: 18px;
}

.section-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin: 0 0 16px;
}

.section-title h2 {
  margin: 5px 0 2px;
  font-size: 23px;
}

.section-title p {
  margin: 0;
  color: var(--muted);
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(330px, .8fr);
  gap: 15px;
}

.license-create-grid {
  display: grid;
  grid-template-columns: minmax(360px, .8fr) minmax(520px, 1.2fr);
  gap: 15px;
  margin-bottom: 15px;
}

.license-create-grid > .card {
  padding: 22px;
}

.license-create-grid textarea {
  min-height: 138px;
  resize: vertical;
}

.batch-submit-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.batch-submit-row span {
  color: var(--muted);
  font-size: 12px;
}

.quota-summary {
  display: grid;
  min-width: 176px;
  justify-items: end;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  padding: 10px 14px;
}

.quota-summary span,
.quota-summary em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.quota-summary strong {
  color: var(--primary);
  font-size: 17px;
}

.batch-result-card {
  margin-bottom: 15px;
  border-color: #bfd2ff;
  background: #f9fbff;
}

.batch-result-text {
  width: 100%;
  min-height: 150px;
  border-color: #cbd9f7;
  background: #fff;
  color: #243652;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  line-height: 1.7;
  resize: vertical;
}

.batch-result-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
}

.batch-result-actions span {
  color: var(--muted);
  font-size: 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

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

.switch-row {
  display: flex;
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-soft);
  padding: 12px 14px;
  cursor: pointer;
}

.switch-row span {
  display: grid;
}

.switch-row strong {
  color: #3e4b61;
  font-size: 13px;
}

.switch-row small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 450;
}

.switch-row input[type="checkbox"] {
  position: relative;
  width: 38px;
  min-width: 38px;
  height: 21px;
  min-height: 21px;
  appearance: none;
  border: 0;
  border-radius: 99px;
  background: #cbd3df;
  padding: 0;
  cursor: pointer;
}

.switch-row input[type="checkbox"]::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .17);
  content: "";
  transition: transform .16s ease;
}

.switch-row input[type="checkbox"]:checked {
  background: var(--primary);
}

.switch-row input[type="checkbox"]:checked::after {
  transform: translateX(17px);
}

.key-display {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  padding: 16px;
}

.key-display span {
  color: var(--muted);
  font-size: 12px;
}

.key-display strong {
  color: var(--primary);
}

.key-display code {
  min-width: 0;
  overflow: hidden;
  color: #8994a4;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notice {
  margin: 14px 0;
  border-left: 3px solid #e7b74f;
  background: var(--amber-soft);
  color: #77561d;
  padding: 11px 13px;
  font-size: 12px;
}

.rotate-form {
  display: grid;
  gap: 12px;
}

.table-card {
  padding: 0 !important;
}

.table-wrap {
  width: 100%;
  overflow: auto;
}

table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid #edf0f5;
  padding: 14px 15px;
  text-align: left;
  vertical-align: middle;
  font-size: 12px;
}

th {
  background: #fafbfd;
  color: #778398;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

td {
  color: #445168;
}

tbody tr:last-child td {
  border-bottom: 0;
}

td strong,
td small {
  display: block;
}

td small {
  margin-top: 2px;
  color: #929dac;
}

td code {
  color: #3f5473;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.row-actions {
  position: relative;
}

.row-actions > summary {
  width: max-content;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
  color: #445168;
  padding: 6px 11px;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}

.row-actions > summary::-webkit-details-marker {
  display: none;
}

.action-popover {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  z-index: 15;
  width: 310px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 20px 45px rgba(35, 52, 82, .16);
  padding: 16px;
}

.action-popover > form:first-child {
  display: grid;
  gap: 10px;
}

.inline-actions {
  display: flex;
  gap: 8px;
  margin: 12px 0;
}

.delete-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.delete-form input {
  min-height: 34px;
  padding: 7px 9px;
}

.empty-state {
  padding: 35px;
  color: var(--muted);
  text-align: center;
}

.permission-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 18px 0 4px;
  padding: 14px 18px;
  border: 1px solid #c8d8ff;
  border-radius: 12px;
  background: #f3f7ff;
  color: #365078;
}

.permission-banner strong {
  color: #184eab;
}

.permission-banner span {
  flex: 1;
  min-width: 280px;
  font-size: 13px;
}

.permission-banner em {
  border-radius: 999px;
  background: #e3edff;
  padding: 6px 10px;
  color: #245db7;
  font-size: 12px;
  font-style: normal;
}

.permission-list {
  display: grid;
  gap: 0;
  margin: 0;
}

.permission-list div {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.permission-list div:last-child {
  border-bottom: 0;
}

.permission-list dt {
  color: var(--text);
  font-weight: 700;
}

.permission-list dd {
  margin: 0;
  color: var(--muted);
}

.agent-table-card {
  margin-top: 18px;
}

.narrow-card {
  max-width: 680px;
}

@media (max-width: 1120px) {
  .features {
    grid-template-columns: repeat(2, 1fr);
  }

  .metric-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .overview-grid,
  .settings-grid,
  .license-create-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  :root {
    --sidebar: 82px;
  }

  .sidebar {
    padding-inline: 12px;
  }

  .sidebar-brand {
    justify-content: center;
    padding-inline: 0;
  }

  .sidebar-brand div,
  .sidebar nav a:not(.active)::after,
  .sidebar nav a {
    font-size: 0;
  }

  .sidebar nav a {
    justify-content: center;
  }

  .sidebar nav i {
    font-size: 10px;
  }

  .sidebar-foot {
    justify-content: center;
  }

  .sidebar-foot div {
    display: none;
  }

  .dashboard-main {
    padding-inline: 22px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 20px;
    padding-top: 60px;
  }

  .hero-copy {
    text-align: center;
  }

  .intro,
  .tagline {
    margin-inline: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-visual {
    width: min(580px, 100%);
    margin: auto;
  }
}

@media (max-width: 660px) {
  :root {
    --sidebar: 0px;
  }

  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    padding: 14px 16px 0;
  }

  .dashboard-layout {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .sidebar-brand {
    justify-content: flex-start;
    border: 0;
    padding: 0;
  }

  .sidebar-brand div {
    display: grid;
  }

  .sidebar nav {
    display: flex;
    gap: 5px;
    overflow: auto;
    margin: 13px -4px 0;
    padding: 0 4px 11px;
  }

  .sidebar nav a,
  .sidebar nav a:not(.active)::after {
    min-width: max-content;
    height: 36px;
    font-size: 12px;
  }

  .sidebar nav i {
    display: none;
  }

  .sidebar-foot {
    display: none;
  }

  .dashboard-main {
    height: auto;
    margin-left: 0;
    overflow: visible;
    padding: 0 15px 45px;
  }

  .dashboard-stage {
    height: auto;
    overflow: visible;
    padding-bottom: 0;
  }

  .topbar {
    min-height: 78px;
  }

  .topbar h1 {
    font-size: 20px;
  }

  .top-actions .button {
    display: none;
  }

  .metric-grid,
  .form-grid,
  .compact-form,
  .features {
    grid-template-columns: 1fr;
  }

  .metric-card {
    min-height: 104px;
  }

  .form-grid .wide {
    grid-column: auto;
  }

  .section-title,
  .batch-result-actions,
  .batch-submit-row {
    align-items: stretch;
    flex-direction: column;
  }

  .quota-summary {
    width: 100%;
    margin-top: 12px;
    justify-items: start;
  }

  .overview-grid > .card,
  .settings-grid > .card,
  .dashboard-section > .card {
    padding: 18px;
  }

  .public-nav {
    width: calc(100% - 28px);
  }

  .public-brand strong {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .hero {
    width: calc(100% - 28px);
    min-height: auto;
    padding: 60px 0;
  }

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

  .hero-visual {
    min-height: 350px;
  }

  .main-visual {
    inset: 35px 0 25px;
    padding: 19px;
  }

  .signal-chart {
    height: 170px;
    gap: 7px;
    padding-inline: 6px;
  }

  .floating.one {
    right: -5px;
  }

  .landing footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .login-card {
    padding: 25px;
  }
}
