/* ============================================================
   QRPay – Main Stylesheet
   Mobile-first, modern fintech UI
   ============================================================ */

:root {
  --bg:         #0d0f14;
  --surface:    #161922;
  --surface-2:  #1e2230;
  --border:     #2a2f3e;
  --accent:     #6C63FF;
  --accent-2:   #8B5CF6;
  --green:      #22c55e;
  --red:        #ef4444;
  --orange:     #f97316;
  --blue:       #3b82f6;
  --teal:       #14b8a6;
  --text:       #f0f2f8;
  --muted:      #8b93a8;
  --card-bg:    #1e2230;
  --input-bg:   #252a38;
  --radius:     14px;
  --radius-sm:  8px;
  --shadow:     0 4px 24px rgba(0,0,0,0.35);
  --font-head:  'Syne', sans-serif;
  --font-body:  'DM Sans', sans-serif;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { opacity: 0.85; }

/* ── Landing Page ──────────────────────────────────────────── */
.landing-page { overflow: hidden; }

.landing-bg {
  position: fixed; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% -20%, rgba(108,99,255,0.18) 0%, transparent 70%);
  pointer-events: none; z-index: 0;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.25;
  animation: blobPulse 8s ease-in-out infinite alternate;
}
.blob-1 { width: 400px; height: 400px; background: var(--accent); top: -100px; right: -100px; }
.blob-2 { width: 300px; height: 300px; background: var(--accent-2); bottom: -50px; left: -80px; animation-delay: -4s; }

@keyframes blobPulse {
  from { transform: scale(1) translate(0,0); }
  to   { transform: scale(1.15) translate(20px, -20px); }
}

.landing-container {
  position: relative; z-index: 1;
  max-width: 440px; margin: 0 auto;
  padding: 2rem 1.25rem;
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
}

.brand-logo {
  display: flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-head); font-weight: 800; font-size: 1.3rem;
  color: var(--text);
}

.shop-hero {
  text-align: center; padding: 2rem 0 1.5rem;
}
.shop-icon { font-size: 3.5rem; margin-bottom: 0.75rem; }
.shop-hero h1 { font-family: var(--font-head); font-size: 1.75rem; font-weight: 700; }
.shop-hero p  { color: var(--muted); margin-top: 0.4rem; }

.verify-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow);
  text-align: center;
}
.verify-icon { margin-bottom: 1rem; }
.verify-card h2 { font-family: var(--font-head); font-size: 1.4rem; font-weight: 700; margin-bottom: 0.5rem; }
.verify-sub { color: var(--muted); font-size: 0.9rem; line-height: 1.55; margin-bottom: 1.5rem; }

.btn-whatsapp {
  display: inline-flex; align-items: center; gap: 0.6rem;
  background: #25D366; color: #fff;
  padding: 0.9rem 2rem; border-radius: 50px;
  font-weight: 600; font-size: 1rem;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 20px rgba(37,211,102,0.4);
}
.btn-whatsapp:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(37,211,102,0.5); color: #fff; }

.verify-hint { color: var(--muted); font-size: 0.78rem; margin-top: 1rem; }

.no-shop-card {
  text-align: center; padding: 3rem 1.5rem;
  background: var(--surface); border-radius: var(--radius);
  border: 1px solid var(--border);
}
.no-shop-icon { font-size: 3rem; margin-bottom: 1rem; }

/* ── Dashboard ────────────────────────────────────────────── */
.dashboard-body { background: var(--bg); }

.alert-banner {
  display: flex; align-items: center; gap: 0.75rem;
  background: rgba(249,115,22,0.15); border-bottom: 1px solid rgba(249,115,22,0.3);
  padding: 0.75rem 1.25rem; font-size: 0.85rem;
}
.alert-banner a { color: var(--orange); font-weight: 600; }
.alert-banner button { margin-left: auto; background: none; border: none; color: var(--muted); cursor: pointer; font-size: 1rem; }

/* Sidebar */
.sidebar-overlay {
  display: none; position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  opacity: 0; transition: opacity 0.3s;
}
.sidebar-overlay.show { display: block; opacity: 1; }

.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 101;
  width: 280px; background: var(--surface-2);
  border-right: 1px solid var(--border);
  padding: 1.5rem 0;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  overflow-y: auto;
}
.sidebar.open { transform: translateX(0); }

