* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font: 14px/1.5 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'cv11', 'ss01';
}

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

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

code, .mono {
  font-family: var(--font-mono);
  font-size: 0.92em;
}

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

:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

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

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

.icon {
  width: 16px;
  height: 16px;
  flex: none;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ───────── Botões e campos ───────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background 0.12s, border-color 0.12s;

  &:hover {
    background: var(--surface-hover);
  }

  &:disabled {
    opacity: 0.5;
    cursor: default;
  }

  &.primary {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--on-primary);

    &:hover {
      background: var(--primary-hover);
    }
  }

  &.brand {
    background: var(--brand);
    border-color: var(--brand);
    color: var(--on-brand);

    &:hover {
      background: var(--brand-hover);
    }
  }

  &.ghost {
    border-color: transparent;
    background: transparent;
    box-shadow: none;

    &:hover {
      background: var(--surface-hover);
    }
  }

  &.small {
    height: 30px;
    padding: 0 10px;
    font-size: 13px;
  }

  &.icon-only {
    width: 36px;
    padding: 0;
  }
}

.input {
  height: 36px;
  width: 100%;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);

  &::placeholder {
    color: var(--text-muted);
  }

  &:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: var(--focus);
  }

  &.mono {
    font-family: var(--font-mono);
    font-size: 13px;
  }
}

.input-with-icon {
  position: relative;

  .icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
  }

  .input {
    padding-left: 36px;
  }
}

.select {
  appearance: none;
  height: 36px;
  padding: 0 34px 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238a8a8a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E") no-repeat right 10px center;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.segmented {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border-radius: var(--radius);
  background: var(--surface-sunken);
  border: 1px solid var(--border);

  button {
    height: 28px;
    padding: 0 12px;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;

    &[aria-pressed='true'] {
      background: var(--surface);
      color: var(--text);
      box-shadow: var(--shadow-sm);
    }
  }
}

/* ───────── Estrutura ───────── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.topbar-row {
  display: flex;
  align-items: center;
  gap: 14px;
  height: var(--header-h);
  padding: 0 24px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;

  img {
    width: 28px;
    height: 28px;
  }
}

.crumbs {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  overflow: hidden;
  font-weight: 500;

  .sep {
    color: var(--border-strong);
    font-size: 20px;
    font-weight: 300;
  }

  a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    margin: -4px -8px;
    border-radius: var(--radius-sm);
    white-space: nowrap;

    &:hover {
      background: var(--surface-hover);
    }
  }
}

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

.avatar {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--on-brand);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  border: 0;
  cursor: pointer;
}

.menu {
  position: relative;

  .menu-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 200px;
    padding: 6px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
  }

  .menu-label {
    padding: 8px 10px;
    font-size: 13px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
    margin-bottom: 4px;
  }

  .menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    text-align: left;
    cursor: pointer;

    &:hover {
      background: var(--surface-hover);
    }
  }
}

.tabs {
  display: flex;
  gap: 4px;
  padding: 0 16px;
  overflow-x: auto;
  scrollbar-width: none;

  a {
    position: relative;
    padding: 10px 10px 14px;
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;

    &:hover {
      color: var(--text);
    }

    &[aria-current='page'] {
      color: var(--text);

      &::after {
        content: '';
        position: absolute;
        left: 10px;
        right: 10px;
        bottom: -1px;
        height: 2px;
        background: var(--text);
        border-radius: 2px;
      }
    }
  }
}

.page {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.page-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;

  h1 {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-right: auto;
  }

  p {
    width: 100%;
    color: var(--text-secondary);
  }
}

.with-sidenav {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 40px;
}

.sidenav {
  display: flex;
  flex-direction: column;
  gap: 2px;

  h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
  }

  .sidenav-group {
    margin: 12px 0 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
  }

  a, button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 0;
    border-radius: var(--radius);
    background: transparent;
    color: var(--text-secondary);
    font-weight: 500;
    text-align: left;
    cursor: pointer;

    &:hover {
      color: var(--text);
      background: var(--surface-hover);
    }

    &[aria-current='page'] {
      color: var(--text);
      background: var(--surface-sunken);
      box-shadow: inset 0 0 0 1px var(--border);
    }
  }
}

/* ───────── Cartões e listas ───────── */

