.layout {
  display: flex;
}

/* SIDEBAR */
.sidebar {
  width: 270px;
  padding: 30px 25px;
  background: #fff;
  border-right: 1px solid #e5e5e5;
}

.filter-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.filter-top a {
  color: #7323a8;
  font-size: 14px;
  text-decoration: none;
}

.divider {
  height: 1px;
  background: #e5e5e5;
  margin: 20px 0;
}

.filter-title {
  display: flex;
  justify-content: space-between;
  font-weight: 500;
  margin-bottom: 15px;
}

.check {
  display: flex;
  align-items: center;
  margin: 12px 0;
  font-size: 15px;
  cursor: pointer;
}

.check input {
  margin-right: 10px;
  width: 16px;
  height: 16px;
  accent-color: #7323a8;
}

.sub-box {
  background: #f3f3f3;
  padding: 15px;
  border-radius: 12px;
  margin: 10px 0 15px 20px;
}

/* MAIN */
.main {
  flex: 1;

}

.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.primary-btn {
  background: #7323a8;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 14px;
  cursor: pointer;
  transition: 0.3s;
}

.primary-btn:hover {
  background: #5e1d8a;
}

/* TAGS */
.tags {
  margin: 20px 0 25px;
}

.tag {
  display: inline-block;
  padding: 8px 16px;
  border: 1px solid #7323a8;
  color: #7323a8;
  border-radius: 20px;
  font-size: 14px;
  margin-right: 10px;
}

/* TABS */
.tabs-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ededed;
  padding: 20px 25px;
  border-radius: 20px;
}
/* ===== Mobile Responsive Fix ===== */
@media (max-width: 991px) {

  .tabs-wrapper {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
  }

  .tabs {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    white-space: nowrap;
    padding-bottom: 5px;
  }

  .tabs::-webkit-scrollbar {
    display: none;
  }

  .search-box {
    width: 100%;
  }

  .search-box input {
    width: 100%;
  }

}
.tabs {
  display: flex;
  gap: 40px;
}

.tab {
  font-size: 18px;
  cursor: pointer;
  padding-bottom: 8px;
}

.tab.active {
  color: #7323a8;
  border-bottom: 3px solid #7323a8;
}

.search-box input {
  padding: 10px 18px;
  border-radius: 25px;
  border: 1px solid #ccc;
  width: 220px;
}

/* CARD */
.card {
  margin-top: 25px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 20px;
  padding: 20px 25px;
  display: flex;
  align-items: center;
  gap: 40px;
  transition: 0.3s;
}

.card:hover {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.04);
}

.card img {
  width: 90px;
  height: 90px;
  border-radius: 15px;
  object-fit: cover;
}

.col {
  display: flex;
  flex-direction: column;
  min-width: 120px;
}

.product {
  min-width: 280px;
}

.label {
  font-size: 13px;
  color: #888;
  margin-bottom: 6px;
}

.title {
  font-weight: 500;
}

.status {
  color: #a57b00;
  font-weight: 500;
}

.dots {
  margin-left: auto;
  font-size: 22px;
  cursor: pointer;
}
/* =========================
   DESKTOP DESIGN (UNCHANGED)
========================= */

.dashboard-card {
  width: 100%;
  max-width: 1120px;
  background: #ffffff;
  padding: 24px 28px;
}

/* Layout */
.layout {
  display: flex;
  gap: 32px;
}

.sidebar {
  width: 260px;
  flex-shrink: 0;
}

.main {
  flex: 1;
}

/* Product Row */
.product-row {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid #edeff2;
}

.product-row:last-of-type {
  border-bottom: none;
}

.product-image {
  width: 80px;
  height: 80px;
  background-color: #e7e9ed;
  border-radius: 14px;
  background-image: url("https://via.placeholder.com/80/e7e9ed/8a8f99?text=img");
  background-size: cover;
  background-position: center;
}

