/*
 * Quebrada RJ Product UI v42
 * Camada exclusivamente visual, carregada depois do CSS legado.
 */

:root {
  --brand: #bade1b;
  --brand-strong: #d2f52d;
  --brand-soft: rgba(186, 222, 27, 0.1);
  --brand-faint: rgba(186, 222, 27, 0.045);
  --black: #000000;
  --canvas: #030403;
  --surface-0: #050605;
  --surface-1: #080908;
  --surface-2: #0c0e0b;
  --surface-3: #11140f;
  --white: #ffffff;
  --text: #f7f8f4;
  --muted: rgba(247, 248, 244, 0.66);
  --muted-2: rgba(247, 248, 244, 0.42);
  --line: rgba(255, 255, 255, 0.12);
  --line-soft: rgba(255, 255, 255, 0.075);
  --line-strong: rgba(255, 255, 255, 0.19);
  --line-brand: rgba(186, 222, 27, 0.42);
  --danger: #ff5252;
  --warning: #f3c84b;
  --radius-xs: 5px;
  --radius-sm: 7px;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow-xs: 0 1px 0 rgba(255, 255, 255, 0.04);
  --shadow-sm: 0 12px 32px rgba(0, 0, 0, 0.28);
  --shadow-md: 0 24px 72px rgba(0, 0, 0, 0.48);
  --shadow-brand: 0 12px 34px rgba(186, 222, 27, 0.12);
  --nav-height: 72px;
  --page-header-height: 116px;
  --content-width: 1500px;
}

/* Central inteligente de tarefas */
.task-center-view {
  gap: 18px;
}

.task-command-center {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(600px, 1.8fr);
  gap: 28px;
  align-items: center;
  padding: 26px;
  border-color: var(--line-brand);
  background:
    linear-gradient(115deg, rgba(186, 222, 27, 0.08), transparent 44%),
    var(--surface-1);
}

.task-welcome .kicker,
.task-recommendation span,
.task-kind {
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.task-welcome h2 {
  margin: 8px 0 6px;
  color: var(--white);
}

.task-welcome p,
.task-recommendation p,
.task-card p {
  margin: 0;
  color: var(--muted);
}

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

.task-summary-grid > article {
  display: grid;
  min-height: 116px;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.48);
}

.task-summary-grid span,
.task-summary-grid small,
.task-meta small {
  color: var(--muted-2);
}

.task-summary-grid strong {
  align-self: center;
  color: var(--white);
  font-size: 1.65rem;
  line-height: 1;
}

.task-summary-grid .next-expiration strong {
  font-size: 1rem;
}

.task-recommendation {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid var(--line-brand);
  border-radius: var(--radius);
  background: var(--brand-faint);
}

.task-recommendation.urgent {
  box-shadow: inset 3px 0 0 var(--brand), var(--shadow-sm);
}

.task-recommendation-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line-brand);
  border-radius: var(--radius-sm);
  background: var(--black);
}

.task-recommendation p {
  margin-top: 3px;
  color: var(--white);
}

.task-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.task-section {
  min-width: 0;
  padding: 20px;
}

.task-list {
  display: grid;
  gap: 10px;
}

.task-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--black);
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.task-card:hover {
  border-color: var(--line-brand);
  background: var(--surface-1);
  transform: translateY(-1px);
}

.task-card.illegal {
  box-shadow: inset 2px 0 0 var(--brand);
}

.task-card-heading,
.task-card-actions,
.task-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.task-card-heading {
  justify-content: space-between;
}

.task-status {
  padding: 4px 7px;
  border: 1px solid var(--line-brand);
  border-radius: 999px;
  color: var(--white);
  font-size: 0.68rem;
  font-weight: 800;
}

.task-card h3 {
  margin: 9px 0 5px;
  color: var(--white);
  font-size: 0.96rem;
}

.task-meta {
  flex-wrap: wrap;
  margin-top: 14px;
}

.task-meta > span {
  display: grid;
  gap: 2px;
  min-width: 100px;
}

.task-meta strong {
  color: var(--white);
  font-size: 0.78rem;
}

.task-card-actions {
  flex-direction: column;
  align-items: stretch;
}

@media (max-width: 1180px) {
  .task-command-center,
  .task-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .task-command-center,
  .task-section {
    padding: 16px;
  }

  .task-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .task-recommendation,
  .task-card {
    grid-template-columns: 1fr;
  }

  .task-recommendation-icon {
    display: none;
  }

  .task-recommendation .btn,
  .task-card-actions .btn {
    width: 100%;
  }

  .task-card-actions {
    flex-direction: row;
  }
}

@media (max-width: 430px) {
  .task-summary-grid {
    grid-template-columns: 1fr;
  }

  .task-summary-grid > article {
    min-height: 92px;
  }

  .task-card-actions {
    flex-direction: column;
  }
}

/* Discord ticket analysis workflow */
.workflow-pill.awaiting_defense,
.workflow-pill.awaiting_evidence {
  border-color: var(--brand);
  color: var(--black);
  background: var(--brand);
}

.analysis-countdown {
  color: var(--brand) !important;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.analysis-countdown.expired {
  color: var(--white) !important;
}

.workflow-actions,
.workflow-takeover {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}

.workflow-takeover {
  justify-content: space-between;
  padding: 14px;
  border: 1px solid var(--line-brand);
  border-radius: var(--radius);
  background: var(--brand-faint);
}

.workflow-takeover p {
  margin: 0;
  color: var(--white);
}

.workflow-history {
  margin-top: 14px;
  border-top: 1px solid var(--line-soft);
}

.workflow-history summary {
  padding: 14px 0 8px;
  color: var(--brand);
  font-weight: 800;
  cursor: pointer;
}

.workflow-history > div {
  display: grid;
  gap: 8px;
  padding: 4px 0;
}

.workflow-history article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 16px;
  padding: 11px 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--black);
}

.workflow-history article strong {
  color: var(--white);
}

.workflow-history article span,
.workflow-history article p {
  color: var(--muted);
}

.workflow-history article p {
  grid-column: 1 / -1;
  margin: 0;
}

@media (max-width: 640px) {
  .workflow-actions,
  .workflow-takeover {
    align-items: stretch;
    flex-direction: column;
  }

  .workflow-actions .btn,
  .workflow-takeover .btn {
    width: 100%;
  }

  .workflow-history article {
    grid-template-columns: 1fr;
  }
}

html {
  background: var(--canvas);
}

