.bb-root {
  --bb-bg: #f3f7f4;
  --bb-panel: #ffffff;
  --bb-ink: #000000;
  --bb-muted: #58645c;
  --bb-line: #d9e5dc;
  --bb-income: #167a4a;
  --bb-expense: #b03a2e;
  --bb-accent: #0b76e8;
  --bb-shadow: 0 4px 18px rgba(9, 34, 21, 0.08);
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  color: var(--bb-ink);
}

.bb-app {
  background: radial-gradient(circle at top right, #e1efe7 0%, var(--bb-bg) 45%);
  border-radius: 14px;
  padding: 0.9rem;
}

.bb-title {
  margin: 0;
  font-size: 1.65rem;
}

.bb-subtitle {
  margin: 0.3rem 0 0.9rem;
  color: var(--bb-muted);
}

.bb-panel,
.bb-card {
  background: var(--bb-panel);
  border: 1px solid var(--bb-line);
  border-radius: 14px;
  padding: 0.9rem;
  box-shadow: var(--bb-shadow);
}

.bb-panel h2,
.bb-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.bb-empty {
  color: var(--bb-muted);
  margin: 0;
}

.bb-welcome-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
  margin-top: 0.8rem;
}

.bb-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 68px;
  border-radius: 12px;
  border: 0;
  font-size: 1.15rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  color: #ffffff;
}

.bb-action-btn-expense {
  background: linear-gradient(135deg, #9b2f25, #7f231b);
}

.bb-action-btn-income {
  background: linear-gradient(135deg, #12633a, #0d4f2f);
}

.bb-action-btn-dashboard {
  background: linear-gradient(135deg, #0b76e8, #095bb3);
}

.bb-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
  margin: 0.75rem 0;
}

.bb-card p {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 700;
}

.bb-income {
  color: var(--bb-income);
}

.bb-expense {
  color: var(--bb-expense);
}

.bb-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.bb-list-row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  border-top: 1px solid var(--bb-line);
  padding: 0.55rem 0;
}

.bb-list-row:first-child {
  border-top: 0;
}

.bb-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(24, 34, 42, 0.5);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0.6rem;
  z-index: 9999;
}

.bb-modal-card {
  width: 100%;
  max-width: 460px;
  background: #fff;
  border-radius: 14px;
  padding: 0.9rem;
  border: 1px solid var(--bb-line);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.bb-modal-card h2 {
  margin: 0 0 0.7rem;
}

.bb-form-grid {
  display: grid;
  gap: 0.6rem;
}

.bb-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.bb-field label {
  font-size: 0.86rem;
  color: var(--bb-muted);
}

.bb-field input {
  width: 100%;
  border: 1px solid var(--bb-line);
  border-radius: 9px;
  padding: 0.65rem;
  font-size: 0.97rem;
}

.bb-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin-top: 0.2rem;
}

.bb-primary-btn,
.bb-ghost-btn {
  border-radius: 10px;
  font-weight: 700;
  border: 1px solid var(--bb-line);
  padding: 0.7rem;
  cursor: pointer;
}

.bb-primary-btn {
  background: var(--bb-accent);
  color: #fff;
  border-color: var(--bb-accent);
}

.bb-ghost-btn {
  background: #fff;
  color: var(--bb-ink);
}

.bb-dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.bb-bar-row + .bb-bar-row {
  margin-top: 0.55rem;
}

.bb-bar-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.92rem;
  margin-bottom: 0.25rem;
}

.bb-bar-track {
  width: 100%;
  height: 0.55rem;
  background: #edf3ef;
  border-radius: 999px;
  overflow: hidden;
}

.bb-bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.bb-bar-fill.bb-income {
  background: var(--bb-income);
}

.bb-bar-fill.bb-expense {
  background: var(--bb-expense);
}

@media (min-width: 760px) {
  .bb-app {
    padding: 1rem;
  }

  .bb-title {
    font-size: 1.8rem;
  }

  .bb-welcome-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .bb-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .bb-dashboard-grid {
    grid-template-columns: 1.2fr 1fr 1fr;
  }

  .bb-modal-backdrop {
    align-items: center;
    padding: 1rem;
  }
}
