/* Base Styles */
html, body {
  height: 100%;
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f5f5f5;
  color: #333;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Main content area should grow */
.main-content {
  flex: 1 0 auto;
}

/* Navigation */
.navbar {
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
  margin-bottom: 1rem;
}

.navbar-container {
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  height: 3.75rem;
}

.navbar-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.navbar-logo img {
  height: 2.5rem;
  width: auto;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-left: auto;
}

.nav-link {
  color: #333;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.3s;
}

.nav-link:hover {
  color: #007bff;
  text-decoration: none;
}

.navbar-username {
  color: #666;
  font-size: 0.875rem;
  font-weight: 500;
}

.logo-desktop {
  display: block;
}

.logo-mobile {
  display: none;
}

@media (max-width: 768px) {
  .logo-desktop {
    display: none;
  }

  .logo-mobile {
    display: block;
  }

  .navbar-container {
    padding: 0 0.625rem;
    height: 3.125rem;
  }

  .navbar-logo img {
    height: 2.1875rem;
  }

  .navbar-right {
    gap: 0.625rem;
  }

  .nav-link, .navbar-username {
    font-size: 0.75rem;
  }

  .nav-link[href="/manufacturers"] {
    display: none;
  }
}

/* Development Banner */
.development-banner {
  background-color: #ffedd5;
  border-bottom: 0.0625rem solid #fed7aa;
  padding: 0.75rem 0;
  width: 100%;
}

.development-message {
  margin: 0;
  text-align: center;
  color: #92400e;
  font-size: 0.875rem;
  line-height: 1.4;
}

.development-message strong {
  font-weight: 600;
}

@media (max-width: 768px) {
  .development-banner {
    padding: 0.625rem 0;
  }

  .development-message {
    font-size: 0.75rem;
  }
}

/* Container Components */
.container {
  max-width: 75rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.content-box {
  background-color: white;
  padding: 1.25rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Typography */
h1, h2, h3 {
  margin-top: 0;
  color: #333;
}

h1 {
  font-size: 1.75rem;
  margin-bottom: 1.25rem;
}

h2 {
  font-size: 1.5rem;
  margin-bottom: 0.9375rem;
}

h3 {
  font-size: 1.25rem;
  margin-bottom: 0.625rem;
}

p {
  line-height: 1.6;
  margin-bottom: 0.625rem;
}

/* Links */
a {
  color: #007bff;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.back-link {
  display: inline-block;
  margin: 1.25rem 0;
  color: #007bff;
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

/* Text Utilities */
.text-muted {
  color: #666;
}

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

/* Spacing Utilities */
.mb-10 {
  margin-bottom: 0.625rem;
}

.mb-20 {
  margin-bottom: 1.25rem;
}

.mb-30 {
  margin-bottom: 1.875rem;
}

/* Page Specific Styles */

/* Base Page Styles */
.page {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  box-sizing: border-box;
}

/* Mobile responsive padding */
@media (max-width: 768px) {
  .page {
    padding: 0.75rem;
  }
}

/* Page containers */
.page .container {
  max-width: 75rem;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

/* Special layout for picture pages */
.picture-detail .container {
  max-width: 50rem;
}

/* Home Page Components */

.homepage-sections {
  margin-top: 1.875rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.photo-section, .members-section {
  background-color: white;
  padding: 1.875rem;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.photo-section h2, .members-section h2 {
  margin-bottom: 1.25rem;
  color: #333;
  font-size: 1.5rem;
  border-bottom: 2px solid #007bff;
  padding-bottom: 0.625rem;
}

.photo-card {
  background-color: #f9f9f9;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.photo-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.photo-card img {
  width: 100%;
  height: 12.5rem;
  object-fit: cover;
  display: block;
}

.photo-card .photo-info {
  padding: 0.9375rem;
}

.photo-card .photo-title {
  font-weight: bold;
  margin-bottom: 0.5rem;
  color: #333;
  font-size: 0.875rem;
}

.photo-card .photo-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: #666;
}

.photo-card .likes {
  color: #e74c3c;
  font-weight: bold;
}

.photo-card .member a {
  color: #007bff;
  text-decoration: none;
}

.photo-card .member a:hover {
  text-decoration: underline;
}

.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr));
  gap: 0.9375rem;
}

.member-card {
  background-color: #f9f9f9;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.member-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.member-link {
  display: block;
  padding: 1.25rem;
  text-decoration: none;
  color: inherit;
  text-align: center;
}

.member-name {
  font-weight: bold;
  font-size: 1.125rem;
  color: #333;
  margin-bottom: 0.5rem;
}

.member-stats {
  color: #666;
  font-size: 0.875rem;
}

.photo-info {
  background-color: #f9f9f9;
  padding: 1.875rem;
  border-radius: 8px;
  text-align: center;
  margin-top: 1.875rem;
}

.photo-number {
  font-size: 2.25rem;
  font-weight: bold;
  color: #007bff;
  margin-bottom: 0.625rem;
}

.view-photo-btn {
  display: inline-block;
  background-color: #007bff;
  color: white;
  padding: 0.75rem 1.875rem;
  border-radius: 5px;
  text-decoration: none;
  font-size: 1rem;
  transition: background-color 0.3s;
}

.view-photo-btn:hover {
  background-color: #0056b3;
  text-decoration: none;
}

.error {
  color: #dc3545;
  font-size: 1.125rem;
}

.error-message {
  background-color: #f8d7da;
  color: #721c24;
  padding: 0.9375rem;
  border-radius: 5px;
  border: 1px solid #f5c6cb;
  margin-top: 1.25rem;
}

/* Picture Page */
.photo-container {
  background-color: white;
  padding: 1.25rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.photo-image {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin-bottom: 1.25rem;
}

.photo-details {
  background-color: #f9f9f9;
  padding: 0.9375rem;
  border-radius: 4px;
  border-left: 4px solid #007bff;
}

.photo-below {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.25rem 0;
}

.photo-view-count {
  font-size: 0.8125rem;
  color: #888;
}

.delete-photo-btn {
  font-size: 0.8125rem;
  color: #dc2626;
  background: none;
  border: 1px solid #dc2626;
  border-radius: 0.25rem;
  padding: 0.2rem 0.6rem;
  cursor: pointer;
}

.delete-photo-btn:hover {
  background: #dc2626;
  color: #fff;
}

.confirm-modal {
  border: none;
  border-radius: 0.5rem;
  padding: 0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  max-width: 28rem;
  width: 90%;
}

.confirm-modal::backdrop {
  background: rgba(0, 0, 0, 0.5);
}

.confirm-modal-inner {
  padding: 1.5rem;
}

.confirm-modal-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: #1f2937;
}

.confirm-modal-body {
  font-size: 0.9375rem;
  color: #6b7280;
  margin: 0 0 1.25rem;
}

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

.btn-danger {
  background: #dc2626;
  color: #fff;
  border: none;
  border-radius: 0.375rem;
  padding: 0.5rem 1rem;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-danger:hover {
  background: #b91c1c;
}

/* Member page cover photo */
.member-page {
  padding-bottom: 3rem;
}

.member-cover {
  position: relative;
  width: 100%;
  height: 16rem;
  background-color: #1f2937;
  background-size: cover;
  background-position: center;
}

.cover-edit-btn {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border: none;
  border-radius: 0.375rem;
  padding: 0.4rem 0.75rem;
  font-size: 0.8125rem;
  cursor: pointer;
}

.cover-edit-btn:hover {
  background: rgba(0, 0, 0, 0.75);
}

.cover-actions {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  display: flex;
  gap: 0.5rem;
}

.cover-remove-btn {
  background: rgba(180, 30, 30, 0.7);
}

.cover-remove-btn:hover {
  background: rgba(180, 30, 30, 0.9);
}

.avatar-remove-btn {
  position: absolute;
  top: 0;
  right: 0;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  border: 0.125rem solid #fff;
  background: #b91c1c;
  color: #fff;
  font-size: 1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

/* Avatar + identity */
.member-identity {
  display: flex;
  align-items: flex-end;
  gap: 1.25rem;
  margin-top: -3rem;
  margin-bottom: 1.25rem;
}

.member-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.member-avatar {
  width: 7rem;
  height: 7rem;
  border-radius: 50%;
  border: 0.25rem solid #fff;
  object-fit: cover;
  display: block;
  background: #e9ecef;
}

.member-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #4b5563;
  color: #fff;
}

.avatar-edit-btn {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  border: 0.125rem solid #fff;
  background: #374151;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.avatar-edit-btn:hover {
  background: #1f2937;
}

.member-identity-info {
  padding-bottom: 0.5rem;
}

.member-username {
  margin: 0 0 0.125rem;
  font-size: 1.5rem;
}

.member-photo-count {
  color: #666;
  font-size: 0.9rem;
}

/* Member profile card */
.member-profile-card {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.member-profile-name {
  font-size: 1.125rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.375rem;
}

.member-profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  color: #555;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.member-profile-meta:last-child {
  margin-bottom: 0;
}

.member-profile-meta a {
  color: #007bff;
  word-break: break-all;
}

.member-profile-bio {
  color: #444;
  font-size: 0.9rem;
  line-height: 1.5;
  margin-top: 0.625rem;
  white-space: pre-wrap;
}

/* Crop modal */
.crop-modal {
  border: none;
  border-radius: 0.5rem;
  padding: 0;
  width: min(56rem, 95vw);
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 1.25rem 3rem rgba(0, 0, 0, 0.35);
}

.crop-modal::backdrop {
  background: rgba(0, 0, 0, 0.6);
}

.crop-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e9ecef;
  font-weight: 600;
}

.crop-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: #666;
  padding: 0 0.25rem;
}

.crop-hint {
  font-size: 0.8125rem;
  color: #666;
  padding: 0.5rem 1.25rem 0;
}

.crop-modal-body {
  overflow: auto;
}

.crop-container {
  max-height: 60vh;
  padding: 1rem 1.25rem;
}

.crop-container img {
  display: block;
  max-width: 100%;
}

.crop-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid #e9ecef;
}

.btn-primary {
  background: #007bff;
  color: #fff;
  border: none;
  border-radius: 0.375rem;
  padding: 0.5rem 1.25rem;
  font-size: 0.9375rem;
  cursor: pointer;
}

.btn-primary:hover {
  background: #0069d9;
}

.btn-primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.btn-secondary {
  background: #f8f9fa;
  color: #333;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  padding: 0.5rem 1.25rem;
  font-size: 0.9375rem;
  cursor: pointer;
}

.btn-secondary:hover {
  background: #e9ecef;
}

/* Profile edit button */
.profile-edit-btn {
  margin-left: auto;
  flex-shrink: 0;
  align-self: center;
}

/* Profile form inside modal */
.profile-form-body {
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow-y: auto;
  max-height: 65vh;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.form-row label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
}

.form-hint {
  font-weight: 400;
  color: #888;
  font-size: 0.8rem;
  margin-left: 0.375rem;
}

.form-row input,
.form-row select,
.form-row textarea {
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  padding: 0.5rem 0.625rem;
  font-size: 0.9375rem;
  font-family: inherit;
  width: 100%;
  box-sizing: border-box;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 0.1875rem rgba(0, 123, 255, 0.2);
}

.form-row textarea {
  resize: vertical;
  min-height: 6rem;
}

.form-row-half {
  flex-direction: row;
  gap: 0.75rem;
}

.form-row-half > div {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.member-profile-empty {
  color: #888;
  font-size: 0.9rem;
}

@media (max-width: 480px) {
  .form-row-half {
    flex-direction: column;
  }
}

@media (max-width: 600px) {
  .member-cover {
    height: 10rem;
  }

  .member-identity {
    margin-top: -2rem;
  }

  .member-avatar {
    width: 5rem;
    height: 5rem;
  }

  .member-username {
    font-size: 1.25rem;
  }
}

/* Member page bike groups */
.member-bike-section {
  margin-bottom: 2rem;
}

.member-bike-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
  border-bottom: 2px solid #007bff;
  padding-bottom: 0.375rem;
}

.member-bike-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #333;
  margin: 0;
}

