:root {
  --black: #000000;
  --white: #ffffff;
  --brand: #bade1b;
  --surface-1: rgba(255, 255, 255, 0.025);
  --surface-2: rgba(255, 255, 255, 0.045);
  --surface-3: rgba(255, 255, 255, 0.07);
  --line: rgba(255, 255, 255, 0.14);
  --line-soft: rgba(255, 255, 255, 0.08);
  --line-brand: rgba(186, 222, 27, 0.38);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.66);
  --muted-2: rgba(255, 255, 255, 0.42);
  --lime: #bade1b;
  --lime-2: #bade1b;
  --green: #bade1b;
  --cyan: #bade1b;
  --amber: #bade1b;
  --red: #ffffff;
  --radius: 8px;
  --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.24);
  --shadow-md: 0 22px 70px rgba(0, 0, 0, 0.52);
  --sidebar-width: 264px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--black);
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    var(--black);
  background-size: 72px 72px;
  letter-spacing: 0;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(110deg, rgba(186, 222, 27, 0.035), transparent 30%),
    radial-gradient(circle at 84% 12%, rgba(255, 255, 255, 0.04), transparent 24%);
}

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

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

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

::-webkit-scrollbar-thumb {
  border: 3px solid var(--black);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
}

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

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
}

.lime {
  color: var(--brand);
}

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

/* Login */
.login-screen {
  position: relative;
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 32px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.96), rgba(0, 0, 0, 0.76)),
    url("/assets/favela-bg.webp?v=20260804-task-drafts-v51") center / cover fixed;
}

.login-screen::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(90deg, transparent 49.8%, rgba(255, 255, 255, 0.035) 50%, transparent 50.2%),
    linear-gradient(transparent 49.8%, rgba(255, 255, 255, 0.035) 50%, transparent 50.2%);
  background-size: 88px 88px;
}

.login-panel {
  position: relative;
  width: min(460px, 100%);
  animation: login-enter 420ms ease-out both;
}

.login-card {
  position: relative;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 38px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.9);
  box-shadow: var(--shadow-md);
}

.login-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  content: "";
  background: var(--brand);
}

.login-head {
  display: grid;
  justify-items: start;
  gap: 10px;
  margin-bottom: 34px;
  text-align: left;
}

.secure-badge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line-brand);
  border-radius: 999px;
  padding: 0 11px;
  color: var(--brand);
  background: rgba(186, 222, 27, 0.08);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.secure-badge span,
.brand-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 14px rgba(186, 222, 27, 0.64);
}

.login-title {
  font-size: 2rem;
  font-weight: 1000;
  line-height: 1;
}

.login-title span {
  color: var(--brand);
}

.login-head p,
.helper-text {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.legacy-login {
  margin-top: 20px;
  border-top: 1px solid var(--line-soft);
  padding-top: 16px;
}

.legacy-login summary {
  color: var(--muted);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 800;
}

.legacy-login .form-grid {
  margin-top: 16px;
}

.staff-status {
  min-height: 16px;
  color: var(--muted-2);
  font-size: 0.72rem;
}

.staff-status.ok,
.staff-status.warn,
.staff-status.error {
  color: var(--brand);
}

/* Application shell */
.app-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  height: 100vh;
  min-width: 0;
  flex-direction: column;
  border-right: 1px solid var(--line-soft);
  padding: 22px 16px 16px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.96);
}

.brand-box {
  position: relative;
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: center;
  gap: 11px;
  border-bottom: 1px solid var(--line-soft);
  padding: 0 12px 18px;
  font-size: 0.94rem;
  font-weight: 1000;
}

.brand-logo {
  display: block;
  width: 62px;
  height: 84px;
  object-fit: contain;
  object-position: center;
}

.mobile-brand-logo {
  width: 42px;
  height: 58px;
}

/* Calendar rankings and isolated training simulation */
.ranking-period-heading {
  margin-bottom: 18px;
}

.simulation-view {
  gap: 18px;
}

.simulation-intro {
  max-width: 760px;
  margin: 42px auto 0;
  padding: 34px;
}

.simulation-intro h2,
.simulation-banner h2 {
  margin: 8px 0;
}

.simulation-intro p,
.simulation-banner p {
  max-width: 720px;
  color: var(--muted);
}

.simulation-safety-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.simulation-safety-list span {
  border: 1px solid var(--line-brand);
  border-radius: 999px;
  padding: 7px 11px;
  color: var(--text);
  background: rgba(186, 222, 27, 0.05);
  font-size: 0.72rem;
  font-weight: 800;
}

.simulation-brand-badge {
  position: absolute;
  right: 8px;
  bottom: 10px;
  border: 1px solid var(--brand);
  border-radius: 999px;
  padding: 3px 6px;
  color: var(--black);
  background: var(--brand);
  font-size: 0.58rem;
  font-weight: 1000;
}

.simulation-environment .sidebar {
  box-shadow: inset -3px 0 0 var(--brand);
}

.simulation-environment-banner {
  position: sticky;
  top: 74px;
  z-index: 29;
  display: flex;
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--brand);
  padding: 10px clamp(24px, 3vw, 42px);
  color: var(--white);
  background: rgba(0, 0, 0, 0.97);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.42);
}

.simulation-environment-banner > div,
.simulation-environment-controls,
.simulation-environment-controls label {
  display: flex;
  align-items: center;
  gap: 10px;
}

.simulation-environment-banner strong,
.simulation-environment-banner small,
.simulation-environment-controls label span {
  display: block;
}

.simulation-environment-banner strong {
  color: var(--brand);
  font-size: 0.8rem;
  text-transform: uppercase;
}

.simulation-environment-banner small,
.simulation-environment-controls label span {
  color: var(--muted);
  font-size: 0.68rem;
}

.simulation-pulse {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 5px rgba(186, 222, 27, 0.12);
  animation: simulation-pulse 1.8s ease-in-out infinite;
}

.simulation-environment-controls select {
  min-width: 150px;
  min-height: 36px;
  padding: 6px 34px 6px 10px;
}

@keyframes simulation-pulse {
  50% { box-shadow: 0 0 0 9px rgba(186, 222, 27, 0.02); }
}

.simulation-start-form,
.simulation-banner,
.simulation-banner-actions,
.simulation-review-card,
.simulation-report-list article,
.simulation-voting,
.simulation-vote-options {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.simulation-start-form {
  margin-top: 26px;
}

.simulation-start-form .field {
  flex: 1;
}

.simulation-banner {
  align-items: center;
  justify-content: space-between;
  border-color: rgba(186, 222, 27, 0.5);
  box-shadow: inset 4px 0 0 var(--accent);
}

.simulation-banner-actions {
  align-items: flex-end;
  flex: 0 0 auto;
}

.simulation-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: 18px;
}

.simulation-report-form,
.simulation-report-list,
.simulation-voting-panel {
  display: grid;
  gap: 14px;
}

.simulation-review-card,
.simulation-report-list article {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.simulation-review-card > div:first-child,
.simulation-report-list article > div:first-child,
.simulation-voting > div:first-child {
  display: grid;
  flex: 1;
  gap: 3px;
  min-width: 0;
}

.simulation-review-card span,
.simulation-report-list span,
.simulation-report-list small,
.simulation-voting span,
.simulation-voting p {
  color: var(--muted);
}

.simulation-review-card .field {
  min-width: 180px;
}

.simulation-report-list article {
  justify-content: space-between;
}

.simulation-voting {
  align-items: center;
  flex-wrap: wrap;
}

.simulation-vote-options {
  align-items: center;
  flex-wrap: wrap;
}

@media (max-width: 1040px) {
  .simulation-grid {
    grid-template-columns: 1fr;
  }

  .simulation-banner,
  .simulation-review-card,
  .simulation-report-list article {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 680px) {
  .simulation-intro {
    margin-top: 0;
    padding: 22px;
  }

  .simulation-start-form,
  .simulation-banner-actions,
  .simulation-vote-options {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .simulation-review-card .field {
    min-width: 0;
  }

  .simulation-safety-list {
    display: grid;
  }
}

@media (max-width: 900px) {
  .simulation-environment-banner {
    position: static;
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    margin: 10px 16px 0;
    border: 1px solid var(--brand);
    border-radius: 8px;
    padding: 12px;
  }

  .simulation-environment-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .simulation-environment-controls label {
    align-items: stretch;
    flex-direction: column;
    gap: 4px;
  }

  .simulation-environment-controls select,
  .simulation-environment-controls .btn {
    width: 100%;
  }
}

.menu-label {
  margin: 24px 12px 10px;
  color: var(--muted-2);
  font-size: 0.66rem;
  font-weight: 900;
  text-transform: uppercase;
}

.nav {
  display: grid;
  min-height: 0;
  gap: 4px;
  overflow-y: auto;
  scrollbar-width: none;
}

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

.nav button {
  position: relative;
  display: grid;
  min-height: 46px;
  align-items: center;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0 11px;
  color: var(--muted);
  background: transparent;
  font-size: 0.82rem;
  font-weight: 800;
  text-align: left;
  transition:
    color 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.nav-notification {
  display: inline-grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid var(--brand);
  border-radius: 999px;
  padding: 0 6px;
  color: var(--black);
  background: var(--brand);
  font-size: 0.62rem;
  font-weight: 1000;
}

.nav button:hover {
  border-color: var(--line-soft);
  color: var(--white);
  background: var(--surface-2);
  transform: translateX(2px);
}

.nav button.active {
  border-color: var(--line-brand);
  color: var(--white);
  background: linear-gradient(90deg, rgba(186, 222, 27, 0.14), rgba(186, 222, 27, 0.025));
}

.nav button.active::before {
  position: absolute;
  top: 9px;
  bottom: 9px;
  left: -17px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  content: "";
  background: var(--brand);
  box-shadow: 0 0 16px rgba(186, 222, 27, 0.42);
}

.nav-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.025);
  font-size: 0.88rem;
  transition: border-color 160ms ease;
}

.nav button.active .nav-icon,
.nav button:hover .nav-icon {
  border-color: var(--line-brand);
}

.user-box {
  display: grid;
  gap: 13px;
  margin-top: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px;
  background: var(--surface-1);
}

.user-mini {
  display: grid;
  min-width: 0;
  align-items: center;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
}

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

.user-mini strong,
.user-mini span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-mini strong {
  font-size: 0.82rem;
}

.user-mini span {
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
}

.avatar {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line-brand);
  border-radius: 50%;
  overflow: hidden;
  background: var(--black);
  color: var(--brand);
  font-size: 0.68rem;
  font-weight: 1000;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-sm {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  border: 1px solid var(--line-brand);
  border-radius: 50%;
  overflow: hidden;
  color: var(--brand);
  background: var(--black);
  font-size: 0.62rem;
  font-weight: 1000;
}

.avatar-sm img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.workspace {
  min-width: 0;
  padding-bottom: 56px;
}

.mobile-top {
  display: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  min-height: 74px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line-soft);
  padding: 14px clamp(24px, 3vw, 42px);
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(18px);
}

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

.analyst-pill,
.count-badge,
.priority,
.chip,
.access-badge,
.status-pill {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 11px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.analyst-pill {
  border-color: var(--line-brand);
  color: var(--brand);
  background: rgba(186, 222, 27, 0.06);
}

.view-title {
  position: relative;
  display: flex;
  width: auto;
  min-width: 0;
  min-height: 92px;
  flex: 1 1 auto;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  margin: 0;
  border-bottom: 0;
  padding: 16px 0;
}

.view-title::after {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 72px;
  height: 2px;
  content: "";
  background: var(--brand);
}

.view-title h1 {
  max-width: 900px;
  margin: 0 0 7px;
  font-size: clamp(1.65rem, 2.5vw, 2.35rem);
  font-weight: 1000;
  line-height: 1.02;
  text-transform: uppercase;
}

.view-title p {
  max-width: 780px;
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.content-grid {
  display: grid;
  width: min(1440px, calc(100% - 64px));
  margin: 26px auto 0;
  gap: 16px;
  animation: content-enter 280ms ease-out both;
}

.content-grid.split {
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
}

/* Shared components */
.panel {
  position: relative;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  background: rgba(0, 0, 0, 0.78);
  box-shadow: var(--shadow-sm);
}

.panel::before,
.section-card::before,
.metric::before,
.vote-card::before,
.staff-manager-panel::before {
  position: absolute;
  top: -1px;
  left: 16px;
  width: 48px;
  height: 2px;
  content: "";
  background: var(--brand);
}

.panel-header {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.panel-header > div {
  min-width: 0;
}

.panel-header h2,
.panel-header h3 {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 950;
  text-transform: uppercase;
}

.panel-header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.5;
}

.kicker {
  display: block;
  margin-bottom: 7px;
  color: var(--brand);
  font-size: 0.68rem;
  font-weight: 950;
  text-transform: uppercase;
}

.btn {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 15px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.76rem;
  font-weight: 900;
  transition:
    color 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.btn:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.28);
  transform: translateY(-1px);
}

.btn.primary {
  border-color: var(--brand);
  color: var(--black);
  background: var(--brand);
}

.btn.primary:hover:not(:disabled) {
  border-color: var(--white);
  background: var(--white);
}

.btn.discord,
.btn.cyan,
.btn.warn {
  border-color: var(--line-brand);
  color: var(--brand);
  background: rgba(186, 222, 27, 0.06);
}

.btn.danger {
  border-color: rgba(255, 255, 255, 0.28);
  color: var(--white);
  background: rgba(255, 255, 255, 0.05);
}

.btn.danger:hover:not(:disabled) {
  border-color: var(--brand);
  color: var(--brand);
  background: rgba(186, 222, 27, 0.06);
}

.btn.ghost {
  background: transparent;
}

.btn.wide {
  width: 100%;
}

.btn.compact {
  min-height: 32px;
  padding-inline: 11px;
  font-size: 0.68rem;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

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

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

.field {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.field label,
.access-control > span,
.vote-observation > span {
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 900;
  text-transform: uppercase;
}

.field-hint,
.section-note,
.permission-note {
  color: var(--muted-2);
  font-size: 0.72rem;
  line-height: 1.5;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 14px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.74);
  transition:
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

textarea {
  min-height: 118px;
  padding-block: 12px;
  resize: vertical;
  line-height: 1.55;
}

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

input:hover,
select:hover,
textarea:hover {
  border-color: rgba(255, 255, 255, 0.24);
}

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

select {
  appearance: auto;
}

.empty-state {
  display: grid;
  min-height: 132px;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 28px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.018);
  font-size: 0.82rem;
  line-height: 1.55;
  text-align: center;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 120;
  width: min(390px, calc(100% - 32px));
  border: 1px solid var(--line-brand);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius);
  padding: 14px 16px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.96);
  box-shadow: var(--shadow-md);
  font-size: 0.78rem;
  line-height: 1.5;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Operational warning */
body.operational-warning-visible {
  overflow: hidden;
}

.operational-warning-layer {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.operational-warning-layer.open {
  opacity: 1;
  pointer-events: auto;
}

.operational-warning-card {
  position: relative;
  display: grid;
  width: min(520px, 100%);
  justify-items: center;
  border: 1px solid var(--line-brand);
  border-radius: 12px;
  padding: 36px;
  overflow: hidden;
  color: var(--white);
  background:
    linear-gradient(180deg, rgba(186, 222, 27, 0.075), transparent 34%),
    var(--black);
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.72),
    0 0 0 1px rgba(186, 222, 27, 0.08);
  text-align: center;
  transform: translateY(16px) scale(0.98);
  transition: transform 220ms ease;
}

.operational-warning-layer.open .operational-warning-card {
  transform: translateY(0) scale(1);
}

.operational-warning-card::before {
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  content: "";
  background: var(--brand);
}

.operational-warning-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  margin-bottom: 18px;
  border: 1px solid var(--line-brand);
  border-radius: 50%;
  background: rgba(186, 222, 27, 0.08);
  box-shadow: 0 0 32px rgba(186, 222, 27, 0.14);
  font-size: 1.55rem;
}

.operational-warning-kicker {
  color: var(--brand);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.operational-warning-card h2 {
  max-width: 390px;
  margin: 8px 0 12px;
  font-size: 2rem;
  line-height: 1.08;
}

.operational-warning-card > p {
  max-width: 430px;
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.65;
}

.operational-warning-penalty {
  display: grid;
  width: 100%;
  justify-items: center;
  gap: 3px;
  margin: 24px 0 20px;
  border: 1px solid var(--line-brand);
  border-radius: 8px;
  padding: 16px;
  background: rgba(186, 222, 27, 0.055);
}

.operational-warning-penalty span,
.operational-warning-penalty small {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
}

.operational-warning-penalty strong {
  color: var(--brand);
  font-size: 1.5rem;
  line-height: 1.15;
}

.operational-warning-confirm {
  width: min(230px, 100%);
  min-height: 46px;
}

@media (max-width: 560px) {
  .operational-warning-layer {
    align-items: end;
    padding: 14px;
  }

  .operational-warning-card {
    border-radius: 12px;
    padding: 30px 20px 22px;
  }

  .operational-warning-card h2 {
    font-size: 1.5rem;
  }

  .operational-warning-icon {
    width: 52px;
    height: 52px;
    margin-bottom: 14px;
  }

  .operational-warning-confirm {
    width: 100%;
  }
}

/* Dashboard */
.audit-view {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.audit-metrics {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
}

.metric {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 158px;
  align-content: space-between;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.8);
  box-shadow: var(--shadow-sm);
}

.metric.spotlight {
  grid-column: span 5;
}

.metric.accepted {
  grid-column: span 3;
}

.metric.denied {
  grid-column: span 4;
}

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

.metric > span {
  max-width: calc(100% - 54px);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1.4;
  text-transform: uppercase;
}

.metric strong {
  font-size: 2.2rem;
  font-weight: 1000;
  line-height: 1;
}

.metric.spotlight strong {
  font-size: 1.2rem;
}

.metric small {
  max-width: calc(100% - 54px);
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.5;
}

.metric b {
  color: var(--brand);
}

.metric p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.5;
}

.metric-icon {
  position: absolute;
  right: 18px;
  bottom: 18px;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line-brand);
  border-radius: 8px;
  background: rgba(186, 222, 27, 0.06);
  font-size: 1.1rem;
}

