/* ═══ HB AUTH — Login Modal + Account Page Styles ═══
 * Brand: forest green #0D3320 / #1a4d2e + amber #F59E0B / orange #ff6f00
 */

/* ── LOGIN MODAL ── */

.hb-lm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 31, 20, 0.75);
  backdrop-filter: blur(4px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: hbLmFade 0.25s ease;
}
@keyframes hbLmFade { from { opacity: 0; } to { opacity: 1; } }

.hb-lm-box {
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-width: 400px;
  padding: 28px 24px;
  position: relative;
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
  animation: hbLmPop 0.3s cubic-bezier(0.34, 1.4, 0.64, 1);
  max-height: 90vh;
  overflow-y: auto;
}
@keyframes hbLmPop { from { transform: scale(0.92) translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }

.hb-lm-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: none;
  background: #f0f5f0;
  color: #1a4d2e;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.hb-lm-close:hover { background: #e0ebe0; }

.hb-lm-head { text-align: center; margin-bottom: 22px; }
.hb-lm-logo { font-size: 40px; margin-bottom: 6px; }
.hb-lm-title {
  font-size: 22px;
  font-weight: 800;
  color: #0D3320;
  margin: 0 0 4px;
}
.hb-lm-sub {
  font-size: 13px;
  color: #6b7c72;
  margin: 0;
  line-height: 1.5;
}

.hb-lm-google-wrap {
  display: flex;
  justify-content: center;
  min-height: 44px;
  margin-bottom: 4px;
}

.hb-lm-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: #a9b8ae;
  font-size: 12px;
}
.hb-lm-divider::before,
.hb-lm-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e4ece6;
}

