/* ===================== BASE ===================== */
:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --accent: #0b6cff;
  --muted: #6b7280;
  --radius: 10px;
  --gap: 14px;
  font-family: Roboto, sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  padding: 20px;
  background-color: var(--bg);
  color: #111827;
  -webkit-font-smoothing: antialiased;
}
.container {
  max-width: 980px;
  margin: 0 auto;
}
header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 18px;
}
header .title-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
}
header h1 {
  margin: 0;
  font-size: 20px;
}
img {
  width: 180px;
  height: auto;
}
form {
  background-color: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  display: grid;
  gap: var(--gap);
}
span {
  font-size: 12px;
  color: var(--muted);
}

/* ===================== GRIDS ===================== */
.grid {
  display: grid;
  gap: 12px;
}
.grid.row-4 {
  grid-template-columns: 120px 1fr 80px 1fr;
  gap: 10px;
}
.grid.row-3 {
  grid-template-columns: 2fr 1fr 1fr;
  gap: 10px;
}
.row-2 {
  grid-template-columns: repeat(2, 1fr);
}
.row-3 {
  grid-template-columns: repeat(3, 1fr);
}

.pix-grid {
  grid-template-columns: 150px 1fr 1fr;
}

/* ===================== FORM ELEMENTS ===================== */
label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
textarea,
select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #e6e9ef;
  font-size: 14px;
  background-color: transparent;
  outline: none;
}
textarea {
  min-height: 84px;
  resize: vertical;
}
.small {
  font-size: 12px;
  color: var(--muted);
}
.inline {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.btn {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 10px;
  border: 0;
  background-color: var(--muted);
  color: white;
  cursor: pointer;
  font-weight: 600;
}
.secondary {
  background-color: #eef2ff;
  color: var(--accent);
}
.actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 6px;
}
.checkboxes,
.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.chips input {
  display: none;
}
.chip {
  padding: 6px 10px;
  border-radius: 999px;
  background-color: #f3f4f6;
  font-size: 13px;
}
.chip--on {
  background-color: #dbeafe;
  color: var(--accent);
  border: 1px solid rgba(11, 108, 255, 0.12);
}
.note {
  font-size: 13px;
  color: var(--muted);
  margin-top: 8px;
}
footer {
  font-size: 13px;
  color: var(--muted);
  margin-top: 10px;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 700px) {
  body {
    padding: 10px;
  }

  header {
    padding: 10px;
  }

  .grid {
    grid-template-columns: 1fr !important;
  }
}

/* ===================== CAMPO DESABILITADO ===================== */
.disabled-input,
input:disabled {
  background-color: #f3f4f6 !important;
  color: #9ca3af !important;
  border-color: #d1d5db !important;
  cursor: not-allowed !important;
  opacity: 0.6;
  transition: all 0.3s ease;
}

.disabled-input::placeholder,
input:disabled::placeholder {
  color: #9ca3af !important;
  font-style: italic;
}

/* Efeito visual suave na transição */
input[name="cnpj"],
input[name="chave"] {
  transition: all 0.3s ease;
}

/* ===================== CAMPO COM ERRO ===================== */
.error-input {
  border-color: #ef4444 !important;
  background-color: #fef2f2 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.error-input:focus {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2) !important;
}

/* ===================== RESPONSIVIDADE PIX GRID ===================== */
@media (max-width: 768px) {
  .pix-grid {
    grid-template-columns: 1fr !important;
    grid-template-areas:
      "pix-type"
      "pix-key"
      "area-atuacao";
  }
}
