:root {
  color-scheme: light;
  --ink: #17211b;
  --muted: #68736d;
  --line: #dfe6e1;
  --soft-line: #edf1ee;
  --canvas: #f3f6f4;
  --panel: #ffffff;
  --forest: #0b5b3f;
  --forest-dark: #073e2c;
  --mint: #dff4e8;
  --mint-soft: #f1faf5;
  --lime: #b9e36b;
  --warning: #a35c00;
  --warning-bg: #fff6e4;
  --danger: #ad322d;
  --danger-bg: #fff0ee;
  --shadow: 0 16px 42px rgba(26, 52, 38, 0.08);
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--canvas);
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 74% 0, rgba(185, 227, 107, 0.11), transparent 26rem),
    var(--canvas);
  font-family:
    Inter, "SF Pro Display", "Segoe UI", "PingFang SC", "Microsoft YaHei",
    sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

button,
select,
input[type="checkbox"],
label[for] {
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgba(42, 141, 98, 0.25);
  outline-offset: 2px;
}

code,
.mono {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 50%;
  z-index: 2000;
  min-height: 44px;
  padding: 11px 18px;
  border-radius: 10px;
  color: #fff;
  background: var(--forest-dark);
  font-weight: 700;
  text-decoration: none;
  transform: translate(-50%, -160%);
  transition: transform 160ms ease;
}

.skip-link:focus-visible {
  transform: translate(-50%, 0);
}

.main-content:focus {
  outline: none;
}

[hidden] {
  display: none !important;
}

.auth-gate {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 42px;
  background:
    radial-gradient(circle at 14% 18%, rgba(185, 227, 107, 0.2), transparent 25rem),
    radial-gradient(circle at 86% 82%, rgba(42, 141, 98, 0.16), transparent 28rem),
    #062f23;
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(360px, 0.92fr) minmax(440px, 1.08fr);
  width: min(1040px, 100%);
  min-height: 620px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 30px 90px rgba(0, 18, 12, 0.35);
}

.auth-intro {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 42px;
  color: #f5fff8;
  background:
    linear-gradient(148deg, rgba(185, 227, 107, 0.13), transparent 44%),
    linear-gradient(160deg, #0b5b3f, #073e2c 78%);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 13px;
}

.auth-brand__mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 13px;
  color: #073e2c;
  background: var(--lime);
  font-size: 20px;
  font-weight: 850;
  box-shadow: 0 9px 28px rgba(0, 0, 0, 0.14);
}

.auth-brand > span:last-child {
  display: grid;
}

.auth-brand strong {
  font-size: 17px;
  letter-spacing: -0.02em;
}

.auth-brand small {
  color: rgba(245, 255, 248, 0.58);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.auth-intro__body {
  margin: auto 0;
  padding: 58px 0 48px;
}

.auth-intro__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid rgba(185, 227, 107, 0.26);
  border-radius: 999px;
  color: #dff5e6;
  background: rgba(4, 37, 27, 0.28);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.04em;
}

.auth-intro__badge i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 4px rgba(185, 227, 107, 0.12);
}

.auth-intro h1 {
  margin: 25px 0 17px;
  color: #fff;
  font-size: clamp(30px, 3.2vw, 44px);
  line-height: 1.18;
  letter-spacing: -0.045em;
}

.auth-intro__body p {
  max-width: 390px;
  margin: 0;
  color: rgba(245, 255, 248, 0.67);
  font-size: 13px;
  line-height: 1.9;
}

.auth-assurances {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 19px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.11);
  list-style: none;
  color: rgba(245, 255, 248, 0.72);
  font-size: 11px;
}

.auth-assurances li {
  display: flex;
  align-items: center;
  gap: 9px;
}

.auth-assurances li span {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 50%;
  color: var(--lime);
  background: rgba(185, 227, 107, 0.1);
  font-size: 10px;
  font-weight: 800;
}

.auth-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 56px clamp(38px, 5vw, 68px) 34px;
  background:
    radial-gradient(circle at 100% 0, rgba(185, 227, 107, 0.1), transparent 19rem),
    #fff;
}

.auth-card__heading {
  margin-bottom: 28px;
}

.auth-card__heading h2,
.auth-unavailable h2 {
  margin: 4px 0 8px;
  color: #102018;
  font-size: clamp(25px, 2.8vw, 34px);
  line-height: 1.2;
  letter-spacing: -0.04em;
}

.auth-card__heading p,
.auth-unavailable p,
.auth-checking p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.auth-form {
  width: 100%;
}

.auth-field {
  display: grid;
  gap: 7px;
  margin-bottom: 18px;
}

.auth-field > span {
  color: #263c30;
  font-size: 11px;
  font-weight: 750;
}

.auth-field input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid #cedbd3;
  border-radius: 11px;
  background: #fbfdfc;
  font-size: 13px;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.auth-field input:hover {
  border-color: #a9c3b4;
}

.auth-field input:focus {
  border-color: #3c9a70;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(42, 141, 98, 0.1);
  outline: 0;
}

.auth-field small {
  color: #7c8982;
  font-size: 10px;
}

.auth-submit {
  justify-content: space-between;
  width: 100%;
  height: 49px;
  margin-top: 8px;
  padding-inline: 18px;
}

.auth-error {
  margin: -9px 0 21px;
  padding: 11px 13px;
  border: 1px solid #f0c4bf;
  border-radius: 9px;
  color: #912b27;
  background: var(--danger-bg);
  font-size: 11px;
  line-height: 1.55;
}

.auth-checking {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfdfc;
}

.auth-checking strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
}

.auth-spinner {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border: 3px solid #dbe9e0;
  border-top-color: #16855a;
  border-radius: 50%;
  animation: auth-spin 700ms linear infinite;
}

@keyframes auth-spin {
  to { transform: rotate(360deg); }
}

.auth-unavailable {
  text-align: center;
}

.auth-unavailable > span:first-child {
  display: grid;
  width: 50px;
  height: 50px;
  margin: 0 auto 18px;
  place-items: center;
  border-radius: 50%;
  color: var(--danger);
  background: var(--danger-bg);
  font-size: 22px;
  font-weight: 800;
}

.auth-unavailable .secondary-button {
  margin-top: 22px;
}

.auth-card__footnote {
  margin: auto 0 0;
  padding-top: 30px;
  color: #849089;
  font-size: 10px;
  text-align: center;
}

.app-shell {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 25px 18px 20px;
  overflow-y: auto;
  color: #f8fff9;
  background:
    linear-gradient(155deg, rgba(185, 227, 107, 0.08), transparent 30%),
    var(--forest-dark);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px;
  color: inherit;
  text-decoration: none;
}

.brand__mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 13px;
  color: var(--forest-dark);
  background: var(--lime);
  font-size: 20px;
  font-weight: 850;
  box-shadow: 0 7px 20px rgba(0, 0, 0, 0.16);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 17px;
  letter-spacing: 0.02em;
}

.brand small {
  margin-top: 1px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 11px;
  letter-spacing: 0.12em;
}

.internal-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 24px 8px 12px;
  padding: 8px 10px;
  border: 1px solid rgba(185, 227, 107, 0.2);
  border-radius: 8px;
  color: #dff5cb;
  background: rgba(185, 227, 107, 0.08);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.04em;
}

.status-dot {
  display: inline-block;
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #72d48d;
  box-shadow: 0 0 0 4px rgba(114, 212, 141, 0.12);
}

.status-dot--muted {
  background: #84948b;
  box-shadow: none;
}

.status-dot--danger {
  background: #fc8b82;
  box-shadow: 0 0 0 4px rgba(252, 139, 130, 0.11);
}

.main-nav {
  display: grid;
  gap: 5px;
  margin-top: 13px;
}

.nav-item {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: rgba(255, 255, 255, 0.68);
  background: transparent;
  text-align: left;
  transition: 160ms ease;
}

.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.nav-item.is-active {
  border-color: rgba(185, 227, 107, 0.12);
  color: #fff;
  background: rgba(185, 227, 107, 0.12);
  box-shadow: inset 3px 0 var(--lime);
}

.nav-item__icon {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 8px;
  color: #cae8d6;
  background: rgba(255, 255, 255, 0.07);
  font-size: 18px;
}

.nav-item.is-active .nav-item__icon {
  color: var(--forest-dark);
  background: var(--lime);
}

.nav-item strong,
.nav-item small {
  display: block;
}

.nav-item strong {
  font-size: 13px;
  font-weight: 670;
}

.nav-item small {
  margin-top: 1px;
  color: inherit;
  opacity: 0.62;
  font-size: 10px;
}

.sidebar-status {
  margin-top: auto;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.04);
}

