/**
 * Profile and Pins tab styles for MoodMap
 */

/* Profile Styles */
.profile-container {
  max-width: 600px;
  margin: 0 auto;
}

.user-info-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.9));
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(229, 231, 235, 0.5);
  display: flex;
  align-items: center;
  gap: 20px;
}

.profile-settings-card {
  background: rgba(15, 23, 42, 0.75);
  border-radius: 18px;
  padding: 20px;
  margin-top: 24px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.25);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: rgba(255, 255, 255, 0.92);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.profile-settings-card h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.profile-settings-hint {
  margin: 0;
  font-size: 13px;
  color: rgba(226, 232, 240, 0.7);
}

.profile-option {
  display: flex;
  align-items: center;
  gap: 16px;
  border: none;
  background: rgba(15, 23, 42, 0.6);
  border-radius: 14px;
  padding: 14px 18px;
  cursor: pointer;
  color: inherit;
  text-align: left;
  transition: transform 0.2s ease, background 0.2s ease;
}

.profile-option[disabled] {
  cursor: not-allowed;
  opacity: 0.65;
  transform: none;
}

.profile-option:hover {
  transform: translateY(-2px);
  background: rgba(30, 41, 59, 0.7);
}

.profile-option[disabled]:hover {
  transform: none;
  background: rgba(15, 23, 42, 0.6);
}

.profile-option:active {
  transform: translateY(0);
}

.profile-option-field {
  cursor: default;
}

.profile-option-field:hover,
.profile-option-field:active {
  transform: none;
  background: rgba(15, 23, 42, 0.6);
}

.profile-option-icon {
  display: inline-flex;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.18);
  align-items: center;
  justify-content: center;
  color: #93c5fd;
  flex-shrink: 0;
}

.profile-option-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.profile-option-title {
  font-size: 14px;
  font-weight: 600;
}

.profile-option-subtitle {
  font-size: 12px;
  color: rgba(226, 232, 240, 0.75);
}

.profile-option-control {
  margin-top: 8px;
  position: relative;
}

.profile-option-control::after {
  content: '\25BE';
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: rgba(226, 232, 240, 0.7);
  font-size: 14px;
}

.profile-select {
  width: 100%;
  appearance: none;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.65);
  color: #f8fafc;
  font-size: 13px;
  padding: 10px 38px 10px 12px;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.profile-select:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.9);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.6);
}

.profile-select option {
  color: #0f172a;
}

.profile-option-chevron {
  margin-left: auto;
  font-size: 18px;
  color: rgba(226, 232, 240, 0.5);
}

.profile-option-toggle {
  gap: 14px;
}

.profile-option-toggle-control {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.profile-toggle-pill {
  width: 56px;
  height: 28px;
  border-radius: 999px;
  padding: 4px;
  display: inline-flex;
  align-items: center;
  background: rgba(226, 232, 240, 0.25);
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.35);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.profile-toggle-knob {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.45);
  transform: translateX(0);
  transition: transform 0.25s ease;
}

.profile-toggle-label {
  color: rgba(226, 232, 240, 0.45);
  transition: color 0.25s ease, opacity 0.25s ease;
}

.profile-option-toggle[data-state='on'] .profile-toggle-pill {
  background: linear-gradient(135deg, #34d399, #3b82f6);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.45);
}

.profile-option-toggle[data-state='on'] .profile-toggle-knob {
  transform: translateX(28px);
}

.profile-option-toggle[data-state='on'] .profile-toggle-label-on {
  color: #e0f2fe;
  opacity: 1;
}

.profile-option-toggle[data-state='off'] .profile-toggle-label-off {
  color: #fecaca;
  opacity: 1;
}

.profile-option-toggle[disabled] .profile-toggle-pill {
  opacity: 0.6;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.15);
}

.profile-option-toggle[disabled] .profile-toggle-knob {
  box-shadow: none;
}

.user-avatar {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  background: linear-gradient(135deg, #f8fafc, #e2e8f0);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.8);
}

.user-details h3 {
  margin: 0 0 8px 0;
  font-size: 20px;
  font-weight: 600;
  color: #1f2937;
}

.user-details p {
  margin: 0 0 4px 0;
  color: #6b7280;
  font-size: 14px;
}

.user-stats {
  color: #3b82f6 !important;
  font-weight: 500;
}

.profile-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.profile-overview-card {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 18px;
  padding: 20px;
  margin-top: 20px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.12);
  border: 1px solid rgba(226, 232, 240, 0.6);
}

