
:root {
  --green-primary: #3FA92B;
  --green-light: #76D164;
  --green-dark: #26B70B;
  --green-grad: linear-gradient(97deg, #76D164, #3FA92B);
  --green-soft: rgba(63,169,43,0.08);
  --green-soft-2: rgba(63,169,43,0.15);
  --text-dark: #0F1014;
  --text-muted: #6B7280;
  --border: #E5E7EB;
  --bg-page: #F1F4F8;
  --warn: #F59E0B;
  --warn-soft: rgba(245,158,11,0.1);
  --danger: #EF4444;
  --danger-soft: rgba(239,68,68,0.1);
  --blue: #138EFF;
  --blue-soft: rgba(19,142,255,0.1);
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.06);
  --shadow-lg: 0 20px 50px rgba(0,0,0,0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.page {
  font-family: 'Poppins', system-ui, sans-serif;
  background: var(--bg-page);
  color: var(--text-dark);
  font-size: 14px;
  line-height: 1.5;
}

/* ── Layout ── */
.app {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 240px;
  background: white;
  border-right: 1px solid var(--border);
  padding: 22px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 22px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}

.logo-icon {
  width: 38px;
  height: 38px;
  background: var(--green-grad);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 17px;
  box-shadow: 0 4px 12px rgba(63,169,43,0.3);
}

.logo-text {
  font-weight: 800;
  font-size: 17px;
}

  .logo-text span {
    color: var(--green-primary);
  }

.nav-label {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 14px 10px 6px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 9px;
  color: #374151;
  text-decoration: none;
  font-weight: 500;
  margin-bottom: 2px;
  transition: all 0.25s;
  cursor: pointer;
  font-size: 13px;
}

  .nav-item:hover {
    background: var(--green-soft);
    color: var(--green-primary);
  }

  .nav-item.active {
    background: var(--green-grad);
    color: white;
    box-shadow: 0 4px 12px rgba(63,169,43,0.35);
  }

  .nav-item i {
    width: 16px;
    font-size: 14px;
  }

  .nav-item .badge {
    margin-left: auto;
    background: var(--warn);
    color: white;
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 20px;
    font-weight: 700;
  }

/* Main */
.main {
  flex: 1;
  min-width: 0;
}

.topbar {
  background: white;
  padding: 14px 28px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 20;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 13px;
}

  .breadcrumb .current {
    color: var(--text-dark);
    font-weight: 700;
  }

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--bg-page);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all 0.3s;
  color: #374151;
}

  .icon-btn:hover {
    background: var(--green-soft);
    border-color: var(--green-primary);
    color: var(--green-primary);
  }

  .icon-btn .dot {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid white;
    animation: pulse 2s infinite;
  }

@keyframes pulse {
  0%,100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.3);
  }
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--green-grad);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(63,169,43,0.3);
}

/* Content */
.content {
  padding: 28px;
  max-width: 1400px;
  margin: 0 auto;
}

/* Page header */
.page-header {
  margin-bottom: 24px;
  animation: slideDown 0.5s ease;
  padding: 0px;
}

.page-title {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 4px;
  color: #0F1014;
}

.page-subtitle {
  color: var(--text-muted);
  font-size: 14px;
}

/* ── Trial Alert Banner ── */
.alert-banner {
  background: linear-gradient(100deg, #FFFBEB, #FEF3C7);
  border: 1px solid #FCD34D;
  border-left: 5px solid var(--warn);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  animation: slideUp 0.6s ease;
  box-shadow: 0 4px 20px rgba(245,158,11,0.15);
}

  .alert-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at right, rgba(245,158,11,0.15), transparent);
    pointer-events: none;
  }

.alert-icon {
  width: 52px;
  height: 52px;
  background: var(--warn);
  color: white;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  box-shadow: 0 8px 20px rgba(245,158,11,0.4);
  animation: bellRing 1.5s ease infinite;
  position: relative;
}

  .alert-icon i {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }

@keyframes bellRing {
  0%,50%,100% {
    transform: rotate(0);
  }

  10%,30% {
    transform: rotate(-15deg);
  }

  20%,40% {
    transform: rotate(15deg);
  }
}

.alert-content {
  flex: 1;
  position: relative;
}

.alert-title {
  font-weight: 800;
  font-size: 16px;
  color: #92400E;
  margin-bottom: 3px;
}

