/* ============================================================
   account.css — Espace client Puffs.ch
   Design cohérent avec le thème premium violet du site
   ============================================================ */

/* ----------------------------------------------------------
   Layout principal
   ---------------------------------------------------------- */
.account-wrap {
  max-width: 1320px;
  margin: 0 auto;
  padding: 40px 20px 80px;
  min-height: 60vh;
}

.account-panel {
  margin-bottom: 32px;
}

.account-card {
  background: #fff;
  border-radius: 24px;
  border: 1px solid rgba(124, 77, 255, 0.1);
  box-shadow: 0 4px 32px rgba(124, 77, 255, 0.07);
  padding: 36px 40px;
}

.account-card-auth {
  max-width: 480px;
  margin: 0 auto;
}

/* ----------------------------------------------------------
   Kicker / titre / sous-titre
   ---------------------------------------------------------- */
.account-kicker-standalone {
  margin-bottom: 6px;
}

.account-kicker {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7c4dff;
  background: rgba(124, 77, 255, 0.08);
  padding: 4px 12px;
  border-radius: 99px;
  margin-bottom: 10px;
}

.account-title {
  font-size: 1.55rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 6px;
  line-height: 1.2;
}

.account-greeting {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.account-greeting-text {
  min-width: 0;
  flex: 1;
}

.account-points-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding: 11px 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, #7c4dff 0%, #6540ff 100%);
  color: #fff;
  box-shadow: 0 12px 28px rgba(124, 77, 255, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.account-points-badge-icon {
  align-self: center;
  display: inline-flex;
  font-size: 1.05rem;
  color: #ffe27a;
}

.account-points-badge-value {
  font-size: 1.45rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.5px;
}

.account-points-badge-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.85;
}

.account-greeting-avatar {
  flex-shrink: 0;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 1px;
  color: #ffffff;
  background: linear-gradient(135deg, #7c4dff, #6540ff);
  box-shadow: 0 14px 30px rgba(124,77,255,.32), inset 0 1px 0 rgba(255,255,255,.35);
}

.account-greeting .account-title {
  margin-bottom: 4px;
}

.account-greeting .account-subtitle {
  margin-bottom: 0;
}

.account-subtitle {
  font-size: 0.95rem;
  color: #64748b;
  margin: 0 0 20px;
  line-height: 1.5;
}

/* ----------------------------------------------------------
   Messages (info / warning / error / success)
   ---------------------------------------------------------- */
.account-message {
  padding: 14px 18px;
  border-radius: 14px;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 18px;
  line-height: 1.45;
}

.account-message.info {
  background: rgba(99, 102, 241, 0.08);
  color: #4338ca;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.account-message.warning {
  background: rgba(245, 158, 11, 0.08);
  color: #92400e;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.account-message.error {
  background: rgba(239, 68, 68, 0.08);
  color: #b91c1c;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.account-message.success {
  background: rgba(16, 185, 129, 0.08);
  color: #065f46;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

/* ----------------------------------------------------------
   KYC Global Alert Banner
   ---------------------------------------------------------- */
.account-kyc-global-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: linear-gradient(120deg, rgba(245, 158, 11, 0.07), rgba(234, 88, 12, 0.07));
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 16px;
  padding: 16px 20px;
  margin-bottom: 22px;
}

.account-kyc-global-alert-main {
  flex: 1;
  min-width: 200px;
  font-size: 0.88rem;
  color: #78350f;
  font-weight: 500;
  line-height: 1.45;
}

.account-kyc-global-alert-btn {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 99px;
  font-size: 0.82rem;
  font-weight: 700;
  background: #f59e0b;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.18s;
}

.account-kyc-global-alert-btn:hover {
  background: #d97706;
}

/* ----------------------------------------------------------
   Tabs
   ---------------------------------------------------------- */
.account-tabs {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 0;
  margin-bottom: 28px;
  border-bottom: 1px solid rgba(124, 77, 255, 0.1);
  padding-bottom: 0;
  scrollbar-width: none;
  /* Degrade indicateur : n'apparait que lorsque les onglets debordent
     (tablette / mobile). Sur desktop tout tient, donc aucun degrade. */
  background:
    linear-gradient(to right, #ffffff 30%, rgba(255, 255, 255, 0)) left center,
    linear-gradient(to left, #ffffff 30%, rgba(255, 255, 255, 0)) right center,
    radial-gradient(farthest-side at 0 50%, rgba(124, 77, 255, 0.22), rgba(124, 77, 255, 0)) left center,
    radial-gradient(farthest-side at 100% 50%, rgba(124, 77, 255, 0.22), rgba(124, 77, 255, 0)) right center;
  background-repeat: no-repeat;
  background-size: 30px 100%, 30px 100%, 14px 100%, 14px 100%;
  background-attachment: local, local, scroll, scroll;
}

.account-tabs::-webkit-scrollbar {
  display: none;
}

.account-tab-btn {
  padding: 10px 16px;
  font-size: 0.84rem;
  font-weight: 600;
  font-family: inherit;
  color: #64748b;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  cursor: pointer;
  transition: color 0.18s, border-color 0.18s;
  margin-bottom: -1px;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.claims-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 99px;
  background: #ff3b30;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 2px 5px rgba(255, 59, 48, 0.4);
  animation: claimsBadgePop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes claimsBadgePop {
  from { transform: scale(0); }
  to { transform: scale(1); }
}

.account-tab-btn:hover {
  color: #7c4dff;
}

.account-tab-btn.active {
  color: #7c4dff;
  border-bottom-color: #7c4dff;
}

/* Tablette : reduire la police/espacement des onglets pour tout garder sur une
   seule ligne sans defilement (le mobile <=640px conserve le scroll). */
@media (max-width: 1100px) and (min-width: 641px) {
  .account-card {
    padding: 32px 26px;
  }
  .account-tab-btn {
    padding: 10px 11px;
    font-size: 0.78rem;
    gap: 5px;
  }
}

@media (max-width: 860px) and (min-width: 641px) {
  .account-card {
    padding: 28px 20px;
  }
  .account-tab-btn {
    padding: 9px 8px;
    font-size: 0.72rem;
    gap: 4px;
  }
}

.account-tab-panel {
  display: none;
}

.account-tab-panel.active {
  display: block;
}

/* ----------------------------------------------------------
   Sections
   ---------------------------------------------------------- */
.account-section {
  padding: 0;
}

.account-section-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: #1e293b;
  margin: 0 0 4px;
}

.account-section-subtitle {
  font-size: 0.875rem;
  color: #64748b;
  margin: 0 0 28px;
  line-height: 1.5;
}

/* Profile form — vertical stack of subcards */
.account-profile-form-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.account-subcard {
  background: #fff;
  border: 1px solid #e8e3ff;
  border-radius: 18px;
  padding: 0;
  overflow: hidden;
}

.account-subcard-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  background: linear-gradient(135deg, rgba(124, 77, 255, 0.06) 0%, rgba(101, 64, 255, 0.03) 100%);
  border-bottom: 1px solid #e8e3ff;
}

.account-subcard-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #7c4dff 0%, #6540ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
  flex-shrink: 0;
}

.account-subcard-header-text {
  flex: 1;
}

.account-subsection-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
  line-height: 1.2;
}

.account-subsection-subtitle {
  font-size: 0.78rem;
  color: #94a3b8;
  margin: 2px 0 0;
}

.account-subcard-body {
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ----------------------------------------------------------
   Forms
   ---------------------------------------------------------- */
.account-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.account-field-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: -4px;
}

.account-input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 16px;
  font-size: 0.925rem;
  font-family: inherit;
  color: #1e293b;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  transition: border-color 0.18s, box-shadow 0.18s;
  outline: none;
}

.account-input:focus {
  border-color: #7c4dff;
  box-shadow: 0 0 0 3px rgba(124, 77, 255, 0.12);
}

