/* =============================================================
   HolyLink Technology - Design System
   Self-contained, no external CDN dependency.
   ============================================================= */

:root {
  --blue: #0d6efd;
  --blue-dark: #0b5ed7;
  --pink: #e6007e;
  --pink-dark: #c40069;
  --dark: #0f172a;
  --ink: #1e293b;
  --muted: #64748b;
  --border: #e2e8f0;
  --bg: #f4f6fb;
  --card: #ffffff;
  --ok: #16a34a;
  --ok-bg: #f0fdf4;
  --warn: #d97706;
  --warn-bg: #fffbeb;
  --bad: #dc2626;
  --bad-bg: #fef2f2;
  --info: #0284c7;
  --info-bg: #f0f9ff;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(15, 23, 42, .08), 0 1px 2px rgba(15, 23, 42, .04);
  --shadow-lg: 0 10px 30px rgba(15, 23, 42, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
}
a { color: var(--blue); text-decoration: none; }
img { max-width: 100%; }
h1, h2, h3, h4 { margin: 0 0 .5em; color: var(--dark); line-height: 1.25; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.text-center { text-align: center; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 10px; border: none; font-weight: 600; font-size: 15px;
  cursor: pointer; text-decoration: none; transition: transform .05s ease, opacity .15s ease, box-shadow .15s ease;
  min-height: 44px;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--pink); color: #fff; }
.btn-primary:hover { background: var(--pink-dark); }
.btn-secondary { background: var(--blue); color: #fff; }
.btn-secondary:hover { background: var(--blue-dark); }
.btn-outline { background: transparent; color: var(--dark); border: 1.5px solid var(--border); }
.btn-outline:hover { border-color: var(--dark); }
.btn-ghost { background: transparent; color: var(--blue); padding: 8px 12px; }
.btn-danger { background: var(--bad); color: #fff; }
.btn-sm { padding: 8px 14px; font-size: 13px; min-height: 34px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ---------------- Cards / Layout ---------------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ---------------- Forms ---------------- */
label { display: block; font-size: 13px; font-weight: 600; margin: 14px 0 6px; color: #334155; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=date], select, textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 10px; font-size: 15px;
  font-family: inherit; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(13,110,253,.12); }
.field-error { color: var(--bad); font-size: 13px; margin-top: 4px; }
.form-hint { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

/* ---------------- Badges / Status ---------------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-bad { background: var(--bad-bg); color: var(--bad); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-muted { background: #f1f5f9; color: var(--muted); }

/* ---------------- Alerts ---------------- */
.alert { padding: 14px 16px; border-radius: 10px; font-size: 14px; margin-bottom: 16px; border: 1px solid transparent; }
.alert-success { background: var(--ok-bg); color: #166534; border-color: #bbf7d0; }
.alert-error { background: var(--bad-bg); color: #991b1b; border-color: #fecaca; }
.alert-info { background: var(--info-bg); color: #075985; border-color: #bae6fd; }
.alert-warn { background: var(--warn-bg); color: #92400e; border-color: #fde68a; }

/* ---------------- Navbar ---------------- */
.navbar { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 40; }
.navbar-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; max-width: 1180px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 20px; color: var(--dark); }
.brand .blue { color: var(--blue); } .brand .pink { color: var(--pink); }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { color: var(--ink); font-weight: 500; font-size: 14.5px; }
.nav-links a:hover { color: var(--pink); }
.nav-cta { display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; background: none; border: none; font-size: 26px; cursor: pointer; }
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav-cta .btn-outline { display: none; }
}

/* ---------------- Hero ---------------- */
.hero { background: linear-gradient(135deg, #0d6efd 0%, #0b3fa8 100%); color: #fff; padding: 70px 0 90px; position: relative; overflow: hidden; }
.hero h1 { color: #fff; font-size: 42px; max-width: 620px; }
.hero p { font-size: 18px; opacity: .92; max-width: 560px; margin-bottom: 26px; }
.hero .btn-primary { background: #fff; color: var(--pink); }
.hero .btn-outline { border-color: rgba(255,255,255,.6); color: #fff; }
@media (max-width: 640px) { .hero h1 { font-size: 30px; } .hero { padding: 46px 0 60px; } }

/* ---------------- Network cards ---------------- */
.network-card { text-align: center; padding: 28px 18px; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); cursor: pointer; border: 2px solid transparent; transition: border-color .15s, transform .1s; }
.network-card:hover { border-color: var(--pink); transform: translateY(-2px); }
.network-card.selected { border-color: var(--pink); background: #fff5fa; }
.network-logo { width: 64px; height: 64px; border-radius: 16px; margin: 0 auto 12px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 22px; color: #fff; }
.logo-mtn { background: #ffcc00; color: #002d5b; }
.logo-airteltigo { background: #e40613; }
.logo-telecel { background: #d90057; }

/* ---------------- Bundle cards ---------------- */
.bundle-card { border: 1.5px solid var(--border); border-radius: var(--radius); padding: 18px; text-align: center; cursor: pointer; background: #fff; transition: border-color .15s, box-shadow .15s; }
.bundle-card:hover { box-shadow: var(--shadow-lg); }
.bundle-card.selected { border-color: var(--pink); box-shadow: 0 0 0 3px rgba(230,0,126,.12); }
.bundle-size { font-size: 24px; font-weight: 800; color: var(--dark); }
.bundle-price { font-size: 18px; font-weight: 700; color: var(--pink); margin-top: 6px; }
.bundle-validity { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

/* ---------------- Steps ---------------- */
.steps { display: flex; justify-content: space-between; margin-bottom: 30px; gap: 8px; overflow-x: auto; }
.step { display: flex; align-items: center; gap: 8px; flex-shrink: 0; font-size: 13px; color: var(--muted); font-weight: 600; }
.step .dot { width: 26px; height: 26px; border-radius: 50%; background: #e2e8f0; color: var(--muted); display: flex; align-items: center; justify-content: center; font-size: 12px; }
.step.active .dot { background: var(--pink); color: #fff; }
.step.done .dot { background: var(--ok); color: #fff; }
.step.active, .step.done { color: var(--dark); }

/* ---------------- Tables ---------------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--shadow); background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 640px; }
thead th { text-align: left; padding: 12px 16px; background: #f8fafc; color: var(--muted); font-weight: 600; text-transform: uppercase; font-size: 11.5px; letter-spacing: .04em; border-bottom: 1px solid var(--border); }
tbody td { padding: 12px 16px; border-bottom: 1px solid #f1f5f9; }
tbody tr:hover { background: #fafbfe; }
tbody tr:last-child td { border-bottom: none; }

/* ---------------- Dashboard shell ---------------- */
.dash { display: flex; min-height: 100vh; }
.sidebar { width: 240px; background: var(--dark); color: #cbd5e1; flex-shrink: 0; padding: 20px 0; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar .brand { color: #fff; padding: 0 20px 20px; }
.sidebar a { display: flex; align-items: center; gap: 10px; padding: 12px 20px; color: #cbd5e1; font-size: 14px; font-weight: 500; }
.sidebar a:hover, .sidebar a.active { background: rgba(255,255,255,.08); color: #fff; }
.sidebar .section-label { padding: 16px 20px 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #64748b; }
.main { flex: 1; min-width: 0; }
.topbar { background: #fff; border-bottom: 1px solid var(--border); padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 30; }
.content { padding: 24px; }
@media (max-width: 900px) {
  .sidebar { position: fixed; left: -260px; z-index: 60; transition: left .2s; box-shadow: var(--shadow-lg); }
  .sidebar.open { left: 0; }
  .content { padding: 16px; }
}

/* ---------------- Stat tiles ---------------- */
.stat-tile { background: #fff; border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.stat-tile .label { font-size: 12.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.stat-tile .value { font-size: 26px; font-weight: 800; color: var(--dark); margin-top: 6px; }
.stat-tile .delta { font-size: 12.5px; margin-top: 6px; }

/* ---------------- Mobile bottom nav ---------------- */
.bottom-nav { display: none; }
@media (max-width: 720px) {
  .bottom-nav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid var(--border); z-index: 50; box-shadow: 0 -2px 10px rgba(0,0,0,.06); }
  .bottom-nav a { flex: 1; text-align: center; padding: 10px 4px 8px; font-size: 11px; color: var(--muted); font-weight: 600; }
  .bottom-nav a.active { color: var(--pink); }
  .bottom-nav .icon { font-size: 19px; display: block; margin-bottom: 2px; }
  body.has-bottom-nav { padding-bottom: 64px; }
}

/* ---------------- Toasts ---------------- */
#toast-stack { position: fixed; top: 16px; right: 16px; z-index: 100; display: flex; flex-direction: column; gap: 10px; max-width: 320px; }
.toast { background: var(--dark); color: #fff; padding: 12px 16px; border-radius: 10px; font-size: 13.5px; box-shadow: var(--shadow-lg); animation: toastIn .2s ease; }
.toast.ok { background: var(--ok); } .toast.error { background: var(--bad); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

/* ---------------- Modal ---------------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15,23,42,.5); display: none; align-items: center; justify-content: center; z-index: 90; padding: 16px; }
.modal-backdrop.open { display: flex; }
.modal { background: #fff; border-radius: var(--radius); padding: 24px; max-width: 440px; width: 100%; box-shadow: var(--shadow-lg); }

/* ---------------- Skeleton ---------------- */
.skeleton { background: linear-gradient(90deg, #eef2f7 25%, #e2e8f0 37%, #eef2f7 63%); background-size: 400% 100%; animation: skeleton 1.4s ease infinite; border-radius: 8px; }
@keyframes skeleton { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---------------- Spinner ---------------- */
.spinner { width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .6s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- Footer ---------------- */
footer { background: var(--dark); color: #94a3b8; padding: 50px 0 24px; margin-top: 60px; }
footer h4 { color: #fff; font-size: 14px; }
footer a { color: #94a3b8; }
footer a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); margin-top: 30px; padding-top: 18px; font-size: 12.5px; text-align: center; }

/* ---------------- Demo banner ---------------- */
.demo-banner { background: #fef3c7; color: #92400e; text-align: center; padding: 8px 14px; font-size: 13px; font-weight: 600; }
