/* =====================================================================
   LEGACY ENTERPRISES — DESIGN SYSTEM
   Navy + gold brand, built for a Ghanaian digital-services storefront.
   ===================================================================== */

:root {
  /* Color */
  --navy-950: #071530;
  --navy-900: #0b1f44;
  --navy-800: #12295a;
  --navy-700: #1c3a75;
  --gold-500: #f6c331;
  --gold-600: #e0ac16;
  --red-600:  #e1332f;
  --blue-600: #1657d0;
  --paper:    #f7f8fb;
  --paper-dim:#eef1f7;
  --ink-900:  #10192b;
  --ink-600:  #4a5468;
  --ink-400:  #8791a3;
  --line:     #e3e7ef;
  --white:    #ffffff;
  --green-600:#1f9d55;

  /* Type */
  --font-head: "Sora", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, sans-serif;

  /* Shape */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-card: 0 1px 2px rgba(16,25,43,0.04), 0 8px 24px rgba(16,25,43,0.06);
  --shadow-pop:  0 12px 32px rgba(16,25,43,0.16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink-900);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
h1, h2, h3, h4 { font-family: var(--font-head); margin: 0; line-height: 1.15; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--blue-600); outline-offset: 2px; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: 999px; border: none;
  font-weight: 600; font-size: 15px; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:active { transform: scale(0.97); }
.btn-gold { background: var(--gold-500); color: var(--navy-950); }
.btn-gold:hover { background: var(--gold-600); }
.btn-navy { background: var(--navy-900); color: var(--white); }
.btn-navy:hover { background: var(--navy-800); }
.btn-outline { background: transparent; color: var(--navy-900); border: 1.5px solid var(--navy-900); }
.btn-outline:hover { background: var(--navy-900); color: var(--white); }
.btn-outline-light { background: transparent; color: var(--white); border: 1.5px solid rgba(255,255,255,0.5); }
.btn-outline-light:hover { border-color: var(--white); background: rgba(255,255,255,0.08); }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 16px; font-size: 13.5px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- Header ---------- */
.site-header {
  background: var(--navy-950); position: sticky; top: 0; z-index: 40;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--white); }
.brand-mark {
  width: 40px; height: 40px; border-radius: 10px; background: var(--gold-500);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 800; color: var(--navy-950); font-size: 17px;
}
.brand-text { font-family: var(--font-head); font-weight: 700; font-size: 17px; line-height: 1.1; }
.brand-tag { font-size: 10.5px; color: var(--gold-500); letter-spacing: 0.02em; font-weight: 500; }
.nav-links { display: flex; align-items: center; gap: 30px; color: rgba(255,255,255,0.82); font-size: 14.5px; font-weight: 500; }
.nav-links a:hover { color: var(--white); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-toggle { display: none; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; background: transparent; border: none; color: var(--white); font-size: 24px; }
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(180deg, var(--navy-950) 0%, var(--navy-900) 60%, var(--navy-800) 100%);
  color: var(--white); padding: 64px 0 88px; position: relative; overflow: hidden;
}
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.eyebrow-pill {
  display: inline-block; background: rgba(246,195,49,0.14); color: var(--gold-500);
  padding: 7px 16px; border-radius: 999px; font-size: 13px; font-weight: 600; margin-bottom: 20px;
}
.hero h1 { font-size: 44px; font-weight: 700; margin-bottom: 18px; }
.hero h1 em { font-style: normal; color: var(--gold-500); }
.hero p.lede { font-size: 16.5px; color: rgba(255,255,255,0.72); max-width: 480px; margin-bottom: 28px; }
.hero-actions { display: flex; gap: 14px; margin-bottom: 34px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 28px; flex-wrap: wrap; }
.hero-stat { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: rgba(255,255,255,0.68); }
.hero-stat-icon { width: 34px; height: 34px; border-radius: 9px; background: rgba(255,255,255,0.08); display: flex; align-items: center; justify-content: center; }

