@import url('https://fonts.googleapis.com/css2?family=Fredoka+One&family=Nunito:wght@400;500;600;700;800;900&display=swap');
:root {
  --bg-main:       #0d1117;
  --bg-secondary:  #161b26;
  --bg-card:       rgba(22, 30, 46, 0.85);

  --clr-pink:    #ff4da6;
  --clr-purple:  #a855f7;
  --clr-blue:    #3b82f6;
  --clr-cyan:    #06b6d4;
  --clr-green:   #22c55e;
  --clr-yellow:  #facc15;
  --clr-orange:  #fb923c;
  --clr-red:     #f87171;
  --clr-teal:    #2dd4bf;

  --accent-primary:  #ff4da6;
  --accent-hover:    #ff70b8;
  --accent-secondary: #a855f7;
  --accent-danger:   #f87171;

  --text-main:  #f0f4ff;
  --text-muted: #8b9cc8;

  --glass-bg:        rgba(255,255,255,0.06);
  --glass-border:    rgba(255,255,255,0.10);
  --glass-highlight: rgba(255,255,255,0.05);

  --sidebar-width: 280px;
  --header-height: 72px;

  --font-heading: 'Fredoka One', cursive;
  --font-body:    'Nunito', sans-serif;

  --shadow-sm:  0 2px 8px rgba(0,0,0,0.25);
  --shadow-md:  0 8px 24px rgba(0,0,0,0.35);
  --shadow-lg:  0 20px 50px rgba(0,0,0,0.5);

  --transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  --radius-lg: 1.5rem;
  --radius-md: 1rem;
}

.active-section {
  display: block;
}

/* Partnership Navigation */
#nav-partnership.active a {
  background: rgba(255, 77, 166, 0.2);
  color: var(--accent-primary);
  border: 1px solid rgba(255, 77, 166, 0.3);
}

/* Navigation Links */
/* Sidebar Legal Section */
/* Main Content */
.balance-amount {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1;
}

/* Content Area Navigation */
.section-tabs-container {
  margin-bottom: 1.25rem;
  overflow-x: auto;
  padding-bottom: 5px;
}

.section-tabs-container::-webkit-scrollbar {
  display: none;
}

.section-tabs {
  display: flex;
  gap: 0.75rem;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  width: max-content;
}

.section-tab {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.25rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.section-tab i {
  font-size: 1rem;
}

.section-tab:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.section-tab.active {
  background: var(--accent-primary);
  color: white;
  box-shadow: 0 4px 15px rgba(255, 77, 166, 0.3);
}

/* States wrapper */
.states-wrapper {
  position: relative;
  min-height: 0;
}

.empty-icon-circle {
  width: 80px;
  height: 80px;
  background: var(--glass-highlight);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  border: 1px solid var(--glass-border);
}

/* Content Area */
/* Scrollbar Styling */
.content-area::-webkit-scrollbar {
  width: 8px;
}

.content-area::-webkit-scrollbar-track {
  background: transparent;
}

.content-area::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}

.content-area::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* Loading & Empty States */
.loading-container,
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  text-align: center;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 77, 166, 0.3);
  border-radius: 50%;
  border-top-color: var(--accent-primary);
  animation: spin 1s ease-in-out infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.empty-state img {
  width: 120px;
  opacity: 0.5;
  margin-bottom: 1rem;
  filter: grayscale(100%);
}

.hidden {
  display: none !important;
}

/* Grid Layout */
.data-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* ── Transaction / History Cards ── */
.card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-left: 3px solid transparent;
  border-radius: var(--radius-lg);
  padding: 1rem 1.1rem 1rem 1.1rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  display: flex;
  align-items: center;
  gap: 1rem;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* Per-type tint + accent strip */
.card-buy {
  border-left-color: rgba(239, 68, 68, 0.55);
  background: linear-gradient(105deg, rgba(239,68,68,0.07) 0%, var(--glass-bg) 55%);
}
.card-sell {
  border-left-color: rgba(255, 77, 166, 0.55);
  background: linear-gradient(105deg, rgba(255,77,166,0.07) 0%, var(--glass-bg) 55%);
}
.card-pet-history {
  border-left-color: rgba(16, 185, 129, 0.55);
  background: linear-gradient(105deg, rgba(16,185,129,0.06) 0%, var(--glass-bg) 55%);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}
