/* Komvos — Hub de IA shell (liquid-glass) */
:root {
  color-scheme: dark;
  --brand-teal: #00aa9e;
  --brand-mint: #45dcd1;
  --brand-navy: #002d48;
  --bg-app: #0a0c10;
  --text: #f4f9fb;
  --text-muted: rgba(244, 249, 251, 0.62);
  --text-dim: rgba(244, 249, 251, 0.42);
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(69, 220, 209, 0.32);
  --glass: rgba(18, 22, 29, 0.45);
  --glass-strong: rgba(255, 255, 255, 0.06);
  --radius: 22px;
  --radius-lg: 28px;
  --shadow-glow: 0 0 48px rgba(0, 170, 158, 0.18);
  --grad-brand: linear-gradient(135deg, #00aa9e 0%, #45dcd1 100%);
}

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

html,
body {
  min-height: 100%;
  min-height: 100dvh;
}

body {
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg-app);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Ambient background */
.bg-stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(1100px 620px at 12% -8%, rgba(0, 170, 158, 0.16), transparent 58%),
    radial-gradient(900px 520px at 92% 108%, rgba(69, 220, 209, 0.1), transparent 55%),
    radial-gradient(700px 400px at 70% 20%, rgba(0, 45, 72, 0.55), transparent 60%),
    var(--bg-app);
}

.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(64px);
  opacity: 0.55;
  animation: orb-drift 16s ease-in-out infinite alternate;
}

.bg-orb--a {
  width: 42vw;
  height: 42vw;
  max-width: 520px;
  max-height: 520px;
  top: -8%;
  left: -6%;
  background: rgba(0, 170, 158, 0.35);
}

.bg-orb--b {
  width: 36vw;
  height: 36vw;
  max-width: 440px;
  max-height: 440px;
  bottom: -12%;
  right: -4%;
  background: rgba(69, 220, 209, 0.22);
  animation-delay: -6s;
  animation-duration: 20s;
}

@keyframes orb-drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(3%, 4%, 0) scale(1.08);
  }
}

.app {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 20px 20px 28px;
  max-width: 1100px;
  margin: 0 auto;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  animation: fade-up 0.7s ease both;
}

.brand-logo {
  height: 44px;
  width: auto;
  display: block;
}

.header-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand-mint);
}

.chat-shell {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-radius: var(--radius-lg);
  background: linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.09) 0%,
      rgba(255, 255, 255, 0.03) 40%,
      rgba(0, 170, 158, 0.06) 100%
    ),
    var(--glass);
  border: 1px solid var(--border);
  box-shadow:
    var(--shadow-glow),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 24px 64px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(28px) saturate(1.35);
  -webkit-backdrop-filter: blur(28px) saturate(1.35);
  overflow: hidden;
  animation: fade-up 0.85s ease 0.08s both;
}

.chat-shell__glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    80% 50% at 50% 0%,
    rgba(69, 220, 209, 0.12),
    transparent 70%
  );
}

.hero-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 28px 36px;
  gap: 16px;
  border-bottom: 1px solid var(--border);
}

.chat-kicker {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand-mint);
}

.chat-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  background: linear-gradient(180deg, #ffffff 0%, #c8d4da 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.agent-name {
  font-size: clamp(1.15rem, 2.8vw, 1.45rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--brand-mint);
  margin-top: -4px;
}

.agent-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 4px;
}

.jump-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: rgba(0, 170, 158, 0.1);
  color: var(--brand-mint);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.jump-link:hover {
  background: rgba(0, 170, 158, 0.18);
  border-color: rgba(69, 220, 209, 0.55);
  transform: translateY(-1px);
}

.chat-lead {
  max-width: 34rem;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.agent-block {
  position: relative;
  border-top: 1px solid var(--border);
  scroll-margin-top: 24px;
}

.agent-block__head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 36px 32px 8px;
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
}

