:root {
  color-scheme: dark;
  --ink: #f7f4ed;
  --muted: #a9a5b5;
  --page: #08070d;
  --panel: #12101a;
  --panel-2: #191624;
  --line: #2d2938;
  --gold: #ffd548;
  --pink: #f0446c;
  --mint: #51e1bd;
  --cyan: #4bd9f2;
  --orange: #ff8a4c;
  --purple: #7655e8;
  --danger: #ff5d72;
  --shadow: 0 18px 60px rgb(0 0 0 / 35%);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--page);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 10%, rgb(118 85 232 / 13%), transparent 34rem),
    radial-gradient(circle at 90% 80%, rgb(240 68 108 / 8%), transparent 28rem),
    var(--page);
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.52;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #3a3547;
  border-radius: 8px;
  background: #0c0a12;
}

input,
select {
  min-height: 46px;
  padding: 0 13px;
}

textarea {
  resize: vertical;
  padding: 12px 13px;
  line-height: 1.5;
}

label {
  color: #ddd8e7;
  font-size: 0.84rem;
  font-weight: 750;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: -100px;
  left: 10px;
  padding: 10px 14px;
  color: #0b0911;
  background: var(--gold);
  opacity: 0;
  pointer-events: none;
}

.skip-link:focus-visible {
  top: 10px;
  opacity: 1;
  pointer-events: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--gold);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.muted {
  color: var(--muted);
}

.brand-mark {
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  border: 3px solid #2e2410;
  border-radius: 50%;
  color: #181006;
  background:
    radial-gradient(circle at 35% 30%, #fff1a2, transparent 18%),
    linear-gradient(145deg, #ffe67c, #c68a14);
  box-shadow:
    inset 0 0 0 5px #efbc34,
    0 0 0 3px #151019;
  font-family: Impact, "Arial Black", sans-serif;
  font-size: 1.55rem;
}

.brand-mark.small {
  width: 45px;
  height: 45px;
  border-width: 2px;
  font-size: 0.9rem;
  box-shadow:
    inset 0 0 0 3px #efbc34,
    0 0 0 2px #151019;
}

.login-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(360px, 0.88fr);
  min-height: 100vh;
}

.login-brand,
.login-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-brand {
  position: relative;
  padding: clamp(42px, 8vw, 120px);
  overflow: hidden;
  background:
    linear-gradient(120deg, rgb(6 5 10 / 80%), rgb(6 5 10 / 40%)),
    repeating-linear-gradient(
      135deg,
      transparent 0 22px,
      rgb(255 255 255 / 2%) 22px 23px
    ),
    #151023;
}

.login-brand::after {
  position: absolute;
  right: -90px;
  bottom: -120px;
  width: 420px;
  height: 420px;
  border: 45px solid rgb(255 213 72 / 7%);
  border-radius: 50%;
  content: "";
}

.login-brand .brand-mark {
  margin-bottom: 40px;
}

.login-brand h1 {
  max-width: 760px;
  margin: 0;
  font-family: Impact, "Arial Black", sans-serif;
  font-size: clamp(4.6rem, 10vw, 9.5rem);
  letter-spacing: -0.035em;
  line-height: 0.82;
  text-transform: uppercase;
}

.login-deck {
  max-width: 680px;
  margin: 28px 0 22px;
  color: #d7d2df;
  font-size: clamp(1rem, 2vw, 1.3rem);
  font-weight: 650;
  line-height: 1.55;
}

.trust-list {
  display: grid;
  gap: 9px;
  max-width: 680px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.trust-list li {
  position: relative;
  padding-left: 25px;
  color: var(--muted);
}

.trust-list li::before {
  position: absolute;
  left: 0;
  color: var(--mint);
  content: "◆";
}

.login-card {
  padding: clamp(36px, 7vw, 96px);
  background: #0d0b13;
}

.login-card > * {
  width: min(100%, 480px);
  margin-right: auto;
  margin-left: auto;
}

.login-card h2 {
  margin: 24px auto 8px;
  font-size: 2rem;
}

.login-card > p {
  color: var(--muted);
  line-height: 1.55;
}

.login-card form,
.compact-form,
#action-form {
  display: grid;
  gap: 11px;
}

.login-card form {
  margin-top: 25px;
}

.security-note {
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-chip.neutral {
  color: #c9c3d4;
}

.primary-button,
.secondary-button,
.danger-button,
.text-button,
.icon-button {
  min-height: 42px;
  border-radius: 8px;
  font-weight: 850;
}

.primary-button,
.danger-button {
  border: 1px solid transparent;
  color: white;
  background: var(--pink);
}

.primary-button {
  padding: 0 17px;
}

.primary-button:hover {
  background: #ff577c;
}

.secondary-button {
  padding: 0 15px;
  border: 1px solid #494255;
  background: #1a1722;
}

.secondary-button:hover {
  border-color: #786d87;
}

.danger-button {
  min-height: 46px;
  padding: 0 18px;
  background: #b62f48;
}

.danger-button:hover {
  background: #d43b58;
}

.text-button {
  padding: 0 8px;
  border: 0;
  color: #d8d2e2;
  background: transparent;
}

.text-button:hover {
  color: white;
}

.icon-button {
  display: inline-grid;
  width: 42px;
  min-height: 42px;
  place-items: center;
  padding: 0;
  border: 1px solid #3a3547;
  color: white;
  background: #17131e;
  font-size: 1.4rem;
}

.form-status {
  min-height: 1.35em;
  margin: 3px 0 0;
  color: var(--gold);
  font-size: 0.82rem;
  line-height: 1.4;
}

.form-status.error {
  color: #ff8ca0;
}

.form-status.success {
  color: var(--mint);
}

.dashboard-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 22px 16px;
  border-right: 1px solid var(--line);
  background: #0d0b12;
}

.sidebar-brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 0 8px 26px;
}