.card-buy:hover  { border-left-color: #f87171; box-shadow: 0 12px 32px rgba(239,68,68,0.18); }
.card-sell:hover { border-left-color: #ff70b8; box-shadow: 0 12px 32px rgba(255,77,166,0.18); }
.card-pet-history:hover { box-shadow: 0 12px 32px rgba(16,185,129,0.15); }

/* Shimmer sweep on hover */
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,0.05) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.55s ease;
  pointer-events: none;
}
.card:hover::before { transform: translateX(100%); }

/* Status pill (BOUGHT / SOLD / DEPOSITED / WITHDRAWN) */
.card-status {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  padding: 0.2rem 0.7rem;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  border-radius: 999px;
  z-index: 2;
}
.status-buy {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.status-sell {
  background: rgba(255, 77, 166, 0.12);
  color: #ff70b8;
  border: 1px solid rgba(255, 77, 166, 0.3);
}

/* Pet image */
.card-image-wrapper {
  width: 76px;
  height: 76px;
  border-radius: 1.1rem;
  background: rgba(10, 18, 38, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 2px solid var(--glass-border);
  box-shadow: 0 6px 18px rgba(0,0,0,0.45);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover .card-image-wrapper {
  transform: scale(1.06);
  box-shadow: 0 10px 26px rgba(0,0,0,0.5);
}
.card-img {
  width: 78%;
  height: 78%;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.5));
  transition: transform 0.4s cubic-bezier(0.175,0.885,0.32,1.275);
}
.card:hover .card-img { transform: scale(1.12) rotate(-3deg); }

/* Content area */
.card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  padding-right: 4.5rem; /* space for status pill */
  gap: 0.25rem;
}