.panel {
  background: var(--surface-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 4px;

  & + & {
    margin-top: 24px;
  }
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px 14px;

  h2, h3 {
    font-size: 14px;
    font-weight: 600;
  }

  p {
    color: var(--text-secondary);
    font-size: 13px;
  }

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

.panel-body {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius-lg) - 3px);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

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

.rows > * + * {
  border-top: 1px solid var(--border);
}

.row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 56px;
  padding: 12px 18px;

  &.link {
    cursor: pointer;

    &:hover {
      background: var(--surface-hover);
    }
  }

  .row-main {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .row-end {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
  }
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  padding: 18px 20px;

  .field-label {
    font-weight: 500;
  }

  .field-help {
    color: var(--text-secondary);
    font-size: 13px;
  }

  .field-value {
    justify-self: end;
    text-align: right;
    min-width: 0;
    overflow-wrap: anywhere;
  }
}

.app-mark {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--brand-soft);
  color: var(--brand-text);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  flex: none;

  &.large {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    font-size: 18px;
  }
}

.env-chip {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--info);
  flex: none;
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.08);

  &.staging {
    background: #eab308;
  }
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
  background: var(--text-muted);

  &.ok {
    background: var(--success);
    box-shadow: 0 0 0 3px var(--success-soft);
  }

  &.warn {
    background: var(--warning);
    box-shadow: 0 0 0 3px var(--warning-soft);
  }

  &.bad {
    background: var(--danger);
    box-shadow: 0 0 0 3px var(--danger-soft);
  }

  &.pulse {
    animation: pulse 1.4s ease-in-out infinite;
  }
}

@keyframes pulse {
  50% {
    opacity: 0.4;
  }
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;

  &.ok {
    border-color: transparent;
    background: var(--success-soft);
    color: var(--success);
  }

  &.warn {
    border-color: transparent;
    background: var(--warning-soft);
    color: var(--warning);
  }

  &.bad {
    border-color: transparent;
    background: var(--danger-soft);
    color: var(--danger);
  }

  &.brand {
    border-color: transparent;
    background: var(--brand-soft);
    color: var(--brand-text);
  }

  &.mono {
    font-family: var(--font-mono);
    font-size: 11px;
  }
}

.status-icon {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  flex: none;
  color: #fff;

  .icon {
    width: 12px;
    height: 12px;
    stroke-width: 3;
  }

  &.ok {
    background: var(--success);
  }

  &.bad {
    background: var(--danger);
  }

  &.warn {
    background: var(--warning);
  }

  &.idle {
    background: var(--text-muted);
  }

  &.running {
    background: transparent;
    color: var(--brand);

    .icon {
      width: 18px;
      height: 18px;
      stroke-width: 2.25;
      animation: spin 0.9s linear infinite;
    }
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.empty {
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 48px 24px;
  text-align: center;
  color: var(--text-secondary);

  .icon {
    width: 28px;
    height: 28px;
    color: var(--text-muted);
  }

  strong {
    color: var(--text);
    font-weight: 600;
  }
}

.loading {
  display: grid;
  place-items: center;
  padding: 64px;
  color: var(--text-muted);
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.error-box {
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--danger-soft);
  color: var(--danger);
}

.kv {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 16px;
  font-size: 13px;

  dt {
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
  }

  dd {
    margin: 0;
    text-align: right;
    font-weight: 500;
    overflow-wrap: anywhere;
  }
}

/* ───────── Canvas do ambiente ───────── */

.env-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 8px;

  h1 {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.02em;

    span {
      color: var(--text-secondary);
      font-weight: 500;
    }
  }

  .env-hero-actions {
    margin-left: auto;
    display: flex;
    gap: 8px;
  }
}

.env-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 0 0 28px 60px;
  color: var(--text-secondary);

  span, a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }

  a:hover {
    color: var(--text);
  }
}

.canvas {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background-color: var(--surface-sunken);
  background-image: radial-gradient(var(--border-strong) 1px, transparent 1px);
  background-size: 16px 16px;
}

.canvas-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 14px;
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--border) 45%, transparent);

  > h3 {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 0 4px;
  }
}