body {
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(186, 222, 27, 0.018), transparent 320px),
    var(--canvas);
  background-size: auto;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

body::before {
  z-index: 0;
  opacity: 0.55;
  background:
    linear-gradient(90deg, transparent 0, rgba(255, 255, 255, 0.018) 50%, transparent 100%),
    radial-gradient(circle at 12% -10%, rgba(186, 222, 27, 0.075), transparent 31%),
    radial-gradient(circle at 92% 5%, rgba(255, 255, 255, 0.035), transparent 24%);
  animation: ambient-surface 18s ease-in-out infinite alternate;
}

#app {
  position: relative;
  z-index: 1;
}

::selection {
  color: var(--black);
  background: var(--brand);
}

::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

::-webkit-scrollbar-track {
  background: var(--canvas);
}

::-webkit-scrollbar-thumb {
  border: 2px solid var(--canvas);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--brand);
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

/* Login */
.login-screen {
  padding: clamp(18px, 4vw, 56px);
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.96), rgba(0, 0, 0, 0.72)),
    url("/assets/favela-bg.webp?v=20260804-task-drafts-v51") center / cover fixed;
}

.login-screen::before {
  opacity: 0.28;
  background:
    linear-gradient(90deg, transparent 49.7%, rgba(186, 222, 27, 0.09) 50%, transparent 50.3%),
    linear-gradient(transparent 49.7%, rgba(255, 255, 255, 0.04) 50%, transparent 50.3%);
  background-size: 120px 120px;
  mask-image: linear-gradient(90deg, transparent, black 25%, black 75%, transparent);
}

.login-panel {
  width: min(500px, 100%);
}

.login-card {
  border-color: rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 46px);
  background: rgba(4, 5, 4, 0.91);
  box-shadow:
    0 42px 120px rgba(0, 0, 0, 0.66),
    inset 0 1px 0 rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(28px) saturate(125%);
}

.login-card::before {
  width: 2px;
  box-shadow: 0 0 28px rgba(186, 222, 27, 0.34);
}

.login-head {
  gap: 12px;
  margin-bottom: 30px;
}

.login-head .brand-logo {
  width: 68px;
  height: 88px;
}

.login-title {
  font-size: clamp(1.9rem, 5vw, 2.35rem);
  line-height: 0.95;
}

.secure-badge {
  min-height: 27px;
  padding-inline: 12px;
  background: rgba(186, 222, 27, 0.07);
}

/* Application frame */
.app-shell {
  min-height: 100vh;
  background: transparent;
}

