/* ── Override: cancela o padding de section do design-system ───────────────── */

main section { padding: 0; }

/* ── Hero ──────────────────────────────────────────────────────────────────── */

.hero h1 { font-weight: 700; }

/* ── Hero: garante que .container do design-system prevaleça sobre Tailwind ── */

.hero .container {
  max-width: 1152px;
  margin-left: auto;
  margin-right: auto;
}

/* Botões no hero são inline (auto-width), não full-width ────────────────────── */

.hero .btn-secondary {
  width: auto;
  display: inline-flex;
}

/* ── Botões — overrides sobre components.css ───────────────────────────────── */

.btn-primary {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-void);
  background: var(--color-terminal);
  border: none;
  border-radius: 8px;
  padding: 0 1.25rem;
  cursor: pointer;
  transition: opacity var(--transition-fast), transform 0.1s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.5rem;
  width: 100%;
}
.btn-primary:hover:not(:disabled) { opacity: 0.88; }
.btn-primary:active:not(:disabled) { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.35; cursor: not-allowed; }

.btn-secondary {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-scan-blue);
  background: transparent;
  border: 0.5px solid rgba(74, 158, 255, 0.4);
  border-radius: 8px;
  padding: 0 1.25rem;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.5rem;
  width: 100%;
}
.btn-secondary:hover:not(:disabled) {
  background: rgba(74, 158, 255, 0.08);
  border-color: rgba(74, 158, 255, 0.7);
}
.btn-secondary:disabled { opacity: 0.35; cursor: not-allowed; }

.btn-ghost {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  background: transparent;
  border: none;
  border-radius: 6px;
  padding: 0.375rem 0.75rem;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}
.btn-ghost:hover {
  background: rgba(74, 158, 255, 0.08);
  color: var(--color-text-primary);
}

.manual-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 0.5px solid rgba(74, 158, 255, 0.3);
  background: transparent;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.manual-btn:hover {
  background: rgba(74, 158, 255, 0.08);
  border-color: rgba(74, 158, 255, 0.6);
  color: var(--color-scan-blue);
}

/* ── Campos de formulário ──────────────────────────────────────────────────── */

.field-label {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  display: block;
  margin-bottom: 0.375rem;
}

.input-field {
  background: rgba(10, 14, 26, 0.6);
  border: 0.5px solid rgba(74, 158, 255, 0.2);
  border-radius: 8px;
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-size: 0.875rem;
  padding: 0 0.75rem;
  height: 2.5rem;
  width: 100%;
  outline: none;
  transition: border-color var(--transition-fast);
}
.input-field:focus { border-color: rgba(74, 158, 255, 0.6); }
.input-field::placeholder { color: var(--color-text-muted); }
textarea.input-field { height: auto; padding: 0.5rem 0.75rem; resize: none; }
select.input-field { cursor: pointer; }
select.input-field option { background: var(--color-deep-navy); color: var(--color-text-primary); }

.file-input {
  display: block;
  width: 100%;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}
.file-input::file-selector-button {
  background: rgba(74, 158, 255, 0.1);
  color: var(--color-scan-blue);
  border: none;
  border-right: 0.5px solid rgba(74, 158, 255, 0.2);
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-family: var(--font-body);
  font-weight: 500;
  cursor: pointer;
  margin-right: 0.75rem;
  transition: background var(--transition-fast);
}
.file-input::file-selector-button:hover { background: rgba(74, 158, 255, 0.2); }

input[type="color"] {
  height: 2.5rem;
  width: 100%;
  cursor: pointer;
  border-radius: 8px;
  border: 0.5px solid rgba(74, 158, 255, 0.2);
  background: var(--color-void);
  padding: 0.2rem;
}

input[type="range"] { accent-color: var(--color-terminal); width: 100%; }
input[type="checkbox"] { accent-color: var(--color-terminal); width: 1rem; height: 1rem; cursor: pointer; }

/* ── Status messages ───────────────────────────────────────────────────────── */

.status-info {
  border: 0.5px solid rgba(74, 158, 255, 0.2);
  background: rgba(74, 158, 255, 0.04);
  color: var(--color-text-secondary);
}
.status-success {
  border: 0.5px solid rgba(57, 211, 83, 0.3);
  background: rgba(57, 211, 83, 0.06);
  color: var(--color-access-ok);
}
.status-error {
  border: 0.5px solid rgba(255, 77, 109, 0.3);
  background: rgba(255, 77, 109, 0.06);
  color: var(--color-vuln-red);
}

/* ── Tabs ──────────────────────────────────────────────────────────────────── */