.sidebar-header {
  display: flex; align-items: center; gap: 1rem;
  padding: 0 1.5rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.sidebar-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.1rem;
}
.sidebar-uid   { font-family: var(--font-head); font-weight: 700; font-size: 0.95rem; }
.sidebar-phone { color: var(--muted); font-size: 0.82rem; margin-top: 2px; }

.sidebar-nav { list-style: none; padding: 1rem 0; }
.sidebar-nav li a {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.85rem 1.5rem; color: var(--text);
  font-size: 0.95rem; font-weight: 500;
  transition: background 0.15s, color 0.15s; border-radius: 0;
}
.sidebar-nav li a:hover, .sidebar-nav li a.active {
  background: rgba(108,99,255,0.12); color: var(--accent);
}
.sidebar-nav li a span { font-size: 1.1rem; }
.sidebar-divider { height: 1px; background: var(--border); margin: 0.5rem 1.5rem; }
.logout-link { color: var(--red) !important; }
.sidebar-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border); }
.logout-all-link { color: var(--muted); font-size: 0.8rem; }

/* Top Navbar */
.top-navbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}
.inner-navbar { gap: 0; }
.navbar-title { font-family: var(--font-head); font-size: 1.1rem; font-weight: 700; }
.back-btn {
  display: flex; align-items: center; justify-content: center;
  width: 2.2rem; height: 2.2rem; border-radius: var(--radius-sm);
  background: var(--surface-2); color: var(--text); font-size: 1.1rem;
  border: 1px solid var(--border);
}

.navbar-wallet { display: flex; flex-direction: column; }
.wallet-label  { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.wallet-amount { font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; }

.navbar-actions { display: flex; align-items: center; gap: 0.75rem; }

.btn-add-money {
  background: rgba(108,99,255,0.18); color: var(--accent);
  border: 1px solid rgba(108,99,255,0.35); border-radius: 50px;
  padding: 0.45rem 1rem; font-weight: 600; font-size: 0.88rem;
  cursor: pointer; transition: background 0.15s;
}
.btn-add-money:hover { background: rgba(108,99,255,0.3); }

.btn-menu {
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 2.2rem; height: 2.2rem; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  cursor: pointer; padding: 0.5rem;
}
.btn-menu span { display: block; height: 2px; background: var(--text); border-radius: 2px; }

/* Main Content */
.main-content { padding: 1.25rem; max-width: 480px; margin: 0 auto; padding-bottom: 3rem; }

/* UID Card */
.uid-card {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 8px 32px rgba(108,99,255,0.3);
}
.uid-label { font-size: 0.75rem; color: rgba(255,255,255,0.7); text-transform: uppercase; letter-spacing: 0.06em; }
.uid-value { font-family: var(--font-head); font-size: 1.4rem; font-weight: 800; color: #fff; margin-top: 0.25rem; letter-spacing: 0.1em; }
.shop-badge { display: inline-flex; align-items: center; gap: 0.4rem; margin-top: 0.75rem; background: rgba(255,255,255,0.18); color: #fff; padding: 0.3rem 0.75rem; border-radius: 50px; font-size: 0.82rem; font-weight: 500; }

.section-title { font-family: var(--font-head); font-weight: 700; font-size: 1rem; margin-bottom: 1rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }

/* Pay Buttons */
.pay-buttons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; margin-bottom: 2rem; }

.pay-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 0.5rem;
  cursor: pointer; transition: all 0.2s;
  display: flex; flex-direction: column; align-items: center; gap: 0.25rem;
  color: var(--text);
}
.pay-btn:hover, .pay-btn:active {
  border-color: var(--accent);
  background: rgba(108,99,255,0.1);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(108,99,255,0.2);
}
.pay-rupee  { font-size: 1rem; color: var(--muted); }
.pay-amount { font-family: var(--font-head); font-size: 1.6rem; font-weight: 800; }
.pay-charge { font-size: 0.7rem; color: var(--muted); }

.no-shop-notice {
  text-align: center; padding: 2rem;
  background: var(--surface); border-radius: var(--radius);
  border: 1px dashed var(--border); margin-bottom: 2rem;
  color: var(--muted);
}
.no-shop-notice .no-shop-icon { font-size: 2rem; margin-bottom: 0.5rem; }

/* Transactions */
.txn-list { display: flex; flex-direction: column; gap: 0.75rem; }

.txn-card {
  display: flex; align-items: center; gap: 1rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem 1.1rem;
  transition: transform 0.15s, border-color 0.15s;
}
.txn-card:hover { border-color: var(--accent); transform: translateX(2px); }

.txn-icon { font-size: 1.5rem; flex-shrink: 0; }
.txn-info { flex: 1; min-width: 0; }
.txn-shop { font-weight: 600; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.txn-meta { font-size: 0.75rem; color: var(--muted); margin-top: 2px; }
.txn-id   { font-size: 0.68rem; color: var(--border); margin-top: 2px; font-family: monospace; }

.txn-amount-block { text-align: right; flex-shrink: 0; }
.txn-amount { font-family: var(--font-head); font-weight: 700; font-size: 1rem; }
.txn-amount.debit  { color: var(--red); }
.txn-amount.credit { color: var(--green); }

.txn-status { font-size: 0.7rem; font-weight: 600; margin-top: 3px; padding: 2px 8px; border-radius: 50px; display: inline-block; }
.txn-status.success { background: rgba(34,197,94,0.15); color: var(--green); }
.txn-status.failed  { background: rgba(239,68,68,0.15); color: var(--red); }
.txn-status.pending { background: rgba(249,115,22,0.15); color: var(--orange); }

.view-all-link { display: block; text-align: center; margin-top: 1rem; color: var(--accent); font-size: 0.88rem; font-weight: 500; }

.empty-state { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.empty-icon  { font-size: 2.5rem; margin-bottom: 0.75rem; }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 0.5rem; margin-top: 1.5rem; }
.page-btn { padding: 0.4rem 0.75rem; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); color: var(--text); font-size: 0.85rem; transition: all 0.15s; }
.page-btn.active, .page-btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ── Modals ────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.65); backdrop-filter: blur(6px);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fadeIn 0.2s;
}
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }

