:root {
  color-scheme: dark;
  --bg: #070812;
  --panel: rgba(255, 255, 255, 0.075);
  --panel-strong: rgba(255, 255, 255, 0.115);
  --line: rgba(255, 255, 255, 0.13);
  --text: #f5f7fb;
  --muted: #99a4bb;
  --muted-2: #6e7890;
  --accent: #7c5cff;
  --accent-2: #00d4ff;
  --ok: #4ade80;
  --warn: #fbbf24;
  --danger: #fb7185;
  --shadow: 0 24px 90px rgba(0, 0, 0, 0.42);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 10% 10%, rgba(124, 92, 255, 0.2), transparent 32rem),
    radial-gradient(circle at 90% 0%, rgba(0, 212, 255, 0.12), transparent 34rem),
    linear-gradient(135deg, #070812 0%, #111326 50%, #080a15 100%);
  color: var(--text);
}

a {
  color: inherit;
}

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

.shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  width: 292px;
  height: 100vh;
  padding: 28px 22px;
  border-right: 1px solid var(--line);
  background: rgba(5, 7, 18, 0.72);
  backdrop-filter: blur(24px);
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.brand__mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-size: 28px;
  font-weight: 900;
  box-shadow: 0 14px 45px rgba(124, 92, 255, 0.35);
}

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

.brand strong {
  font-size: 17px;
  letter-spacing: -0.02em;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

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

.nav__link {
  padding: 13px 14px;
  border-radius: 16px;
  text-decoration: none;
  color: var(--muted);
  border: 1px solid transparent;
  transition: 0.18s ease;
}

.nav__link:hover,
.nav__link.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--line);
}

.sidebar__logout {
  margin-top: auto;
}

.main {
  position: relative;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.main--auth {
  display: grid;
  place-items: center;
}

.content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 42px 0 64px;
}

.main--auth .content {
  width: min(1040px, calc(100% - 36px));
}

.bg-orb {
  position: absolute;
  pointer-events: none;
  border-radius: 999px;
  filter: blur(10px);
  opacity: 0.6;
}

.bg-orb--one {
  width: 260px;
  height: 260px;
  top: 80px;
  right: 12%;
  background: radial-gradient(circle, rgba(124, 92, 255, 0.42), transparent 65%);
}

.bg-orb--two {
  width: 360px;
  height: 360px;
  bottom: -130px;
  left: 8%;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.18), transparent 68%);
}

.page-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 28px;
}

.page-header h1,
.auth-card h1,
.glass-form h2,
.panel h2 {
  margin: 0;
  letter-spacing: -0.055em;
}

.page-header h1 {
  font-size: clamp(34px, 5vw, 64px);
  line-height: 0.95;
}

.page-header p,
.panel__head p,
.section-title p,
.auth-card p {
  color: var(--muted);
  margin: 10px 0 0;
  line-height: 1.6;
}

.eyebrow {
  color: var(--accent-2);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 800;
  margin-bottom: 12px;
}

.primary-button,
.ghost-button,
.danger-button {
  border: 0;
  border-radius: 15px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 800;
  min-height: 46px;
  padding: 0 18px;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.primary-button {
  color: white;
  background: linear-gradient(135deg, var(--accent), #5f9bff 48%, var(--accent-2));
  box-shadow: 0 18px 42px rgba(92, 145, 255, 0.25);
}

.primary-button:hover,
.ghost-button:hover,
.danger-button:hover {
  transform: translateY(-1px);
}

.primary-button--link,
.ghost-button--link {
  white-space: nowrap;
}

.ghost-button {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
}

.danger-button {
  color: #fff;
  background: rgba(251, 113, 133, 0.13);
  border: 1px solid rgba(251, 113, 133, 0.38);
}

.flash-stack {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}

.flash {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  color: var(--text);
}

.flash--success {
  border-color: rgba(74, 222, 128, 0.34);
  background: rgba(74, 222, 128, 0.1);
}

.flash--danger {
  border-color: rgba(251, 113, 133, 0.34);
  background: rgba(251, 113, 133, 0.12);
}

.flash--warning {
  border-color: rgba(251, 191, 36, 0.36);
  background: rgba(251, 191, 36, 0.1);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.stat-card,
.panel,
.auth-card,
.glass-form,
.upload-card,
.file-card,
.detail-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.stat-card {
  border-radius: var(--radius-md);
  padding: 22px;
}

.stat-card span {
  color: var(--muted);
  font-size: 14px;
}

.stat-card strong {
  display: block;
  margin-top: 12px;
  font-size: 38px;
  letter-spacing: -0.06em;
}

.stat-card--latest strong {
  font-size: 26px;
  overflow-wrap: anywhere;
}

.panel {
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: 18px;
}

.panel__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 18px;
}

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

.release-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
  text-decoration: none;
}

.release-row small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}

.badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.badges--large .badge {
  font-size: 13px;
  padding: 8px 12px;
}

.badge {
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.07);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  padding: 6px 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.badge--ok {
  color: #bbf7d0;
  border-color: rgba(74, 222, 128, 0.34);
  background: rgba(74, 222, 128, 0.1);
}

.badge--hot {
  color: #dbeafe;
  border-color: rgba(96, 165, 250, 0.4);
  background: rgba(96, 165, 250, 0.13);
}

.empty-state {
  text-align: center;
  padding: 64px 20px;
}

.empty-state__icon {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent-2);
  font-size: 38px;
}

.empty-state h3 {
  margin: 0;
  font-size: 24px;
}

.empty-state p {
  max-width: 520px;
  margin: 10px auto 22px;
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
}

.release-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.release-table th,
.release-table td {
  text-align: left;
  padding: 15px 12px;
  border-bottom: 1px solid var(--line);
}

.release-table th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.table-actions {
  text-align: right !important;
}

.auth-card {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
  border-radius: 36px;
  padding: 18px;
  width: 100%;
}

.auth-card__visual {
  min-height: 520px;
  border-radius: 28px;
  padding: 38px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background:
    radial-gradient(circle at 25% 20%, rgba(0, 212, 255, 0.32), transparent 22rem),
    radial-gradient(circle at 70% 30%, rgba(124, 92, 255, 0.5), transparent 20rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
}

.deploy-mark {
  width: 92px;
  height: 92px;
  border-radius: 28px;
  display: grid;
  place-items: center;
  margin-bottom: auto;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-weight: 900;
  letter-spacing: -0.08em;
  font-size: 30px;
}

.auth-card h1 {
  font-size: clamp(44px, 7vw, 78px);
  line-height: 0.92;
}

.auth-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.auth-pills span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.84);
}

.glass-form {
  border-radius: 28px;
  padding: 34px;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.glass-form h2 {
  font-size: 34px;
  margin-bottom: 28px;
}

.field {
  display: grid;
  gap: 9px;
  margin-bottom: 18px;
}

.field > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.075);
  color: var(--text);
  outline: none;
  padding: 15px 16px;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.field select {
  cursor: pointer;
  appearance: none;
  padding-right: 44px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 22px) 50%,
    calc(100% - 16px) 50%;
  background-size:
    6px 6px,
    6px 6px;
  background-repeat: no-repeat;
}

.field select option {
  background: #111326;
  color: var(--text);
}

.field textarea {
  min-height: 96px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(0, 212, 255, 0.55);
  box-shadow: 0 0 0 4px rgba(0, 212, 255, 0.08);
  background-color: rgba(255, 255, 255, 0.095);
}

.field-error {
  color: #fecdd3;
}

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

.form-section {
  display: grid;
  gap: 18px;
}

.section-title {
  display: flex;
  gap: 15px;
  align-items: flex-start;
}

.section-title > span {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(124, 92, 255, 0.16);
  border: 1px solid rgba(124, 92, 255, 0.32);
  color: #ddd6fe;
  font-weight: 900;
}

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

.upload-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.upload-card {
  position: relative;
  border-radius: var(--radius-md);
  padding: 20px;
  cursor: pointer;
  display: grid;
  gap: 8px;
}

.upload-card:hover {
  border-color: rgba(0, 212, 255, 0.34);
}

.upload-card input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-card__icon,
.file-card__type {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: rgba(0, 212, 255, 0.12);
  border: 1px solid rgba(0, 212, 255, 0.26);
  color: #a5f3fc;
  font-weight: 900;
  font-size: 13px;
}

.upload-card small,
.upload-card em,
.current-files,
.file-card p {
  color: var(--muted);
}

.upload-card em {
  font-style: normal;
  overflow-wrap: anywhere;
}

.current-files {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
}

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

.switch-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.045);
}

.switch-row input {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
  margin-top: 2px;
}

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