.account-input::placeholder {
  color: #94a3b8;
}

select.account-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394a3b8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.account-form-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.account-form-row > div {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.account-form-row > div label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
  letter-spacing: 0.02em;
}

.account-form-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

.account-form-actions-right {
  justify-content: flex-end;
}

.account-static-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.9rem;
}

.account-static-row:last-child {
  border-bottom: none;
}

/* ----------------------------------------------------------
   Buttons
   ---------------------------------------------------------- */
.account-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: inherit;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, #7c4dff 0%, #6540ff 100%);
  color: #fff;
  transition: opacity 0.18s, transform 0.12s;
}

.account-btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.account-btn-primary:active {
  transform: translateY(0);
}

.account-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: 12px;
  border: 1.5px solid rgba(124, 77, 255, 0.35);
  cursor: pointer;
  background: transparent;
  color: #7c4dff;
  transition: background 0.18s, border-color 0.18s;
}

.account-btn-secondary:hover {
  background: rgba(124, 77, 255, 0.06);
  border-color: #7c4dff;
}

.account-btn-inline {
  font-size: 0.82rem;
  padding: 6px 14px;
}

/* ----------------------------------------------------------
   Auth section (login / OTP)
   ---------------------------------------------------------- */
.account-auth-shell {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.account-auth-links-row {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.account-inline-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: #7c4dff;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
  transition: opacity 0.15s;
}

.account-inline-link:hover {
  opacity: 0.75;
  text-decoration: underline;
}

.forgot-password-panel {
  display: none;
  margin-top: 4px;
}

.forgot-password-panel.is-open {
  display: block;
}

/* ----------------------------------------------------------
   Orders hero card
   ---------------------------------------------------------- */
.orders-hero {
  margin-bottom: 18px;
}

.orders-hero-status {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.orders-hero-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.orders-hero-chip {
  flex: 1;
  min-width: 120px;
  background: linear-gradient(135deg, rgba(124, 77, 255, 0.06) 0%, rgba(101, 64, 255, 0.03) 100%);
  border: 1px solid #e8e3ff;
  border-radius: 12px;
  padding: 12px 16px;
}

.orders-hero-chip-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 4px;
}

.orders-hero-chip-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e293b;
  min-width: 0;
  overflow-wrap: anywhere;
}

/* Numero de suivi (ex. La Poste) : chaine longue sans espaces qui doit
   pouvoir passer a la ligne dans sa puce, sinon elle deborde a droite
   (visible surtout en vue mobile). */
.order-invoice-btn--track {
  max-width: 100%;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  text-align: center;
}

/* ----------------------------------------------------------
   Orders filters toolbar
   ---------------------------------------------------------- */
.orders-filters-head {
  margin-bottom: 16px;
}

.orders-table-card .account-subcard-body {
  display: block;
}

.orders-table-card .table-shell {
  border-radius: 12px;
}

.orders-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}

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

.orders-filter-btn {
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: 99px;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  color: #64748b;
  cursor: pointer;
  transition: all 0.18s;
}

.orders-filter-btn.active,
.orders-filter-btn:hover {
  background: #7c4dff;
  border-color: #7c4dff;
  color: #fff;
}

.orders-sort-select {
  padding: 7px 32px 7px 12px;
  font-size: 0.82rem;
  font-family: inherit;
  font-weight: 600;
  color: #475569;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 10 7'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2394a3b8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 10px center;
  appearance: none;
  cursor: pointer;
  outline: none;
}

.orders-sort-select:focus {
  border-color: #7c4dff;
}

.orders-filter-count {
  font-size: 0.78rem;
  color: #94a3b8;
  font-weight: 500;
}

/* ----------------------------------------------------------
   Orders table
   ---------------------------------------------------------- */
.table-shell {
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid #f1f5f9;
}

.table-shell table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.table-shell table thead {
  background: #f8fafc;
}

.table-shell table th {
  padding: 12px 14px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #94a3b8;
  text-align: left;
  white-space: nowrap;
}

.table-shell table td {
  padding: 13px 14px;
  border-top: 1px solid #f1f5f9;
  color: #334155;
  vertical-align: middle;
}

.table-shell table tbody tr:hover {
  background: rgba(124, 77, 255, 0.03);
}

.orders-empty-row td {
  text-align: center;
  color: #94a3b8;
  font-size: 0.88rem;
  padding: 32px 14px;
}

/* ----------------------------------------------------------
   Status pills
   ---------------------------------------------------------- */
.status-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.status-paid {
  background: rgba(16, 185, 129, 0.1);
  color: #047857;
}

.status-pending {
  background: rgba(245, 158, 11, 0.1);
  color: #92400e;
}

.status-abandoned {
  background: rgba(239, 68, 68, 0.08);
  color: #b91c1c;
}

.status-other {
  background: #f1f5f9;
  color: #64748b;
}

.status-shipping-pending {
  background: rgba(99, 102, 241, 0.08);
  color: #3730a3;
}

.status-shipping-preparing {
  background: rgba(245, 158, 11, 0.1);
  color: #92400e;
}

.status-shipping-dropped {
  background: rgba(59, 130, 246, 0.1);
  color: #1e40af;
}

.status-shipping-transit {
  background: rgba(124, 77, 255, 0.1);
  color: #5b21b6;
}

.status-shipping-delivered {
  background: rgba(16, 185, 129, 0.1);
  color: #047857;
}

.status-shipping-issue {
  background: rgba(239, 68, 68, 0.08);
  color: #b91c1c;
}

/* ----------------------------------------------------------
   Invoice button
   ---------------------------------------------------------- */
.order-invoice-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #7c4dff;
  text-decoration: none;
  background: rgba(124, 77, 255, 0.07);
  border: 1px solid rgba(124, 77, 255, 0.18);
  transition: background 0.15s;
}

.order-invoice-btn:hover {
  background: rgba(124, 77, 255, 0.14);
}

.order-invoice-btn-icon {
  display: inline-flex;
  font-size: 1em;
}

/* ----------------------------------------------------------
   Claims
   ---------------------------------------------------------- */
.claims-shell {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 20px;
}

@media (max-width: 700px) {
  .claims-shell {
    grid-template-columns: 1fr;
  }
}

.claims-create-card .account-subcard-body,
.claims-list-card .account-subcard-body {
  gap: 12px;
}

.claims-input {
  resize: vertical;
}

.claims-textarea {
  min-height: 120px;
}

.claims-char-count {
  font-size: 0.74rem;
  color: #94a3b8;
  text-align: right;
  margin-top: 4px;
}

.claims-actions {
  margin-top: 0;
}

.claims-feedback {
  display: none;
  margin-top: 4px;
}

.claims-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 99px;
  background: #7c4dff;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
}

.claims-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
}

.claims-list-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: 1px solid #e8e3ff;
  border-radius: 14px;
  background: #fff;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}

.claims-list-item:hover {
  border-color: rgba(124, 77, 255, 0.32);
  box-shadow: 0 6px 16px rgba(124, 77, 255, 0.08);
}

.claims-list-item.is-active {
  border-color: #7c4dff;
  background: linear-gradient(135deg, rgba(124, 77, 255, 0.06), rgba(101, 64, 255, 0.03));
  box-shadow: 0 0 0 3px rgba(124, 77, 255, 0.08);
}

.claims-list-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.claims-list-item-main {
  min-width: 0;
  flex: 1;
}

.claims-list-item-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.875rem;
  font-weight: 700;
  color: #1e293b;
}

.claims-list-item-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7c4dff;
  flex-shrink: 0;
}

.claims-list-item-preview {
  font-size: 0.78rem;
  color: #94a3b8;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.claims-list-item-status {
  flex-shrink: 0;
}