.member-bike-title a {
  color: #333;
  text-decoration: none;
}

.member-bike-title a:hover {
  color: #007bff;
}

.member-bike-see-all {
  font-size: 0.875rem;
  color: #007bff;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.member-bike-see-all:hover {
  text-decoration: underline;
}

.member-bike-header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.member-section-heading {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1f2937;
  margin: 1.5rem 0 0.75rem;
  padding-bottom: 0.375rem;
  border-bottom: 2px solid #e5e7eb;
}

.profile-meta-garage {
  margin-top: 0.625rem;
  font-size: 0.9375rem;
  color: #555;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.garage-meta-pill {
  position: relative;
  cursor: default;
}

.garage-tooltip {
  display: none;
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  background: #1f2937;
  color: #f9fafb;
  border-radius: 0.375rem;
  padding: 0.625rem 0.75rem;
  min-width: 14rem;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  pointer-events: none;
}

.garage-meta-pill:hover .garage-tooltip {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.garage-tooltip-heading {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9ca3af;
}

.garage-tooltip-bike {
  font-size: 0.8rem;
  color: #f9fafb;
  line-height: 1.4;
}

.garage-toggle {
  display: flex;
  gap: 0.25rem;
}

.garage-btn {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border: 1px solid #d1d5db;
  border-radius: 0.25rem;
  background: #fff;
  color: #6b7280;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.garage-btn:hover {
  border-color: #9ca3af;
  color: #374151;
}

.garage-btn.active {
  background: #1f2937;
  border-color: #1f2937;
  color: #fff;
}

.like-button {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background: none;
  border: 1px solid #ccc;
  border-radius: 2rem;
  padding: 0.375rem 0.875rem;
  cursor: pointer;
  font-size: 0.9375rem;
  color: #555;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
}

.like-button:hover {
  border-color: #e05;
  color: #e05;
}

.like-button.liked {
  border-color: #e05;
  color: #e05;
}

.like-button:disabled {
  opacity: 0.6;
  cursor: default;
}

.like-heart {
  font-size: 1.125rem;
  line-height: 1;
}

.detail-item {
  margin-bottom: 0.625rem;
  display: flex;
  align-items: center;
}

.detail-label {
  font-weight: bold;
  min-width: 7.5rem;
  color: #666;
}

.detail-value {
  color: #333;
}

.member-link {
  color: #007bff;
  text-decoration: none;
}

.member-link:hover {
  text-decoration: underline;
}

/* Member Page */
.header {
  background-color: white;
  padding: 1.25rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 1.25rem;
}

.stats {
  color: #666;
  font-size: 1rem;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr));
  gap: 0.9375rem;
  margin-bottom: 1.875rem;
}