.switch-row small {
  color: var(--muted);
  margin-top: 4px;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 18px;
}

.detail-panel {
  border-radius: var(--radius-lg);
  padding: 24px;
}

.meta-list {
  display: grid;
  gap: 12px;
  margin: 22px 0 0;
}

.meta-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.meta-list dt {
  color: var(--muted);
}

.meta-list dd {
  margin: 0;
}

.preline {
  white-space: pre-line;
  line-height: 1.65;
}

.file-cards {
  display: grid;
  gap: 14px;
}

.file-card {
  border-radius: var(--radius-md);
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(180px, 260px) 1fr auto;
  gap: 18px;
  align-items: center;
}

.file-card h3 {
  margin: 10px 0 2px;
  overflow-wrap: anywhere;
}

.file-card code {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--line);
  color: #bfdbfe;
  overflow-wrap: anywhere;
  font-size: 12px;
}

.changelog {
  padding: 18px;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid var(--line);
  color: #d7deed;
}

.danger-zone {
  margin-top: 18px;
  display: flex;
  justify-content: flex-end;
}

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

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

  .sidebar {
    position: static;
    width: auto;
    height: auto;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
  }

  .nav {
    grid-auto-flow: column;
    overflow-x: auto;
    max-width: 100%;
  }

  .sidebar__logout {
    margin-left: auto;
    margin-top: 0;
  }

  .stats-grid,
  .upload-grid,
  .switches,
  .detail-grid,
  .auth-card,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .auth-card__visual {
    min-height: 340px;
  }

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

@media (max-width: 640px) {
  .content {
    width: min(100% - 28px, 1180px);
    padding-top: 24px;
  }

  .sidebar {
    padding: 18px 14px;
  }

  .page-header,
  .panel__head {
    display: grid;
  }

  .page-header h1 {
    font-size: 38px;
  }

  .panel,
  .stat-card,
  .glass-form,
  .auth-card__visual {
    padding: 18px;
  }

  .auth-card {
    padding: 12px;
    border-radius: 28px;
  }

  .form-actions,
  .header-actions {
    display: grid;
  }

  .primary-button--link,
  .ghost-button--link,
  .primary-button,
  .ghost-button,
  .danger-button {
    width: 100%;
  }
}

/* Delivery widgets */
.delivery-panel {
  position: relative;
  overflow: hidden;
}

.delivery-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 0%, rgba(99, 102, 241, 0.18), transparent 34%),
    radial-gradient(circle at 92% 12%, rgba(34, 211, 238, 0.12), transparent 28%);
}

.delivery-panel > * {
  position: relative;
}

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

.delivery-card {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 24px;
  padding: 18px;
  background: rgba(15, 23, 42, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

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

.delivery-card--accent {
  border-color: rgba(34, 211, 238, 0.32);
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.10), rgba(99, 102, 241, 0.10));
}

.delivery-card h3 {
  margin: 8px 0 12px;
  font-size: 15px;
}

.delivery-card code,
.delivery-card pre {
  display: block;
  width: 100%;
  overflow-x: auto;
  white-space: pre;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(2, 6, 23, 0.62);
  color: #dbeafe;
}

.delivery-card code {
  padding: 12px;
  font-size: 12px;
  line-height: 1.55;
}

.delivery-card pre {
  margin: 0;
  padding: 0;
}

.delivery-card pre code {
  border: 0;
  background: transparent;
}

.empty-state--compact {
  padding: 18px;
  border-radius: 20px;
}

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

.warning-panel {
  border-color: rgba(251, 191, 36, 0.32);
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.11), rgba(255, 255, 255, 0.045));
}

.badge--warn {
  color: #fde68a;
  border-color: rgba(251, 191, 36, 0.45);
  background: rgba(251, 191, 36, 0.12);
}

.missing-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0 14px;
}

/* стартового этапа script templates */
.templates-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 18px;
  align-items: stretch;
  overflow: hidden;
  position: relative;
}

.templates-hero::before {
  content: "";
  position: absolute;
  inset: -1px;
  pointer-events: none;
  background:
    radial-gradient(circle at 10% 10%, rgba(34, 211, 238, 0.14), transparent 28%),
    radial-gradient(circle at 86% 12%, rgba(168, 85, 247, 0.15), transparent 32%);
}

.templates-hero > * {
  position: relative;
}

