* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Figtree", "Segoe UI", sans-serif;
  color: #1a1212;
  background: #f6f2ef;
}
a { color: #a50e16; }
h1, h2, .brand {
  font-family: "Bricolage Grotesque", Georgia, serif;
}
.shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}
.side {
  background: #1a1212;
  color: #f7f1ec;
  padding: 1.5rem 1.1rem;
}
.brand {
  display: block;
  color: #fff;
  text-decoration: none;
  font-size: 1.45rem;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: .04em;
}
.brand span { color: #e0b45a; }
.side nav { display: flex; flex-direction: column; gap: 0.25rem; }
.side nav a {
  color: #f0e2d8;
  text-decoration: none;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
}
.side nav a.on,
.side nav a:hover { background: rgba(213, 18, 27, .22); color: #fff; }
.who { margin-top: 2rem; color: #cbb6aa; font-size: 0.85rem; }
main { padding: 2rem 2.2rem 4rem; }
h1 { font-size: 2.4rem; margin: 0 0 0.4rem; }
.lead { color: #6a5b5b; margin-top: 0; }
.flash {
  padding: 0.8rem 1rem;
  border-radius: 8px;
  margin: 1rem 0;
  background: #e7f6ea;
  color: #1d6b32;
}
.flash.err { background: #fde8e4; color: #8d2b1f; }
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.stat {
  background: #fffdfb;
  border: 1px solid #e6d9d0;
  border-radius: 12px;
  padding: 1rem 1.1rem;
}
.stat b {
  display: block;
  font-family: "Bricolage Grotesque", Georgia, serif;
  font-size: 2.2rem;
  line-height: 1;
  color: #d5121b;
}
.actions { display: flex; gap: 0.6rem; flex-wrap: wrap; margin: 1rem 0 1.5rem; }
.btn, button.btn {
  display: inline-block;
  background: #d5121b;
  color: #fff;
  text-decoration: none;
  border: 0;
  border-radius: 999px;
  padding: 0.65rem 1.1rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.btn.quiet, button.quiet {
  background: transparent;
  color: #a50e16;
  padding: 0.2rem 0;
}
.btn.dark { background: #1a1212; }
.btn.gold { background: #c9952a; }
table {
  width: 100%;
  border-collapse: collapse;
  background: #fffdfb;
  border: 1px solid #e6d9d0;
  border-radius: 12px;
  overflow: hidden;
}
th, td {
  text-align: left;
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid #f0e6e0;
  vertical-align: top;
}
th {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #7a6856;
}
.thumb {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border-radius: 8px;
  background: #f3e6d4;
}
form.stack h2 {
  font-size: 1.5rem;
  margin: 1.6rem 0 0.2rem;
}
form.stack, .card {
  background: #fffdfb;
  border: 1px solid #e6d9d0;
  border-radius: 14px;
  padding: 1.2rem;
  max-width: 820px;
}
label { display: block; margin: 0.85rem 0; font-weight: 600; }
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="file"],
select,
textarea {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.7rem 0.75rem;
  border: 1px solid #e0d2c0;
  border-radius: 8px;
  font: inherit;
  background: #fff;
}
textarea { min-height: 120px; resize: vertical; }
.check { font-weight: 500; }
.check input { margin-right: 0.4rem; }
.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}
.note { color: #6a5b5b; font-size: 0.92rem; }
.status {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #eee;
  font-size: 0.78rem;
}
.status-published, .status-resolved { background: #e8f5ec; color: #27584f; }
.status-draft, .status-new { background: #ffe8e0; color: #8a3a24; }
.status-in_progress { background: #fff4e5; color: #8a5a18; }
.status-archived { background: #efe8e4; color: #5c4c4c; }
.image-preview { margin-top: 0.6rem; }
.image-preview img {
  width: min(220px, 100%);
  max-height: 140px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #e6d9d0;
}
.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background:
    radial-gradient(circle at 0 0, rgba(213,18,27,.18), transparent 42%),
    radial-gradient(circle at 100% 100%, rgba(201,149,42,.18), transparent 36%),
    #f6f2ef;
}
.login-card { width: min(440px, 100%); }
.login-card h1 { margin-bottom: 0.3rem; }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side nav { flex-direction: row; flex-wrap: wrap; }
  main { padding: 1.2rem; }
  table { display: block; overflow-x: auto; }
  .row-2 { grid-template-columns: 1fr; }
}