.alert-text {
  font-size: 13px;
  color: #78350F;
}

  .alert-text strong {
    color: #92400E;
  }

.alert-btn {
  padding: 11px 22px;
  background: var(--warn);
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 14px rgba(245,158,11,0.4);
  position: relative;
  white-space: nowrap;
  outline: none;
}

  .alert-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(245,158,11,0.5);
  }

  .alert-btn:focus,
  .alert-btn:active {
    outline: none;
  }

/* ── Current Plan Card ── */
.current-plan-section {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-bottom: 28px;
  align-items: start;
}

@media (max-width: 968px) {
  .current-plan-section {
    grid-template-columns: 1fr;
  }
}

.current-plan-card {
  background: linear-gradient(135deg, #3FA92B 0%, #26B70B 100%);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  color: white;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(63,169,43,0.3);
  animation: slideUp 0.6s ease 0.1s both;
}

  .current-plan-card.expired {
    background: linear-gradient(135deg, #EF4444 0%, #B91C1C 100%);
    box-shadow: 0 20px 50px rgba(239,68,68,0.3);
  }

    .current-plan-card.expired .cp-status {
      color: #fff;
    }

      .current-plan-card.expired .cp-status .dot {
        background: #FCA5A5;
        box-shadow: 0 0 12px #FCA5A5;
      }

    .current-plan-card.expired .cp-progress-fill {
      background: linear-gradient(90deg, #ffffff, #FCA5A5);
    }

    .current-plan-card.expired .cp-btn:not(.ghost) {
      color: var(--danger);
    }

  .current-plan-card::before, .current-plan-card::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    pointer-events: none;
  }

  .current-plan-card::before {
    width: 300px;
    height: 300px;
    top: -100px;
    right: -80px;
    animation: orbit 20s linear infinite;
  }

  .current-plan-card::after {
    width: 200px;
    height: 200px;
    bottom: -80px;
    left: -40px;
    animation: orbit 25s linear infinite reverse;
  }

@keyframes orbit {
  from {
    transform: rotate(0);
  }

  to {
    transform: rotate(360deg);
  }
}

.cp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  position: relative;
}

.cp-label {
  font-size: 11px;
  opacity: 0.85;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  margin-bottom: 6px;
}

.cp-name {
  font-size: 32px;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 10px;
}

.cp-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(10px);
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

  .cp-status .dot {
    width: 7px;
    height: 7px;
    background: #4ADE80;
    border-radius: 50%;
    box-shadow: 0 0 12px #4ADE80;
    animation: pulse 2s infinite;
  }

.cp-price {
  text-align: right;
  position: relative;
}

.cp-price-amt {
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
}

.cp-price-per {
  font-size: 12px;
  opacity: 0.85;
  margin-top: 4px;
}

.cp-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 20px 0;
  border-top: 1px solid rgba(255,255,255,0.2);
  border-bottom: 1px solid rgba(255,255,255,0.2);
  position: relative;
}

.cp-stat {
  text-align: center;
}

.cp-stat-value {
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}

.cp-stat-label {
  font-size: 11px;
  opacity: 0.85;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.cp-progress-wrap {
  margin-top: 18px;
  position: relative;
}

.cp-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 8px;
  opacity: 0.95;
  font-weight: 600;
}

.cp-progress {
  width: 100%;
  height: 8px;
  background: rgba(255,255,255,0.2);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.cp-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #ffffff, #4ADE80);
  border-radius: 10px;
  width: 0%;
  transition: width 2s cubic-bezier(0.2, 0.9, 0.3, 1);
  position: relative;
  box-shadow: 0 0 20px rgba(255,255,255,0.5);
}

  .cp-progress-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 2s infinite;
  }

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

.cp-footer {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  position: relative;
}

.cp-btn {
  flex: 1;
  padding: 12px;
  background: white;
  color: var(--green-primary);
  border: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  outline: none;
}

  .cp-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.2);
  }

  .cp-btn:focus,
  .cp-btn:active {
    outline: none;
  }

  .cp-btn.ghost {
    background: transparent;
    color: white;
    border: 2px solid rgba(255,255,255,0.4);
  }

    .cp-btn.ghost:hover {
      background: rgba(255,255,255,0.15);
    }