.sidebar-status__header,
.status-line {
  display: flex;
  align-items: center;
}

.sidebar-status__header {
  justify-content: space-between;
  margin-bottom: 12px;
}

.sidebar-status h2 {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
}

.icon-button {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 0;
  border-radius: 7px;
  color: #d7e8dd;
  background: rgba(255, 255, 255, 0.07);
}

.status-line {
  gap: 8px;
  margin-top: 9px;
  color: rgba(255, 255, 255, 0.69);
  font-size: 11px;
}

.status-line strong {
  margin-left: auto;
  color: #f4fbf6;
  font-size: 10px;
  font-weight: 650;
}

.sidebar-status p {
  margin: 13px 0 0;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.43);
  font-size: 10px;
  line-height: 1.65;
}

.main-content {
  min-width: 0;
  padding: 0 42px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 119px;
  padding: 23px 0 22px;
  border-bottom: 1px solid var(--line);
}

.eyebrow,
.section-kicker {
  margin: 0 0 4px;
  color: #33795b;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.topbar h1 {
  margin: 0;
  font-size: clamp(23px, 2vw, 30px);
  font-weight: 760;
  letter-spacing: -0.035em;
}

.topbar h1 + p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.topbar__actions {
  display: flex;
  align-items: flex-end;
  gap: 13px;
}

.operator-identity {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 158px;
  height: 42px;
  padding: 5px 11px 5px 6px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
}

.nav-count {
  position: absolute;
  top: 8px;
  right: 9px;
  min-width: 19px;
  padding: 2px 6px;
  border-radius: 999px;
  color: #183725;
  background: var(--lime);
  text-align: center;
  font-size: 10px;
  line-height: 15px;
}

.operator-identity__avatar {
  display: grid;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  color: var(--forest);
  background: var(--mint);
  font-size: 11px;
  font-weight: 800;
}

.operator-identity > span:last-child {
  display: grid;
  min-width: 0;
}

.operator-identity small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.2;
}

.operator-identity strong {
  max-width: 145px;
  overflow: hidden;
  font-size: 11px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logout-button {
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: #4f5f56;
  background: #fff;
  font-size: 11px;
  font-weight: 700;
}

.logout-button:hover {
  border-color: #bccbc2;
  color: var(--forest);
  background: #f8fbf9;
}

.health-pill,
.security-chip,
.verified-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.health-pill {
  height: 38px;
  padding: 0 12px;
  border: 1px solid #b8dec7;
  border-radius: 999px;
  color: var(--forest);
  background: var(--mint-soft);
  font-size: 11px;
  font-weight: 700;
}

.health-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2fa666;
}

.health-pill--checking {
  border-color: var(--line);
  color: var(--muted);
  background: #fff;
}

.health-pill--checking i {
  background: #a3ada7;
}

.health-pill--error {
  border-color: #f0c5c1;
  color: var(--danger);
  background: var(--danger-bg);
}

.health-pill--error i {
  background: #d95c53;
}

.notice-region {
  position: fixed;
  z-index: 80;
  top: 20px;
  right: 22px;
  display: grid;
  gap: 8px;
  width: min(390px, calc(100vw - 44px));
  pointer-events: none;
}

.notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #bddfc9;
  border-radius: 11px;
  color: #154a33;
  background: rgba(244, 253, 247, 0.98);
  box-shadow: 0 10px 32px rgba(24, 54, 38, 0.13);
  pointer-events: auto;
  animation: notice-in 180ms ease-out;
}

.notice--error {
  border-color: #efc1bd;
  color: #772a25;
  background: rgba(255, 245, 244, 0.98);
}

.notice > span:first-child {
  display: grid;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #319965;
  font-size: 11px;
  font-weight: 800;
}

.notice--error > span:first-child {
  background: #d2534c;
}

.notice p {
  margin: 0;
  font-size: 12px;
}

@keyframes notice-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}

.view {
  min-height: calc(100vh - 190px);
  padding: 31px 0 48px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 19px;
}

.section-heading h2 {
  margin: 0;
  font-size: 21px;
  font-weight: 740;
  letter-spacing: -0.02em;
}

.section-heading h2 + p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.security-chip,
.verified-chip {
  padding: 6px 9px;
  border: 1px solid #cce4d5;
  border-radius: 999px;
  color: #387154;
  background: var(--mint-soft);
  font-size: 10px;
  font-weight: 700;
}

.security-chip::before,
.verified-chip::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #4ead72;
}

.license-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  align-items: start;
  gap: 18px;
}

.form-stack {
  display: grid;
  gap: 14px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 3px 13px rgba(31, 58, 43, 0.025);
}

.form-stack .panel,
.offline-form .panel {
  padding: 21px 23px 23px;
}

.panel__header {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.panel__header--between {
  align-items: center;
  justify-content: space-between;
}

.panel__header h3,
.request-panel h3,
.download-card h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 720;
}

.panel__header h3 + p,
.request-panel h3 + p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.step-number,
.verified-mark {
  display: grid;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 8px;
  color: var(--forest);
  background: var(--mint);
  font-size: 11px;
  font-weight: 800;
}

.verified-mark {
  border-radius: 50%;
  color: #fff;
  background: #2e9a60;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
  margin-top: 19px;
}

.field-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field--full {
  grid-column: 1 / -1;
}

.field {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
}

.field > span,
.feature-picker legend {
  color: #414c46;
  font-size: 11px;
  font-weight: 690;
}

.field > span b {
  color: var(--danger);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid #d7ded9;
  border-radius: 9px;
  color: var(--ink);
  background: #fbfcfb;
  transition: 120ms ease;
}

.field input,
.field select {
  height: 40px;
  padding: 0 11px;
}

.field textarea {
  resize: vertical;
  min-height: 78px;
  padding: 10px 11px;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: #b8c5bd;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: #5ba37d;
  background: #fff;
}

.field small {
  color: #8a948e;
  font-size: 9px;
}

.field--spaced {
  margin-top: 18px;
}

.feature-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin: 18px 0 0;
  padding: 0;
  border: 0;
}

.feature-picker legend:not(.sr-only) {
  grid-column: 1 / -1;
  margin-bottom: 1px;
}

.feature-picker label {
  position: relative;
}

.feature-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.feature-picker span {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid #dfe5e1;
  border-radius: 9px;
  color: #647069;
  background: #fbfcfb;
  font-size: 11px;
  font-weight: 620;
  transition: 120ms ease;
}

.feature-picker span::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 8px;
  border: 1px solid #bdc8c1;
  border-radius: 4px;
  background: #fff;
}

.feature-picker input:checked + span {
  border-color: #acd5bc;
  color: var(--forest);
  background: var(--mint-soft);
}

.feature-picker input:checked + span::before {
  content: "✓";
  display: inline-grid;
  place-items: center;
  border-color: var(--forest);
  color: #fff;
  background: var(--forest);
  font-size: 9px;
}

.feature-picker input:focus-visible + span {
  outline: 3px solid rgba(42, 141, 98, 0.25);
}

.feature-picker--spaced {
  margin-top: 21px;
}

.summary-card {
  position: sticky;
  top: 18px;
  padding: 24px;
  overflow: hidden;
  contain: paint;
  border: 1px solid #bddfc9;
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(185, 227, 107, 0.14), transparent 42%),
    #f7fcf9;
  box-shadow: var(--shadow);
}

.summary-card::after {
  content: "";
  position: absolute;
  top: -58px;
  right: -58px;
  width: 140px;
  height: 140px;
  border: 1px solid rgba(43, 119, 80, 0.08);
  border-radius: 50%;
}

.summary-card__icon {
  display: grid;
  width: 38px;
  height: 38px;
  margin-bottom: 19px;
  place-items: center;
  border-radius: 10px;
  color: #eaffef;
  background: var(--forest);
  font-size: 21px;
}

.summary-card h3 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.summary-card dl {
  margin: 20px 0 0;
  border-top: 1px solid #dce9e0;
}

.summary-card dl div {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid #e2ece5;
}

.summary-card dt {
  color: var(--muted);
  font-size: 10px;
}

.summary-card dd {
  overflow-wrap: anywhere;
  margin: 0;
  color: #263b2f;
  font-size: 10px;
  font-weight: 650;
  text-align: right;
}

.summary-warning {
  display: grid;
  gap: 2px;
  margin: 17px 0;
  padding: 11px;
  border-radius: 9px;
  color: #6f532c;
  background: var(--warning-bg);
  font-size: 10px;
}

.summary-warning strong {
  font-size: 11px;
}

.primary-button,
.secondary-button,
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 39px;
  padding: 0 15px;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 720;
  transition: 140ms ease;
}