.col-product {
  flex: 2.2;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.col {
  flex: 1;
  min-width: 110px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.product-title {
  font-size: 16px;
  font-weight: 600;
  color: #121926;
}

.status {
  display: inline-block;
  background: linear-gradient(0deg, #f0f2f6, #ffffff);
  color: #2c3e5c;
  font-weight: 600;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 40px;
  min-width: 80px;
  text-align: center;
  border: 1px solid #e0e4ea;
}

.pending {
  color: brown;
}

.dots-menu {
  font-size: 22px;
  color: #7a8699;
  width: 28px;
  text-align: right;
  transform: translateY(-6px);
}

/* =========================
   MOBILE RESPONSIVE (NEW)
========================= */

@media (max-width: 991px) {

  /* Layout becomes vertical */
  .layout {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
  }

  .main {
    width: 100%;
  }

  .dashboard-card {
    padding: 18px;
  }

  /* Header responsive */
  .main-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .primary-btn {
    width: 100%;
  }

  /* Tabs scroll horizontally */
  .tabs {
    display: flex;
    overflow-x: auto;
    gap: 16px;
    padding-bottom: 8px;
  }

  .tabs::-webkit-scrollbar {
    display: none;
  }

  /* Product Card Mobile Design */
  .product-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    border: 1px solid #eef0f3;
    border-radius: 16px;
    margin-bottom: 14px;
  }

  .product-image {
    width: 100%;
    height: 180px;
    border-radius: 16px;
  }

  .col-product,
  .col {
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .col-product span:first-child,
  .col span:first-child {
    font-size: 13px;
    color: #7a8699;
  }

  .col-product span:last-child,
  .col span:last-child {
    text-align: right;
    font-weight: 600;
  }

  .dots-menu {
    align-self: flex-end;
    transform: none;
  }

  /* Tags wrap */
  .tags {
    flex-wrap: wrap;
    gap: 8px;
  }

  /* Search box full width */
  .search-box input {
    width: 100%;
  }

}

/* =========================
   SMALL MOBILE
========================= */

@media (max-width: 576px) {

  .product-image {
    height: 150px;
  }

  .product-title {
    font-size: 14px;
  }

  .status {
    font-size: 12px;
    padding: 5px 10px;
  }

/* ---------- Overlay & Backdrop ---------- */
#subscriptionOverlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: fadeIn .25s ease;
}
.sub-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(10, 5, 20, 0.72);
    backdrop-filter: blur(6px);
}

/* ---------- Modal Shell ---------- */
.sub-modal {
    position: relative;
    background: #fff;
    border-radius: 28px;
    width: 100%;
    max-width: 960px;
    max-height: 92vh;
    overflow-y: auto;
    padding: 48px 40px 36px;
    box-shadow: 0 32px 80px rgba(111,45,168,.25);
    scrollbar-width: thin;
}
.sub-modal::-webkit-scrollbar { width: 5px; }
.sub-modal::-webkit-scrollbar-thumb { background: #e0d0f5; border-radius: 10px; }

.sub-close {
    position: absolute;
    top: 18px; right: 22px;
    background: #f3eeff;
    border: none;
    width: 36px; height: 36px;
    border-radius: 50%;
    font-size: 15px;
    color: #6f2da8;
    cursor: pointer;
    transition: background .2s;
    line-height: 1;
}
.sub-close:hover { background: #e8d8ff; }

/* ---------- Header ---------- */
.sub-header { text-align: center; margin-bottom: 28px; }
.sub-badge {
    display: inline-block;
    background: linear-gradient(135deg, #6f2da8, #a855f7);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 5px 18px;
    border-radius: 100px;
    margin-bottom: 14px;
}
.sub-title {
    font-size: 30px;
    font-weight: 800;
    color: #1a0533;
    line-height: 1.25;
    margin: 0 0 8px;
    font-family: 'Segoe UI', Georgia, serif;
}
.sub-title span { color: #6f2da8; }
.sub-subtitle { color: #888; font-size: 14px; margin: 0; }

/* ---------- Billing Toggle ---------- */
.sub-toggle-wrap {
    display: flex;
    justify-content: center;
    gap: 6px;
    background: #f5f0ff;
    border-radius: 100px;
    padding: 5px;
    width: fit-content;
    margin: 0 auto 32px;
}
.sub-toggle {
    border: none;
    background: transparent;
    border-radius: 100px;
    padding: 8px 24px;
    font-size: 14px;
    font-weight: 600;
    color: #888;
    cursor: pointer;
    transition: all .2s;
    display: flex;
    align-items: center;
    gap: 7px;
}
.sub-toggle.active {
    background: #6f2da8;
    color: #fff;
    box-shadow: 0 4px 12px rgba(111,45,168,.3);
}
.save-badge {
    background: #ff6b6b;
    color: #fff;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 100px;
    font-weight: 700;
}

/* ---------- Plan Cards Grid ---------- */
.sub-plans {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}
@media (max-width: 768px) {
    .sub-plans { grid-template-columns: 1fr; }
    .sub-modal { padding: 36px 20px 28px; }
    .sub-title { font-size: 22px; }
}

/* ---------- Individual Card ---------- */
.sub-card {
    border: 2px solid #ede8f7;
    border-radius: 20px;
    padding: 28px 24px;
    position: relative;
    transition: transform .2s, box-shadow .2s;
    background: #fff;
}
.sub-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(111,45,168,.12);
}
.sub-card--popular {
    border-color: #6f2da8;
    background: linear-gradient(160deg, #faf6ff 0%, #f3e8ff 100%);
    box-shadow: 0 8px 28px rgba(111,45,168,.18);
}

.popular-ribbon {
    position: absolute;
    top: -1px; right: 20px;
    background: linear-gradient(135deg, #6f2da8, #a855f7);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 5px 14px 7px;
    border-radius: 0 0 12px 12px;
}

.plan-icon { font-size: 28px; margin-bottom: 10px; }
.plan-name {
    font-size: 18px;
    font-weight: 800;
    color: #1a0533;
    margin-bottom: 12px;
}
.plan-price {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    margin-bottom: 20px;
}
.currency {
    font-size: 14px;
    font-weight: 700;
    color: #6f2da8;
    margin-bottom: 6px;
}
.amount {
    font-size: 42px;
    font-weight: 900;
    color: #1a0533;
    line-height: 1;
    font-family: 'Segoe UI', Georgia, serif;
}
.period { font-size: 13px; color: #aaa; margin-bottom: 6px; }

/* ---------- Features List ---------- */
.plan-features {
    list-style: none;
    padding: 0; margin: 0 0 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.plan-features li {
    font-size: 13.5px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}
.plan-features li.muted { color: #bbb; }
.feat-icon {
    width: 18px; height: 18px;
    border-radius: 50%;
    background: #f0e6ff;
    color: #6f2da8;
    font-size: 10px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.plan-features li.muted .feat-icon {
    background: #f5f5f5;
    color: #ccc;
}

/* ---------- Buttons ---------- */
.plan-btn {
    width: 100%;
    padding: 12px 0;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all .2s;
    letter-spacing: .3px;
}
.plan-btn-primary {
    background: linear-gradient(135deg, #6f2da8, #a855f7);
    color: #fff;
    box-shadow: 0 6px 18px rgba(111,45,168,.35);
}
.plan-btn-primary:hover {
    box-shadow: 0 8px 24px rgba(111,45,168,.5);
    transform: translateY(-1px);
}
.plan-btn-outline {
    background: transparent;
    color: #6f2da8;
    border: 2px solid #6f2da8;
}
.plan-btn-outline:hover {
    background: #f5eeff;
}

/* ---------- Footer ---------- */
.sub-footer-note {
    text-align: center;
    font-size: 13px;
    color: #aaa;
    margin: 0;
}

/* ---------- Fade animation ---------- */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

}