.audit-view > .filter-panel,
.audit-view > .result-panel {
  grid-column: 1 / -1;
}

.filter-panel {
  background: rgba(0, 0, 0, 0.66);
}

.searchbar {
  display: grid;
  align-items: end;
  gap: 14px;
}

.searchbar.audit-filter {
  grid-template-columns: minmax(260px, 1fr) minmax(260px, 0.8fr);
}

.audit-table {
  display: grid;
  gap: 7px;
}

.audit-row {
  display: grid;
  width: 100%;
  min-width: 0;
  min-height: 64px;
  align-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  padding: 11px 14px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.018);
  text-align: left;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.audit-row:hover {
  border-color: var(--line-brand);
  background: rgba(186, 222, 27, 0.035);
  transform: translateY(-1px);
}

.audit-row > span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  text-overflow: ellipsis;
}

.audit-row > span b {
  color: var(--white);
}

.audit-row > span small {
  display: block;
  margin-top: 4px;
  color: var(--muted-2);
  font-size: 0.62rem;
}

.productivity-row {
  grid-template-columns: 110px minmax(150px, 1.2fr) minmax(110px, 0.8fr) minmax(110px, 0.8fr) minmax(210px, 1.7fr) minmax(130px, 0.8fr);
  gap: 16px;
}

.cell,
.cell strong,
.cell span {
  min-width: 0;
}

.cell {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.73rem;
  text-overflow: ellipsis;
}

.cell strong {
  color: var(--white);
}

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

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

.vote-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}

/* Reports */
.search-view {
  grid-template-columns: minmax(0, 1fr);
}

