/* =====================================================
   AppleVine Vending — Main stylesheet
   Design: CBZ navy/blue hero + orange accents
   Brand colours: CBZ blue #1B3A8C, CBZ red #E5001B, orange #F97316
   ===================================================== */

:root {
  /* CBZ Blue palette */
  --green-900:    #0D1F54;
  --green-800:    #122368;
  --green-700:    #1B3A8C;   /* CBZ primary blue */
  --green-600:    #1E5CB3;
  --green-500:    #2570D4;
  --green-400:    #3A82DE;
  --green-50:     #E8EFF9;
  /* CBZ Red */
  --cbz-red:      #E5001B;
  --cbz-red-dark: #B0001A;
  /* Orange accent */
  --orange:       #F97316;
  --orange-dark:  #DB6514;
  --orange-light: #FED7AA;
  --bg:           #F7F8F9;
  --bg-soft:      #F3F5F4;
  --surface:      #FFFFFF;
  --border:       #E5E7EB;
  --border-strong:#D1D5DB;
  --text:         #111827;
  --text-muted:   #6B7280;
  --text-dim:     #9CA3AF;
  --text-invert:  #FFFFFF;
  --danger:       #DC2626;
  --danger-bg:    #FEF2F2;
  --success:      #059669;
  --success-bg:   #ECFDF5;
  --info:         #2563EB;
  --info-bg:      #EFF6FF;
  --warning:      #D97706;
  --warning-bg:   #FFFBEB;
  --radius:       10px;
  --radius-lg:    14px;
  --radius-xl:    18px;
  --shadow:       0 1px 3px rgba(0,0,0,.08);
  --shadow-lg:    0 8px 24px rgba(0,0,0,.10);
  --shadow-xl:    0 20px 40px rgba(0,0,0,.15);
  --font-sans:    -apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue','Segoe UI Emoji','Apple Color Emoji','Noto Color Emoji',sans-serif;
  --font-mono:    'JetBrains Mono',ui-monospace,Menlo,monospace;
}

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

html, body { height: 100%; }
body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: 28px; }
h2 { font-size: 28px; }
h3 { font-size: 18px; }
h4 { font-size: 15px; font-weight: 600; }

a { color: var(--green-600); text-decoration: none; }
a:hover { text-decoration: underline; }

.muted       { color: var(--text-muted); }
.muted-light { color: rgba(255,255,255,0.72); }
.dim         { color: var(--text-dim); }
.small { font-size: 13px; }
.xs    { font-size: 12px; }
.mono  { font-family: var(--font-mono); }
.hide-mobile { display: inline; }

/* ---------- Layout ---------- */
.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 640px; margin: 0 auto; padding: 0 24px; }
.site-main { flex: 1 1 auto; }

/* ---------- Header ---------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 24px; gap: 24px;
  min-height: 88px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); flex-shrink: 0; }
.brand:hover { text-decoration: none; }
.brand-logo {
  height: 61px;
  width: auto;
  display: block;
  max-width: 280px;
  object-fit: contain;
}
.admin-brand-logo {
  height: 65px;
  width: 65px;
  object-fit: contain;
  background: #fff;
  padding: 5px;
  border-radius: 12px;
}

/* User pill in nav (distinguishes user's name from portal links) */
.nav-user-pill {
  display: inline-flex !important;
  align-items: center;
  gap: 7px;
  padding: 5px 11px 5px 5px !important;
  background: var(--green-50);
  border-radius: 100px;
  color: var(--text) !important;
}
.nav-user-pill:hover { background: var(--orange-light); text-decoration: none !important; }
.nav-user-avatar {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--green-500); color: #fff;
  display: grid; place-items: center;
  font-weight: 700; font-size: 11px;
  flex-shrink: 0;
}
.nav-user-name { font-size: 13px; font-weight: 600; }

.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  color: var(--text); padding: 9px 14px; border-radius: 8px;
  font-size: 14px; font-weight: 500;
}
.site-nav a:hover { background: var(--bg-soft); text-decoration: none; }

.site-nav a.nav-primary {
  background: var(--green-500); color: #fff;
  padding: 10px 18px;
  box-shadow: 0 1px 2px rgba(46,139,87,.25);
}
.site-nav a.nav-primary:hover { background: var(--green-600); }
.site-nav a.nav-ghost { color: var(--text); }
.site-nav a.nav-outline {
  border: 1px solid var(--border-strong);
  padding: 9px 14px;
}

.nav-toggle {
  display: none; background: none; border: none;
  font-size: 26px; cursor: pointer; color: var(--text);
  padding: 4px 8px;
}

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; top: 100px; right: 16px; left: 16px;
    flex-direction: column; align-items: stretch;
    background: var(--surface);
    border: 1px solid var(--border); border-radius: 12px;
    padding: 10px; box-shadow: var(--shadow-xl);
    display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a { width: 100%; text-align: left; padding: 12px 14px; }
  .hide-mobile { display: none; }
  .brand-logo { height: 74px; max-width: 240px; }
}

/* ---------- Flash ---------- */
.flash {
  margin: 16px auto; max-width: 1120px;
  padding: 13px 18px; border-radius: 10px; font-size: 14px;
  background: var(--info-bg); color: var(--info);
  border: 1px solid rgba(37,99,235,0.2);
}
.flash-success { background: var(--success-bg); color: var(--success); border-color: rgba(5,150,105,0.2); }
.flash-error   { background: var(--danger-bg);  color: var(--danger);  border-color: rgba(220,38,38,0.2); }
.flash-warning { background: var(--warning-bg); color: var(--warning); border-color: rgba(217,119,6,0.2); }

/* ============================================================
   HERO — split blue-to-orange stage
   ============================================================ */