.primary-button {
  border: 1px solid var(--forest);
  color: #fff;
  background: var(--forest);
  box-shadow: 0 7px 17px rgba(11, 91, 63, 0.16);
}

.primary-button:hover:not(:disabled) {
  background: var(--forest-dark);
  transform: translateY(-1px);
}

.primary-button--wide {
  width: 100%;
}

.secondary-button {
  border: 1px solid #d3dcd6;
  color: #435149;
  background: #fff;
}

.secondary-button:hover:not(:disabled) {
  border-color: #aebdb4;
  background: #f8faf8;
}

.danger-button {
  border: 1px solid var(--danger);
  color: #fff;
  background: var(--danger);
}

.danger-button:hover:not(:disabled) {
  background: #8f2925;
}

.button-loading {
  pointer-events: none;
  opacity: 0.72;
}

.button-loading i {
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.offline-steps {
  display: grid;
  grid-template-columns: auto minmax(32px, 1fr) auto minmax(32px, 1fr) auto;
  align-items: center;
  max-width: 670px;
  margin: 0 auto 22px;
}

.offline-steps span {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #939c96;
  font-size: 10px;
  font-weight: 700;
}

.offline-steps span b {
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border: 1px solid #d2dad5;
  border-radius: 50%;
  background: #fff;
  font-size: 9px;
}

.offline-steps span.is-active {
  color: var(--forest);
}

.offline-steps span.is-active b {
  border-color: var(--forest);
  color: #fff;
  background: var(--forest);
}

.offline-steps > i {
  height: 1px;
  margin: 0 10px;
  background: #d8dfda;
}

.request-panel {
  display: grid;
  grid-template-columns: minmax(230px, 0.65fr) minmax(340px, 1fr);
  align-items: center;
  gap: 30px;
  padding: 24px;
}

.drop-zone {
  display: grid;
  min-height: 130px;
  place-items: center;
  align-content: center;
  padding: 18px;
  border: 1px dashed #98b2a2;
  border-radius: 12px;
  color: #42584c;
  background: #f8fbf9;
  text-align: center;
  transition: 140ms ease;
}

.drop-zone:hover,
.drop-zone:focus-within,
.drop-zone.is-dragging {
  border-color: #3b9567;
  background: var(--mint-soft);
}

.drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.drop-zone__icon {
  display: grid;
  width: 35px;
  height: 35px;
  margin-bottom: 7px;
  place-items: center;
  border-radius: 9px;
  color: var(--forest);
  background: var(--mint);
  font-size: 18px;
}

.drop-zone strong {
  font-size: 12px;
}

.drop-zone small {
  margin-top: 3px;
  color: #8a948e;
  font-size: 9px;
}

.inspection-panel {
  margin-top: 14px;
  padding: 21px 23px;
}

.inspection-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 18px 0 0;
  border-top: 1px solid var(--soft-line);
}

.inspection-grid div {
  min-width: 0;
  padding: 12px 14px 9px 0;
  border-bottom: 1px solid var(--soft-line);
}

.inspection-grid__full {
  grid-column: span 2;
}

.inspection-grid dt {
  color: var(--muted);
  font-size: 9px;
}

.inspection-grid dd {
  overflow-wrap: anywhere;
  margin: 4px 0 0;
  font-size: 10px;
  font-weight: 650;
}

.offline-form {
  margin-top: 14px;
}

.exact-time-callout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding: 13px 15px;
  border: 1px solid #dce8df;
  border-radius: 10px;
  background: #f8fbf9;
}

.exact-time-callout div {
  display: grid;
  gap: 2px;
}

.exact-time-callout div:nth-of-type(2) {
  text-align: center;
}

.exact-time-callout div:last-child {
  text-align: right;
}

.exact-time-callout span {
  color: #809087;
  font-size: 9px;
}

.exact-time-callout strong {
  font-size: 10px;
  font-weight: 650;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 19px;
  padding-top: 17px;
  border-top: 1px solid var(--soft-line);
}

.form-actions > span {
  color: var(--muted);
  font-size: 10px;
}

.form-actions > span strong {
  display: block;
  color: var(--warning);
}

.download-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
  margin-top: 14px;
  padding: 20px 23px;
  border-color: #a9d7ba;
  background: #f5fcf8;
}

.download-card__mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #2f9c61;
  font-weight: 800;
}

.download-card p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.download-card code {
  overflow-wrap: anywhere;
}

.download-card__actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.delivery-guidance {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 14px;
  padding: 14px 17px;
  border: 1px solid #cce5d5;
  border-radius: 12px;
  color: #26583b;
  background: #f4fbf6;
}

.delivery-guidance > span {
  font-size: 23px;
}

.delivery-guidance strong,
.delivery-guidance p {
  display: block;
  margin: 0;
}

.delivery-guidance p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.delivery-panel {
  padding: 0;
  overflow: hidden;
}

.delivery-list {
  display: grid;
}

.delivery-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 17px 19px;
  border-bottom: 1px solid var(--soft-line);
}

.delivery-item:last-child {
  border-bottom: 0;
}

.delivery-item__icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  color: #197347;
  background: #e8f7ee;
  font-size: 19px;
}

.delivery-item h3,
.delivery-item p {
  margin: 0;
}

.delivery-item h3 {
  font-size: 14px;
}

.delivery-item p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.delivery-item__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.table-panel {
  overflow: hidden;
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 15px 17px;
  border-bottom: 1px solid var(--soft-line);
}

.search-box {
  display: grid;
  grid-template-columns: auto minmax(180px, 340px) auto;
  align-items: center;
  overflow: hidden;
  border: 1px solid #d5ded8;
  border-radius: 9px;
  background: #fff;
}

.search-box > span {
  padding-left: 11px;
  color: #7b8880;
  font-size: 17px;
}

.search-box input {
  height: 38px;
  padding: 0 9px;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 11px;
}

.search-box button {
  align-self: stretch;
  padding: 0 13px;
  border: 0;
  border-left: 1px solid var(--soft-line);
  color: var(--forest);
  background: var(--mint-soft);
  font-size: 10px;
  font-weight: 700;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}

