:root {
  --bg: #f6f8f7;
  --panel: #ffffff;
  --text: #18312c;
  --muted: #5d6f6a;
  --line: #dbe4e0;
  --primary: #04243D;
  --primary-dark: #004b3f;
  --accent: #FF3511;
  --danger: #a63d40;
  --shadow: 0 18px 40px rgba(24, 49, 44, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(16px, 4vw, 48px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: 118px;
  height: auto;
}

.brand-copy small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--muted);
  font-weight: 700;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus {
  color: var(--primary);
}

.menu-toggle {
  display: none;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--primary);
  background: #fff;
  font-weight: 800;
  cursor: pointer;
}

.hero {
  min-height: 76vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 430px);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
  padding: clamp(46px, 8vw, 96px) clamp(16px, 5vw, 64px);
  background: #04243D;
  color: #fff;
}

.hero h1 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 5.7rem);
  line-height: 0.98;
}

.hero p {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.12rem;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: var(--accent);
}

.hero-actions,
.form-grid,
.filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.primary-button,
.secondary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.primary-button {
  color: #fff;
  background: var(--primary);
}

.primary-button:hover,
.primary-button:focus {
  background: var(--primary-dark);
}

.secondary-button {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.12);
}

.ghost-button {
  color: var(--primary);
  border-color: var(--line);
  background: #fff;
}

.hero-panel {
  display: grid;
  gap: 14px;
}

.hero-panel div {
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
}

.hero-panel strong {
  display: block;
  font-size: 2.6rem;
  line-height: 1;
}

.hero-panel span {
  color: rgba(255, 255, 255, 0.86);
}

.section {
  padding: clamp(44px, 7vw, 88px) clamp(16px, 5vw, 64px);
}

.page-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: calc(100vh - 171px);
}

.section-heading {
  max-width: 780px;
  margin-bottom: 24px;
}

.page-section .section-heading {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 3.1rem);
}

.section-heading h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 3.1rem);
}

.section-heading p:last-child {
  color: var(--muted);
}

.two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.form-panel {
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.form-panel.wide {
  width: min(100%, 980px);
  max-width: 980px;
}

.auth-panel {
  width: min(100%, 560px);
  max-width: 560px;
}

.form-panel h3 {
  margin: 0;
  font-size: 1.35rem;
}

.form-panel h2 {
  margin: 0;
  font-size: 1.35rem;
}

.admin-login {
  max-width: 520px;
  margin-top: 18px;
}

.auth-link {
  margin: 0;
  color: var(--muted);
}

.auth-link a {
  color: var(--primary);
  font-weight: 800;
}

label {
  display: grid;
  gap: 7px;
  color: var(--text);
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #bdcbc6;
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--text);
  background: #fff;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus,
button:focus {
  outline: 3px solid rgba(240, 180, 41, 0.55);
  outline-offset: 2px;
}

.form-grid label {
  min-width: min(100%, 260px);
  flex: 1;
}

.notice {
  border-left: 5px solid var(--accent);
  border-radius: 8px;
  padding: 13px 14px;
  color: #4b3b07;
  background: #fff6d8;
  font-weight: 800;
}

.captcha-note {
  margin: -2px 0 2px;
  color: var(--muted);
  font-size: 0.92rem;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(24, 49, 44, 0.58);
}

.modal-panel {
  position: relative;
  display: grid;
  gap: 14px;
  width: min(100%, 480px);
  padding: 26px;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.modal-panel h2,
.modal-panel h1,
.modal-panel p {
  margin: 0;
}

.modal-panel h1 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  line-height: 1.12;
}

.modal-panel p {
  color: var(--muted);
}

.modal-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
  cursor: pointer;
}

.admin-hint {
  color: var(--muted);
  margin: 0;
}

.filters {
  align-items: center;
  margin-bottom: 18px;
}

#dashboard .filters,
#dashboard .website-tabs,
#dashboard .issue-list {
  width: 100%;
}

#dashboard .website-tabs {
  justify-content: flex-start;
}

.filters > * {
  min-width: min(100%, 180px);
  flex: 1;
}

.website-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.tab-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 13px;
  color: var(--primary);
  background: #fff;
  font-weight: 800;
  cursor: pointer;
}

.tab-button.active {
  color: #fff;
  background: var(--primary);
}

.issue-list {
  display: grid;
  gap: 14px;
}

.issue-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 10px 24px rgba(24, 49, 44, 0.08);
}

.issue-card header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.issue-card h3 {
  margin: 0;
}

.meta,
.tag-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.93rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--primary-dark);
  background: #dff3ee;
  font-weight: 800;
}

.tag.status-hidden,
.tag.status-rejected {
  color: #fff;
  background: var(--danger);
}

.tag.status-for-review {
  color: #4b3b07;
  background: #fff0bd;
}

.tag.status-approved,
.tag.status-resolved {
  color: #fff;
  background: var(--primary);
}

.tag.status-duplicate {
  color: #3a3f45;
  background: #dce2e8;
}

.issue-photo {
  max-width: min(100%, 360px);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.admin-controls label {
  font-size: 0.9rem;
}

.admin-controls .wide-control {
  grid-column: 1 / -1;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.summary-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.summary-card strong {
  display: block;
  font-size: 1.8rem;
}

footer {
  padding: 28px clamp(16px, 5vw, 64px);
  color: var(--muted);
  text-align: center;
  border-top: 1px solid var(--line);
  background: #fff;
}

footer a {
  color: var(--primary);
  font-weight: 800;
}

[hidden] {
  display: none !important;
}

@media (max-width: 820px) {
  .topbar {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .brand {
    min-width: 0;
  }

  .brand-logo {
    width: 104px;
  }

  .brand-copy {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .site-nav {
    display: none;
    grid-column: 1 / -1;
    align-items: stretch;
    flex-direction: column;
    width: 100%;
    padding-top: 12px;
    border-top: 1px solid var(--line);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a,
  .site-nav .ghost-button {
    justify-content: center;
    width: 100%;
  }

  .hero,
  .two-column {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .admin-controls {
    grid-template-columns: 1fr;
  }
}
