/* CubeX Panel - palette (spec 09 section 2) */
:root {
  --red: #f60322;
  --gray: #d3d1d2;
  --white: #fdfdfd;
  --ink: #1a1a1a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--white);
  color: var(--ink);
  line-height: 1.5;
}

body.centered {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
}

.card {
  background: var(--white);
  border: 1px solid var(--gray);
  border-radius: 10px;
  padding: 32px;
  max-width: 420px;
  width: 90%;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
}

.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  border-bottom: 2px solid var(--red);
  background: var(--white);
}
.brand { font-weight: 700; color: var(--red); font-size: 18px; }
.nav { display: flex; gap: 14px; flex: 1; flex-wrap: wrap; }
.nav a { color: var(--ink); text-decoration: none; font-size: 14px; }
.nav a:hover { color: var(--red); }
.logout-form { margin: 0; }

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

h1 { font-size: 24px; }
h2 { font-size: 18px; margin-top: 28px; }
.muted { color: #6b6b6b; font-size: 13px; }

.cards { display: flex; gap: 16px; flex-wrap: wrap; }
.stat {
  border: 1px solid var(--gray);
  border-radius: 8px;
  padding: 16px 20px;
  min-width: 150px;
  display: flex;
  flex-direction: column;
}
.stat-num { font-size: 28px; font-weight: 700; color: var(--red); }
.stat-label { font-size: 13px; color: #6b6b6b; }

.table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 14px; }
.table th, .table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--gray); vertical-align: top; }
.table th { font-size: 12px; text-transform: uppercase; color: #6b6b6b; }
.table tr.revoked { opacity: 0.55; }
.details { max-width: 360px; word-break: break-word; }

.btn {
  display: inline-block;
  border: none;
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
}
.btn-primary { background: var(--red); color: var(--white); }
.btn-secondary { background: var(--gray); color: var(--ink); }
.btn-sm { padding: 4px 10px; font-size: 13px; }

.form { display: flex; flex-direction: column; gap: 12px; max-width: 520px; }
.form label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
input, textarea {
  font: inherit;
  padding: 8px 10px;
  border: 1px solid var(--gray);
  border-radius: 6px;
  background: var(--white);
  color: var(--ink);
}
textarea.code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; width: 100%; }
.inline-input { width: 140px; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

.alert { padding: 10px 12px; border-radius: 6px; font-size: 14px; }
.alert-error { background: #fde8ea; color: var(--red); border: 1px solid var(--red); }
.alert-success { background: #e8f9ee; color: #15803d; border: 1px solid #15803d; }

.badge { padding: 2px 8px; border-radius: 999px; font-size: 12px; }
.badge-pending { background: #fff4cc; color: #92700b; }
.badge-accepted { background: #e8f9ee; color: #15803d; }
.badge-refused { background: #fde8ea; color: var(--red); }

.pager { display: flex; gap: 12px; align-items: center; margin-top: 16px; }
.answers dt { font-weight: 600; margin-top: 10px; }
.answers dd { margin: 0; white-space: pre-wrap; }
