/* ================================================================
   JSA Luxury Paints Affiliate — Frontend CSS v3.0
   Professional Light Theme | Full Width | Built by Shivam Singh
   ================================================================ */

:root {
  --brand:       #1e3a8a;
  --brand-light: #2563eb;
  --brand-pale:  #eff6ff;
  --gold:        #d97706;
  --gold-light:  #fef3c7;
  --green:       #16a34a;
  --green-pale:  #f0fdf4;
  --red:         #dc2626;
  --red-pale:    #fef2f2;
  --orange:      #ea580c;
  --purple:      #7c3aed;
  --teal:        #0891b2;
  --pink:        #db2777;
  --bg:          #f0f4f8;
  --surface:     #ffffff;
  --border:      #e2e8f0;
  --text:        #1e293b;
  --text-muted:  #64748b;
  --text-light:  #94a3b8;
  --radius:      14px;
  --shadow:      0 1px 4px rgba(0,0,0,.07), 0 4px 16px rgba(0,0,0,.06);
  --shadow-sm:   0 1px 3px rgba(0,0,0,.05);
  --sidebar-w:   240px;
  --topbar-h:    60px;
}

.fda-wrap *, .fda-wrap *::before, .fda-wrap *::after { box-sizing: border-box; }

/* AUTH */
.fda-auth-wrap {
  min-height: 100vh;
  background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 50%, #2563eb 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px 16px;
}
.fda-auth-card {
  background: #fff; border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  padding: 40px 36px; width: 100%; max-width: 440px;
  animation: fdaFadeUp .4s ease;
}
.fda-auth-card--wide { max-width: 660px; }
.fda-auth-logo { text-align: center; margin-bottom: 28px; }
.fda-brand { display: block; font-size: 22px; font-weight: 800; color: var(--brand); letter-spacing: -.5px; }
.fda-auth-logo p { color: var(--text-muted); font-size: 13px; margin: 4px 0 0; }
.fda-auth-card h2 { font-size: 20px; font-weight: 700; color: var(--text); margin: 0 0 20px; text-align: center; }
.fda-form-hint { color: var(--text-muted); font-size: 13px; text-align: center; margin: -12px 0 16px; }
.fda-auth-links {
  display: flex; gap: 10px; justify-content: center; align-items: center;
  margin-top: 14px; font-size: 13px; color: var(--text-muted);
}
.fda-auth-links a { color: var(--brand-light); text-decoration: none; font-weight: 600; }
.fda-auth-links a:hover { text-decoration: underline; }
.fda-built-by { color: rgba(255,255,255,.6); font-size: 12px; margin-top: 16px; text-align: center; }
.fda-built-by strong { color: rgba(255,255,255,.85); }
.fda-reg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.fda-reg-grid .fda-field.fda-full { grid-column: 1 / -1; }
@media (max-width: 520px) { .fda-reg-grid { grid-template-columns: 1fr; } }
.fda-ref-by-badge {
  background: var(--brand-pale); border: 1px solid #bfdbfe; border-radius: 8px;
  padding: 8px 14px; font-size: 13px; color: var(--brand); margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}
.fda-ref-by-badge strong { color: var(--brand-light); }

