:root {
  color-scheme: light dark;
  --bg: #fafafa;
  --fg: #1a1a1a;
  --border: #ddd;
  --accent: #d62976;
  --muted: #777;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212;
    --fg: #eee;
    --border: #333;
    --muted: #999;
  }
}

* { box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--fg);
  margin: 0;
  padding: 2rem 1rem;
}

main {
  max-width: 760px;
  margin: 0 auto;
}

h1 { font-size: 1.4rem; }
h2 { font-size: 1.1rem; margin-top: 2rem; }

form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.9rem;
}

input, textarea, select {
  font: inherit;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  color: inherit;
}

button {
  font: inherit;
  padding: 0.6rem;
  border: none;
  border-radius: 6px;
  background: var(--accent);
  color: white;
  cursor: pointer;
}

button:hover { opacity: 0.9; }
button:disabled { opacity: 0.6; cursor: not-allowed; }

button.secondary-btn {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  align-self: flex-start;
}

.error { color: #d33; font-size: 0.85rem; min-height: 1.2em; }
.hint { color: var(--muted); font-size: 0.8rem; margin: 0; }

.times-block {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 0.75rem;
}
.times-label { font-size: 0.85rem; }
#times-list { display: flex; flex-direction: column; gap: 0.4rem; }
.time-row { display: flex; align-items: center; gap: 0.6rem; }
.time-row .time-input { width: auto; }

.batch {
  margin-top: 1.25rem;
}
.batch-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 0.5rem;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border-radius: 6px 6px 0 0;
}
.error-tag { font-size: 0.75rem; color: #a00; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th, td {
  text-align: left;
  padding: 0.5rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

img.preview, video.preview {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  background: #000;
}

.status {
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  text-transform: uppercase;
}
.status-pending { background: #fff3cd; color: #7a5b00; }
.status-publishing { background: #cfe2ff; color: #084298; }
.status-published { background: #d1e7dd; color: #0f5132; }
.status-failed { background: #f8d7da; color: #842029; }
.status-canceled { background: #e2e3e5; color: #41464b; }

.link-btn {
  background: none;
  color: var(--muted);
  padding: 0;
  font-size: 0.8rem;
  text-decoration: underline;
}
