.profile-page {
  min-height: calc(100vh - 68px);
  display: grid;
  place-items: center;
  padding: 4rem 2rem;
  gap: 2rem;
}

.profile-card {
  width: min(900px, 100%);
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.profile-card h1 {
  margin: 0.75rem 0;
  font-family: "Syne", sans-serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
}

.profile-summary {
  color: var(--muted);
  margin-bottom: 2rem;
}

.profile-form {
  display: grid;
  gap: 1rem;
}

.profile-photo-panel {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.profile-photo-picker {
  position: relative;
  width: 132px;
  min-height: 132px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--accent-border-soft, var(--accent-border, rgba(0, 212, 255, 0.45)));
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.18), rgba(124, 58, 237, 0.22));
  color: var(--text);
  cursor: pointer;
}

.profile-photo-picker img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.profile-photo-picker.has-photo img {
  display: block;
}

.profile-photo-picker span {
  font-family: "Syne", sans-serif;
  font-size: 2rem;
  font-weight: 800;
}

.profile-photo-picker strong {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.45rem;
  background: rgba(0, 0, 0, 0.58);
  color: #ffffff;
  font-size: 0.72rem;
  text-align: center;
}

.danger-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.75rem 1rem;
  border: 1px solid var(--danger-border, var(--border));
  border-radius: 8px;
  color: var(--danger);
  background: var(--danger-surface, var(--surface));
  font-weight: 800;
  cursor: pointer;
}

.reply-preview {
  margin: 0.5rem 0 0;
  padding: 0.5rem;
  background: color-mix(in srgb, var(--surface) 50%, transparent);
  border-left: 3px solid var(--accent, #00d4ff);
  border-radius: 4px;
  font-size: 0.85rem;
}

.admin-list {
  display: grid;
  gap: 0.75rem;
}

.list-item {
  display: grid;
  gap: 0.45rem;
  padding: 0.9rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
}

.list-item header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.list-item p {
  margin: 0;
  color: var(--muted);
}

.form-note {
  min-height: 1.4rem;
  color: var(--accent-3, #10b981);
  font-weight: 700;
}

@media (max-width: 860px) {
  .profile-page {
    place-items: start center;
  }
}

/* Layout en dos columnas */
.container-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  align-items: start;
  max-width: 1180px;
  width: 100%;
  gap: 2rem;
  margin: 0 auto;
}
.profile-sidebar {
  width: 100%;
  position: sticky;
  top: 90px;
  z-index: 10;
}
.profile-main-content {
  display: grid;
  gap: 2rem;
  width: 100%;
}
.sidebar-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2.5rem 1.5rem;
}
.sidebar-name {
  font-family: "Syne", sans-serif;
  font-size: 1.35rem;
  margin: 1rem 0 0.2rem;
  color: var(--text);
  word-break: break-all;
}
.sidebar-actions {
  display: grid;
  gap: 0.75rem;
  width: 100%;
  margin-top: 1.5rem;
}
.full-btn {
  width: 100%;
  min-height: 44px; /* Target de tacto cómodo para Android/iOS */
  font-size: 0.9rem;
  padding: 0.75rem;
}
.small-btn, .danger-btn {
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.5rem 0.8rem;
  min-height: 38px;
  cursor: pointer;
  background: var(--surface-strong);
  color: var(--text);
  transition: background 0.15s ease, filter 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.small-btn:hover {
  background: var(--surface);
}
.danger-btn {
  background: var(--danger-surface);
  border-color: var(--danger-border);
  color: var(--danger);
}
.danger-btn:hover {
  filter: brightness(1.15);
}

/* Ajustes Responsive */
@media (max-width: 860px) {
  .container-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .profile-sidebar {
    position: static;
  }
}

/* Custom Modal Premium styles */
.custom-modal {
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  border-radius: 16px;
  background: rgba(13, 19, 33, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: var(--text, #f4f7fb);
  padding: 0;
  width: min(450px, 90vw);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  outline: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
}

[data-theme="light"] .custom-modal {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 15px 35px rgba(15, 23, 42, 0.06);
}

.custom-modal::backdrop {
  background: rgba(5, 7, 12, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal-content {
  display: grid;
  gap: 1.25rem;
  padding: 1.5rem;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  padding-bottom: 0.75rem;
}

.modal-header h3 {
  margin: 0;
  font-family: "Syne", sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
}

.modal-close-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.2rem;
  line-height: 1;
  transition: color 0.15s;
}

.modal-close-btn:hover {
  color: var(--text);
}

#editReviewForm {
  display: grid;
  gap: 1.25rem;
}

.stars-selector-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stars-selector {
  display: flex;
  gap: 0.3rem;
}

.edit-star {
  background: transparent;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  color: var(--muted);
  font-size: 1.75rem;
  cursor: pointer;
  padding: 0.2rem;
  border-radius: 6px;
  line-height: 1;
  transition: all 0.2s ease;
}

.edit-star.active,
.edit-star:hover {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.4);
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.15);
}

.modal-actions {
  display: flex;
  gap: 0.8rem;
  justify-content: flex-end;
}