.history-filter {
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.report-search-controls {
  display: grid;
  grid-template-columns: minmax(420px, auto) minmax(320px, 1fr);
  align-items: center;
  gap: 12px;
}

.search-mode-tabs {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px;
  background: var(--surface-1);
}

.search-mode-pill {
  position: relative;
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  padding: 0 14px;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 850;
  text-align: center;
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.search-mode-pill input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.search-mode-pill:hover {
  color: var(--text);
}

.search-mode-pill.active {
  color: var(--black);
  background: var(--brand);
  box-shadow: 0 4px 18px rgba(186, 222, 27, 0.14);
}

.report-search-field {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: center;
}

.report-search-field .wide-search {
  width: 100%;
  padding-right: 44px;
  padding-left: 42px;
}

.report-search-icon {
  position: absolute;
  z-index: 1;
  left: 15px;
  font-size: 0.82rem;
  pointer-events: none;
}

.report-search-clear {
  position: absolute;
  right: 8px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 0;
  border-radius: 5px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  transition: color 160ms ease, background 160ms ease;
}

.report-search-clear:hover,
.report-search-clear:focus-visible {
  color: var(--black);
  background: var(--brand);
}

.wide-search {
  min-width: 0;
}

.filter-tabs,
.voting-tabs {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.filter-tabs::before {
  margin-right: 4px;
  color: var(--muted-2);
  content: "Filtrar por";
  font-size: 0.65rem;
  font-weight: 900;
  text-transform: uppercase;
}

.filter-pill,
.voting-tabs button {
  position: relative;
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 13px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 850;
  white-space: nowrap;
  transition:
    color 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.filter-pill input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.filter-pill:hover,
.filter-pill.active,
.voting-tabs button:hover,
.voting-tabs button.active {
  border-color: var(--brand);
  color: var(--black);
  background: var(--brand);
}

.report-row {
  grid-template-columns: 105px 124px minmax(130px, 1fr) minmax(130px, 1fr) minmax(180px, 1.3fr) minmax(140px, 0.9fr) 88px;
  gap: 14px;
}

.report-row .cell,
.productivity-row .cell {
  white-space: nowrap;
}

.video-chip {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 10px;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-pill.accepted {
  border-color: #bade1b;
  color: var(--black);
  background: #bade1b;
}

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

.status-pill.analysis {
  border-color: #facc15;
  color: var(--black);
  background: #facc15;
}

.status-pill.archived {
  border-color: #bade1b;
  color: #bade1b;
  background: #000000;
}

.priority {
  color: var(--white);
}

/* New report */
.register-view {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.form-shell {
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.form-shell::before {
  display: none;
}

.report-form {
  display: grid;
  gap: 16px;
}

.section-card {
  position: relative;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  background: rgba(0, 0, 0, 0.76);
  box-shadow: var(--shadow-sm);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.section-title span {
  color: var(--brand);
}

.section-note {
  margin: -10px 0 18px;
}

.decision-choice {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.decision-option {
  position: relative;
  display: grid;
  min-height: 104px;
  align-content: center;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 16px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.02);
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.decision-option:hover {
  border-color: var(--line-brand);
  background: rgba(186, 222, 27, 0.035);
  transform: translateY(-1px);
}

.decision-option:has(input:checked) {
  border-color: var(--brand);
  background: rgba(186, 222, 27, 0.07);
  box-shadow: inset 0 0 0 1px rgba(186, 222, 27, 0.12);
}

.decision-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.decision-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--white);
  font-size: 1rem;
  font-weight: 1000;
}

.decision-option:has(input:checked) .decision-mark {
  border-color: var(--brand);
  color: var(--black);
  background: var(--brand);
}

.decision-option strong {
  display: block;
  font-size: 0.84rem;
}

.decision-option small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.45;
}

.decision-details {
  border-top: 1px solid var(--line-soft);
  padding-top: 18px;
}

.infraction-search {
  position: sticky;
  top: 90px;
  z-index: 8;
  display: grid;
  align-items: center;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
  padding: 0 0 14px;
  background: var(--black);
}

.infraction-search-submit {
  min-height: 46px;
  border: 1px solid var(--brand);
  border-radius: 6px;
  padding: 0 16px;
  color: var(--black);
  background: var(--brand);
  font-size: 0.72rem;
  font-weight: 950;
}

.infraction-search-input {
  position: relative;
}

.infraction-search-input input {
  padding-right: 42px;
}

.infraction-search-input button {
  position: absolute;
  top: 7px;
  right: 7px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
  background: var(--black);
}

.infraction-search-count {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  white-space: nowrap;
}

.infraction-grid {
  display: grid;
  max-height: 356px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  padding-right: 5px;
  overflow-y: auto;
}

.infraction-option {
  position: relative;
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.018);
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1.35;
  transition:
    color 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.infraction-option:hover,
.infraction-option:has(input:checked) {
  border-color: var(--brand);
  color: var(--white);
  background: rgba(186, 222, 27, 0.06);
}

.infraction-option input {
  width: 16px;
  min-height: 16px;
  flex: 0 0 auto;
  accent-color: var(--brand);
}

.form-actions {
  position: sticky;
  bottom: 14px;
  z-index: 10;
  justify-content: flex-end;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-md);
}

.btn.is-loading::before {
  width: 13px;
  height: 13px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  content: "";
  animation: button-loading 700ms linear infinite;
}

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

.auto-fill-summary > div {
  display: grid;
  min-width: 0;
  gap: 6px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  padding: 13px;
  background: var(--surface-1);
}

.auto-fill-summary span {
  color: var(--muted-2);
  font-size: 0.62rem;
  font-weight: 900;
  text-transform: uppercase;
}

.auto-fill-summary strong {
  overflow-wrap: anywhere;
  font-size: 0.76rem;
  line-height: 1.45;
}

.discord-export-preview {
  margin-top: 14px;
  border: 1px solid var(--line-brand);
  border-radius: 7px;
  padding: 16px;
  background: rgba(186, 222, 27, 0.035);
}

.panel-header.compact {
  margin-bottom: 12px;
}

.discord-export-preview pre {
  margin: 0;
  color: var(--white);
  font-family: inherit;
  font-size: 0.78rem;
  line-height: 1.75;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* Notices */
.notices-view {
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  align-items: start;
}

.notice-form {
  display: grid;
  gap: 18px;
}

.notice-form textarea {
  min-height: 220px;
}

.notice-scope-fieldset {
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

.notice-scope-fieldset legend {
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

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

.notice-scope-options label {
  display: flex;
  min-width: 0;
  min-height: 70px;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 13px;
  cursor: pointer;
  background: var(--surface-1);
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.notice-scope-options label:hover,
.notice-scope-options label.active {
  border-color: var(--line-brand);
  background: rgba(186, 222, 27, 0.055);
}

.notice-scope-options label:active {
  transform: translateY(1px);
}

.notice-scope-options input {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  accent-color: var(--brand);
}

.notice-scope-options label > span {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.notice-scope-options strong {
  color: var(--white);
  font-size: 0.78rem;
}

.notice-scope-options small {
  color: var(--muted);
  font-size: 0.66rem;
}

.notice-recipient-picker {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line-brand);
  border-radius: 8px;
  padding: 14px;
  background: rgba(186, 222, 27, 0.025);
}

.notice-recipient-picker.is-hidden {
  display: none;
}

.notice-search-input {
  position: relative;
}

.notice-search-input > span {
  position: absolute;
  top: 50%;
  left: 13px;
  z-index: 1;
  color: var(--brand);
  font-size: 1rem;
  transform: translateY(-50%);
}

.notice-search-input input {
  width: 100%;
  padding-left: 40px;
}

.notice-selected-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.notice-selected-header > span {
  display: grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid var(--line-brand);
  border-radius: 50%;
  color: var(--brand);
  background: rgba(186, 222, 27, 0.07);
  font-weight: 900;
}

.notice-recipient-chips {
  display: flex;
  min-height: 30px;
  flex-wrap: wrap;
  gap: 7px;
}

.notice-selection-placeholder {
  align-self: center;
  color: var(--muted-2);
  font-size: 0.7rem;
}

.notice-recipient-chip {
  border: 1px solid var(--line-brand);
  border-radius: 999px;
  padding: 6px 9px;
  color: var(--white);
  background: rgba(186, 222, 27, 0.07);
  font-size: 0.68rem;
  font-weight: 800;
}

.notice-recipient-chip span {
  margin-left: 4px;
  color: var(--brand);
}

.notice-recipient-results {
  display: grid;
  max-height: 250px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  padding-right: 4px;
  overflow-y: auto;
}

.notice-recipient-option {
  display: grid;
  min-width: 0;
  align-items: center;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 9px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  padding: 10px;
  color: var(--white);
  background: var(--black);
  text-align: left;
  transition:
    border-color 150ms ease,
    background 150ms ease;
}

.notice-recipient-option:hover,
.notice-recipient-option.selected {
  border-color: var(--line-brand);
  background: rgba(186, 222, 27, 0.055);
}

.notice-recipient-option > span:not(.avatar-sm):not(.notice-recipient-check) {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.notice-recipient-option strong,
.notice-recipient-option small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notice-recipient-option strong {
  font-size: 0.72rem;
}

.notice-recipient-option small {
  color: var(--muted);
  font-size: 0.62rem;
}

.notice-recipient-check {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  font-weight: 900;
}

.notice-recipient-option.selected .notice-recipient-check {
  border-color: var(--brand);
  color: var(--black);
  background: var(--brand);
}

.notice-recipient-empty {
  grid-column: 1 / -1;
  border: 1px dashed var(--line);
  border-radius: 7px;
  padding: 18px;
  color: var(--muted);
  font-size: 0.72rem;
  text-align: center;
}

.notice-sender,
.notice-preview-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.notice-sender > div {
  display: grid;
  gap: 2px;
}

.notice-sender span,
.notice-sender small {
  color: var(--muted);
  font-size: 0.68rem;
}

.notice-preview-panel {
  position: sticky;
  top: 98px;
}

.discord-notice-preview {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line-brand);
  border-left: 4px solid var(--brand);
  border-radius: 7px;
  padding: 20px;
  background: var(--surface-1);
}

.notice-preview-brand {
  color: var(--brand);
  font-size: 0.64rem;
  font-weight: 1000;
}

.notice-preview-audience {
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
}

.discord-notice-preview h3,
.discord-notice-preview p {
  margin: 0;
}

.discord-notice-preview p {
  min-height: 120px;
  color: var(--muted);
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.notice-preview-author span {
  color: var(--muted);
  font-size: 0.7rem;
}

.notice-delivery-result {
  display: grid;
  gap: 14px;
  margin-top: 20px;
  border: 1px solid var(--line-brand);
  border-radius: 8px;
  padding: 18px;
  background: rgba(186, 222, 27, 0.03);
}

.notice-result-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.notice-result-heading h3 {
  margin: 4px 0 0;
  font-size: 1rem;
}

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

.notice-result-metrics > div {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  padding: 12px;
  background: var(--black);
}

.notice-result-metrics span {
  color: var(--muted);
  font-size: 0.62rem;
  text-transform: uppercase;
}

.notice-result-metrics strong {
  color: var(--brand);
  font-size: 1.25rem;
}

.notice-failure-list {
  display: grid;
  gap: 7px;
}

.notice-failure-list > strong {
  color: var(--muted);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.notice-failure-row {
  display: grid;
  align-items: center;
  grid-template-columns: minmax(150px, 0.7fr) minmax(0, 1fr);
  gap: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  padding: 11px;
  background: var(--black);
}

.notice-failure-row > span:first-child {
  display: grid;
  gap: 2px;
}

.notice-failure-row small,
.notice-failure-row > span:last-child {
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.notice-result-success {
  margin: 0;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  padding: 12px;
  color: var(--white);
  background: var(--black);
  font-size: 0.72rem;
}

@keyframes button-loading {
  to {
    transform: rotate(360deg);
  }
}

.side-summary {
  position: sticky;
  top: 98px;
}

.mandatory-voting-block {
  max-width: 920px;
  border-color: var(--line-brand);
  padding: 30px;
}

.mandatory-voting-block h2 {
  margin: 0 0 10px;
  font-size: 1.25rem;
}

.mandatory-voting-block p {
  max-width: 720px;
  color: var(--muted);
  line-height: 1.6;
}

/* Training */
.training-queue {
  display: grid;
  gap: 8px;
}

.training-card {
  display: grid;
  min-width: 0;
  align-items: center;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 18px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.018);
  transition:
    border-color 160ms ease,
    background 160ms ease;
}

.training-card:hover {
  border-color: var(--line-brand);
  background: rgba(186, 222, 27, 0.035);
}

.queue-position {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid var(--line-brand);
  border-radius: 7px;
  color: var(--brand);
  background: rgba(186, 222, 27, 0.05);
  font-size: 0.78rem;
  font-weight: 1000;
}

.training-card-main {
  min-width: 0;
}

.training-card-main h3 {
  margin: 0;
  font-size: 0.9rem;
}

.training-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.7rem;
}

.training-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Voting */
.voting-layout {
  grid-template-columns: minmax(320px, 0.72fr) minmax(0, 1.28fr);
  align-items: start;
}

.voting-layout > .panel:first-child {
  position: sticky;
  top: 98px;
}

.voting-form {
  display: grid;
  gap: 16px;
}

.voting-list {
  display: grid;
  gap: 14px;
}

.vote-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  background: rgba(0, 0, 0, 0.8);
  box-shadow: var(--shadow-sm);
}

.vote-card.closed {
  opacity: 0.82;
}

.vote-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 16px;
}

.vote-card-head h3 {
  margin: 0;
  font-size: 1.05rem;
}

.vote-card-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.7rem;
}

.linked-report {
  display: flex;
  width: 100%;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  border: 1px solid var(--line-brand);
  border-radius: 6px;
  padding: 0 14px;
  color: var(--white);
  background: rgba(186, 222, 27, 0.045);
  text-align: left;
}

.linked-report span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.linked-report strong {
  color: var(--brand);
}

.vote-case-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.vote-case-grid > div {
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.018);
}

.vote-case-grid span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted-2);
  font-size: 0.64rem;
  font-weight: 900;
  text-transform: uppercase;
}

.vote-case-grid strong {
  font-size: 0.78rem;
}

.evidence-link {
  display: flex;
  min-height: 42px;
  align-items: center;
  margin-top: 8px;
  border: 1px solid var(--line-brand);
  border-radius: 6px;
  padding: 0 12px;
  color: var(--brand);
  background: rgba(186, 222, 27, 0.045);
  font-size: 0.74rem;
  font-weight: 850;
}

.evidence-link.unavailable {
  border-color: var(--line);
  color: var(--muted);
  background: transparent;
}

.vote-text {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.vote-text > div,
.vote-text > section {
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  padding: 13px;
  background: rgba(255, 255, 255, 0.018);
}

.vote-text strong {
  display: block;
  margin-bottom: 6px;
  font-size: 0.68rem;
  text-transform: uppercase;
}

.vote-text p {
  margin: 0;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.55;
}

.vote-observation {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.vote-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.vote-button {
  display: grid;
  min-width: 0;
  min-height: 72px;
  align-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.018);
  font-size: 0.68rem;
  font-weight: 900;
  transition:
    color 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.vote-button:hover:not(:disabled),
.vote-button.active {
  border-color: var(--brand);
  color: var(--white);
  background: rgba(186, 222, 27, 0.06);
}

.vote-button > strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voter-list {
  margin-top: 16px;
  border-top: 1px solid var(--line-soft);
  padding-top: 14px;
}

.voter-list > strong {
  display: block;
  margin-bottom: 9px;
  font-size: 0.7rem;
  text-transform: uppercase;
}

.voter-list > div {
  display: grid;
  gap: 6px;
}

.voter-record {
  display: grid;
  align-items: center;
  grid-template-columns: minmax(130px, 0.8fr) minmax(120px, 0.65fr) minmax(0, 1.55fr) auto;
  gap: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  padding: 9px 11px;
  background: rgba(255, 255, 255, 0.015);
  font-size: 0.7rem;
}

.voter-choice {
  color: var(--brand);
  font-weight: 900;
}

.missing-voters {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.5;
}

.vote-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}

.voting-closed-note {
  color: var(--muted);
  font-size: 0.7rem;
}

/* Ranking, logs and team */
.ranking-list,
.log-list,
.permission-list {
  display: grid;
  gap: 7px;
}

.ranking-row {
  display: grid;
  min-height: 70px;
  align-items: center;
  grid-template-columns: 42px minmax(180px, 1fr) repeat(4, minmax(90px, 0.55fr));
  gap: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.018);
}

.ranking-row:first-child {
  border-color: var(--line-brand);
  background: rgba(186, 222, 27, 0.045);
}

.rank-number {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 1000;
}

.ranking-row:first-child .rank-number {
  border-color: var(--brand);
  color: var(--black);
  background: var(--brand);
}

.ranking-member {
  display: grid;
  min-width: 0;
  align-items: center;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
}

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

.ranking-member span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.68rem;
}

.ranking-stat {
  min-width: 0;
  text-align: right;
}

.ranking-stat strong {
  display: block;
  font-size: 0.9rem;
}

.ranking-stat span {
  color: var(--muted-2);
  font-size: 0.62rem;
  text-transform: uppercase;
}

.ranking-row > div:not(.ranking-member) {
  min-width: 0;
  text-align: right;
}

.ranking-row > div:not(.ranking-member) strong {
  display: block;
  font-size: 0.9rem;
}

.ranking-row > div:not(.ranking-member) span {
  display: block;
  margin-top: 3px;
  color: var(--muted-2);
  font-size: 0.61rem;
  text-transform: uppercase;
}

.log-row,
.permission-row {
  display: grid;
  min-width: 0;
  align-items: center;
  grid-template-columns: minmax(180px, 0.8fr) minmax(0, 1.4fr) auto;
  gap: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  padding: 13px;
  background: rgba(255, 255, 255, 0.018);
}

.log-row strong {
  font-size: 0.78rem;
}

.log-row span {
  color: var(--muted);
  font-size: 0.68rem;
}

.permission-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.user-role-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.user-role-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--white);
  background: var(--surface-2);
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1.2;
}

.user-role-chip.primary {
  border-color: var(--brand);
  color: var(--brand);
}

.user-role-editor {
  display: grid;
  width: 100%;
  gap: 12px;
}

.user-role-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.user-role-editor-head > div {
  display: grid;
  gap: 3px;
}

.user-role-editor-head span:not(.count-badge) {
  color: var(--muted);
  font-size: 0.68rem;
}

.user-role-option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.user-role-option {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  padding: 8px 10px;
  color: var(--muted);
  background: var(--surface-1);
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.user-role-option:hover,
.user-role-option.selected {
  border-color: var(--brand);
  color: var(--white);
  background: var(--brand-soft);
}

.user-role-option input {
  accent-color: var(--brand);
}

.user-role-editor.compact .user-role-option-grid {
  grid-template-columns: 1fr;
  max-height: 190px;
  overflow-y: auto;
}

.user-role-editor.compact .user-role-reason {
  display: none;
}

.chip {
  min-height: 26px;
  padding-inline: 9px;
  font-size: 0.61rem;
}

.team-user-row {
  grid-template-columns: minmax(190px, 1fr) minmax(105px, 0.5fr) minmax(360px, 1.45fr);
}

.user-actions {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(112px, 0.85fr) minmax(136px, 1fr) 112px;
  gap: 8px;
}

.team-view {
  grid-template-columns: minmax(360px, 0.72fr) minmax(680px, 1.28fr);
  align-items: start;
}

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

.team-role-row {
  align-items: start;
  grid-template-columns: 1fr;
  gap: 10px;
}

.team-role-name {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.team-role-name span {
  color: var(--muted-2);
  font-size: 0.64rem;
  font-weight: 800;
  white-space: nowrap;
}

.team-users-panel .log-list {
  gap: 10px;
}

.team-user-row .btn {
  min-width: 0;
  padding-inline: 10px;
  white-space: normal;
}

.voting-result-confirmation {
  display: grid;
  gap: 16px;
  margin-top: 14px;
  border: 1px solid var(--line-brand);
  border-radius: var(--radius);
  padding: 18px;
  background: rgba(186, 222, 27, 0.055);
}

.voting-result-confirmation h4 {
  margin: 0;
  font-size: 1.08rem;
}

.voting-result-confirmation p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.55;
}

.voting-result-counts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.voting-result-counts span {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  padding: 10px;
  color: var(--white);
  background: var(--black);
  font-size: 0.7rem;
}

.voting-result-counts b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

[hidden] {
  display: none !important;
}

.access-control {
  display: grid;
  gap: 6px;
}

/* Permissions */
.permission-form,
.permission-role-list {
  display: grid;
  gap: 12px;
}

.permission-header-actions,
.permission-role-identity,
.permission-role-actions,
.role-modal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.permission-role-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.role-color-swatch {
  width: 12px;
  height: 34px;
  flex: 0 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  background: var(--role-color, #bade1b);
  box-shadow: 0 0 18px color-mix(in srgb, var(--role-color, #bade1b) 28%, transparent);
}

.permission-role-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.58);
}

.permission-role-heading {
  display: flex;
  min-height: 60px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line-soft);
  padding: 12px 16px;
}

.permission-role-heading h3 {
  margin: 0;
  font-size: 0.84rem;
}

.permission-role-heading span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.66rem;
}

.permission-switch-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.permission-switch {
  display: grid;
  min-height: 72px;
  align-items: center;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 12px;
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  padding: 11px 14px;
  cursor: pointer;
}

.permission-switch:nth-child(3n) {
  border-right: 0;
}

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

.role-modal-card {
  width: min(620px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 24px;
  background:
    linear-gradient(140deg, rgba(186, 222, 27, 0.055), transparent 34%),
    #050505;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.72);
  animation: modal-enter 220ms ease-out both;
}

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

.role-modal-head h2 {
  margin: 5px 0 0;
  font-size: 1.45rem;
}

.role-modal-head p {
  max-width: 470px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.55;
}

.role-modal-form {
  display: grid;
  gap: 16px;
  padding-top: 20px;
}

.role-modal-form > label,
.role-modal-grid > label {
  display: grid;
  gap: 7px;
}

.role-modal-form label > span {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
}

.role-modal-form input[readonly] {
  color: var(--muted);
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.035);
}

.role-modal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 0.55fr);
  gap: 14px;
}

.role-color-field {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 8px;
}

.role-color-field input[type="color"] {
  width: 54px;
  min-height: 46px;
  padding: 5px;
  cursor: pointer;
}

.role-modal-note {
  border: 1px solid var(--line-brand);
  border-radius: 7px;
  padding: 12px 14px;
  color: var(--muted);
  background: rgba(186, 222, 27, 0.045);
  font-size: 0.7rem;
  line-height: 1.55;
}

.role-modal-actions {
  justify-content: flex-end;
  border-top: 1px solid var(--line-soft);
  padding-top: 18px;
}

.permission-switch strong {
  display: block;
  font-size: 0.72rem;
}

.permission-switch span {
  display: block;
  margin-top: 4px;
  color: var(--muted-2);
  font-size: 0.62rem;
}

.permission-switch small {
  display: block;
  margin-top: 4px;
  color: var(--muted-2);
  font-size: 0.61rem;
}

.permission-switch input {
  position: relative;
  width: 38px;
  min-height: 22px;
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0;
  background: rgba(255, 255, 255, 0.08);
  transition:
    border-color 160ms ease,
    background 160ms ease;
}

.permission-switch input::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  content: "";
  background: var(--white);
  transition: transform 160ms ease;
}

.permission-switch input:checked {
  border-color: var(--brand);
  background: var(--brand);
}

