:root {
  color-scheme: light;
  --blue: #2f7cf6;
  --blue-2: #5aa0ff;
  --green: #16b26b;
  --gold: #c58a18;
  --red-strong: #b9221e;
  --red: #d92d20;
  --border: #d8e0ec;
  --line: #edf0f5;
  --muted: #667085;
  --page: #f5f7fb;
  --text: #172033;
  --white: #fff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(180deg, #fff4ec 0%, #eef5ff 310px, rgba(245, 247, 251, .96) 520px),
    var(--page);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

main {
  max-width: 1220px;
  margin: 0 auto;
  padding: 28px 32px 42px;
}

.admin-chrome {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 32px;
  border-bottom: 1px solid rgba(216, 224, 236, .82);
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 10px 28px rgba(32, 53, 96, .06);
  backdrop-filter: blur(12px);
}

.chrome-brand,
.chrome-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.chrome-brand span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--red-strong), var(--blue));
}

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

.chrome-actions a,
.chrome-actions button {
  height: 34px;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 13px;
}

.chrome-actions a {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  color: #344054;
  font-weight: 800;
  background: #fff;
}

.chrome-actions button {
  color: var(--blue);
  border: 1px solid rgba(47, 124, 246, .34);
  background: #fff;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
  padding: 22px 24px;
  border: 1px solid rgba(216, 224, 236, .78);
  border-radius: 8px;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 16px 44px rgba(92, 49, 43, .08);
  backdrop-filter: blur(10px);
}

.brand h1 {
  margin: 0;
  font-size: 28px;
  letter-spacing: 0;
}

.brand p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.back {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  color: #344054;
  font-weight: 800;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.back:hover {
  transform: translateY(-1px);
  border-color: rgba(47, 124, 246, .32);
  box-shadow: 0 10px 22px rgba(32, 53, 96, .08);
}

.console-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .9fr);
  gap: 18px;
  margin-bottom: 20px;
}

.console-intro,
.console-release {
  border: 1px solid rgba(216, 224, 236, .82);
  border-radius: 8px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 16px 44px rgba(32, 53, 96, .07);
}

.console-intro {
  position: relative;
  min-height: 190px;
  padding: 28px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(185, 34, 30, .96) 0%, rgba(207, 81, 35, .9) 42%, rgba(47, 124, 246, .94) 100%),
    var(--red-strong);
  overflow: hidden;
}

.console-intro::after {
  content: "";
  position: absolute;
  right: -34px;
  bottom: -58px;
  width: 260px;
  height: 110px;
  border-radius: 34px;
  transform: rotate(-10deg);
  background: rgba(255, 220, 132, .16);
}

.console-kicker {
  position: relative;
  z-index: 1;
  display: inline-flex;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  background: rgba(255, 255, 255, .16);
}

.console-intro h2 {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 18px 0 0;
  font-size: 28px;
  line-height: 1.35;
}

.console-intro p {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 10px 0 0;
  color: rgba(255, 255, 255, .88);
  line-height: 1.6;
}

.console-release {
  padding: 24px;
}

.console-release h2 {
  margin-bottom: 10px;
}

.console-release p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.6;
}

.console-buttons {
  display: grid;
  gap: 10px;
}

.console-release .back {
  justify-content: center;
  width: 100%;
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--red-strong), var(--blue));
}

.console-release .secondary-link {
  color: var(--blue);
  border-color: rgba(47, 124, 246, .24);
  background: #fff;
}

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

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

.grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.panel,
.card {
  border: 1px solid rgba(216, 224, 236, .86);
  border-radius: 8px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 12px 30px rgba(32, 53, 96, .07);
}

.panel {
  padding: 24px;
  margin-bottom: 20px;
}

.card {
  position: relative;
  display: block;
  min-height: 124px;
  padding: 22px;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--red-strong), var(--gold), var(--blue));
}

.card:hover {
  transform: translateY(-2px);
  border-color: rgba(47, 124, 246, .32);
  box-shadow: 0 18px 46px rgba(32, 53, 96, .11);
}

.card-title {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
}

.card-desc {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.6;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.stat-card {
  position: relative;
  min-height: 104px;
  padding: 18px;
  border: 1px solid rgba(216, 224, 236, .86);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 10px 26px rgba(32, 53, 96, .06);
  overflow: hidden;
}

.stat-card::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 18px;
  width: 32px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(185, 34, 30, .72), rgba(197, 138, 24, .72), rgba(47, 124, 246, .7));
}