.hero-full {
  background:
    radial-gradient(ellipse 160% 90% at 0% 50%, rgba(13,31,84,.75) 0%, transparent 50%),
    radial-gradient(ellipse 160% 90% at 100% 50%, rgba(249,115,22,.55) 0%, transparent 50%),
    linear-gradient(145deg, #0D1F54 0%, #1B3A8C 30%, #3A2A22 50%, #8B4A1A 68%, #EA6D12 85%, #F97316 100%);
  color: var(--text-invert);
  padding: 72px 0 96px;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 440px;
  gap: 48px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero-text { min-width: 0; }

.hero-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 16px 7px 12px;
  background: rgba(249,115,22,.12);
  border: 1px solid rgba(249,115,22,.35);
  border-radius: 100px;
  font-size: 13px; font-weight: 600;
  color: #FDBA74;
  margin-bottom: 24px;
}
.hero-pill-icon { color: #FDBA74; font-size: 14px; }

.hero-title {
  font-size: clamp(36px, 5vw, 62px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.025em;
  color: var(--text-invert);
  margin-bottom: 24px;
}
.hero-title-accent { color: var(--orange); }

.hero-lede {
  font-size: clamp(15px, 1.2vw, 17px);
  line-height: 1.6;
  color: rgba(255,255,255,0.78);
  max-width: 560px;
  margin-bottom: 32px;
}

.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Hero purchase widget ---------- */
.hero-widget {
  background: #fff;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.35);
  color: var(--text);
}
.hw-header {
  display: flex; align-items: center; gap: 12px;
  padding-bottom: 16px; margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.hw-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: linear-gradient(135deg, var(--orange) 0%, #F59E0B 100%);
  color: #fff; display: grid; place-items: center;
  font-size: 22px;
}
.hw-title { font-size: 18px; font-weight: 700; color: var(--text); line-height: 1.2; }
.hw-sub   { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.hw-form  { display: flex; flex-direction: column; gap: 14px; }
.hw-field { position: relative; display: flex; flex-direction: column; gap: 5px; }
.hw-field label { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.hw-field input {
  padding: 11px 13px; font-size: 14.5px;
  border: 1px solid var(--border-strong); border-radius: 10px;
  background: #fff; color: var(--text);
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.hw-field input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(249,115,22,.12);
}
.hw-quick { display: flex; gap: 6px; flex-wrap: wrap; margin-top: -6px; }
.hw-chip {
  padding: 6px 12px; border-radius: 100px;
  background: var(--bg-soft); border: 1px solid var(--border);
  font-size: 12.5px; font-weight: 600; color: var(--text);
  cursor: pointer; font-family: inherit;
  transition: all .15s;
}
.hw-chip:hover { background: var(--orange-light); border-color: var(--orange); color: var(--orange-dark); }
.hw-summary {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px; background: var(--green-50);
  border-radius: 10px;
  font-size: 13.5px; color: var(--text-muted);
  margin-top: 4px;
}
.hw-summary strong { font-size: 20px; color: var(--green-600); font-weight: 800; }
.hw-foot {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11.5px; color: var(--text-muted);
  margin-top: 6px;
}
.hw-full-form { color: var(--orange); font-weight: 600; }

/* Terms checkbox in hero widget */
.hw-terms {
  display: flex; align-items: flex-start; gap: 8px;
  margin: 12px 0 14px;
  font-size: 12.5px; line-height: 1.4;
  color: var(--text-muted);
  cursor: pointer;
}
.hw-terms input[type="checkbox"] {
  width: 16px; height: 16px; margin-top: 2px; flex-shrink: 0;
  accent-color: var(--orange);
  cursor: pointer;
}
.hw-terms a {
  color: var(--orange);
  text-decoration: underline;
  font-weight: 600;
}
.hw-terms a:hover { color: var(--orange-dark); }
#hw-submit:disabled {
  opacity: .5; cursor: not-allowed; pointer-events: none;
}

/* Hero widget: meter lookup card */
.hw-input-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.hw-input-row input {
  flex: 1 1 auto;
  min-width: 0;  /* crucial: allow input to shrink below its content width */
}
.hw-input-row .btn {
  flex: 0 0 auto;
  padding: 10px 14px;
  white-space: nowrap;
}
.hw-field { position: relative; }
.hw-hint {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-dim);
  position: static;  /* stop absolute-positioning over the input */
}

.hw-customer {
  background: linear-gradient(135deg, #E8EFF9 0%, #D0E4F7 100%);
  border: 1.5px solid var(--green-500);
  border-radius: 12px;
  padding: 14px 16px;
  margin-top: -4px;
  animation: fadeIn 0.3s ease-out;
}
.hw-customer-row {
  display: flex; align-items: center; gap: 12px;
}
.hw-customer-icon {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--green-500); color: #fff;
  display: grid; place-items: center; font-size: 18px;
  flex-shrink: 0;
}
.hw-customer-text { flex: 1; min-width: 0; }
.hw-customer-name {
  font-size: 14px; font-weight: 700; color: var(--text); line-height: 1.2;
}
.hw-customer-addr {
  font-size: 12px; color: var(--text-muted); margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hw-customer-extra {
  font-size: 11px; margin-top: 2px;
}
.hw-check {
  color: var(--green-500); font-size: 22px; font-weight: 800;
  flex-shrink: 0;
}

.hw-platform {
  font-size: 11px; color: var(--text-dim); margin-top: 4px;
  text-align: center;
}

.hw-error {
  background: var(--danger-bg); color: var(--danger);
  padding: 10px 12px; border-radius: 8px;
  font-size: 12.5px; font-weight: 500;
  border: 1px solid rgba(220,38,38,0.2);
  margin-top: -4px;
}

.hw-chip-active {
  background: var(--orange-light) !important;
  border-color: var(--orange) !important;
  color: var(--orange-dark) !important;
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }

/* Buy form: matching customer-card styling */
.input-group {
  display: flex; gap: 10px;
}
.input-group input { flex: 1; }
.input-group .btn { flex-shrink: 0; }

.customer-card {
  background: linear-gradient(135deg, #E8EFF9 0%, #D0E4F7 100%);
  border: 1.5px solid var(--green-500);
  border-radius: 12px;
  padding: 16px 18px;
  margin-top: 12px;
  animation: fadeIn 0.3s ease-out;
}
.customer-card-head {
  display: flex; align-items: flex-start; gap: 14px;
}
.customer-card-icon {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--green-500); color: #fff;
  display: grid; place-items: center; font-size: 22px;
  flex-shrink: 0;
}
.customer-card-body { flex: 1; min-width: 0; }
.customer-card-label { text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; }
.customer-card-name {
  font-size: 17px; font-weight: 700; color: var(--text); line-height: 1.2; margin-top: 2px;
}
.customer-card-addr {
  font-size: 14px; color: var(--text-muted); margin-top: 4px;
}
.customer-card-extra {
  font-size: 12px; margin-top: 4px;
}
.customer-card-check {
  color: var(--green-500); font-size: 26px; font-weight: 800;
  flex-shrink: 0;
}

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-widget { margin: 0 auto; max-width: 480px; width: 100%; }
}
@media (max-width: 640px) {
  .hero-full { padding: 50px 0 60px; }
  .hero-title { font-size: 38px; }
  .hero-ctas .btn { width: 100%; }
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  padding-top: 20px;
  font-size: 13px;
  color: var(--text-muted);
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--green-500); }
.breadcrumb .bc-sep { margin: 0 8px; color: var(--border-strong); }

/* ---------- Outline white button (used in dark sections) ---------- */
.btn-outline-white {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.35);
}
.btn-outline-white:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px;
  border-radius: 10px; border: 1px solid transparent;
  background: var(--green-500); color: #fff;
  font-size: 14px; font-weight: 600; font-family: inherit;
  cursor: pointer; text-decoration: none;
  transition: transform 0.12s, background 0.15s, box-shadow 0.15s;
}
.btn:hover { background: var(--green-600); text-decoration: none; color: #fff; transform: translateY(-1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--bg-soft); color: var(--text); }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #B91C1C; }
.btn-accent { background: var(--orange); color: #fff; box-shadow: 0 4px 12px rgba(249,115,22,.35); }
.btn-accent:hover { background: var(--orange-dark); color: #fff; }
.btn-ghost {
  background: rgba(255,255,255,0.08);
  color: #fff;
  border-color: rgba(255,255,255,0.25);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover { background: rgba(255,255,255,0.14); color: #fff; }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-lg { padding: 16px 28px; font-size: 15.5px; border-radius: 12px; }

/* ---------- Sections ---------- */
.section { padding: 80px 0; }
.section-light { background: var(--bg); }
.section-dark {
  background:
    radial-gradient(ellipse 140% 90% at 0% 50%, rgba(13,31,84,.7) 0%, transparent 50%),
    radial-gradient(ellipse 140% 90% at 100% 50%, rgba(249,115,22,.4) 0%, transparent 50%),
    linear-gradient(180deg, #0D1F54 0%, #1B3A8C 30%, #3A2A22 55%, #8B4A1A 75%, #F97316 100%);
  color: var(--text-invert);
}
.section-dark h1, .section-dark h2, .section-dark h3 { color: var(--text-invert); }
.section-dark .muted, .section-dark .muted-light { color: rgba(255,255,255,0.7); }
.section-dark p { color: rgba(255,255,255,0.85); }

.section-head { margin-bottom: 40px; }
.section-head h2 { margin-bottom: 8px; }
.section-head-center { text-align: center; max-width: 700px; margin: 0 auto 48px; }
.section-head-center h2 { margin-bottom: 10px; }

/* ---------- Services grid ---------- */
.services-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.service-tile {
  position: relative;
  display: block; background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px 22px;
  transition: all 0.2s;
  text-decoration: none; color: var(--text);
  overflow: hidden;
}
.service-tile::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(249,115,22,0) 60%, rgba(249,115,22,.06) 100%);
  opacity: 0; transition: opacity 0.2s; pointer-events: none;
}
.service-tile:hover {
  border-color: var(--orange);
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
  text-decoration: none;
}
.service-tile:hover::after { opacity: 1; }
.service-icon {
  font-size: 38px; margin-bottom: 12px;
  width: 64px; height: 64px;
  background: var(--green-50);
  border-radius: 14px;
  display: grid; place-items: center;
  transition: background 0.2s;
  overflow: hidden;
}
.service-icon img {
  /* Small centered icon — NOT filling the box (like the emojis were) */
  max-width: 40px;
  max-height: 40px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
.service-icon .icon-glyph { font-size: 34px; }
.service-tile:hover .service-icon { background: var(--orange-light); }
.service-name { font-weight: 700; font-size: 17px; margin-bottom: 6px; }
.service-desc { font-size: 13.5px; color: var(--text-muted); line-height: 1.5; min-height: 42px; }
.service-cta {
  margin-top: 16px; font-size: 13px; font-weight: 600;
  color: var(--green-500);
}
.service-tile:hover .service-cta { color: var(--orange); }

/* Buy page service heading with logo */
.service-heading {
  display: flex; align-items: center; gap: 14px;
  font-size: 26px;
}
.service-heading-icon {
  width: 56px; height: 56px;
  background: var(--green-50);
  border-radius: 12px;
  display: grid; place-items: center;
  overflow: hidden;
  flex-shrink: 0;
}
.service-heading-icon img {
  max-width: 36px;
  max-height: 36px;
  object-fit: contain;
}

/* ---------- Badges ---------- */
.badge {
  display: inline-block; padding: 3px 9px; border-radius: 100px;
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em;
}
.badge-test    { background: var(--warning-bg); color: var(--warning); }
.badge-live    { background: var(--success-bg); color: var(--success); }
.badge-pending { background: var(--warning-bg); color: var(--warning); }
.badge-completed, .badge-authorized, .badge-success { background: var(--success-bg); color: var(--success); }
.badge-failed, .badge-declined { background: var(--danger-bg); color: var(--danger); }
.badge-refunded{ background: var(--info-bg);    color: var(--info); }
.badge-processing{ background: var(--info-bg);  color: var(--info); }
.service-tile .badge {
  position: absolute; top: 12px; right: 12px;
}

/* ---------- Features grid (section-dark) ---------- */
.features-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.feature {
  padding: 28px 24px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-xl);
  transition: transform 0.2s;
}
.feature:hover { transform: translateY(-3px); }
.feature-icon {
  width: 54px; height: 54px; border-radius: 12px;
  background: rgba(249,115,22,0.15);
  display: grid; place-items: center;
  font-size: 26px; margin-bottom: 16px;
}
.feature h3 { font-size: 17px; margin-bottom: 8px; }
.feature p { font-size: 14px; color: rgba(255,255,255,0.7); line-height: 1.6; }

/* ---------- Steps ---------- */
.steps-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.step {
  text-align: center;
  padding: 28px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
}
.step-num {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--orange); color: #fff;
  display: grid; place-items: center;
  font-size: 20px; font-weight: 800;
  margin: 0 auto 16px;
}
.step h3 { margin-bottom: 8px; }
.step p { color: var(--text-muted); font-size: 14px; line-height: 1.6; }

/* ---------- CTA stripe ---------- */
.cta-stripe {
  background:
    radial-gradient(ellipse 140% 90% at 0% 50%, rgba(13,31,84,.7) 0%, transparent 50%),
    radial-gradient(ellipse 140% 90% at 100% 50%, rgba(249,115,22,.45) 0%, transparent 50%),
    linear-gradient(135deg, #0D1F54 0%, #1B3A8C 35%, #3A2A22 55%, #8B4A1A 75%, #F97316 100%);
  color: var(--text-invert);
  padding: 60px 0;
}
.cta-stripe-inner {
  display: flex; justify-content: space-between; align-items: center;
  gap: 30px; flex-wrap: wrap;
}
.cta-stripe h2 { color: var(--text-invert); margin-bottom: 8px; font-size: 28px; }
.cta-stripe p { color: rgba(255,255,255,0.7); }

/* ---------- Cards & forms ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 26px;
  box-shadow: var(--shadow);
}
.card-title { font-size: 16px; font-weight: 700; margin-bottom: 16px; }

.form-group { margin-bottom: 18px; }
.form-label {
  display: block; margin-bottom: 6px;
  font-size: 12.5px; font-weight: 600;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em;
}
.form-control, input[type="text"], input[type="email"], input[type="password"],
input[type="tel"], input[type="number"], input[type="date"], input[type="search"],
input[type="url"], textarea, select {
  width: 100%; padding: 12px 14px; font-size: 14.5px; font-family: inherit;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: 10px;
  outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
.form-control:focus, input:focus, textarea:focus, select:focus {
  border-color: var(--green-500);
  box-shadow: 0 0 0 3px rgba(46,139,87,0.12);
}
.form-hint { font-size: 12.5px; color: var(--text-muted); margin-top: 5px; }
.form-error { color: var(--danger); font-size: 12.5px; margin-top: 5px; }

/* Password show/hide toggle inside input */
.password-wrapper { position: relative; }
.password-wrapper input[type="password"],
.password-wrapper input[type="text"] { padding-right: 52px; }
.password-toggle {
  position: absolute; right: 1px; top: 1px; bottom: 1px;
  width: 40px;
  background: transparent; border: none; cursor: pointer;
  padding: 0; line-height: 1; border-radius: 0 9px 9px 0;
  color: #aaa; display: flex; align-items: center; justify-content: center;
  transition: color 0.15s, background 0.15s;
  z-index: 1;
}
.password-toggle::before {
  content: '';
  position: absolute; left: 0; top: 10px; bottom: 10px;
  width: 1px; background: var(--border, #ddd);
}
.password-toggle:hover { color: #333; background: rgba(0,0,0,0.03); }
.password-toggle:active { background: rgba(0,0,0,0.06); }
.password-toggle.visible { color: var(--green-500, #2e8b57); }
.password-toggle.visible::before { background: var(--green-300, #86d99b); }
.password-toggle svg { width: 20px; height: 20px; display: block; pointer-events: none; }

/* ---------- Purchase flow ---------- */
.purchase-layout {
  display: grid; grid-template-columns: 1fr 360px; gap: 28px;
  max-width: 1000px; margin: 30px auto 60px;
  padding: 0 24px;
}
.form-steps {
  min-width: 0;
}
@media (max-width: 880px) {
  .purchase-layout { grid-template-columns: 1fr; padding: 0 16px; }
  .purchase-summary { order: -1; position: static !important; margin-bottom: 8px; }
  .purchase-summary h3 { margin-bottom: 10px; padding-bottom: 10px; }
  .purchase-summary .summary-row { padding: 5px 0; font-size: 13px; }
  .purchase-summary .btn-lg { padding: 14px 20px; font-size: 14px; }
}
.purchase-summary {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
  position: sticky; top: 104px;
  align-self: start;
  box-shadow: var(--shadow-lg);
}
.purchase-summary h3 {
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 2px solid var(--cbz-red);
  padding-bottom: 12px;
  margin-bottom: 14px;
}
.summary-table {
  display: flex; flex-direction: column;
}
.summary-divider {
  height: 1px;
  background: var(--border);
  margin: 12px 0;
}
.summary-row {
  display: flex; justify-content: space-between;
  padding: 7px 0;
  font-size: 13.5px; gap: 8px;
  align-items: center;
}
.summary-row > span:first-child {
  color: var(--text-muted);
  font-size: 12.5px;
}
.summary-row > strong,
.summary-row > span:last-child {
  color: var(--text);
  font-weight: 600;
  text-align: right;
}
.summary-row.total {
  padding-top: 6px;
  font-size: 16px;
}
.summary-row.total > span:last-child {
  font-weight: 800;
  font-size: 18px;
  color: var(--green-700);
}

.card-inputs { display: grid; grid-template-columns: 1fr 110px 100px; gap: 10px; }
@media (max-width: 520px) { .card-inputs { grid-template-columns: 1fr; } }

/* ---------- Receipt ---------- */
.receipt-wrap { max-width: 440px; margin: 30px auto; padding: 0 20px; }
.receipt {
  background: #fff; padding: 26px; border: 1px solid var(--border);
  border-radius: 12px; font-family: var(--font-mono); font-size: 12.5px;
  line-height: 1.6; color: var(--text);
}
.receipt .r-title { text-align: center; font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.receipt .r-sub { text-align: center; color: var(--text-muted); margin-bottom: 14px; }
.receipt .r-divider { border-top: 1.5px dashed var(--border-strong); margin: 10px 0; }
.receipt .r-row { display: flex; justify-content: space-between; padding: 2px 0; gap: 12px; }
.receipt .r-token {
  background: var(--green-50); border: 1.5px dashed var(--green-500);
  padding: 12px; border-radius: 8px; text-align: center;
  font-size: 15px; font-weight: 700; letter-spacing: 1px;
  margin: 10px 0; color: var(--text);
}

@media print {
  .site-header, .site-footer, .flash, .no-print { display: none !important; }
  body { background: #fff; }
  .receipt { border: none; }
}

/* ---------- Token slip (thermal-printer-friendly) ---------- */
.token-slip {
  font-family: 'Courier New', ui-monospace, monospace;
  font-size: 12px;
  line-height: 1.5;
  width: 72mm;         /* standard 80mm thermal paper minus margins */
  margin: 0 auto;
  padding: 4mm;
  background: #fff;
  color: #000;
}
.token-slip .ts-header { text-align: center; margin-bottom: 6px; }
.token-slip .ts-header strong { font-size: 14px; }
.token-slip .ts-sub { font-size: 10px; color: #444; }
.token-slip .ts-divider { text-align: center; margin: 4px 0; color: #666; font-size: 10px; }
.token-slip .ts-row { display: flex; justify-content: space-between; padding: 1px 0; gap: 6px; font-size: 11px; }
.token-slip .ts-token-label { text-align: center; font-weight: 700; font-size: 11px; margin-top: 4px; }
.token-slip .ts-token {
  text-align: center;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 2px;
  padding: 8px 4px;
  border: 2px dashed #000;
  margin: 4px 0;
}
.token-slip .ts-footer { text-align: center; font-size: 10px; color: #444; margin-top: 6px; }

/* When "printing-token" mode is on, hide EVERYTHING except the token slip */
body.printing-token > *:not(#token-print-slip) { display: none !important; }
body.printing-token #token-print-slip { display: block !important; }

@media print {
  body.printing-token {
    margin: 0 !important; padding: 0 !important;
  }
  body.printing-token #token-print-slip {
    display: block !important;
    width: auto;
    max-width: 80mm;
  }
  /* Don't repeat header/footer in token print */
  body.printing-token .site-header,
  body.printing-token .site-footer,
  body.printing-token .site-main,
  body.printing-token .container { display: none !important; }
  @page { margin: 4mm; size: auto; }
}

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th { text-align: left; padding: 12px 16px; background: var(--bg-soft); color: var(--text-muted); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.04em; border-bottom: 1px solid var(--border); }
table.data td { padding: 12px 16px; border-bottom: 1px solid var(--border); }
table.data tr:last-child td { border-bottom: none; }
table.data tbody tr:hover { background: var(--bg-soft); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--surface); border-top: 1px solid var(--border);
  padding: 50px 0 24px; margin-top: 0;
  font-size: 13.5px; color: var(--text-muted);
}
.footer-inner {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px;
  padding-bottom: 30px;
}
.footer-col strong { display: block; color: var(--text); margin-bottom: 10px; font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; }
.footer-col a { display: block; color: var(--text-muted); padding: 4px 0; font-size: 13px; }
.footer-col a:hover { color: var(--green-500); text-decoration: none; }
.footer-col .muted { padding: 3px 0; font-size: 13px; }
.footer-bottom {
  padding-top: 22px; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12.5px; gap: 10px; flex-wrap: wrap;
}
@media (max-width: 640px) { .footer-inner { grid-template-columns: 1fr 1fr; } }

/* ---------- Auth pages ---------- */
.auth-card {
  max-width: 440px; margin: 60px auto; padding: 36px 32px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-xl); box-shadow: var(--shadow-xl);
}
.auth-card h1 { text-align: center; margin-bottom: 6px; font-size: 24px; }
.auth-card .sub { text-align: center; color: var(--text-muted); margin-bottom: 24px; font-size: 14.5px; }

/* ---------- Utility ---------- */
.mt-1{margin-top:6px}.mt-2{margin-top:12px}.mt-3{margin-top:18px}.mt-4{margin-top:24px}.mt-5{margin-top:36px}
.mb-1{margin-bottom:6px}.mb-2{margin-bottom:12px}.mb-3{margin-bottom:18px}.mb-4{margin-bottom:24px}.mb-5{margin-bottom:36px}
.flex{display:flex;gap:10px;align-items:center}
.flex-between{display:flex;justify-content:space-between;align-items:center;gap:10px}
.center{text-align:center}
.right{text-align:right}
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
.grid-4{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}
@media (max-width:640px){ .grid-2,.grid-3,.grid-4 { grid-template-columns: 1fr; } }

/* ---------- Portal shared styles (used on corporate.php, reseller.php) ---------- */
.page-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 20px; margin: 20px 0 24px; flex-wrap: wrap;
}
.page-header h1 { margin: 0 0 4px; font-size: 26px; }

.stat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px; margin-bottom: 28px;
}
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 18px 20px;
}
.stat-label { font-size: 12.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; margin-bottom: 6px; }
.stat-value { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; color: var(--text); }
.stat-delta { font-size: 12.5px; margin-top: 4px; }

.bullet-list { padding-left: 20px; margin: 0; }
.bullet-list li { padding: 4px 0; color: var(--text-muted); font-size: 14px; line-height: 1.6; }

/* Inline brand logos (CBZ badge + iVeri) — bigger and more visible */
.inline-logo {
  display: inline-block;
  vertical-align: middle;
  line-height: 1;
}
.cbz-logo  {
  height: 28px;   /* was 18px — now 56% larger */
  width: auto;
  margin: 0 4px;
  vertical-align: middle;
  position: relative;
  top: -1px;
}
.iveri-logo {
  height: 28px;   /* was 18px */
  width: auto;
  margin: 0 4px;
  vertical-align: middle;
  position: relative;
  top: -1px;
}

/* Secured-by strip — stand-alone security bar */
.security-strip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #EEF3FA;
  border: 1px solid #C5D6EE;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12.5px;
  color: var(--green-700);
  font-weight: 500;
}
.security-strip .cbz-logo  { height: 22px; }
.security-strip .iveri-logo { height: 22px; }

/* ================================================ */
/* Reseller portal                                  */
/* ================================================ */
.reseller-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin: 16px 0 24px;
  padding: 6px;
  background: var(--bg-soft);
  border-radius: 12px;
  overflow-x: auto;
}
.reseller-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 8px;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 13.5px;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.reseller-tab:hover { background: rgba(255,255,255,0.6); color: var(--text); text-decoration: none; }
.reseller-tab.active {
  background: #fff;
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
  font-weight: 600;
}
.reseller-tab .rt-icon { font-size: 15px; }

/* Wallet hero card */
.wallet-hero {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 24px;
  padding: 24px 28px;
  background: linear-gradient(135deg, #0D1F54 0%, #1B3A8C 100%);
  border-radius: 16px;
  color: #fff;
  margin-bottom: 8px;
}
.wh-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255,255,255,0.6); margin-bottom: 4px; }
.wh-balance { font-size: 42px; font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
.wh-alert { font-size: 12.5px; margin-top: 10px; color: #FDBA74; }
.wh-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding-left: 24px;
  border-left: 1px solid rgba(255,255,255,0.15);
}
.wh-stat-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: rgba(255,255,255,0.6); margin-bottom: 4px; }
.wh-stat-value { font-size: 20px; font-weight: 700; color: #fff; }

@media (max-width: 720px) {
  .wallet-hero { grid-template-columns: 1fr; }
  .wh-stats { padding-left: 0; border-left: 0; border-top: 1px solid rgba(255,255,255,0.15); padding-top: 18px; grid-template-columns: repeat(2, 1fr); }
}

/* Key-value list (used across reseller pages) */
.kv-list { display: flex; flex-direction: column; gap: 0; }
.kv-list > div {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.kv-list > div:last-child { border-bottom: 0; }
.kv-list > div > span:first-child { color: var(--text-muted); }
.kv-list > div > strong, .kv-list > div > span:last-child { color: var(--text); }

/* 14-day bar chart */
.bar-chart {
  display: flex;
  gap: 3px;
  align-items: flex-end;
  height: 140px;
  padding: 8px 0 0;
}
.bc-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  height: 100%;
  cursor: default;
}
.bc-bar {
  width: 100%;
  background: linear-gradient(180deg, var(--orange) 0%, var(--orange-dark, #C85A14) 100%);
  border-radius: 3px 3px 0 0;
  min-height: 2px;
  transition: transform 0.15s;
}
.bc-col:hover .bc-bar { transform: scaleY(1.05); transform-origin: bottom; }
.bc-label { font-size: 9.5px; color: var(--text-dim); font-weight: 500; }

/* Service picker (on vend.php) */
.service-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
}
.service-pick { position: relative; cursor: pointer; }
.service-pick input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.service-pick-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  border: 2px solid var(--border);
  border-radius: 10px;
  text-align: center;
  transition: all 0.15s;
  background: var(--surface);
}
.service-pick input:checked + .service-pick-inner {
  border-color: var(--orange);
  background: var(--orange-light);
  box-shadow: 0 0 0 3px rgba(249,115,22,0.12);
}
.service-pick-icon { font-size: 22px; }
.service-pick-name { font-size: 11.5px; font-weight: 600; color: var(--text); }

/* Wallet ledger type badges */
.badge-topup           { background: #dcfce7; color: #15803d; border-color: #bbf7d0; }
.badge-debit           { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }
.badge-commission      { background: #fef3c7; color: #a16207; border-color: #fde68a; }
.badge-settlement      { background: #dbeafe; color: #1e40af; border-color: #bfdbfe; }
.badge-adjustment      { background: #e5e7eb; color: #374151; border-color: #d1d5db; }
.badge-debt_collection { background: #ede9fe; color: #6d28d9; border-color: #ddd6fe; }

/* Support ticket priority/status badges */
.badge-priority-low     { background: #e5e7eb; color: #374151; }
.badge-priority-normal  { background: #dbeafe; color: #1e40af; }
.badge-priority-high    { background: #fed7aa; color: #9a3412; }
.badge-priority-urgent  { background: #fee2e2; color: #991b1b; font-weight: 700; }

.badge-status-open        { background: #fed7aa; color: #9a3412; }
.badge-status-in_progress { background: #dbeafe; color: #1e40af; }
.badge-status-resolved    { background: #dcfce7; color: #15803d; }
.badge-status-closed      { background: #e5e7eb; color: #374151; }

/* Page header (used in reseller + admin pages) */
.page-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px; margin: 8px 0 20px; flex-wrap: wrap;
}
.page-header h1 { margin-bottom: 4px; }
.page-header p { margin: 0; }

/* ================================================ */
/* AI Live Chat widget                              */
/* ================================================ */
.ai-chat-root {
  position: fixed; bottom: 20px; right: 20px;
  z-index: 999;
  font-family: inherit;
}
.ai-chat-fab {
  width: 60px; height: 60px; border-radius: 50%;
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark, #C85A14) 100%);
  color: #fff;
  border: none; cursor: pointer;
  box-shadow: 0 8px 24px rgba(249,115,22,0.4);
  display: grid; place-items: center;
  font-size: 28px;
  transition: transform 0.15s;
  position: relative;
}
.ai-chat-fab:hover { transform: scale(1.08); }
.ai-chat-fab-dot {
  position: absolute; top: 8px; right: 8px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--green-500);
  border: 2px solid #fff;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.2); opacity: 0.85; }
}

.ai-chat-panel {
  position: absolute; bottom: 80px; right: 0;
  width: 360px; max-width: calc(100vw - 40px);
  height: 480px; max-height: calc(100vh - 120px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.2);
  display: none; /* HIDDEN BY DEFAULT — JS adds .open class to show */
  flex-direction: column;
  overflow: hidden;
  will-change: opacity, transform;
}
/* Only show when JS adds .open */
.ai-chat-panel.open {
  display: flex;
}

.ai-chat-head {
  background: linear-gradient(135deg, #0D1F54 0%, #1B3A8C 100%);
  color: #fff; padding: 14px 16px;
  display: flex; justify-content: space-between; align-items: center;
}
.ai-chat-head-title { display: flex; align-items: center; gap: 10px; }
.ai-chat-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, #F97316 0%, #F59E0B 100%);
  color: #fff; font-weight: 800; font-size: 13px;
  display: grid; place-items: center;
}
.ai-chat-head strong { display: block; font-size: 14px; }
.ai-chat-status { font-size: 11px; opacity: 0.85; }
.ai-chat-dot-online {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: #4ade80; margin-right: 4px;
}
.ai-chat-close {
  background: none; border: none; color: #fff;
  font-size: 28px; cursor: pointer; opacity: 0.8;
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  line-height: 1;
  padding-bottom: 4px; /* optical centering of chevron */
}
.ai-chat-close:hover { opacity: 1; background: rgba(255,255,255,0.1); }

.ai-chat-messages {
  flex: 1; overflow-y: auto;
  padding: 14px 14px 6px;
  background: #F7F8F9;
  display: flex; flex-direction: column; gap: 10px;
}
.ai-chat-msg { display: flex; }
.ai-chat-msg-user { justify-content: flex-end; }
.ai-chat-msg-bot  { justify-content: flex-start; }
.ai-chat-bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 13.5px; line-height: 1.45;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.ai-chat-msg-user .ai-chat-bubble {
  background: var(--orange); color: #fff;
  border-bottom-right-radius: 4px;
}
.ai-chat-msg-bot .ai-chat-bubble {
  background: #fff; color: var(--text);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}
.ai-chat-typing {
  color: transparent !important;
  position: relative;
  min-width: 48px; min-height: 20px;
}
.ai-chat-typing::after {
  content: '';
  position: absolute; top: 50%; left: 14px;
  width: 24px; height: 4px;
  background-image: radial-gradient(circle, #999 1.5px, transparent 1.5px);
  background-size: 8px 4px; background-repeat: repeat-x;
  animation: typingDots 1.2s infinite;
}
@keyframes typingDots { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }

.ai-chat-input {
  display: flex; gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  background: #fff;
}
.ai-chat-input input {
  flex: 1; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 100px;
  font-size: 13.5px; outline: none;
  font-family: inherit;
}
.ai-chat-input input:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(249,115,22,0.12); }
.ai-chat-input button {
  background: var(--orange); color: #fff;
  border: none; border-radius: 50%;
  width: 40px; height: 40px;
  font-size: 18px; cursor: pointer;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.ai-chat-input button:hover { background: var(--orange-dark, #C85A14); }

.ai-chat-foot {
  padding: 6px 14px 10px;
  font-size: 10.5px; color: var(--text-muted);
  text-align: center;
  background: #fff;
  border-top: 1px solid var(--border-subtle, #F0F0F0);
}
.ai-chat-foot a { color: var(--orange); }

@media (max-width: 480px) {
  .ai-chat-root { bottom: 12px; right: 12px; }
  .ai-chat-panel {
    width: calc(100vw - 24px);
    height: calc(100vh - 100px);
    bottom: 74px;
    right: 0;
  }
  .ai-chat-fab { width: 52px; height: 52px; font-size: 24px; }
}

/* Hide the chat on auth pages to avoid covering forms */
body.admin-body .ai-chat-root,
.auth-card ~ .ai-chat-root { display: none; }

/* ================================================ */
/* CBZ branded logo components                      */
/* ================================================ */

/* Hero "CBZ Agency Banking Platform" pill */
.cbz-powered-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.12);
  border: 1.5px solid rgba(255,255,255,0.25);
  border-radius: 100px;
  padding: 8px 18px 8px 10px;
  margin-bottom: 22px;
  backdrop-filter: blur(4px);
}
.cbz-powered-logo {
  height: 32px;
  width: auto;
  /* CBZ logo on dark bg — add a white bg pill so it reads clearly */
  background: white;
  border-radius: 6px;
  padding: 2px 6px;
}
.cbz-powered-text {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  letter-spacing: 0.02em;
}

/* Hero widget security footer */
.hw-security {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0 0;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}
.hw-security-logos {
  display: flex;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
  gap: 2px;
}
.hw-security-img {
  height: 24px;
  width: auto;
  vertical-align: middle;
  background: #fff;
  border-radius: 4px;
  padding: 2px 4px;
  border: 1px solid #E5E7EB;
}
.hw-security-img.iveri-logo { background: #1B3A8C; border-color: #1B3A8C; }

/* Buy page security bar */
.buy-security-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 14px;
  background: #F0F5FF;
  border: 1px solid #C5D6EE;
  border-radius: 10px;
  font-size: 12.5px;
  color: var(--green-700);
  font-weight: 500;
}
.buy-sec-logo {
  height: 26px;
  width: auto;
  vertical-align: middle;
  background: #fff;
  border-radius: 5px;
  padding: 2px 5px;
  border: 1px solid #D1D5DB;
}
.buy-sec-logo.iveri-logo {
  background: #1B3A8C;
  border-color: #1B3A8C;
}
.buy-security-text {
  font-size: 11.5px;
  color: #4B6A8F;
  font-weight: 400;
}

/* Footer CBZ logo */
.footer-cbz-logo {
  height: 24px;
  width: auto;
  vertical-align: middle;
  position: relative;
  top: -1px;
}

/* ================================================ */
/* CBZ Red + Blue applied to all portals            */
/* (reseller, corporate, customer dashboards)       */
/* ================================================ */

/* ── Reseller tabs ─────────────────────────── */
.reseller-tabs {
  background: #EEF3FA;
  border: 1px solid #C5D6EE;
}
.reseller-tab.active {
  background: var(--green-700);   /* CBZ blue */
  color: #fff;
  box-shadow: 0 2px 8px rgba(27,58,140,0.25);
}
.reseller-tab.active .rt-icon { color: #fff; }
.reseller-tab:hover { background: rgba(27,58,140,0.08); color: var(--green-700); }

/* ── Reseller wallet hero ──────────────────── */
.wallet-hero {
  background: linear-gradient(135deg, #0D1F54 0%, #1B3A8C 60%, #1E5CB3 100%);
}
.wallet-hero::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 160px; height: 100%;
  background: linear-gradient(135deg, transparent, rgba(229,0,27,0.15));
  pointer-events: none;
}
.wallet-hero { position: relative; overflow: hidden; }

/* ── Stat cards – CBZ blue accent on value ─── */
.stat-card { border-top: 3px solid transparent; transition: border-color 0.2s; }
.stat-card:hover { border-top-color: var(--cbz-red); }

/* ── Quick vend service picker ─────────────── */
.service-pick input:checked + .service-pick-inner {
  border-color: var(--cbz-red);
  background: #FFF0F2;
  box-shadow: 0 0 0 3px rgba(229,0,27,0.12);
}
.service-pick-inner:hover { border-color: var(--green-600); }

/* ── CBZ wallet top-up quick buttons ────────── */
.btn-block.btn-accent,
.btn-accent {
  background: linear-gradient(135deg, var(--cbz-red) 0%, var(--cbz-red-dark) 100%);
  box-shadow: 0 4px 12px rgba(229,0,27,0.3);
}
.btn-accent:hover {
  background: linear-gradient(135deg, var(--cbz-red-dark) 0%, #8A0010 100%);
  box-shadow: 0 6px 18px rgba(229,0,27,0.4);
  transform: translateY(-1px);
}

/* ── Wallet ledger badges ─────────────────── */
.badge-topup       { background: #E8EFF9; color: #1B3A8C; border-color: #C5D6EE; }
.badge-commission  { background: #FFF0F2; color: #B0001A; border-color: #F9C6CC; }
.badge-debit       { background: #FEF2F2; color: #991B1B; border-color: #FECACA; }
.badge-completed   { background: #E8EFF9; color: #1B3A8C; border-color: #C5D6EE; }

/* ── Progress bars (reports/analytics) ──────── */
.progress-bar { background: #E8EFF9; }
.progress-fill { background: var(--green-700); }

/* ── Bar chart ──────────────────────────────── */
.bc-bar {
  background: linear-gradient(180deg, var(--cbz-red) 0%, #8A001A 100%);
}
.bc-col:hover .bc-bar { opacity: 0.85; }

/* ── Page header h1 accent ──────────────────── */
.page-header h1 { color: var(--green-700); }

/* ── Card title strip ──────────────────────── */
.card-title {
  color: var(--green-700);
  font-weight: 700;
  border-bottom: 2px solid var(--cbz-red);
  padding-bottom: 8px;
  margin-bottom: 16px;
}

/* ── Table data header ───────────────────────── */
.data thead tr {
  background: var(--green-700);
  color: white;
}
.data thead th { color: #fff; }
.data tbody tr:hover { background: #F0F5FF; }

/* ── Breadcrumbs ────────────────────────────── */
.breadcrumb a { color: var(--green-700); }
.breadcrumb a:hover { color: var(--cbz-red); }

/* ── Site nav links hover ─────────────────── */
.site-nav a:hover { color: var(--cbz-red); }
.site-nav a.nav-outline {
  background: var(--cbz-red);
  color: #fff;
  border-color: var(--cbz-red);
}
.site-nav a.nav-outline:hover { background: var(--cbz-red-dark); }

/* ── Flash messages ─────────────────────────── */
.flash-info { background: #E8EFF9; border-color: #C5D6EE; color: #1B3A8C; }
.flash-warning { background: #FFF9C4; border-color: #F5E642; color: #7A6800; }

/* ── KV List key colour ─────────────────────── */
.kv-list > div > span:first-child { color: var(--green-700); opacity: 0.75; }

/* ── Forms – focus rings ─────────────────────── */
input:focus, select:focus, textarea:focus {
  border-color: var(--green-700);
  box-shadow: 0 0 0 3px rgba(27,58,140,0.15);
}

/* ── ZiG currency badge ─────────────────────── */
.zig-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #C8902A 0%, #E5B842 100%);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 100px;
  letter-spacing: 0.05em;
}

/* ── Support ticket status badges ─────────────── */
.badge-status-open        { background: #FFF0F2; color: var(--cbz-red); border: 1px solid #F9C6CC; }
.badge-status-in_progress { background: #E8EFF9; color: #1B3A8C; border: 1px solid #C5D6EE; }
.badge-status-resolved    { background: #E8F4EA; color: #166534; border: 1px solid #BBF7D0; }

/* ── Corporate site tabs ─────────────────────── */
/* (uses same .reseller-tabs class) */

/* ── Corporate wallet hero ───────────────────── */
/* (shares .wallet-hero — already CBZ blue) */

/* ── Dashboard "needs attention" card ────────── */
.attention-card {
  border-left: 4px solid var(--cbz-red);
  background: linear-gradient(135deg, #FFF0F2 0%, #fff 60%);
}

/* ── Admin sidebar active – CBZ blue ───────────── */
/* (already set in admin.css) */

/* ── Nav user pill ───────────────────────────── */
.nav-user-pill { background: #EEF3FA; }
.nav-user-pill:hover { background: #D7E4F5; }
.nav-user-avatar { background: var(--green-700); }

/* ── Mobile menu ────────────────────────────── */
.site-nav.open {
  border-color: #C5D6EE;
  box-shadow: 0 8px 32px rgba(27,58,140,0.15);
}

/* ── AI chat panel ─────────────────────────── */
.ai-chat-head {
  background: linear-gradient(135deg, #0D1F54 0%, #1B3A8C 100%);
}
.ai-chat-fab {
  background: linear-gradient(135deg, var(--cbz-red) 0%, var(--cbz-red-dark) 100%);
  box-shadow: 0 8px 24px rgba(229,0,27,0.35);
}
.ai-chat-msg-user .ai-chat-bubble {
  background: var(--green-700);
}
.ai-chat-input button {
  background: var(--cbz-red);
}
.ai-chat-input button:hover { background: var(--cbz-red-dark); }

/* ── ZiG payment option highlight ───────────── */
select option[value="zig"] { font-weight: 600; }

/* ── Service tiles – CBZ hover ─────────────── */
.service-tile:hover { border-color: var(--cbz-red); }
.service-tile:hover .service-cta { color: var(--cbz-red); }
.service-tile:hover .service-icon { background: #FFF0F2; }

/* ── Receipt page ─────────────────────────── */
.r-token {
  border-color: var(--green-700);
  color: var(--green-700);
}

/* ── Footer links ─────────────────────────── */
.site-footer a:hover { color: var(--cbz-red); }

/* Footer security logos */
.footer-cbz-logo {
  height: 26px;
  width: auto;
  vertical-align: middle;
  position: relative;
  top: -1px;
  margin: 0 4px;
}
.footer-iveri-logo {
  height: 26px;
  width: auto;
  vertical-align: middle;
  position: relative;
  top: -1px;
  margin: 0 4px;
}
.footer-security {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--text-muted);
}

/* ================================================ */
/* Currency selector tabs (buy page)                */
/* ================================================ */
.currency-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.currency-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: #fff;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  flex: 0 1 auto;
}
.currency-tab:hover {
  border-color: var(--green-600);
  color: var(--green-700);
  background: #EEF3FA;
}
.currency-tab.active {
  border-color: var(--green-700);
  background: var(--green-700);
  color: #fff;
  box-shadow: 0 4px 12px rgba(27,58,140,0.25);
}

/* ================================================ */
/* Payment method tabs (buy page)                   */
/* ================================================ */
.pay-method-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.pay-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: #fff;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.pay-tab:hover {
  border-color: var(--green-700);
  color: var(--green-700);
  background: #EEF3FA;
}
.pay-tab.active {
  border-color: var(--green-700);
  background: var(--green-700);
  color: #fff;
  box-shadow: 0 4px 12px rgba(27,58,140,0.25);
}

/* Payment info box (EcoCash) */
.ecocash-payment-info {
  background: linear-gradient(135deg, #F0FFF4 0%, #DCFCE7 100%);
  border: 1.5px solid #4ADE80;
  border-radius: 12px;
  padding: 16px 18px;
}
.pay-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.pay-icon { font-size: 22px; }
.pay-header strong { font-size: 15px; color: var(--text); }

