/* =====================================================================
   Premium Profile Page — Advanced Layout
   ===================================================================== */

:root {
  --pf-navy-dark: #070a16;
  --pf-navy: #0f1830;
  --pf-navy-light: #1c2c52;
  --pf-card-bg: #03061012;
  --pf-gold: #d4af37;
  --pf-gold-light: #f3dd9b;
  --pf-red: #fff828e8;
  --pf-green: #1e8449;
  --pf-blue: #1f6fa8;
  --pf-amber: #b7891a;
  --pf-ink: #ffffff;
  --pf-muted: rgba(255, 255, 255, 0.6);
  --pf-line: rgba(212, 175, 55, 0.25);
  --pf-bg: #f3f4f9;
  --pf-radius-lg: 22px;
  --pf-radius-md: 16px;
  --pf-radius-sm: 12px;
  --pf-shadow: 0 10px 30px rgba(15, 24, 48, 0.07);
  --pf-shadow-hover: 0 18px 44px rgba(15, 24, 48, 0.14);
}

/* ---------- inline SVG icons (replaces bootstrap-icons dependency) ---------- */
.pf-icon {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  vertical-align: -0.15em;
}

/* ---------- full-bleed page wrapper ---------- */
.pf-page {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  background: var(--pf-navy-dark);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

/* ============================================================
   HERO
   ============================================================ */
.pf-hero {
  position: relative;
  overflow: hidden;
  padding: 50px 0 60px;
}

.pf-hero-glow {
  display: none;
}

.pf-hero-top {
  position: relative;
  z-index: 1;
}

.pf-hero-identity {
  display: flex;
  align-items: center;
  gap: 26px;
}

.pf-avatar {
  position: relative;
  width: 85px;
  height: 85px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--pf-navy-dark);
  background: linear-gradient(145deg, var(--pf-gold-light), var(--pf-gold));
  box-shadow:
    0 8px 24px rgba(212, 175, 55, 0.35),
    0 2px 6px rgba(0, 0, 0, 0.25),
    inset 0 1px 2px rgba(255, 255, 255, 0.6),
    inset 0 -3px 6px rgba(0, 0, 0, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.4);
}

.pf-avatar::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid rgba(212, 175, 55, 0.5);
  pointer-events: none;
}

.pf-avatar::after {
  content: '';
  position: absolute;
  top: 6%;
  left: 12%;
  width: 45%;
  height: 30%;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0));
  filter: blur(2px);
  pointer-events: none;
}

.pf-avatar-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1.5px solid rgba(212, 175, 55, 0.4);
}

.pf-hero-name {
  color: #fff;
  font-weight: 700;
  font-size: 1.8rem;
  margin-bottom: 4px;
  letter-spacing: 0.2px;
}

.pf-hero-email {
  color: var(--pf-gold-light);
  font-size: 0.9rem;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ---------- stats strip ---------- */
.pf-stats {
  position: relative;
  z-index: 1;
  margin-top: 36px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--pf-radius-lg);
  display: flex;
  align-items: center;
  padding: 22px 28px;
}

.pf-stat {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
}

.pf-stat-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, rgba(212, 175, 55, 0.22), rgba(212, 175, 55, 0.08));
  color: var(--pf-gold-light);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.pf-stat-value {
  color: #ffffff;
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.2;
}

.pf-stat-label {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 600;
}

.pf-stat-divider {
  width: 1px;
  align-self: stretch;
  background: rgba(255, 255, 255, 0.12);
  margin: 0 22px;
}

/* ============================================================
   BODY
   ============================================================ */
.pf-body {
  padding-top: 44px;
  padding-bottom: 64px;
}

/* ---------- base card (dark navy + white text) ---------- */
.pf-card {
  background: var(--pf-card-bg);
  border-radius: var(--pf-radius-md);
  border: 1px solid var(--pf-line);
  box-shadow: var(--pf-shadow);
  padding: 26px 24px;
  color: #ffffff;
  transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.pf-card:hover {
  border-color: rgba(212, 175, 55, 0.5);
}

/* ---------- sidebar: account nav ---------- */
.pf-account-card {
  margin-bottom: 20px;
}

.pf-card-eyebrow {
  text-transform: uppercase;
  letter-spacing: 1.4px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--pf-muted);
  margin-bottom: 16px;
}

.pf-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pf-nav-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: var(--pf-radius-sm);
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.pf-nav-link:hover {
  background: linear-gradient(120deg, var(--pf-navy-dark), var(--pf-navy));
  transform: translateX(4px);
}

.pf-nav-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.pf-nav-link:hover .pf-nav-icon {
  background: rgba(212, 175, 55, 0.16);
  color: var(--pf-gold-light);
}

.pf-nav-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.pf-nav-text strong {
  font-size: 0.92rem;
  color: #ffffff;
  transition: color 0.2s ease;
}

.pf-nav-text small {
  color: var(--pf-muted);
  font-size: 0.76rem;
  transition: color 0.2s ease;
}

