.profile-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
}

.profile-balance {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--brand-deep);
  white-space: nowrap;
}

.profile-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  border: 2px solid var(--brand-light);
  background: linear-gradient(135deg, var(--brand-deep), var(--brand-hover));
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.15s;
}

.profile-trigger:hover {
  box-shadow: 0 4px 12px rgba(0, 51, 102, 0.25);
  transform: scale(1.03);
}

.profile-dropdown {
  pointer-events: none;
  visibility: hidden;
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  z-index: 70;
  min-width: 260px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.profile-wrap.open .profile-dropdown,
.profile-wrap:hover .profile-dropdown {
  pointer-events: auto;
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.profile-dropdown-inner {
  overflow: hidden;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
}

.profile-dropdown-title {
  display: none;
}

.profile-menu-heading {
  list-style: none;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 0.15rem;
}

.profile-wrap--admin .profile-trigger {
  border-color: #fbbf24;
  box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.35);
}

.profile-menu-list {
  list-style: none;
  margin: 0;
  padding: 0.35rem 0;
}

.profile-menu-list a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 1rem;
  font-size: 0.875rem;
  color: #1e293b;
  transition: background 0.15s;
}

.profile-menu-list a:hover {
  background: var(--brand-light);
  color: var(--brand-deep);
}

.profile-menu-list a i {
  width: 1.125rem;
  text-align: center;
  color: #38bdf8;
  font-size: 0.95rem;
}

.profile-menu-list .profile-logout i {
  color: #64748b;
}

/* Gói cước — thẻ & bảng */
.pkg-cards {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .pkg-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .pkg-cards {
    grid-template-columns: repeat(4, 1fr);
  }
}

.pkg-card {
  position: relative;
  border-radius: 1rem;
  padding: 1.75rem 1.25rem 1.25rem;
  text-align: center;
  color: #fff;
  background: linear-gradient(160deg, #001a33 0%, #003366 45%, #004080 100%);
  box-shadow: 0 16px 40px rgba(0, 26, 51, 0.35);
  overflow: hidden;
}

.pkg-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 80% 20%, rgba(0, 136, 255, 0.35), transparent 50%),
    radial-gradient(ellipse at 20% 80%, rgba(255, 120, 50, 0.2), transparent 45%);
  pointer-events: none;
}

.pkg-card > * {
  position: relative;
  z-index: 1;
}

.pkg-card-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: #f97316;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-bottom-left-radius: 0.5rem;
}

.pkg-card h3 {
  font-size: 1.35rem;
  font-weight: 800;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  display: inline-block;
  min-width: 5rem;
}

.pkg-card .pkg-monthly {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  opacity: 0.9;
}

.pkg-card .pkg-old {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  text-decoration: line-through;
  opacity: 0.75;
}

.pkg-card .pkg-price {
  margin-top: 0.25rem;
  font-size: 1.75rem;
  font-weight: 800;
}

.pkg-card .pkg-btn {
  margin-top: 1.25rem;
  display: inline-block;
  width: 100%;
  max-width: 140px;
  border-radius: 9999px;
  background: #fff;
  color: var(--brand-deep);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.55rem 1rem;
  transition: transform 0.15s, box-shadow 0.15s;
}

.pkg-card .pkg-btn:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.pkg-card .pkg-note {
  margin-top: 1rem;
  font-size: 0.65rem;
  line-height: 1.45;
  opacity: 0.85;
}

.pkg-compare-wrap {
  overflow-x: auto;
  margin-top: 2.5rem;
  border-radius: 0.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.pkg-compare {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 0.8125rem;
  background: #fff;
}

.pkg-compare thead th {
  background: #f39200;
  color: #fff;
  font-weight: 700;
  padding: 0.65rem 0.5rem;
  text-align: center;
  border: 1px solid #e5a030;
}

.pkg-compare thead th:first-child {
  text-align: left;
  min-width: 180px;
}

.pkg-compare tbody td {
  padding: 0.55rem 0.5rem;
  text-align: center;
  border: 1px solid #e2e8f0;
  vertical-align: middle;
}

.pkg-compare tbody td:first-child {
  text-align: left;
  font-weight: 500;
  color: #1e293b;
}

.pkg-compare .cell-yes {
  color: #16a34a;
  font-size: 1.1rem;
}

.pkg-compare .cell-no {
  color: #dc2626;
  font-size: 1.1rem;
}

.pkg-compare tfoot td {
  padding: 0.6rem 0.5rem;
  border: 1px solid #e2e8f0;
  font-size: 0.75rem;
}

.pkg-compare tfoot .note-label {
  color: #dc2626;
  font-weight: 700;
}

.pkg-compare tfoot .note-paid {
  color: #dc2626;
  font-weight: 600;
  text-align: center;
}

.account-layout {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 1024px) {
  .account-layout {
    grid-template-columns: 240px 1fr;
  }
}

.account-sidebar {
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #fff;
  padding: 1rem 0;
  height: fit-content;
}

.account-sidebar a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  color: #475569;
}

.account-sidebar a:hover,
.account-sidebar a.active {
  background: var(--brand-light);
  color: var(--brand-deep);
  font-weight: 600;
}

.account-sidebar a i {
  color: #38bdf8;
  width: 1.125rem;
  text-align: center;
}

.pf-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  margin-bottom: 0.35rem;
}

.pf-input {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  font-size: 0.9375rem;
  color: #0f172a;
}

.pf-input:focus {
  outline: none;
  border-color: var(--brand-hover);
  box-shadow: 0 0 0 3px rgba(0, 85, 170, 0.15);
}

.pf-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
}

.pf-btn-primary {
  background: var(--brand-deep);
  color: #fff;
}

.pf-btn-primary:hover {
  background: var(--brand-hover);
}

.pf-btn-primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.pf-btn-ghost {
  background: #fff;
  border: 1px solid #cbd5e1;
  color: #334155;
}

.pf-msg:empty {
  display: none;
}
