:root {
  --green: #28a745;
  --green-hover: #218838;
  --danger: rgba(220, 53, 69, 0.85);
  --danger-hover: rgba(220, 53, 69, 1);
  --glass: rgba(255, 255, 255, 0.25);
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", "Trebuchet MS", Arial, sans-serif;
  background: url('background.png') no-repeat center center / cover;
  background-attachment: fixed;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

/* ===============
   Bloco usuário no topo
   =============== */

.top-user-bar {
  position: fixed;
  top: 18px;
  right: 24px;
  z-index: 999;
}

.user-panel {
  text-align: center;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  padding: 10px 12px;
  min-width: 92px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.btn-sair {
  padding: 7px 14px;
  border: none;
  border-radius: 8px;
  background: var(--danger);
  color: white;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
  display: inline-block;
  width: 100%;
}

.btn-sair:hover {
  background: var(--danger-hover);
  transform: translateY(-1px);
}

.user-info {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.3;
  color: white;
  font-weight: 700;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
  letter-spacing: 0.2px;
}

/* ===============
   Container principal
   =============== */

.container {
  position: relative;
  background: var(--glass);
  backdrop-filter: blur(8px);
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
  width: 90%;
  max-width: 520px;
}

/* ===============
   Login
   =============== */

.login-box {
  text-align: center;
}

.login-box input {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: none;
  margin-bottom: 15px;
  outline: none;
}

.login-box button {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: none;
  font-weight: bold;
  cursor: pointer;
  background: var(--green);
  color: white;
  transition: 0.2s;
}

.login-box button:hover {
  background: var(--green-hover);
}

.error-msg {
  color: #ff4d4d;
}

/* ===============
   Header
   =============== */

.header {
  text-align: center;
  margin-bottom: 25px;
}

.header h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.header p {
  margin: 6px 0 0;
  font-size: 13px;
  font-weight: 500;
}

/* ===============
   Menu / Sections
   =============== */

.menu {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.menu button {
  padding: 12px;
  background: var(--green);
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s;
}

.menu button:hover {
  background: var(--green-hover);
}

.section {
  display: none;
}

.voltar {
  display: none;
  cursor: pointer;
  margin-bottom: 10px;
  font-weight: bold;
}

.section-hint {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 500;
  opacity: 0.92;
  text-align: center;
}

/* ===============
   Calculadora
   =============== */

label {
  display: block;
  margin-top: 15px;
  font-weight: bold;
}

input[type="number"] {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  border-radius: 5px;
  border: 1px solid #ccc;
}

button.calcular {
  width: 100%;
  padding: 12px;
  background: var(--green);
  color: white;
  border: none;
  border-radius: 6px;
  margin-top: 20px;
  font-size: 16px;
  cursor: pointer;
  transition: 0.2s;
}

button.calcular:hover {
  background: var(--green-hover);
}

.resultado {
  margin-top: 20px;
  font-weight: bold;
  text-align: center;
  font-size: 16px;
  line-height: 1.35;
}

/* ===============
   FAQ / Ofertas (acordeão)
   =============== */

.faq-item {
  margin-bottom: 14px;
}

.faq-question {
  width: 100%;
  padding: 12px 14px;
  padding-right: 40px;
  background: var(--green);
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.4;
  cursor: pointer;
  text-align: left;
  transition: 0.2s;
  display: block;
  position: relative;
}

.faq-question:hover {
  background: var(--green-hover);
}

.faq-question::after {
  content: "+";
  float: right;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

.faq-question[aria-expanded="true"] {
  background: #1f8a36;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.18);
}

.faq-question[aria-expanded="true"]::after {
  content: "−";
  float: right;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

.faq-answer {
  margin-top: 8px;
  padding: 0;
  background: transparent;
  border-radius: 0;
  color: #1f1f1f;
  font-size: 14px;
  line-height: 1.7;
}

/* ===============
   Footer
   =============== */

.footer {
  text-align: center;
  font-size: 12px;
  margin-top: 30px;
}

/* ===============
   Busca do FAQ
   =============== */

.faq-busca {
  width: 100%;
  padding: 10px 12px;
  margin: 0 0 18px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 14px;
  outline: none;
}

.faq-busca:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.15);
}

/* ===============
   Padrão visual dos FAQs
   =============== */

.faq-answer h4 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  color: #16324f;
}

.faq-answer p {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.7;
}

.faq-answer ul,
.faq-answer ol {
  margin: 8px 0 12px 20px;
  padding-left: 18px;
}

.faq-answer li {
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.7;
}

.faq-answer strong {
  font-weight: 700;
}

.faq-bloco {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 14px;
  backdrop-filter: blur(4px);
}

.faq-destaque {
  background: rgba(0, 0, 0, 0.08);
  border-left: 4px solid #4a90e2;
  padding: 10px 12px;
  border-radius: 6px;
  margin: 10px 0 12px;
}

.faq-alerta {
  background: rgba(255, 193, 7, 0.16);
  border-left: 4px solid #f0ad4e;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.65;
  margin-top: 10px;
}

.faq-answer blockquote {
  margin: 10px 0 12px;
  padding: 12px 14px;
  border-left: 4px solid #7c5cff;
  background: rgba(124, 92, 255, 0.08);
  border-radius: 6px;
  font-size: 15px;
  font-weight: 500;
  font-style: italic;
  line-height: 1.75;
  color: #2d2250;
}

/* ===============
   Ofertas
   =============== */

.oferta-box {
  margin-top: 8px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  backdrop-filter: blur(4px);
}

.oferta-box label {
  display: block;
  margin-top: 14px;
  margin-bottom: 6px;
  font-weight: 700;
}

.oferta-box select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid #ccc;
  background: #fff;
  font-size: 14px;
}

.check-debito {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  font-weight: 600;
}

.check-debito input {
  margin: 0;
}

.resultado-oferta-wrapper {
  position: relative;
  margin-top: 18px;
}

.resultado-oferta {
  padding: 14px 16px;
  padding-top: 46px;
  background: rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  color: #1f1f1f;
  line-height: 1.65;
  font-size: 14px;
}

.resultado-oferta strong {
  font-weight: 700;
}

.resultado-oferta .valor-final {
  font-size: 18px;
  color: #16324f;
}

.resultado-oferta .valor-debito {
  font-size: 16px;
  color: #1c5d2f;
}

.copiar-resultado-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 8px;
  background: transparent;
  color: rgba(35, 35, 35, 0.78);
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: none;
}