.profile-membership-card {
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.95), rgba(30, 64, 175, 0.85));
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: rgba(248, 250, 252, 0.95);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.profile-membership-card[data-state='attention'] {
  border-color: rgba(248, 113, 113, 0.65);
  box-shadow: 0 18px 34px rgba(185, 28, 28, 0.35);
}

.membership-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.membership-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  background: rgba(59, 130, 246, 0.2);
  color: #e0f2fe;
}

.membership-pill--active {
  background: linear-gradient(120deg, #16a34a, #22d3ee);
  color: #f0fdf4;
}

.membership-pill--trial {
  background: linear-gradient(120deg, #f97316, #fcd34d);
  color: #1f2937;
}

.membership-pill--warning {
  background: linear-gradient(120deg, #dc2626, #fb7185);
  color: #fff5f5;
}

.membership-detail {
  font-size: 13px;
  color: rgba(226, 232, 240, 0.85);
}

.membership-message {
  margin: 0;
  font-size: 13px;
  color: rgba(248, 250, 252, 0.88);
}

.membership-meta {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.membership-meta div {
  background: rgba(15, 23, 42, 0.6);
  border-radius: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.membership-meta dt {
  margin: 0 0 6px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(147, 197, 253, 0.9);
}

.membership-meta dd {
  margin: 0;
  font-size: 14px;
  color: rgba(248, 250, 252, 0.95);
}

.membership-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.membership-actions[hidden] {
  display: none;
}

.membership-action-btn {
  flex: 1 1 160px;
  border: none;
  border-radius: 14px;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.membership-action-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.2);
}

.membership-action-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.subscription-plan-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 8px 0 4px;
  max-height: 65vh;
  overflow-y: auto;
}

.subscription-plan-card {
  text-align: left;
  width: 100%;
  border: 2px solid rgba(59, 130, 246, 0.4);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(15, 118, 192, 0.85));
  color: #f8fafc;
  border-radius: 14px;
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.subscription-plan-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.4);
  border-color: rgba(59, 130, 246, 0.6);
}

.subscription-plan-card--trial {
  border-color: rgba(251, 191, 36, 0.6);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(217, 119, 6, 0.3), rgba(15, 118, 192, 0.85));
  box-shadow: 0 4px 16px rgba(251, 191, 36, 0.15);
}

.subscription-plan-card--trial:hover {
  border-color: rgba(251, 191, 36, 0.8);
  box-shadow: 0 12px 32px rgba(251, 191, 36, 0.25);
}

.subscription-plan-duration {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: #f1f5f9;
}

.subscription-plan-price {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  color: #93c5fd;
  margin-top: 2px;
}

.subscription-plan-card--trial .subscription-plan-price {
  color: #fbbf24;
}

.subscription-plan-trial {
  display: block;
  font-size: 0.85rem;
  color: #fde68a;
  margin-top: 4px;
  font-weight: 600;
}

.subscription-plan-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 6px;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #1e293b;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 8px;
  box-shadow: 0 2px 8px rgba(251, 191, 36, 0.3);
}

.subscription-plan-footnote {
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 8px;
  text-align: center;
}

.profile-overview-card h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #0f172a;
}

.profile-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.profile-metric {
  background: linear-gradient(160deg, rgba(59, 130, 246, 0.12), rgba(59, 130, 246, 0.02));
  border-radius: 16px;
  padding: 16px;
  border: 1px solid rgba(191, 219, 254, 0.7);
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 110px;
}

.profile-metric.placeholder {
  align-items: center;
  justify-content: center;
  text-align: center;
}

.profile-metric .metric-value {
  font-size: 28px;
  font-weight: 700;
  color: #1d4ed8;
}

.profile-metric .metric-label {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #1f2937;
}

.profile-metric .metric-hint {
  font-size: 12px;
  color: #475569;
}

