/* ==========================================================
   Dbuglab: Client Portal dashboard preview section
   Partial: portal-showcase.php (index.php ke saath, root folder me)
   Script:  portal-showcase.js
   Sab classes "dps-" prefix ke saath, taaki style.css se clash na ho.
   ========================================================== */

.dps {
  --dps-blue: #1d4ed8;
  --dps-blue-2: #2563eb;
  --dps-blue-soft: #e8eeff;
  --dps-gold: #f59e0b;
  --dps-gold-soft: #fff3dc;
  --dps-lime: #a3cf12;
  --dps-navy: #0a1633;
  --dps-navy-2: #111f45;
  --dps-ink: #0f172a;
  --dps-muted: #5b6478;
  --dps-line: #e3e8f5;
  --dps-cycle: 6s; /* auto-rotate ka time per tab */

  position: relative;
  padding: 90px 0 100px;
  background:
    radial-gradient(#d9e1fb 1.2px, transparent 1.2px) 0 0 / 22px 22px,
    linear-gradient(180deg, #ffffff 0%, #f4f7ff 100%);
  font-family: 'Poppins', sans-serif;
  overflow: hidden;
}

/* dots pattern sirf kinaron pe halka dikhe */
.dps::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, #f7f9ff 55%, rgba(247, 249, 255, 0.4) 100%);
  pointer-events: none;
}

.dps__wrap {
  position: relative;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Heading ---------- */

.dps__head {
  max-width: 880px;
  margin: 0 auto 56px;
  text-align: center;
}

.dps .dps__kicker {
  margin: 0 0 14px;
  color: var(--dps-blue);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 6px;
  text-transform: uppercase;
}

.dps .dps__title {
  margin: 0 0 14px;
  color: var(--dps-ink);
  font-size: clamp(30px, 4vw, 50px);
  font-weight: 700;
  line-height: 1.15;
}

.dps .dps__title span {
  background: linear-gradient(90deg, var(--dps-blue-2) 0%, var(--dps-gold) 75%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.dps .dps__lead {
  margin: 0 auto;
  max-width: 56ch;
  color: var(--dps-muted);
  font-size: 17px;
  line-height: 1.7;
}

/* ---------- Layout ---------- */

.dps__body {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 48px;
  align-items: center;
}

/* ---------- Tabs ---------- */

.dps__side {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dps__tabs {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ---------- "Click any feature" hint ----------
   Tabs clickable hain, ye user ko pehli nazar me batane ke liye.
   User ke pehle click ke baad (JS .is-touched lagata hai) hint halka ho jaata hai. */

.dps .dps__hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  margin: 0 0 2px;
  padding: 6px 14px 6px 8px;
  border-radius: 999px;
  background: var(--dps-gold-soft);
  color: #8a5a00;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  transition: opacity 0.3s ease;
}

.dps__hint-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--dps-gold);
}

.dps__hint-icon svg {
  width: 16px;
  height: 16px;
  animation: dps-tap 1.6s ease-in-out infinite;
}

@keyframes dps-tap {
  0%, 100% { transform: translate(0, 0) scale(1); }
  45%      { transform: translate(2px, 2px) scale(0.88); }
  60%      { transform: translate(2px, 2px) scale(0.88); }
}

.dps__hint-text--touch {
  display: none;
}

@media (hover: none) {
  .dps__hint-text--desk  { display: none; }
  .dps__hint-text--touch { display: inline; }
}

.dps__body.is-touched .dps__hint {
  opacity: 0.55;
}

.dps__body.is-touched .dps__hint-icon svg {
  animation: none;
}

/* Har tab ke right me chevron: inactive = "khol sakte ho", active = filled */
.dps-tab__go {
  flex: 0 0 32px;
  height: 32px;
  margin-left: auto;
  align-self: center;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #8a96b8;
  background: #f1f4fc;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.dps .dps-tab:hover .dps-tab__go {
  color: #fff;
  background: var(--dps-blue-2);
  transform: translateX(3px);
}

.dps-tab.is-active .dps-tab__go {
  color: #fff;
  background: var(--dps-blue);
}

/* Jab tak user ne khud koi tab nahi khola, inactive chevrons halka sa "pulse" karte hain */
.dps__body:not(.is-touched) .dps-tab:not(.is-active) .dps-tab__go {
  animation: dps-pulse 2.4s ease-out infinite;
}

.dps__body:not(.is-touched) .dps-tab:nth-child(2) .dps-tab__go { animation-delay: 0.3s; }
.dps__body:not(.is-touched) .dps-tab:nth-child(3) .dps-tab__go { animation-delay: 0.6s; }
.dps__body:not(.is-touched) .dps-tab:nth-child(4) .dps-tab__go { animation-delay: 0.9s; }

@keyframes dps-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.35); }
  70%  { box-shadow: 0 0 0 9px rgba(37, 99, 235, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

.dps__cta-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin-top: 14px;
}

.dps .dps-tab {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  width: 100%;
  margin: 0;
  padding: 18px 20px;
  border: 1px solid var(--dps-line);
  border-radius: 16px;
  background: #fff;
  color: var(--dps-ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.dps .dps-tab:hover {
  border-color: #c7d3fb;
  transform: translateX(4px);
}

.dps .dps-tab:focus-visible {
  outline: 2px solid var(--dps-blue);
  outline-offset: 3px;
}

.dps .dps-tab.is-active {
  border-color: var(--dps-blue-2);
  box-shadow: 0 14px 30px rgba(29, 78, 216, 0.14);
}

.dps-tab__icon {
  flex: 0 0 46px;
  height: 46px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--dps-blue);
  background: var(--dps-blue-soft);
  transition: background 0.25s ease, color 0.25s ease;
}

.dps-tab__icon svg {
  width: 22px;
  height: 22px;
}

.dps-tab.is-active .dps-tab__icon {
  color: #fff;
  background: linear-gradient(135deg, var(--dps-blue) 0%, var(--dps-blue-2) 100%);
}

.dps-tab__text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-top: 2px;
}

.dps-tab__title {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
}

.dps-tab__desc {
  color: var(--dps-muted);
  font-size: 14px;
  line-height: 1.5;
}

/* Auto-rotate progress line: iski animation khatam hote hi JS agla tab kholta hai */
.dps-tab__bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: transparent;
}

.dps-tab__bar span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--dps-blue-2), var(--dps-gold));
}

