/* assets/css/wealth-creator.css
   Namespaced, defensive CSS for Wealth Creator plugin UI.
   IMPORTANT: All rules are scoped under .ceeai-theme to avoid theme collisions.
*/

/* Palette */
:root{
  --wc-card-bg: #ffffff;
  --wc-text: #0b1220;
  --wc-muted: #6b7280;
  --wc-accent-start: #2a7fff;
  --wc-accent-end: #6d5bff;
  --wc-accent: linear-gradient(135deg,var(--wc-accent-start),var(--wc-accent-end));
  --wc-danger: #ef4444;
  --wc-success: #10b981;
  --wc-radius: 12px;
  --wc-pad: 20px;
  --wc-shadow: 0 14px 40px rgba(11,22,40,0.06);
}

/* --- Strict scope: everything must be inside .ceeai-theme --- */
.ceeai-theme {
  box-sizing: border-box !important;
  font-family: Inter, "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial !important;
  color: var(--wc-text) !important;
  line-height: 1.45 !important;
}

/* Utility to hide elements programmatically */
.ceeai-theme .ceeai-hidden { display: none !important; }

/* ---------- Card container (centered + constrained) ---------- */
/* Very high specificity so theme rules don't win. */
body .ceeai-theme.ceeai-auth-card,
body .ceeai-theme .wc-profile-edit,
body .ceeai-theme .wc-profile-card,
.ceeai-theme .ceeai-auth-card {
  background: var(--wc-card-bg) !important;
  color: var(--wc-text) !important;
  border-radius: calc(var(--wc-radius)) !important;
  padding: var(--wc-pad) !important;
  box-shadow: var(--wc-shadow) !important;
  border: 1px solid rgba(11,17,32,0.04) !important;
  max-width: 980px !important;
  margin: 28px auto !important;
  box-sizing: border-box !important;
  overflow: visible !important;
}

/* Some themes wrap shortcodes in other containers — ensure inner content is constrained */
.ceeai-theme .ceeai-card-inner {
  max-width: 940px;
  margin: 0 auto;
  box-sizing: border-box;
}

/* ---------- Header / title / controls ---------- */
.ceeai-theme .ceeai-auth-header,
.ceeai-theme .ceeai-auth-controls {
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:12px !important;
  margin-bottom: 18px !important;
  box-sizing: border-box !important;
}

.ceeai-theme .ceeai-auth-title {
  margin:0 !important;
  font-size:22px !important;
  font-weight:800 !important;
  color:var(--wc-text) !important;
}

/* Buttons in header kept inside card */
.ceeai-theme .ceeai-auth-controls .ceeai-btn {
  min-height:40px !important;
  padding:8px 14px !important;
  border-radius:12px !important;
  font-size:14px !important;
}

/* ---------- Grid: use unique classes to avoid .row/.col collisions ---------- */
.ceeai-theme .ceeai-grid { display:flex !important; gap:16px !important; margin-bottom:14px !important; align-items:flex-start !important; box-sizing:border-box !important; }
.ceeai-theme .ceeai-grid.ceeai-col-2 { display:grid !important; grid-template-columns:1fr 1fr !important; gap:16px !important; }
.ceeai-theme .ceeai-grid.ceeai-col-3 { display:grid !important; grid-template-columns:repeat(3,1fr) !important; gap:16px !important; }
.ceeai-theme .ceeai-field { display:flex !important; flex-direction:column !important; box-sizing:border-box !important; }

/* Convenience row/col classes that map to your markup */
.ceeai-theme .ceeai-row { display:flex !important; gap:16px !important; margin-bottom:14px !important; align-items:flex-start !important; }
.ceeai-theme .ceeai-row--two { display:grid !important; grid-template-columns:1fr 1fr !important; gap:16px !important; }
.ceeai-theme .ceeai-row--three { display:grid !important; grid-template-columns:repeat(3,1fr) !important; gap:16px !important; }
.ceeai-theme .ceeai-col { display:flex !important; flex-direction:column !important; width: 100%; }

