/*
 * wtzLogs — Humanistic operational interface
 * A cor de marca sempre nasce de --brand. Não existem acentos decorativos fixos.
 */

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

:root {
  --brand: #2563eb;
  --brand-2: #7c3aed;
  --brand-strong: color-mix(in srgb, var(--brand) 82%, #000);
  --brand-soft: color-mix(in srgb, var(--brand) 12%, transparent);
  --brand-softer: color-mix(in srgb, var(--brand) 6%, transparent);
  --brand-border: color-mix(in srgb, var(--brand) 26%, transparent);
  --brand-contrast: #fff;
  --brand-gradient: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 55%, var(--brand-2)));
  --success: #16a36a;
  --success-soft: color-mix(in srgb, var(--success) 12%, transparent);
  --warning: #d48a10;
  --warning-soft: color-mix(in srgb, var(--warning) 13%, transparent);
  --danger: #dc4a4a;
  --danger-soft: color-mix(in srgb, var(--danger) 12%, transparent);
  --info: #0d8bd7;
  --radius-xs: 7px;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --sidebar-width: 264px;
  --header-height: 68px;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --font-body: "Segoe UI Variable", "Segoe UI", Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", Inter, system-ui, sans-serif;
}

:root,
html[data-theme="light"] {
  --bg: #f4f5f7;
  --bg-raised: #f8f8fa;
  --surface: #fff;
  --surface-subtle: #f7f8fa;
  --surface-muted: #f0f2f5;
  --surface-hover: #eceff3;
  --text: #17191d;
  --text-soft: #565c67;
  --text-muted: #818895;
  --border: #e2e5e9;
  --border-strong: #d5d9df;
  --input: #d9dde3;
  --shadow-xs: 0 1px 2px rgba(18, 24, 40, .04);
  --shadow-sm: 0 4px 14px rgba(18, 24, 40, .055);
  --shadow: 0 14px 40px rgba(18, 24, 40, .09);
  --shadow-lg: 0 24px 70px rgba(18, 24, 40, .16);
  --shadow-brand: 0 10px 26px color-mix(in srgb, var(--brand) 18%, transparent);
  --highlight-line: rgba(255, 255, 255, .6);
  --overlay: rgba(14, 17, 22, .56);
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #0d0e10;
  --bg-raised: #111214;
  --surface: #151619;
  --surface-subtle: #191b1f;
  --surface-muted: #202227;
  --surface-hover: #262930;
  --text: #f1f2f4;
  --text-soft: #b3b7c0;
  --text-muted: #777d89;
  --border: #272a30;
  --border-strong: #33363e;
  --input: #373b44;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .16);
  --shadow-sm: 0 7px 20px rgba(0, 0, 0, .18);
  --shadow: 0 18px 44px rgba(0, 0, 0, .28);
  --shadow-lg: 0 28px 80px rgba(0, 0, 0, .5);
  --shadow-brand: 0 10px 30px color-mix(in srgb, var(--brand) 30%, transparent);
  --highlight-line: rgba(255, 255, 255, .07);
  --overlay: rgba(0, 0, 0, .7);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  html[data-theme="system"] {
    --bg: #0d0e10;
    --bg-raised: #111214;
    --surface: #151619;
    --surface-subtle: #191b1f;
    --surface-muted: #202227;
    --surface-hover: #262930;
    --text: #f1f2f4;
    --text-soft: #b3b7c0;
    --text-muted: #777d89;
    --border: #272a30;
    --border-strong: #33363e;
    --input: #373b44;
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, .16);
    --shadow-sm: 0 7px 20px rgba(0, 0, 0, .18);
    --shadow: 0 18px 44px rgba(0, 0, 0, .28);
    --shadow-lg: 0 28px 80px rgba(0, 0, 0, .5);
    --shadow-brand: 0 10px 30px color-mix(in srgb, var(--brand) 30%, transparent);
    --highlight-line: rgba(255, 255, 255, .07);
    --overlay: rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}

html {
  min-height: 100%;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  scrollbar-color: var(--border-strong) transparent;
  scrollbar-width: thin;
}

::selection {
  background: color-mix(in srgb, var(--brand) 30%, transparent);
  color: var(--text);
}

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

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background-clip: padding-box;
  background-color: var(--border-strong);
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--text-muted);
}

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

body {
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

button,
a,
input,
textarea,
select,
summary {
  -webkit-tap-highlight-color: transparent;
}

button:not(:disabled),
select:not(:disabled),
summary,
a[href],
label[for],
input[type="checkbox"] {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
}

img {
  max-width: 100%;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
}

::selection {
  background: color-mix(in srgb, var(--brand) 28%, transparent);
}

*:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand) 32%, transparent);
  outline-offset: 2px;
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

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

*::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: var(--border-strong);
  background-clip: padding-box;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 9999;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--brand);
  color: var(--brand-contrast);
  transform: translateY(-150%);
  transition: transform .2s var(--ease-out);
}

.skip-link:focus {
  transform: translateY(0);
}

.icon-button {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
  color: var(--text-soft);
  box-shadow: var(--shadow-xs);
  transition: border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease;
}

.icon-button:hover {
  border-color: var(--border-strong);
  background: var(--surface-hover);
  color: var(--text);
}

.icon-button:active {
  transform: scale(.96);
}

[data-theme="dark"] .icon--moon,
[data-theme="light"] .icon--sun {
  display: none;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--brand-border);
  border-radius: 14px;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, .26), transparent 42%),
    linear-gradient(145deg, color-mix(in srgb, var(--brand) 88%, white), var(--brand-strong));
  color: #fff;
  box-shadow: 0 8px 24px color-mix(in srgb, var(--brand) 20%, transparent);
  font-size: 18px;
  font-weight: 800;
}

.brand-mark--small {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  font-size: 15px;
}

.brand-mark--image {
  padding: 2px;
  background: var(--surface);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  border-radius: 11px;
  object-fit: cover;
}

.brand-mark--small img {
  border-radius: 9px;
}

/* Login */
.login-body {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  background: var(--bg);
}

.login-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.login-backdrop__image {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  filter: saturate(.8) contrast(1.04);
  opacity: .075;
}

[data-theme="dark"] .login-backdrop__image {
  opacity: .12;
}

.login-backdrop__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(color-mix(in srgb, var(--border) 42%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--border) 42%, transparent) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 35% 45%, black, transparent 72%);
  opacity: .35;
}

.login-backdrop__glow {
  position: absolute;
  border-radius: 50%;
  background: var(--brand);
  filter: blur(110px);
  opacity: .1;
}

.login-backdrop__glow--one {
  top: -18vw;
  right: -9vw;
  width: 48vw;
  height: 48vw;
}

.login-backdrop__glow--two {
  bottom: -22vw;
  left: -12vw;
  width: 42vw;
  height: 42vw;
  opacity: .06;
}

.login-topbar,
.login-main,
.login-footer {
  position: relative;
  z-index: 1;
  width: min(1320px, calc(100% - 64px));
  margin-inline: auto;
}

.login-topbar {
  display: flex;
  min-height: 84px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.login-topbar__brand,
.login-topbar__actions {
  display: flex;
  min-width: 0;
  align-items: center;
}

.login-topbar__brand {
  gap: 12px;
}

.login-topbar__identity {
  display: grid;
  min-width: 0;
  gap: 1px;
}

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

.login-topbar__identity strong {
  font-size: 14px;
  font-weight: 700;
}

.login-topbar__identity span {
  color: var(--text-muted);
  font-size: 11px;
}

.login-topbar__actions {
  gap: 12px;
}

.system-availability {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .04em;
}

.system-availability i,
.live-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px var(--success-soft);
}

.login-main {
  display: grid;
  min-height: calc(100dvh - 148px);
  grid-template-columns: minmax(0, 1.3fr) minmax(370px, .7fr);
  align-items: center;
  gap: clamp(64px, 9vw, 150px);
  padding: 48px 0 70px;
}

.login-main > *,
.login-hero,
.login-access-card,
.login-access-card__content {
  min-width: 0;
  max-width: 100%;
}

.login-hero h1,
.login-hero__lead,
.login-access-card__copy {
  overflow-wrap: anywhere;
}

.login-hero {
  max-width: 760px;
  animation: login-content-enter .75s var(--ease-out) both;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 22px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.eyebrow span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--brand);
}

.login-hero h1 {
  max-width: 700px;
  font-size: clamp(46px, 5.2vw, 78px);
  font-weight: 760;
  letter-spacing: -.055em;
  line-height: .99;
}

.login-hero h1 em {
  color: var(--brand);
  font-style: normal;
}

.login-hero__lead {
  max-width: 650px;
  margin-top: 26px;
  color: var(--text-soft);
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.72;
}

.login-capabilities {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 34px;
}

.login-capabilities article {
  display: flex;
  min-width: 0;
  gap: 11px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  box-shadow: var(--shadow-xs);
}

.login-capabilities article > .icon {
  margin-top: 2px;
  color: var(--brand);
}

.login-capabilities article div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.login-capabilities strong {
  font-size: 12px;
  font-weight: 700;
}

.login-capabilities span {
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.4;
}

.login-stream {
  max-width: 620px;
  margin-top: 28px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: var(--shadow-sm);
}

.login-stream__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 15px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .12em;
}

.login-stream__head span:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
}

.login-stream__head i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse-live 2s infinite;
}

.login-stream__row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  border-bottom: 1px solid var(--border);
}

.login-stream__row:last-child {
  border-bottom: 0;
}

.event-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-soft);
}

.event-dot--green {
  background: var(--success);
  box-shadow: 0 0 0 4px var(--success-soft);
}

.event-dot--amber {
  background: var(--warning);
  box-shadow: 0 0 0 4px var(--warning-soft);
}

.login-stream__row div {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 8px;
}

.login-stream__row strong {
  flex: 0 0 auto;
  font-size: 11px;
}

.login-stream__row span,
.login-stream__row time {
  color: var(--text-muted);
  font-size: 10px;
}

.login-credit {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  letter-spacing: .02em;
}

.login-credit strong {
  color: var(--text-soft);
  font-weight: 700;
}

.login-credit i {
  width: 3px;
  height: 3px;
  margin-inline: 4px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 8px var(--brand);
}

.login-stream__row div span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.login-access-card {
  position: relative;
  width: 100%;
  max-width: 430px;
  justify-self: end;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 26px;
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  box-shadow: var(--shadow-lg);
  animation: login-card-enter .8s .08s var(--ease-out) both;
}

.login-access-card::before {
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--brand), transparent);
  content: "";
}

.login-access-card__shine {
  position: absolute;
  top: -180px;
  right: -120px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: var(--brand);
  filter: blur(100px);
  opacity: .09;
}

.login-access-card__content {
  position: relative;
  z-index: 1;
  min-width: 0;
  padding: 38px;
}

.login-city-mark {
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--brand-border);
  border-radius: 21px;
  background: var(--brand-gradient);
  color: #fff;
  box-shadow: 0 16px 34px color-mix(in srgb, var(--brand) 26%, transparent), inset 0 1px 0 rgba(255, 255, 255, .35);
  font-size: 26px;
  font-weight: 800;
}

.login-city-mark--image {
  padding: 3px;
  background: var(--surface);
}

.login-city-mark img {
  width: 100%;
  height: 100%;
  border-radius: 17px;
  object-fit: cover;
}

.login-access-card__copy {
  margin-top: 28px;
}

.access-label {
  color: var(--brand);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .19em;
}

.login-access-card h2 {
  margin-top: 8px;
  font-size: 28px;
  font-weight: 730;
  letter-spacing: -.035em;
}

.login-access-card__copy p {
  margin-top: 9px;
  color: var(--text-soft);
  line-height: 1.65;
}

.inline-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 20px;
  padding: 12px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
}

.inline-alert--danger {
  border-color: color-mix(in srgb, var(--danger) 30%, transparent);
  background: var(--danger-soft);
  color: color-mix(in srgb, var(--danger) 82%, var(--text));
}

.bootstrap-login-form {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.bootstrap-login-form .button {
  width: 100%;
  min-height: 48px;
}

.bootstrap-login-form > small {
  color: var(--text-muted);
  font-size: 10px;
  line-height: 1.5;
  text-align: center;
}

.login-method-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  color: var(--text-muted);
  font-size: 10px;
  text-transform: uppercase;
}

.login-method-divider::before,
.login-method-divider::after {
  height: 1px;
  flex: 1;
  background: var(--border);
  content: "";
}

.login-method-divider + .discord-button {
  margin-top: 20px;
}

.discord-button {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 11px;
  margin-top: 28px;
  padding: 0 17px;
  border-radius: 13px;
  background: linear-gradient(135deg, #5865f2, #4752c4);
  color: #fff;
  box-shadow: 0 13px 32px rgba(88, 101, 242, .28), inset 0 1px 0 rgba(255, 255, 255, .22);
  font-size: 13px;
  font-weight: 720;
  transition: filter .2s ease, box-shadow .2s ease, transform .2s var(--ease-out);
}

.discord-button:hover {
  box-shadow: 0 17px 40px rgba(88, 101, 242, .4), inset 0 1px 0 rgba(255, 255, 255, .28);
  transform: translateY(-2px);
  filter: brightness(1.06);
}

.discord-button:active {
  transform: translateY(0) scale(.99);
}

.discord-button > svg:first-child {
  width: 21px;
  height: 21px;
}

.discord-button__arrow {
  margin-left: auto;
}

.access-checks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 24px;
}

.access-checks div {
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 10px 5px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-subtle);
  color: var(--text-muted);
  text-align: center;
  font-size: 9px;
  line-height: 1.25;
}

.access-checks .icon {
  width: 14px;
  height: 14px;
  color: var(--success);
}

.login-security-note {
  margin-top: 19px;
  color: var(--text-muted);
  text-align: center;
  font-size: 10px;
  line-height: 1.55;
}

.login-footer {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 10px;
}

/* Application shell */
.app-body {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.app-shell {
  display: flex;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
}

.route-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 200;
  width: 0;
  height: 2px;
  background: var(--brand);
  box-shadow: 0 0 16px var(--brand);
  opacity: 0;
  transition: width .35s ease, opacity .25s ease;
}

.route-progress.is-loading {
  width: 72%;
  opacity: 1;
}

.route-progress.is-done {
  width: 100%;
  opacity: 0;
}

.app-sidebar {
  position: relative;
  z-index: 50;
  width: var(--sidebar-width);
  height: 100%;
  flex: 0 0 var(--sidebar-width);
  overflow: hidden;
  border-right: 1px solid var(--border);
  background: var(--surface);
  transition: transform .3s var(--ease-out);
}

.sidebar-banner {
  position: absolute;
  inset: 0 0 auto;
  height: 154px;
  background-position: center;
  background-size: cover;
  opacity: .35;
}

.sidebar-banner::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 15%, transparent), var(--surface) 96%);
  content: "";
}

