/* ==========================================================================
   modules/haat/haat.css — Haat Point (v121)
   Customer pages: product card, home rail, order card, Haat Sathi panel.
   Haat colour = warm harvest amber next to the site green.
   ========================================================================== */
:root { --hp-amb: #B45309; --hp-amb-lt: #FFF6E6; --hp-amb-ln: #F6DDB0; --hp-ok: #0B7A3B; --hp-ok-lt: #E8F7EE; --hp-red: #B42318; --hp-red-lt: #FEF0EE; }

/* ---- product page card ---------------------------------------------------- */
.hp-pcard { background: linear-gradient(180deg, var(--hp-amb-lt), #fff 70%); border: 1px solid var(--hp-amb-ln); padding: 14px 16px; }
.hp-ph { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.hp-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--hp-amb); color: #fff; font-weight: 700; font-size: 13.5px; padding: 6px 12px; border-radius: 999px; }
.hp-cd { font-size: 13px; color: var(--muted); }
.hp-cd b { font-variant-numeric: tabular-nums; color: var(--hp-amb); font-size: 15px; letter-spacing: .5px; }
.hp-prow { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; border-top: 1px dashed var(--hp-amb-ln); }
.hp-prow:first-of-type { border-top: 0; }
.hp-pi { flex: 0 0 34px; height: 34px; border-radius: 10px; background: var(--surface,#fff); border: 1px solid var(--hp-amb-ln); display: grid; place-items: center; font-size: 17px; }
.hp-prow b { display: block; font-size: 14.5px; }
.hp-prow small { display: block; color: var(--muted); font-size: 13px; line-height: 1.4; }

/* ---- home rail ------------------------------------------------------------- */
.hp-rail { border: 1px solid var(--hp-amb-ln); background: linear-gradient(180deg, var(--hp-amb-lt), var(--card) 120px); }
.hp-rh { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; margin-bottom: 10px; }
.hp-rh h2 { margin: 0; font-size: 18px; }
.hp-rh small { color: var(--muted); font-size: 13px; }
.hp-pin { flex: 0 0 auto; font-size: 12.5px; font-weight: 600; color: var(--hp-amb); background: var(--surface,#fff); border: 1px solid var(--hp-amb-ln); border-radius: 999px; padding: 4px 10px; max-width: 46%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- order page card ------------------------------------------------------- */
.hp-ocard { border: 1px solid var(--hp-amb-ln); background: linear-gradient(180deg, var(--hp-amb-lt), #fff 90px); }
.hp-oh { display: flex; gap: 10px; align-items: center; }
.hp-oh > div { flex: 1; min-width: 0; }
.hp-oh b { display: block; } .hp-oh small { color: var(--muted); }
.hp-ico { font-size: 26px; }
.hp-when { text-align: right; font-weight: 700; color: var(--hp-amb); }
.hp-when small { display: block; font-weight: 500; color: var(--muted); font-size: 12.5px; }
.hp-steps { display: flex; gap: 6px; margin: 12px 0 6px; }
.hp-st { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; color: #98A29C; text-align: center; position: relative; }
.hp-st i { font-style: normal; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2,#E7ECE9); color: #fff; font-weight: 700; font-size: 12.5px; }
.hp-st.on { color: var(--hp-ok); font-weight: 600; } .hp-st.on i { background: var(--hp-ok); }
.hp-ok, .hp-warn { border-radius: 10px; padding: 8px 12px; font-size: 13.5px; margin: 6px 0; }
.hp-ok { background: var(--hp-ok-lt); color: var(--hp-ok); } .hp-warn { background: var(--hp-red-lt); color: var(--hp-red); }
.hp-addr { font-size: 13.5px; color: var(--muted); margin: 6px 0 2px; }

/* ---- Haat Sathi panel ------------------------------------------------------ */
.hp-panel { max-width: 760px; margin: 0 auto; padding: 0 12px 24px; }
.hp-hero { background: linear-gradient(135deg, #0B7A3B, #12A150 60%, #4CAF50); color: #fff; border-radius: 18px; padding: 16px 16px 12px; margin: 12px 0; box-shadow: 0 8px 24px rgba(11,122,59,.22); }
.hp-hero-top { display: flex; gap: 10px; justify-content: space-between; align-items: flex-start; }
.hp-hero small { opacity: .85; font-size: 12.5px; letter-spacing: .3px; }
.hp-hero h1 { margin: 2px 0 2px; font-size: 22px; line-height: 1.25; color: #fff; }
.hp-hero p { margin: 0; opacity: .9; font-size: 13.5px; }
.hp-ptsel select { border-radius: 10px; border: 0; padding: 7px 10px; font: inherit; font-size: 13.5px; }
.hp-days { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.hp-days a { position: relative; display: flex; flex-direction: column; align-items: center; padding: 9px 6px; border-radius: 12px; background: rgba(255,255,255,.14); color: #fff; text-decoration: none; transition: background .15s, transform .15s; }
.hp-days a:hover { background: rgba(255,255,255,.22); }
.hp-days a.on { background: var(--surface,#fff); color: var(--hp-ok); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,.12); }
.hp-days b { font-size: 15px; } .hp-days small { font-size: 12px; opacity: .85; }
.hp-days i { position: absolute; top: -6px; right: -4px; font-style: normal; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: #F59E0B; color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; border: 2px solid #fff; }
.hp-live { margin-top: 10px; font-size: 13px; background: rgba(255,255,255,.16); border-radius: 10px; padding: 7px 10px; }

.hp-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.hp-stats div { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 8px; text-align: center; }
.hp-stats b { display: block; font-size: 19px; font-variant-numeric: tabular-nums; }
.hp-stats small { color: var(--muted); font-size: 12px; }
.hp-stats .cash b { color: var(--hp-amb); } .hp-stats .earn b { color: var(--hp-ok); }
.hp-prog { position: relative; height: 26px; border-radius: 13px; background: var(--surface-2,#E7ECE9); overflow: hidden; margin: 10px 0 4px; }
.hp-prog span { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #12A150, #0B7A3B); border-radius: 13px; transition: width .4s; }
.hp-prog em { position: relative; display: block; text-align: center; line-height: 26px; font-style: normal; font-size: 12.5px; font-weight: 700; color: var(--tx,#1B2420); mix-blend-mode: normal; }

.hp-sec { margin-top: 18px; }
.hp-sh { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0 2px 8px; }
.hp-sh h2 { margin: 0; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.hp-sh h2 span { width: 26px; height: 26px; border-radius: 50%; background: var(--hp-ok); color: #fff; display: grid; place-items: center; font-size: 14px; }
.hp-sh small { color: var(--muted); }
.hp-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; margin-bottom: 10px; box-shadow: var(--sh); scroll-margin-top: 80px; }
.hp-card header { display: flex; align-items: center; gap: 10px; }
.hp-card header > div:not(.hp-av) { flex: 1; min-width: 0; }
.hp-card header b { display: block; font-size: 15.5px; } .hp-card header small { color: var(--muted); font-size: 13px; }
.hp-card header small a { color: inherit; }
.hp-seller.st-received { border-color: #BFE5CC; background: linear-gradient(180deg, var(--hp-ok-lt), #fff 60px); }
.hp-seller.st-short { border-color: #F5C2BC; background: linear-gradient(180deg, var(--hp-red-lt), #fff 60px); }
.hp-chip { flex: 0 0 auto; font-size: 12.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--hp-amb-lt); color: var(--hp-amb); border: 1px solid var(--hp-amb-ln); white-space: nowrap; }
.hp-chip.received { background: var(--hp-ok-lt); color: var(--hp-ok); border-color: #BFE5CC; }
.hp-chip.short { background: var(--hp-red-lt); color: var(--hp-red); border-color: #F5C2BC; }
.hp-items { list-style: none; margin: 10px 0; padding: 0; border-top: 1px dashed var(--line); }
.hp-items li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 14.5px; }
.hp-items b { font-variant-numeric: tabular-nums; font-size: 16px; }
.hp-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.hp-acts form { margin: 0; }
.hp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface,#fff); color: var(--ink); font: inherit; font-weight: 700; font-size: 14.5px; cursor: pointer; text-decoration: none; transition: transform .1s, box-shadow .15s, opacity .15s; }
.hp-btn:active { transform: scale(.97); }
.hp-btn.ok { background: linear-gradient(180deg, #12A150, #0B7A3B); border-color: #0B7A3B; color: #fff; box-shadow: 0 3px 10px rgba(11,122,59,.25); }
.hp-btn.warn { color: var(--hp-red); border-color: #F5C2BC; background: var(--hp-red-lt); }
.hp-btn.ghost { color: var(--hp-ok); }
.hp-btn.link { border: 0; background: none; color: var(--muted); font-weight: 600; padding: 0 6px; }
.hp-btn.busy { opacity: .6; pointer-events: none; }

.hp-search { display: flex; align-items: center; gap: 8px; background: var(--surface,#fff); border: 1px solid var(--line); border-radius: 14px; padding: 0 12px; margin-bottom: 10px; }
.hp-search input { flex: 1; border: 0; outline: 0; min-height: 46px; font: inherit; font-size: 15px; background: none; }
.hp-av { flex: 0 0 40px; height: 40px; border-radius: 50%; background: var(--hp-amb-lt); color: var(--hp-amb); border: 1px solid var(--hp-amb-ln); display: grid; place-items: center; font-weight: 700; font-size: 17px; }
.hp-due { text-align: right; font-weight: 800; font-size: 18px; color: var(--hp-amb); font-variant-numeric: tabular-nums; }
.hp-due small { display: block; font-weight: 500; font-size: 11.5px; color: var(--muted); }
.hp-home { margin: 10px 0 0; font-size: 13.5px; background: #EEF5FF; color: #1D4ED8; border-radius: 10px; padding: 7px 10px; }
.hp-ord { display: flex; gap: 10px; align-items: center; padding: 10px 0 0; margin-top: 10px; border-top: 1px dashed var(--line); }
.hp-oi { flex: 1; min-width: 0; }
.hp-oi b { display: block; font-size: 14.5px; } .hp-oi small { color: var(--muted); font-size: 12.5px; }
.hp-wait { color: var(--hp-red); font-weight: 600; }
.hp-ord.done .hp-oi { opacity: .6; }
.hp-code { display: flex; gap: 6px; margin: 0; }
.hp-code input { width: 84px; min-height: 42px; border-radius: 12px; border: 2px solid var(--line); text-align: center; font: inherit; font-size: 19px; font-weight: 800; letter-spacing: 5px; font-variant-numeric: tabular-nums; padding: 0 4px; transition: border-color .15s; }
.hp-code input:focus { border-color: #12A150; outline: 0; box-shadow: 0 0 0 3px rgba(18,161,80,.15); }
.hp-code input.full { border-color: #12A150; }
.hp-buyer.done { opacity: .75; }
.hp-tip { font-size: 13.5px; color: var(--muted); background: var(--card); border: 1px dashed var(--line); border-radius: 12px; padding: 10px 12px; margin: 0 0 10px; }
.hp-prods { display: grid; gap: 8px; }
.hp-prod { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 8px 12px 8px 8px; color: var(--ink); text-decoration: none; }
.hp-prod:hover { border-color: #BFE5CC; }
.hp-prod.out { opacity: .55; }
.hp-prod > span:nth-child(2) { flex: 1; min-width: 0; }
.hp-prod b { display: block; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .hp-prod small { color: var(--muted); }
.hp-prod i { font-style: normal; color: var(--muted); font-size: 20px; }
.hp-pimg { flex: 0 0 56px; height: 56px; border-radius: 10px; overflow: hidden; background: var(--hp-amb-lt); display: grid; place-items: center; font-size: 22px; }
.hp-pimg img { width: 56px; height: 56px; object-fit: cover; }
.hp-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 18px; flex-wrap: wrap; font-size: 13px; }
.hp-empty { text-align: center; padding: 28px 18px; }
.hp-empty-i { font-size: 44px; } .hp-empty h1, .hp-empty h2 { margin: 6px 0; font-size: 18px; }
.hp-none { text-align: center; color: var(--muted); }

@media (max-width: 420px) {
  .hp-stats { grid-template-columns: repeat(2, 1fr); }
  .hp-ord { flex-wrap: wrap; } .hp-code { width: 100%; } .hp-code input { flex: 1; } .hp-code .hp-btn { flex: 0 0 auto; }
}
@media print {
  .gm-header, .gm-nav, .hp-days, .hp-acts, .hp-code, .hp-search, #phone, .hp-foot, .hp-live { display: none !important; }
  .hp-hero { background: none; color: var(--tx,#000); box-shadow: none; padding: 0; } .hp-hero h1 { color: var(--tx,#000); }
  .hp-card { box-shadow: none; break-inside: avoid; }
}

/* ---- seller dashboard: product form + Orders summary ---------------------- */
.hp-vform { border: 1px solid var(--hp-amb-ln); background: var(--hp-amb-lt); border-radius: 14px; padding: 12px 14px; margin: 10px 0; }
.hp-vtog { display: flex !important; gap: 10px; align-items: flex-start; cursor: pointer; margin: 0 !important; }
.hp-vtog input { width: 20px !important; height: 20px; margin-top: 2px; accent-color: var(--hp-amb); flex: 0 0 auto; }
.hp-vtog b { display: block; font-size: 15px; } .hp-vtog small { display: block; font-weight: 400; color: #6B5A3E; font-size: 13px; line-height: 1.45; margin-top: 2px; }
.hp-vmore { display: none; margin-top: 10px; }
.hp-vform.on .hp-vmore { display: block; }
.hp-vmore label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
.hp-vnote { margin: 8px 0 0; font-size: 12.5px; color: #6B5A3E; }
.hp-vsum { display: grid; gap: 10px; margin: 0 0 12px; }
.hp-vday { border: 1px solid var(--hp-amb-ln); background: linear-gradient(180deg, var(--hp-amb-lt), #fff 54px); border-radius: 14px; padding: 12px 14px; }
.hp-vday.done { border-color: #BFE5CC; background: linear-gradient(180deg, var(--hp-ok-lt), #fff 54px); }
.hp-vdh { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.hp-vdh span { font-size: 12.5px; font-weight: 700; color: var(--hp-amb); } .hp-vday.done .hp-vdh span { color: var(--hp-ok); }
.hp-vday ul { list-style: none; margin: 8px 0; padding: 0; }
.hp-vday li { display: grid; grid-template-columns: 1fr auto 52px; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px dashed #EADBC0; }
.hp-vday li b { font-size: 17px; font-variant-numeric: tabular-nums; } .hp-vday li > small { color: #8A7A5E; text-align: right; }
.hp-vaddr { color: #6B5A3E; }