.claims-list-item-date {
  font-size: 0.72rem;
  color: #b8bfce;
  margin-top: 8px;
}

.claims-list-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 28px 16px;
  color: #94a3b8;
  font-size: 0.875rem;
  text-align: center;
}

.claims-list-empty-icon {
  font-size: 1.7rem;
  color: #c4b5fd;
  margin-bottom: 4px;
}

.claims-thread-card {
  margin-top: 20px;
}

.claims-thread-meta {
  font-size: 0.78rem;
  color: #94a3b8;
  flex-shrink: 0;
}

.claims-chat-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 120px;
  max-height: 400px;
  overflow-y: auto;
  background: linear-gradient(135deg, rgba(124, 77, 255, 0.04), rgba(101, 64, 255, 0.02));
  border: 1px solid #e8e3ff;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 14px;
}

/* ---------- WhatsApp-style chat bubbles ---------- */
.claims-chat-msg {
  display: flex;
  align-items: flex-end;
  gap: 9px;
  max-width: 82%;
  animation: claimsMsgIn 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes claimsMsgIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.claims-chat-msg.msg-customer {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.claims-chat-msg.msg-admin {
  align-self: flex-start;
}

.claims-chat-avatar {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  color: #fff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
}

.claims-chat-avatar-admin {
  background: linear-gradient(135deg, #7c4dff, #6540ff);
}

.claims-chat-avatar-me {
  background: linear-gradient(135deg, #34c759, #28a745);
}

.claims-chat-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.claims-chat-msg.msg-customer .claims-chat-content {
  align-items: flex-end;
}

.claims-chat-author {
  font-size: 0.7rem;
  font-weight: 700;
  color: #94a3b8;
  margin: 0 6px 3px;
  letter-spacing: 0.01em;
}

.claims-chat-bubble {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  padding: 9px 13px 6px;
  border-radius: 16px;
  font-size: 0.86rem;
  line-height: 1.45;
  word-break: break-word;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.claims-chat-msg.msg-admin .claims-chat-bubble {
  background: #fff;
  color: #1e293b;
  border: 1px solid #ece8ff;
  border-bottom-left-radius: 5px;
}

.claims-chat-msg.msg-customer .claims-chat-bubble {
  background: linear-gradient(135deg, #7c4dff, #6540ff);
  color: #fff;
  border-bottom-right-radius: 5px;
}

.claims-chat-text {
  white-space: pre-wrap;
}

.claims-chat-time {
  align-self: flex-end;
  font-size: 0.66rem;
  font-weight: 500;
  opacity: 0.75;
  margin-top: 1px;
}

.claims-chat-msg.msg-admin .claims-chat-time {
  color: #94a3b8;
}

.claims-chat-msg.msg-customer .claims-chat-time {
  color: rgba(255, 255, 255, 0.85);
}

.claims-reply-form {
  gap: 10px;
}

.claims-reply-textarea {
  min-height: 80px;
}

.claims-thread-empty-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 48px 24px;
  text-align: center;
}

.claims-thread-empty-orb {
  font-size: 2.4rem;
  color: #c4b5fd;
  margin-bottom: 4px;
}

.claims-thread-empty-title {
  font-size: 1rem;
  font-weight: 700;
  color: #334155;
}

.claims-thread-empty-subtitle {
  font-size: 0.83rem;
  color: #94a3b8;
  max-width: 300px;
  line-height: 1.5;
}

/* ----------------------------------------------------------
   Security
   ---------------------------------------------------------- */
.account-security-shell {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.account-security-form {
  gap: 0;
}

.account-security-verify-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.account-otp-setting {
  gap: 16px;
}

.account-otp-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.account-otp-help {
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.5;
}

.account-otp-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Toggle switch */
.account-switch {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.account-switch-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.account-switch-slider {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  background: #e2e8f0;
  border-radius: 99px;
  transition: background 0.22s;
  flex-shrink: 0;
}

.account-switch-slider::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.22s;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.account-switch-input:checked + .account-switch-slider {
  background: #7c4dff;
}

.account-switch-input:checked + .account-switch-slider::after {
  transform: translateX(20px);
}

.account-switch-text {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1e293b;
}

.account-security-submit {
  margin-top: 4px;
  align-self: flex-start;
}

/* ----------------------------------------------------------
   KYC verified card
   ---------------------------------------------------------- */
.kyc-verified-card {
  background: linear-gradient(135deg, rgba(124, 77, 255, 0.06) 0%, rgba(101, 64, 255, 0.03) 100%);
  border: 1px solid #e8e3ff;
  border-radius: 18px;
  padding: 24px 28px;
  position: relative;
  overflow: hidden;
}

.kyc-verified-card::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, #7c4dff, #6540ff);
}

.kyc-verified-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.kyc-verified-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #fff;
  flex-shrink: 0;
  background: linear-gradient(135deg, #7c4dff 0%, #6540ff 100%);
  box-shadow: 0 10px 24px rgba(124, 77, 255, 0.28);
}

.kyc-verified-head-text {
  flex: 1;
  min-width: 0;
}

.kyc-verified-kicker {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #7c4dff;
  margin-bottom: 3px;
}

.kyc-verified-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #1e293b;
  margin: 0;
}

.kyc-verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 13px;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
  margin-left: auto;
  white-space: nowrap;
}

.kyc-verified-badge i {
  font-size: 0.9rem;
}

.kyc-verified-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.kyc-verified-item {
  background: rgba(255, 255, 255, 0.8);
  border-radius: 12px;
  padding: 12px 16px;
  border: 1px solid #eee9ff;
}

.kyc-verified-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 4px;
}

.kyc-verified-value {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1e293b;
}

/* ----------------------------------------------------------
   KYC action cards (pending / rejected / start)
   ---------------------------------------------------------- */
.kyc-action-card {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  background: #fff;
  border: 1px solid #e8e3ff;
  border-radius: 18px;
  padding: 24px 26px;
  position: relative;
  overflow: hidden;
}

.kyc-action-card::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, #7c4dff, #6540ff);
}

.kyc-action-card--pending::before {
  background: linear-gradient(180deg, #f59e0b, #d97706);
}

.kyc-action-card--rejected::before {
  background: linear-gradient(180deg, #ef4444, #dc2626);
}

.kyc-action-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #fff;
  flex-shrink: 0;
  background: linear-gradient(135deg, #7c4dff 0%, #6540ff 100%);
  box-shadow: 0 10px 24px rgba(124, 77, 255, 0.28);
}

.kyc-action-card--pending .kyc-action-icon {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 10px 24px rgba(245, 158, 11, 0.28);
}

.kyc-action-card--rejected .kyc-action-icon {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  box-shadow: 0 10px 24px rgba(239, 68, 68, 0.26);
}

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

.kyc-action-kicker {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #7c4dff;
  margin: 0 0 4px;
}

.kyc-action-card--pending .kyc-action-kicker {
  color: #d97706;
}

.kyc-action-card--rejected .kyc-action-kicker {
  color: #dc2626;
}

.kyc-action-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #1e293b;
  margin: 0 0 8px;
  line-height: 1.3;
}

.kyc-action-text {
  font-size: 0.86rem;
  color: #64748b;
  line-height: 1.55;
  margin: 0 0 16px;
}

.kyc-privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(245, 158, 11, 0.10);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 0 0 20px;
}

.kyc-privacy-note-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: rgba(245, 158, 11, 0.18);
  color: #b45309;
  font-size: 1.05rem;
}

.kyc-privacy-note-text {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.55;
  color: #7c4a03;
}

.kyc-privacy-note-text strong {
  color: #7c2d12;
  font-weight: 700;
}

.kyc-action-reason {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  font-weight: 600;
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid rgba(239, 68, 68, 0.16);
  border-radius: 10px;
  padding: 10px 14px;
  margin: 0 0 16px;
}

.kyc-action-reason span {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.12);
  padding: 2px 8px;
  border-radius: 99px;
}

