.rl-subtitle {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.84rem;
}

.rl-create-btn {
  background: #fff;
  color: #141414;
  border-radius: 10px;
  border: 0;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 10px 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.rl-stats-wrap {
  background: #f2f2f2;
  border-radius: 16px;
  padding: 16px;
}
.rl-stats-wrap .row{
  align-items: stretch;
}

.rl-stat-card {
  border-radius: 14px;
  padding: 14px;
  height: 120px;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.rl-stat-purple { background: #ddd7e8; }
.rl-stat-green  { background: #c9e8d1; }
.rl-stat-orange { background: #eadfc9; }
.rl-stat-blue   { background: #d6e1e6; }

.rl-stat-label {
  color: #292929;
  font-size: 0.82rem;
  font-weight: 500;
}
.rl-stat-value {
  color: #20242a;
  font-size: 2.1rem;
  font-weight: 700;
  line-height: 1;
}
.rl-stat-note {
  color: rgba(32, 36, 42, 0.78);
  font-size: 0.72rem;
  margin-top: 4px;
  min-height: 16px;
}
.rl-stat-icon {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.74rem;
}
.rl-stat-icon-purple { background: #ceb5ff; color: #6f2be8; }
.rl-stat-icon-green  { background: #8cd7a6; color: #107a36; }
.rl-stat-icon-orange { background: #ffc57c; color: #bb6e09; }
.rl-stat-icon-blue   { background: #c5d8e3; color: #496477; }

.rl-table-card {
  background: transparent;
  border: 1px solid rgba(219, 233, 255, 0.48);
  border-radius: 14px;
  overflow: hidden;
}
.rl-table-head {
  background: #d1d1d1;
  color: #111;
  font-size: 1.7rem;
  font-weight: 700;
  padding: 10px 16px;
}

.rl-table-filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  flex-wrap: wrap;
}
.rl-filter-wrap {
  position: relative;
}
.rl-filter-wrap i {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.75rem;
}
.rl-filter-input,
.rl-filter-btn {
  height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(219, 233, 255, 0.55);
  background: #0e0e14;
  color: #fff;
  font-size: 0.77rem;
}
.rl-filter-input {
  width: 184px;
  padding: 0 30px 0 10px;
}
.rl-filter-btn {
  min-width: 120px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.rl-download-btn {
  background: #fff;
  color: #141414;
  border: 0;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.rl-table {
  width: calc(100% - 28px);
  margin: 0 14px 14px;
  border-collapse: separate;
  border-spacing: 0;
}
.rl-table thead th {
  background: #2e2e2e;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.68rem;
  font-weight: 500;
  padding: 9px 10px;
  white-space: nowrap;
  border-bottom: 1px dashed rgba(219, 233, 255, 0.18);
}
.rl-table thead th:first-child { border-radius: 999px 0 0 999px; }
.rl-table thead th:last-child { border-radius: 0 999px 999px 0; text-align: center; }

.rl-table tbody td {
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.75rem;
  padding: 12px 10px;
  border-bottom: 1px dashed rgba(219, 233, 255, 0.2);
  white-space: nowrap;
  vertical-align: middle;
}
.rl-mini-link {
  font-size: 0.62rem;
  color: rgba(196, 214, 255, 0.72);
  text-decoration: underline;
  margin-top: 2px;
}

.rl-badge {
  min-width: 50px;
  display: inline-flex;
  justify-content: center;
  border-radius: 4px;
  font-size: 0.64rem;
  font-weight: 700;
  padding: 3px 8px;
}
.rl-badge-active { background: #93e2a1; color: #105e2b; }
.rl-badge-inactive { background: #dbe9ff; color: #0a5be2; }

.rl-actions-btn{
  color: rgba(255,255,255,0.92);
  text-decoration: none;
}
.rl-actions-btn:hover{ color:#fff; }
.rl-actions-btn.dropdown-toggle::after{ display:none; }
.rl-actions-menu{
  min-width: 140px;
  border: 2px solid rgba(165, 194, 255, 0.75);
  border-radius: 10px;
  box-shadow: 0 14px 30px rgba(0,0,0,0.28);
  padding: 6px 0;
}
.rl-actions-item{
  font-weight: 700;
  font-size: 0.96rem;
  padding: 8px 16px;
}
.rl-actions-item:active{ background:#eef2ff; color:#111; }

/* Delete Referral Link modal (match ib-wallets Delete Wallet) */
.rl-delete-modal .modal-dialog{
  max-width: 500px;
  margin-top: 0.75rem;
  margin-bottom: auto;
}
.rl-delete-modal .modal-dialog-centered{
  min-height: calc(100% - 1rem);
  display: flex;
  align-items: flex-start;
  padding-top: 6.6rem;
}
.rl-delete-content{
  border: none;
  border-radius: 26px;
  overflow: hidden;
  background:#fff;
}
.rl-delete-head{
  position: relative;
  padding: 22px 26px 18px;
  border-bottom:1px solid #d9dfe8;
}
.rl-delete-head h5{
  text-align:center;
  color:#ea1d2c;
  font-weight:700;
  font-size:1.8rem;
}
.rl-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;
}
.rl-delete-body{
  padding: 24px 34px 30px;
  text-align: center;
}
.rl-delete-warning{
  justify-content: center;
}
.rl-delete-title{
  font-size:1.55rem;
  color:#121212;
  font-weight:700;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}
.rl-delete-sub{
  font-size:1.1rem;
  color:#6b7290;
  line-height:1.25;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}
.rl-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;
  margin-left: auto;
  margin-right: auto;
}
.rl-delete-cancel{
  height:50px;
  border:2px solid #d5d7de;
  border-radius:14px;
  background:#fff;
  color:#6c7495;
  font-weight:700;
  font-size:1.05rem;
}
.rl-delete-confirm{
  height:50px;
  border:none;
  border-radius:14px;
  background:#ea1d2c;
  color:#fff;
  font-weight:700;
  font-size:1.05rem;
}
.rl-delete-confirm:hover{ background:#d91826; color:#fff; }

@media (max-width: 575.98px){
  .rl-delete-head h5{ font-size:1.45rem; }
  .rl-delete-title{ font-size:1.2rem; }
  .rl-delete-sub,
  .rl-delete-warning{ font-size:0.95rem; }
  .rl-delete-cancel,
  .rl-delete-confirm{ font-size:1rem; height:44px; }
}

.rl-analytics {
  border: 1px solid rgba(219, 233, 255, 0.36);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(96, 79, 140, 0.72), rgba(20, 16, 34, 0.78));
  padding: 14px 18px 16px;
}
.rl-best-wrap {
  padding-right: 18px;
  border-right: 1px solid rgba(219, 233, 255, 0.22);
}
.rl-best-title {
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 12px;
}
.rl-rank-badge{
  position: relative;
  width: 70px;
  height: 70px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
}
.rl-rank-icon {
  width: 70px;
  height: 70px;
  object-fit: contain;
  filter: drop-shadow(0 10px 16px rgba(0,0,0,0.25));
  opacity: 0.95;
}
.rl-rank-num{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  font-weight:800;
  font-size:1.1rem;
  letter-spacing:0.5px;
}
.rl-best-wrap h4 {
  color: #fff;
  font-size: 1.7rem;
  margin-bottom: 2px;
}
.rl-chip {
  background: rgba(98, 103, 110, 0.8);
  color: #fff;
  font-size: 0.7rem;
  border-radius: 999px;
  padding: 4px 12px;
  display: inline-block;
}
.rl-best-link {
  margin-top: 12px;
  color: rgba(215, 228, 255, 0.92);
  font-size: 0.84rem;
  text-decoration: underline;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rl-best-link-row{
  margin-top: 12px;
  display:flex;
  align-items:center;
  gap: 10px;
}
.rl-best-link-row .rl-best-link{
  margin-top: 0;
  flex: 1 1 auto;
  min-width: 0;
}
.rl-square-icon {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: #dbe9ff;
  color: #0a5be2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
}
.rl-date {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.78rem;
  margin-top: 14px;
}

.rl-legend {
  background: rgba(114, 114, 122, 0.58);
  border-radius: 10px;
  padding: 3px 10px;
  color: #fff;
  font-size: 0.66rem;
  font-weight: 600;
}
.rl-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 5px;
}
.rl-dot-blue { background: #1175ff; }
.rl-dot-green { background: #35e56c; }

.rl-chart-grid{
  display:grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: stretch;
}
.rl-yaxis{
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  padding-bottom: 18px; /* align with day labels */
}
.rl-y{
  color: rgba(255,255,255,0.40);
  font-size: 0.66rem;
  line-height: 1;
  text-align: right;
}
.rl-bars {
  min-height: 156px;
  display: grid;
  grid-template-columns: repeat(7, minmax(34px, 1fr));
  align-items: end;
  gap: 12px;
  position: relative;
  padding: 6px 0 0;
  background-image: linear-gradient(to bottom,
    rgba(255,255,255,0.10) 1px, transparent 1px);
  background-size: 100% 25%;
  background-position: 0 6px;
}
.rl-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.rl-columns {
  height: 126px;
  display: flex;
  align-items: end;
  gap: 5px;
}
.rl-bar {
  width: 6px;
  border-radius: 99px;
}
.rl-bar-blue { background: #1175ff; }
.rl-bar-green { background: #35e56c; }
.rl-day-label {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.74rem;
}

@media (max-width: 1199px) {
  .rl-best-wrap h4 { font-size: 1.65rem; }
}
@media (max-width: 991px) {
  .rl-best-wrap { border-right: 0; padding-right: 0; }
  .rl-analytics{ padding: 14px 14px 16px; }
  .rl-best-wrap{
    border-bottom: 1px solid rgba(219, 233, 255, 0.22);
    padding-bottom: 14px;
    margin-bottom: 14px;
  }
  .rl-chart-grid{ grid-template-columns: 30px 1fr; }
}
@media (max-width: 767px){
  .rl-stats-wrap{ padding: 12px; }
  .rl-stat-card{
    height: 112px;
    min-height: 112px;
    padding: 12px;
  }
  .rl-stat-value{ font-size: 1.85rem; }

  .rl-table-head{ font-size: 1.45rem; }
  .rl-table-filters{ padding: 12px 12px; }
  .rl-filter-input{ width: 100%; }
  .rl-filter-btn{ width: 100%; }
  .rl-download-btn{ width: 100%; justify-content: center; }

  .rl-analytics{ padding: 12px 12px 14px; }
  .rl-best-wrap h4{ font-size: 1.45rem; }
  .rl-rank-badge{ width: 62px; height: 62px; }
  .rl-rank-icon{ width: 62px; height: 62px; }
  .rl-bars{
    grid-template-columns: repeat(7, minmax(26px, 1fr));
    gap: 10px;
  }
  .rl-columns{ height: 110px; }
}
@media (max-width: 575px) {
  .rl-table-head { font-size: 1.35rem; }
  .rl-filter-input { width: 100%; }
  .rl-table-filters { align-items: stretch; }
  .rl-download-btn { width: 100%; justify-content: center; }

  .rl-table{
    width: auto;
    margin: 0 10px 12px;
  }
  .rl-table thead th,
  .rl-table tbody td{ padding-left: 8px; padding-right: 8px; }

  .rl-chart-grid{ grid-template-columns: 26px 1fr; gap: 8px; }
  .rl-y{ font-size: 0.62rem; }
}
