:root {
  --primary: #1769e0;

  --primary-dark: #0e4fad;

  --green: #18a66a;

  --red: #e05252;

  --orange: #f0a33a;

  --purple: #8b5cf6;

  --dark: #172033;

  --gray: #687386;

  --light-gray: #f6f8fb;

  --border: #e5eaf1;

  --white: #ffffff;

  --shadow: 0 20px 50px rgba(23, 32, 51, 0.08);
}

* {
  margin: 0;

  padding: 0;

  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Arial, Helvetica, sans-serif;

  background:
    radial-gradient(
      circle at 80% 10%,
      rgba(23, 105, 224, 0.08),
      transparent 30%
    ),
    linear-gradient(180deg, #ffffff, #f6f8fb);

  color: var(--dark);

  min-height: 100vh;

  line-height: 1.6;
}

button,
input,
select {
  font-family: inherit;
}

button {
  cursor: pointer;
}

a {
  text-decoration: none;

  color: inherit;
}

.header {
  position: fixed;

  top: 0;

  left: 0;

  width: 100%;

  height: 78px;

  z-index: 1000;

  background: rgba(255, 255, 255, 0.92);

  backdrop-filter: blur(15px);

  border-bottom: 1px solid var(--border);
}

.header-container {
  width: min(1450px, 92%);

  height: 100%;

  margin: auto;

  display: flex;

  align-items: center;

  justify-content: space-between;
}

.logo {
  display: flex;

  align-items: center;

  gap: 10px;

  font-size: 21px;

  font-weight: 800;
}

.logo > span:last-child > span {
  color: var(--primary);
}

.logo-icon {
  width: 38px;

  height: 38px;

  display: flex;

  align-items: center;

  justify-content: center;

  border-radius: 10px;

  background: var(--primary);

  color: white;

  font-weight: 800;
}

.header-right {
  display: flex;

  align-items: center;

  gap: 22px;
}

.header-title {
  color: var(--gray);

  font-size: 13px;

  font-weight: 600;
}

.back-button {
  display: flex;

  align-items: center;

  gap: 8px;

  padding: 10px 17px;

  background: var(--dark);

  color: white;

  border-radius: 9px;

  font-size: 13px;

  font-weight: 700;

  transition: 0.25s;
}

.back-button:hover {
  background: var(--primary);

  transform: translateY(-2px);
}

.container {
  width: min(1450px, 92%);

  margin: auto;

  padding-top: 125px;

  padding-bottom: 80px;
}

.page-intro {
  margin-bottom: 40px;
}

.section-tag {
  color: var(--primary);

  font-size: 11px;

  font-weight: 800;

  letter-spacing: 1.5px;
}

.page-intro h1 {
  font-size: clamp(36px, 4vw, 55px);

  line-height: 1.1;

  letter-spacing: -2px;

  margin: 8px 0 12px;
}

.page-intro p {
  color: var(--gray);

  max-width: 650px;

  font-size: 16px;
}

.dashboard-grid {
  display: grid;

  grid-template-columns: minmax(340px, 0.85fr) minmax(450px, 1.4fr);

  gap: 22px;

  margin-bottom: 22px;
}

.panel {
  background: var(--white);

  border: 1px solid var(--border);

  border-radius: 20px;

  padding: 30px;

  box-shadow: 0 10px 35px rgba(23, 32, 51, 0.045);
}

.panel-header {
  display: flex;

  align-items: flex-start;

  justify-content: space-between;

  gap: 20px;

  margin-bottom: 28px;
}

.panel-label {
  display: block;

  color: var(--primary);

  font-size: 10px;

  font-weight: 800;

  letter-spacing: 1.3px;

  margin-bottom: 5px;
}

.panel h2 {
  font-size: 22px;

  line-height: 1.2;
}

.panel-icon {
  width: 42px;

  height: 42px;

  flex-shrink: 0;

  display: flex;

  align-items: center;

  justify-content: center;

  border-radius: 12px;

  background: #edf4ff;

  color: var(--primary);

  font-size: 20px;

  font-weight: bold;
}

.input-group {
  display: flex;

  flex-direction: column;

  gap: 7px;
}

.input-group label {
  color: var(--dark);

  font-size: 12px;

  font-weight: 700;
}

.input-group input,
.input-group select {
  width: 100%;

  height: 46px;

  padding: 0 13px;

  background: #fafbfd;

  border: 1px solid var(--border);

  border-radius: 9px;

  color: var(--dark);

  font-size: 14px;

  outline: none;

  transition:
    border 0.25s,
    box-shadow 0.25s,
    background 0.25s;
}

.input-group input:focus,
.input-group select:focus {
  border-color: var(--primary);

  background: white;

  box-shadow: 0 0 0 4px rgba(23, 105, 224, 0.08);
}

.form-row {
  display: grid;

  grid-template-columns: 1fr 1fr;

  gap: 14px;

  margin-top: 16px;
}

.add-button {
  width: 100%;

  height: 48px;

  display: flex;

  align-items: center;

  justify-content: space-between;

  padding: 0 17px;

  margin-top: 20px;

  border: none;

  border-radius: 9px;

  background: var(--primary);

  color: white;

  font-size: 13px;

  font-weight: 700;

  box-shadow: 0 10px 25px rgba(23, 105, 224, 0.18);

  transition: 0.25s;
}

.add-button:hover {
  background: var(--primary-dark);

  transform: translateY(-2px);
}

.chart-panel {
  min-height: 430px;
}

.chart-wrapper {
  position: relative;

  width: 100%;
}

.large-chart {
  height: 320px;
}

.summary-grid {
  display: grid;

  grid-template-columns: repeat(3, 1fr);

  gap: 22px;

  margin-bottom: 55px;
}

.summary-card {
  min-height: 125px;

  display: flex;

  align-items: center;

  gap: 17px;

  padding: 24px;

  border-radius: 16px;

  color: white;

  box-shadow: 0 10px 30px rgba(23, 32, 51, 0.08);

  transition: 0.25s;
}

.summary-card:hover {
  transform: translateY(-4px);
}

.summary-icon {
  width: 50px;

  height: 50px;

  display: flex;

  align-items: center;

  justify-content: center;

  border-radius: 13px;

  background: rgba(255, 255, 255, 0.17);

  font-size: 23px;

  font-weight: bold;
}

.summary-card div:last-child {
  display: flex;

  flex-direction: column;
}

.summary-card span {
  font-size: 12px;

  opacity: 0.8;
}

.summary-card strong {
  font-size: 24px;

  margin-top: 3px;
}

.summary-card.receita {
  background: linear-gradient(135deg, #18a66a, #0d8b58);
}

.summary-card.despesa {
  background: linear-gradient(135deg, #e05252, #c93b3b);
}

.summary-card.saldo-card {
  background: linear-gradient(135deg, #1769e0, #0e4fad);
}

.tools-section {
  margin-bottom: 55px;
}

.section-header-small {
  margin-bottom: 22px;
}

.section-header-small h2 {
  font-size: 30px;

  margin-top: 6px;
}

.tools-grid {
  display: grid;

  grid-template-columns: repeat(4, 1fr);

  gap: 14px;
}

.tool-button {
  min-height: 105px;

  display: flex;

  align-items: center;

  gap: 13px;

  padding: 18px;

  text-align: left;

  border: 1px solid var(--border);

  border-radius: 15px;

  background: white;

  color: var(--dark);

  transition:
    transform 0.25s,
    box-shadow 0.25s,
    border 0.25s;
}

.tool-button:hover {
  transform: translateY(-5px);

  box-shadow: 0 12px 30px rgba(23, 32, 51, 0.08);

  border-color: rgba(23, 105, 224, 0.3);
}

.tool-icon {
  width: 43px;

  height: 43px;

  display: flex;

  align-items: center;

  justify-content: center;

  flex-shrink: 0;

  border-radius: 11px;

  background: #edf4ff;

  color: var(--primary);

  font-size: 18px;

  font-weight: bold;
}

.tool-content {
  flex: 1;

  display: flex;

  flex-direction: column;
}

.tool-content strong {
  font-size: 14px;
}

.tool-content small {
  color: var(--gray);

  font-size: 11px;

  margin-top: 2px;
}

.transactions-panel {
  padding: 30px;

  margin-bottom: 22px;
}

.transactions-header {
  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 25px;

  margin-bottom: 25px;
}

.search-wrapper {
  width: 300px;

  height: 43px;

  display: flex;

  align-items: center;

  gap: 9px;

  padding: 0 13px;

  background: #fafbfd;

  border: 1px solid var(--border);

  border-radius: 9px;
}

.search-wrapper input {
  width: 100%;

  border: none;

  outline: none;

  background: transparent;

  font-size: 13px;
}

.tabela-container {
  width: 100%;

  overflow-x: auto;
}

table {
  width: 100%;

  min-width: 720px;

  border-collapse: collapse;
}

thead {
  background: #f7f9fc;
}

th {
  color: var(--gray);

  font-size: 11px;

  text-transform: uppercase;

  letter-spacing: 0.5px;
}

th,
td {
  padding: 15px;

  text-align: left;

  border-bottom: 1px solid var(--border);
}

td {
  font-size: 13px;
}

tbody tr {
  transition: 0.2s;
}

tbody tr:hover {
  background: #fafcff;
}

.receitaValor {
  color: var(--green);

  font-weight: 800;
}

.despesaValor {
  color: var(--red);

  font-weight: 800;
}

.btn-editar,
.btn-excluir {
  border: none;

  padding: 7px 11px;

  border-radius: 7px;

  font-size: 11px;

  font-weight: 700;

  cursor: pointer;

  transition: 0.25s;
}

.btn-editar {
  background: #edf4ff;

  color: var(--primary);
}

.btn-editar:hover {
  background: var(--primary);

  color: white;
}

.btn-excluir {
  background: #fff0f0;

  color: var(--red);
}

.btn-excluir:hover {
  background: var(--red);

  color: white;
}

.bottom-grid {
  display: grid;

  grid-template-columns: 1.1fr 0.9fr;

  gap: 22px;
}

.category-panel {
  min-height: 440px;
}

.category-chart {
  height: 320px;
}

.info-panel {
  min-height: 440px;
}

.info-content {
  display: flex;

  flex-direction: column;

  gap: 18px;
}

.info-item {
  display: flex;

  gap: 13px;

  padding: 16px;

  border-radius: 12px;

  background: #f8faff;
}

.info-item-icon {
  width: 36px;

  height: 36px;

  display: flex;

  align-items: center;

  justify-content: center;

  flex-shrink: 0;

  border-radius: 9px;

  background: #edf4ff;

  color: var(--primary);

  font-weight: bold;
}

.info-item strong {
  font-size: 13px;
}

.info-item p {
  color: var(--gray);

  font-size: 12px;

  margin-top: 3px;
}

.footer {
  min-height: 100px;

  display: flex;

  align-items: center;

  background: var(--dark);

  color: white;
}

.footer > div {
  width: min(1450px, 92%);

  margin: auto;

  display: flex;

  justify-content: space-between;

  align-items: center;
}

.footer strong {
  font-size: 16px;
}

.footer span {
  color: rgba(255, 255, 255, 0.55);

  font-size: 12px;
}

.panel,
.summary-card,
.tool-button {
  animation: aparecer 0.6s ease both;
}

@keyframes aparecer {
  from {
    opacity: 0;

    transform: translateY(18px);
  }

  to {
    opacity: 1;

    transform: translateY(0);
  }
}

@media (max-width: 1100px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .chart-panel {
    min-height: 400px;
  }

  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .bottom-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 800px) {
  .header {
    height: 70px;
  }

  .header-title {
    display: none;
  }

  .container {
    width: 94%;

    padding-top: 105px;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .transactions-header {
    align-items: flex-start;

    flex-direction: column;
  }

  .search-wrapper {
    width: 100%;
  }

  .bottom-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .header-container {
    width: 90%;
  }

  .logo {
    font-size: 18px;
  }

  .logo-icon {
    width: 34px;

    height: 34px;
  }

  .back-button {
    padding: 9px 12px;

    font-size: 12px;
  }

  .container {
    width: 92%;
  }

  .page-intro h1 {
    font-size: 37px;

    letter-spacing: -1.5px;
  }

  .page-intro p {
    font-size: 14px;
  }

  .panel {
    padding: 21px;

    border-radius: 16px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .tools-grid {
    grid-template-columns: 1fr;
  }

  .tool-button {
    min-height: 85px;
  }

  .transactions-panel {
    padding: 20px;
  }

  .large-chart {
    height: 260px;
  }

  .category-chart {
    height: 270px;
  }

  .summary-card {
    min-height: 105px;
  }

  .summary-card strong {
    font-size: 20px;
  }

  .footer > div {
    flex-direction: column;

    gap: 7px;

    text-align: center;

    padding: 25px 0;
  }
}

@media (max-width: 380px) {
  .header-container {
    width: 94%;
  }

  .back-button {
    font-size: 0;
  }

  .back-button::after {
    content: "←";

    font-size: 20px;
  }

  .page-intro h1 {
    font-size: 32px;
  }

  .panel h2 {
    font-size: 19px;
  }
}
