:root {
  --bg-main: #0B0F17;
  --bg-surface: #111827;
  --bg-card: #161F30;
  --bg-card-hover: #1D283E;
  --border-subtle: #243048;
  --border-highlight: #3B82F6;
  --accent-gold: #FBBF24;
  --accent-gold-hover: #E8A814;
  --text-main: #F9FAFB;
  --text-muted: #94A3B8;
  --text-dim: #64748B;
  --score-green: #22C55E;
  --score-yellow: #EAB308;
  --score-red: #EF4444;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.5);
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-family);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

/* ==========================================================================
   Navigation Bar
   ========================================================================== */
.navbar {
  background-color: rgba(17, 24, 39, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
}

.nav-container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.brand-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #FFFFFF;
}

.brand-sub {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 500;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-item {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  transition: color 0.15s ease;
}

.nav-item:hover {
  color: #FFFFFF;
}

.btn-primary {
  background-color: #FFFFFF;
  color: #0B0F17;
  border: none;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s ease, transform 0.1s ease;
}

.btn-primary:active {
  transform: scale(0.97);
}

.btn-secondary {
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.14);
}

.btn-gold-action {
  background-color: var(--accent-gold);
  color: #0B0F17;
  border: none;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 800;
  width: 100%;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.btn-gold-action:hover {
  background-color: var(--accent-gold-hover);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  padding: 44px 16px 28px;
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
}

.hero-title {
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.highlight-text {
  color: var(--accent-gold);
}

.hero-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 600px;
  margin: 0 auto 24px;
}

.search-wrapper {
  position: relative;
  max-width: 620px;
  margin: 0 auto;
}

.search-box {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease;
}

.search-box:focus-within {
  border-color: var(--border-highlight);
}

.search-icon {
  font-size: 1rem;
  opacity: 0.7;
}

.search-box input {
  background: transparent;
  border: none;
  outline: none;
  color: #FFFFFF;
  font-size: 0.95rem;
  width: 100%;
}

.search-box input::placeholder {
  color: var(--text-dim);
}

.autocomplete-container {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  max-height: 240px;
  overflow-y: auto;
  z-index: 40;
  box-shadow: var(--shadow-lg);
  display: none;
  text-align: left;
}

.autocomplete-item {
  padding: 11px 14px;
  font-size: 0.88rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
}

.autocomplete-item:hover {
  background-color: var(--bg-card);
}

.match-text {
  color: var(--accent-gold);
}

/* ==========================================================================
   Filter Controls
   ========================================================================== */
.main-container {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 16px 60px;
}

.filter-controls-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.filter-group {
  flex: 1;
  min-width: 150px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-group label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.filter-group select,
.form-group input,
.form-group select,
.form-group textarea {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: #FFFFFF;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  outline: none;
  width: 100%;
  font-family: inherit;
  transition: border-color 0.15s ease;
}

.filter-group select:focus,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--border-highlight);
}

/* ==========================================================================
   Review Feed
   ========================================================================== */
.feed-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 8px;
}