.sidebar-brand div:last-child {
  display: grid;
  gap: 3px;
}

.sidebar-brand strong {
  font-size: 1rem;
}

.sidebar-brand span {
  color: var(--muted);
  font-size: 0.74rem;
}

.sidebar nav {
  display: grid;
  gap: 5px;
}

.nav-button {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-height: 45px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #bdb7c8;
  background: transparent;
  text-align: left;
}

.nav-button:hover {
  color: white;
  background: #17141e;
}

.nav-button.active {
  border-color: #40384e;
  color: white;
  background: #211b2d;
}

.nav-button.active span {
  color: var(--gold);
}

.staff-card {
  display: grid;
  grid-template-columns: 39px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin-top: auto;
  padding: 16px 8px 9px;
  border-top: 1px solid var(--line);
}

.staff-avatar {
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  border-radius: 50%;
  color: #101014;
  background: var(--gold);
  font-weight: 950;
}

.staff-card div {
  display: grid;
  gap: 2px;
  overflow: hidden;
}

.staff-card strong,
.staff-card span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-card span {
  color: var(--muted);
  font-size: 0.7rem;
  text-transform: capitalize;
}

.workspace {
  min-width: 0;
}

.workspace-header {
  position: sticky;
  z-index: 15;
  top: 0;
  display: flex;
  gap: 20px;
  align-items: center;
  min-height: 80px;
  padding: 13px clamp(18px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  background: rgb(8 7 13 / 91%);
  backdrop-filter: blur(16px);
}

.workspace-header h1 {
  margin: 0;
  font-size: 1.55rem;
}

.header-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-left: auto;
}

.header-actions .muted {
  font-size: 0.76rem;
}

