:root {
  color-scheme: dark;
  --bg: #050706;
  --surface: rgba(11, 15, 14, 0.92);
  --surface-strong: rgba(15, 21, 20, 0.98);
  --surface-soft: rgba(255, 255, 255, 0.045);
  --line: rgba(173, 235, 222, 0.16);
  --line-strong: rgba(55, 238, 210, 0.42);
  --text: #f2f8f5;
  --muted: #9dafaa;
  --muted-strong: #c4d6d0;
  --cyan: #31ead1;
  --green: #8bf6b0;
  --amber: #ffd166;
  --rose: #ff637d;
  --violet: #b99cff;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  --radius: 8px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(49, 234, 209, 0.08), transparent 28%),
    linear-gradient(315deg, rgba(139, 246, 176, 0.06), transparent 35%),
    linear-gradient(180deg, #050706 0%, #09100f 52%, #050706 100%);
  letter-spacing: 0;
}

body::before,
body::after {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  content: "";
}

body::before {
  background-image:
    linear-gradient(rgba(173, 235, 222, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(173, 235, 222, 0.045) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.22));
}

body::after {
  z-index: -1;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.018) 0,
      rgba(255, 255, 255, 0.018) 1px,
      transparent 1px,
      transparent 7px
    );
  opacity: 0.45;
}

a {
  color: var(--cyan);
  text-decoration: none;
}

a:hover {
  color: #baffef;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

code {
  color: #d5fff7;
  overflow-wrap: anywhere;
}

.grid-glow {
  position: fixed;
  inset: auto 0 0;
  z-index: -1;
  height: 36vh;
  background: linear-gradient(to top, rgba(49, 234, 209, 0.1), transparent);
  pointer-events: none;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(1180px, calc(100% - 32px));
  min-height: 78px;
  margin: 0 auto;
}

.admin-topbar {
  width: min(1440px, calc(100% - 32px));
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--text);
}

.brand-mark {
  display: grid;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--cyan);
  background:
    linear-gradient(145deg, rgba(49, 234, 209, 0.2), rgba(139, 246, 176, 0.08)),
    rgba(255, 255, 255, 0.04);
  box-shadow:
    inset 0 0 22px rgba(49, 234, 209, 0.18),
    0 0 28px rgba(49, 234, 209, 0.1);
  font-weight: 900;
}

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

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

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

.topbar-actions,
.admin-actions,
.command-status,
.signal-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.system-pill,
.command-status span,
.signal-row span,
.security-warning,
.ghost-link,
.ghost-btn,
.icon-text-btn,
.mini-btn,
.icon-btn,
.copy-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
  text-decoration: none;
}

.system-pill,
.command-status span,
.signal-row span {
  padding: 0 12px;
  color: var(--muted-strong);
  font-size: 13px;
}

.system-pill {
  border-color: rgba(139, 246, 176, 0.3);
  color: #ddffeb;
  background: rgba(139, 246, 176, 0.08);
}

.ghost-link,
.ghost-btn,
.icon-text-btn {
  padding: 0 14px;
}

.ghost-btn {
  appearance: none;
}

.icon-btn {
  width: 44px;
  padding: 0;
}

.mini-btn,
.copy-link {
  min-height: 32px;
  padding: 0 10px;
  color: #dff7ff;
  font-size: 12px;
}

.copy-link {
  margin-top: 7px;
  color: var(--cyan);
}

.ghost-link:hover,
.ghost-btn:hover,
.icon-text-btn:hover,
.mini-btn:hover,
.icon-btn:hover,
.copy-link:hover {
  border-color: var(--line-strong);
  background: rgba(49, 234, 209, 0.08);
}

svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.public-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(340px, 0.7fr);
  gap: 22px;
  width: min(1180px, calc(100% - 32px));
  margin: 18px auto 56px;
}

.public-layout > *,
.admin-layout > *,
.admin-grid > *,
.metric-grid > *,
.side-rail > * {
  min-width: 0;
}

.exchange-panel,
.info-panel,
.admin-panel,
.login-card,
.metric,
.admin-command {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent 42%),
    var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.console-panel {
  position: relative;
  overflow: hidden;
}

.console-panel::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(49, 234, 209, 0.35), transparent 32%, rgba(139, 246, 176, 0.18)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 28%);
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
  padding: 1px;
}

.exchange-panel {
  min-height: 690px;
  padding: 40px;
}

.panel-heading {
  max-width: 760px;
  margin-bottom: 28px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  margin-bottom: 12px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

h1 {
  max-width: 860px;
  margin: 0;
  font-size: 58px;
  line-height: 1.04;
  letter-spacing: 0;
}

.login-heading h1,
.admin-command h1 {
  font-size: 34px;
}

.panel-heading p {
  max-width: 680px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}

.signal-row {
  flex-wrap: wrap;
  margin-top: 20px;
}

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

.field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.field span {
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 760;
}

input,
textarea,
select {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(173, 235, 222, 0.2);
  border-radius: var(--radius);
  color: var(--text);
  background: rgba(1, 5, 4, 0.72);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

input::placeholder,
textarea::placeholder {
  color: rgba(196, 214, 208, 0.48);
}

input,
select {
  min-height: 46px;
  padding: 0 14px;
}

textarea {
  resize: vertical;
  min-height: 188px;
  padding: 14px;
  line-height: 1.55;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--cyan);
  box-shadow:
    0 0 0 3px rgba(49, 234, 209, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

.status-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow-wrap: anywhere;
}

.status-strip.muted {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
}

.status-strip.success {
  color: #e2fff0;
  border-color: rgba(139, 246, 176, 0.48);
  background: rgba(139, 246, 176, 0.1);
}

.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: var(--radius);
  color: #03120f;
  background: linear-gradient(135deg, var(--cyan), #8bf6b0 68%, var(--amber));
  font-weight: 900;
  box-shadow: 0 14px 32px rgba(49, 234, 209, 0.18);
}

.primary-btn:hover:not(:disabled) {
  filter: brightness(1.05);
}

.primary-btn:disabled {
  cursor: not-allowed;
  color: rgba(255, 255, 255, 0.46);
  background: rgba(255, 255, 255, 0.09);
  box-shadow: none;
}

.message-area {
  min-height: 42px;
  margin-top: 16px;
}

.alert {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  line-height: 1.6;
}

.alert.success {
  border-color: rgba(139, 246, 176, 0.45);
  background: rgba(139, 246, 176, 0.1);
}

.alert.danger {
  border-color: rgba(255, 99, 125, 0.5);
  background: rgba(255, 99, 125, 0.1);
}

.alert.info {
  border-color: rgba(49, 234, 209, 0.35);
  background: rgba(49, 234, 209, 0.08);
}

.side-rail {
  display: grid;
  align-content: start;
  gap: 18px;
}

.info-panel,
.admin-panel {
  padding: 20px;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 16px;
  color: #e9fff9;
  font-weight: 850;
}

.steps {
  display: grid;
  gap: 13px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  min-height: 74px;
  padding: 14px 14px 14px 58px;
  border: 1px solid rgba(173, 235, 222, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.032);
}

.steps li::before {
  position: absolute;
  left: 14px;
  top: 14px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(49, 234, 209, 0.36);
  border-radius: 7px;
  color: var(--cyan);
  background: rgba(49, 234, 209, 0.08);
  content: counter(step, decimal-leading-zero);
  counter-increment: step;
  font-size: 12px;
  font-weight: 900;
}

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

.steps strong {
  color: #f4fffb;
  line-height: 1.45;
}

.steps span {
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.65;
}

.steps a {
  overflow-wrap: anywhere;
}

.inline-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 10px;
}

.record-box {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(1, 5, 4, 0.5);
}

.record-box.empty {
  color: var(--muted);
  line-height: 1.7;
}

.record-status,
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  color: #03120f;
  background: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.record-status {
  margin-bottom: 10px;
}

.record-status.pending,
.badge.pending {
  background: var(--amber);
}

.record-status.completed,
.badge.completed,
.badge.active {
  background: var(--green);
}

.record-status.rejected,
.badge.rejected,
.badge.disabled {
  background: var(--rose);
}

.record-status.unused,
.badge.unused {
  color: #17211d;
  background: #b7c5d0;
}

dl {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 8px 12px;
  margin: 0;
}

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

dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.login-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

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

.login-brand {
  margin-bottom: 24px;
}

.login-heading {
  margin-bottom: 22px;
}

.admin-actions {
  justify-content: flex-end;
}

.security-warning {
  padding: 0 12px;
  border-color: rgba(255, 209, 102, 0.35);
  color: #ffe8a6;
  background: rgba(255, 209, 102, 0.08);
  font-size: 13px;
}

.admin-layout {
  display: grid;
  gap: 18px;
  width: min(1440px, calc(100% - 32px));
  margin: 18px auto 56px;
}

.admin-command {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
}

.command-status {
  flex-wrap: wrap;
  justify-content: flex-end;
}

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

.metric {
  position: relative;
  min-height: 102px;
  padding: 18px;
  overflow: hidden;
}

.metric::after {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), transparent);
  content: "";
}

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

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