th,
td {
  padding: 12px 15px;
  border-bottom: 1px solid var(--soft-line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: #77837c;
  background: #fafbfa;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.04em;
}

td {
  color: #3e4943;
  font-size: 10px;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover td {
  background: #fbfdfb;
}

.align-right {
  text-align: right;
}

.cell-title {
  display: block;
  color: var(--ink);
  font-size: 11px;
  font-weight: 680;
}

.cell-subtitle {
  display: block;
  max-width: 210px;
  overflow: hidden;
  margin-top: 1px;
  color: #8b958f;
  font-size: 9px;
  text-overflow: ellipsis;
}

.status-badge,
.type-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
}

.status-badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.status-badge--active {
  color: #19764a;
  background: #eaf8ef;
}

.status-badge--revoked,
.status-badge--expired {
  color: #a63b35;
  background: #fff0ef;
}

.status-badge--pending,
.status-badge--expiring {
  color: #98600b;
  background: #fff6e3;
}

/* 2026 base clarity layer: Chinese-first, task-oriented operations console. */
body {
  font-family:
    "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Segoe UI",
    sans-serif;
  font-size: 15px;
  line-height: 1.55;
}

small {
  font-size: 13px;
}

.eyebrow,
.section-kicker {
  display: none !important;
}

.app-shell {
  grid-template-columns: 252px minmax(0, 1fr);
}

.sidebar {
  padding: 22px 16px 18px;
}

.brand strong {
  font-size: 18px;
}

.brand small {
  margin-top: 2px;
  font-size: 12px;
  letter-spacing: 0.04em;
}

.internal-badge {
  margin: 20px 7px 8px;
  font-size: 12px;
  letter-spacing: 0;
}

.main-nav {
  gap: 3px;
  margin-top: 8px;
}

.nav-divider {
  margin: 12px 10px 5px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: none;
}

.nav-item {
  grid-template-columns: 36px minmax(0, 1fr);
  min-height: 46px;
  padding: 7px 11px;
}

.nav-item strong {
  font-size: 14px;
  font-weight: 700;
}

.nav-item small {
  display: none;
}

.nav-item__icon {
  width: 32px;
  height: 32px;
  font-size: 17px;
}

.sidebar-status {
  padding: 14px;
}

.sidebar-status h2,
.status-line,
.status-line strong {
  font-size: 12px;
}

.sidebar-status p {
  font-size: 12px;
  line-height: 1.55;
}

.main-content {
  padding-inline: clamp(24px, 3vw, 48px);
}

.topbar {
  min-height: 108px;
  padding-block: 22px;
}

.topbar h1 {
  font-size: clamp(27px, 2.2vw, 34px);
  font-weight: 760;
}

.topbar h1 + p {
  margin-top: 5px;
  font-size: 15px;
  line-height: 1.5;
}

.operator-identity {
  min-width: 172px;
  height: 46px;
}

.operator-identity small {
  font-size: 12px;
}

.operator-identity strong {
  font-size: 13px;
}

.logout-button,
.health-pill {
  min-height: 42px;
  font-size: 13px;
}

.view {
  min-height: calc(100vh - 176px);
  padding: 28px 0 52px;
}

.section-heading {
  align-items: center;
  margin-bottom: 18px;
}

.section-heading h2 {
  font-size: 21px;
  font-weight: 750;
}

.section-heading h2 + p {
  font-size: 14px;
}

.primary-button,
.secondary-button,
.danger-button {
  min-height: 44px;
  padding-inline: 17px;
  font-size: 14px;
}

.text-button {
  min-height: 40px;
  padding: 0 8px;
  font-size: 13px;
}

.panel__header h3,
.request-panel h3,
.download-card h3 {
  font-size: 17px;
}

.panel__header h3 + p,
.request-panel h3 + p {
  font-size: 13px;
  line-height: 1.55;
}

.step-number,
.verified-mark {
  width: 32px;
  height: 32px;
  font-size: 13px;
}

.field > span,
.feature-picker legend,
.auth-field > span {
  font-size: 14px;
}

.field input,
.field select,
.auth-field input {
  min-height: 44px;
  font-size: 14px;
}

.field textarea {
  min-height: 92px;
  font-size: 14px;
}

.field small,
.auth-field small {
  font-size: 13px;
  line-height: 1.45;
}

.feature-picker span {
  min-height: 44px;
  font-size: 14px;
}

.summary-card h3 {
  font-size: 19px;
}

.summary-card dt,
.summary-card dd,
.summary-warning,
.summary-warning strong {
  font-size: 13px;
}

.security-chip,
.verified-chip {
  font-size: 12px;
}

.search-box input,
.search-box button,
.template-filter-form select {
  min-height: 42px;
  font-size: 14px;
}

.table-toolbar {
  min-height: 68px;
  padding: 12px 16px;
}

th,
td {
  padding: 14px 15px;
}

th {
  font-size: 13px;
  letter-spacing: 0;
}

td,
.cell-title {
  font-size: 14px;
}

.cell-subtitle {
  margin-top: 3px;
  font-size: 13px;
  line-height: 1.45;
}

.status-badge,
.type-badge {
  padding: 5px 9px;
  font-size: 12px;
}

.row-actions {
  gap: 7px;
}

.row-button {
  min-height: 36px;
  padding: 7px 10px;
  font-size: 13px;
}

.toolbar-result-count,
.catalog-scope {
  font-size: 13px;
}

.control-ledger article {
  min-height: 140px;
}

.control-ledger small {
  font-size: 13px;
  letter-spacing: 0;
}

.control-ledger strong {
  font-size: 38px;
}

.control-ledger span {
  font-size: 13px;
}

.ops-list-row {
  min-height: 76px;
}

.ops-list-row strong {
  font-size: 14px;
}

.ops-list-row small,
.ops-list-row__signal span {
  font-size: 12px;
  line-height: 1.45;
}

.ops-list-row__signal b {
  font-size: 16px;
}

.template-release-flow li {
  min-height: 62px;
}

.template-release-flow li > span {
  font-size: 13px;
}

.template-release-flow strong {
  font-size: 14px;
}

.template-release-flow small {
  display: none;
}

.empty-state strong {
  font-size: 15px;
}

.empty-state p,
.analytics-empty,
.template-inline-status {
  font-size: 13px;
  line-height: 1.5;
}

.audit-item__content strong {
  font-size: 14px;
}

.audit-item__content p,
.audit-item time {
  font-size: 13px;
}

.account-boundary {
  align-items: center;
  font-size: 14px;
}

.view small {
  font-size: 13px;
}

dialog.modal .modal__card small,
dialog.modal .modal__card p,
dialog.modal .modal__card dt,
dialog.modal .modal__card time {
  font-size: 13px;
  line-height: 1.5;
}

dialog.modal .modal__card dd,
dialog.modal .activation-code span,
dialog.modal .template-envelope-heading strong,
dialog.modal .template-package-summary strong,
dialog.modal .version-item__body > strong {
  font-size: 14px;
}

dialog.modal .template-envelope-heading > span,
dialog.modal .template-advanced summary,
dialog.modal .instance-ledger__boundary,
dialog.modal .version-context span,
dialog.modal .version-item__body > p,
dialog.modal .template-drop-zone p,
dialog.modal .template-package-summary p {
  font-size: 13px;
  line-height: 1.5;
}

.table-panel .table-wrap th:last-child,
.table-panel .table-wrap td:last-child {
  position: sticky;
  right: 0;
  z-index: 2;
  background: #fff;
  box-shadow: -8px 0 16px rgba(28, 55, 40, 0.07);
}

.table-panel .table-wrap th:last-child {
  background: #fafbfa;
}

.modal__hero h2 {
  font-size: 22px;
}

.modal__hero small,
.modal__warning,
.modal__actions-note,
.check-card small {
  font-size: 13px;
  line-height: 1.5;
}

dialog.modal .workshop-card strong,
dialog.modal .template-drop-zone strong,
dialog.modal .check-card strong,
dialog.modal .renewal-result > span {
  font-size: 14px;
  line-height: 1.45;
}

dialog.modal .workshop-card p,
dialog.modal .template-drop-zone p,
dialog.modal .result-meta dt,
dialog.modal .result-meta dd,
dialog.modal .renewal-result small {
  font-size: 13px;
  line-height: 1.5;
}

dialog.modal .renewal-result strong,
dialog.modal #renewExactExpires {
  font-size: 15px;
}

#previewDataBadge span {
  font-size: 13px;
}

.modal__hero small {
  display: none;
}

.auth-card__heading p,
.auth-unavailable p,
.auth-checking p,
.auth-error,
.auth-card__footnote {
  font-size: 13px;
}

.app-footer {
  justify-content: flex-end;
  font-size: 12px;
}

@media (max-width: 900px) {
  .nav-divider {
    grid-column: 1 / -1;
    margin: 8px 4px 2px;
  }

  .main-nav {
    grid-template-columns: repeat(5, minmax(96px, 1fr));
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .nav-item {
    grid-template-columns: 32px minmax(0, 1fr);
    min-width: 116px;
  }

  .nav-item strong {
    font-size: 13px;
  }
}

@media (max-width: 700px) {
  .main-content {
    padding-inline: 16px;
  }

  .topbar h1 {
    font-size: 28px;
  }

  .topbar {
    gap: 12px;
    min-height: 0;
    padding: 16px 0;
  }

  .topbar__actions {
    display: flex;
    align-items: center;
    flex-direction: row;
    gap: 8px;
  }

  .operator-identity {
    flex: 1 1 auto;
    min-width: 0;
  }

  .health-pill {
    display: none;
  }

  #view-templates .section-heading__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .table-wrap th:last-child,
  .table-wrap td:last-child {
    position: sticky;
    right: 0;
    z-index: 2;
    background: #fff;
    box-shadow: -8px 0 16px rgba(28, 55, 40, 0.07);
  }

  .table-wrap th:last-child {
    background: #fafbfa;
  }

  .control-ledger strong {
    font-size: 32px;
  }

  .control-ledger {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .control-ledger article {
    min-height: 108px;
    padding: 16px;
  }

  .control-ledger article + article {
    border-top: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
  }

  .control-ledger article:nth-child(3) {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-left: 0;
  }

  .control-ledger article:nth-child(4) {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  .primary-button,
  .secondary-button,
  .danger-button,
  .row-button {
    min-height: 44px;
  }
}

.section-heading__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.status-badge--published {
  color: #19764a;
  background: #eaf8ef;
}

.status-badge--draft {
  color: #315a87;
  background: #edf5ff;
}

.status-badge--archived,
.status-badge--inactive {
  color: #69736e;
  background: #eff2f0;
}

.type-badge {
  color: #4c6155;
  background: #f0f3f1;
}

.feature-summary {
  display: inline-block;
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-actions {
  display: inline-flex;
  gap: 5px;
}

.row-button {
  padding: 5px 8px;
  border: 1px solid #d6dfd9;
  border-radius: 7px;
  color: #3e5e4c;
  background: #fff;
  font-size: 9px;
  font-weight: 650;
}

.row-button--danger {
  border-color: #efcfcc;
  color: var(--danger);
  background: #fff8f7;
}

.row-button--primary {
  border-color: #b9dfc8;
  color: var(--forest);
  background: var(--mint-soft);
}

.row-actions__extra {
  display: inline-flex;
  gap: 7px;
}

.row-actions__extra[hidden] {
  display: none;
}

/* Platform operations control plane */
.nav-divider {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 9px 9px 5px;
  color: rgba(235, 247, 239, 0.42);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.nav-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.09);
}

.control-ledger {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  margin-bottom: 18px;
  border: 1px solid #d8e2dc;
  border-radius: 15px;
  background: #0a4c37;
  box-shadow: 0 15px 38px rgba(18, 61, 42, 0.12);
}

.control-ledger article {
  position: relative;
  min-height: 132px;
  padding: 22px 24px;
  color: #f5fff8;
}

.control-ledger article + article {
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.control-ledger article::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 5px rgba(185, 227, 107, 0.1);
}

.control-ledger small,
.control-ledger strong,
.control-ledger span {
  display: block;
}

.control-ledger small {
  color: rgba(245, 255, 248, 0.62);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.08em;
}

.control-ledger strong {
  margin: 8px 0 3px;
  font-family: Bahnschrift, "DIN Alternate", Inter, sans-serif;
  font-size: 34px;
  font-weight: 650;
  letter-spacing: -0.04em;
}

.control-ledger span {
  color: #d5e9dc;
  font-size: 10px;
}

.ops-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 16px;
}

.ops-focus-panel {
  min-height: 360px;
  overflow: hidden;
}

.panel__header--plain {
  justify-content: space-between;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--soft-line);
}

.text-button {
  border: 0;
  color: var(--forest);
  background: transparent;
  font-size: 10px;
  font-weight: 750;
}

.ops-enterprise-list,
.ops-template-list {
  display: grid;
  padding: 0 18px;
}

.ops-list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 65px;
  border-bottom: 1px solid var(--soft-line);
}