.hero-note {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(34, 211, 238, 0.24);
  background: rgba(2, 6, 23, 0.48);
}

.hero-note span {
  color: var(--muted);
  line-height: 1.65;
}

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

.template-card {
  display: grid;
  gap: 18px;
  align-content: start;
}

.template-card__top h2 {
  margin: 10px 0 8px;
}

.template-card__top p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.template-card__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.template-preview {
  max-height: 360px;
  overflow: auto;
  margin: 0;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(2, 6, 23, 0.62);
  color: #dbeafe;
  line-height: 1.55;
  font-size: 12px;
}

.script-template-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  margin: 16px 0;
  border-radius: 22px;
  border: 1px solid rgba(34, 211, 238, 0.20);
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.10), rgba(99, 102, 241, 0.08));
}

.script-template-bar small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.script-template-bar__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

@media (max-width: 980px) {
  .templates-hero,
  .template-grid,
  .script-template-bar {
    grid-template-columns: 1fr;
  }

  .script-template-bar__actions {
    justify-content: stretch;
  }
}

/* Installation reports */
.stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.badge--danger {
  color: #fecdd3;
  border-color: rgba(251, 113, 133, 0.45);
  background: rgba(251, 113, 133, 0.13);
}

.stat-card--danger strong {
  color: #fecdd3;
}