.stat-value {
  color: var(--red-strong);
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
}

.stat-label {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

h2 {
  margin: 0 0 16px;
  font-size: 19px;
  letter-spacing: 0;
}

label {
  display: block;
  margin: 12px 0 6px;
  font-weight: 800;
}

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

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(185, 34, 30, .62);
  box-shadow: 0 0 0 3px rgba(185, 34, 30, .1);
}

textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.55;
}

.long {
  min-height: 180px;
}

button {
  height: 40px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--red-strong), var(--blue));
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(185, 34, 30, .16);
}

button.secondary {
  color: var(--blue);
  border: 1px solid var(--blue);
  background: #fff;
}

button.danger {
  color: var(--red);
  border: 1px solid #f4b8b2;
  background: #fff;
}

button.danger:hover {
  box-shadow: 0 10px 22px rgba(217, 45, 32, .12);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.hint {
  color: var(--muted);
  line-height: 1.6;
}

.inline-link {
  color: var(--blue);
  font-weight: 800;
}

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

.item {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
}

.item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  font-weight: 900;
  line-height: 1.4;
}

.row-actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.checkline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.checkline input {
  width: auto;
}

.status {
  min-height: 24px;
  margin-top: 12px;
  color: #067647;
  font-weight: 800;
}

.empty-list {
  padding: 34px 20px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  color: var(--muted);
  background: #fbfcff;
  text-align: center;
  font-weight: 800;
}

.release-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.release-stat {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.release-stat strong {
  display: block;
  font-size: 30px;
  line-height: 1;
}

.release-stat span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.release-stat.pass strong {
  color: #079455;
}

.release-stat.warn strong {
  color: #b54708;
}

.release-stat.block strong {
  color: var(--red);
}

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

.release-item {
  display: grid;
  grid-template-columns: 74px 1fr;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
}

.release-item.warn {
  border-left-color: #f79009;
}

.release-item.block {
  border-left-color: var(--red);
}

.release-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  border-radius: 8px;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  background: var(--blue);
}

.release-item.warn .release-badge {
  background: #f79009;
}

.release-item.block .release-badge {
  background: var(--red);
}

.release-item strong {
  display: block;
  font-size: 16px;
}

.release-item em {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-style: normal;
  line-height: 1.5;
}

.auth-panel {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(185, 34, 30, .18), rgba(47, 124, 246, .16)),
    rgba(245, 247, 251, .82);
  backdrop-filter: blur(12px);
}

.auth-panel.show {
  display: flex;
}

.auth-card {
  width: min(420px, 100%);
  padding: 34px;
  border: 1px solid rgba(216, 224, 236, .9);
  border-radius: 8px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 24px 70px rgba(32, 53, 96, .16);
}

.auth-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 8px;
  color: #fff;
  font-size: 24px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--red-strong), var(--blue));
  box-shadow: 0 14px 28px rgba(185, 34, 30, .18);
}

.auth-title {
  margin-top: 20px;
  font-size: 24px;
  font-weight: 900;
}

.auth-desc {
  margin: 8px 0 20px;
  color: var(--muted);
  line-height: 1.6;
}

.auth-card button {
  width: 100%;
  margin-top: 14px;
}

.auth-tip {
  min-height: 22px;
  margin-top: 12px;
  color: var(--red);
  font-size: 14px;
  font-weight: 800;
}

.admin-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 1000;
  max-width: calc(100vw - 48px);
  padding: 12px 16px;
  border-radius: 8px;
  color: #fff;
  font-weight: 800;
  background: rgba(23, 32, 51, .92);
  box-shadow: 0 16px 40px rgba(32, 53, 96, .18);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity .18s ease, transform .18s ease;
}

.admin-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 860px) {
  main {
    padding: 18px;
  }

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

  .admin-chrome {
    padding: 10px 18px;
  }

  .chrome-brand strong {
    display: none;
  }

  .grid,
  .console-hero,
  .grid.three,
  .grid.four,
  .release-summary,
  .stat-grid {
    grid-template-columns: 1fr;
  }

  .release-item {
    grid-template-columns: 1fr;
  }
}