.hero-art { position: relative; }
.hero-art-card {
  background: var(--white); border-radius: var(--radius-lg); padding: 26px;
  box-shadow: var(--shadow-pop); color: var(--ink-900);
}
.network-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px;
  font-weight: 700; font-size: 13.5px; margin: 4px; color: var(--white);
}
.chip-mtn { background: #ffcb05; color: #1a1a1a; }
.chip-airteltigo { background: var(--blue-600); }
.chip-telecel { background: var(--red-600); }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section-tight { padding: 40px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 28px; gap: 20px; flex-wrap: wrap; }
.section-head h2 { font-size: 27px; font-weight: 700; }
.section-head p { color: var(--ink-600); margin-top: 6px; font-size: 14.5px; }
.section-link { font-size: 14px; font-weight: 600; color: var(--blue-600); white-space: nowrap; }
.section-alt { background: var(--white); }

/* ---------- Service tabs ---------- */
.service-tabs { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 30px; }
.service-tab {
  display: flex; align-items: center; gap: 9px; padding: 13px 20px; border-radius: var(--radius-md);
  border: 1.5px solid var(--line); background: var(--white); font-weight: 600; font-size: 14px;
  color: var(--ink-600); white-space: nowrap; flex-shrink: 0; transition: all .15s ease;
}
.service-tab.active { background: var(--navy-900); border-color: var(--navy-900); color: var(--white); }
.service-tab:not(.active):hover { border-color: var(--navy-700); color: var(--navy-900); }

/* ---------- Network / bundle cards ---------- */
.network-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .network-grid { grid-template-columns: 1fr; } }

.network-card {
  background: var(--white); border: 1.5px solid var(--line); border-radius: var(--radius-lg);
  padding: 22px; box-shadow: var(--shadow-card);
}
.network-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.network-logo {
  width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 800; font-size: 13px; color: var(--white);
}
.logo-mtn { background: #ffcb05; color: #1a1a1a; }
.logo-airteltigo { background: var(--blue-600); }
.logo-telecel { background: var(--red-600); }
.network-card-head h3 { font-size: 16px; font-weight: 700; }
.network-card-head span { font-size: 12.5px; color: var(--ink-400); }

.bundle-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-bottom: 18px; }
.bundle-pill {
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 10px 6px; text-align: center;
  background: var(--paper); transition: all .12s ease;
}
.bundle-pill:hover { border-color: var(--navy-700); }
.bundle-pill.selected { border-color: var(--navy-900); background: var(--navy-900); color: var(--white); }
.bundle-pill .amt { display: block; font-weight: 700; font-size: 13.5px; }
.bundle-pill .price { display: block; font-size: 11.5px; color: var(--ink-400); margin-top: 2px; }
.bundle-pill.selected .price { color: rgba(255,255,255,0.7); }

/* ---------- How it works ---------- */
.steps-strip { background: var(--paper-dim); padding: 54px 0; }
.steps-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
@media (max-width: 900px) { .steps-row { grid-template-columns: repeat(2, 1fr); } }
.step-item { text-align: center; }
.step-num {
  width: 44px; height: 44px; border-radius: 12px; background: var(--navy-900); color: var(--gold-500);
  display: flex; align-items: center; justify-content: center; font-weight: 700; margin: 0 auto 12px;
  font-family: var(--font-head);
}
.step-item h4 { font-size: 14px; margin-bottom: 4px; }
.step-item p { font-size: 12.5px; color: var(--ink-600); }

/* ---------- Agent banner ---------- */
.agent-banner {
  background: linear-gradient(120deg, var(--navy-950), var(--navy-800));
  border-radius: var(--radius-lg); color: var(--white); padding: 44px;
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 30px; align-items: center;
}
@media (max-width: 860px) { .agent-banner { grid-template-columns: 1fr; } }
.agent-banner h2 { font-size: 25px; margin-bottom: 12px; }
.agent-banner ul { list-style: none; padding: 0; margin: 18px 0 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.agent-banner li { font-size: 13.5px; color: rgba(255,255,255,0.85); display: flex; align-items: center; gap: 8px; }
.agent-banner li::before { content: "✓"; color: var(--gold-500); font-weight: 700; }

/* ---------- Feature grid ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 900px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
.feature-card { padding: 4px; }
.feature-icon {
  width: 42px; height: 42px; border-radius: 11px; background: var(--paper-dim);
  display: flex; align-items: center; justify-content: center; margin-bottom: 14px; color: var(--navy-900);
}
.feature-card h4 { font-size: 14.5px; margin-bottom: 5px; }
.feature-card p { font-size: 13px; color: var(--ink-600); }

/* ---------- Cards / forms (shared: agent, admin, portal) ---------- */
.panel {
  background: var(--white); border: 1.5px solid var(--line); border-radius: var(--radius-lg);
  padding: 30px; box-shadow: var(--shadow-card);
}
.panel-tight { padding: 22px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-900); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--line);
  font-size: 14.5px; font-family: inherit; background: var(--white); color: var(--ink-900);
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--navy-700); outline: none; }
.field-hint { font-size: 12px; color: var(--ink-400); margin-top: 5px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .field-row { grid-template-columns: 1fr; } }

