/* =============================================
   Lapeng La Phofo — Global Stylesheet
   Matches original site aesthetic exactly
   ============================================= */

:root {
  --green-dark:   #1a5c2e;
  --green-mid:    #2d8a4e;
  --green-light:  #4caf50;
  --gold:         #f5a623;
  --gold-light:   #ffc107;
  --white:        #ffffff;
  --off-white:    #f8f9f4;
  --gray-100:     #f1f3f0;
  --gray-200:     #e0e4db;
  --gray-500:     #6b7a6e;
  --gray-700:     #3a4a3d;
  --text:         #1e2d1f;
  --shadow:       0 4px 24px rgba(0,0,0,0.10);
  --radius:       12px;
  --transition:   all 0.2s ease;
}

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

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--off-white);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

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

/* ── NAV ── */
nav {
  background: var(--green-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 64px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.18);
}
nav .logo { display: flex; align-items: center; gap: .75rem; }
nav .logo img { height: 44px; border-radius: 6px; }
nav .logo-text { color: var(--white); font-weight: 700; font-size: 1.1rem; line-height: 1.2; }
nav .logo-text span { display: block; font-size: .75rem; font-weight: 400; opacity: .8; }
nav .nav-links { display: flex; gap: 1.5rem; align-items: center; }
nav .nav-links a { color: var(--white); font-size: .95rem; opacity: .9; transition: var(--transition); }
nav .nav-links a:hover { opacity: 1; color: var(--gold-light); }

