:root {
  color-scheme: dark;
  --bg: #071b13;
  --panel: #0d2a1d;
  --panel-2: #123824;
  --line: #2b6344;
  --text: #f5fff8;
  --muted: #9fc2ad;
  --green: #3ebd72;
  --gold: #e8ab2e;
  --red: #e25562;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font: 15px/1.5 "Segoe UI", Arial, sans-serif; }
a { color: inherit; text-decoration: none; }
.topbar { height: 72px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 0 28px; background: #091f16; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand img { width: 44px; height: 44px; object-fit: contain; }
.brand span { display: grid; }
.brand strong { color: #ffd866; font-size: 18px; }
.brand small { color: var(--muted); }
nav { display: flex; gap: 8px; }
nav a, .button, button { border: 0; border-radius: 4px; padding: 10px 15px; background: var(--panel-2); color: var(--text); cursor: pointer; font-weight: 700; }
nav a:hover, .button:hover, button:hover { background: #1c5135; }
.shell { width: min(1180px, calc(100% - 28px)); margin: 26px auto 50px; }
.page-heading { margin: 0 0 16px; }
.page-heading h1, .mail-head h1 { margin: 0; font-size: 28px; letter-spacing: 0; }
.page-heading p { margin: 4px 0 0; color: var(--muted); }
.row-heading, .mail-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.panel, .table-panel { border: 1px solid var(--line); background: var(--panel); border-radius: 6px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 22px; }
.form-grid .wide { grid-column: 1 / -1; }
label { display: grid; gap: 6px; color: var(--muted); font-weight: 600; }
input, select { width: 100%; min-height: 42px; border: 1px solid #315e45; border-radius: 4px; background: #061a12; color: var(--text); padding: 9px 11px; outline: none; }
input:focus, select:focus { border-color: var(--green); }
.check { display: flex; align-items: center; gap: 8px; }
.check input { width: 18px; min-height: 18px; }
.actions { display: flex; justify-content: flex-end; }
.primary { background: var(--green); color: #04170d; }
.danger { background: var(--red); }
.small { padding: 6px 10px; }
.flash { margin-bottom: 14px; padding: 11px 14px; border-left: 4px solid var(--gold); background: #25311c; border-radius: 4px; }
.flash.error { border-color: var(--red); background: #3a171b; }
.flash.success { border-color: var(--green); background: #103923; }
.auth-layout { display: grid; grid-template-columns: 1.15fr .85fr; min-height: 560px; align-items: center; gap: 60px; }
.auth-copy img { width: 110px; height: 110px; object-fit: contain; }
.auth-copy h1 { margin: 12px 0 4px; font-size: 42px; }
.auth-copy p { color: var(--muted); }
.auth-form { display: grid; gap: 17px; padding: 24px; }
.narrow { max-width: 480px; margin: 80px auto; }
.create-row { display: grid; grid-template-columns: 1.2fr 1fr 1.2fr auto; align-items: end; gap: 12px; padding: 16px; }
.table-panel { margin-top: 18px; overflow: hidden; }
.table-title { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.table-title h2 { margin: 0; font-size: 17px; }
.table-title span { color: var(--muted); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid #1a4931; white-space: nowrap; }
th { color: #bdd8c7; background: #0b2419; font-size: 12px; }
.email-cell { color: #7ee5a7; font-weight: 700; }
.good { color: #65e69a; }.warn { color: #ffd866; }.bad { color: #ff8f98; }
.status-dot { color: #65e69a; font-weight: 700; }
.mail-head { margin-bottom: 16px; }
.eyebrow { color: var(--muted); font-size: 12px; text-transform: uppercase; }
.mail-actions { display: flex; align-items: center; gap: 8px; }
.timer { min-width: 76px; color: #ffd866; font-size: 20px; font-weight: 800; text-align: center; }
.inbox-layout { display: grid; grid-template-columns: 360px 1fr; gap: 14px; min-height: 580px; }
.message-list { overflow-y: auto; }
.message-row { display: grid; padding: 13px; border-bottom: 1px solid var(--line); }
.message-row:hover, .message-row.active { background: #16442d; }
.message-row span, .message-row small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.message-view { padding: 22px; overflow: hidden; }
.message-view h2 { margin: 5px 0; }
.message-view pre { white-space: pre-wrap; overflow-wrap: anywhere; color: #e8f5ed; font: 14px/1.55 "Segoe UI", Arial, sans-serif; }
.empty { color: var(--muted); padding: 30px; text-align: center; }
@media (max-width: 800px) {
  .topbar { height: auto; padding: 12px 14px; align-items: flex-start; }
  nav { flex-direction: column; }
  .auth-layout, .inbox-layout { grid-template-columns: 1fr; gap: 16px; }
  .auth-layout { min-height: 0; }
  .create-row, .form-grid { grid-template-columns: 1fr; }
  .form-grid .wide { grid-column: auto; }
  .row-heading, .mail-head { align-items: flex-start; flex-direction: column; }
  .mail-actions { flex-wrap: wrap; }
}