.node {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);

  &.linked {
    border-color: color-mix(in srgb, var(--brand) 55%, var(--border-strong));
  }

  header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;

    small {
      color: var(--text-secondary);
      font-weight: 500;
    }

    a {
      margin-left: auto;
      color: var(--text-muted);

      &:hover {
        color: var(--text);
      }
    }
  }

  .kv {
    padding: 14px 16px;
  }
}

.connector {
  position: absolute;
  inset: 0;
  pointer-events: none;
  width: 100%;
  height: 100%;
  overflow: visible;

  path {
    fill: none;
    stroke: color-mix(in srgb, var(--brand) 60%, var(--border-strong));
    stroke-width: 1.5;
  }
}

.role-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;

  & + & {
    border-top: 1px solid var(--border);
  }

  .role-name {
    font-weight: 500;
  }

  .role-meta {
    margin-left: auto;
    color: var(--text-secondary);
    font-size: 12px;
    font-family: var(--font-mono);
  }
}

/* ───────── Gráficos ───────── */

.chart {
  position: relative;
  user-select: none;

  svg {
    display: block;
    width: 100%;
    overflow: visible;
  }

  .grid line {
    stroke: var(--chart-grid);
  }

  .axis text {
    fill: var(--text-muted);
    font-size: 11px;
  }

  .hover-line {
    stroke: var(--border-strong);
    stroke-dasharray: 3 3;
  }
}

.chart-tooltip {
  position: absolute;
  top: 0;
  z-index: 5;
  min-width: 140px;
  padding: 8px 10px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  font-size: 12px;
  pointer-events: none;

  div {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  i {
    width: 8px;
    height: 8px;
    border-radius: 2px;
  }

  b {
    margin-left: auto;
    font-weight: 600;
  }
}

.legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-secondary);

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

  i {
    width: 10px;
    height: 3px;
    border-radius: 2px;
  }
}

.chart-card {
  padding: 16px 18px;

  .chart-card-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 12px;

    h3 {
      font-size: 13px;
      font-weight: 600;
    }

    .legend {
      margin-left: auto;
    }
  }
}

.chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;

  > * {
    border-top: 1px solid var(--border);
  }

  > *:nth-child(-n + 2) {
    border-top: 0;
  }

  > *:nth-child(even) {
    border-left: 1px solid var(--border);
  }
}

.stat-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0;

  > div {
    padding: 14px 18px;

    & + div {
      border-left: 1px solid var(--border);
    }
  }

  > div > span {
    display: block;
    color: var(--text-secondary);
    font-size: 12px;
  }

  strong {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
  }
}

.bar-list > div {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  font-size: 13px;

  .bar {
    position: absolute;
    inset: 3px auto 3px 0;
    border-radius: var(--radius-sm);
    background: var(--brand-soft);
    z-index: 0;
  }

  span, b {
    position: relative;
    z-index: 1;
  }

  span {
    font-family: var(--font-mono);
    font-size: 12px;
  }

  b {
    font-weight: 500;
    font-variant-numeric: tabular-nums;
  }
}

/* ───────── Terminal, logs e código ───────── */

.code-block {
  position: relative;
  background: var(--code-bg);
  color: var(--code-text);
  border-radius: var(--radius-lg);
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.7;
  overflow: hidden;
}

.code-lines {
  max-height: 520px;
  overflow: auto;
  padding: 14px 0;

  > div {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    padding-right: 16px;

    &:hover {
      background: rgb(255 255 255 / 0.03);
    }
  }

  .ln {
    color: #64748b;
    text-align: right;
    padding-right: 14px;
    user-select: none;
  }

  .k {
    color: #fb923c;
  }

  .v {
    color: #a5f3fc;
    overflow-wrap: anywhere;
  }

  .masked {
    color: #475569;
    letter-spacing: 1px;
  }
}

.code-veil {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  background: rgb(15 23 42 / 0.55);
  backdrop-filter: blur(5px);
  color: #e2e8f0;
  font-family: var(--font-sans);

  .btn {
    background: rgb(255 255 255 / 0.08);
    border-color: rgb(255 255 255 / 0.18);
    color: #fff;
  }
}

.log-view {
  height: 560px;
  overflow: auto;
  padding: 12px 0;

  > div {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 12px;
    padding: 1px 16px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;

    &.stderr .msg {
      color: #fca5a5;
    }
  }

  time {
    color: #64748b;
  }
}

.log-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 12px;

  .input-with-icon {
    flex: 1;
    min-width: 200px;
  }
}

