/* =========================================================
   RAprime — Client Portal stylesheet
   Used by: client-portal.html, client-portal-demo.html,
            open-live-account.html
   ========================================================= */

/* ============== SHELL ============== */
.cp-shell{
  background: linear-gradient(180deg, #eef1f8 0%, #f6f7fb 100%);
  min-height: 70vh;
  padding: 24px 0 60px;
  position: relative;
}
.cp-shell::before{
  content:""; position: absolute; inset: 0;
  background:
    radial-gradient(720px 460px at 8% -10%, rgba(14,55,137,.06), transparent 60%),
    radial-gradient(620px 420px at 110% 100%, rgba(26,188,136,.05), transparent 60%);
  pointer-events: none;
}
.cp-wrap{
  position: relative;
  max-width: 1320px; margin: 0 auto;
  padding: 0 18px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 22px;
  align-items: flex-start;
  transition: grid-template-columns .35s var(--ease);
}
.cp-wrap.collapsed{ grid-template-columns: 0 1fr; }
@media (max-width: 980px){ .cp-wrap{ grid-template-columns: 1fr; } }

/* ============== SIDEBAR ============== */
.cp-side{
  background: linear-gradient(180deg, #030641 0%, #0a1238 100%);
  color: #fff;
  border-radius: 18px;
  padding: 16px;
  position: sticky;
  top: 20px;
  height: calc(100vh - 40px);
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: 0 24px 60px rgba(3,6,65,.18);
  border: 1px solid rgba(255,255,255,.06);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.18) transparent;
  transition: opacity .25s var(--ease), transform .35s var(--ease);
}
.cp-wrap.collapsed .cp-side{
  opacity: 0;
  transform: translateX(-12px);
  pointer-events: none;
}
.cp-side::-webkit-scrollbar{ width: 6px; }
.cp-side::-webkit-scrollbar-thumb{ background: rgba(255,255,255,.15); border-radius: 4px; }
@media (max-width: 980px){
  .cp-side{
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 280px; height: 100vh;
    border-radius: 0; z-index: 90;
    transform: translateX(-110%);
    transition: transform .35s var(--ease);
  }
  .cp-shell.mobile-open .cp-side{ transform: translateX(0); }
  .cp-wrap.collapsed .cp-side{ opacity: 1; transform: translateX(-110%); }
}

/* Verification badge */
.cp-verif{
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: linear-gradient(135deg, #1abc88 0%, #0d8a5f 100%);
  color: #fff;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13.5px; font-weight: 800; letter-spacing: .3px;
  box-shadow: 0 8px 22px rgba(26,188,136,.30);
  position: relative;
  overflow: hidden;
}
.cp-verif::before{
  content:""; position: absolute; inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(255,255,255,.22), transparent 60%);
}
.cp-verif i{ font-size: 14px; }

/* Orange variant — for clients who haven't completed KYC */
.cp-verif.unverified{
  background: linear-gradient(135deg, #f5b73c 0%, #d4901c 100%);
  color: #fff;
  box-shadow: 0 8px 22px rgba(245,183,60,.30);
}

/* ============================================================
   VERIFY PHONE — OTP entry with countdown
   ============================================================ */
.vp-card{ max-width: 560px; margin: 0 auto; }
.vp-body{ padding: 28px 30px; }
.vp-msg{
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  background: rgba(14,55,137,.06);
  border: 1px solid rgba(14,55,137,.14);
  border-left: 3px solid var(--brand-2);
  border-radius: 10px;
  font-size: 13.5px; font-weight: 600;
  color: var(--text-2);
  margin-bottom: 22px;
}
.vp-msg i{ color: var(--brand-2); font-size: 14px; }

.vp-label{
  display:block;
  font-size: 13px; font-weight: 800;
  color: var(--text);
  margin-bottom: 10px;
  letter-spacing: .2px;
}
.vp-label .req{ color: #ef4760; }
.vp-label .desc{
  display: block;
  font-size: 11.5px; font-weight: 600;
  color: var(--text-mute);
  margin-top: 4px;
  letter-spacing: 0;
}

/* Large OTP input */
.vp-otp .field-wrap{
  padding: 4px;
  background: #fff;
  border-width: 2px;
}
.vp-otp .field-wrap i.field-icon{
  display: none;
}
.vp-otp input{
  font-size: 24px;
  letter-spacing: 14px;
  text-align: center;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  padding: 16px 8px 16px 22px; /* extra left padding to balance the wide letter-spacing */
  color: var(--brand-1);
}
.vp-otp input::placeholder{
  letter-spacing: 6px;
  color: var(--text-soft);
  font-weight: 500;
}

/* Actions row */
.vp-actions{
  display: flex; align-items: center; gap: 10px;
  padding: 18px 26px;
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  border-radius: 0 0 18px 18px;
  flex-wrap: wrap;
}
.vp-actions .spacer{ flex: 1; }

/* Countdown pill (visible while remaining > 0) */
.vp-timer{
  display: inline-flex; align-items: center; gap: 7px;
  padding: 11px 16px;
  background: linear-gradient(135deg, #030641, #0e3789);
  color: #fff;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px; font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
  box-shadow: 0 8px 18px rgba(3,6,65,.30);
  white-space: nowrap;
}
.vp-timer i{ font-size: 12px; opacity: .85; }

/* Resend button (visible only when timer hits 0) */
.vp-resend{
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px;
  background: linear-gradient(135deg, #1abc88, #0d8a5f);
  color: #fff;
  border: 0; border-radius: 10px;
  font-family: inherit;
  font-size: 13.5px; font-weight: 700;
  cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
  box-shadow: 0 8px 18px rgba(26,188,136,.30);
}
.vp-resend:hover{ transform: translateY(-1px); box-shadow: 0 12px 24px rgba(26,188,136,.40); }
.vp-resend.hidden,
.vp-timer.hidden{ display: none; }

/* Logout button (red ghost) */
.vp-logout{
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px;
  background: #fff;
  color: #c2185b;
  border: 1px solid rgba(239,71,96,.30);
  border-radius: 10px;
  font-family: inherit;
  font-size: 13.5px; font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: all .2s var(--ease);
}
.vp-logout:hover{
  background: linear-gradient(135deg, #ef4760, #c2185b);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 18px rgba(239,71,96,.30);
}

/* Open account CTA */
.cp-open-cta{
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 10px;
  padding: 11px 14px;
  background: rgba(255,255,255,.06);
  color: #fff;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 12px;
  font-size: 13px; font-weight: 700;
  text-decoration: none;
  transition: background .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.cp-open-cta:hover{
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.28);
  transform: translateY(-1px);
}

.cp-divider{
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.10), transparent);
  margin: 16px 0;
}

/* Sidebar nav */
.cp-nav{ display: flex; flex-direction: column; gap: 2px; }
.cp-group{ border-radius: 10px; overflow: hidden; }
.cp-group-head{
  width: 100%;
  display: flex; align-items: center; gap: 10px;
  background: transparent;
  border: 0; cursor: pointer;
  color: rgba(255,255,255,.92);
  font-family: inherit;
  font-size: 13px; font-weight: 700;
  letter-spacing: .2px;
  padding: 11px 12px;
  border-radius: 10px;
  text-align: left;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.cp-group-head:hover{ background: rgba(255,255,255,.06); }
.cp-group-head .gi{
  width: 26px; height: 26px;
  display: grid; place-items: center;
  background: rgba(255,255,255,.06);
  border-radius: 8px;
  font-size: 12px;
  color: #cfe1ff;
  flex-shrink: 0;
  transition: background .25s var(--ease);
}
.cp-group.open > .cp-group-head .gi,
.cp-group-head:hover .gi{
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  color: #fff;
}
.cp-group-head .label{ flex: 1; }
.cp-group-head .chev{
  font-size: 10px;
  opacity: .55;
  transition: transform .25s var(--ease);
}
.cp-group.open > .cp-group-head .chev{ transform: rotate(180deg); opacity: 1; }

.cp-sub{
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s var(--ease);
}
.cp-group.open .cp-sub{ max-height: 400px; }
.cp-sub-inner{
  display: flex; flex-direction: column;
  gap: 1px;
  padding: 4px 0 8px 36px;
  position: relative;
}
.cp-sub-inner::before{
  content:""; position: absolute;
  left: 18px; top: 6px; bottom: 14px;
  width: 1px; background: rgba(255,255,255,.10);
}
.cp-sublink{
  position: relative;
  display: flex; align-items: center;
  gap: 8px;
  padding: 7px 10px 7px 14px;
  font-size: 12.5px; font-weight: 500;
  color: rgba(255,255,255,.70);
  text-decoration: none;
  border-radius: 8px;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.cp-sublink::before{
  content:""; position: absolute;
  left: -18px; top: 50%; transform: translateY(-50%);
  width: 12px; height: 1px;
  background: rgba(255,255,255,.18);
}
.cp-sublink:hover{ color: #fff; background: rgba(255,255,255,.05); }
.cp-sublink.active{
  color: #fff;
  background: linear-gradient(90deg, rgba(108,242,191,.15), rgba(108,242,191,.04));
  font-weight: 700;
}
.cp-sublink.active::after{
  content:""; position: absolute;
  left: -2px; top: 6px; bottom: 6px;
  width: 3px; border-radius: 3px;
  background: linear-gradient(180deg, #6cf2bf, #1abc88);
}

/* ============== CONTENT AREA ============== */
.cp-main{ min-width: 0; }

.cp-topbar{
  display: flex; align-items: center; gap: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 16px;
  box-shadow: 0 6px 20px rgba(10,20,40,.05);
  margin-bottom: 18px;
}
.cp-toggle{
  width: 38px; height: 38px;
  display: grid; place-items: center;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-size: 15px;
  cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.cp-toggle:hover{
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  color: #fff;
  border-color: transparent;
}
.cp-page-meta{ flex: 1; min-width: 0; }
.cp-page-title{
  font-size: 16px; font-weight: 800;
  color: var(--text);
  line-height: 1.1;
  margin: 0;
}
.cp-crumb{
  font-size: 11.5px; color: var(--text-mute);
  margin-top: 3px;
}
.cp-crumb a{ color: var(--text-mute); text-decoration: none; }
.cp-crumb a:hover{ color: var(--brand-2); }
.cp-search{
  position: relative;
  width: 240px;
  max-width: 38vw;
}
.cp-search input{
  width: 100%;
  height: 38px;
  padding: 0 12px 0 36px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
}
.cp-search input:focus{ outline: none; border-color: var(--brand-2); background: #fff; }
.cp-search i{
  position: absolute;
  left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text-soft); font-size: 13px;
}
@media (max-width: 720px){
  .cp-search{ display: none; }
}

/* Page-section header */
.cp-section-head{
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 14px; margin-bottom: 16px;
  flex-wrap: wrap;
}
.cp-section-title{
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 800;
  color: var(--text);
  margin: 0;
  letter-spacing: -.3px;
}
.cp-section-title .grad{
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.cp-section-sub{
  font-size: 13.5px;
  color: var(--text-mute);
  margin: 4px 0 0;
}

/* Quick stats */
.cp-stats{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}
@media (max-width: 980px){ .cp-stats{ grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px){ .cp-stats{ grid-template-columns: 1fr 1fr; } }

.cp-stat{
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  overflow: hidden;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.cp-stat:hover{ transform: translateY(-2px); box-shadow: 0 14px 30px rgba(10,20,40,.07); }
.cp-stat::before{
  content:""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(180deg, var(--brand-1), var(--brand-2));
}
.cp-stat.green::before{ background: linear-gradient(180deg, #1abc88, #0d8a5f); }
.cp-stat.gold::before{  background: linear-gradient(180deg, #f5b73c, #d4901c); }
.cp-stat.red::before{   background: linear-gradient(180deg, #ef4760, #c2185b); }

.cp-stat .lbl{
  display: flex; align-items: center; gap: 8px;
  font-size: 11.5px; font-weight: 800;
  color: var(--text-soft);
  letter-spacing: .5px; text-transform: uppercase;
}
.cp-stat .lbl i{ font-size: 12px; color: var(--brand-2); }
.cp-stat.green .lbl i{ color: #1abc88; }
.cp-stat.gold .lbl i{ color: #d4901c; }
.cp-stat.red .lbl i{ color: #ef4760; }
.cp-stat .val{
  font-size: 22px; font-weight: 800;
  color: var(--text);
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.3px;
  line-height: 1.1;
}
.cp-stat .delta{
  font-size: 11.5px; font-weight: 700;
  color: var(--text-mute);
  margin-top: 4px;
}
.cp-stat .delta.up{ color: #0d8a5f; }
.cp-stat .delta.down{ color: #c2185b; }

/* Cards grid */
.cp-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 18px;
}
@media (max-width: 480px){
  .cp-grid{ grid-template-columns: 1fr; }
}

/* ============== ACCOUNT CARD ============== */
.acct{
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  /* overflow intentionally NOT hidden so the card menu can pop out */
  box-shadow: 0 8px 26px rgba(10,20,40,.06);
  display: flex; flex-direction: column;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
  position: relative;
  isolation: isolate;
}
.acct:hover{
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(14,55,137,.14);
}

.acct-head{
  position: relative;
  padding: 16px 18px;
  background: linear-gradient(135deg, #030641 0%, #0e3789 50%, #2950bd 100%);
  color: #fff;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  overflow: hidden;
  border-radius: 18px 18px 0 0;
}
.acct-head::before{
  content:""; position: absolute; inset: 0;
  background: radial-gradient(circle at 85% -10%, rgba(108,242,191,.18), transparent 55%),
              radial-gradient(circle at 0% 100%, rgba(74,144,255,.16), transparent 50%);
  pointer-events: none;
}
.acct-head::after{
  content:"";
  position: absolute;
  right: -50px; top: -50px;
  width: 160px; height: 160px;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 18px 18px;
  mask-image: radial-gradient(circle, #000 30%, transparent 70%);
  pointer-events: none;
}
.acct-head .label{
  position: relative;
  font-size: 12px; font-weight: 700;
  letter-spacing: .5px; text-transform: uppercase;
  color: rgba(255,255,255,.65);
}
.acct-head .num{
  position: relative;
  font-size: 22px; font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.2px;
  margin-top: 2px;
  color: #fff;
}
.acct-head .menu{
  position: relative;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 9px;
  color: #fff;
  cursor: pointer;
  transition: background .2s var(--ease);
}
.acct-head .menu:hover{ background: rgba(255,255,255,.18); }
.acct-head .menu.open{
  background: rgba(255,255,255,.22);
  border-color: rgba(255,255,255,.35);
}

/* Card-menu dropdown — sibling of .acct-head, anchored to .acct */
.acct-menu{
  position: absolute;
  top: 62px;
  right: 14px;
  min-width: 220px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 24px 50px rgba(3,6,65,.18), 0 4px 12px rgba(10,20,40,.08);
  padding: 6px;
  z-index: 30;
  opacity: 0;
  transform: translateY(-6px) scale(.96);
  transform-origin: top right;
  pointer-events: none;
  transition: opacity .18s var(--ease), transform .18s var(--ease);
}
.acct-menu.open{
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.acct-menu::before{
  content:"";
  position: absolute;
  top: -6px; right: 14px;
  width: 12px; height: 12px;
  background: #fff;
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
  transform: rotate(45deg);
}
.acct-menu .mi{
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 9px 12px;
  background: transparent;
  border: 0;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px; font-weight: 600;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s var(--ease), color .15s var(--ease);
}
.acct-menu .mi:hover{
  background: linear-gradient(90deg, rgba(14,55,137,.08), rgba(14,55,137,.02));
  color: var(--brand-2);
}
.acct-menu .mi i{
  width: 16px;
  font-size: 12px;
  color: var(--text-soft);
  text-align: center;
}
.acct-menu .mi:hover i{ color: var(--brand-2); }
.acct-menu .sep{
  height: 1px;
  background: var(--line);
  margin: 4px 6px;
}

/* Status pill */
.acct-status{
  position: absolute; top: 12px; right: 56px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  background: rgba(26,188,136,.18);
  border: 1px solid rgba(108,242,191,.30);
  color: #6cf2bf;
  font-size: 10.5px; font-weight: 800;
  letter-spacing: .5px; text-transform: uppercase;
  border-radius: 999px;
  backdrop-filter: blur(8px);
}
.acct-status .dot{
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #6cf2bf;
  box-shadow: 0 0 0 0 rgba(108,242,191,.60);
  animation: acctPulse 1.8s ease-out infinite;
}
@keyframes acctPulse{
  0%{ box-shadow: 0 0 0 0 rgba(108,242,191,.55); }
  70%{ box-shadow: 0 0 0 7px rgba(108,242,191,0); }
  100%{ box-shadow: 0 0 0 0 rgba(108,242,191,0); }
}

/* Demo variant — amber pill */
.acct-status.demo{
  background: rgba(245,183,60,.22);
  border-color: rgba(245,183,60,.40);
  color: #ffd98a;
}
.acct-status.demo .dot{
  background: #ffd98a;
  box-shadow: 0 0 0 0 rgba(245,183,60,.60);
  animation: acctPulseGold 1.8s ease-out infinite;
}
@keyframes acctPulseGold{
  0%{ box-shadow: 0 0 0 0 rgba(245,183,60,.55); }
  70%{ box-shadow: 0 0 0 7px rgba(245,183,60,0); }
  100%{ box-shadow: 0 0 0 0 rgba(245,183,60,0); }
}

/* Body */
.acct-body{ padding: 14px 18px 8px; }
.acct-row{
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
}
.acct-row:last-child{ border-bottom: 0; }
.acct-row .k{
  font-size: 11.5px; font-weight: 800;
  color: var(--text-soft);
  letter-spacing: .4px; text-transform: uppercase;
}
.acct-row .v{
  font-size: 13.5px; font-weight: 700;
  color: var(--text);
  display: flex; align-items: center; gap: 8px;
  font-variant-numeric: tabular-nums;
  flex-wrap: wrap; justify-content: flex-end;
}
.acct-row.balance .v{
  font-size: 18px;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -.3px;
}
.acct-row.balance .v.neg{
  background: linear-gradient(135deg, #ef4760, #c2185b);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Platform pill */
.plat-pill{
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px 5px 6px;
  background: linear-gradient(135deg, #f5f7fb, #e9eef7);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px; font-weight: 800;
  color: var(--text);
  letter-spacing: .2px;
}
.plat-pill .ic{
  width: 18px; height: 18px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #1abc88, #0d8a5f);
  color: #fff;
  font-size: 9px;
}
.plat-pill.mt4 .ic{ background: linear-gradient(135deg, #f5b73c, #d4901c); }

/* Leverage chip */
.lev-chip{
  display: inline-flex; align-items: center;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 12px; font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #0e3789, #030641);
  letter-spacing: .3px;
  font-variant-numeric: tabular-nums;
}

.server-pill{
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px;
  background: rgba(14,55,137,.08);
  color: var(--brand-2);
  font-size: 11.5px; font-weight: 800;
  border-radius: 6px;
  letter-spacing: .5px;
}
.server-pill i{ font-size: 9px; }

.acct-pkg{
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11.5px; font-weight: 800;
  letter-spacing: .5px; text-transform: uppercase;
}
.acct-pkg.prime{
  background: linear-gradient(135deg, rgba(245,183,60,.18), rgba(212,144,28,.10));
  color: #8a5a0e;
  border: 1px solid rgba(245,183,60,.30);
}
.acct-pkg.plus{
  background: linear-gradient(135deg, rgba(26,188,136,.16), rgba(13,138,95,.08));
  color: #0d6b48;
  border: 1px solid rgba(26,188,136,.30);
}
.acct-pkg.classic{
  background: rgba(14,55,137,.10);
  color: var(--brand-2);
  border: 1px solid rgba(14,55,137,.20);
}

/* Inline value-side actions */
.row-act{
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 9px;
  background: linear-gradient(135deg, #030641, #0e3789);
  color: #fff;
  -webkit-text-fill-color: #fff;
  border-radius: 7px;
  font-size: 11.5px; font-weight: 700;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.row-act:hover{ transform: translateY(-1px); box-shadow: 0 8px 16px rgba(14,55,137,.30); }
.row-act i{ font-size: 9.5px; color: #fff; -webkit-text-fill-color: #fff; }

/* Footer actions */
.acct-actions{
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  padding: 12px 14px;
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  border-radius: 0 0 18px 18px;
}
.act-btn{
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 12px; font-weight: 700;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  transition: all .2s var(--ease);
  text-decoration: none;
}
.act-btn:hover{
  border-color: var(--brand-2);
  color: var(--brand-2);
  background: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(14,55,137,.10);
}
.act-btn.primary{
  background: linear-gradient(135deg, #1abc88, #0d8a5f);
  border-color: transparent;
  color: #fff;
}
.act-btn.primary:hover{
  color: #fff;
  box-shadow: 0 8px 18px rgba(26,188,136,.30);
}
.act-btn i{ font-size: 11px; }

/* Empty / open-new card */
.acct-empty{
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: #fff;
  border: 2px dashed var(--line-2);
  border-radius: 18px;
  padding: 28px 20px;
  text-align: center;
  min-height: 360px;
  transition: border-color .25s var(--ease), background .25s var(--ease), transform .25s var(--ease);
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
}
.acct-empty:hover{
  border-color: var(--brand-2);
  background: linear-gradient(180deg, rgba(14,55,137,.04), #fff);
  transform: translateY(-3px);
}
.acct-empty .ic{
  width: 60px; height: 60px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  color: #fff;
  border-radius: 18px;
  font-size: 22px;
  margin-bottom: 14px;
  box-shadow: 0 12px 24px rgba(14,55,137,.25);
}
.acct-empty h4{
  margin: 0 0 4px;
  font-size: 16px; font-weight: 800;
  color: var(--text);
}
.acct-empty p{
  margin: 0;
  font-size: 13px;
  color: var(--text-mute);
}

/* ============== MOBILE OVERLAY ============== */
.cp-backdrop{
  position: fixed; inset: 0;
  background: rgba(3,6,65,.45);
  backdrop-filter: blur(4px);
  z-index: 85;
  opacity: 0; pointer-events: none;
  transition: opacity .25s var(--ease);
}
.cp-shell.mobile-open .cp-backdrop{
  opacity: 1; pointer-events: auto;
}

/* ============== TOAST ============== */
.cp-toast{
  position: fixed;
  left: 50%; bottom: 24px;
  transform: translateX(-50%) translateY(80px);
  background: linear-gradient(135deg, #030641, #0e3789);
  color: #fff;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 13px; font-weight: 700;
  box-shadow: 0 18px 40px rgba(3,6,65,.30);
  display: inline-flex; align-items: center; gap: 10px;
  opacity: 0; pointer-events: none;
  transition: transform .35s var(--ease), opacity .35s var(--ease);
  z-index: 200;
}
.cp-toast.show{ opacity: 1; transform: translateX(-50%) translateY(0); }
.cp-toast i{ font-size: 14px; color: #6cf2bf; }

/* ============================================================
   Form fields — for open-account form
   ============================================================ */
.field-row{
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  margin-bottom: 16px;
}
.field-row.single{ grid-template-columns: 1fr; }
@media (max-width:720px){ .field-row{ grid-template-columns: 1fr; } }
.field label{
  display:block; font-size: 13px; font-weight: 600;
  color: var(--text-2); margin-bottom: 8px;
}
.field label .req{ color: #ef4760; margin-left: 2px; }
.field-wrap{
  position:relative; display:flex; align-items:center;
  background: var(--bg-soft);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  transition: all .25s var(--ease);
}
.field-wrap:hover{ border-color: var(--line-2); }
.field-wrap:focus-within{
  border-color: var(--brand-2); background:#fff;
  box-shadow: 0 0 0 4px rgba(14,55,137,.10);
}
.field-wrap i.field-icon{
  width:44px; display:grid; place-items:center;
  color: var(--text-soft); font-size: 15px;
  pointer-events:none;
  transition: color .25s var(--ease);
}
.field-wrap:focus-within i.field-icon{ color: var(--brand-2); }
.field input, .field select, .field textarea{
  flex:1; background: transparent; border: 0; outline: 0;
  padding: 14px 14px 14px 0; font: inherit; font-size: 14.5px;
  color: var(--text); width: 100%; font-family: inherit;
}
.field select{
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%238a93a8' d='M5 6L0 0h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
  padding-right: 36px; cursor: pointer;
}
.field input::placeholder, .field textarea::placeholder{ color: var(--text-soft); }

/* ============================================================
   OPEN ACCOUNT — Form card
   ============================================================ */
.ola-card{
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 16px 50px rgba(10,20,40,.07);
  /* overflow intentionally NOT hidden so the custom-select dropdown
     panel can extend below the card without being clipped */
  position: relative;
}
.ola-card::before{
  content:"";
  position: absolute; left: 0; top: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--brand-1) 0%, var(--brand-2) 55%, var(--brand-3) 100%);
  border-radius: 18px 18px 0 0;
}
.ola-head{
  display: flex; align-items: center; gap: 14px;
  padding: 22px 26px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fafbfd, #fff);
  border-radius: 18px 18px 0 0;
}
.ola-head .ic{
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  color: #fff;
  border-radius: 12px;
  font-size: 18px;
  box-shadow: 0 8px 18px rgba(14,55,137,.25);
  flex-shrink: 0;
}
.ola-head h3{
  font-size: 18px; font-weight: 800;
  color: var(--text);
  margin: 0;
  letter-spacing: -.2px;
}
.ola-head p{
  font-size: 13px;
  color: var(--text-mute);
  margin: 2px 0 0;
}

.ola-body{ padding: 26px; }
.ola-body .field-row{ margin-bottom: 22px; }

.ola-info{
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px;
  background: rgba(14,55,137,.05);
  border: 1px solid rgba(14,55,137,.12);
  border-left: 3px solid var(--brand-2);
  border-radius: 10px;
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 8px;
}
.ola-info i{ color: var(--brand-2); margin-top: 2px; }
.ola-info strong{ color: var(--text); }

/* Actions */
.ola-actions{
  display: flex; gap: 12px;
  padding: 18px 26px;
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  border-radius: 0 0 18px 18px;
  flex-wrap: wrap;
}
.ola-actions .btn-cancel{
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px;
  background: linear-gradient(135deg, #ef4760, #c2185b);
  color: #fff;
  border: 0; border-radius: 10px;
  font-family: inherit; font-size: 13.5px; font-weight: 700;
  cursor: pointer; text-decoration: none;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
  box-shadow: 0 8px 18px rgba(239,71,96,.22);
}
.ola-actions .btn-cancel:hover{ transform: translateY(-1px); box-shadow: 0 12px 24px rgba(239,71,96,.32); }
.ola-actions .btn-submit{
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 24px;
  background: linear-gradient(135deg, #030641, #0e3789);
  color: #fff;
  border: 0; border-radius: 10px;
  font-family: inherit; font-size: 13.5px; font-weight: 700;
  cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
  box-shadow: 0 8px 18px rgba(14,55,137,.25);
}
.ola-actions .btn-submit:hover{ transform: translateY(-1px); box-shadow: 0 12px 26px rgba(14,55,137,.35); }
.ola-actions .btn-submit:disabled{ opacity: .65; cursor: not-allowed; transform: none; box-shadow: none; }

/* ============================================================
   REQUEST CARD — additional bits on top of ola-card
   ============================================================ */
.rc-body{ padding: 26px; }
.rc-body .field-row{ margin-bottom: 20px; }
.rc-body .field-row.row-3{ grid-template-columns: 1fr 1fr 1fr; }
@media (max-width:880px){ .rc-body .field-row.row-3{ grid-template-columns: 1fr; } }

/* Warning / info banners shown in the form */
.rc-banner{
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 13.5px; font-weight: 600;
  color: var(--text-2);
  margin-bottom: 10px;
}
.rc-banner i{ font-size: 14px; margin-top: 2px; flex-shrink: 0; }
.rc-banner strong{ color: var(--text); font-weight: 800; }

.rc-banner.info{
  background: rgba(14,55,137,.06);
  border: 1px solid rgba(14,55,137,.14);
  border-left: 3px solid var(--brand-2);
}
.rc-banner.info i{ color: var(--brand-2); }

.rc-banner.warn{
  background: rgba(245,183,60,.10);
  border: 1px solid rgba(245,183,60,.30);
  border-left: 3px solid #d4901c;
}
.rc-banner.warn i{ color: #d4901c; }

.rc-topup{
  color: #c2185b;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 2px;
}
.rc-topup:hover{ color: #ef4760; }

/* Terms & conditions checkbox */
.rc-terms{
  display: flex; align-items: center; gap: 12px;
  margin-top: 18px;
  padding: 14px 16px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  user-select: none;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.rc-terms:hover{ border-color: var(--brand-2); background: #fff; }
.rc-terms input[type="checkbox"]{
  appearance: none;
  -webkit-appearance: none;
  width: 20px; height: 20px;
  flex-shrink: 0;
  border: 2px solid var(--line-2);
  border-radius: 5px;
  background: #fff;
  cursor: pointer;
  position: relative;
  transition: border-color .15s var(--ease), background .15s var(--ease);
}
.rc-terms input[type="checkbox"]:hover{ border-color: var(--brand-2); }
.rc-terms input[type="checkbox"]:checked{
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  border-color: var(--brand-2);
}
.rc-terms input[type="checkbox"]:checked::after{
  content: '';
  position: absolute;
  left: 5px; top: 1px;
  width: 6px; height: 11px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.rc-terms label{
  font-size: 13.5px; font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  margin: 0;
  line-height: 1.4;
}
.rc-terms label a{ color: var(--brand-2); font-weight: 800; text-decoration: underline; }
.rc-terms label .req{ color: #ef4760; }

/* ============================================================
   DEPOSIT page — additional bits on top of ola-card
   ============================================================ */
.dep-body{ padding: 26px; }
.dep-body .field-row{ margin-bottom: 18px; }
.dep-body .field-row.row-3{ grid-template-columns: 1fr 1fr 1fr; }
@media (max-width:880px){ .dep-body .field-row.row-3{ grid-template-columns: 1fr; } }

/* Native amount input uses .field-wrap shell */
.dep-body .field input[type="number"]{
  /* hide the spinners on chrome/safari/edge */
  -moz-appearance: textfield;
}
.dep-body .field input[type="number"]::-webkit-outer-spin-button,
.dep-body .field input[type="number"]::-webkit-inner-spin-button{
  -webkit-appearance: none; margin: 0;
}

/* Exchange-rate badge */
.dep-rate{
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  background: linear-gradient(135deg, rgba(14,55,137,.06), rgba(26,188,136,.04));
  border: 1px solid rgba(14,55,137,.14);
  border-radius: 10px;
  font-size: 13px; font-weight: 700;
  color: var(--text-2);
  margin-bottom: 12px;
  font-variant-numeric: tabular-nums;
}
.dep-rate i{ color: var(--brand-2); font-size: 13px; }
.dep-rate b{ color: var(--text); font-weight: 800; }

/* Deposit page reuses .rc-banner.info and .rc-banner.warn for its notes
   (defined above with the request-card styles) */

/* Method-specific panels (wire / crypto) — live BELOW the main card */
.dep-method-panel{
  margin-top: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 16px 50px rgba(10,20,40,.07);
  overflow: hidden;
  display: none;
}
.dep-method-panel.show{ display: block; }
.dep-method-panel .head{
  display: flex; align-items: center; gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, #030641 0%, #0e3789 100%);
  color: #fff;
}
.dep-method-panel .head .ic{
  width: 36px; height: 36px;
  display: grid; place-items: center;
  background: rgba(255,255,255,.10);
  border-radius: 10px;
  font-size: 14px;
  color: #fff;
  flex-shrink: 0;
}
.dep-method-panel .head h3{
  font-size: 16px; font-weight: 800;
  margin: 0;
  letter-spacing: -.2px;
  color: #fff;
}
.dep-method-panel .head .sub{
  font-size: 12px; color: rgba(255,255,255,.70);
  margin-top: 2px;
}
.dep-method-panel .body{ padding: 22px; }

/* Section heading inside a panel */
.dep-section-title{
  font-size: 13.5px; font-weight: 800;
  color: var(--text);
  margin: 0 0 10px;
  letter-spacing: .2px;
}
.dep-section-title:not(:first-child){ margin-top: 22px; }

/* Wire detail table */
.wire-table{
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  font-size: 13.5px;
}
.wire-table tr + tr td{ border-top: 1px solid var(--line); }
.wire-table td{
  padding: 12px 14px;
  vertical-align: top;
  color: var(--text);
}
.wire-table td:first-child{
  width: 38%;
  background: var(--bg-soft);
  font-weight: 700;
  color: var(--text-2);
  border-right: 1px solid var(--line);
}
.wire-table td:last-child{
  background: #fff;
  font-weight: 600;
  word-break: break-all;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 560px){
  .wire-table td:first-child{ width: 45%; }
}

/* Highlight blocks below the tables */
.wire-row{
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap;
  padding: 12px 14px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-top: 12px;
}
.wire-row .lbl{
  font-size: 11.5px; font-weight: 800;
  color: var(--text-soft);
  letter-spacing: .5px; text-transform: uppercase;
}
.wire-row .val{
  font-size: 16px; font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.wire-row .val.brand{
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.wire-row .copy-btn{
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px;
  background: var(--brand-2);
  color: #fff;
  border: 0; border-radius: 6px;
  font-family: inherit; font-size: 11.5px; font-weight: 700;
  cursor: pointer;
  transition: background .2s var(--ease);
}
.wire-row .copy-btn:hover{ background: var(--brand-3); }

.wire-warnings{
  margin-top: 16px;
  display: flex; flex-direction: column; gap: 6px;
}
.wire-warnings p{
  margin: 0;
  font-size: 13px; font-weight: 600;
  color: #c2185b;
  display: flex; align-items: flex-start; gap: 8px;
}
.wire-warnings p i{ color: #c2185b; font-size: 12px; margin-top: 3px; }

/* Crypto panel — wallet address */
.crypto-wallet{
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-top: 10px;
}
.crypto-wallet .addr{
  flex: 1;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 13px; font-weight: 700;
  color: var(--text);
  word-break: break-all;
}

/* ============================================================
   WITHDRAWAL page — additional bits on top of ola-card
   ============================================================ */
.wd-body{ padding: 26px; }
.wd-body .field-row{ margin-bottom: 18px; }
.wd-body .field-row.row-4{ grid-template-columns: repeat(4, 1fr); }
.wd-body .field-row.row-3{ grid-template-columns: repeat(3, 1fr); }
@media (max-width: 980px){
  .wd-body .field-row.row-4{ grid-template-columns: 1fr 1fr; }
  .wd-body .field-row.row-3{ grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px){
  .wd-body .field-row.row-4{ grid-template-columns: 1fr; }
  .wd-body .field-row.row-3{ grid-template-columns: 1fr; }
}

/* Conditional subsection (Online / Bank Wire) */
.wd-subsection{
  display: none;
  margin-top: 24px;
  padding-top: 22px;
  border-top: 2px dashed var(--line);
}
.wd-subsection.show{ display: block; }
.wd-subsection-title{
  font-size: 14px; font-weight: 800; color: var(--text);
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0 0 18px;
  letter-spacing: .2px;
}
.wd-subsection-title .ic{
  width: 30px; height: 30px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  color: #fff;
  border-radius: 9px;
  font-size: 13px;
}

/* Hide number-input spinners (Chrome/Safari/Edge + Firefox) */
.wd-body .field input[type="number"]{ -moz-appearance: textfield; }
.wd-body .field input[type="number"]::-webkit-outer-spin-button,
.wd-body .field input[type="number"]::-webkit-inner-spin-button{
  -webkit-appearance: none; margin: 0;
}

/* ============================================================
   TRANSACTION HISTORY page
   ============================================================ */
.th-body{ padding: 22px 26px 4px; }
.th-body .field-row{ margin-bottom: 0; }
.th-body .field-row.row-4{ grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px){ .th-body .field-row.row-4{ grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px){ .th-body .field-row.row-4{ grid-template-columns: 1fr; } }

/* Results card */
.th-results{
  margin-top: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 16px 50px rgba(10,20,40,.07);
  overflow: hidden;
}
.th-results-head{
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fafbfd, #fff);
}
.th-results-head h3{
  margin: 0;
  font-size: 14px; font-weight: 800; color: var(--text);
  letter-spacing: .2px;
}
.th-count{
  font-size: 11.5px; font-weight: 800;
  color: var(--text-mute);
  letter-spacing: .4px;
  font-variant-numeric: tabular-nums;
}

.th-scroll{ width: 100%; overflow-x: auto; }
.th-table{
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 760px;
  font-size: 13.5px;
}
.th-table thead th{
  text-align: left;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  padding: 12px 16px;
  font-size: 11.5px; font-weight: 800;
  color: var(--text-soft);
  letter-spacing: .5px; text-transform: uppercase;
  white-space: nowrap;
}
.th-table thead th.num{ text-align: right; }
.th-table tbody td{
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
}
.th-table tbody tr:nth-child(even) td{ background: #fbfcfe; }
.th-table tbody tr:hover td{ background: rgba(14,55,137,.04); }
.th-table tbody tr:last-child td{ border-bottom: 0; }
.th-table .num{ text-align: right; }
.th-table .acct{ font-weight: 700; }
.th-table .acct .arrow{
  color: var(--text-soft);
  font-size: 10px;
  margin: 0 4px;
}
.th-table .type-tag{
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 11px; font-weight: 800;
  letter-spacing: .5px; text-transform: uppercase;
  background: var(--bg-soft);
  color: var(--text-2);
  border: 1px solid var(--line);
}
.th-table .type-tag.deposit{
  background: rgba(26,188,136,.10);
  color: #0d8a5f;
  border-color: rgba(26,188,136,.30);
}
.th-table .type-tag.withdrawal{
  background: rgba(245,183,60,.14);
  color: #8a5a0e;
  border-color: rgba(245,183,60,.30);
}
.th-table .type-tag.transfer{
  background: rgba(14,55,137,.08);
  color: var(--brand-2);
  border-color: rgba(14,55,137,.20);
}
.th-table .st{
  font-weight: 800;
  font-size: 13px;
}
.th-table .st.approved{ color: #0d8a5f; }
.th-table .st.rejected{ color: #c2185b; }
.th-table .st.pending{ color: #d4901c; }
.th-table .date{
  color: var(--text-2);
  font-size: 12.5px;
  white-space: nowrap;
}

.th-empty{
  padding: 50px 24px;
  text-align: center;
  color: var(--text-mute);
}
.th-empty i{
  font-size: 32px; color: var(--text-soft);
  display: block; margin-bottom: 10px;
}
.th-empty h4{
  margin: 0 0 4px;
  font-size: 15px; font-weight: 800; color: var(--text);
}
.th-empty p{ margin: 0; font-size: 13px; }

/* ============================================================
   DOWNLOAD PLATFORM (MT5 / MT4) page
   ============================================================ */
.dl-hero{
  position: relative;
  background: linear-gradient(135deg, #030641 0%, #0e3789 50%, #2950bd 100%);
  color: #fff;
  border-radius: 18px;
  padding: 28px 30px;
  display: flex; align-items: center; gap: 22px;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 16px 50px rgba(3,6,65,.18);
}
.dl-hero::before{
  content:""; position: absolute; inset: 0;
  background:
    radial-gradient(640px 360px at 110% -10%, rgba(108,242,191,.18), transparent 60%),
    radial-gradient(540px 320px at -10% 110%, rgba(74,144,255,.20), transparent 60%);
  z-index: -1;
}
.dl-hero::after{
  content:""; position: absolute; right: -50px; top: -50px;
  width: 220px; height: 220px;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 20px 20px;
  mask-image: radial-gradient(circle, #000 30%, transparent 70%);
  z-index: -1;
}
.dl-hero .badge-logo{
  flex-shrink: 0;
  width: 96px; height: 96px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #6cf2bf, #1abc88);
  color: #051a14;
  border-radius: 22px;
  font-size: 30px; font-weight: 900; letter-spacing: -1px;
  box-shadow: 0 16px 36px rgba(108,242,191,.40);
}
.dl-hero.mt4 .badge-logo{
  background: linear-gradient(135deg, #f9c660, #d4901c);
  color: #4a2e00;
  box-shadow: 0 16px 36px rgba(245,183,60,.40);
}
.dl-hero .meta{ min-width: 0; }
.dl-hero h2{
  margin: 0;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 800;
  letter-spacing: -.5px;
  color: #fff;
  line-height: 1.05;
}
.dl-hero p{
  margin: 6px 0 0;
  font-size: 14px;
  color: rgba(255,255,255,.78);
  max-width: 620px;
  line-height: 1.5;
}
.dl-hero .stats{
  display: flex; gap: 18px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.dl-hero .stats span{
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700;
  color: rgba(255,255,255,.85);
}
.dl-hero .stats span i{ color: #6cf2bf; font-size: 11px; }
.dl-hero.mt4 .stats span i{ color: #f9c660; }

@media (max-width:560px){
  .dl-hero{ flex-direction: column; align-items: flex-start; padding: 22px; gap: 16px; }
  .dl-hero .badge-logo{ width: 70px; height: 70px; font-size: 22px; border-radius: 16px; }
}

/* Download grid */
.dl-section-title{
  font-size: 14px; font-weight: 800;
  color: var(--text);
  margin: 24px 0 14px;
  letter-spacing: .2px;
  display: flex; align-items: center; gap: 8px;
}
.dl-section-title i{ color: var(--brand-2); font-size: 13px; }

.dl-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.dl-tile{
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 18px 18px;
  display: flex; flex-direction: column;
  gap: 14px;
  text-decoration: none;
  color: var(--text);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
  overflow: hidden;
}
.dl-tile:hover{
  transform: translateY(-3px);
  box-shadow: 0 16px 38px rgba(14,55,137,.14);
  border-color: rgba(14,55,137,.30);
}
.dl-tile::before{
  content:""; position: absolute; left: 0; top: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--brand-2), var(--brand-3));
  opacity: 0;
  transition: opacity .25s var(--ease);
}
.dl-tile:hover::before{ opacity: 1; }

.dl-tile .ic{
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: 14px;
  font-size: 26px;
  color: #fff;
  flex-shrink: 0;
}
.dl-tile.windows .ic{ background: linear-gradient(135deg, #0078d4, #00b7c3); }
.dl-tile.macos   .ic{ background: linear-gradient(135deg, #2c2c2e, #555); }
.dl-tile.android .ic{ background: linear-gradient(135deg, #3ddc84, #1abc88); }
.dl-tile.iphone  .ic{ background: linear-gradient(135deg, #007aff, #5856d6); }
.dl-tile.huawei  .ic{ background: linear-gradient(135deg, #cf0a2c, #8b0000); }

.dl-tile .ttl{
  font-size: 15px; font-weight: 800;
  color: var(--text);
  letter-spacing: -.2px;
  line-height: 1.2;
}
.dl-tile .sub{
  font-size: 12px; font-weight: 600;
  color: var(--text-mute);
  margin-top: 2px;
  display: block;
}
.dl-tile .cta{
  margin-top: auto;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #030641, #0e3789);
  color: #fff;
  border-radius: 10px;
  font-size: 13px; font-weight: 700;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.dl-tile:hover .cta{
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(14,55,137,.30);
}
.dl-tile .cta i{ font-size: 11px; }

/* Tip strip */
.dl-tip{
  margin-top: 22px;
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 18px;
  background: rgba(14,55,137,.05);
  border: 1px solid rgba(14,55,137,.12);
  border-left: 3px solid var(--brand-2);
  border-radius: 10px;
  font-size: 13px; font-weight: 600;
  color: var(--text-2);
}
.dl-tip i{ color: var(--brand-2); font-size: 14px; margin-top: 2px; }
.dl-tip strong{ color: var(--text); font-weight: 800; }

/* ============================================================
   2FA SETTINGS — status view + edit form
   ============================================================ */
.tfa-status-card{
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 16px 50px rgba(10,20,40,.07);
  padding: 26px 30px;
  display: flex; flex-direction: column;
  gap: 18px;
  position: relative;
  overflow: hidden;
}
.tfa-status-card::before{
  content:"";
  position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(180deg, var(--brand-1), var(--brand-2));
}
.tfa-status-row{
  display: flex; align-items: center; gap: 14px;
  flex-wrap: wrap;
}
.tfa-status-row .icon{
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  color: #fff;
  border-radius: 12px;
  font-size: 18px;
  box-shadow: 0 8px 18px rgba(14,55,137,.25);
}
.tfa-status-row .lbl{
  font-size: 22px; font-weight: 800; color: var(--text);
  letter-spacing: -.2px;
  margin: 0;
}

.tfa-badge{
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 13px; font-weight: 800;
  letter-spacing: .5px; text-transform: uppercase;
  border: 1px solid transparent;
}
.tfa-badge i{ font-size: 12px; }
.tfa-badge.disabled{
  background: linear-gradient(135deg, #ef4760, #c2185b);
  color: #fff;
  box-shadow: 0 8px 18px rgba(239,71,96,.25);
}
.tfa-badge.enabled{
  background: linear-gradient(135deg, #1abc88, #0d8a5f);
  color: #fff;
  box-shadow: 0 8px 18px rgba(26,188,136,.25);
}

.tfa-edit-link{
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--text-2);
  border-radius: 8px;
  font-size: 13px; font-weight: 700;
  text-decoration: none;
  align-self: flex-start;
  transition: border-color .2s var(--ease), color .2s var(--ease), background .2s var(--ease);
}
.tfa-edit-link:hover{
  border-color: var(--brand-2);
  color: var(--brand-2);
  background: #fff;
}
.tfa-edit-link i{ font-size: 11px; }
.tfa-edit-link .sep{ color: var(--text-soft); padding: 0 2px; }

.tfa-info{
  font-size: 13.5px;
  color: var(--text-mute);
  line-height: 1.5;
  margin: 0;
}
.tfa-info strong{ color: var(--text); font-weight: 800; }

/* Segmented Enabled/Disabled toggle */
.tfa-toggle{
  display: inline-flex;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
}
.tfa-toggle button{
  background: transparent;
  border: 0;
  font-family: inherit;
  font-size: 13.5px; font-weight: 700;
  color: var(--text-2);
  padding: 10px 24px;
  border-radius: 9px;
  cursor: pointer;
  transition: all .2s var(--ease);
}
.tfa-toggle button:hover{ color: var(--text); }
.tfa-toggle button.active.enabled{
  background: linear-gradient(135deg, #1abc88, #0d8a5f);
  color: #fff;
  box-shadow: 0 6px 14px rgba(26,188,136,.30);
}
.tfa-toggle button.active.disabled{
  background: linear-gradient(135deg, #ef4760, #c2185b);
  color: #fff;
  box-shadow: 0 6px 14px rgba(239,71,96,.25);
}

.tfa-body{ padding: 26px; }
.tfa-body .field-row{ margin-bottom: 0; }
.tfa-body .field-row.row-2{ grid-template-columns: 1fr 1fr; gap: 22px; align-items: end; }
@media (max-width: 720px){ .tfa-body .field-row.row-2{ grid-template-columns: 1fr; } }

/* The OTP field shouldn't show number-input arrows */
.tfa-body .field input[type="text"]{ font-variant-numeric: tabular-nums; letter-spacing: 4px; }

/* ============================================================
   CHANGE PASSWORD page
   ============================================================ */
.cpw-body{ padding: 26px; }
.cpw-body .field-row{ margin-bottom: 0; }
.cpw-body .field-row.row-4{ grid-template-columns: repeat(4, 1fr); gap: 22px; }
@media (max-width: 1100px){ .cpw-body .field-row.row-4{ grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px){  .cpw-body .field-row.row-4{ grid-template-columns: 1fr; } }

/* Below the password input: Generate + Show Password row */
.pw-controls{
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.pw-controls .left{ display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.pw-controls .right{ display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

.pw-gen-btn{
  background: transparent;
  border: 0;
  padding: 0;
  font-family: inherit;
  font-size: 13px; font-weight: 800;
  color: var(--brand-2);
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color .15s var(--ease);
}
.pw-gen-btn:hover{ color: var(--brand-3); }
.pw-gen-btn i{ font-size: 11px; }

.pw-copy-btn{
  background: var(--brand-2);
  color: #fff;
  border: 0;
  padding: 5px 10px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 11.5px; font-weight: 700;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 5px;
  transition: background .15s var(--ease);
}
.pw-copy-btn:hover{ background: var(--brand-3); }
.pw-copy-btn i{ font-size: 10px; }
.pw-copy-btn:disabled{ opacity: .5; cursor: not-allowed; }

.pw-show{
  display: inline-flex; align-items: center; gap: 6px;
  cursor: pointer;
  user-select: none;
  font-size: 13px; font-weight: 600;
  color: var(--text-2);
}
.pw-show input[type="checkbox"]{
  appearance: none;
  -webkit-appearance: none;
  width: 16px; height: 16px;
  border: 2px solid var(--line-2);
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  position: relative;
  transition: border-color .15s var(--ease), background .15s var(--ease);
  margin: 0;
}
.pw-show input[type="checkbox"]:hover{ border-color: var(--brand-2); }
.pw-show input[type="checkbox"]:checked{
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  border-color: var(--brand-2);
}
.pw-show input[type="checkbox"]:checked::after{
  content: '';
  position: absolute;
  left: 4px; top: 0;
  width: 4px; height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Hint chips — sit on one neat row, wrap as a last resort */
.pw-hints{
  display: flex; flex-wrap: wrap; gap: 4px;
  margin-top: 8px;
  align-items: center;
}
.pw-hints .hint{
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 10.5px; font-weight: 700;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--text-soft);
  letter-spacing: .2px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  transition: background .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease);
}
.pw-hints .hint i{
  font-size: 8px;
  opacity: .55;
  transition: opacity .15s var(--ease), color .15s var(--ease);
}
.pw-hints .hint.ok{
  background: rgba(26,188,136,.12);
  border-color: rgba(26,188,136,.35);
  color: #0d8a5f;
}
.pw-hints .hint.ok i{ color: #1abc88; opacity: 1; }

/* ============================================================
   MY COURSES — responsive course grid
   ============================================================ */
.mc-toolbar{
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.mc-toolbar .left{
  display: flex; align-items: center; gap: 10px;
}
.mc-toolbar .count{
  font-size: 12px; font-weight: 800;
  color: var(--text-mute);
  padding: 6px 12px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  letter-spacing: .3px;
  font-variant-numeric: tabular-nums;
}
.mc-toolbar .right{
  display: flex; align-items: center; gap: 10px;
}
.mc-search{
  position: relative;
  width: 280px;
  max-width: 50vw;
}
.mc-search input{
  width: 100%;
  height: 38px;
  padding: 0 12px 0 36px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.mc-search input:focus{ outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 4px rgba(14,55,137,.10); }
.mc-search i{
  position: absolute;
  left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text-soft); font-size: 13px;
}

/* Filter chips */
.mc-filters{
  display: inline-flex;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 4px;
  gap: 2px;
}
.mc-filter{
  background: transparent;
  border: 0;
  font-family: inherit;
  font-size: 12.5px; font-weight: 700;
  color: var(--text-2);
  padding: 8px 14px;
  border-radius: 9px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.mc-filter:hover{ color: var(--text); background: var(--bg-soft); }
.mc-filter.active{
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  color: #fff;
  box-shadow: 0 6px 14px rgba(14,55,137,.25);
}

/* Grid */
.mc-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}
@media (max-width: 560px){
  .mc-grid{ grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
}

/* Card */
.mc-card{
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 22px rgba(10,20,40,.05);
  cursor: pointer;
  display: flex; flex-direction: column;
  text-decoration: none;
  color: var(--text);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
  isolation: isolate;
}
.mc-card:hover{
  transform: translateY(-4px);
  box-shadow: 0 22px 44px rgba(14,55,137,.18);
  border-color: rgba(14,55,137,.30);
}

/* Cover */
.mc-cover{
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: #fff;
  isolation: isolate;
}
.mc-cover::before{
  content:""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: radial-gradient(circle at center, #000 30%, transparent 75%);
  z-index: -1;
  opacity: .4;
}
.mc-cover::after{
  content:""; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 110% -10%, rgba(255,255,255,.30), transparent 50%),
    radial-gradient(circle at -10% 110%, rgba(0,0,0,.25), transparent 60%);
  z-index: -1;
}

/* Cover color variants */
.mc-cover.navy{    background: linear-gradient(135deg, #030641, #0e3789); }
.mc-cover.blue{    background: linear-gradient(135deg, #2950bd, #4f8cff); }
.mc-cover.teal{    background: linear-gradient(135deg, #1abc88, #0d8a5f); }
.mc-cover.gold{    background: linear-gradient(135deg, #f5b73c, #d4901c); }
.mc-cover.red{     background: linear-gradient(135deg, #ef4760, #c2185b); }
.mc-cover.purple{  background: linear-gradient(135deg, #7e3e87, #5d2a64); }
.mc-cover.slate{   background: linear-gradient(135deg, #2c3e50, #4a5d72); }
.mc-cover.emerald{ background: linear-gradient(135deg, #11998e, #38ef7d); }
.mc-cover.sunset{  background: linear-gradient(135deg, #ff6a3d, #c2185b); }
.mc-cover.ocean{   background: linear-gradient(135deg, #0078d4, #00b7c3); }

.mc-cover .ic{
  font-size: 44px;
  opacity: .85;
  text-shadow: 0 4px 14px rgba(0,0,0,.30);
  transition: transform .35s var(--ease);
}
.mc-card:hover .mc-cover .ic{ transform: scale(1.08); }

.mc-cover .tag{
  position: absolute;
  bottom: 10px; left: 10px;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(0,0,0,.30);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  font-size: 10.5px; font-weight: 800;
  letter-spacing: .5px; text-transform: uppercase;
  border: 1px solid rgba(255,255,255,.25);
}
.mc-cover .tag i{ font-size: 9px; }

/* New / Updated ribbon */
.mc-ribbon{
  position: absolute;
  top: 10px; left: 10px;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, #1abc88, #0d8a5f);
  color: #fff;
  font-size: 10px; font-weight: 800;
  letter-spacing: .5px; text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(26,188,136,.40);
  z-index: 1;
}
.mc-ribbon.hot{ background: linear-gradient(135deg, #ef4760, #c2185b); box-shadow: 0 4px 12px rgba(239,71,96,.40); }

/* Heart favorite button */
.mc-heart{
  position: absolute;
  top: 10px; right: 10px;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  background: rgba(255,255,255,.94);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  color: #ef4760;
  font-size: 15px;
  box-shadow: 0 4px 12px rgba(10,20,40,.18);
  transition: transform .18s var(--ease), background .18s var(--ease), color .18s var(--ease);
  z-index: 2;
  -webkit-tap-highlight-color: transparent;
}
.mc-heart:hover{ background: #fff; transform: scale(1.10); }
.mc-heart:active{ transform: scale(.92); }
.mc-heart .heart-empty{ display: inline; }
.mc-heart .heart-full{ display: none; }
.mc-heart.active{
  background: linear-gradient(135deg, #ef4760, #c2185b);
  color: #fff;
  box-shadow: 0 6px 16px rgba(239,71,96,.45);
}
.mc-heart.active .heart-empty{ display: none; }
.mc-heart.active .heart-full{ display: inline; animation: heartPop .35s var(--ease); }
@keyframes heartPop{
  0%{ transform: scale(.5); }
  60%{ transform: scale(1.25); }
  100%{ transform: scale(1); }
}

/* Body */
.mc-body{
  padding: 14px 14px 16px;
  flex: 1;
  display: flex; flex-direction: column;
  gap: 6px;
}
.mc-title{
  font-size: 13.5px; font-weight: 800;
  color: var(--text);
  letter-spacing: -.1px;
  line-height: 1.3;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}
.mc-meta{
  display: flex; align-items: center; gap: 8px;
  font-size: 11.5px; font-weight: 600;
  color: var(--text-mute);
  margin-top: auto;
}
.mc-meta i{ font-size: 10px; color: var(--brand-2); }
.mc-meta .dot{ width: 3px; height: 3px; border-radius: 50%; background: var(--line-2); }

/* Empty state */
.mc-empty{
  grid-column: 1 / -1;
  padding: 60px 24px;
  text-align: center;
  background: #fff;
  border: 1px dashed var(--line-2);
  border-radius: 16px;
  color: var(--text-mute);
}
.mc-empty i{
  font-size: 36px; color: var(--text-soft);
  display: block; margin-bottom: 12px;
}
.mc-empty h4{
  margin: 0 0 4px;
  font-size: 15px; font-weight: 800; color: var(--text);
}
.mc-empty p{ margin: 0; font-size: 13px; }

/* Pagination */
.mc-pagination{
  display: flex; align-items: center; justify-content: center;
  gap: 6px;
  margin-top: 30px;
  flex-wrap: wrap;
}
.mc-page-btn{
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px;
  padding: 0 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-family: inherit;
  font-size: 13px; font-weight: 700;
  color: var(--text-2);
  cursor: pointer;
  transition: border-color .15s var(--ease), color .15s var(--ease), background .15s var(--ease), transform .15s var(--ease);
  font-variant-numeric: tabular-nums;
}
.mc-page-btn:hover:not(:disabled):not(.active){
  border-color: var(--brand-2);
  color: var(--brand-2);
  transform: translateY(-1px);
}
.mc-page-btn.active{
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 14px rgba(14,55,137,.30);
  cursor: default;
}
.mc-page-btn:disabled{
  opacity: .45;
  cursor: not-allowed;
}
.mc-page-btn i{ font-size: 10px; }
.mc-page-ellipsis{
  display: inline-flex; align-items: center;
  padding: 0 4px;
  color: var(--text-soft);
  font-weight: 800;
}

/* ============================================================
   CERTIFICATES — creative stylized cards with download
   ============================================================ */
.cert-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
}
@media (max-width: 560px){
  .cert-grid{ grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
}

.cert-card{
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 22px rgba(10,20,40,.06);
  display: flex; flex-direction: column;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.cert-card:hover{
  transform: translateY(-4px);
  box-shadow: 0 22px 48px rgba(14,55,137,.18);
  border-color: rgba(14,55,137,.30);
}

/* Mini diploma preview */
.cert-preview{
  position: relative;
  aspect-ratio: 4 / 3;
  background:
    radial-gradient(circle at 50% 40%, rgba(245,183,60,.04), transparent 70%),
    linear-gradient(180deg, #fbf9f3 0%, #f4efe2 100%);
  padding: 18px 22px;
  display: flex; flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  border-bottom: 1px solid rgba(0,0,0,.06);
}
/* Decorative corner ribbons */
.cert-preview::before{
  content:"";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 14px;
  background: linear-gradient(180deg, var(--brand-1), var(--brand-2));
  border-right: 2px solid #f5b73c;
}
.cert-preview::after{
  content:"";
  position: absolute;
  right: -14px; top: -14px;
  width: 110px; height: 110px;
  background: radial-gradient(circle at center, rgba(245,183,60,.20), transparent 70%);
  pointer-events: none;
}
.cert-preview-head{
  position: relative;
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  padding-left: 12px;
}
.cert-preview-head .ra{
  font-weight: 900;
  font-size: 17px;
  letter-spacing: -.5px;
  color: var(--brand-1);
}
.cert-preview-head .lbl{
  font-size: 9.5px; font-weight: 800;
  color: #8a5a0e;
  letter-spacing: 2px; text-transform: uppercase;
  background: linear-gradient(135deg, #f5b73c, #d4901c);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.cert-preview-body{
  position: relative;
  padding-left: 12px;
  display: flex; flex-direction: column;
  gap: 4px;
}
.cert-preview-body .of{
  font-size: 8.5px;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--text-mute);
  font-weight: 700;
}
.cert-preview-body .name{
  font-family: 'Tajawal', 'Inter', serif;
  font-style: italic;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  border-bottom: 1px solid rgba(0,0,0,.10);
  padding-bottom: 3px;
}
.cert-preview-body .course-line{
  font-size: 9.5px;
  color: var(--text-mute);
  font-weight: 600;
}
.cert-preview-body .course-line strong{
  display: block;
  color: var(--text);
  font-size: 11.5px;
  font-weight: 800;
  margin-top: 2px;
  line-height: 1.2;
  letter-spacing: -.1px;
}

.cert-preview-foot{
  position: relative;
  padding-left: 12px;
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 10px;
}
.cert-preview-foot .sig{
  font-family: 'Brush Script MT', 'Tajawal', cursive;
  font-style: italic;
  font-size: 13px;
  color: var(--brand-2);
  border-bottom: 1px solid var(--text-2);
  padding: 0 6px 1px;
  letter-spacing: .5px;
}
.cert-preview-foot .seal{
  position: relative;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f5b73c, #d4901c);
  display: grid; place-items: center;
  color: #fff;
  font-size: 16px;
  box-shadow: 0 6px 14px rgba(212,144,28,.40);
  border: 2px solid #fff;
  outline: 1px solid rgba(212,144,28,.40);
}
.cert-preview-foot .seal::after{
  content:"";
  position: absolute;
  inset: -8px;
  border: 1px dashed rgba(212,144,28,.40);
  border-radius: 50%;
  pointer-events: none;
}

/* Body of cert card */
.cert-body{
  padding: 14px 16px 12px;
  display: flex; flex-direction: column;
  gap: 4px;
}
.cert-title{
  font-size: 13.5px; font-weight: 800;
  color: var(--text);
  letter-spacing: -.1px;
  line-height: 1.3;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}
.cert-meta{
  display: flex; align-items: center; gap: 8px;
  font-size: 11.5px; font-weight: 700;
  color: var(--text-mute);
}
.cert-meta i{ font-size: 10px; color: #d4901c; }

/* Actions */
.cert-actions{
  padding: 0 16px 16px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}
.cert-dl{
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #1abc88, #0d8a5f);
  color: #fff;
  border: 0; border-radius: 10px;
  font-family: inherit; font-size: 13px; font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
  box-shadow: 0 6px 14px rgba(26,188,136,.30);
}
.cert-dl:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(26,188,136,.40);
  color: #fff;
}
.cert-dl i{ font-size: 12px; }

.cert-view{
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--text-2);
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  font-size: 14px;
  transition: border-color .2s var(--ease), color .2s var(--ease);
}
.cert-view:hover{ border-color: var(--brand-2); color: var(--brand-2); }