.kyc-action-perks {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.kyc-action-perks li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.84rem;
  font-weight: 600;
  color: #475569;
}

.kyc-action-perks li i {
  color: #7c4dff;
  font-size: 1rem;
  flex-shrink: 0;
}

.kyc-action-form {
  margin: 0;
}

.kyc-action-form .account-btn-primary,
.kyc-action-form .account-btn-secondary {
  width: 100%;
  max-width: 320px;
}

/* ----------------------------------------------------------
   Profile
   ---------------------------------------------------------- */

/* Email locked row */
.account-profile-email-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: linear-gradient(135deg, rgba(124, 77, 255, 0.04) 0%, rgba(101, 64, 255, 0.02) 100%);
  border: 1.5px dashed rgba(124, 77, 255, 0.2);
  border-radius: 12px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.account-profile-email-lock {
  color: #7c4dff;
  font-size: 1rem;
  flex-shrink: 0;
}

.account-profile-email-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 1px;
}

.account-profile-email-value {
  font-size: 0.92rem;
  font-weight: 600;
  color: #1e293b;
}

/* Save button bar */
.account-profile-save-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  background: #f8fafc;
  border: 1px solid #e8e3ff;
  border-radius: 16px;
  margin-top: 4px;
}

.account-profile-save-hint {
  font-size: 0.78rem;
  color: #94a3b8;
  margin: 0;
}

.account-profile-submit {
  align-self: flex-start;
  margin-top: 4px;
}

.account-phone-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.account-phone-input-shell {
  flex: 1;
  display: flex;
  gap: 0;
}

.account-prefix-select-shell {
  position: relative;
  flex-shrink: 0;
}

.account-prefix-select-inline {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-right: none;
  border-radius: 12px 0 0 12px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  white-space: nowrap;
}

.account-prefix-display {
  pointer-events: none;
}

.account-prefix-chevron {
  font-size: 0.7rem;
  color: #94a3b8;
  pointer-events: none;
}

.account-prefix-select-native {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  cursor: pointer;
}

.account-phone-input {
  border-radius: 0 12px 12px 0 !important;
  border-left: none !important;
}

/* ----------------------------------------------------------
   Subscription
   ---------------------------------------------------------- */
.subscription-plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.subscription-plans-empty {
  font-size: 0.88rem;
  color: #64748b;
  background: #f8fafc;
  border: 1px dashed #e2e8f0;
  border-radius: 14px;
  padding: 24px;
  text-align: center;
}

.subscription-plan-card {
  background: #fff;
  border: 1px solid #e8e3ff;
  border-radius: 18px;
  padding: 24px 26px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}

.subscription-plan-card:hover {
  border-color: rgba(124, 77, 255, 0.4);
  box-shadow: 0 18px 40px rgba(124, 77, 255, 0.12);
  transform: translateY(-2px);
}

.subscription-plan-card.is-recommended {
  border-color: rgba(124, 77, 255, 0.45);
  box-shadow: 0 14px 36px rgba(124, 77, 255, 0.14);
}

.subscription-plan-card:not(.is-active-subscription)::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, #7c4dff, #6540ff);
}

.subscription-plan-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.subscription-plan-name {
  font-size: 1.1rem;
  font-weight: 800;
  color: #1e293b;
  margin: 0 0 4px;
  line-height: 1.2;
  background: linear-gradient(135deg, #7c4dff 0%, #6540ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subscription-plan-name.is-puffs-plus {
  background: linear-gradient(135deg, #7c4dff 0%, #6540ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subscription-plan-price {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  line-height: 1;
}

.subscription-plan-price span {
  font-size: 0.82rem;
  font-weight: 600;
  color: #94a3b8;
  margin-left: 2px;
}

.subscription-plan-badges {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.subscription-plan-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.subscription-plan-badge.discount {
  background: linear-gradient(135deg, #7c4dff 0%, #6540ff 100%);
  color: #fff;
  box-shadow: 0 6px 16px rgba(124, 77, 255, 0.3);
}

.subscription-plan-badge.recommended {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
}

.subscription-plan-desc {
  font-size: 0.84rem;
  color: #64748b;
  line-height: 1.5;
  margin: 0;
}

.subscription-plan-perks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.subscription-plan-perks li {
  position: relative;
  padding-left: 28px;
  font-size: 0.84rem;
  color: #475569;
  line-height: 1.45;
}

.subscription-plan-perks li.is-positive::before {
  content: '';
  position: absolute;
  left: 0;
  top: 1px;
  width: 18px;
  height: 18px;
  border-radius: 99px;
  background: rgba(16, 185, 129, 0.12) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23047857' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 11px no-repeat;
}

.subscription-plan-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: auto;
}

.subscription-subscribe-btn {
  flex: 1;
  min-width: 140px;
}

.subscription-action-btn {
  flex: 0 0 auto;
}

/* Active subscription card */
.subscription-active-card {
  border-color: rgba(124, 77, 255, 0.3);
  box-shadow: 0 14px 36px rgba(124, 77, 255, 0.1);
}

.subscription-active-card--paused {
  border-color: rgba(245, 158, 11, 0.35);
}

.subscription-active-card--canceled {
  border-color: rgba(148, 163, 184, 0.45);
}

.subscription-active-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.subscription-active-copy {
  min-width: 0;
}

.subscription-active-kicker {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #7c4dff;
  margin-bottom: 6px;
}

.subscription-active-card--paused .subscription-active-kicker {
  color: #d97706;
}

.subscription-active-card--canceled .subscription-active-kicker {
  color: #64748b;
}

.subscription-active-price {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
  margin: 6px 0 8px;
  line-height: 1;
}

.subscription-active-price span {
  font-size: 0.82rem;
  font-weight: 600;
  color: #94a3b8;
  margin-left: 2px;
}

.subscription-active-description {
  font-size: 0.84rem;
  color: #64748b;
  line-height: 1.55;
  margin: 0;
}

.subscription-active-status-wrap {
  flex-shrink: 0;
}

.subscription-status {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 99px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.subscription-status.active {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
}

.subscription-status.paused {
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
}

.subscription-status.canceled {
  background: rgba(148, 163, 184, 0.18);
  color: #475569;
}

.subscription-active-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.subscription-active-highlight {
  background: linear-gradient(135deg, rgba(124, 77, 255, 0.05) 0%, rgba(101, 64, 255, 0.02) 100%);
  border: 1px solid #eee9ff;
  border-radius: 14px;
  padding: 14px 16px;
}

.subscription-active-highlight-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 5px;
}

.subscription-active-highlight strong {
  font-size: 0.92rem;
  font-weight: 800;
  color: #1e293b;
}

.subscription-pause-info {
  font-size: 0.82rem;
  font-weight: 600;
  color: #b45309;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 12px;
  padding: 12px 16px;
}

.subscription-action-btn-muted {
  border-color: rgba(148, 163, 184, 0.4);
  color: #64748b;
}

.subscription-action-btn-muted:hover {
  background: rgba(148, 163, 184, 0.08);
  border-color: #94a3b8;
}

.subscription-action-btn-ghost {
  border-color: rgba(239, 68, 68, 0.32);
  color: #dc2626;
}

.subscription-action-btn-ghost:hover {
  background: rgba(239, 68, 68, 0.06);
  border-color: #ef4444;
}

.subscription-modal-shell {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.subscription-active-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.subscription-active-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #1e293b;
}

.subscription-active-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.1);
  color: #047857;
}

.subscription-active-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.subscription-active-item {
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 12px;
  padding: 12px 16px;
}

.subscription-active-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 4px;
}

.subscription-active-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e293b;
}

.subscription-active-footer {
  border-top: 1px solid #f1f5f9;
  padding-top: 14px;
  margin-top: 6px;
}

