/* ── Variables ──────────────────────────────────────────── */
:root {
  --bg: #0f172a;
  --surface: #1e293b;
  --surface-alt: #263045;
  --border: #334155;
  --accent: #38bdf8;
  --accent-dark: #0284c7;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --error: #fb7185;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

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

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── Header ─────────────────────────────────────────────── */
.header {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 28px 32px;
  background-color: var(--surface);
  border-bottom: 1px solid var(--border);
}

.header-icon {
  font-size: 36px;
  color: var(--accent);
  flex-shrink: 0;
}

h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── Main ───────────────────────────────────────────────── */
.container {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 40px 24px;
  width: 100%;
  max-width: 760px;
  flex: 1;
}

/* ── Card ───────────────────────────────────────────────── */
.card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}

/* ── Form ───────────────────────────────────────────────── */
form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 10px;
  display: block;
}

.input-wrapper {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.input-wrapper input {
  flex: 1;
}

#paste-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background-color: transparent;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
  flex-shrink: 0;
}

#paste-btn:hover {
  background-color: var(--surface-alt);
  color: var(--text);
  border-color: var(--text-muted);
}

#paste-btn.pasted {
  color: #4ade80;
  border-color: #4ade80;
}

#paste-btn .material-icons-round {
  font-size: 20px;
}

input {
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 1.5px;
  padding: 14px 16px;
  width: 100%;
  background-color: var(--bg);
  color: var(--text);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  text-align: center;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

input::placeholder {
  color: var(--text-muted);
  letter-spacing: 0;
  font-weight: 400;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.input-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  min-height: 22px;
  margin-top: 6px;
  margin-bottom: 20px;
}

.erro {
  font-size: 12px;
  color: var(--error);
}

.char-count {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  margin-left: 8px;
  flex-shrink: 0;
}

.char-count.complete {
  color: #4ade80;
}

/* ── Form actions ───────────────────────────────────────── */
.form-actions {
  display: flex;
  gap: 10px;
}

#btn-submit {
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  background-color: var(--accent);
  color: #0f172a;
  flex: 1;
  padding: 12px 20px;
  border: none;
  border-radius: var(--radius-sm);
  transition: background-color 0.2s, box-shadow 0.2s, transform 0.1s;
}

#btn-submit:hover {
  background-color: #7dd3fc;
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.35);
}

#btn-submit:active {
  transform: scale(0.98);
}

#btn-submit .material-icons-round {
  font-size: 20px;
}

#delete-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background-color: transparent;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

#delete-icon:hover {
  background-color: rgba(251, 113, 133, 0.1);
  color: var(--error);
  border-color: var(--error);
}

#delete-icon .material-icons-round {
  font-size: 20px;
}

.input-erro {
  border-color: var(--error) !important;
  box-shadow: 0 0 0 3px rgba(251, 113, 133, 0.15) !important;
}

/* ── Output ─────────────────────────────────────────────── */
.hidden {
  display: none;
}

#output-div {
  margin-top: 24px;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Table ──────────────────────────────────────────────── */
.table {
  border-collapse: collapse;
  width: 100%;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.table td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  vertical-align: middle;
}

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

/* Campo (cUF, AAMM…) */
.table td:first-child {
  font-family: 'Courier New', monospace;
  font-weight: 700;
  font-size: 13px;
  color: var(--accent);
  background-color: var(--bg);
  white-space: nowrap;
  width: 1%;
  border-right: 1px solid var(--border);
}

/* Valor */
.table td:nth-child(2) {
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.5px;
  color: var(--text);
  background-color: var(--surface-alt);
  white-space: nowrap;
  width: 1%;
  border-right: 1px solid var(--border);
}

/* Descrição */
.table td:nth-child(3) {
  color: var(--text);
}

.hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── Footer ─────────────────────────────────────────────── */
.footer {
  width: 100%;
  padding: 16px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

/* ── Tabs ───────────────────────────────────────────────── */
.tabs {
  width: 100%;
  display: flex;
  background-color: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  gap: 4px;
}

.tab {
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 14px 16px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  margin-bottom: -1px;
  white-space: nowrap;
  flex: 1;
}

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

.tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.tab .material-icons-round {
  font-size: 18px;
}

@media (max-width: 480px) {
  .tabs {
    padding: 0;
  }

  .tab {
    font-size: 13px;
    padding: 12px 8px;
    gap: 6px;
  }

  .tab .material-icons-round {
    font-size: 16px;
  }
}

.tab-content {
  animation: fadeIn 0.2s ease;
}

/* ── Faker toolbar ──────────────────────────────────────── */
.faker-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
}

#btn-gerar-todos {
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  background-color: var(--surface);
  color: var(--text);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  transition: background-color 0.2s, border-color 0.2s;
}

#btn-gerar-todos:hover {
  background-color: var(--surface-alt);
  border-color: var(--text-muted);
}

#btn-gerar-todos .material-icons-round {
  font-size: 18px;
  color: var(--accent);
}

/* ── Faker grid ─────────────────────────────────────────── */
.faker-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  align-items: start;
  gap: 14px;
}

/* ── Faker card ─────────────────────────────────────────── */
.faker-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow);
  transition: border-color 0.2s;
}

.faker-card:hover {
  border-color: var(--text-muted);
}

.faker-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.faker-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.faker-card-header h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.faker-icon {
  font-size: 18px !important;
  color: var(--accent);
}

.faker-result {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  min-height: 42px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
}

.faker-result--mono {
  font-family: 'Courier New', monospace;
  font-size: 13px;
  letter-spacing: 0.3px;
}

.faker-disclaimer {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
  margin-top: -4px;
}

/* ── Senha card ──────────────────────────────────────────── */
.faker-card--wide {
  grid-column: span 2;
}

@media (max-width: 480px) {
  .faker-card--wide {
    grid-column: span 1;
  }
}

.senha-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.senha-label strong {
  color: var(--accent);
}

#senha-length {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  outline: none;
  cursor: pointer;
}

#senha-length::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  transition: background 0.2s;
}

#senha-length::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
}

.senha-opcoes {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.senha-check {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  background-color: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 6px;
  padding: 4px 10px;
  transition: border-color 0.15s, color 0.15s;
  user-select: none;
  margin-bottom: 0;
  text-transform: none;
  letter-spacing: 0;
}

.senha-check:has(input:checked) {
  border-color: var(--accent);
  color: var(--accent);
}

.senha-check input {
  display: none;
  width: auto;
  padding: 0;
  background: none;
  border: none;
  border-radius: 0;
  letter-spacing: 0;
}

.faker-card-actions {
  display: flex;
  gap: 8px;
}

.btn-generate {
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  flex: 1;
  justify-content: center;
  background-color: var(--accent);
  color: #0f172a;
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  transition: background-color 0.2s;
}

.btn-generate:hover {
  background-color: #7dd3fc;
}

.btn-generate .material-icons-round {
  font-size: 16px;
}

.btn-copy-faker {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background-color: transparent;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
  flex-shrink: 0;
}

.btn-copy-faker:hover {
  background-color: var(--surface-alt);
  color: var(--text);
  border-color: var(--text-muted);
}

.btn-copy-faker.copied {
  color: #4ade80;
  border-color: #4ade80;
}

.btn-copy-faker .material-icons-round {
  font-size: 18px;
}

/* ── Toggle switch ──────────────────────────────────────── */
.toggle-label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  flex-shrink: 0;
  margin-bottom: 0;
  text-transform: none;
  letter-spacing: 0;
}

.toggle-label input[type="checkbox"] {
  display: none;
}

.toggle-track {
  width: 32px;
  height: 18px;
  background-color: var(--border);
  border-radius: 999px;
  position: relative;
  transition: background-color 0.2s;
  flex-shrink: 0;
}

.toggle-track::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  background-color: var(--text-muted);
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: transform 0.2s, background-color 0.2s;
}

.toggle-label input:checked+.toggle-track {
  background-color: rgba(56, 189, 248, 0.25);
}

.toggle-label input:checked+.toggle-track::after {
  transform: translateX(14px);
  background-color: var(--accent);
}

.toggle-text {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