.agent-kicker {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.agent-block .agent-name {
  margin: 0;
  font-size: clamp(1.4rem, 3vw, 1.75rem);
}

.agent-blurb {
  font-size: 0.98rem;
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 40rem;
}

.agent-block__head .cta {
  margin-top: 4px;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
  min-height: 52px;
  padding: 0 28px;
  border-radius: 999px;
  border: none;
  text-decoration: none;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #041416;
  background: var(--grad-brand);
  box-shadow:
    0 0 0 1px rgba(69, 220, 209, 0.35),
    0 12px 36px rgba(0, 170, 158, 0.35);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease;
}

.cta:hover {
  transform: translateY(-2px) scale(1.02);
  filter: brightness(1.06);
  box-shadow:
    0 0 0 1px rgba(69, 220, 209, 0.55),
    0 16px 44px rgba(0, 170, 158, 0.5),
    0 0 60px rgba(69, 220, 209, 0.28);
}

.cta:active {
  transform: translateY(0) scale(0.99);
}

.cta svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.chat-hint {
  margin-top: 4px;
  font-size: 13px;
  color: var(--text-dim);
}

.guide {
  position: relative;
  padding: 24px 32px 40px;
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
  text-align: left;
  animation: fade-up 0.9s ease 0.12s both;
}

.guide-title {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  color: var(--text);
}

.guide-lead,
.guide-note {
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.guide-note code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--brand-mint);
}

.guide-subtitle {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 28px 0 14px;
  color: var(--text);
}

.trigger-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px;
}

.trigger-list li {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: rgba(0, 170, 158, 0.08);
  font-size: 13px;
  color: var(--text-muted);
}

.trigger-list code,
.flow-list code,
.canon code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  color: var(--brand-mint);
  background: transparent;
}

.canon {
  margin: 0 0 8px;
  padding: 18px 18px 18px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.32);
  color: rgba(244, 249, 251, 0.88);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-x: auto;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.canon code {
  color: inherit;
  font-size: inherit;
}

.flow-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  counter-reset: flow;
}

.flow-list li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 4px 12px;
  align-items: start;
  counter-increment: flow;
}

.flow-list li::before {
  content: counter(flow);
  grid-row: 1 / span 2;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #041416;
  background: var(--grad-brand);
  margin-top: 2px;
}

.flow-list strong {
  font-size: 0.98rem;
  color: var(--text);
}