/* Responsive fallback: stack on small screens */
@media (max-width: 900px) {
  .ceeai-theme .ceeai-grid.ceeai-col-2,
  .ceeai-theme .ceeai-grid.ceeai-col-3,
  .ceeai-theme .ceeai-row--two,
  .ceeai-theme .ceeai-row--three {
    display:block !important;
  }
  .ceeai-theme .ceeai-grid { display:block !important; }
}

/* ---------- Labels & inputs (only inside .ceeai-theme) ---------- */
.ceeai-theme .ceeai-label { display:block !important; margin-bottom:8px !important; margin-top:4px !important; font-size:14px !important; font-weight:700 !important; color:var(--wc-muted) !important; }
.ceeai-theme .ceeai-input,
.ceeai-theme .ceeai-file,
.ceeai-theme input[type="text"],
.ceeai-theme input[type="password"],
.ceeai-theme textarea,
.ceeai-theme select {
  width:100% !important;
  padding:12px 14px !important;
  border-radius:10px !important;
  border:1px solid rgba(11,17,32,0.06) !important;
  background:#fff !important;
  color:var(--wc-text) !important;
  font-size:14px !important;
  box-sizing:border-box !important;
  transition: box-shadow .12s ease, border-color .12s ease, transform .06s ease !important;
  -webkit-appearance: none !important;
}