/* Usage card */
.usage-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  animation: slideUp 0.6s ease 0.2s both;
  display: flex;
  flex-direction: column;
  height: fit-content;
}

  .usage-card h3 {
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
  }

    .usage-card h3 i {
      color: var(--green-primary);
    }

.usage-items-container {
  overflow-y: auto;
  max-height: 287px;
  padding-right: 8px;
  margin-right: -8px;
}

  .usage-items-container::-webkit-scrollbar {
    width: 6px;
  }

  .usage-items-container::-webkit-scrollbar-track {
    background: #F3F4F6;
    border-radius: 10px;
  }

  .usage-items-container::-webkit-scrollbar-thumb {
    background: var(--green-primary);
    border-radius: 10px;
  }

    .usage-items-container::-webkit-scrollbar-thumb:hover {
      background: var(--green-dark);
    }

.usage-item {
  margin-bottom: 16px;
}

  .usage-item:last-child {
    margin-bottom: 0;
  }

.usage-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-size: 13px;
}

  .usage-row .name {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
  }

    .usage-row .name i {
      width: 24px;
      height: 24px;
      background: var(--green-soft);
      color: var(--green-primary);
      border-radius: 6px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 11px;
    }

  .usage-row .value {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 12px;
  }

    .usage-row .value strong {
      color: var(--text-dark);
      font-weight: 700;
    }

.usage-bar {
  height: 6px;
  background: #F3F4F6;
  border-radius: 6px;
  overflow: hidden;
}

.usage-fill {
  height: 100%;
  background: var(--green-grad);
  border-radius: 6px;
  width: 0;
  transition: width 1.5s cubic-bezier(0.2, 0.9, 0.3, 1);
}

/* ── Plans Grid ── */
.plans-section-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 28px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  animation: slideUp 0.6s ease 0.3s both;
  margin-bottom: 24px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

  .section-head h2 {
    font-size: 18px;
    font-weight: 800;
  }

  .section-head p {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 2px;
  }

.billing-tabs {
  display: inline-flex;
  background: var(--bg-page);
  border-radius: 50px;
  padding: 4px;
  position: relative;
  border: 1px solid var(--border);
}

.tab-slider {
  position: absolute;
  top: 4px;
  left: 4px;
  height: calc(100% - 8px);
  background: var(--green-grad);
  border-radius: 50px;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 1;
  box-shadow: 0 4px 12px rgba(63,169,43,0.35);
}

.billing-tab {
  padding: 10px 22px;
  border: none;
  background: transparent;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  color: var(--text-muted);
  font-family: inherit;
  transition: color 0.3s ease;
  white-space: nowrap;
  position: relative;
  z-index: 2;
  outline: none;
}

  .billing-tab:hover {
    color: var(--green-primary);
  }

  .billing-tab:focus,
  .billing-tab:active {
    outline: none;
  }

  .billing-tab.active {
    color: white;
  }

.save-tag {
  background: rgba(255,255,255,0.25);
  color: white;
  font-size: 9px;
  padding: 3px 8px;
  border-radius: 10px;
  margin-left: 5px;
  font-weight: 800;
  transition: all 0.3s;
}

