/* Account Page Additions (responsive, dark theme friendly) */

.py-60 { padding-top: 60px; padding-bottom: 60px; }

/* Cards */
.account-card {
  background: var(--rr-color-grey-2);
  border: 1px solid var(--rr-color-border-1);
  color: var(--rr-color-common-white);
  border-radius: 12px;
}
.account-card .card-title { color: var(--rr-color-common-white); }
.account-card .form-label { color: var(--rr-color-common-white); }
.account-card .table { background: transparent; color: var(--rr-color-common-white); }
.account-card .table td, .account-card .table th { color: var(--rr-color-common-white); }

/* Form controls in dark */
.form-control, .form-select {
  background-color: #1b2230;
  border-color: var(--rr-color-border-1);
  color: #fff;
}
.form-control:focus, .form-select:focus {
  border-color: var(--rr-color-theme-primary);
  box-shadow: 0 0 0 .2rem rgba(99, 102, 243, 0.15);
}
.form-control::placeholder { color: #9aa0a6; }

/* Buttons */
.btn-primary {
  background-color: var(--rr-color-theme-primary);
  border-color: var(--rr-color-theme-primary);
  color: #fff;
}
.btn-primary:hover {
  filter: brightness(1.05);
}
.btn-outline-light { color: #9bb4d6; border-color: #9bb4d6; }
.btn-outline-light:hover { background: #2a3040; color: #fff; }
/* Sign out button custom */
#signOutBtn { background-color: #ffba08; border-color: #ffba08; color: #0e0f10; }
#signOutBtn:hover { filter: brightness(1.05); }

/* Tables */
.account-table thead th {
  background: #1b2230;
  color: #02050a;
  border-bottom: 1px solid var(--rr-color-border-1);
}
.account-table tbody td { border-top: 1px solid var(--rr-color-border-1); }
.account-table tbody tr { background: #0f1624; }
.account-table tbody tr:nth-child(odd) { background: #101a2b; }

.img-cover-56 { width: 56px; height: 56px; object-fit: cover; }
.img-cover-40 { width: 40px; height: 40px; object-fit: cover; }

/* Modal */
.account-modal {
  background: var(--rr-color-bg-1);
  border: 1px solid var(--rr-color-border-1);
  color: #fff;
  border-radius: 14px;
}
.account-modal .nav-pills .nav-link { color: var(--rr-color-text-body); }
.account-modal .nav-pills .nav-link.active { background: var(--rr-color-theme-primary); color: #fff; }
.modal { z-index: 20000; }
.modal-backdrop { z-index: 19990; background: #000; }
.modal-backdrop.show { opacity: 0.85; }

/* Tabs header */
.account-tabs { border-bottom: 1px solid var(--rr-color-border-1); }
.account-tabs .nav-link { color: #74787C; background: transparent; border: 1px solid transparent; }
.account-tabs .nav-link.active {
  color: #fff;
  background: #111827;
  border-color: #2a3040 #2a3040 #111827;
}

/* Order collapse styling */
.collapse-row { background: #0c1220; }
.order-items { background: #121826; border-top: 1px solid var(--rr-color-border-1); }

/* Blank spacer when not logged in */
.account-blank { min-height: 60vh; }
.account-blank .blank-spacer { min-height: 40vh; }

/* Force dark table palette */
.account-card .table.account-table { background-color: #0f1624; }
.account-card .table.account-table thead th { background-color: #151b2d !important; color: #e8ecf1; }
.account-card .table.account-table tbody tr { background-color: #0f1624; }
.account-card .table.account-table tbody tr:nth-child(odd) { background-color: #101a2b; }
.account-card .table.account-table td,
.account-card .table.account-table th { color: #ffffff; border-color: #2b3244; }
.account-card .table.account-table tbody td { background-color: inherit !important; }
.account-card .table.account-table thead th.col-thumb { width: 72px; }

/* Table tools */
.table-tools .search-wrap { flex: 1 1 auto; min-width: 0; }
.table-tools .form-control { max-width: 360px; width: 100%; }
.table-tools #downloadsCount { white-space: nowrap; }
.pagination .page-link { background: #0f1624; color: #e8ecf1; border-color: #2b3244; }
.pagination .page-item.active .page-link { background: var(--rr-color-theme-primary); border-color: var(--rr-color-theme-primary); }

/* Rounded table corners */
.account-card .table-responsive { border-radius: 12px; overflow: hidden; }
.table-rounded { border-radius: 12px; overflow: hidden; }

@media (max-width: 576px) {
  .py-60 { padding-top: 32px; padding-bottom: 32px; }
}

/* Download count badges */
.dl-count { border-radius: 999px; padding: 6px 10px; font-weight: 600; }
.dl-count[data-count="0"],
.dl-count[data-count="1"] { background-color: #22c55e; color: #0b1015; }
.dl-count[data-count="2"] { background-color: #ffba08; color: #0b1015; }
.dl-count[data-count="3"] { background-color: #ef4444; color: #ffffff; }

/* Toasts */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 30000; display: flex; flex-direction: column; gap: 10px; }
.toast { opacity: 0; transform: translateY(-6px); transition: all .3s ease; border-radius: 10px; padding: 12px 14px; color: #fff; min-width: 240px; max-width: 360px; box-shadow: 0 8px 24px rgba(0,0,0,.3); }
.toast.show { opacity: 1; transform: translateY(0); }
.toast-success { background: #16a34a; }
.toast-error { background: #dc2626; }
.toast-info { background: #2563eb; }
.toast-warning { background: #f59e0b; color: #111; }

/* Password strength meter */
.pw-meter { height: 6px; background: #2b3244; border-radius: 8px; margin-top: 6px; overflow: hidden; }
.pw-meter .pw-meter-fill { height: 100%; width: 0%; background: #ef4444; transition: width .2s ease, background .2s ease; }
.pw-weak .pw-meter-fill { width: 33%; background: #ef4444; }
.pw-medium .pw-meter-fill { width: 66%; background: #ffba08; }
.pw-strong .pw-meter-fill { width: 100%; background: #22c55e; }

/* Loyalty meter */
.lp-wrap { background: var(--rr-color-grey-2); border: 1px solid var(--rr-color-border-1); border-radius: 12px; padding: 16px; }
.lp-meter { height: 10px; background: #2b3244; border-radius: 999px; overflow: hidden; position: relative; }
.lp-meter::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: var(--lp-fill, 0%); background: linear-gradient(90deg, #22c55e, #ffba08); }
.lp-label { color: #e8ecf1; font-weight: 600; }

.lp-gift-state {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.lp-gift-button {
  width: 110px;
  height: 110px;
  border-radius: 28px;
  border: none;
  background: #1b232f;
  color: #f5c66b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: default;
}
.lp-gift-button svg {
  width: 58px;
  height: 58px;
}
.lp-gift-button svg .gift-box,
.lp-gift-button svg .gift-lid {
  fill: currentColor;
}
.lp-gift-button svg .gift-ribbon {
  fill: rgba(255, 255, 255, 0.85);
}
.lp-gift-button svg .gift-bow {
  stroke: currentColor;
  stroke-width: 3;
  fill: none;
  stroke-linecap: round;
}
.lp-gift-button.is-locked {
  color: #8d95a8;
  background: #1b232f;
}
.lp-gift-button.is-almost {
  color: #f5c66b;
  background: #1b232f;
}
.lp-gift-button.is-almost::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.55) 48%, transparent 52%);
  pointer-events: none;
}
.lp-gift-button.is-ready {
  color: #fff;
  background: linear-gradient(135deg, #f97316, #facc15);
  box-shadow: 0 15px 35px rgba(249, 115, 22, 0.35);
  cursor: pointer;
}
.lp-gift-button:disabled {
  opacity: 0.9;
}
.lp-gift-confetti {
  position: absolute;
  inset: -10px;
  border-radius: inherit;
  pointer-events: none;
  background-image: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.6) 1px, transparent 35%), radial-gradient(circle at 60% 40%, rgba(255, 255, 255, 0.4) 1px, transparent 30%), radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.7) 2px, transparent 40%);
  background-size: 60px 60px;
  opacity: 0;
}
.lp-gift-button.is-ready .lp-gift-confetti {
  opacity: 1;
  animation: lpConfetti 1.2s linear infinite;
}
.lp-gift-caption {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
  max-width: 260px;
}
.lp-gift-modal-code {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 4px;
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  margin: 16px 0;
  cursor: pointer;
}
.lp-code-chip {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}
.lp-code-chip:focus {
  outline: 2px solid rgba(255, 255, 255, 0.4);
  outline-offset: 2px;
}
.lp-code-chip {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}
.lp-code-chip:focus {
  outline: 2px solid rgba(255, 255, 255, 0.4);
  outline-offset: 2px;
}
@keyframes lpConfetti {
  0% { background-position: 0 0; }
  100% { background-position: 60px 60px; }
}
