:root {
  font-family: Arial, "Segoe UI", system-ui, sans-serif;
  color: #07542b;
  background: #f3faf4;
  font-synthesis: none;
  --green: #006332;
  --orange: #ff890a;
  --muted: #537669;
  --line: #deedde;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100dvh;
  isolation: isolate;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
  border: 0;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #dc9e18;
  outline-offset: 3px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: -0.6px;
  font-weight: 800;
}
h2 {
  font-size: 26px;
  letter-spacing: -0.4px;
}
h3 {
  font-size: 16px;
}
small {
  font-size: 11px;
}
em {
  font-style: normal;
  color: var(--orange);
}
[hidden] {
  display: none !important;
}
.app-icon {
  display: inline-block;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  vertical-align: middle;
}
.waves {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(100%, 480px);
  height: 90px;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.waves:before,
.waves:after {
  content: "";
  position: absolute;
  left: -15%;
  width: 145%;
  height: 125px;
  border-radius: 48% 55% 0 0;
  top: 26px;
  transform: rotate(-5deg);
  background: #dfefdc;
}
.waves:after {
  top: 48px;
  transform: rotate(7deg);
  background: #c8e3c4;
  box-shadow: 0 19px 0 #b8dcb5;
}
#welcome {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 28px 24px;
  position: relative;
  overflow: hidden;
  max-width: 480px;
  margin: auto;
  background:
    radial-gradient(ellipse at 95% -6%, #8cc49a 0, transparent 35%),
    radial-gradient(ellipse at -5% 105%, #b1d9b3 0, transparent 36%);
}
#welcome:before {
  content: "";
  position: absolute;
  top: -95px;
  right: -20px;
  width: 245px;
  height: 220px;
  border-radius: 15% 70% 8% 90%;
  transform: rotate(16deg);
  background: #a6d3ad66;
  border-bottom: 1px solid #ffad2f;
  pointer-events: none;
}
#welcome:after {
  content: "";
  position: absolute;
  left: -80px;
  bottom: -45px;
  width: 320px;
  height: 160px;
  border-radius: 85% 0 80% 15%;
  transform: rotate(28deg);
  background: #a8d1a655;
  border-top: 1px solid #f6ab37;
  pointer-events: none;
}
.welcome-card {
  position: relative;
  z-index: 1;
  width: 332px;
  max-width: 100%;
  padding: 34px 24px 28px;
  background: #fff;
  box-shadow: 0 5px 19px #22632e13;
  border-radius: 18px;
  text-align: center;
}
.welcome-card img {
  border-radius: 20px;
  object-fit: contain;
  width: 112px;
  height: 112px;
}
.welcome-card h1 {
  margin: 16px 0 6px;
  font-size: 27px;
  font-weight: 900;
  white-space: nowrap;
  letter-spacing: -0.8px;
}
.welcome-card p {
  font-size: 13px;
  line-height: 1.35;
  margin-bottom: 23px;
}
.welcome-card button {
  width: 100%;
  margin-top: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.welcome-card button .app-icon {
  width: 23px;
  height: 23px;
}
#shell {
  width: min(480px, 100%);
  min-height: 100dvh;
  margin: auto;
  padding-bottom: 74px;
}
.app-header {
  height: 80px;
  background: linear-gradient(100deg, #d9edda, #d2e9cf);
  border-radius: 0 0 24px 24px;
  display: grid;
  grid-template-columns: 54px 1fr 54px;
  gap: 8px;
  align-items: center;
  padding: 12px 16px;
}
.brand {
  text-align: center;
  display: grid;
}
.brand strong {
  font-size: 35px;
  line-height: 1;
  letter-spacing: -1.4px;
  font-weight: 900;
}
.brand small {
  font-size: 11px;
  color: #285f39;
}
.app-header > img {
  width: 46px;
  height: 46px;
  justify-self: end;
  border-radius: 10px;
}
#home {
  padding: 0;
  text-align: left;
  display: flex;
  align-items: center;
}
#home .app-icon {
  width: 28px;
  height: 28px;
}
#home img {
  border-radius: 9px;
  width: 44px;
  height: 44px;
}
#profile-button {
  display: none;
  border-radius: 50%;
  color: #fff;
  background: #00602c;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  justify-self: end;
}
#profile-button .app-icon {
  width: 24px;
  height: 24px;
}
:is(#shell, #guide-host)[data-page="dashboard"] .app-header > img {
  display: none;
}
:is(#shell, #guide-host)[data-page="dashboard"] #profile-button {
  display: flex;
}
main {
  padding: 19px 15px 0;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin: 0 0 15px;
}
#heading-actions {
  display: flex;
  gap: 7px;
  align-items: center;
  flex: 0 0 auto;
}
:is(#shell, #guide-host)[data-page="dashboard"] main {
  padding-top: 10px;
}
:is(#shell, #guide-host)[data-page="dashboard"] .page-heading {
  margin-bottom: 9px;
}
:is(#shell, #guide-host)[data-page="dashboard"] h1 {
  font-size: 19px;
  letter-spacing: -0.3px;
}
#navigation {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 11px;
}
#navigation button {
  background: #fff;
  border-radius: 10px;
  min-height: 44px;
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 6px 9px;
  text-align: left;
  color: #194a36;
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 3px 10px #16551b09;
}
#navigation .nav-symbol {
  background: #ffedf0;
  color: #f5747c;
  border-radius: 50%;
  padding: 5px;
  display: flex;
}
#navigation .nav-symbol .app-icon {
  width: 20px;
  height: 20px;
}
#navigation .nav-label {
  flex: 1;
  line-height: 1.2;
}
#navigation .nav-arrow {
  color: #748077;
  display: flex;
}
#navigation .nav-arrow .app-icon {
  width: 12px;
  height: 12px;
}
#navigation button:nth-child(2) .nav-symbol {
  background: #fff0de;
  color: #ff9a26;
}
#navigation button:nth-child(3) .nav-symbol {
  background: #e9f7e3;
  color: #67a74c;
}
#navigation button:nth-child(4) .nav-symbol {
  background: #e6f0ff;
  color: #4098ff;
}
#navigation button:nth-child(5) .nav-symbol {
  background: #fff5df;
  color: #ffad00;
}
#navigation button:nth-child(6) .nav-symbol {
  background: #f2e5ff;
  color: #ae6de5;
}
#navigation button:last-child {
  grid-column: 1/-1;
}
#navigation button:last-child .nav-symbol {
  background: #e5f4e9;
  color: #288755;
}
.app-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 17px;
}
.text-button {
  color: #64836b;
  background: transparent;
  font-size: 11px;
  display: flex;
  gap: 5px;
  align-items: center;
  padding: 4px 0;
}
.text-button .app-icon {
  width: 14px;
  height: 14px;
}
#connection {
  font-size: 12px;
  color: #84672b;
  line-height: 1.5;
}
#connection:empty {
  display: none;
}
#connection:not(:empty) {
  margin-bottom: 12px;
  background: #fff5de;
  border-radius: 8px;
  padding: 10px;
}
#toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: min(90vw, 430px);
  background: #07532d;
  color: white;
  border-radius: 12px;
  padding: 12px 17px;
  box-shadow: 0 8px 28px #0002;
  z-index: 20;
  display: none;
  font-size: 13px;
  line-height: 1.4;
}
.app-header {
  height: 94px;
  grid-template-columns: 58px 1fr 58px;
}
.brand strong {
  font-size: 39px;
}
.brand small {
  font-size: 12px;
}
.app-header > img {
  width: 58px;
  height: 58px;
}
.app-header #home .app-icon {
  width: 34px;
  height: 34px;
}
#home img {
  width: 50px;
  height: 50px;
}

html.resume-session #welcome {
  display: none !important;
}
html.resume-session #shell[hidden] {
  display: block !important;
}

.field input,
.field select,
.recipe-row input,
.recipe-row select {
  pointer-events: auto;
  user-select: text;
  -webkit-user-select: text;
}
.field input[readonly] {
  cursor: text;
}
/* Posições estáveis: Despesas e Receitas ao lado de Fornecedores, abaixo de Clientes. */
#navigation button[data-id="recipe"] {
  grid-column: 1;
  grid-row: 1;
}
#navigation button[data-id="stock"] {
  grid-column: 2;
  grid-row: 1;
}
#navigation button[data-id="sales"] {
  grid-column: 1;
  grid-row: 2;
}
#navigation button[data-id="clients"] {
  grid-column: 2;
  grid-row: 2;
}
#navigation button[data-id="suppliers"] {
  grid-column: 1;
  grid-row: 3;
}
#navigation button[data-id="fin"] {
  grid-column: 2;
  grid-row: 3;
}
#navigation button[data-id="purchases"] {
  grid-column: 1/-1;
  grid-row: 4;
}
