/* =====================================================
   DESIGN TOKENS
===================================================== */
:root {
  --primary: #3b5bff;
  --primary-dark: #273fe6;
  --accent: #22c55e;
  --bg-main: #f4f7ff;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-soft: rgba(148, 163, 184, 0.25);
  --radius-lg: 18px;
  --radius-md: 12px;
  --shadow-soft: 0 10px 30px rgba(0,0,0,.08);
  --shadow-hover: 0 22px 48px rgba(0,0,0,.16);
}

/* =====================================================
   GLOBAL
===================================================== */
* { box-sizing: border-box; }

body {
  background: radial-gradient(1200px 500px at top, #eef2ff, transparent), var(--bg-main);
  background: unset;
  color: var(--text-main);
  font-family: "Inter", system-ui, sans-serif;
}

.container {
  max-width: 1280px;
  padding: 0 20px;
  margin: auto;
}

/* =====================================================
   HERO
===================================================== */
.pms-hero {
  padding: 80px 0 70px;
}

.pms-hero-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
}

.pms-hero-sub {
  margin-top: 10px;
  font-size: 17px;
  color: var(--text-muted);
}

/* =====================================================
   SEARCH
===================================================== */
.pms-search-input {
  margin: 28px 0;
  width: 100%;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
}

/* =====================================================
   PROVIDERS
===================================================== */
.pms-marquee-wrapper {
  margin-top: 42px;
  padding: 20px 0;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.pms-marquee-track {
  display: flex;
  gap: 26px;
  animation: marquee 28s linear infinite;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.pms-card {
  /* min-width: 200px; */
  min-width: 220px;
  padding: 18px;
  border-radius: var(--radius-md);
  background-color: #f5f7fb;
  text-align: center;
  transition: .3s;
  word-wrap:break-word;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.pms-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.pms-name {
  font-size: 14px;
  font-weight: 600;
  margin-top: 8px;
}

/* =====================================================
   MOST WATCHED
===================================================== */
.pms-watched {
  padding: 80px 0;
}

#pms-watched-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(240px,1fr));
  gap: 28px;
  margin-top: 30px;
}

.pms-watched-card {
  padding: 26px;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg,#fff,#eef2ff);
  transition: .3s;
  cursor: pointer;
    background: var(--surface-light);
    padding: 32px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.pms-watched-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
    box-shadow: 0 30px 60px -10px rgba(0, 0, 0, 0.04);
}

.pms-return {
  margin-top: 14px;
  font-size: 22px;
  font-weight: 800;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text; /* Add this line */
  color: transparent;
}


/* =====================================================
   TABLE (DESKTOP – MODERN)
===================================================== */
.pms-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 14px;
}

.pms-table thead th {
  padding: 12px 18px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-align: left;
}

.pms-table tbody tr {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  transition: transform .25s ease, box-shadow .25s ease;
}

.pms-table tbody tr:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.pms-table td {
  padding: 18px;
  font-size: 14.5px;
  font-weight: 500;
  vertical-align: middle;
}

.pms-table td:first-child {
  font-weight: 700;
  color: var(--text-main);
}

.pms-table td:nth-child(4),
.pms-table td:nth-child(5) {
  font-weight: 700;
}

.pms-empty {
  text-align: center;
  padding: 36px;
  font-size: 15px;
  color: var(--text-muted);
}

/* =====================================================
   PAGINATION – POLISHED UI
===================================================== */
.pms-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  /* margin: 40px 0 24px; */
  padding: 40px 0 24px;
  flex-wrap: nowrap; /* ✅ NO WRAP */
  white-space: nowrap; /* ✅ FORCE SINGLE LINE */
  overflow-x: auto; /* ✅ SCROLL IF NEEDED */
  -ms-overflow-style: none; /* IE and Edge */
}

.pms-pagination::-webkit-scrollbar {
  display: none; /* Chrome / Safari */
}


/* Base button */
.pms-pagination button,
.pms-pagination .pg-btn {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 1.5px solid #e5e7eb;
  background: #fff;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s ease;
}

/* Hover */
.pms-pagination button:hover:not(.active):not(:disabled) {
  border-color: var(--logo-dark-yellow);
  color: var(--logo-dark-yellow);
  transform: translateY(-1px);
}

/* Active */
.pms-pagination .active {
  /* background: linear-gradient(135deg, #ff8a4c, #ff6a2b); */
  background: linear-gradient(135deg, var(--logo-light-yellow), var(--logo-dark-yellow));
  color: #fff;
  border-color: transparent;
  /* box-shadow: 0 8px 20px rgba(255,138,76,.35); */
}

/* Disabled */
.pms-pagination button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Arrow buttons */
.pms-pagination button:first-child,
.pms-pagination button:last-child {
  font-size: 20px;
}


/* =====================================================
   FILTER BAR
===================================================== */
.pms-filter-wrap {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 22px 26px;
  box-shadow: var(--shadow-soft);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
  /* margin: 30px 0 20px; */
  margin: 25px auto;
}