.xterm-host {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 10px 12px;
  background: #0b0d12;

  position: relative;

  .xterm-mount {
    flex: 1;
    min-height: 0;
  }

  .xterm-placeholder {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: #0b0d12;
    color: #94a3b8;

    strong {
      color: #e2e8f0;
    }
  }

  .xterm-viewport {
    scrollbar-color: #2a2f3a transparent;
  }
}

/* ───────── Modal ───────── */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgb(10 10 10 / 0.45);
  animation: fade 0.12s ease-out;
}

@keyframes fade {
  from {
    opacity: 0;
  }
}

.modal {
  display: flex;
  flex-direction: column;
  width: min(1100px, 100%);
  height: min(720px, calc(100vh - 48px));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;

  &.compact {
    height: auto;
    width: min(480px, 100%);
  }

  > header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);

    h2 {
      font-size: 15px;
      font-weight: 600;
    }

    .modal-close {
      margin-left: auto;
    }
  }

  .modal-toolbar {
    display: flex;
    gap: 8px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--border);
    background: var(--surface-sunken);

    .select {
      width: 180px;
    }

    .input {
      flex: 1;
    }
  }

  .modal-body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
}

/* ───────── Login ───────── */

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

.login-art {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 40px 48px;
  overflow: hidden;
  color: #fff;
  background: #0b0b0c;

  .brand-mark {
    color: #fff;
    position: relative;
    z-index: 1;
  }

  .login-sun {
    position: absolute;
    left: 50%;
    bottom: 72px;
    width: min(680px, 92%);
    transform: translateX(-50%);
    pointer-events: none;
  }

  .login-pitch {
    position: relative;
    z-index: 1;
    max-width: 440px;
    margin-bottom: auto;
    margin-top: 12vh;

    h2 {
      font-size: 34px;
      line-height: 1.15;
      font-weight: 600;
      letter-spacing: -0.03em;
      margin-bottom: 14px;
    }

    p {
      color: #a3a3a3;
      font-size: 15px;
    }
  }

  .login-foot {
    position: relative;
    z-index: 1;
    color: #737373;
    font-size: 12px;
    font-family: var(--font-mono);
  }
}

.login-form-side {
  display: grid;
  place-items: center;
  padding: 40px 24px;
  background: var(--surface);
}

.login-form {
  width: min(380px, 100%);
  display: grid;
  gap: 18px;

  h1 {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.02em;
  }

  .login-sub {
    margin-top: -10px;
    color: var(--text-secondary);
  }

  label {
    display: grid;
    gap: 8px;
    font-weight: 500;
  }

  .btn {
    height: 40px;
    margin-top: 4px;
  }

  .login-mobile-brand {
    display: none;
  }

  .login-note {
    display: flex;
    gap: 8px;
    align-items: center;
    color: var(--text-muted);
    font-size: 12px;
  }
}

/* ───────── Responsivo ───────── */

@media (max-width: 900px) {
  .canvas {
    grid-template-columns: minmax(0, 1fr);
  }

  .connector {
    display: none;
  }

  .with-sidenav {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .sidenav {
    flex-direction: row;
    flex-wrap: wrap;

    h2 {
      width: 100%;
      margin-bottom: 4px;
    }

    .sidenav-group {
      display: none;
    }
  }

  .chart-grid {
    grid-template-columns: minmax(0, 1fr);

    > *:nth-child(2) {
      border-top: 1px solid var(--border);
    }

    > *:nth-child(even) {
      border-left: 0;
    }
  }

  .login-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .login-art {
    display: none;
  }

  .login-form .login-mobile-brand {
    display: inline-flex;
  }
}

@media (max-width: 640px) {
  .topbar-row {
    padding: 0 16px;
    gap: 10px;
  }

  .topbar .brand-mark .brand-name,
  .crumbs .app-mark {
    display: none;
  }

  .canvas {
    padding: 12px;
    gap: 16px;
  }

  .canvas-column {
    padding: 10px;
  }

  .page {
    padding: 24px 16px 64px;
  }

  .env-meta {
    margin-left: 0;
  }

  .field-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;

    .field-value {
      justify-self: start;
      text-align: left;
    }
  }

  .row .row-end .hide-sm {
    display: none;
  }

  .log-view > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
}