.sidebar-inner {
  position: relative;
  z-index: 1;
  display: flex;
  height: 100%;
  min-height: 0;
  flex-direction: column;
}

.sidebar-brand-wrap {
  display: flex;
  min-height: 82px;
  align-items: center;
  padding: 16px 17px;
  border-bottom: 1px solid var(--border);
}

.sidebar-brand-wrap--banner {
  min-height: 110px;
  align-items: flex-end;
  border-bottom-color: transparent;
}

.sidebar-brand {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  gap: 12px;
}

.sidebar-brand__copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

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

.sidebar-brand__copy strong {
  font-size: 13px;
  font-weight: 740;
  letter-spacing: -.01em;
}

.sidebar-brand__copy span {
  color: var(--text-muted);
  font-size: 10px;
  letter-spacing: .03em;
}

.sidebar-close {
  display: none;
}

.sidebar-nav {
  min-height: 0;
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 14px 12px 18px;
}

.nav-section + .nav-section {
  margin-top: 20px;
}

.nav-section h2 {
  margin: 0 9px 7px;
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.nav-item {
  position: relative;
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 11px;
  margin: 2px 0;
  padding: 8px 11px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 560;
  transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease;
}

.nav-item::before {
  position: absolute;
  top: 9px;
  bottom: 9px;
  left: -12px;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: var(--brand-gradient);
  content: "";
  opacity: 0;
  transform: scaleY(.45);
  transition: opacity .18s ease, transform .18s var(--ease-spring);
}

.nav-item:hover {
  border-color: var(--border);
  background: var(--surface-subtle);
  color: var(--text);
  transform: translateX(1px);
}

.nav-item.is-active {
  border-color: var(--brand-border);
  background: linear-gradient(90deg, var(--brand-soft), var(--brand-softer) 80%);
  color: var(--brand);
  font-weight: 680;
  box-shadow: inset 0 1px 0 var(--highlight-line);
}

.nav-item.is-active::before {
  opacity: 1;
  transform: scaleY(1);
}

.nav-item .icon {
  width: 17px;
  height: 17px;
  opacity: .86;
}

.nav-live-dot {
  width: 6px;
  height: 6px;
  margin-left: auto;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px var(--success-soft);
}

.sidebar-account {
  flex: 0 0 auto;
  padding: 12px;
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
}

.sidebar-account__identity {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-subtle);
}

.avatar {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--brand-border);
  border-radius: 50%;
  background: linear-gradient(145deg, var(--brand-soft), var(--brand-softer));
  color: var(--brand);
  font-size: 11px;
  font-weight: 750;
  box-shadow: inset 0 1px 0 var(--highlight-line);
}

.avatar--medium {
  width: 38px;
  height: 38px;
}

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

.sidebar-account__identity > div:nth-child(2) {
  display: grid;
  min-width: 0;
  gap: 2px;
}

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

.sidebar-account__identity strong {
  font-size: 11px;
  font-weight: 680;
}

.sidebar-account__identity span {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text-muted);
  font-size: 9px;
}

.sidebar-account__identity span i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.master-chip {
  padding: 3px 5px;
  border: 1px solid var(--brand-border);
  border-radius: 6px;
  background: var(--brand-soft);
  color: var(--brand) !important;
  font-size: 7px !important;
  font-weight: 800;
  letter-spacing: .08em;
}

.sidebar-logout {
  display: flex;
  width: 100%;
  min-height: 36px;
  align-items: center;
  gap: 9px;
  margin-top: 6px;
  padding: 6px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text-muted);
  font-size: 11px;
  transition: color .18s ease, background .18s ease;
}

.sidebar-logout:hover {
  background: var(--danger-soft);
  color: var(--danger);
}

.sidebar-overlay {
  display: none;
}

.app-column {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex: 1;
  flex-direction: column;
}

.app-header {
  position: relative;
  z-index: 30;
  display: flex;
  min-height: var(--header-height);
  flex: 0 0 var(--header-height);
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 9px 22px;
  padding-top: max(9px, env(safe-area-inset-top));
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(16px);
}

.app-header__left,
.app-header__right {
  display: flex;
  min-width: 0;
  align-items: center;
}

.app-header__left {
  gap: 12px;
}

.app-header__right {
  justify-content: flex-end;
  gap: 9px;
}

.mobile-menu-button {
  display: none;
}

.page-heading {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.page-heading span {
  color: var(--text-muted);
  font-size: 8px;
  font-weight: 740;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.page-heading h1 {
  overflow: hidden;
  font-size: 17px;
  font-weight: 690;
  letter-spacing: -.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-search {
  position: relative;
  display: flex;
  width: min(320px, 30vw);
  height: 38px;
  align-items: center;
}

.global-search > .icon {
  position: absolute;
  left: 12px;
  width: 15px;
  height: 15px;
  color: var(--text-muted);
  pointer-events: none;
}

.global-search input {
  width: 100%;
  height: 100%;
  padding: 0 38px 0 36px;
  border: 1px solid var(--border);
  border-radius: 11px;
  outline: 0;
  background: var(--surface-subtle);
  color: var(--text);
  font-size: 11px;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.global-search input:focus {
  border-color: var(--brand);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.global-search kbd {
  position: absolute;
  right: 9px;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface);
  color: var(--text-muted);
  font: 9px var(--font-body);
  box-shadow: var(--shadow-xs);
  pointer-events: none;
}

.live-status {
  display: flex;
  height: 34px;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-subtle);
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 650;
  white-space: nowrap;
}

.live-status.is-offline i {
  background: var(--danger);
  box-shadow: 0 0 0 4px var(--danger-soft);
}

.live-status.is-waiting i {
  background: var(--warning);
  box-shadow: 0 0 0 4px var(--warning-soft);
}

.header-avatar {
  margin-left: 1px;
}

.app-view {
  min-width: 0;
  min-height: 0;
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 24px;
  padding-bottom: max(32px, env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 100% 0, var(--brand-softer), transparent 30%),
    var(--bg);
}

.developer-credit {
  position: relative;
  display: flex;
  min-height: 30px;
  flex: 0 0 30px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  overflow: hidden;
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 95%, var(--brand) 5%);
  color: var(--text-muted);
  font-size: 8px;
  font-weight: 570;
  letter-spacing: .045em;
  text-transform: uppercase;
}

.developer-credit::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 80px;
  background: linear-gradient(90deg, var(--brand-soft), transparent);
  content: "";
}

.developer-credit strong {
  color: var(--text-soft);
  font-weight: 760;
}

.developer-credit__signal {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 10px;
}

.developer-credit__signal i {
  width: 2px;
  border-radius: 2px;
  background: var(--brand);
  box-shadow: 0 0 6px color-mix(in srgb, var(--brand) 45%, transparent);
}

.developer-credit__signal i:nth-child(1) { height: 5px; }
.developer-credit__signal i:nth-child(2) { height: 10px; }
.developer-credit__signal i:nth-child(3) { height: 7px; }

.developer-credit__divider {
  width: 18px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
}

/* Shared surfaces and controls */
.page-container {
  width: min(1480px, 100%);
  margin-inline: auto;
}

.page-container--wide {
  width: min(1680px, 100%);
}

.page-stack {
  display: grid;
  gap: 20px;
}

.page-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.page-intro__copy {
  min-width: 0;
}

.page-intro__copy .eyebrow {
  margin-bottom: 8px;
}

.page-intro h2 {
  font-size: clamp(24px, 2.6vw, 36px);
  font-weight: 720;
  letter-spacing: -.045em;
  line-height: 1.1;
}

.page-intro p {
  max-width: 710px;
  margin-top: 8px;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.65;
}

.page-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.button {
  position: relative;
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--brand-gradient);
  color: var(--brand-contrast);
  box-shadow: 0 5px 14px color-mix(in srgb, var(--brand) 22%, transparent), inset 0 1px 0 var(--highlight-line);
  font-size: 11px;
  font-weight: 680;
  line-height: 1.2;
  transition: border-color .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease, transform .18s var(--ease-out);
}

.button:hover {
  box-shadow: 0 10px 24px color-mix(in srgb, var(--brand) 30%, transparent), inset 0 1px 0 var(--highlight-line);
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.button:active {
  transform: translateY(0) scale(.985);
  filter: brightness(.98);
}

.button:disabled {
  cursor: not-allowed;
  opacity: .48;
  transform: none;
}

.button--secondary {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text-soft);
  box-shadow: var(--shadow-xs);
}

.button--secondary:hover {
  border-color: var(--border-strong);
  background: var(--surface-hover);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.button--ghost {
  border-color: transparent;
  background: transparent;
  color: var(--text-soft);
  box-shadow: none;
}

.button--ghost:hover {
  background: var(--surface-hover);
  color: var(--text);
  box-shadow: none;
}

.button--danger {
  border-color: color-mix(in srgb, var(--danger) 28%, transparent);
  background: var(--danger-soft);
  color: var(--danger);
  box-shadow: none;
}

.button--danger:hover {
  background: var(--danger);
  color: #fff;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--danger) 20%, transparent);
}

.button--small {
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 10px;
}

.button--icon {
  width: 36px;
  min-height: 36px;
  padding: 0;
}

.button .icon {
  width: 15px;
  height: 15px;
}

.card,
.panel {
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-xs), inset 0 1px 0 var(--highlight-line);
}

.card {
  border-radius: var(--radius);
}

.panel {
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.card--interactive {
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s var(--ease-out);
}

.card--interactive:hover {
  border-color: var(--brand-border);
  box-shadow: var(--shadow-brand), inset 0 1px 0 var(--highlight-line);
  transform: translateY(-3px);
}

.panel-header {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 17px 19px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(90deg, var(--surface-subtle), var(--surface));
}

.panel-header::after {
  position: absolute;
  inset: auto 0 -1px;
  height: 1px;
  background: linear-gradient(90deg, var(--brand), transparent 55%);
  opacity: .5;
  content: "";
}

.panel-header__title {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 11px;
}

.section-icon {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--brand-border);
  border-radius: 11px;
  background: linear-gradient(145deg, var(--brand-soft), var(--brand-softer));
  color: var(--brand);
  box-shadow: inset 0 1px 0 var(--highlight-line);
}

.section-icon .icon {
  width: 17px;
  height: 17px;
}

.panel-header h3 {
  font-size: 14px;
  font-weight: 680;
  letter-spacing: -.015em;
}

.panel-header p {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.5;
}

.panel-body {
  padding: 19px;
}

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

.text-soft {
  color: var(--text-soft);
}

.text-danger {
  color: var(--danger);
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

.tabular {
  font-variant-numeric: tabular-nums;
}

.divider {
  height: 1px;
  margin: 17px 0;
  background: var(--border);
}

.badge,
.status-badge,
.category-pill {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  white-space: nowrap;
}

.badge {
  min-height: 28px;
  flex: 0 0 auto;
  padding: 4px 10px;
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 680;
}

.badge--brand {
  border-color: var(--brand-border);
  background: var(--brand-soft);
  color: var(--brand);
}

.badge--success {
  border-color: color-mix(in srgb, var(--success) 26%, transparent);
  background: var(--success-soft);
  color: var(--success);
}

.badge--warning {
  border-color: color-mix(in srgb, var(--warning) 28%, transparent);
  background: var(--warning-soft);
  color: var(--warning);
}

.badge--danger {
  border-color: color-mix(in srgb, var(--danger) 28%, transparent);
  background: var(--danger-soft);
  color: var(--danger);
}

.status-badge {
  min-height: 26px;
  flex: 0 0 auto;
  padding: 4px 9px;
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 680;
}

.status-badge::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.status-badge--online {
  background: var(--success-soft);
  color: var(--success);
}

.status-badge--online::before {
  animation: pulse-live 2s infinite;
}

.status-badge--offline {
  background: var(--danger-soft);
  color: var(--danger);
}

.status-badge--waiting {
  background: var(--warning-soft);
  color: var(--warning);
}

.status-badge--stale {
  background: var(--warning-soft);
  color: var(--warning);
}

.status-badge--idle {
  background: var(--surface-muted);
  color: var(--text-muted);
}

.category-pill {
  min-height: 23px;
  padding: 3px 8px;
  border: 1px solid color-mix(in srgb, var(--category, var(--brand)) 28%, transparent);
  background: color-mix(in srgb, var(--category, var(--brand)) 11%, transparent);
  color: var(--category, var(--brand));
  font-size: 9px;
  font-weight: 730;
  letter-spacing: .025em;
}

.category-pill::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

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

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

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

.field--full {
  grid-column: 1 / -1;
}

.field > label,
.field-label {
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 680;
}

.field-hint {
  color: var(--text-muted);
  font-size: 9px;
  line-height: 1.45;
}

.input,
.select,
.textarea {
  width: 100%;
  border: 1px solid var(--input);
  border-radius: 9px;
  outline: 0;
  background: var(--surface-subtle);
  color: var(--text);
  box-shadow: var(--shadow-xs);
  font-size: 11px;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.input,
.select {
  height: 38px;
  padding: 0 11px;
}

.textarea {
  min-height: 94px;
  padding: 10px 11px;
  line-height: 1.55;
  resize: vertical;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--brand);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--brand-soft), var(--shadow-xs);
}

.input::placeholder,
.textarea::placeholder {
  color: var(--text-muted);
  opacity: .8;
}

.input:disabled,
.select:disabled,
.textarea:disabled {
  cursor: not-allowed;
  opacity: .6;
}

.input-with-icon {
  position: relative;
}

.input-with-icon > .icon {
  position: absolute;
  top: 50%;
  left: 11px;
  width: 15px;
  height: 15px;
  color: var(--text-muted);
  transform: translateY(-50%);
  pointer-events: none;
}

.input-with-icon .input {
  padding-left: 34px;
}

.checkbox-row,
.switch-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.checkbox-row input {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  margin: 1px 0 0;
  accent-color: var(--brand);
}

.checkbox-row div {
  display: grid;
  gap: 2px;
}

.checkbox-row strong,
.switch-row strong {
  font-size: 13px;
  font-weight: 650;
}

.checkbox-row span,
.switch-row span {
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.45;
}

.switch-row {
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-subtle);
}

.switch-row > div:first-child,
.switch-row > span:first-child {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.switch {
  position: relative;
  width: 46px;
  height: 26px;
  flex: 0 0 auto;
  padding: 0;
  appearance: none;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--input);
  cursor: pointer;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .18);
  transition: background .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.switch::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .22);
  content: "";
  transition: transform .22s var(--ease-out);
}

.switch[aria-checked="true"],
.switch:checked {
  border-color: var(--brand);
  background: var(--brand);
}

.switch[aria-checked="true"]::after,
.switch:checked::after {
  transform: translateX(20px);
}

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

.switch:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.toolbar__search {
  min-width: 180px;
  flex: 1;
}