.billing-tab:not(.active) .save-tag {
  background: var(--warn-soft);
  color: var(--warn);
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.plan-card {
  background: white;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  position: relative;
  transition: all 0.4s cubic-bezier(0.2, 0.9, 0.3, 1);
  cursor: pointer;
  animation: cardIn 0.6s ease both;
  overflow: visible;
}

  .plan-card:nth-child(1) {
    animation-delay: 0.35s;
  }

  .plan-card:nth-child(2) {
    animation-delay: 0.4s;
  }

  .plan-card:nth-child(3) {
    animation-delay: 0.45s;
  }

  .plan-card:nth-child(4) {
    animation-delay: 0.5s;
  }

  /*.plan-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--green-grad);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }*/

  .plan-card:hover::before {
    transform: scaleX(1);
  }

  .plan-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(63,169,43,0.15);
    border-color: var(--green-primary);
  }

  .plan-card.current-badge {
    border-color: var(--green-primary);
    background: linear-gradient(180deg, #fff 0%, #f7fdf5 100%);
  }

    .plan-card.current-badge::before {
      transform: scaleX(1);
      height: 4px;
    }

  .plan-card.recommended {
    border-color: var(--green-primary);
    background: linear-gradient(180deg, #fff 0%, #f7fdf5 100%);
    box-shadow: 0 8px 24px rgba(63,169,43,0.15);
  }

    .plan-card.recommended::before {
      transform: scaleX(1);
    }

    .plan-card.recommended.highlight-focus {
      animation: cardFocusPulse 0.6s ease;
      box-shadow: 0 0 0 4px var(--green-primary), 0 16px 40px rgba(63,169,43,0.3);
    }

.plan-tag {
  position: absolute;
  top: -10px;
  right: 16px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

  .plan-tag.current {
    background: var(--green-primary);
    color: white;
  }

  .plan-tag.recommended {
    background: var(--green-grad);
    color: white;
    animation: bounceTag 2s ease infinite;
  }

@keyframes bounceTag {
  0%,100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-3px);
  }
}

.plan-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.plan-icon-sm {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--green-soft);
  color: var(--green-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.4s;
  flex-shrink: 0;
}

.plan-card:hover .plan-icon-sm {
  background: var(--green-grad);
  color: white;
  transform: rotate(-8deg) scale(1.1);
}

.plan-name-sm {
  font-size: 16px;
  font-weight: 800;
}

.plan-sub {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.plan-price-sm {
  margin: 14px 0;
  display: flex;
  align-items: baseline;
  gap: 4px;
}

  .plan-price-sm .curr {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-muted);
  }

  .plan-price-sm .amt {
    font-size: 36px;
    font-weight: 900;
    background: var(--green-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    transition: all 0.3s;
    display: inline-block;
  }

    .plan-price-sm .amt.price-pop {
      animation: pricePop 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.2);
    }

  .plan-price-sm .per {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
  }

.plan-features-sm {
  list-style: none;
  margin: 14px 0;
  padding-top: 14px;
  border-top: 2px dashed var(--border);
}

  .plan-features-sm li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: #4B5563;
    padding: 6px 0;
    font-weight: 500;
  }

    .plan-features-sm li.available i {
      color: var(--green-primary);
      font-size: 10px;
      width: 18px;
      height: 18px;
      background: var(--green-soft);
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }

    .plan-features-sm li.unavailable {
      color: #9CA3AF;
    }

      .plan-features-sm li.unavailable i {
        color: #EF4444;
        font-size: 10px;
        width: 18px;
        height: 18px;
        background: #FEE2E2;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
      }

/* Custom Package Quantity Input */
.custom-qty-input {
  width: 60px;
  padding: 4px 8px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 800;
  font-family: inherit;
  text-align: center;
  background: #FAFBFC;
  color: var(--text-dark);
  transition: all 0.3s;
  outline: none;
}

  .custom-qty-input:focus {
    border-color: var(--green-primary);
    background: white;
    box-shadow: 0 0 0 3px var(--green-soft);
  }

  .custom-qty-input::-webkit-inner-spin-button,
  .custom-qty-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }

  .custom-qty-input[type=number] {
    -moz-appearance: textfield;
  }

  .custom-qty-input::placeholder {
    color: #9CA3AF;
    font-weight: 500;
  }