.subscription-active-note {
  font-size: 0.82rem;
  color: #64748b;
}

.subscription-active-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.subscription-cancel-row {
  display: flex;
  justify-content: flex-start;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
}

.subscription-cancel-link {
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(148, 163, 184, 0.4);
  transition: color 0.16s, background 0.16s;
}

.subscription-cancel-link:hover {
  color: #64748b;
  background: rgba(148, 163, 184, 0.08);
  text-decoration-color: rgba(100, 116, 139, 0.6);
}

/* ----------------------------------------------------------
   Subscription checkout modal — contenu interne
   ---------------------------------------------------------- */
.subscription-modal-shell .modal-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.subscription-modal-kicker {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #7c4dff;
  margin: 0 0 4px;
}

.subscription-modal-plan-info {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid #eee9ff;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(124, 77, 255, 0.06) 0%, rgba(101, 64, 255, 0.02) 100%);
}

.subscription-modal-plan-info > div {
  min-width: 0;
}

.subscription-modal-plan-info strong {
  display: block;
  font-size: 1rem;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 4px;
}

.subscription-modal-plan-copy {
  font-size: 0.82rem;
  color: #64748b;
  line-height: 1.5;
  margin: 0;
}

.subscription-modal-price {
  flex-shrink: 0;
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
  line-height: 1.1;
}

.subscription-modal-status {
  margin: 0;
}

.subscription-modal-section-head {
  margin-bottom: 10px;
}

.subscription-modal-section-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: #1e293b;
  margin: 0 0 2px;
}

.subscription-modal-section-copy {
  font-size: 0.8rem;
  color: #94a3b8;
  line-height: 1.45;
  margin: 0;
}

.subscription-saved-cards-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.subscription-card-empty-state {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  border: 1px dashed #d8d0ff;
  border-radius: 14px;
  background: #faf9ff;
}

.subscription-card-empty-state strong {
  font-size: 0.9rem;
  font-weight: 800;
  color: #1e293b;
}

.subscription-card-empty-state span {
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.45;
}

.subscription-saved-card-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid #e8e3ff;
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}

.subscription-saved-card-option:hover {
  border-color: rgba(124, 77, 255, 0.32);
}

.subscription-saved-card-option input[type="radio"] {
  accent-color: #7c4dff;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  cursor: pointer;
}

.subscription-saved-card-option.is-selected {
  border-color: #7c4dff;
  box-shadow: 0 6px 18px rgba(124, 77, 255, 0.12);
  background: linear-gradient(135deg, rgba(124, 77, 255, 0.05) 0%, #ffffff 60%);
}

.subscription-saved-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.subscription-saved-card-topline {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.subscription-saved-card-topline strong {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1e293b;
  letter-spacing: 0.02em;
}

.subscription-saved-card-body small {
  font-size: 0.78rem;
  color: #94a3b8;
}

.subscription-new-card-option {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.subscription-use-new-card-toggle {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid #e8e3ff;
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.18s;
}

.subscription-use-new-card-toggle:hover {
  border-color: rgba(124, 77, 255, 0.32);
}

.subscription-use-new-card-toggle input[type="checkbox"] {
  accent-color: #7c4dff;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
  cursor: pointer;
}

.subscription-use-new-card-toggle > span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.subscription-use-new-card-toggle strong {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1e293b;
}

.subscription-use-new-card-toggle small {
  font-size: 0.78rem;
  color: #94a3b8;
}

.subscription-new-card-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid #eee9ff;
  border-radius: 14px;
  background: #faf9ff;
}

/* ----------------------------------------------------------
   Payment methods
   ---------------------------------------------------------- */
.subscription-payment-methods {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.payment-methods-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.payment-methods-empty {
  color: #94a3b8;
  font-size: 0.85rem;
  padding: 6px 2px;
}

.payment-method-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid #e8e3ff;
  border-radius: 14px;
  background: #fff;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.payment-method-item:hover {
  border-color: rgba(124, 77, 255, 0.32);
  box-shadow: 0 6px 18px rgba(124, 77, 255, 0.08);
}

.payment-method-chip {
  width: 42px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, #2d2150 0%, #6540ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
  flex-shrink: 0;
}

.payment-method-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.payment-method-top-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.payment-method-top-row strong {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1e293b;
  letter-spacing: 0.02em;
}

.payment-method-exp {
  font-size: 0.76rem;
  color: #94a3b8;
}

.payment-method-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.payment-method-default {
  background: transparent;
  border: 1px solid #e8e3ff;
  color: #6540ff;
  font-size: 0.76rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 8px;
  transition: background 0.15s, border-color 0.15s;
}

.payment-method-default:hover {
  background: rgba(124, 77, 255, 0.08);
  border-color: rgba(124, 77, 255, 0.32);
}

.payment-card-element {
  margin-top: 6px;
  padding: 14px 16px;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  transition: border-color 0.18s;
}

.payment-card-element.StripeElement--focus {
  border-color: #7c4dff;
  box-shadow: 0 0 0 3px rgba(124, 77, 255, 0.1);
}

.payment-save-btn {
  margin-top: 14px;
}

.payment-saved-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(124, 77, 255, 0.05), rgba(101, 64, 255, 0.03));
  border: 1px solid #e8e3ff;
  border-radius: 12px;
  flex-wrap: wrap;
}

.payment-saved-preview-icon {
  width: 52px;
  flex-shrink: 0;
}

/* ============================================================
   Parrainage (referral)
   ============================================================ */
.referral-shell {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
}

@media (max-width: 760px) {
  .referral-shell {
    grid-template-columns: 1fr;
  }
}

.referral-code-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.referral-code-input {
  flex: 1 1 auto;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #1f1a3a;
  background: #faf8ff;
}

.referral-copy-btn {
  flex-shrink: 0;
  white-space: nowrap;
}

.referral-share-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.referral-share-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 99px;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  color: #5b3fce;
  background: #f1ecff;
  border: 1px solid #e1d7ff;
  transition: background 0.18s ease, transform 0.18s ease;
}

.referral-share-pill:hover {
  background: #e7dfff;
  transform: translateY(-1px);
}

.referral-feedback {
  margin-top: 12px;
}

.referral-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.referral-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 18px 12px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(124, 77, 255, 0.05), rgba(180, 76, 255, 0.04));
  border: 1px solid #ece6ff;
  text-align: center;
}

.referral-stat-highlight {
  background: linear-gradient(135deg, #7c4dff, #b44cff);
  border-color: transparent;
}

.referral-stat-highlight .referral-stat-value,
.referral-stat-highlight .referral-stat-label {
  color: #fff;
}

.referral-stat-value {
  font-size: 1.7rem;
  font-weight: 900;
  line-height: 1;
  color: #1f1a3a;
}

.referral-stat-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #6b6485;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.referral-hint {
  margin: 16px 0 0;
  font-size: 0.85rem;
  color: #6b6485;
  line-height: 1.5;
}

/* Loyalty points panel */
.points-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: 16px;
  margin-bottom: 28px;
}

.points-balance-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 24px 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, #7c4dff, #b44cff);
  color: #fff;
  text-align: center;
}

.points-balance-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  opacity: 0.9;
}

.points-balance-value {
  font-size: 2.6rem;
  font-weight: 900;
  line-height: 1;
}

.points-balance-unit {
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0.9;
}

.points-tier-card {
  padding: 20px 22px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(124, 77, 255, 0.05), rgba(180, 76, 255, 0.04));
  border: 1px solid #ece6ff;
}

.points-tier-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.points-tier-name {
  font-size: 1.2rem;
  font-weight: 800;
  color: #1f1a3a;
}

.points-tier-mult {
  font-size: 0.85rem;
  font-weight: 700;
  color: #7c4dff;
  background: #fff;
  border: 1px solid #ece6ff;
  border-radius: 999px;
  padding: 4px 12px;
}