.photo-item {
  position: relative;
  width: 100%;
  padding-bottom: 100%; /* 1:1 Aspect Ratio */
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s;
}

.photo-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.photo-link {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f9f9f9;
}

.photo-link img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.no-photos {
  text-align: center;
  padding: 3.75rem 1.25rem;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  color: #666;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.625rem;
  margin-top: 1.875rem;
}

.pagination a,
.pagination span {
  display: inline-block;
  padding: 0.5rem 0.75rem;
  text-decoration: none;
  color: #333;
  background-color: white;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pagination a:hover {
  background-color: #007bff;
  color: white;
}

.pagination .current {
  background-color: #007bff;
  color: white;
}

.pagination .disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 768px) {
  .photo-grid {
    grid-template-columns: repeat(auto-fill, minmax(9.375rem, 1fr));
    gap: 0.625rem;
  }

  .members-grid {
    grid-template-columns: repeat(auto-fill, minmax(9.375rem, 1fr));
  }

  .homepage-sections {
    gap: 1.875rem;
  }

  .photo-section, .members-section {
    padding: 1.25rem;
  }

  body {
    padding: 0.625rem;
  }

  .container {
    padding: 0 0.625rem;
  }
}

@media (max-width: 480px) {
  .photo-grid {
    grid-template-columns: repeat(auto-fill, minmax(6.25rem, 1fr));
    gap: 0.5rem;
  }

  .members-grid {
    grid-template-columns: 1fr;
  }

  .homepage-sections {
    gap: 1.25rem;
  }

  .photo-section, .members-section {
    padding: 0.9375rem;
  }

  .photo-card .photo-title {
    font-size: 0.75rem;
  }

  .photo-card .photo-meta {
    font-size: 0.625rem;
  }
}