/* placeholder styling */
.ceeai-theme input::placeholder, .ceeai-theme textarea::placeholder { color:#b7c0ca !important; }

/* focus state */
.ceeai-theme .ceeai-input:focus,
.ceeai-theme textarea:focus,
.ceeai-theme select:focus {
  outline:none !important;
  border-color: rgba(42,127,255,0.95) !important;
  box-shadow: 0 10px 30px rgba(42,127,255,0.06) !important;
  transform: translateY(-1px);
}

/* File input usability */
.ceeai-theme .ceeai-file { padding:8px 0 !important; }

/* ---------- Hints / small text ---------- */
.ceeai-theme .ceeai-hint,
.ceeai-theme .ceeai-form-note,
.ceeai-theme .ceeai-small-muted { color:var(--wc-muted) !important; font-size:13px !important; margin-top:6px !important; }

/* ---------- Errors / messages ---------- */
.ceeai-theme .ceeai-field-error { display:none !important; color:var(--wc-danger) !important; font-size:13px !important; margin-top:6px !important; }
.ceeai-theme .ceeai-msg { display:none !important; margin-top:12px !important; font-weight:700 !important; }
.ceeai-theme .ceeai-msg--err { color:var(--wc-danger) !important; display:block !important; }
.ceeai-theme .ceeai-msg--success { color:var(--wc-success) !important; display:block !important; }

/* Make sure programmatic additions are visible */
.ceeai-theme .ceeai-field-error[style],
.ceeai-theme .ceeai-field-error.show { display:block !important; }

/* ---------- Buttons (namespaced) ---------- */
.ceeai-theme .ceeai-actions { display:flex !important; justify-content:flex-end !important; gap:12px !important; margin-top:12px !important; box-sizing:border-box !important; }

.ceeai-theme .ceeai-btn {
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:8px !important;
  padding:10px 14px !important;
  border-radius:12px !important;
  border:1px solid rgba(11,17,32,0.06) !important;
  background:#fff !important;
  color:var(--wc-text) !important;
  cursor:pointer !important;
  font-weight:700 !important;
  font-size:14px !important;
  box-sizing:border-box !important;
  -webkit-appearance:none !important;
}
.ceeai-theme .ceeai-btn--primary { background: var(--wc-accent) !important; color:#fff !important; border:none !important; box-shadow: 0 10px 30px rgba(42,127,255,0.12) !important; }
.ceeai-theme .ceeai-btn.is-busy { opacity:.85 !important; cursor:not-allowed !important; transform:scale(.998) !important; }

/* ---------- Avatar preview (circular) ---------- */
.ceeai-theme .wc-avatar-preview-wrap {
  width:96px !important;
  height:96px !important;
  border-radius:50% !important;
  overflow:hidden !important;
  border:2px solid rgba(11,17,32,0.06) !important;
  box-shadow: 0 8px 24px rgba(11,22,40,0.04) !important;
  flex-shrink:0 !important;
  background:#f6f7fb !important;
}
.ceeai-theme .wc-avatar-preview-wrap img,
.ceeai-theme #wc-avatar-preview { width:100% !important; height:100% !important; object-fit:cover !important; display:block !important; }

/* ---------- Profile small card ---------- */
.ceeai-theme .wc-profile-card {
  padding:16px !important;
  border-radius:12px !important;
  box-shadow: var(--wc-shadow) !important;
  max-width:420px !important;
  background:var(--wc-card-bg) !important;
  box-sizing:border-box !important;
}

/* ---------- Divider ---------- */
.ceeai-theme .wc-divider { height:1px !important; background: rgba(11,17,32,0.04) !important; margin:20px 0 !important; border:none !important; }

/* ---------- Defensive: prevent theme global .row/.col/.btn from affecting plugin ----------
   Revert display for internal plugin elements that might be overwritten by theme.
   This ensures our .ceeai-* classes win.
*/
.ceeai-theme .row,
.ceeai-theme .col,
.ceeai-theme .btn {
  display: revert !important;
}

/* ---------- Small-screen tweaks ---------- */
@media (max-width:640px) {
  .ceeai-theme .ceeai-grid { display:block !important; }
  .ceeai-theme .wc-avatar-preview-wrap { margin-bottom:12px !important; }
  .ceeai-theme .ceeai-auth-card { padding:16px !important; margin: 14px !important; }
  .ceeai-theme .ceeai-auth-title { font-size:20px !important; }
}

/* keep file input accessible & native button visible */
.ceeai-theme input[type="file"] { background: transparent !important; border: none !important; padding: 0 !important; }
/* ===== wc_profile_card specific styles ===== */
.ceeai-theme .wc-profile-header--top {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  flex-direction: row;
}
.ceeai-theme .wc-avatar-wrap {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg,#e6eefc,#f3f6ff);
  box-shadow: 0 6px 18px rgba(11,22,40,0.04);
}
.ceeai-theme .wc-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ceeai-theme .wc-avatar-initials {
  font-weight: 700;
  color: #213;
  font-size: 20px;
}

/* meta block */
.ceeai-theme .wc-meta-block { flex: 1; min-width: 0; }
.ceeai-theme .wc-name { font-weight: 800; font-size: 20px; color: var(--wc-text); line-height: 1; }
.ceeai-theme .wc-member-id { color: var(--wc-muted); font-size: 13px; margin-top: 6px; }
.ceeai-theme .wc-member-id-val { color: var(--wc-text); font-weight: 600; }

/* mini-cards grid */
.ceeai-theme .wc-profile-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
  align-items: stretch;
}
.ceeai-theme .wc-mini-card {
  background: var(--wc-card-bg);
  border: 1px solid rgba(11,17,32,0.03);
  padding: 14px;
  border-radius: 10px;
  min-height: 64px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.ceeai-theme .wc-mini-card__label {
  font-size: 12px;
  color: var(--wc-muted);
  font-weight: 700;
  letter-spacing: 0.6px;
}
.ceeai-theme .wc-mini-card__value-wrap {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
}
.ceeai-theme .wc-mini-card__value {
  font-weight: 800;
  font-size: 16px;
}

/* body grid */
.ceeai-theme .wc-body--grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.ceeai-theme .wc-row { padding: 8px 0; border-top: 1px dashed rgba(11,17,32,0.03); display:flex; gap:12px; align-items:flex-start; }
.ceeai-theme .wc-row__label { color: var(--wc-muted); font-weight:700; font-size:13px; min-width:120px; }
.ceeai-theme .wc-row__value { font-weight:600; color:var(--wc-text); }

/* small screens: stack mini-cards & body rows */
@media (max-width: 640px) {
  .ceeai-theme .wc-profile-header--top { flex-direction: column; gap: 12px; }
  .ceeai-theme .wc-profile-cards { grid-template-columns: 1fr; }
  .ceeai-theme .wc-body--grid { grid-template-columns: 1fr; }
  .ceeai-theme .wc-row__label { min-width: 100px; }
  .ceeai-theme .wc-avatar-wrap { width: 64px; height: 64px; }
}

/* make copy button visually smaller on mobile */
@media (max-width: 420px) {
  .ceeai-theme .ceeai-copy-ref { padding: 6px 8px; font-size: 13px; }
}


/* -------------------------
   Welcome widget (card)
   ------------------------- */
.ceeai-theme .wc-welcome-widget--card {
  background: var(--wc-card-bg) !important;
  border: 1px solid rgba(11,17,32,0.04) !important;
  border-radius: 12px !important;
  padding: 14px 18px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  box-shadow: var(--wc-shadow) !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* left area: avatar + text */
.ceeai-theme .wc-welcome-left {
  display: flex !important;
  gap: 12px !important;
  align-items: center !important;
  min-width: 0 !important;
}

/* avatar */
.ceeai-theme .wc-welcome-avatar {
  width: 56px !important;
  height: 56px !important;
  border-radius: 50% !important;
  overflow: hidden !important;
  flex-shrink: 0 !important;
  box-shadow: 0 8px 24px rgba(11,22,40,0.04) !important;
  border: 2px solid rgba(11,17,32,0.06) !important;
  background: #f6f7fb !important;
}
.ceeai-theme .wc-welcome-avatar img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

/* greeting text */
.ceeai-theme .wc-welcome-text { min-width: 0 !important; }
.ceeai-theme .wc-welcome-greeting {
  font-weight: 800 !important;
  font-size: 18px !important;
  color: var(--wc-text) !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ceeai-theme .wc-welcome-greeting .wc-name { color: var(--wc-text) !important; }

/* sub (last login) */
.ceeai-theme .wc-welcome-sub {
  margin-top: 4px !important;
  font-size: 13px !important;
  color: var(--wc-muted) !important;
}

/* right area: pills */
.ceeai-theme .wc-welcome-right {
  display: flex !important;
  gap: 10px !important;
  align-items: center !important;
  justify-content: flex-end !important;
  flex-wrap: wrap !important;
}

/* pill styles */
.ceeai-theme .wc-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 8px 12px !important;
  border-radius: 999px !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  background: rgba(11,17,32,0.03) !important;
  color: var(--wc-text) !important;
  border: 1px solid rgba(11,17,32,0.04) !important;
  box-sizing: border-box !important;
}

/* accent pill */
.ceeai-theme .wc-pill--accent {
  background: var(--wc-accent) !important;
  color: #fff !important;
  border: none !important;
  box-shadow: 0 8px 24px rgba(42,127,255,0.08) !important;
}

/* muted pill (lighter) */
.ceeai-theme .wc-pill--muted {
  background: #fff !important;
  color: var(--wc-text) !important;
}

/* pill value */
.ceeai-theme .wc-pill .wc-pill-val {
  margin-left: 6px !important;
  font-weight: 800 !important;
}

/* guest state */
.ceeai-theme .wc-welcome-widget--guest {
  padding: 10px 12px !important;
  background: transparent !important;
  color: var(--wc-text) !important;
}

/* responsive: stack on narrow screens */
@media (max-width: 760px) {
  .ceeai-theme .wc-welcome-widget--card {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
    padding: 12px !important;
  }
  .ceeai-theme .wc-welcome-right {
    width: 100% !important;
    justify-content: flex-start !important;
  }
  .ceeai-theme .wc-welcome-greeting { font-size: 16px !important; }
  .ceeai-theme .wc-pill { padding: 7px 10px !important; font-size: 13px !important; }
  .ceeai-theme .wc-welcome-avatar { width: 64px !important; height: 64px !important; }
}

/* defensive: ensure the greeting doesn't inherit weird theme link colors */
.ceeai-theme .wc-welcome-widget a { color: var(--wc-accent-start) !important; text-decoration: none !important; }

/* ensure high specificity so theme rules cannot break layout */
body .ceeai-theme .wc-welcome-widget--card { max-width: 100% !important; }

#wc-referral-table  tbody td {
    text-align: center;
    color: var(--wc-text);
}



#wc-algo-history-table tbody td,
#wc-algo-history-table>thead>tr>th,
#wc-algo-history-table>thead>tr>td,
#wc-algo-history-table_wrapper label,
#wc-algo-history-table_wrapper .nice-select {
  font-size: 14px;
  color: #0b1220;
}

#wc-algo-history-table_wrapper .dataTables_filter input {
  width: 95%;
}