/* ── HERO ── */
.hero {
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-mid) 60%, #3a7d44 100%);
  color: var(--white);
  padding: 5rem 2rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: var(--white);
  padding: .35rem 1rem;
  border-radius: 20px;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .05em;
  margin-bottom: 1.5rem;
}
.hero h1 { font-size: clamp(2rem,5vw,3.2rem); font-weight: 800; line-height: 1.15; margin-bottom: 1rem; }
.hero h1 span { color: var(--gold-light); }
.hero p { font-size: 1.15rem; opacity: .9; max-width: 600px; margin: 0 auto 2rem; }
.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .75rem 1.75rem; border-radius: 8px; font-size: 1rem; font-weight: 600;
  cursor: pointer; border: none; transition: var(--transition); white-space: nowrap;
}
.btn-primary { background: var(--gold); color: #1a1a1a; }
.btn-primary:hover { background: #e8940f; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(245,166,35,.4); }
.btn-outline { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,.6); }
.btn-outline:hover { background: rgba(255,255,255,.1); }
.btn-green { background: var(--green-dark); color: var(--white); }
.btn-green:hover { background: #0f3d1c; }
.btn-full { width: 100%; }
.btn-sm { padding: .5rem 1.1rem; font-size: .9rem; }

/* ── SECTION ── */
section { padding: 4rem 2rem; }
.container { max-width: 1100px; margin: 0 auto; }
.section-label { text-align: center; font-size: .8rem; font-weight: 700; letter-spacing: .1em; color: var(--green-mid); text-transform: uppercase; margin-bottom: .5rem; }
.section-title { text-align: center; font-size: clamp(1.6rem,3vw,2.2rem); font-weight: 800; color: var(--green-dark); margin-bottom: .75rem; }
.section-sub { text-align: center; color: var(--gray-500); max-width: 560px; margin: 0 auto 2.5rem; }

/* ── CARDS ── */
.card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }

/* ── OPTION CARDS (landing) ── */
.option-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 2px solid transparent;
  transition: var(--transition);
  display: flex; flex-direction: column;
}
.option-card:hover { border-color: var(--green-light); transform: translateY(-3px); box-shadow: 0 8px 32px rgba(0,0,0,0.14); }
.option-card.featured { border-color: var(--gold); }
.option-header {
  background: var(--green-dark);
  color: var(--white);
  padding: 1.5rem;
  position: relative;
}
.option-header.gold { background: linear-gradient(135deg, #b8760a, #d4940c); }
.option-header h3 { font-size: 1.3rem; font-weight: 800; margin-bottom: .25rem; }
.option-header .price { font-size: 2rem; font-weight: 900; color: var(--gold-light); }
.option-header .price small { font-size: .9rem; font-weight: 400; opacity: .8; }
.option-badge {
  position: absolute; top: 1rem; right: 1rem;
  background: var(--gold); color: #1a1a1a;
  font-size: .7rem; font-weight: 700; padding: .25rem .6rem; border-radius: 12px;
  letter-spacing: .05em;
}
.option-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; gap: 1rem; }
.price-breakdown { background: var(--gray-100); border-radius: 8px; padding: 1rem; }
.price-breakdown h4 { font-size: .8rem; font-weight: 700; color: var(--gray-500); margin-bottom: .5rem; letter-spacing: .05em; }
.price-row { display: flex; justify-content: space-between; font-size: .95rem; padding: .2rem 0; }
.price-row.total { border-top: 1px solid var(--gray-200); margin-top: .5rem; padding-top: .5rem; font-weight: 700; color: var(--green-dark); }
.benefits-list { list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.benefits-list li { display: flex; align-items: flex-start; gap: .6rem; font-size: .95rem; }
.benefits-list li::before { content: '✓'; color: var(--green-light); font-weight: 700; flex-shrink: 0; margin-top: .1rem; }
.option-footer { padding: 0 1.5rem 1.5rem; }

/* ── FEATURES SECTION ── */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px,1fr)); gap: 1.5rem; }
.feature-card { background: var(--white); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.feature-icon { width: 48px; height: 48px; border-radius: 10px; background: var(--green-light); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; margin-bottom: 1rem; }
.feature-card h3 { font-size: 1.05rem; font-weight: 700; color: var(--green-dark); margin-bottom: .4rem; }
.feature-card p { font-size: .9rem; color: var(--gray-500); line-height: 1.5; }

/* ── CONTACT ── */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.contact-info h3 { font-size: 1.2rem; font-weight: 700; color: var(--green-dark); margin-bottom: 1rem; }
.contact-item { display: flex; align-items: flex-start; gap: .75rem; margin-bottom: 1rem; }
.contact-item .ci-icon { width: 38px; height: 38px; background: var(--green-dark); color: var(--white); border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.contact-item h4 { font-size: .8rem; font-weight: 700; color: var(--gray-500); }
.contact-item p { font-size: .95rem; color: var(--text); }
.contact-form { background: var(--white); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.contact-form h3 { font-size: 1.2rem; font-weight: 700; color: var(--green-dark); margin-bottom: 1rem; }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: .85rem; font-weight: 600; color: var(--gray-700); margin-bottom: .4rem; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: .7rem 1rem; border: 1.5px solid var(--gray-200);
  border-radius: 8px; font-size: .95rem; font-family: inherit;
  transition: var(--transition); background: var(--off-white);
}
.form-group input:focus, .form-group textarea:focus {
  outline: none; border-color: var(--green-mid); background: var(--white);
  box-shadow: 0 0 0 3px rgba(45,138,78,.1);
}
.form-group textarea { resize: vertical; min-height: 100px; }

/* ── FOOTER ── */
footer {
  background: var(--green-dark);
  color: rgba(255,255,255,.8);
  padding: 3rem 2rem 1.5rem;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
footer h4 { color: var(--white); font-size: 1rem; font-weight: 700; margin-bottom: .75rem; }
footer p, footer a { font-size: .9rem; color: rgba(255,255,255,.7); }
footer a:hover { color: var(--white); }
footer ul { list-style: none; display: flex; flex-direction: column; gap: .4rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); padding-top: 1.5rem; text-align: center; font-size: .85rem; color: rgba(255,255,255,.5); }

/* ── AUTH PAGES ── */
.auth-page { min-height: 100vh; display: flex; flex-direction: column; background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-mid) 100%); }
.auth-card { background: var(--white); border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0,0,0,.2); width: 100%; max-width: 440px; overflow: hidden; }
.auth-center { flex: 1; display: flex; align-items: center; justify-content: center; padding: 2rem; }
.auth-header { background: var(--green-dark); color: var(--white); padding: 2rem; text-align: center; }
.auth-header img { height: 56px; margin-bottom: .75rem; border-radius: 8px; }
.auth-header h2 { font-size: 1.4rem; font-weight: 800; }
.auth-header p { font-size: .9rem; opacity: .8; margin-top: .25rem; }
.auth-body { padding: 2rem; }