.toolbar .input,
.toolbar .select {
  background: var(--surface-subtle);
}

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

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.data-table th,
.data-table td {
  padding: 12px 15px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

.data-table th {
  background: var(--surface-subtle);
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 730;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.data-table tbody tr {
  transition: background .16s ease;
}

.data-table tbody tr:hover {
  background: var(--brand-softer);
}

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

.table-primary {
  display: flex;
  min-width: 180px;
  align-items: center;
  gap: 10px;
}

.table-primary__copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.table-primary__copy strong,
.table-primary__copy span {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-primary__copy strong {
  font-weight: 650;
}

.table-primary__copy span {
  color: var(--text-muted);
  font-size: 9px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 15px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 10px;
}

.pagination__actions {
  display: flex;
  gap: 6px;
}

.empty-state,
.error-state {
  display: grid;
  min-height: 260px;
  place-items: center;
  padding: 38px 20px;
  text-align: center;
}

.empty-state__content,
.error-state__content {
  display: grid;
  max-width: 400px;
  justify-items: center;
  gap: 9px;
}

.empty-state__icon,
.error-state__icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  margin-bottom: 4px;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: var(--surface-subtle);
  color: var(--text-muted);
}

.error-state__icon {
  border-color: color-mix(in srgb, var(--danger) 25%, transparent);
  background: var(--danger-soft);
  color: var(--danger);
}

.empty-state h3,
.error-state h3 {
  font-size: 15px;
  font-weight: 680;
}

.empty-state p,
.error-state p {
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.55;
}

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

.metric-card {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 17px;
}

.metric-card__copy {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.metric-card__label {
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 690;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.metric-card__value {
  font-family: var(--font-display);
  font-size: clamp(23px, 2vw, 31px);
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: 1.1;
}

.metric-card__hint {
  overflow: hidden;
  color: var(--text-muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-card__icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--brand-border);
  border-radius: 12px;
  background: linear-gradient(145deg, var(--brand-soft), var(--brand-softer));
  color: var(--brand);
  box-shadow: inset 0 1px 0 var(--highlight-line);
}

.progress-track {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-muted);
}

.progress-track > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--bar-color, var(--brand));
}

details.disclosure {
  border: 1px dashed var(--border-strong);
  border-radius: 10px;
  background: var(--surface-subtle);
}

details.disclosure summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 13px;
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 650;
  list-style: none;
}

details.disclosure summary::-webkit-details-marker {
  display: none;
}

details.disclosure summary::after {
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  content: "";
  transform: rotate(45deg) translateY(-2px);
  transition: transform .2s ease;
}

details.disclosure[open] summary::after {
  transform: rotate(225deg) translate(-1px, -1px);
}

.disclosure__content {
  padding: 0 13px 13px;
}

.code-block {
  max-height: 260px;
  margin: 0;
  overflow: auto;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: color-mix(in srgb, var(--bg) 75%, #000 25%);
  color: color-mix(in srgb, var(--text) 86%, var(--brand));
  font: 10px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Loading, dialogs and toasts */
.page-skeleton {
  display: grid;
  width: min(1480px, 100%);
  margin-inline: auto;
  gap: 20px;
}

.skeleton {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface-muted);
}

.skeleton::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--surface) 75%, transparent), transparent);
  content: "";
  transform: translateX(-100%);
  animation: skeleton-shimmer 1.45s infinite;
}

.skeleton--heading {
  width: min(420px, 70%);
  height: 68px;
}

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

.skeleton--card {
  height: 116px;
}

.skeleton--panel {
  height: 380px;
}

.app-dialog {
  width: min(650px, calc(100% - 28px));
  max-height: min(86dvh, 840px);
  padding: 0;
  overflow: visible;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  outline: 0;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-lg);
}

.app-dialog[open] {
  animation: dialog-enter .22s var(--ease-out) both;
}

.app-dialog::backdrop {
  background: var(--overlay);
  backdrop-filter: blur(4px);
  animation: fade-in .2s ease both;
}

/* Mantém o conteúdo atrás do modal estático e evita recomposição contínua. */
body.dialog-open .app-shell * {
  animation-play-state: paused !important;
}

body.dialog-open .app-header {
  backdrop-filter: none;
}

.dialog-shell {
  display: flex;
  max-height: min(86dvh, 840px);
  flex-direction: column;
  overflow: hidden;
  border-radius: inherit;
}

.dialog-header {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 19px 20px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(90deg, var(--surface-subtle), var(--surface));
}

.dialog-header > div:first-child {
  min-width: 0;
}

.dialog-eyebrow {
  display: block;
  min-height: 12px;
  margin-bottom: 3px;
  color: var(--brand);
  font-size: 8px;
  font-weight: 760;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.dialog-header h2 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.025em;
}

.dialog-header p {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 10px;
  line-height: 1.5;
}

.dialog-content {
  min-height: 0;
  overflow-y: auto;
  padding: 20px;
}

.dialog-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin: 20px -20px -20px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface-subtle);
}

.toast-region {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 300;
  display: grid;
  width: min(380px, calc(100% - 36px));
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 11px;
  padding: 13px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  pointer-events: auto;
  animation: toast-enter .3s var(--ease-out) both;
}

.toast.is-leaving {
  animation: toast-exit .22s ease both;
}

.toast__icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 9px;
  background: var(--brand-soft);
  color: var(--brand);
}

.toast--success .toast__icon {
  background: var(--success-soft);
  color: var(--success);
}

.toast--warning .toast__icon {
  background: var(--warning-soft);
  color: var(--warning);
}

.toast--danger .toast__icon {
  background: var(--danger-soft);
  color: var(--danger);
}

.toast__copy {
  min-width: 0;
}

.toast__copy strong {
  display: block;
  font-size: 11px;
  font-weight: 680;
}

.toast__copy span {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 9px;
  line-height: 1.45;
}

.toast__close {
  padding: 2px;
  border: 0;
  background: transparent;
  color: var(--text-muted);
}

.toast__close .icon {
  width: 14px;
  height: 14px;
}

/* Dashboard */
.dashboard-overview {
  display: grid;
  gap: 12px;
}

.dashboard-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 420px);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 14% 0, var(--brand-soft), transparent 34%),
    linear-gradient(145deg, var(--surface), var(--surface-subtle));
  box-shadow: var(--shadow-sm);
}

.dashboard-hero::before {
  position: absolute;
  z-index: 2;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--brand), color-mix(in srgb, var(--brand) 18%, transparent) 52%, transparent);
  content: "";
  pointer-events: none;
}

.dashboard-hero::after {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(color-mix(in srgb, var(--border) 25%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--border) 25%, transparent) 1px, transparent 1px);
  background-position: right top;
  background-size: 34px 34px;
  mask-image: linear-gradient(90deg, transparent 48%, #000 100%);
  opacity: .22;
  content: "";
  pointer-events: none;
}

.dashboard-hero__main,
.dashboard-pipeline {
  position: relative;
  z-index: 1;
}

.dashboard-hero__main {
  display: grid;
  align-content: center;
  gap: 12px;
  padding: 27px 30px;
}

.dashboard-live {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 8px;
  font-weight: 720;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.dashboard-live i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px var(--success-soft);
}

.dashboard-hero--stale .dashboard-live i {
  background: var(--warning);
  box-shadow: 0 0 0 4px var(--warning-soft);
}

.dashboard-hero--waiting .dashboard-live i {
  background: var(--text-muted);
  box-shadow: 0 0 0 4px var(--surface-muted);
}

.dashboard-hero__headline {
  display: flex;
  align-items: flex-end;
  gap: 13px;
}

.dashboard-hero__headline strong {
  background: var(--brand-gradient);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  font-family: var(--font-display);
  font-size: clamp(42px, 4.2vw, 58px);
  font-weight: 730;
  letter-spacing: -.07em;
  line-height: .88;
}

.dashboard-hero__headline span {
  max-width: 170px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(16px, 1.45vw, 21px);
  font-weight: 680;
  letter-spacing: -.035em;
  line-height: 1.08;
}

.dashboard-hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.dashboard-hero__badges .badge {
  gap: 6px;
  padding: 6px 9px;
  background: color-mix(in srgb, var(--surface-muted) 78%, transparent);
}

.dashboard-hero__badges .icon {
  width: 12px;
  height: 12px;
  color: var(--brand);
}

.dashboard-hero__main > p {
  max-width: 700px;
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.55;
}

.dashboard-pipeline {
  display: grid;
  min-width: 0;
  align-content: center;
  gap: 14px;
  margin: 14px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius-xl) - 5px);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(14px);
}

.dashboard-pipeline__head {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-pipeline__head > div,
.dashboard-pipeline__signal > div,
.dashboard-pipeline__facts > div {
  min-width: 0;
}

.dashboard-pipeline__head span,
.dashboard-pipeline__signal span,
.dashboard-pipeline__facts span {
  display: block;
  color: var(--text-muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.dashboard-pipeline__head h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
  font-size: 13px;
  font-weight: 700;
}

.dashboard-pipeline__head h3 i {
  position: relative;
  width: 30px;
  height: 1px;
  background: var(--border-strong);
}

.dashboard-pipeline__head h3 i::after {
  position: absolute;
  top: -2px;
  right: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brand);
  content: "";
}

.dashboard-pipeline__head .status-badge {
  flex: 0 0 auto;
}

.dashboard-pipeline__signal {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-subtle);
}

.dashboard-pipeline__signal strong,
.dashboard-pipeline__facts strong {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  font-size: 10px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-pipeline__facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.dashboard-pipeline__facts > div {
  padding: 0 2px;
}

.health-orb {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: var(--success-soft);
  color: var(--success);
}

.health-orb.is-waiting {
  background: var(--warning-soft);
  color: var(--warning);
}

.health-orb.is-idle {
  background: var(--surface-muted);
  color: var(--text-muted);
}

.health-orb .icon {
  width: 18px;
  height: 18px;
}

.dashboard-metrics {
  gap: 10px;
}

.dashboard-metrics .metric-card {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  justify-content: initial;
  gap: 12px;
  overflow: hidden;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.dashboard-metrics .metric-card::after {
  position: absolute;
  top: 0;
  right: 0;
  width: 54px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--brand));
  content: "";
  opacity: .65;
}

.dashboard-metrics .metric-card__copy {
  gap: 3px;
}

.dashboard-metrics .metric-card__value {
  font-size: 24px;
}

.dashboard-metrics .metric-card:nth-child(3) .metric-card__icon {
  background: var(--success-soft);
  color: var(--success);
}

.dashboard-metrics .metric-card:nth-child(4) .metric-card__icon {
  background: color-mix(in srgb, var(--info) 12%, transparent);
  color: var(--info);
}

.health-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.health-fact {
  padding: 10px;
  border-radius: 9px;
  background: var(--surface-subtle);
}

.health-fact span {
  display: block;
  color: var(--text-muted);
  font-size: 8px;
  font-weight: 680;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.health-fact strong {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  font-size: 10px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(330px, .5fr);
  gap: 16px;
}

.chart-panel {
  min-height: 360px;
}

.chart-wrap {
  position: relative;
  height: 260px;
  margin-top: 8px;
}

.chart-wrap svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.chart-grid-line {
  stroke: var(--border);
  stroke-width: 1;
  stroke-dasharray: 4 5;
}

.chart-area {
  fill: url(#chart-area-fill);
}

.chart-line {
  fill: none;
  stroke: var(--brand);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 5px 8px color-mix(in srgb, var(--brand) 22%, transparent));
}

.chart-point {
  fill: var(--surface);
  stroke: var(--brand);
  stroke-width: 2;
}

.chart-labels {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-top: 7px;
  color: var(--text-muted);
  font-size: 8px;
  text-align: center;
}

.rank-list,
.activity-list,
.category-rank {
  display: grid;
  gap: 8px;
}

.rank-row,
.activity-row,
.category-rank__row {
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-subtle);
  transition: border-color .18s ease, background .18s ease;
}

.rank-row:hover,
.activity-row:hover,
.category-rank__row:hover {
  border-color: var(--brand-border);
  background: var(--brand-softer);
}

.rank-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px;
}

.rank-position {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(145deg, var(--brand-soft), var(--brand-softer));
  color: var(--brand);
  font-size: 9px;
  font-weight: 750;
  box-shadow: inset 0 1px 0 var(--highlight-line);
}

.rank-row__copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.rank-row__copy strong {
  overflow: hidden;
  font-size: 11px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-row__copy span {
  color: var(--text-muted);
  font-size: 9px;
}

.rank-row__value {
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 680;
}

.dashboard-lower-grid {
  display: grid;
  grid-template-columns: minmax(330px, .7fr) minmax(0, 1.3fr);
  gap: 16px;
}

.dossier-lower-grid {
  grid-template-columns: minmax(280px, .72fr) minmax(0, 1.28fr);
  align-items: start;
}

.dossier-lower-grid > .panel {
  min-width: 0;
  align-self: start;
}

.dossier-channel-list {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 12px;
}

.dossier-channel-row {
  display: grid;
  gap: 10px;
  padding: 12px 13px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: linear-gradient(145deg, var(--surface-subtle), var(--surface));
  transition: border-color .18s ease, background .18s ease, transform .18s var(--ease-out);
}

.dossier-channel-row:hover {
  border-color: color-mix(in srgb, var(--channel-color) 42%, var(--border));
  background: color-mix(in srgb, var(--channel-color) 6%, var(--surface));
  transform: translateX(2px);
}

.dossier-channel-row__head {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dossier-channel-row__head > span {
  min-width: 0;
  overflow: hidden;
}

.dossier-channel-row__head .category-pill {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dossier-channel-row__head > strong {
  flex: 0 0 auto;
  color: var(--text);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.dossier-channel-row__head > strong small {
  color: var(--text-muted);
  font-size: 7px;
  font-weight: 600;
  text-transform: uppercase;
}

.dossier-channel-row__bar {
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-raised, var(--surface));
}

.dossier-channel-row__bar i {
  display: block;
  width: var(--channel-share);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--channel-color), color-mix(in srgb, var(--channel-color) 48%, transparent));
  box-shadow: 0 0 10px color-mix(in srgb, var(--channel-color) 28%, transparent);
}

.dossier-activity-list {
  display: grid;
  align-content: start;
}

.dossier-activity-row {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 76px;
  grid-template-columns: 12px 62px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 11px 13px;
  border: 0;
  border-bottom: 1px solid var(--border);
  outline: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  transition: background .16s ease;
}

.dossier-activity-row:hover,
.dossier-activity-row:focus-visible {
  background: linear-gradient(90deg, color-mix(in srgb, var(--event-color) 7%, transparent), var(--surface-subtle));
}

.dossier-activity-row__signal {
  display: grid;
  height: 100%;
  place-items: center;
}

.dossier-activity-row__signal::before,
.dossier-activity-row__signal::after {
  width: 1px;
  height: 50%;
  background: var(--border);
  content: "";
}

.dossier-activity-row__signal i {
  width: 7px;
  height: 7px;
  border: 2px solid color-mix(in srgb, var(--event-color) 36%, var(--surface));
  border-radius: 50%;
  background: var(--event-color);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--event-color) 10%, transparent);
}

