/* ============================================================
   WP EQUITY INVESTMENT v8.1 – Full Bootstrap 5 Responsive
   ============================================================ */

:root {
  --eq-primary:    #4f46e5;
  --eq-primary-d:  #3730a3;
  --eq-secondary:  #06b6d4;
  --eq-success:    #10b981;
  --eq-warning:    #f59e0b;
  --eq-danger:     #ef4444;
  --eq-dark:       #0f172a;
  --eq-text:       #334155;
  --eq-muted:      #64748b;
  --eq-border:     #e2e8f0;
  --eq-bg:         #f8fafc;
  --eq-card:       #ffffff;
  --eq-radius:     16px;
  --eq-radius-sm:  10px;
  --eq-shadow:     0 1px 3px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.06);
  --eq-shadow-lg:  0 8px 32px rgba(79,70,229,.15);
}

/* Base */
.eq-wrap, .eq-wrap * { font-family: 'Plus Jakarta Sans', system-ui, sans-serif; box-sizing: border-box; }
.eq-wrap { color: var(--eq-text); }
.eq-wrap a { color: var(--eq-primary); text-decoration: none; }
.eq-wrap a:hover { text-decoration: underline; }

/* ---- TOPBAR NAV ---- */
.eq-topbar {
  background: var(--eq-dark);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1050;
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
}
.eq-topbar .navbar-brand {
  font-weight: 800;
  font-size: 1.2rem;
  color: #fff !important;
  letter-spacing: -0.5px;
}
.eq-topbar .navbar-brand span { color: var(--eq-secondary); }

