*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --pri: #6C5CE7;
  --pri-dark: #5A4BD1;
  --pri-light: #A29BFE;
  --pri-bg: #F0EDFF;
  --green: #00B894;
  --green-bg: #E8FFF8;
  --yellow: #FDCB6E;
  --red: #E17055;
  --red-bg: #FFEDE9;
  --text: #2D3436;
  --text2: #636E72;
  --muted: #B2BEC3;
  --bg: #F8F9FA;
  --card: #FFFFFF;
  --border: #E9ECEF;
  --shadow: 0 2px 16px rgba(0,0,0,0.07);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --r: 12px;
  --r-sm: 8px;
}

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  /* Native App Resets */
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}

/* Allow text selection in actual inputs */
input, textarea {
  -webkit-user-select: text;
  user-select: text;
}

.page { 
  display: none; 
  min-height: 100vh; 
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}
.page.hidden { display: none !important; }
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 13px; }
.mono { font-family: monospace; font-size: 12px; }

/* ========== LANDING PAGE ========== */
html { scroll-behavior: smooth; }
#landing-page { display: flex; flex-direction: column; }

/* -- Beta bar -- */
.lp-beta-bar {
  background: var(--green); color: white;
  text-align: center; padding: 8px 16px;
  font-size: 13px; font-weight: 600;
  position: fixed; top: 0; left: 0; right: 0; z-index: 101;
}
.lp-beta-bar a { color: white; text-decoration: underline; margin-left: 4px; }