.metric strong {
  margin-top: 10px;
  color: #f6fffb;
  font-size: 34px;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.52fr) minmax(0, 1.48fr);
  gap: 18px;
}

.panel-heading-row,
.table-tools,
.generated-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.segmented button {
  min-height: 32px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  padding: 0 10px;
}

.segmented button.active {
  color: #03120f;
  background: var(--cyan);
  font-weight: 850;
}

.generate-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.generate-form .primary-btn {
  grid-column: 1 / -1;
}

.generated-output {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(1, 5, 4, 0.5);
}

.generated-output.empty {
  color: var(--muted);
}

.generated-output textarea {
  margin-top: 10px;
  min-height: 180px;
}

.table-tools {
  margin: 14px 0;
}

.search-field {
  position: relative;
  display: block;
  flex: 1 1 260px;
  min-width: 220px;
}

.search-field svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
}

.search-field input {
  padding-left: 38px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(1, 5, 4, 0.32);
}

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

.orders-data {
  min-width: 1180px;
}

.data-table th,
.data-table td {
  padding: 13px 12px;
  border-bottom: 1px solid rgba(173, 235, 222, 0.1);
  text-align: left;
  vertical-align: top;
}

.data-table th {
  color: var(--muted-strong);
  background: rgba(255, 255, 255, 0.045);
  font-size: 12px;
  text-transform: uppercase;
}

.data-table td small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  line-height: 1.4;
}

.data-table tr:hover td {
  background: rgba(49, 234, 209, 0.035);
}

.token-cell textarea {
  width: min(360px, 36vw);
  min-height: 96px;
  max-height: 160px;
  font-size: 12px;
}

.note-input {
  width: min(260px, 28vw);
  min-height: 92px;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 150px;
}

.mini-btn.success {
  color: #062015;
  background: var(--green);
}

.mini-btn.danger {
  color: #25030b;
  background: var(--rose);
}

.select-input,
.date-input {
  min-width: 150px;
}

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

.danger-text {
  color: #ffc2cf;
}

/* Mission-control public page */
.mission-shell {
  background:
    radial-gradient(circle at 50% -12%, rgba(49, 234, 209, 0.2), transparent 34%),
    radial-gradient(circle at 50% 104%, rgba(49, 234, 209, 0.16), transparent 36%),
    linear-gradient(180deg, #020605 0%, #06120f 50%, #020403 100%);
}

.tech-pattern {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  mix-blend-mode: screen;
  background:
    linear-gradient(0deg, transparent 0 48%, rgba(49, 234, 209, 0.28) 50%, transparent 52%),
    linear-gradient(90deg, transparent 0 49%, rgba(49, 234, 209, 0.18) 50%, transparent 51%),
    radial-gradient(ellipse at 50% 92%, rgba(49, 234, 209, 0.24), transparent 38%),
    radial-gradient(circle at 78% 74%, rgba(255, 209, 102, 0.16), transparent 24%);
  background-position: 0 0, 0 0, 50% 100%, 78% 74%;
  background-size: 100% 220px, 180px 100%, 100% 100%, 100% 100%;
  opacity: 0.78;
  animation: tunnelGridPulse 20s ease-in-out infinite alternate;
}

.tech-pattern::before,
.tech-pattern::after {
  position: absolute;
  inset: 0;
  content: "";
  will-change: background-position;
}

.tech-pattern::before {
  background:
    linear-gradient(118deg, transparent 0 38%, rgba(49, 234, 209, 0.06) 43%, rgba(49, 234, 209, 0.62) 48%, transparent 55%),
    linear-gradient(21deg, transparent 0 54%, rgba(255, 209, 102, 0.12) 60%, rgba(255, 209, 102, 0.5) 62%, transparent 68%),
    linear-gradient(92deg, transparent 0 18%, rgba(49, 234, 209, 0.28) 22%, transparent 28%),
    radial-gradient(ellipse at 16% 44%, rgba(49, 234, 209, 0.22), transparent 34%),
    radial-gradient(ellipse at 84% 50%, rgba(49, 234, 209, 0.2), transparent 32%);
  background-position: -36% 8%, 112% 94%, -20% 54%, 16% 44%, 84% 50%;
  background-size: 180% 180%, 168% 168%, 130% 100%, 100% 100%, 100% 100%;
  opacity: 0.84;
  animation: tunnelBeamSweep 12s ease-in-out infinite alternate;
}

.tech-pattern::after {
  background:
    radial-gradient(circle at 14% 26%, rgba(49, 234, 209, 0.58) 0 2px, transparent 6px),
    radial-gradient(circle at 24% 68%, rgba(49, 234, 209, 0.44) 0 2px, transparent 7px),
    radial-gradient(circle at 52% 76%, rgba(49, 234, 209, 0.5) 0 2px, transparent 7px),
    radial-gradient(circle at 74% 30%, rgba(49, 234, 209, 0.38) 0 2px, transparent 8px),
    radial-gradient(circle at 84% 72%, rgba(255, 209, 102, 0.52) 0 2px, transparent 8px),
    linear-gradient(0deg, transparent 0 28%, rgba(49, 234, 209, 0.2) 30%, transparent 34%);
  background-position: 14% 26%, 24% 68%, 52% 76%, 74% 30%, 84% 72%, 0 0;
  background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 260px;
  opacity: 0.58;
  animation: tunnelParticleDrift 18s ease-in-out infinite alternate;
}

.mission-shell::before {
  background:
    linear-gradient(180deg, rgba(1, 6, 5, 0.16), rgba(1, 6, 5, 0.62)),
    radial-gradient(circle at 50% 37%, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.56) 42%, transparent 68%),
    url("../img/perspective-grid-tunnel-bg.png");
  background-position: center, center, 50% 50%;
  background-repeat: no-repeat;
  background-size: cover, cover, cover;
  opacity: 0.95;
  animation: tunnelBackdropDrift 34s ease-in-out infinite alternate;
  will-change: background-position;
}