.ops-list-row:last-child {
  border-bottom: 0;
}

.ops-list-row > div:first-child {
  min-width: 0;
}

.ops-list-row strong,
.ops-list-row small {
  display: block;
}

.ops-list-row strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-list-row small {
  margin-top: 3px;
  color: #85918a;
  font-size: 9px;
}

.ops-list-row__signal {
  min-width: 88px;
  text-align: right;
}

.ops-list-row__signal b {
  display: block;
  color: var(--forest);
  font-family: Bahnschrift, Inter, sans-serif;
  font-size: 14px;
}

.ops-list-row__signal span {
  color: #8b958f;
  font-size: 8px;
}

.catalog-scope {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #56635c;
  font-size: 10px;
  font-weight: 650;
}

.template-catalog-toolbar {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) auto;
  gap: 10px;
}

.template-toolbar-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.template-filter-form {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.search-box--compact {
  width: min(280px, 100%);
  grid-template-columns: auto minmax(0, 1fr);
}

.template-filter-form select {
  height: 39px;
  min-width: 112px;
  padding: 0 30px 0 10px;
  border: 1px solid #d5ded8;
  border-radius: 9px;
  color: #45544c;
  background: #fff;
  font-size: 10px;
}

.toolbar-result-count {
  color: #75827b;
  font-size: 9px;
  white-space: nowrap;
}

.template-release-note,
.delivery-guidance {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 11px;
  margin-bottom: 14px;
  padding: 13px 15px;
  border: 1px solid #cfe6d8;
  border-radius: 11px;
  color: #2d6045;
  background: #f2faf5;
}

.template-release-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}

.template-release-flow li {
  position: relative;
  display: grid;
  grid-template-columns: 29px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid #d9e7de;
  border-radius: 11px;
  background: linear-gradient(145deg, #ffffff, #f6faf7);
}

.template-release-flow li > span {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 9px;
  color: #17543b;
  background: #dff5e7;
  font-size: 10px;
  font-weight: 850;
}

.template-release-flow strong,
.template-release-flow small {
  display: block;
}

.template-release-flow strong {
  color: #2e4036;
  font-size: 10px;
}

.template-release-flow small {
  margin-top: 2px;
  color: #7b8880;
  font-size: 8px;
  line-height: 1.45;
}

.template-release-note > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  color: #073e2c;
  background: var(--lime);
  font-weight: 850;
}

.template-release-note strong,
.template-release-note p {
  display: block;
  margin: 0;
}

.template-release-note strong {
  font-size: 11px;
}

.template-release-note p {
  margin-top: 2px;
  color: #708078;
  font-size: 9px;
}

.template-editor {
  width: 100%;
  max-height: calc(100vh - 42px);
  overflow-y: auto;
}

.template-source-panel {
  margin-top: 18px;
  padding: 0 16px 15px;
  border: 1px solid #d7e6dc;
  border-radius: 13px;
  background: #f8fbf9;
}

.template-source-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.template-page-actions {
  justify-content: flex-end;
  margin-bottom: 12px;
}

.empty-state__actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

#platformTemplateTableEmpty {
  min-height: 220px;
}

.workshop-card,
.template-drop-zone {
  min-height: 150px;
  border: 1px solid #d5e0d9;
  border-radius: 11px;
  background: #fff;
}

.workshop-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: start;
  gap: 11px;
  padding: 15px;
}

.workshop-card__icon,
.template-drop-zone__icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
  color: #07553a;
  background: #dff5e7;
  font-size: 16px;
  font-weight: 800;
}

.workshop-card strong,
.workshop-card p {
  display: block;
  margin: 0;
}

.workshop-card strong,
.template-drop-zone strong {
  color: #25382e;
  font-size: 11px;
}

.workshop-card p,
.template-drop-zone p {
  margin: 4px 0 0;
  color: #75827b;
  font-size: 9px;
  line-height: 1.6;
}

.workshop-card button {
  grid-column: 1 / -1;
  align-self: end;
}

.template-drop-zone {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 15px;
  border-style: dashed;
  text-align: center;
  cursor: pointer;
  transition: 150ms ease;
}

.template-drop-zone:hover,
.template-drop-zone:focus-visible,
.template-drop-zone.is-dragging {
  border-color: #329c65;
  outline: none;
  background: #f0faf4;
  box-shadow: inset 0 0 0 1px rgba(50, 156, 101, 0.14);
}

.template-drop-zone__icon {
  margin-bottom: 8px;
}

.template-package-summary {
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 10px 11px;
  border: 1px solid #bde0c9;
  border-radius: 10px;
  color: #245a3d;
  background: #effaf3;
}

.template-package-summary__status {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #349b62;
  font-size: 11px;
  font-weight: 800;
}

.template-package-summary strong,
.template-package-summary p {
  display: block;
  margin: 0;
}

.template-package-summary strong {
  font-size: 10px;
}

.template-package-summary p {
  margin-top: 2px;
  color: #64806f;
  font-size: 8px;
}

.field-error {
  margin: 9px 0 0;
  padding: 8px 10px;
  border-radius: 8px;
  color: #943a34;
  background: #fff1ef;
  font-size: 9px;
}

.template-envelope-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin: 17px 0 8px;
}

.template-envelope-heading--metadata {
  margin-top: 18px;
}

.template-envelope-heading strong,
.template-envelope-heading p {
  display: block;
  margin: 0;
}

.template-envelope-heading strong {
  font-size: 12px;
}

.template-envelope-heading p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.template-envelope-heading > span {
  padding: 4px 8px;
  border: 1px solid #cce4d5;
  border-radius: 999px;
  color: #2d704d;
  background: var(--mint-soft);
  font-size: 8px;
  font-weight: 800;
}

.code-editor {
  min-height: 210px;
  resize: vertical;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  line-height: 1.6;
  tab-size: 2;
}

.template-advanced {
  margin-top: 14px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfb;
}

.template-advanced summary {
  color: #526159;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.template-advanced > p {
  margin: 7px 0 10px;
  color: var(--muted);
  font-size: 9px;
}

.version-ledger {
  min-height: 430px;
}

.version-context {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0 12px;
}

.version-context > div {
  padding: 11px 13px;
  border: 1px solid #d9e5dd;
  border-radius: 10px;
  background: #f8fbf9;
}

.version-context span,
.version-context strong {
  display: block;
}

.version-context span {
  color: #7b8880;
  font-size: 8px;
}

.version-context strong {
  margin-top: 3px;
  color: #274436;
  font-size: 12px;
}

.version-list {
  display: grid;
  gap: 8px;
}

.version-loading {
  display: grid;
  min-height: 180px;
  place-items: center;
  color: #78857d;
  font-size: 10px;
}