.permission-switch input:checked::after {
  background: var(--black);
  transform: translateX(16px);
}

.permission-save-bar {
  position: sticky;
  bottom: 14px;
  z-index: 9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-md);
}

.permission-migration-note {
  margin-bottom: 16px;
  border: 1px solid var(--line-brand);
  border-radius: 6px;
  padding: 12px;
  color: var(--muted);
  background: rgba(186, 222, 27, 0.045);
  font-size: 0.72rem;
}

/* Staff manager and report drawer */
.staff-manager {
  display: none;
}

.staff-manager.open {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(12px);
}

.staff-manager-panel {
  position: relative;
  width: min(860px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  overflow-y: auto;
  background: var(--black);
  box-shadow: var(--shadow-md);
  animation: modal-enter 220ms ease-out both;
}

.drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 16px;
}

.drawer-header h2,
.drawer-header h3 {
  margin: 0;
}

.staff-manager-list {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.staff-manager-row {
  display: grid;
  align-items: center;
  grid-template-columns: minmax(220px, 1fr) minmax(150px, 0.65fr) minmax(260px, 1fr);
  gap: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  padding: 13px;
  background: var(--surface-1);
}

.staff-manager-row > div {
  min-width: 0;
}

.access-badge.active {
  border-color: var(--brand);
  color: var(--black);
  background: var(--brand);
}

.access-badge.blocked {
  color: var(--white);
}

.staff-manager-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.drawer {
  pointer-events: none;
}

.drawer.open {
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: auto;
  background: rgba(0, 0, 0, 0.74);
  backdrop-filter: blur(8px);
}

.drawer-content {
  width: min(680px, 100%);
  height: 100%;
  margin-left: auto;
  border-left: 1px solid var(--line-brand);
  padding: 24px;
  overflow-y: auto;
  background: var(--black);
  box-shadow: -24px 0 70px rgba(0, 0, 0, 0.6);
  animation: drawer-enter 240ms ease-out both;
}

.detail-stack {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.detail-block {
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.018);
}

.detail-block h3,
.detail-block h4 {
  margin: 0 0 10px;
  font-size: 0.76rem;
  text-transform: uppercase;
}

.detail-block p {
  margin: 5px 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.55;
}

.evidence-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.evidence-list a {
  display: block;
  border: 1px solid var(--line-brand);
  border-radius: 5px;
  padding: 9px 10px;
  background: rgba(186, 222, 27, 0.04);
  font-size: 0.72rem;
  overflow-wrap: anywhere;
}

.evidence-item {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  padding: 10px;
  background: var(--surface-1);
}

.evidence-list .evidence-original-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--muted);
}

.evidence-archive-status {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 12px;
  border-left: 3px solid var(--line);
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.025);
}

.evidence-archive-status strong,
.evidence-archive-status span {
  min-width: 0;
}

.evidence-archive-status strong {
  color: var(--text);
  font-size: 0.73rem;
}

.evidence-archive-status span {
  grid-column: 1;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.4;
}

.evidence-archive-status .btn {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.evidence-archive-status.archived {
  border-left-color: var(--brand);
  background: rgba(186, 222, 27, 0.045);
}

.evidence-archive-status.failed {
  border-left-color: var(--white);
}

@media (max-width: 640px) {
  .evidence-archive-status {
    grid-template-columns: minmax(0, 1fr);
  }

  .evidence-archive-status .btn {
    grid-column: 1;
    grid-row: auto;
    width: 100%;
    margin-top: 4px;
  }
}

.training-review-box,
.decision-box {
  display: grid;
  gap: 12px;
}

.training-proposal-summary {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--line-brand);
  border-radius: 6px;
  padding: 10px 12px;
  background: rgba(186, 222, 27, 0.05);
}

.training-proposal-summary span {
  color: var(--muted);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.training-proposal-summary strong {
  color: var(--brand);
  text-align: right;
}

.report-preview {
  max-height: 340px;
  margin: 0;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  padding: 14px;
  overflow: auto;
  color: var(--muted);
  background: var(--black);
  font-family: inherit;
  font-size: 0.72rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

.delete-zone {
  border-style: dashed;
}

.voting-history-list {
  display: grid;
  gap: 7px;
}

.voting-history-list > article,
.voting-history-list > div {
  border-left: 2px solid var(--brand);
  padding: 8px 10px;
  background: rgba(186, 222, 27, 0.035);
}

/* Chat visual system. It is styling-only and activates when chat markup exists. */
.chat-shell,
[data-chat] {
  display: grid;
  min-height: 620px;
  grid-template-rows: auto minmax(0, 1fr) auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--black);
  box-shadow: var(--shadow-sm);
}

.chat-header,
.conversation-header {
  display: flex;
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line-soft);
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.02);
}

.chat-messages,
.conversation-messages,
.message-list {
  display: flex;
  min-height: 0;
  flex-direction: column;
  gap: 12px;
  padding: 20px max(20px, 7%);
  overflow-y: auto;
  scroll-behavior: smooth;
}

.chat-message,
.message-row {
  display: grid;
  max-width: min(76%, 760px);
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
}

.chat-message.sent,
.message-row.sent,
.message-row.own {
  align-self: end;
  grid-template-columns: minmax(0, 1fr) 32px;
}

.message-bubble,
.chat-bubble {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 11px 13px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.78rem;
  line-height: 1.55;
}

.sent .message-bubble,
.own .message-bubble,
.sent .chat-bubble {
  border-color: var(--line-brand);
  background: rgba(186, 222, 27, 0.055);
}

.message-meta,
.chat-message-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 5px;
  color: var(--muted-2);
  font-size: 0.64rem;
}

.chat-composer,
.message-composer {
  display: grid;
  align-items: end;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  border-top: 1px solid var(--line-soft);
  padding: 13px;
  background: rgba(255, 255, 255, 0.018);
}

.chat-composer textarea,
.message-composer textarea {
  min-height: 44px;
  max-height: 140px;
}

/* Motion */
@keyframes login-enter {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes modal-enter {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes drawer-enter {
  from {
    transform: translateX(30px);
  }
  to {
    transform: translateX(0);
  }
}

/* Team management, member profiles and medals */
.user-profile-trigger,
.analyst-profile-button {
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.user-profile-trigger {
  width: 100%;
  padding: 0;
  background: transparent;
  text-align: left;
}

.user-profile-trigger:hover strong,
.analyst-profile-button:hover span {
  color: #bade1b;
}

.analyst-profile-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.analyst-profile-button .avatar-sm {
  width: 24px;
  height: 24px;
}

.ranking-profile-row {
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.ranking-profile-row:hover {
  border-color: #bade1b;
  background: rgba(186, 222, 27, 0.04);
}

.ranking-open-hint {
  justify-self: end;
  color: #bade1b;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.manage-member-button {
  min-width: 112px;
}

.member-manager-content,
.profile-drawer-content {
  width: min(760px, 100%);
}

.member-manager-identity,
.profile-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: #050505;
}

.member-manager-identity h3,
.profile-hero h3 {
  margin: 0 0 4px;
  color: #fff;
}

.member-manager-identity p,
.profile-hero p,
.profile-hero span {
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
}

.member-management-sections {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.management-block,
.profile-section {
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: #080808;
}

.management-block.featured {
  border-color: #bade1b;
}

.management-block > div:first-child h3,
.profile-section h3 {
  margin: 0 0 5px;
}

.management-block > div:first-child p,
.profile-section .panel-header p {
  margin: 0 0 16px;
  color: rgba(255, 255, 255, 0.58);
}

.management-form-grid,
.management-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.management-form-grid form,
.management-action-grid form {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
}

.member-timeline {
  display: grid;
  gap: 0;
}

.member-timeline article {
  position: relative;
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 10px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.member-timeline i {
  width: 8px;
  height: 8px;
  margin-top: 5px;
  border-radius: 50%;
  background: #bade1b;
  box-shadow: 0 0 0 4px rgba(186, 222, 27, 0.1);
}

.member-timeline div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.member-timeline div span,
.member-timeline small {
  color: rgba(255, 255, 255, 0.5);
}

.member-timeline p {
  grid-column: 2 / -1;
  margin: -5px 0 0;
  color: rgba(255, 255, 255, 0.74);
}

.member-timeline small {
  grid-column: 2 / -1;
}

.profile-hero {
  margin-bottom: 16px;
  border-color: rgba(186, 222, 27, 0.55);
}

.profile-rank {
  min-width: 92px;
  padding: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.14);
  text-align: center;
}

.profile-rank strong {
  display: block;
  color: #bade1b;
  font-size: 28px;
}

.profile-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.profile-stat-grid article {
  min-height: 90px;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 6px;
  background: #050505;
}

.profile-stat-grid strong {
  display: block;
  margin-bottom: 8px;
  color: #bade1b;
  font-size: 24px;
}

.profile-stat-grid span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
}

.profile-section {
  margin-top: 12px;
}

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

.profile-medal {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 7px;
  background: #030303;
}

.profile-medal.earned {
  border-color: rgba(186, 222, 27, 0.6);
}

.profile-medal.locked {
  opacity: 0.62;
}

.medal-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(186, 222, 27, 0.5);
  border-radius: 6px;
  background: rgba(186, 222, 27, 0.08);
  font-size: 22px;
}

.profile-medal p,
.medal-admin-list p {
  margin: 4px 0 7px;
  color: rgba(255, 255, 255, 0.6);
}

.profile-medal small,
.medal-admin-list small {
  color: rgba(255, 255, 255, 0.5);
}

.medal-state {
  grid-column: 2;
  color: #bade1b;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.medal-remove-button {
  grid-column: 2;
  justify-self: start;
  margin-top: 2px;
}

.highlight-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.highlight-summary span {
  padding: 9px 12px;
  border: 1px solid rgba(186, 222, 27, 0.36);
  border-radius: 999px;
  color: #fff;
}

.medals-view {
  grid-template-columns: minmax(320px, 0.8fr) minmax(0, 1.2fr);
  align-items: start;
}

.medal-editor-panel {
  position: sticky;
  top: 20px;
}

.medal-admin-list {
  display: grid;
  gap: 9px;
}

.medal-admin-list > article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 7px;
  background: #050505;
}

.toggle-field {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 12px 0;
}

.toggle-field input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #bade1b;
  flex: 0 0 auto;
}

@media (max-width: 900px) {
  .management-form-grid,
  .management-action-grid,
  .profile-medal-grid,
  .medals-view {
    grid-template-columns: 1fr;
  }

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

  .medal-editor-panel {
    position: static;
  }

  .medal-admin-list > article {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .medal-admin-list > article .button-row {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .member-manager-identity,
  .profile-hero {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .member-manager-identity .access-badge,
  .profile-rank {
    grid-column: 1 / -1;
    width: 100%;
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
  }

  .profile-stat-grid {
    grid-template-columns: 1fr 1fr;
  }

  .member-timeline article {
    grid-template-columns: 12px minmax(0, 1fr);
  }

  .ranking-open-hint {
    display: none;
  }
}

.is-hidden {
  display: none !important;
}

/* Individual performance */
.performance-view > * {
  grid-column: 1 / -1;
}

.performance-highlight {
  display: flex;
  min-height: 172px;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border-color: var(--line-brand);
  background:
    linear-gradient(100deg, rgba(186, 222, 27, 0.1), transparent 54%),
    var(--black);
}

.performance-highlight h2 {
  margin: 6px 0;
  font-size: clamp(1.5rem, 3vw, 2.55rem);
  font-weight: 1000;
}

.performance-highlight p,
.performance-member-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

.performance-highlight-person {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 14px;
}

.performance-highlight-person .avatar {
  width: 70px;
  height: 70px;
  border-color: var(--brand);
}

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

.performance-filters {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(260px, 1.2fr) repeat(2, minmax(150px, 0.65fr)) auto;
  align-items: end;
  gap: 14px;
}

.performance-member-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.performance-identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 14px;
}

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

.performance-identity span,
.performance-rank span {
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 900;
  text-transform: uppercase;
}

.performance-identity h2 {
  margin: 3px 0;
  font-size: 1.25rem;
}

.performance-rank {
  display: grid;
  justify-items: end;
}

.performance-rank strong {
  color: var(--brand);
  font-size: 1.9rem;
}

.performance-rank small {
  color: var(--muted);
}

.performance-kpis {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.performance-kpi {
  display: grid;
  min-width: 0;
  min-height: 124px;
  align-content: space-between;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: rgba(0, 0, 0, 0.8);
}

.performance-kpi span,
.performance-kpi small {
  color: var(--muted);
  font-size: 0.65rem;
  line-height: 1.4;
}

.performance-kpi span {
  font-weight: 900;
  text-transform: uppercase;
}

.performance-kpi strong {
  color: var(--brand);
  font-size: 1.65rem;
  overflow-wrap: anywhere;
}

.performance-charts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.performance-chart-wide {
  grid-column: 1 / -1;
}

.evolution-chart {
  display: grid;
  height: 230px;
  align-items: end;
  grid-template-columns: repeat(auto-fit, minmax(42px, 1fr));
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding: 14px 8px 0;
}

.evolution-column {
  display: grid;
  min-width: 0;
  height: 100%;
  grid-template-rows: 1fr 24px;
  gap: 6px;
}

.evolution-bars {
  display: flex;
  min-height: 0;
  align-items: end;
  justify-content: center;
  gap: 4px;
}

.evolution-bars i {
  width: min(16px, 42%);
  min-height: 4px;
  border-radius: 3px 3px 0 0;
  background: var(--brand);
}

.evolution-bars i.secondary,
.chart-legend i.secondary {
  border: 1px solid var(--brand);
  background: transparent;
}

.evolution-column > span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.58rem;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.66rem;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chart-legend i {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--brand);
}

.decision-performance-chart,
.comparison-chart {
  display: grid;
  gap: 18px;
}

.decision-performance-chart > div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 14px;
}

.decision-performance-chart span,
.comparison-chart span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
}

.decision-performance-chart i {
  height: 7px;
  grid-column: 1 / -1;
  border-radius: 99px;
  overflow: hidden;
  background: var(--surface-3);
}

.decision-performance-chart b {
  display: block;
  height: 100%;
  background: var(--brand);
}

.decision-performance-chart b.outline {
  border: 1px solid var(--brand);
  background: transparent;
}

.comparison-bars {
  display: grid;
  gap: 4px;
  margin-top: 6px;
}

.comparison-bars i {
  display: flex;
  min-width: 24px;
  height: 20px;
  align-items: center;
  border-radius: 3px;
  padding-inline: 6px;
  color: var(--black);
  background: var(--brand);
  font-size: 0.6rem;
  font-style: normal;
  font-weight: 950;
}

