:root {
  --bg: #eef3ef;
  --surface: #ffffff;
  --surface-2: #f6f9f7;
  --ink: #13221b;
  --muted: #65736c;
  --line: #dce5de;
  --green: #17a86b;
  --green-dark: #10392b;
  --red: #ef4b55;
  --blue: #3478f6;
  --amber: #f4a51c;
  --teal: #20b9ae;
  --purple: #7b61ff;
  --shadow: 0 14px 34px rgba(19, 34, 27, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

input,
select,
textarea {
  font-size: 16px;
}

button {
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
}

button:active,
[role="button"]:active,
.action-tile:active,
.metric-card:active,
.financial-status-card:active {
  transform: none;
}

.action-tile,
.metric-card,
.financial-status-card,
.panel,
.bank-card {
  min-width: 0;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

button svg,
[role="button"] svg {
  pointer-events: none;
}

.nav-button {
  pointer-events: auto;
}

.nav-button > * {
  pointer-events: none;
}

svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hidden,
.icon-sprite {
  display: none !important;
}

.app {
  min-height: 100vh;
  max-width: 1180px;
  margin: 0 auto;
  position: relative;
}

.app.locked {
  filter: blur(4px);
  pointer-events: none;
  user-select: none;
}

.content {
  min-height: 100vh;
  padding: 0 18px 108px;
}

.app[data-active-view="dashboard"] .content {
  padding-bottom: 28px;
}

.hero {
  margin: 0 -18px 16px;
  padding: 28px 18px 22px;
  color: #ffffff;
  background:
    radial-gradient(circle at 92% 16%, rgba(255, 255, 255, 0.18), transparent 28%),
    linear-gradient(145deg, #0e3a2b, #14915d);
  border-bottom-left-radius: 28px;
  border-bottom-right-radius: 28px;
}

.hero-top,
.period-row,
.hero-actions,
.panel-title,
.panel-actions,
.transaction,
.period-controls,
.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-logo {
  width: 46px;
  height: 46px;
  border: 2px solid rgba(255, 255, 255, 0.78);
  border-radius: 50%;
  background: #ffffff;
  object-fit: cover;
  flex: 0 0 auto;
}

.brand strong,
.brand small,
.metric-card small,
.summary-grid small,
.period-row span {
  display: block;
}

.brand small,
.period-row span {
  color: rgba(255, 255, 255, 0.76);
}

.icon-button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: inherit;
  background: rgba(255, 255, 255, 0.16);
}

.period-row {
  margin-top: 22px;
  align-items: flex-end;
}

.period-row strong {
  display: block;
  max-width: 680px;
  margin-top: 4px;
  font-size: clamp(1.25rem, 2.5vw, 2.1rem);
  line-height: 1.08;
}

.period-row .verse-text {
  max-width: 620px;
  font-size: clamp(0.92rem, 3.5vw, 1.18rem);
  line-height: 1.24;
  font-weight: 850;
}

.balance-hero {
  margin-top: 18px;
}

.balance-hero span {
  display: block;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.86rem;
}

.balance-hero strong {
  display: block;
  margin-top: 4px;
  font-size: clamp(2rem, 5vw, 3.15rem);
  line-height: 1;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.hero-metrics article {
  min-height: 78px;
  border-radius: 18px;
  padding: 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
}

.hero-metrics small {
  display: block;
  color: var(--muted);
  margin-bottom: 5px;
}

.hero-metrics strong {
  font-size: clamp(1rem, 2vw, 1.35rem);
}

.period-panel,
.panel {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 10px 26px rgba(19, 34, 27, 0.08);
}

.card-account-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.card-form {
  grid-template-columns: minmax(180px, 2fr) repeat(2, minmax(150px, 1fr)) auto auto;
}

.period-panel {
  padding: 14px;
  margin-bottom: 14px;
}

.period-panel.collapsed .month-calendar,
.period-panel.collapsed #yearSelect,
.period-panel.collapsed #newYearBtn,
.period-panel.collapsed label {
  display: none;
}

.period-panel.collapsed .period-controls {
  margin-bottom: 0;
}

.period-controls {
  align-items: end;
  margin-bottom: 12px;
}

.period-controls label {
  flex: 1;
}

.month-calendar {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.month-button {
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 16px;
  display: grid;
  gap: 2px;
  place-items: center;
  color: var(--muted);
  background: #f8faf8;
  font-weight: 850;
}

.month-button strong,
.month-button small {
  display: block;
}

.month-button small {
  font-size: 0.68rem;
  font-weight: 760;
}

.month-button.active,
.month-button:hover {
  color: #ffffff;
  background: var(--green-dark);
  border-color: var(--green-dark);
}

.view {
  display: none;
}

.view.active {
  display: grid;
  gap: 14px;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.action-tile {
  min-height: 78px;
  border: 1px solid var(--line);
  border-radius: 22px;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "icon title";
  align-items: center;
  column-gap: 10px;
  padding: 12px;
  text-align: left;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 10px 26px rgba(19, 34, 27, 0.08);
}

.action-tile strong {
  grid-area: title;
  display: block;
  font-size: clamp(0.9rem, 3.8vw, 1.05rem);
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.action-tile small {
  grid-area: text;
  color: var(--muted);
}

.action-icon,
.title-icon {
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  flex: 0 0 auto;
}

.action-icon {
  grid-area: icon;
  width: 40px;
  height: 40px;
  border-radius: 14px;
}

.title-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  margin-right: 8px;
  vertical-align: middle;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.metric-card,
.summary-grid > div {
  min-height: 92px;
  border-radius: 20px;
  padding: 12px;
  border: 1px solid transparent;
  box-shadow: 0 10px 24px rgba(19, 34, 27, 0.07);
}

.metric-icon {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin-bottom: 10px;
  color: #ffffff;
}

.metric-card small,
.summary-grid small {
  color: var(--muted);
  margin-bottom: 6px;
}

.metric-card strong,
.summary-grid strong {
  display: block;
  font-size: clamp(1rem, 1.8vw, 1.28rem);
  line-height: 1.1;
}

.income-card,
.summary-grid > div:nth-child(1) {
  color: #0a7f52;
  background: #e7f8f0;
}

.expense-card,
.summary-grid > div:nth-child(2) {
  color: #c32934;
  background: #fff0f1;
}

.balance-card,
.summary-grid > div:nth-child(3),
.previous-card {
  color: #1f60d8;
  background: #eef4ff;
}

.debt-card,
.summary-grid > div:nth-child(4) {
  color: #9a5c00;
  background: #fff6df;
}

.installment-card {
  color: #86510e;
  background: #fff6df;
}

.income-card .metric-icon {
  background: var(--green);
}

.expense-card .metric-icon {
  background: var(--red);
}

.balance-card .metric-icon {
  background: var(--blue);
}

.previous-card .metric-icon {
  background: var(--teal);
}

.debt-card .metric-icon {
  background: var(--amber);
}

.installment-card .metric-icon {
  background: #f59e0b;
}

.panel {
  padding: 16px;
  min-width: 0;
}

.panel-title {
  margin-bottom: 14px;
}

.panel-title h2 {
  margin: 0;
  font-size: 1.02rem;
}

.panel-title span,
.panel-actions span {
  color: var(--muted);
  font-size: 0.84rem;
}

.column-chart {
  min-height: 240px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
  padding: 4px 0 0;
}

.chart-column {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 178px auto;
  gap: 9px;
  text-align: center;
}

.chart-value {
  min-height: 22px;
  color: var(--muted);
  font-size: 0.82rem;
}

.chart-track {
  display: flex;
  align-items: end;
  justify-content: center;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #f9fbf8, #eef3ed);
  overflow: hidden;
}

.chart-fill {
  width: min(62px, 58%);
  min-height: 4px;
  border-radius: 14px 14px 0 0;
}

.chart-column strong {
  min-height: 34px;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
}

.income-bar {
  background: var(--green);
}

.expense-bar,
.negative-bar {
  background: var(--red);
}

.balance-bar {
  background: var(--blue);
}

.previous-bar {
  background: var(--teal);
}

.debt-bar {
  background: var(--amber);
}

.bar-list,
.budget-list,
.debt-list,
.diagnosis,
.safety-notes {
  display: grid;
  gap: 10px;
}

.bar-row {
  display: grid;
  gap: 7px;
}

.bar-row header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

.bar-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf3ee;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  min-width: 2px;
}

.diagnosis-item,
.safety-notes > div,
.budget-item,
.debt-item {
  padding: 13px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #fbfcfa;
}

.diagnosis-item strong,
.safety-notes strong,
.budget-item strong,
.debt-item strong {
  display: block;
  margin-bottom: 4px;
}

.diagnosis-item p,
.safety-notes p,
.budget-item small,
.debt-item small {
  margin: 0;
  color: var(--muted);
}

.summary-grid,
.security-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.quick-form,
.form-grid {
  display: grid;
  gap: 12px;
}

.form-grid {
  grid-template-columns: repeat(5, minmax(150px, 1fr)) auto;
  align-items: end;
}

label {
  color: var(--muted);
  display: grid;
  gap: 7px;
  font-size: 0.86rem;
  font-weight: 760;
}

input,
select {
  min-height: 46px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  background: #ffffff;
  padding: 0 12px;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 4px;
  border-radius: 999px;
  background: #eef3ef;
}

.segmented label {
  display: block;
  color: var(--muted);
}

.segmented input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented span {
  min-height: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 900;
}

.segmented input:checked + span {
  color: #ffffff;
  background: var(--green);
}

.segmented label:first-child input:checked + span {
  background: var(--red);
}

.value-box {
  border-radius: 22px;
  padding: 16px;
  text-align: center;
  background: #f6f9f7;
}

.value-box input {
  min-height: 58px;
  border: 0;
  padding: 0;
  text-align: center;
  background: transparent;
  font-size: 2rem;
  font-weight: 900;
}

.select-row,
.input-row {
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  background: #ffffff;
  color: var(--muted);
}

.select-row select,
.input-row input {
  border: 0;
  border-radius: 0;
  padding: 0;
  min-height: 46px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.category-choice {
  min-height: 86px;
  border: 1px solid var(--line);
  border-radius: 18px;
  display: grid;
  place-items: center;
  gap: 7px;
  color: var(--muted);
  background: #ffffff;
  font-size: 0.78rem;
  font-weight: 850;
  text-align: center;
}

.category-choice.active,
.category-choice:hover {
  border-color: var(--green);
  box-shadow: 0 10px 22px rgba(23, 168, 107, 0.16);
}

.category-icon {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: #ffffff;
}

.casa {
  background: var(--blue);
}

.comida {
  background: var(--amber);
}

.saude {
  background: var(--red);
}

.transporte {
  background: var(--teal);
}

.cartao {
  background: var(--purple);
}

.renda {
  background: var(--green);
}

.despesa {
  background: var(--red);
}

.editar {
  background: var(--blue);
}

.previsao {
  background: var(--amber);
}

.dados {
  background: var(--teal);
}

.pessoal {
  background: #5b7cfa;
}

.diversas {
  background: #68736d;
}

.lazer {
  background: #d94ecb;
}

.investimentos {
  background: #0a7f52;
}

.primary-button,
.secondary-button,
.file-button,
.text-button {
  border: 0;
  border-radius: 16px;
}

.primary-button,
.secondary-button,
.file-button {
  min-height: 46px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 900;
  white-space: nowrap;
}

.primary-button {
  color: #ffffff;
  background: var(--green);
  box-shadow: 0 12px 24px rgba(23, 168, 107, 0.22);
}

.secondary-button,
.file-button {
  color: var(--green-dark);
  background: #dfe9df;
}

.text-button {
  min-height: 38px;
  color: var(--green);
  background: transparent;
  font-weight: 900;
}

.compact {
  min-width: 118px;
}

.file-button {
  position: relative;
}

.file-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.security-grid {
  grid-template-columns: repeat(6, minmax(140px, 1fr));
  margin-bottom: 16px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  padding: 13px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 0.82rem;
}

td:last-child,
th:last-child {
  width: 92px;
  text-align: right;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 0.78rem;
  font-weight: 850;
}

.income {
  color: #0a7f52;
  background: #dff1e4;
}

.expense {
  color: #8d2727;
  background: #fae2df;
}

.card {
  color: #86510e;
  background: #f6e5cc;
}

.cash {
  color: #23558d;
  background: #dfeafa;
}

.row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.edit-button,
.delete-button {
  min-width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  font-weight: 850;
}

.edit-button {
  padding: 0 10px;
  color: var(--green-dark);
}

.delete-button {
  color: var(--red);
}

.edit-button:disabled {
  opacity: 0.45;
}

.budget-item {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) repeat(3, minmax(120px, 170px));
  gap: 12px;
  align-items: center;
}

.debt-item {
  display: grid;
  grid-template-columns: minmax(160px, 1.2fr) repeat(4, minmax(105px, 0.75fr)) minmax(120px, auto);
  gap: 12px;
  align-items: center;
}

.empty {
  color: var(--muted);
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  text-align: center;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 14px;
  z-index: 10;
  width: min(720px, calc(100% - 28px));
  height: 76px;
  transform: translateX(-50%);
  border: 1px solid rgba(220, 229, 222, 0.92);
  border-radius: 26px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: center;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 42px rgba(19, 34, 27, 0.18);
  backdrop-filter: blur(12px);
}

.bottom-nav .nav-button {
  border: 0;
  min-height: 58px;
  display: grid;
  place-items: center;
  gap: 3px;
  color: var(--muted);
  background: transparent;
  font-size: 0.68rem;
  font-weight: 850;
}

.bottom-nav .nav-button.active {
  color: var(--green);
}

.bottom-nav .fab {
  width: 60px;
  height: 60px;
  min-height: 60px;
  justify-self: center;
  border-radius: 22px;
  color: #ffffff;
  background: var(--green);
  box-shadow: 0 14px 28px rgba(23, 168, 107, 0.34);
  transform: translateY(-20px);
}

.bottom-nav .fab.active {
  color: #ffffff;
}

.bottom-nav .fab svg {
  width: 26px;
  height: 26px;
}

.app[data-active-view="dashboard"] .bottom-nav {
  display: none;
}

.lock-screen {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(18, 49, 38, 0.94);
}

.lock-box,
.dialog-box {
  width: min(430px, 100%);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  padding: 24px;
  text-align: center;
}

.lock-logo {
  width: 76px;
  height: 76px;
  border: 3px solid #ecf4ee;
  border-radius: 50%;
  object-fit: cover;
}

.lock-box h1,
.dialog-box h2 {
  margin: 14px 0 8px;
}

.lock-box p,
.dialog-box p {
  color: var(--muted);
  margin: 0 0 18px;
}

.pin-form {
  display: grid;
  gap: 10px;
}

.app-dialog {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(18, 31, 26, 0.52);
}

.dialog-box {
  text-align: left;
}

.dialog-box input {
  margin-bottom: 14px;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

@media (max-width: 980px) {
  .metrics,
  .summary-grid,
  .security-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .month-calendar {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .form-grid,
  .budget-item,
  .debt-item {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .content {
    padding: 0 14px 104px;
  }

  .app[data-active-view="dashboard"] .content {
    padding-bottom: 24px;
  }

  .hero {
    margin-inline: -14px;
    padding-inline: 16px;
  }

  .period-row,
  .panel-title,
  .period-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .month-calendar,
  .column-chart {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chart-column {
    grid-template-rows: auto 150px auto;
  }

  .metrics,
  .summary-grid,
  .security-grid,
  .category-grid,
  .quick-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .primary-button,
  .secondary-button,
  .file-button {
    width: 100%;
  }

  .bottom-nav {
    height: 74px;
  }
}


/* iPhone v40 */
.chart-period-tabs { display:grid; grid-template-columns:repeat(3,1fr); gap:6px; margin:12px 0; }
.chart-period-tabs button { border:0; border-radius:12px; padding:10px 6px; color:#53645c; background:#eef4f0; font-weight:700; }
.chart-period-tabs button.active { color:#fff; background:linear-gradient(135deg,#168357,#0e6a45); }
.period-chart-shell { overflow-x:auto; -webkit-overflow-scrolling:touch; border-left:2px solid #91a096; border-bottom:2px solid #91a096; min-height:245px; }
.period-chart { display:flex; align-items:flex-end; min-width:max-content; min-height:240px; padding:8px 8px 0; }
.period-chart.month-centered { min-width:100%; justify-content:center; }
.period-group { width:98px; flex:0 0 98px; text-align:center; color:#53645c; font-size:11px; }
.period-bars { height:195px; display:flex; align-items:flex-end; justify-content:center; gap:3px; }
.v40-chart-bar { border:0; padding:0; background:transparent; display:flex; flex-direction:column; justify-content:flex-end; align-items:center; height:195px; width:20px; }
.v40-chart-bar span { display:none; }
.v40-chart-bar i { display:block; width:17px; min-height:2px; border-radius:4px 4px 0 0; }
.v40-chart-bar.income i { background:#168357; }.v40-chart-bar.expense i { background:#f4a51c; }.v40-chart-bar.forecast i { background:#8b4a3a; }.v40-chart-bar.reserve i { background:#00a85a; }
.chart-legend { display:flex; flex-wrap:wrap; gap:7px 14px; margin-top:12px; font-size:12px; }.legend-income{color:#168357}.legend-expense{color:#b87800}.legend-forecast{color:#8b4a3a}.legend-reserve{color:#00a85a}.chart-help{font-size:12px;color:#68766f;margin:10px 0 0}
.bank-note { color:#52655c; line-height:1.5; }.bank-total { display:flex; justify-content:space-between; align-items:center; padding:14px; margin:14px 0; border-radius:14px; background:#eaf2ff; }.bank-total small{color:#53645c}.bank-total strong{color:#1e66c1;font-size:18px}
.bank-list { display:grid; gap:10px; }.bank-card { display:grid; grid-template-columns:1fr auto; gap:8px 12px; align-items:center; padding:14px; border-radius:14px; background:#f8fffa; border:1px solid #dce9e1; }.bank-card div:first-child{display:flex;flex-direction:column}.bank-card small{color:#6b7a72;margin-top:3px}.bank-card .row-actions{grid-column:1/-1}.manual-list{display:grid;gap:10px}.manual-list article{padding:14px;border-radius:14px;background:#f8fffa;border:1px solid #dce9e1}.manual-list p{margin:5px 0 0;color:#52655c;line-height:1.5}
@media (orientation:landscape) { .app-main{max-width:1100px;margin:auto}.period-chart-shell{min-height:220px}.period-chart{min-height:215px}.period-bars{height:170px}.v40-chart-bar{height:170px} }

.reserve-card { background: linear-gradient(145deg, #ffffff, #e8faf2); }
.reserve-card strong { color: #0e7c55; }

/* Status Financeiro 1.5.47 */
.financial-status-card { border:1px solid #cfe3d7; background:linear-gradient(145deg,#fff,#f1faf5); cursor:pointer; }
.financial-status-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
.financial-status-heading small { color:#64746c; font-weight:800; letter-spacing:.08em; }
.financial-status-heading h2 { margin:4px 0 0; color:#168357; font-size:26px; }
.status-info { border:0; border-radius:50%; width:36px; height:36px; background:#e4f2e9; color:#168357; font-size:20px; }
.status-scale { display:grid; grid-template-columns:repeat(4,1fr); gap:5px; margin:16px 0 12px; }
.status-scale span { height:8px; border-radius:8px; background:#dce5df; }
.status-scale span:nth-child(1).active { background:#1bae76; }.status-scale span:nth-child(2).active { background:#e6b62e; }.status-scale span:nth-child(3).active { background:#ef8b2c; }.status-scale span:nth-child(4).active { background:#d74b4b; }
.financial-status-card[data-level="1"] h2{color:#a87900}.financial-status-card[data-level="2"] h2{color:#d96d19}.financial-status-card[data-level="3"] h2{color:#c73d3d}
.status-summary { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin:14px 0; }
.status-summary div { padding:10px; border-radius:12px; background:#fff; border:1px solid #e2ebe5; display:flex; flex-direction:column; gap:4px; }
.status-summary small { color:#65746c; }.status-summary strong { font-size:14px; }
@media(max-width:640px){.status-summary{grid-template-columns:1fr}.financial-status-card{grid-column:1/-1}}

@media (max-width: 760px) {
  .card-form {
    grid-template-columns: 1fr;
  }
}
/* Interface sincronizada com Android 1.5.47 */
.app-toolbar {
  position: sticky;
  top: 0;
  z-index: 30;
  margin: 0 -18px;
  min-height: 68px;
  padding: 8px 16px;
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  gap: 10px;
  background: linear-gradient(145deg, #0e3a2b, #168357);
  color: #fff;
  box-shadow: 0 5px 18px rgba(7, 31, 23, .2);
}
.toolbar-button {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: #0b6545;
}
.toolbar-button svg { width: 28px; height: 28px; }
.toolbar-brand {
  min-width: 0;
  display: grid;
  grid-template-columns: 46px 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 10px;
}
.toolbar-brand img {
  grid-row: 1 / 3;
  width: 46px;
  height: 46px;
  object-fit: contain;
  border-radius: 12px;
  background: #fff;
}
.toolbar-brand strong, .toolbar-brand small { display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.toolbar-brand small { color:#d7eee3; }
.app:not([data-active-view="dashboard"]) .hero { display:none; }
.app[data-active-view="dashboard"] .app-toolbar { margin-bottom:0; }
.hero { margin-top:0; }
.hero-top { display:none; }

#dashboard.active { display:flex; flex-direction:column; gap:14px; }
#dashboard .financial-status-card { order:1; }
#dashboard .home-actions { order:2; }
#dashboard .chart-panel { order:3; }
#dashboard > .metrics,
#dashboard > .panel:not(.financial-status-card):not(.chart-panel) { display:none; }

.home-actions { grid-template-columns:1fr; }
.home-action {
  min-height:84px;
  grid-template-columns:1fr;
  grid-template-areas:"title" "text";
  text-align:center;
  background:linear-gradient(145deg,#fff,#dff4e7);
  border-color:#b9dec8;
}
.home-action strong { color:#0e6f4d; font-size:1.05rem; }
.home-action small { color:#52655c; margin-top:5px; }

.financial-status-card { padding:14px 16px; }
.financial-status-card > p,
.financial-status-card .status-summary,
.financial-status-card .status-info { display:none; }
.financial-status-heading h2 { font-size:22px; }
.status-scale { margin:9px 0 6px; }
.financial-status-card .text-button { padding:3px 0; }

.chart-panel { background:linear-gradient(145deg,#fff,#edf8f1); }
.chart-legend span { color:#0e7c55 !important; }
.v40-chart-bar.income i { background:#0b8d67; }
.v40-chart-bar.expense i { background:#2ea66b; }
.v40-chart-bar.forecast i { background:#66c99a; }
.v40-chart-bar.reserve i { background:#0e7c55; }

.tools-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.tools-grid .action-tile { grid-template-columns:34px 1fr; min-height:74px; background:linear-gradient(145deg,#fff,#e5f5eb); }
.tools-grid .action-tile svg { width:26px; height:26px; color:#168357; }

.app.values-hidden .balance-hero strong,
.app.values-hidden .hero-metrics strong,
.app.values-hidden #dashboard .chart-caption,
.app.values-hidden #dashboard [data-chart-value] {
  filter: blur(7px);
  user-select:none;
}
.app.values-hidden #monthlyChart [data-chart-value] { pointer-events:none; }