.pet-name {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

/* Footer: time left, price right */
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.35rem;
  padding-top: 0.4rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.card-time {
  font-size: 0.7rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* Price */
.card-price {
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: -0.75px;
  line-height: 1;
}
.card-price.positive {
  color: #ff70b8;
  text-shadow: 0 0 14px rgba(255,77,166,0.35);
}
.card-price.negative {
  color: #f87171;
  text-shadow: 0 0 14px rgba(239,68,68,0.35);
}
.positive { color: var(--accent-primary); }
.negative { color: var(--accent-danger); }

/* ── Pet property badges (N / M / F / R) ── */
.pet-badges {
  display: flex;
  gap: 4px;
  margin-bottom: 0.5rem;
}

.badge {
  font-size: 0.65rem;
  font-weight: 800;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  letter-spacing: 0;
}

.badge-n { background: linear-gradient(135deg, #33d300, #1fa300); box-shadow: 0 2px 6px rgba(51,211,0,0.5); }
.badge-m { background: linear-gradient(135deg, #892eed, #5c00c7); box-shadow: 0 2px 6px rgba(137,46,237,0.5); }
.badge-f { background: linear-gradient(135deg, #1a68e6, #0040b3); box-shadow: 0 2px 6px rgba(26,104,230,0.5); }
.badge-r { background: linear-gradient(135deg, #ff267b, #cc0050); box-shadow: 0 2px 6px rgba(255,38,123,0.5); }

/* ── Achievement badges grid ── */
.badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}

.badge-earned,
.badge-locked {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem 1rem 1.25rem;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--glass-border);
  gap: 0.5rem;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.badge-earned {
  background: linear-gradient(145deg, rgba(255,77,166,0.12), rgba(168,85,247,0.10));
  border-color: rgba(255,77,166,0.35);
  box-shadow: 0 4px 20px rgba(255,77,166,0.15);
}

.badge-earned:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(255,77,166,0.25);
}

.badge-locked {
  background: var(--glass-highlight);
  opacity: 0.45;
  filter: grayscale(0.6);
}

.badge-earned i,
.badge-locked i {
  font-size: 2rem;
  margin-bottom: 0.25rem;
}

.badge-earned i {
  background: linear-gradient(135deg, var(--clr-pink), var(--clr-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 8px rgba(255,77,166,0.5));
}

.badge-locked i {
  color: var(--text-dim);
}

.badge-earned span,
.badge-locked span {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-main);
}

.badge-earned small,
.badge-locked small {
  font-size: 0.73rem;
  color: var(--text-muted);
  line-height: 1.35;
}

/* Shine sweep on earned badges */
.badge-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(255,255,255,0.07) 50%,
    transparent 70%
  );
  animation: badgeSweep 3s ease-in-out infinite;
  pointer-events: none;
}

@keyframes badgeSweep {
  0%   { transform: translateX(-100%); }
  50%  { transform: translateX(100%); }
  100% { transform: translateX(100%); }
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  animation: fadeIn 0.3s forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

.modal-card {
  background: #1e293b;
  width: 90%;
  max-width: 600px;
  border-radius: 1.5rem;
  border: 1px solid var(--glass-border);
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.5);
  padding: 2rem;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

/* Modernized Redeem Modal */
.modal-card.mini.redeem-card {
  padding: 3rem 2rem;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  max-width: 450px;
}

.redeem-icon-header {
  width: 70px;
  height: 70px;
  background: rgba(255, 77, 166, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: var(--accent-primary);
  font-size: 2rem;
  border: 1px solid rgba(255, 77, 166, 0.2);
  box-shadow: 0 0 20px rgba(255, 77, 166, 0.15);
}

.modal-card h2 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.redeem-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
  display: block;
}

.redeem-input-wrapper {
  position: relative;
  margin-bottom: 2rem;
}

.redeem-input {
  background: rgba(0, 0, 0, 0.4) !important;
  border: 2px solid var(--glass-border) !important;
  border-radius: 1rem !important;
  height: 65px !important;
  font-size: 1.75rem !important;
  color: var(--accent-primary) !important;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5) !important;
  transition: var(--transition) !important;
}

.redeem-input:focus {
  border-color: var(--accent-primary) !important;
  background: rgba(0, 0, 0, 0.6) !important;
  box-shadow: 0 0 20px rgba(16, 184, 129, 0.2) !important;
}

.btn-redeem-gradient {
  background: linear-gradient(135deg, var(--accent-primary), #059669) !important;
  height: 55px;
  font-size: 1.1rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: 1rem !important;
}

.btn-redeem-gradient:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 25px rgba(255, 77, 166, 0.4);
}

.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  transition: var(--transition);
}

.modal-close:hover {
  color: var(--text-main);
  transform: rotate(90deg);
}

.modal-header {
  margin-bottom: 2rem;
  text-align: center;
}

.modal-header h2 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  color: var(--accent-primary);
}

.modal-header p {
  color: var(--text-muted);
}

/* Forms */
.form-group {
  margin-bottom: 1.25rem;
}

.form-row {
  display: flex;
  gap: 1rem;
}

.form-row .form-group {
  flex: 1;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-left: 0.5rem;
}

input {
  width: 100%;
  padding: 0.875rem 1rem;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 0.75rem;
  color: white;
  font-family: var(--font-body);
  font-size: 1rem;
  outline: none;
  transition: var(--transition);
}

input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(255, 77, 166, 0.2);
}

.redeem-input {
  text-align: center;
  font-size: 1.5rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

/* Buttons */
.btn-primary {
  background: var(--accent-primary);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 0.75rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 77, 166, 0.3);
}

.btn-danger {
  background: transparent;
  color: var(--accent-danger);
  border: 1px solid var(--accent-danger);
  padding: 0.8rem 1.5rem;
  border-radius: 0.75rem;
  font-family: var(--font-heading);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.1);
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
}

.full-width {
  width: 100%;
}

/* Responsive Design */
@media (max-width: 768px) {
  .sidebar.open {
    left: 0;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }
}

/* Auth Modal Specifics */
.auth-modal .modal-card {
  max-width: 400px;
  width: 90%;
  padding: 0;
  overflow: hidden;
}

.auth-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid var(--glass-border);
}

.auth-tab {
  flex: 1;
  padding: 1rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border-bottom: 2px solid transparent;
}

.auth-tab:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.02);
}

