* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #f4f6fb;
  color: #1f2937;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
}

.hero {
  margin-bottom: 16px;
}

.hero h1 {
  margin: 0 0 8px;
}

.card {
  background: #ffffff;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}

textarea,
select,
input[type="datetime-local"] {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 10px;
  font-size: 14px;
}

textarea {
  resize: vertical;
}

.row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 12px 0;
}

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

.toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

button {
  border: none;
  border-radius: 8px;
  padding: 10px 14px;
  background: #2563eb;
  color: #fff;
  cursor: pointer;
  font-weight: 600;
}

button:hover {
  background: #1d4ed8;
}

.hidden {
  display: none;
}

.generated-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
}

#previewImage {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #d1d5db;
}

.history-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}

th,
td {
  text-align: left;
  padding: 10px;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: top;
}

.status {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.status-draft {
  background: #e5e7eb;
}

.status-scheduled {
  background: #dbeafe;
}

.status-publishing {
  background: #fef3c7;
}

.status-published {
  background: #dcfce7;
}

.status-failed {
  background: #fee2e2;
}

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

.btn-secondary {
  background: #4b5563;
}

.btn-danger {
  background: #dc2626;
}

@media (max-width: 800px) {
  .row,
  .generated-grid {
    grid-template-columns: 1fr;
  }
}