:root {
  --bg: #0d1117;
  --surface: #161b22;
  --surface2: #1c2330;
  --border: #30363d;
  --text: #e6edf3;
  --muted: #8b949e;
  --accent: #58a6ff;
  --accent-dim: #388bfd;
  --ok: #3fb950;
  --warn: #d29922;
  --danger: #f85149;
  --radius: 8px;
  font-family: -apple-system, "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.5;
}

header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.header-logo {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  background: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.header-text h1 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.header-text p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.port-badge {
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.15rem 0.45rem;
}

.header-badges {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.version-badge {
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  border-radius: 4px;
  padding: 0.15rem 0.45rem;
  background: rgba(88, 166, 255, 0.08);
}

.board {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr 0.9fr 1.6fr;
  gap: 0;
  height: calc(100vh - 57px);
  min-height: 420px;
}

.col {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: var(--surface);
  min-width: 0;
  transition: filter 0.25s ease, opacity 0.25s ease;
}

.col:last-child { border-right: none; }

.col-locked {
  filter: blur(2px);
  opacity: 0.45;
  pointer-events: none;
  user-select: none;
}

.col-active {
  filter: none;
  opacity: 1;
  pointer-events: auto;
  user-select: auto;
}

.col-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
  flex-shrink: 0;
}

.col-head-actions {
  align-items: center;
}

.col-head-left {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.btn-add-device {
  flex-shrink: 0;
  font-size: 0.72rem;
  padding: 0.35rem 0.55rem;
  border-radius: 6px;
  border: 1px solid var(--accent-dim);
  background: rgba(88, 166, 255, 0.12);
  color: var(--accent);
  cursor: pointer;
  white-space: nowrap;
}

.btn-add-device:hover {
  background: rgba(88, 166, 255, 0.22);
}

.col-head h2 {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.col-sub {
  font-size: 0.72rem;
  color: var(--accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 55%;
}

.col-body {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
}

.placeholder {
  color: var(--muted);
  font-size: 0.82rem;
  padding: 0.75rem 0.5rem;
  margin: 0;
}

.list-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  padding: 0.55rem 0.65rem;
  border-radius: var(--radius);
  cursor: pointer;
  font: inherit;
  margin-bottom: 0.25rem;
}

.list-item:hover {
  background: rgba(88, 166, 255, 0.08);
  border-color: var(--border);
}

.list-item.selected {
  background: rgba(88, 166, 255, 0.15);
  border-color: var(--accent-dim);
}

.list-item .meta {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

.device-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
}

.device-nome-row {
  display: flex;
  align-items: center;
  gap: 0.28rem;
  min-width: 0;
  flex: 1;
}

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

.btn-force-update {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  padding: 0;
  border: 1px solid rgba(210, 153, 34, 0.55);
  border-radius: 0.35rem;
  background: rgba(210, 153, 34, 0.14);
  color: var(--warn);
  font-size: 0.82rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.btn-force-update:hover {
  background: rgba(210, 153, 34, 0.28);
  border-color: var(--warn);
  color: #f0c040;
}

.btn-force-update:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.device-ver-badge {
  flex-shrink: 0;
  font-size: 0.62rem;
  font-weight: 600;
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
  padding: 0.12rem 0.38rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--muted);
}

.device-ver-badge.syncing {
  animation: device-ver-pulse 1.2s ease-in-out infinite;
}

@keyframes device-ver-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.55;
  }
}

.device-ver-badge.atual {
  border-color: rgba(63, 185, 80, 0.45);
  background: rgba(63, 185, 80, 0.12);
  color: var(--ok);
}

.device-ver-badge.desatualizada {
  border-color: rgba(210, 153, 34, 0.45);
  background: rgba(210, 153, 34, 0.12);
  color: var(--warn);
}

.device-ver-badge.pendente {
  border-color: rgba(88, 166, 255, 0.45);
  background: rgba(88, 166, 255, 0.12);
  color: var(--accent);
}

.device-ver-badge.ausente {
  border-color: var(--border);
  color: var(--muted);
  font-style: italic;
}

.meta-versao.ausente { color: var(--muted); font-style: italic; }

.section-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  padding: 0.65rem 0.35rem 0.25rem;
  margin: 0;
}