.profile-highlight {
  margin-top: 18px;
  padding: 16px;
  border-radius: 14px;
  background: rgba(15, 118, 110, 0.12);
  border: 1px solid rgba(45, 212, 191, 0.3);
  display: flex;
  align-items: center;
  gap: 14px;
  color: #0f766e;
  font-size: 14px;
}

.profile-highlight strong {
  display: block;
  font-size: 15px;
  color: #0f172a;
}

.profile-highlight small {
  display: block;
  color: #134e4a;
  font-size: 12px;
}

.profile-version-card {
  margin-top: 18px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.94);
  display: flex;
  gap: 16px;
  align-items: center;
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.35);
}

.profile-version-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: rgba(59, 130, 246, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #93c5fd;
}

.profile-version-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: rgba(226, 232, 240, 0.9);
}

.profile-version-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(148, 163, 184, 0.9);
}

.profile-version-value {
  font-size: 20px;
  font-weight: 600;
  color: #f8fafc;
}

.profile-version-hint {
  font-size: 13px;
  color: rgba(148, 163, 184, 0.9);
}

.profile-support-card {
  margin-top: 18px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.94);
  display: flex;
  gap: 16px;
  align-items: center;
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.35);
}

.profile-support-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: rgba(16, 185, 129, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6ee7b7;
}

.profile-support-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: rgba(226, 232, 240, 0.9);
}

.profile-support-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(148, 163, 184, 0.9);
}

.profile-support-email {
  font-size: 18px;
  font-weight: 600;
  color: #10b981;
  text-decoration: none;
  transition: color 0.2s;
}

.profile-support-email:hover {
  color: #34d399;
}

.profile-support-hint {
  font-size: 13px;
  color: rgba(148, 163, 184, 0.9);
}

.profile-menu {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.profile-menu-item-wrapper {
  display: flex;
  flex-direction: column;
}

.profile-menu-item {
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 18px;
  padding: 16px 20px;
  background: rgba(15, 23, 42, 0.85);
  color: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.profile-menu-item:focus-visible {
  outline: 2px solid rgba(96, 165, 250, 0.7);
  outline-offset: 2px;
}

.profile-menu-item:hover {
  transform: translateY(-2px);
  border-color: rgba(148, 163, 184, 0.7);
  box-shadow: 0 18px 30px rgba(15, 23, 42, 0.35);
}

.profile-menu-copy {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.profile-menu-title {
  font-size: 15px;
  font-weight: 600;
}

.profile-menu-subtitle {
  font-size: 12px;
  color: rgba(226, 232, 240, 0.75);
}

.profile-menu-chevron {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: rgba(248, 250, 252, 0.9);
  transition: transform 0.2s ease;
}

.profile-menu-chevron::before {
  content: '›';
  transform: translateX(1px);
}

.profile-menu-item[aria-expanded='true'] .profile-menu-chevron {
  transform: rotate(90deg);
}

.profile-menu-panel {
  margin-top: 10px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  padding: 2px;
  background: rgba(15, 23, 42, 0.75);
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.3);
}

.profile-menu-panel[hidden] {
  display: none;
}

.profile-menu-panel .profile-activity-card,
.profile-menu-panel .profile-settings-card {
  margin-top: 0;
}

.profile-activity-card {
  background: rgba(15, 23, 42, 0.9);
  border-radius: 18px;
  padding: 20px;
  margin-top: 20px;
  color: rgba(241, 245, 249, 0.94);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.profile-activity-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 16px;
}

.profile-activity-header h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.profile-activity-hint {
  margin: 0;
  font-size: 12px;
  color: rgba(226, 232, 240, 0.72);
}

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

.notification-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.notification-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.notification-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.notification-copy strong {
  font-size: 14px;
  color: #f8fafc;
}

.notification-copy span {
  font-size: 13px;
  color: rgba(226, 232, 240, 0.74);
}

.notification-time {
  font-size: 11px;
  color: rgba(148, 163, 184, 0.7);
  margin-top: 4px;
}

.notification-empty {
  margin: 0;
  margin-top: 8px;
  font-size: 13px;
  color: rgba(226, 232, 240, 0.7);
  text-align: center;
}

.notification-pagination {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.notification-pagination.is-hidden {
  display: none;
}

.notification-page-label {
  font-size: 12px;
  color: rgba(226, 232, 240, 0.75);
}

.notification-page-btn {
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(148, 163, 184, 0.15);
  color: #f8fafc;
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.2s ease, opacity 0.2s ease;
}

.notification-page-btn:hover:not(:disabled) {
  background: rgba(148, 163, 184, 0.25);
}

.notification-page-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

@media (max-width: 480px) {
  .profile-metric-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }

  .profile-highlight {
    flex-direction: column;
    align-items: flex-start;
  }
}

.profile-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border: none;
  border-radius: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
}

.logout-btn {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.25);
}