/* FORM ELEMENTS */
.fda-field { margin-bottom: 14px; }
.fda-field label {
  display: block; font-size: 12.5px; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .4px; margin-bottom: 5px;
}
.fda-field input, .fda-field select, .fda-field textarea {
  width: 100%; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: 9px;
  font-size: 14px; color: var(--text); background: #fff; transition: border .2s, box-shadow .2s; font-family: inherit;
}
.fda-field input:focus, .fda-field select:focus, .fda-field textarea:focus {
  outline: none; border-color: var(--brand-light); box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.fda-field textarea { resize: vertical; min-height: 80px; }
.fda-msg { display: none; padding: 10px 14px; border-radius: 8px; font-size: 13px; margin: 10px 0; font-weight: 500; }
.fda-msg.success { background: var(--green-pale); color: #15803d; border: 1px solid #bbf7d0; display: block; }
.fda-msg.error   { background: var(--red-pale);   color: #b91c1c; border: 1px solid #fecaca; display: block; }

/* BUTTONS */
.fda-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 11px 22px;
  border-radius: 10px; font-size: 14px; font-weight: 700; cursor: pointer;
  border: none; text-decoration: none; transition: all .2s; font-family: inherit;
}
.fda-btn-gold {
  background: linear-gradient(135deg, #d97706, #b45309); color: #fff;
  width: 100%; justify-content: center; padding: 13px 22px; font-size: 15px;
  box-shadow: 0 4px 14px rgba(217,119,6,.35);
}
.fda-btn-gold:hover { background: linear-gradient(135deg, #b45309, #92400e); transform: translateY(-1px); }
.fda-btn-gold:active { transform: none; }
.fda-btn-gold:disabled { opacity: .65; cursor: not-allowed; transform: none; }
.fda-btn-copy {
  background: var(--brand-pale); color: var(--brand); border: 1px solid #bfdbfe;
  white-space: nowrap; padding: 9px 16px;
}
.fda-btn-copy:hover { background: #dbeafe; }

/* DASHBOARD LAYOUT */
.fda-dashboard-wrap {
  display: flex; min-height: 100vh; background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; color: var(--text);
}

/* SIDEBAR */
.fda-sidebar {
  width: var(--sidebar-w); background: var(--brand); color: #fff;
  display: flex; flex-direction: column; flex-shrink: 0;
  position: sticky; top: 0; height: 100vh; overflow-y: auto; z-index: 100; transition: transform .3s;
}
.fda-sidebar-logo { padding: 22px 18px 16px; border-bottom: 1px solid rgba(255,255,255,.12); }
.fda-sidebar-logo .fda-brand { color: #fff; font-size: 16px; }
.fda-sidebar-logo small { display: block; color: rgba(255,255,255,.55); font-size: 11px; margin-top: 2px; }
.fda-nav { padding: 10px 0; flex: 1; }
.fda-nav-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 18px;
  color: rgba(255,255,255,.72); text-decoration: none; font-size: 13.5px; font-weight: 500;
  transition: background .15s, color .15s; border-left: 3px solid transparent;
}
.fda-nav-item .dashicons { font-size: 18px; width: 18px; height: 18px; line-height: 1; flex-shrink: 0; }
.fda-nav-item:hover { background: rgba(255,255,255,.1); color: #fff; }
.fda-nav-item.active { background: rgba(255,255,255,.15); color: #fff; border-left-color: #fbbf24; font-weight: 700; }
.fda-sidebar-foot { padding: 14px 18px; border-top: 1px solid rgba(255,255,255,.12); }
.fda-sidebar-foot p { font-size: 11px; color: rgba(255,255,255,.45); margin: 0 0 10px; }
.fda-sidebar-foot strong { color: rgba(255,255,255,.7); }
.fda-logout {
  display: flex; align-items: center; gap: 6px; color: rgba(255,255,255,.6);
  font-size: 13px; text-decoration: none; padding: 7px 10px; border-radius: 8px; transition: background .15s, color .15s;
}
.fda-logout:hover { background: rgba(255,255,255,.1); color: #fff; }
.fda-logout .dashicons { font-size: 16px; width: 16px; height: 16px; }

/* MAIN */
.fda-main { flex: 1; display: flex; flex-direction: column; min-width: 0; overflow-x: hidden; }

/* TOPBAR */
.fda-topbar {
  height: var(--topbar-h); background: var(--surface); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 24px; gap: 14px;
  position: sticky; top: 0; z-index: 90; box-shadow: var(--shadow-sm);
}
.fda-menu-toggle { display: none; background: none; border: none; font-size: 22px; cursor: pointer; color: var(--text-muted); padding: 4px; }
.fda-page-title { font-size: 18px; font-weight: 700; color: var(--text); flex: 1; margin: 0; }
.fda-user-info { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.fda-user-info span { font-size: 12px; color: var(--text-muted); }
.fda-balance { font-size: 16px; font-weight: 800; color: var(--brand); }

/* CONTENT */
.fda-content-area { padding: 22px 24px; }

/* STAT CARDS */
.fda-grid-stats {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px; padding: 22px 24px 0;
}
.fda-stat-card {
  background: var(--surface); border-radius: var(--radius); padding: 16px 18px;
  display: flex; align-items: center; gap: 14px; box-shadow: var(--shadow);
  border: 1px solid var(--border); transition: transform .2s, box-shadow .2s;
}
.fda-stat-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.1); }
.fda-stat-card .dashicons { font-size: 28px; width: 28px; height: 28px; flex-shrink: 0; }
.fda-stat-card p { font-size: 11.5px; color: var(--text-muted); margin: 0 0 2px; font-weight: 500; }
.fda-stat-card strong { font-size: 18px; font-weight: 800; color: var(--text); }
.fda-stat-gold   .dashicons { color: var(--gold); }    .fda-stat-gold   strong { color: var(--gold); }
.fda-stat-green  .dashicons { color: var(--green); }   .fda-stat-green  strong { color: var(--green); }
.fda-stat-blue   .dashicons { color: var(--brand-light); } .fda-stat-blue strong { color: var(--brand-light); }
.fda-stat-purple .dashicons { color: var(--purple); }  .fda-stat-purple strong { color: var(--purple); }
.fda-stat-orange .dashicons { color: var(--orange); }  .fda-stat-orange strong { color: var(--orange); }
.fda-stat-teal   .dashicons { color: var(--teal); }    .fda-stat-teal   strong { color: var(--teal); }
.fda-stat-red    .dashicons { color: var(--red); }     .fda-stat-red    strong { color: var(--red); }
.fda-stat-pink   .dashicons { color: var(--pink); }    .fda-stat-pink   strong { color: var(--pink); }

/* CARD */
.fda-card {
  background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border);
  box-shadow: var(--shadow); padding: 22px; margin-bottom: 16px;
}
.fda-card-title {
  font-size: 15px; font-weight: 700; color: var(--text); margin: 0 0 16px;
  padding-bottom: 12px; border-bottom: 2px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}
.fda-card-title .dashicons { color: var(--brand-light); font-size: 18px; width: 18px; height: 18px; }
.fda-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 900px) { .fda-row-2 { grid-template-columns: 1fr; } }

/* TABLES */
.fda-table-wrap { overflow-x: auto; }
.fda-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.fda-table th {
  background: #f8fafc; color: var(--text-muted); font-size: 11.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px; padding: 9px 12px;
  text-align: left; border-bottom: 2px solid var(--border); white-space: nowrap;
}
.fda-table td { padding: 11px 12px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; color: var(--text); }
.fda-table tr:last-child td { border-bottom: none; }
.fda-table tr:hover td { background: #f8fafc; }
.fda-table .fda-green { color: var(--green); font-weight: 700; }
.fda-table .fda-red   { color: var(--red); font-weight: 700; }
.fda-empty { text-align: center; color: var(--text-light); padding: 32px !important; font-style: italic; }

/* BADGES */
.fda-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 20px; font-size: 11.5px; font-weight: 700;
}
.fda-badge-green  { background: #dcfce7; color: #16a34a; }
.fda-badge-red    { background: #fee2e2; color: #dc2626; }
.fda-badge-orange { background: #ffedd5; color: #ea580c; }
.fda-badge-blue   { background: #dbeafe; color: #1d4ed8; }

/* LEVEL PILLS */
.fda-unlock-info { font-size: 13px; color: var(--text-muted); margin: 0 0 14px; }
.fda-unlock-info strong { color: var(--brand); }
.fda-level-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 10px; }
.fda-level-pill {
  border-radius: 12px; padding: 10px 6px 8px; text-align: center;
  border: 2px solid; transition: transform .2s;
}
.fda-level-pill:hover { transform: translateY(-2px); }
.fda-level-pill.unlocked { background: #f0fdf4; border-color: #86efac; }
.fda-level-pill.locked   { background: #f8fafc; border-color: var(--border); opacity: .7; }
.fda-lv-num { display: block; font-size: 11px; font-weight: 700; color: var(--text-muted); margin-bottom: 2px; }
.fda-lv-rate { display: block; font-size: 16px; font-weight: 800; color: var(--brand); margin-bottom: 4px; }
.fda-level-pill.locked .fda-lv-rate { color: var(--text-muted); }
.fda-lv-status .dashicons { font-size: 18px; width: 18px; height: 18px; }
.fda-level-pill.unlocked .fda-lv-status .dashicons { color: var(--green); }
.fda-level-pill.locked   .fda-lv-status .dashicons { color: var(--text-light); }
.fda-lv-status small { display: block; font-size: 10px; color: var(--text-light); margin-top: 2px; }

/* WALLET */
.fda-wallet-card {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-light) 100%);
  color: #fff; text-align: center;
}
.fda-wallet-card p { color: rgba(255,255,255,.75); font-size: 13px; margin: 0 0 6px; }
.fda-wallet-card h2 { font-size: 38px; font-weight: 900; color: #fff; margin: 0 0 20px; letter-spacing: -1px; }
.fda-wallet-meta { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-bottom: 20px; }
.fda-wallet-meta > div { background: rgba(255,255,255,.12); border-radius: 10px; padding: 10px; }
.fda-wallet-meta span { display: block; font-size: 11px; color: rgba(255,255,255,.65); margin-bottom: 4px; }
.fda-wallet-meta strong { font-size: 14px; font-weight: 700; color: #fff; }

/* NETWORK */
.fda-network-summary { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px 24px; }
.fda-nlevel-pill {
  background: var(--surface); border: 2px solid var(--border); border-radius: 10px;
  padding: 6px 14px; display: flex; align-items: center; gap: 8px; font-size: 13px; box-shadow: var(--shadow-sm);
}
.fda-nlevel-pill span { color: var(--text-muted); font-weight: 700; }
.fda-nlevel-pill strong { font-size: 15px; color: var(--text); font-weight: 800; }
.fda-nlevel-pill.active { border-color: #bfdbfe; background: var(--brand-pale); }
.fda-nlevel-pill.active span { color: var(--brand); }
.fda-nlevel-pill.active strong { color: var(--brand-light); }

/* MLM Tree */
.fda-mlm-tree-wrap { overflow-x: auto; padding: 8px 0; }
.fda-mlm-tree ul { list-style: none; padding: 0; margin: 0; }
.fda-mlm-root { display: flex; justify-content: center; }
.fda-mlm-node { display: flex; flex-direction: column; align-items: center; position: relative; padding: 0 8px; }
.fda-mlm-connector { width: 2px; height: 20px; background: var(--border); margin: 0 auto; }
.fda-mlm-card {
  border: 2px solid var(--border); border-radius: 12px; padding: 10px 14px;
  background: var(--surface); display: flex; align-items: center; gap: 10px;
  min-width: 180px; box-shadow: var(--shadow-sm); font-size: 13px;
}
.fda-mlm-card.fda-mlm-self { border-color: var(--brand-light); background: var(--brand-pale); }
.fda-mlm-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--brand-pale); color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px; flex-shrink: 0;
}
.fda-mlm-avatar--self { background: var(--brand); color: #fff; }
.fda-mlm-info strong { display: block; font-size: 13px; color: var(--text); }
.fda-mlm-info span { font-size: 11px; color: var(--text-muted); }
.fda-mlm-info em { font-size: 11px; color: var(--text-light); font-style: normal; display: block; }

/* LINKS */
.fda-links-grid { display: grid; gap: 16px; }
.fda-link-box { background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.fda-link-box label {
  display: flex; flex-direction: column; gap: 3px; font-size: 14px;
  font-weight: 700; color: var(--text); margin-bottom: 10px;
}
.fda-link-box label .dashicons { color: var(--brand-light); }
.fda-link-box label span { font-size: 12px; color: var(--text-muted); font-weight: 400; }
.fda-copy-row { display: flex; gap: 8px; }
.fda-copy-row input {
  flex: 1; padding: 9px 12px; border: 1.5px solid var(--border); border-radius: 9px;
  font-size: 12.5px; color: var(--text-muted); background: #fff; min-width: 0;
}

/* Lucky Draw */
.fda-lucky-banner {
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(135deg, #1e3a8a, #1d4ed8);
  border-radius: 12px; padding: 16px 20px; margin-bottom: 16px; color: #fff;
}
.fda-lucky-banner strong { color: #fff; }
.fda-lucky-banner p { color: rgba(255,255,255,.75); }

/* Balance info */
.fda-balance-info {
  background: var(--brand-pale); border: 1px solid #bfdbfe; border-radius: 8px;
  padding: 10px 14px; font-size: 13px; color: var(--brand); margin-bottom: 16px;
}
.fda-balance-info strong { color: var(--brand-light); }

/* RESPONSIVE */
@media (max-width: 768px) {
  .fda-sidebar { position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-100%); }
  .fda-sidebar.open { transform: translateX(0); box-shadow: 4px 0 24px rgba(0,0,0,.2); }
  .fda-menu-toggle { display: block; }
  .fda-grid-stats { grid-template-columns: repeat(2, 1fr); padding: 16px; }
  .fda-content-area { padding: 16px; }
  .fda-topbar { padding: 0 16px; }
  .fda-wallet-meta { grid-template-columns: 1fr; }
}

@keyframes fdaFadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