.pf-nav-link:hover .pf-nav-text strong {
  color: var(--pf-gold-light);
}

.pf-nav-link:hover .pf-nav-text small {
  color: rgba(255, 255, 255, 0.75);
}

.pf-nav-arrow {
  width: 14px;
  height: 14px;
  color: var(--pf-muted);
  transition: all 0.2s ease;
}

.pf-nav-link:hover .pf-nav-arrow {
  color: var(--pf-gold-light);
  transform: translateX(3px);
}

/* ---------- help card ---------- */
.pf-help-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--pf-card-bg);
  border: 1px solid var(--pf-line);
}

.pf-help-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, var(--pf-gold-light), var(--pf-gold));
  color: var(--pf-navy-dark);
  font-size: 1.1rem;
}

.pf-help-card strong {
  font-size: 0.92rem;
  color: #ffffff;
}

.pf-help-card p {
  margin: 2px 0 0;
  font-size: 0.82rem;
  color: var(--pf-muted);
}

/* ---------- orders header ---------- */
.pf-orders-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
}

.pf-section-title {
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  margin-left: 5px;
}

.pf-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.pf-filter-btn {
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: var(--pf-muted);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 999px;
  transition: all 0.2s ease;
}

.pf-filter-btn:hover {
  border-color: var(--pf-gold);
  color: #ffffff;
}

.pf-filter-btn.is-active {
  background: linear-gradient(120deg, var(--pf-navy-dark), var(--pf-navy-light));
  border-color: transparent;
  color: var(--pf-gold-light);
}

/* ---------- timeline of orders ---------- */
.pf-timeline {
  position: relative;
  padding-left: 26px;
}

.pf-timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: linear-gradient(180deg, var(--pf-gold), rgba(255, 255, 255, 0.12) 90%);
  opacity: 0.6;
}

.pf-order-card {
  position: relative;
  margin-bottom: 18px;
  animation: pf-fade-in 0.4s ease both;
}

@keyframes pf-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.pf-order-dot {
  position: absolute;
  left: -26px;
  top: 26px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 3px solid var(--pf-navy-dark);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.12);
}