/* LEFT */
.pms-filter-left {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.filter-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* Chip group */
.pms-chip-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Chip */
.pms-chip {
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s ease;
}

.pms-chip:hover {
  /* border-color: var(--primary); */
  border-color: var(--logo-dark-yellow);
  /* color: var(--primary); */
  color: var(--logo-dark-yellow);
  transform: translateY(-1px);
}

.pms-chip.active {
  /* background: linear-gradient(135deg, var(--primary), var(--accent)); */
  background: linear-gradient(135deg, var(--logo-dark-yellow), var(--logo-light-yellow));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(59,91,255,.35);
}

/* RIGHT */
.pms-filter-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sort-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.pms-sort {
  appearance: none;
  padding: 10px 38px 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border-soft);
  background:
    #fff
    url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 7L10 12L15 7' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    no-repeat right 12px center;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.pms-sort:hover,
.pms-sort:focus {
  border-color: var(--primary);
  outline: none;
}


/* =====================================================
   MOBILE TABLE – MODERN CARD UI
===================================================== */
@media (max-width: 768px) {

  .pms-table thead {
    display: none;
  }

  .pms-table,
  .pms-table tbody {
    display: block;
    width: 100%;
  }

  .pms-table tbody tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 16px;
    padding: 18px;
    margin-bottom: 18px;
    border-radius: 18px;
    background: var(--bg-card);
    box-shadow: var(--shadow-soft);
  }

  .pms-table td {
    padding: 0;
    font-size: 14px;
  }

  /* Scheme name – full width */
  .pms-table td:first-child {
    grid-column: 1 / -1;
    font-size: 16px;
    font-weight: 800;
  }

  /* Provider */
  .pms-table td:nth-child(2) {
    grid-column: 1 / -1;
    font-size: 13px;
    color: var(--text-muted);
  }

  /* Labels via pseudo */
  .pms-table td::before {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 2px;
  }

  .pms-table td:nth-child(3)::before { content: "Category"; }
  .pms-table td:nth-child(4)::before { content: "1Y Return"; }
  .pms-table td:nth-child(5)::before { content: "3Y Return"; }
  .pms-table td:nth-child(6)::before { content: "Min Investment"; }

  /* Returns highlight */
  .pms-table td:nth-child(4),
  .pms-table td:nth-child(5) {
    font-weight: 800;
    color: var(--primary-dark);
  }
  .pms-filter-wrap {
    padding: 18px;
    gap: 18px;
  }

  .pms-filter-right {
    width: 100%;
    justify-content: space-between;
  }

  .pms-sort {
    width: 160px;
  }

}
@media (max-width: 600px) {

  .pms-pagination {
    gap: 8px;
    /* margin: 30px 0 20px; */
    padding: 30px 0 20px;
  }

  .pms-pagination button,
  .pms-pagination .pg-btn {
    width: 40px;
    height: 40px;
    font-size: 14px;
    border-radius: 10px;
  }

  /* Optional: horizontal scroll instead of overflow */
  .pms-pagination {
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 6px;
  }

  .pms-pagination::-webkit-scrollbar {
    display: none;
  }
}

/* =====================================================
   PMS DETAIL MODAL
===================================================== */

/* Overlay */
.pms-modal-overlay {
  position: fixed;
  inset: 0;

  background: rgba(15, 23, 42, 0.65);

  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);

  z-index: 9999; /* 🔥 ABOVE NAVBAR */

  display: flex;
  align-items: center;
  justify-content: center;

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}


.pms-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}


/* Modal Container */
.pms-modal {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 920px;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: var(--shadow-hover);

  display: flex;
  flex-direction: column;
  transform: translateY(20px) scale(0.98);
  transition: transform 0.25s ease;
}

.pms-modal-overlay.active .pms-modal {
  transform: translateY(0) scale(1);
}

/* Header */
.pms-modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pms-modal-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
}

/* Close Button */
.pms-modal-close {
  background: #f8fafc;
  border: 1px solid var(--border-soft);
  width: 36px;
  height: 36px;
  border-radius: 50%;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 22px;
  font-weight: 700;
  cursor: pointer;

  color: #111827; /* FORCE DARK */
  transition: all 0.2s ease;
}

.pms-modal-close:hover {
  background: #fee2e2;
  color: var(--red);
  transform: rotate(90deg);
}
.compare-table tbody tr.pms-row {
  cursor: pointer;
}


/* Body */
.pms-modal-body {
  padding: 24px;
  overflow-y: auto;
}

/* Section */
.pms-modal-section {
  margin-bottom: 28px;
}

.pms-modal-section h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* Grid */
.pms-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

/* Item */
.pms-detail-item {
  background: #f8fafc;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  border: 1px solid var(--border-soft);
}

.pms-detail-item span {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.pms-detail-item strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

/* Links */
.pms-detail-item a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.pms-detail-item a:hover {
  text-decoration: underline;
}

/* Footer */
.pms-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.pms-modal-footer button {
  padding: 10px 16px;
  border-radius: var(--radius-md);
  border: none;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  background: var(--primary);
  color: #fff;
}

.pms-modal-footer button:hover {
  background: var(--primary-dark);
}

/* =====================================================
   MOBILE
===================================================== */

@media (max-width: 768px) {
  .pms-modal {
    max-height: 95vh;
    border-radius: 16px;
  }

  .pms-modal-body {
    padding: 18px;
  }

  .pms-modal-title {
    font-size: 18px;
  }


  .pms-hero {
    padding: 20px 0;
  }
}
.pagination-dots {
  padding: 0 8px;
  color: var(--text-muted);
  font-weight: 700;
}