.modal-sheet {
  background: var(--surface-2); border-radius: var(--radius) var(--radius) 0 0;
  border: 1px solid var(--border); border-bottom: none;
  padding: 1.5rem 1.5rem 2rem;
  width: 100%; max-width: 480px;
  animation: slideUp 0.3s cubic-bezier(0.4,0,0.2,1);
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

.modal-handle { width: 40px; height: 4px; background: var(--border); border-radius: 2px; margin: 0 auto 1.5rem; }
.modal-title  { font-family: var(--font-head); font-size: 1.2rem; font-weight: 700; margin-bottom: 0.5rem; }
.modal-sub    { color: var(--muted); font-size: 0.9rem; margin-bottom: 1.25rem; }
.modal-shop-name { color: var(--muted); font-size: 0.88rem; margin-bottom: 1rem; }

.modal-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.6rem 0; font-size: 0.92rem;
}
.modal-row span:last-child { font-weight: 600; }
.modal-divider { height: 1px; background: var(--border); margin: 0.5rem 0; }
.total-row { font-size: 1rem; }
.total-row span:last-child { font-size: 1.15rem; color: var(--accent); }

.modal-warning { background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.3); border-radius: var(--radius-sm); padding: 0.75rem 1rem; color: var(--red); font-size: 0.85rem; margin-top: 0.75rem; }

.modal-actions { display: flex; gap: 0.75rem; margin-top: 1.5rem; }
.btn-cancel {
  flex: 1; padding: 0.85rem; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); font-weight: 600; cursor: pointer; transition: background 0.15s;
}
.btn-cancel:hover { background: var(--border); }
.btn-pay {
  flex: 2; padding: 0.85rem; border-radius: var(--radius-sm);
  background: var(--accent); border: none;
  color: #fff; font-weight: 700; font-size: 1rem; cursor: pointer;
  transition: all 0.15s; letter-spacing: 0.02em;
}
.btn-pay:hover   { background: var(--accent-2); box-shadow: 0 4px 16px rgba(108,99,255,0.4); }
.btn-pay.disabled { opacity: 0.4; cursor: not-allowed; }

.btn-primary {
  padding: 0.85rem 1.5rem; border-radius: var(--radius-sm);
  background: var(--accent); color: #fff; font-weight: 700;
  border: none; cursor: pointer;
}

.modal-loader { display: flex; align-items: center; justify-content: center; gap: 0.75rem; padding: 0.5rem; color: var(--muted); }

.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.modal-input {
  width: 100%; padding: 0.85rem 1rem;
  background: var(--input-bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text); font-size: 0.95rem;
  font-family: var(--font-body); outline: none; transition: border-color 0.15s;
}
.modal-input:focus { border-color: var(--accent); }
.modal-input::placeholder { color: var(--muted); }