.comparison-bars i.previous {
  border: 1px solid var(--brand);
  color: var(--white);
  background: transparent;
}

.performance-activity-list {
  display: grid;
  gap: 6px;
}

.performance-activity-list > div:not(.empty-state) {
  display: grid;
  min-height: 48px;
  align-items: center;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 10px;
  border-bottom: 1px solid var(--line-soft);
  padding: 7px 4px;
}

.performance-activity-list strong,
.performance-activity-list time {
  font-size: 0.72rem;
}

.performance-activity-list time {
  color: var(--muted);
}

.performance-empty {
  display: grid;
  min-height: 300px;
  place-items: center;
  align-content: center;
  text-align: center;
}

.performance-empty > span {
  font-size: 2rem;
}

.performance-empty h2 {
  margin: 12px 0 5px;
}

.performance-empty p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
}

/* Infraction bank */
.infraction-bank-view {
  grid-template-columns: minmax(310px, 0.72fr) minmax(0, 1.28fr);
  align-items: start;
}

.infraction-editor-panel {
  position: sticky;
  top: 104px;
}

.infraction-editor {
  display: grid;
  gap: 16px;
}

.switch-field {
  display: flex;
  min-height: 70px;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  cursor: pointer;
}

.switch-field input {
  width: 18px;
  min-height: 18px;
  flex: 0 0 auto;
  accent-color: var(--brand);
}

.switch-field span {
  display: grid;
  gap: 3px;
}

.switch-field strong {
  font-size: 0.76rem;
}

.switch-field small {
  color: var(--muted);
  font-size: 0.66rem;
}

.infraction-bank-filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 10px;
  margin-bottom: 16px;
}

.infraction-bank-list {
  display: grid;
  gap: 8px;
}

.infraction-bank-item {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 16px;
  background: rgba(255, 255, 255, 0.018);
}

.infraction-bank-item.inactive {
  opacity: 0.58;
}

.infraction-bank-main > div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.infraction-bank-main h3 {
  margin: 12px 0 5px;
  font-size: 0.88rem;
}

.infraction-bank-main p {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.55;
  white-space: pre-line;
}

.infraction-bank-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.infraction-option > span {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 2px;
}

.infraction-option small {
  color: var(--muted-2);
  font-size: 0.6rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawer-infraction-grid {
  display: grid;
  max-height: 310px;
  grid-template-columns: 1fr;
  gap: 6px;
  overflow-y: auto;
}

.report-edit-block form {
  display: grid;
  gap: 14px;
}

.report-infraction-snapshots {
  display: grid;
  gap: 7px;
}

.report-infraction-snapshots article {
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  padding: 12px;
}

.report-infraction-snapshots article > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.report-infraction-snapshots p {
  margin: 8px 0 0;
  white-space: pre-line;
}

/* Tablet */
@media (max-width: 1180px) {
  :root {
    --sidebar-width: 228px;
  }

  .content-grid {
    width: min(100% - 40px, 1440px);
  }

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

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

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

  .infraction-bank-view {
    grid-template-columns: 1fr;
  }

  .infraction-editor-panel {
    position: static;
  }

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

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

  .team-user-row {
    grid-template-columns: minmax(190px, 1fr) minmax(105px, 0.5fr) minmax(350px, 1.4fr);
  }

  .side-summary,
  .voting-layout > .panel:first-child {
    position: static;
  }

  .side-summary {
    display: none;
  }

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

  .permission-switch:nth-child(3n) {
    border-right: 1px solid var(--line-soft);
  }

  .permission-switch:nth-child(2n) {
    border-right: 0;
  }

  .report-row {
    grid-template-columns: 95px 118px minmax(120px, 1fr) minmax(120px, 1fr) minmax(160px, 1.2fr) 80px;
  }

  .report-row > :nth-child(6) {
    display: none;
  }

  .productivity-row {
    grid-template-columns: 100px minmax(150px, 1fr) minmax(100px, 0.7fr) minmax(100px, 0.7fr) minmax(180px, 1.3fr);
  }

  .productivity-row > :last-child {
    display: none;
  }

  .ranking-row {
    grid-template-columns: 42px minmax(180px, 1fr) repeat(3, minmax(86px, 0.5fr));
  }

  .ranking-row > :last-child {
    display: none;
  }
}

@media (max-width: 640px) {
  .permission-header-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .permission-header-actions .btn {
    width: 100%;
  }

  .permission-role-heading,
  .role-modal-head {
    align-items: stretch;
    flex-direction: column;
  }

  .role-modal-backdrop {
    align-items: end;
    padding: 10px;
  }

  .role-modal-card {
    max-height: calc(100dvh - 20px);
    border-radius: 10px;
    padding: 18px;
  }

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

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

/* Mobile navigation and compact layouts */
@media (max-width: 900px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    inset: auto 10px 10px;
    z-index: 70;
    display: block;
    width: auto;
    height: 68px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 7px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.94);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(16px);
  }

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

  .nav {
    display: flex;
    height: 54px;
    gap: 5px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
  }

  .nav button {
    display: grid;
    min-width: 62px;
    min-height: 54px;
    flex: 0 0 auto;
    align-content: center;
    justify-items: center;
    grid-template-columns: 1fr;
    gap: 2px;
    padding: 4px 6px;
    font-size: 0.55rem;
    text-align: center;
    scroll-snap-align: center;
  }

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

  .nav button.active::before {
    inset: auto 12px -8px;
    width: auto;
    height: 2px;
  }

  .nav-icon {
    width: 28px;
    height: 28px;
    font-size: 0.82rem;
  }

  .workspace {
    padding-bottom: 92px;
  }

  .mobile-top {
    display: flex;
    min-height: 66px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--line-soft);
    padding: 10px 16px;
    background: rgba(0, 0, 0, 0.94);
  }

  .mobile-top > strong {
    font-size: 0.85rem;
  }

  .mobile-top .user-mini {
    max-width: min(68%, 260px);
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .mobile-top .avatar {
    width: 32px;
    height: 32px;
  }

  .topbar {
    position: static;
    display: flex;
    min-height: 0;
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
    border-bottom: 0;
    padding: 12px 16px 0;
    background: transparent;
    backdrop-filter: none;
  }

  .toolbar {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .toolbar .analyst-pill,
  .toolbar .btn.primary,
  .toolbar .btn.warn {
    grid-column: 1 / -1;
  }

  .toolbar > * {
    width: 100%;
  }

  .analyst-pill {
    min-height: 38px;
  }

  .view-title,
  .content-grid {
    width: calc(100% - 32px);
  }

  .view-title {
    width: 100%;
    min-height: 0;
    margin: 0;
    padding: 18px 0 20px;
  }

  .view-title > div {
    width: 100%;
  }

  .view-title h1 {
    font-size: 1.65rem;
  }

  .content-grid {
    margin-top: 14px;
  }

  .content-grid.split,
  .form-grid.two,
  .searchbar.audit-filter,
  .history-filter,
  .decision-choice,
  .vote-case-grid,
  .vote-text {
    grid-template-columns: 1fr;
  }

  .notices-view,
  .auto-fill-summary {
    grid-template-columns: 1fr;
  }

  .notice-recipient-results {
    grid-template-columns: 1fr;
  }

  .performance-filters,
  .performance-charts,
  .infraction-bank-filters {
    grid-template-columns: 1fr;
  }

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

  .performance-highlight,
  .performance-member-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .performance-rank {
    justify-items: start;
  }

  .performance-chart-wide {
    grid-column: auto;
  }

  .evolution-chart {
    min-width: 620px;
  }

  .performance-chart-wide {
    overflow-x: auto;
  }

  .infraction-bank-item {
    grid-template-columns: 1fr;
  }

  .infraction-bank-actions {
    justify-content: flex-start;
  }

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

  .notice-result-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .panel,
  .section-card,
  .vote-card {
    padding: 17px;
  }

  .audit-metrics {
    grid-template-columns: 1fr;
  }

  .metric.spotlight,
  .metric.accepted,
  .metric.denied {
    grid-column: auto;
    min-height: 132px;
  }

  .history-filter {
    gap: 16px;
  }

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

  .search-mode-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .search-mode-pill {
    min-height: 44px;
    padding: 5px 8px;
    font-size: 0.66rem;
    white-space: normal;
  }

  .filter-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 3px;
  }

  .filter-tabs::before {
    display: none;
  }

  .filter-pill {
    flex: 0 0 auto;
  }

  .report-row,
  .productivity-row {
    display: grid;
    min-height: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 14px;
  }

  .report-row > *,
  .productivity-row > * {
    display: block;
    white-space: normal;
  }

  .report-row > :nth-child(5),
  .productivity-row > :nth-child(5) {
    grid-column: 1 / -1;
  }

  .report-row > :nth-child(6),
  .productivity-row > :last-child {
    display: none;
  }

  .infraction-search {
    position: static;
    top: 0;
    grid-template-columns: 1fr;
  }

  .infraction-search-submit {
    width: 100%;
  }

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

  .form-actions,
  .permission-save-bar {
    position: static;
    bottom: auto;
    margin-top: 2px;
    backdrop-filter: none;
  }

  .training-card {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .training-card-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

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

  .voting-result-counts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .team-user-row,
  .user-actions {
    grid-template-columns: 1fr;
  }

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

  .voter-record > :nth-child(3),
  .voter-record > :nth-child(4) {
    grid-column: 1 / -1;
  }

  .vote-foot {
    align-items: stretch;
    flex-direction: column;
  }

  .ranking-row {
    grid-template-columns: 36px minmax(0, 1fr) 70px;
  }

  .ranking-row > :nth-child(n + 4) {
    display: none;
  }

  .log-row,
  .permission-row,
  .team-user-row {
    grid-template-columns: 1fr;
  }

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

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

  .permission-switch,
  .permission-switch:nth-child(2n),
  .permission-switch:nth-child(3n) {
    border-right: 0;
  }

  .staff-manager.open {
    align-items: end;
    padding: 0;
  }

  .staff-manager-panel {
    width: 100%;
    max-height: 92vh;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 8px 8px 0 0;
    padding: 16px;
  }

  .staff-manager-row {
    grid-template-columns: 1fr;
  }

  .staff-manager-actions {
    grid-template-columns: 1fr;
  }

  .drawer-content {
    width: 100%;
    border-left: 0;
    padding: 16px;
  }

  .chat-shell,
  [data-chat] {
    min-height: calc(100vh - 180px);
  }

  .chat-messages,
  .conversation-messages,
  .message-list {
    padding: 15px;
  }

  .chat-message,
  .message-row {
    max-width: 92%;
  }
}

@media (max-width: 520px) {
  .login-screen {
    align-items: center;
    padding: 14px;
  }

  .login-card {
    padding: 28px 22px;
  }

  .login-title {
    font-size: 1.72rem;
  }

  .view-title h1 {
    font-size: 1.42rem;
  }

  .toolbar {
    gap: 6px;
  }

  .btn {
    min-height: 40px;
    padding-inline: 11px;
    font-size: 0.7rem;
  }

  .panel-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .count-badge {
    align-self: flex-start;
  }

  .section-card {
    padding: 15px;
  }

  .decision-option {
    min-height: 86px;
  }

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

  .form-actions .btn {
    width: 100%;
  }

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

  .notice-scope-options,
  .notice-result-metrics {
    grid-template-columns: 1fr;
  }

  .notice-failure-row {
    grid-template-columns: 1fr;
  }

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

  .performance-activity-list > div:not(.empty-state) {
    grid-template-columns: 26px minmax(0, 1fr);
  }

  .performance-activity-list time {
    grid-column: 2;
  }

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

  .infraction-bank-actions .btn {
    width: 100%;
  }

  .vote-card-head,
  .drawer-header {
    align-items: flex-start;
  }

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

  .chat-composer,
  .message-composer {
    grid-template-columns: 1fr;
  }
}

@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;
  }
}

/* Weekly goals */
.goals-view {
  gap: 20px;
}

.goal-editor-panel,
.goal-detail-panel,
.goal-list-panel,
.weekly-goal-dashboard {
  border-color: var(--line-soft);
  background: rgba(0, 0, 0, 0.86);
}

.goal-editor {
  display: grid;
  gap: 18px;
}

.goal-config-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--surface-1);
}

.goal-member-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 14px;
}

.goal-member-picker {
  min-width: 0;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
}

.goal-member-picker legend {
  padding: 0 8px;
  color: var(--white);
  font-weight: 800;
  text-transform: uppercase;
}

.goal-member-picker > p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.82rem;
}

.goal-member-picker > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 310px;
  overflow: auto;
  padding-right: 3px;
}

.goal-member-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 84px;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: var(--surface-1);
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.goal-member-option.responsible {
  grid-template-columns: auto minmax(0, 1fr);
}

.goal-member-option:hover,
.goal-member-option:has(> input:checked) {
  border-color: var(--line-brand);
  background: rgba(186, 222, 27, 0.06);
  transform: translateY(-1px);
}

.goal-member-option > input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
}

.goal-member-option > span {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0 8px;
  min-width: 0;
}

.goal-member-option .avatar-sm {
  grid-row: 1 / 3;
}

.goal-member-option b,
.goal-member-option small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.goal-member-option small {
  color: var(--muted);
}

.goal-share {
  width: 84px;
  min-width: 0;
  padding: 8px;
}

.goal-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}

.goal-form-footer > span {
  color: var(--brand);
  font-weight: 800;
}

.goal-form-footer > span.invalid {
  color: var(--white);
  text-decoration: underline;
  text-decoration-color: var(--brand);
}