/* Password toggle wrapper */
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 3rem; }
.pw-toggle { position: absolute; right: .75rem; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; color: var(--gray-500); font-size: 1.1rem; padding: 0; line-height: 1; }
.pw-toggle:hover { color: var(--green-mid); }

/* ── ALERTS / MESSAGES ── */
.alert { padding: .85rem 1rem; border-radius: 8px; font-size: .93rem; margin-bottom: 1rem; display: flex; align-items: flex-start; gap: .6rem; }
.alert-error { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }
.alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #15803d; }
.alert-info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1d4ed8; }
.alert-warning { background: #fffbeb; border: 1px solid #fed7aa; color: #b45309; }

/* Username check indicator */
.username-check { font-size: .82rem; margin-top: .35rem; height: 18px; }
.username-check.available { color: #15803d; }
.username-check.taken { color: #b91c1c; }
.username-check.checking { color: var(--gray-500); }

/* ── DASHBOARD ── */
.dash-layout { display: flex; min-height: calc(100vh - 64px); }
.dash-sidebar {
  width: 280px; flex-shrink: 0;
  background: var(--white);
  border-right: 1px solid var(--gray-200);
  padding: 1.5rem 0;
  position: sticky; top: 64px; height: calc(100vh - 64px); overflow-y: auto;
}
.dash-main { flex: 1; padding: 1.5rem; overflow-x: hidden; }
.sidebar-avatar { text-align: center; padding: 0 1.5rem 1.5rem; border-bottom: 1px solid var(--gray-200); margin-bottom: 1.5rem; }
.sidebar-avatar .avatar { width: 72px; height: 72px; border-radius: 50%; background: var(--green-dark); color: var(--white); font-size: 2rem; font-weight: 700; display: flex; align-items: center; justify-content: center; margin: 0 auto .75rem; }
.sidebar-avatar h3 { font-size: 1rem; font-weight: 700; }
.sidebar-avatar p { font-size: .82rem; color: var(--gray-500); }
.sidebar-section { padding: 0 1.5rem; margin-bottom: 1.5rem; }
.sidebar-section h4 { font-size: .75rem; font-weight: 700; color: var(--gray-500); letter-spacing: .08em; text-transform: uppercase; margin-bottom: .75rem; }
.sidebar-stat { display: flex; justify-content: space-between; padding: .4rem 0; border-bottom: 1px solid var(--gray-100); font-size: .9rem; }
.sidebar-stat:last-child { border-bottom: none; }
.sidebar-stat span:first-child { color: var(--gray-500); }
.sidebar-stat span:last-child { font-weight: 600; color: var(--green-dark); }
.sidebar-nav { padding: 0 .75rem; }
.sidebar-nav a { display: flex; align-items: center; gap: .6rem; padding: .65rem .75rem; border-radius: 8px; font-size: .92rem; color: var(--gray-700); transition: var(--transition); margin-bottom: .25rem; }
.sidebar-nav a:hover, .sidebar-nav a.active { background: var(--green-dark); color: var(--white); }

/* Stats row */
.stats-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 1rem; margin-bottom: 1.5rem; }
.stat-card { background: var(--white); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); text-align: center; }
.stat-card .stat-value { font-size: 1.8rem; font-weight: 800; color: var(--green-dark); }
.stat-card .stat-label { font-size: .82rem; color: var(--gray-500); margin-top: .2rem; }

/* Banner */
.banner { padding: 1rem 1.25rem; border-radius: 10px; display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.banner-warning { background: #fffbeb; border: 1.5px solid #fcd34d; }
.banner-success { background: #f0fdf4; border: 1.5px solid #86efac; }
.banner-icon { font-size: 1.5rem; flex-shrink: 0; }
.banner h4 { font-size: .95rem; font-weight: 700; }
.banner p { font-size: .85rem; color: var(--gray-500); }

/* Tabs */
.tabs { border-bottom: 2px solid var(--gray-200); display: flex; gap: 0; margin-bottom: 1.5rem; }
.tab-btn { background: none; border: none; padding: .75rem 1.5rem; font-size: .95rem; font-weight: 600; color: var(--gray-500); cursor: pointer; border-bottom: 2.5px solid transparent; margin-bottom: -2px; transition: var(--transition); }
.tab-btn.active { color: var(--green-dark); border-bottom-color: var(--green-dark); }
.tab-btn:hover:not(.active) { color: var(--text); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Referral box */
.referral-box { background: var(--gray-100); border-radius: 10px; padding: 1rem 1.25rem; display: flex; align-items: center; gap: .75rem; margin-top: .75rem; }
.referral-box input { flex: 1; background: none; border: none; font-size: .88rem; color: var(--gray-700); cursor: default; }
.referral-box input:focus { outline: none; }

/* Matrix tree */
.matrix-level { margin-bottom: 1rem; }
.matrix-level h4 { font-size: .82rem; font-weight: 700; color: var(--gray-500); letter-spacing: .05em; margin-bottom: .5rem; }
.matrix-nodes { display: flex; flex-wrap: wrap; gap: .5rem; }
.matrix-node { width: 36px; height: 36px; border-radius: 50%; background: var(--green-mid); color: var(--white); display: flex; align-items: center; justify-content: center; font-size: .7rem; font-weight: 700; position: relative; cursor: pointer; }
.matrix-node.empty { background: var(--gray-200); color: var(--gray-500); }
.matrix-node.self { background: var(--gold); color: #1a1a1a; }

/* Table */
.data-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.data-table th { background: var(--green-dark); color: var(--white); padding: .75rem 1rem; text-align: left; font-size: .82rem; font-weight: 600; letter-spacing: .03em; }
.data-table td { padding: .75rem 1rem; border-bottom: 1px solid var(--gray-200); }
.data-table tr:hover td { background: var(--gray-100); }
.badge { display: inline-block; padding: .2rem .6rem; border-radius: 12px; font-size: .78rem; font-weight: 600; }
.badge-active { background: #dcfce7; color: #15803d; }
.badge-pending { background: #fef9c3; color: #b45309; }
.badge-suspended { background: #fee2e2; color: #b91c1c; }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal-overlay.hidden { display: none; }
.modal { background: var(--white); border-radius: var(--radius); box-shadow: 0 25px 60px rgba(0,0,0,.25); width: 100%; max-width: 500px; }
.modal-header { padding: 1.5rem; border-bottom: 1px solid var(--gray-200); display: flex; align-items: center; justify-content: space-between; }
.modal-header h3 { font-size: 1.1rem; font-weight: 700; color: var(--green-dark); }
.modal-close { background: none; border: none; font-size: 1.4rem; cursor: pointer; color: var(--gray-500); line-height: 1; }
.modal-body { padding: 1.5rem; }
.modal-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--gray-200); display: flex; justify-content: flex-end; gap: .75rem; }

/* Cycle progress */
.cycle-track { display: flex; align-items: center; gap: 0; margin: 1rem 0; }
.cycle-step { flex: 1; text-align: center; position: relative; }
.cycle-step::before { content: ''; position: absolute; top: 16px; right: -50%; width: 100%; height: 2px; background: var(--gray-200); z-index: 0; }
.cycle-step:last-child::before { display: none; }
.cycle-dot { width: 32px; height: 32px; border-radius: 50%; border: 2.5px solid var(--gray-200); background: var(--white); display: flex; align-items: center; justify-content: center; margin: 0 auto .4rem; font-size: .7rem; font-weight: 700; position: relative; z-index: 1; }
.cycle-step.done .cycle-dot { background: var(--green-mid); border-color: var(--green-mid); color: var(--white); }
.cycle-step.current .cycle-dot { background: var(--gold); border-color: var(--gold); color: #1a1a1a; }
.cycle-step.done::before { background: var(--green-mid); }
.cycle-name { font-size: .75rem; color: var(--gray-500); }
.cycle-step.current .cycle-name { color: var(--green-dark); font-weight: 700; }

/* Admin specific */
.admin-header { background: linear-gradient(135deg, #0f1f12, var(--green-dark)); color: var(--white); padding: 1.5rem 2rem; display: flex; align-items: center; justify-content: space-between; }
.admin-header h1 { font-size: 1.3rem; font-weight: 800; }
.admin-layout { display: flex; }
.admin-sidebar { width: 240px; background: #0f1f12; min-height: calc(100vh - 70px); padding: 1.5rem 0; flex-shrink: 0; }
.admin-nav a { display: flex; align-items: center; gap: .6rem; padding: .7rem 1.5rem; color: rgba(255,255,255,.7); font-size: .92rem; transition: var(--transition); }
.admin-nav a:hover, .admin-nav a.active { background: rgba(255,255,255,.1); color: var(--white); border-left: 3px solid var(--gold); }
.admin-content { flex: 1; padding: 2rem; }
.admin-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 1rem; margin-bottom: 2rem; }
.admin-stat { background: var(--white); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); border-left: 4px solid var(--green-mid); }
.admin-stat .value { font-size: 2rem; font-weight: 800; color: var(--green-dark); }
.admin-stat .label { font-size: .82rem; color: var(--gray-500); }

/* Preview panel */
.preview-panel { background: var(--gray-100); border-radius: 10px; padding: 1.25rem; margin-top: 1rem; border-left: 4px solid var(--green-mid); }
.preview-panel h4 { font-weight: 700; color: var(--green-dark); margin-bottom: .75rem; font-size: .95rem; }
.preview-row { display: flex; justify-content: space-between; padding: .35rem 0; border-bottom: 1px solid var(--gray-200); font-size: .9rem; }
.preview-row:last-child { border-bottom: none; }
.preview-row span:first-child { color: var(--gray-500); }
.preview-row span:last-child { font-weight: 600; }

/* Search bar */
.search-bar { position: relative; margin-bottom: 1rem; }
.search-bar input { width: 100%; padding: .7rem 1rem .7rem 2.5rem; border: 1.5px solid var(--gray-200); border-radius: 8px; font-size: .95rem; }
.search-bar::before { content: '🔍'; position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); font-size: .9rem; }

/* Steps (register) */
.step-indicator { display: flex; align-items: center; gap: 0; margin-bottom: 2rem; }
.step { flex: 1; text-align: center; }
.step-num { width: 36px; height: 36px; border-radius: 50%; border: 2.5px solid var(--gray-200); background: var(--white); display: flex; align-items: center; justify-content: center; margin: 0 auto .4rem; font-size: .9rem; font-weight: 700; color: var(--gray-500); transition: var(--transition); }
.step.active .step-num { background: var(--green-dark); border-color: var(--green-dark); color: var(--white); }
.step.done .step-num { background: var(--green-light); border-color: var(--green-light); color: var(--white); }
.step-label { font-size: .8rem; color: var(--gray-500); }
.step.active .step-label { color: var(--green-dark); font-weight: 600; }
.step-connector { flex: 1; height: 2px; background: var(--gray-200); margin-bottom: 1.5rem; }
.step.done ~ .step-connector { background: var(--green-light); }

/* Bank details box */
.bank-box { background: var(--off-white); border: 1.5px solid var(--green-mid); border-radius: 10px; padding: 1.25rem; }
.bank-box h4 { font-size: .9rem; font-weight: 700; color: var(--green-dark); margin-bottom: .75rem; }
.bank-row { display: flex; justify-content: space-between; padding: .4rem 0; border-bottom: 1px solid var(--gray-200); font-size: .9rem; }
.bank-row:last-child { border-bottom: none; }
.bank-row span:first-child { color: var(--gray-500); }
.bank-row span:last-child { font-weight: 600; }

/* Responsive */
@media (max-width: 768px) {
  nav .nav-links { display: none; }
  .stats-row { grid-template-columns: repeat(2,1fr); }
  .admin-stats { grid-template-columns: repeat(2,1fr); }
  .dash-sidebar { display: none; }
  .dash-main { padding: 1rem; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }
}