.auth-tab.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
  background: rgba(255, 77, 166, 0.05);
}

.auth-content {
  padding: 2rem;
}

.auth-form {
  display: none;
  flex-direction: column;
  gap: 1rem;
  animation: fadeIn 0.3s ease;
}

.auth-form.active {
  display: flex !important;
}

/* Referral Modernization */
.referral-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
}

.referral-header h2 {
  font-family: var(--font-heading);
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.referral-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 2rem;
  text-align: center;
}

.referral-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.stat-card {
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-3px);
  background: rgba(15, 23, 42, 0.6);
  border-color: var(--accent-primary);
}

.stat-icon-bg {
  width: 54px;
  height: 54px;
  background: rgba(255, 77, 166, 0.1);
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  font-size: 1.5rem;
  border: 1px solid rgba(255, 77, 166, 0.2);
}

.stat-card.platinum .stat-icon-bg {
  background: rgba(56, 189, 248, 0.1);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.2);
}

.stat-card.platinum:hover {
  border-color: #38bdf8;
}

.stat-details .count {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.1;
}

.stat-details .label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.referral-link-container {
  margin-bottom: 1.5rem;
}

.link-group {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.link-group input {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  padding: 1rem;
  cursor: default;
}

.btn-copy {
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  color: white;
  width: 50px;
  flex-shrink: 0;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: var(--transition);
}

/* Partnership Dashboard */
.partnership-dashboard {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  animation: fadeIn 0.4s ease;
}

.partnership-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.stat-card.gold .stat-icon-bg {
  background: rgba(234, 179, 8, 0.1);
  color: #eab308;
  border-color: rgba(234, 179, 8, 0.2);
}

.stat-card.gold:hover {
  border-color: #eab308;
  box-shadow: 0 10px 20px rgba(234, 179, 8, 0.1);
}

.data-section-title {
  margin-top: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--glass-border);
}

.data-section-title h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Commission list items */
.transactions-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.transaction-item {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  padding: 1rem 1.5rem;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--transition);
}

.transaction-item:hover {
  background: var(--glass-highlight);
  border-color: var(--glass-border);
  transform: translateX(5px);
}

.t-id {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

.t-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.t-user-info {
  display: flex;
  flex-direction: column;
}

.t-buyer {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--text-main);
  font-size: 1rem;
}

.t-type {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.t-date {
  color: var(--text-muted);
  font-size: 0.9rem;
  flex: 1;
  text-align: center;
}

.t-amount {
  flex: 1;
  text-align: right;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
}

.btn-copy:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
}

.referral-info-box {
  background: rgba(255, 77, 166, 0.05);
  border-left: 4px solid var(--accent-primary);
  padding: 1.5rem;
  border-radius: 0 1rem 1rem 0;
  margin-top: 2rem;
}

.transaction-header,
.transaction-item {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1fr;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--glass-border);
}

.transaction-header {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.t-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.t-id {
  display: flex;
  align-items: center;
}

/* =========================================
   Custom Modals & Notification Toasts
   ========================================= */

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid var(--glass-border);
  padding: 0.8rem 1.5rem;
  border-radius: 0.75rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Toast Notification System */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text-main);
  padding: 14px 20px;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  min-width: 250px;
  max-width: 350px;
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease;
  pointer-events: auto;
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

.toast.hiding {
  transform: translateX(120%);
  opacity: 0;
}

.toast-icon {
  font-size: 1.2rem;
}

.toast.success .toast-icon {
  color: var(--accent-primary);
}

.toast.error .toast-icon {
  color: #ef4444;
}

.toast.info .toast-icon {
  color: #38bdf8;
}

.toast.warning .toast-icon {
  color: #f59e0b;
}

.toast-content {
  flex: 1;
  word-break: break-word;
  line-height: 1.4;
}