.dps__body.is-auto .dps-tab.is-active .dps-tab__bar span {
  animation: dps-fill var(--dps-cycle) linear forwards;
}

.dps__body.is-paused .dps-tab.is-active .dps-tab__bar span {
  animation-play-state: paused;
}

@keyframes dps-fill {
  from { width: 0; }
  to   { width: 100%; }
}

/* CTA */
.dps a.dps__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  background: linear-gradient(90deg, var(--dps-blue) 0%, var(--dps-blue-2) 100%);
  box-shadow: 0 10px 24px rgba(29, 78, 216, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dps a.dps__cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(29, 78, 216, 0.36);
}

.dps a.dps__cta:focus-visible,
.dps .dps__login a:focus-visible {
  outline: 2px solid var(--dps-gold);
  outline-offset: 3px;
}

.dps .dps__login {
  margin: 4px 0 0 4px;
  color: var(--dps-muted);
  font-size: 14px;
}

.dps .dps__login a {
  color: var(--dps-blue);
  font-weight: 600;
  text-decoration: none;
}

.dps .dps__login a:hover {
  text-decoration: underline;
}

/* ---------- Screen (dashboard preview) ---------- */

.dps-screen {
  position: relative;
}

.dps-screen__glow {
  position: absolute;
  inset: 8% -4% -6% 6%;
  border-radius: 40px;
  background:
    radial-gradient(circle at 15% 85%, rgba(245, 158, 11, 0.45), transparent 45%),
    radial-gradient(circle at 85% 15%, rgba(37, 99, 235, 0.5), transparent 50%);
  filter: blur(40px);
  pointer-events: none;
}

.dps-screen__frame {
  position: relative;
  border-radius: 20px;
  background: var(--dps-navy);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 60px rgba(10, 22, 51, 0.35);
  overflow: hidden;
  color: #e7ecfa;
}

.dps-screen__bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: #0d1b3e;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.dps-screen__dots {
  display: inline-flex;
  gap: 6px;
}

.dps-screen__dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2b3a63;
}

.dps-screen__dots i:first-child { background: var(--dps-gold); }
.dps-screen__dots i:nth-child(2) { background: var(--dps-lime); }

