:root {
    --green: #22c55e;
    --green2: #16a34a;
    --soft: #f6f8fb;
    --text: #111827;
    --muted: #6b7280;
    --card: #fff;
    --line: #e5e7eb;
    --orange: #f97316;
    --purple: #a855f7;
    --blue: #38bdf8;
    --red: #ef4444;
    --shadow: 0 12px 30px rgba(15, 23, 42, .08);
    --radius: 18px;
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    background: var(--soft);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--text)
}

.app {
    max-width: 460px;
    margin: 0 auto;
    min-height: 100vh;
    background: #fff;
    box-shadow: 0 0 40px rgba(0, 0, 0, .06);
    padding-bottom: 86px
}

header {
    position: sticky;
    top: 0;
    z-index: 5;
    background: #fff;
    padding: 18px 18px 10px;
    border-bottom: 1px solid rgba(229, 231, 235, .7)
}

header h1 {
    font-size: 21px;
    margin: 0;
    font-weight: 850
}

.sub {
    font-size: 12px;
    color: var(--muted);
    margin-top: 4px
}

main {
    padding: 16px
}

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 14px;
    box-shadow: var(--shadow)
}

.hero {
    background: linear-gradient(135deg, var(--green), var(--green2));
    color: #fff;
    border: 0
}

.row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px
}

.grid2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px
}

.big {
    font-size: 32px;
    font-weight: 950;
    line-height: 1
}

.kcal {
    font-size: 24px;
    font-weight: 950
}

.muted {
    color: var(--muted)
}

.small {
    font-size: 12px
}

.tag {
    padding: 5px 9px;
    border-radius: 999px;
    background: #eef2ff;
    font-size: 12px;
    font-weight: 750
}

.btn {
    border: 0;
    border-radius: 14px;
    padding: 13px 14px;
    font-weight: 850;
    background: var(--green);
    color: #fff;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center
}

.btn.block {
    width: 100%
}

.btn.light {
    background: #f3f4f6;
    color: #111827
}

.btn.red {
    background: #fff;
    color: var(--red);
    border: 1px solid #fecaca
}

input,
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #fff;
    font-size: 14px
}

label {
    display: block;
    font-size: 12px;
    font-weight: 800;
    margin: 10px 0 5px;
    color: #374151
}

textarea {
    min-height: 75px;
    resize: vertical
}

.item {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    margin-bottom: 10px
}

.thumb {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, #fef3c7, #dcfce7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 27px
}

.item-title {
    font-weight: 850;
    font-size: 14px
}

.item-desc {
    font-size: 12px;
    color: var(--muted);
    margin-top: 3px;
    line-height: 1.35
}

.meal {
    border-left: 5px solid var(--green)
}

.meal.orange {
    border-left-color: var(--orange)
}

.meal.purple {
    border-left-color: var(--purple)
}

.meal.blue {
    border-left-color: var(--blue)
}

.meal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 900;
    margin-bottom: 8px
}

.meal-line {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 0;
    font-size: 13px;
    border-bottom: 1px dashed #eee
}

.bottom {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 100%;
    max-width: 460px;
    background: #fff;
    border-top: 1px solid var(--line);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    padding: 7px 4px
}

.nav {
    color: #6b7280;
    font-size: 10px;
    font-weight: 750;
    padding: 6px 2px;
    text-decoration: none;
    text-align: center
}

.nav span {
    display: block;
    font-size: 21px;
    margin-bottom: 2px
}

.nav.active {
    color: var(--green)
}

canvas {
    width: 100%;
    height: 180px
}

.back {
    display: inline-block;
    margin-bottom: 12px;
    color: #111827;
    text-decoration: none;
    background: #f3f4f6;
    border-radius: 12px;
    padding: 8px 12px;
    font-weight: 850
}

.report {
    display: flex;
    gap: 13px;
    align-items: center;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 16px;
    margin-bottom: 11px;
    background: #fff;
    text-decoration: none;
    color: var(--text)
}

.reportIcon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 21px;
    flex: 0 0 auto
}

@media(max-width:430px) {
    .grid2 {
        grid-template-columns: 1fr
    }

    .app {
        box-shadow: none
    }
}

.total-dia-fixo {
    position: fixed;
    left: 50%;
    bottom: 76px;
    transform: translateX(-50%);
    width: calc(100% - 28px);
    max-width: 430px;
    background: #dcfce7;
    color: #166534;
    border-radius: 12px;
    padding: 10px 14px;
    box-shadow: 0 8px 22px rgba(22, 163, 74, .22);
    z-index: 20;
}

.total-dia-fixo div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-right: 58px;
    font-size: 13px;
}

.total-dia-fixo strong {
    font-size: 14px;
}

.btn-add-flutuante {
    position: absolute;
    right: -2px;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #22c55e;
    color: #fff;
    text-decoration: none;
    font-size: 32px;
    line-height: 43px;
    text-align: center;
    box-shadow: 0 8px 22px rgba(22, 163, 74, .35);
    font-weight: 400;
}

.total-plano-fixo {
  position: fixed;
  left: 50%;
  bottom: 76px;
  transform: translateX(-50%);
  width: calc(100% - 28px);
  max-width: 430px;
  background: #dcfce7;
  color: #166534;
  border-radius: 12px;
  padding: 10px 14px;
  box-shadow: 0 8px 22px rgba(22, 163, 74, .22);
  z-index: 20;
}

.total-plano-linha {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.total-plano-linha strong {
  font-size: 14px;
  white-space: nowrap;
}

.barra-plano {
  height: 8px;
  background: rgba(22, 101, 52, .18);
  border-radius: 999px;
  overflow: hidden;
}

.barra-plano span {
  display: block;
  height: 100%;
  background: #22c55e;
  border-radius: 999px;
}

.card-plano-hoje {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-color: #fed7aa;
}

.progresso-circular {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background:
    conic-gradient(
      #22c55e calc(var(--percentual) * 1%),
      #e5e7eb 0
    );
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.progresso-circular div {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 17px;
}

.card-meta-peso {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.meta-direita {
  text-align: right;
}

.meta-faltam {
  font-size: 16px;
  font-weight: 900;
  color: #22c55e;
  margin-bottom: 4px;
}

.card-grafico-peso canvas {
  height: 190px;
  margin-top: 8px;
}

.btn-add-padrao {
  position: fixed;
  right: calc(50% - 205px);
  bottom: 70px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #22c55e;
  color: #fff;
  text-decoration: none;
  font-size: 32px;
  line-height: 43px;
  text-align: center;
  box-shadow: 0 8px 22px rgba(22, 163, 74, .35);
  font-weight: 400;
  z-index: 999;
}

@media(max-width:430px) {
  .btn-add-padrao {
    right: 16px;
  }
}

.status-alimento {
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  min-width: 72px;
  text-align: center;
}

.status-alimento.ativo {
  background: #dcfce7;
  color: #166534;
}

.status-alimento.inativo {
  background: #fee2e2;
  color: #991b1b;
}

.status-calorias {
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: #fee2e2;
  color: #991b1b;
  white-space: nowrap;
}

.barra-comparativo {
  height: 9px;
  background: rgba(22, 101, 52, .14);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 12px;
}

.barra-comparativo span {
  display: block;
  height: 100%;
  background: #22c55e;
  border-radius: 999px;
}

.header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.btn-logout-top {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 12px;
  background: #f3f4f6;
  color: #6b7280;
  text-decoration: none;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 16px;
  font-weight: 700;

  border: 1px solid #e5e7eb;
}