.mission-shell::after {
  background:
    linear-gradient(90deg, transparent 0 12%, rgba(49, 234, 209, 0.18) 18%, transparent 30%),
    linear-gradient(90deg, transparent 0 62%, rgba(49, 234, 209, 0.14) 68%, transparent 78%),
    radial-gradient(circle at 50% 80%, rgba(49, 234, 209, 0.16), transparent 34%);
  background-position: -40% 0, 120% 0, center;
  background-size: 180% 100%, 160% 100%, 100% 100%;
  opacity: 0.64;
  animation: tunnelScanFlow 16s ease-in-out infinite alternate;
  will-change: background-position;
}

.mission-topbar {
  position: relative;
  width: min(1420px, calc(100% - 24px));
  min-height: 88px;
  border: 1px solid rgba(173, 235, 222, 0.12);
  border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  background: rgba(4, 9, 8, 0.72);
  padding: 0 18px;
}

.mission-brand {
  flex: 0 0 300px;
}

.mission-brand strong {
  font-size: 19px;
  font-weight: 900;
}

.chatgpt-mark {
  background:
    linear-gradient(145deg, rgba(49, 234, 209, 0.18), rgba(255, 255, 255, 0.03)),
    rgba(3, 16, 14, 0.9);
}

.chatgpt-mark img {
  width: 25px;
  height: 25px;
  display: block;
  filter: invert(83%) sepia(86%) saturate(1021%) hue-rotate(110deg) brightness(102%) contrast(90%);
}

.mission-console-title {
  position: absolute;
  left: 50%;
  top: 50%;
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translate(-50%, -50%);
  color: var(--cyan);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.mission-console-title span {
  width: 74px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(49, 234, 209, 0.75), transparent);
}

.mission-layout {
  display: grid;
  gap: 22px;
  width: min(1340px, calc(100% - 44px));
  margin: 20px auto 26px;
}

.mission-steps,
.mission-workspace,
.query-command {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.062), rgba(255, 255, 255, 0.018) 44%, transparent),
    rgba(6, 15, 13, 0.78);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px) saturate(122%);
}

.public-warning-panel {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  min-width: 0;
  padding: 18px 20px;
  border: 1px solid rgba(255, 209, 102, 0.46);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 8% 0%, rgba(255, 209, 102, 0.16), transparent 34%),
    linear-gradient(135deg, rgba(255, 209, 102, 0.12), rgba(255, 99, 125, 0.055)),
    rgba(18, 14, 5, 0.82);
  box-shadow:
    0 22px 62px rgba(0, 0, 0, 0.34),
    inset 0 0 0 1px rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(20px) saturate(122%);
}

.public-warning-panel .warning-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: var(--radius);
  color: var(--amber);
  background: rgba(255, 209, 102, 0.13);
  box-shadow: inset 0 0 18px rgba(255, 209, 102, 0.1);
}

.public-warning-panel strong {
  display: block;
  color: #fff8d8;
  font-size: 18px;
  font-weight: 900;
}

.public-warning-panel p {
  margin: 8px 0 0;
  color: #ffeec4;
  line-height: 1.75;
  white-space: pre-wrap;
}

.mission-steps {
  padding: 22px 26px 26px;
}

.steps-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
}

.mission-steps h1 {
  margin: 0;
  max-width: none;
  font-size: 24px;
}

.steps-toggle {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  min-width: 150px;
  border: 1px solid rgba(49, 234, 209, 0.34);
  border-radius: var(--radius);
  color: var(--text);
  background: rgba(49, 234, 209, 0.08);
  padding: 0 12px;
}

.steps-toggle span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 850;
}

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

.steps-toggle > svg {
  transition: transform 180ms ease;
}

.mission-steps:not(.is-collapsed) .steps-toggle > svg {
  transform: rotate(180deg);
}

.steps-toggle:hover {
  border-color: var(--cyan);
  background: rgba(49, 234, 209, 0.13);
}

.steps-toggle svg {
  position: static;
  color: currentColor;
}

.mission-step-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
  --step-axis-y: 25px;
  --step-circle-size: 50px;
}

.mission-step-track::before {
  position: absolute;
  left: 7%;
  right: 7%;
  top: var(--step-axis-y);
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), rgba(255, 209, 102, 0.75), rgba(173, 235, 222, 0.1));
  content: "";
}

.mission-step-track li {
  position: relative;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  grid-template-rows: var(--step-circle-size) auto auto;
  gap: 0 12px;
  align-items: start;
  min-height: 142px;
  padding: 0 10px 14px;
  color: var(--muted);
}

.mission-step-track .step-index {
  display: grid;
  grid-column: 1;
  grid-row: 1;
  width: var(--step-circle-size);
  height: var(--step-circle-size);
  place-items: center;
  border: 1px solid rgba(49, 234, 209, 0.36);
  border-radius: 50%;
  color: #03120f;
  background: var(--cyan);
  font-weight: 900;
  box-shadow: 0 0 28px rgba(49, 234, 209, 0.2);
}

.mission-step-track li svg {
  position: absolute;
  left: 74px;
  top: 0;
  color: var(--cyan);
}

.mission-step-track li strong,
.mission-step-track li small {
  grid-column: 2;
  display: block;
}

.mission-step-track li strong {
  grid-row: 1;
  align-self: end;
  margin-bottom: 2px;
  color: var(--text);
  font-size: 17px;
}

.mission-step-track li small {
  grid-row: 2;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.55;
}

.mission-step-track li.active .step-index {
  background: var(--amber);
  box-shadow: 0 0 30px rgba(255, 209, 102, 0.22);
}

.mission-step-track li.active svg,
.mission-step-track li.active small a {
  color: var(--amber);
}

.mission-workspace {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.mission-form {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 26px;
}

.code-module,
.session-console,
.query-command {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.052), transparent 38%),
    rgba(8, 16, 14, 0.88);
  box-shadow: var(--shadow);
}

.code-module {
  display: grid;
  align-content: start;
  gap: 22px;
  min-height: 420px;
  padding: 26px;
}