/* Login Page */
.login-container {
  max-width: 25rem;
  margin: 3.125rem auto;
  background-color: white;
  padding: 1.875rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.login-container h1 {
  text-align: center;
  margin-bottom: 1.875rem;
  color: #333;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.3125rem;
  font-weight: bold;
  color: #666;
}

.form-group input {
  width: 100%;
  padding: 0.625rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  box-sizing: border-box;
}

.form-group input:focus {
  outline: none;
  border-color: #007bff;
}

.btn-primary {
  width: 100%;
  padding: 0.75rem;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s;
}

.btn-primary:hover {
  background-color: #0056b3;
}

.error-message {
  background-color: #f8d7da;
  color: #721c24;
  padding: 0.625rem;
  border-radius: 4px;
  border: 1px solid #f5c6cb;
  margin-bottom: 1.25rem;
  text-align: center;
}

.login-form {
  display: flex;
  flex-direction: column;
}

.login-button {
  width: 100%;
  padding: 0.75rem;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  transition: background-color 0.3s;
}

.login-button:hover {
  background-color: #0056b3;
  color: white;
}

.form-hint {
  display: block;
  font-size: 0.8rem;
  color: #888;
  margin-top: 0.25rem;
}

.form-hint-error {
  color: #c0392b;
}

.form-hint-success {
  color: #27ae60;
}

.input-error {
  border-color: #c0392b !important;
  outline-color: #c0392b;
}

.register-success {
  text-align: center;
  padding: 1rem 0;
}

.register-success h2 {
  margin-bottom: 1rem;
  color: #333;
}

.register-success p {
  color: #555;
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.register-success-note {
  font-size: 0.875rem;
  color: #888;
}

.register-login-link {
  text-align: center;
  margin-top: 1.25rem;
  font-size: 0.9rem;
  color: #666;
}

/* Upload Page */
.upload-container {
  max-width: 48rem;
  margin: 2rem auto;
  padding: 0 1rem;
}

.upload-stage {
  background: white;
  border-radius: 0.5rem;
  padding: 2rem;
  box-shadow: 0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.1);
}

.upload-container .error-message {
  background: #fee;
  border: 0.0625rem solid #fcc;
  border-radius: 0.25rem;
  padding: 1rem;
  margin-bottom: 1.5rem;
  color: #c53030;
  text-align: left;
}

.breadcrumb {
  margin-bottom: 1.5rem;
  color: #666;
  font-size: 0.875rem;
}

.breadcrumb a {
  color: #2563eb;
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.manufacturer-search-bar {
  margin: 1.5rem 0;
}

.manufacturer-search-bar input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 0.0625rem solid #d1d5db;
  border-radius: 0.5rem;
  box-sizing: border-box;
  outline: none;
}

.manufacturer-search-bar input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 0.1875rem rgba(37, 99, 235, 0.15);
}

