/* ===== Base Layout ===== */
.user-dashboard {
  min-height: 100vh;
  background-color: #f9f6f1; /* light neutral background */
  color: #1f2937; /* dark text */
}

/* ===== Header ===== */
.dashboard-header {
  background: linear-gradient(to right, #92400e, #b45309); /* amber gradient */
  color: #fff;
  padding: 4rem 0;
}
.dashboard-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
/* Avatar wrapper */
.dashboard-avatar {
  position: relative;
  display: inline-block;
}

/* Circular avatar */
.avatar-circle {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fafafa;
  border: 2px solid #e5e7eb; /* subtle border */
  transition: box-shadow 0.3s ease;
}
.avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar-circle:hover {
  box-shadow: 0 0 0 3px rgba(0,115,230,0.25); /* glow on hover */
}

/* Upload button */
.avatar-upload {
  position: absolute;
  bottom: 6px;
  right: 6px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #f9f6f1; /* primary color */
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.avatar-upload:hover {
  background: #fff;
  transform: scale(1.05);
}
.avatar-upload svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}
.dashboard-userinfo h1 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  color: #fff;
}
.dashboard-userinfo .user-location {
  color: #fde68a;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.stats {
  display: flex;
  gap: 1.5rem;
  font-size: 0.9rem;
}
.stats div {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.stats span { font-weight: 600; color: #fff; }

/* ===== Lucide Icons ===== */
.lucide-icon {
  width: 18px;
  height: 18px;
  stroke-width: 2;
  vertical-align: middle;
}
button .lucide-icon,
h2 .lucide-icon,
h3 .lucide-icon,
label .lucide-icon {
  margin-right: 6px;
}

/* ===== Tabs ===== */
.dashboard-body {
  max-width: 1140px;
  margin: 0 auto;
  padding: 3rem 1rem;
}
.dashboard-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
}
.dashboard-tabs::-webkit-scrollbar {
  display: none; /* hide scrollbar for cleaner UI */
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  background: #fff;
  color: #374151;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
  font-weight: 600;
  font-family: "DM Sans", sans-serif;
}
.tab-btn:hover { background: #f9fafb; }
.tab-btn.active {
  background: #92400e;
  color: #fff;
}

/* ===== Tab Panes ===== */
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ===== Profile Form ===== */
.profile-form .form-group > * {
  margin-bottom: 1.25rem;
  box-sizing: border-box;
}
.form-group label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}
.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus {
  outline: none;
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245,158,11,0.25);
}
textarea.form-input { resize: vertical; }
.form-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

/* ===== Buttons ===== */
.btn-primary,
.btn-secondary,
.btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  border-radius: 8px;
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  font-family: "DM Sans", sans-serif;
}
.btn-primary {
  background: #92400e;
  color: #fff;
  border: none;
}
.btn-primary:hover { background: #78350f; }

.btn-secondary {
  background: #fff;
  color: #92400e;
  border: 1px solid #92400e;
}
.btn-secondary:hover {
  background: #fef3c7;
  color: #78350f;
}

.btn-danger {
  background: #dc2626;
  color: #fff;
  border: none;
}
.btn-danger:hover { background: #b91c1c; }

/* ===== Cards ===== */
.bg-card {
  background: #fff;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* ===== Bookmarks ===== */
.bookmark-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); /* smaller cards */
  gap: 1rem;
}

.bookmark-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  display: flex;
  flex-direction: column;
}

.bookmark-card:hover {
  box-shadow: 0 3px 8px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}

/* Thumbnail */
.bookmark-card img {
  width: 100%;
  height: 150px; /* smaller image height */
  object-fit: cover;
  display: block;
}

/* Content */
.bookmark-card .p-4 {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Title */
.bookmark-card h3 {
  font-size: 0.95rem; /* smaller font */
  font-weight: 600;
  margin: 0;
  color: #1f2937;
  line-height: 1.3;
  transition: color 0.2s ease;
}
.bookmark-card h3:hover {
  color: #92400e; /* accent */
}

.bookmark-card a {
    text-decoration: none;
    text-align: center;
}

/* Actions */
.bookmark-card .btn-sm {
  padding: 0.6rem 0.6rem;
  font-size: 0.8rem;
  border-radius: 5px;
}
.bookmark-card a,
.bookmark-card button {
  display: inline-block;
}

/* ===== Reviews ===== */
.review-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.review-card {
  display: flex;
  background: #fff;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.review-card:hover {
  box-shadow: 0 4px 12px rgba(245,158,11,0.25); /* amber accent shadow */
  transform: translateY(-3px);
}

/* Left side (content) */
.review-card .review-content {
  flex: 0 0 70%;
  max-width: 70%;
}
.review-card .review-content h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
  color: #1f2937;
}
.review-card .review-content p {
  font-size: 0.9rem;
  color: #555;
  margin: 0;
  line-height: 1.5;
}

