:root {
  --burgundy: #8a2337;
  --burgundy-deep: #641525;
  --leaf: #89ba17;
  --leaf-deep: #5f840b;
  --ink: #2e292a;
  --muted: #6c6263;
  --warm: #faf7f2;
  --rose: #f4e8ea;
  --sage: #eef3df;
  --line: #e6ddd7;
  font-family: "Segoe UI", Arial, sans-serif;
  background: var(--warm);
  color: var(--ink);
}
body { background: linear-gradient(145deg, #fffdfa, var(--warm) 50%, #f4f1e9); }
a { color: var(--burgundy); }
h1, h2, h3 { color: var(--burgundy); }
.card, .message-card { border-color: var(--line); box-shadow: 0 8px 24px rgba(62,40,35,.07); }
.topbar { border-top: 4px solid var(--leaf); gap: 20px; }
.brand { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; color: var(--muted); font-size: .8rem; letter-spacing: .015em; min-width: 0; }
.brand-logo { display: block; width: 300px; max-width: 100%; height: auto; }
.brand span { font-weight: 650; }
#loginCard { border-top: 4px solid var(--leaf); }
#loginCard .brand { align-items: center; margin: 0 0 22px; font-size: 1rem; color: var(--burgundy); }
#loginCard .brand-logo { width: 360px; margin-bottom: 10px; }
nav { flex-wrap: wrap; }
nav a, .button-link { color: var(--burgundy); }
nav a:hover, nav a.active { background: var(--rose); color: var(--burgundy-deep); }
nav a.active { box-shadow: inset 0 -3px var(--leaf); }
input, textarea, select { border-color: #c9bbb5; }
input:focus, textarea:focus, select:focus { outline-color: var(--rose); border-color: var(--burgundy); }
button, .button-link.primary { background: var(--burgundy); color: #fff; }
button:hover, .button-link.primary:hover { background: var(--burgundy-deep); }
button.secondary, .button-link.secondary { background: var(--rose); color: var(--burgundy); }
button.secondary:hover, .button-link.secondary:hover { background: #ead6db; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--burgundy); outline-offset: 3px; }
button:disabled { opacity: .6; cursor: wait; }
.muted, .message-meta { color: var(--muted); }
.status { background: var(--sage); color: #405809; }
.status.error { background: #fff0f0; color: #8f2020; }
.info-panel { background: var(--warm); border-color: var(--line); border-left: 4px solid var(--leaf); }
.mail-nav button { color: var(--ink); background: transparent; }
.mail-nav button.active, .mail-nav button:hover { background: var(--rose); color: var(--burgundy); }
.mail-nav button.active { box-shadow: inset 3px 0 var(--leaf); }
.count { background: var(--sage); color: #405809; }
.badge.answered { background: var(--sage); color: #405809; }
.reply-box { border-left-color: var(--leaf); background: var(--warm); }
@media (max-width: 780px) {
  .topbar .brand { flex-basis: calc(100% - 110px); }
  .brand-logo { width: min(300px, 100%); }
  .topbar > button { margin-left: auto; }
  nav { gap: 6px; }
}
@media (max-width: 420px) {
  .topbar .brand { flex-basis: 100%; }
  .topbar > button { margin-left: 0; }
}
