/* ============================================
   DataHub Ghana - Main Stylesheet
   Font: Syne (display) + DM Sans (body)
   Theme: Bold dark with electric amber accent
   ============================================ */

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

:root {
  --bg: #0a0a0f;
  --bg2: #111118;
  --bg3: #1a1a24;
  --border: rgba(255,255,255,0.08);
  --text: #f0f0f5;
  --muted: rgba(240,240,245,0.55);
  --accent: #f5a623;
  --accent2: #ff6b35;
  --success: #2ecc71;
  --danger: #e74c3c;
  --warning: #f39c12;
  --radius: 16px;
  --radius-sm: 8px;
  --shadow: 0 20px 60px rgba(0,0,0,0.4);
  --font-head: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
}

html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--font-body); line-height: 1.6; overflow-x: hidden; }

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

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ---- NAVBAR ---- */
.navbar { position: sticky; top: 0; z-index: 100; background: rgba(10,10,15,0.85); backdrop-filter: blur(20px); border-bottom: 1px solid var(--border); }
.nav-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 700; font-size: 1.3rem; color: var(--text); }
.logo-icon { color: var(--accent); font-size: 1.5rem; }
.logo em { color: var(--accent); font-style: normal; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--muted); font-size: 0.9rem; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); opacity: 1; }
.btn-agent { background: var(--accent); color: #000 !important; padding: 8px 18px; border-radius: 100px; font-weight: 600; font-size: 0.85rem !important; transition: transform 0.2s, box-shadow 0.2s !important; }
.btn-agent:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(245,166,35,0.3); opacity: 1 !important; }

