:root {
  color-scheme: dark;
  --bg: #070a10;
  --panel: #101722;
  --line: #273244;
  --text: #f7f9ff;
  --muted: #9eabc0;
  --green: #22f59c;
  --red: #ff5065;
  --yellow: #ffd166;
  font-family: Inter, Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 80% 0%, rgba(34, 245, 156, 0.14), transparent 34%),
    radial-gradient(circle at 15% 15%, rgba(255, 80, 101, 0.12), transparent 26%),
    var(--bg);
  color: var(--text);
}

a {
  color: inherit;
}

button,
a {
  font: inherit;
}

.shell-header,
main {
  width: min(1240px, calc(100vw - 48px));
  margin: 0 auto;
}

.shell-header {
  min-height: 132px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(36px, 5vw, 72px);
  line-height: 0.95;
}

h2 {
  margin-bottom: 0;
  font-size: 30px;
}

h3 {
  margin-bottom: 8px;
  font-size: 22px;
}

.header-actions,
.short-actions,
.segmented,
.tag-row,
.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.local-projects {
  display: grid;
  gap: 12px;
}

.local-project-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.local-project-list article {
  padding: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.local-project-list h3 {
  margin: 8px 0;
  font-size: 18px;
}

.local-project-list span {
  color: var(--yellow);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.local-project-list p {
  color: var(--muted);
  margin-bottom: 0;
}

.header-actions a,
button,
.short-actions a {
  min-height: 38px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
}

button.is-active,
.render-button {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
  font-weight: 900;
}

main {
  padding: 32px 0 64px;
}

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

.stats-grid article,
.monitoring-grid article,
.panel,
.short-card,
.preview-box {
  border: 1px solid var(--line);
  background: rgba(16, 23, 34, 0.78);
}

.stats-grid article {
  padding: 20px;
}

.stats-grid span,
.monitoring-grid span,
.muted {
  color: var(--muted);
}

.stats-grid strong {
  display: block;
  margin-top: 12px;
  font-size: 38px;
}

.monitoring-grid {
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.monitoring-grid article {
  padding: 18px;
}

.monitoring-grid strong {
  display: block;
  margin-top: 10px;
  font-size: 30px;
}

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

.monitoring-lists > div {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  padding: 18px;
}

.monitoring-lists ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 20px;
}

.monitoring-lists li {
  color: var(--muted);
}

.monitoring-lists li span {
  color: var(--text);
}

.monitoring-lists li strong {
  float: right;
  color: var(--green);
}

.panel {
  margin-top: 22px;
}

.panel-heading {
  min-height: 82px;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}

.project-form {
  padding: 20px;
  display: grid;
  gap: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 160px 1fr;
  gap: 14px;
}

label {
  display: grid;
  gap: 8px;
}

label span,
.preview-box span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

input,
textarea,
select {
  width: 100%;
  min-height: 40px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: rgba(5, 7, 11, 0.72);
  color: var(--text);
  font: inherit;
}

textarea {
  resize: vertical;
}

input:disabled,
textarea:disabled,
select:disabled,
button:disabled {
  opacity: 0.52;
  cursor: not-allowed;
}

.preview-box {
  padding: 14px;
  display: grid;
  grid-template-columns: 1fr minmax(220px, 360px);
  gap: 14px;
  align-items: center;
}

.preview-box strong,
.preview-box span {
  display: block;
}

.preview-box strong {
  margin-bottom: 6px;
}

.preview-box audio {
  width: 100%;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

th,
td {
  padding: 15px 20px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.track-number {
  color: var(--green);
  font-weight: 900;
}

.listens-cell {
  color: var(--green);
  font-size: 20px;
  font-weight: 900;
}

.track-desc {
  display: block;
  max-width: 520px;
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.45;
}

.status-pill,
.tag {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.status-published {
  color: var(--green);
  border-color: rgba(34, 245, 156, 0.42);
}

.status-held {
  color: var(--yellow);
  border-color: rgba(255, 209, 102, 0.42);
}

.status-draft {
  color: var(--red);
  border-color: rgba(255, 80, 101, 0.42);
}

audio {
  width: 230px;
  max-width: 100%;
  height: 34px;
}

.hooks-cell {
  color: var(--muted);
  max-width: 300px;
}

.storage-cell {
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.small-danger {
  min-height: 30px;
  padding: 0 10px;
  color: var(--red);
  border-color: rgba(255, 80, 101, 0.35);
  background: rgba(255, 80, 101, 0.08);
  font-size: 12px;
  font-weight: 900;
}

.shorts-grid {
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.short-card {
  overflow: hidden;
}

.short-preview {
  min-height: 360px;
  display: grid;
  place-items: center;
  background: #05070b;
  border-bottom: 1px solid var(--line);
}

.short-preview img {
  width: 100%;
  height: 360px;
  object-fit: cover;
}

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

.short-body {
  padding: 18px;
}

.short-body p {
  color: var(--muted);
  line-height: 1.5;
}

.tag-row {
  margin: 14px 0 18px;
}

@media (max-width: 760px) {
  .shell-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 24px 0;
  }

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

  .monitoring-grid,
  .monitoring-lists {
    grid-template-columns: 1fr;
  }

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

  .form-grid,
  .preview-box {
    grid-template-columns: 1fr;
  }
}
