/* Profile page */

.profile-main { max-width: 1100px; }

.payment-status {
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1e3a8a;
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 16px;
  font-size: 14px;
  line-height: 1.6;
}
.payment-status[data-state="success"] {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}
.payment-status[data-state="error"] {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

/* Hero card */
.profile-hero {
  background: linear-gradient(135deg, #2c6cf6 0%, #6f5af6 50%, #a855f7 100%);
  color: #fff;
  border-radius: 18px;
  padding: 28px 32px;
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
}
.profile-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 85% 30%, rgba(255,255,255,0.15) 0%, transparent 50%),
    repeating-linear-gradient(45deg, transparent 0 30px, rgba(255,255,255,0.03) 30px 60px);
}
.profile-hero > * { position: relative; z-index: 1; }
.profile-hero-avatar {
  width: 84px; height: 84px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  border: 3px solid rgba(255,255,255,0.35);
  flex-shrink: 0;
}
.profile-hero-info { flex: 1; }
.profile-hero-name {
  font-size: 26px;
  font-weight: 800;
  margin: 0 0 4px;
}
.profile-hero-meta {
  font-size: 13.5px;
  opacity: 0.92;
}
.profile-hero-actions {
  display: flex;
  gap: 8px;
}
.profile-hero-btn {
  background: rgba(255,255,255,0.22);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  padding: 8px 14px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background .15s;
}
.profile-hero-btn:hover { background: rgba(255,255,255,0.35); }

.profile-section-title {
  font-size: 17px;
  font-weight: 800;
  color: #111827;
  margin: 26px 0 14px;
}

/* Stats grid */
.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.profile-stat-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: transform .15s;
}
.profile-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -8px rgba(15,23,42,0.1);
}
.profile-stat-icon {
  font-size: 32px;
  flex-shrink: 0;
}
.profile-stat-num {
  font-size: 24px;
  font-weight: 800;
  color: #1e40af;
  line-height: 1;
}
.profile-stat-label {
  font-size: 12px;
  color: #6b7280;
  margin-top: 4px;
}

/* Calendar */
.profile-calendar-wrap {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 18px;
}
.profile-calendar {
  display: grid;
  grid-template-columns: repeat(13, 1fr);
  gap: 4px;
}
.profile-cal-day {
  aspect-ratio: 1;
  background: #e5e7eb;
  border-radius: 3px;
  position: relative;
  cursor: help;
}
.profile-cal-day:hover {
  outline: 2px solid #2c6cf6;
  outline-offset: 1px;
  z-index: 5;
}
.profile-cal-day.lv1 { background: #bbf7d0; }
.profile-cal-day.lv2 { background: #86efac; }
.profile-cal-day.lv3 { background: #22c55e; }
.profile-cal-day.lv4 { background: #15803d; }
.profile-cal-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 12px;
  font-size: 11px;
  color: #6b7280;
}
.legend-cell {
  width: 12px; height: 12px;
  border-radius: 2px;
  display: inline-block;
}

/* Modules detail */
.profile-modules {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}
.profile-module {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px 18px;
  text-decoration: none;
  color: inherit;
  transition: all .15s;
}
.profile-module:hover {
  border-color: #2c6cf6;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -8px rgba(15,23,42,0.1);
}
.profile-module-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.profile-module-icon {
  width: 38px; height: 38px;
  border-radius: 9px;
  background: linear-gradient(135deg, #eff6ff, #ede9fe);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.profile-module-name {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
}
.profile-module-stats {
  display: flex;
  gap: 14px;
  font-size: 12.5px;
  color: #4b5563;
}
.profile-module-stats strong {
  color: #1e40af;
  font-weight: 800;
  font-size: 14px;
  margin-right: 2px;
}
.profile-module-bar {
  height: 5px;
  background: #f3f4f6;
  border-radius: 3px;
  margin-top: 10px;
  overflow: hidden;
}
.profile-module-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #2c6cf6, #6f5af6);
  border-radius: 3px;
}

/* Badges */
.profile-badges {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.profile-badge {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px 12px;
  text-align: center;
  position: relative;
  transition: transform .15s;
}
.profile-badge.unlocked {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border-color: #f59e0b;
}
.profile-badge.locked { opacity: 0.5; }
.profile-badge:hover { transform: scale(1.04); }
.profile-badge-icon { font-size: 36px; margin-bottom: 6px; }
.profile-badge-name { font-size: 12.5px; font-weight: 700; color: #111827; }
.profile-badge-desc { font-size: 10.5px; color: #6b7280; margin-top: 4px; line-height: 1.4; }

/* Data actions */
.profile-data-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.profile-action {
  background: #fff;
  border: 1.5px solid #e5e7eb;
  padding: 9px 16px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  transition: all .12s;
}
.profile-action:hover {
  border-color: #2c6cf6;
  color: #1e40af;
}
.profile-action.profile-action-danger {
  color: #b91c1c;
  border-color: #fca5a5;
}
.profile-action.profile-action-danger:hover {
  background: #fee2e2;
}

@media (max-width: 640px) {
  .profile-hero { flex-direction: column; text-align: center; }
  .profile-calendar { grid-template-columns: repeat(10, 1fr); }
}