.section-label.online { color: var(--ok); }
.section-label.offline { color: var(--warn); }
.section-label.excluded { color: var(--danger); }

.cmd-group {
  margin-bottom: 0.75rem;
}

.cmd-group-title {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  padding: 0.35rem 0.35rem 0.25rem;
  margin: 0;
}

.cmd-btn {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius);
  cursor: pointer;
  font: inherit;
  margin-bottom: 0.3rem;
}

.cmd-btn:hover:not(:disabled) {
  border-color: var(--accent-dim);
  background: rgba(88, 166, 255, 0.08);
}

.cmd-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.restore-row {
  display: flex;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.btn-restore {
  flex: 1;
  font-size: 0.72rem;
  padding: 0.35rem 0.4rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
}

.btn-restore:hover {
  border-color: var(--accent-dim);
}

.meta-versao {
  display: block;
  font-size: 0.68rem;
  margin-top: 0.15rem;
  color: var(--muted);
}

.meta-versao.atual { color: var(--ok); }
.meta-versao.desatualizada { color: var(--warn); }
.meta-versao.pendente { color: var(--accent); }

.device-row.selected .restore-row { display: none; }

.device-historico-panel {
  border-top: 1px solid var(--border);
  padding: 0.5rem 0.65rem 0.75rem;
  max-height: 220px;
  overflow-y: auto;
}

.historico-item {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.72rem;
}

.historico-item:last-child { border-bottom: none; }

.historico-tipo { font-weight: 600; }
.historico-tipo.historico-formatacao { color: var(--warn); }
.historico-tipo.historico-registro { color: var(--ok); }
.historico-tipo.historico-exclusao { color: var(--danger); }
.historico-quando { color: var(--muted); }
.historico-detalhe { color: var(--text); opacity: 0.85; }

.device-comandos-panel {
  border-top: 1px solid var(--border);
  padding: 0.5rem 0.65rem 0.75rem;
  max-height: 240px;
  overflow-y: auto;
}

.cmd-hist-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.72rem;
}

.cmd-hist-item:last-child { border-bottom: none; }

.cmd-hist-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.cmd-hist-tipo { font-weight: 600; color: var(--text); }

.cmd-hist-status {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.cmd-hist-status.cmd-hist-concluido { color: var(--ok); }
.cmd-hist-status.cmd-hist-falhou { color: var(--danger); }
.cmd-hist-status.cmd-hist-entregue,
.cmd-hist-status.cmd-hist-pendente { color: var(--accent); }

.cmd-hist-meta { color: var(--muted); font-size: 0.68rem; }

.cmd-hist-btn {
  align-self: flex-start;
  margin-top: 0.15rem;
  padding: 0.2rem 0.55rem;
  font-size: 0.68rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--accent);
  cursor: pointer;
}

.cmd-hist-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.device-diagnostico-panel {
  border-top: 1px solid var(--border);
  padding-top: 0.5rem;
  margin-top: 0.25rem;
  max-height: 220px;
  overflow-y: auto;
}

.diag-count {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--warn);
  margin-left: 0.35rem;
}

.diagnostico-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.15rem 0.5rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.78rem;
  line-height: 1.35;
}

.diagnostico-item:last-child { border-bottom: none; }

.diagnostico-nivel {
  font-weight: 700;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  align-self: start;
}

.diagnostico-nivel.diag-info { color: var(--muted); background: rgba(255,255,255,0.04); }
.diagnostico-nivel.diag-aviso { color: var(--warn); background: rgba(255, 180, 0, 0.12); }
.diagnostico-nivel.diag-erro { color: var(--danger); background: rgba(255, 80, 80, 0.12); }

