:root {
  --bg: #f6f7f8;
  --panel: #fff;
  --text: #161616;
  --muted: #63686d;
  --line: #dfe3e6;
  --brand: #111;
  --accent: #ffd814;
  --danger: #b42318;
  --success: #067647;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.45;
}

a {
  color: #007185;
}

code {
  background: #f0f2f2;
  border-radius: 4px;
  padding: 2px 5px;
}

.topbar {
  align-items: center;
  background: #111;
  color: #fff;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 14px 24px;
}

.brand {
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  text-decoration: none;
}

.topbar nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.topbar nav a {
  color: #fff;
  font-size: 14px;
  text-decoration: none;
}

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

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

h1,
h2 {
  margin: 0;
}

h1 {
  font-size: 28px;
}

h2 {
  font-size: 18px;
  margin-bottom: 14px;
}

.muted {
  color: var(--muted);
  margin: 5px 0 0;
}

.panel,
.stat,
.auth-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
}

.panel {
  margin-bottom: 18px;
  padding: 18px;
}

.stat-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 18px;
}

.stat {
  padding: 16px;
}

.stat span {
  color: var(--muted);
  display: block;
  font-size: 13px;
}

.stat strong {
  display: block;
  font-size: 30px;
  margin-top: 4px;
}

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

table {
  border-collapse: collapse;
  width: 100%;
}

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

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

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

form label {
  display: grid;
  font-size: 13px;
  font-weight: 700;
  gap: 6px;
}

input,
select,
textarea {
  border: 1px solid #c9ced3;
  border-radius: 7px;
  font: inherit;
  padding: 10px;
  width: 100%;
}

textarea {
  resize: vertical;
}

button,
.button {
  background: var(--accent);
  border: 1px solid #fcd200;
  border-radius: 8px;
  color: #111;
  cursor: pointer;
  display: inline-block;
  font: inherit;
  font-weight: 800;
  padding: 10px 15px;
  text-decoration: none;
}

.button.secondary,
button.secondary {
  background: #fff;
  border-color: #c9ced3;
}

.grid-form {
  align-items: end;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.grid-form.wide {
  grid-template-columns: repeat(2, minmax(220px, 1fr));
}

.grid-form .full {
  grid-column: 1 / -1;
}

.checkbox {
  align-items: center;
  display: flex;
  gap: 8px;
}

.checkbox input {
  width: auto;
}

.filters {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.filters select {
  max-width: 280px;
}

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

.inline-actions button {
  background: #fff;
  border-color: #c9ced3;
  font-size: 12px;
  padding: 6px 8px;
}

.badge {
  border-radius: 999px;
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 9px;
}

.badge-approved {
  background: #dcfae6;
  color: #067647;
}

.badge-pending {
  background: #fffaeb;
  color: #b54708;
}

.badge-hidden {
  background: #f2f4f7;
  color: #475467;
}

.pager {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 14px;
}

.pager a {
  border: 1px solid #c9ced3;
  border-radius: 999px;
  padding: 7px 12px;
  text-decoration: none;
}

.alert {
  border-radius: 8px;
  font-weight: 700;
  margin-bottom: 16px;
  padding: 12px 14px;
}

.alert-success {
  background: #dcfae6;
  color: var(--success);
}

.alert-error {
  background: #fee4e2;
  color: var(--danger);
}

.auth-page {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.auth-card {
  max-width: 430px;
  padding: 24px;
  width: 100%;
}

.auth-card h1 {
  margin-bottom: 18px;
}

.auth-card form {
  display: grid;
  gap: 14px;
}

@media (max-width: 700px) {
  .topbar,
  .page-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .grid-form.wide {
    grid-template-columns: 1fr;
  }

  .container {
    padding: 16px;
  }
}