.dossier-activity-row > time {
  display: grid;
  gap: 3px;
  font-variant-numeric: tabular-nums;
}

.dossier-activity-row > time strong { font-size: 10px; }
.dossier-activity-row > time small { color: var(--text-muted); font-size: 7px; white-space: nowrap; }

.dossier-activity-row__content {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.dossier-activity-row__content > strong {
  overflow: hidden;
  font-size: 11px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dossier-activity-row__content > small {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
}

.dossier-activity-row__content > small > span {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dossier-activity-row__content > small .icon { width: 10px; height: 10px; flex: 0 0 auto; }

.dossier-activity-row__side {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.dossier-capture-mark {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid var(--brand-border);
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand);
}

.dossier-capture-mark .icon { width: 12px; height: 12px; }

@media (max-width: 720px) {
  .dossier-activity-row {
    grid-template-columns: 10px minmax(0, 1fr) auto;
    min-height: 82px;
  }

  .dossier-activity-row__signal { grid-row: 1 / 3; }
  .dossier-activity-row__content { grid-column: 2; grid-row: 1; }
  .dossier-activity-row > time { grid-column: 2; grid-row: 2; display: flex; gap: 6px; }
  .dossier-activity-row__side { grid-column: 3; grid-row: 1 / 3; }
  .dossier-activity-row__content > small > span:nth-child(n+2),
  .dossier-activity-row__side .category-pill { display: none; }
}

.category-rank__row {
  display: grid;
  gap: 8px;
  padding: 11px;
}

.category-rank__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.category-rank__head strong {
  overflow: hidden;
  font-size: 10px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-rank__head span {
  color: var(--text-muted);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.activity-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
}

.activity-row__line {
  width: 3px;
  height: 32px;
  border-radius: 999px;
  background: var(--row-color, var(--brand));
}

.activity-row__copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.activity-row__copy strong {
  overflow: hidden;
  font-size: 10px;
  font-weight: 620;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-row__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  color: var(--text-muted);
  font-size: 8px;
}

.activity-row time {
  color: var(--text-muted);
  font-size: 8px;
  white-space: nowrap;
}

/* Logs split view */
.logs-workspace {
  display: grid;
  height: calc(100dvh - var(--header-height) - 48px);
  min-height: 620px;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
}

.logs-toolbar {
  display: block;
  padding: 10px;
}

.logs-toolbar > .toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 170px 190px auto auto;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.logs-toolbar__advanced {
  display: none;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.logs-toolbar__advanced.is-open {
  display: grid;
}

.logs-toolbar__advanced .field > label {
  font-size: 9px;
}

.logs-split {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-columns: minmax(520px, 1fr) minmax(350px, 440px);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.log-list-pane,
.log-detail-pane {
  min-width: 0;
  min-height: 0;
}

.log-list-pane {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
}

.log-list-head {
  display: flex;
  min-height: 52px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-subtle);
}

.log-list-head__copy {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.log-list-head strong {
  font-size: 11px;
  font-weight: 680;
}

.log-list-head span {
  color: var(--text-muted);
  font-size: 9px;
}

.log-list {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
}

.log-row {
  position: relative;
  display: grid;
  width: 100%;
  grid-template-columns: 82px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid var(--border);
  outline: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  transition: background .15s ease;
}

.log-row:hover,
.log-row:focus-visible {
  background: var(--surface-subtle);
}

.log-row.is-selected {
  background: var(--brand-soft);
}

.log-row.is-selected::before {
  position: absolute;
  inset: 8px auto 8px 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--brand);
  content: "";
}

.log-row__time {
  display: grid;
  gap: 2px;
  color: var(--text-muted);
  font-size: 8px;
  font-variant-numeric: tabular-nums;
}

.log-row__time strong {
  color: var(--text-soft);
  font-size: 9px;
  font-weight: 600;
}

.log-row__content {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.log-row__content > strong {
  overflow: hidden;
  font-size: 11px;
  font-weight: 590;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.log-row__meta {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  color: var(--text-muted);
  font-size: 8px;
}

.log-row__meta span:not(.category-pill) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-pill {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 4px;
  padding: 3px 6px;
  border: 1px solid color-mix(in srgb, var(--group-color) 22%, transparent);
  border-radius: 6px;
  background: color-mix(in srgb, var(--group-color) 9%, transparent);
  color: color-mix(in srgb, var(--group-color) 76%, var(--text));
  font-size: 7px;
  font-weight: 720;
  letter-spacing: .035em;
  white-space: nowrap;
}

.group-pill .icon {
  width: 9px;
  height: 9px;
}

.log-row > .icon {
  width: 15px;
  height: 15px;
  color: var(--text-muted);
}

.log-detail-pane {
  display: flex;
  flex-direction: column;
  background: var(--surface-subtle);
}

.log-detail-head {
  display: flex;
  min-height: 52px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.log-detail-head strong {
  font-size: 11px;
  font-weight: 680;
}

.log-detail-close {
  display: none;
}

.log-detail-content {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.log-detail-empty {
  display: grid;
  height: 100%;
  place-items: center;
  padding: 30px;
  color: var(--text-muted);
  text-align: center;
}

.log-detail-empty > div {
  display: grid;
  max-width: 260px;
  justify-items: center;
  gap: 7px;
}

.log-detail-empty .section-icon {
  margin-bottom: 5px;
}

.log-detail-empty strong {
  color: var(--text-soft);
  font-size: 11px;
}

.log-detail-empty p {
  font-size: 9px;
  line-height: 1.5;
}

.log-detail-card {
  display: grid;
  gap: 15px;
}

.log-detail-card__title {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.log-detail-card__title h3 {
  margin-top: 10px;
  font-size: 16px;
  font-weight: 670;
  line-height: 1.45;
}

.log-detail-card__title p {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 9px;
}

.detail-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.detail-fact {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
}

.detail-fact span {
  display: block;
  color: var(--text-muted);
  font-size: 8px;
  font-weight: 670;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.detail-fact strong,
.detail-fact a {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 620;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-fact a {
  color: var(--brand);
}

/* Investigation workspace */
.logs-page {
  gap: 14px;
}

.logs-intro-actions,
.logs-live-indicator,
.logs-live-indicator > span {
  display: flex;
  align-items: center;
}

.logs-intro-actions {
  gap: 12px;
}

.logs-live-indicator {
  gap: 9px;
  padding: 8px 11px;
  border: 1px solid color-mix(in srgb, var(--success) 22%, var(--border));
  border-radius: 11px;
  background: color-mix(in srgb, var(--success) 6%, var(--surface));
}

.logs-live-indicator > i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--success) 11%, transparent);
  animation: live-pulse 2s ease-in-out infinite;
}

.logs-live-indicator > span {
  align-items: flex-start;
  flex-direction: column;
  gap: 1px;
}

.logs-live-indicator strong {
  color: var(--text);
  font-size: 10px;
}

.logs-live-indicator small {
  color: var(--text-muted);
  font-size: 8px;
}

.shortcut-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 9px;
}

kbd {
  display: inline-grid;
  min-width: 21px;
  height: 21px;
  place-items: center;
  padding-inline: 5px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: var(--surface-raised, var(--surface));
  box-shadow: 0 2px 0 var(--border);
  color: var(--text-soft);
  font: 600 9px/1 var(--font-mono, monospace);
}

.logs-overview {
  position: relative;
  display: grid;
  grid-template-columns: minmax(300px, 1.5fr) repeat(3, minmax(130px, .55fr));
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(105deg, var(--brand-softer), transparent 38%),
    var(--surface);
  box-shadow: var(--shadow-sm);
}

.logs-overview::after {
  position: absolute;
  inset: -80px -40px auto auto;
  width: 200px;
  height: 200px;
  border: 1px solid color-mix(in srgb, var(--brand) 14%, transparent);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.logs-overview__lead,
.logs-overview__stat {
  position: relative;
  z-index: 1;
  min-width: 0;
  padding: 14px 18px;
}

.logs-overview__lead {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logs-overview__icon {
  display: grid;
  width: 39px;
  height: 39px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--brand) 28%, transparent);
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand);
}

.logs-overview__icon .icon {
  width: 18px;
  height: 18px;
}

.logs-overview__lead > div,
.logs-overview__stat {
  display: grid;
  gap: 3px;
}

.logs-overview__lead span,
.logs-overview__stat > span {
  color: var(--text-muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .085em;
  text-transform: uppercase;
}

.logs-overview__lead strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logs-overview__stat {
  justify-content: center;
  border-left: 1px solid var(--border);
}

.logs-overview__stat strong {
  font-size: 14px;
}

.logs-overview__stat small {
  color: var(--text-muted);
  font-size: 8px;
}

.logs-page .logs-workspace {
  height: calc(100dvh - var(--header-height) - 230px);
  min-height: 640px;
  gap: 10px;
}

.logs-page .logs-toolbar {
  overflow: hidden;
  padding: 0;
  background: var(--surface);
}

.logs-toolbar__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 15px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(90deg, var(--brand-softer), transparent 34%);
}

.logs-toolbar__head > div {
  display: grid;
  gap: 3px;
}

.logs-toolbar__head .eyebrow {
  font-size: 7px;
}

.logs-toolbar__head h3 {
  font-size: 12px;
  font-weight: 680;
}

.logs-page .logs-toolbar > .toolbar {
  gap: 8px;
  padding: 10px;
}

.logs-page .toolbar__search {
  position: relative;
}

.logs-page .toolbar__search .input {
  padding-right: 42px;
}

.logs-page .toolbar__search > kbd {
  position: absolute;
  right: 9px;
  top: 50%;
  height: 19px;
  transform: translateY(-50%);
  pointer-events: none;
}

.filter-count {
  display: inline-grid;
  min-width: 18px;
  height: 18px;
  place-items: center;
  margin-left: 2px;
  border-radius: 6px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 8px;
}

.logs-page .logs-toolbar__advanced {
  margin: 0;
  padding: 14px;
  background: color-mix(in srgb, var(--surface-subtle) 80%, transparent);
}

.logs-advanced-grid {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 11px;
}

.logs-active-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-top: 1px solid var(--border);
  background: var(--surface-subtle);
}

.logs-active-filters[hidden] {
  display: none;
}

.logs-active-filters > span {
  flex: 0 0 auto;
  color: var(--text-muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.logs-active-filters > div {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 5px;
}

.logs-active-filters button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border: 1px solid color-mix(in srgb, var(--brand) 22%, var(--border));
  border-radius: 7px;
  background: var(--brand-softer);
  color: var(--text-soft);
  font-size: 8px;
}

.logs-active-filters button span {
  color: var(--brand);
  font-weight: 700;
}

.logs-active-filters button .icon {
  width: 10px;
  height: 10px;
}

.logs-page .logs-split {
  grid-template-columns: minmax(570px, 1fr) minmax(390px, 470px);
  background: var(--surface);
}

.logs-page .logs-split--modal {
  display: block;
}

.logs-split--modal .log-list-pane {
  height: 100%;
  border-right: 0;
}

.logs-new-events {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 56px;
  flex: 0 0 auto;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--brand-border);
  background: linear-gradient(90deg, color-mix(in srgb, var(--brand) 13%, var(--surface)), color-mix(in srgb, var(--brand) 5%, var(--surface)));
  box-shadow: 0 8px 22px color-mix(in srgb, var(--brand) 8%, transparent);
  animation: logs-new-events-enter .24s var(--ease-out);
}

.logs-new-events__icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--brand-border);
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand);
}

.logs-new-events__icon .icon {
  width: 16px;
  height: 16px;
}

.logs-new-events__copy {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 2px;
}

.logs-new-events__copy strong {
  color: var(--text);
  font-size: 10px;
  font-weight: 700;
}

.logs-new-events__copy small {
  overflow: hidden;
  color: var(--text-muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logs-new-events .button {
  flex: 0 0 auto;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--brand) 18%, transparent);
}

.logs-new-events .button .icon {
  width: 13px;
  height: 13px;
}

.logs-page .log-list[aria-busy="true"] {
  opacity: .68;
  pointer-events: none;
  transition: opacity .16s ease;
}

.logs-page .log-list-head,
.logs-page .log-detail-head {
  min-height: 61px;
  padding: 10px 14px;
}

.log-list-head__title,
.log-list-head__context,
.log-detail-head__identity > div,
.log-detail-head__actions {
  display: flex;
  align-items: center;
}

.log-list-head__title {
  gap: 10px;
}

.log-list-head__title > div {
  display: grid;
  gap: 2px;
}

.log-list-head__title strong {
  font-size: 11px;
}

.log-list-head__title small {
  color: var(--text-muted);
  font-size: 8px;
}

.log-list-head__context {
  gap: 10px;
}

.log-list-head__context > span:first-child {
  color: var(--text-muted);
  font-size: 8px;
}

.logs-page .log-row {
  grid-template-columns: 12px 64px minmax(220px, 1fr) auto;
  gap: 11px;
  min-height: 72px;
  padding: 11px 13px;
}

.log-row__signal {
  display: grid;
  height: 100%;
  place-items: center;
}

.log-row__signal::before,
.log-row__signal::after {
  width: 1px;
  height: 50%;
  background: var(--border);
  content: "";
}

.log-row__signal i {
  width: 7px;
  height: 7px;
  border: 2px solid color-mix(in srgb, var(--event-color) 36%, var(--surface));
  border-radius: 50%;
  background: var(--event-color);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--event-color) 9%, transparent);
}

.logs-page .log-row__time {
  gap: 3px;
}

.logs-page .log-row__time strong {
  color: var(--text);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.logs-page .log-row__time span {
  color: var(--text-muted);
  font-size: 8px;
  white-space: nowrap;
}

.logs-page .log-row__content {
  gap: 7px;
}

.logs-page .log-row__content > strong {
  font-size: 11px;
  font-weight: 630;
}

.logs-page .log-row__content > small {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
}

.logs-page .log-row__content > small > span {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logs-page .log-row__content > small .icon {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
}

.logs-page .log-row__context {
  max-width: min(38vw, 430px);
  color: var(--text-soft);
}

.logs-page .log-row__resource {
  color: var(--text-muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.logs-page .log-row__meta {
  gap: 6px;
}

.log-row__open {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  margin-left: 2px;
  border: 1px solid transparent;
  border-radius: 8px;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}

.log-row:hover .log-row__open,
.log-row.is-selected .log-row__open {
  border-color: color-mix(in srgb, var(--brand) 25%, var(--border));
  background: var(--brand-soft);
  color: var(--brand);
}

.logs-page .log-row.is-selected {
  background: linear-gradient(90deg, var(--brand-soft), var(--brand-softer));
}

.log-list-pagination {
  flex: 0 0 auto;
  border-top: 1px solid var(--border);
  background: var(--surface-subtle);
}

.logs-page .log-detail-pane {
  background:
    radial-gradient(circle at 100% 0, var(--brand-softer), transparent 32%),
    var(--surface-subtle);
}

.log-detail-head__identity {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.log-detail-head__identity > div,
.log-detail-head__actions {
  gap: 6px;
}

.logs-page .log-detail-content {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 14px;
}

.log-detail-message {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--brand) 18%, var(--border));
  border-radius: 13px;
  background: linear-gradient(120deg, var(--brand-soft), transparent 58%), var(--surface);
}

.log-detail-message__icon {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand);
}

.log-detail-message__icon .icon {
  width: 16px;
  height: 16px;
}

.log-detail-message > div {
  display: grid;
  gap: 6px;
}

.log-detail-message > div > span,
.log-detail-actor > div > span {
  color: var(--text-muted);
  font-size: 7px;
  font-weight: 720;
  letter-spacing: .075em;
  text-transform: uppercase;
}

.log-detail-message h3 {
  font-size: 14px;
  font-weight: 650;
  line-height: 1.45;
}

.log-detail-message time {
  color: var(--text-muted);
  font-size: 8px;
}

.log-detail-actor {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
}

.log-detail-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--brand) 24%, transparent);
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 10px;
  font-weight: 760;
}