.goals-workspace {
  display: grid;
  grid-template-columns: minmax(250px, 0.28fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.goal-list-panel {
  position: sticky;
  top: 170px;
}

.goal-cycle-list {
  display: grid;
  gap: 8px;
}

.goal-cycle {
  display: grid;
  gap: 7px;
  width: 100%;
  padding: 13px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  color: var(--white);
  text-align: left;
  background: var(--surface-1);
}

.goal-cycle:hover,
.goal-cycle.active {
  border-color: var(--line-brand);
  background: rgba(186, 222, 27, 0.06);
}

.goal-cycle strong,
.goal-cycle small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.goal-cycle small {
  color: var(--muted);
}

.goal-status,
.goal-result-status {
  width: fit-content;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 850;
  text-transform: uppercase;
}

.goal-status.in_progress,
.goal-result-status.achieved,
.goal-result-status.above,
.goal-result-status.on_track {
  border-color: var(--line-brand);
  color: var(--brand);
}

.goal-detail-head,
.weekly-goal-dashboard-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.goal-detail-head h2,
.weekly-goal-dashboard h2 {
  margin: 8px 0 4px;
}

.goal-detail-head p,
.weekly-goal-dashboard p {
  margin: 0;
  color: var(--muted);
}

.goal-detail-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.goal-team-summary {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
  gap: 14px;
  margin: 20px 0;
}

.goal-team-progress,
.goal-team-kpis {
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--surface-1);
}

.goal-team-progress {
  display: grid;
  gap: 8px;
}

.goal-team-progress > strong,
.weekly-goal-dashboard-head > strong {
  color: var(--brand);
  font-size: 2rem;
}

.goal-team-progress small {
  color: var(--muted);
}

.goal-team-kpis,
.weekly-goal-dashboard-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.goal-team-kpis span,
.weekly-goal-dashboard-kpis span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.goal-team-kpis small,
.weekly-goal-dashboard-kpis small {
  color: var(--muted);
}

.goal-team-kpis strong,
.weekly-goal-dashboard-kpis strong {
  font-size: 1.25rem;
}

.goal-progress {
  position: relative;
  height: 7px;
  overflow: visible;
  border-radius: 999px;
  background: var(--surface-3);
}

.goal-progress i {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--goal-progress);
  max-width: 100%;
  border-radius: inherit;
  background: var(--brand);
  box-shadow: 0 0 16px rgba(186, 222, 27, 0.28);
  transition: width 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.goal-progress b {
  position: absolute;
  top: -3px;
  bottom: -3px;
  left: var(--goal-expected);
  width: 1px;
  background: var(--white);
  opacity: 0.7;
}

.goal-participant-list {
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
}

.goal-participant-header,
.goal-participant-row {
  display: grid;
  grid-template-columns: 36px minmax(180px, 0.8fr) minmax(260px, 1.4fr) 80px 145px;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
}

.goal-participant-header {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  background: var(--surface-2);
}

.goal-participant-row {
  border-top: 1px solid var(--line-soft);
}

.goal-rank,
.goal-percentage {
  color: var(--brand);
  font-weight: 850;
}

.goal-person {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.goal-person > span,
.goal-person-progress,
.goal-person-progress > div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.goal-person small,
.goal-person-progress small {
  color: var(--muted);
}

.goal-audit {
  margin-top: 18px;
  border-top: 1px solid var(--line-soft);
}

.goal-audit summary {
  padding: 16px 0 8px;
  color: var(--brand);
  font-weight: 800;
  cursor: pointer;
}

.goal-audit article {
  display: grid;
  grid-template-columns: 150px 150px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line-soft);
}

.goal-audit span,
.goal-audit p {
  margin: 0;
  color: var(--muted);
}

.weekly-goal-dashboard {
  display: grid;
  gap: 15px;
}

.weekly-goal-dashboard-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 14px 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

@media (max-width: 1200px) {
  .goal-config-band,
  .goal-member-columns,
  .goal-team-summary {
    grid-template-columns: 1fr 1fr;
  }

  .goal-member-columns {
    grid-template-columns: 1fr;
  }

  .goal-participant-header {
    display: none;
  }

  .goal-participant-row {
    grid-template-columns: 34px minmax(160px, 0.8fr) minmax(220px, 1fr) 70px;
  }

  .goal-result-status {
    grid-column: 2 / -1;
  }
}

@media (max-width: 900px) {
  .goal-config-band,
  .goal-team-summary,
  .goals-workspace {
    grid-template-columns: 1fr;
  }

  .goal-list-panel {
    position: static;
  }

  .goal-cycle-list {
    grid-auto-flow: column;
    grid-auto-columns: minmax(220px, 78vw);
    overflow-x: auto;
    scroll-snap-type: x proximity;
  }

  .goal-cycle {
    scroll-snap-align: start;
  }

  .goal-member-picker > div,
  .goal-team-kpis,
  .weekly-goal-dashboard-kpis {
    grid-template-columns: 1fr 1fr;
  }

  .goal-participant-row {
    grid-template-columns: 28px minmax(0, 1fr) auto;
    gap: 9px;
  }

  .goal-person-progress,
  .goal-result-status {
    grid-column: 2 / -1;
  }

  .goal-percentage {
    grid-column: 3;
    grid-row: 1;
  }

  .goal-detail-head,
  .weekly-goal-dashboard-head,
  .goal-form-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .goal-detail-actions {
    justify-content: stretch;
  }

  .goal-detail-actions .btn,
  .goal-form-footer .btn {
    flex: 1;
  }
}

@media (max-width: 560px) {
  .goal-member-picker > div,
  .goal-team-kpis,
  .weekly-goal-dashboard-kpis {
    grid-template-columns: 1fr;
  }

  .goal-member-option {
    grid-template-columns: auto minmax(0, 1fr) 76px;
  }

  .goal-audit article {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

.trainee-responsibles-block {
  border-color: var(--line-brand);
  background: linear-gradient(145deg, rgba(186, 222, 27, 0.05), var(--surface-1) 42%);
}

.trainee-responsibles-form {
  display: grid;
  gap: 16px;
}

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

.trainee-responsible-option {
  display: grid;
  grid-template-columns: auto 36px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 62px;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--surface-1);
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.trainee-responsible-option:hover,
.trainee-responsible-option:has(input:checked) {
  border-color: var(--brand);
  background: rgba(186, 222, 27, 0.07);
  transform: translateY(-1px);
}

.trainee-responsible-option input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
}

.trainee-responsible-option .avatar {
  width: 36px;
  height: 36px;
}

.trainee-responsible-option span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.trainee-responsible-option strong,
.trainee-responsible-option small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trainee-responsible-option small {
  color: var(--muted);
}

@media (max-width: 680px) {
  .trainee-responsible-options {
    grid-template-columns: minmax(0, 1fr);
  }
}

.integration-origin-block {
  border-color: var(--line-brand);
  background: linear-gradient(135deg, rgba(186, 222, 27, 0.075), rgba(0, 0, 0, 0.82) 52%);
}

.integration-origin-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.integration-origin-heading h3 {
  margin: 3px 0 0;
}

.workflow-pill {
  min-height: 30px;
  padding: 7px 10px;
  border: 1px solid var(--line-brand);
  border-radius: 999px;
  color: var(--brand);
  background: rgba(0, 0, 0, 0.74);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.workflow-pill.finalized {
  color: var(--white);
  border-color: var(--line);
}

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

.integration-origin-grid > div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.62);
}

.integration-origin-grid span,
.integration-origin-grid strong {
  display: block;
}

.integration-origin-grid span {
  margin-bottom: 5px;
  color: var(--muted-2);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.integration-origin-grid strong {
  overflow-wrap: anywhere;
  color: var(--white);
}

.integration-missing-fields {
  margin: 12px 0 0;
  padding: 11px 12px;
  border-left: 3px solid var(--brand);
  color: var(--muted);
  background: rgba(0, 0, 0, 0.64);
}

.integration-missing-fields strong {
  color: var(--brand);
}

@media (max-width: 560px) {
  .integration-origin-heading,
  .integration-origin-grid {
    grid-template-columns: 1fr;
  }

  .integration-origin-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .workflow-pill {
    align-self: flex-start;
  }
}

/* Horizontal command navigation */
@media (min-width: 901px) {
  .app-shell {
    display: block;
    min-height: 100vh;
  }

  .sidebar {
    position: sticky;
    inset: 0 0 auto;
    z-index: 70;
    display: flex;
    width: 100%;
    height: 78px;
    min-height: 78px;
    align-items: center;
    flex-direction: row;
    gap: 0;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding: 9px 18px;
    overflow: hidden;
    background:
      linear-gradient(90deg, rgba(186, 222, 27, 0.035), transparent 22%),
      rgba(0, 0, 0, 0.95);
    box-shadow: 0 18px 54px rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(24px) saturate(125%);
    animation: command-nav-enter 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .brand-box {
    width: 214px;
    min-width: 214px;
    min-height: 58px;
    justify-content: flex-start;
    border-right: 1px solid rgba(255, 255, 255, 0.11);
    border-bottom: 0;
    padding: 0 18px 0 0;
  }

  .brand-logo {
    width: 38px;
    height: 50px;
    flex-basis: 38px;
  }

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

  .brand-copy span {
    font-size: 0.54rem;
  }

  .menu-label {
    display: none;
  }

  .nav {
    display: flex;
    height: 58px;
    min-width: 0;
    flex: 1 1 auto;
    align-items: center;
    align-content: center;
    gap: 4px;
    padding: 0 12px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scroll-padding-inline: 12px;
    scrollbar-color: rgba(186, 222, 27, 0.34) transparent;
    scrollbar-width: thin;
  }

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

  .nav::-webkit-scrollbar-track {
    background: transparent;
  }

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

  .nav-group {
    display: contents;
  }

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

  .nav button {
    min-width: max-content;
    min-height: 48px;
    flex: 0 0 auto;
    grid-template-columns: 28px minmax(0, auto) auto;
    gap: 8px;
    border-radius: 7px;
    padding: 0 12px;
    font-size: 0.7rem;
    scroll-snap-align: start;
  }

  .nav button:hover {
    transform: translateY(-1px);
  }

  .nav button.active {
    border-color: rgba(186, 222, 27, 0.36);
    background:
      linear-gradient(180deg, rgba(186, 222, 27, 0.12), rgba(186, 222, 27, 0.035)),
      rgba(255, 255, 255, 0.018);
  }

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

  .nav-group > button::after {
    inset: auto 10px 0;
    width: auto;
    height: 2px;
    opacity: 0;
    background: var(--brand);
    box-shadow: 0 0 14px rgba(186, 222, 27, 0.34);
    transform: scaleX(0.3);
    transform-origin: center;
    transition:
      opacity 180ms ease,
      transform 180ms ease;
  }

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

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

  .nav-notification {
    min-width: 19px;
    height: 19px;
    padding-inline: 5px;
    font-size: 0.54rem;
  }

  .user-box {
    width: 220px;
    min-width: 220px;
    min-height: 58px;
    flex: 0 0 220px;
    align-items: center;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    margin-top: 0;
    border: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 0;
    padding: 0 0 0 16px;
    background: transparent;
  }

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

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

  .user-box .btn {
    width: 46px;
    min-width: 46px;
    min-height: 36px;
    padding: 0 8px;
    font-size: 0.64rem;
  }

  .workspace {
    min-height: calc(100vh - 78px);
  }

  .workspace::before {
    inset: 78px 0 auto;
  }

  .topbar {
    top: 78px;
    z-index: 50;
  }

  .workspace-loading {
    top: 182px;
  }

  .simulation-environment-banner {
    top: 182px;
  }

  .content-grid {
    width: min(1600px, calc(100% - 48px));
  }
}

@media (max-width: 1500px) and (min-width: 901px) {
  .brand-box {
    width: 178px;
    min-width: 178px;
  }

  .brand-copy span {
    display: none;
  }

  .user-box {
    width: 168px;
    min-width: 168px;
    flex-basis: 168px;
  }

  .nav {
    gap: 2px;
    padding-inline: 8px;
  }

  .nav button {
    width: 46px;
    min-width: 46px;
    grid-template-columns: 28px 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),
      border-color 180ms ease,
      background-color 180ms ease,
      transform 180ms ease;
  }

  .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 160ms ease;
  }

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

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

  .user-box .user-mini span {
    display: none;
  }

  .topbar {
    top: 78px;
  }

  .workspace-loading,
  .simulation-environment-banner {
    top: 238px;
  }
}

@media (max-width: 1050px) and (min-width: 901px) {
  .brand-box {
    width: 150px;
    min-width: 150px;
  }

  .brand-copy {
    display: none;
  }

  .user-box {
    width: 122px;
    min-width: 122px;
    flex-basis: 122px;
  }

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

  .user-box .user-mini strong {
    max-width: 50px;
  }
}

@keyframes command-nav-enter {
  from {
    opacity: 0;
    transform: translateY(-14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .mobile-top {
    animation: command-nav-enter 360ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .sidebar {
    animation: mobile-nav-enter 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }
}

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

@media (prefers-reduced-motion: reduce) {
  .sidebar,
  .mobile-top {
    animation: none !important;
  }
}

/* 2026 workspace refresh: faster startup and multi-accused workflow */
.startup-screen {
  display: grid;
  min-height: 100vh;
  place-content: center;
  justify-items: center;
  gap: 18px;
  padding: 24px;
  background: var(--black);
}

.startup-mark {
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  border: 1px solid var(--line-brand);
  border-radius: 8px;
  background: var(--surface-1);
  box-shadow: var(--shadow-sm);
}

.startup-mark img {
  width: 60px;
  height: 74px;
  object-fit: contain;
}

.startup-copy {
  display: grid;
  gap: 5px;
  text-align: center;
}

.startup-copy strong {
  font-size: 1rem;
  text-transform: uppercase;
}

.startup-copy span {
  color: var(--muted);
  font-size: 0.78rem;
}

.startup-progress {
  width: min(260px, 70vw);
  height: 3px;
  overflow: hidden;
  background: var(--surface-3);
}

.startup-progress span,
.workspace-loading > span {
  display: block;
  width: 42%;
  height: 100%;
  background: var(--brand);
  animation: startup-slide 1s ease-in-out infinite alternate;
}

@keyframes startup-slide {
  from { transform: translateX(-20%); }
  to { transform: translateX(170%); }
}

.workspace-loading {
  position: sticky;
  top: 74px;
  z-index: 28;
  display: flex;
  height: 3px;
  align-items: center;
  overflow: visible;
  background: rgba(255, 255, 255, 0.06);
}

.workspace-loading small {
  position: absolute;
  top: 9px;
  right: clamp(20px, 3vw, 42px);
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
}

.nav {
  display: grid;
  align-content: start;
  gap: 18px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.nav-group {
  display: grid;
  gap: 4px;
}

.nav-group-label {
  padding: 0 10px 6px;
  color: var(--muted-2);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-group > button {
  position: relative;
  overflow: hidden;
}

.nav-group > button::after {
  position: absolute;
  inset: 8px auto 8px 0;
  width: 2px;
  content: "";
  opacity: 0;
  background: var(--brand);
  transform: scaleY(0.3);
  transition: opacity 160ms ease, transform 160ms ease;
}

.nav-group > button.active::after {
  opacity: 1;
  transform: scaleY(1);
}

.register-view {
  max-width: 1440px;
}

.form-shell {
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.report-form {
  display: grid;
  gap: 18px;
}

.accused-section {
  display: grid;
  gap: 18px;
}

.accused-section-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
}

.accused-section-heading h4,
.accused-section-heading p {
  margin: 0;
}

.accused-editor-list {
  display: grid;
  gap: 16px;
  counter-reset: accused;
}

.accused-editor {
  position: relative;
  display: grid;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(18px, 2vw, 26px);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.018);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.24);
}

.accused-editor::before,
.accused-detail-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  content: "";
  background: var(--brand);
}

.accused-editor-header,
.accused-detail-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.accused-editor-header > div {
  display: grid;
  gap: 3px;
}

.accused-sequence,
.accused-detail-card > header span:first-child {
  color: var(--brand);
  font-size: 0.67rem;
  font-weight: 1000;
  text-transform: uppercase;
}

.accused-editor-header strong {
  font-size: 1.12rem;
}

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

.compact-decision {
  min-height: 88px;
  padding: 14px;
}

.compact-decision span:last-child {
  display: grid;
  gap: 3px;
}

.compact-decision small {
  color: var(--muted);
}

.accused-infraction-panel {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  padding: 18px 0;
}

.accused-infraction-grid {
  max-height: 280px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.compact-search {
  margin: 0;
}

.compact-editor-list .accused-editor {
  box-shadow: none;
}

.accused-detail-list {
  display: grid;
  gap: 14px;
}

.accused-detail-card {
  position: relative;
  display: grid;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  overflow: hidden;
  background: var(--surface-1);
}

.accused-detail-card h3,
.accused-detail-card p {
  margin: 0;
}

.accused-detail-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line-soft);
  border-radius: 8px;
}

.accused-detail-meta > div {
  display: grid;
  min-width: 0;
  gap: 4px;
  border-right: 1px solid var(--line-soft);
  padding: 12px;
}

.accused-detail-meta > div:last-child {
  border-right: 0;
}

.accused-detail-meta span,
.accused-detail-notes span {
  color: var(--muted-2);
  font-size: 0.64rem;
  font-weight: 900;
  text-transform: uppercase;
}

.accused-detail-meta strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.accused-detail-infractions {
  display: grid;
  gap: 8px;
}

.accused-detail-infractions > article {
  display: grid;
  gap: 7px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 12px;
}

.accused-detail-infractions > article > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.accused-detail-infractions p,
.accused-detail-notes p {
  color: var(--muted);
  line-height: 1.55;
}

.accused-detail-notes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.accused-detail-notes > div {
  display: grid;
  gap: 6px;
  border-left: 2px solid var(--line-brand);
  padding: 4px 0 4px 12px;
}

.accused-history {
  border-top: 1px solid var(--line-soft);
  padding-top: 12px;
}

.accused-history summary {
  color: var(--brand);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 900;
}

.accused-history > div {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.accused-history article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  padding: 10px 12px;
  background: var(--surface-2);
}

.accused-history article span,
.accused-history article p {
  color: var(--muted);
  font-size: 0.72rem;
}

.accused-history article p {
  grid-column: 1 / -1;
}

.accused-decision-panel {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line-brand);
  padding-top: 16px;
}

.status-pill {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 10px;
  font-size: 0.66rem;
  font-weight: 1000;
  text-transform: uppercase;
}

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

.status-pill.denied {
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
}

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

@media (max-width: 960px) {
  .accused-decision-grid {
    grid-template-columns: 1fr;
  }

  .accused-detail-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .accused-detail-meta > div:nth-child(2) {
    border-right: 0;
  }

  .accused-detail-meta > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line-soft);
  }
}

