:root {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #172033;
  background: #f6f7f9;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}
aside {
  background: #172033;
  color: white;
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
h1 { font-size: 20px; margin: 0 0 18px; }
aside button {
  border: 0;
  background: transparent;
  color: #d7deea;
  text-align: left;
  padding: 11px 12px;
  border-radius: 6px;
  font-weight: 700;
}
aside button.active,
aside button:hover { background: #2d3b52; color: #fff; }
#logoutButton { margin-top: auto; background: #3b1f2a; color: #ffd6df; }
main { padding: 28px; max-width: 1280px; width: 100%; }
.head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
h2 { font-size: 24px; margin: 0; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.metric,
.panel,
.table { background: #fff; border: 1px solid #dfe4ea; border-radius: 8px; padding: 16px; }
.metric strong { display: block; font-size: 28px; margin-top: 6px; }
.panel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.compact-panel { grid-template-columns: repeat(3, minmax(0, 1fr)); }
label { display: grid; gap: 6px; font-size: 13px; font-weight: 700; color: #344054; }
input,
select,
textarea { width: 100%; border: 1px solid #cfd6df; border-radius: 6px; padding: 9px; font: inherit; }
textarea { min-height: 94px; resize: vertical; }
.full { grid-column: 1 / -1; }
.notice {
  background: #ecfdf3;
  border: 1px solid #abefc6;
  color: #067647;
  border-radius: 8px;
  padding: 14px;
  margin-top: 14px;
  font-weight: 800;
}
.notice.warning {
  background: #fffaeb;
  border-color: #fedf89;
  color: #93370d;
}
.notice.error,
.error-box {
  background: #fef3f2;
  border: 1px solid #fecdca;
  color: #b42318;
  border-radius: 8px;
  padding: 12px;
  font-weight: 800;
}
.panel button,
.head button,
.row-actions button,
.login-panel button {
  border: 0;
  border-radius: 6px;
  background: #2454c6;
  color: #fff;
  font-weight: 800;
  padding: 10px 14px;
}
.panel button { align-self: end; }
.panel button.secondary,
.row-actions button.secondary { background: #eef2f7; color: #344054; }
.row-actions button.danger { background: #b42318; }
.row-actions { display: flex; gap: 6px; white-space: nowrap; }
.action-note { align-self: center; color: #667085; font-size: 12px; font-weight: 700; }
.row-actions button { padding: 7px 10px; }
.table { overflow: auto; margin: 14px 0 18px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th,
td { border-bottom: 1px solid #edf0f3; text-align: left; padding: 10px; vertical-align: top; }
th { color: #667085; background: #fafbfc; }
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef3ff;
  color: #2448a7;
  font-weight: 800;
}
.modal {
  position: fixed;
  top: 50vh;
  right: max(28px, calc(100vw - 1492px));
  bottom: auto;
  left: 268px;
  transform: translateY(-50%);
  width: min(820px, calc(100vw - 296px));
  max-height: calc(100vh - 96px);
  overflow: auto;
  border: 1px solid #dfe4ea;
  border-radius: 8px;
  padding: 0;
  color: #172033;
  box-shadow: 0 20px 48px rgba(23, 32, 51, .22);
  margin: 0 auto;
}
.modal::backdrop { background: rgba(23, 32, 51, .45); }
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid #edf0f3;
  background: #dfe7f0;
}
.modal-head h3 { margin: 0; font-size: 18px; }
#publishedPostModalBody { padding: 18px; }
.post-modal-summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 12px;
}
.post-modal-summary h4 {
  margin: 4px 0 0;
  font-size: 20px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.eyebrow {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}
.post-modal-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.post-modal-chips span {
  border: 1px solid #dfe4ea;
  border-radius: 999px;
  background: #f8fafc;
  color: #344054;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 9px;
}
.detail-grid {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 0;
  margin: 0;
  border: 1px solid #edf0f3;
  border-radius: 8px;
  overflow: hidden;
}
.detail-grid dt,
.detail-grid dd {
  border-bottom: 1px solid #edf0f3;
  padding: 10px;
}
.detail-grid dt {
  color: #667085;
  font-weight: 800;
  background: #fafbfc;
}
.detail-grid dd { margin: 0; overflow-wrap: anywhere; }
.detail-grid dt:nth-last-child(2),
.detail-grid dd:last-child { border-bottom: 0; }
.detail-alert {
  border-radius: 8px;
  padding: 11px 12px;
  margin-top: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
}
.detail-alert.warning {
  background: #fffaeb;
  border: 1px solid #fedf89;
  color: #93370d;
}
.detail-alert.error {
  background: #fef3f2;
  border: 1px solid #fecdca;
  color: #b42318;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  padding: 14px 18px;
  border-top: 1px solid #edf0f3;
  background: #fafbfc;
}
.modal button {
  border: 0;
  border-radius: 6px;
  padding: 9px 10px;
  font-weight: 800;
}
.modal button.danger {
  color: #fff;
  background: #b42318;
}
.modal button.secondary {
  color: #344054;
  background: #eef2f7;
}
.login-page { display: block; min-height: 100vh; background: #172033; }
.login-wrap { display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.login-panel {
  width: min(420px, 100%);
  background: #fff;
  border: 1px solid #dfe4ea;
  border-radius: 8px;
  padding: 24px;
  display: grid;
  gap: 16px;
}
.login-panel h1 { color: #172033; margin: 0; }
@media (max-width: 760px) {
  body { grid-template-columns: 1fr; }
  aside { position: sticky; top: 0; z-index: 2; }
  main { padding: 18px; }
  .panel { grid-template-columns: 1fr; }
  .compact-panel { grid-template-columns: 1fr; }
  .modal {
    top: 50vh;
    right: 18px;
    left: 18px;
    transform: translateY(-50%);
    width: auto;
    max-height: calc(100vh - 48px);
    margin: 0;
  }
  .detail-grid { grid-template-columns: 1fr; }
  .full { grid-column: auto; }
}