.dps-screen__url {
  flex: 1;
  max-width: 280px;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #93a0c4;
  font-size: 12px;
}

.dps-screen__app {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  min-height: 400px;
}

.dps-screen__side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 18px 0;
  background: #0c1a3b;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.dps-screen__logo {
  width: 36px;
  height: 36px;
  margin-bottom: 10px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--dps-blue-2), var(--dps-gold));
}

.dps-screen__nav {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #6f7da6;
  transition: background 0.25s ease, color 0.25s ease;
}

.dps-screen__nav svg {
  width: 19px;
  height: 19px;
}

.dps-screen__nav.is-active {
  color: #fff;
  background: rgba(37, 99, 235, 0.35);
}

.dps-screen__main {
  position: relative;
  padding: 22px 24px;
}

.dps-screen__note {
  position: relative;
  margin: 12px 0 0;
  color: #8a93a8;
  font-size: 12px;
  text-align: right;
}

/* ---------- Panels ---------- */

.dps-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dps-panel[hidden] {
  display: none;
}

.dps-panel.is-active {
  animation: dps-in 0.4s ease both;
}

.dps-panel:focus-visible {
  outline: 2px solid var(--dps-gold);
  outline-offset: 6px;
  border-radius: 8px;
}

@keyframes dps-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

.dps-panel__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.dps-panel__heading {
  color: #fff;
  font-size: 17px;
  font-weight: 600;
}

/* chips */
.dps-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #c9d2ec;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
}

