/* ==========================================================================
   KBS — customer.css
   استایل اختصاصی پنل مشتری
   ========================================================================== */

/* ------------------------------------------------------- dashboard hero */
.customer-hero {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  background:
    radial-gradient(600px 240px at 90% -20%, rgba(201, 165, 74, 0.35), transparent 62%),
    linear-gradient(140deg, var(--ink-900), #18232e);
  color: #fff;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.customer-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 20px 20px;
  opacity: 0.5;
  pointer-events: none;
}

.customer-hero h2 {
  color: #fff;
  font-size: 18px;
  letter-spacing: -0.4px;
}

.customer-hero p {
  color: #a9b5c2;
  font-size: 12px;
  margin-top: 5px;
}

.customer-hero .ch-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

/* ------------------------------------------------------ quick actions */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(126px, 1fr));
  gap: 10px;
}

.quick-link {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 12px;
  display: grid;
  gap: 7px;
  justify-items: center;
  text-align: center;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-600);
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), color 0.2s var(--ease);
}

.quick-link svg {
  width: 21px;
  height: 21px;
  color: var(--accent);
}

.quick-link:hover {
  transform: translateY(-3px);
  border-color: rgba(201, 165, 74, 0.4);
  box-shadow: var(--shadow-sm);
  color: var(--ink-900);
}

/* ---------------------------------------------------------- wallet card */
.wallet-card {
  border-radius: var(--radius-lg);
  padding: 22px;
  color: #fff;
  background:
    radial-gradient(400px 200px at 92% 8%, rgba(201, 165, 74, 0.4), transparent 62%),
    linear-gradient(140deg, #0d3b36, #0a1c22);
  position: relative;
  overflow: hidden;
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}

.wallet-card::before {
  content: "";
  position: absolute;
  inset: auto -30px -60px auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 24px solid rgba(255, 255, 255, 0.05);
}

.wallet-card .wc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: #b8ccc8;
  position: relative;
  z-index: 1;
}

.wallet-card .wc-balance {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
  position: relative;
  z-index: 1;
}

.wallet-card .wc-balance small {
  font-size: 12px;
  font-weight: 600;
  color: #a9c2bd;
  margin-inline-start: 5px;
}

.wallet-card .wc-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  color: #9fb8b3;
  position: relative;
  z-index: 1;
}

.wallet-card .wc-chip {
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #dceae7;
}

/* ------------------------------------------------------- loyalty panel */
.loyalty-card {
  border-radius: var(--radius-lg);
  padding: 22px;
  background:
    radial-gradient(420px 200px at 88% 0%, rgba(242, 231, 205, 0.9), transparent 65%),
    linear-gradient(140deg, #fdfaf3, #f4ecda);
  border: 1px solid rgba(201, 165, 74, 0.3);
  display: grid;
  gap: 14px;
  position: relative;
  overflow: hidden;
}

.loyalty-card .tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: linear-gradient(145deg, var(--gold), var(--gold-deep));
  color: #221a08;
  font-size: 11.5px;
  font-weight: 800;
  width: fit-content;
}

.loyalty-card .tier-badge svg {
  width: 15px;
  height: 15px;
}

.loyalty-card .points-value {
  font-size: 30px;
  font-weight: 800;
  color: #6b5320;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
}

.loyalty-card .points-label {
  font-size: 11.5px;
  color: #8a7434;
}

.loyalty-progress {
  height: 9px;
  border-radius: 999px;
  background: rgba(107, 83, 32, 0.14);
  overflow: hidden;
}

.loyalty-progress .lp-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold));
  transition: width 0.5s var(--ease);
}

.loyalty-tiers {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-top: 4px;
}

.loyalty-tier {
  text-align: center;
  font-size: 10px;
  color: #8a7434;
  padding: 6px 2px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(201, 165, 74, 0.2);
}

.loyalty-tier.is-current {
  background: linear-gradient(145deg, var(--gold), var(--gold-deep));
  color: #221a08;
  font-weight: 800;
  border-color: transparent;
}

/* -------------------------------------------------------- reward grid */
.reward-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease);
}

.reward-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

