:root {
  --theme: #0b1e3a;
  --bg: #f4f6fb;
  --card: #ffffff;
  --text: #1a2230;
  --muted: #6b7686;
  --border: #e3e8f0;
  --error-bg: #fdecec;
  --error-fg: #a12222;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

h1 { font-size: 1.5rem; margin: 0 0 4px; }
h2 { font-size: 1.15rem; margin: 0; }

.muted { color: var(--muted); }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-top: 16px;
}
.card--narrow { max-width: 380px; margin: 64px auto 0; }

.form { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 0.9rem; font-weight: 600; }
.form input,
.form textarea,
.form select {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
}
.form input[type="color"] { padding: 4px; height: 42px; width: 64px; }
.form input:focus,
.form textarea:focus,
.form select:focus { outline: 2px solid var(--theme); border-color: var(--theme); }
.form small { font-weight: 400; }

.fieldset {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.fieldset legend { font-weight: 600; font-size: 0.9rem; padding: 0 6px; }

.icon-preview {
  display: block;
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  object-fit: cover;
}

.form-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.row-actions { display: flex; gap: 12px; white-space: nowrap; }
.row-actions a { font-size: 0.85rem; }

.btn {
  display: inline-block;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}
.btn--primary { background: var(--theme); color: #fff; }
.btn--ghost { background: transparent; border-color: var(--border); color: var(--text); text-decoration: none; }
.btn--danger { background: #b42318; color: #fff; }

.alert { padding: 10px 12px; border-radius: 8px; margin-top: 16px; font-size: 0.9rem; }
.alert--error { background: var(--error-bg); color: var(--error-fg); }
.alert--success { background: #e7f6ec; color: #12633a; }

/* Checkbox inline (label na horizontal, não em coluna como os demais) */
.form label.checkbox {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  font-weight: 400;
}
.form label.checkbox input { width: auto; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.topbar__actions { display: flex; align-items: center; gap: 12px; }

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

.table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.table th, .table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); font-size: 0.92rem; }
.table th { color: var(--muted); font-weight: 600; }
code { background: var(--bg); padding: 2px 6px; border-radius: 4px; font-size: 0.85em; }
