:root {
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background: #1c1c1b;
  color: #f5f0e8;
  --surface: #292927;
  --surface-raised: #333330;
  --line: #44443f;
  --muted: #b5b2ab;
  --gold: #e1be7d;
  --coral: #e49a82;
  --sage: #afd0b2;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .6; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.shell { max-width: 1160px; margin: 0 auto; padding: 36px 28px 80px; }
.hidden { display: none; }
.brand-lockup { display: flex; align-items: center; gap: 14px; }
.brand-icon { display: block; width: 56px; height: 56px; flex: none; border-radius: 8px; }
.brand { color: var(--gold); font-size: 13px; font-weight: 650; line-height: 1.5; letter-spacing: 0; }
.brand strong { display: block; color: #f5f0e8; font-size: 15px; }
h1 { margin: 22px 0 0; font-size: 30px; line-height: 1.2; font-weight: 650; }
.muted, .message { color: var(--muted); line-height: 1.55; }
.message:empty { display: none; }
.login-view { max-width: 450px; margin: 7vh auto; padding: 32px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.login-form { display: grid; gap: 10px; margin-top: 28px; }
label { color: #ddd7cd; font-size: 13px; font-weight: 600; }
input, select, textarea { width: 100%; min-width: 0; padding: 12px; color: #f5f0e8; background: #20201e; border: 1px solid #626159; border-radius: 6px; }
textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: #aaa69d; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
button { min-height: 42px; padding: 10px 15px; border: 1px solid transparent; border-radius: 6px; color: #24231f; background: var(--gold); font-size: 14px; font-weight: 650; line-height: 1.35; }
button:hover { background: #f0cf91; }
.login-form button { margin-top: 12px; }
.separator { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--muted); font-size: 13px; }
.separator::before, .separator::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.google-button { width: 100%; color: #f5f0e8; background: var(--surface-raised); border: 1px solid #626159; }
.google-button:hover { background: #41413c; }
.login-actions { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 16px; }
.link-button, .secondary { padding: 0; background: transparent; color: var(--gold); font-size: 13px; }
.link-button:hover, .secondary:hover { background: transparent; color: #f0cf91; }
.topbar { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; padding-bottom: 26px; border-bottom: 1px solid var(--line); }
.account-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 14px; color: var(--muted); font-size: 13px; }
.account-actions span { overflow-wrap: anywhere; }
.summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 26px 0; }
.summary article { padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.summary span { display: block; color: var(--muted); font-size: 13px; }
.summary strong { display: block; margin-top: 10px; color: var(--gold); font-size: 30px; line-height: 1; font-weight: 600; font-variant-numeric: tabular-nums; }
.summary article:first-child strong { color: var(--coral); }
.summary article:nth-child(3) strong { color: var(--sage); }
.summary article:last-child strong { color: #f5f0e8; }
.filters { display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.filter { padding: 12px 16px; border-radius: 0; border-bottom: 2px solid transparent; color: var(--muted); background: transparent; }
.filter:hover { color: #f5f0e8; background: #292927; }
.filter.active { color: var(--gold); background: transparent; border-bottom-color: var(--gold); }
.reports { display: grid; gap: 14px; margin-top: 20px; }
.report { padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.report-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.report-head > div { min-width: 0; width: 100%; }
.report h2 { margin: 0; color: var(--gold); font-size: 13px; line-height: 1.4; font-weight: 600; }
.report p { margin: 12px 0 0; color: #e2ddd4; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.report-head > div > p:first-of-type { font-size: 17px; font-weight: 550; }
.metadata { color: var(--muted) !important; font-size: 12px; }
.moderation-note { margin: 18px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.availability, .status-badge { display: inline-flex; padding: 5px 9px; border: 1px solid; border-radius: 6px; font-size: 12px; font-weight: 600; }
.availability { margin-top: 16px !important; }
.availability.active { color: #c0dcc2; border-color: #58755e; background: #28362b; }
.availability.disabled { color: #efb6a0; border-color: #936653; background: #40312a; }
.status-badge { margin-left: 8px !important; }
.status-badge.open { color: #efb6a0; border-color: #936653; background: #40312a; }
.status-badge.in_progress { color: #ead09b; border-color: #8c794e; background: #3b3628; }
.status-badge.resolved { color: #c0dcc2; border-color: #58755e; background: #28362b; }
.report-controls { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(300px, 1fr); gap: 20px; align-items: end; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.report-controls label { display: grid; gap: 8px; }
.report-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.report-actions button { flex: 0 1 auto; }
.moderate { color: #24231f; background: var(--coral); }
.moderate:hover { background: #efb09a; }
.workflow-action { color: #24231f; background: var(--gold); }
.workflow-action:hover { background: #f0cf91; }
.secondary-action { color: #eee7dc; background: var(--surface-raised); border: 1px solid #626159; }
.secondary-action:hover { background: #41413c; }
.danger { color: #efb6a0; background: transparent; border: 1px solid #936653; }
.danger:hover { background: #40312a; }
.report .resolution { padding-top: 16px; margin-top: 18px; border-top: 1px solid var(--line); color: #d6d2c9; font-size: 14px; font-weight: 400; }
.resolution strong { display: block; margin-bottom: 6px; color: var(--sage); font-size: 12px; font-weight: 600; }
.empty { padding: 64px 0; color: var(--muted); text-align: center; font-size: 14px; }
@media (max-width: 760px) {
  .shell { padding: 24px 16px 48px; }
  .login-view { margin: 3vh auto; padding: 24px; }
  .topbar { flex-direction: column; gap: 16px; }
  .account-actions { justify-content: flex-start; }
  .summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .summary article { padding: 16px; }
  .report { padding: 18px; }
  .report-controls { grid-template-columns: 1fr; gap: 16px; }
  .filters { justify-content: space-between; gap: 0; }
  .filter { padding: 11px 8px; font-size: 13px; }
  .status-badge { margin-left: 0 !important; margin-right: 8px; }
  .availability { margin-right: 8px; }
}

.report-search { display: grid; gap: 10px; margin: 22px 0; }
.report details { margin: 18px 0; color: var(--muted); line-height: 1.6; }
.report summary { cursor: pointer; color: var(--gold); }
.report ol { padding-left: 24px; }
.report-search input { max-width: 680px; }

.email-login-options.hidden { display: none; }
