/* ============================================================
   Reload & Bill Pay System — Modern Responsive UI & POS Styles
   Theme extracted from Logo: Deep Navy (#040E27) & Neon Mint (#00F090)
   Developed by SEO PRO DEVELOPER
   ============================================================ */

:root {
  --navy-950: #040E27;
  --navy-900: #081738;
  --navy-800: #0F2352;
  --navy-700: #18326E;
  --mint-500: #00F090;
  --mint-600: #00C978;
  --mint-700: #009E5E;
  --mint-soft: rgba(0, 240, 144, 0.14);

  --bg: #F3F7FC;
  --surface: #FFFFFF;
  --surface-alt: #EEF4FB;
  --border: #DCE6F2;
  --text: #0A1935;
  --text-muted: #526582;
  --shadow: 0 10px 30px rgba(4, 14, 39, 0.08);
  --shadow-lg: 0 18px 44px rgba(4, 14, 39, 0.14);

  --success: #059669;
  --warning: #D97706;
  --danger: #DC2626;
  --info: #0284C7;

  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --header-h: 68px;
  --bottom-nav-h: 68px;
}

[data-theme="dark"] {
  --bg: #030A1B;
  --surface: #0A1735;
  --surface-alt: #11224A;
  --border: #1C3163;
  --text: #F1F6FF;
  --text-muted: #9CB0D1;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 18px 44px rgba(0, 0, 0, 0.5);
}

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

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', 'Noto Sans Sinhala', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

/* ---------- Top Navbar ---------- */
.rb-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  height: var(--header-h);
  background: var(--navy-950);
  color: #FFFFFF;
  border-bottom: 1px solid rgba(0, 240, 144, 0.18);
  box-shadow: 0 4px 20px rgba(4, 14, 39, 0.28);
}

.rb-header-inner {
  max-width: 1320px;
  margin: 0 auto;
  height: 100%;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.rb-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.rb-brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  border: 1.5px solid rgba(0, 240, 144, 0.4);
  flex-shrink: 0;
}

.rb-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}

.rb-brand-title {
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rb-brand-title span {
  color: var(--mint-500);
}

.rb-brand-sub {
  font-size: 0.7rem;
  color: #9CB0D1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rb-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.rb-nav a {
  padding: 8px 13px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #D7E4F8;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.2s ease;
}

.rb-nav a:hover,
.rb-nav a.active {
  background: rgba(0, 240, 144, 0.14);
  color: var(--mint-500);
}

.rb-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rb-balance-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(0, 240, 144, 0.13);
  border: 1px solid rgba(0, 240, 144, 0.4);
  color: var(--mint-500);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.rb-balance-pill.low {
  background: rgba(220, 38, 38, 0.22);
  border-color: #F87171;
  color: #FCA5A5;
  animation: rbPulse 1.6s infinite;
}

@keyframes rbPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(248, 113, 113, 0.45); }
  50% { box-shadow: 0 0 0 8px rgba(248, 113, 113, 0); }
}

.rb-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  min-width: 38px;
  padding: 0 11px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: #FFFFFF;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.rb-icon-btn:hover {
  background: rgba(0, 240, 144, 0.18);
  border-color: var(--mint-500);
  color: var(--mint-500);
}

.rb-icon-btn.mint {
  background: var(--mint-500);
  color: var(--navy-950);
  border-color: var(--mint-500);
}

.rb-icon-btn.mint:hover {
  background: var(--mint-600);
  color: var(--navy-950);
}

#mobile_btn {
  display: none;
}

/* Mobile Slide Drawer */
.rb-mobile-drawer {
  position: fixed;
  top: var(--header-h);
  left: -100%;
  width: 280px;
  max-width: 85vw;
  height: calc(100vh - var(--header-h));
  background: var(--navy-950);
  color: #FFF;
  z-index: 1040;
  padding: 18px 14px;
  overflow-y: auto;
  transition: left 0.26s ease;
  box-shadow: 8px 0 32px rgba(0, 0, 0, 0.45);
  border-right: 1px solid rgba(0, 240, 144, 0.2);
}

.rb-mobile-drawer.open {
  left: 0;
}

.rb-drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  top: var(--header-h);
  background: rgba(4, 14, 39, 0.65);
  z-index: 1035;
}

.rb-drawer-overlay.open {
  display: block;
}

.rb-mobile-drawer a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  color: #E2ECFC;
  font-weight: 600;
  margin-bottom: 6px;
}

.rb-mobile-drawer a.active,
.rb-mobile-drawer a:hover {
  background: rgba(0, 240, 144, 0.16);
  color: var(--mint-500);
}

/* ---------- Containers & Cards ---------- */
.rb-main {
  flex: 1;
  width: 100%;
}

.rb-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 20px 16px;
}

