/* DSA console: same palette and type as /admin (ComeThru Brand Book, light). */
:root {
  --brand: #EE7943;
  --brand-strong: #9A3714;
  --brand-muted: #F7C6AD;
  --accent: #8DA249;
  --amber: #EBAF47;
  --surface-base: #FFF3E8;
  --surface-raised: #FFFDF8;
  --surface-elevated: #FFFFFF;
  --text-primary: #3A1C15;
  --text-secondary: #6B4438;
  --text-tertiary: #846357;
  --border: #E7CFC0;
  --error: #B13F32;
  --fill-muted: #F2D9C9;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--surface-base);
  color: var(--text-primary);
  min-height: 100vh;
  font-size: 14px;
}
h1, h2 { font-family: 'Caprasimo', serif; font-weight: 400; }
h3 { font-size: 15px; margin: 6px 0; }
p { margin: 6px 0; line-height: 1.5; }
a { color: var(--brand-strong); }
code { font-size: 12px; background: var(--fill-muted); padding: 1px 5px; border-radius: 6px; word-break: break-all; }
.hidden { display: none !important; }
.muted { color: var(--text-tertiary); font-size: 12px; }
.warn { color: var(--error); font-weight: 600; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 32px; background: var(--surface-raised);
  border-bottom: 2px solid var(--border);
}
.topbar h1 { font-size: 22px; }
.who { font-size: 13px; color: var(--text-tertiary); }
.wrap { max-width: 1440px; margin: 0 auto; padding: 24px 32px 64px; }
.card { background: var(--surface-raised); border-radius: 18px; padding: 16px 18px; box-shadow: 0 8px 28px rgba(58,28,21,.065); }
.card-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.stack { display: grid; gap: 12px; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.tab {
  border: none; border-radius: 12px; padding: 10px 14px; cursor: pointer;
  background: var(--surface-raised); color: var(--text-secondary); font: 600 13px 'Montserrat', sans-serif;
}
.tab.active { background: var(--brand); color: #fff; }
.heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.heading h2 { font-size: 24px; }
.heading p { color: var(--text-secondary); font-size: 13px; max-width: 80ch; }
.row-actions { display: flex; flex-wrap: wrap; gap: 6px; }
button, .button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 40px;
  border: none; border-radius: 12px; padding: 8px 16px; cursor: pointer; text-decoration: none;
  background: var(--brand); color: #fff; font: 700 13px 'Montserrat', sans-serif;
}
button.small, .button.small { min-height: 32px; padding: 6px 12px; font-size: 12px; }
button.secondary, .button.secondary { background: transparent; color: var(--text-secondary); box-shadow: inset 0 0 0 2px var(--border); }
button.danger { background: var(--error); }
button:disabled { opacity: .55; cursor: progress; }
.table-scroll { overflow-x: auto; background: var(--surface-raised); border-radius: 18px; }
table { width: 100%; border-collapse: collapse; min-width: 900px; }
th, td { text-align: left; vertical-align: top; padding: 12px; border-bottom: 1px solid var(--fill-muted); font-size: 13px; }
th { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-tertiary); }
.pill { display: inline-block; padding: 3px 9px; border-radius: 999px; background: var(--fill-muted); font-size: 11px; font-weight: 700; }
.pill.urgent { background: var(--error); color: #fff; }
.pill.flagger { background: var(--amber); color: #fff; }
.content-text { max-width: 320px; white-space: pre-wrap; word-break: break-word; margin-bottom: 6px; }
.content-media { display: block; max-width: 140px; max-height: 140px; border-radius: 8px; background: var(--fill-muted); }
.content-media.sensitive { filter: blur(18px); cursor: pointer; }
audio { width: 240px; max-width: 100%; }
.outcomes { margin: 8px 0 8px 18px; font-size: 13px; }
.banner-msg { padding: 12px 14px; border-radius: 12px; margin-bottom: 14px; }
.banner-msg.ok { background: #EEF3DC; }
.banner-msg.err { background: #FBE7E4; color: var(--error); }
dialog {
  width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 32px); margin: auto;
  border: none; border-radius: 20px; background: var(--surface-raised); color: var(--text-primary);
  box-shadow: 0 24px 60px rgba(58,28,21,.25);
}
dialog::backdrop { background: rgba(58, 28, 21, .45); }
.dialog-form { display: grid; gap: 14px; padding: 22px; }
.dialog-form h2 { font-size: 22px; }
fieldset { border: none; background: var(--surface-elevated); border-radius: 14px; padding: 12px 14px; display: grid; gap: 10px; }
legend { font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-tertiary); padding: 0 4px; }
label { display: grid; gap: 4px; font-size: 12px; font-weight: 600; color: var(--text-secondary); }
label.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
input[type='text'], input[type='number'], input[type='datetime-local'], select, textarea {
  width: 100%; min-height: 38px; padding: 8px 10px; border: 2px solid transparent; border-radius: 10px;
  background: var(--surface-base); color: var(--text-primary); font: 400 13px 'Montserrat', sans-serif;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--amber); }
textarea { resize: vertical; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }
@media (max-width: 720px) {
  .wrap, .topbar { padding-left: 16px; padding-right: 16px; }
  .heading { flex-direction: column; }
}