.points-progress {
  height: 10px;
  border-radius: 999px;
  background: #ece6ff;
  overflow: hidden;
}

.points-progress-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #7c4dff, #b44cff);
  transition: width 0.4s ease;
}

.points-tier-hint {
  margin: 12px 0 0;
  font-size: 0.85rem;
  color: #463f63;
  line-height: 1.5;
}

.points-tier-sub {
  margin: 6px 0 0;
  font-size: 0.78rem;
  color: #6b6485;
}

/* ── Règles d'octroi de points ── */
.points-rules-heading {
  margin-top: 36px;
  margin-bottom: 14px;
}

.points-rules {
  margin-bottom: 28px;
  padding: 22px 22px 20px;
  border-radius: 16px;
  border: 1px solid #ece6ff;
  background: linear-gradient(135deg, rgba(124, 77, 255, 0.04), rgba(180, 76, 255, 0.03));
}

.points-earn-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.points-earn-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #efeaff;
}

.points-earn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  font-size: 1.2rem;
  color: #fff;
  background: linear-gradient(135deg, #7c4dff, #b44cff);
}

.points-earn-icon--signup { background: linear-gradient(135deg, #7c4dff, #b44cff); }
.points-earn-icon--order { background: linear-gradient(135deg, #4d8bff, #6f5cff); }
.points-earn-icon--review { background: linear-gradient(135deg, #ffb020, #ff7a45); }
.points-earn-icon--referral { background: linear-gradient(135deg, #1fc77d, #16a085); }

.points-earn-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.points-earn-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: #1f1a3a;
}

.points-earn-desc {
  font-size: 0.76rem;
  line-height: 1.35;
  color: #6b6485;
}

.points-earn-value {
  flex-shrink: 0;
  font-size: 0.95rem;
  font-weight: 900;
  color: #7c4dff;
  white-space: nowrap;
}

.points-tiers-title {
  margin-top: 24px;
}

.points-tiers-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

.points-tiers-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #efeaff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.points-tiers-row.is-current {
  border-color: #7c4dff;
  box-shadow: 0 6px 18px rgba(124, 77, 255, 0.14);
}

.points-tiers-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 1.05rem;
  color: #fff;
}

.points-tiers-row--bronze .points-tiers-badge { background: linear-gradient(135deg, #c08453, #9c6b3f); }
.points-tiers-row--silver .points-tiers-badge { background: linear-gradient(135deg, #b8c0cc, #8a94a6); }
.points-tiers-row--gold .points-tiers-badge { background: linear-gradient(135deg, #f7c948, #e0a325); }
.points-tiers-row--platinum .points-tiers-badge { background: linear-gradient(135deg, #8e9eff, #6f5cff); }

.points-tiers-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.points-tiers-name {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.92rem;
  font-weight: 800;
  color: #1f1a3a;
}

.points-tiers-current-tag {
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #7c4dff;
  background: rgba(124, 77, 255, 0.12);
  border-radius: 999px;
  padding: 2px 8px;
}

.points-tiers-threshold {
  font-size: 0.76rem;
  color: #6b6485;
}

.points-tiers-mult {
  flex-shrink: 0;
  font-size: 0.95rem;
  font-weight: 900;
  color: #7c4dff;
}

.points-rules-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 18px 0 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: #6b6485;
}

.points-rules-note i {
  flex-shrink: 0;
  margin-top: 1px;
  color: #7c4dff;
}

.points-redeem {
  margin-bottom: 28px;
}

.points-redeem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.points-redeem-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 18px 12px;
  border-radius: 14px;
  border: 1.5px solid #ece6ff;
  background: #fff;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.points-redeem-card:not(.is-disabled):hover {
  transform: translateY(-2px);
  border-color: #7c4dff;
  box-shadow: 0 8px 20px rgba(124, 77, 255, 0.16);
}

.points-redeem-card.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.points-redeem-card.is-loading {
  opacity: 0.7;
  cursor: progress;
}

.points-redeem-amount {
  font-size: 1.35rem;
  font-weight: 900;
  color: #1f1a3a;
}

.points-redeem-cost {
  font-size: 0.8rem;
  font-weight: 600;
  color: #6b6485;
}

.points-history-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.points-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #faf9ff;
  border: 1px solid #f0ecff;
}

.points-history-reason {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1f1a3a;
}

.points-history-value {
  font-size: 0.95rem;
  font-weight: 800;
}

.points-history-value.is-positive {
  color: #16a34a;
}

.points-history-value.is-negative {
  color: #dc2626;
}

/* Aggregated points summary (premium) */
.points-summary-grid {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  gap: 0;
  margin-top: 14px;
  align-items: stretch;
  border-radius: 16px;
  border: 1px solid #ece6ff;
  background: #fff;
  box-shadow: 0 10px 30px -24px rgba(124, 77, 255, 0.4);
  overflow: hidden;
}

.points-summary-grid:not(:has(.points-summary-group--spent)) {
  grid-template-columns: 1fr;
}

.points-summary-grid:has(.points-summary-group--spent)::before {
  content: "";
  grid-column: 2;
  grid-row: 1;
  width: 1px;
  align-self: stretch;
  background: linear-gradient(180deg, transparent, #e3daff 18%, #e3daff 82%, transparent);
}

.points-summary-group {
  min-width: 0;
  padding: 18px 20px 20px;
}

.points-summary-group--earned {
  grid-column: 1;
}

.points-summary-group--spent {
  grid-column: 3;
}

.points-summary-totals {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.points-summary-total {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-radius: 14px;
  border: 1px solid #ece6ff;
  background: #fff;
}

.points-summary-group .points-summary-total {
  width: 100%;
  padding: 0 0 14px;
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid #ece6ff;
  background: transparent;
}

.points-summary-group .points-summary-total + .points-breakdown-list {
  margin-top: 14px;
}

.points-summary-total-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.points-summary-total--earned .points-summary-total-icon {
  background: rgba(22, 163, 74, 0.1);
  color: #16a34a;
}

.points-summary-total--spent .points-summary-total-icon {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
}

.points-summary-total-text {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.points-summary-total-value {
  font-size: 1.3rem;
  font-weight: 900;
  line-height: 1;
  color: #1f1a3a;
  margin-left: auto;
}

.points-summary-total--earned .points-summary-total-value {
  color: #16a34a;
}

.points-summary-total--spent .points-summary-total-value {
  color: #dc2626;
}

.points-summary-total-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #1f1a3a;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.points-breakdown-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.points-summary-group .points-breakdown-list {
  grid-template-columns: 1fr;
  gap: 8px;
}

.points-summary-group .points-breakdown-item {
  background: #faf9ff;
  border-color: #f3f0ff;
  padding: 9px 12px;
}

.points-breakdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #faf9ff;
  border: 1px solid #f0ecff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.points-breakdown-item:hover {
  border-color: #ddd2ff;
  box-shadow: 0 4px 14px rgba(124, 77, 255, 0.08);
}

.points-breakdown-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 1.05rem;
  flex-shrink: 0;
  background: rgba(124, 77, 255, 0.1);
  color: #7c4dff;
}

.points-breakdown-icon--order_paid {
  background: rgba(124, 77, 255, 0.1);
  color: #7c4dff;
}

.points-breakdown-icon--referral {
  background: rgba(236, 72, 153, 0.1);
  color: #ec4899;
}

.points-breakdown-icon--signup_bonus {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
}

.points-breakdown-icon--review_bonus {
  background: rgba(14, 165, 233, 0.12);
  color: #0ea5e9;
}

.points-breakdown-icon--redeemed {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
}

.points-breakdown-icon--redeem_refund {
  background: rgba(22, 163, 74, 0.1);
  color: #16a34a;
}

.points-breakdown-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.points-breakdown-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #1f1a3a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.points-breakdown-count {
  font-size: 0.72rem;
  font-weight: 500;
  color: #6b6485;
}

.points-breakdown-value {
  font-size: 0.95rem;
  font-weight: 800;
  flex-shrink: 0;
}

.points-breakdown-value.is-positive {
  color: #16a34a;
}

.points-breakdown-value.is-negative {
  color: #dc2626;
}

/* Points redemption confirmation modal */
.points-redeem-modal-shell {
  max-width: 440px;
  padding: 36px 32px 28px;
  text-align: center;
}

.points-redeem-modal-shell .modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
}

.points-redeem-modal-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.9rem;
  color: #fff;
  background: linear-gradient(135deg, #7c4dff, #b44cff);
  box-shadow: 0 10px 24px rgba(124, 77, 255, 0.32);
}

.points-redeem-modal-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: #1f1a3a;
  margin: 0 0 12px;
}

.points-redeem-modal-text {
  font-size: 0.98rem;
  line-height: 1.55;
  color: #463f63;
  margin: 0 0 10px;
}

.points-redeem-modal-text strong {
  color: #7c4dff;
  font-weight: 800;
}

.points-redeem-modal-hint {
  font-size: 0.82rem;
  line-height: 1.5;
  color: #6b6485;
  margin: 0 0 24px;
}

.points-redeem-modal-actions {
  display: flex;
  gap: 12px;
}

.points-redeem-modal-actions .account-btn-secondary,
.points-redeem-modal-actions .account-btn-primary {
  flex: 1;
}

.points-redeem-modal-actions .account-btn-primary.is-loading {
  opacity: 0.75;
  cursor: progress;
}

/* Loyalty vouchers list */
.points-vouchers {
  margin-bottom: 28px;
}

.points-vouchers-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.points-voucher-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(124, 77, 255, 0.06), rgba(180, 76, 255, 0.04));
  border: 1px dashed #c9b8ff;
}

.points-voucher-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  font-size: 1.4rem;
  color: #fff;
  flex-shrink: 0;
  background: linear-gradient(135deg, #7c4dff, #b44cff);
  box-shadow: 0 8px 18px rgba(124, 77, 255, 0.28);
}

.points-voucher-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.points-voucher-amount {
  font-size: 1rem;
  font-weight: 800;
  color: #1f1a3a;
}

.points-voucher-code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #7c4dff;
}

.points-voucher-expiry {
  font-size: 0.76rem;
  color: #6b6485;
}

.points-voucher-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.points-voucher-actions .account-btn-secondary,
.points-voucher-actions .account-btn-primary {
  padding: 8px 16px;
  font-size: 0.85rem;
  text-decoration: none;
  white-space: nowrap;
}

@media (max-width: 560px) {
  .points-voucher-item {
    flex-wrap: wrap;
  }

  .points-voucher-actions {
    width: 100%;
  }

  .points-voucher-actions .account-btn-secondary,
  .points-voucher-actions .account-btn-primary {
    flex: 1;
    text-align: center;
  }
}

.points-empty {
  margin: 14px 0 0;
  font-size: 0.9rem;
  color: #6b6485;
}

@media (max-width: 640px) {
  .points-overview {
    grid-template-columns: 1fr;
  }

  .points-summary-totals {
    grid-template-columns: 1fr;
  }

  .points-summary-grid {
    grid-template-columns: 1fr;
  }

  .points-summary-grid:has(.points-summary-group--spent)::before {
    display: none;
  }

  .points-summary-group--earned,
  .points-summary-group--spent {
    grid-column: 1;
  }

  .points-summary-group--spent {
    border-top: 1px solid #ece6ff;
  }

  .points-earn-grid {
    grid-template-columns: 1fr;
  }
}


.payment-saved-preview-icon svg {
  width: 100%;
  height: auto;
  display: block;
}

.payment-saved-preview-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.payment-saved-preview-info strong {
  font-size: 0.875rem;
  font-weight: 700;
  color: #1e293b;
}

.payment-saved-preview-info small {
  font-size: 0.75rem;
  color: #94a3b8;
}

.payment-method-default-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 99px;
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(124, 77, 255, 0.1);
  color: #7c4dff;
}

.payment-method-remove {
  background: transparent;
  border: none;
  color: #ef4444;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  transition: background 0.15s;
}

.payment-method-remove:hover {
  background: rgba(239, 68, 68, 0.08);
}

.payment-method-status {
  margin-top: 10px;
  font-size: 0.78rem;
  font-style: italic;
  color: #94a3b8;
}

/* ----------------------------------------------------------
   Modal
   ---------------------------------------------------------- */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.modal.is-open {
  display: flex;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(3px);
}

.modal-content {
  position: relative;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.2);
  max-width: 520px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 1;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 28px 0;
  margin-bottom: 16px;
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #1e293b;
  margin: 0;
}

.modal-close-btn {
  background: transparent;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #94a3b8;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.modal-close-btn:hover {
  background: #f1f5f9;
  color: #1e293b;
}

.modal-body {
  padding: 0 28px 16px;
}

.modal-footer {
  padding: 16px 28px 24px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  border-top: 1px solid #f1f5f9;
}

/* ----------------------------------------------------------
   Confirm dialog (premium)
   ---------------------------------------------------------- */
.confirm-dialog {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.confirm-dialog.is-open {
  opacity: 1;
}

.confirm-dialog-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
}

.confirm-dialog-box {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 22px;
  padding: 32px 30px 26px;
  text-align: center;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.28);
  transform: translateY(12px) scale(0.97);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.confirm-dialog.is-open .confirm-dialog-box {
  transform: translateY(0) scale(1);
}

.confirm-dialog-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 18px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  color: #fff;
  background: linear-gradient(135deg, #7c4dff 0%, #6540ff 100%);
  box-shadow: 0 14px 30px rgba(124, 77, 255, 0.32);
}

.confirm-dialog-icon.is-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  box-shadow: 0 14px 30px rgba(239, 68, 68, 0.3);
}

.confirm-dialog-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 8px;
  line-height: 1.3;
}