.log-detail-actor > div {
  display: grid;
  gap: 2px;
}

.log-detail-actor strong {
  font-size: 10px;
}

.log-detail-actor small {
  color: var(--text-muted);
  font-size: 8px;
}

.log-detail-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}

.log-detail-section-head > div {
  display: grid;
  gap: 3px;
}

.log-detail-section-head h4 {
  font-size: 11px;
}

.log-detail-section-head > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  font-size: 8px;
}

.log-detail-section-head > span .icon {
  width: 10px;
  height: 10px;
}

.logs-page .detail-fact {
  padding: 9px 10px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
}

.logs-page .log-detail-card {
  gap: 10px;
  padding-top: 2px;
}

.log-detail-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.log-detail-footer > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-muted);
  font-size: 8px;
}

.log-detail-footer > span .icon {
  width: 11px;
  height: 11px;
  color: var(--success);
}

.logs-page .log-detail-empty {
  align-content: center;
  grid-template-rows: auto auto auto;
  gap: 18px;
  background:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 42px 42px;
  background-position: center;
}

.log-detail-empty__visual {
  position: relative;
  display: grid;
  width: 104px;
  height: 84px;
  place-items: center;
  margin-inline: auto;
}

.log-detail-empty__visual > span {
  position: relative;
  z-index: 2;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--brand) 30%, var(--border));
  border-radius: 15px;
  background: var(--surface);
  box-shadow: 0 12px 30px color-mix(in srgb, #000 25%, transparent);
  color: var(--brand);
}

.log-detail-empty__visual > span .icon {
  width: 20px;
  height: 20px;
}

.log-detail-empty__visual i {
  position: absolute;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
}

.log-detail-empty__visual i:nth-of-type(1) { width: 77px; height: 48px; transform: translate(-17px, 12px) rotate(-8deg); }
.log-detail-empty__visual i:nth-of-type(2) { width: 77px; height: 48px; transform: translate(17px, 12px) rotate(8deg); }
.log-detail-empty__visual i:nth-of-type(3) { width: 92px; height: 58px; }

.log-detail-empty__copy {
  display: grid;
  max-width: 310px;
  justify-items: center;
  margin-inline: auto;
  gap: 7px;
}

.log-detail-empty__copy strong {
  color: var(--text);
  font-size: 13px;
}

.log-detail-empty__copy p {
  font-size: 9px;
  line-height: 1.65;
}

.log-detail-shortcuts,
.log-detail-shortcuts > span {
  display: flex;
  align-items: center;
}

.log-detail-shortcuts {
  justify-content: center;
  gap: 14px;
}

.log-detail-shortcuts > span {
  gap: 4px;
  color: var(--text-muted);
  font-size: 8px;
}

/* Event investigation modal — information first, minimal surfaces */
.app-dialog--log-event {
  width: min(900px, calc(100% - 32px));
  max-height: min(90dvh, 900px);
  border-radius: 20px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .34);
}

.app-dialog--log-event[open] {
  animation: none;
}

.app-dialog--log-event::backdrop {
  background: color-mix(in srgb, var(--overlay) 94%, #000);
  backdrop-filter: none;
  animation: none;
}

.dialog-shell--log-event {
  max-height: min(90dvh, 900px);
  contain: layout paint style;
}

.dialog-shell--log-event .dialog-header {
  padding: 20px 26px 17px;
  background: var(--surface);
}

.dialog-shell--log-event .dialog-header h2 {
  font-size: 20px;
}

.dialog-shell--log-event .dialog-content {
  padding: 0 26px 22px;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.log-modal-summary {
  display: grid;
  gap: 12px;
  padding: 24px 0 21px;
  border-bottom: 1px solid var(--border);
}

.log-modal-summary__badges,
.log-modal-summary__context,
.log-modal-summary__context > * {
  display: flex;
  align-items: center;
}

.log-modal-summary__badges {
  gap: 6px;
}

.log-modal-summary h3 {
  max-width: 760px;
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 690;
  letter-spacing: -.035em;
  line-height: 1.25;
}

.log-modal-summary__context {
  flex-wrap: wrap;
  gap: 8px 18px;
}

.log-modal-summary__context > * {
  gap: 5px;
  color: var(--text-muted);
  font-size: 9px;
}

.log-modal-summary__context .icon {
  width: 11px;
  height: 11px;
  color: var(--brand);
}

.log-modal-actor {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 17px 0;
  border-bottom: 1px solid var(--border);
}

.log-modal-actor > div {
  display: grid;
  gap: 2px;
}

.log-modal-actor > div > span {
  color: var(--text-muted);
  font-size: 7px;
  font-weight: 720;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.log-modal-actor strong {
  font-size: 11px;
}

.log-modal-actor small {
  color: var(--text-muted);
  font-size: 8px;
}

.log-modal-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr);
  gap: 0;
  padding-top: 22px;
}

.log-modal-section {
  min-width: 0;
  padding-right: 26px;
}

.log-modal-section + .log-modal-section {
  padding-right: 0;
  padding-left: 26px;
  border-left: 1px solid var(--border);
}

.log-modal-section > header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.log-modal-section > header > div {
  display: grid;
  gap: 3px;
}

.log-modal-section h4 {
  font-size: 12px;
}

.log-modal-section > header > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  font-size: 8px;
}

.log-modal-section > header .icon {
  width: 10px;
  height: 10px;
}

.log-modal-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0;
}

.log-modal-facts > div {
  min-width: 0;
  padding: 11px 10px 11px 0;
  border-bottom: 1px solid var(--border);
}

.log-modal-facts > div:nth-child(even) {
  padding-right: 0;
  padding-left: 14px;
  border-left: 1px solid var(--border);
}