.manufacturer-logo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.manufacturer-logo-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: inherit;
  border: 0.0625rem solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 1rem 0.75rem;
  transition: all 0.2s;
}

.manufacturer-logo-card:hover {
  border-color: #2563eb;
  box-shadow: 0 0.25rem 0.375rem rgba(0, 0, 0, 0.1);
}

.manufacturer-logo-placeholder {
  width: 5rem;
  height: 3rem;
  background-color: #f3f4f6;
  border-radius: 0.25rem;
  border: 0.0625rem dashed #d1d5db;
  margin-bottom: 0.625rem;
}

.manufacturer-logo-name {
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
  color: #333;
}

@media (max-width: 48rem) {
  .manufacturer-logo-grid {
    grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr));
  }
}

.manufacturer-section,
.model-section {
  margin-bottom: 2rem;
}

.manufacturer-section:last-child,
.model-section:last-child {
  margin-bottom: 0;
}

.manufacturer-grid,
.model-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.manufacturer-card,
.model-card {
  display: block;
  padding: 1.5rem;
  border: 0.0625rem solid #e5e7eb;
  border-radius: 0.5rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
}

.manufacturer-card:hover,
.model-card:hover {
  border-color: #2563eb;
  box-shadow: 0 0.25rem 0.375rem rgba(0, 0, 0, 0.1);
  transform: translateY(-0.0625rem);
}

.manufacturer-name,
.model-name {
  font-weight: 600;
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.photo-count {
  color: #6b7280;
  font-size: 0.875rem;
}

.dropdown-form {
  margin-top: 1rem;
}

.dropdown-form select {
  width: 100%;
  padding: 0.75rem;
  border: 0.0625rem solid #d1d5db;
  border-radius: 0.375rem;
  font-size: 1rem;
  background: white;
}

.upload-form {
  max-width: 24rem;
  margin-top: 1.5rem;
}

.upload-form .form-group {
  margin-bottom: 1.5rem;
}

.upload-form .form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #374151;
}

.upload-form .form-group input {
  width: 100%;
  padding: 0.75rem;
  border: 0.0625rem solid #d1d5db;
  border-radius: 0.375rem;
  font-size: 1rem;
}