.muted-line {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.report-hero {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
}

.report-error {
  width: min(460px, 100%);
  padding: 16px;
  border-radius: 20px;
}

.report-error p {
  margin-bottom: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.meta-list {
  display: grid;
  margin: 0;
}

.meta-list dt {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.meta-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.meta-list--wide {
  grid-template-columns: 200px minmax(0, 1fr);
}

.code-block {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
  white-space: pre;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(2, 6, 23, 0.62);
  color: #dbeafe;
}

.badge[href] {
  text-decoration: none;
}

@media (max-width: 820px) {
  .report-hero {
    display: grid;
  }

  .meta-list,
  .meta-list--wide {
    grid-template-columns: 1fr;
  }
}

/* Release channels */
.badge--channel {
  color: #bfdbfe;
  border-color: rgba(96, 165, 250, 0.42);
  background: rgba(59, 130, 246, 0.13);
}

.channel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.channel-card {
  position: relative;
  overflow: hidden;
  padding: 20px;
  min-height: 132px;
  border-radius: 28px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.channel-card::before {
  content: "";
  position: absolute;
  inset: auto -30% -70% auto;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  filter: blur(8px);
  opacity: .45;
}

.channel-card--dev::before { background: #38bdf8; }
.channel-card--testing::before { background: #a78bfa; }
.channel-card--stable::before { background: #34d399; }

.channel-card span,
.channel-card small {
  position: relative;
  z-index: 1;
  display: block;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 12px;
}

.channel-card strong {
  position: relative;
  z-index: 1;
  display: block;
  margin: 12px 0 10px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1;
}

.channel-picker {
  display: grid;
  grid-template-columns: 0.9fr 1.5fr;
  gap: 18px;
  align-items: start;
  margin-top: 18px;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(96, 165, 250, 0.22);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.10), rgba(34, 211, 238, 0.06));
}

.channel-picker h3 {
  margin: 0 0 6px;
}

.channel-picker p {
  margin: 0;
  color: var(--muted);
}

.switches--channels {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.switch-row--channel small {
  font-family: var(--mono);
}

@media (max-width: 980px) {
  .channel-grid,
  .channel-picker,
  .switches--channels {
    grid-template-columns: 1fr;
  }
}

/* Server registry and token vault */
.panel--compact {
  padding: 14px 16px;
}

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

.table-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(125, 211, 252, .38);
}

.table-link:hover,
.table-link:focus {
  color: #bae6fd;
}

.server-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.server-mini-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background:
    radial-gradient(circle at 80% 10%, rgba(34, 211, 238, .12), transparent 36%),
    rgba(255, 255, 255, 0.045);
  text-decoration: none;
  color: inherit;
}

.server-mini-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.server-mini-card small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.server-hero {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  overflow: hidden;
  position: relative;
}

.server-hero::before {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: -90px;
  top: -120px;
  border-radius: 999px;
  background: rgba(34, 211, 238, .14);
  filter: blur(4px);
}

.server-hero > * {
  position: relative;
  z-index: 1;
}

.server-pulse {
  width: 150px;
  height: 150px;
  flex: 0 0 150px;
  display: grid;
  place-items: center;
  text-align: center;
  border-radius: 42px;
  border: 1px solid rgba(34, 211, 238, .24);
  background: rgba(2, 6, 23, .38);
  box-shadow: inset 0 0 50px rgba(34, 211, 238, .08);
}

.server-pulse span,
.server-pulse small {
  display: block;
}

.server-pulse span {
  font-family: var(--mono);
  font-weight: 900;
  font-size: 18px;
}

.server-pulse small {
  margin-top: -34px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 11px;
}

@media (max-width: 820px) {
  .server-hero {
    display: grid;
  }

  .server-pulse {
    width: 100%;
    height: auto;
    min-height: 110px;
    flex-basis: auto;
  }

  .header-actions {
    justify-content: stretch;
  }
}

/* v1.0.10.6 deploy-center packaging */
.release-row--static {
  color: var(--text);
}

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

.panel--warning {
  border-color: rgba(251, 191, 36, 0.25);
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.12), rgba(15, 23, 42, 0.54));
}

@media (max-width: 720px) {
  .actions-inline {
    width: 100%;
    justify-content: flex-start;
  }
}


/* v1.0.10.6 UI polish */
.brand__mark svg,
.deploy-mark svg {
  display: block;
}

.brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  text-transform: none;
  letter-spacing: 0.02em;
  line-height: 1.25;
}

.brand__mark {
  font-size: 0;
}

.nav__link {
  display: flex;
  align-items: center;
  min-height: 46px;
  line-height: 1.15;
}

.eyebrow {
  display: none;
}

.page-header {
  align-items: center;
  margin-bottom: 30px;
}

.page-header > div {
  min-width: 0;
}

.page-header p,
.panel__head p,
.section-title p,
.auth-card p {
  max-width: 780px;
}

.primary-button,
.ghost-button,
.danger-button {
  line-height: 1.05;
  text-align: center;
  white-space: nowrap;
}

.header-actions,
.form-actions,
.actions-inline,
.template-card__actions,
.script-template-bar__actions,
.template-actions {
  gap: 12px;
}

.panel,
.detail-panel,
.stat-card,
.release-row,
.delivery-card,
.template-card,
.server-mini-card,
.channel-card,
.form-card {
  overflow-wrap: anywhere;
}

/* Forms that use WTForms widgets directly */
.form-card {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: grid;
  gap: 20px;
}

.form-card label {
  min-width: 0;
}

.form-card > label,
.form-grid > label {
  display: grid;
  gap: 9px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.form-card > label > label,
.form-grid > label > label {
  color: var(--muted);
}

.form-card input[type="text"],
.form-card input[type="email"],
.form-card input[type="password"],
.form-card input[type="file"],
.form-card select,
.form-card textarea,
.form-card .field {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.075);
  color: var(--text);
  outline: none;
  padding: 14px 16px;
  display: block;
  margin: 0;
  text-transform: none;
  letter-spacing: 0;
  font-size: 15px;
  font-weight: 500;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.form-card input[type="file"] {
  padding-top: 12px;
}

.form-card select {
  appearance: none;
}

.form-card textarea,
.form-card .field--textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.55;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.form-card input:focus,
.form-card select:focus,
.form-card textarea:focus,
.form-card .field:focus {
  border-color: rgba(0, 212, 255, 0.55);
  box-shadow: 0 0 0 4px rgba(0, 212, 255, 0.08);
  background: rgba(255, 255, 255, 0.095);
}

.form-card small {
  color: var(--muted-2);
  line-height: 1.45;
  text-transform: none;
  letter-spacing: 0;
  font-size: 12px;
  font-weight: 600;
}

.form-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.form-grid--checks {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.check-row {
  display: flex !important;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text) !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-size: 14px !important;
  font-weight: 800 !important;
}

.check-row input {
  flex: 0 0 auto;
  width: 20px !important;
  height: 20px !important;
  min-height: 20px !important;
  padding: 0 !important;
  margin: 0 !important;
  accent-color: var(--accent);
}

.check-row span {
  line-height: 1.35;
}

.template-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(34, 211, 238, 0.20);
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.10), rgba(99, 102, 241, 0.08));
}

.code-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
}

.code-grid h3 {
  margin: 0 0 10px;
}

.code-block {
  max-width: 100%;
}