@media (max-width: 760px) {
  .nav-group {
    display: contents;
  }

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

  .accused-section-heading,
  .accused-editor-header {
    align-items: stretch;
    flex-direction: column;
  }

  .accused-section-heading .btn,
  .accused-editor-header .btn {
    width: 100%;
  }

  .accused-identity-grid,
  .accused-detail-notes,
  .accused-decision-panel .form-grid {
    grid-template-columns: 1fr;
  }

  .accused-detail-card {
    padding: 16px;
  }
}

@media (max-width: 480px) {
  .accused-editor {
    padding: 14px;
  }

  .accused-detail-meta {
    grid-template-columns: 1fr;
  }

  .accused-detail-meta > div {
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }

  .accused-detail-meta > div:last-child {
    border-bottom: 0;
  }

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

/* Professional workspace redesign */
:root {
  --surface-0: #050505;
  --surface-1: rgba(255, 255, 255, 0.028);
  --surface-2: rgba(255, 255, 255, 0.052);
  --surface-3: rgba(255, 255, 255, 0.085);
  --line: rgba(255, 255, 255, 0.13);
  --line-soft: rgba(255, 255, 255, 0.075);
  --line-brand: rgba(186, 222, 27, 0.44);
  --muted: rgba(255, 255, 255, 0.68);
  --muted-2: rgba(255, 255, 255, 0.46);
  --shadow-sm: 0 16px 40px rgba(0, 0, 0, 0.28);
  --shadow-md: 0 28px 90px rgba(0, 0, 0, 0.66);
  --sidebar-width: 252px;
}

html {
  scrollbar-gutter: stable;
}

body {
  background:
    linear-gradient(rgba(255, 255, 255, 0.014) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.014) 1px, transparent 1px),
    #000;
  background-size: 56px 56px;
}

body::before {
  z-index: 0;
  background:
    linear-gradient(115deg, rgba(186, 222, 27, 0.028), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent 24%);
}

#app,
#operational-warning-root {
  position: relative;
  z-index: 1;
}

/* Login */
.login-screen {
  isolation: isolate;
  padding: 32px;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.97), rgba(0, 0, 0, 0.78)),
    url("/assets/favela-bg.webp?v=20260804-task-drafts-v51") center / cover fixed;
}

.login-screen::before {
  z-index: -1;
  background:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(90deg, transparent, #000 28%, #000 72%, transparent);
}

.login-screen::after {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: -1;
  width: 3px;
  content: "";
  background: var(--brand);
  box-shadow: 0 0 42px rgba(186, 222, 27, 0.38);
  animation: login-rail 4.8s ease-in-out infinite;
}

.login-panel {
  width: min(520px, 100%);
  animation: login-card-enter 540ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.login-card {
  border-color: rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 40px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.035), transparent 42%),
    rgba(0, 0, 0, 0.92);
  box-shadow:
    0 36px 110px rgba(0, 0, 0, 0.72),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
}

.login-card::before {
  width: 2px;
}

.login-head {
  gap: 0;
  margin-bottom: 32px;
}

.login-brand {
  display: grid;
  width: 100%;
  min-width: 0;
  align-items: center;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 20px;
}

.login-brand > div {
  display: grid;
  min-width: 0;
  justify-items: start;
  gap: 9px;
}

.login-logo {
  width: 80px;
  height: 104px;
  object-fit: contain;
  filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.58));
  animation: brand-float 5s ease-in-out infinite;
}

.login-title {
  font-size: 2.08rem;
  line-height: 0.94;
}

.login-head p {
  font-size: 0.78rem;
}

.login-card .form-grid {
  gap: 18px;
}

.login-card .btn {
  min-height: 48px;
}

.login-card > .btn.discord {
  margin-top: 10px;
}

/* Shell and navigation */
.app-shell {
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  background: transparent;
}

.sidebar {
  border-right-color: rgba(255, 255, 255, 0.1);
  padding: 18px 14px 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.028), transparent 20%),
    rgba(0, 0, 0, 0.98);
  box-shadow: 18px 0 60px rgba(0, 0, 0, 0.3);
}

.brand-box {
  min-height: 74px;
  justify-content: flex-start;
  border-bottom-color: rgba(255, 255, 255, 0.1);
  padding: 0 8px 16px;
}

.brand-logo {
  width: 46px;
  height: 58px;
  flex: 0 0 46px;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.46));
  transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
}

.brand-box:hover .brand-logo {
  transform: translateY(-2px) rotate(-1deg);
}

.brand-copy,
.mobile-brand-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.brand-copy strong,
.mobile-brand-copy strong {
  overflow: hidden;
  color: var(--white);
  font-size: 0.86rem;
  font-weight: 950;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand-copy span,
.mobile-brand-copy span {
  overflow: hidden;
  color: var(--muted-2);
  font-size: 0.6rem;
  font-weight: 750;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.menu-label {
  margin: 20px 10px 13px;
  font-size: 0.6rem;
}

.nav {
  gap: 19px;
  padding-right: 2px;
}

.nav-group {
  gap: 3px;
}

.nav-group-label {
  padding: 0 10px 7px;
  font-size: 0.58rem;
}

.nav button {
  min-height: 44px;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  border-radius: 7px;
  padding: 0 10px;
  font-size: 0.76rem;
  transition:
    color 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.nav button:hover {
  transform: translateX(3px);
}

.nav button.active {
  border-color: rgba(186, 222, 27, 0.32);
  background:
    linear-gradient(90deg, rgba(186, 222, 27, 0.14), rgba(186, 222, 27, 0.025) 72%, transparent);
  box-shadow: inset 0 0 0 1px rgba(186, 222, 27, 0.03);
}

.nav button.active::before {
  top: 8px;
  bottom: 8px;
  left: -15px;
  width: 3px;
  animation: active-nav-line 280ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.nav-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.022);
  transition:
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.nav button:hover .nav-icon,
.nav button.active .nav-icon {
  background: rgba(186, 222, 27, 0.07);
  transform: scale(1.04);
}

.user-box {
  gap: 10px;
  border-color: rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  padding: 12px;
  background:
    linear-gradient(135deg, rgba(186, 222, 27, 0.045), transparent 64%),
    rgba(255, 255, 255, 0.022);
}

.user-profile-trigger {
  border-radius: 6px;
  transition: background 180ms ease;
}

.user-profile-trigger:hover {
  background: rgba(255, 255, 255, 0.035);
}

.workspace {
  position: relative;
  min-height: 100vh;
  padding-bottom: 72px;
}

.workspace::before {
  position: fixed;
  inset: 0 0 auto var(--sidebar-width);
  z-index: -1;
  height: 260px;
  pointer-events: none;
  content: "";
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.022), transparent);
}

.mobile-brand-copy {
  display: none;
}

/* Header */
.topbar {
  min-height: 104px;
  gap: 28px;
  border-bottom-color: rgba(255, 255, 255, 0.1);
  padding: 12px clamp(26px, 3.2vw, 52px);
  background: rgba(0, 0, 0, 0.84);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(24px) saturate(120%);
}

.view-title {
  display: grid;
  min-height: 78px;
  align-items: center;
  justify-content: start;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 16px;
  padding: 10px 0;
}

.view-title::after {
  bottom: -13px;
  width: 84px;
  height: 2px;
  box-shadow: 0 0 18px rgba(186, 222, 27, 0.34);
  transform-origin: left;
  animation: title-line-enter 520ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.view-title-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid var(--line-brand);
  border-radius: 8px;
  background: rgba(186, 222, 27, 0.065);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  font-size: 1.08rem;
  animation: title-icon-enter 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.view-title-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.view-eyebrow {
  color: var(--brand);
  font-size: 0.58rem;
  font-weight: 900;
  text-transform: uppercase;
}

.view-title h1 {
  margin: 0;
  font-size: clamp(1.36rem, 2vw, 1.92rem);
  line-height: 1.04;
}

.view-title p {
  max-width: 720px;
  font-size: 0.77rem;
  line-height: 1.45;
}

.toolbar {
  min-width: max-content;
  gap: 7px;
}

.toolbar .btn,
.analyst-pill {
  min-height: 40px;
}

.analyst-pill {
  gap: 8px;
  padding: 3px 12px 3px 4px;
  text-transform: none;
}

.analyst-pill .avatar-sm {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
}

.btn-icon {
  display: inline-grid;
  width: 17px;
  min-width: 17px;
  place-items: center;
  font-size: 0.92rem;
  line-height: 1;
}

/* Core components */
.content-grid {
  width: min(1500px, calc(100% - 64px));
  margin-top: 30px;
  gap: 18px;
  animation: none;
}

.content-grid > * {
  animation: workspace-item-enter 440ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.content-grid > :nth-child(2) {
  animation-delay: 45ms;
}

.content-grid > :nth-child(3) {
  animation-delay: 90ms;
}

.content-grid > :nth-child(4) {
  animation-delay: 135ms;
}

.panel,
.section-card,
.vote-card,
.training-card,
.accused-editor,
.accused-detail-card {
  border-color: rgba(255, 255, 255, 0.115);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.022), transparent 42%),
    rgba(4, 4, 4, 0.88);
  box-shadow:
    0 18px 52px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.panel,
.section-card {
  padding: 24px;
}

.panel::before,
.section-card::before,
.metric::before,
.vote-card::before,
.staff-manager-panel::before {
  left: 20px;
  width: 54px;
  box-shadow: 0 0 16px rgba(186, 222, 27, 0.22);
}

.panel-header {
  margin-bottom: 22px;
}

.panel-header h2,
.panel-header h3 {
  font-size: 0.82rem;
}

.panel-header p {
  max-width: 720px;
  font-size: 0.73rem;
}

.metric {
  min-height: 166px;
  border-color: rgba(255, 255, 255, 0.115);
  background:
    linear-gradient(145deg, rgba(186, 222, 27, 0.04), transparent 56%),
    rgba(4, 4, 4, 0.92);
}

.metric strong {
  letter-spacing: 0;
}

.metric-icon {
  width: 46px;
  height: 46px;
  border-radius: 7px;
  transition:
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1),
    background 220ms ease;
}

.btn {
  position: relative;
  min-height: 40px;
  gap: 7px;
  border-radius: 7px;
  overflow: hidden;
  padding-inline: 15px;
  isolation: isolate;
}

.btn::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.12), transparent 80%);
  opacity: 0;
  transform: translateX(-100%);
}

.btn:hover:not(:disabled)::after {
  opacity: 1;
  animation: button-sheen 640ms ease-out both;
}

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

.btn.primary {
  box-shadow: 0 8px 24px rgba(186, 222, 27, 0.11);
}

.btn.primary:hover:not(:disabled) {
  box-shadow: 0 12px 32px rgba(186, 222, 27, 0.18);
}

input,
select,
textarea {
  min-height: 48px;
  border-color: rgba(255, 255, 255, 0.14);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.62);
}

input:hover,
select:hover,
textarea:hover {
  border-color: rgba(255, 255, 255, 0.28);
}

input:focus,
select:focus,
textarea:focus {
  box-shadow:
    0 0 0 3px rgba(186, 222, 27, 0.1),
    0 12px 28px rgba(0, 0, 0, 0.2);
}

.field label,
.access-control > span,
.vote-observation > span {
  font-size: 0.63rem;
}