.confirm-dialog-message {
  font-size: 0.9rem;
  color: #64748b;
  line-height: 1.6;
  margin: 0 0 24px;
}

.confirm-dialog-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.confirm-dialog-actions .account-btn-secondary,
.confirm-dialog-actions .account-btn-primary,
.confirm-dialog-actions .confirm-dialog-danger-btn {
  flex: 1;
  max-width: 180px;
}

.confirm-dialog-danger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: inherit;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  box-shadow: 0 10px 24px rgba(239, 68, 68, 0.28);
  transition: opacity 0.18s, transform 0.12s;
}

.confirm-dialog-danger-btn:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.confirm-dialog-danger-btn:active {
  transform: translateY(0);
}

/* ----------------------------------------------------------
   Responsive
   ---------------------------------------------------------- */
@media (max-width: 640px) {
  .account-card {
    padding: 24px 20px;
    border-radius: 18px;
  }

  .account-wrap {
    padding: 24px 14px 60px;
  }

  .account-tabs {
    gap: 4px;
    flex-wrap: nowrap;
    overflow-x: auto;
  }
  .account-tab-btn {
    padding: 8px 12px;
    font-size: 0.8rem;
  }

  .account-greeting {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "avatar text"
      "badge badge";
    column-gap: 14px;
    row-gap: 14px;
    align-items: center;
  }

  .account-greeting-avatar {
    grid-area: avatar;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    font-size: 1.2rem;
  }

  .account-greeting-text {
    grid-area: text;
  }

  .account-greeting .account-title {
    font-size: 1.3rem;
  }

  .account-greeting .account-subtitle {
    font-size: 0.88rem;
    line-height: 1.45;
  }

  .account-points-badge {
    grid-area: badge;
    margin-left: 0;
    justify-self: stretch;
    justify-content: center;
    padding: 12px 18px;
    border-radius: 14px;
  }

  .account-form-row {
    flex-direction: column;
  }

  .kyc-action-card {
    flex-direction: column;
    gap: 14px;
    padding: 20px 20px 22px;
  }

  .kyc-action-form .account-btn-primary,
  .kyc-action-form .account-btn-secondary {
    max-width: none;
  }

  .subscription-plans-grid {
    grid-template-columns: 1fr;
  }

  .subscription-active-hero {
    flex-direction: column;
  }

  .modal-content {
    border-radius: 18px;
    max-height: 95vh;
  }

  .modal-header,
  .modal-body,
  .modal-footer {
    padding-left: 20px;
    padding-right: 20px;
  }

  .subscription-modal-plan-info {
    flex-direction: column;
    gap: 8px;
  }

  .subscription-modal-price {
    font-size: 1.2rem;
  }

  .modal-footer {
    flex-direction: column;
  }

  .modal-footer .account-btn-primary,
  .modal-footer .account-btn-secondary {
    width: 100%;
    max-width: none;
  }
}

