:root{
  --blue:#0A3A5D;
  --blue-2:#10547c;
  --coral:#EB7D5C;
  --yellow:#F4B026;
  --aqua:#5F9595;
  --sky:#98BED5;
  --cream:#F3E6DF;
  --paper:#fffaf6;
  --ink:#17364c;
  --muted:#738491;
  --line:#eadfd8;
  --shadow:0 14px 38px rgba(10,58,93,.13);
}

*{box-sizing:border-box}

html{background:#dce9ef}

body{
  margin:0;
  color:var(--ink);
  font-family:"DM Sans",sans-serif;
  background:linear-gradient(145deg,#e9f2f5,#d7e5ea);
}

button,input,textarea{font:inherit}
button{cursor:pointer}
.hidden-input{display:none}

.app-shell{
  min-height:100vh;
  display:flex;
  justify-content:center;
}

.phone{
  width:100%;
  max-width:430px;
  min-height:100vh;
  background:var(--paper);
  position:relative;
  overflow:hidden;
  padding-bottom:92px;
  box-shadow:0 0 60px rgba(10,58,93,.13);
}

.topbar{
  height:76px;
  background:var(--cream);
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px 20px;
  border-bottom:1px solid rgba(10,58,93,.08);
}

.brand{
  border:0;
  background:none;
  color:var(--blue);
  display:flex;
  align-items:center;
  gap:9px;
  padding:0;
  font-family:"Poppins",sans-serif;
  font-size:23px;
  font-weight:700;
  letter-spacing:-1px;
}

.brand-icon{
  width:46px;
  height:46px;
  border-radius:12px;

  background-color:var(--cream);
  background-image:url("assets/refill-logo.png");
  background-size:contain;
  background-position:center;
  background-repeat:no-repeat;

  box-shadow:none;
  flex-shrink:0;
}

.header-actions{
  display:flex;
  gap:8px;
}

.tip-shortcut,.avatar{
  width:38px;
  height:38px;
  border:0;
  border-radius:50%;
  background:#fff;
  color:var(--blue);
  font-weight:700;
  box-shadow:0 4px 12px rgba(10,58,93,.09);
}

.tip-shortcut{
  color:var(--aqua);
  font-size:20px;
}

.hero{
  background:var(--blue);
  color:#fff;
  padding:22px 22px 31px;
  border-radius:0 0 30px 30px;
  position:relative;
  overflow:hidden;
}

.hero:after{
  content:"";
  position:absolute;
  width:150px;
  height:150px;
  border-radius:50%;
  background:rgba(152,190,213,.13);
  right:-65px;
  top:-65px;
}

.eyebrow{
  color:var(--yellow);
  font-size:9px;
  font-weight:700;
  letter-spacing:1.5px;
}

.eyebrow.dark{color:var(--aqua)}

h1,h2,h3{
  font-family:"Poppins",sans-serif;
}

.hero h1{
  font-size:30px;
  line-height:1.13;
  letter-spacing:-1px;
  margin:8px 0 6px;
}

.hero p{
  color:#d6e5ee;
  font-size:13px;
  margin:0 0 20px;
}

.scan-card{
  position:relative;
  z-index:1;
  border:0;
  width:100%;
  border-radius:20px;
  background:var(--yellow);
  color:var(--blue);
  display:flex;
  align-items:center;
  gap:13px;
  text-align:left;
  padding:15px;
  box-shadow:0 12px 27px rgba(3,28,46,.28);
}

.scan-icon{
  width:45px;
  height:45px;
  border:1px dashed rgba(10,58,93,.65);
  border-radius:13px;
  display:grid;
  place-items:center;
  font-size:24px;
}

.scan-copy{
  display:flex;
  flex-direction:column;
  flex:1;
  gap:2px;
}

.scan-copy strong{
  font-family:"Poppins",sans-serif;
  font-size:14px;
}

.scan-copy small{
  font-size:10px;
  color:#5d5c45;
}

.arrow{font-size:25px}

.content,.screen{
  padding:21px 20px;
}

.screen{
  padding-top:26px;
  min-height:calc(100vh - 76px);
}

.summary-row{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}

.summary{
  border:1px solid var(--line);
  border-radius:17px;
  background:#fff;
  padding:13px;
  display:flex;
  align-items:center;
  gap:10px;
}

.summary-icon{
  width:36px;
  height:36px;
  display:grid;
  place-items:center;
  border-radius:11px;
  background:#e2f0ee;
  color:var(--aqua);
  font-weight:800;
}

.summary-icon.blue{
  background:#e7f1f7;
  color:var(--blue);
}

.summary div{
  display:flex;
  flex-direction:column;
}

.summary b{font-size:15px}

.summary small{
  font-size:8px;
  color:var(--muted);
}

.section-heading,.screen-title{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  margin:24px 1px 12px;
}

.screen-title{
  align-items:flex-start;
  margin:5px 0 19px;
}

.section-heading h2{
  margin:4px 0 0;
  font-size:19px;
}

.section-heading button{
  border:0;
  background:none;
  color:var(--coral);
  font-size:10px;
  font-weight:700;
}

.screen-title h1{
  font-size:28px;
  line-height:1.1;
  letter-spacing:-1px;
  margin:0 0 4px;
}

.screen-title p{
  margin:0;
  color:var(--muted);
  font-size:10px;
}

.item-list{
  display:flex;
  flex-direction:column;
  gap:9px;
}

.item{
  background:#fff;
  border:1px solid var(--line);
  border-radius:17px;
  padding:11px;
  display:flex;
  align-items:center;
  gap:11px;
}

.food-icon{
  width:46px;
  height:46px;
  border-radius:13px;
  background:var(--cream);
  display:grid;
  place-items:center;
  font-size:24px;
  flex:0 0 auto;
}

.item-info{
  min-width:0;
  flex:1;
  display:flex;
  flex-direction:column;
}

.item-info strong{font-size:12px}

.item-info small{
  color:var(--muted);
  font-size:9px;
  margin-top:2px;
}

.fresh-row{
  margin-top:6px;
  display:flex;
  align-items:center;
  gap:7px;
}

.fresh-row span{
  font-size:7px;
  font-weight:700;
}

.ok{color:var(--aqua)}
.danger{color:var(--coral)}

.bar{
  height:4px;
  width:48px;
  background:#edf0ed;
  border-radius:3px;
  overflow:hidden;
}

.bar i{
  display:block;
  height:100%;
  background:var(--aqua);
}

.qty{
  min-width:35px;
  text-align:center;
  display:flex;
  flex-direction:column;
}

.qty b{font-size:16px}

.qty small{
  font-size:7px;
  color:var(--muted);
}

.edit-button{
  border:0;
  background:none;
  color:#8b9aa4;
  font-weight:800;
  padding:5px;
}

.recipe-teaser,.daily-tip{
  width:100%;
  margin-top:13px;
  border:0;
  border-radius:17px;
  padding:14px;
  color:var(--ink);
  display:flex;
  align-items:center;
  gap:11px;
  text-align:left;
}

.recipe-teaser{background:#e5f0f3}

.daily-tip{
  background:#fff7dc;
  border:1px solid #f1deb1;
}

.recipe-teaser>span:nth-child(2),.daily-tip div{
  display:flex;
  flex-direction:column;
  flex:1;
  gap:3px;
}

.spark{
  width:38px;
  height:38px;
  border-radius:12px;
  background:var(--blue);
  color:var(--yellow);
  display:grid;
  place-items:center;
}

.recipe-teaser small,.daily-tip small{
  font-size:7px;
  color:var(--aqua);
  font-weight:800;
  letter-spacing:.7px;
}

.recipe-teaser strong,.daily-tip b{font-size:10px}

.search{
  height:44px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:14px;
  display:flex;
  align-items:center;
  gap:9px;
  padding:0 13px;
}

.search input{
  flex:1;
  border:0;
  outline:0;
  background:transparent;
  font-size:11px;
}

.filter-row{
  display:flex;
  gap:7px;
  overflow:auto;
  margin:13px 0 16px;
}

.filter-row button{
  border:1px solid var(--line);
  background:#fff;
  color:#71828e;
  border-radius:999px;
  padding:8px 13px;
  font-size:9px;
  white-space:nowrap;
}

.filter-row .selected{
  background:var(--blue);
  color:#fff;
  border-color:var(--blue);
}

.add-button{
  width:43px;
  height:43px;
  border:0;
  border-radius:14px;
  background:var(--coral);
  color:#fff;
  font-size:24px;
}

.manual-add{
  margin-top:13px;
  width:100%;
  border:1px dashed var(--sky);
  border-radius:15px;
  background:transparent;
  padding:13px;
  color:var(--blue);
  font-size:10px;
  font-weight:700;
}

.ai-badge,.leaf-badge{
  border-radius:12px;
  background:#e4eff2;
  color:var(--blue);
  padding:9px 11px;
  font-size:10px;
  font-weight:800;
}

.prompt-box{
  padding:13px;
  background:var(--blue);
  color:#fff;
  border-radius:17px;
  display:flex;
  gap:10px;
  align-items:center;
}

.prompt-box div{
  display:flex;
  flex-direction:column;
  flex:1;
  gap:3px;
}

.prompt-box b{font-size:11px}

.prompt-box small{
  color:#c7dce8;
  font-size:8px;
}

.prompt-box button{
  border:0;
  background:var(--yellow);
  color:var(--blue);
  border-radius:9px;
  padding:8px 10px;
  font-size:8px;
  font-weight:800;
}

.recipe-list{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.recipe-card{
  border-radius:19px;
  overflow:hidden;
  background:#fff;
  border:1px solid var(--line);
  display:grid;
  grid-template-columns:112px 1fr;
  min-height:132px;
}

.recipe-art{
  position:relative;
  display:grid;
  place-items:center;
  font-size:53px;
  background:var(--cream);
}

.recipe-art span{
  position:absolute;
  left:7px;
  bottom:7px;
  background:var(--blue);
  color:#fff;
  border-radius:6px;
  padding:4px 6px;
  font-size:7px;
}

.recipe-body{padding:12px}

.recipe-body>small{
  color:var(--muted);
  font-size:8px;
}

.recipe-body h3{
  font-size:13px;
  margin:5px 0 8px;
}

.recipe-body p{
  font-size:8px;
  margin:0 0 7px;
  font-weight:700;
}

.recipe-body button{
  border:0;
  background:none;
  color:var(--coral);
  font-size:8px;
  font-weight:800;
  padding:0;
}

.shopping-summary{
  display:flex;
  align-items:center;
  gap:10px;
  background:var(--blue);
  color:#fff;
  border-radius:18px;
  padding:15px;
  margin-bottom:13px;
}

.shopping-summary div{
  display:flex;
  flex-direction:column;
  flex:1;
  gap:3px;
}

.shopping-summary b{font-size:11px}

.shopping-summary small{
  color:#c8dce7;
  font-size:8px;
}

.shopping-summary strong{
  color:var(--yellow);
  font-size:10px;
}

.location{
  display:flex;
  align-items:center;
  gap:9px;
  border:1px solid var(--line);
  background:#fff;
  border-radius:14px;
  padding:11px;
}

.location div{
  flex:1;
  display:flex;
  flex-direction:column;
}

.location small{
  font-size:7px;
  color:var(--muted);
}

.location b{font-size:9px}

.location button{
  border:0;
  background:none;
  color:var(--coral);
  font-size:8px;
  font-weight:800;
}

.store-heading{
  display:flex;
  justify-content:space-between;
  align-items:end;
  margin:22px 1px 11px;
}

.store-heading h2{
  margin:0;
  font-size:16px;
}

.store-heading small{
  font-size:7px;
  color:var(--muted);
}

.store-list{
  display:flex;
  flex-direction:column;
  gap:9px;
}

.store{
  display:grid;
  grid-template-columns:62px 1fr auto;
  align-items:center;
  gap:10px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:16px;
  padding:10px;
}

.store-logo{
  width:60px;
  height:48px;
  border-radius:10px;
  border:1px solid #eef0f2;
  background:#fff;
  object-fit:contain;
  padding:5px;
}

.store div{
  display:flex;
  flex-direction:column;
  gap:4px;
}

.store div b{font-size:11px}

.store div small{
  color:var(--muted);
  font-size:7px;
}

.store>strong{font-size:10px}

.store button{
  grid-column:3;
  border:0;
  border-radius:8px;
  background:#e7f0f3;
  color:var(--blue);
  padding:6px 8px;
  font-size:7px;
  font-weight:800;
}

.regional{color:var(--coral)!important}

.tip-feature{
  background:var(--blue);
  color:#fff;
  border-radius:22px;
  padding:22px;
  position:relative;
  overflow:hidden;
}

.tip-feature>small{
  color:var(--yellow);
  font-size:7px;
  letter-spacing:1px;
  font-weight:800;
}

.tip-feature h2{
  font-size:20px;
  margin:8px 0;
}

.tip-feature p{
  color:#d4e4ec;
  font-size:10px;
  line-height:1.55;
}

.tip-result{
  background:rgba(255,255,255,.1);
  border-radius:11px;
  padding:10px;
  display:flex;
  justify-content:space-between;
  font-size:8px;
}

.tip-result span{
  color:var(--yellow);
  font-weight:700;
}

.more-title{
  font-size:16px;
  margin:22px 0 11px;
}

.tips-list{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.tip-card{
  display:flex;
  gap:12px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:17px;
  padding:14px;
}

.tip-card>span{
  width:42px;
  height:42px;
  border-radius:12px;
  background:var(--cream);
  display:grid;
  place-items:center;
  font-size:23px;
  flex:0 0 auto;
}

.tip-card h3{
  font-size:11px;
  margin:1px 0 5px;
}

.tip-card p{
  color:var(--muted);
  font-size:8px;
  line-height:1.45;
  margin:0 0 6px;
}

.tip-card small{
  color:var(--aqua);
  font-size:7px;
  font-weight:800;
}

.bottom-nav{
  position:fixed;
  bottom:0;
  left:50%;
  transform:translateX(-50%);
  width:100%;
  max-width:430px;
  height:80px;
  background:rgba(255,250,246,.96);
  border-top:1px solid var(--line);
  display:grid;
  grid-template-columns:repeat(5,1fr);
  align-items:center;
  padding:5px 8px 10px;
  z-index:20;
  backdrop-filter:blur(12px);
}

.bottom-nav button{
  border:0;
  background:none;
  color:#93a1aa;
  font-size:8px;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:5px;
}

.bottom-nav button span{font-size:19px}

.bottom-nav .active{
  color:var(--blue);
  font-weight:700;
}

.bottom-nav .center-action{
  width:56px;
  height:56px;
  justify-self:center;
  border-radius:18px;
  background:var(--coral);
  color:#fff;
  transform:translateY(-14px);
  box-shadow:0 9px 20px rgba(235,125,92,.35);
}

.bottom-nav .center-action span{font-size:25px}

.overlay{
  position:fixed;
  inset:0;
  z-index:50;
  background:rgba(10,58,93,.96);
  color:#fff;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:35px;
}

.receipt-preview{
  width:150px;
  height:190px;
  border:2px solid var(--yellow);
  border-radius:15px;
  overflow:hidden;
  background:#fff;
  position:relative;
}

.receipt-preview img{
  width:100%;
  height:100%;
  object-fit:cover;
  opacity:.72;
}

.scan-line{
  position:absolute;
  left:8px;
  right:8px;
  height:3px;
  background:var(--yellow);
  box-shadow:0 0 13px var(--yellow);
  animation:scan 1.25s ease-in-out infinite;
}

.overlay h3{
  font-size:18px;
  margin:20px 0 7px;
}

.overlay p{
  color:#cbdde7;
  font-size:11px;
  max-width:285px;
}

.progress{
  width:230px;
  height:7px;
  border-radius:10px;
  background:rgba(255,255,255,.15);
  overflow:hidden;
  margin-top:8px;
}

.progress i{
  display:block;
  height:100%;
  width:5%;
  background:var(--yellow);
  transition:width .25s;
}

.modal-backdrop{
  position:fixed;
  inset:0;
  z-index:60;
  background:rgba(7,38,59,.78);
  display:flex;
  align-items:flex-end;
  justify-content:center;
  padding:12px;
}

.modal{
  width:100%;
  max-width:405px;
  max-height:92vh;
  overflow:auto;
  background:var(--paper);
  border-radius:25px;
  padding:24px 19px 19px;
  position:relative;
}

.modal-x{
  position:absolute;
  right:14px;
  top:12px;
  width:31px;
  height:31px;
  border:0;
  border-radius:50%;
  background:var(--cream);
  color:var(--blue);
  font-size:19px;
}

.modal h2{
  font-size:20px;
  margin:5px 35px 5px 0;
}

.modal-intro{
  font-size:9px;
  color:var(--muted);
  margin:0 0 14px;
  line-height:1.4;
}

.modal label{
  display:flex;
  flex-direction:column;
  gap:5px;
  font-size:8px;
  font-weight:800;
  color:#617681;
  margin-top:9px;
}

.modal input,.modal textarea{
  border:1px solid var(--line);
  border-radius:10px;
  background:#fff;
  padding:11px;
  outline:0;
  color:var(--ink);
}

.modal input:focus,.modal textarea:focus{
  border-color:var(--sky);
  box-shadow:0 0 0 3px rgba(152,190,213,.2);
}

.form-row{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:9px;
}

.primary-button{
  width:100%;
  margin-top:13px;
  border:0;
  border-radius:13px;
  background:var(--blue);
  color:#fff;
  padding:13px;
  font-size:10px;
  font-weight:800;
}

.secondary-button{
  width:100%;
  margin-top:9px;
  border:1px solid var(--sky);
  border-radius:13px;
  background:#fff;
  color:var(--blue);
  padding:11px;
  font-size:9px;
  font-weight:800;
}

.delete-button{
  width:100%;
  margin-top:8px;
  border:0;
  background:none;
  color:var(--coral);
  padding:8px;
  font-size:9px;
  font-weight:800;
}

.review-head{
  display:grid;
  grid-template-columns:1fr 62px 74px 28px;
  gap:6px;
  color:var(--muted);
  font-size:7px;
  font-weight:800;
  margin:13px 1px 5px;
}

.review-row{
  display:grid;
  grid-template-columns:1fr 62px 74px 28px;
  gap:6px;
  margin-bottom:7px;
}

.review-row input{
  min-width:0;
  padding:9px 7px;
  font-size:9px;
}

.remove-row{
  border:0;
  border-radius:9px;
  background:#fde9e3;
  color:var(--coral);
  font-weight:900;
}

.scan-note{
  background:#e8f1f4;
  border-radius:12px;
  padding:9px;
  color:var(--blue);
  font-size:8px;
  line-height:1.4;
}

.ocr-warning{
  background:#fff1eb;
  color:#9c4b35;
}

.raw-details{
  margin-top:10px;
  font-size:8px;
  color:var(--muted);
}

.raw-details textarea{
  width:100%;
  height:80px;
  resize:vertical;
  margin-top:7px;
  font-size:8px;
}

.review-total{
  display:flex;
  justify-content:space-between;
  margin:11px 2px 0;
  font-size:10px;
}

.review-total strong{color:var(--coral)}

.toast{
  position:fixed;
  z-index:80;
  bottom:91px;
  left:50%;
  transform:translateX(-50%);
  background:var(--blue);
  color:#fff;
  border-radius:999px;
  padding:10px 17px;
  font-size:9px;
  font-weight:700;
  white-space:nowrap;
  box-shadow:var(--shadow);
}

@keyframes scan{
  0%,100%{top:11px}
  50%{top:174px}
}

@media(min-width:700px){
  .phone{
    min-height:900px;
    margin:28px 0;
    border-radius:34px;
  }

  .bottom-nav{
    bottom:28px;
    border-radius:0 0 34px 34px;
  }

  .modal-backdrop{
    align-items:center;
  }

  .modal{
    border-radius:25px;
  }
}

@media(max-width:360px){
  .store{
    grid-template-columns:54px 1fr auto;
  }

  .store-logo{
    width:52px;
  }

  .review-head,.review-row{
    grid-template-columns:1fr 52px 68px 27px;
  }
}