.audit-row,
.report-row,
.productivity-row,
.ranking-row,
.log-row {
  border-color: rgba(255, 255, 255, 0.09);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.014);
}

.audit-row:hover,
.report-row:hover,
.productivity-row:hover,
.ranking-row:hover {
  border-color: rgba(186, 222, 27, 0.36);
  background: rgba(186, 222, 27, 0.026);
}

.search-mode-tabs {
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.52);
}

.search-mode-pill {
  border-radius: 5px;
}

.filter-pill,
.voting-tabs button,
.chip,
.count-badge,
.priority,
.status-pill {
  transition:
    color 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.filter-pill:hover,
.voting-tabs button:hover {
  transform: translateY(-1px);
}

.empty-state {
  border-color: rgba(255, 255, 255, 0.13);
  background:
    repeating-linear-gradient(-45deg, transparent, transparent 9px, rgba(255, 255, 255, 0.012) 9px, rgba(255, 255, 255, 0.012) 18px),
    rgba(255, 255, 255, 0.012);
}

.workspace-loading {
  top: 104px;
  background: rgba(255, 255, 255, 0.05);
}

.workspace-loading > span {
  box-shadow: 0 0 20px rgba(186, 222, 27, 0.4);
}

.toast {
  right: 24px;
  bottom: 24px;
  border-radius: 8px;
  padding: 16px 18px;
  background:
    linear-gradient(110deg, rgba(186, 222, 27, 0.06), transparent 50%),
    rgba(0, 0, 0, 0.96);
  transform: translateY(16px) scale(0.98);
}

.toast.show {
  transform: translateY(0) scale(1);
}

.drawer.open,
.staff-manager.open {
  animation: overlay-fade 200ms ease both;
  backdrop-filter: blur(10px);
}

.drawer-content,
.staff-manager-panel {
  border-color: rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.025), transparent 28%),
    #050505;
  box-shadow: -28px 0 90px rgba(0, 0, 0, 0.62);
}

/* Pointer motion */
@media (hover: hover) and (pointer: fine) {
  .panel,
  .section-card,
  .vote-card,
  .training-card,
  .accused-editor,
  .accused-detail-card {
    transition:
      border-color 220ms ease,
      box-shadow 220ms ease,
      transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  .panel:hover,
  .section-card:hover,
  .vote-card:hover,
  .training-card:hover,
  .accused-editor:hover,
  .accused-detail-card:hover {
    border-color: rgba(255, 255, 255, 0.19);
    box-shadow:
      0 24px 64px rgba(0, 0, 0, 0.34),
      inset 0 1px 0 rgba(255, 255, 255, 0.045);
    transform: translateY(-2px);
  }

  .metric:hover .metric-icon {
    background: rgba(186, 222, 27, 0.12);
    transform: translateY(-3px) rotate(-2deg);
  }
}

/* Motion system */
@keyframes login-card-enter {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes login-rail {
  0%,
  100% {
    opacity: 0.42;
    transform: scaleY(0.34);
  }
  50% {
    opacity: 1;
    transform: scaleY(0.78);
  }
}

@keyframes brand-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

@keyframes active-nav-line {
  from {
    opacity: 0;
    transform: scaleY(0.2);
  }
  to {
    opacity: 1;
    transform: scaleY(1);
  }
}

@keyframes title-line-enter {
  from {
    opacity: 0;
    transform: scaleX(0);
  }
  to {
    opacity: 1;
    transform: scaleX(1);
  }
}

@keyframes title-icon-enter {
  from {
    opacity: 0;
    transform: translateX(-8px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes workspace-item-enter {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes button-sheen {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(100%);
  }
}

@keyframes overlay-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Compact desktop */
@media (max-width: 1280px) and (min-width: 901px) {
  :root {
    --sidebar-width: 224px;
  }

  .brand-copy span {
    display: none;
  }

  .topbar {
    display: grid;
    gap: 6px;
    padding-block: 14px;
  }

  .view-title {
    min-height: 70px;
  }

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

  .toolbar .analyst-pill {
    display: none;
  }

  .content-grid {
    width: calc(100% - 40px);
  }
}

/* Mobile and tablet */
@media (max-width: 900px) {
  body {
    background-size: 42px 42px;
  }

  .app-shell {
    display: block;
  }

  .workspace::before {
    inset: 0;
    height: 180px;
  }

  .mobile-top {
    position: sticky;
    top: 0;
    z-index: 62;
    display: grid;
    min-height: 64px;
    grid-template-columns: 38px minmax(0, 1fr) minmax(108px, 145px);
    gap: 10px;
    border-bottom-color: rgba(255, 255, 255, 0.1);
    padding: 8px 14px;
    background: rgba(0, 0, 0, 0.9);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.26);
    backdrop-filter: blur(22px);
  }

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

  .mobile-brand-copy {
    display: grid;
  }

  .mobile-top .user-mini {
    width: 100%;
    max-width: 145px;
    grid-template-columns: 32px minmax(0, 1fr);
    border-radius: 7px;
    padding: 4px;
    overflow: hidden;
  }

  .sidebar {
    inset: auto 8px max(8px, env(safe-area-inset-bottom));
    z-index: 80;
    display: block;
    width: auto;
    height: 72px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 6px;
    background: rgba(0, 0, 0, 0.92);
    box-shadow:
      0 22px 70px rgba(0, 0, 0, 0.72),
      inset 0 1px 0 rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(24px) saturate(125%);
  }

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

  .nav {
    display: flex;
    height: 58px;
    gap: 4px;
    padding: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-padding-inline: 8px;
    scroll-snap-type: x proximity;
  }

  .nav-group {
    display: contents;
  }

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

  .nav button {
    min-width: 68px;
    min-height: 58px;
    flex: 0 0 68px;
    align-content: center;
    justify-items: center;
    grid-template-columns: 1fr;
    gap: 2px;
    border-radius: 6px;
    padding: 4px;
    font-size: 0.55rem;
    text-align: center;
    scroll-snap-align: center;
  }

  .nav button:hover {
    transform: none;
  }

  .nav button.active {
    background: rgba(186, 222, 27, 0.11);
    transform: translateY(-1px);
  }

  .nav button.active::before,
  .nav-group > button::after {
    inset: auto 10px 0;
    width: auto;
    height: 2px;
  }

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

  .nav-label {
    max-width: 64px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .workspace {
    padding-bottom: 94px;
  }

  .topbar {
    position: relative;
    display: grid;
    min-height: 0;
    gap: 14px;
    border-bottom: 0;
    padding: 18px 14px 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }

  .view-title {
    width: 100%;
    min-height: 74px;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    padding: 0 0 16px;
  }

  .view-title::after {
    bottom: 0;
    width: 62px;
  }

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

  .view-title h1 {
    font-size: clamp(1.22rem, 5vw, 1.52rem);
  }

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

  .toolbar {
    display: flex;
    width: 100%;
    min-width: 0;
    justify-content: flex-start;
    gap: 7px;
    padding-bottom: 3px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
  }

  .toolbar .analyst-pill {
    display: none;
  }

  .toolbar .btn {
    width: auto;
    min-width: max-content;
    flex: 0 0 auto;
    grid-column: auto;
    scroll-snap-align: start;
  }

  .toolbar .btn.primary,
  .toolbar .btn.warn {
    order: -1;
  }

  .workspace-loading {
    top: 64px;
  }

  .content-grid,
  .view-title {
    width: 100%;
  }

  .content-grid {
    width: calc(100% - 28px);
    margin-top: 18px;
    gap: 14px;
  }

  .panel,
  .section-card,
  .vote-card {
    padding: 18px;
  }

  .content-grid > * {
    animation-duration: 360ms;
  }

  .report-row,
  .productivity-row {
    border-left: 2px solid rgba(186, 222, 27, 0.42);
    padding: 15px;
  }

  .drawer.open {
    align-items: end;
  }

  .drawer-content,
  .staff-manager-panel {
    max-height: 94dvh;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 -28px 90px rgba(0, 0, 0, 0.7);
    animation: mobile-sheet-enter 300ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .toast {
    right: 14px;
    bottom: 94px;
    width: calc(100% - 28px);
  }
}

@media (max-width: 560px) {
  .login-screen {
    min-height: 100dvh;
    padding: 14px;
    background-attachment: scroll;
  }

  .login-panel {
    width: 100%;
  }

  .login-card {
    padding: 28px 22px;
  }

  .login-brand {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 14px;
  }

  .login-logo {
    width: 58px;
    height: 78px;
  }

  .login-title {
    font-size: 1.62rem;
  }

  .login-head p {
    font-size: 0.69rem;
  }

  .secure-badge {
    min-height: 22px;
    padding-inline: 9px;
    font-size: 0.58rem;
  }

  .mobile-top .user-mini {
    max-width: 145px;
  }

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

  .mobile-brand-copy span {
    display: none;
  }

  .content-grid {
    width: calc(100% - 20px);
  }

  .panel,
  .section-card,
  .vote-card,
  .accused-editor,
  .accused-detail-card {
    padding: 15px;
  }

  .panel-header {
    gap: 10px;
    margin-bottom: 16px;
  }

  .btn {
    min-height: 42px;
  }

  input,
  select,
  textarea {
    min-height: 50px;
    font-size: 16px;
  }

  .view-eyebrow {
    font-size: 0.54rem;
  }

  .user-role-option-grid {
    grid-template-columns: 1fr;
  }
}

@keyframes mobile-sheet-enter {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-screen::after,
  .login-logo,
  .content-grid > *,
  .view-title::after,
  .view-title-icon,
  .drawer.open,
  .staff-manager.open,
  .drawer-content,
  .staff-manager-panel,
  .btn:hover::after {
    animation: none !important;
  }

  .panel,
  .section-card,
  .vote-card,
  .training-card,
  .accused-editor,
  .accused-detail-card,
  .nav button,
  .nav-icon,
  .btn {
    transition: none !important;
  }
}

/* Final cascade: desktop navigation stays horizontal */
@media (min-width: 901px) {
  .app-shell {
    display: block;
    min-height: 100vh;
  }

  .sidebar {
    position: sticky;
    inset: 0 0 auto;
    z-index: 70;
    display: flex;
    width: 100%;
    height: 78px;
    min-height: 78px;
    align-items: center;
    flex-direction: row;
    gap: 0;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding: 9px 18px;
    overflow: hidden;
    background:
      linear-gradient(90deg, rgba(186, 222, 27, 0.035), transparent 22%),
      rgba(0, 0, 0, 0.95);
    box-shadow: 0 18px 54px rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(24px) saturate(125%);
    animation: command-nav-enter 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .brand-box {
    width: 214px;
    min-width: 214px;
    min-height: 58px;
    justify-content: flex-start;
    border-right: 1px solid rgba(255, 255, 255, 0.11);
    border-bottom: 0;
    padding: 0 18px 0 0;
  }

  .brand-logo {
    width: 38px;
    height: 50px;
    flex-basis: 38px;
  }

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

  .brand-copy span {
    font-size: 0.54rem;
  }

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

  .nav {
    display: flex;
    height: 58px;
    min-width: 0;
    flex: 1 1 auto;
    align-items: center;
    align-content: center;
    gap: 4px;
    padding: 0 12px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scroll-padding-inline: 12px;
    scrollbar-color: rgba(186, 222, 27, 0.34) transparent;
    scrollbar-width: thin;
  }

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

  .nav::-webkit-scrollbar-track {
    background: transparent;
  }

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

  .nav-group {
    display: contents;
  }

  .nav button {
    min-width: max-content;
    min-height: 48px;
    flex: 0 0 auto;
    grid-template-columns: 28px minmax(0, auto) auto;
    gap: 8px;
    border-radius: 7px;
    padding: 0 12px;
    font-size: 0.7rem;
    scroll-snap-align: start;
  }

  .nav button:hover {
    transform: translateY(-1px);
  }

  .nav button.active {
    border-color: rgba(186, 222, 27, 0.36);
    background:
      linear-gradient(180deg, rgba(186, 222, 27, 0.12), rgba(186, 222, 27, 0.035)),
      rgba(255, 255, 255, 0.018);
  }

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

  .nav-group > button::after {
    inset: auto 10px 0;
    width: auto;
    height: 2px;
    opacity: 0;
    background: var(--brand);
    box-shadow: 0 0 14px rgba(186, 222, 27, 0.34);
    transform: scaleX(0.3);
    transform-origin: center;
    transition:
      opacity 180ms ease,
      transform 180ms ease;
  }

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

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

  .user-box {
    display: grid;
    width: 220px;
    min-width: 220px;
    min-height: 58px;
    flex: 0 0 220px;
    align-items: center;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    margin-top: 0;
    border: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 0;
    padding: 0 0 0 16px;
    background: transparent;
  }

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

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

  .user-box .btn {
    width: 46px;
    min-width: 46px;
    min-height: 36px;
    padding: 0 8px;
    font-size: 0.64rem;
  }

  .workspace {
    min-height: calc(100vh - 78px);
  }

  .workspace::before {
    inset: 78px 0 auto;
  }

  .topbar {
    top: 78px;
  }

  .workspace-loading,
  .simulation-environment-banner {
    top: 182px;
  }

  .content-grid {
    width: min(1600px, calc(100% - 48px));
  }
}

@media (max-width: 1280px) and (min-width: 901px) {
  .brand-box {
    width: 178px;
    min-width: 178px;
  }

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

  .user-box {
    width: 108px;
    min-width: 108px;
    flex-basis: 108px;
  }

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

  .nav {
    gap: 2px;
    padding-inline: 8px;
  }

  .nav button {
    width: 46px;
    min-width: 46px;
    grid-template-columns: 28px 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),
      border-color 180ms ease,
      background-color 180ms ease,
      transform 180ms ease;
  }

  .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 160ms ease;
  }

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

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

  .workspace-loading,
  .simulation-environment-banner {
    top: 238px;
  }
}

@media (max-width: 1500px) and (min-width: 1281px) {
  .workspace-loading,
  .simulation-environment-banner {
    top: 182px;
  }
}

@media (max-width: 1050px) and (min-width: 901px) {
  .brand-box {
    width: 150px;
    min-width: 150px;
  }

  .brand-copy {
    display: none;
  }

  .user-box {
    width: 108px;
    min-width: 108px;
    flex-basis: 108px;
  }

  .user-box .user-mini strong {
    display: none;
  }
}

@media (max-width: 900px) {
  .mobile-top {
    animation: command-nav-enter 360ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .sidebar {
    animation: mobile-nav-enter 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar,
  .mobile-top {
    animation: none !important;
  }
}