/* -- Nav -- */
.lp-nav {
  position: fixed; top: 34px; left: 0; right: 0; z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.lp-nav-inner {
  max-width: 1100px; margin: 0 auto;
  padding: 0 24px; height: 64px;
  display: flex; align-items: center; justify-content: space-between;
}
.lp-nav-brand {
  display: flex; align-items: center; gap: 8px;
}
.lp-logo-img { height: 48px; width: auto; }
.lp-beta-badge {
  background: var(--green); color: white;
  font-size: 9px; font-weight: 800;
  padding: 2px 8px; border-radius: 10px;
  letter-spacing: 0.5px;
}
.lp-nav-icon {
  width: 32px; height: 32px;
  background: var(--pri); color: white;
  border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 800;
}
.lp-nav-btn {
  background: var(--pri); color: white; border: none;
  border-radius: var(--r-sm); padding: 8px 20px;
  font-size: 14px; font-weight: 600;
  cursor: pointer; font-family: inherit;
  transition: background 0.2s;
}
.lp-nav-btn:hover { background: var(--pri-dark); }

/* -- Hero -- */
.lp-hero {
  min-height: 100vh; padding: 120px 24px 60px;
  background: linear-gradient(160deg, #6C5CE7 0%, #A29BFE 40%, #DFE6E9 100%);
  display: flex; align-items: center; justify-content: center;
  gap: 60px; flex-wrap: wrap;
}
.lp-hero-content { max-width: 520px; }
.lp-hero-title {
  font-size: 52px; font-weight: 800; color: white;
  line-height: 1.1; margin-bottom: 16px;
}
.lp-hero-sub {
  font-size: 19px; color: rgba(255,255,255,0.9);
  line-height: 1.6; margin-bottom: 32px;
}
.lp-hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }

.lp-btn-primary {
  background: white; color: var(--pri); border: none;
  border-radius: var(--r-sm); padding: 14px 32px;
  font-size: 16px; font-weight: 700;
  cursor: pointer; font-family: inherit;
  transition: all 0.2s; box-shadow: var(--shadow);
}
.lp-btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.lp-btn-outline {
  background: transparent; color: white;
  border: 2px solid rgba(255,255,255,0.5);
  border-radius: var(--r-sm); padding: 14px 32px;
  font-size: 16px; font-weight: 600;
  cursor: pointer; font-family: inherit;
  transition: all 0.2s;
}
.lp-btn-outline:hover { background: rgba(255,255,255,0.15); border-color: white; }

.lp-btn-lg { padding: 16px 40px; font-size: 17px; }

/* -- Store buttons -- */
.lp-store-btn { display: inline-block; transition: transform 0.2s; }
.lp-store-btn:hover { transform: translateY(-2px); }
.lp-store-img { height: 48px; width: auto; }

.lp-store-row { display: flex; gap: 16px; justify-content: center; margin-bottom: 20px; flex-wrap: wrap; }
.lp-store-btn-lg { display: inline-block; transition: transform 0.2s; }
.lp-store-btn-lg:hover { transform: translateY(-2px); }
.lp-store-img-lg { height: 56px; width: auto; }

.lp-hero-hint { font-size: 14px; margin-top: 8px; }
.lp-hero-hint a { color: rgba(255,255,255,0.7); text-decoration: none; }
.lp-hero-hint a:hover { color: white; }

/* -- Customer tip section -- */
.lp-section-sub { text-align: center; color: var(--text2); font-size: 16px; margin-top: -32px; margin-bottom: 40px; }
.lp-tip-box {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 24px; margin-bottom: 32px;
}
.lp-tip-option {
  text-align: center; padding: 24px 16px;
  background: var(--bg); border-radius: var(--r);
  border: 1px solid var(--border);
}
.lp-tip-option-icon { font-size: 36px; margin-bottom: 10px; }
.lp-tip-option h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.lp-tip-option p { font-size: 13px; color: var(--text2); line-height: 1.5; }

.lp-tip-input-row { display: flex; justify-content: center; }
.lp-demo-input {
  display: flex; gap: 8px;
  background: white; border-radius: var(--r);
  padding: 6px; box-shadow: var(--shadow);
  border: 2px solid var(--border);
}
.lp-demo-input input {
  border: none; outline: none;
  padding: 10px 16px; font-size: 14px;
  font-family: inherit; width: 300px;
}
.lp-btn-tip {
  background: var(--pri); color: white; border: none;
  border-radius: var(--r-sm); padding: 10px 24px;
  font-size: 14px; font-weight: 700;
  cursor: pointer; font-family: inherit;
  transition: background 0.2s; white-space: nowrap;
}
.lp-btn-tip:hover { background: var(--pri-dark); }
.lp-btn-tip:disabled { opacity: 0.6; cursor: not-allowed; }
.lp-tip-error { color: var(--red); font-size: 13px; margin-top: 8px; text-align: center; }

/* -- CTA extras -- */
.lp-cta-sub { color: rgba(255,255,255,0.8); font-size: 16px; margin-bottom: 28px; }
.lp-cta-web { color: rgba(255,255,255,0.6); font-size: 13px; margin-top: 8px; }
.lp-cta-web a { color: white; text-decoration: underline; }

/* -- Phone Mockup -- */
.lp-hero-visual { flex-shrink: 0; }
.lp-phone {
  width: 220px; height: 380px;
  background: white; border-radius: 28px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  overflow: hidden; position: relative;
  padding: 12px;
}
.lp-phone-notch {
  width: 80px; height: 6px;
  background: var(--border); border-radius: 3px;
  margin: 8px auto 16px;
}
.lp-phone-screen { text-align: center; padding: 8px; }
.lp-phone-avatar {
  width: 48px; height: 48px;
  background: var(--pri); color: white;
  border-radius: 50%; margin: 0 auto 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700;
}
.lp-phone-name {
  font-weight: 700; font-size: 14px;
  color: var(--text); margin-bottom: 16px;
}
.lp-phone-presets {
  display: flex; gap: 8px; justify-content: center; margin-bottom: 20px;
}
.lp-phone-presets span {
  padding: 8px 14px; border-radius: 8px;
  font-size: 13px; font-weight: 700;
  background: var(--bg); color: var(--text2);
  border: 2px solid var(--border);
}
.lp-phone-presets .lp-phone-active {
  background: var(--pri-bg); color: var(--pri);
  border-color: var(--pri);
}
.lp-phone-btn {
  background: var(--pri); color: white;
  padding: 12px; border-radius: 8px;
  font-size: 14px; font-weight: 700;
  margin-top: 12px;
}

/* -- Sections (shared) -- */
.lp-section { padding: 80px 24px; }
.lp-section-gray { background: var(--bg); }
.lp-container { max-width: 1100px; margin: 0 auto; }
.lp-section-title {
  text-align: center; font-size: 32px; font-weight: 800;
  color: var(--text); margin-bottom: 48px;
}

/* -- How It Works -- */
.lp-steps {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 32px; text-align: center;
}
.lp-step {
  background: white; border-radius: var(--r);
  padding: 36px 24px; box-shadow: var(--shadow);
  transition: transform 0.2s;
}
.lp-step:hover { transform: translateY(-4px); }
.lp-step-num {
  width: 36px; height: 36px;
  background: var(--pri); color: white;
  border-radius: 50%; margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 800;
}
.lp-step-icon { font-size: 40px; margin-bottom: 12px; }
.lp-step h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.lp-step p { font-size: 14px; color: var(--text2); line-height: 1.6; }

/* -- Features Grid -- */
.lp-features {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.lp-feature {
  background: var(--bg); border-radius: var(--r);
  padding: 28px 24px;
  border: 1px solid var(--border);
  transition: all 0.2s;
}
.lp-feature:hover { border-color: var(--pri-light); box-shadow: var(--shadow); }
.lp-feature-icon { font-size: 32px; margin-bottom: 12px; }
.lp-feature h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.lp-feature p { font-size: 14px; color: var(--text2); line-height: 1.5; }

/* -- CTA Section -- */
.lp-cta {
  padding: 80px 24px;
  background: linear-gradient(135deg, var(--pri), var(--pri-light));
  text-align: center;
}
.lp-cta-title {
  font-size: 32px; font-weight: 800; color: white;
  margin-bottom: 24px;
}
.lp-cta-list {
  list-style: none; margin: 0 auto 36px;
  display: inline-block; text-align: left;
}
.lp-cta-list li {
  font-size: 16px; color: rgba(255,255,255,0.9);
  padding: 6px 0; line-height: 1.6;
}
.lp-cta-list li::before {
  content: "\2713"; margin-right: 10px;
  color: var(--green); font-weight: 800;
}
.lp-cta .lp-btn-primary {
  background: white; color: var(--pri);
}

/* -- Footer -- */
.lp-footer {
  background: var(--text); padding: 40px 24px;
  text-align: center;
}
.lp-footer-inner { color: rgba(255,255,255,0.7); }
.lp-footer-brand {
  font-size: 18px; color: white; margin-bottom: 6px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.lp-footer-logo { height: 36px; width: auto; filter: brightness(0) invert(1); }
.lp-footer-tagline { font-size: 13px; margin-bottom: 16px; color: rgba(255,255,255,0.5); }
.lp-footer-links { display: flex; gap: 20px; justify-content: center; }
.lp-footer-links a {
  color: rgba(255,255,255,0.6); text-decoration: none;
  font-size: 13px; transition: color 0.2s;
}
.lp-footer-links a:hover { color: white; }

/* -- Brand classes (login page, etc.) -- */
.brand { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-bottom: 8px; }
.brand-logo { height: 80px; width: auto; }
.brand-sub { color: rgba(255,255,255,0.8); font-size: 16px; font-weight: 500; }
.topbar-logo { height: 40px; width: auto; }
.tip-footer-logo { height: 28px; width: auto; vertical-align: middle; margin-left: 4px; }

/* ========== AUTH ========== */
#login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #6C5CE7 0%, #A29BFE 50%, #DFE6E9 100%);
  padding: 24px;
}

.auth-box {
  background: white;
  border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  padding: 40px 36px;
  width: 100%;
  max-width: 400px;
  text-align: center;
}
.auth-box .brand { margin-bottom: 28px; }
.auth-box .brand-logo { height: 48px; }
.auth-box .brand-sub { color: var(--text2); }
.auth-box h3 { font-size: 18px; margin-bottom: 16px; }

.phone-input-row {
  display: flex;
  border: 2px solid var(--border);
  border-radius: var(--r-sm);
  overflow: hidden;
  margin-bottom: 16px;
  transition: border-color 0.2s;
}
.phone-input-row:focus-within { border-color: var(--pri); }
.prefix {
  padding: 12px 14px;
  background: var(--bg);
  color: var(--text2);
  font-weight: 600;
  border-right: 2px solid var(--border);
}
.phone-input-row input {
  flex: 1;
  border: none; outline: none;
  padding: 12px 14px;
  font-size: 16px;
  font-family: inherit;
}

.auth-btn {
  width: 100%;
  padding: 13px;
  background: var(--pri);
  color: white;
  border: none;
  border-radius: var(--r-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
}
.auth-btn:hover { background: var(--pri-dark); }
.auth-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.link-btn {
  background: none; border: none;
  color: var(--pri); cursor: pointer;
  font-size: 13px; font-family: inherit;
  margin-top: 12px; padding: 8px;
}
.link-btn:hover { text-decoration: underline; }

.otp-sub { color: var(--text2); font-size: 13px; margin-bottom: 16px; }
.otp-row { display: flex; gap: 8px; justify-content: center; margin-bottom: 16px; }
.otp-box {
  width: 44px; height: 52px;
  border: 2px solid var(--border);
  border-radius: var(--r-sm);
  text-align: center;
  font-size: 22px; font-weight: 700;
  font-family: inherit;
  transition: border-color 0.2s;
}
.otp-box:focus { border-color: var(--pri); outline: none; }

.dev-hint {
  background: #E8F4FD;
  color: #0984E3;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
}

.error-box {
  background: var(--red-bg);
  color: var(--red);
  padding: 10px 14px;
  border-radius: var(--r-sm);
  font-size: 13px;
  margin-top: 14px;
}

/* ========== TIP PAGE (customer — no login) ========== */
#tip-page {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 32px 16px;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--pri-bg) 0%, var(--bg) 40%);
}

.tip-container {
  background: white;
  border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  padding: 32px 28px;
  width: 100%;
  max-width: 440px;
  margin-top: 20px;
}

.tip-header { text-align: center; margin-bottom: 28px; }
.tip-provider-avatar {
  width: 72px; height: 72px;
  background: var(--pri);
  color: white;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 700;
  margin: 0 auto 12px;
}
.tip-header h2 { font-size: 22px; font-weight: 700; }

.category-badge {
  display: inline-block;
  background: var(--pri-bg);
  color: var(--pri);
  padding: 3px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  margin-top: 4px;
}

.tip-provider-rating { margin-top: 6px; font-size: 14px; }
.tip-provider-rating .star-display { color: var(--yellow); }

.trust-signal {
  margin-top: 10px;
  background: var(--green-bg);
  color: var(--green);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
}

.tip-footer {
  text-align: center;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
}
.tip-footer strong { color: var(--pri); }

.section-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.amount-presets { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.preset {
  flex: 1; min-width: 70px;
  padding: 12px 8px 10px;
  border: 2px solid var(--border);
  border-radius: var(--r-sm);
  background: white;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  position: relative;
}
.preset:hover { border-color: var(--pri); }
.preset.active { border-color: var(--pri); background: var(--pri-bg); }

.preset-amount { font-size: 18px; font-weight: 800; color: var(--text); }
.preset.active .preset-amount { color: var(--pri); }
.preset-label { font-size: 10px; color: var(--text2); font-weight: 500; }
.preset.active .preset-label { color: var(--pri); }

.popular-tag {
  position: absolute;
  top: -9px;
  background: var(--pri);
  color: white;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.quick-messages { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.qmsg {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
  color: var(--text2);
}
.qmsg:hover { border-color: var(--pri); color: var(--pri); background: var(--pri-bg); }
.qmsg.selected { border-color: var(--pri); color: var(--pri); background: var(--pri-bg); }

.pay-hint {
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  margin-top: 8px;
}

.custom-amount-row {
  display: flex;
  align-items: center;
  border: 2px solid var(--border);
  border-radius: var(--r-sm);
  overflow: hidden;
  margin-bottom: 16px;
  transition: border-color 0.2s;
}
.custom-amount-row:focus-within { border-color: var(--pri); }
.rupee-sign {
  padding: 10px 14px;
  background: var(--bg);
  color: var(--text2);
  font-weight: 700;
  font-size: 16px;
  border-right: 2px solid var(--border);
}
.custom-amount-row input {
  flex: 1; border: none; outline: none;
  padding: 10px 14px;
  font-size: 16px;
  font-family: inherit;
}

.breakdown {
  background: var(--bg);
  border-radius: var(--r-sm);
  padding: 14px 16px;
  margin-bottom: 20px;
}
.breakdown-line {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  font-size: 13px;
  color: var(--text2);
}
.breakdown-line.net {
  border-top: 2px solid var(--border);
  margin-top: 6px;
  padding-top: 10px;
  font-weight: 700;
  color: var(--text);
  font-size: 15px;
}
.breakdown-line.commission { font-size: 12px; }

.stars-row { display: flex; gap: 4px; margin-bottom: 16px; }
.star {
  font-size: 32px;
  background: none; border: none;
  cursor: pointer;
  color: var(--border);
  transition: color 0.15s;
}
.star.active { color: var(--yellow); }
.star:hover { color: var(--yellow); }

#tip-message {
  width: 100%;
  border: 2px solid var(--border);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  font-family: inherit;
  font-size: 14px;
  resize: none;
  margin-bottom: 20px;
  transition: border-color 0.2s;
}
#tip-message:focus { border-color: var(--pri); outline: none; }

.pay-btn {
  width: 100%;
  padding: 16px;
  background: var(--pri);
  color: white;
  border: none;
  border-radius: var(--r-sm);
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}
.pay-btn:hover { background: var(--pri-dark); transform: translateY(-1px); }
.pay-btn.outline {
  background: white;
  color: var(--pri);
  border: 2px solid var(--pri);
  margin-top: 10px;
}
.pay-btn.outline:hover { background: var(--pri-bg); }

/* Success */
.success-check {
  width: 72px; height: 72px;
  background: var(--green);
  color: white;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 36px;
  margin: 0 auto 16px;
}
#tip-success { text-align: center; }
#tip-success h2 { font-size: 24px; margin-bottom: 4px; }
.success-sub { color: var(--text2); margin-bottom: 20px; }

.receipt {
  background: var(--bg);
  border-radius: var(--r-sm);
  padding: 16px;
  margin-bottom: 16px;
  text-align: left;
}
.receipt-line {
  display: flex; justify-content: space-between;
  padding: 6px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}
.receipt-line:last-child { border-bottom: none; }
.badge-initiated {
  background: #FFF8E7; color: #E17055;
  padding: 2px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 600;
}
.receipt-note { font-size: 12px; color: var(--muted); margin-bottom: 16px; font-style: italic; }

/* ========== DASHBOARD ========== */
.topbar {
  background: white;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.topbar-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar-brand { font-weight: 700; font-size: 18px; color: var(--pri); display: flex; align-items: center; gap: 8px; }
.brand-icon-sm {
  width: 30px; height: 30px;
  background: var(--pri); color: white;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700;
}
.topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-phone { font-size: 13px; color: var(--text2); }
.topbar-logout {
  background: none; border: 1px solid var(--border);
  border-radius: 6px; padding: 5px 12px;
  cursor: pointer; font-size: 12px; font-family: inherit;
  color: var(--text2); transition: all 0.2s;
}
.topbar-logout:hover { border-color: var(--red); color: var(--red); }

.container { max-width: 900px; margin: 0 auto; padding: 24px; }

.onboard-card {
  background: white;
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 40px 32px;
  text-align: center;
  max-width: 500px;
  margin: 40px auto;
}
.onboard-card h2 { margin-bottom: 8px; }
.onboard-card p { color: var(--text2); margin-bottom: 20px; }

/* Avatar upload */
.avatar-upload {
  width: 96px; height: 96px;
  border: 3px dashed var(--border);
  border-radius: 50%;
  margin: 0 auto 20px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  transition: border-color 0.2s;
  position: relative;
}
.avatar-upload:hover { border-color: var(--pri); }
.avatar-preview {
  width: 100%; height: 100%;
  object-fit: cover; border-radius: 50%;
}
.avatar-placeholder {
  display: flex; flex-direction: column; align-items: center;
  color: var(--muted);
}
.avatar-plus { font-size: 24px; font-weight: 700; line-height: 1; }
.avatar-label { font-size: 10px; font-weight: 600; margin-top: 2px; }

/* Full-width inputs for onboarding */
.input-full {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 14px;
  font-family: inherit;
  margin-bottom: 12px;
  transition: border-color 0.2s;
}
.input-full:focus { border-color: var(--pri); outline: none; }
textarea.input-full { resize: none; }

/* Tip link create row */
.tip-link-create {
  display: flex; gap: 8px; margin-bottom: 16px;
  align-items: center; flex-wrap: wrap;
}
.input-sm {
  padding: 8px 12px;
  border: 2px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 13px;
  font-family: inherit;
  flex: 1; min-width: 120px;
  transition: border-color 0.2s;
}
.input-sm:focus { border-color: var(--pri); outline: none; }

/* Tip link cards */
.tip-links-list { display: flex; flex-direction: column; gap: 8px; }
.tip-link-card {
  background: white;
  border-radius: var(--r-sm);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--shadow);
}
.tip-link-info { flex: 1; min-width: 0; }
.tip-link-title { font-weight: 600; font-size: 14px; }
.tip-link-url { font-size: 11px; color: var(--pri); word-break: break-all; }
.tip-link-stats { font-size: 11px; color: var(--muted); }

/* Provider subtitle on tip page */
.provider-subtitle {
  color: var(--text2);
  font-size: 14px;
  font-weight: 500;
  margin-top: 2px;
  margin-bottom: 4px;
}

.select-full {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 14px;
  font-family: inherit;
  margin-bottom: 16px;
  appearance: none;
  background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23636E72' stroke-width='2' fill='none'/%3E%3C/svg%3E") no-repeat right 14px center;
  cursor: pointer;
}

.earnings-banner {
  background: linear-gradient(135deg, var(--pri), var(--pri-light));
  border-radius: var(--r);
  padding: 28px 32px;
  color: white;
  display: flex;
  justify-content: space-between;
  margin-bottom: 28px;
  box-shadow: var(--shadow);
}
.eb-label { font-size: 12px; opacity: 0.8; margin-bottom: 4px; }
.eb-value { font-size: 28px; font-weight: 800; }
.eb-cat { font-size: 16px; }

.section { margin-bottom: 28px; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.section h3 { font-size: 16px; font-weight: 600; }

.small-btn {
  background: var(--pri-bg);
  color: var(--pri);
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
}
.small-btn:hover { background: #E3DEFF; }

.qr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-bottom: 12px; }

.qr-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 20px 16px;
  text-align: center;
}
.qr-visual {
  width: 100px; height: 100px;
  background: var(--bg);
  border: 2px dashed var(--border);
  border-radius: var(--r-sm);
  margin: 0 auto 8px;
  display: flex;
  align-items: center; justify-content: center;
  font-size: 40px; color: var(--muted);
}
.qr-label { font-weight: 600; font-size: 13px; }
.qr-scans { font-size: 11px; color: var(--text2); }

.share-hint {
  background: var(--pri-bg);
  border-radius: var(--r-sm);
  padding: 12px 16px;
  font-size: 13px;
  color: var(--pri);
}
.share-hint code {
  background: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  word-break: break-all;
}

.tips-list, .payouts-list { display: flex; flex-direction: column; gap: 8px; }

.tip-item {
  background: white;
  border-radius: var(--r-sm);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow);
}
.tip-icon {
  width: 40px; height: 40px;
  background: var(--green-bg);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: var(--green);
}
.tip-details { flex: 1; }
.tip-msg { font-size: 14px; font-weight: 500; }
.tip-date { font-size: 11px; color: var(--muted); }
.tip-stars { color: var(--yellow); font-size: 12px; }
.tip-amt { font-size: 16px; font-weight: 700; color: var(--green); }

.payout-row { display: flex; gap: 8px; margin-bottom: 16px; }
.payout-input-row {
  display: flex; align-items: center;
  border: 2px solid var(--border);
  border-radius: var(--r-sm);
  overflow: hidden; flex: 1;
}
.payout-input-row input {
  flex: 1; border: none; outline: none;
  padding: 8px 12px; font-size: 14px; font-family: inherit;
}

.payout-item {
  background: white;
  border-radius: var(--r-sm);
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow);
}
.payout-amt { font-weight: 700; }
.payout-date { font-size: 11px; color: var(--muted); }
.payout-badge {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}
.payout-badge.pending { background: #FFF8E7; color: #E17055; }
.payout-badge.settled { background: var(--green-bg); color: var(--green); }
.payout-badge.failed { background: var(--red-bg); color: var(--red); }

/* ========== Toast ========== */
.toast {
  position: fixed;
  bottom: 20px; left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--text);
  color: white;
  padding: 11px 24px;
  border-radius: var(--r-sm);
  font-size: 14px; font-weight: 500;
  z-index: 999;
  transition: transform 0.3s;
  box-shadow: var(--shadow-lg);
  pointer-events: none;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ========== Responsive ========== */
@media (max-width: 900px) {
  .lp-steps { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
  .lp-features { grid-template-columns: repeat(2, 1fr); }
  .lp-tip-box { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto 32px; }
}
@media (max-width: 640px) {
  .lp-hero { padding: 80px 20px 40px; gap: 40px; }
  .lp-hero-title { font-size: 36px; }
  .lp-hero-sub { font-size: 16px; }
  .lp-hero-actions { flex-direction: column; align-items: center; }
  .lp-hero-visual { display: none; }
  .lp-features { grid-template-columns: 1fr; }
  .lp-section { padding: 56px 20px; }
  .lp-section-title { font-size: 26px; margin-bottom: 32px; }
  .lp-cta { padding: 56px 20px; }
  .lp-cta-title { font-size: 26px; }
  .lp-demo-input { flex-direction: column; }
  .lp-demo-input input { width: 100%; }
  .lp-store-row { flex-direction: column; align-items: center; }
  .earnings-banner { flex-direction: column; gap: 16px; }
  .auth-box { padding: 28px 20px; }
  .tip-container { padding: 24px 20px; }
}

/* ============================================================
   FLIQ FOR BUSINESS
   ============================================================ */

.topbar-btn {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin-right: 8px;
  transition: background 0.2s;
}
.topbar-btn:hover { background: rgba(255,255,255,0.25); }

.biz-badge {
  display: inline-block;
  background: #ffd600;
  color: #333;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  margin-left: 8px;
  vertical-align: middle;
}

.biz-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

/* Register card */
.biz-register-card {
  max-width: 640px;
  margin: 40px auto;
  background: #fff;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.10);
}
.biz-register-hero { text-align: center; margin-bottom: 28px; }
.biz-register-hero h2 { font-size: 22px; margin: 12px 0 6px; color: #1a0533; }
.biz-register-hero p { color: #666; font-size: 15px; }
.biz-register-icon { font-size: 48px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-group { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.form-group label { font-size: 13px; font-weight: 600; color: #333; }
.form-group input, .form-group select, .form-group textarea {
  padding: 10px 12px; border: 1.5px solid #ddd; border-radius: 8px;
  font-size: 14px; font-family: inherit; transition: border-color 0.2s;
}
.form-group input:focus, .form-group select:focus { border-color: #7c3aed; outline: none; }

.biz-primary-btn {
  display: block; width: 100%; padding: 14px;
  background: #7c3aed; color: #fff; border: none;
  border-radius: 10px; font-size: 15px; font-weight: 700;
  cursor: pointer; margin-top: 8px; transition: background 0.2s;
}
.biz-primary-btn:hover { background: #6d28d9; }
.biz-primary-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.biz-outline-btn {
  padding: 8px 16px; background: transparent; color: #7c3aed;
  border: 1.5px solid #7c3aed; border-radius: 8px;
  font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.2s;
}
.biz-outline-btn:hover { background: #7c3aed; color: #fff; }

.biz-danger-btn {
  padding: 5px 10px; background: transparent; color: #e53935;
  border: 1px solid #e53935; border-radius: 6px;
  font-size: 12px; cursor: pointer; transition: all 0.2s;
}
.biz-danger-btn:hover { background: #e53935; color: #fff; }

/* Business Header */
.biz-header-card {
  background: linear-gradient(135deg, #7c3aed, #9f67ff);
  color: #fff; border-radius: 16px; padding: 20px 24px;
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.biz-header-left { display: flex; align-items: center; gap: 16px; }
.biz-type-emoji { font-size: 40px; }
.biz-header-card h2 { margin: 0 0 4px; font-size: 20px; }
.biz-header-card p { margin: 0; font-size: 13px; opacity: 0.85; }
.biz-header-right .biz-outline-btn { color: #fff; border-color: rgba(255,255,255,0.6); }
.biz-header-right .biz-outline-btn:hover { background: rgba(255,255,255,0.2); }

/* Stats Grid */
.biz-stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px;
}
.biz-stat-card {
  background: #fff; border-radius: 12px; padding: 16px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}
.biz-stat-icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.biz-stat-value { font-size: 20px; font-weight: 700; color: #1a0533; }
.biz-stat-label { font-size: 12px; color: #888; }

/* Tabs */
.biz-tabs { display: flex; gap: 4px; border-bottom: 2px solid #ede9f6; margin-bottom: 20px; }
.biz-tab {
  padding: 10px 20px; background: transparent; border: none;
  border-bottom: 3px solid transparent; margin-bottom: -2px;
  font-size: 14px; font-weight: 600; color: #888; cursor: pointer; transition: all 0.2s;
}
.biz-tab.active { color: #7c3aed; border-bottom-color: #7c3aed; }
.biz-tab:hover:not(.active) { color: #7c3aed; }
.biz-tab-content { /* shown by default, siblings hidden */ }

/* Section header */
.biz-section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.biz-section-header h3 { margin: 0; font-size: 16px; color: #1a0533; }

/* Staff Table */
.biz-table { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.07); }
.biz-table th { padding: 12px 16px; text-align: left; font-size: 12px; text-transform: uppercase; color: #888; background: #faf8ff; border-bottom: 1px solid #ede9f6; }
.biz-table td { padding: 12px 16px; border-bottom: 1px solid #f5f3ff; vertical-align: middle; }
.biz-table tr:last-child td { border-bottom: none; }
.biz-table tr:hover td { background: #faf8ff; }
.staff-name-cell { display: flex; align-items: center; gap: 10px; }
.staff-avatar { width: 36px; height: 36px; border-radius: 50%; background: #ede9f6; color: #7c3aed; font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0; }
.staff-phone { font-size: 12px; color: #999; }
.role-badge { padding: 2px 8px; border-radius: 20px; border: 1.5px solid; font-size: 11px; font-weight: 700; }

/* Loading / muted */
.biz-loading { padding: 24px; text-align: center; color: #888; }
.biz-muted { color: #999; font-size: 14px; margin: 16px 0; }

/* Rating Distribution */
.rating-dist-wrap { background: #fff; border-radius: 12px; padding: 16px; box-shadow: 0 2px 8px rgba(0,0,0,0.07); margin-bottom: 20px; }
.rating-row { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.rating-star { font-size: 14px; width: 32px; flex-shrink: 0; }
.rating-bar-bg { flex: 1; height: 10px; background: #ede9f6; border-radius: 5px; overflow: hidden; }
.rating-bar { height: 100%; background: linear-gradient(90deg, #ffd600, #ff9800); border-radius: 5px; transition: width 0.4s; }
.rating-count { font-size: 13px; color: #666; width: 24px; text-align: right; }

/* Review Cards */
.review-card { background: #fff; border-radius: 10px; padding: 14px 16px; margin-bottom: 10px; box-shadow: 0 1px 6px rgba(0,0,0,0.07); }
.review-header { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.review-staff { font-weight: 600; font-size: 14px; color: #1a0533; }
.review-stars { color: #ffc107; font-size: 15px; letter-spacing: 1px; }
.review-date { font-size: 12px; color: #aaa; margin-left: auto; }
.review-message { margin: 0; font-size: 14px; color: #555; font-style: italic; }

/* QR Standees */
.biz-qr-grid { }
.qr-staff-group { margin-bottom: 24px; }
.qr-staff-name { font-size: 14px; font-weight: 600; color: #1a0533; margin-bottom: 10px; }
.qr-standees-row { display: flex; flex-wrap: wrap; gap: 16px; }

.qr-standee {
  width: 160px; border: 2px solid #ede9f6; border-radius: 12px;
  overflow: hidden; cursor: default;
}
.qr-standee-inner { padding: 12px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.qr-standee-header { width: 100%; display: flex; justify-content: center; }
.qr-standee-logo { height: 20px; object-fit: contain; }
.qr-standee-img { width: 110px; height: 110px; object-fit: contain; border: 1px solid #eee; border-radius: 4px; }
.qr-standee-placeholder { width: 110px; height: 110px; background: #f5f3ff; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 32px; color: #7c3aed; }
.qr-standee-name { font-size: 13px; font-weight: 700; color: #1a0533; text-align: center; }
.qr-standee-label { font-size: 11px; color: #888; text-align: center; }
.qr-standee-tagline { font-size: 10px; color: #7c3aed; font-weight: 600; }

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center; z-index: 1000;
}
.modal-backdrop.hidden { display: none; }
.modal-box { background: #fff; border-radius: 16px; width: 90%; max-width: 420px; overflow: hidden; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid #ede9f6; }
.modal-header h3 { margin: 0; font-size: 17px; color: #1a0533; }
.modal-close { background: none; border: none; font-size: 18px; cursor: pointer; color: #999; padding: 4px 8px; }
.modal-body { padding: 16px 20px; }
.modal-footer { display: flex; gap: 10px; padding: 12px 20px; border-top: 1px solid #ede9f6; justify-content: flex-end; }

/* Print */
@media print {
  body > *:not(#print-area) { display: none !important; }
  #print-area { display: block !important; }
  .print-only { display: block; }

  .qr-standee {
    width: 200px; page-break-inside: avoid;
    border: 1.5px solid #ccc; border-radius: 8px; margin: 8px;
    display: inline-block;
  }
}
.print-only { display: none; }

/* Responsive Business */
@media (max-width: 768px) {
  .biz-stats-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .biz-header-card { flex-direction: column; align-items: flex-start; gap: 12px; }
  .biz-table { font-size: 12px; }
  .biz-table th, .biz-table td { padding: 8px 10px; }
  .biz-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; scrollbar-width: none; }
  .biz-tabs::-webkit-scrollbar { display: none; }
  .biz-tab { flex-shrink: 0; font-size: 12px; padding: 8px 14px; }
  .biz-content { padding: 16px; }
  .auth-box { margin: 16px; max-width: calc(100% - 32px); }
  .staff-name-cell { flex-direction: column; align-items: flex-start; gap: 4px; }
}