.rb-pos-container {
  max-width: 780px;
  margin: 0 auto;
  padding: 16px 14px 96px;
}

.rb-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

/* ---------- Hero Slider (Landing) ---------- */
.rb-slider-wrap {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--navy-950);
  margin-bottom: 28px;
}

.rb-slide {
  display: none;
  position: relative;
}

.rb-slide.active {
  display: block;
  animation: rbFade 0.45s ease;
}

@keyframes rbFade {
  from { opacity: 0.4; }
  to { opacity: 1; }
}

.rb-slide img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  display: block;
}

.rb-slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(4, 14, 39, 0.85) 0%, rgba(4, 14, 39, 0.35) 60%, rgba(4, 14, 39, 0.15) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px 32px;
  color: #FFFFFF;
}

.rb-slide-dots {
  position: absolute;
  bottom: 14px;
  right: 20px;
  display: flex;
  gap: 8px;
  z-index: 5;
}

.rb-slide-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s;
}

.rb-slide-dot.active {
  width: 28px;
  border-radius: 6px;
  background: var(--mint-500);
}

/* ---------- POS 4 Big Touch Buttons ---------- */
.pos-hero-balance {
  background: linear-gradient(135deg, var(--navy-950) 0%, var(--navy-800) 100%);
  color: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-bottom: 18px;
  border: 1px solid rgba(0, 240, 144, 0.28);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  box-shadow: 0 12px 28px rgba(4, 14, 39, 0.22);
}

.pos-bal-amount {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--mint-500);
  letter-spacing: -0.02em;
}

.pos-grid-4 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.pos-big-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  min-height: 152px;
  padding: 20px 18px;
  border-radius: var(--radius-lg);
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.14s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
}

.pos-big-btn:hover {
  transform: translateY(-3px);
  border-color: var(--mint-500);
  box-shadow: var(--shadow-lg);
}

.pos-big-btn:active {
  transform: scale(0.98);
}

.pos-big-icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.55rem;
  margin-bottom: 14px;
}