.reward-media {
  aspect-ratio: 16 / 10;
  background: linear-gradient(150deg, #f6f2e8, #eee7d6);
  display: grid;
  place-items: center;
  color: var(--gold-deep);
}

.reward-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reward-media svg {
  width: 32px;
  height: 32px;
}

.reward-body {
  padding: 14px;
  display: grid;
  gap: 8px;
  flex: 1;
}

.reward-body strong {
  font-size: 13px;
}

.reward-cost {
  font-size: 12px;
  font-weight: 800;
  color: var(--gold-deep);
  display: flex;
  align-items: center;
  gap: 5px;
}

.reward-cost svg {
  width: 15px;
  height: 15px;
}

.reward-body .btn {
  margin-top: auto;
}

/* -------------------------------------------------------- notifications */
.notif-item {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-2);
  position: relative;
  transition: background 0.16s var(--ease);
}

.notif-item:last-child {
  border-bottom: 0;
}

.notif-item:hover {
  background: #fbfaf7;
}

.notif-item.is-unread {
  background: linear-gradient(90deg, rgba(46, 90, 150, 0.05), transparent);
}

.notif-item.is-unread::before {
  content: "";
  position: absolute;
  inset-block: 14px;
  inset-inline-start: 5px;
  width: 3px;
  border-radius: 3px;
  background: var(--accent);
}

.notif-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--ink-600);
  flex: none;
}

.notif-icon svg {
  width: 18px;
  height: 18px;
}

.notif-body {
  flex: 1;
  min-width: 0;
}

.notif-body strong {
  font-size: 12.5px;
  display: block;
}

.notif-body p {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 2;
  margin-top: 3px;
}

.notif-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  font-size: 10.5px;
  color: var(--muted-2);
}

.notif-actions {
  display: flex;
  align-items: flex-start;
  gap: 4px;
}

/* -------------------------------------------------------------- tickets */
.ticket-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 14px 16px;
  display: grid;
  gap: 8px;
}

.ticket-item .ti-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.ticket-item .ti-subject {
  font-size: 13px;
  font-weight: 700;
}

.ticket-item .ti-msg {
  font-size: 12px;
  color: var(--muted);
  line-height: 2;
  white-space: pre-wrap;
}

.ticket-reply {
  background: var(--accent-soft);
  border: 1px solid rgba(46, 90, 150, 0.18);
  border-radius: 12px;
  padding: 11px 13px;
  font-size: 12px;
  line-height: 2;
  color: #0b5a52;
}

.ticket-reply strong {
  display: block;
  font-size: 11px;
  margin-bottom: 3px;
}

/* --------------------------------------------------------- order detail */
.order-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding-bottom: 16px;
  border-bottom: 1px dashed var(--line);
}

.order-head .oh-num {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.2px;
  font-variant-numeric: tabular-nums;
}

.order-item {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-2);
}

.order-item:last-child {
  border-bottom: 0;
}

.order-item .oi-thumb {
  width: 54px;
  height: 54px;
  border-radius: 11px;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  color: var(--muted-2);
  overflow: hidden;
}

.order-item .oi-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.order-item strong {
  font-size: 12.5px;
  display: block;
}

.order-item span {
  font-size: 11px;
  color: var(--muted);
}

.order-totals {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}

/* ------------------------------------------------------------ addresses */
.address-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 15px 16px;
  display: grid;
  gap: 8px;
  position: relative;
}

.address-card.is-default {
  border-color: rgba(201, 165, 74, 0.5);
  background: linear-gradient(160deg, #fffdf8, #fff);
}

.address-card .ac-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.address-card strong {
  font-size: 12.5px;
}

.address-card p {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 2;
}

.address-card .ac-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}

/* --------------------------------------------------------------- wishlist */
.wish-empty {
  text-align: center;
  padding: 30px;
}

/* ----------------------------------------------------------- profile */
.profile-avatar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.profile-avatar .avatar-lg {
  width: 76px;
  height: 76px;
  font-size: 22px;
}

.profile-avatar .pa-meta strong {
  display: block;
  font-size: 15px;
}

.profile-avatar .pa-meta span {
  font-size: 11.5px;
  color: var(--muted);
}

/* --------------------------------------------------------- coupon list */
.coupon-card {
  border: 1px dashed rgba(201, 165, 74, 0.55);
  background: linear-gradient(150deg, #fffdf7, #fdf8ec);
  border-radius: var(--radius-sm);
  padding: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.coupon-card .cc-code {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #6b5320;
  direction: ltr;
}

.coupon-card .cc-desc {
  font-size: 11.5px;
  color: #8a7434;
  margin-top: 3px;
}

.coupon-card .cc-value {
  font-size: 18px;
  font-weight: 800;
  color: #6b5320;
}

.coupon-card.is-expired {
  filter: grayscale(0.5);
  opacity: 0.7;
}