/* ============================================================
   MOBILE PREMIUM — page compte : densité verticale + polices
   (corrections après analyse onglet par onglet sur téléphone)
   ============================================================ */
@media (max-width: 640px) {
  /* 1) Densité verticale : cartes et sous-cartes plus compactes. */
  .account-card {
    padding: 18px 16px;
  }
  .account-wrap {
    padding: 18px 12px 56px;
  }
  .account-section-title {
    font-size: 1.08rem;
  }
  .account-section-subtitle {
    margin-bottom: 18px;
  }
  .account-subcard-header {
    padding: 12px 16px;
    gap: 10px;
  }
  .account-subcard-body {
    padding: 16px 16px;
    gap: 12px;
  }
  .account-profile-form-stack {
    gap: 12px;
  }

  /* 2) Barre d'onglets : espacement mobile. */
  .account-tabs {
    gap: 4px;
  }

  /* 3) Polices d'affichage réduites (trop grandes sur téléphone). */
  .points-balance-value {
    font-size: 1.9rem;
  }
  .referral-stat-value {
    font-size: 1.35rem;
  }
  .subscription-plan-price {
    font-size: 1.2rem;
  }
  .points-redeem-amount {
    font-size: 1.15rem;
  }

  /* 4) Onglet « Mes commandes » : tableau converti en cartes empilées
        (exploite les attributs data-label déjà présents) au lieu d'un
        défilement horizontal. */
  .orders-table-card .table-shell {
    overflow-x: visible;
    border: none;
    border-radius: 0;
  }
  .orders-table-card .table-shell table,
  .orders-table-card .table-shell tbody,
  .orders-table-card .table-shell tr,
  .orders-table-card .table-shell td {
    display: block;
    width: 100%;
  }
  .orders-table-card .table-shell thead {
    display: none;
  }
  .orders-table-card .table-shell tbody tr {
    border: 1px solid #ece6ff;
    border-radius: 14px;
    margin-bottom: 12px;
    padding: 4px 14px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(124, 77, 255, 0.05);
  }
  .orders-table-card .table-shell td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid #f4f1ff;
    text-align: right;
    color: #1f1a3a;
    font-size: 0.86rem;
  }
  .orders-table-card .table-shell tbody tr td:first-child {
    border-top: none;
    font-weight: 700;
  }
  .orders-table-card .table-shell td::before {
    content: attr(data-label);
    flex: 0 0 auto;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #6b6485;
    text-align: left;
  }
  .orders-table-card .table-shell td .status-pill {
    margin-left: auto;
  }
  .orders-table-card .table-shell .orders-empty-row td {
    justify-content: center;
    text-align: center;
  }
  .orders-table-card .table-shell .orders-empty-row td::before {
    content: none;
  }

  /* Bandeau « dernière commande » : pastilles de statut sur leur propre ligne. */
  .orders-hero .account-subcard-header {
    flex-wrap: wrap;
  }
  .orders-hero-status {
    width: 100%;
  }

  /* Carte enregistrée : actions sur leur propre ligne sur petits écrans. */
  .payment-method-item {
    flex-wrap: wrap;
  }
  .payment-method-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

/* ============================================================
   FAVORIS — grille de produits favoris (espace client)
   Design premium aligné sur le thème violet du site.
   ============================================================ */
.account-favorites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 18px;
  margin-top: 4px;
}

.account-favorite-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e8e3ff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(101, 64, 255, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.account-favorite-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(124, 77, 255, 0.35), rgba(124, 77, 255, 0) 45%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.account-favorite-card:hover {
  transform: translateY(-4px);
  border-color: transparent;
  box-shadow: 0 18px 34px rgba(101, 64, 255, 0.16);
}

.account-favorite-card:hover::before {
  opacity: 1;
}

.account-favorite-link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.account-favorite-img {
  position: relative;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background:
    radial-gradient(120% 120% at 50% 0%, rgba(124, 77, 255, 0.07) 0%, rgba(124, 77, 255, 0) 60%),
    linear-gradient(180deg, #faf8ff 0%, #f4f1ff 100%);
}

.account-favorite-img img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(30, 41, 59, 0.12));
  transition: transform 0.3s ease;
}

.account-favorite-card:hover .account-favorite-img img {
  transform: scale(1.05);
}

.account-favorite-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 14px 16px 18px;
}

.account-favorite-brand {
  align-self: flex-start;
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #7c4dff;
  background: rgba(124, 77, 255, 0.09);
  padding: 3px 9px;
  border-radius: 999px;
}

.account-favorite-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.34em;
}

.account-favorite-price {
  font-size: 1.02rem;
  font-weight: 800;
  color: #1e293b;
  margin-top: 2px;
}

.account-favorite-remove {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 1px solid #f1e7ee;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  cursor: pointer;
  z-index: 2;
  opacity: 0;
  transform: translateY(-4px) scale(0.9);
  box-shadow: 0 6px 16px rgba(30, 41, 59, 0.12);
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.account-favorite-card:hover .account-favorite-remove,
.account-favorite-remove:focus-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.account-favorite-remove:hover {
  background: #ef4444;
  border-color: #ef4444;
  color: #fff;
  transform: translateY(0) scale(1.08);
}

.account-favorite-remove:disabled {
  opacity: 0.5;
  cursor: default;
}

/* Toujours visible au toucher (pas de survol sur mobile). */
@media (hover: none) {
  .account-favorite-remove {
    opacity: 1;
    transform: none;
  }
}

/* État vide — carte premium avec icône cœur. */
.account-favorites-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 48px 24px;
  background: linear-gradient(180deg, #faf8ff 0%, #f6f3ff 100%);
  border: 1px dashed #d9cffb;
  border-radius: 18px;
}

.account-favorites-empty-icon {
  width: 62px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #7c4dff;
  background: rgba(124, 77, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(124, 77, 255, 0.14);
  margin-bottom: 8px;
}

.account-favorites-empty-title {
  font-size: 1rem;
  font-weight: 800;
  color: #1e293b;
}

.account-favorites-empty-text {
  max-width: 340px;
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.5;
}

.account-favorites-empty-cta {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  padding: 10px 22px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #7c4dff 0%, #6540ff 100%);
  box-shadow: 0 8px 18px rgba(101, 64, 255, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.account-favorites-empty-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(101, 64, 255, 0.36);
}

@media (max-width: 640px) {
  .account-favorites-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .account-favorite-img {
    padding: 14px;
  }
  .account-favorite-info {
    padding: 12px 12px 14px;
  }
  .account-favorite-name {
    font-size: 0.84rem;
  }
  .account-favorite-price {
    font-size: 0.95rem;
  }
}