.pos-big-icon.reload { background: rgba(0, 240, 144, 0.16); color: var(--mint-700); }
.pos-big-icon.router { background: rgba(2, 132, 199, 0.16); color: #0284C7; }
.pos-big-icon.utility { background: rgba(217, 119, 6, 0.16); color: #D97706; }
.pos-big-icon.receipt { background: rgba(124, 58, 237, 0.15); color: #7C3AED; }

[data-theme="dark"] .pos-big-icon.reload { color: var(--mint-500); }
[data-theme="dark"] .pos-big-icon.router { color: #38BDF8; }
[data-theme="dark"] .pos-big-icon.utility { color: #FBBF24; }
[data-theme="dark"] .pos-big-icon.receipt { color: #C084FC; }

.pos-big-title {
  font-size: 1.12rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.pos-big-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.35;
}

/* ---------- Provider Selector Cards ---------- */
.provider-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.provider-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 10px;
  border-radius: 14px;
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.18s ease;
  text-align: center;
}

.provider-chip .p-dot {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFF;
  font-weight: 800;
  font-size: 0.95rem;
}

.provider-chip.selected {
  border-color: var(--mint-500);
  background: var(--mint-soft);
  box-shadow: 0 0 0 3px rgba(0, 240, 144, 0.22);
}

/* ---------- Quick Amount Buttons ---------- */
.quick-amounts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 12px 0 16px;
}

.quick-amt-btn {
  padding: 13px 6px;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: var(--surface-alt);
  color: var(--text);
  font-weight: 800;
  font-size: 0.96rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.quick-amt-btn.active,
.quick-amt-btn:hover {
  border-color: var(--mint-500);
  background: var(--navy-950);
  color: var(--mint-500);
}

/* ---------- Large Touch Inputs & Buttons ---------- */
.rb-input-lg {
  width: 100%;
  padding: 15px 16px;
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: 14px;
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.rb-input-lg:focus {
  border-color: var(--mint-500);
  box-shadow: 0 0 0 4px rgba(0, 240, 144, 0.18);
}

.rb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px 22px;
  border-radius: 14px;
  border: none;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.18s ease;
  text-align: center;
}

.rb-btn-primary {
  background: linear-gradient(135deg, var(--mint-500) 0%, var(--mint-600) 100%);
  color: var(--navy-950);
  box-shadow: 0 8px 20px rgba(0, 240, 144, 0.28);
}

.rb-btn-primary:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.rb-btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.rb-btn-navy {
  background: var(--navy-950);
  color: #FFFFFF;
  border: 1.5px solid rgba(0, 240, 144, 0.35);
}

.rb-btn-navy:hover {
  background: var(--navy-800);
  color: var(--mint-500);
}

.rb-btn-outline {
  background: transparent;
  color: var(--text);
  border: 2px solid var(--border);
}

.rb-btn-outline:hover {
  border-color: var(--mint-500);
  color: var(--mint-600);
}

.rb-btn-whatsapp {
  background: #25D366;
  color: #FFFFFF;
}

.rb-btn-whatsapp:hover {
  background: #1DA851;
  color: #FFFFFF;
}

/* ---------- Confirm Summary Box ---------- */
.confirm-hero {
  background: linear-gradient(135deg, var(--navy-950), var(--navy-800));
  color: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 22px;
  text-align: center;
  margin-bottom: 18px;
  border: 1px solid rgba(0, 240, 144, 0.35);
}

.confirm-number {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--mint-500);
  margin: 6px 0;
  word-break: break-all;
}

.confirm-total {
  font-size: 2.1rem;
  font-weight: 900;
  color: #FFFFFF;
}

/* ---------- Status Badges ---------- */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
}

.badge-successful { background: rgba(5, 150, 105, 0.16); color: #059669; }
.badge-pending    { background: rgba(217, 119, 6, 0.18); color: #D97706; }
.badge-failed     { background: rgba(220, 38, 38, 0.16); color: #DC2626; }
.badge-refunded   { background: rgba(124, 58, 237, 0.16); color: #7C3AED; }

[data-theme="dark"] .badge-successful { color: #34D399; }
[data-theme="dark"] .badge-pending    { color: #FBBF24; }
[data-theme="dark"] .badge-failed     { color: #F87171; }
[data-theme="dark"] .badge-refunded   { color: #C084FC; }

/* ---------- Mobile Bottom Navigation ---------- */
.rb-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-h);
  background: var(--navy-950);
  border-top: 1px solid rgba(0, 240, 144, 0.22);
  z-index: 1020;
  padding: 6px 8px env(safe-area-inset-bottom);
  box-shadow: 0 -6px 24px rgba(4, 14, 39, 0.35);
}

.rb-bottom-nav-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 100%;
  max-width: 560px;
  margin: 0 auto;
}

.rb-bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #9CB0D1;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 12px;
}

.rb-bottom-nav a i {
  font-size: 1.2rem;
}

.rb-bottom-nav a.active {
  color: var(--mint-500);
  background: rgba(0, 240, 144, 0.1);
}

/* ---------- Floating WhatsApp Inquiry Chat Widget ---------- */
.rb-wa-float {
  position: fixed;
  right: 18px;
  bottom: 22px;
  z-index: 1025;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.rb-wa-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  color: #FFFFFF;
  border: 3px solid #FFFFFF;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.42);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.65rem;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.rb-wa-btn:hover {
  transform: scale(1.08);
}

.rb-wa-popup {
  display: none;
  width: 310px;
  max-width: calc(100vw - 32px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.rb-wa-popup.open {
  display: block;
}

.rb-wa-popup-head {
  background: #075E54;
  color: #FFFFFF;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rb-wa-close {
  background: rgba(255, 255, 255, 0.22);
  color: #FFFFFF;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Footer ---------- */
.rb-footer {
  background: var(--navy-950);
  color: #CBD5E1;
  border-top: 1px solid rgba(0, 240, 144, 0.2);
  padding: 28px 16px 22px;
  margin-top: auto;
}

.rb-footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.rb-footer-credit {
  color: var(--mint-500);
  font-weight: 700;
  font-size: 0.88rem;
}

.rb-social-links {
  display: flex;
  gap: 10px;
}

.rb-social-links a {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.rb-social-links a:hover {
  background: var(--mint-500);
  color: var(--navy-950);
}

/* ---------- Responsive Breakpoints ---------- */
@media (max-width: 991px) {
  .rb-nav {
    display: none;
  }
  #mobile_btn {
    display: inline-flex;
  }
  .rb-brand-sub {
    display: none;
  }
  .rb-icon-btn .btn-label {
    display: none;
  }
  .rb-bottom-nav {
    display: block;
  }
  .rb-footer {
    padding-bottom: calc(var(--bottom-nav-h) + 22px);
  }
  .rb-wa-float {
    bottom: calc(var(--bottom-nav-h) + 14px);
    right: 12px;
  }
  .rb-slide img {
    height: 240px;
  }
}

@media (max-width: 575px) {
  .rb-header-inner {
    padding: 0 10px;
    gap: 6px;
  }
  .rb-brand-title {
    font-size: 0.9rem;
  }
  .rb-balance-pill {
    padding: 5px 9px;
    font-size: 0.74rem;
  }
  .pos-grid-4 {
    gap: 10px;
  }
  .pos-big-btn {
    min-height: 136px;
    padding: 15px 13px;
  }
  .pos-big-title {
    font-size: 0.98rem;
  }
  .quick-amounts {
    grid-template-columns: repeat(2, 1fr);
  }
}
