* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  height: 100vh;
  height: 100dvh;
  width: 100%;
  margin: 0;
  padding: 0;
  background: var(--bg, #0e1216);
  background-color: #0e1216;
  color: var(--text);
  font-family: var(--mono);
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
}

#app {
  display: flex;
  height: 100%;
  height: 100vh;
  height: 100dvh;
  width: 100vw;
  position: relative;
  overflow: hidden;
  background-color: #0e1216;
}

/* Scrollbars Táticas */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: var(--radius-sm);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--line-highlight);
}

/* Botões */
button {
  font-family: var(--mono);
  cursor: pointer;
  outline: none;
}

.btn {
  background: var(--panel-alt);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.03em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all var(--transition-fast);
  user-select: none;
}

.btn:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--panel-elevated);
  box-shadow: 0 0 8px var(--accent-glow);
}

.btn:active:not(:disabled) {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  border-color: var(--line-soft);
}

.btn-full {
  width: 100%;
}

.btn-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: #1a1005;
  font-weight: 600;
}

.btn-accent:hover:not(:disabled) {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #000;
}

.btn-accent.active {
  background: #141a1f;
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: inset 0 0 10px var(--accent-glow);
}

.btn-teal {
  background: var(--teal);
  border-color: var(--teal);
  color: #081d19;
  font-weight: 600;
}

.btn-teal:hover:not(:disabled) {
  background: #4ae0c7;
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text-muted);
}

.btn-ghost:hover:not(:disabled) {
  color: var(--text);
  border-color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
}

.btn-danger {
  color: var(--danger);
  border-color: var(--danger);
  background: transparent;
}

.btn-danger:hover:not(:disabled) {
  background: var(--danger-bg);
  box-shadow: 0 0 10px var(--danger-glow);
}

.btn-sm {
  padding: 4px 8px;
  font-size: 10.5px;
  border-radius: var(--radius-sm);
}

.btn-icon {
  background: none;
  border: none;
  color: var(--text-dim);
  padding: 4px 6px;
  font-size: 13px;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background var(--transition-fast);
}

.btn-icon:hover {
  color: var(--accent);
  background: var(--panel-elevated);
}

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

.row > * {
  flex: 1;
}

/* Campos de Formulário */
input[type="text"],
input[type="number"],
select {
  width: 100%;
  background: var(--bg-deep);
  border: 1px solid var(--line);
  color: var(--text);
  font-family: var(--mono);
  font-size: 12px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}

label.field-label {
  display: block;
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.06em;
  margin: 10px 0 4px;
  text-transform: uppercase;
  font-weight: 500;
}

.helptext {
  font-size: 10.5px;
  color: var(--text-dim);
  line-height: 1.5;
  margin-top: 6px;
}

/* Status Indicator Dot */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  padding: 3px 8px;
  border-radius: 20px;
  background: var(--panel-alt);
  border: 1px solid var(--line);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 6px var(--success);
  animation: pulse-ring 2s infinite ease-out;
}

.pulse-dot.live {
  background: var(--danger);
  box-shadow: 0 0 8px var(--danger);
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}