.flow-list span {
  grid-column: 2;
  font-size: 0.94rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.chat-footer {
  padding: 14px 20px 18px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
  background: var(--glass-strong);
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .app {
    padding: 16px 14px 20px;
  }

  .brand-logo {
    height: 36px;
  }

  .header-tag {
    display: none;
  }

  .hero-panel {
    padding: 36px 20px 28px;
  }

  .guide {
    padding: 20px 18px 32px;
  }

  .agent-block__head {
    padding: 28px 18px 8px;
  }

  .cta {
    width: 100%;
    max-width: 320px;
  }

  .agent-jump {
    width: 100%;
    flex-direction: column;
  }

  .jump-link {
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bg-orb,
  .header,
  .chat-shell,
  .cta,
  .login-card {
    animation: none !important;
    transition: none !important;
  }
}

/* —— Login (layout tipo card central, tema Hub liquid-glass) —— */
.login-hud {
  position: absolute;
  inset: 50% auto auto 50%;
  width: min(640px, 88vw);
  height: auto;
  transform: translate(-50%, -50%);
  opacity: 0.28;
  pointer-events: none;
  user-select: none;
  mix-blend-mode: screen;
}

.login-page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 28px 18px;
}

.login-card {
  width: min(420px, 100%);
  padding: 36px 32px 28px;
  text-align: center;
  border-radius: var(--radius-lg);
  background: rgba(14, 18, 24, 0.72);
  border: 1px solid var(--border-strong);
  box-shadow:
    var(--shadow-glow),
    0 24px 64px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(22px) saturate(1.2);
  -webkit-backdrop-filter: blur(22px) saturate(1.2);
  animation: fade-up 0.65s ease both;
}

.login-brand {
  margin-bottom: 28px;
}

.login-logo {
  height: 42px;
  width: auto;
  margin: 0 auto 10px;
  display: block;
}

.login-tagline {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  font-weight: 600;
  color: var(--text-dim);
}

.login-title {
  font-size: clamp(1.55rem, 3.5vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.login-lead {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 28px;
  line-height: 1.45;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.login-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.login-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.login-input::placeholder {
  color: var(--text-dim);
}

.login-input:focus {
  border-color: rgba(0, 170, 158, 0.65);
  box-shadow: 0 0 0 3px rgba(0, 170, 158, 0.18);
}

.login-error {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.85rem;
  line-height: 1.35;
  color: #ffb4b4;
  background: rgba(180, 40, 40, 0.18);
  border: 1px solid rgba(255, 120, 120, 0.28);
}

.login-submit {
  margin-top: 6px;
  width: 100%;
  padding: 13px 18px;
  border: none;
  border-radius: 14px;
  font: inherit;
  font-weight: 700;
  font-size: 0.98rem;
  cursor: pointer;
  color: #041016;
  background: #fff;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.login-submit:hover:not(:disabled) {
  background: var(--brand-mint);
  box-shadow: 0 8px 28px rgba(0, 170, 158, 0.35);
  transform: translateY(-1px);
}

.login-submit:disabled {
  opacity: 0.65;
  cursor: wait;
}

.login-hint {
  margin-top: 18px;
  font-size: 0.78rem;
  color: var(--text-dim);
}

.login-footer-link {
  display: inline-block;
  margin-top: 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brand-mint);
  text-decoration: none;
}

.login-footer-link:hover {
  text-decoration: underline;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
}

.header-link:hover {
  color: var(--brand-mint);
}

/* —— Layout com menu lateral —— */
.layout {
  position: relative;
  z-index: 1;
  display: block;
  min-height: 100vh;
  min-height: 100dvh;
  padding-left: 260px;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 20;
  width: 260px;
  display: flex;
  flex-direction: column;
  padding: 22px 16px 18px;
  border-right: 1px solid var(--border);
  background: rgba(10, 12, 16, 0.92);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  overflow: hidden;
}

.sidebar__brand {
  padding: 0 8px 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
  flex-shrink: 0;
}

.sidebar__logo {
  height: 36px;
  width: auto;
  display: block;
  margin-bottom: 8px;
}

.sidebar__tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand-mint);
}

.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.sidebar__group {
  margin: 14px 8px 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.sidebar__link {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
}

.sidebar__link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.sidebar__link.is-active {
  color: #041016;
  background: var(--grad-brand);
  font-weight: 700;
}

.sidebar__foot {
  flex-shrink: 0;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  background: rgba(10, 12, 16, 0.98);
}

.sidebar__user {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  padding: 0 8px;
  word-break: break-word;
  min-height: 1.2em;
}

.sidebar__logout {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.sidebar__logout:hover {
  border-color: var(--border-strong);
  color: var(--brand-mint);
}

.layout-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 16px 18px 24px;
  width: 100%;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.topbar__menu {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 1.1rem;
  cursor: pointer;
}

.topbar__title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.page-shell {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-radius: var(--radius-lg);
  background: linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.09) 0%,
      rgba(255, 255, 255, 0.03) 40%,
      rgba(0, 170, 158, 0.06) 100%
    ),
    var(--glass);
  border: 1px solid var(--border);
  box-shadow:
    var(--shadow-glow),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 24px 64px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(28px) saturate(1.35);
  -webkit-backdrop-filter: blur(28px) saturate(1.35);
  overflow: auto;
  animation: fade-up 0.7s ease both;
}

.hero-panel--compact {
  padding: 40px 32px 28px;
  align-items: flex-start;
  text-align: left;
  gap: 12px;
}

.hero-panel--compact .chat-title {
  font-size: clamp(1.75rem, 3.5vw, 2.35rem);
}

.hero-panel--compact .chat-lead {
  max-width: 36rem;
  margin: 0;
}

.agent-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 8px 28px 28px;
  flex: 1;
}