@media (min-width: 901px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: sticky;
    inset: 0 0 auto;
    z-index: 80;
    display: grid;
    width: 100%;
    height: var(--nav-height);
    min-height: var(--nav-height);
    grid-template-columns: 210px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    border: 0;
    border-bottom: 1px solid var(--line);
    padding: 0 clamp(18px, 2vw, 34px);
    overflow: hidden;
    background: rgba(3, 4, 3, 0.9);
    box-shadow:
      0 18px 48px rgba(0, 0, 0, 0.38),
      inset 0 -1px 0 rgba(186, 222, 27, 0.025);
    backdrop-filter: blur(24px) saturate(130%);
    animation: nav-arrive 440ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .brand-box {
    width: auto;
    min-width: 0;
    min-height: 52px;
    justify-content: flex-start;
    gap: 10px;
    border: 0;
    border-right: 1px solid var(--line-soft);
    padding: 0 18px 0 0;
  }

  .brand-logo {
    width: 34px;
    height: 48px;
    flex: 0 0 34px;
  }

  .brand-copy {
    min-width: 0;
  }

  .brand-copy strong {
    font-size: 0.76rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
  }

  .brand-copy span {
    margin-top: 3px;
    color: var(--muted-2);
    font-size: 0.52rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .menu-label,
  .nav-group-label {
    display: none;
  }

  .nav {
    position: relative;
    display: flex;
    min-width: 0;
    height: 52px;
    align-items: center;
    gap: 4px;
    padding: 0 4px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
    scroll-behavior: smooth;
    scrollbar-color: rgba(186, 222, 27, 0.26) transparent;
    scrollbar-width: thin;
  }

  .nav::-webkit-scrollbar {
    display: block;
    height: 2px;
  }

  .nav::-webkit-scrollbar-thumb {
    border: 0;
    background: rgba(186, 222, 27, 0.32);
  }

  .nav-group {
    display: contents;
  }

  .nav button {
    min-width: max-content;
    min-height: 42px;
    flex: 0 0 auto;
    grid-template-columns: 26px minmax(0, auto) auto;
    gap: 7px;
    border-radius: var(--radius-sm);
    padding: 0 11px;
    color: var(--muted);
    font-size: 0.69rem;
    transition:
      color 160ms ease,
      border-color 160ms ease,
      background 160ms ease,
      transform 160ms ease,
      box-shadow 160ms ease;
  }

  .nav button:hover {
    border-color: var(--line);
    color: var(--white);
    background: rgba(255, 255, 255, 0.045);
    transform: translateY(-1px);
  }

  .nav button.active {
    border-color: var(--line-brand);
    color: var(--white);
    background:
      linear-gradient(180deg, rgba(186, 222, 27, 0.12), rgba(186, 222, 27, 0.045)),
      var(--surface-1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  }

  .nav button.active::before {
    display: none;
  }

  .nav button::after {
    position: absolute;
    inset: auto 11px 1px;
    width: auto;
    height: 2px;
    border-radius: 999px;
    content: "";
    opacity: 0;
    background: var(--brand);
    box-shadow: 0 0 16px rgba(186, 222, 27, 0.4);
    transform: scaleX(0.45);
    transition:
      opacity 160ms ease,
      transform 180ms ease;
  }

  .nav button.active::after {
    opacity: 1;
    transform: scaleX(1);
  }

  .nav-icon {
    width: 26px;
    height: 26px;
    border-color: var(--line-soft);
    border-radius: var(--radius-xs);
    background: rgba(255, 255, 255, 0.022);
    font-size: 0.78rem;
  }

  .user-box {
    display: grid;
    width: auto;
    min-width: 196px;
    min-height: 52px;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    margin: 0;
    border: 0;
    border-left: 1px solid var(--line-soft);
    border-radius: 0;
    padding: 0 0 0 16px;
    background: transparent;
  }

  .user-box .user-mini {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .user-box .avatar {
    width: 32px;
    height: 32px;
  }

  .user-box .btn {
    width: 44px;
    min-width: 44px;
    min-height: 34px;
    padding: 0 8px;
    font-size: 0.62rem;
  }

  .workspace {
    min-height: calc(100vh - var(--nav-height));
    padding-bottom: 72px;
  }

  .topbar {
    position: sticky;
    top: var(--nav-height);
    z-index: 50;
  }
}

/* Page command header */
.topbar {
  min-height: var(--page-header-height);
  align-items: center;
  gap: 28px;
  border-bottom: 1px solid var(--line);
  padding: 20px max(28px, calc((100vw - var(--content-width)) / 2));
  background: rgba(3, 4, 3, 0.84);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(22px) saturate(125%);
}

.view-title {
  align-items: center;
  gap: 15px;
}

.view-title-icon {
  width: 48px;
  height: 48px;
  border: 1px solid var(--line-brand);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(186, 222, 27, 0.13), rgba(186, 222, 27, 0.025)),
    var(--surface-1);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    var(--shadow-brand);
  font-size: 1.05rem;
}

.view-title-copy {
  gap: 3px;
}

.view-eyebrow,
.kicker {
  color: var(--brand);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.view-title h1 {
  margin: 1px 0 0;
  font-size: clamp(1.55rem, 2.35vw, 2.3rem);
  line-height: 1;
  letter-spacing: 0;
}

.view-title p {
  max-width: 660px;
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.analyst-pill {
  min-height: 40px;
  gap: 9px;
  border-color: var(--line);
  padding: 0 12px 0 5px;
  color: var(--text);
  background: var(--surface-1);
  box-shadow: var(--shadow-xs);
}

.analyst-pill:hover {
  border-color: var(--line-brand);
  background: var(--brand-faint);
}

/* Layout and surfaces */
.content-grid {
  width: min(var(--content-width), calc(100% - 56px));
  gap: 18px;
  padding-top: 28px;
  animation: content-arrive 360ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.panel,
.form-section,
.accused-editor,
.drawer-section,
.modal-card,
.permission-role-card,
.notice-recipient-picker,
.performance-kpi,
.stat-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.022), transparent 52%),
    var(--surface-1);
  box-shadow:
    var(--shadow-xs),
    0 14px 42px rgba(0, 0, 0, 0.18);
}

.panel {
  padding: clamp(20px, 2vw, 28px);
}

.panel::before,
.form-section::before {
  width: 52px;
  height: 2px;
  border-radius: 0 0 999px 0;
  background: var(--brand);
  box-shadow: 0 0 16px rgba(186, 222, 27, 0.24);
}

.panel-header,
.section-heading {
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 18px;
}

.panel-header h2,
.section-heading h2 {
  margin: 4px 0 0;
  font-size: 1.05rem;
  line-height: 1.2;
}

.panel-header p,
.section-heading p {
  max-width: 760px;
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.55;
}

.count-badge,
.priority,
.chip {
  border-color: var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.025);
  font-size: 0.62rem;
  font-weight: 800;
}

.count-badge {
  min-height: 28px;
  padding: 0 10px;
}

/* Buttons */
.btn {
  min-height: 40px;
  border-radius: var(--radius-sm);
  padding: 0 15px;
  font-size: 0.72rem;
  font-weight: 850;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  transition:
    color 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.btn:active:not(:disabled) {
  transform: translateY(0) scale(0.985);
}

.btn.primary {
  border-color: var(--brand);
  color: var(--black);
  background: var(--brand);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 10px 28px rgba(186, 222, 27, 0.14);
}

.btn.primary:hover:not(:disabled) {
  background: var(--brand-strong);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    0 14px 34px rgba(186, 222, 27, 0.22);
}

.btn.ghost {
  border-color: var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.022);
}

.btn.ghost:hover:not(:disabled) {
  border-color: var(--line-brand);
  color: var(--white);
  background: var(--brand-faint);
}

.btn.danger {
  border-color: rgba(255, 82, 82, 0.42);
  color: var(--white);
  background: rgba(255, 82, 82, 0.11);
}

.btn.warn {
  border-color: rgba(243, 200, 75, 0.42);
  color: var(--white);
  background: rgba(243, 200, 75, 0.1);
}

.btn.compact {
  min-height: 34px;
  padding-inline: 11px;
}

.button-row {
  gap: 9px;
}

/* Forms */
.field {
  gap: 7px;
}

.field label,
.field > span:first-child,
fieldset legend {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

input,
select,
textarea {
  border-color: var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  background: rgba(0, 0, 0, 0.36);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.025),
    0 1px 0 rgba(0, 0, 0, 0.4);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

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

textarea {
  min-height: 124px;
  padding: 12px 13px;
  line-height: 1.55;
  resize: vertical;
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--line-strong);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  outline: 0;
  background: rgba(0, 0, 0, 0.52);
  box-shadow:
    0 0 0 3px rgba(186, 222, 27, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

input::placeholder,
textarea::placeholder {
  color: var(--muted-2);
}

.form-grid {
  gap: 16px;
}

.field-hint,
.helper-text {
  color: var(--muted-2);
  font-size: 0.67rem;
  line-height: 1.45;
}

/* New report workflow */
.register-view {
  gap: 16px;
  padding-bottom: 96px;
}

.register-view .form-section {
  position: relative;
  padding: clamp(20px, 2.2vw, 30px);
  overflow: hidden;
}

.register-view .section-title,
.register-view .form-section > h2 {
  margin-bottom: 20px;
}

.accused-editor {
  position: relative;
  border-color: var(--line);
  border-left: 2px solid var(--brand);
  border-radius: var(--radius);
  padding: clamp(18px, 2vw, 26px);
  background:
    linear-gradient(90deg, rgba(186, 222, 27, 0.035), transparent 24%),
    rgba(0, 0, 0, 0.22);
}

.accused-editor + .accused-editor {
  margin-top: 14px;
}

.decision-options,
.vote-actions {
  gap: 10px;
}

.decision-choice,
.vote-button {
  border-color: var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
}

.decision-choice:hover,
.vote-button:hover:not(:disabled) {
  border-color: var(--line-brand);
  background: var(--brand-faint);
  transform: translateY(-1px);
}

.decision-choice.active,
.vote-button.active {
  border-color: var(--brand);
  background: rgba(186, 222, 27, 0.09);
  box-shadow: inset 0 0 0 1px rgba(186, 222, 27, 0.12);
}

.form-actions,
.register-actions {
  border-color: var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: rgba(5, 6, 5, 0.92);
  box-shadow:
    0 -18px 46px rgba(0, 0, 0, 0.46),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(22px);
}

/* Reports and tables */
.report-toolbar,
.search-toolbar,
.filters,
.filter-panel {
  border-color: var(--line);
  border-radius: var(--radius);
  background: var(--surface-1);
}

.filter-tabs,
.voting-tabs {
  gap: 6px;
  border-radius: var(--radius-sm);
  padding: 4px;
  background: rgba(255, 255, 255, 0.025);
}

.filter-tabs button,
.voting-tabs button {
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: var(--radius-xs);
  color: var(--muted);
  background: transparent;
}

.filter-tabs button.active,
.voting-tabs button.active {
  border-color: var(--line-brand);
  color: var(--white);
  background: var(--brand-soft);
}

.table-shell,
.report-table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: auto;
  background: rgba(0, 0, 0, 0.2);
}

table {
  border-collapse: separate;
  border-spacing: 0;
}

thead {
  position: sticky;
  top: 0;
  z-index: 2;
}

th {
  border-bottom: 1px solid var(--line);
  padding: 13px 15px;
  color: var(--muted-2);
  background: rgba(8, 9, 8, 0.96);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  backdrop-filter: blur(14px);
}

td {
  border-bottom: 1px solid var(--line-soft);
  padding: 14px 15px;
  color: var(--muted);
  font-size: 0.74rem;
}

tbody tr {
  transition:
    background 150ms ease,
    box-shadow 150ms ease;
}

tbody tr:hover {
  background: rgba(186, 222, 27, 0.035);
  box-shadow: inset 2px 0 0 var(--brand);
}

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

.report-row,
.log-row,
.ranking-row,
.infraction-bank-item {
  border-color: var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.018);
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.report-row:hover,
.log-row:hover,
.ranking-row:hover,
.infraction-bank-item:hover {
  border-color: rgba(186, 222, 27, 0.28);
  background: rgba(186, 222, 27, 0.035);
  transform: translateY(-1px);
}

.status-pill {
  min-height: 25px;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 0.59rem;
  font-weight: 950;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.status-pill.accepted,
.status-pill.approved {
  border-color: var(--brand);
  color: var(--black);
  background: var(--brand);
}

.status-pill.denied {
  border-color: var(--danger);
  color: var(--white);
  background: var(--danger);
}

.status-pill.analysis,
.status-pill.in-progress {
  border-color: var(--warning);
  color: var(--black);
  background: var(--warning);
}

.status-pill.archived {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--black);
}

/* Metrics */
.performance-view {
  gap: 18px;
}

.performance-highlight {
  min-height: 190px;
  align-items: center;
  border-color: rgba(186, 222, 27, 0.28);
  background:
    radial-gradient(circle at 88% 40%, rgba(186, 222, 27, 0.11), transparent 22%),
    linear-gradient(135deg, rgba(186, 222, 27, 0.055), transparent 48%),
    var(--surface-1);
}

.performance-highlight-copy h2 {
  margin: 12px 0 8px;
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 0.96;
}

.performance-highlight-copy p {
  color: var(--muted);
}

.performance-highlight-person {
  gap: 16px;
}

.performance-highlight-person .avatar {
  width: 76px;
  height: 76px;
}

.performance-highlight-person > strong {
  color: var(--brand);
  font-size: 2.4rem;
}

.performance-filters {
  align-items: end;
  gap: 14px;
}

.performance-kpis {
  gap: 12px;
}

.performance-kpi {
  min-height: 132px;
  padding: 20px;
}

.performance-kpi strong {
  font-size: 1.9rem;
}

.performance-member-head {
  align-items: center;
}

/* Voting */
.voting-layout {
  gap: 18px;
}

.voting-card {
  border-color: var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 2.2vw, 30px);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.022), transparent 42%),
    var(--surface-1);
  box-shadow: var(--shadow-sm);
}