/* FIX: nav-link colours – important overrides any theme interference */
.eq-topbar .nav-link {
  color: rgba(255,255,255,.75) !important;
  font-size: .875rem;
  font-weight: 500;
  padding: .6rem 1rem !important;
  border-radius: 8px;
  transition: all .2s;
}
.eq-topbar .nav-link:hover,
.eq-topbar .nav-link.active { color: #fff !important; background: rgba(255,255,255,.1); }

/* FIX: toggler – explicit colours so it works without theme support */
.eq-topbar .navbar-toggler {
  border-color: rgba(255,255,255,.35) !important;
  padding: .35rem .6rem;
  background: transparent !important;
}
.eq-topbar .navbar-toggler:focus { box-shadow: 0 0 0 3px rgba(255,255,255,.2); }
.eq-topbar .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255%2C255%2C255%2C.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* FIX: collapse animation – ensure the collapsible menu slides correctly */
.eq-topbar .navbar-collapse {
  /* Bootstrap handles collapse via JS; just ensure it fits on mobile */
}
@media (max-width: 991.98px) {
  .eq-topbar .navbar-collapse.show,
  .eq-topbar .navbar-collapse.collapsing {
    background: var(--eq-dark);
    border-top: 1px solid rgba(255,255,255,.08);
    padding: .5rem 0;
  }
  .eq-topbar .navbar-nav { gap: 2px; }
  .eq-topbar .nav-link { border-radius: 6px; margin: 0 .5rem; }
  .eq-topbar .navbar-nav.align-items-center { border-top: 1px solid rgba(255,255,255,.08); padding-top: .5rem; margin-top: .25rem; }
}

.eq-balance-pill {
  background: linear-gradient(135deg, var(--eq-primary), var(--eq-secondary));
  color: #fff !important;
  border-radius: 50px;
  padding: .4rem 1.1rem !important;
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .3px;
}
.eq-balance-pill:hover { opacity: .9; background: linear-gradient(135deg, var(--eq-primary), var(--eq-secondary)) !important; }

/* ---- PAGE WRAPPER ---- */
.eq-page { min-height: 100vh; background: var(--eq-bg); padding-bottom: 60px; }
.eq-page-header {
  background: linear-gradient(135deg, var(--eq-dark) 0%, #1e1b4b 100%);
  padding: 2rem 0 3.5rem;
  margin-bottom: -2rem;
}
.eq-page-header h1 { color: #fff; font-weight: 800; font-size: clamp(1.4rem, 4vw, 2rem); margin: 0; }
.eq-page-header p { color: rgba(255,255,255,.65); margin: .4rem 0 0; font-size: .9rem; }

/* ---- AUTH CARD ---- */
.eq-auth-wrap {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--eq-dark) 0%, #1e1b4b 60%, #0c4a6e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}
.eq-auth-card {
  width: 100%;
  max-width: 460px;
  background: var(--eq-card);
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(0,0,0,.35);
  overflow: hidden;
}
.eq-auth-card-head {
  background: linear-gradient(135deg, var(--eq-primary), var(--eq-secondary));
  padding: 2.2rem 2rem 1.8rem;
  text-align: center;
}
.eq-auth-card-head .eq-logo-icon {
  width: 60px; height: 60px;
  background: rgba(255,255,255,.2);
  border-radius: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.5rem; color: #fff; margin-bottom: 1rem;
}
.eq-auth-card-head h2 { color: #fff; font-weight: 800; font-size: 1.5rem; margin: 0; }
.eq-auth-card-head p { color: rgba(255,255,255,.75); margin: .3rem 0 0; font-size: .875rem; }
.eq-auth-body { padding: 2rem; }
.eq-auth-footer { padding: .5rem 2rem 1.5rem; text-align: center; font-size: .875rem; color: var(--eq-muted); }
.eq-auth-footer a { color: var(--eq-primary); font-weight: 600; }

/* ---- CARDS ---- */
.eq-card {
  background: var(--eq-card);
  border-radius: var(--eq-radius);
  box-shadow: var(--eq-shadow);
  border: 1px solid var(--eq-border);
  overflow: hidden;
}
.eq-card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--eq-border);
  display: flex; align-items: center; gap: .75rem;
  background: #fff;
}
.eq-card-header .eq-card-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1rem; flex-shrink: 0;
}
.eq-card-header h4, .eq-card-header h5 { margin: 0; font-weight: 700; font-size: 1.05rem; color: var(--eq-dark); }
.eq-card-body { padding: 1.5rem; }

/* ---- STAT CARDS ---- */
.eq-stat {
  border-radius: var(--eq-radius);
  padding: 1.5rem;
  color: #fff;
  position: relative;
  overflow: hidden;
  border: none;
}
.eq-stat::before {
  content: '';
  position: absolute; top: -20px; right: -20px;
  width: 100px; height: 100px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
}
.eq-stat::after {
  content: '';
  position: absolute; bottom: -30px; right: 30px;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
}
.eq-stat-label { font-size: .8rem; font-weight: 600; opacity: .85; text-transform: uppercase; letter-spacing: .5px; margin-bottom: .5rem; }
.eq-stat-value { font-size: 2rem; font-weight: 800; line-height: 1; margin-bottom: .25rem; }
.eq-stat-sub { font-size: .78rem; opacity: .75; }
.eq-stat-icon { position: absolute; right: 1.25rem; top: 50%; transform: translateY(-50%); font-size: 2.5rem; opacity: .25; }
.eq-stat-blue   { background: linear-gradient(135deg, #4f46e5, #818cf8); }
.eq-stat-cyan   { background: linear-gradient(135deg, #0891b2, #06b6d4); }
.eq-stat-green  { background: linear-gradient(135deg, #059669, #10b981); }
.eq-stat-amber  { background: linear-gradient(135deg, #d97706, #f59e0b); }
.eq-stat-red    { background: linear-gradient(135deg, #dc2626, #ef4444); }
.eq-stat-violet { background: linear-gradient(135deg, #7c3aed, #a78bfa); }

/* ---- ACTION BUTTONS ROW ---- */
.eq-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.eq-actions .btn { border-radius: 10px; font-weight: 600; font-size: .875rem; padding: .55rem 1.1rem; }

/* ---- INVESTMENT PLAN CARD ---- */
.eq-plan-card {
  border-radius: var(--eq-radius);
  overflow: hidden;
  box-shadow: var(--eq-shadow);
  background: var(--eq-card);
  border: 1px solid var(--eq-border);
  transition: transform .25s, box-shadow .25s;
  height: 100%;
  display: flex; flex-direction: column;
}
.eq-plan-card:hover { transform: translateY(-5px); box-shadow: var(--eq-shadow-lg); }
.eq-plan-img { height: 180px; object-fit: cover; width: 100%; }
.eq-plan-img-placeholder {
  height: 180px;
  background: linear-gradient(135deg, #e0e7ff, #ede9fe);
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem; color: var(--eq-primary); opacity: .5;
}
.eq-plan-body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }
.eq-plan-title { font-weight: 800; font-size: 1.05rem; margin-bottom: .75rem; color: var(--eq-dark); }
.eq-plan-meta { list-style: none; padding: 0; margin: 0 0 1rem; font-size: .85rem; color: var(--eq-muted); }
.eq-plan-meta li { display: flex; align-items: center; gap: .4rem; padding: .25rem 0; border-bottom: 1px dashed var(--eq-border); }
.eq-plan-meta li:last-child { border: none; }
.eq-plan-meta i { width: 16px; color: var(--eq-primary); }
.eq-plan-badge {
  display: inline-flex; align-items: center;
  background: linear-gradient(135deg, var(--eq-primary), var(--eq-secondary));
  color: #fff; border-radius: 50px;
  font-size: .75rem; font-weight: 700; padding: .25rem .75rem;
  margin-bottom: .75rem;
}
.eq-plan-body .btn { margin-top: auto; }

/* ---- TABLES ---- */
.eq-table { border-radius: var(--eq-radius-sm); overflow: hidden; border: 1px solid var(--eq-border); }
.eq-table .table { margin: 0; font-size: .875rem; }
.eq-table .table thead th {
  background: #f1f5f9;
  font-weight: 700;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--eq-muted);
  border-bottom: 2px solid var(--eq-border);
  padding: .9rem 1rem;
  white-space: nowrap;
}
.eq-table .table tbody td { padding: .85rem 1rem; vertical-align: middle; border-color: var(--eq-border); }
.eq-table .table tbody tr:hover { background: #f8fafc; }

/* ---- STATUS BADGES ---- */
.eq-badge {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .3rem .75rem; border-radius: 50px;
  font-size: .75rem; font-weight: 700; line-height: 1;
}
.eq-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.eq-badge-pending  { background: #fef3c7; color: #92400e; } .eq-badge-pending::before  { background: #f59e0b; }
.eq-badge-approved, .eq-badge-verified, .eq-badge-active, .eq-badge-completed {
  background: #d1fae5; color: #065f46;
} .eq-badge-approved::before, .eq-badge-verified::before, .eq-badge-active::before, .eq-badge-completed::before { background: #10b981; }
.eq-badge-rejected, .eq-badge-cancelled { background: #fee2e2; color: #991b1b; }
.eq-badge-rejected::before, .eq-badge-cancelled::before { background: #ef4444; }
.eq-badge-locked { background: #e0e7ff; color: #3730a3; } .eq-badge-locked::before { background: #4f46e5; }
.eq-badge-credit { background: #d1fae5; color: #065f46; } .eq-badge-credit::before { background: #10b981; }
.eq-badge-debit  { background: #fef3c7; color: #92400e; } .eq-badge-debit::before  { background: #f59e0b; }
.eq-badge-not-submitted { background: #f1f5f9; color: #475569; } .eq-badge-not-submitted::before { background: #94a3b8; }

/* ---- FORMS ---- */
.eq-wrap .form-control,
.eq-wrap .form-select {
  border: 1.5px solid var(--eq-border);
  border-radius: var(--eq-radius-sm);
  padding: .7rem 1rem;
  font-size: .9rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--eq-text);
  transition: border-color .2s, box-shadow .2s;
}
.eq-wrap .form-control:focus,
.eq-wrap .form-select:focus {
  border-color: var(--eq-primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,.12);
  outline: none;
}
.eq-wrap label { font-size: .875rem; font-weight: 600; margin-bottom: .4rem; color: var(--eq-dark); display: block; }
.eq-wrap .form-text { font-size: .78rem; color: var(--eq-muted); }

/* ---- BUTTONS ---- */
.eq-wrap .btn { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 600; border-radius: var(--eq-radius-sm); }
.eq-btn-primary {
  background: linear-gradient(135deg, var(--eq-primary), #818cf8);
  border: none; color: #fff;
}
.eq-btn-primary:hover { background: linear-gradient(135deg, var(--eq-primary-d), var(--eq-primary)); color: #fff; }
.eq-btn-success { background: linear-gradient(135deg, #059669, var(--eq-success)); border: none; color: #fff; }
.eq-btn-success:hover { background: linear-gradient(135deg, #047857, #059669); color: #fff; }
.eq-btn-warning { background: linear-gradient(135deg, #d97706, var(--eq-warning)); border: none; color: #fff; }
.eq-btn-warning:hover { background: linear-gradient(135deg, #b45309, #d97706); color: #fff; }
.eq-btn-danger { background: linear-gradient(135deg, #dc2626, var(--eq-danger)); border: none; color: #fff; }
.eq-btn-danger:hover { background: linear-gradient(135deg, #b91c1c, #dc2626); color: #fff; }
.eq-btn-outline { background: transparent; border: 1.5px solid var(--eq-border); color: var(--eq-text); }
.eq-btn-outline:hover { border-color: var(--eq-primary); color: var(--eq-primary); background: #f0f0ff; }

/* ---- PAYMENT DETAILS BOX ---- */
.eq-payment-box {
  background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
  border: 1.5px solid #a7f3d0;
  border-radius: var(--eq-radius-sm);
  padding: 1.25rem;
  margin-top: 1rem;
}
.eq-payment-box .eq-copy-field {
  background: #fff;
  border: 1px solid #d1fae5;
  border-radius: 8px;
  padding: .5rem .9rem;
  font-size: .85rem;
  font-family: monospace;
  display: flex; justify-content: space-between; align-items: center;
  word-break: break-all;
}
.eq-payment-box .eq-copy-btn { cursor: pointer; color: var(--eq-primary); border: none; background: none; font-size: .8rem; white-space: nowrap; padding-left: .75rem; }

/* ---- FILE UPLOAD ZONE ---- */
.eq-upload-zone {
  border: 2px dashed var(--eq-border);
  border-radius: var(--eq-radius-sm);
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  position: relative;
}
.eq-upload-zone:hover, .eq-upload-zone.has-file { border-color: var(--eq-primary); background: #f5f3ff; }
.eq-upload-zone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.eq-upload-icon { font-size: 2rem; color: var(--eq-primary); margin-bottom: .5rem; }
.eq-upload-zone p { margin: 0; font-size: .85rem; color: var(--eq-muted); }
.eq-upload-preview { margin-top: .75rem; }
.eq-upload-preview img { max-height: 120px; border-radius: 8px; border: 2px solid var(--eq-primary); }

/* ---- BREADCRUMB ---- */
.eq-breadcrumb { font-size: .8rem; color: var(--eq-muted); margin-bottom: 1rem; }
.eq-breadcrumb a { color: var(--eq-muted); }
.eq-breadcrumb span { color: var(--eq-text); font-weight: 600; }

/* ---- KYC ALERT STRIP ---- */
.eq-kyc-strip {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 1.5px solid #fcd34d;
  border-radius: var(--eq-radius-sm);
  padding: .85rem 1.25rem;
  display: flex; align-items: center; gap: .75rem;
  font-size: .875rem; color: #78350f; font-weight: 500;
}

/* ---- MOBILE TABLE CARDS ---- */
@media (max-width: 575.98px) {
  .eq-mobile-cards .table, .eq-mobile-cards thead, .eq-mobile-cards tbody,
  .eq-mobile-cards th, .eq-mobile-cards td, .eq-mobile-cards tr { display: block; }
  .eq-mobile-cards thead { display: none; }
  .eq-mobile-cards tbody tr {
    background: #fff;
    border: 1px solid var(--eq-border);
    border-radius: 12px;
    margin-bottom: .75rem;
    padding: .75rem;
    box-shadow: var(--eq-shadow);
  }
  .eq-mobile-cards tbody td {
    padding: .3rem .5rem;
    border: none;
    font-size: .85rem;
    display: flex; justify-content: space-between; align-items: center;
  }
  .eq-mobile-cards tbody td::before {
    content: attr(data-label);
    font-weight: 700;
    font-size: .75rem;
    color: var(--eq-muted);
    text-transform: uppercase;
    letter-spacing: .3px;
    flex-shrink: 0;
    margin-right: .5rem;
  }
}

/* ---- UTILITIES ---- */
.eq-text-muted { color: var(--eq-muted) !important; }
.eq-text-dark  { color: var(--eq-dark)  !important; }
.eq-divider { border-color: var(--eq-border); margin: 1.25rem 0; }
.eq-empty { text-align: center; padding: 2.5rem 1rem; color: var(--eq-muted); }
.eq-empty i { font-size: 2.5rem; opacity: .3; display: block; margin-bottom: .75rem; }

/* ---- RESPONSIVE TWEAKS ---- */
@media (max-width: 767.98px) {
  .eq-page-header { padding: 1.5rem 0 3rem; }
  .eq-card-body { padding: 1.1rem; }
  .eq-stat-value { font-size: 1.6rem; }
  .eq-actions .btn { font-size: .8rem; padding: .45rem .85rem; }
}
@media (max-width: 480px) {
  .eq-auth-body { padding: 1.5rem; }
  .eq-auth-card-head { padding: 1.75rem 1.5rem 1.5rem; }
}