:root{
  color-scheme:dark;
  --bg:#0d110f;
  --panel:#131816;
  --panel-2:#181f1b;
  --line:#29322d;
  --line-soft:#202823;
  --text:#f5f7f5;
  --muted:#9aa49e;
  --muted-2:#737e77;
  --green:#4f9a45;
  --green-2:#2e6332;
  --green-soft:#18331d;
  --cream:#eee7d8;
  --danger:#c96969;
  font-family:Inter,Segoe UI,system-ui,-apple-system,sans-serif;
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;background:var(--bg);color:var(--text)}
button,input{font:inherit}
a{color:inherit;text-decoration:none}
button{color:inherit}
[hidden]{display:none!important}

.app-shell{display:grid;grid-template-columns:248px minmax(0,1fr);min-height:100vh}
.sidebar{
  position:sticky;top:0;height:100vh;
  display:flex;flex-direction:column;
  background:linear-gradient(180deg,#111613 0%,#0b0f0d 100%);
  border-right:1px solid var(--line);
}
.brand{display:flex;align-items:center;gap:12px;padding:20px 18px 18px;border-bottom:1px solid var(--line-soft)}
.brand-mark{
  width:42px;height:42px;border-radius:12px;
  display:grid;place-items:center;
  background:linear-gradient(135deg,#28472d,#6ea858);
  font-weight:900;font-size:.9rem;
}
.brand-suite{font-size:.65rem;letter-spacing:.13em;color:#aeb8b2}
.brand-name{font-size:1.25rem;font-weight:800;margin-top:2px}
.side-nav{padding:12px 10px;overflow:auto}
.nav-label{padding:18px 12px 7px;color:#68736c;font-size:.7rem;letter-spacing:.12em}
.nav-item{
  width:100%;display:flex;align-items:center;gap:11px;
  border:0;background:transparent;border-radius:9px;
  padding:10px 11px;color:#d7ddd9;text-align:left;cursor:pointer;
}
.nav-item:hover:not(.disabled){background:#172019}
.nav-item.active{background:#244c2b;color:#fff}
.nav-item.disabled{opacity:.42;cursor:default}
.nav-icon{width:20px;text-align:center}
.nav-badge{
  margin-left:auto;min-width:24px;height:22px;padding:0 7px;border-radius:999px;
  display:grid;place-items:center;background:#0d130f;color:#b9c6bd;font-size:.75rem
}
.sidebar-footer{margin-top:auto;border-top:1px solid var(--line-soft);padding:10px}

.main-shell{min-width:0}
.topbar{
  height:58px;display:flex;align-items:center;justify-content:space-between;
  padding:0 22px;background:#0f1411;border-bottom:1px solid var(--line);
  position:sticky;top:0;z-index:20;
}
.topbar-left,.topbar-right{display:flex;align-items:center;gap:14px}
.icon-button{border:0;background:transparent;font-size:1.35rem;cursor:pointer}
.page-title{font-weight:700}

.grocery-account{
  position:relative;
}

.grocery-account__button{
  display:flex;
  align-items:center;
  gap:9px;
  min-height:42px;
  padding:5px 8px;
  border:0;
  border-radius:10px;
  background:transparent;
  color:#dbe2dd;
  cursor:pointer;
}

.grocery-account__button:hover{
  background:#172019;
}

.grocery-account__avatar{
  width:30px;
  height:30px;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:#314238;
  color:#fff;
  font-weight:800;
}

.grocery-account__name{
  font-weight:750;
  white-space:nowrap;
}

.grocery-account__chevron{
  color:#9aa49e;
  font-size:.8rem;
}

.grocery-account__menu{
  position:absolute;
  z-index:1000;
  top:calc(100% + 8px);
  right:0;
  width:250px;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:12px;
  background:#131816;
  box-shadow:0 18px 42px rgba(0,0,0,.42);
}

.grocery-account__identity{
  display:flex;
  flex-direction:column;
  gap:3px;
  padding:15px 16px;
  border-bottom:1px solid var(--line-soft);
}

.grocery-account__identity strong{
  color:#f5f7f5;
}

.grocery-account__identity span{
  overflow:hidden;
  color:#9aa49e;
  font-size:.8rem;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.grocery-account__logout{
  display:block;
  padding:13px 16px;
  color:#dbe2dd;
  font-weight:750;
  text-decoration:none;
}

.grocery-account__logout:hover{
  background:#1b231f;
}

.content{padding:24px;max-width:1500px;margin:0 auto}
.view{animation:fade .15s ease}
@keyframes fade{from{opacity:.55;transform:translateY(2px)}to{opacity:1;transform:none}}

.hero{
  min-height:210px;padding:34px;
  display:flex;justify-content:space-between;align-items:end;gap:30px;
  border:1px solid #344139;border-radius:18px;
  box-shadow:0 18px 60px rgba(0,0,0,.18);
}
.grocery-hero{
  position:relative;
  min-height:305px;
  overflow:hidden;
  isolation:isolate;
  background:#0d120f;
}

/* Put the image across the full hero, then feather its left edge.
   This removes the hard vertical seam while keeping the H-E-B visible. */
.grocery-hero::before{
  content:"";
  position:absolute;
  top:0;
  right:0;
  bottom:0;
  width:70%;
  z-index:-2;
  background:url('/assets/grocery-hero-scene.png') right center / cover no-repeat;

  /* Feather only the LEFT EDGE of the image itself.
     Keeping the image in a 70% pane preserves the earlier scale/composition
     instead of blowing it up to cover the whole hero. */
  -webkit-mask-image:linear-gradient(
    90deg,
    transparent 0%,
    rgba(0,0,0,.18) 4%,
    rgba(0,0,0,.45) 8%,
    rgba(0,0,0,.72) 12%,
    rgba(0,0,0,.92) 16%,
    #000 20%
  );
  mask-image:linear-gradient(
    90deg,
    transparent 0%,
    rgba(0,0,0,.18) 4%,
    rgba(0,0,0,.45) 8%,
    rgba(0,0,0,.72) 12%,
    rgba(0,0,0,.92) 16%,
    #000 20%
  );
}

.hero-overlay{
  position:absolute;
  inset:0;
  z-index:-1;
  background:
    linear-gradient(
      90deg,
      rgba(5,10,7,.98) 0%,
      rgba(5,10,7,.92) 15%,
      rgba(5,10,7,.62) 24%,
      rgba(5,10,7,.26) 31%,
      rgba(5,10,7,.08) 36%,
      rgba(5,10,7,0) 41%
    ),
    linear-gradient(
      0deg,
      rgba(5,10,7,.20) 0%,
      rgba(5,10,7,.01) 48%,
      rgba(5,10,7,.03) 100%
    );
}
.hero-copy{
  max-width:760px;
  position:relative;
  z-index:1;
}
.eyebrow{color:#8fc77e;font-weight:800;letter-spacing:.14em;font-size:.72rem}
.hero h1,.section-heading h1{
  font-size:clamp(2rem,4vw,3.35rem);
  margin:8px 0 6px;
  letter-spacing:-.03em;
}
.hero p,.section-heading p{
  max-width:720px;
  color:#d0d8d2;
  margin:0;
  line-height:1.55;
}
.hero .hero-tagline{
  color:#fff;
  font-weight:800;
  font-size:1.05rem;
  margin-bottom:6px;
}
.hero-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:18px;
}
.hero-motto{
  position:absolute;
  top:28px;
  right:26px;
  display:grid;
  justify-items:end;
  transform:rotate(-3deg);
  font-family:"Segoe Print","Bradley Hand",cursive;
  font-size:clamp(.95rem,1.4vw,1.35rem);
  line-height:1.02;
  color:#ffd982;
  text-shadow:0 2px 8px rgba(0,0,0,.8);
  pointer-events:none;
}
.hero-motto span:nth-child(2){font-size:1.04em}

.btn{
  display:inline-flex;align-items:center;justify-content:center;
  border:1px solid #3a463f;border-radius:10px;padding:11px 15px;
  background:#171d19;color:#fff;font-weight:750;cursor:pointer;
}
.btn.primary{background:#315f35;border-color:#3f7945}
.btn.primary:hover{background:#3a713f}
.btn.secondary:hover{background:#202823}
.btn.small{padding:8px 11px;font-size:.85rem}

.dashboard-grid{display:grid;gap:14px;margin-top:14px}
.top-cards{grid-template-columns:1.35fr .85fr .85fr}
.lower-cards{grid-template-columns:1.45fr .75fr}
.card{
  min-width:0;background:linear-gradient(180deg,#151b17,#111613);
  border:1px solid var(--line);border-radius:14px;padding:18px;
}
.card.wide{min-height:260px}
.card-head{display:flex;justify-content:space-between;gap:15px;align-items:flex-start}
.card-kicker{color:#89958d;font-size:.72rem;letter-spacing:.11em;font-weight:800}
.card h2{font-size:1.2rem;margin:4px 0 0}
.metric-row{display:flex;align-items:baseline;gap:7px;margin-top:7px}
.metric{font-size:2.25rem;font-weight:850;letter-spacing:-.05em}
.metric-unit{color:#929d96}
.muted-metric{opacity:.5}
.submetric{font-size:.86rem;color:#9ca69f;margin-top:4px;line-height:1.4}
.text-button{border:0;background:transparent;color:#87b67b;cursor:pointer;font-weight:700}

.list-preview{margin-top:16px;display:grid;gap:8px}
.preview-row{display:flex;justify-content:space-between;gap:12px;padding:8px 0;border-bottom:1px solid var(--line-soft)}
.preview-row:last-child{border-bottom:0}
.preview-row span:last-child{color:#8e9992;font-size:.84rem}
.empty-state{color:#77827b;font-size:.9rem}
.card-actions{display:flex;gap:8px;margin-top:14px}

.knowledge-bar{height:8px;background:#232d27;border-radius:999px;overflow:hidden;margin:16px 0 14px}
.knowledge-bar span{display:block;height:100%;width:0;background:linear-gradient(90deg,#376d3c,#70a95e);transition:width .2s ease}
.mini-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.mini-grid div{display:grid;gap:2px;padding:10px;background:#101511;border-radius:9px}
.mini-grid strong{font-size:1.1rem}
.mini-grid span{color:#78847c;font-size:.72rem}

.empty-chart,.coming-chart{
  margin-top:18px;border:1px dashed #344038;border-radius:12px;
  min-height:130px;display:grid;place-items:center;color:#657169;
}
.coming-chart{height:190px;position:relative;overflow:hidden}
.chart-grid-lines{
  position:absolute;inset:0;
  background:linear-gradient(to bottom,transparent 24%,#202823 25%,transparent 26%,transparent 49%,#202823 50%,transparent 51%,transparent 74%,#202823 75%,transparent 76%);
}
.chart-empty-message{position:relative;display:grid;text-align:center;gap:5px;max-width:420px;padding:20px}
.chart-empty-message strong{color:#c8d0cb}
.chart-empty-message span{color:#717c75;font-size:.84rem}

.empty-panel{min-height:180px;display:grid;place-items:center;text-align:center;align-content:center;gap:6px;color:#7c8780}
.empty-panel strong{color:#c1cac4}
.empty-panel span{font-size:.82rem;line-height:1.45;max-width:280px}
.empty-icon{font-size:2rem;opacity:.55}

.quick-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:14px}
.quick-action{
  min-height:98px;border:1px solid var(--line);border-radius:12px;background:#101511;
  display:grid;place-items:center;align-content:center;gap:7px;cursor:pointer
}
.quick-action:hover:not(.disabled){background:#19221b}
.quick-action.disabled{opacity:.35;cursor:default}
.quick-icon{font-size:1.5rem}
.learning-feed{display:grid;margin-top:12px}
.learning-row{display:flex;gap:11px;padding:13px 0;border-bottom:1px solid var(--line-soft)}
.learning-row:last-child{border-bottom:0}
.learning-row div{display:grid;gap:3px}
.learning-row span:last-child{color:#7f8b84;font-size:.83rem}
.learning-dot{width:9px;height:9px;border-radius:50%;background:#5b9d4b;margin-top:5px;flex:0 0 auto}

.section-heading{display:flex;justify-content:space-between;align-items:end;gap:24px;margin-bottom:18px}
.planner-layout{display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:14px;align-items:start}
.planner-card{padding:16px}
.desktop-add-form{display:grid;grid-template-columns:1.4fr 1fr auto;gap:10px;align-items:end}
.desktop-add-form label{display:grid;gap:6px;color:#94a098;font-size:.78rem}
.desktop-add-form input{
  width:100%;background:#0f1411;color:#fff;border:1px solid #344039;border-radius:9px;
  padding:11px 12px;outline:none
}
.desktop-add-form input:focus{border-color:#5a8c57;box-shadow:0 0 0 3px rgba(80,130,72,.14)}
.planner-note{margin-top:11px;color:#68746c;font-size:.78rem}
.store-card h2{margin:7px 0 4px}.store-card p{margin:0;color:#89948d}
.store-status{margin-top:16px;display:flex;align-items:center;gap:7px;color:#9eaaa2;font-size:.8rem}
.status-dot{width:8px;height:8px;border-radius:50%;background:#62a953}

.desktop-list-groups{display:grid;gap:12px;margin-top:10px}
.desktop-group{border:1px solid var(--line);border-radius:13px;overflow:hidden;background:#111613}
.desktop-group-header{
  padding:10px 14px;background:#19201b;color:#cbd2cd;
  font-size:.78rem;font-weight:800;letter-spacing:.05em
}
.desktop-item{
  display:grid;grid-template-columns:minmax(0,1fr) 220px auto;align-items:center;gap:16px;
  padding:13px 14px;border-top:1px solid var(--line-soft)
}
.desktop-item:first-of-type{border-top:0}
.item-main{display:grid;gap:3px}
.item-name{font-weight:800}
.item-meta{color:#748078;font-size:.78rem}
.location-stack{display:grid;gap:2px;text-align:right}
.location-value{font-weight:750}
.location-meta{color:#748078;font-size:.75rem}
.remove-button{border:0;background:transparent;color:#77827b;font-size:1.25rem;cursor:pointer}
.remove-button:hover{color:#d17d7d}

@media(max-width:1100px){
  .top-cards,.lower-cards{grid-template-columns:1fr 1fr}
  .top-cards .list-summary-card{grid-column:1/-1}
}
@media(max-width:850px){
  .app-shell{grid-template-columns:1fr}
  .sidebar{
    position:fixed;left:0;top:0;z-index:50;width:248px;transform:translateX(-100%);
    transition:transform .18s ease
  }
  .sidebar.open{transform:none}
  .content{padding:16px}
  .top-cards,.lower-cards,.planner-layout{grid-template-columns:1fr}
  .desktop-add-form{grid-template-columns:1fr}
  .desktop-item{grid-template-columns:1fr auto}
  .location-stack{grid-column:1;text-align:left}
  .remove-button{grid-column:2;grid-row:1/3}
}
@media(max-width:620px){
  .hero{padding:23px;align-items:flex-start;flex-direction:column}
  .grocery-hero{
    min-height:390px;
    background:#0d120f;
  }
  .grocery-hero::before{
    width:88%;
    background-position:right center;
  }
  .hero-overlay{
    background:
      linear-gradient(90deg,rgba(5,10,7,.94) 0%,rgba(5,10,7,.80) 64%,rgba(5,10,7,.24) 100%),
      linear-gradient(0deg,rgba(5,10,7,.78),rgba(5,10,7,.08) 56%);
  }
  .hero-actions{width:100%}.hero-actions .btn{width:100%}
  .hero-motto{top:18px;right:18px;font-size:.92rem}
  .topbar{padding:0 14px}.sync-pill{display:none}
  .content{padding:12px}
  .quick-actions{grid-template-columns:1fr}
  .section-heading{align-items:flex-start;flex-direction:column}
}


/* The approved hero crop already contains the handwritten motto. */
.grocery-hero .hero-motto{display:none}


.store-selector-label{
  display:block;
  margin-top:12px;
  margin-bottom:6px;
  color:#7f8b84;
  font-size:.72rem;
  font-weight:800;
  letter-spacing:.05em
}
.store-selector{
  width:100%;
  background:#0f1411;
  color:#fff;
  border:1px solid #344039;
  border-radius:9px;
  padding:10px 11px;
  outline:none
}
.store-selector:focus{border-color:#5a8c57;box-shadow:0 0 0 3px rgba(80,130,72,.14)}
.store-selector:disabled{opacity:.7}

.estimate-summary{
  margin-top:18px;
  padding-top:15px;
  border-top:1px solid var(--line-soft)
}
.estimate-label{
  color:#78847c;
  font-size:.67rem;
  font-weight:800;
  letter-spacing:.11em
}
.estimate-value{
  margin-top:3px;
  font-size:1.65rem;
  font-weight:850;
  letter-spacing:-.03em
}
.estimate-coverage{
  margin-top:2px;
  color:#7f8b84;
  font-size:.75rem
}

.desktop-item{
  grid-template-columns:minmax(0,1fr) 190px 105px auto
}
.item-product{
  color:#a8b4ad;
  font-size:.76rem;
  margin-top:2px
}
.price-stack{
  display:grid;
  gap:2px;
  text-align:right
}
.price-value{font-weight:800}
.price-meta{color:#748078;font-size:.72rem}

@media(max-width:850px){
  .desktop-item{grid-template-columns:1fr auto}
  .location-stack,.price-stack{grid-column:1;text-align:left}
  .item-actions{grid-column:2;grid-row:1/4}
}


/* Lean shopping-list rows: intent first, detail on demand. */
.desktop-item{
  grid-template-columns:24px minmax(0,1fr) 190px 105px auto;
}
.item-expand-button{
  border:0;
  background:transparent;
  color:#849087;
  font-size:1rem;
  line-height:1;
  padding:4px 0;
  cursor:pointer;
  align-self:center;
}
.item-expand-button:hover{color:#cbd4ce}
.item-detail{
  grid-column:2/-1;
  padding:0 0 10px;
  color:#87938b;
  font-size:.78rem;
  line-height:1.45;
}
.item-detail div+div{margin-top:2px}

@media(max-width:850px){
  .desktop-item{grid-template-columns:24px 1fr auto}
  .item-main{grid-column:2}
  .location-stack,.price-stack{grid-column:2;text-align:left}
  .item-actions{grid-column:3;grid-row:1/4}
  .item-detail{grid-column:2/-1}
}


/* Receipt reconciliation */
.receipt-layout{
  display:grid;
  grid-template-columns:minmax(0,1fr) 330px;
  gap:14px;
}
.receipt-import-form{display:grid;gap:14px;margin-top:14px}
.receipt-form-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
}
.receipt-import-form label{display:grid;gap:6px;color:#94a098;font-size:.78rem}
.receipt-import-form input,
.receipt-import-form textarea,
.receipt-import-form select{
  width:100%;
  background:#0f1411;
  color:#fff;
  border:1px solid #344039;
  border-radius:9px;
  padding:11px 12px;
  outline:none;
}
.receipt-import-form textarea{
  resize:vertical;
  min-height:210px;
  line-height:1.45;
}
.receipt-import-form input:focus,
.receipt-import-form textarea:focus,
.receipt-import-form select:focus{
  border-color:#5a8c57;
  box-shadow:0 0 0 3px rgba(80,130,72,.14)
}
.receipt-lines-label{margin-top:2px}
.receipt-import-actions{display:flex;gap:10px;flex-wrap:wrap}
.receipt-summary-card{align-self:start}
.receipt-preview-empty{margin-top:14px;color:#7f8b84;line-height:1.5}
.receipt-summary-grid{display:grid;gap:10px;margin-top:14px}
.receipt-summary-row{
  display:flex;justify-content:space-between;gap:14px;
  padding:9px 0;border-bottom:1px solid var(--line-soft)
}
.receipt-summary-row:last-child{border-bottom:0}
.receipt-summary-row span{color:#88938c}
.receipt-summary-row strong{text-align:right}
.receipt-apply-button{width:100%;margin-top:16px}
.receipt-apply-button:disabled{opacity:.45;cursor:default}
.receipt-reconciliation-host{display:grid;gap:14px;margin-top:14px}
.receipt-reconciliation-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}
.receipt-result-card h2{margin:4px 0 0}
.receipt-result-list{display:grid;margin-top:12px}
.receipt-result-row{
  display:flex;justify-content:space-between;gap:16px;
  padding:10px 0;border-top:1px solid var(--line-soft)
}
.receipt-result-row:first-child{border-top:0}
.receipt-result-main{display:grid;gap:3px}
.receipt-result-name{font-weight:800}
.receipt-result-meta{color:#7d8981;font-size:.78rem}
.receipt-result-value{white-space:nowrap;text-align:right;color:#b8c2bb}
.receipt-pill{
  display:inline-flex;align-items:center;border:1px solid #3a463f;border-radius:999px;
  padding:4px 8px;font-size:.72rem;color:#b9c4bd;background:#111713
}
.receipt-pill.good{border-color:#315f35;color:#9fd493;background:#152419}
.receipt-pill.warn{border-color:#6a5730;color:#e3c47d;background:#241f13}
.receipt-pill.bad{border-color:#6b3c3c;color:#df9c9c;background:#241717}
.receipt-banner{
  padding:13px 14px;border-radius:11px;border:1px solid var(--line);
  background:#111713;color:#aeb8b2
}
.receipt-banner.success{border-color:#315f35;background:#142219;color:#a8d59e}
.receipt-banner.error{border-color:#6b3c3c;background:#251818;color:#e2abab}
.receipt-empty-list{color:#6f7a73;font-size:.85rem;padding-top:10px}

@media(max-width:1000px){
  .receipt-layout,.receipt-reconciliation-grid{grid-template-columns:1fr}
  .receipt-form-grid{grid-template-columns:1fr 1fr}
}
@media(max-width:620px){
  .receipt-form-grid{grid-template-columns:1fr}
}


/* Receipt scan-to-form helper */
.receipt-scan-strip{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:12px 18px;
  align-items:center;
  margin-top:14px;
  margin-bottom:14px;
  padding:13px 14px;
  border:1px solid var(--line);
  border-radius:11px;
  background:#101511;
}
.receipt-scan-copy{display:grid;gap:3px}
.receipt-scan-copy strong{font-size:.92rem}
.receipt-scan-copy span{color:#7f8b84;font-size:.78rem;line-height:1.4}
.receipt-scan-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.receipt-scan-status{
  grid-column:1/-1;
  color:#77827b;
  font-size:.76rem;
}
.receipt-scan-status.working{color:#d8c37d}
.receipt-scan-status.success{color:#8fc77e}
.receipt-scan-status.error{color:#d58a8a}

@media(max-width:720px){
  .receipt-scan-strip{grid-template-columns:1fr}
  .receipt-scan-actions{justify-content:stretch}
  .receipt-scan-actions .btn{flex:1}
}

/* Manual receipt-line matching */
.receipt-match-button{
  margin-top:7px;
  border:1px solid #4a5a50;
  border-radius:8px;
  padding:6px 9px;
  background:#161d19;
  color:#d7ded9;
  font-size:.74rem;
  font-weight:750;
  cursor:pointer;
}
.receipt-match-button:hover{background:#202923}

.receipt-match-dialog{
  width:min(92vw,480px);
  border:1px solid #344139;
  border-radius:16px;
  padding:0;
  color:var(--text);
  background:linear-gradient(180deg,#171e19,#101511);
  box-shadow:0 24px 80px rgba(0,0,0,.5);
}
.receipt-match-dialog::backdrop{
  background:rgba(0,0,0,.68);
  backdrop-filter:blur(3px);
}
.receipt-match-dialog form{
  display:block;
  padding:22px;
  background:transparent;
}
.receipt-match-dialog h2{
  margin:7px 0 8px;
  font-size:1.35rem;
}
.receipt-match-dialog p{
  margin:0 0 18px;
  color:#aeb8b2;
  line-height:1.5;
}
.receipt-match-dialog label{
  display:grid;
  gap:7px;
  color:#94a098;
  font-size:.78rem;
}
.receipt-match-dialog select{
  width:100%;
  padding:11px 12px;
  border:1px solid #344039;
  border-radius:9px;
  background:#0f1411;
  color:#fff;
  outline:none;
}
.receipt-match-dialog select:focus{
  border-color:#5a8c57;
  box-shadow:0 0 0 3px rgba(80,130,72,.14);
}



/* Grocery-styled receipt confirmation modal */
body.modal-open{overflow:hidden}

.modal-backdrop{
  position:fixed;
  inset:0;
  z-index:1000;
  display:grid;
  place-items:center;
  padding:20px;
  background:rgba(0,0,0,.68);
  backdrop-filter:blur(3px);
}

.modal-card{
  width:min(100%,460px);
  border:1px solid #344139;
  border-radius:16px;
  padding:22px;
  background:linear-gradient(180deg,#171e19,#101511);
  box-shadow:0 24px 80px rgba(0,0,0,.5);
}

.modal-kicker{
  color:#8fc77e;
  font-size:.7rem;
  font-weight:800;
  letter-spacing:.13em;
}

.modal-card h2{
  margin:7px 0 8px;
  font-size:1.45rem;
}

.modal-card p{
  margin:0;
  color:#aeb8b2;
  line-height:1.55;
}

.modal-actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top:22px;
}

@media(max-width:520px){
  .modal-backdrop{align-items:end;padding:12px}
  .modal-card{width:100%;border-radius:16px}
  .modal-actions{display:grid;grid-template-columns:1fr 1fr}
}

/* Compact estimate row so the shopping list can start higher on the page. */
.estimate-strip{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  margin-top:10px;
  padding:11px 14px;
  border:1px solid var(--line);
  border-radius:12px;
  background:linear-gradient(180deg,#151b17,#111613);
}
.estimate-strip .estimate-label{margin:0}
.estimate-strip .estimate-coverage{margin-top:2px}
.estimate-strip .estimate-value{
  margin:0;
  flex:0 0 auto;
  font-size:1.45rem;
}

/* Compact Things We Need header/actions */
.section-heading-actions{
  display:flex;
  align-items:stretch;
  gap:10px;
  flex:0 0 auto;
}
.header-estimate-tile{
  min-width:190px;
  padding:9px 13px;
  border:1px solid var(--line);
  border-radius:11px;
  background:linear-gradient(180deg,#151b17,#111613);
  display:grid;
  align-content:center;
}
.header-estimate-tile .estimate-label{font-size:.62rem}
.header-estimate-tile .estimate-value{
  margin-top:1px;
  font-size:1.35rem;
  line-height:1.1;
}
.header-estimate-tile .estimate-coverage{
  margin-top:2px;
  font-size:.68rem;
}
.section-heading-actions .btn{
  align-self:stretch;
  white-space:nowrap;
}

/* Current Store only needs the planning selector now. */
.store-card{
  padding-bottom:16px;
}
.store-card .store-selector{
  margin-bottom:0;
}

/* Previous full-width estimate strip is no longer used. */
.estimate-strip{display:none}

@media(max-width:850px){
  .section-heading-actions{
    width:100%;
  }
  .header-estimate-tile{
    flex:1 1 auto;
  }
}

@media(max-width:620px){
  .section-heading-actions{
    display:grid;
    grid-template-columns:1fr;
  }
  .section-heading-actions .btn{
    width:100%;
  }
}