.diagnostico-corpo { min-width: 0; }

.diagnostico-meta {
  color: var(--muted);
  font-size: 0.72rem;
}

.diagnostico-msg { color: var(--text); }

.diagnostico-detalhe {
  color: var(--muted);
  font-size: 0.72rem;
  margin-top: 0.15rem;
}

.log-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 0;
  padding: 0;
}

.log-window,
.ps-remote-window {
  border: none;
  border-radius: 0;
  background: #012456;
  overflow: hidden;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.ps-titlebar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.28rem 0.45rem;
  background: #2d2d30;
  border-bottom: 1px solid #1e1e1e;
  font-size: 0.72rem;
  color: #cccccc;
  flex-shrink: 0;
}

.ps-titlebar-icon {
  width: 14px;
  height: 14px;
  border-radius: 2px;
  background: linear-gradient(135deg, #0078d4 0%, #00bcf2 100%);
  flex-shrink: 0;
}

.ps-titlebar-text {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: "Segoe UI", system-ui, sans-serif;
}

.ps-titlebar-cmd {
  color: #9cdcfe;
  font-weight: 600;
}

.ps-titlebar-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  margin-left: auto;
}

.btn-ps-fullscreen {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  padding: 0;
  border: 1px solid #3f3f46;
  border-radius: 3px;
  background: transparent;
  color: #cccccc;
  font-size: 0.8rem;
  line-height: 1;
  cursor: pointer;
}

.btn-ps-fullscreen:hover,
.btn-log-close:hover {
  color: #ffffff;
  border-color: #0078d4;
  background: rgba(0, 120, 212, 0.2);
}

.ps-screen {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #012456;
  font-family: "Cascadia Mono", "Cascadia Code", Consolas, ui-monospace, monospace;
  font-size: 0.78rem;
  line-height: 1.4;
}

.ps-banner {
  padding: 0.55rem 0.65rem 0.35rem;
  color: #cccccc;
  white-space: pre-wrap;
  flex-shrink: 0;
}

.ps-agent-output {
  flex: 1;
  min-height: 0;
  margin: 0;
  padding: 0.15rem 0.65rem;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
  background: transparent;
  border: none;
  color: #cccccc;
}

.ps-shell-bar {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.55rem 0.5rem;
  flex-shrink: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.15);
}

.ps-script-select {
  font-size: 0.68rem;
  max-width: 38%;
  padding: 0.2rem 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 3px;
  background: #0a1628;
  color: #cccccc;
  font-family: "Segoe UI", system-ui, sans-serif;
}

.ps-shell-input {
  flex: 1;
  min-width: 0;
  font-family: "Cascadia Mono", Consolas, ui-monospace, monospace;
  font-size: 0.78rem;
  padding: 0.25rem 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 3px;
  background: #001a33;
  color: #ffffff;
  outline: none;
}

.ps-shell-input:focus {
  border-color: #0078d4;
  box-shadow: 0 0 0 1px #0078d4;
}

.ps-prompt-line {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0.2rem 0.65rem 0.45rem;
  flex-shrink: 0;
  color: #cccccc;
}

.ps-prompt {
  color: #cccccc;
}

.ps-cursor {
  display: inline-block;
  width: 0.55rem;
  height: 0.95em;
  margin-left: 1px;
  background: #cccccc;
  animation: ps-cursor-blink 1s step-end infinite;
}

@keyframes ps-cursor-blink {
  50% { opacity: 0; }
}

.ps-meta-panel {
  flex-shrink: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #0a1628;
}

.ps-meta-panel > summary {
  padding: 0.28rem 0.55rem;
  font-size: 0.68rem;
  color: #8b949e;
  cursor: pointer;
  user-select: none;
  list-style: none;
}