.tab-active {
  background: rgba(0, 229, 200, 0.12);
  color: var(--color-terminal);
  border: 0.5px solid rgba(0, 229, 200, 0.35);
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.375rem 0.75rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.tab-inactive {
  background: transparent;
  color: var(--color-text-secondary);
  border: 0.5px solid rgba(74, 158, 255, 0.15);
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.375rem 0.75rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.tab-inactive:hover {
  background: rgba(74, 158, 255, 0.06);
  border-color: rgba(74, 158, 255, 0.3);
  color: var(--color-text-primary);
}

.lang-btn-active { background: rgba(0, 229, 200, 0.1); border-radius: 4px; }

/* ── Logo picker ───────────────────────────────────────────────────────────── */

.choose-logo-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 2.25rem;
  border-radius: 8px;
  border: 0.5px dashed rgba(74, 158, 255, 0.3);
  background: transparent;
  font-size: 0.75rem;
  font-weight: 500;
  font-family: var(--font-body);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.choose-logo-btn:hover {
  border-color: rgba(74, 158, 255, 0.6);
  background: rgba(74, 158, 255, 0.04);
  color: var(--color-scan-blue);
}

/* ── Preview ───────────────────────────────────────────────────────────────── */

.preview-badge {
  display: inline-flex;
  border-radius: 6px;
  border: 0.5px solid rgba(74, 158, 255, 0.2);
  background: rgba(74, 158, 255, 0.05);
  padding: 0.2rem 0.625rem;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-scan-blue);
  font-family: var(--font-body);
}

.preview-area {
  border: 1px dashed rgba(74, 158, 255, 0.18);
  border-radius: 12px;
  background: rgba(74, 158, 255, 0.02);
}

.preview-frame {
  width: 100%;
  max-width: 520px;
  border-radius: 12px;
  border: 0.5px solid rgba(74, 158, 255, 0.12);
  background: #ffffff;
  padding: 1rem;
  transition: transform 0.3s ease;
}

/* ── Divider ───────────────────────────────────────────────────────────────── */

.divider {
  border-top: 0.5px solid rgba(74, 158, 255, 0.08);
  padding-top: 1.25rem;
}

/* ── Modais ────────────────────────────────────────────────────────────────── */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  align-items: center;
  justify-content: center;
  background: rgba(10, 14, 26, 0.88);
  backdrop-filter: blur(4px);
  padding: 1rem;
}
.modal-panel {
  background: var(--color-deep-navy);
  border: 0.5px solid rgba(74, 158, 255, 0.2);
  border-radius: 12px;
  width: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  border-bottom: 0.5px solid rgba(74, 158, 255, 0.1);
  padding: 1.25rem 1.5rem;
}
.modal-footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-shrink: 0;
  border-top: 0.5px solid rgba(74, 158, 255, 0.1);
  padding: 0.75rem 1.5rem;
}

/* ── Histórico ─────────────────────────────────────────────────────────────── */

.history-item-wrapper {
  border-bottom: 0.5px solid rgba(74, 158, 255, 0.08);
  padding: 0.75rem 0;
}
.history-item-wrapper:last-child { border-bottom: none; }

.type-badge {
  flex-shrink: 0;
  border-radius: 4px;
  background: rgba(74, 158, 255, 0.08);
  padding: 0.125rem 0.4rem;
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--color-scan-blue);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-family: var(--font-body);
}

.history-btn {
  flex-shrink: 0;
  border-radius: 6px;
  border: 0.5px solid rgba(74, 158, 255, 0.2);
  background: transparent;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 500;
  font-family: var(--font-body);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.history-btn:hover {
  background: rgba(74, 158, 255, 0.08);
  border-color: rgba(74, 158, 255, 0.4);
  color: var(--color-text-primary);
}

.history-delete-btn {
  flex-shrink: 0;
  border-radius: 6px;
  border: 0.5px solid rgba(255, 77, 109, 0.25);
  background: transparent;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 500;
  font-family: var(--font-body);
  color: var(--color-vuln-red);
  cursor: pointer;
  transition: background var(--transition-fast);
}
.history-delete-btn:hover { background: rgba(255, 77, 109, 0.08); }

.history-preview-img {
  width: 8rem;
  border-radius: 8px;
  border: 0.5px solid rgba(74, 158, 255, 0.15);
  margin-top: 0.75rem;
}

/* ── Logos predefinidas ────────────────────────────────────────────────────── */

.preset-logo-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  border-radius: 8px;
  border: 0.5px solid rgba(74, 158, 255, 0.15);
  padding: 0.625rem 0.5rem;
  text-align: center;
  cursor: pointer;
  background: transparent;
  transition: all var(--transition-fast);
}
.preset-logo-btn:hover {
  border-color: rgba(74, 158, 255, 0.4);
  background: rgba(74, 158, 255, 0.06);
}

.preset-logo-label {
  font-size: 0.7rem;
  color: var(--color-text-secondary);
  font-family: var(--font-body);
  line-height: 1.2;
}

/* ── Manual ────────────────────────────────────────────────────────────────── */

.manual-section {
  padding: 0.875rem 0;
  border-bottom: 0.5px solid rgba(74, 158, 255, 0.08);
}
.manual-section:last-child { border-bottom: none; }

/* ── Scrollbar ─────────────────────────────────────────────────────────────── */

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--color-void); }
::-webkit-scrollbar-thumb { background: rgba(74, 158, 255, 0.2); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: rgba(74, 158, 255, 0.4); }