.hb-lm-btn {
  display: block;
  width: 100%;
  padding: 13px 16px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 10px;
  transition: transform 0.15s, box-shadow 0.15s;
  font-family: inherit;
}
.hb-lm-btn:hover { transform: translateY(-1px); }
.hb-lm-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.hb-lm-btn-phone {
  background: #0D3320;
  color: #fff;
  box-shadow: 0 4px 12px rgba(13,51,32,0.25);
}
.hb-lm-btn-guest {
  background: #f0f5f0;
  color: #1a4d2e;
}
.hb-lm-btn-primary {
  background: linear-gradient(135deg, #ff8f00, #ff6f00);
  color: #fff;
  box-shadow: 0 4px 12px rgba(255,111,0,0.3);
}

.hb-lm-terms {
  font-size: 11px;
  color: #a9b8ae;
  text-align: center;
  margin: 14px 0 0;
  line-height: 1.5;
}
.hb-lm-terms a { color: #1a4d2e; }

.hb-lm-back {
  background: none;
  border: none;
  color: #1a4d2e;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 0 0 14px;
  font-family: inherit;
}

.hb-lm-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #0D3320;
  margin-bottom: 8px;
}

.hb-lm-phone-row {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.hb-lm-cc {
  display: flex;
  align-items: center;
  padding: 0 14px;
  background: #f0f5f0;
  border-radius: 12px;
  font-weight: 700;
  color: #1a4d2e;
  font-size: 15px;
}

.hb-lm-input {
  flex: 1;
  width: 100%;
  padding: 13px 16px;
  border: 2px solid #e4ece6;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  color: #0D3320;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
  box-sizing: border-box;
}
.hb-lm-input:focus { border-color: #1a4d2e; }

.hb-lm-otp {
  text-align: center;
  letter-spacing: 8px;
  font-size: 22px;
  margin-bottom: 14px;
}

.hb-lm-otp-sent {
  font-size: 13px;
  color: #6b7c72;
  margin: 0 0 12px;
}

.hb-lm-resend {
  display: block;
  width: 100%;
  background: none;
  border: none;
  color: #1a4d2e;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 10px 0 0;
  text-align: center;
  font-family: inherit;
}
.hb-lm-resend:disabled { color: #a9b8ae; cursor: default; }

.hb-lm-error {
  color: #dc2626;
  font-size: 13px;
  margin: 10px 0 0;
  padding: 10px 12px;
  background: #fef2f2;
  border-radius: 8px;
  line-height: 1.4;
}

.hb-lm-loading { text-align: center; padding: 30px 0; }
.hb-lm-spinner {
  width: 44px;
  height: 44px;
  border: 4px solid #e4ece6;
  border-top-color: #ff6f00;
  border-radius: 50%;
  margin: 0 auto 16px;
  animation: hbSpin 0.8s linear infinite;
}
@keyframes hbSpin { to { transform: rotate(360deg); } }
.hb-lm-loading p { color: #6b7c72; font-size: 14px; margin: 0; }

.hb-lm-success { text-align: center; padding: 24px 0; }
.hb-lm-success-icon { font-size: 52px; margin-bottom: 12px; animation: hbLmPop 0.4s cubic-bezier(0.34, 1.6, 0.64, 1); }
.hb-lm-success h3 { color: #0D3320; font-size: 20px; margin: 0 0 6px; }
.hb-lm-success p { color: #6b7c72; font-size: 13px; margin: 0; }

/* ── ACCOUNT PAGE ── */

.hb-account-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 16px;
  padding-bottom: 120px;
  min-height: 80vh;
}

.hb-acc-header {
  background: linear-gradient(135deg, #0D3320, #1a4d2e);
  border-radius: 18px;
  padding: 24px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.hb-acc-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #ff8f00;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
}
.hb-acc-avatar img { width: 100%; height: 100%; object-fit: cover; }
.hb-acc-header-info { flex: 1; min-width: 0; }
.hb-acc-name { font-size: 20px; font-weight: 800; margin: 0 0 2px; }
.hb-acc-contact { font-size: 13px; opacity: 0.85; margin: 0; }
.hb-acc-logout {
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
}
.hb-acc-logout:hover { background: rgba(255,255,255,0.25); }

.hb-acc-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}
.hb-acc-tab {
  flex-shrink: 0;
  padding: 10px 18px;
  background: #f0f5f0;
  color: #1a4d2e;
  border: none;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
  white-space: nowrap;
}
.hb-acc-tab.active {
  background: #0D3320;
  color: #fff;
}

.hb-acc-panel { display: none; }
.hb-acc-panel.active { display: block; animation: hbLmFade 0.25s ease; }

/* Orders list */
.hb-acc-order {
  background: #fff;
  border: 1px solid #e4ece6;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
}
.hb-acc-order-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 8px;
}
.hb-acc-order-id {
  font-weight: 800;
  color: #0D3320;
  font-size: 15px;
}
.hb-acc-order-date { font-size: 12px; color: #6b7c72; }
.hb-acc-order-status {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.hb-status-pending   { background: #fef3c7; color: #92400e; }
.hb-status-confirmed { background: #dbeafe; color: #1e40af; }
.hb-status-packed    { background: #e0e7ff; color: #4338ca; }
.hb-status-out       { background: #fce7f3; color: #9d174d; }
.hb-status-delivered { background: #d1fae5; color: #065f46; }
.hb-status-cancelled { background: #fee2e2; color: #991b1b; }

.hb-acc-order-items {
  font-size: 13px;
  color: #4b5a51;
  line-height: 1.6;
  margin-bottom: 10px;
}
.hb-acc-order-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px dashed #e4ece6;
  padding-top: 10px;
}
.hb-acc-order-total {
  font-weight: 800;
  color: #0D3320;
  font-size: 16px;
}
.hb-acc-reorder {
  background: linear-gradient(135deg, #ff8f00, #ff6f00);
  color: #fff;
  border: none;
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 3px 8px rgba(255,111,0,0.3);
  transition: transform 0.15s;
}
.hb-acc-reorder:hover { transform: translateY(-1px); }

/* Addresses */
.hb-acc-addr {
  background: #fff;
  border: 2px solid #e4ece6;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
  position: relative;
  transition: border-color 0.2s;
}
.hb-acc-addr.default { border-color: #1a4d2e; }
.hb-acc-addr-label {
  display: inline-block;
  background: #f0f5f0;
  color: #1a4d2e;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.hb-acc-addr.default .hb-acc-addr-label { background: #0D3320; color: #fff; }
.hb-acc-addr-text { font-size: 14px; color: #4b5a51; line-height: 1.6; }
.hb-acc-addr-actions {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}
.hb-acc-addr-actions button {
  background: none;
  border: none;
  color: #1a4d2e;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}
.hb-acc-addr-actions button.del { color: #dc2626; }

.hb-acc-add-btn {
  display: block;
  width: 100%;
  padding: 14px;
  border: 2px dashed #a9b8ae;
  background: none;
  color: #1a4d2e;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}
.hb-acc-add-btn:hover { border-color: #1a4d2e; background: #f0f5f0; }

/* Address form */
.hb-acc-form { background: #fff; border: 1px solid #e4ece6; border-radius: 14px; padding: 18px; margin-bottom: 12px; }
.hb-acc-form label { display: block; font-size: 12px; font-weight: 700; color: #0D3320; margin: 12px 0 5px; }
.hb-acc-form label:first-child { margin-top: 0; }
.hb-acc-form input, .hb-acc-form select {
  width: 100%;
  padding: 11px 14px;
  border: 2px solid #e4ece6;
  border-radius: 10px;
  font-size: 15px;
  color: #0D3320;
  outline: none;
  font-family: inherit;
  box-sizing: border-box;
}
.hb-acc-form input:focus { border-color: #1a4d2e; }
.hb-acc-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hb-acc-form-actions { display: flex; gap: 10px; margin-top: 16px; }
.hb-acc-form-actions .save {
  flex: 1;
  background: #0D3320;
  color: #fff;
  border: none;
  padding: 12px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.hb-acc-form-actions .cancel {
  background: #f0f5f0;
  color: #1a4d2e;
  border: none;
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

/* Profile panel */
.hb-acc-profile-field {
  background: #fff;
  border: 1px solid #e4ece6;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.hb-acc-profile-field .k { font-size: 12px; color: #6b7c72; font-weight: 600; }
.hb-acc-profile-field .v { font-size: 15px; color: #0D3320; font-weight: 700; }

/* Empty states */
.hb-acc-empty {
  text-align: center;
  padding: 50px 20px;
  color: #6b7c72;
}
.hb-acc-empty .icon { font-size: 52px; margin-bottom: 12px; opacity: 0.6; }
.hb-acc-empty p { font-size: 14px; margin: 0 0 16px; }
.hb-acc-empty a {
  display: inline-block;
  background: #0D3320;
  color: #fff;
  padding: 10px 24px;
  border-radius: 24px;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
}

/* Login prompt for logged-out users hitting /account/ */
.hb-acc-login-prompt {
  text-align: center;
  padding: 60px 20px;
}
.hb-acc-login-prompt .icon { font-size: 64px; margin-bottom: 16px; }
.hb-acc-login-prompt h2 { color: #0D3320; font-size: 22px; margin: 0 0 8px; }
.hb-acc-login-prompt p { color: #6b7c72; font-size: 14px; margin: 0 0 20px; }
.hb-acc-login-prompt button {
  background: linear-gradient(135deg, #ff8f00, #ff6f00);
  color: #fff;
  border: none;
  padding: 14px 36px;
  border-radius: 26px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 4px 14px rgba(255,111,0,0.35);
}

@media (max-width: 480px) {
  .hb-lm-box { padding: 24px 18px; }
  .hb-acc-header { flex-wrap: wrap; }
  .hb-acc-form-row { grid-template-columns: 1fr; }
}

/* ── COINS PANEL ── */

.hb-coins-hero {
  background: linear-gradient(135deg, #0D3320, #1a4d2e);
  border-radius: 18px;
  padding: 28px 24px;
  text-align: center;
  color: #fff;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}
.hb-coins-hero::after {
  content: '🪙';
  position: absolute;
  font-size: 120px;
  opacity: 0.07;
  right: -20px;
  bottom: -30px;
  transform: rotate(-15deg);
}
.hb-coins-icon { font-size: 40px; margin-bottom: 6px; animation: hbCoinBounce 2s ease infinite; }
@keyframes hbCoinBounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.hb-coins-balance {
  font-size: 44px;
  font-weight: 900;
  color: #F59E0B;
  line-height: 1;
  margin-bottom: 4px;
}
.hb-coins-label { font-size: 12px; opacity: 0.8; margin-bottom: 12px; }
.hb-coins-info {
  font-size: 13px;
  opacity: 0.9;
  line-height: 1.6;
  background: rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 10px 14px;
  position: relative;
  z-index: 1;
}
.hb-coins-h { font-size: 15px; font-weight: 800; color: #0D3320; margin: 0 0 10px; }

.hb-coin-row {
  background: #fff;
  border: 1px solid #e4ece6;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.hb-coin-info { display: flex; flex-direction: column; gap: 2px; }
.hb-coin-info .reason { font-size: 13px; font-weight: 600; color: #0D3320; }
.hb-coin-info .date { font-size: 11px; color: #a9b8ae; }
.hb-coin-row .amount { font-size: 17px; font-weight: 800; }
.hb-coin-row .amount.credit { color: #16a34a; }
.hb-coin-row .amount.debit  { color: #dc2626; }

/* ── REFER PANEL ── */

.hb-refer-hero {
  background: linear-gradient(135deg, #ff8f00, #ff6f00);
  border-radius: 18px;
  padding: 28px 24px;
  text-align: center;
  color: #fff;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}
.hb-refer-hero::after {
  content: '🎁';
  position: absolute;
  font-size: 110px;
  opacity: 0.1;
  left: -16px;
  top: -20px;
  transform: rotate(15deg);
}
.hb-refer-icon { font-size: 40px; margin-bottom: 6px; animation: hbCoinBounce 2.5s ease infinite; }
.hb-refer-hero h3 { font-size: 22px; font-weight: 900; margin: 0 0 6px; position: relative; z-index: 1; }
.hb-refer-hero p { font-size: 13px; opacity: 0.95; margin: 0 0 18px; line-height: 1.6; position: relative; z-index: 1; }

.hb-refer-code-box {
  display: flex;
  gap: 8px;
  background: rgba(255,255,255,0.15);
  border: 2px dashed rgba(255,255,255,0.5);
  border-radius: 12px;
  padding: 10px 14px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}
.hb-refer-code {
  font-family: monospace;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 4px;
}
.hb-refer-copy {
  background: #fff;
  color: #ff6f00;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.hb-refer-wa {
  display: block;
  width: 100%;
  background: #25d366;
  color: #fff;
  border: none;
  padding: 13px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
  position: relative;
  z-index: 1;
}

.hb-refer-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.hb-refer-stat {
  background: #fff;
  border: 1px solid #e4ece6;
  border-radius: 14px;
  padding: 18px;
  text-align: center;
}
.hb-refer-stat .num { font-size: 28px; font-weight: 900; color: #0D3320; }
.hb-refer-stat .lbl { font-size: 12px; color: #6b7c72; margin-top: 2px; }

/* ── ORDER STATUS TIMELINE ── */

.hb-order-timeline {
  display: flex;
  align-items: center;
  margin: 4px 0 14px;
  padding: 10px 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.hb-tl-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.hb-tl-stage .dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #e4ece6;
  border: 2px solid #cfe0d3;
  transition: all 0.3s;
}
.hb-tl-stage.done .dot { background: #16a34a; border-color: #16a34a; }
.hb-tl-stage.now .dot {
  background: #ff6f00;
  border-color: #ff6f00;
  box-shadow: 0 0 0 4px rgba(255,111,0,0.2);
  animation: hbTlPulse 1.6s ease infinite;
}
@keyframes hbTlPulse {
  0%,100% { box-shadow: 0 0 0 3px rgba(255,111,0,0.25); }
  50%     { box-shadow: 0 0 0 7px rgba(255,111,0,0.08); }
}
.hb-tl-stage .lbl { font-size: 9px; font-weight: 700; color: #a9b8ae; white-space: nowrap; }
.hb-tl-stage.done .lbl { color: #16a34a; }
.hb-tl-stage.now .lbl  { color: #ff6f00; }
.hb-tl-line {
  flex: 1;
  min-width: 14px;
  height: 2px;
  background: #e4ece6;
  margin: 0 2px 14px;
}