/* Custom Package Feature Checkbox */
.custom-feature {
  position: relative;
  padding-left: 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

.feature-control {
  width: 60px;
  min-width: 60px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.custom-feature-checkbox {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.custom-checkbox-label {
  position: relative;
  display: inline-block;
  width: 18px;
  height: 18px;
  background: var(--green-soft);
  border: 2px solid var(--green-primary);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s;
  flex-shrink: 0;
  margin: 0;
  vertical-align: middle;
}

  .custom-checkbox-label:hover {
    border-color: var(--green-dark);
    background: var(--green-soft-2);
    transform: scale(1.1);
  }

.custom-feature-checkbox:checked + .custom-checkbox-label {
  background: var(--green-grad);
  border-color: var(--green-primary);
}

  .custom-feature-checkbox:checked + .custom-checkbox-label::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
  }

.custom-feature-checkbox:focus + .custom-checkbox-label {
  box-shadow: 0 0 0 3px var(--green-soft);
}

.custom-feature .feature-name {
  font-size: 12px;
  color: #4B5563;
  font-weight: 500;
  vertical-align: middle;
  flex: 1;
}

.plan-action-sm {
  width: 100%;
  padding: 12px;
  border: 1.5px solid var(--green-primary);
  background: white;
  color: var(--green-primary);
  border-radius: 10px;
  font-weight: 700;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  outline: none;
}

  .plan-action-sm:hover {
    background: var(--green-grad);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(63,169,43,0.35);
  }

  .plan-action-sm:focus,
  .plan-action-sm:active {
    outline: none;
  }

  .plan-action-sm.current-btn {
    background: #F3F4F6;
    color: var(--text-muted);
    border-color: var(--border);
    cursor: default;
  }

    .plan-action-sm.current-btn:hover {
      transform: none;
      background: #F3F4F6;
      color: var(--text-muted);
      box-shadow: none;
    }

  .plan-action-sm.upgrade {
    background: var(--green-grad);
    color: white;
    border-color: transparent;
    box-shadow: 0 8px 20px rgba(63,169,43,0.3);
  }

    .plan-action-sm.upgrade:hover {
      box-shadow: 0 12px 28px rgba(63,169,43,0.45);
    }

/* ── Billing History ── */
.history-section {
  background: white;
  border-radius: var(--radius-lg);
  padding: 28px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  animation: slideUp 0.6s ease 0.4s both;
  margin-bottom: 24px;
}

/* Tabs — Plan History / Payment History — bigger, merged with the table card */
.history-section .nav-tabs {
  border-bottom: 1px solid var(--border);
  margin: 0 -28px 0;
  padding: 0 18px;
  gap: 4px;
  background: transparent;
}

.history-section .nav-tabs .nav-item {
  margin-bottom: -1px;
}

.history-section .nav-tabs .nav-link {
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  padding: 14px 22px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  transition: color .15s ease, background .15s ease, border-color .15s ease;
  cursor: pointer;
}

.history-section .nav-tabs .nav-link:hover {
  color: var(--green-primary);
  background: var(--green-soft);
}

.history-section .nav-tabs .nav-link.active {
  color: var(--green-primary);
  background: transparent;
  border-bottom-color: var(--green-primary);
}

.history-section .tab-content {
  padding-top: 18px;
}

.table-wrap {
  overflow-x: auto;
  border-radius: 10px;
  border: 1px solid var(--border);
}

table.history {
  width: 100%;
  border-collapse: collapse;
}

  table.history th, table.history td {
    padding: 14px 16px;
    text-align: left;
    font-size: 13px;
    border-bottom: 1px solid #F3F4F6;
  }

  table.history th {
    background: linear-gradient(180deg, #FCFCFD 0%, #F1F2F4 100%);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
    color: #6B7280;
  }

  table.history tr:last-child td {
    border-bottom: none;
  }

  table.history tr:hover td {
    background: var(--green-soft);
  }

  table.history tr {
    transition: background 0.3s;
  }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

  .status-pill.paid {
    background: var(--green-soft);
    color: var(--green-primary);
  }

  .status-pill.pending {
    background: var(--warn-soft);
    color: var(--warn);
  }

  .status-pill.failed {
    background: var(--danger-soft);
    color: var(--danger);
  }

  .status-pill.active {
    background: var(--green-soft);
    color: var(--green-primary);
  }

  .status-pill.expired {
    background: var(--danger-soft);
    color: var(--danger);
  }

  .status-pill.upcoming {
    background: var(--warn-soft);
    color: var(--warn);
  }

  .status-pill .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
  }

.download-btn {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--bg-page);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  color: var(--text-muted);
}

  .download-btn:hover {
    background: var(--green-soft);
    color: var(--green-primary);
    border-color: var(--green-primary);
  }

/* ── Toast Notification ── */
.toast-wrap {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  background: white;
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  border-left: 5px solid var(--green-primary);
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 320px;
  animation: toastIn 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

  .toast.hiding {
    animation: toastOut 0.3s ease both;
  }

.toast-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--green-soft);
  color: var(--green-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.toast.warn {
  border-left-color: var(--warn);
}

  .toast.warn .toast-icon {
    background: var(--warn-soft);
    color: var(--warn);
  }

.toast.info {
  border-left-color: var(--blue);
}

  .toast.info .toast-icon {
    background: var(--blue-soft);
    color: var(--blue);
  }

.toast-body {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 2px;
}

.toast-text {
  font-size: 12px;
  color: var(--text-muted);
}

.toast-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  padding: 4px;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toastOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }

  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

/* ── Checkout Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,16,20,0.6);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

  .modal-overlay.open {
    display: flex;
    animation: fadeIn 0.3s ease;
  }

.checkout-modal {
  background: white;
  border-radius: 20px;
  max-width: 620px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  animation: modalIn 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.2);
  box-shadow: 0 40px 100px rgba(0,0,0,0.3);
}

.modal-head {
  padding: 24px 28px;
  background: var(--green-grad);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  overflow: hidden;
}

  .modal-head::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
    top: -100px;
    right: -100px;
    animation: orbit 20s linear infinite;
  }

  .modal-head h3 {
    font-size: 18px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    color: white;
  }

.modal-close {
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  outline: none;
}

  .modal-close:hover {
    background: rgba(255,255,255,0.3);
    transform: rotate(90deg);
  }

  .modal-close:focus,
  .modal-close:active {
    outline: none;
  }

.modal-body {
  padding: 28px;
}

.checkout-summary {
  background: linear-gradient(135deg, #f7fdf5 0%, #ecfdf5 100%);
  border: 2px dashed var(--green-primary);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}

.checkout-plan {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.checkout-plan-icon {
  width: 56px;
  height: 56px;
  background: var(--green-grad);
  color: white;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 8px 20px rgba(63,169,43,0.35);
}

.checkout-plan-name {
  font-size: 18px;
  font-weight: 800;
  color: #0F1014;
}

.checkout-plan-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.checkout-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  font-size: 13px;
  border-top: 1px dashed rgba(63,169,43,0.3);
}

  .checkout-row.total {
    font-weight: 800;
    font-size: 18px;
    color: var(--green-primary);
    border-top: 2px solid var(--green-primary);
    padding-top: 14px;
    margin-top: 6px;
  }

.pay-methods {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.pay-method {
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 16px 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
}

  .pay-method:hover {
    border-color: var(--green-primary);
    background: var(--green-soft);
  }

  .pay-method.active {
    border-color: var(--green-primary);
    background: var(--green-soft);
    box-shadow: 0 4px 12px rgba(63,169,43,0.15);
  }

  .pay-method i {
    font-size: 22px;
    color: var(--text-muted);
    margin-bottom: 6px;
    display: block;
  }

  .pay-method.active i {
    color: var(--green-primary);
  }

  .pay-method span {
    font-size: 11px;
    font-weight: 700;
    display: block;
  }

.form-group {
  margin-bottom: 14px;
}

.form-label {
  font-size: 11px;
  font-weight: 700;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  display: block;
}

.form-input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
  font-family: inherit;
  transition: all 0.3s;
  background: #FAFBFC;
}

  .form-input:focus {
    outline: none;
    border-color: var(--green-primary);
    background: white;
    box-shadow: 0 0 0 4px var(--green-soft);
  }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.modal-foot {
  padding: 18px 28px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
}

.btn-modal-primary {
  flex: 1;
  padding: 14px;
  background: var(--green-grad);
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: 800;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s;
  box-shadow: 0 8px 20px rgba(63,169,43,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  outline: none;
}

  .btn-modal-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(63,169,43,0.5);
  }

  .btn-modal-primary:focus,
  .btn-modal-primary:active {
    outline: none;
  }

.btn-modal-ghost {
  padding: 14px 22px;
  background: white;
  border: 1.5px solid var(--border);
  color: var(--text-dark);
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.3s;
  outline: none;
}

  .btn-modal-ghost:hover {
    border-color: var(--green-primary);
    color: var(--green-primary);
  }

  .btn-modal-ghost:focus,
  .btn-modal-ghost:active {
    outline: none;
  }

/* Animations */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(25px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-15px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes pricePop {
  0% {
    opacity: 0;
    transform: scale(0.6) translateY(8px);
  }

  60% {
    opacity: 1;
    transform: scale(1.08) translateY(-2px);
  }

  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Package Details Modal ── */
.pkg-details-modal {
  max-width: 680px;
}

.pkg-details-summary {
  background: linear-gradient(135deg, #f7fdf5 0%, #ecfdf5 100%);
  border: 2px dashed var(--green-primary);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}

.pkg-details-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.pkg-details-icon {
  width: 56px;
  height: 56px;
  background: var(--green-grad);
  color: white;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 8px 20px rgba(63,169,43,0.35);
  flex-shrink: 0;
}

.pkg-details-name {
  font-size: 18px;
  font-weight: 800;
  color: #0F1014;
}

.pkg-details-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.pkg-details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  border-top: 1px dashed rgba(63,169,43,0.3);
  padding-top: 14px;
}

.pkg-details-stat {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}

.pkg-details-stat-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.pkg-details-stat-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
}

.pkg-details-features-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

  .pkg-details-features-title i {
    color: var(--green-primary);
  }

.pkg-details-table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-height: 320px;
  overflow-y: auto;
  background: white;
  scrollbar-width: thin;
  scrollbar-color: var(--green-primary) var(--green-soft);
}

  .pkg-details-table-wrap::-webkit-scrollbar {
    width: 8px;
  }

  .pkg-details-table-wrap::-webkit-scrollbar-track {
    background: var(--green-soft);
    border-radius: 0 var(--radius) var(--radius) 0;
  }

  .pkg-details-table-wrap::-webkit-scrollbar-thumb {
    background: var(--green-grad);
    border-radius: 10px;
    border: 2px solid var(--green-soft);
  }

    .pkg-details-table-wrap::-webkit-scrollbar-thumb:hover {
      background: var(--green-dark);
    }

.pkg-details-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

  .pkg-details-table thead th {
    background: #eaf7e6;
    color: var(--green-primary);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
    padding: 10px 14px;
    text-align: left;
    position: sticky;
    top: 0;
    z-index: 2;
    box-shadow: 0 1px 0 var(--border);
  }

    .pkg-details-table thead th.text-right {
      text-align: right;
    }

  .pkg-details-table tbody td {
    padding: 10px 14px;
    border-top: 1px solid var(--border);
    color: var(--text-dark);
  }

    .pkg-details-table tbody td.text-right {
      text-align: right;
      font-weight: 700;
    }

  .pkg-details-table tbody tr:hover {
    background: var(--green-soft);
  }

.pkg-feature-check {
  color: var(--green-primary);
  font-weight: 800;
}

.pkg-feature-cross {
  color: var(--danger);
  font-weight: 800;
}

@media (max-width: 900px) {
  .sidebar {
    display: none;
  }

  .content {
    padding: 20px;
  }

  .form-row, .pay-methods {
    grid-template-columns: 1fr;
  }

  .alert-banner {
    flex-direction: column;
    text-align: center;
  }

  .cp-stats {
    grid-template-columns: 1fr;
  }

  .pkg-details-grid {
    grid-template-columns: 1fr;
  }
}

/* Renewal Period — Select2 theme */
.renewal-period-group {
  margin-bottom: 20px;
}

  .renewal-period-group .form-label {
    font-size: 11px;
    font-weight: 700;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    display: block;
  }

#renewalModal .select2-container--default .select2-selection--single {
  height: 48px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: #FAFBFC;
  transition: all 0.3s ease;
  box-shadow: 0 1px 2px rgba(15,16,20,0.04);
  display: flex;
  align-items: center;
  padding: 0 16px;
}

  #renewalModal .select2-container--default .select2-selection--single:hover {
    border-color: var(--green-primary);
    background: white;
  }

