/* Profile page styling (dashboard + tabs, aligned to assets/css/styles.css design tokens) */

/* Layout */
.profile-page {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 26px 16px 64px;
}

/* Header */
.profile-header {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.profile-header.dashboard {
  padding: 18px;
}

.profile-meta {
  display: flex;
  align-items: center;
  gap: 14px;
}

.avatar-placeholder {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--accent), #ff9466);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 8px 22px var(--accent-shadow);
}

.avatar-large {
  width: 64px;
  height: 64px;
  border-radius: 20px;
}

.avatar-placeholder.has-avatar {
  border-radius: 50%;
  background: none;
  box-shadow: none;
}

.avatar-placeholder img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-placeholder .material-icons {
  font-size: 64px;
  color: var(--muted2, #b5afa8);
}

.username-display {
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.user-handle {
  color: var(--muted);
  font-weight: 700;
  margin-top: 2px;
  font-size: 0.92rem;
}

.profile-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.action-btn {
  border: none;
  border-radius: 999px;
  padding: 10px 16px;
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.18s ease;
}

.edit-btn {
  background: var(--surface);
  border: 1.5px solid var(--border);
  color: var(--text);
}

.edit-btn:hover {
  background: var(--surface2);
  border-color: var(--accent);
  color: var(--accent);
}

/* Stats */
.profile-stats {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.stat-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  gap: 12px;
  align-items: center;
  box-shadow: var(--shadow-sm);
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(252, 39, 163, 0.12);
  color: var(--accent);
  flex-shrink: 0;
}

.stat-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-value {
  font-weight: 1000;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.stat-label {
  color: var(--muted);
  font-weight: 800;
  font-size: 0.85rem;
}

/* Quick actions */
.section-title {
  margin: 18px 0 12px;
  font-size: 1.05rem;
  font-weight: 1000;
  color: var(--text);
  letter-spacing: -0.01em;
}

.profile-quick {
  margin-top: 8px;
}

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

.quick-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: all 0.18s ease;
}

.quick-card:hover {
  border-color: rgba(252, 39, 163, 0.45);
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
  transform: translateY(-2px);
}

.quick-icon {
  width: 40px;
  height: 40px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(252, 39, 163, 0.12);
  color: var(--accent);
}

.quick-title {
  font-weight: 1000;
  letter-spacing: -0.01em;
}

.quick-sub {
  color: var(--muted);
  font-weight: 800;
  font-size: 0.85rem;
}

.account-card {
  cursor: pointer;
  text-align: left;
}

.quick-card.danger {
  background: rgba(252, 39, 163, 0.06);
  border-color: rgba(252, 39, 163, 0.25);
}

/* Tabs */
.profile-content {
  margin-top: 18px;
}

.profile-tabs {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tab-btn {
  border: none;
  cursor: pointer;
  border-radius: 999px;
  padding: 10px 16px;
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  background: transparent;
  color: var(--muted);
  transition: all 0.15s ease;
  text-decoration: none;
}

.tab-btn:hover {
  background: var(--surface);
  color: var(--text);
}

.tab-btn.active {
  background: var(--text);
  color: white;
}

/* Selected kind + hint */
.profile-selected-kind {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.profile-selected-kind-title {
  font-weight: 1000;
  font-size: 1.05rem;
}

.assets-hint {
  color: var(--muted);
  font-weight: 900;
  font-size: 0.92rem;
}

.content-display-area {
  margin-top: 14px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
}

/* Asset grid */
.assets-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.asset-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 18px;
  padding: 14px;
  cursor: pointer;
  transition: all 0.18s ease;
  display: flex;
  gap: 12px;
  align-items: center;
}

.asset-card:hover {
  transform: translateY(-2px);
  border-color: rgba(252, 39, 163, 0.45);
  box-shadow: 0 8px 26px rgba(0,0,0,0.06);
}

/* Ensure hidden state works consistently */
.asset-card.is-hidden {
  display: none !important;
}

.asset-icon {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: rgba(252, 39, 163, 0.12);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.asset-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.asset-title {
  font-weight: 1000;
  color: var(--text);
  letter-spacing: -0.01em;
}

.asset-sub {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Empty state */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 30px 16px;
  min-height: 220px;
}

.empty-state.is-hidden {
  display: none !important;
}

.empty-state .material-icons {
  font-size: 42px;
  color: var(--accent);
}

.empty-message {
  color: var(--muted);
  font-weight: 900;
  text-align: center;
}

/* Activity */
.profile-activity {
  margin-top: 18px;
}

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

.activity-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.activity-title {
  font-weight: 1000;
  margin-bottom: 10px;
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.activity-item {
  color: var(--text);
  font-weight: 800;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
}

.activity-empty {
  color: var(--muted);
  font-weight: 900;
}

.is-hidden {
  display: none !important;
}

/* Account */
.profile-account {
  margin-top: 18px;
}

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

/* Profile error */
.profile-error {
  margin-top: 14px;
  background: rgba(252, 39, 163, 0.06);
  border: 1.5px solid rgba(252, 39, 163, 0.25);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.profile-error .material-icons {
  color: var(--accent);
  margin-top: 2px;
}

.profile-error-actions {
  margin-left: auto;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Responsive */
@media (max-width: 1100px) {
  .profile-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quick-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .activity-grid { grid-template-columns: 1fr; }
  .account-grid { grid-template-columns: 1fr; }
  .assets-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  .profile-header { flex-direction: column; align-items: flex-start; }
  .profile-actions { width: 100%; }
  .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .assets-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .quick-grid { grid-template-columns: 1fr; }
  .profile-stats { grid-template-columns: 1fr; }
}