.feed-header h2 {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.review-counter-chip {
  font-size: 0.76rem;
  color: var(--text-muted);
  background: var(--bg-surface);
  padding: 4px 10px;
  border-radius: 9999px;
  border: 1px solid var(--border-subtle);
}

.reviews-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.review-item-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.review-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.reviewer-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.score-badge {
  font-size: 1.15rem;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
}

.score-green {
  background: rgba(34, 197, 94, 0.16);
  color: #22C55E;
}

.score-yellow {
  background: rgba(234, 179, 8, 0.16);
  color: #EAB308;
}

.score-red {
  background: rgba(239, 68, 68, 0.16);
  color: #EF4444;
}

.review-place {
  font-weight: 700;
  font-size: 1.05rem;
  color: #FFFFFF;
  line-height: 1.2;
}

.review-uni {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.verified-badge {
  background: rgba(34, 197, 94, 0.12);
  color: #22C55E;
  padding: 3px 8px;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-block;
}

.review-date {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 4px;
}

.review-body {
  font-size: 0.94rem;
  color: #E2E8F0;
  line-height: 1.55;
}

.review-footer-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.review-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.tag-pill {
  background: rgba(251, 191, 24, 0.1);
  color: var(--accent-gold);
  border: 1px solid rgba(251, 191, 24, 0.25);
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
}

.reply-btn-action {
  background: transparent;
  border: none;
  color: var(--accent-gold);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
  text-align: left;
  align-self: flex-start;
}

.reply-btn-action:hover {
  text-decoration: underline;
}

.manager-response-card {
  background: rgba(0, 0, 0, 0.25);
  border-left: 3px solid var(--accent-gold);
  padding: 12px 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-top: 6px;
}

.manager-response-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  flex-wrap: wrap;
  gap: 6px;
}

.manager-responder-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.official-badge {
  background: rgba(251, 191, 24, 0.15);
  color: var(--accent-gold);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.manager-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: #FFFFFF;
}

.manager-title {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.manager-response-text {
  font-size: 0.88rem;
  color: var(--text-main);
  font-style: italic;
  line-height: 1.45;
}

/* ==========================================================================
   Modals
   ========================================================================== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
  overflow-y: auto;
}

.modal-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  max-width: 580px;
  width: 100%;
  padding: 24px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.modal-header h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #FFFFFF;
}

.modal-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.45;
}

.close-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}

.close-btn:hover {
  color: #FFFFFF;
}

.form-row {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  flex: 1;
}

.form-group.relative {
  position: relative;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.upload-dropzone {
  border: 2px dashed var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
  cursor: pointer;
  background: var(--bg-card);
  transition: border-color 0.15s ease;
}

.upload-dropzone:hover {
  border-color: var(--border-highlight);
}

.file-input-hidden {
  display: none;
}

.dropzone-label {
  cursor: pointer;
  display: block;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.badge-redacted {
  background: rgba(34, 197, 94, 0.15);
  color: #22C55E;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.text-button {
  background: transparent;
  border: none;
  color: var(--accent-gold);
  font-size: 0.8rem;
  cursor: pointer;
  margin-left: 8px;
  text-decoration: underline;
}

/* ==========================================================================
   Redactor Canvas Modal
   ========================================================================== */
.redactor-card {
  max-width: 800px;
}

.canvas-scroll-wrapper {
  overflow: auto;
  background: #000000;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  margin-bottom: 14px;
  max-height: 55vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

#redaction-canvas {
  max-width: 100%;
  height: auto;
  display: block;
  cursor: crosshair;
  touch-action: none;
}

.redactor-actions-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.redactor-button-group {
  display: flex;
  gap: 8px;
}

/* ==========================================================================
   Mobile Responsive Rules (< 768px)
   ========================================================================== */
@media (max-width: 768px) {
  .nav-container {
    padding: 10px 14px;
  }

  .nav-links {
    gap: 8px;
  }

  .nav-item {
    font-size: 0.8rem;
  }

  #nav-best-rated,
  #nav-claim-btn {
    display: none; /* Keep the header clean on small phones */
  }

  .btn-primary {
    padding: 7px 11px;
    font-size: 0.78rem;
  }

  .hero-section {
    padding: 28px 14px 20px;
  }

  .hero-title {
    font-size: 1.65rem;
  }

  .hero-subtitle {
    font-size: 0.88rem;
    margin-bottom: 18px;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .filter-controls-card {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }

  .filter-group {
    min-width: 100%;
  }

  #clear-filters-btn {
    width: 100%;
  }

  .review-item-card {
    padding: 14px;
  }

  .review-header-row {
    flex-direction: column;
    gap: 8px;
  }

  .review-header-row > div:last-child {
    text-align: left !important;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .review-place {
    font-size: 0.98rem;
  }

  .modal-card {
    padding: 16px;
    max-height: 94vh;
  }

  .redactor-actions-row {
    flex-direction: column;
  }

  .redactor-button-group {
    width: 100%;
  }

  .redactor-button-group button {
    flex: 1;
  }
}