.alert { padding: 13px 16px; border-radius: var(--radius-sm); font-size: 13.5px; margin-bottom: 16px; display: none; }
.alert.show { display: block; }
.alert-error { background: #fdecec; color: #a4201d; border: 1px solid #f6c9c7; }
.alert-success { background: #e9f8ee; color: #146c33; border: 1px solid #bde8c8; }
.alert-info { background: #eaf1fd; color: #1c4bad; border: 1px solid #c7dafc; }

.status-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge-paid, .badge-approved, .badge-delivered { background: #e9f8ee; color: #146c33; }
.badge-pending, .badge-not_started, .badge-processing { background: #fff5e0; color: #97640a; }
.badge-failed, .badge-rejected { background: #fdecec; color: #a4201d; }
.badge-customer { background: var(--paper-dim); color: var(--ink-600); }
.badge-agent { background: #eaf1fd; color: #1c4bad; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data-table th {
  text-align: left; padding: 12px 14px; color: var(--ink-400); font-weight: 600; font-size: 12px;
  text-transform: none; border-bottom: 1.5px solid var(--line); white-space: nowrap;
}
table.data-table td { padding: 14px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
table.data-table tr:last-child td { border-bottom: none; }
.empty-row td { text-align: center; color: var(--ink-400); padding: 34px 14px; white-space: normal; }

/* ---------- Tabs (admin/portal) ---------- */
.tab-strip { display: flex; gap: 6px; border-bottom: 1.5px solid var(--line); margin-bottom: 26px; overflow-x: auto; }
.tab-btn {
  background: transparent; border: none; padding: 13px 18px; font-weight: 600; font-size: 14px;
  color: var(--ink-400); border-bottom: 2px solid transparent; white-space: nowrap;
}
.tab-btn.active { color: var(--navy-900); border-bottom-color: var(--gold-500); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ---------- Stat cards ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 30px; }
@media (max-width: 900px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
.stat-card { background: var(--white); border: 1.5px solid var(--line); border-radius: var(--radius-md); padding: 20px; }
.stat-card .label { font-size: 12.5px; color: var(--ink-400); font-weight: 600; margin-bottom: 8px; }
.stat-card .value { font-family: var(--font-head); font-size: 26px; font-weight: 700; color: var(--navy-900); }
.stat-card .sub { font-size: 12px; color: var(--ink-400); margin-top: 4px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-950); color: rgba(255,255,255,0.6); padding: 48px 0 24px; margin-top: 40px; }
.footer-top { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 24px; padding-bottom: 28px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.footer-links { display: flex; gap: 26px; font-size: 13.5px; flex-wrap: wrap; }
.footer-links a:hover { color: var(--white); }
.footer-bottom { padding-top: 20px; font-size: 12.5px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ---------- Misc ---------- */
.center { text-align: center; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.mb-16 { margin-bottom: 16px; }
.small-muted { font-size: 12.5px; color: var(--ink-400); }
.link-btn { background: none; border: none; color: var(--blue-600); font-weight: 600; font-size: 13.5px; padding: 0; }
.spinner {
  width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.4); border-top-color: var(--white);
  border-radius: 50%; animation: spin 0.7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }
.hide { display: none !important; }

.whatsapp-fab {
  position: fixed; bottom: 22px; right: 22px; width: 54px; height: 54px; border-radius: 50%;
  background: var(--green-600); display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-pop); z-index: 50;
}

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero h1 { font-size: 32px; }
  .network-grid { grid-template-columns: 1fr; }
  .bundle-grid { grid-template-columns: repeat(3, 1fr); }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
}