.agent-summary {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: start;
  padding: 20px 22px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background:
    linear-gradient(135deg, rgba(0, 170, 158, 0.08), transparent 42%),
    rgba(0, 0, 0, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.agent-summary__num {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  color: var(--brand-mint);
  opacity: 0.85;
  padding-top: 2px;
  font-variant-numeric: tabular-nums;
}

.agent-summary__body {
  min-width: 0;
}

.agent-summary__title {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 2px 0 10px;
  letter-spacing: -0.02em;
  color: var(--text);
}

.agent-summary__text {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.55;
  max-width: 44rem;
  margin: 0;
}

.agent-summary__text code {
  font-size: 0.85em;
  color: var(--brand-mint);
}

.chat-footer--end {
  margin-top: auto;
}

.agent-block--solo {
  border-bottom: none;
}

.cta--inline {
  display: inline-flex;
  width: auto;
  margin-top: 12px;
}

.users-panel {
  padding: 28px 24px 36px;
}

.users-panel__head {
  margin-bottom: 24px;
}

.users-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.cta--ghost {
  background: transparent;
  color: var(--brand-mint);
  border: 1px solid var(--border-strong);
  box-shadow: none;
}

.cta--ghost:hover {
  background: rgba(0, 170, 158, 0.12);
  color: var(--text);
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.modal__card--wide {
  width: min(480px, 100%);
}

.users-form {
  margin-bottom: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.users-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.users-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
  padding-top: 22px;
}

.users-table-scroll {
  overflow-x: auto;
  margin-top: 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
}

.users-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.users-table th,
.users-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.users-table th {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: rgba(0, 0, 0, 0.25);
}

.users-table tr:last-child td {
  border-bottom: none;
}

.users-table code {
  font-size: 0.85rem;
  color: var(--brand-mint);
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge--ok {
  color: #041016;
  background: var(--brand-mint);
}

.badge--off {
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.08);
}

.badge--master {
  color: var(--brand-mint);
  border: 1px solid var(--border-strong);
  background: transparent;
  margin-left: 6px;
}

.btn-text {
  background: none;
  border: none;
  color: var(--brand-mint);
  font: inherit;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0;
}

.actions-hint {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.btn-text:hover {
  text-decoration: underline;
}

.status-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 120px;
}

.status-select {
  padding: 8px 10px;
  font-size: 0.85rem;
  cursor: pointer;
}

.form-ok {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.85rem;
  color: #b8fff4;
  background: rgba(0, 170, 158, 0.16);
  border: 1px solid rgba(69, 220, 209, 0.35);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.65);
}

.modal[hidden] {
  display: none !important;
}

.modal__card {
  width: min(420px, 100%);
  padding: 24px;
  border-radius: var(--radius);
  background: rgba(14, 18, 24, 0.96);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-glow);
}

.modal__card .login-field {
  margin-top: 14px;
}

.modal__actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
  margin-top: 18px;
}

.sidebar-backdrop {
  display: none;
}

@media (max-width: 960px) {
  .agent-list {
    padding: 4px 16px 24px;
  }

  .agent-summary {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 16px 16px;
  }

  .hero-panel--compact {
    padding: 28px 18px 20px;
  }

  .users-form__grid {
    grid-template-columns: 1fr;
  }

  .layout {
    padding-left: 0;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    box-shadow: 24px 0 48px rgba(0, 0, 0, 0.45);
  }

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

  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 30;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
  }

  .layout.sidebar-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .topbar__menu {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}