.log-modal-facts dt {
  color: var(--text-muted);
  font-size: 7px;
  font-weight: 720;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.log-modal-facts dd {
  margin: 4px 0 0;
  overflow: hidden;
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 620;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.log-modal-metadata .identity-row {
  grid-template-columns: minmax(90px, .7fr) minmax(0, 1fr);
}

.log-modal-context {
  padding: 22px 0 0;
}

.log-context-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.log-context-item {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 6px;
  padding: 12px 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-subtle);
}

.log-context-item > span {
  color: var(--text-muted);
  font-size: 7px;
  font-weight: 720;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.log-context-item > strong {
  overflow-wrap: anywhere;
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 620;
  line-height: 1.5;
  white-space: pre-wrap;
}

.log-context-item a {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 5px;
  color: var(--brand);
}

.log-context-item a .icon { width: 11px; height: 11px; }

.log-media {
  display: grid;
  min-width: 0;
  grid-column: 1 / -1;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: var(--surface);
  contain: layout paint style;
  isolation: isolate;
}

.log-media--featured {
  margin-top: 6px;
  border-color: var(--brand-border);
  background: linear-gradient(145deg, var(--brand-softer), var(--surface));
}

.log-media > header,
.log-media > footer,
.log-media__kind,
.log-media__kind > span,
.log-media > footer a {
  display: flex;
  align-items: center;
}

.log-media > header,
.log-media > footer {
  justify-content: space-between;
  gap: 12px;
  padding: 11px 13px;
}

.log-media__kind {
  min-width: 0;
  gap: 9px;
}

.log-media__kind > .icon {
  width: 18px;
  height: 18px;
  color: var(--brand);
}

.log-media__kind > span {
  min-width: 0;
  align-items: flex-start;
  flex-direction: column;
  gap: 1px;
}

.log-media__kind small {
  color: var(--text-muted);
  font-size: 7px;
  font-weight: 720;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.log-media__kind strong {
  overflow: hidden;
  max-width: min(520px, 60vw);
  color: var(--text);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.log-media__format {
  padding: 4px 7px;
  border: 1px solid var(--brand-border);
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 7px;
  font-weight: 760;
  letter-spacing: .06em;
}

.log-media__stage {
  position: relative;
  display: grid;
  min-height: 220px;
  max-height: min(52dvh, 520px);
  place-items: center;
  overflow: hidden;
  border-block: 1px solid var(--border);
  contain: paint;
  background: #05070a;
}

.log-media__stage video,
.log-media__stage img {
  display: block;
  width: 100%;
  max-height: min(52dvh, 520px);
  object-fit: contain;
}

.log-media__stage video {
  min-height: 220px;
  aspect-ratio: 16 / 9;
  background: #05070a;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.log-media--video:not(.is-loaded):not(.is-error) .log-media__stage::after,
.log-media--video.is-buffering:not(.is-error) .log-media__stage::after {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
  background: rgba(4, 7, 12, .82);
  color: #c9ced8;
  content: "Preparando vídeo…";
  font-size: 8px;
  font-weight: 650;
  pointer-events: none;
}

.log-media--video.is-buffering:not(.is-error) .log-media__stage::after {
  content: "Carregando mais vídeo…";
}

.log-media__stage img {
  height: auto;
  min-height: 180px;
}

.log-media__error {
  display: none;
  max-width: 320px;
  justify-items: center;
  gap: 6px;
  padding: 28px;
  color: #c9ced8;
  text-align: center;
}

.log-media__error .icon {
  width: 24px;
  height: 24px;
  margin-bottom: 4px;
  color: var(--warning);
}

.log-media__error strong { font-size: 11px; }
.log-media__error span { color: #858c99; font-size: 9px; }
.log-media.is-error .log-media__stage > img,
.log-media.is-error .log-media__stage > video { display: none; }
.log-media.is-error .log-media__error { display: grid; }

.log-media > footer {
  color: var(--text-muted);
  font-size: 8px;
}

.log-media > footer > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.log-media > footer a {
  flex: 0 0 auto;
  gap: 5px;
  color: var(--brand);
  font-weight: 680;
}

.log-media > footer a .icon {
  width: 11px;
  height: 11px;
}

.log-context-empty {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px;
  border: 1px dashed var(--border-strong);
  border-radius: 10px;
  color: var(--text-muted);
}

.log-context-empty > .icon { width: 18px; height: 18px; color: var(--brand); }
.log-context-empty strong { display: block; color: var(--text-soft); font-size: 10px; }
.log-context-empty p { margin-top: 2px; font-size: 8px; }

.log-modal-facts--compact {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.log-modal-facts--compact > div,
.log-modal-facts--compact > div:nth-child(even) {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
}

.log-capture-evidence {
  display: grid;
  gap: 12px;
  margin-top: 20px;
  padding: 15px;
  border: 1px solid var(--brand-border);
  border-radius: 13px;
  background: linear-gradient(145deg, var(--brand-softer), var(--surface-subtle));
  box-shadow: inset 0 1px 0 var(--highlight-line);
}

.log-capture-evidence > header,
.log-capture-evidence > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.log-capture-evidence > header > div {
  display: grid;
  gap: 3px;
}

.log-capture-evidence h4 { font-size: 12px; }

.log-capture-evidence__frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  background: #05070b;
  box-shadow: var(--shadow-md);
}

.log-capture-evidence__frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform .3s var(--ease-out), filter .3s ease;
}

.log-capture-evidence__frame > span {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 9px;
  background: rgb(4 7 14 / 78%);
  color: #fff;
  font-size: 9px;
  font-weight: 680;
  opacity: .78;
  backdrop-filter: blur(8px);
  transition: opacity .2s ease, transform .2s ease;
}

.log-capture-evidence__frame > span .icon { width: 13px; height: 13px; }
.log-capture-evidence__frame:hover img { transform: scale(1.012); filter: brightness(1.05); }
.log-capture-evidence__frame:hover > span { opacity: 1; transform: translateY(-2px); }

.log-capture-evidence > footer {
  color: var(--text-muted);
  font-size: 8px;
}

.log-capture-evidence > footer > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.log-capture-evidence > footer .icon { width: 11px; height: 11px; color: var(--success); }

.log-capture-evidence--failed {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  border-color: var(--border);
  background: var(--surface-subtle);
}

.log-capture-evidence--failed > div { display: grid; gap: 3px; }
.log-capture-evidence--failed strong { font-size: 11px; }
.log-capture-evidence--failed p { color: var(--text-muted); font-size: 9px; }

.log-technical {
  margin-top: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-subtle);
}

.log-technical > summary,
.log-technical > summary > span {
  display: flex;
  align-items: center;
}

.log-technical > summary {
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
}

.log-technical > summary::-webkit-details-marker { display: none; }
.log-technical > summary > span { gap: 9px; }
.log-technical > summary > span > .icon { width: 15px; height: 15px; color: var(--brand); }
.log-technical > summary strong { display: block; font-size: 10px; }
.log-technical > summary small { display: block; margin-top: 2px; color: var(--text-muted); font-size: 7px; }
.log-technical > summary > .icon { width: 13px; height: 13px; transition: transform .18s ease; }
.log-technical[open] > summary > .icon { transform: rotate(180deg); }

.log-technical__body {
  display: grid;
  gap: 18px;
  padding: 4px 14px 15px;
  border-top: 1px solid var(--border);
}

.log-technical__body > .log-modal-facts { margin-top: 8px; }
.log-technical__body .log-modal-metadata > header { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 10px; }

.log-modal-footer,
.log-modal-footer > span,
.log-modal-footer > div {
  display: flex;
  align-items: center;
}

.log-modal-footer {
  justify-content: space-between;
  gap: 16px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.log-modal-footer > span {
  gap: 5px;
  color: var(--text-muted);
  font-size: 8px;
}

.log-modal-footer > span .icon {
  width: 11px;
  height: 11px;
  color: var(--success);
}

.log-modal-footer > div {
  gap: 7px;
}

@keyframes live-pulse {
  50% { opacity: .55; transform: scale(.86); }
}

/* Channels */
.channel-overview {
  display: grid;
  grid-template-columns: auto auto minmax(280px, 1fr);
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.channel-overview > div {
  display: flex;
  min-width: 150px;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border-right: 1px solid var(--border);
}

.channel-overview__icon {
  display: grid;
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
  background: var(--brand-soft);
  color: var(--brand);
}

.channel-overview__icon .icon { width: 14px; height: 14px; }
.channel-overview strong { display: block; font-size: 11px; }
.channel-overview p { margin-top: 2px; color: var(--text-muted); font-size: 8px; }

.channel-groups-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -3px 2px -3px;
}

.channel-groups-toolbar > span {
  color: var(--text-muted);
  font-size: 9px;
}

.channel-groups-toolbar > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.channel-groups {
  display: grid;
  gap: 15px;
}

.channel-group {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.channel-group__header {
  position: relative;
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(90deg, color-mix(in srgb, var(--group-color) 9%, transparent), transparent 42%), var(--surface-subtle);
}

.channel-group__header::before {
  position: absolute;
  inset: 13px auto 13px 0;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: var(--group-color);
  content: "";
}

.channel-group__identity,
.channel-group__summary,
.channel-group__title {
  display: flex;
  min-width: 0;
  align-items: center;
}

.channel-group__identity { gap: 11px; }
.channel-group__identity > div { min-width: 0; }
.channel-group__icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--group-color) 25%, transparent);
  border-radius: 11px;
  background: color-mix(in srgb, var(--group-color) 12%, transparent);
  color: var(--group-color);
}
.channel-group__icon .icon { width: 17px; height: 17px; }
.channel-group__title { gap: 8px; }
.channel-group__title h3 { font-size: 13px; font-weight: 700; }
.channel-group__title span { color: var(--text-muted); font-size: 8px; }
.channel-group__identity p { margin-top: 4px; overflow: hidden; color: var(--text-muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.channel-group__summary { justify-content: flex-end; gap: 8px; }
.channel-group__summary > span { padding: 5px 8px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); color: var(--text-muted); font-size: 8px; white-space: nowrap; }
.channel-group__summary strong { color: var(--text-soft); font-size: 9px; }
.channel-group > .channel-grid { padding: 13px; }
.channel-group__toggle { margin-left: 2px; color: var(--text-soft); }
.channel-group__toggle .icon { transition: transform .18s ease; }
.channel-group.is-collapsed .channel-group__header {
  min-height: 58px;
  padding-block: 9px;
  border-bottom-color: transparent;
}
.channel-group.is-collapsed .channel-group__identity p { display: none; }
.channel-group.is-collapsed .channel-group__toggle .icon { transform: rotate(-90deg); }
.channel-group:not(.is-collapsed) > .channel-grid { animation: channel-group-expand .18s ease-out; }
.channel-group__header { cursor: pointer; transition: min-height .18s ease, padding .18s ease, border-color .18s ease; }
.channel-group__header :is(button, a) { cursor: pointer; }

@keyframes channel-group-expand {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.channel-group__empty {
  grid-column: 1 / -1;
  display: flex;
  min-height: 96px;
  align-items: center;
  justify-content: center;
  gap: 11px;
  padding: 20px;
  border: 1px dashed var(--border-strong);
  border-radius: 11px;
  color: var(--text-muted);
}
.channel-group__empty > span { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 9px; background: var(--brand-soft); color: var(--brand); }
.channel-group__empty strong { display: block; color: var(--text-soft); font-size: 10px; }
.channel-group__empty p { margin-top: 2px; font-size: 8px; }
.channel-group__empty .button { margin-left: 10px; }

.channel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 13px;
}

.channel-card {
  position: relative;
  display: grid;
  min-height: 208px;
  height: 100%;
  grid-template-rows: auto minmax(28px, auto) auto auto;
  align-content: stretch;
  gap: 14px;
  overflow: hidden;
  padding: 16px;
}

.channel-search-empty {
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.channel-card::after {
  position: absolute;
  top: -45px;
  right: -45px;
  width: 125px;
  height: 125px;
  border-radius: 50%;
  background: var(--channel-color, var(--brand));
  content: "";
  filter: blur(50px);
  opacity: .08;
}

.channel-card__head,
.channel-card__description,
.channel-card__stats,
.channel-card__footer {
  position: relative;
  z-index: 1;
}

.channel-card__description {
  display: -webkit-box;
  min-height: 28px;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 9px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.channel-card__head {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

.channel-card__identity {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  align-items: center;
  gap: 11px;
}

.channel-color-mark {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--channel-color, var(--category, var(--brand))) 28%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--channel-color, var(--category, var(--brand))) 11%, transparent);
  color: var(--channel-color, var(--category, var(--brand)));
}

.channel-card__copy {
  display: grid;
  min-width: 0;
  justify-items: start;
  gap: 4px;
}

.channel-card__copy .category-pill {
  max-width: 100%;
  overflow: visible;
  line-height: 1.25;
  text-overflow: clip;
  white-space: normal;
}

.channel-card__meta {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.channel-card__meta .status-badge {
  min-height: 20px;
  flex: 0 0 auto;
  padding-block: 2px;
  font-size: 7px;
}

.channel-card__identity h3 {
  overflow: hidden;
  font-size: 13px;
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-card__identity p {
  margin-top: 2px;
  overflow: hidden;
  color: var(--text-muted);
  font: 9px ui-monospace, SFMono-Regular, Consolas, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-card__identity small {
  display: block;
  min-width: 0;
  flex: 1 1 auto;
  max-width: 100%;
  overflow: hidden;
  color: var(--text-muted);
  font: 8px ui-monospace, SFMono-Regular, Consolas, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-card__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.channel-card__stat {
  display: flex;
  min-height: 54px;
  flex-direction: column;
  justify-content: center;
  padding: 9px 11px;
  border: 1px solid color-mix(in srgb, var(--border) 72%, transparent);
  border-radius: 9px;
  background: var(--surface-subtle);
}

.channel-card__stat span {
  display: block;
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 8px;
  text-transform: uppercase;
}

.channel-card__stat strong {
  display: block;
  margin: 0;
  font-size: 13px;
  font-weight: 680;
  font-variant-numeric: tabular-nums;
}

.channel-card__footer {
  display: flex;
  min-width: 0;
  min-height: 45px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 9px;
}

.channel-card__activity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
}

.channel-card__activity > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-card__activity .icon {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
}

.channel-card__actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
}

.channel-card__actions .button {
  min-width: 66px;
  justify-content: center;
}

.channel-card__actions .icon {
  width: 14px;
  height: 14px;
  transition: transform .18s ease;
}

.channel-card__open {
  box-shadow: 0 7px 18px color-mix(in srgb, var(--channel-color) 18%, transparent);
}

.channel-card:hover .channel-card__open .icon {
  transform: translateX(2px);
}

.channel-detail-hero {
  display: grid;
  grid-template-columns: minmax(220px, .65fr) minmax(560px, 1.7fr);
  align-items: center;
  gap: 22px;
  padding: 22px;
  border-left: 4px solid var(--channel-color, var(--brand));
}

.channel-detail-hero__identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 14px;
}

.channel-detail-hero h2 {
  font-size: 25px;
  font-weight: 710;
  letter-spacing: -.04em;
}

.channel-detail-hero p {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 10px;
}

.channel-detail-hero .metric-grid {
  grid-template-columns: repeat(3, minmax(145px, 1fr));
}

.channel-detail-hero .metric-card {
  min-width: 155px;
  border-left: 1px solid var(--border);
}

.channel-log-panel__order {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  align-self: center;
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 620;
}

.channel-log-panel__order .icon {
  width: 13px;
  height: 13px;
  color: var(--channel-color, var(--brand));
}

.channel-log-list {
  overflow: visible;
}

.channel-log-list .log-row {
  grid-template-columns: 18px 76px minmax(0, 1fr) auto;
  min-height: 76px;
  gap: 14px;
  padding: 13px 18px;
}

.channel-log-list .log-row:first-child .log-row__signal::before,
.channel-log-list .log-row:last-child .log-row__signal::after {
  background: transparent;
}

.channel-log-list .log-row__time {
  gap: 3px;
}

.channel-log-list .log-row__time strong {
  color: var(--text);
  font-size: 11px;
  font-weight: 680;
}

.channel-log-list .log-row__time span {
  font-size: 8px;
  white-space: nowrap;
}

.channel-log-list .log-row__content {
  gap: 7px;
}

.channel-log-list .log-row__content > strong {
  font-size: 12px;
  font-weight: 640;
}

.channel-log-list .log-row__content > small {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 12px;
  color: var(--text-muted);
  font-size: 9px;
}

.channel-log-list .log-row__content > small > span {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-log-list .log-row__content > small .icon {
  width: 11px;
  height: 11px;
  flex: 0 0 auto;
}

.channel-log-list .log-row__context {
  max-width: min(34vw, 430px);
  color: var(--text-soft);
}

.channel-log-list .log-row__meta {
  justify-content: flex-end;
  gap: 8px;
}

.channel-log-list .log-row:hover {
  background: linear-gradient(90deg, color-mix(in srgb, var(--event-color) 5%, transparent), var(--surface-subtle));
}

.channel-log-pagination:empty {
  display: none;
}

.channel-log-pagination:not(:empty) {
  border-top: 1px solid var(--border);
}

/* Players and dossiers */
.player-search {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.player-search__primary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.player-search__filters {
  display: grid;
  grid-template-columns: minmax(180px, .8fr) minmax(150px, .55fr) minmax(190px, .8fr) auto;
  align-items: end;
  gap: 10px;
}

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

.compact-field > span {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 680;
  letter-spacing: .04em;
}

.player-search__meta,
.results-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--text-muted);
  font-size: 10px;
}

.player-search__meta {
  padding-top: 2px;
}

.player-search__meta span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.results-summary {
  min-height: 24px;
  padding-inline: 2px;
}

.results-summary strong {
  color: var(--text);
  font-size: 12px;
}

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

.player-pagination-slot:empty {
  display: none;
}

.player-pagination {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) auto minmax(170px, 1fr);
  align-items: center;
  gap: 18px;
  padding: 12px 14px;
}

.player-pagination__summary {
  display: grid;
  gap: 2px;
}

.player-pagination__summary strong {
  color: var(--text);
  font-size: 11px;
  font-weight: 680;
}

.player-pagination__summary span,
.player-pagination__size > span {
  color: var(--text-muted);
  font-size: 9px;
}

.player-pagination__controls,
.player-pagination__pages,
.player-pagination__size {
  display: flex;
  align-items: center;
}

.player-pagination__controls {
  justify-content: center;
  gap: 8px;
}

.player-pagination__pages {
  gap: 4px;
}

.player-pagination__page {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 680;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}

.player-pagination__page:hover,
.player-pagination__page:focus-visible {
  border-color: var(--border-strong);
  background: var(--surface-hover);
  color: var(--text);
}

.player-pagination__page.is-active {
  border-color: var(--brand-border);
  background: var(--brand-soft);
  color: var(--brand);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 8%, transparent);
}

.player-pagination__ellipsis {
  width: 18px;
  color: var(--text-muted);
  text-align: center;
}

.player-pagination__size {
  justify-content: flex-end;
  gap: 8px;
}

.player-pagination__size .select {
  width: 68px;
  min-height: 34px;
  padding-block: 6px;
}

.player-card {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.player-card__head {
  display: flex;
  align-items: center;
  gap: 11px;
}

.player-card__copy {
  min-width: 0;
  flex: 1;
}

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

.player-card__copy strong {
  font-size: 13px;
  font-weight: 660;
}

.player-card__copy span {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 10px;
}

.player-card__facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.player-card__fact {
  padding: 8px;
  border-radius: 8px;
  background: var(--surface-subtle);
}

.player-card__fact span {
  display: block;
  color: var(--text-muted);
  font-size: 9px;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.player-card__fact strong {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  font-size: 11px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 11px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 10px;
}

.player-card__discord {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border: 1px solid color-mix(in srgb, #5865f2 24%, var(--border));
  border-radius: 10px;
  background: color-mix(in srgb, #5865f2 8%, var(--surface-subtle));
  color: #8b95ff;
}

.player-card__discord .icon {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.player-card__discord span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.player-card__discord small {
  color: var(--text-muted);
  font-size: 7px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.player-card__discord strong {
  overflow: hidden;
  color: var(--text-soft);
  font-size: 9px;
  text-overflow: ellipsis;
}

.dossier-hero {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  overflow: hidden;
  padding: 22px;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(115deg, var(--brand-soft), transparent 42%),
    var(--surface);
}

.dossier-avatar {
  display: grid;
  width: 66px;
  height: 66px;
  place-items: center;
  border: 1px solid var(--brand-border);
  border-radius: 21px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 24px;
  font-weight: 760;
}

.dossier-hero__copy {
  min-width: 0;
}

.dossier-hero__copy .eyebrow {
  margin-bottom: 6px;
}

.dossier-hero h2 {
  overflow: hidden;
  font-size: clamp(23px, 2.7vw, 34px);
  font-weight: 710;
  letter-spacing: -.045em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dossier-hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 9px;
}

.dossier-hero__score {
  display: grid;
  min-width: 120px;
  justify-items: end;
  gap: 3px;
}

.dossier-hero__score strong {
  font-size: 25px;
  font-weight: 710;
  letter-spacing: -.04em;
}

.dossier-hero__score span {
  color: var(--text-muted);
  font-size: 8px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.dossier-grid {
  display: grid;
  grid-template-columns: minmax(300px, .65fr) minmax(0, 1.35fr);
  gap: 16px;
}

.discord-profile-panel {
  overflow: hidden;
  border-color: color-mix(in srgb, #5865f2 24%, var(--border));
  background:
    radial-gradient(circle at 88% 0, color-mix(in srgb, #5865f2 12%, transparent), transparent 34%),
    var(--surface);
}

.section-icon--discord {
  background: color-mix(in srgb, #5865f2 15%, transparent);
  color: #8b95ff;
}

.discord-profile {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}

.discord-profile__avatar {
  position: relative;
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  flex: 0 0 auto;
  border: 2px solid color-mix(in srgb, #5865f2 55%, var(--border));
  border-radius: 22px;
  background: color-mix(in srgb, #5865f2 14%, var(--surface-muted));
  color: #aab1ff;
  font-size: 20px;
  font-weight: 750;
}

.discord-profile__avatar img {
  width: 100%;
  height: 100%;
  border-radius: 20px;
  object-fit: cover;
}

.discord-profile__avatar i {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 14px;
  height: 14px;
  border: 3px solid var(--surface);
  border-radius: 50%;
  background: var(--success);
}

.discord-profile__identity {
  min-width: 0;
}

.discord-profile__identity h3 {
  overflow: hidden;
  margin-top: 3px;
  font-size: 20px;
  letter-spacing: -.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.discord-profile__identity > p {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 10px;
}

.discord-profile__facts,
.discord-profile__actions,
.discord-role-cloud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.discord-profile__facts {
  margin-top: 9px;
}

.discord-profile__facts span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-soft);
  font-size: 9px;
}

.discord-profile__facts .icon {
  width: 12px;
  height: 12px;
  color: #8b95ff;
}

.discord-profile__actions {
  justify-content: flex-end;
}

.discord-role-section {
  display: grid;
  gap: 10px;
}

.discord-role-section > header > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.discord-role-section > header strong {
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 600;
}

.discord-role-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border: 1px solid color-mix(in srgb, var(--discord-role) 35%, var(--border));
  border-radius: 999px;
  background: color-mix(in srgb, var(--discord-role) 10%, var(--surface-subtle));
  color: var(--text-soft);
  font-size: 9px;
  font-weight: 620;
}

.discord-role-chip > i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--discord-role);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--discord-role) 14%, transparent);
}

.discord-role-chip small {
  color: var(--text-muted);
  font-size: 7px;
  font-weight: 500;
}

.discord-profile-empty {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 5px 0;
}

.discord-profile-empty > div {
  display: grid;
  gap: 4px;
}

.discord-profile-empty strong {
  font-size: 12px;
}

.discord-profile-empty p,
.discord-profile-empty span {
  color: var(--text-muted);
  font-size: 9px;
}

.identity-list {
  display: grid;
  gap: 0;
}

.identity-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}

.identity-row:last-child {
  border-bottom: 0;
}

.identity-row span {
  color: var(--text-muted);
  font-size: 9px;
}

.identity-row strong {
  min-width: 0;
  overflow: hidden;
  font-size: 10px;
  font-weight: 620;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.vehicle-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-subtle);
}

.vehicle-row .section-icon {
  width: 32px;
  height: 32px;
}

.vehicle-row__copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.vehicle-row__copy strong {
  overflow: hidden;
  font-size: 10px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vehicle-row__copy span,
.vehicle-row > span {
  color: var(--text-muted);
  font-size: 8px;
}

/* Roles, members and integrations */
.role-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: 13px;
}

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

.role-card,
.integration-card {
  display: grid;
  gap: 14px;
  padding: 17px;
}

.role-card {
  min-width: 0;
  gap: 16px;
  padding: 20px;
}

.role-card__head,
.integration-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 13px;
}

.role-card__identity,
.integration-card__identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.role-color {
  width: 10px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--role-color, var(--brand));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--role-color, var(--brand)) 10%, transparent);
}

.role-card__identity h3,
.integration-card__identity h3 {
  overflow: hidden;
  font-size: 12px;
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.role-card__identity h3 {
  font-size: 14px;
}

.role-card__identity p,
.integration-card__identity p {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 9px;
}

.role-card__identity p {
  font-size: 11px;
  line-height: 1.4;
}

.role-card__badges,
.integration-card__badges,
.permission-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.permission-chip {
  display: inline-flex;
  min-height: 30px;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface-subtle);
  color: var(--text-soft);
  font-size: 10px;
  white-space: nowrap;
}

.permission-chip .icon {
  width: 14px;
  height: 14px;
  color: var(--success);
}

.badge .role-color,
.role-picker-item .role-color {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  box-shadow: none;
}

.role-card__footer,
.integration-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.role-card__footer {
  color: var(--text-muted);
  font-size: 11px;
}

.integration-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, .7fr);
  gap: 18px;
  padding: 22px;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(120deg, var(--brand-soft), transparent 45%),
    var(--surface);
}

.integration-hero h2,
.integration-hero h3 {
  font-size: 25px;
  font-weight: 710;
  letter-spacing: -.04em;
}

.integration-hero p {
  max-width: 650px;
  margin-top: 7px;
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.6;
}

.integration-hero__copy,
.integration-hero__config {
  display: grid;
  min-width: 0;
  align-content: center;
  gap: 11px;
}

.integration-hero__copy .status-badge {
  width: fit-content;
}

.integration-hero__config .button {
  justify-self: end;
}

.endpoint-box,
.token-reveal {
  display: grid;
  gap: 8px;
  padding: 13px;
  border: 1px solid var(--brand-border);
  border-radius: 11px;
  background: var(--brand-softer);
}

.endpoint-box span,
.token-reveal > span {
  color: var(--text-muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.endpoint-box__value,
.token-reveal__value {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.endpoint-box code,
.token-reveal code {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  color: var(--text-soft);
  font: 9px ui-monospace, SFMono-Regular, Consolas, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.connector-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.api-health-panel .panel-body {
  display: grid;
  gap: 14px;
}

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

.api-health-summary > div {
  display: grid;
  min-width: 0;
  gap: 7px;
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-subtle);
}

.api-health-summary > div > span,
.api-source-card__facts span {
  color: var(--text-muted);
  font-size: 8px;
  font-weight: 680;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.api-health-summary > div > strong {
  min-width: 0;
  font-size: 18px;
  line-height: 1.2;
}

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

.api-source-card {
  display: grid;
  min-width: 0;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.api-source-card header,
.api-source-card footer {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.api-source-card h4 {
  margin-top: 3px;
  overflow: hidden;
  font-size: 12px;
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.api-source-card__facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.api-source-card__facts > div {
  min-width: 0;
  padding: 9px;
  border-radius: 8px;
  background: var(--surface-subtle);
}

.api-source-card__facts strong {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  font-size: 10px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.api-source-card footer {
  padding-top: 10px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 9px;
}

.api-source-empty {
  display: flex;
  grid-column: 1 / -1;
  min-height: 92px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px;
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
  color: var(--text-muted);
  text-align: left;
}

.api-source-empty .icon {
  width: 22px;
  height: 22px;
  color: var(--brand);
}

.api-source-empty div {
  display: grid;
  gap: 3px;
}

.api-source-empty strong {
  color: var(--text-soft);
  font-size: 11px;
}

.api-source-empty span {
  font-size: 9px;
}

.connector-metric {
  padding: 9px;
  border-radius: 8px;
  background: var(--surface-subtle);
}

.connector-metric span {
  display: block;
  color: var(--text-muted);
  font-size: 7px;
  text-transform: uppercase;
}

.connector-metric strong {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  font-weight: 670;
  font-variant-numeric: tabular-nums;
}

.connector-error {
  padding: 9px;
  border: 1px solid color-mix(in srgb, var(--danger) 24%, transparent);
  border-radius: 8px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 9px;
  line-height: 1.45;
}

/* Settings */
.settings-layout {
  display: grid;
  grid-template-columns: 225px minmax(0, 1fr);
  align-items: start;
  gap: 16px;
}

.settings-nav {
  position: sticky;
  top: 0;
  display: grid;
  gap: 4px;
  padding: 9px;
}

.settings-nav__label {
  padding: 8px 9px 5px;
  color: var(--text-muted);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.settings-nav button {
  display: grid;
  width: 100%;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--text-soft);
  text-align: left;
  transition: border-color .18s ease, background .18s ease, color .18s ease;
}

.settings-nav button:hover {
  border-color: var(--border);
  background: var(--surface-subtle);
  color: var(--text);
}

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

.settings-nav button .icon {
  width: 16px;
  height: 16px;
}

.settings-nav button span {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.settings-nav button strong {
  font-size: 10px;
  font-weight: 670;
}

.settings-nav button small {
  overflow: hidden;
  color: var(--text-muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-content {
  min-width: 0;
}

.settings-panel {
  display: none;
  gap: 14px;
}

.settings-panel.is-active {
  display: grid;
  animation: settings-panel-enter .25s var(--ease-out) both;
}

.settings-section {
  overflow: hidden;
}

.settings-section__body {
  padding: 18px;
}

.bot-presence-card {
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface-subtle);
}

.bot-presence-card__header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(100deg, var(--brand-soft), transparent 55%);
}

.bot-presence-card__icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--brand-border);
  border-radius: 11px;
  background: var(--brand-soft);
  color: var(--brand);
}

.bot-presence-card__icon .icon { width: 16px; height: 16px; }
.bot-presence-card__header h4 { margin-top: 2px; font-size: 12px; }
.bot-presence-card__header p { margin-top: 2px; color: var(--text-muted); font-size: 8px; }
.bot-presence-card__body { display: grid; gap: 12px; padding: 14px; }

.gateway-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 8px;
  font-weight: 700;
  white-space: nowrap;
}

.gateway-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--status-color, var(--text-muted));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--status-color, var(--text-muted)) 13%, transparent);
}

.gateway-status--online { --status-color: var(--success); color: var(--success); }
.gateway-status--waiting { --status-color: var(--warning); color: var(--warning); }
.gateway-status--offline { --status-color: var(--danger); color: var(--danger); }

.bot-presence-card__diagnostic {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border-left: 2px solid var(--brand);
  border-radius: 0 8px 8px 0;
  background: var(--brand-softer);
}

.bot-presence-card__diagnostic p { color: var(--text-soft); font-size: 9px; }
.bot-presence-card__diagnostic small { color: var(--danger); font-size: 8px; }

.branding-preview {
  position: relative;
  display: grid;
  min-height: 195px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(color-mix(in srgb, var(--border) 60%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--border) 60%, transparent) 1px, transparent 1px),
    var(--surface-subtle);
  background-size: 24px 24px;
}

.branding-preview::before {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, var(--brand-soft), transparent 64%);
  content: "";
}

.branding-preview__card {
  position: relative;
  z-index: 1;
  display: flex;
  width: min(310px, calc(100% - 30px));
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.branding-preview__copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

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

.branding-preview__copy strong {
  font-size: 12px;
}

.branding-preview__copy span {
  color: var(--text-muted);
  font-size: 9px;
}

.color-control {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 9px;
}

.color-control input[type="color"] {
  width: 46px;
  height: 38px;
  padding: 3px;
  border: 1px solid var(--input);
  border-radius: 9px;
  background: var(--surface-subtle);
}

.storage-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.storage-status-card {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-subtle);
}

.storage-status-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.storage-status-card__head span {
  color: var(--text-muted);
  font-size: 8px;
  font-weight: 680;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.storage-status-card strong {
  overflow: hidden;
  font-size: 14px;
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.storage-status-card small {
  overflow: hidden;
  color: var(--text-muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.danger-zone {
  border-color: color-mix(in srgb, var(--danger) 25%, var(--border));
}

.danger-zone .panel-header {
  background: linear-gradient(90deg, var(--danger-soft), var(--surface));
}

.danger-zone .section-icon {
  border-color: color-mix(in srgb, var(--danger) 24%, transparent);
  background: var(--danger-soft);
  color: var(--danger);
}

.settings-savebar {
  position: sticky;
  bottom: -24px;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 16px;
  padding: 13px 15px;
  border: 1px solid var(--border-strong);
  border-radius: 13px 13px 0 0;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: 0 -10px 32px rgba(0, 0, 0, .08);
  backdrop-filter: blur(16px);
}

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

.settings-savebar__copy > span:last-child {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.settings-savebar__copy strong {
  display: block;
  font-size: 10px;
  font-weight: 670;
}

.settings-savebar__copy small {
  display: block;
  color: var(--text-muted);
  font-size: 9px;
}

.settings-savebar__actions {
  display: flex;
  gap: 8px;
}

.role-picker-list {
  display: grid;
  max-height: 280px;
  gap: 4px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-subtle);
}

.role-picker-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  padding: 8px;
  border-radius: 8px;
  transition: background .15s ease;
}

.role-picker-item:hover {
  background: var(--surface-hover);
}

.role-picker-item span {
  min-width: 0;
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.role-picker-item small {
  margin-left: auto;
  color: var(--text-muted);
  font: 8px ui-monospace, SFMono-Regular, Consolas, monospace;
}

.role-picker-item > span {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 9px;
}

.role-picker-item > span > span {
  display: grid;
  gap: 2px;
}

.role-picker-item strong {
  display: block;
  overflow: hidden;
  font-size: 10px;
  font-weight: 660;
  text-overflow: ellipsis;
}

.role-picker-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  accent-color: var(--brand);
}

.role-picker-item--manual .role-color {
  background: var(--text-muted);
}

.discord-access-policy {
  display: grid;
  gap: 12px;
}

.discord-access-policy__head,
.discord-role-toolbar,
.discord-role-manual,
.discord-role-manual > div:last-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.discord-access-policy__head > div {
  min-width: 0;
}

.discord-access-policy__head .button {
  flex: 0 0 auto;
}

.discord-role-toolbar .input-with-icon {
  width: min(100%, 430px);
}

.discord-role-toolbar .badge {
  flex: 0 0 auto;
}

.discord-access-policy .role-picker-list {
  max-height: 330px;
}

.role-picker-empty {
  display: grid;
  min-height: 120px;
  place-items: center;
  align-content: center;
  gap: 5px;
  padding: 18px;
  color: var(--text-muted);
  text-align: center;
}

.role-picker-empty .icon {
  width: 22px;
  height: 22px;
  margin-bottom: 3px;
  color: var(--brand);
}

.role-picker-empty strong {
  color: var(--text-soft);
  font-size: 11px;
}

.role-picker-empty span {
  font-size: 9px;
}

.discord-role-manual {
  padding: 12px;
  border: 1px dashed var(--border-strong);
  border-radius: 10px;
  background: var(--surface-subtle);
}

.discord-role-manual > div:first-child {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.discord-role-manual strong {
  font-size: 10px;
  font-weight: 670;
}

.discord-role-manual span {
  color: var(--text-muted);
  font-size: 9px;
}

.discord-role-manual .input {
  width: min(250px, 34vw);
}

/* Audit */
.audit-timeline {
  display: grid;
}

.audit-event {
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.audit-event:last-child {
  border-bottom: 0;
}

.audit-event__icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand);
}

.audit-event__icon .icon {
  width: 15px;
  height: 15px;
}

.audit-event__copy {
  min-width: 0;
}

.audit-event__title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.audit-event__title strong {
  font-size: 10px;
  font-weight: 650;
}

.audit-event__copy p {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 9px;
}

.audit-event__meta {
  display: grid;
  justify-items: end;
  gap: 3px;
  color: var(--text-muted);
  font-size: 8px;
  white-space: nowrap;
}

.audit-details {
  grid-column: 2 / -1;
  margin-top: -4px;
}

/* Responsive behavior */
@media (max-width: 1240px) {
  .channel-grid,
  .player-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .logs-split {
    grid-template-columns: minmax(480px, 1fr) minmax(320px, 390px);
  }

  .logs-toolbar__advanced {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

  .logs-toolbar > .toolbar {
    grid-template-columns: minmax(230px, 1fr) 150px 170px auto auto;
  }
}

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

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

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

  .global-search {
    width: min(250px, 27vw);
  }

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

  .channel-overview {
    grid-template-columns: auto auto minmax(220px, 1fr);
  }
}

@media (max-width: 960px) {
  .app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(var(--sidebar-width), 88vw);
    transform: translateX(-105%);
  }

  .app-body.sidebar-open .app-sidebar {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }

  .sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 45;
    display: block;
    border: 0;
    background: var(--overlay);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
  }

  .app-body.sidebar-open .sidebar-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  .sidebar-close,
  .mobile-menu-button {
    display: inline-flex;
  }

  .app-header {
    padding-inline: 14px;
  }

  .app-view {
    padding: 18px;
  }

  .global-search {
    width: min(280px, 36vw);
  }

  .login-main {
    grid-template-columns: 1fr;
    gap: 48px;
    padding-top: 58px;
  }

  .login-hero {
    max-width: 820px;
  }

  .login-access-card {
    max-width: 560px;
    justify-self: center;
  }

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

  .logs-toolbar > .toolbar {
    grid-template-columns: minmax(240px, 1fr) 1fr 1fr;
  }

  .logs-toolbar > .toolbar .button {
    grid-row: 2;
  }

  .logs-workspace {
    height: auto;
    min-height: 0;
  }

  .logs-split {
    min-height: calc(100dvh - 210px);
    grid-template-columns: 1fr;
  }

  .log-list-pane {
    min-height: 560px;
    border-right: 0;
  }

  .log-detail-pane {
    position: fixed;
    inset: 0 0 0 auto;
    z-index: 100;
    width: min(460px, 94vw);
    height: 100dvh;
    border-left: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    transform: translateX(105%);
    transition: transform .3s var(--ease-out);
  }

  .log-detail-pane.is-open {
    transform: translateX(0);
  }

  .log-detail-close {
    display: inline-flex;
  }

  .settings-layout {
    grid-template-columns: 190px minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .login-topbar,
  .login-main,
  .login-footer {
    width: min(100% - 32px, 680px);
  }

  .login-topbar {
    min-height: 72px;
  }

  .system-availability {
    display: none;
  }

  .login-main {
    padding: 42px 0 54px;
  }

  .login-hero h1 {
    font-size: clamp(40px, 11.5vw, 62px);
  }

  .login-capabilities {
    grid-template-columns: 1fr;
  }

  .login-stream__row div {
    display: grid;
    gap: 1px;
  }

  .login-footer {
    justify-content: center;
    text-align: center;
  }

  .login-footer > span:first-child {
    display: none;
  }

  .global-search {
    display: none;
  }

  .live-status span {
    display: none;
  }

  .live-status {
    width: 34px;
    justify-content: center;
    padding: 0;
  }

  .header-avatar {
    display: none;
  }

  .app-view {
    padding: 14px;
  }

  .page-intro {
    align-items: flex-start;
    flex-direction: column;
  }

  .page-actions {
    width: 100%;
    justify-content: flex-start;
  }

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

  .player-search__primary,
  .player-search__filters {
    grid-template-columns: 1fr;
  }

  .player-search__meta,
  .results-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .form-grid,
  .form-grid--three {
    grid-template-columns: 1fr;
  }

  .discord-access-policy__head,
  .discord-role-toolbar,
  .discord-role-manual {
    align-items: stretch;
    flex-direction: column;
  }

  .discord-role-toolbar .input-with-icon,
  .discord-role-manual > div:last-child,
  .discord-role-manual .input {
    width: 100%;
  }

  .discord-role-manual > div:last-child .input {
    flex: 1;
  }

  .metric-grid,
  .storage-status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .dashboard-hero__main {
    padding: 22px;
  }

  .dashboard-pipeline {
    margin: 0 12px 12px;
    padding: 14px;
  }

  .channel-grid,
  .player-grid,
  .role-grid,
  .integration-grid {
    grid-template-columns: 1fr;
  }

  .channel-overview {
    grid-template-columns: 1fr 1fr;
  }

  .channel-overview > div {
    min-width: 0;
  }

  .channel-overview > label {
    grid-column: 1 / -1;
  }

  .channel-groups-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .channel-groups-toolbar > div {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .channel-group__header {
    align-items: flex-start;
    flex-direction: column;
  }

  .channel-group__summary {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .logs-toolbar {
    display: block;
  }

  .logs-toolbar > .toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .logs-toolbar > .toolbar > :first-child {
    grid-column: 1 / -1;
  }

  .logs-toolbar__advanced,
  .logs-toolbar__advanced.is-open {
    grid-template-columns: 1fr 1fr;
  }

  .log-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .log-row__time {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex;
    gap: 5px;
  }

  .log-row__content {
    grid-column: 1;
    grid-row: 1;
  }

  .log-row > .icon {
    grid-column: 2;
    grid-row: 1;
  }

  .channel-detail-hero,
  .dossier-hero {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .channel-detail-hero > .page-actions,
  .dossier-hero__score {
    grid-column: 1 / -1;
    justify-self: stretch;
    justify-items: start;
  }

  .dossier-grid,
  .integration-hero {
    grid-template-columns: 1fr;
  }

  .discord-profile {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .discord-profile__actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

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

  .api-source-grid {
    grid-template-columns: 1fr;
  }

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

  .settings-nav {
    position: static;
    display: flex;
    overflow-x: auto;
  }

  .settings-nav__label {
    display: none;
  }

  .settings-nav button {
    width: auto;
    min-width: 170px;
    flex: 0 0 auto;
  }

  .settings-savebar {
    bottom: -14px;
    align-items: stretch;
    flex-direction: column;
  }

  .settings-savebar__actions .button {
    flex: 1;
  }

  .audit-event {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .audit-event__meta,
  .audit-details {
    grid-column: 2;
    justify-items: start;
  }

  .pagination {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .login-topbar__identity span {
    display: none;
  }

  .login-hero h1 {
    font-size: 39px;
  }

  .login-stream {
    display: none;
  }

  .login-access-card__content {
    padding: 26px 21px;
  }

  .access-checks {
    grid-template-columns: 1fr;
  }

  .access-checks div {
    display: flex;
    justify-content: flex-start;
    text-align: left;
  }

  .page-heading span {
    display: none;
  }

  .page-heading h1 {
    font-size: 14px;
  }

  .settings-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: visible;
  }

  .settings-nav button {
    width: 100%;
    min-width: 0;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 5px;
    padding: 9px 5px;
    text-align: center;
  }

  .settings-nav button small {
    display: none;
  }

  .input,
  .select,
  .textarea {
    font-size: 16px;
  }

  .metric-grid,
  .storage-status-grid {
    grid-template-columns: 1fr;
  }

  .metric-card {
    padding: 14px;
  }

  .dashboard-hero__main {
    padding: 20px 16px;
  }

  .dashboard-hero__headline {
    align-items: center;
  }

  .dashboard-hero__headline strong {
    font-size: 43px;
  }

  .dashboard-hero__headline span {
    font-size: 16px;
  }

  .dashboard-pipeline__head {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .health-facts,
  .detail-facts {
    grid-template-columns: 1fr;
  }

  .chart-wrap {
    height: 210px;
  }

  .logs-toolbar {
    display: block;
  }

  .logs-toolbar > .toolbar {
    grid-template-columns: 1fr;
  }

  .logs-toolbar > .toolbar > * {
    grid-column: 1;
    grid-row: auto;
  }

  .logs-toolbar__advanced,
  .logs-toolbar__advanced.is-open {
    grid-template-columns: 1fr;
  }

  .channel-card__stats {
    grid-template-columns: repeat(3, 1fr);
  }

  .channel-card__footer {
    align-items: stretch;
    flex-direction: column;
  }

  .channel-card__actions,
  .channel-card__actions .button {
    width: 100%;
  }

  .channel-card__actions .button {
    flex: 1 1 0;
  }

  .developer-credit {
    gap: 5px;
    font-size: 7px;
    letter-spacing: .015em;
  }

  .developer-credit__divider,
  .developer-credit__signal {
    display: none;
  }

  .bot-presence-card__header {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .gateway-status {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .dossier-avatar {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    font-size: 19px;
  }

  .dossier-hero h2 {
    font-size: 20px;
  }

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

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

  .api-source-card__facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dialog-footer {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .dialog-footer .button {
    width: 100%;
  }
}

/* Investigation workspace responsiveness */
@media (max-width: 1280px) {
  .logs-page .logs-split {
    grid-template-columns: minmax(500px, 1fr) minmax(340px, 400px);
  }

  .logs-advanced-grid {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

  .logs-page .log-row__meta .group-pill {
    display: none;
  }
}

@media (max-width: 1100px) {
  .logs-overview {
    grid-template-columns: minmax(260px, 1.2fr) repeat(3, minmax(110px, .55fr));
  }

  .logs-page .logs-workspace {
    height: auto;
    min-height: 0;
  }

  .logs-page .logs-split {
    grid-template-columns: 1fr;
  }

  .logs-page .log-list-pane {
    min-height: 610px;
    border-right: 0;
  }
}

@media (max-width: 760px) {
  .logs-intro-actions .shortcut-hint {
    display: none;
  }

  .logs-overview {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .logs-overview__lead {
    grid-column: 1 / -1;
    border-bottom: 1px solid var(--border);
  }

  .logs-overview__stat {
    padding-inline: 12px;
    border-left: 0;
    border-right: 1px solid var(--border);
  }

  .logs-overview__stat:last-child {
    border-right: 0;
  }

  .logs-page .logs-toolbar > .toolbar,
  .logs-advanced-grid {
    grid-template-columns: 1fr 1fr;
  }

  .logs-page .logs-toolbar > .toolbar > :first-child {
    grid-column: 1 / -1;
  }

  .logs-page .log-row {
    grid-template-columns: 10px minmax(0, 1fr) auto;
    min-height: 82px;
  }

  .logs-page .log-row__time {
    grid-column: 2;
    grid-row: 2;
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .logs-page .log-row__content {
    grid-column: 2;
    grid-row: 1;
  }

  .logs-page .log-row__meta {
    grid-column: 3;
    grid-row: 1 / 3;
  }

  .logs-page .log-row__meta .category-pill,
  .logs-page .log-row__content > small span:nth-child(n+2) {
    display: none;
  }

  .log-row__signal {
    grid-row: 1 / 3;
  }

  .log-list-head__context > span:first-child {
    display: none;
  }
}

@media (max-width: 520px) {
  .logs-intro-actions {
    display: none;
  }

  .logs-overview {
    grid-template-columns: 1fr 1fr;
  }

  .logs-overview__stat {
    border-bottom: 1px solid var(--border);
  }

  .logs-overview__stat:last-child {
    grid-column: 1 / -1;
    border-bottom: 0;
  }

  .logs-page .logs-toolbar > .toolbar,
  .logs-advanced-grid {
    grid-template-columns: 1fr;
  }

  .logs-page .logs-toolbar > .toolbar > * {
    grid-column: 1;
  }

  .logs-toolbar__head {
    align-items: flex-start;
  }

  .logs-toolbar__head .button {
    width: 34px;
    overflow: hidden;
    padding-inline: 8px;
    white-space: nowrap;
  }

  .logs-active-filters {
    align-items: flex-start;
    flex-direction: column;
  }

  .log-detail-actor {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .log-detail-actor .button {
    grid-column: 1 / -1;
  }

  .log-detail-footer {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 760px) {
  .app-dialog--log-event {
    width: min(100% - 16px, 900px);
    max-height: 94dvh;
  }

  .dialog-shell--log-event,
  .dialog-shell--log-event .dialog-content {
    max-height: 94dvh;
  }

  .dialog-shell--log-event .dialog-header {
    padding: 17px 18px 14px;
  }

  .dialog-shell--log-event .dialog-content {
    padding-inline: 18px;
  }

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

  .log-modal-section,
  .log-modal-section + .log-modal-section {
    padding-inline: 0;
    border-left: 0;
  }

  .log-modal-section + .log-modal-section {
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px solid var(--border);
  }
}

@media (max-width: 520px) {
  .log-modal-summary h3 {
    font-size: 19px;
  }

  .log-modal-actor {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .log-modal-actor .button {
    grid-column: 1 / -1;
  }

  .log-context-grid {
    grid-template-columns: 1fr;
  }

  .log-media__stage,
  .log-media__stage video {
    min-height: 170px;
  }

  .log-media__kind strong {
    max-width: 52vw;
  }

  .log-modal-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .log-modal-footer > div,
  .log-modal-footer .button {
    width: 100%;
  }

  .log-modal-footer .button {
    justify-content: center;
  }
}

/* Player pagination responsive layout */
@media (max-width: 900px) {
  .player-pagination {
    grid-template-columns: 1fr auto;
  }

  .player-pagination__controls {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

@media (max-width: 520px) {
  .player-pagination {
    grid-template-columns: 1fr;
  }

  .player-pagination__summary {
    text-align: center;
  }

  .player-pagination__controls {
    grid-column: 1;
    grid-row: auto;
  }

  .player-pagination__pages {
    display: none;
  }

  .player-pagination__size {
    justify-content: center;
  }
}

/* Channel detail responsive layout */
@media (max-width: 1100px) {
  .channel-detail-hero {
    grid-template-columns: 1fr;
  }

  .channel-detail-hero .metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .channel-detail-hero .metric-grid {
    grid-template-columns: 1fr;
  }

  .channel-detail-hero .metric-card {
    min-width: 0;
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .channel-log-panel__order {
    display: none;
  }

  .channel-log-list .log-row {
    grid-template-columns: 14px minmax(0, 1fr) auto;
    min-height: 88px;
    gap: 7px 11px;
    padding: 13px 14px;
  }

  .channel-log-list .log-row__signal {
    grid-column: 1;
    grid-row: 1 / 3;
  }

  .channel-log-list .log-row__content {
    grid-column: 2;
    grid-row: 1;
  }

  .channel-log-list .log-row__time {
    grid-column: 2;
    grid-row: 2;
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .channel-log-list .log-row__meta {
    grid-column: 3;
    grid-row: 1 / 3;
  }

  .channel-log-list .log-row__context {
    max-width: 42vw;
  }
}

@media (max-width: 520px) {
  .channel-log-list .log-row__meta .category-pill,
  .channel-log-list .log-row__content > small > span:nth-child(n + 2) {
    display: none;
  }

  .channel-detail-hero {
    padding: 17px;
  }
}

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

@keyframes logs-new-events-enter {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes login-card-enter {
  from { opacity: 0; transform: translateY(20px) scale(.975); filter: blur(7px); }
  to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

@keyframes pulse-live {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--success) 35%, transparent); }
  50% { box-shadow: 0 0 0 5px transparent; }
}

@keyframes skeleton-shimmer {
  to { transform: translateX(100%); }
}

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

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes toast-enter {
  from { opacity: 0; transform: translateX(22px) scale(.98); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes toast-exit {
  to { opacity: 0; transform: translateX(18px) scale(.98); }
}

@keyframes settings-panel-enter {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

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