:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f4f5f1;
  color: #17201b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #f4f5f1;
}

button,
input {
  font: inherit;
}

.admin-shell {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 26px 0 40px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 4px;
  color: #5c6f61;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1;
}

h2 {
  font-size: 19px;
}

.tablet-link,
.upload-button,
.icon-button,
.danger-button {
  min-height: 46px;
  border-radius: 8px;
  cursor: pointer;
}

.tablet-link {
  display: inline-grid;
  place-items: center;
  border: 1px solid #cad3c8;
  padding: 0 16px;
  color: #17201b;
  text-decoration: none;
  font-weight: 800;
}

.upload-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border: 1px solid #d6ddd2;
  border-radius: 8px;
  background: #ffffff;
  padding: 22px;
  margin-bottom: 18px;
}

.upload-band p {
  margin-top: 6px;
  color: #627064;
}

.upload-button {
  display: grid;
  place-items: center;
  min-width: 190px;
  border: 0;
  background: #17201b;
  color: #ffffff;
  font-weight: 800;
}

.upload-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 18px;
}

.panel {
  border: 1px solid #d6ddd2;
  border-radius: 8px;
  background: #ffffff;
  padding: 18px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.icon-button {
  width: 46px;
  border: 1px solid #cad3c8;
  background: #f8faf6;
  color: #17201b;
  font-size: 22px;
}

.ads-list,
.stats-list {
  display: grid;
  gap: 10px;
}

.ad-row {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 12px;
  border: 1px solid #e1e6de;
  border-radius: 8px;
  padding: 10px;
}

.ad-row video {
  width: 140px;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  background: #101412;
  object-fit: cover;
}

.ad-info strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ad-info span,
.empty-note,
.status-message {
  color: #627064;
  font-size: 14px;
}

.danger-button {
  width: 48px;
  border: 0;
  background: #fde8ec;
  color: #9c1e32;
  font-size: 24px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.stats-grid article,
.stat-row {
  border: 1px solid #e1e6de;
  border-radius: 8px;
  background: #f8faf6;
  padding: 12px;
}

.stats-grid span {
  display: block;
  font-size: 30px;
  font-weight: 900;
}

.stats-grid p,
.stat-row p {
  margin-top: 2px;
  color: #627064;
  font-size: 13px;
}

.stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.stat-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-message {
  min-height: 22px;
  margin-top: 14px;
}

@media (max-width: 860px) {
  .topbar,
  .upload-band {
    align-items: stretch;
    flex-direction: column;
  }

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

  .ad-row {
    grid-template-columns: 100px minmax(0, 1fr) 48px;
  }

  .ad-row video {
    width: 100px;
  }
}