.form-help {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: #6b7280;
}

.upload-button {
  background: #2563eb;
  color: white;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 0.375rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
}

.upload-button:hover {
  background: #1d4ed8;
}

@media (max-width: 48rem) {
  .manufacturer-grid,
  .model-grid {
    grid-template-columns: 1fr;
  }
}

/* Sticky Footer */
.site-footer {
  flex-shrink: 0;
  background-color: #f8f8f8;
  padding: 0.75rem 0;
  text-align: center;
  border-top: 0.0625rem solid #e0e0e0;
}

.copyright {
  font-size: 0.875rem;
  color: #999;
  margin: 0;
}

.footer-separator {
  margin: 0 0.5rem;
  color: #999;
}

.footer-link {
  color: #666;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: #333;
  text-decoration: underline;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .site-footer {
    padding: 0.5rem 0;
  }

  .copyright {
    font-size: 0.75rem;
  }

  .footer-separator {
    margin: 0 0.25rem;
  }

  .footer-link {
    font-size: 0.75rem;
  }
}

/* ── Admin Panel ─────────────────────────────────────────── */
.admin-layout {
  display: flex;
  min-height: calc(100vh - 3.75rem);
}

.admin-nav {
  width: 12rem;
  flex-shrink: 0;
  background: #1f2937;
  padding: 1.25rem 0;
}

.admin-nav-title {
  color: #9ca3af;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0 1rem 0.75rem;
}

.admin-nav-link {
  display: block;
  padding: 0.625rem 1rem;
  color: #d1d5db;
  text-decoration: none;
  font-size: 0.9375rem;
}

.admin-nav-link:hover,
.admin-nav-link.active {
  background: #374151;
  color: #fff;
}

.admin-main {
  flex: 1;
  padding: 1.5rem;
  overflow-x: auto;
}

.admin-main h1 {
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
  color: #111;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.admin-stat-card {
  background: #fff;
  border-radius: 0.5rem;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  text-align: center;
}

.admin-stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: #007bff;
}

.admin-stat-label {
  font-size: 0.8125rem;
  color: #6b7280;
  margin-top: 0.25rem;
}

.admin-search-form {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.admin-search-input {
  flex: 1;
  max-width: 24rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  font-size: 0.9375rem;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  border-radius: 0.5rem;
  overflow: hidden;
  font-size: 0.875rem;
}

.admin-table th {
  background: #f3f4f6;
  padding: 0.625rem 0.75rem;
  text-align: left;
  font-weight: 600;
  color: #374151;
  border-bottom: 1px solid #e5e7eb;
}

.admin-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #f3f4f6;
  color: #374151;
  vertical-align: middle;
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-table a {
  color: #007bff;
  text-decoration: none;
}

.admin-table a:hover {
  text-decoration: underline;
}

.admin-row-banned td {
  background: #fef2f2;
  color: #9ca3af;
}

.admin-email {
  font-size: 0.8125rem;
  color: #6b7280;
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-actions {
  white-space: nowrap;
}

.admin-btn {
  display: inline-block;
  padding: 0.4375rem 0.875rem;
  background: #007bff;
  color: #fff;
  border: none;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  cursor: pointer;
  text-decoration: none;
  line-height: 1;
}

.admin-btn:hover {
  background: #0056b3;
  color: #fff;
}

.admin-btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.8125rem;
}

.admin-btn-secondary {
  background: #6b7280;
}

.admin-btn-secondary:hover {
  background: #4b5563;
}

.admin-btn-warning {
  background: #d97706;
}

.admin-btn-warning:hover {
  background: #b45309;
}

.admin-btn-danger {
  background: #dc2626;
}

.admin-btn-danger:hover {
  background: #b91c1c;
}

.admin-pagination {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  font-size: 0.875rem;
  color: #6b7280;
}

.admin-message {
  background: #d1fae5;
  color: #065f46;
  padding: 0.625rem 1rem;
  border-radius: 0.375rem;
  margin-bottom: 1rem;
  font-size: 0.9375rem;
}

.admin-error {
  background: #fee2e2;
  color: #991b1b;
  padding: 0.625rem 1rem;
  border-radius: 0.375rem;
  margin-bottom: 1rem;
  font-size: 0.9375rem;
}

.admin-dialog {
  border: none;
  border-radius: 0.5rem;
  padding: 1.5rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  min-width: 22rem;
}

.admin-dialog h2 {
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.admin-dialog::backdrop {
  background: rgba(0,0,0,0.4);
}

.admin-form-group {
  margin-bottom: 1rem;
}

.admin-form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: #374151;
}

.admin-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  font-size: 0.9375rem;
  box-sizing: border-box;
}