.ps-meta-panel > summary::-webkit-details-marker { display: none; }

.ps-meta-output {
  margin: 0;
  padding: 0.35rem 0.55rem 0.45rem;
  max-height: 72px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 0.68rem;
  line-height: 1.35;
  color: #8b949e;
  background: transparent;
  border: none;
}

.ps-remote-window.ps-fullscreen {
  position: fixed;
  inset: 0.5rem;
  z-index: 900;
  border-radius: 6px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.55);
  border: 1px solid #3f3f46;
}

body.ps-console-fullscreen::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 899;
}

.ps-agent-output .log-line.fail { color: #ff6b6b; }
.ps-agent-output .log-line.warn { color: #ffff00; }
.ps-agent-output .log-line.ok { color: #6fcf97; }
.ps-agent-output .log-line.section { color: #9cdcfe; }
.ps-agent-output .log-line.agent-line { color: #cccccc; }
.ps-agent-output .log-line.ps-cmd { color: #ffffff; }
.ps-agent-output .log-line.ps-cmd .ps-cmd-prompt { color: #cccccc; }

.ps-meta-output .log-line.dim { color: #6e7681; }
.ps-meta-output .log-line.warn { color: #d29922; }
.ps-meta-output .log-line.fail { color: #f85149; }
.ps-meta-output .log-line.portal { color: #8b949e; font-style: italic; }

.ps-titlebar .status.running { color: #9cdcfe; }
.ps-titlebar .status.ok { color: #6fcf97; }
.ps-titlebar .status.fail { color: #ff6b6b; }
.ps-titlebar .status.timeout { color: #ffff00; }

.log-window-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.55rem;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  font-size: 0.75rem;
}

.log-window-head-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.btn-log-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
}

.btn-log-close:hover {
  color: var(--text);
  border-color: var(--accent-dim);
  background: rgba(88, 166, 255, 0.08);
}

.log-window-head .title {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.log-window-head .status {
  font-size: 0.68rem;
  color: var(--muted);
  white-space: nowrap;
}

.log-window-head .status.running { color: var(--accent); }
.log-window-head .status.ok { color: var(--ok); }
.log-window-head .status.fail { color: var(--danger); }

.log-window-body {
  margin: 0;
  padding: 0.5rem 0.6rem;
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 0.72rem;
  line-height: 1.45;
  max-height: 160px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.ps-remote-window .ps-agent-output.log-window-body {
  max-height: none;
  flex: 1;
  min-height: 0;
  padding: 0.15rem 0.65rem;
  font-size: 0.78rem;
  line-height: 1.4;
  background: transparent;
  border: none;
  color: #cccccc;
}

.col-sub-muted {
  color: var(--muted);
  max-width: none;
  flex-shrink: 0;
}

.log-window-head-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.log-window-sub {
  font-size: 0.65rem;
  color: var(--muted);
  font-weight: normal;
}

.log-line.dim { color: var(--muted); }
.log-line.portal { color: var(--muted); font-style: italic; }
.log-line.agent-line { color: #cbd3df; }
.log-line.section { color: #9ec5fe; }
.log-line.warn { color: var(--warn); }
.log-line.ok { color: var(--ok); }
.log-line.fail { color: var(--danger); }

.anydesk-cred-box {
  margin: 0;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border);
  background: rgba(56, 189, 148, 0.08);
}

.anydesk-cred-title {
  margin: 0 0 0.45rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ok);
}

.anydesk-cred-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 0.75rem;
}

.anydesk-cred-label {
  display: block;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 0.15rem;
}

.anydesk-cred-value {
  display: block;
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  word-break: break-all;
}

.anydesk-cred-perfil,
.anydesk-cred-hint {
  margin: 0.35rem 0 0;
  font-size: 0.68rem;
  color: var(--muted);
}

.btn-clear {
  font-size: 0.68rem;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.btn-clear:hover {
  color: var(--text);
  border-color: var(--accent-dim);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
}

.modal-overlay[hidden] { display: none; }

.modal {
  width: min(560px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.modal-head h3 {
  margin: 0;
  font-size: 1rem;
}

.modal-close {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.25rem;
}

.modal-close:hover { color: var(--text); }

.modal-desc {
  margin: 0 0 0.85rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.update-manual-block {
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.install-block { margin-bottom: 0.75rem; }

.install-label {
  margin: 0 0 0.3rem;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.install-row {
  display: flex;
  gap: 0.4rem;
  align-items: stretch;
}

.install-cmd {
  flex: 1;
  display: block;
  font-family: ui-monospace, monospace;
  font-size: 0.68rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.45rem 0.5rem;
  overflow-x: auto;
  white-space: nowrap;
}

.install-link {
  flex: 1;
  display: block;
  font-family: ui-monospace, monospace;
  font-size: 0.68rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.45rem 0.5rem;
  overflow-x: auto;
  white-space: nowrap;
  color: var(--accent, #3b82f6);
  text-decoration: none;
}

.install-link:hover { text-decoration: underline; }

.modal-hint.muted {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

.btn-copy {
  flex-shrink: 0;
  font-size: 0.72rem;
  padding: 0.35rem 0.55rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
}

.btn-copy:hover { border-color: var(--accent-dim); }

.modal-hint {
  margin: 0.5rem 0 0;
  font-size: 0.78rem;
  color: var(--accent);
}

.modal-hint.ok { color: var(--ok); }

.modal-hint.erro { color: var(--danger); }

.modal-dialog-body {
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text);
}

.modal-dialog-body strong { color: var(--text); font-weight: 600; }
.modal-dialog-body code {
  font-family: ui-monospace, monospace;
  font-size: 0.82em;
  background: var(--bg);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.modal-dialog-detalhe {
  margin: 0 0 0.85rem;
  padding: 0.55rem 0.65rem;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.modal-dialog-detalhe[hidden],
.modal-dialog-copiar[hidden] { display: none; }

.modal-dialog-copiar { margin-bottom: 0.85rem; }

.modal-dialog-textarea {
  width: 100%;
  box-sizing: border-box;
  font-family: ui-monospace, monospace;
  font-size: 0.68rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.45rem 0.5rem;
  color: var(--text);
  resize: vertical;
  margin-bottom: 0.45rem;
}

.modal-dialog-copy-btn { width: 100%; }

.modal-dialog-actions {
  margin-top: 0.25rem;
}

.modal-dialog.modal-dialog-perigo .btn-primary {
  border-color: rgba(210, 153, 34, 0.55);
  background: rgba(210, 153, 34, 0.15);
  color: var(--warn);
}

.modal-dialog.modal-dialog-perigo .btn-primary:hover {
  background: rgba(210, 153, 34, 0.28);
}

.modal-dialog.modal-dialog-info .btn-primary {
  border-color: var(--accent-dim);
  background: rgba(88, 166, 255, 0.15);
  color: var(--accent);
}

.modal-form { margin-top: 0.5rem; }

.form-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.form-input {
  width: 100%;
  padding: 0.5rem 0.6rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent-dim);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.btn-primary,
.btn-secondary {
  font-size: 0.82rem;
  padding: 0.45rem 0.85rem;
  border-radius: 6px;
  cursor: pointer;
}

.btn-primary {
  border: 1px solid var(--accent-dim);
  background: rgba(88, 166, 255, 0.18);
  color: var(--accent);
}

.btn-primary:hover { background: rgba(88, 166, 255, 0.28); }

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted);
}

.btn-secondary:hover { color: var(--text); border-color: var(--accent-dim); }

@media (max-width: 1100px) {
  .board {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    height: auto;
    min-height: calc(100vh - 57px);
  }

  .col {
    min-height: 280px;
    border-bottom: 1px solid var(--border);
  }
}