.dps-chip i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.dps-chip--blue { background: rgba(37, 99, 235, 0.25); color: #9cb8ff; }
.dps-chip--gold { background: rgba(245, 158, 11, 0.18); color: #fbbf4b; }
.dps-chip--lime { background: rgba(163, 207, 18, 0.16); color: #c3e64a; }

/* buttons inside screen (decorative) */
.dps-btn {
  align-self: flex-start;
  padding: 10px 20px;
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  background: linear-gradient(90deg, var(--dps-blue), var(--dps-blue-2));
}

.dps-btn--small {
  align-self: center;
  padding: 7px 14px;
  font-size: 13px;
  background: var(--dps-gold);
  color: #1b1300;
}

/* AI chat */
.dps-chat {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dps-chat__msg {
  max-width: 88%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.6;
}

.dps-chat__msg--user {
  align-self: flex-end;
  color: #fff;
  background: linear-gradient(90deg, var(--dps-blue), var(--dps-blue-2));
  border-bottom-right-radius: 4px;
}

.dps-chat__msg--ai {
  align-self: flex-start;
  background: var(--dps-navy-2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom-left-radius: 4px;
}

.dps-chat__who {
  display: block;
  margin-bottom: 4px;
  color: var(--dps-gold);
  font-size: 12px;
  font-weight: 600;
}

.dps-chat__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.dps-input {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
  padding: 8px 8px 8px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #7c89b0;
  font-size: 13px;
}

.dps-input__send {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #1b1300;
  background: var(--dps-gold);
}

/* Start a project */
.dps-pick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.dps-pick__opt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
  background: var(--dps-navy-2);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.dps-pick__opt.is-selected {
  border-color: var(--dps-blue-2);
  box-shadow: inset 0 0 0 1px var(--dps-blue-2);
}

.dps-pick__opt strong,
.dps-proj__row strong,
.dps-inv__row strong {
  display: block;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}

.dps-pick__opt small,
.dps-proj__row small,
.dps-inv__row small {
  display: block;
  color: #8b97bd;
  font-size: 12px;
  line-height: 1.4;
}

.dps-pick__icon {
  flex: 0 0 38px;
  height: 38px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.dps-pick__icon--blue { background: linear-gradient(135deg, #4f46e5, var(--dps-blue-2)); }
.dps-pick__icon--gold { background: linear-gradient(135deg, var(--dps-gold), #f97316); }

.dps-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dps-field__label {
  color: #8b97bd;
  font-size: 12px;
}

.dps-field__box {
  padding: 11px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e7ecfa;
  font-size: 14px;
}

.dps-field__box--files {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 9px 10px;
}

/* Track progress */
.dps-proj {
  padding: 16px;
  border-radius: 14px;
  background: var(--dps-navy-2);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.dps-proj__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.dps-progress {
  height: 8px;
  margin: 14px 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.dps-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--dps-blue-2), var(--dps-lime));
}

.dps-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.dps-steps span {
  position: relative;
  padding-top: 14px;
  color: #6f7da6;
  font-size: 12px;
  text-align: center;
}

.dps-steps span::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 9px;
  height: 9px;
  margin-left: -4.5px;
  border-radius: 50%;
  background: #2b3a63;
}

.dps-steps .is-done { color: #c3e64a; }
.dps-steps .is-done::before { background: var(--dps-lime); }
.dps-steps .is-now { color: #fff; font-weight: 600; }
.dps-steps .is-now::before { background: var(--dps-blue-2); box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.3); }

.dps-proj__review {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.dps-proj__thumb {
  flex: 0 0 64px;
  height: 42px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
  background: linear-gradient(135deg, #3b2a0a, var(--dps-gold));
}

.dps-proj__note {
  flex: 1;
  color: #aab4d4;
  font-size: 13px;
  line-height: 1.5;
}

/* Payments */
.dps-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.dps-stat {
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--dps-navy-2);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.dps-stat small {
  display: block;
  color: #8b97bd;
  font-size: 12px;
}

.dps-stat strong {
  display: block;
  margin-top: 2px;
  color: #fff;
  font-size: 22px;
  font-weight: 700;
}

.dps-stat--due strong {
  color: #fbbf4b;
}

.dps-inv {
  border-radius: 14px;
  background: var(--dps-navy-2);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.dps-inv__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.dps-inv__row:last-child {
  border-bottom: 0;
}

.dps-inv__amt {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

/* ---------- Responsive ---------- */

@media (max-width: 991px) {
  .dps {
    padding: 70px 0 80px;
  }

  .dps__head {
    margin-bottom: 36px;
  }

  .dps__body {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  /* tabs horizontal pills ban jaate hain */
  .dps__tabs {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  .dps .dps-tab {
    width: auto;
    align-items: center;
    gap: 10px;
    padding: 10px 16px 12px 10px;
    border-radius: 999px;
  }

  .dps .dps-tab:hover {
    transform: none;
  }

  .dps-tab__icon {
    flex-basis: 34px;
    height: 34px;
    border-radius: 50%;
  }

  .dps-tab__icon svg {
    width: 18px;
    height: 18px;
  }

  .dps-tab__desc,
  .dps-tab__go {
    display: none;
  }

  .dps .dps__hint {
    order: 0;
    align-self: center;
  }

  /* pills pe halka pulse border, taaki tap karne layak dikhein */
  .dps__body:not(.is-touched) .dps-tab:not(.is-active) {
    animation: dps-pulse 2.4s ease-out infinite;
  }

  .dps-tab__title {
    font-size: 15px;
  }

  /* Mobile order: tabs -> screen -> CTA.
     .dps__side sirf wrapper div hai (koi role nahi), isliye display: contents safe hai */
  .dps__body {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .dps__side {
    display: contents;
  }

  .dps__tabs   { order: 1; min-width: 0; }
  .dps-screen  { order: 2; width: 100%; }
  .dps__cta-wrap {
    order: 3;
    align-items: center;
    margin-top: 0;
  }

  .dps-screen__note {
    text-align: center;
  }
}

@media (max-width: 575px) {
  .dps {
    padding: 56px 0 64px;
  }

  .dps .dps__kicker {
    letter-spacing: 4px;
  }

  .dps__tabs {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .dps__tabs::-webkit-scrollbar {
    display: none;
  }

  .dps .dps-tab {
    flex: 0 0 auto;
  }

  .dps-screen__app {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .dps-screen__side {
    display: none;
  }

  .dps-screen__main {
    padding: 18px 16px;
  }

  .dps-screen__url {
    font-size: 11px;
  }

  .dps-pick,
  .dps-stats {
    grid-template-columns: 1fr;
  }

  .dps-chat__msg {
    max-width: 95%;
    font-size: 13px;
  }

  .dps-inv__row {
    gap: 10px;
    padding: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dps .dps-tab,
  .dps a.dps__cta,
  .dps-tab__icon,
  .dps-screen__nav {
    transition: none;
  }

  .dps-panel.is-active,
  .dps__hint-icon svg,
  .dps-tab__go,
  .dps .dps-tab {
    animation: none !important;
  }
}