/* ==========================================================================
   ESTILO GERAL
   ========================================================================== */
:root {
  --bg: #f4f7f6;
  --surface: #ffffff;
  --text: #333333;
  --muted: #666666;
  --border: #dddddd;
  --primary-start: #1e90ff;
  --primary-end: #d24dff;
  --button-text: #ffffff;
  --shadow: rgba(30, 144, 255, 0.3);
  --card-shadow: rgba(0, 0, 0, 0.05);
  --footer-text: #bdc3c7;
  --progress-bg: #ecf0f1;
}

body.dark-theme {
  --bg: #121217;
  --surface: #1f2130;
  --text: #e8ecf8;
  --muted: #a0a6b0;
  --border: #333645;
  --footer-text: #7c8aad;
  --progress-bg: #2b2f3d;
  --shadow: rgba(0, 0, 0, 0.35);
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: "Roboto", sans-serif;
  padding-bottom: 90px;
}

main {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 15px;
  box-sizing: border-box;
}

h3 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 10px;
  text-align: left;
  color: var(--text);
}

/* ==========================================================================
   INPUTS E CARTÕES
   ========================================================================== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

@media (min-width: 900px) {
  .cards {
    grid-template-columns: repeat(3, minmax(280px, 1fr));
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 250px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s, opacity 0.2s, border-color 0.2s;
}

.card:hover {
  transform: translateY(-2px);
}

.card--empty {
  opacity: 0.55;
  min-height: 170px;
}

.card--empty .card-footer {
  display: none;
}

.card-header h4 {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.card-field {
  position: relative;
}

.input-prefix {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.currency-input {
  width: 100%;
  padding: 18px 16px 18px 56px;
  border: 1px solid var(--border);
  border-radius: 18px;
  font-size: 1.1rem;
  text-align: center;
  background-color: var(--bg);
  color: var(--text);
  transition: border-color 0.3s, background-color 0.3s;
}

.currency-input:focus {
  outline: none;
  border-color: #7c8fff;
}

.card-footer {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.card-footer .percent {
  font-size: 2.1rem;
  font-weight: 900;
  color: var(--text);
}

.card-footer .legend {
  font-size: 0.85rem;
  color: var(--muted);
}

.card-footer .progress-bar {
  width: 90%;
  max-width: 420px;
  height: 10px;
  border-radius: 999px;
  background: var(--progress-bg);
  overflow: hidden;
  margin: 0 auto;
}

.card-footer .progress-fill {
  width: 0;
  height: 100%;
  border-radius: 999px;
  transition: width 0.8s ease;
  background: transparent;
}

#theme-toggle {
  padding: 10px 16px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

#theme-toggle:hover {
  background-color: rgba(255, 255, 255, 0.12);
}

.header-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.header-actions h3 {
  margin: 0;
  font-size: 1.5rem;
}


/* ==========================================================================
   REFERÊNCIA E FOOTER
   ========================================================================== */
.salariominimo {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 15px;
  margin-top: 30px;
}

.salariominimo h6 {
  margin-bottom: 12px;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}

.salario {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 0.85rem;
}

footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  background-color: var(--surface);
  color: #ffffff;
  padding: 14px 20px;
  font-size: 0.85rem;
  box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.18);
  z-index: 100;
}

footer a {
  color: rgba(255, 255, 255, 0.95);
  text-decoration: underline;
}

footer a:hover {
  color: #fff;
}