.module-heading {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.module-heading svg {
  width: 26px;
  height: 26px;
  color: var(--cyan);
}

.module-heading strong,
.module-heading small,
.code-state strong,
.code-state small,
.query-copy strong,
.query-copy small {
  display: block;
}

.module-heading strong,
.query-copy strong {
  color: var(--text);
  font-size: 20px;
}

.module-heading small,
.code-state small,
.query-copy small {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.55;
}

.compact-field input {
  min-height: 54px;
}

.code-state {
  display: flex;
  gap: 13px;
  padding: 14px;
  border: 1px solid rgba(173, 235, 222, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.state-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: var(--radius);
  color: var(--cyan);
  background: rgba(49, 234, 209, 0.1);
}

.session-console {
  min-height: 520px;
  padding: 22px;
}

.console-heading,
.console-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.console-title,
.console-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.console-title {
  color: var(--cyan);
  font-size: 20px;
}

.console-title svg {
  width: 24px;
  height: 24px;
}

.console-meta {
  color: var(--muted);
  font-size: 13px;
}

.console-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.terminal-field {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  margin-top: 18px;
  border: 1px solid rgba(173, 235, 222, 0.2);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(0, 4, 3, 0.78);
}

.terminal-field > span {
  display: grid;
  place-items: start center;
  padding-top: 18px;
  border-right: 1px solid rgba(173, 235, 222, 0.12);
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.terminal-field textarea {
  min-height: 300px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Microsoft YaHei", monospace;
}

.console-footer {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed rgba(173, 235, 222, 0.18);
}

.console-footer .status-strip {
  flex: 1 1 auto;
}

.mission-submit {
  width: 230px;
}

.query-command {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  padding: 24px 28px;
}

.query-copy {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.query-copy svg {
  width: 24px;
  height: 24px;
  color: var(--cyan);
}

.query-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 12px;
  align-items: start;
}

.query-form textarea {
  min-height: 112px;
  resize: vertical;
}

.query-form .icon-text-btn {
  min-height: 46px;
}

.query-command .record-box {
  grid-column: 1 / -1;
  margin-top: 0;
}

.record-list {
  display: grid;
  gap: 12px;
}

.record-item {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(173, 235, 222, 0.12);
  border-radius: var(--radius);
  background: rgba(1, 5, 4, 0.34);
}

.record-code-title {
  display: block;
  margin-bottom: 10px;
  color: #e8fff9;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.trust-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  width: min(1340px, calc(100% - 44px));
  margin: 0 auto 28px;
  color: var(--muted-strong);
  font-size: 13px;
}

.trust-footer span {
  display: inline-flex;
  align-items: center;
  gap: 20px;
}

.trust-footer span + span::before {
  width: 1px;
  height: 12px;
  background: rgba(173, 235, 222, 0.28);
  content: "";
}

@media (max-width: 1100px) {
  h1 {
    font-size: 48px;
  }

  .public-layout,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .exchange-panel {
    min-height: auto;
  }

  .mission-console-title {
    display: none;
  }

  .mission-brand {
    flex-basis: auto;
  }

  .mission-step-track {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mission-step-track::before {
    display: none;
  }

  .mission-form,
  .query-command {
    grid-template-columns: 1fr;
  }

  .code-module {
    min-height: auto;
  }
}

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

  .admin-command {
    align-items: flex-start;
    flex-direction: column;
  }

  .command-status {
    justify-content: flex-start;
  }

  .console-heading,
  .console-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .mission-submit {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .topbar,
  .admin-topbar {
    align-items: flex-start;
    flex-direction: column;
    min-height: auto;
    padding: 16px 0;
  }

  .topbar-actions,
  .admin-actions,
  .panel-heading-row,
  .table-tools,
  .generated-toolbar {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .system-pill,
  .ghost-link,
  .ghost-btn,
  .icon-text-btn {
    width: 100%;
  }

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

  h1 {
    font-size: 38px;
  }

  .login-heading h1,
  .admin-command h1 {
    font-size: 30px;
  }

  .public-layout,
  .admin-layout,
  .topbar,
  .admin-topbar {
    width: calc(100% - 22px);
    max-width: 1440px;
  }

  .exchange-panel,
  .info-panel,
  .admin-panel,
  .login-card,
  .admin-command {
    padding: 16px;
  }

  .signal-row {
    align-items: stretch;
    flex-direction: column;
  }

  .signal-row span {
    justify-content: flex-start;
    width: 100%;
  }

  dl {
    grid-template-columns: 1fr;
  }

  .search-field {
    width: 100%;
    min-width: 0;
  }

  .segmented {
    width: 100%;
  }

  .segmented button {
    flex: 1 1 auto;
  }

  .mission-topbar,
  .mission-layout,
  .trust-footer {
    width: calc(100% - 22px);
  }

  .mission-topbar {
    align-items: flex-start;
    min-height: auto;
    padding: 16px;
  }

  .mission-brand strong {
    font-size: 17px;
  }

  .mission-steps,
  .public-warning-panel,
  .code-module,
  .session-console,
  .query-command {
    padding: 16px;
  }

  .public-warning-panel {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 12px;
  }

  .public-warning-panel .warning-icon {
    width: 40px;
    height: 40px;
  }

  .public-warning-panel strong {
    font-size: 16px;
  }

  .public-warning-panel p {
    font-size: 13px;
    line-height: 1.65;
  }

  .steps-heading-row {
    margin-bottom: 0;
  }

  .mission-steps:not(.is-collapsed) .steps-heading-row {
    margin-bottom: 12px;
  }

  .mission-steps h1 {
    font-size: 19px;
  }

  .steps-toggle {
    display: inline-flex;
    min-width: 126px;
    padding: 0 10px;
  }

  .steps-toggle span {
    white-space: nowrap;
  }

  .steps-toggle small {
    display: none;
  }

  .mission-steps.is-collapsed .mission-step-track {
    display: none;
  }

  .mission-step-track {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .mission-step-track::before {
    display: none;
  }

  .mission-step-track li {
    grid-template-columns: 44px minmax(0, 1fr);
    grid-template-rows: 40px auto auto;
    min-height: 70px;
    padding: 10px 6px;
  }

  .mission-step-track .step-index {
    width: 40px;
    height: 40px;
    font-size: 12px;
  }

  .mission-step-track li svg {
    left: 60px;
    top: 11px;
  }

  .mission-step-track li strong,
  .mission-step-track li small {
    grid-column: 2;
  }

  .mission-step-track li strong {
    font-size: 15px;
  }

  .mission-step-track li small {
    line-height: 1.45;
  }

  .terminal-field {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .terminal-field textarea {
    min-height: 250px;
  }

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

  .trust-footer {
    flex-wrap: wrap;
    gap: 12px 16px;
  }
}

/* Recharge state and modal */
.step-action {
  grid-column: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: fit-content;
  min-height: 32px;
  margin-top: 8px;
  padding: 0 11px;
  border: 1px solid rgba(49, 234, 209, 0.34);
  border-radius: var(--radius);
  color: #dcfff7;
  background: rgba(49, 234, 209, 0.08);
  font-size: 12px;
  font-weight: 850;
}

.step-action:hover {
  border-color: var(--cyan);
  background: rgba(49, 234, 209, 0.14);
}

.mission-step-track .step-action svg {
  position: static;
  width: 14px;
  height: 14px;
  color: currentColor;
}

.recharge-wait {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid rgba(255, 209, 102, 0.38);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(255, 209, 102, 0.12), rgba(49, 234, 209, 0.055)),
    rgba(5, 12, 10, 0.92);
}

.recharge-wait.completed {
  border-color: rgba(139, 246, 176, 0.46);
  background: rgba(139, 246, 176, 0.1);
}

.recharge-wait.rejected {
  border-color: rgba(255, 99, 125, 0.5);
  background: rgba(255, 99, 125, 0.1);
}

.wait-spinner {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border: 3px solid rgba(255, 255, 255, 0.16);
  border-top-color: var(--amber);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

.recharge-wait.completed .wait-spinner,
.recharge-wait.rejected .wait-spinner {
  animation: none;
  border-color: currentColor;
}

.wait-copy strong,
.wait-copy span,
.wait-copy small {
  display: block;
}

.wait-copy strong {
  color: #fff8db;
  font-size: 16px;
}

.recharge-wait.completed .wait-copy strong {
  color: #e3fff0;
}

.recharge-wait.rejected .wait-copy strong {
  color: #ffd1da;
}

.wait-copy span {
  margin-top: 4px;
  color: var(--muted-strong);
  line-height: 1.6;
}

.wait-copy small {
  margin-top: 6px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.notice-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 6, 5, 0.72);
  backdrop-filter: blur(12px);
}

.notice-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 14px;
  width: min(420px, 100%);
  padding: 20px;
  border: 1px solid rgba(49, 234, 209, 0.32);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), transparent 44%),
    rgba(7, 16, 14, 0.98);
  box-shadow: var(--shadow);
}

.notice-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: var(--radius);
  color: var(--amber);
  background: rgba(255, 209, 102, 0.12);
}

.notice-icon.success {
  color: var(--mint);
  background: rgba(119, 255, 178, 0.12);
}

.notice-card strong,
.notice-card p {
  margin: 0;
}

.notice-card strong {
  display: block;
  color: var(--text);
  font-size: 18px;
}

.notice-card p {
  margin-top: 8px;
  color: var(--muted-strong);
  line-height: 1.7;
}

.notice-card .primary-btn {
  grid-column: 1 / -1;
}

.confirm-card {
  width: min(480px, 100%);
}

.plan-warning-card {
  width: min(560px, 100%);
}

.plan-warning-meta {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
  padding: 6px 10px;
  border: 1px solid rgba(49, 234, 209, 0.22);
  border-radius: 999px;
  color: var(--muted-strong);
  background: rgba(49, 234, 209, 0.08);
  font-size: 13px;
}

.plan-warning-meta b {
  color: var(--text);
  overflow-wrap: anywhere;
}

.plan-warning-text {
  max-height: 240px;
  overflow: auto;
  margin-top: 14px !important;
  padding: 12px 14px;
  border: 1px solid rgba(255, 209, 102, 0.24);
  border-radius: 14px;
  color: #fff8df !important;
  background: rgba(255, 209, 102, 0.08);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.confirm-copy {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  color: var(--muted-strong);
  line-height: 1.7;
}

.confirm-copy b {
  color: var(--text);
  font-weight: 860;
  overflow-wrap: anywhere;
}

.confirm-actions {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.confirm-actions .primary-btn,
.confirm-actions .icon-text-btn {
  min-height: 46px;
  justify-content: center;
}

.confirm-actions .primary-btn {
  grid-column: auto;
}

.is-hidden {
  display: none !important;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes tunnelBackdropDrift {
  from {
    background-position: center, center, 50% 50%;
  }

  to {
    background-position: center, center, 53% 52%;
  }
}

@keyframes tunnelScanFlow {
  from {
    background-position: -40% 0, 120% 0, center;
  }

  to {
    background-position: 24% 0, 58% 0, center;
  }
}

@keyframes tunnelGridPulse {
  from {
    background-position: 0 0, 0 0, 50% 100%, 78% 74%;
  }

  to {
    background-position: 0 48px, 42px 0, 50% 96%, 74% 70%;
  }
}

@keyframes tunnelBeamSweep {
  from {
    background-position: -36% 8%, 112% 94%, -20% 54%, 16% 44%, 84% 50%;
  }

  to {
    background-position: 24% 12%, 64% 88%, 30% 52%, 20% 46%, 80% 48%;
  }
}

@keyframes tunnelParticleDrift {
  from {
    background-position: 14% 26%, 24% 68%, 52% 76%, 74% 30%, 84% 72%, 0 0;
  }

  to {
    background-position: 18% 30%, 28% 62%, 50% 70%, 70% 34%, 80% 66%, 0 80px;
  }
}

/* Admin operations redesign */
.admin-ops-shell {
  background:
    linear-gradient(180deg, rgba(49, 234, 209, 0.075), transparent 210px),
    linear-gradient(120deg, rgba(255, 209, 102, 0.045), transparent 44%),
    #050807;
}

.ops-topbar {
  min-height: 84px;
  border-bottom: 1px solid rgba(173, 235, 222, 0.12);
}

.ops-layout {
  gap: 16px;
}

.ops-hero {
  min-height: 132px;
  padding: 26px;
  background:
    linear-gradient(100deg, rgba(49, 234, 209, 0.12), rgba(139, 246, 176, 0.035) 55%, rgba(255, 209, 102, 0.08)),
    rgba(8, 16, 14, 0.9);
}

.ops-hero h1 {
  font-size: 38px;
}

.ops-metrics {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.ops-metrics .metric {
  min-height: 92px;
  padding: 16px;
}

.ops-metrics .metric strong {
  font-size: 30px;
}

.ops-workbench {
  display: grid;
  grid-template-columns: minmax(340px, 0.46fr) minmax(0, 1fr);
  gap: 16px;
  min-width: 0;
}

.ops-left-stack {
  display: grid;
  align-content: start;
  gap: 16px;
  min-width: 0;
}

.bulk-panel textarea {
  min-height: 164px;
}

.bulk-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  margin-top: 12px;
}

.bulk-actions {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.bulk-actions .primary-btn,
.bulk-actions .icon-text-btn {
  width: 100%;
}

.bulk-result {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(173, 235, 222, 0.14);
  border-radius: var(--radius);
  color: var(--muted-strong);
  background: rgba(1, 5, 4, 0.44);
  line-height: 1.6;
}

.bulk-result.empty {
  color: var(--muted);
}

.ops-card-console {
  padding: 22px;
}

.select-input {
  margin-top: 8px;
}

.badge.deleted {
  background: #8fa0ac;
}

@media (max-width: 1220px) {
  .ops-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ops-workbench {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .mission-shell::before {
    background-position: center, center, 50% 50%;
    background-size: cover, cover, auto 100vh;
    opacity: 0.92;
    animation-duration: 52s;
  }

  .mission-shell::after {
    background-size: 220% 100%, 200% 100%, 100% 100%;
    opacity: 0.38;
    animation-duration: 34s;
  }

  .tech-pattern {
    background-size: 100% 260px, 150px 100%, 100% 100%, 100% 100%;
    opacity: 0.58;
    animation-duration: 36s;
  }

  .tech-pattern::before {
    background-size: 230% 230%, 220% 220%, 180% 100%, 100% 100%, 100% 100%;
    opacity: 0.48;
    animation-duration: 28s;
  }

  .tech-pattern::after {
    background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 320px;
    opacity: 0.34;
    animation-duration: 30s;
  }

  .mission-step-track .step-action {
    grid-column: 1 / -1;
    width: 100%;
  }

  .recharge-wait {
    align-items: flex-start;
  }

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

  .ops-metrics,
  .bulk-controls,
  .bulk-actions {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mission-shell::before,
  .mission-shell::after,
  .tech-pattern::before,
  .tech-pattern::after,
  .tech-pattern,
  .wait-spinner {
    animation: none;
  }
}

/* Admin workspace v2 */
body.admin-ops-shell {
  color-scheme: light;
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-strong: #f9fafb;
  --surface-soft: #eef2f6;
  --line: #d8e0e8;
  --line-strong: #8aa0b8;
  --text: #17202a;
  --muted: #667382;
  --muted-strong: #445160;
  --cyan: #2563eb;
  --green: #16a34a;
  --amber: #d97706;
  --rose: #dc2626;
  --shadow: 0 16px 42px rgba(25, 39, 52, 0.1);
  background: #f4f6f8;
}

body.admin-ops-shell::before,
body.admin-ops-shell::after,
.admin-ops-shell .grid-glow,
.admin-ops-shell .console-panel::before {
  display: none;
}

.admin-ops-shell a {
  color: var(--cyan);
}

.admin-ops-shell .topbar {
  width: min(1500px, calc(100% - 32px));
}

.admin-ops-shell .ops-topbar {
  min-height: 76px;
  border-bottom: 1px solid #dfe6ee;
}

.admin-ops-shell .brand-mark {
  border-color: #c7d2df;
  color: #ffffff;
  background: linear-gradient(135deg, #1d4ed8, #0f766e);
  box-shadow: none;
}

.admin-ops-shell .brand {
  color: var(--text);
}

.admin-ops-shell .brand small,
.admin-ops-shell .metric span,
.admin-ops-shell .data-table td small {
  color: var(--muted);
}

.admin-ops-shell .admin-actions {
  flex-wrap: wrap;
}

.admin-ops-shell .ghost-link,
.admin-ops-shell .ghost-btn,
.admin-ops-shell .icon-text-btn,
.admin-ops-shell .mini-btn,
.admin-ops-shell .copy-link {
  border-color: #d6dee7;
  color: #243244;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(25, 39, 52, 0.04);
}

.admin-ops-shell .ghost-link:hover,
.admin-ops-shell .ghost-btn:hover,
.admin-ops-shell .icon-text-btn:hover,
.admin-ops-shell .mini-btn:hover,
.admin-ops-shell .copy-link:hover {
  border-color: #9eb2c8;
  background: #f6f9fc;
}

.admin-ops-shell .mini-btn:disabled,
.admin-ops-shell .icon-text-btn:disabled {
  cursor: not-allowed;
  color: #9aa6b2;
  background: #eef2f6;
  box-shadow: none;
}

.admin-ops-shell .danger-action,
.admin-ops-shell .mini-btn.danger {
  border-color: #fecaca;
  color: #991b1b;
  background: #fff1f2;
}

.admin-ops-shell .mini-btn.success {
  color: #065f46;
  background: #dcfce7;
}

.admin-ops-shell .security-warning {
  border-color: #fed7aa;
  color: #92400e;
  background: #fffbeb;
}

.admin-ops-shell .admin-layout {
  width: min(1500px, calc(100% - 32px));
  gap: 18px;
  margin-top: 18px;
}

.admin-ops-shell .admin-panel,
.admin-ops-shell .metric,
.admin-ops-shell .admin-command {
  border-color: #dce4ec;
  background: #ffffff;
  box-shadow: var(--shadow);
  backdrop-filter: none;
}

.admin-ops-shell .ops-hero {
  min-height: 104px;
  padding: 22px 24px;
  background: linear-gradient(90deg, #ffffff, #eef6ff 56%, #fff7ed);
}

.admin-ops-shell .ops-hero h1 {
  color: #111827;
  font-size: 28px;
  line-height: 1.2;
}

.admin-ops-shell .eyebrow {
  color: #1d4ed8;
}

.admin-ops-shell .command-status span {
  border-color: #d6dee7;
  color: #425166;
  background: rgba(255, 255, 255, 0.72);
}

.admin-ops-shell .ops-metrics {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
}

.admin-ops-shell .metric {
  min-height: 88px;
  padding: 16px;
}

.admin-ops-shell .metric::after {
  background: linear-gradient(90deg, #2563eb, #16a34a, transparent);
}

.admin-ops-shell .metric strong {
  color: #111827;
  font-size: 28px;
}

.admin-workspace {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  min-width: 0;
}

.admin-toolrail,
.admin-main-stack {
  display: grid;
  align-content: start;
  gap: 18px;
  min-width: 0;
}

.admin-toolrail {
  order: 2;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-main-stack {
  order: 1;
}

.admin-ops-shell .admin-panel {
  padding: 18px;
}

.admin-ops-shell .panel-title {
  margin-bottom: 14px;
  color: #17202a;
}

.admin-toolrail .generate-form,
.admin-toolrail .bulk-controls,
.admin-toolrail .bulk-actions {
  grid-template-columns: 1fr;
}

.admin-toolrail .generated-output textarea,
.admin-toolrail .bulk-panel textarea {
  min-height: 132px;
}

.admin-ops-shell input,
.admin-ops-shell textarea,
.admin-ops-shell select {
  border-color: #cfd8e3;
  color: #17202a;
  background: #ffffff;
  box-shadow: none;
}

.admin-ops-shell input::placeholder,
.admin-ops-shell textarea::placeholder {
  color: #9aa6b2;
}

.admin-ops-shell input:focus,
.admin-ops-shell textarea:focus,
.admin-ops-shell select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.admin-ops-shell .primary-btn {
  color: #ffffff;
  background: linear-gradient(135deg, #1d4ed8, #0f766e);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
}

.admin-ops-shell .primary-btn:disabled {
  color: #9aa6b2;
  background: #e5eaf0;
}

.admin-ops-shell .generated-output,
.admin-ops-shell .bulk-result {
  border-color: #dce4ec;
  color: #445160;
  background: #f8fafc;
}

.mail-settings-form {
  display: grid;
  gap: 10px;
}

.mail-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.mail-actions .icon-text-btn {
  justify-content: center;
  min-height: 52px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  color: #445160;
  font-size: 13px;
  font-weight: 760;
}

.admin-ops-shell .check-row input {
  width: 18px;
  min-width: 18px;
  min-height: 18px;
  padding: 0;
  accent-color: #2563eb;
}

.setting-status {
  min-height: 38px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid #dce4ec;
  border-radius: var(--radius);
  color: #445160;
  background: #f8fafc;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.setting-status.success {
  border-color: #bbf7d0;
  color: #166534;
  background: #f0fdf4;
}

.setting-status.empty {
  color: #667382;
}

.setting-status.danger {
  border-color: #fecaca;
  color: #b91c1c;
  background: #fff1f2;
}

.automation-settings-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.automation-settings-list.empty {
  color: #64748b;
  font-size: 13px;
  line-height: 1.6;
}

.automation-toggle-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #dce4ec;
  border-radius: 14px;
  background: #ffffff;
}

.automation-controls {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 12px;
}

.api-plan-field {
  display: grid;
  gap: 5px;
  color: #667382;
  font-size: 11px;
  font-weight: 800;
}

.api-plan-field select {
  width: 104px;
  min-height: 36px;
  padding: 0 9px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.automation-toggle-row strong,
.automation-toggle-row small {
  display: block;
}

.automation-toggle-row strong {
  color: #101828;
  font-size: 14px;
}

.automation-toggle-row small {
  margin-top: 4px;
  color: #667382;
  font-size: 12px;
  line-height: 1.45;
}

.switch-field {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #344054;
  font-size: 12px;
  font-weight: 850;
}

.switch-field input {
  width: 38px;
  height: 20px;
  margin: 0;
  accent-color: #2563eb;
}

.copy-settings-panel {
  overflow: hidden;
}

.copy-settings-heading {
  align-items: flex-start;
}

.copy-settings-heading .panel-title {
  margin-bottom: 7px;
}

.copy-settings-heading p {
  margin: 0;
  color: #667382;
  font-size: 13px;
  line-height: 1.6;
}

.copy-settings-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.copy-settings-actions .primary-btn,
.copy-settings-actions .icon-text-btn {
  width: auto;
  min-height: 40px;
}

.copy-placeholder-help {
  margin: 4px 0 14px;
  padding: 10px 12px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  color: #334155;
  background: #eff6ff;
  font-size: 12px;
  line-height: 1.6;
}

.copy-placeholder-help code {
  padding: 2px 5px;
  border-radius: 6px;
  color: #1d4ed8;
  background: #dbeafe;
}

.order-copy-settings-list {
  display: grid;
  gap: 12px;
}

.copy-settings-group {
  border: 1px solid #dce4ec;
  border-radius: 14px;
  background: #f8fafc;
}

.copy-settings-group > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 0 14px;
  color: #17202a;
  cursor: pointer;
  font-weight: 850;
}

.copy-settings-group > summary small {
  color: #667382;
  font-size: 12px;
}

.copy-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0 12px 12px;
}

.copy-setting-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid #dce4ec;
  border-radius: 12px;
  background: #ffffff;
}

.copy-setting-card header {
  margin-bottom: 12px;
}

.copy-setting-card header > div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.copy-setting-card header strong {
  color: #101828;
  font-size: 14px;
}

.copy-setting-card header code {
  padding: 2px 6px;
  border-radius: 6px;
  color: #475569;
  background: #f1f5f9;
  font-size: 11px;
}

.copy-setting-card header p {
  min-height: 38px;
  margin: 7px 0 0;
  color: #667382;
  font-size: 12px;
  line-height: 1.55;
}

.copy-setting-alert {
  margin-top: 10px;
  padding: 9px 10px;
  border: 1px solid #bae6fd;
  border-radius: 10px;
  color: #075985;
  background: #f0f9ff;
  font-size: 12px;
  line-height: 1.55;
}

.copy-setting-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.copy-setting-fields .copy-wide-field {
  grid-column: 1 / -1;
}

.copy-setting-fields textarea {
  min-height: 76px;
  resize: vertical;
  line-height: 1.5;
}

.plan-form {
  display: grid;
  gap: 10px;
}

.plan-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.plan-list.empty {
  padding: 12px;
  border: 1px solid #dce4ec;
  border-radius: var(--radius);
  color: #667382;
  background: #f8fafc;
}

.plan-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.75fr) minmax(260px, 1.25fr) auto;
  gap: 14px;
  align-items: start;
  padding: 12px;
  border: 1px solid #dce4ec;
  border-radius: var(--radius);
  background: #f8fafc;
}

.plan-row label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.plan-row label span {
  color: #667382;
  font-size: 12px;
  font-weight: 760;
}

.plan-row input {
  min-width: 0;
}

.plan-warning-field textarea {
  min-height: 82px;
  resize: vertical;
  line-height: 1.55;
}

.plan-warning-field small {
  color: #7b8794;
  font-size: 12px;
  line-height: 1.55;
}

.plan-row .row-actions {
  align-self: start;
  padding-top: 22px;
}

.admin-ops-shell .bulk-result.empty {
  color: #667382;
}

.success-text {
  color: #047857 !important;
}

.admin-ops-shell .alert.info {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1e3a8a;
}

.admin-ops-shell .alert.success {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.admin-ops-shell .alert.danger {
  border-color: #fecdd3;
  background: #fff1f2;
  color: #991b1b;
}

.admin-ops-shell .segmented {
  border-color: #d6dee7;
  background: #f8fafc;
}

.admin-ops-shell .segmented button {
  color: #5d6978;
}

.admin-ops-shell .segmented button.active {
  color: #ffffff;
  background: #2563eb;
}

.admin-ops-shell .table-tools {
  flex-wrap: wrap;
  margin: 12px 0;
}

.admin-ops-shell .search-field {
  min-width: min(360px, 100%);
}

.compact-select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 760;
}

.compact-select select {
  width: 86px;
  min-height: 38px;
  padding: 0 10px;
}

.compact-select.plan-filter select {
  width: 150px;
}

.selected-actions-bar {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid #dce4ec;
  border-radius: var(--radius);
  background: #f8fafc;
}

.selection-summary,
.selection-actions,
.inline-date-field,
.check-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.selection-summary {
  color: #17202a;
  font-weight: 850;
}

.selection-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.inline-date-field {
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 760;
}

.inline-date-field input {
  width: 210px;
  min-height: 38px;
  padding: 0 10px;
}

.inline-date-field select {
  width: 150px;
  min-height: 38px;
  padding: 0 10px;
}

.admin-ops-shell .table-wrap {
  border-color: #dce4ec;
  background: #ffffff;
}

.admin-ops-shell .data-table {
  min-width: 1160px;
}

.admin-ops-shell .orders-data {
  min-width: 1120px;
}

#ordersTable.table-wrap {
  overflow: visible;
  border: 0;
  background: transparent;
}

.order-list {
  display: grid;
  gap: 10px;
}

.order-list-head,
.order-row {
  display: grid;
  grid-template-columns:
    minmax(260px, 1.05fr)
    minmax(220px, 0.8fr)
    minmax(390px, 1.55fr)
    minmax(240px, 0.9fr)
    132px;
  gap: 14px;
  align-items: stretch;
}

.order-list-head {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid #dce4ec;
  border-radius: var(--radius);
  color: #536171;
  background: #f8fafc;
  font-size: 13px;
  font-weight: 850;
}

.order-list-head span {
  display: flex;
  align-items: center;
  min-width: 0;
}

.order-row {
  padding: 14px;
  border: 1px solid #dce4ec;
  border-radius: var(--radius);
  background: #ffffff;
}

.order-row:hover {
  border-color: #c5d3e2;
  background: #fbfdff;
}

.order-cell {
  min-width: 0;
}

.order-identity strong,
.order-email {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-identity strong {
  color: #101828;
  font-size: 17px;
}

.order-identity small {
  display: block;
  margin-top: 7px;
  color: #667382;
}

.order-code-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin-top: 10px;
}

.order-code-line code {
  display: inline-block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-account {
  display: grid;
  align-content: start;
  gap: 8px;
}

.order-email {
  color: #17202a;
  font-size: 15px;
}

.order-account .copy-link {
  justify-self: start;
  margin-top: 0;
}

.order-token-input,
.order-note-input {
  width: 100%;
  min-height: 126px;
  max-height: 220px;
  resize: vertical;
  line-height: 1.48;
}

.order-token-input {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Microsoft YaHei", monospace;
  font-size: 12px;
}

.order-note-input {
  font-size: 14px;
}

.order-note-editor {
  display: grid;
  gap: 6px;
}

.order-note-editor.has-draft .order-note-input,
.order-note-input.has-draft {
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.14);
}

.note-draft-status {
  min-height: 18px;
  color: #9a5b00;
  font-size: 12px;
  font-weight: 800;
  line-height: 18px;
}

.note-draft-status:empty {
  visibility: hidden;
}

.order-action-cell .row-actions {
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  gap: 8px;
  min-width: 0;
}

.order-action-cell .mini-btn {
  width: 100%;
  white-space: nowrap;
}

.order-mobile-label {
  display: none;
  margin-bottom: 6px;
  color: #667382;
  font-size: 12px;
  font-weight: 850;
}

.admin-ops-shell .data-table th,
.admin-ops-shell .data-table td {
  border-bottom-color: #edf1f5;
}

.admin-ops-shell .data-table th {
  color: #536171;
  background: #f8fafc;
  text-transform: none;
}

.admin-ops-shell .data-table tr:hover td {
  background: #f8fbff;
}

.admin-ops-shell code {
  color: #12324f;
}

.select-col {
  width: 118px;
}

.check-label {
  white-space: nowrap;
}

.check-label input,
.card-row-check {
  width: 16px;
  min-height: 16px;
  accent-color: #2563eb;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  margin-top: 12px;
  color: #536171;
  font-size: 13px;
}

.pager-actions {
  display: inline-flex;
  gap: 8px;
}

.admin-ops-shell .badge {
  color: #ffffff;
}

.admin-ops-shell .badge.pending {
  color: #111827;
  background: #facc15;
}

.admin-ops-shell .badge.completed,
.admin-ops-shell .badge.active {
  background: #16a34a;
}

.admin-ops-shell .badge.rejected,
.admin-ops-shell .badge.disabled {
  background: #dc2626;
}

.admin-ops-shell .badge.used {
  background: #7c3aed;
}

.admin-ops-shell .badge.unused {
  color: #344054;
  background: #e5e7eb;
}

.admin-ops-shell .badge.deleted {
  background: #64748b;
}

.admin-ops-shell .badge.auto-processing {
  color: #111827;
  background: #38bdf8;
}

.admin-ops-shell .badge.auto-failed {
  background: #f97316;
}

.admin-ops-shell .badge.auto-disabled {
  color: #344054;
  background: #cbd5e1;
}

.admin-ops-shell .badge.auto-skipped {
  background: #9333ea;
}

.admin-ops-shell .badge.auto-succeeded,
.admin-ops-shell .badge.auto-manual_completed {
  background: #059669;
}

.admin-ops-shell .badge.auto-manual_rejected {
  background: #be123c;
}

@media (max-width: 1440px) {
  .order-list-head {
    display: none;
  }

  .order-row {
    grid-template-columns: minmax(230px, 0.95fr) minmax(220px, 0.85fr) minmax(360px, 1.35fr) 132px;
    grid-template-areas:
      "identity account token actions"
      "identity note note actions";
  }

  .order-identity {
    grid-area: identity;
  }

  .order-account {
    grid-area: account;
  }

  .order-token {
    grid-area: token;
  }

  .order-note {
    grid-area: note;
  }

  .order-action-cell {
    grid-area: actions;
  }

  .order-mobile-label {
    display: block;
  }
}

@media (max-width: 1280px) {
  .admin-ops-shell .ops-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-workspace {
    grid-template-columns: 1fr;
  }

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

  .order-list-head {
    display: none;
  }

  .order-row {
    grid-template-columns: minmax(230px, 0.95fr) minmax(220px, 0.85fr) minmax(360px, 1.35fr) 132px;
    grid-template-areas:
      "identity account token actions"
      "identity note note actions";
  }

  .order-identity {
    grid-area: identity;
  }

  .order-account {
    grid-area: account;
  }

  .order-token {
    grid-area: token;
  }

  .order-note {
    grid-area: note;
  }

  .order-action-cell {
    grid-area: actions;
  }

  .order-mobile-label {
    display: block;
  }
}

@media (max-width: 820px) {
  .admin-ops-shell .ops-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-toolrail {
    grid-template-columns: 1fr;
  }

  .copy-settings-grid,
  .copy-setting-fields {
    grid-template-columns: 1fr;
  }

  .copy-setting-fields .copy-wide-field {
    grid-column: auto;
  }

  .copy-settings-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .automation-toggle-row {
    grid-template-columns: 1fr;
  }

  .automation-controls {
    justify-content: space-between;
  }

  .plan-row {
    grid-template-columns: 1fr;
  }

  .plan-row .row-actions {
    padding-top: 0;
  }

  .order-row {
    grid-template-columns: 1fr;
    grid-template-areas:
      "identity"
      "account"
      "token"
      "note"
      "actions";
  }

  .selected-actions-bar {
    grid-template-columns: 1fr;
  }

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

  .inline-date-field,
  .inline-date-field input,
  .selection-actions .icon-text-btn {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .admin-ops-shell .topbar,
  .admin-ops-shell .admin-layout {
    width: calc(100% - 22px);
  }

  .admin-ops-shell .ops-metrics {
    grid-template-columns: 1fr;
  }

  .admin-ops-shell .ops-hero {
    padding: 18px;
  }
}

/* Admin system-style module navigation */
.admin-workspace.admin-system-layout {
  grid-template-columns: 260px minmax(0, 1fr);
  align-items: start;
  gap: 20px;
}

.admin-module-sidebar {
  position: sticky;
  top: 92px;
  min-width: 0;
  z-index: 5;
}

.module-sidebar-card {
  padding: 14px;
  border: 1px solid #dce4ec;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.module-sidebar-title {
  display: grid;
  gap: 4px;
  padding: 6px 8px 12px;
}

.module-sidebar-title span {
  color: #111827;
  font-size: 16px;
  font-weight: 900;
}

.module-sidebar-title small {
  color: #667382;
  font-size: 12px;
}

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

.admin-module-nav button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: #334155;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  text-align: left;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.admin-module-nav button svg {
  width: 18px;
  height: 18px;
  color: #64748b;
}

.admin-module-nav button:hover {
  border-color: #dbeafe;
  color: #1d4ed8;
  background: #f8fbff;
  transform: translateX(2px);
}

.admin-module-nav button.active {
  border-color: #bfdbfe;
  color: #0f172a;
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
  box-shadow: inset 3px 0 0 #2563eb;
}

.admin-module-nav button.active svg {
  color: #2563eb;
}

.admin-section-stage {
  min-width: 0;
}

.admin-section-stage .admin-toolrail,
.admin-section-stage .admin-main-stack {
  display: contents;
}

.admin-section-stage .admin-panel[data-admin-section] {
  display: none;
}

.admin-section-stage .admin-panel[data-admin-section].is-active {
  display: block;
  min-height: 420px;
  animation: adminSectionIn 0.18s ease;
}

.admin-section-stage .admin-panel[hidden] {
  display: none !important;
}

.admin-section-stage .generate-form,
.admin-section-stage .bulk-controls,
.admin-section-stage .mail-settings-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-section-stage .generate-form .primary-btn,
.admin-section-stage .bulk-actions,
.admin-section-stage .mail-actions,
.admin-section-stage .check-row,
.admin-section-stage #mailClearPasswordRow {
  grid-column: 1 / -1;
}

@keyframes adminSectionIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1180px) {
  .admin-workspace.admin-system-layout {
    grid-template-columns: 1fr;
  }

  .admin-module-sidebar {
    position: static;
  }

  .admin-module-nav {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .admin-module-nav button {
    justify-content: center;
    min-height: 42px;
    padding: 0 10px;
  }
}

@media (max-width: 820px) {
  .admin-module-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-section-stage .generate-form,
  .admin-section-stage .bulk-controls,
  .admin-section-stage .mail-settings-form {
    grid-template-columns: 1fr;
  }
}
