/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  font-family: "Segoe UI", sans-serif;
  background: #0f1412;
  color: #e5e5e5;
  padding: 20px;
  overflow-x: hidden;
}

.container {
  max-width: 1300px;
  margin: auto;
}

/* HEADER */

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;

  margin-bottom: 30px;
  padding-bottom: 15px;

  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header h1 {
  color: #2ecc71;
}

/* LOGO */

.logo-container {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.logo {
  width: 58px;
  height: 58px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(46, 204, 113, 0.35));
}

.logo-container:focus-visible {
  outline: 2px solid #2ecc71;
  outline-offset: 5px;
}

.brand-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
  line-height: 1.1;
}

.brand-name {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 800;
}

.brand-context {
  color: #86efac;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}

/* HEADER ACTIONS */

.header-actions {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.header-actions h1 {
  color: #2ecc71;
}

.header-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
}

.account-area {
  display: grid;
  grid-template-columns: 34px minmax(120px, auto);
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 12px 6px 6px;
  border: 1px solid rgba(46, 204, 113, 0.24);
  border-radius: 999px;
  background: rgba(17, 24, 20, 0.72);
}

.account-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #2ecc71;
  color: #0f1412;
  font-weight: 800;
}

.account-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  line-height: 1.15;
}

.account-name {
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 700;
}

.account-plan {
  width: fit-content;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  color: #cbd5e1;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.account-plan.is-pro {
  background: rgba(217, 249, 157, 0.18);
  color: #d9f99d;
}

/* GRID PRINCIPAL */

.top-grid,
.middle-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

/* CHART */

.chart-container {
  width: 100%;
  max-width: 100%;
  height: 260px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  position: relative;
}

canvas {
  width: 100% !important;
  height: 100% !important;
}

#expenseChart {
  max-width: 100%;
  display: none;
}

/* FILTERS */

.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px;
  margin-bottom: 25px;
  align-items: end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-group label {
  font-size: 0.8rem;
  font-weight: 600;
  opacity: 0.7;
}

.export-btn {
  min-height: 34px;
  align-self: end;
}

/* TABLE WRAPPER */

.table-wrapper {
  width: 100%;
  overflow-x: auto;
}