.version-item {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 13px 14px;
  border: 1px solid #dde5e0;
  border-radius: 11px;
  background: #fff;
}

.version-item.is-current {
  border-color: #aad4b9;
  background: #f6fcf8;
  box-shadow: inset 3px 0 #3ca66b;
}

.version-item__number {
  padding-right: 13px;
  border-right: 1px solid #e0e7e2;
}

.version-item__number small,
.version-item__number strong {
  display: block;
}

.version-item__number small {
  color: #93a099;
  font-family: Consolas, monospace;
  font-size: 7px;
  letter-spacing: 0.12em;
}

.version-item__number strong {
  margin-top: 2px;
  color: #174d35;
  font-family: Bahnschrift, Inter, sans-serif;
  font-size: 20px;
}

.version-item__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
}

.version-item__heading time {
  color: #89958e;
  font-size: 8px;
}

.version-badge {
  display: inline-flex;
  margin-right: 5px;
  padding: 3px 6px;
  border-radius: 999px;
  font-size: 7px;
  font-weight: 800;
}

.version-badge--current {
  color: #17643e;
  background: #dcf3e4;
}

.version-badge--published {
  color: #82540b;
  background: #fff1cd;
}

.version-item__body > strong {
  display: block;
  color: #33463b;
  font-size: 10px;
}

.version-item__body > p {
  margin: 3px 0 0;
  color: #7e8a83;
  font-size: 8px;
}

.version-item__actions {
  display: flex;
  gap: 6px;
}

.publish-version-callout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 2px 14px;
  margin: 18px 0 10px;
  padding: 13px 14px;
  border: 1px solid #cfe4d7;
  border-radius: 11px;
  background: #f4faf6;
}

.publish-version-callout span,
.publish-version-callout small {
  color: #6f7e75;
  font-size: 8px;
}

.publish-version-callout strong {
  grid-row: 1 / 3;
  grid-column: 2;
  color: #115c3c;
  font-family: Bahnschrift, Inter, sans-serif;
  font-size: 24px;
}

.preflight-list {
  display: grid;
  gap: 7px;
}

.preflight-item {
  display: grid;
  grid-template-columns: 29px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border: 1px solid #dce4df;
  border-radius: 9px;
  background: #fafbfa;
}

.preflight-item > span {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #2f9860;
  font-size: 10px;
  font-weight: 850;
}

.preflight-item.is-blocked > span {
  background: #c84a43;
}

.preflight-item.is-warning > span {
  background: #d58a29;
}

.preflight-item strong,
.preflight-item p {
  display: block;
  margin: 0;
}

.preflight-item strong {
  color: #34483d;
  font-size: 10px;
}

.preflight-item p {
  margin-top: 2px;
  color: #7a8780;
  font-size: 8px;
}

.check-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 13px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfb;
}

.check-card input {
  margin-top: 3px;
}

.check-card strong,
.check-card small {
  display: block;
}

.check-card strong {
  font-size: 10px;
}

.check-card small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.template-analytics-panel {
  margin: 18px 0;
  padding: 22px;
  border: 1px solid #d9e6e3;
  border-radius: 18px;
  background: linear-gradient(135deg, #f8fcfb 0%, #fff 54%, #f7faf9 100%);
  box-shadow: 0 12px 28px rgba(33, 71, 65, .06);
}

.preview-data-badge {
  display: grid;
  gap: 3px;
  margin: 10px 16px 2px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 205, 106, .34);
  border-radius: 11px;
  color: #ffe7ad;
  background: rgba(118, 77, 11, .25);
}

.preview-data-badge[hidden] {
  display: none;
}

.preview-data-badge strong {
  font-size: 12px;
}

.preview-data-badge span {
  color: rgba(255, 239, 202, .72);
  font-size: 10px;
  line-height: 1.45;
}

.template-analytics-panel__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.template-analytics-panel__header h3 {
  margin: 4px 0 5px;
  color: #173f39;
  font-size: 20px;
}

.template-analytics-panel__header p {
  margin: 0;
  color: #66807c;
}

.template-analytics-controls {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-end;
  gap: 9px;
}

.template-analytics-controls .secondary-button {
  min-height: 36px;
  white-space: nowrap;
}

.analytics-period {
  display: grid;
  gap: 5px;
  color: #6e817e;
  font-size: 12px;
}

.analytics-period select {
  min-width: 116px;
}

.template-analytics-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.template-analytics-kpis article {
  display: grid;
  gap: 4px;
  min-height: 96px;
  padding: 16px 17px;
  border: 1px solid #e2ece9;
  border-radius: 14px;
  background: rgba(255, 255, 255, .9);
}

.template-analytics-kpis small,
.template-analytics-kpis span {
  color: #70837f;
}

.template-analytics-kpis strong {
  color: #143e37;
  font-size: 26px;
  line-height: 1;
}

.template-analytics-kpis .analytics-kpi--risk {
  border-color: #f2ded4;
  background: #fffaf7;
}

.template-analytics-kpis .analytics-kpi--risk strong {
  color: #a94c2e;
}

.analytics-empty {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 14px;
  padding: 13px 15px;
  border: 1px dashed #c9dbd7;
  border-radius: 12px;
  color: #70837f;
  background: rgba(255, 255, 255, .6);
}

.analytics-empty strong {
  color: #315851;
}

.template-analytics-panel .table-wrap {
  margin-top: 16px;
  border: 1px solid #e3ecea;
  border-radius: 13px;
  background: #fff;
}

.analytics-table th,
.analytics-table td {
  white-space: nowrap;
}

.failure-code {
  display: inline-flex;
  padding: 3px 7px;
  border-radius: 6px;
  color: #9d472e;
  background: #fff0e9;
  font-family: var(--mono-font);
  font-size: 11px;
}