.copiar-resultado-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: rgba(20, 20, 20, 0.92);
  border-color: rgba(0, 0, 0, 0.10);
  transform: translateY(-1px);
}

.copiar-resultado-btn:active {
  transform: scale(0.97);
}

.copiar-resultado-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.14);
}

.copiar-resultado-btn:hover {
  background: rgba(255, 255, 255, 0.78);
  color: rgba(20, 20, 20, 0.92);
  border-color: rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.10);
}

.copiar-resultado-btn:active {
  transform: scale(0.97);
}

.copiar-resultado-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.18);
}

/* ===============
   Botões duplos
   =============== */

.acoes-duplas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 20px;
}

.acoes-duplas .calcular,
.acoes-duplas .limpar {
  width: 100%;
  padding: 12px;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s;
  margin-top: 0;
}

.acoes-duplas .calcular {
  background: var(--green);
}

.acoes-duplas .calcular:hover {
  background: var(--green-hover);
}

.acoes-duplas .limpar {
  background: rgba(40, 167, 69, 0.82);
}

.acoes-duplas .limpar:hover {
  background: rgba(33, 136, 56, 0.92);
}

/* ===============
   Responsividade
   =============== */

@media (max-width: 768px) {
  .top-user-bar {
    top: 12px;
    right: 14px;
  }

  .container {
    width: 94%;
    padding: 22px;
  }

  .header h1 {
    font-size: 21px;
  }

  .menu {
    grid-template-columns: 1fr;
  }

  .faq-question {
    font-size: 14px;
  }

  .faq-answer h4 {
    font-size: 16px;
  }

  .resultado-oferta .valor-final {
    font-size: 16px;
  }

  .resultado-oferta .valor-debito {
    font-size: 15px;
  }

  .acoes-duplas {
    grid-template-columns: 1fr 1fr;
  }
}