/* Custom Confirm Modal specific tweaks */
#modal-confirm {
  z-index: 99999 !important;
}

.confirm-card {
  border-top: 4px solid var(--accent-primary);
}

.confirm-card.danger {
  border-top-color: #ef4444;
}

.confirm-card.danger .btn-primary {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.confirm-card.danger .btn-primary:hover {
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
  transform: translateY(-2px);
}

/* Referral Program Section */
.referral-card {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, rgba(255, 77, 166, 0.1) 0%, rgba(5, 150, 105, 0.1) 100%);
  border: 1px solid rgba(255, 77, 166, 0.3);
  padding: 2.5rem;
  border-radius: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.referral-header h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--accent-primary);
  font-family: var(--font-heading);
}

.referral-header p {
  font-size: 1.1rem;
  color: var(--text-muted);
}

.referral-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.stat-box {
  background: rgba(15, 23, 42, 0.6);
  padding: 2rem;
  border-radius: 1.25rem;
  border: 1px solid var(--glass-border);
  text-align: center;
  transition: var(--transition);
}

.stat-box:hover {
  transform: translateY(-5px);
  border-color: var(--accent-primary);
  background: rgba(255, 77, 166, 0.05);
}

.stat-box .count {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-main);
  display: block;
  font-family: var(--font-heading);
  margin-bottom: 0.25rem;
}

.stat-box .label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
}

.referral-link-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.referral-link-container label {
  font-weight: 600;
  color: var(--text-main);
  margin-left: 0.25rem;
}

.link-group {
  display: flex;
  gap: 0.75rem;
}

.link-group input {
  flex: 1;
  background: rgba(15, 23, 42, 0.8);
  font-weight: 500;
  color: var(--accent-primary);
  cursor: default;
}

.btn-copy {
  background: var(--accent-primary);
  color: white;
  border: none;
  padding: 0 1.5rem;
  border-radius: 0.75rem;
  cursor: pointer;
  font-size: 1.1rem;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-copy:hover {
  background: var(--accent-hover);
  transform: scale(1.05);
}

.referral-info-box {
  background: rgba(255, 255, 255, 0.03);
  padding: 1.5rem;
  border-radius: 1rem;
  border-left: 4px solid var(--accent-primary);
}

.referral-info-box h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.referral-info-box ul {
  list-style: none;
  padding: 0;
}

.referral-info-box li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.referral-info-box li::before {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  left: 0;
  color: var(--accent-primary);
}

/* Responsive Styles */
@media (max-width: 768px) {
    :root {
        --sidebar-width: 260px;
        --header-height: 70px;
    }

    .sidebar.open {
        left: 0;
    }

    .section-tabs-container {
        padding-bottom: 10px;
    }

    .section-tabs {
        padding: 0.4rem;
        gap: 0.5rem;
    }

    .section-tab {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .data-grid {
        grid-template-columns: 1fr;
    }

    .card {
        padding: 0.7rem 0.85rem;
        gap: 0.7rem;
    }
    .card-image-wrapper {
        width: 54px;
        height: 54px;
    }
    .card-content {
        padding-right: 3.8rem;
    }
    .pet-name {
        font-size: 0.88rem;
    }
    .card-price {
        font-size: 0.95rem;
        letter-spacing: -0.4px;
    }
    .card-status {
        top: 0.55rem;
        right: 0.7rem;
        font-size: 0.6rem;
        padding: 0.15rem 0.5rem;
    }
}

@media (max-width: 480px) {
    .balance-amount {
        font-size: 0.95rem;
    }

    .modal-card {
        padding: 1.5rem;
        width: 95%;
    }
}
/* =========================================
   PREMIUM PAGE LOADER
   ========================================= */
#page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.5s ease-out, visibility 0.5s;
}

#page-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.premium-spinner {
    position: relative;
    width: 80px;
    height: 80px;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid transparent;
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.spinner-ring:nth-child(2) {
    width: 70%;
    height: 70%;
    top: 15%;
    left: 15%;
    border-top-color: #a855f7;
    animation-delay: -0.3s;
}

.loader-text {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-main);
    letter-spacing: 1px;
    text-shadow: 0 0 20px rgba(255, 77, 166, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(0.98); }
}