/* Right side (actions) */
.review-card .review-actions {
  flex: 0 0 30%;
  max-width: 30%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
}
.review-card .review-actions .btn-sm {
  padding: 0.6rem 1.5rem;
  font-size: 0.9rem;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .review-card {
    flex-direction: column;
  }
  .review-card .review-content,
  .review-card .review-actions {
    flex: 0 0 100%;
    max-width: 100%;
  }
  .review-card .review-actions {
    justify-content: flex-start;
    margin-top: 0.75rem;
  }
}

/* ===== Settings ===== */
.setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  border-bottom: 1px solid #e5e7eb;
}
.setting-item:last-child { border-bottom: none; }
.setting-item h3 {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1rem;
  margin-bottom: 0.25rem;
  color: #1f2937;
}
.setting-item p {
  font-size: 0.85rem;
  color: #6b7280;
}

/* ===== Danger Zone ===== */
.danger-zone {
  border: 2px solid #fecaca;
  border-radius: 12px;
  padding: 2rem;
  margin-top: 2rem;
}
.danger-zone h2 {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: #b91c1c;
  margin-bottom: 1rem;
}

/* ===== Responsive ===== */
@media (max-width:768px){
  .dashboard-container {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }
  .dashboard-tabs {
    scroll-snap-align: start;
  }
  .dashboard-userinfo h1 {
      font-size: 1.5rem;
  }
  
  .tab-pane h2 {
      font-size: 1.3rem;
  }
  #profile-summary p {
      font-size: 0.9rem;
  }
  .btn-primary, .btn-secondary {
      font-size: 0.8rem;
  }

}

/* ===== Logout Button ===== */
.logout-btn {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  background:#ef4444;
  color:#fff;
  border-radius:6px;
  text-decoration:none;
  justify-content: center;
}
.logout-btn svg {
  width: 18px;
  height: 18px;
}
.logout-btn:hover { background:#dc2626; }

/* Base modal container */
.modal {
  position: fixed;
  inset: 0; /* shorthand for top/right/bottom/left:0 */
  background: rgba(0,0,0,0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.3s ease;
}

/* Show modal */
.modal.is-open {
  display: flex;
  opacity: 1;
}

/* Modal content box */
.modal-content {
  background: #fff;
  border-radius: 8px;
  max-width: 420px;
  width: 90%;
  padding: 24px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  animation: slideDown 0.3s ease;
  position: relative; /* for close icon */
}

/* Heading */
.modal-content h3 {
  margin-top: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #222;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Paragraph text */
.modal-content p {
  margin: 12px 0;
  color: #555;
  font-size: 0.95rem;
}

/* Form inputs */
.modal-content input[type="password"],
.modal-content input[type="text"],
.modal-content input[type="email"] {
  width: 100%;
  padding: 10px 12px;
  margin: 12px 0;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 0.95rem;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
}
.modal-content input:focus {
  border-color: #e53935;
  outline: none;
}

/* Form actions */
.modal-content .form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 16px;
}

/* Buttons */
.modal-content .btn-primary,
.modal-content .btn-secondary,
.modal-content .btn-danger {
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  transition: background 0.2s ease;
}

.modal-content .btn-primary {
  color: #fff;
}
.modal-content .btn-primary:hover {
  background: #e53935;
}

.modal-content .btn-secondary {
  background: #f0f0f0;
  color: #333;
}
.modal-content .btn-secondary:hover {
  background: #e0e0e0;
}

.modal-content .btn-danger {
  background: #e53935;
  color: #fff;
}
.modal-content .btn-danger:hover {
  background: #c62828;
}

/* Animation */
@keyframes slideDown {
  from { transform: translateY(-20px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: #555;
}
.modal-close:hover {
  color: #000;
}

/* Edit Review Modal */
/* ===== Review Modal ===== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45); /* overlay */
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.3s ease;
}
.modal.is-open {
  display: flex;
  animation: fadeIn 0.3s ease forwards;
}

.modal-content {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 480px;
  padding: 1.5rem;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
  animation: slideUp 0.3s ease forwards;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-sizing: border-box;
}

/* Header */
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: #1f2937;
}
.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: #6b7280;
  transition: color 0.2s ease;
}
.modal-close:hover {
  color: #111827;
}

/* Form */
#editReviewForm {
box-sizing: border-box;
max-width: 400px;
}
#editReviewForm label {
  font-size: 0.9rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.25rem;
  display: block;
}
#editReviewForm input,
#editReviewForm textarea {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  color: #111827;
  background: #f9fafb;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
#editReviewForm input:focus,
#editReviewForm textarea:focus {
  border-color: #f59e0b;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.25);
  outline: none;
}