/* Layout base */
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:#f3f4f6;
  margin:0;
  color:#111827;
}

.container {
  max-width: 1100px;
  margin:0 auto;
  padding:20px;
}

/* Top nav */
.topnav {
  background:#111827;
  padding:10px;
  margin:-20px -20px 20px -20px;
  display:flex;
  align-items:center;
  gap:12px;
}
.topnav a {
  color:#e5e7eb;
  text-decoration:none;
  padding:6px 10px;
  border-radius:6px;
  font-size:14px;
}
.topnav a.active {
  background:#2563eb;
}
.topnav a.right {
  margin-left:auto;
}

/* Cards, alerts */
.card {
  background:#ffffff;
  border-radius:8px;
  border:1px solid #e5e7eb;
  padding:16px;
  margin-bottom:16px;
}

.alert {
  border-radius:6px;
  padding:10px 12px;
  margin-bottom:16px;
  font-size:14px;
}
.alert.success {
  background:#ecfdf5;
  color:#166534;
}
.alert.error {
  background:#fef2f2;
  color:#b91c1c;
}
.alert.warning {
  background:#fffbeb;
  color:#92400e;
}

/* Form inputs */
label {
  display:block;
  font-weight:600;
  margin:8px 0 4px;
}
input[type="text"],
input[type="url"],
input[type="password"],
input[type="number"],
textarea,
select {
  width:100%;
  padding:8px 10px;
  border-radius:6px;
  border:1px solid #d1d5db;
  font-size:14px;
  box-sizing:border-box;
}
textarea {
  resize:vertical;
}

/* Buttons */
button,
.button {
  background:#111827;
  color:#ffffff;
  border:none;
  border-radius:6px;
  padding:8px 14px;
  font-size:14px;
  cursor:pointer;
  text-decoration:none;
  display:inline-block;
}
button.secondary,
.button.secondary {
  background:#4b5563;
}
button.warning,
.button.warning {
  background:#b45309;
}
button:disabled,
.button:disabled {
  opacity:0.6;
  cursor:not-allowed;
}

/* Small buttons */
button.small,
.button.small {
  padding:4px 10px;
  font-size:12px;
}

/* Layout helpers */
.row {
  display:flex;
  gap:16px;
  flex-wrap:wrap;
}
.row > div {
  flex:1;
  min-width:0;
}

/* KPIs */
.grid-3 {
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap:12px;
}
.kpi {
  background:#ffffff;
  border-radius:8px;
  border:1px solid #e5e7eb;
  padding:14px;
  text-align:center;
}
.kpi span {
  display:block;
  font-size:13px;
  color:#6b7280;
}
.kpi strong {
  font-size:20px;
}

/* Tables */
table {
  width:100%;
  border-collapse:collapse;
  font-size:14px;
}
thead {
  background:#f9fafb;
}
th, td {
  padding:8px 10px;
  border-bottom:1px solid #e5e7eb;
  text-align:left;
  vertical-align:top;
}
th {
  font-weight:600;
  font-size:13px;
  color:#4b5563;
}

/* Badges */
.badge {
  display:inline-block;
  padding:2px 8px;
  border-radius:999px;
  font-size:11px;
  background:#e5e7eb;
  color:#374151;
}
.badge.generated  { background:#d1fae5; color:#065f46; }
.badge.sent_wp    { background:#dbeafe; color:#1d4ed8; }
.badge.failed     { background:#fee2e2; color:#b91c1c; }
.badge.queued     { background:#ede9fe; color:#5b21b6; }
.badge.generating { background:#fef3c7; color:#92400e; }
.badge.canceled   { background:#e5e7eb; color:#6b7280; }

/* Misc */
.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size:12px;
}
.small {
  font-size:13px;
  color:#6b7280;
}

/* Ações na listagem de posts */
.actions-inline a.button.small,
.actions-inline button.small {
  padding:4px 10px;
  font-size:12px;
  border-radius:6px;
}

/* Deixar botões de ação alinhados com espaçamento */
.actions-inline a.button.small,
.actions-inline form {
  display:inline-block;
  margin:2px 4px 0 0;
}

/* Cancelar mais discreto (outline) */
.actions-inline button.warning.small {
  background:transparent;
  color:#b45309;
  border:1px solid #b45309;
}

/* Reenfileirar mais discreto também */
.actions-inline button.secondary.small {
  background:transparent;
  color:#4b5563;
  border:1px solid #4b5563;
}

/* Editar com cor padrão */
.actions-inline a.button.small {
  background:#111827;
  color:#ffffff;
}

/* Links em geral */
a {
  color:#2563eb;
}
a:hover {
  text-decoration:underline;
}