/* ── Card Page ─────────────────────────────────────────────── */
.physical-card {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  border-radius: 18px; padding: 1.5rem; margin-bottom: 1.5rem;
  aspect-ratio: 1.586 / 1; position: relative; overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.08);
}
.physical-card::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(130deg, rgba(255,255,255,0.06) 0%, transparent 50%);
  pointer-events: none;
}
.card-chip { position: absolute; top: 1.5rem; left: 1.5rem; }
.card-logo { position: absolute; top: 1.25rem; right: 1.5rem; font-family: var(--font-head); font-weight: 800; color: rgba(255,255,255,0.9); font-size: 1rem; }
.card-number { position: absolute; bottom: 3.5rem; left: 1.5rem; font-family: monospace; font-size: 1.05rem; letter-spacing: 0.2em; color: rgba(255,255,255,0.9); }
.card-meta { position: absolute; bottom: 1.25rem; left: 1.5rem; right: 1.5rem; display: flex; justify-content: space-between; }
.card-meta-label { font-size: 0.65rem; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 0.06em; }
.card-meta-value { font-size: 0.85rem; color: rgba(255,255,255,0.9); font-weight: 600; margin-top: 2px; }

.card-pickup-info { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; }
.pickup-title  { font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.5rem; }
.pickup-shop   { font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; }
.pickup-address { color: var(--muted); font-size: 0.85rem; margin-top: 0.25rem; }
.pickup-issued  { color: var(--muted); font-size: 0.78rem; margin-top: 0.5rem; }

.card-benefits { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1.5rem; }
.benefits-title { font-family: var(--font-head); font-size: 1.2rem; font-weight: 700; margin-bottom: 1rem; }
.benefits-list  { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }
.benefits-list li { font-size: 0.9rem; color: var(--muted); }
.card-price-box { display: flex; justify-content: space-between; align-items: center; margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.price-label { color: var(--muted); font-size: 0.88rem; }
.price-value { font-family: var(--font-head); font-size: 1.5rem; font-weight: 800; color: var(--accent); }

.btn-order-card {
  width: 100%; padding: 1rem; background: var(--accent); color: #fff;
  border: none; border-radius: var(--radius); font-size: 1rem;
  font-weight: 700; cursor: pointer; letter-spacing: 0.02em;
  transition: all 0.15s;
}
.btn-order-card:hover { background: var(--accent-2); box-shadow: 0 4px 20px rgba(108,99,255,0.4); }

/* ── Toast ─────────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%) translateY(100px);
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text); padding: 0.75rem 1.5rem; border-radius: 50px;
  font-size: 0.9rem; font-weight: 500; z-index: 999;
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  white-space: nowrap; box-shadow: var(--shadow);
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success { border-color: rgba(34,197,94,0.4); }
.toast.error   { border-color: rgba(239,68,68,0.4); }

/* ── Forms ─────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label { font-size: 0.85rem; color: var(--muted); font-weight: 500; }
.form-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.75rem; }
.form-section-title { font-family: var(--font-head); font-weight: 700; font-size: 0.95rem; color: var(--muted); margin-bottom: 0.75rem; }

/* Alert success */
.alert-success {
  background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.3);
  border-radius: var(--radius-sm); padding: 0.75rem 1rem;
  color: var(--green); font-size: 0.88rem; margin-bottom: 1rem;
}

/* QR Print Card */
.qr-print-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 2rem;
  display: flex; flex-direction: column; align-items: center; gap: 0.75rem;
}
.qr-shop-logo { font-size: 3rem; }
.qr-shop-name { font-family: var(--font-head); font-size: 1.5rem; font-weight: 800; }
.qr-sub  { color: var(--muted); font-size: 0.88rem; }
.qr-image-large { width: 200px; height: 200px; border-radius: var(--radius-sm); background: #fff; padding: 8px; }
.qr-image { width: 80px; height: 80px; background: #fff; border-radius: var(--radius-sm); padding: 4px; }
.qr-id   { font-size: 0.82rem; color: var(--muted); font-family: monospace; }
.qr-url  { font-size: 0.72rem; color: var(--muted); word-break: break-all; text-align: center; }
.btn-secondary { background: var(--surface-2); border: 1px solid var(--border); color: var(--text); padding: 0.6rem 1.25rem; border-radius: var(--radius-sm); font-weight: 500; cursor: pointer; }
