/* IB Wallets page (separate CSS, minimal + mostly Bootstrap) */

/* Tabs (reuse same visual as other IB pages) */
.ibd-tab-group{
  display:flex;
  gap:3px;
  flex-wrap:wrap;
}
.ibd-tab{
  border:1.5px solid rgba(255,255,255,0.25);
  background:#fff;
  color:#222;
  border-radius:0;
  padding:0.5rem 1.1rem;
  font-size:0.87rem;
  font-weight:500;
  transition:background 0.15s;
  white-space:nowrap;
}
.ibd-tab:first-child{ border-radius:10px 0 0 10px; }
.ibd-tab:last-child{ border-radius:0 10px 10px 0; }
.ibd-tab.active{
  background:#ffbf2f;
  border-color:#ffbf2f;
  color:#111;
  font-weight:700;
}
.ibd-tab:hover:not(.active){
  background:#f5f5f5;
  color:#111;
}

/* Create wallet button */
.ibw-create-btn{
  box-shadow:0 10px 22px rgba(0,0,0,0.18);
}

/* Stat cards */
.ibw-stat-card{
  border:none;
  border-radius:16px !important;
  padding:1.25rem !important;
  height:150px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
}
.ibw-stat-purple{ background:#f7efff; }
.ibw-stat-green{ background:#e0ffe7; }
.ibw-stat-orange{ background:#ffefda; }
.ibw-stat-blue{ background:#effafc; }
.ibw-stat-icon{
  width:40px;
  height:40px;
  border-radius:10px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:1.1rem;
  flex-shrink:0;
}
.ibw-icon-purple{ background:#e8d8ff; color:#7c3aed; }
.ibw-icon-green{ background:#bbf7cc; color:#16a34a; }
.ibw-icon-orange{ background:#ffd8a8; color:#d97706; }
.ibw-icon-blue{ background:#caf0f8; color:#0ea5e9; }
.ibw-stat-value{
  font-size:2rem;
  color:#111;
  line-height:1.2;
  font-weight:700;
}

/* Chart panel */
.ibw-chart-wrap{ height:260px; }
.ibw-dd-btn{
  border:1.5px solid rgba(219,233,255,0.28);
  background:rgba(255,255,255,0.08);
  color:rgba(255,255,255,0.9);
  border-radius:999px;
  padding:0.32rem 0.95rem;
  font-size:0.82rem;
}
.ibw-dd-btn:hover,
.ibw-dd-btn:focus{
  background:rgba(255,255,255,0.10);
  color:#fff;
  box-shadow:none;
}

.ibw-range-btn{
  padding:0.15rem 0.45rem;
  border-radius:8px;
  border:1px solid transparent;
  background:transparent;
  color:rgba(255,255,255,0.65);
  font-size:0.75rem;
  font-weight:700;
}
.ibw-range-btn.active{ background:#0A5BE2; color:#fff; }

/* Top performing wallet */
.ibw-chip{
  background:rgba(255,255,255,0.14);
  color:rgba(255,255,255,0.92);
  border:1px solid rgba(219,233,255,0.16);
}
.ibw-top-title{
  font-weight:600;
  font-size:1.55rem;
  color:rgba(255,255,255,0.96);
  letter-spacing:0.2px;
  margin-bottom:18px;
}
.ibw-top-id{
  font-weight:600;
  font-size:2.15rem;
  color:#fff;
  letter-spacing:1px;
  line-height:1.05;
}
.ibw-top-chip{
  font-size:1.05rem;
  font-weight:600;
  background:rgba(255,255,255,0.16);
}

.ibw-laurel{
  position:relative;
  width:210px;
  height:150px;
  flex:0 0 auto;
  margin-left:auto;
  opacity:0.95;
}
.ibw-laurel-img{
  width:100%;
  height:100%;
  display:block;
  object-fit:contain;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,0.25));
}
.ibw-laurel-num{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:800;
  font-size:4rem;
  color:#fff;
  letter-spacing:1px;
}
.ibw-top-btn{
  width:300px;
  max-width:100%;
  padding:0.9rem 1.25rem;
  border-radius:12px;
  margin-top:48px !important;
}
.ibw-primary-btn{
  background:#0A5BE2;
  border:none;
  color:#fff;
  border-radius:10px;
  padding:0.75rem 1rem;
}
.ibw-primary-btn:hover{ background:#094fca; color:#fff; }

/* Wallets section */
.ibw-wallets-wrap{
  background:#D1D1D1;
  border: 1px solid #535353;
  box-shadow:0 18px 40px rgba(0,0,0,0.25);
}
.ibw-wallets-head{
  background:#D1D1D1;
  border-bottom:1px solid rgba(0,0,0,0.06);
}
.ibw-wallets-inner{
  background:#07000E;
}

.ibw-filter-btn{
  background:rgba(0,0,0,0.78);
  border:1px solid rgba(255,255,255,0.18);
  color:#fff;
  border-radius:10px;
  padding:0.45rem 0.75rem;
  font-size:0.78rem;
  font-weight:700;
}
.ibw-filter-btn:hover{ background:rgba(0,0,0,0.86); color:#fff; }

.ibw-wallet-card{
  background:#282828;
  border:1px solid #535353;
  box-shadow:
    0 14px 30px rgba(0,0,0,0.35),
    inset 0 1px 0 rgba(255,255,255,0.08);
}
.ibw-wallet-card--inactive{
  background:#1f1f1f;
}
.ibw-wallet-card--transparent{
  background: transparent !important;
  box-shadow: none;
}
.ibw-wallet-id{
  font-size:1.05rem;
  letter-spacing:0.02em;
}
@media (min-width: 992px){
  .ibw-wallet-id{ font-size:1.12rem; }
}
.ibw-wallet-ic{
  width:32px;
  height:32px;
  border-radius:10px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:rgba(255,255,255,0.10);
  color:rgba(255,255,255,0.92);
}
.ibw-divider{
  width:1px;
  align-self:stretch;
  background:rgba(255,255,255,0.16);
}
.ibw-col{
  min-width:0;
}
.ibw-metric{
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-self:stretch;
}

/* Wallet row: 6 cols — actions column fixed width so kebab stays aligned on the right */
@media (min-width: 992px){
  .ibw-wallet-card{
    display:grid !important;
    grid-template-columns: minmax(220px, 26%) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) 52px;
    column-gap:0;
    align-items:stretch;
  }
  .ibw-wallet-left{
    padding-right: 0.85rem;
  }
  .ibw-col{
    padding: 0.35rem 0.95rem;
    align-self:stretch;
  }
  .ibw-col + .ibw-col{
    border-left: 1px solid rgba(255,255,255,0.22);
  }
  .ibw-wallet-card .ibw-metric.ibw-col{
    text-align: center;
    align-items: center;
  }
  .ibw-actions-col{
    display:flex;
    align-items:center;
    justify-content:center;
    padding-left:0.5rem;
    padding-right:0.5rem;
  }
}

/* Small screens: keep desktop design, add horizontal scroll */
@media (max-width: 991.98px){
  .ibw-chart-wrap{ height:240px; }
  .ibw-range{ flex-wrap: wrap; }

  .ibw-wallets-inner{
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-gutter: stable both-edges;
    -webkit-overflow-scrolling: touch;
  }
  .ibw-wallets-inner > .vstack{
    min-width: 980px;
  }

  /* Force the same 6-col grid design on small screens */
  .ibw-wallet-card{
    display:grid !important;
    grid-template-columns: minmax(220px, 26%) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) 52px;
    column-gap:0;
    align-items:stretch;
  }
  .ibw-wallet-left{ padding-right: 0.85rem; }
  .ibw-col{ padding: 0.35rem 0.95rem; align-self:stretch; }
  .ibw-col + .ibw-col{ border-left: 1px solid rgba(255,255,255,0.22); }
  .ibw-wallet-card .ibw-metric.ibw-col{ text-align: center; align-items: center; }
  .ibw-actions-col{
    display:flex;
    align-items:center;
    justify-content:center;
    padding-left:0.5rem;
    padding-right:0.5rem;
  }

  .ibw-actions-menu{ min-width: 200px; }
}

@media (max-width: 575.98px){
  /* Slightly smaller text inside the scrolled wallet rows */
  .ibw-wallet-id{ font-size: 0.98rem; }
  .ibw-wallet-card .small{ font-size: 0.74rem; }
  .ibw-wallet-card .fw-bold{ font-size: 0.92rem; }
  .ibw-link{ font-size: 0.74rem; }
  .ibw-icbtn{ width: 26px; height: 26px; }
}

/* Actions dropdown (kebab) */
.ibw-kebab.dropdown-toggle::after{
  display:none;
}
.ibw-actions-menu{
  min-width: 220px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 16px 34px rgba(0,0,0,0.35);
  padding: 0.35rem 0;
}
.ibw-actions-item{
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.55rem 1rem;
}
.ibw-link{ color:#DBE9FF; text-decoration:underline; }
.ibw-link:hover{ color:#fff; }
.ibw-icbtn{
  width:28px;
  height:28px;
  border-radius:6px;
  border:1px solid rgba(10,91,226,0.25);
  background:rgba(219,233,255,0.92);
  color:#0A5BE2;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0;
}

.ibw-badge-active{ background:#8BE59F; color:#1a7a3f; font-weight:800; }
.ibw-badge-inactive{ background:#ffd7d7; color:#b42318; font-weight:800; }

/* Assign referral offcanvas */
.ibw-assign-oc{
  width:min(680px, 94vw) !important;
  background:#2b2b2b;
  border-left:1px solid rgba(255,255,255,0.25);
  box-shadow:-22px 0 38px rgba(0,0,0,0.45);
  top: 18px;
  bottom: 24px;
  height: auto !important;
  border-radius: 0 !important;
  overflow-y: auto;
}
.ibw-assign-inner{
  position:relative;
  padding:22px 24px 26px;
}
.ibw-assign-close{
  position:absolute;
  left:-15px;
  top:26px;
  width:28px;
  height:28px;
  border-radius:999px;
  border:none;
  background:#eef2f7;
  color:#4b5563;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.ibw-assign-sub{
  color:rgba(255,255,255,0.75);
  border-top:1px solid rgba(255,255,255,0.18);
  padding-top:8px;
}
.ibw-info-box{
  background:#0d0d0d;
  border:1px solid rgba(219,233,255,0.42);
}
.ibw-sep{ border-color:rgba(255,255,255,0.2); }
.ibw-k{ font-size:0.72rem; }
.ibw-v{ font-size:1.05rem; font-weight:600; }

.ibw-alert{
  background:#FCEEDB;
  color:#fff;
  border-radius:6px;
  font-size:0.78rem;
  font-weight:600;
  padding:8px 10px;
}
.ibw-alert-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:18px;
  height:18px;
  border-radius:999px;
  background:#FCC120;
  color:#fff;
}

.ibw-search-wrap{ position:relative; }
.ibw-search-input{
  width:100%;
  height:46px;
  border:1px solid rgba(0,0,0,0.08);
  border-radius:12px;
  background:#fff;
  color:#111;
  padding:10px 40px 10px 14px;
  outline:none;
  font-size:1rem;
  font-weight:500;
}
.ibw-search-input::placeholder{ color:#9ba3b8; }
.ibw-search-icon{
  position:absolute;
  right:14px;
  top:50%;
  transform:translateY(-50%);
  color:#9ba3b8;
  font-size:1.15rem;
}

/* Referral item — dark (inactive) by default */
.ibw-ref-item{
  display:grid;
  grid-template-columns: 200px 1fr 30px;
  gap:16px;
  align-items:center;
  border:1.5px solid rgba(255,255,255,0.1);
  border-radius:16px;
  padding:14px 18px;
  background:#1a1830;
  cursor:pointer;
}
.ibw-ref-item-passive{
  background: transparent !important;
  border-color: rgba(219,233,255,0.55);
}
/* Active / selected item — light blue */
.ibw-ref-item-active{
  background:#c8d9f5;
  border-color:#4d8df0;
}

/* Text colors: default on dark bg */
.ibw-ref-id{ font-size:1.08rem; font-weight:700; color:rgba(255,255,255,0.92); line-height:1.05; letter-spacing:0.2px; }
.ibw-ref-sub{ font-size:0.88rem; color:rgba(255,255,255,0.45); line-height:1.05; margin-top:4px; }
.ibw-ref-url{ font-size:0.96rem; color:rgba(255,255,255,0.65); font-weight:500; }

/* Text colors: active item on light bg */
.ibw-ref-item-active .ibw-ref-id{ color:#111; }
.ibw-ref-item-active .ibw-ref-sub{ color:#59617a; }
.ibw-ref-item-active .ibw-ref-url{ color:#2a3a5a; }

/* Checkbox */
.ibw-ref-check{
  width:30px;
  height:30px;
  border:2px solid rgba(255,255,255,0.25);
  border-radius:6px;
  background:transparent;
  flex-shrink:0;
}
.ibw-ref-item-active .ibw-ref-check{
  border-color:#c3cce1;
}
.ibw-ref-check.checked{
  background:#0a5be2;
  border-color:#0a5be2;
  color:#fff;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:0.82rem;
}

.ibw-assign-btn{
  background:#0a5be2;
  border:none;
  color:#fff;
  border-radius:12px;
  padding:14px 16px;
  font-weight:700;
  font-size:1.15rem;
}
.ibw-assign-btn:hover{ background:#094fca; color:#fff; }

/* Edit wallet panel */
.ibw-edit-oc .ibw-alert{
  font-size:0.76rem;
  color:#3a3a3a;
}
.ibw-edit-oc{
  top: 22px;
  bottom: auto;
  height: auto !important;
}
.ibw-edit-oc .ibw-assign-inner{
  padding-bottom: 170px;
}
.ibw-f-label{
  display:block;
  color:#fff;
  font-size:0.92rem;
  font-weight:500;
  margin-bottom:6px;
}
.ibw-f-input,
.ibw-f-select{
  width:100%;
  height:38px;
  border:1px solid rgba(219,233,255,0.38);
  border-radius:8px;
  background:rgba(158,158,184,0.45);
  color:#fff;
  padding:8px 12px;
  outline:none;
  font-size:0.92rem;
}
.ibw-f-select{
  background:#2b2b2b;
}
.ibw-f-help{
  color:rgba(255,255,255,0.65);
  font-size:0.73rem;
  margin-top:6px;
}

.ibw-status-box{
  border:1px solid rgba(122,149,209,0.55);
  border-radius:10px;
  padding:12px 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.ibw-status-title{
  color:#fff;
  font-size:0.9rem;
  font-weight:600;
}
.ibw-status-sub{
  color:rgba(255,255,255,0.62);
  font-size:0.75rem;
  max-width:280px;
  line-height:1.3;
}
.ibw-status-pill{
  background:#8be59f;
  color:#0d3416;
  border-radius:999px;
  font-size:0.74rem;
  font-weight:700;
  min-width:66px;
  text-align:center;
  padding:4px 10px;
}
.ibw-status-switch{
  width:36px;
  height:20px;
  background-color:#2e3b4e;
  border-color:#2e3b4e;
  cursor:pointer;
}
.ibw-status-switch:checked{
  background-color:#8be59f;
  border-color:#8be59f;
}
.ibw-status-switch:focus{
  box-shadow:none;
}

.ibw-btn-cancel{
  border:1px solid rgba(219,233,255,0.48);
  border-radius:10px;
  background:transparent;
  color:#fff;
  font-weight:600;
  height:46px;
}
.ibw-btn-cancel:hover{
  color:#fff;
  background:rgba(255,255,255,0.06);
}
.ibw-btn-save{
  border:none;
  border-radius:10px;
  background:#0a5be2;
  color:#fff;
  font-weight:700;
  height:46px;
}
.ibw-btn-save:hover{ background:#094fca; color:#fff; }

/* Delete wallet modal */
.ibw-delete-modal .modal-dialog{
  max-width: 640px;
  margin-top: 0.75rem;
  margin-bottom: auto;
}
.ibw-delete-modal .modal-dialog-centered{
  min-height: calc(100% - 1rem);
  display: flex;
  align-items: flex-start;
  padding-top: 6.6rem;
}
.ibw-delete-content{
  border: none;
  border-radius: 26px;
  overflow: hidden;
  background:#fff;
}
.ibw-delete-head{
  position: relative;
  padding: 22px 26px 18px;
  border-bottom:1px solid #d9dfe8;
}
.ibw-delete-head h5{
  text-align:center;
  color:#ea1d2c;
  font-weight:700;
  font-size:1.8rem;
}
.ibw-delete-close{
  position:absolute;
  right:20px;
  top:18px;
  width:34px;
  height:34px;
  border:none;
  border-radius:10px;
  background:#e6e6e6;
  color:#5f5f5f;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

.ibw-delete-body{
  padding: 24px 34px 30px;
}
.ibw-delete-title{
  font-size:1.55rem;
  color:#121212;
  font-weight:700;
}
.ibw-delete-sub{
  font-size:1.1rem;
  color:#6b7290;
  line-height:1.25;
}
.ibw-delete-list{
  margin:0;
  padding-left: 22px;
  color:#141414;
  font-size:1.05rem;
  font-weight:500;
}
.ibw-delete-list li{
  margin: 8px 0;
}
.ibw-delete-list li::marker{
  color:#0a5be2;
}
.ibw-delete-warning{
  display:inline-flex;
  align-items:center;
  gap:2px;
  border:2px solid #ea1d2c;
  border-radius:14px;
  color:#ea1d2c;
  font-size:1.02rem;
  font-weight:600;
  padding:10px 16px;
}

.ibw-delete-cancel{
  height:50px;
  border:2px solid #d5d7de;
  border-radius:14px;
  background:#fff;
  color:#6c7495;
  font-weight:700;
  font-size:1.05rem;
}
.ibw-delete-confirm{
  height:50px;
  border:none;
  border-radius:14px;
  background:#ea1d2c;
  color:#fff;
  font-weight:700;
  font-size:1.05rem;
}
.ibw-delete-confirm:hover{ background:#d91826; color:#fff; }

@media (max-width: 575.98px){
  .ibw-stat-card{ height:135px; padding:1rem !important; }
  .ibw-stat-value{ font-size:1.6rem; }
  .ibw-chart-wrap{ height:220px; }
  .ibw-top-title{ font-size:1.35rem; margin-bottom:14px; }
  .ibw-top-id{ font-size:1.75rem; }
  .ibw-laurel{ width:165px; height:120px; }
  .ibw-laurel-num{ font-size:3.2rem; }
  .ibw-top-btn{ width:240px; margin-top:34px !important; }
  .ibw-ref-item{ grid-template-columns: 1fr; }
  .ibw-assign-close{ left:10px; top:10px; }
  .ibw-status-box{ flex-direction:column; align-items:flex-start; }
  .ibw-delete-head h5{ font-size:1.45rem; }
  .ibw-delete-title{ font-size:1.2rem; }
  .ibw-delete-sub,
  .ibw-delete-list,
  .ibw-delete-warning{ font-size:0.95rem; }
  .ibw-delete-cancel,
  .ibw-delete-confirm{ font-size:1rem; height:44px; }

  /* Assign Referral offcanvas: full height + scroll on mobile */
  .ibw-assign-oc{
    width: 100vw !important;
    max-width: 100vw !important;
    top: 0;
    bottom: 0;
    height: 100vh !important;
  }
  .ibw-assign-inner{
    padding: 16px 16px 22px;
  }
}