/* ---- AGENT BANNER ---- */
.agent-banner { background: linear-gradient(90deg, #1a1a00, #2a2000); border-bottom: 1px solid rgba(245,166,35,0.3); text-align: center; padding: 10px; font-size: 0.85rem; color: var(--accent); }

/* ---- HERO ---- */
.hero { position: relative; min-height: 85vh; display: flex; align-items: center; overflow: hidden; padding: 80px 24px; }
.hero-bg { position: absolute; inset: 0; background: radial-gradient(ellipse at 20% 50%, rgba(245,166,35,0.12) 0%, transparent 60%), radial-gradient(ellipse at 80% 20%, rgba(255,107,53,0.08) 0%, transparent 50%); }
.hero-bg::after { content: ''; position: absolute; inset: 0; background-image: radial-gradient(circle, rgba(255,255,255,0.04) 1px, transparent 1px); background-size: 40px 40px; }
.hero-content { position: relative; max-width: 600px; margin-left: max(24px, calc(50vw - 550px)); }
.hero-badge { display: inline-block; background: rgba(245,166,35,0.12); border: 1px solid rgba(245,166,35,0.3); color: var(--accent); padding: 6px 16px; border-radius: 100px; font-size: 0.8rem; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 24px; }
.hero-content h1 { font-family: var(--font-head); font-size: clamp(2.8rem, 6vw, 5rem); font-weight: 800; line-height: 1.05; margin-bottom: 20px; }
.hero-content h1 em { color: var(--accent); font-style: normal; }
.hero-content p { color: var(--muted); font-size: 1.1rem; max-width: 420px; margin-bottom: 36px; }
.hero-cta { display: inline-flex; align-items: center; gap: 10px; background: var(--accent); color: #000; font-family: var(--font-head); font-weight: 700; font-size: 1rem; padding: 16px 32px; border-radius: 100px; transition: all 0.3s; }
.hero-cta:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(245,166,35,0.35); opacity: 1; color: #000; }
.hero-cards { position: absolute; right: max(24px, calc(50vw - 550px)); top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 16px; }
.float-card { background: var(--bg3); border: 1px solid var(--border); padding: 18px 24px; border-radius: var(--radius); font-family: var(--font-head); font-weight: 600; font-size: 0.9rem; color: var(--muted); box-shadow: var(--shadow); animation: floatCard 3s ease-in-out infinite; }
.float-card span { display: block; font-size: 1.4rem; color: var(--accent); margin-top: 4px; }
.fc1 { animation-delay: 0s; }
.fc2 { animation-delay: 0.6s; }
.fc3 { animation-delay: 1.2s; }
@keyframes floatCard { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }

/* ---- SECTION TITLE ---- */
.section-title { font-family: var(--font-head); font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 800; margin-bottom: 40px; text-align: center; }

/* ---- NETWORK TABS ---- */
.network-tabs { padding: 80px 0; }
.tabs { display: flex; gap: 12px; justify-content: center; margin-bottom: 40px; flex-wrap: wrap; }
.tab { background: var(--bg2); border: 1px solid var(--border); color: var(--muted); padding: 12px 28px; border-radius: 100px; font-family: var(--font-head); font-weight: 600; font-size: 0.95rem; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; gap: 8px; }
.tab-dot { width: 8px; height: 8px; border-radius: 50%; }
.tab:hover, .tab.active { background: rgba(255,255,255,0.07); border-color: var(--net-color, var(--accent)); color: var(--text); }
.tab.active { box-shadow: 0 0 0 1px var(--net-color, var(--accent)); }

.net-panel { display: none; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
.net-panel.active { display: grid; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from{opacity:0;transform:translateY(10px)} to{opacity:1;transform:none} }

.bundle-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: all 0.25s; position: relative; }
.bundle-card:hover { transform: translateY(-4px); border-color: rgba(245,166,35,0.4); box-shadow: 0 12px 40px rgba(0,0,0,0.3); }
.bundle-net-bar { height: 4px; }
.bundle-card > *:not(.bundle-net-bar) { padding: 4px 18px; }
.bundle-size { font-family: var(--font-head); font-size: 1.8rem; font-weight: 800; padding-top: 16px; }
.bundle-validity { color: var(--muted); font-size: 0.8rem; }
.bundle-price { font-size: 1.2rem; font-weight: 700; color: var(--accent); padding-bottom: 4px; }
.bundle-select-btn { background: rgba(245,166,35,0.1); color: var(--accent); text-align: center; padding: 10px !important; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; border-top: 1px solid var(--border); transition: background 0.2s; }
.bundle-card:hover .bundle-select-btn { background: var(--accent); color: #000; }

/* ---- MODAL ---- */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.75); backdrop-filter: blur(8px); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-box { background: var(--bg2); border: 1px solid var(--border); border-radius: 24px; width: 100%; max-width: 480px; padding: 36px; position: relative; max-height: 90vh; overflow-y: auto; transform: scale(0.95); transition: transform 0.3s; }
.modal-overlay.open .modal-box { transform: scale(1); }
.modal-close { position: absolute; top: 16px; right: 16px; background: var(--bg3); border: 1px solid var(--border); color: var(--muted); width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: 0.8rem; display: flex; align-items: center; justify-content: center; }
.modal-close:hover { color: var(--text); }
.modal-step-indicator { display: flex; align-items: center; justify-content: center; gap: 0; margin-bottom: 28px; }
.modal-step-indicator .step { width: 28px; height: 28px; border-radius: 50%; background: var(--bg3); border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 700; color: var(--muted); transition: all 0.3s; }
.modal-step-indicator .step.active { background: var(--accent); border-color: var(--accent); color: #000; }
.modal-step-indicator .step-line { flex: 1; height: 2px; background: var(--border); max-width: 60px; }
.modal-step { display: none; }
.modal-step.active { display: block; animation: fadeIn 0.3s ease; }
.modal-step h3 { font-family: var(--font-head); font-size: 1.3rem; font-weight: 700; margin-bottom: 20px; }

.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 500; color: var(--muted); margin-bottom: 8px; }
.form-group label .hint { font-weight: 400; opacity: 0.7; }
.form-group input, .form-group select { width: 100%; background: var(--bg3); border: 1px solid var(--border); color: var(--text); padding: 12px 16px; border-radius: var(--radius-sm); font-size: 0.95rem; font-family: var(--font-body); outline: none; transition: border-color 0.2s; }
.form-group input:focus, .form-group select:focus { border-color: var(--accent); }
.input-error { color: var(--danger); font-size: 0.8rem; margin-top: 5px; min-height: 16px; }

.network-radio-group { display: flex; gap: 10px; flex-wrap: wrap; }
.radio-chip { display: flex; align-items: center; gap: 6px; background: var(--bg3); border: 1px solid var(--border); padding: 8px 14px; border-radius: 100px; cursor: pointer; font-size: 0.85rem; transition: all 0.2s; }
.radio-chip:has(input:checked) { border-color: var(--accent); background: rgba(245,166,35,0.1); color: var(--accent); }
.radio-chip input { display: none; }

.bundle-pill { background: var(--bg3); border: 1px solid rgba(245,166,35,0.3); padding: 14px 18px; border-radius: var(--radius-sm); color: var(--text); margin-bottom: 20px; font-size: 0.95rem; }

.order-summary-box { background: var(--bg3); border-radius: var(--radius-sm); padding: 16px; margin-bottom: 20px; }
.summary-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 0.9rem; border-bottom: 1px solid var(--border); }
.summary-row:last-child { border: none; }
.summary-row.total { font-weight: 700; font-size: 1rem; color: var(--accent); }

.confirm-details { background: var(--bg3); border-radius: var(--radius-sm); padding: 16px; margin-bottom: 20px; }
.confirm-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 0.9rem; border-bottom: 1px solid var(--border); }
.confirm-row:last-child { border: none; }
.confirm-row.highlight { color: var(--accent); font-size: 1.1rem; }
.confirm-notice { background: rgba(245,166,35,0.08); border: 1px solid rgba(245,166,35,0.2); border-radius: var(--radius-sm); padding: 14px; font-size: 0.85rem; color: var(--muted); margin-bottom: 20px; display: flex; gap: 10px; }

.processing-anim { position: relative; width: 80px; height: 80px; margin: 0 auto 24px; display: flex; align-items: center; justify-content: center; }
.pulse-ring { position: absolute; width: 80px; height: 80px; border-radius: 50%; border: 2px solid var(--accent); animation: pulse 1.5s infinite; }
.pulse-core { font-size: 2rem; color: var(--accent); animation: spin 3s linear infinite; }
@keyframes pulse { 0%{transform:scale(1);opacity:1} 100%{transform:scale(1.8);opacity:0} }
@keyframes spin { from{transform:rotate(0deg)} to{transform:rotate(360deg)} }
.order-ref-display { background: var(--bg3); border-radius: var(--radius-sm); padding: 12px; text-align: center; font-family: monospace; font-size: 0.9rem; color: var(--accent); margin-top: 16px; }

.success-icon { width: 72px; height: 72px; background: var(--success); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 2rem; color: #fff; margin: 0 auto 20px; }
.success-ref { background: var(--bg3); border-radius: var(--radius-sm); padding: 10px; text-align: center; font-family: monospace; font-size: 0.85rem; color: var(--accent); margin: 12px 0; }
.track-hint { color: var(--muted); font-size: 0.85rem; margin-bottom: 20px; }

/* ---- BUTTONS ---- */
.btn-primary { width: 100%; background: var(--accent); color: #000; font-family: var(--font-head); font-weight: 700; font-size: 1rem; padding: 14px; border: none; border-radius: var(--radius-sm); cursor: pointer; transition: all 0.2s; margin-top: 8px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(245,166,35,0.3); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn-secondary { width: 100%; background: transparent; color: var(--muted); font-family: var(--font-body); font-size: 0.9rem; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; transition: all 0.2s; margin-top: 8px; }
.btn-secondary:hover { border-color: var(--accent); color: var(--text); }
.btn-ghost { width: 100%; background: transparent; color: var(--muted); font-size: 0.85rem; padding: 10px; border: none; cursor: pointer; margin-top: 8px; }
.btn-ghost:hover { color: var(--text); }

.spinner { width: 18px; height: 18px; border: 2px solid rgba(0,0,0,0.3); border-top-color: #000; border-radius: 50%; animation: spin 0.8s linear infinite; }
.hidden { display: none !important; }

/* ---- HOW IT WORKS ---- */
.how-it-works { padding: 80px 0; background: var(--bg2); }
.steps-row { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; justify-content: center; }
.step-card { background: var(--bg3); border: 1px solid var(--border); padding: 30px; border-radius: var(--radius); text-align: center; flex: 1; min-width: 200px; max-width: 280px; }
.step-num { font-family: var(--font-head); font-size: 2.5rem; font-weight: 800; color: var(--accent); opacity: 0.5; display: block; margin-bottom: 12px; }
.step-card h4 { font-family: var(--font-head); font-size: 1.1rem; margin-bottom: 8px; }
.step-card p { color: var(--muted); font-size: 0.875rem; }
.step-arrow { color: var(--muted); font-size: 1.5rem; }

/* ---- FOOTER ---- */
.footer { padding: 60px 0 30px; border-top: 1px solid var(--border); }
.footer-inner { display: flex; gap: 60px; flex-wrap: wrap; margin-bottom: 40px; }
.footer-inner > div { display: flex; flex-direction: column; gap: 10px; }
.footer-inner > div:first-child { flex: 2; min-width: 200px; }
.footer-inner p { color: var(--muted); font-size: 0.875rem; max-width: 280px; }
.footer-inner strong { font-family: var(--font-head); font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.footer-inner a { color: var(--muted); font-size: 0.875rem; transition: color 0.2s; }
.footer-inner a:hover { color: var(--accent); opacity: 1; }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 20px; color: var(--muted); font-size: 0.8rem; text-align: center; }

/* ---- UTILITY ---- */
.status-badge { display: inline-block; padding: 4px 12px; border-radius: 100px; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.badge-success { background: rgba(46,204,113,0.15); color: var(--success); }
.badge-pending { background: rgba(243,156,18,0.15); color: var(--warning); }
.badge-failed { background: rgba(231,76,60,0.15); color: var(--danger); }
.badge-processing { background: rgba(52,152,219,0.15); color: #3498db; }

/* ---- FORMS (standalone pages) ---- */
.page-wrapper { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.card { background: var(--bg2); border: 1px solid var(--border); border-radius: 24px; padding: 40px; width: 100%; max-width: 440px; }
.card h2 { font-family: var(--font-head); font-size: 1.6rem; font-weight: 800; margin-bottom: 8px; }
.card .subtitle { color: var(--muted); font-size: 0.9rem; margin-bottom: 28px; }
.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 0.875rem; margin-bottom: 16px; }
.alert-success { background: rgba(46,204,113,0.1); border: 1px solid rgba(46,204,113,0.3); color: var(--success); }
.alert-error { background: rgba(231,76,60,0.1); border: 1px solid rgba(231,76,60,0.3); color: var(--danger); }
.alert-info { background: rgba(245,166,35,0.1); border: 1px solid rgba(245,166,35,0.3); color: var(--accent); }

/* ---- ADMIN ---- */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar { width: 260px; background: var(--bg2); border-right: 1px solid var(--border); padding: 24px 0; position: sticky; top: 0; height: 100vh; overflow-y: auto; flex-shrink: 0; }
.admin-main { flex: 1; padding: 40px; overflow-x: auto; }
.admin-sidebar .logo { padding: 0 20px 24px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.admin-nav a { display: flex; align-items: center; gap: 10px; padding: 12px 20px; color: var(--muted); font-size: 0.9rem; transition: all 0.2s; border-left: 3px solid transparent; }
.admin-nav a:hover, .admin-nav a.active { background: rgba(245,166,35,0.06); color: var(--text); border-left-color: var(--accent); opacity: 1; }
.admin-nav .nav-section { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(240,240,245,0.3); padding: 16px 20px 6px; }
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 32px; flex-wrap: wrap; gap: 16px; }
.admin-title { font-family: var(--font-head); font-size: 1.8rem; font-weight: 800; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; margin-bottom: 32px; }
.stat-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.stat-label { color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 8px; }
.stat-value { font-family: var(--font-head); font-size: 2rem; font-weight: 800; color: var(--accent); }
.stat-sub { color: var(--muted); font-size: 0.8rem; margin-top: 4px; }

.data-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.data-table th { background: var(--bg3); color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; font-size: 0.75rem; padding: 12px 16px; text-align: left; white-space: nowrap; }
.data-table td { padding: 14px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.data-table tr:hover td { background: rgba(255,255,255,0.02); }
.table-wrap { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); overflow-x: auto; }
.table-top { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); flex-wrap: wrap; gap: 10px; }
.table-top h3 { font-family: var(--font-head); font-weight: 700; font-size: 1rem; }

.btn-sm { padding: 6px 14px; border-radius: 100px; font-size: 0.8rem; font-weight: 600; border: none; cursor: pointer; transition: all 0.2s; }
.btn-accent { background: var(--accent); color: #000; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--accent); }
.btn-danger { background: rgba(231,76,60,0.15); color: var(--danger); }

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
    .hero { flex-direction: column; padding: 60px 24px; min-height: auto; }
    .hero-content { margin-left: 0; }
    .hero-cards { position: relative; right: auto; top: auto; transform: none; flex-direction: row; flex-wrap: wrap; margin-top: 40px; gap: 12px; }
    .float-card { flex: 1; min-width: 120px; }
    .nav-links a:not(.btn-agent) { display: none; }
    .admin-layout { flex-direction: column; }
    .admin-sidebar { width: 100%; height: auto; position: relative; }
    .admin-main { padding: 20px; }
    .steps-row { flex-direction: column; }
    .step-arrow { transform: rotate(90deg); }
    .footer-inner { flex-direction: column; gap: 30px; }
}