.voting-card.is-open {
  border-color: rgba(186, 222, 27, 0.28);
  box-shadow:
    inset 2px 0 0 var(--brand),
    var(--shadow-sm);
}

.linked-report,
.evidence-link,
.vote-case-grid > div,
.vote-text,
.voter-list,
.vote-foot,
.voting-result-confirmation {
  border-color: var(--line);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.22);
}

.vote-button {
  min-height: 126px;
  padding: 16px;
}

.vote-progress {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}

.vote-progress i {
  border-radius: inherit;
  background: var(--brand);
}

/* Ranking */
.ranking-list {
  gap: 8px;
}

.ranking-row {
  min-height: 74px;
  padding: 11px 14px;
}

.rank-number {
  color: var(--brand);
  font-size: 1.1rem;
}

.ranking-row:first-child {
  border-color: rgba(186, 222, 27, 0.35);
  background:
    linear-gradient(90deg, rgba(186, 222, 27, 0.075), transparent 38%),
    rgba(255, 255, 255, 0.018);
}

/* Team and permissions */
.team-view {
  align-items: start;
  grid-template-columns: minmax(420px, 0.9fr) minmax(520px, 1.1fr);
  gap: 18px;
}

.team-roles-panel,
.team-users-panel {
  min-width: 0;
}

.permission-list,
.log-list {
  gap: 9px;
}

.permission-row,
.team-user-row {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px;
  background: rgba(255, 255, 255, 0.018);
}

.team-role-row {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  align-items: start;
  gap: 16px;
}

.team-role-name {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.team-role-name strong,
.team-role-name span {
  display: block;
  min-width: 0;
}

.team-role-name strong {
  font-size: 0.84rem;
}

.team-role-name span {
  color: var(--muted-2);
  font-size: 0.64rem;
  line-height: 1.35;
}

.permission-chips {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  padding: 6px 9px;
  white-space: normal;
}

.team-user-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.2fr) minmax(130px, 0.7fr) auto;
  align-items: center;
  gap: 14px;
}

.team-user-row > div {
  min-width: 0;
}

.team-user-row > div:nth-child(2) {
  display: grid;
  gap: 4px;
}

.team-user-row > div:nth-child(2) strong,
.team-user-row > div:nth-child(2) span {
  display: block;
  overflow-wrap: anywhere;
}

.team-user-row > div:nth-child(2) strong {
  font-size: 0.74rem;
}

.team-user-row > div:nth-child(2) span {
  color: var(--muted-2);
  font-size: 0.64rem;
  line-height: 1.35;
}

.permission-role-list {
  gap: 12px;
}

.permission-role-card {
  overflow: hidden;
  padding: 0;
}

