:root {
  color-scheme: light;
  --ink: #17201b;
  --muted: #617064;
  --line: #d9e1db;
  --paper: #f7f8f5;
  --panel: #ffffff;
  --accent: #0f766e;
  --accent-strong: #0b514c;
  --warn: #a15c12;
  --danger: #b42318;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--paper);
  color: var(--ink);
}

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

button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: white;
  padding: 0 14px;
  cursor: pointer;
}

button.secondary {
  background: #e7efeb;
  color: var(--accent-strong);
}

button.danger {
  background: #f8dad6;
  color: var(--danger);
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px;
  background: #102421;
  color: white;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 32px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #b7ded5;
  color: #102421;
  font-weight: 800;
}

.brand small {
  display: block;
  color: #b8c8c3;
  margin-top: 2px;
}

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

nav a {
  color: #e7efeb;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 6px;
}

nav a:hover {
  background: rgba(255, 255, 255, 0.08);
}

main {
  padding: 24px;
  display: grid;
  gap: 18px;
}

.band {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
}

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

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 28px;
}

h2 {
  font-size: 19px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 12px;
}

.metrics div {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px;
}

.metrics span {
  display: block;
  font-size: 26px;
  font-weight: 800;
}

.metrics small,
.log-list,
.status-line {
  color: var(--muted);
}

.two-col {
  display: grid;
  grid-template-columns: minmax(280px, 420px) 1fr;
  gap: 18px;
}

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

label {
  display: grid;
  gap: 6px;
  font-weight: 650;
  color: #28342e;
}

input,
select,
textarea {
  min-height: 38px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  background: white;
  color: var(--ink);
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
}

.check input {
  width: auto;
}

.upload {
  display: grid;
  grid-template-columns: 180px 1fr auto;
  gap: 10px;
}

.asset-grid,
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
}

.asset,
.post {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: white;
}

.asset img,
.post img,
.post video {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #dce7e3;
}

.asset-body,
.post-body {
  padding: 12px;
  display: grid;
  gap: 10px;
}

.post textarea {
  min-height: 124px;
  resize: vertical;
}

.subtitle-preview {
  max-height: 72px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px;
  color: var(--muted);
  font-size: 13px;
  white-space: pre-wrap;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--muted);
  font-size: 12px;
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.log-list {
  margin-top: 14px;
  display: grid;
  gap: 8px;
}

.log-list div {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.autopilot-grid {
  grid-template-columns: repeat(2, minmax(180px, 1fr));
}

.autopilot-grid h2,
.autopilot-grid button {
  grid-column: 1 / -1;
}

@media (max-width: 860px) {
  .shell,
  .two-col {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .metrics,
  .upload,
  .autopilot-grid {
    grid-template-columns: 1fr;
  }
}