.logout-btn:hover {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.35);
}

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

.delete-btn {
  background: linear-gradient(135deg, #991b1b, #7f1d1d);
  color: white;
  box-shadow: 0 4px 16px rgba(153, 27, 27, 0.3);
}

.delete-btn:hover {
  background: linear-gradient(135deg, #7f1d1d, #641717);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(153, 27, 27, 0.4);
}

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

.profile-actions .admin-only {
  display: none;
}

.profile-actions .admin-only.show-admin {
  display: flex;
}

.admin-btn {
  background: linear-gradient(135deg, #0ea5e9, #0369a1);
  color: white;
  box-shadow: 0 4px 16px rgba(14, 165, 233, 0.25);
}

.admin-btn:hover {
  background: linear-gradient(135deg, #0284c7, #075985);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.35);
}

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

/* Pins Styles */
.pins-container {
  max-width: 800px;
  margin: 0 auto;
}

.pins-controls {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.pins-search-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pins-search-field {
  position: relative;
  display: flex;
  align-items: center;
}

.pins-search-input {
  width: 100%;
  padding: 12px 42px 12px 40px;
  border-radius: 14px;
  border: 1px solid rgba(203, 213, 225, 0.9);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 3px 14px rgba(15, 23, 42, 0.08);
  font-size: 14px;
  color: #1f2937;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.pins-search-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 4px 18px rgba(59, 130, 246, 0.18);
}

.pins-search-icon {
  position: absolute;
  left: 14px;
  color: #64748b;
  pointer-events: none;
}

.pins-search-clear {
  position: absolute;
  right: 10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(148, 163, 184, 0.18);
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease, transform 0.2s ease;
}

.pins-search-clear:hover {
  background: rgba(59, 130, 246, 0.2);
  color: #2563eb;
  transform: scale(1.05);
}

.pins-search-clear:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.pins-search-clear.hidden {
  display: none;
}

.pins-filter {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 12px;
}

.admin-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #1f2937;
}

.admin-checkbox {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid #3b82f6;
  border-radius: 4px;
  background: white;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}

.admin-checkbox:checked {
  background: #3b82f6;
  border-color: #3b82f6;
}

.admin-checkbox:checked::after {
  content: '✓';
  position: absolute;
  top: -2px;
  left: 2px;
  color: white;
  font-size: 12px;
  font-weight: bold;
}

.pin-bulk-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(249, 250, 251, 0.9);
  border: 1px solid rgba(229, 231, 235, 0.6);
  border-radius: 12px;
  flex-wrap: wrap;
}

.pin-select-all {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #1f2937;
}

.pin-checkbox {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid #d1d5db;
  border-radius: 4px;
  background: white;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}

.pin-checkbox:checked {
  background: #3b82f6;
  border-color: #3b82f6;
}

.pin-checkbox:checked::after {
  content: '✓';
  position: absolute;
  top: -2px;
  left: 2px;
  color: white;
  font-size: 12px;
  font-weight: 700;
}

.pins-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(209, 213, 219, 0.8);
  background: white;
  color: #1f2937;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.pagination-btn:hover:enabled {
  border-color: #3b82f6;
  color: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.pagination-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  box-shadow: none;
}

.pagination-info {
  font-size: 14px;
  color: #4b5563;
  font-weight: 500;
}

.bulk-delete-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

.bulk-delete-btn:hover:enabled {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(220, 38, 38, 0.3);
}

.bulk-delete-btn:disabled {
  cursor: not-allowed;
  background: #e5e7eb;
  color: #9ca3af;
  box-shadow: none;
}

.checkmark {
  display: none;
}

.toggle-text {
  user-select: none;
}

.filter-btn {
  padding: 8px 16px;
  border: 2px solid #e5e7eb;
  background: white;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn.active,
.filter-btn:hover {
  background: #3b82f6;
  border-color: #3b82f6;
  color: white;
}

.pins-list {
  margin-bottom: 24px;
}

.loading-pins {
  text-align: center;
  padding: 40px 20px;
  color: #6b7280;
}

.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #e5e7eb;
  border-top: 3px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.pin-item {
  background: white;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(229, 231, 235, 0.5);
  transition: all 0.3s ease;
}

.pin-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* Compact pin item styles */
.pin-item-compact {
  background: white;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(229, 231, 235, 0.4);
  transition: all 0.2s ease;
}

.pin-item-compact:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-color: rgba(59, 130, 246, 0.2);
}

.pin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.pin-select-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.pin-select-wrapper .pin-checkbox {
  flex-shrink: 0;
}

.pin-select {
  display: flex;
  align-items: center;
}

.pin-mood-section {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.pin-mood-section .mood-emoji {
  font-size: 20px;
  line-height: 1;
}

.pin-mood-section .mood-label-inline {
  font-weight: 600;
  font-size: 14px;
  color: #1f2937;
  line-height: 1.2;
}

.pin-mood-section .pin-date {
  font-size: 11px;
  color: #6b7280;
  font-weight: 500;
}

.pin-location-section {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.pin-location-section .icon {
  color: #9ca3af;
  flex-shrink: 0;
}

.location-text {
  font-size: 13px;
  color: #6b7280;
  font-family: 'Courier New', monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pin-actions-compact {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.action-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 6px;
  background: #f9fafb;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-icon-btn .icon {
  font-size: 1rem;
}

.action-icon-btn:hover {
  background: #e5e7eb;
  color: #374151;
  transform: scale(1.05);
}

.action-icon-btn.delete-btn {
  color: #dc2626;
}

.action-icon-btn.delete-btn:hover {
  background: #fef2f2;
  color: #b91c1c;
}

.action-icon-btn.friend-share-btn {
  background: #eef2ff;
  color: #4338ca;
}

.action-icon-btn.friend-share-btn:hover {
  background: #e0e7ff;
  color: #3730a3;
}

.action-icon-btn.friend-share-active {
  background: #bfdbfe;
  color: #1d4ed8;
}

.icon-friends-share {
  width: 1.5rem;
  height: 1.5rem;
  display: block;
}

.action-icon-btn.friend-share-btn[disabled],
.action-icon-btn.friend-share-btn[disabled]:hover {
  opacity: 0.6;
  cursor: progress;
  transform: none;
}

.icon-show-on-map {
  color: #dc2626;
}

.icon-open-in-maps {
  color: #2563eb;
}

.icon-open-in-maps svg {
  stroke: currentColor;
}

.pin-user-compact {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 6px 10px;
  background: rgba(239, 246, 255, 0.6);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 6px;
  font-size: 12px;
  color: #1e40af;
}

.pin-user-compact .icon {
  color: #3b82f6;
  flex-shrink: 0;
}

.pin-note-compact {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 8px;
  padding: 8px 10px;
  background: rgba(249, 250, 251, 0.6);
  border: 1px solid rgba(229, 231, 235, 0.6);
  border-radius: 6px;
  font-size: 13px;
  color: #374151;
  line-height: 1.4;
}

.pin-note-compact .icon {
  color: #9ca3af;
  flex-shrink: 0;
  margin-top: 1px;
}

.pin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.pin-mood {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.mood-emoji {
  font-size: 24px;
}

.mood-label {
  color: #1f2937;
}

.pin-date {
  color: #6b7280;
  font-size: 12px;
  font-weight: 500;
}

.pin-user {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
  padding: 8px 12px;
  background: rgba(239, 246, 255, 0.8);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 8px;
  color: #1e40af;
  font-size: 13px;
}

.pin-user .icon {
  color: #3b82f6;
  flex-shrink: 0;
}

.user-info {
  font-weight: 600;
}

.user-email {
  color: #6b7280;
  font-weight: 400;
  font-size: 12px;
}

.pin-location {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #6b7280;
  font-size: 14px;
  margin-bottom: 8px;
}

.pin-location .icon {
  color: #9ca3af;
  flex-shrink: 0;
}

.pin-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 12px 0;
  padding: 12px;
  background: rgba(249, 250, 251, 0.8);
  border: 1px solid rgba(229, 231, 235, 0.8);
  border-radius: 8px;
  color: #374151;
  font-size: 14px;
  line-height: 1.5;
}

.pin-note .icon {
  color: #9ca3af;
  flex-shrink: 0;
  margin-top: 2px;
}

.pin-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.pin-action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  flex: 1;
  min-width: 120px;
  justify-content: center;
}

.pin-action-btn.primary {
  background: #3b82f6;
  color: white;
}

.pin-action-btn.primary:hover {
  background: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.pin-action-btn.secondary {
  background: #f3f4f6;
  color: #6b7280;
  border: 1px solid #e5e7eb;
}

.pin-action-btn.secondary:hover {
  background: #e5e7eb;
  color: #374151;
  transform: translateY(-1px);
}

.pins-stats {
  background: linear-gradient(135deg, #f8fafc, #e2e8f0);
  border-radius: 12px;
  padding: 20px;
  margin-top: 24px;
}

.pins-stats h3 {
  margin: 0 0 16px 0;
  color: #1f2937;
  font-size: 18px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 16px;
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: #3b82f6;
  display: block;
}

.stat-label {
  font-size: 12px;
  color: #6b7280;
  margin-top: 4px;
}

.empty-pins {
  text-align: center;
  padding: 60px 20px;
  color: #6b7280;
}

.empty-pins .icon {
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-pins h3 {
  margin: 0 0 8px 0;
  color: #374151;
}

.empty-pins p {
  margin: 0;
  font-size: 14px;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .pins-controls {
    gap: 12px;
  }
  
  .pins-filter {
    justify-content: center;
  }
  
  .filter-btn {
    flex: 1;
    min-width: 80px;
  }
  
  .admin-controls {
    justify-content: center;
  }
  
  .pin-actions {
    flex-direction: column;
  }
  
  .pin-action-btn {
    min-width: auto;
    flex: none;
  }
}

@media (max-width: 480px) {
  .user-info-card {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }
  
  .pin-item {
    padding: 16px;
    margin-bottom: 12px;
  }
  
  .pin-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .pin-user {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  
  .pin-note {
    padding: 8px;
    font-size: 13px;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* Compact pin mobile styles */
  .pin-item-compact {
    padding: 10px 12px;
    margin-bottom: 6px;
  }
  
  .pin-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  
  .pin-mood-section {
    justify-content: flex-start;
    width: 100%;
    gap: 6px;
  }
  
  .pin-location-section {
    order: 1;
    justify-content: flex-start;
  }
  
  .pin-actions-compact {
    order: 2;
    justify-content: center;
    gap: 8px;
  }
  
  .action-icon-btn {
    width: 36px;
    height: 36px;
  }
  
  .location-text {
    font-size: 12px;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .user-info-card {
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.95), rgba(17, 24, 39, 0.9));
    border-color: rgba(75, 85, 99, 0.5);
  }
  
  .user-details h3 {
    color: #f9fafb;
  }
  
  .user-details p {
    color: #9ca3af;
  }
  
  .admin-controls {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
  }
  
  .admin-toggle {
    color: #f3f4f6;
  }
  
  .admin-checkbox {
    border-color: #60a5fa;
    background: rgba(31, 41, 55, 0.8);
  }
  
  .admin-checkbox:checked {
    background: #3b82f6;
  }
  
  .filter-btn {
    background: rgba(31, 41, 55, 0.8);
    border-color: rgba(75, 85, 99, 0.5);
    color: #d1d5db;
  }
  
  .pin-item {
    background: rgba(31, 41, 55, 0.8);
    border-color: rgba(75, 85, 99, 0.5);
  }
  
  .pin-user {
    background: rgba(30, 58, 138, 0.2);
    border-color: rgba(59, 130, 246, 0.3);
    color: #93c5fd;
  }
  
  .pin-note {
    background: rgba(17, 24, 39, 0.6);
    border-color: rgba(75, 85, 99, 0.4);
    color: #d1d5db;
  }
  
  /* Compact pin dark mode styles */
  .pin-item-compact {
    background: rgba(31, 41, 55, 0.8);
    border-color: rgba(75, 85, 99, 0.5);
  }
  
  .pin-item-compact:hover {
    border-color: rgba(59, 130, 246, 0.4);
  }
  
  .pin-mood-section .mood-label-inline {
    color: #e5e7eb;
  }
  
  .pin-mood-section .pin-date {
    color: #9ca3af;
  }
  
  .location-text {
    color: #9ca3af;
  }
  
  .action-icon-btn {
    background: rgba(75, 85, 99, 0.3);
    color: #9ca3af;
  }
  
  .action-icon-btn:hover {
    background: rgba(75, 85, 99, 0.5);
    color: #d1d5db;
  }
  
  .action-icon-btn.delete-btn {
    color: #f87171;
  }
  
  .action-icon-btn.delete-btn:hover {
    background: rgba(127, 29, 29, 0.2);
    color: #fca5a5;
  }
  
  .pin-user-compact {
    background: rgba(30, 58, 138, 0.2);
    border-color: rgba(59, 130, 246, 0.3);
    color: #93c5fd;
  }
  
  .pin-note-compact {
    background: rgba(17, 24, 39, 0.6);
    border-color: rgba(75, 85, 99, 0.4);
    color: #d1d5db;
  }
  
  .pin-action-btn.secondary {
    background: rgba(75, 85, 99, 0.5);
    color: #d1d5db;
    border-color: rgba(107, 114, 128, 0.5);
  }
  
  .mood-label {
    color: #f9fafb;
  }
  
  .pins-stats {
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.8), rgba(17, 24, 39, 0.9));
  }
  
  .pins-stats h3 {
    color: #f9fafb;
  }
  
  .pin-action-btn {
    background: rgba(75, 85, 99, 0.5);
    color: #d1d5db;
  }
  
  .pin-action-btn:hover {
    background: rgba(107, 114, 128, 0.5);
    color: #f9fafb;
  }
  
  .empty-pins h3 {
    color: #f9fafb;
  }
  
  .empty-pins p {
    color: #9ca3af;
  }
}

/* ==============================
   Purchase History Modal
   ============================== */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.modal-overlay[hidden] {
  display: none;
}

.modal-dialog {
  background: white;
  border-radius: 16px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #111827;
}

.modal-close-btn {
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: #6b7280;
  border-radius: 8px;
  transition: all 0.2s;
}

.modal-close-btn:hover {
  background: #f3f4f6;
  color: #111827;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.purchase-history-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.purchase-history-item {
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f9fafb;
}

.purchase-history-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
  gap: 12px;
}

.purchase-history-header strong {
  font-size: 16px;
  color: #111827;
  flex: 1;
}

.purchase-history-date {
  font-size: 14px;
  color: #6b7280;
  white-space: nowrap;
}

.purchase-history-order {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 8px;
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
}

.purchase-history-status {
  font-size: 13px;
  color: #059669;
  font-weight: 500;
}

.purchase-history-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

.purchase-history-pagination button {
  padding: 8px 16px;
  font-size: 14px;
}

#purchase-history-page-info {
  font-size: 14px;
  color: #6b7280;
}

.purchase-history-empty {
  text-align: center;
  padding: 40px 20px;
  color: #6b7280;
}

.purchase-history-empty p {
  margin: 0;
  font-size: 16px;
}

.error-message {
  text-align: center;
  padding: 20px;
  color: #dc2626;
  font-size: 14px;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  .modal-dialog {
    background: #1f2937;
  }

  .modal-header {
    border-bottom-color: #374151;
  }

  .modal-header h3 {
    color: #f9fafb;
  }

  .modal-close-btn {
    color: #9ca3af;
  }

  .modal-close-btn:hover {
    background: #374151;
    color: #f9fafb;
  }

  .purchase-history-item {
    background: #111827;
    border-color: #374151;
  }

  .purchase-history-header strong {
    color: #f9fafb;
  }

  .purchase-history-date,
  .purchase-history-order {
    color: #9ca3af;
  }

  .purchase-history-pagination {
    border-top-color: #374151;
  }

  #purchase-history-page-info {
    color: #9ca3af;
  }

  .purchase-history-empty {
    color: #9ca3af;
  }
}