.code-block code,
.code-block pre {
  white-space: pre;
}

.warning-panel {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(251, 191, 36, 0.32);
}

.panel--accent {
  border-color: rgba(34, 211, 238, 0.26);
  background:
    radial-gradient(circle at 16% 0%, rgba(34, 211, 238, 0.12), transparent 28%),
    rgba(255, 255, 255, 0.075);
}

.file-card__type {
  width: auto;
  min-width: 48px;
  max-width: 100%;
  min-height: 48px;
  height: auto;
  padding: 0 12px;
  text-align: center;
  line-height: 1.15;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.upload-card__icon {
  width: 48px;
  height: 48px;
  padding: 0;
}

.delivery-card .file-card__type,
.template-card .file-card__type {
  display: inline-flex;
  justify-self: start;
  align-items: center;
  justify-content: center;
}

.release-table td {
  vertical-align: middle;
}

.release-row {
  min-width: 0;
}

.release-row > div {
  min-width: 0;
}

.release-row strong,
.release-row small {
  overflow-wrap: anywhere;
}

.server-pulse small {
  margin-top: 6px;
}

@media (max-width: 980px) {
  .sidebar {
    gap: 18px;
  }

  .brand {
    min-width: 250px;
  }

  .nav {
    grid-auto-flow: row;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    width: 100%;
  }
}

@media (max-width: 640px) {
  .page-header {
    align-items: stretch;
  }

  .template-actions {
    display: grid;
  }

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

  .brand {
    min-width: 0;
  }

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

/* v1.0.10.6 targeted UI spacing fixes */
.release-form {
  display: grid;
  gap: 22px;
}

.release-form .form-actions {
  margin-top: 0;
}

.release-form .field select,
.release-form .field input,
.release-form .field textarea {
  width: 100%;
}

.upload-grid {
  align-items: stretch;
}

.upload-card {
  min-height: 178px;
  align-content: start;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 15% 0%, rgba(34, 211, 238, 0.10), transparent 38%),
    rgba(255, 255, 255, 0.055);
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.upload-card:hover {
  transform: translateY(-1px);
  background:
    radial-gradient(circle at 15% 0%, rgba(34, 211, 238, 0.16), transparent 38%),
    rgba(255, 255, 255, 0.075);
}

.upload-card strong,
.upload-card small,
.upload-card em {
  display: block;
  min-width: 0;
}

.upload-card strong {
  margin-top: 4px;
  line-height: 1.25;
}

.upload-card small,
.upload-card em {
  line-height: 1.45;
}

.upload-card input[type="file"] {
  cursor: pointer;
}

.template-actions + .field,
.upload-grid + .template-actions,
.current-files + .upload-grid {
  margin-top: 4px;
}

.switches--release {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.detail-grid .panel h2,
.detail-grid .detail-panel h2 {
  margin-bottom: 16px;
}

.detail-grid .badges {
  margin-bottom: 18px;
}

.meta-list div {
  min-width: 0;
}

.code-block + .code-block,
.code-block + div.code-block,
div.code-block + div.code-block,
pre.code-block + pre.code-block {
  margin-top: 18px;
}

.panel .code-block:not(:first-child) {
  margin-top: 12px;
}

.code-block pre {
  margin: 0;
}

.danger-zone {
  margin-top: 22px;
  padding-top: 4px;
}

.danger-zone form {
  margin: 0;
}

.file-card__type {
  max-width: 96px;
  white-space: normal;
  text-wrap: balance;
}

@media (max-width: 820px) {
  .upload-card {
    min-height: 150px;
  }
}

/* v1.0.10.6 storage diagnostics */
.inline-code {
  display: inline-block;
  max-width: 100%;
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.48);
  color: #bfdbfe;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.storage-panel .panel__head form {
  flex: 0 0 auto;
}

button:disabled,
.primary-button:disabled,
.ghost-button:disabled,
.danger-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none !important;
}

.danger-zone--stacked {
  justify-content: flex-end;
}

.danger-zone--stacked form {
  display: grid;
  gap: 14px;
  justify-items: end;
  max-width: 520px;
}

.check-row--danger {
  border-color: rgba(251, 113, 133, 0.28);
  background: rgba(251, 113, 133, 0.08);
}

@media (max-width: 820px) {
  .storage-panel .panel__head form,
  .danger-zone--stacked form {
    width: 100%;
    justify-items: stretch;
  }
}