.pf-order-dot.status-pending { background: var(--pf-amber); }
.pf-order-dot.status-confirmed,
.pf-order-dot.status-processing,
.pf-order-dot.status-preparing { background: var(--pf-blue); }
.pf-order-dot.status-out_for_delivery { background: #7d3c98; }
.pf-order-dot.status-ready,
.pf-order-dot.status-completed,
.pf-order-dot.status-delivered { background: var(--pf-green); }
.pf-order-dot.status-cancelled { background: var(--pf-red); }

.pf-order-content {
  background: var(--pf-card-bg);
  border: 1px solid var(--pf-line);
  border-radius: var(--pf-radius-md);
  box-shadow: var(--pf-shadow);
  padding: 20px 22px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.pf-order-card:hover .pf-order-content {
  transform: translateY(-3px);
  box-shadow: var(--pf-shadow-hover);
  border-color: rgba(212, 175, 55, 0.5);
}

.pf-order-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  
}

.pf-order-number {
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
}

.pf-order-meta {
  color: var(--pf-muted);
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.pf-dot-sep {
  margin: 0 2px;
}

.pf-order-right {
  text-align: right;
}

.pf-order-total {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--pf-red);
  margin-bottom: 6px;
}

/* ---------- status badges ---------- */
.pf-badge {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pf-badge-pending { background: rgba(241, 196, 15, 0.15); color: var(--pf-amber); }
.pf-badge-confirmed,
.pf-badge-processing,
.pf-badge-preparing { background: rgba(52, 152, 219, 0.15); color: var(--pf-blue); }
.pf-badge-out_for_delivery { background: rgba(155, 89, 182, 0.15); color: #7d3c98; }
.pf-badge-ready,
.pf-badge-completed,
.pf-badge-delivered { background: rgba(39, 174, 96, 0.15); color: var(--pf-green); }
.pf-badge-cancelled { background: rgba(192, 57, 43, 0.15); color: var(--pf-red); }

/* ---------- footer / view button ---------- */
.pf-order-footer {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed rgba(255, 255, 255, 0.15);
}

.pf-btn-view {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
  font-weight: 700;
  color: #ffffff;
  text-decoration: none;
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  transition: all 0.2s ease;
}

.pf-btn-view i {
  transition: transform 0.2s ease;
}

.pf-btn-view:hover {
  background: linear-gradient(120deg, var(--pf-navy-dark), var(--pf-navy-light));
  color: var(--pf-gold-light);
}

.pf-btn-view:hover i {
  transform: translateX(3px);
}

/* ---------- empty states ---------- */
.pf-empty-card {
  padding: 60px 24px;
  background: var(--pf-card-bg);
}

.pf-empty-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  color: var(--pf-muted);
  font-size: 1.6rem;
}

.pf-empty-text {
  color: var(--pf-muted);
  margin-bottom: 20px;
  font-size: 0.9rem;
}

.pf-empty-filter {
  text-align: center;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.88rem;
  padding: 30px 0;
}

.pf-btn-primary {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 999px;
  font-weight: 700;
  color: var(--pf-navy-dark);
  background: linear-gradient(145deg, var(--pf-gold-light), var(--pf-gold));
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(212, 175, 55, 0.3);
  transition: all 0.2s ease;
}

.pf-btn-primary:hover {
  transform: translateY(-2px);

  color: var(--pf-navy-dark);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 991.98px) {
  .pf-stats { flex-wrap: wrap; row-gap: 16px; }
  .pf-stat-divider { display: none; }
  .pf-stat { flex: 1 1 45%; }
}

@media (max-width: 767.98px) {
  .pf-hero { padding-top: 44px; }
  .pf-hero-identity { gap: 16px; }
  .pf-avatar { width: 74px; height: 74px; font-size: 1.8rem; }
  .pf-hero-name { font-size: 1.4rem; }
  .pf-stats { padding: 18px; }
  .pf-stat { flex: 1 1 100%; }
  .pf-order-top { flex-direction: column; }
  .pf-order-right { text-align: left; }
}



/* ===== Reviewable Order ===== */
.pf-reviewable-order { padding: 16px 0; }
.pf-reviewable-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.pf-reviewable-items { margin-bottom: 12px; }
.pf-item-chip {
  display: inline-block;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  margin: 2px 4px 2px 0;
}
.pf-divider { border-color: rgba(255, 255, 255, 0.1); margin: 8px 0; }

/* ===== Number Rating ===== */
.pf-number-rating { display: flex; gap: 8px; margin-bottom: 4px; }
.pf-num-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  font-weight: 700;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.15s;
}
.pf-num-btn.active,
.pf-num-btn:hover {
  background: var(--pf-gold);
  border-color: var(--pf-gold);
  color: var(--pf-navy-dark);
}
.pf-rating-label { color: rgba(255, 255, 255, 0.5); font-size: 12px; }

/* ===== Static number display (reviews list) ===== */
.pf-number-display { display: flex; gap: 4px; }
.pf-num-static {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
}
.pf-num-static.active {
  background: var(--pf-gold);
  border-color: var(--pf-gold);
  color: var(--pf-navy-dark);
}
/* ===== Reviewable Order ===== */
.pf-reviewable-order { padding: 16px 0; }
.pf-reviewable-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.pf-reviewable-items { margin-bottom: 12px; }
.pf-item-chip {
  display: inline-block;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
  margin: 2px 4px 2px 0;
}
.pf-divider { border-color: rgba(255, 255, 255, 0.08); margin: 8px 0; }

/* ===== Number Rating (muted, no gold) ===== */
.pf-number-rating { display: flex; gap: 8px; margin-bottom: 4px; }
.pf-num-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.03);
  font-weight: 600;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.15s;
}
.pf-num-btn.active,
.pf-num-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.4);
  color: #ffffff;
}
.pf-rating-label { color: rgba(255, 255, 255, 0.45); font-size: 12px; }

/* ===== Static number display (reviews list) ===== */
.pf-number-display { display: flex; gap: 4px; }
.pf-num-static {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
}
.pf-num-static.active {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffffff;
}

/* ===== Review Items ===== */
.pf-review-item { padding: 16px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.pf-review-item:last-child { border-bottom: none; }
.pf-review-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
}
.pf-review-item-name { display: block; color: #ffffff; font-size: 15px; font-weight: 600; }
.pf-review-date { color: rgba(255, 255, 255, 0.4); font-size: 12px; }
.pf-review-comment { color: rgba(255, 255, 255, 0.65); font-size: 14px; margin: 6px 0; font-style: italic; }
.pf-review-status { font-size: 12px; font-weight: 600; }
.pf-review-status.approved { color: #7fb88a; }
.pf-review-status.pending { color: #c9a35d; }
.pf-btn-sm { padding: 8px 20px; font-size: 13px; }

/* ===== Review textarea (muted, matches dark theme) ===== */
.pf-review-form textarea.form-control {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 10px 14px;
  color: #ffffff;
  font-size: 0.88rem;
  resize: vertical;
  transition: all 0.2s ease;
}

.pf-review-form textarea.form-control::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

.pf-review-form textarea.form-control:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.pf-review-form textarea.form-control:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06);
}

/* ===== Submit review button (muted, no gold) ===== */
.pf-btn-primary {
  display: inline-block;
  padding: 10px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.86rem;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  box-shadow: none !important;
}

.pf-btn-primary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.3);
  color: #ffffff;
}

.pf-btn-primary:disabled {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.3);
  cursor: not-allowed;
  pointer-events: none;
}

/* ===== Back to Profile button ===== */
.pf-btn-secondary {
  display: inline-block;
  padding: 10px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  text-decoration: none;
  transition: all 0.2s ease;
}

.pf-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}