:root {
  --bg: #141210;
  --panel: #1e1a16;
  --ink: #f3ebe1;
  --muted: #b7a996;
  --line: rgba(243, 235, 225, 0.12);
  --accent: #d9772f;
  --accent-ink: #1a120c;
  --danger: #c94a3a;
  --ok: #6f9f6a;
  --sans: "IBM Plex Sans", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1000px 500px at 10% -10%, rgba(217, 119, 47, 0.18), transparent 60%),
    linear-gradient(180deg, #1a1612 0%, var(--bg) 45%, #0f0d0b 100%);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.45;
}

code {
  font-family: var(--mono);
  font-size: 0.9em;
}

.wrap {
  width: min(920px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
}

.top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.eyebrow {
  margin: 0 0 0.25rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
}

h1,
h2 {
  margin: 0;
  font-weight: 600;
}

h1 {
  font-size: 1.7rem;
}

h2 {
  font-size: 1.05rem;
  margin-bottom: 0.85rem;
}

.panel {
  background: color-mix(in srgb, var(--panel) 92%, black);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.15rem 1.2rem 1.3rem;
  margin-bottom: 1rem;
}

.stack {
  display: grid;
  gap: 0.85rem;
}

.row {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: 1fr 1fr;
}

label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.92rem;
  color: var(--muted);
}

input[type="text"],
input[type="password"],
input[type="file"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #12100e;
  color: var(--ink);
  padding: 0.65rem 0.75rem;
  font: inherit;
}

input[type="file"] {
  padding: 0.45rem 0.55rem;
}

.check {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
}

.check input {
  width: 1rem;
  height: 1rem;
}

.btn {
  appearance: none;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-weight: 600;
  padding: 0.65rem 1rem;
  cursor: pointer;
}

.btn:hover {
  filter: brightness(1.05);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn.danger {
  background: transparent;
  color: #f0b4ad;
  border: 1px solid rgba(201, 74, 58, 0.45);
}

.progress {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.12s linear;
}

.progress-label {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
  font-family: var(--mono);
}

.tag-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

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

.hint {
  margin: 0 0 0.9rem;
  font-size: 0.92rem;
}

.status {
  min-height: 1.2em;
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.status.error {
  color: #f0b4ad;
}

.status.ok {
  color: #b7d7b3;
}

.list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.4rem 0 0.75rem;
}

.list-head h2 {
  margin: 0;
}

.releases {
  display: grid;
  gap: 0.75rem;
}

.program {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.85rem 0.95rem;
  background: rgba(0, 0, 0, 0.18);
}

.program-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}

.program-title strong {
  font-family: var(--mono);
  font-size: 0.98rem;
}

.tag-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}

.tag-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.tag-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.7rem;
  font-family: var(--mono);
  font-size: 0.88rem;
}

.badge {
  display: inline-block;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: rgba(111, 159, 106, 0.2);
  color: #c5e0c1;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
}

.empty {
  color: var(--muted);
  font-size: 0.92rem;
}

@media (max-width: 640px) {
  .row,
  .top,
  .program-title,
  .tag-item,
  .tag-actions,
  .list-head {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .top-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
  }
}