.permission-role-heading {
  min-height: 66px;
  border-bottom: 1px solid var(--line-soft);
  padding: 13px 16px;
  background: rgba(255, 255, 255, 0.018);
}

.permission-switch-grid {
  gap: 8px;
  padding: 14px;
}

.permission-switch {
  min-height: 64px;
  border-color: var(--line);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.18);
}

.permission-switch:hover {
  border-color: var(--line-brand);
  background: var(--brand-faint);
}

.permission-save-bar {
  border-color: var(--line);
  border-radius: var(--radius);
  background: rgba(5, 6, 5, 0.92);
  backdrop-filter: blur(22px);
}

/* Notices */
.notices-view {
  align-items: start;
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.65fr);
  gap: 18px;
}

.notice-preview-panel {
  position: sticky;
  top: calc(var(--nav-height) + var(--page-header-height) + 24px);
}

.notice-scope-options {
  gap: 9px;
}

.notice-scope-options label {
  border-color: var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.018);
}

.notice-scope-options label:hover,
.notice-scope-options label.active {
  border-color: var(--line-brand);
  background: var(--brand-faint);
}

.discord-notice-preview {
  min-height: 340px;
  border-color: var(--line-brand);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(186, 222, 27, 0.055), transparent 40%),
    var(--surface-0);
}

/* Empty, loading and feedback states */
.empty-state {
  min-height: 180px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background:
    repeating-linear-gradient(-45deg, transparent 0 10px, rgba(255, 255, 255, 0.012) 10px 20px),
    rgba(255, 255, 255, 0.012);
}

.toast {
  right: 22px;
  bottom: 22px;
  width: min(420px, calc(100vw - 32px));
  min-height: 54px;
  border-color: var(--line-brand);
  border-radius: var(--radius);
  padding: 15px 18px;
  color: var(--text);
  background: rgba(8, 9, 8, 0.95);
  box-shadow:
    0 24px 72px rgba(0, 0, 0, 0.56),
    inset 3px 0 0 var(--brand);
  backdrop-filter: blur(22px);
}

.workspace-loading {
  border-color: var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(5, 6, 5, 0.92);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(16px);
}

/* Drawers and modals */
.drawer-backdrop,
.modal-backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
}

.drawer {
  border-left: 1px solid var(--line);
  background: var(--surface-0);
  box-shadow: -34px 0 100px rgba(0, 0, 0, 0.66);
}

.drawer-head {
  border-bottom-color: var(--line);
  background: rgba(5, 6, 5, 0.92);
  backdrop-filter: blur(20px);
}

.drawer-section {
  padding: 18px;
}

.modal-card {
  border-color: var(--line-strong);
  background: var(--surface-1);
  box-shadow: 0 42px 120px rgba(0, 0, 0, 0.7);
}

.modal-head {
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}

.decision-box-hint {
  max-width: 58ch;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.final-decision-summary dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.final-decision-summary dl > div {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.018);
}

.final-decision-summary dt {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.final-decision-summary dd {
  margin: 0;
  color: var(--white);
  line-height: 1.55;
  white-space: pre-wrap;
}

.decision-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(12px);
  animation: content-arrive 180ms ease-out both;
}

.decision-modal-card {
  width: min(560px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow-y: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 22px;
  background: var(--surface-1);
  box-shadow: 0 42px 120px rgba(0, 0, 0, 0.76);
}

.decision-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}

.decision-modal-head h2 {
  margin: 4px 0 6px;
  color: var(--white);
  font-size: 1.25rem;
}

.decision-modal-head p,
.decision-modal-card .field small {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.decision-modal-card form {
  display: grid;
  gap: 16px;
}

.decision-modal-card textarea {
  min-height: 150px;
}

.decision-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}

@media (max-width: 620px) {
  .decision-modal-backdrop {
    align-items: end;
    padding: 0;
  }

  .decision-modal-card {
    width: 100%;
    max-height: 88vh;
    border-radius: var(--radius) var(--radius) 0 0;
    padding: 18px;
  }

  .decision-modal-head,
  .decision-modal-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .decision-modal-actions .btn {
    width: 100%;
  }
}

/* Compact desktop navigation */
@media (max-width: 1540px) and (min-width: 901px) {
  .sidebar {
    grid-template-columns: 168px minmax(0, 1fr) 104px;
    gap: 9px;
    padding-inline: 18px;
  }

  .brand-copy span,
  .user-box .user-mini strong,
  .user-box .user-mini span {
    display: none;
  }

  .nav {
    gap: 2px;
  }

  .nav button {
    width: 42px;
    min-width: 42px;
    grid-template-columns: 24px 0 auto;
    gap: 0;
    padding-inline: 8px;
    overflow: hidden;
    transition:
      width 220ms cubic-bezier(0.22, 1, 0.36, 1),
      min-width 220ms cubic-bezier(0.22, 1, 0.36, 1),
      color 160ms ease,
      border-color 160ms ease,
      background 160ms ease;
  }

  .nav-icon {
    width: 24px;
    height: 24px;
  }

  .nav .nav-label {
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    white-space: nowrap;
    transition:
      max-width 220ms cubic-bezier(0.22, 1, 0.36, 1),
      opacity 150ms ease;
  }

  .nav button:is(.active, :hover, :focus-visible) {
    width: auto;
    min-width: 116px;
    grid-template-columns: 24px minmax(0, auto) auto;
    gap: 7px;
  }

  .nav button:is(.active, :hover, :focus-visible) .nav-label {
    max-width: 154px;
    opacity: 1;
  }

  .nav .nav-notification {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 17px;
    height: 17px;
    padding-inline: 4px;
    font-size: 0.5rem;
  }

  .user-box {
    min-width: 104px;
    grid-template-columns: 34px 44px;
    padding-left: 10px;
  }

  .user-box .user-mini {
    grid-template-columns: 32px;
  }
}

@media (max-width: 1180px) and (min-width: 901px) {
  .sidebar {
    grid-template-columns: 56px minmax(0, 1fr) 104px;
  }

  .brand-box {
    padding-right: 12px;
  }

  .brand-copy {
    display: none;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
    padding-block: 18px;
  }

  .toolbar {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }

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

  .notice-preview-panel {
    position: static;
  }
}