#renewalModal .select2-container--default.select2-container--open .select2-selection--single,
#renewalModal .select2-container--default.select2-container--focus .select2-selection--single {
  border-color: var(--green-primary);
  background: white;
  box-shadow: 0 0 0 4px var(--green-soft);
}

#renewalModal .select2-container--default .select2-selection--single .select2-selection__rendered {
  color: var(--text-dark);
  font-size: 14px;
  font-weight: 600;
  line-height: 46px;
  padding: 0;
}

#renewalModal .select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 46px;
  right: 12px;
}

  #renewalModal .select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: var(--green-primary) transparent transparent transparent;
    border-width: 6px 5px 0 5px;
  }

#renewalModal .select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
  border-color: transparent transparent var(--green-primary) transparent;
  border-width: 0 5px 6px 5px;
}

#renewalModal .select2-container .select2-dropdown {
  border: 1.5px solid var(--green-primary);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(63,169,43,0.18);
  overflow: hidden;
}

#renewalModal .select2-results__option {
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dark);
  transition: background 0.2s ease, color 0.2s ease;
}

  #renewalModal .select2-results__option[aria-selected="true"] {
    background: var(--green-soft);
    color: var(--green-primary);
    font-weight: 700;
  }

#renewalModal .select2-results__option--highlighted[aria-selected] {
  background: var(--green-grad) !important;
  color: white !important;
}

.navbar {
  z-index: 1000;
}