.admin-dialog-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

/* ── Comments ────────────────────────────────────────────── */
.comments-section {
  margin-top: 2rem;
  margin-bottom: 3rem;
}

.comments-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 1rem;
  padding-bottom: 0.375rem;
  border-bottom: 2px solid #007bff;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.comment {
  background: #f9f9f9;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.comment-avatar-link {
  flex-shrink: 0;
}

.comment-avatar {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.comment-avatar-placeholder {
  background: #d1d5db;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
}

.comment-content {
  flex: 1;
  min-width: 0;
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 0.375rem;
  flex-wrap: wrap;
}

.comment-author {
  font-weight: 600;
  color: #007bff;
  text-decoration: none;
  font-size: 0.9375rem;
}

.comment-author:hover {
  text-decoration: underline;
}

.comment-date {
  font-size: 0.8125rem;
  color: #888;
}

.comment-delete {
  margin-left: auto;
  background: none;
  border: none;
  color: #dc2626;
  font-size: 0.8125rem;
  cursor: pointer;
  padding: 0;
}

.comment-delete:hover {
  text-decoration: underline;
}

.comment-body {
  font-size: 0.9375rem;
  color: #333;
  white-space: pre-wrap;
  word-break: break-word;
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  margin-top: 1rem;
}

.comment-input {
  width: 100%;
  min-height: 5rem;
  padding: 0.625rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  font-size: 0.9375rem;
  font-family: inherit;
  resize: vertical;
  box-sizing: border-box;
}

.comment-input:focus {
  outline: none;
  border-color: #007bff;
}

.comment-submit {
  align-self: flex-start;
  padding: 0.5rem 1.25rem;
  background: #007bff;
  color: #fff;
  border: none;
  border-radius: 0.375rem;
  font-size: 0.9375rem;
  cursor: pointer;
}

.comment-submit:hover {
  background: #0056b3;
}

.comment-login-prompt {
  font-size: 0.9375rem;
  color: #666;
  margin-top: 1rem;
}

/* Social Links */
.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  color: #555;
  transition: color 0.15s;
}

.social-link:hover {
  text-decoration: underline;
}

.social-link--instagram { color: #c13584; }
.social-link--facebook  { color: #1877f2; }
.social-link--youtube   { color: #ff0000; }
.social-link--tiktok    { color: #333; }
.social-link--snapchat  { color: #f7b731; }

/* Profile form social section */
.form-section-label {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #888;
  margin-top: 0.5rem;
  margin-bottom: 0.25rem;
}

.form-row-social label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* Featured Photo Hero */
.featured-photo-hero {
  width: 100%;
  margin-bottom: 2rem;
}

.featured-photo-link {
  display: block;
  position: relative;
  width: 100%;
  max-height: 32rem;
  overflow: hidden;
  text-decoration: none;
}

.featured-photo-img {
  width: 100%;
  max-height: 32rem;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.featured-photo-link:hover .featured-photo-img {
  transform: scale(1.02);
}

.featured-photo-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
  padding: 3rem 2rem 1.5rem;
  color: #fff;
}

.featured-photo-badge {
  display: inline-block;
  background: #e53e3e;
  color: #fff;
  font-size: 0.75rem;
  font-weight: bold;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.25rem 0.625rem;
  border-radius: 0.25rem;
  margin-bottom: 0.625rem;
}

.featured-photo-details {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.featured-photo-bike {
  font-size: 1.5rem;
  font-weight: bold;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.featured-photo-member {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  opacity: 0.9;
}

.featured-photo-avatar {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.6);
}

.featured-photo-stats {
  display: flex;
  gap: 1rem;
  font-size: 0.9375rem;
  opacity: 0.85;
}

@media (max-width: 600px) {
  .featured-photo-link {
    max-height: 18rem;
  }

  .featured-photo-img {
    max-height: 18rem;
  }

  .featured-photo-overlay {
    padding: 2rem 1rem 1rem;
  }

  .featured-photo-bike {
    font-size: 1.125rem;
  }
}