/* Mobile and tablet */
@media (max-width: 900px) {
  :root {
    --mobile-top-height: 64px;
  }

  body {
    background: var(--canvas);
  }

  body::before {
    opacity: 0.34;
  }

  .app-shell {
    display: block;
    min-height: 100vh;
  }

  .workspace {
    padding: var(--mobile-top-height) 0 104px;
  }

  .mobile-top {
    position: fixed;
    inset: 0 0 auto;
    z-index: 80;
    display: grid;
    height: var(--mobile-top-height);
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
    border-bottom: 1px solid var(--line);
    padding: 7px 14px;
    background: rgba(3, 4, 3, 0.92);
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.38);
    backdrop-filter: blur(22px);
  }

  .mobile-brand-logo {
    width: 34px;
    height: 48px;
  }

  .mobile-brand-copy strong {
    font-size: 0.74rem;
  }

  .mobile-brand-copy span {
    color: var(--muted-2);
    font-size: 0.55rem;
  }

  .mobile-top .user-mini {
    grid-template-columns: 34px;
  }

  .mobile-top .user-mini > div {
    display: none;
  }

  .sidebar {
    position: fixed;
    inset: auto 10px 10px;
    z-index: 90;
    display: block;
    width: auto;
    height: 74px;
    min-height: 74px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 5px;
    overflow: hidden;
    background: rgba(5, 6, 5, 0.94);
    box-shadow:
      0 22px 62px rgba(0, 0, 0, 0.66),
      inset 0 1px 0 rgba(255, 255, 255, 0.045);
    backdrop-filter: blur(24px) saturate(125%);
    animation: mobile-nav-arrive 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .sidebar .brand-box,
  .sidebar .menu-label,
  .sidebar .user-box,
  .nav-group-label {
    display: none;
  }

  .nav {
    display: flex;
    width: 100%;
    max-width: 100%;
    height: 62px;
    align-items: stretch;
    flex-flow: row nowrap;
    gap: 4px;
    padding: 0 4px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    touch-action: pan-x;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav-group {
    display: flex;
    min-width: max-content;
    flex: 0 0 auto;
    flex-flow: row nowrap;
    gap: 4px;
  }

  .nav button {
    width: 74px;
    min-width: 74px;
    min-height: 60px;
    flex: 0 0 74px;
    grid-template-columns: 1fr;
    grid-template-rows: 28px auto;
    justify-items: center;
    gap: 3px;
    border-radius: var(--radius-sm);
    padding: 5px 4px;
    color: var(--muted);
    font-size: 0.57rem;
    text-align: center;
    scroll-snap-align: start;
    touch-action: pan-x;
  }

  .nav button:hover {
    transform: none;
  }

  .nav button.active {
    border-color: var(--line-brand);
    color: var(--white);
    background: var(--brand-soft);
  }

  .nav button.active::before {
    inset: auto 12px 0;
    width: auto;
    height: 2px;
    border-radius: 999px 999px 0 0;
  }

  .nav-icon {
    width: 27px;
    height: 27px;
  }

  .nav-label {
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .nav-notification {
    position: absolute;
    top: 3px;
    right: 7px;
    min-width: 18px;
    height: 18px;
    padding-inline: 4px;
    font-size: 0.53rem;
  }

  .topbar {
    position: relative;
    top: auto;
    z-index: 5;
    display: flex;
    min-height: 0;
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
    padding: 20px 16px 16px;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }

  .view-title {
    gap: 11px;
  }

  .view-title-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
  }

  .view-title h1 {
    font-size: clamp(1.35rem, 7vw, 1.9rem);
  }

  .view-title p {
    font-size: 0.71rem;
  }

  .toolbar {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding: 0 0 5px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .toolbar::-webkit-scrollbar {
    display: none;
  }

  .toolbar > * {
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  .analyst-pill {
    display: none;
  }

  .content-grid {
    width: 100%;
    gap: 12px;
    padding: 8px 12px 0;
  }

  .panel,
  .form-section {
    border-radius: var(--radius);
    padding: 18px 15px;
  }

  .panel-header,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 14px;
  }

  .panel-header .button-row,
  .section-heading .button-row {
    width: 100%;
  }

  .panel-header .button-row .btn,
  .section-heading .button-row .btn {
    flex: 1;
  }

  .form-grid,
  .performance-filters,
  .notice-scope-options,
  .vote-case-grid {
    grid-template-columns: 1fr;
  }

  .performance-filters {
    align-items: stretch;
  }

  .performance-filters .btn {
    width: 100%;
  }

  .performance-highlight {
    min-height: 0;
    align-items: flex-start;
    flex-direction: column;
    gap: 20px;
  }

  .performance-highlight-copy h2 {
    font-size: 1.8rem;
  }

  .performance-highlight-person .avatar {
    width: 58px;
    height: 58px;
  }

  .performance-highlight-person > strong {
    font-size: 1.8rem;
  }

  .performance-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .performance-kpi {
    min-height: 112px;
    padding: 15px;
  }

  .performance-kpi strong {
    font-size: 1.5rem;
  }

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

  .team-role-row,
  .team-user-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .team-user-row .manage-member-button {
    width: 100%;
  }

  .permission-switch-grid {
    grid-template-columns: 1fr;
  }

  .permission-save-bar {
    inset: auto 12px 94px;
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .permission-save-bar .btn {
    width: 100%;
  }

  .notice-preview-panel {
    position: static;
  }

  .discord-notice-preview {
    min-height: 270px;
  }

  .vote-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .vote-button {
    min-height: 116px;
  }

  .ranking-row {
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 8px;
  }

  .ranking-row > div:not(.ranking-member),
  .ranking-open-hint {
    display: none;
  }

  .table-shell,
  .report-table-wrap {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    margin-inline: -15px;
  }

  th,
  td {
    padding: 12px;
    white-space: nowrap;
  }

  .form-actions,
  .register-actions {
    inset: auto 12px 94px;
    width: auto;
  }

  .drawer {
    width: 100%;
    max-width: none;
  }

  .toast {
    right: 12px;
    bottom: 96px;
    width: calc(100vw - 24px);
  }
}

@media (max-width: 560px) {
  .login-screen {
    align-items: end;
    padding: 0;
  }

  .login-card {
    border-width: 1px 0 0;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 26px 20px 30px;
  }

  .login-card::before {
    inset: 0 24px auto;
    width: auto;
    height: 2px;
  }

  .performance-kpis,
  .vote-actions {
    grid-template-columns: 1fr;
  }

  .decision-options {
    grid-template-columns: 1fr;
  }

  .button-row {
    align-items: stretch;
    flex-direction: column;
  }

  .button-row .btn {
    width: 100%;
  }

  .view-title-icon {
    display: none;
  }

  .toolbar .btn {
    min-height: 38px;
  }
}

@keyframes nav-arrive {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes mobile-nav-arrive {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes content-arrive {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ambient-surface {
  from {
    transform: translate3d(-1%, 0, 0);
  }
  to {
    transform: translate3d(1%, 0.5%, 0);
  }
}

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

/* Interaction system: AnimatedContent, CountUp, SpotlightCard, AnimatedList and Stepper */
.ui-animated-content {
  animation: ui-content-enter 520ms cubic-bezier(0.22, 1, 0.36, 1) var(--ui-enter-delay, 0ms) both;
}

.ui-list-item-enter {
  animation: ui-list-enter 440ms cubic-bezier(0.22, 1, 0.36, 1) var(--ui-list-delay, 0ms) both;
}

.ui-spotlight-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.ui-spotlight-card::after {
  position: absolute;
  z-index: 0;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    250px circle at var(--spotlight-x, 50%) var(--spotlight-y, 50%),
    rgba(186, 222, 27, 0.13),
    rgba(255, 255, 255, 0.025) 38%,
    transparent 72%
  );
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
  content: "";
}

.ui-spotlight-card:hover::after {
  opacity: 1;
}

.ui-spotlight-card > * {
  position: relative;
  z-index: 1;
}

[data-count-up] {
  font-variant-numeric: tabular-nums;
}

.report-stepper {
  --step-progress: 0%;
  position: sticky;
  z-index: 18;
  top: calc(var(--nav-height) + var(--page-header-height) + 12px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  background: rgba(3, 4, 3, 0.94);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(18px);
}

.report-stepper-track {
  position: absolute;
  z-index: 0;
  top: 50%;
  right: 17%;
  left: 17%;
  height: 1px;
  overflow: hidden;
  background: var(--line);
  transform: translateY(-50%);
}

.report-stepper-track i {
  display: block;
  width: var(--step-progress);
  height: 100%;
  background: var(--brand);
  box-shadow: 0 0 16px rgba(186, 222, 27, 0.32);
  transition: width 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

.report-stepper button {
  position: relative;
  z-index: 1;
  display: grid;
  min-width: 0;
  min-height: 46px;
  grid-template-columns: 28px minmax(0, auto);
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--muted);
  background: rgba(0, 0, 0, 0.84);
  cursor: pointer;
  transition:
    color 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease,
    transform 180ms ease;
}

.report-stepper button:hover {
  color: var(--white);
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.report-stepper button b {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--white);
  background: var(--black);
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
}

.report-stepper button span {
  overflow: hidden;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.report-stepper button:is(.active, .completed) b {
  border-color: var(--brand);
  color: var(--black);
  background: var(--brand);
}

.report-stepper button.active {
  border-color: var(--line-brand);
  color: var(--white);
  background: var(--brand-soft);
  box-shadow: inset 0 0 0 1px rgba(186, 222, 27, 0.06);
}

.report-step-controls {
  display: none;
}

[data-report-step] {
  scroll-margin-top: calc(var(--nav-height) + var(--page-header-height) + 86px);
}

@keyframes ui-content-enter {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.995);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes ui-list-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .report-stepper {
    top: 8px;
    gap: 5px;
    margin-inline: -2px;
    padding: 7px;
  }

  .report-stepper-track {
    right: 18%;
    left: 18%;
  }

  .report-stepper button {
    min-height: 44px;
    grid-template-columns: 24px minmax(0, auto);
    gap: 6px;
    padding-inline: 6px;
  }

  .report-stepper button b {
    width: 24px;
    height: 24px;
    font-size: 0.62rem;
  }

  .report-stepper button span {
    font-size: 0.62rem;
  }

  .report-form[data-stepper-ready="true"] > [data-report-step] {
    display: none;
    scroll-margin-top: 82px;
  }

  .report-form[data-stepper-ready="true"] > [data-report-step].report-step-active {
    display: block;
    animation: ui-step-enter 360ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .report-step-controls {
    display: grid;
    grid-template-columns: minmax(96px, auto) minmax(0, 1fr) minmax(108px, auto);
    align-items: center;
    gap: 8px;
    border-top: 1px solid var(--line);
    padding-top: 14px;
  }

  .report-step-controls > span {
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 800;
    text-align: center;
    text-transform: uppercase;
  }

  .report-step-controls .btn {
    width: 100%;
  }

  .report-form[data-active-report-step="1"] .form-actions,
  .report-form[data-active-report-step="2"] .form-actions {
    display: none;
  }

  .report-form[data-active-report-step="3"] .report-step-controls {
    margin-bottom: 88px;
  }

  .ui-spotlight-card::after {
    display: none;
  }
}

@media (max-width: 520px) {
  .report-stepper button {
    grid-template-columns: 24px;
  }

  .report-stepper button span {
    display: none;
  }

  .report-step-controls {
    grid-template-columns: 1fr 1fr;
  }

  .report-step-controls > span {
    grid-column: 1 / -1;
    grid-row: 1;
  }
}

@keyframes ui-step-enter {
  from {
    opacity: 0;
    transform: translateX(10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ui-animated-content,
  .ui-list-item-enter,
  .report-form[data-stepper-ready="true"] > [data-report-step].report-step-active {
    animation: none !important;
  }
}
/* Denúncia Ilegal */
.illegal-module-view {
  gap: 20px;
}

.illegal-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.illegal-overview article {
  min-height: 104px;
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: #000;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.illegal-overview article:first-child {
  border-color: rgba(186, 222, 27, 0.48);
}

.illegal-overview span,
.illegal-filter span,
.illegal-review-progress small,
.illegal-review-slot > span,
.illegal-review-history article > span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.illegal-overview strong {
  color: #fff;
  font-size: 30px;
  line-height: 1;
}

.illegal-create-panel {
  padding: 0;
  overflow: hidden;
}

.illegal-create-panel > summary {
  min-height: 72px;
  padding: 18px 22px;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.illegal-create-panel > summary::-webkit-details-marker {
  display: none;
}

.illegal-create-panel > summary span {
  display: flex;
  align-items: center;
  gap: 12px;
}

.illegal-create-panel > summary b {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  color: #000;
  background: #bade1b;
  display: grid;
  place-items: center;
  font-size: 20px;
}

.illegal-create-panel > summary strong {
  color: #fff;
  font-size: 16px;
}

.illegal-create-panel > summary small {
  color: rgba(255, 255, 255, 0.55);
}

.illegal-report-form {
  padding: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: grid;
  gap: 16px;
  animation: panel-enter 180ms ease both;
}

.illegal-list-header {
  align-items: end;
}

.illegal-filter {
  min-width: 220px;
  display: grid;
  gap: 7px;
}

.illegal-case-list {
  display: grid;
  gap: 8px;
}

.illegal-case-row {
  width: 100%;
  min-height: 78px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  background: #000;
  color: #fff;
  display: grid;
  grid-template-columns: 90px minmax(240px, 1fr) 88px 88px 190px 28px;
  align-items: center;
  gap: 16px;
  text-align: left;
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.illegal-case-row:hover {
  border-color: rgba(186, 222, 27, 0.55);
  background: rgba(186, 222, 27, 0.035);
  transform: translateY(-1px);
}

.illegal-code {
  color: #bade1b;
  font-weight: 900;
}

.illegal-case-main,
.illegal-review-progress {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.illegal-case-main strong,
.illegal-case-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.illegal-case-main small {
  color: rgba(255, 255, 255, 0.56);
}

.illegal-review-progress b {
  color: #fff;
  font-size: 16px;
}

.illegal-status-pill {
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.illegal-status-pill.in_analysis,
.illegal-status-pill.finalized {
  border-color: rgba(186, 222, 27, 0.52);
  color: #bade1b;
}

.illegal-row-arrow {
  color: #bade1b;
  font-size: 20px;
  transition: transform 160ms ease;
}

.illegal-case-row:hover .illegal-row-arrow {
  transform: translateX(3px);
}

.illegal-drawer-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.illegal-drawer-summary > span:not(.illegal-status-pill) {
  color: rgba(255, 255, 255, 0.62);
}

.illegal-drawer-summary > strong {
  color: #bade1b;
}

.illegal-details-grid {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.illegal-details-grid > div {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
}

.illegal-details-grid .wide {
  grid-column: 1 / -1;
}

.illegal-details-grid dt {
  margin-bottom: 7px;
  color: rgba(255, 255, 255, 0.52);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.illegal-details-grid dd {
  margin: 0;
  color: #fff;
  white-space: pre-wrap;
}

.illegal-review-slots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.illegal-review-slot {
  min-height: 100px;
  padding: 15px;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 7px;
  display: grid;
  align-content: center;
  gap: 5px;
}

.illegal-review-slot.submitted {
  border-style: solid;
  border-color: rgba(186, 222, 27, 0.48);
}

.illegal-review-slot strong {
  color: #fff;
}

.illegal-review-slot small {
  color: #bade1b;
}

.illegal-review-form,
.illegal-tiebreak-block form,
.illegal-evidence-block form {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: grid;
  gap: 16px;
}

.illegal-opinion-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.illegal-opinion-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.illegal-opinion-grid label input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.illegal-opinion-grid label span {
  min-height: 64px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 7px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 9px;
  transition: border-color 160ms ease, background 160ms ease;
}

.illegal-opinion-grid label input:checked + span {
  border-color: #bade1b;
  background: rgba(186, 222, 27, 0.08);
}

.illegal-opinion-grid strong {
  color: #fff;
}

.illegal-review-history {
  display: grid;
  gap: 9px;
}

.illegal-review-history article {
  padding: 14px;
  border-left: 2px solid #bade1b;
  background: rgba(255, 255, 255, 0.025);
  display: grid;
  gap: 5px;
}

.illegal-review-history strong,
.illegal-review-history b {
  color: #fff;
}

.illegal-review-history p,
.illegal-review-history small {
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
}

@media (max-width: 1100px) {
  .illegal-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .illegal-case-row {
    grid-template-columns: 80px minmax(200px, 1fr) 80px 80px 170px;
  }

  .illegal-row-arrow {
    display: none;
  }
}

@media (max-width: 700px) {
  .illegal-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .illegal-overview article {
    min-height: 88px;
    padding: 14px;
  }

  .illegal-create-panel > summary,
  .illegal-list-header {
    align-items: stretch;
    flex-direction: column;
  }

  .illegal-create-panel > summary small {
    padding-left: 46px;
  }

  .illegal-filter {
    width: 100%;
  }

  .illegal-case-row {
    padding: 14px;
    grid-template-columns: 1fr auto;
    gap: 9px 12px;
  }

  .illegal-code,
  .illegal-case-main {
    grid-column: 1;
  }

  .illegal-status-pill {
    grid-column: 2;
    grid-row: 1 / span 2;
    max-width: 126px;
    text-align: center;
  }

  .illegal-review-progress {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
  }

  .illegal-details-grid,
  .illegal-review-slots,
  .illegal-opinion-grid,
  .illegal-opinion-grid.two {
    grid-template-columns: 1fr;
  }
}
/* Distribuicao operacional */
.distribution-view { gap: 20px; }
.distribution-settings-form { display: grid; gap: 18px; }
.distribution-settings-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.distribution-warning-field { grid-column: span 2; }
.distribution-options { display: flex; flex-wrap: wrap; gap: 12px 24px; padding: 14px 0; border-block: 1px solid rgb(255 255 255 / 10%); }
.distribution-options label { display: flex; gap: 8px; color: #fff; }
.distribution-members { border: 0; padding: 0; margin: 0; }
.distribution-members legend { color: #fff; font-weight: 800; }
.distribution-members > p { color: rgb(255 255 255 / 56%); }
.distribution-member-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.distribution-member-option { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 10px; padding: 12px; border: 1px solid rgb(255 255 255 / 10%); border-radius: 8px; background: #000; cursor: pointer; }
.distribution-member-option.selected { border-color: #bade1b; box-shadow: inset 3px 0 #bade1b; }
.distribution-member-option span { display: grid; min-width: 0; }
.distribution-member-option strong { color: #fff; overflow: hidden; text-overflow: ellipsis; }
.distribution-member-option small { color: rgb(255 255 255 / 48%); overflow: hidden; text-overflow: ellipsis; }
.distribution-status-pill { display: inline-flex; padding: 7px 10px; border: 1px solid rgb(186 222 27 / 42%); border-radius: 999px; color: #bade1b; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.distribution-status-pill.inactive { border-color: rgb(255 255 255 / 16%); color: #fff; }
@media (max-width: 980px) {
  .distribution-settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .distribution-member-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .distribution-settings-grid, .distribution-member-grid { grid-template-columns: 1fr; }
  .distribution-warning-field { grid-column: auto; }
}