#main-content {
  padding: clamp(20px, 4vw, 48px);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.metric-card {
  position: relative;
  min-height: 105px;
  padding: 17px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.metric-card::after {
  position: absolute;
  right: -20px;
  bottom: -30px;
  width: 80px;
  height: 80px;
  border: 17px solid rgb(255 255 255 / 3%);
  border-radius: 50%;
  content: "";
}

.metric-card span {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 750;
}

.metric-card strong {
  display: block;
  margin-top: 12px;
  font-size: 2rem;
}

.metric-card.urgent strong,
.priority-urgent {
  color: var(--danger);
}

.metric-card.overdue strong {
  color: var(--orange);
}

.panel {
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.queue-panel {
  overflow: hidden;
}

.queue-toolbar,
.panel-heading {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.filter-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 9px;
  background: #0b0910;
}

.filter-button {
  min-height: 35px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  color: #a9a3b4;
  background: transparent;
  font-size: 0.77rem;
  font-weight: 800;
}

.filter-button.active {
  color: #111018;
  background: var(--gold);
}

.search-field {
  width: min(330px, 100%);
}

.search-field input {
  min-height: 40px;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  min-width: 850px;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 13px 15px;
  border-bottom: 1px solid #26222e;
  text-align: left;
  vertical-align: top;
}

.data-table th {
  color: #8f899a;
  background: #0e0c13;
  font-size: 0.65rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.data-table td {
  color: #d8d4df;
  font-size: 0.82rem;
  line-height: 1.4;
}

.data-table tbody tr {
  transition: background 140ms ease;
}

.data-table tbody tr:hover {
  background: #191520;
}

.data-table tbody tr.case-row {
  cursor: pointer;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.priority-label,
.category-label,
.restriction-label {
  display: inline-flex;
  min-height: 23px;
  align-items: center;
  padding: 3px 8px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.61rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.priority-low {
  color: #a5a0ae;
}

.priority-medium {
  color: var(--cyan);
}

.priority-high {
  color: var(--orange);
}

.category-label {
  margin-bottom: 5px;
  color: #c5b5ff;
}

.restriction-messaging {
  color: var(--cyan);
}

.restriction-social {
  color: var(--orange);
}

.restriction-account {
  color: var(--danger);
}

.cell-primary {
  display: block;
  color: white;
  font-weight: 800;
}

.cell-secondary {
  display: block;
  max-width: 320px;
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overdue-text {
  color: var(--orange);
}

.empty-state,
.loading-state {
  display: grid;
  min-height: 180px;
  place-content: center;
  gap: 6px;
  padding: 30px;
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  color: white;
}

.panel-heading {
  align-items: flex-end;
}

.panel-heading h2,
.compact-form h2 {
  margin: 0;
}

.panel-heading > p,
.compact-form > p {
  max-width: 510px;
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.team-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(310px, 0.45fr);
  gap: 18px;
  align-items: start;
}

.compact-form {
  padding: 24px;
}

.checkbox-row,
.confirmation-row {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  line-height: 1.4;
}

.checkbox-row input,
.confirmation-row input {
  width: 18px;
  min-height: 18px;
  margin: 1px 0 0;
  accent-color: var(--pink);
}

.case-drawer {
  position: fixed;
  z-index: 51;
  top: 0;
  right: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(720px, 92vw);
  height: 100vh;
  border-left: 1px solid #3b3546;
  background: #0d0b12;
  box-shadow: -20px 0 70px rgb(0 0 0 / 55%);
}

.drawer-header,
.drawer-footer {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 17px 20px;
  border-color: var(--line);
  background: #121019;
}

.drawer-header {
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.drawer-header h2 {
  margin: 0;
}

.drawer-footer {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
}

.drawer-footer .text-button {
  margin-right: auto;
}

.drawer-content {
  overflow-y: auto;
  padding: 22px;
}

.case-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.case-summary-item,
.evidence-card,
.case-section {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #15121c;
}

.case-summary-item {
  padding: 13px;
}

.case-summary-item span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.case-summary-item strong {
  overflow-wrap: anywhere;
}

.case-section {
  margin-top: 14px;
  padding: 16px;
}

.case-section h3 {
  margin: 0 0 12px;
  font-size: 0.92rem;
}

.case-details {
  margin: 0;
  color: #e1dce8;
  line-height: 1.55;
  white-space: pre-wrap;
}

.evidence-list,
.timeline-list {
  display: grid;
  gap: 8px;
}

.evidence-card {
  padding: 12px;
}

.evidence-card.reported-message {
  border-color: var(--pink);
  background: #25131c;
}

.evidence-meta,
.timeline-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.68rem;
}

.evidence-card p,
.timeline-item p {
  margin: 0;
  overflow-wrap: anywhere;
  line-height: 1.5;
  white-space: pre-wrap;
}

.timeline-item {
  padding: 11px 0;
  border-bottom: 1px solid #2a2632;
}

.timeline-item:last-child {
  border-bottom: 0;
}

.note-form {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}

.drawer-scrim,
.modal-scrim,
.sidebar-scrim {
  position: fixed;
  z-index: 50;
  inset: 0;
  background: rgb(0 0 0 / 62%);
  backdrop-filter: blur(3px);
}

.modal-scrim {
  z-index: 60;
}

.modal {
  position: fixed;
  z-index: 61;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  pointer-events: none;
}

.modal-card {
  width: min(560px, 100%);
  max-height: calc(100vh - 36px);
  padding: 22px;
  overflow-y: auto;
  border: 1px solid #4b4357;
  border-radius: 13px;
  background: #13101a;
  box-shadow: var(--shadow);
  pointer-events: auto;
}

.modal-card > header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  margin-bottom: 19px;
}

.modal-card h2 {
  margin: 0;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 8px;
}

.toast {
  position: fixed;
  z-index: 80;
  right: 20px;
  bottom: 20px;
  width: min(390px, calc(100vw - 40px));
  padding: 13px 15px;
  border: 1px solid #4f465b;
  border-radius: 9px;
  color: white;
  background: #1b1722;
  box-shadow: var(--shadow);
  font-size: 0.84rem;
  line-height: 1.45;
}

.mobile-only {
  display: none;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1100px) {
  .metrics-grid {
    grid-template-columns: repeat(3, minmax(130px, 1fr));
  }

  .team-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 800px) {
  .login-layout {
    grid-template-columns: 1fr;
  }

  .login-brand {
    min-height: 58vh;
    padding: 48px 24px;
  }

  .login-brand h1 {
    font-size: clamp(4rem, 22vw, 7rem);
  }

  .login-card {
    padding: 45px 24px 65px;
  }

  .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    z-index: 70;
    left: 0;
    width: min(290px, 86vw);
    transform: translateX(-105%);
    transition: transform 180ms ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-scrim {
    z-index: 69;
  }

  .mobile-only {
    display: inline-grid;
  }

  .workspace-header {
    padding: 12px 16px;
  }

  .header-actions .muted {
    display: none;
  }

  #main-content {
    padding: 18px 12px 32px;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, minmax(125px, 1fr));
  }

  .queue-toolbar,
  .panel-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-tabs {
    overflow-x: auto;
  }

  .search-field {
    width: 100%;
  }

  .case-drawer {
    width: 100vw;
  }
}

@media (max-width: 520px) {
  .workspace-header h1 {
    font-size: 1.2rem;
  }

  .header-actions {
    gap: 7px;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .metric-card {
    min-height: 92px;
    padding: 13px;
  }

  .case-summary-grid {
    grid-template-columns: 1fr;
  }

  .drawer-footer {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .drawer-footer .text-button {
    grid-column: 1 / -1;
    margin: 0;
  }

  .modal-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