/* =====================================================
   MODO CLARO
   ===================================================== */
[data-theme="light"] {
  /* Fondo más rico — lavanda medio, no blanco */
  --bg-main:       #dde3f5;
  --bg-secondary:  #c8d0ea;
  --bg-card:       rgba(240, 244, 255, 0.95);

  --clr-pink:    #d6147a;
  --clr-purple:  #6d28d9;
  --clr-blue:    #1d4ed8;
  --clr-cyan:    #0369a1;
  --clr-green:   #15803d;
  --clr-yellow:  #b45309;
  --clr-orange:  #c2410c;
  --clr-red:     #b91c1c;
  --clr-teal:    #0f766e;

  --accent-primary:   #d6147a;
  --accent-hover:     #b0105f;
  --accent-secondary: #6d28d9;
  --accent-danger:    #b91c1c;

  /* Texto oscuro con buen contraste sobre el lavanda */
  --text-main:  #12103a;
  --text-muted: #3b3d6b;

  /* Glass más opaco para que los cards destaquen del fondo */
  --glass-bg:        rgba(220, 228, 248, 0.85);
  --glass-border:    rgba(100, 110, 180, 0.20);
  --glass-highlight: rgba(100, 110, 180, 0.10);
  --glass-strong:    rgba(100, 110, 180, 0.22);
}

[data-theme="light"] .balance-card {
  background: rgba(210, 220, 245, 0.85);
}

[data-theme="light"] .card,
[data-theme="light"] .glass-card {
  background: rgba(235, 240, 255, 0.95);
  border-color: rgba(100, 110, 180, 0.20);
}

[data-theme="light"] .form-group input,
[data-theme="light"] .form-group select,
[data-theme="light"] .form-group textarea {
  background: rgba(230, 236, 255, 0.90);
  border-color: rgba(100, 110, 180, 0.25);
  color: var(--text-main);
}
[data-theme="light"] .form-group input::placeholder,
[data-theme="light"] .form-group select::placeholder,
[data-theme="light"] .form-group textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}
[data-theme="light"] .form-group input:focus,
[data-theme="light"] .form-group select:focus,
[data-theme="light"] .form-group textarea:focus {
  background: rgba(220, 228, 252, 1);
  border-color: var(--accent-primary);
}

[data-theme="light"] #searchInput,
[data-theme="light"] .chat-input {
  background: rgba(220, 228, 252, 0.9);
  color: var(--text-main);
}
[data-theme="light"] #searchInput::placeholder,
[data-theme="light"] .chat-input::placeholder { color: var(--text-muted); }

[data-theme="light"] .pet-card,
[data-theme="light"] .popup-card,
[data-theme="light"] .modal-card,
[data-theme="light"] .auth-modal .modal-card {
  background: rgba(235, 240, 255, 0.98);
  border-color: rgba(100, 110, 180, 0.20);
}

[data-theme="light"] .toast {
  background: rgba(230, 236, 255, 0.97);
  border-color: rgba(100, 110, 180, 0.25);
}

[data-theme="light"] .auth-tabs {
  background: rgba(210, 220, 245, 0.6);
}

