/* ── Public Complaints page specific styles ───────────────────────────────── */

.page-main {
  padding: 48px 0 80px;
  min-height: calc(100vh - 70px);
  background: radial-gradient(900px 400px at 90% 0%, rgba(122,46,46,.05), transparent), var(--cream);
}
.page-eyebrow {
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .75rem;
  font-weight: 700;
  color: var(--maroon);
  margin-bottom: 6px;
}
.page-title {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  margin-bottom: 16px;
}

/* Search + Filter bar */
.search-filter-row {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  align-items: center;
}
.search-input {
  padding: 9px 16px;
  border: 1.5px solid #D8D0C4;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: .88rem;
  outline: none;
  transition: border-color .2s;
  width: 280px;
}
.search-input:focus {
  border-color: var(--indigo);
}
.filter-select {
  padding: 8px 14px;
  border: 1.5px solid #D8D0C4;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: .85rem;
  background: var(--white);
  outline: none;
  cursor: pointer;
  transition: border-color .2s;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235C5548' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
  color: var(--ink);
  width: 180px;
}
.filter-select:focus {
  border-color: var(--indigo);
}
.clear-filters-btn {
  padding: 8px 18px;
  font-size: .84rem;
  border-radius: 999px;
  border: 1.5px solid var(--maroon);
  background: var(--white);
  color: var(--maroon);
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.clear-filters-btn:hover {
  background: var(--maroon);
  color: var(--white);
}

/* Status filter buttons */
.filter-btn {
  padding: 7px 16px;
  border-radius: 999px;
  border: 1.5px solid #D8D0C4;
  background: var(--white);
  font-family: var(--font-body);
  font-size: .84rem;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color .2s, background .2s, color .2s;
}
.filter-btn:hover {
  border-color: var(--indigo);
  color: var(--indigo);
}
.filter-btn.active {
  background: var(--indigo);
  color: var(--white);
  border-color: var(--indigo);
}

/* Feed grid — re-use styles from home */
.complaints-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
  margin-top: 28px;
}

/* Loading / pagination */
.state-loading,
.state-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--ink-soft);
}
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--cream-deep);
  border-top-color: var(--indigo);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin: 0 auto 12px;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.load-more-wrap {
  text-align: center;
  margin-top: 32px;
}

/* Complaint detail modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(20,42,69,.55);
  z-index: 200;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px 40px;
  overflow-y: auto;
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.modal-overlay.open {
  display: flex;
}
.modal-content {
  background: var(--white);
  border-radius: 18px;
  width: 100%;
  max-width: 720px;
  box-shadow: 0 20px 60px rgba(20,42,69,.22);
  overflow: hidden;
  animation: modalIn .22s ease;
  margin: auto;
}
@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 28px 16px;
  border-bottom: 1px solid var(--cream-deep);
}
.modal-header .badge {
  font-size: .75rem;
}
.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.4rem;
  color: var(--ink-soft);
  line-height: 1;
  padding: 4px 8px;
  border-radius: 8px;
  transition: background .15s;
}
.modal-close:hover {
  background: var(--cream-deep);
}
.modal-body {
  padding: 24px 28px 32px;
}
.modal-title {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--indigo-deep);
  margin: 0 0 16px;
  line-height: 1.3;
}
.modal-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 24px;
  margin-bottom: 20px;
}
.modal-meta-item .m-label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--ink-soft);
  margin-bottom: 3px;
}
.modal-meta-item .m-value {
  font-size: .92rem;
  color: var(--ink);
  font-weight: 500;
}
.modal-divider {
  border: none;
  border-top: 1px solid var(--cream-deep);
  margin: 18px 0;
}
.modal-section-label {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-soft);
  margin-bottom: 8px;
}
.modal-description {
  font-size: .95rem;
  color: var(--ink);
  line-height: 1.7;
  white-space: pre-wrap;
  margin: 0;
}
.modal-photos {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.modal-photos img {
  width: 100%;
  max-width: 320px;
  border-radius: var(--radius);
  object-fit: cover;
  max-height: 260px;
  display: block;
  border: 1px solid #E4DCC8;
}
.attachment-link {
  position: relative;
  display: block;
}
.attachment-link span {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(31,58,95,.85);
  color: white;
  padding: 6px 10px;
  font-size: .8rem;
  text-align: center;
  opacity: 0;
  transition: opacity .2s;
}
.attachment-link:hover span {
  opacity: 1;
}
.modal-public-response {
  background: #DDEBD9;
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-top: 16px;
}
.modal-public-response .m-label {
  color: #2E6B32;
}
.modal-public-response .modal-description {
  color: #1F5226;
}
.modal-ref {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1rem;
  color: var(--maroon);
  font-weight: 600;
}

@media (max-width: 700px) {
  .search-filter-row {
    flex-direction: column;
    align-items: stretch;
  }
  .search-input,
  .filter-select {
    width: 100%;
  }
  .modal-meta-grid {
    grid-template-columns: 1fr;
  }
}
.inline-6c37115b { color:var(--ink-soft);font-size:.95rem;margin-bottom:28px }
.inline-248ae63c { display:flex;gap:8px;flex-wrap:wrap;margin-bottom:16px; }
.inline-cb458930 { display:none }