@media (max-width: 1080px) {
  .template-analytics-panel__header {
    align-items: flex-start;
    flex-direction: column;
  }

  .template-analytics-controls {
    width: 100%;
  }

  .template-analytics-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .control-ledger {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .control-ledger article:nth-child(3) {
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  .control-ledger article:nth-child(4) {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  .ops-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .control-ledger {
    grid-template-columns: 1fr;
  }

  .control-ledger article + article {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-left: 0;
  }
}

.empty-state {
  display: grid;
  min-height: 260px;
  place-items: center;
  align-content: center;
  color: #87928c;
  text-align: center;
}

.empty-state > span {
  display: grid;
  width: 44px;
  height: 44px;
  margin-bottom: 8px;
  place-items: center;
  border-radius: 12px;
  background: #f0f3f1;
  font-size: 20px;
}

.empty-state strong {
  color: #58645d;
  font-size: 12px;
}

.empty-state p {
  margin: 3px 0 0;
  font-size: 10px;
}

.audit-panel {
  min-height: 280px;
  padding: 9px 22px;
}

.audit-filter-form {
  display: grid;
  grid-template-columns: minmax(320px, 620px) auto;
  align-items: center;
  gap: 10px;
  padding: 13px 0;
  border-bottom: 1px solid var(--soft-line);
}

.audit-filter-more {
  position: relative;
}

.audit-filter-more > summary {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #344054;
  background: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.audit-filter-more > summary::-webkit-details-marker {
  display: none;
}

.audit-filter-more > div {
  position: absolute;
  z-index: 30;
  top: calc(100% + 7px);
  right: 0;
  width: min(560px, calc(100vw - 64px));
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  box-sizing: border-box;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(16, 24, 40, 0.16);
}

.audit-filter-more label {
  display: grid;
  gap: 6px;
  color: #475467;
  font-size: 12px;
  font-weight: 700;
}

.audit-filter-more input {
  min-width: 0;
  height: 38px;
  box-sizing: border-box;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #17212b;
  background: #fff;
  font: inherit;
  font-weight: 500;
}

.audit-timeline {
  position: relative;
}

.audit-timeline::before {
  content: "";
  position: absolute;
  top: 25px;
  bottom: 25px;
  left: 15px;
  width: 1px;
  background: #dce4df;
}

.audit-item {
  position: relative;
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  min-height: 68px;
  padding: 10px 0;
  border-bottom: 1px solid var(--soft-line);
}

.audit-item:last-child {
  border-bottom: 0;
}

.audit-item__mark {
  z-index: 1;
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 4px solid #fff;
  border-radius: 50%;
  color: var(--forest);
  background: var(--mint);
  font-size: 10px;
  font-weight: 800;
}

.audit-item__content {
  min-width: 0;
}

.audit-item__content strong {
  display: block;
  font-size: 11px;
}

.audit-item__content p {
  overflow: hidden;
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audit-item time {
  color: #89938d;
  font-size: 9px;
}

.app-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 0 22px;
  border-top: 1px solid var(--line);
  color: #8a948e;
  font-size: 9px;
}

.modal {
  width: min(520px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  border-radius: 17px;
  background: transparent;
  box-shadow: 0 24px 80px rgba(8, 30, 18, 0.28);
}

.modal--wide {
  width: min(900px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
}

.template-inline-status[role="alert"] {
  border-color: #fedf89;
  background: #fffaeb;
}

.template-inline-status[role="alert"] > span:first-child {
  background: #fef0c7;
  color: #b54708;
}

.template-inline-status .text-button,
.empty-state .text-button,
.analytics-empty .text-button {
  width: max-content;
  margin-top: 10px;
}

.template-inline-status .text-button:focus-visible,
.empty-state .text-button:focus-visible {
  outline: 3px solid rgba(14, 147, 132, 0.2);
  outline-offset: 2px;
}

.modal--wide .modal__card {
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}

.modal::backdrop {
  background: rgba(5, 27, 16, 0.56);
  backdrop-filter: blur(3px);
}

.modal__card {
  padding: 25px;
  border: 1px solid #dbe5de;
  border-radius: 17px;
  background: #fff;
}

.modal__hero {
  display: flex;
  align-items: center;
  gap: 13px;
}

.modal__hero > span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #28935a;
  font-size: 18px;
  font-weight: 800;
}

.modal__hero--warning > span {
  background: #d27a1d;
}

.modal__hero small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.modal__hero h2 {
  margin: 1px 0 0;
  font-size: 19px;
  letter-spacing: -0.02em;
}

.modal__warning {
  margin: 18px 0;
  padding: 10px 12px;
  border: 1px solid #f0d7a9;
  border-radius: 9px;
  color: #805a1e;
  background: var(--warning-bg);
  font-size: 10px;
}

.ticket-guidance {
  margin: 18px 0;
  padding: 14px 16px;
  border: 1px solid #cfe4d6;
  border-radius: 10px;
  background: #f4faf6;
}

.ticket-guidance h3 {
  margin: 0;
  color: #174d35;
  font-size: 14px;
}

.ticket-guidance p {
  margin: 8px 0 0;
  color: #456557;
}

.ticket-guidance ol {
  display: grid;
  gap: 6px;
  margin: 10px 0 0;
  padding-left: 20px;
  color: #203d30;
}

.ticket-guidance__completion {
  font-weight: 700;
}

.result-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 0 17px;
  border: 1px solid var(--soft-line);
  border-radius: 9px;
}

.result-meta div {
  min-width: 0;
  padding: 9px 10px;
  border-right: 1px solid var(--soft-line);
}

.result-meta div:last-child {
  border-right: 0;
}

.result-meta dt {
  color: var(--muted);
  font-size: 8px;
}

.result-meta dd {
  overflow: hidden;
  margin: 3px 0 0;
  font-size: 9px;
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activation-code {
  display: grid;
  gap: 6px;
}

.activation-code span {
  font-size: 10px;
  font-weight: 700;
}

.activation-code input {
  width: 100%;
  height: 48px;
  padding: 0 13px;
  border: 1px dashed #69a780;
  border-radius: 10px;
  color: #124b33;
  background: #f3fbf6;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 14px;
  font-weight: 720;
  letter-spacing: 0.03em;
  text-align: center;
}

.modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 20px;
}

.instance-ledger__boundary {
  margin: 16px 0;
  padding: 10px 12px;
  border: 1px solid #cfe6d8;
  border-radius: 10px;
  color: #456756;
  background: #f4faf6;
  font-size: 9px;
  line-height: 1.65;
}

.instance-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.instance-summary > div {
  display: grid;
  gap: 3px;
  padding: 12px 14px;
  border: 1px solid var(--soft-line);
  border-radius: 11px;
  background: #fbfdfb;
}

.instance-summary small,
.instance-summary span {
  color: var(--muted);
  font-size: 8px;
}

.instance-summary strong {
  color: #163f2b;
  font-size: 17px;
}

.instance-list {
  display: grid;
  gap: 11px;
}

.instance-card {
  padding: 14px;
  border: 1px solid #dce8e0;
  border-radius: 12px;
  background: #fff;
}

.instance-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.instance-card header > div {
  display: grid;
  gap: 4px;
}

.instance-card header > .instance-card__actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.instance-card header strong {
  font-size: 11px;
}

.instance-card header code {
  overflow: hidden;
  max-width: 560px;
  color: #718078;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-badge {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  color: #4f5f56;
  background: #eef2ef;
  font-size: 8px;
  font-weight: 750;
}

.report-badge--recent {
  color: #167547;
  background: #dcfce7;
}

.report-badge--snapshot {
  color: #246c88;
  background: #e0f2fe;
}

.report-badge--delayed {
  color: #8a5a16;
  background: #fef3c7;
}

.instance-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px;
  margin: 13px 0 0;
}

.instance-card dl div {
  min-width: 0;
}

.instance-card dt {
  color: var(--muted);
  font-size: 8px;
}

.instance-card dd {
  overflow: hidden;
  margin: 2px 0 0;
  font-size: 9px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.instance-usage {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid var(--soft-line);
}

.instance-usage span {
  display: grid;
  gap: 2px;
}

.instance-usage small {
  color: var(--muted);
  font-size: 8px;
}

.instance-usage b {
  color: #154c31;
  font-size: 13px;
}

.instance-card__empty {
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--soft-line);
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.instance-card__note {
  margin: 12px 0 0;
  padding: 10px 11px;
  border-radius: 8px;
  color: #475467;
  background: #f8fafc;
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.modal__actions-note {
  align-self: center;
  margin-right: auto;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.45;
  text-align: left;
}

.renewal-fields {
  margin-top: 17px;
}

.renewal-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 2px 16px;
  margin-top: 17px;
  padding: 12px 14px;
  border: 1px solid #b9dbc5;
  border-radius: 10px;
  color: #315d46;
  background: var(--mint-soft);
}

.renewal-result > span {
  font-size: 10px;
  font-weight: 650;
}

.renewal-result strong {
  grid-row: span 2;
  font-size: 12px;
}

.renewal-result small {
  color: #71847a;
  font-size: 9px;
}

.account-boundary {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 18px 20px 0;
  padding: 14px 16px;
  border: 1px solid #dcebe8;
  border-radius: 12px;
  color: #49615e;
  background: #f4faf9;
}

.announcement-toolbar {
  grid-template-columns: minmax(340px, 1fr) auto;
}

.table-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 14px 18px 4px;
  border-top: 1px solid #edf2f1;
  color: #60716e;
  font-size: 12px;
}

.table-pagination[hidden] {
  display: none;
}

.table-pagination .secondary-button {
  min-height: 32px;
  padding: 6px 12px;
}

#announcementTableBody td:nth-child(2) {
  min-width: 280px;
  max-width: 420px;
}

#announcementTableBody td:nth-child(2) .cell-subtitle {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: normal;
}

.account-boundary span {
  font-size: 20px;
  line-height: 1.3;
}

.account-boundary p {
  margin: 0;
  line-height: 1.65;
}

#operatorAccountInitialKeyFields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

@media (max-width: 1120px) {
  .main-content {
    padding: 0 28px;
  }

  .license-layout {
    grid-template-columns: minmax(0, 1fr) 280px;
  }

  .field-grid--three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inspection-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .auth-gate {
    padding: 24px;
  }

  .auth-shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .auth-intro {
    padding: 28px 34px;
  }

  .auth-intro__body {
    padding: 34px 0 26px;
  }

  .auth-intro h1 {
    margin: 18px 0 12px;
    font-size: 31px;
  }

  .auth-assurances {
    display: none;
  }

  .auth-card {
    min-height: 500px;
    padding: 42px clamp(32px, 8vw, 72px) 28px;
  }

  .app-shell {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .sidebar {
    padding: 20px 12px;
  }

  .brand {
    justify-content: center;
    padding: 0;
  }

  .brand > span:last-child,
  .internal-badge,
  .nav-item > span:nth-child(2),
  .sidebar-status {
    display: none;
  }

  .nav-item {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 9px;
  }

  .license-layout {
    grid-template-columns: 1fr;
  }

  .summary-card {
    position: static;
  }

  .request-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .auth-gate {
    display: block;
    padding: 0;
    background: #fff;
  }

  .auth-shell {
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .auth-intro {
    padding: 22px 24px;
  }

  .auth-intro__body {
    padding: 25px 0 5px;
  }

  .auth-intro__badge,
  .auth-intro__body p {
    display: none;
  }

  .auth-intro h1 {
    margin: 0;
    font-size: 24px;
  }

  .auth-card {
    min-height: auto;
    padding: 38px 24px 25px;
  }

  .auth-card__footnote {
    margin-top: 34px;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    position: static;
    display: block;
    width: 100%;
    height: auto;
    padding: 12px 15px;
  }

  .brand {
    justify-content: flex-start;
  }

  .brand > span:last-child {
    display: block;
  }

  .brand__mark {
    width: 35px;
    height: 35px;
    border-radius: 10px;
  }

  .main-nav {
    grid-template-columns: repeat(4, 1fr);
    margin-top: 13px;
  }

  .nav-item {
    box-shadow: none;
  }

  .nav-item__icon {
    width: 28px;
    height: 28px;
  }

  .main-content {
    padding: 0 16px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 15px;
    padding: 21px 0;
  }

  .topbar__actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .operator-identity {
    width: 100%;
  }

  .health-pill {
    align-self: flex-start;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 11px;
  }

  .section-heading__actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .template-analytics-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .template-release-flow,
  .template-source-grid {
    grid-template-columns: 1fr;
  }

  .template-package-summary {
    grid-template-columns: 31px minmax(0, 1fr);
  }

  .template-package-summary .row-button {
    grid-column: 1 / -1;
  }

  .field-grid,
  .field-grid--three,
  .feature-picker {
    grid-template-columns: 1fr;
  }

  .offline-steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }

  .offline-steps > i {
    display: none;
  }

  .offline-steps span {
    justify-content: center;
  }

  .inspection-grid {
    grid-template-columns: 1fr;
  }

  .inspection-grid__full {
    grid-column: auto;
  }

  .exact-time-callout {
    grid-template-columns: 1fr;
  }

  .exact-time-callout > span {
    transform: rotate(90deg);
    text-align: center;
  }

  .exact-time-callout div,
  .exact-time-callout div:nth-of-type(2),
  .exact-time-callout div:last-child {
    text-align: left;
  }

  .form-actions,
  .download-card,
  .table-toolbar,
  .app-footer {
    align-items: stretch;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .download-card {
    display: grid;
  }

  .download-card__actions,
  .delivery-item__actions {
    align-items: stretch;
    flex-direction: column;
  }

  .delivery-item {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .delivery-item__actions {
    grid-column: 1 / -1;
  }

  .search-box {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .audit-item {
    grid-template-columns: 31px minmax(0, 1fr);
  }

  .audit-item time {
    grid-column: 2;
  }

  .result-meta {
    grid-template-columns: 1fr;
  }

  .result-meta div {
    border-right: 0;
    border-bottom: 1px solid var(--soft-line);
  }

  .result-meta div:last-child {
    border-bottom: 0;
  }

  .modal__actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .modal__actions-note {
    margin-right: 0;
  }

  .renewal-result {
    grid-template-columns: 1fr;
  }

  .renewal-result strong {
    grid-row: auto;
  }

  .template-catalog-toolbar,
  .version-context {
    grid-template-columns: 1fr;
  }

  .template-filter-form,
  .version-item__actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .search-box--compact {
    width: 100%;
  }

  .version-item {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .version-item__actions {
    grid-column: 1 / -1;
  }
}

/* Platform clarity layer: keep later feature styles on the same readable scale. */
.nav-divider {
  margin: 12px 10px 5px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: none;
}

.control-ledger article {
  min-height: 140px;
}

.control-ledger small {
  font-size: 13px;
  letter-spacing: 0;
}

.control-ledger strong {
  font-size: 38px;
}

.control-ledger span {
  font-size: 13px;
}

.ops-list-row {
  min-height: 76px;
}

.ops-list-row strong {
  font-size: 14px;
}

.ops-list-row small,
.ops-list-row__signal span {
  font-size: 12px;
  line-height: 1.45;
}

.ops-list-row__signal b {
  font-size: 16px;
}

.catalog-scope,
.toolbar-result-count,
.template-filter-form select {
  font-size: 13px;
}

th,
.cell-subtitle,
.toolbar-result-count,
.template-analytics-panel__header p,
.template-analytics-kpis small,
.template-analytics-kpis span {
  color: #59675f;
}

.text-button {
  min-height: 40px;
  padding-inline: 8px;
  font-size: 13px;
}

.row-button {
  min-height: 40px;
  padding: 8px 11px;
  font-size: 13px;
}

.icon-button {
  width: 44px;
  height: 44px;
  font-size: 17px;
}

.template-analytics-controls .secondary-button,
.analytics-period select,
#templateAnalyticsDays {
  min-height: 44px;
  font-size: 14px;
}

.analytics-period,
.template-analytics-panel__header p,
.template-analytics-kpis small,
.template-analytics-kpis span {
  font-size: 13px;
}

.template-release-flow li {
  min-height: 62px;
}

.template-release-flow li > span {
  font-size: 13px;
}

.template-release-flow strong {
  font-size: 14px;
}

.template-release-flow small {
  display: none;
}

.empty-state strong {
  font-size: 15px;
}

.empty-state p,
.analytics-empty,
.template-inline-status {
  font-size: 13px;
  line-height: 1.5;
}

.audit-item__content strong {
  font-size: 14px;
}

.audit-item__content p,
.audit-item time {
  font-size: 13px;
}

.app-footer {
  justify-content: flex-end;
  font-size: 12px;
}

.account-boundary {
  align-items: center;
  font-size: 14px;
}

.modal__hero h2 {
  font-size: 22px;
}

.modal__hero small,
.modal__warning,
.modal__actions-note,
.check-card small {
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: static;
    display: block;
    width: 100%;
    height: auto;
    padding: 12px 16px;
  }

  .brand {
    justify-content: flex-start;
  }

  .brand > span:last-child,
  .nav-item > span:nth-child(2) {
    display: block;
  }

  .internal-badge,
  .sidebar-status,
  .nav-divider {
    display: none;
  }

  .main-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    margin-top: 12px;
    padding-bottom: 8px;
    scrollbar-width: thin;
  }

  .nav-item {
    display: grid;
    flex: 0 0 148px;
    grid-template-columns: 32px minmax(0, 1fr);
    justify-items: stretch;
    width: auto;
    min-width: 0;
    padding: 7px 10px;
  }

  .nav-item strong {
    display: block;
    font-size: 13px;
  }

  .row-button,
  .text-button,
  .logout-button,
  .table-pagination .secondary-button {
    min-height: 44px;
  }

  input,
  select,
  textarea,
  .search-box input,
  .template-filter-form select,
  .analytics-period select,
  #templateAnalyticsDays {
    min-height: 44px;
    font-size: 16px;
  }
}

@media (max-width: 700px) {
  .main-content {
    padding-inline: 16px;
  }

  .sidebar {
    padding-block: 10px;
  }

  #previewDataBadge {
    display: block;
    margin: 6px 0 0;
    padding: 8px 10px;
  }

  #previewDataBadge strong {
    display: none;
  }

  .main-nav {
    margin-top: 8px;
    padding-bottom: 4px;
  }

  .topbar {
    gap: 12px;
    padding-block: 16px;
  }

  .topbar__actions {
    width: 100%;
    align-items: center;
    flex-direction: row;
    gap: 8px;
  }

  .operator-identity {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
  }

  .health-pill {
    display: none;
  }

  .topbar h1 {
    font-size: 28px;
  }

  .control-ledger {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .control-ledger article {
    min-height: 104px;
    padding: 16px;
  }

  .control-ledger article + article {
    border-top: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
  }

  .control-ledger article:nth-child(3) {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-left: 0;
  }

  .control-ledger article:nth-child(4) {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  .control-ledger strong {
    font-size: 32px;
  }

  .control-ledger span {
    font-size: 12px;
  }

  #view-templates .section-heading__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .template-toolbar-meta {
    width: 100%;
    justify-content: space-between;
  }

  .template-release-flow {
    display: none;
  }

  .table-panel .row-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
    width: auto;
    max-width: 96px;
  }

  .table-panel .row-actions.is-expanded {
    width: 176px;
    max-width: 176px;
  }

  .table-panel .row-actions__extra:not([hidden]) {
    display: contents;
  }

  #logoutButton {
    min-height: 44px;
  }

  .audit-filter-form {
    grid-template-columns: 1fr;
  }

  .audit-filter-more > summary {
    width: 100%;
    box-sizing: border-box;
    justify-content: center;
  }

  .audit-filter-more > div {
    position: static;
    width: 100%;
    grid-template-columns: 1fr;
    margin-top: 8px;
    box-shadow: none;
  }

  .primary-button,
  .secondary-button,
  .danger-button,
  .row-button {
    min-height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
