* { box-sizing: border-box; margin: 0; padding: 0; }

/* Author display rules (e.g. main.centered { display: flex }) override the
   UA's [hidden] { display: none } — this keeps the hidden attribute working. */
[hidden] { display: none !important; }

body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: #f4f5f7;
  color: #1a1a1a;
  min-height: 100vh;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #111;
  color: #fff;
  padding: 16px 28px;
}
.topbar h1 { font-size: 20px; letter-spacing: 3px; }
.topbar h1 span { font-weight: 300; color: #b3b3c2; letter-spacing: 1px; }
.topbar button {
  background: transparent;
  color: #b3b3c2;
  border: 1px solid #444;
  border-radius: 6px;
  padding: 6px 14px;
  cursor: pointer;
}
.topbar button:hover { color: #fff; border-color: #888; }

main { max-width: 960px; margin: 0 auto; padding: 28px 20px; }
main.centered { display: flex; justify-content: center; padding-top: 80px; }

.panel {
  background: #fff;
  border: 1px solid #e2e4e8;
  border-radius: 10px;
  padding: 24px 28px;
  margin-bottom: 24px;
}

.panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.panel h2 { font-size: 18px; margin-bottom: 12px; }
.panel-header h2 { margin-bottom: 0; }

.login-panel { width: 360px; }
.login-panel h2 { margin-bottom: 16px; }

label { display: block; font-size: 13px; font-weight: 600; color: #555; margin-bottom: 14px; }
input, textarea, select {
  display: block;
  width: 100%;
  margin-top: 5px;
  padding: 9px 12px;
  font-size: 15px;
  border: 1px solid #ccd0d6;
  border-radius: 7px;
  font-family: inherit;
}
input:focus, textarea:focus { outline: 2px solid #4a7dff; border-color: transparent; }

.checkbox { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.checkbox input { width: auto; margin: 0; }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }

.form-actions { display: flex; align-items: center; gap: 16px; margin-top: 8px; }

button.primary {
  background: #111;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 11px 24px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
button.primary:hover { background: #333; }

button.ghost {
  background: transparent;
  border: 1px solid #ccd0d6;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
  color: #333;
}
button.ghost:hover { background: #f0f1f3; }
button.ghost.danger { color: #c0392b; border-color: #e8c4bf; }
button.ghost.danger:hover { background: #fdf1ef; }

.error { color: #c0392b; font-size: 14px; }
.success-msg { color: #1e8e4e; font-size: 14px; }
.muted { color: #888; font-size: 14px; }

table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 14px; }
th { text-align: left; padding: 8px 10px; border-bottom: 2px solid #e2e4e8; color: #666; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
td { padding: 10px; border-bottom: 1px solid #eef0f2; vertical-align: top; }

.badge { padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; }
.badge.live { background: #e3f6ec; color: #1e8e4e; }
.badge.draft { background: #eef0f2; color: #777; }

.row-actions { white-space: nowrap; }
.row-actions button { margin-left: 6px; }

@media (max-width: 640px) {
  .grid { grid-template-columns: 1fr; }
}