[data-theme="light"] .page-title {
  background: linear-gradient(135deg, #d6147a, #6d28d9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* =====================================================
   MEJORAS SIDEBAR — sin romper nada existente
   ===================================================== */
/* =====================================================
   BOTÓN TEMA CLARO/OSCURO
   ===================================================== */
[data-theme="light"] .theme-toggle-btn .icon-moon { display: none;   }
[data-theme="light"] .theme-toggle-btn .icon-sun  { display: inline; }

/* =====================================================
   FILTER TOGGLES — badges de propiedad
   ===================================================== */
.filter-toggle.active { border-color: transparent; color: white; }
.filter-toggle[data-prop="neon"].active  { background: linear-gradient(135deg,#a855f7,#ec4899); box-shadow: 0 0 14px rgba(168,85,247,0.5); }
.filter-toggle[data-prop="mega"].active  { background: linear-gradient(135deg,#facc15,#fb923c); color:#1a0700; box-shadow: 0 0 14px rgba(250,204,21,0.5); }
.filter-toggle[data-prop="fly"].active   { background: linear-gradient(135deg,#3b82f6,#06b6d4); box-shadow: 0 0 14px rgba(59,130,246,0.5); }
.filter-toggle[data-prop="ride"].active  { background: linear-gradient(135deg,#22c55e,#2dd4bf); color:#011a06; box-shadow: 0 0 14px rgba(34,197,94,0.5); }


/* =====================================================
   SEARCH INPUT FIX
   ===================================================== */
.search-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex: 1;
  min-width: 200px;
  transition: all 0.3s ease;
}
.search-bar:focus-within {
  border-color: var(--accent-primary) !important;
  box-shadow: 0 0 0 3px rgba(255,77,166,0.15) !important;
}
#searchInput {
  background: none;
  border: none;
  outline: none;
  color: var(--text-main);
  font-family: 'Nunito', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  width: 100%;
}
#searchInput::placeholder { color: var(--text-muted); }

/* Toasts */
.toast-container { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 9000; display: flex; flex-direction: column; gap: 0.5rem; }
.toast { display: flex; align-items: center; gap: 0.75rem; background: var(--glass-bg); border: 1.5px solid var(--glass-border); border-radius: 1rem; padding: 0.85rem 1.1rem; min-width: 260px; max-width: 360px; backdrop-filter: blur(12px); box-shadow: 0 8px 24px rgba(0,0,0,0.35); }
.toast.success { border-color: rgba(34,197,94,0.35); }
.toast.success .toast-icon { color: #22c55e; }
.toast.error { border-color: rgba(248,113,113,0.35); }
.toast.error .toast-icon { color: #f87171; }
.toast.info { border-color: rgba(59,130,246,0.35); }
.toast.info .toast-icon { color: #3b82f6; }
.toast.warning { border-color: rgba(250,204,21,0.35); }
.toast.warning .toast-icon { color: #facc15; }
.toast-content { flex: 1; font-size: 0.88rem; font-weight: 600; line-height: 1.4; }

/* ── Settings Section ── */
.settings-card {
    background: var(--bg-card);
    border: 1.5px solid var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.settings-group {
    padding: 1.5rem 1.75rem;
    border-bottom: 1px solid var(--glass-border);
}

.settings-group:last-of-type {
    border-bottom: none;
}

.settings-group-title {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.settings-group-title i {
    color: var(--accent-primary);
}

.settings-subgroup {
    margin-left: 1.25rem;
    padding-left: 1rem;
    border-left: 2px solid var(--glass-border);
    transition: opacity 0.2s;
}

.settings-subgroup .settings-row {
    padding: 0.65rem 1.5rem;
}

.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.settings-label span {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-main);
    margin-bottom: 0.2rem;
}

.settings-label small {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* iOS-style toggle */
.toggle-switch {
    position: relative;
    flex-shrink: 0;
    width: 48px;
    height: 26px;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--glass-border);
    border-radius: 999px;
    transition: background 0.25s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1);
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--accent-primary);
    box-shadow: 0 0 12px rgba(255,77,166,0.4);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(22px);
}

/* Save row */
.settings-save-row {
    padding: 1.25rem 1.75rem;
    border-top: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255,255,255,0.02);
}

.btn-profile-action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.4rem;
    background: var(--accent-primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-full);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 14px rgba(255,77,166,0.35);
}

.btn-profile-action:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255,77,166,0.45);
}

/* ── Sell card: two-line price ── */
.card-price-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
}

.card-price-gross {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 400;
    letter-spacing: 0;
}

/* ── Pet history card status badges ── */
.status-deposit {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-secondary, #10b981);
    border: 1px solid rgba(16, 185, 129, 0.35);
}

.status-withdraw {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.35);
}
