:root {
  --navy: #0d2f2b;
  --blue: #176454;
  --blue-soft: #e5f1ed;
  --ink: #172033;
  --muted: #647084;
  --line: #d8e1ea;
  --soft: #f5f7fa;
  --white: #ffffff;
  --gold: #b79a55;
  --gold-soft: #f1ead8;
  --green: #2f6d55;
  --red: #9a3939;
  --shadow: 0 16px 42px rgba(19, 35, 58, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

button {
  cursor: pointer;
}

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
  border-bottom: 1px solid rgba(216, 225, 234, 0.86);
  background: rgba(255, 255, 255, 0.94);
  padding: 12px clamp(16px, 4vw, 42px);
  backdrop-filter: blur(12px);
}

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

.brand__logo {
  display: block;
  width: 74px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
  object-position: center;
  box-shadow: 0 6px 18px rgba(13, 47, 43, 0.18);
}

.brand strong,
.brand small {
  display: block;
}

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

.topbar__nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.topbar__nav a,
.link-button {
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--navy);
  padding: 9px 12px;
  text-decoration: none;
  font-weight: 700;
}

.topbar__nav a:hover,
.link-button:hover {
  background: var(--blue-soft);
}

.app-shell {
  min-height: calc(100vh - 72px);
}

.hero {
  min-height: calc(100vh - 72px);
  display: grid;
  align-items: center;
  background:
    linear-gradient(100deg, rgba(6, 24, 22, 0.9), rgba(23, 100, 84, 0.72)),
    url("./presbitero_Logo.JPG");
  background-position: center;
  background-size: cover;
  color: var(--white);
  padding: clamp(40px, 7vw, 88px) clamp(16px, 5vw, 64px);
}

.hero__inner {
  width: min(1080px, 100%);
}

.eyebrow,
.section-kicker {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 980px;
  margin-bottom: 18px;
  font-size: clamp(2.2rem, 6vw, 4.9rem);
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 10px;
  color: var(--navy);
  font-size: clamp(1.45rem, 3vw, 2.25rem);
  line-height: 1.12;
  letter-spacing: 0;
}

h3 {
  color: var(--navy);
  letter-spacing: 0;
}

.subtitle {
  max-width: 780px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1rem, 2vw, 1.32rem);
}

.hero__notice {
  max-width: 820px;
  margin: 24px 0;
  border-left: 4px solid var(--gold);
  background: rgba(255, 255, 255, 0.12);
  padding: 16px 18px;
  color: rgba(255, 255, 255, 0.9);
}

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

.section,
.dashboard,
.form-page,
.public-page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0;
}

.section--tight {
  padding-top: 18px;
}

.panel,
.card,
.question-card,
.chart-panel,
.table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.panel {
  padding: clamp(18px, 3vw, 28px);
}

.grid {
  display: grid;
  gap: 18px;
}

.grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 11px 16px;
  text-decoration: none;
  font-weight: 800;
  text-align: center;
}

.button--primary {
  background: var(--navy);
  color: var(--white);
}

.button--secondary {
  border-color: #cbd6e2;
  background: var(--white);
  color: var(--navy);
}

.button--gold {
  background: var(--gold);
  color: #171307;
}

.button--danger {
  background: var(--red);
  color: var(--white);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.button:hover:not(:disabled),
.button:focus-visible,
.rating-button:focus-visible,
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 3px solid rgba(177, 138, 54, 0.26);
  outline-offset: 2px;
}

.field {
  display: grid;
  gap: 7px;
}

.field label,
.check-field,
.radio-field {
  color: var(--navy);
  font-weight: 750;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid #cbd6e2;
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  padding: 12px 13px;
}

.field textarea {
  min-height: 118px;
  resize: vertical;
}

.help {
  color: var(--muted);
  font-size: 0.9rem;
}

.check-field,
.radio-field {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 12px;
}

.check-field input,
.radio-field input {
  margin-top: 4px;
}

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

.tab {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--navy);
  padding: 10px 13px;
  font-weight: 800;
}

.tab.is-active {
  border-color: var(--navy);
  background: var(--navy);
  color: var(--white);
}

.metric {
  min-height: 112px;
  padding: 18px;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.metric strong {
  display: block;
  margin-top: 12px;
  color: var(--navy);
  font-size: clamp(1.75rem, 4vw, 2.45rem);
  line-height: 1;
}

.status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.8rem;
  font-weight: 800;
}

.status--ok {
  background: #e3f3ec;
  color: var(--green);
}

.status--warn {
  background: var(--gold-soft);
  color: #6d511a;
}

.status--closed {
  background: #f4e3e3;
  color: var(--red);
}

.alert {
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  background: var(--gold-soft);
  padding: 14px 16px;
  color: #5f4717;
  font-weight: 700;
}

.alert--success {
  border-color: var(--green);
  background: #e3f3ec;
  color: var(--green);
}

.alert--danger {
  border-color: var(--red);
  background: #f4e3e3;
  color: var(--red);
}

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

.question-card {
  padding: 18px;
}

.question-card__head {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 8px;
}

.question-card__number {
  flex: 0 0 auto;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.question-card__quality {
  color: var(--navy);
  text-align: right;
}

.question-card__text {
  color: var(--muted);
}

.rating-group {
  display: grid;
  grid-template-columns: repeat(7, minmax(34px, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.rating-button {
  min-height: 42px;
  border: 1px solid #cbd6e2;
  border-radius: 8px;
  background: var(--soft);
  color: var(--navy);
  font-weight: 800;
}

.rating-button.is-selected {
  border-color: var(--navy);
  background: var(--navy);
  color: var(--white);
}

.scale-list {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.scale-list li {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  padding: 10px;
}

.scale-list strong {
  display: block;
  color: var(--navy);
  font-size: 1.25rem;
}

.scale-list span {
  color: var(--muted);
  font-size: 0.82rem;
}

.progress-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #dce5ee;
}

.progress-bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--gold));
}

.list {
  display: grid;
  gap: 12px;
}

.list-item {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  padding: 16px;
}

.list-item__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.copy-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.copy-box input {
  min-width: 0;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 11px 12px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--navy);
  font-size: 0.86rem;
}

td {
  color: var(--ink);
}

.diff-low {
  color: var(--green);
  font-weight: 800;
}

.diff-mid {
  color: #8a651d;
  font-weight: 800;
}

.diff-high {
  color: var(--red);
  font-weight: 800;
}

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

.chart-panel {
  padding: 16px;
}

.chart-panel canvas {
  width: 100%;
  height: 290px;
  display: block;
}

.comment-list {
  display: grid;
  gap: 10px;
}

.comment {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 12px;
}

.empty {
  border: 1px dashed #bcc8d6;
  border-radius: 8px;
  background: #fbfcfd;
  padding: 18px;
  color: var(--muted);
  font-weight: 700;
}

@media (max-width: 920px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar__nav {
    justify-content: flex-start;
  }

  .hero {
    min-height: auto;
  }

  .grid--2,
  .grid--3,
  .grid--4,
  .question-grid,
  .chart-grid,
  .scale-list {
    grid-template-columns: 1fr;
  }

  .chart-panel canvas {
    height: 250px;
  }
}

@media (max-width: 560px) {
  .brand strong {
    font-size: 0.95rem;
  }

  .section,
  .dashboard,
  .form-page,
  .public-page {
    width: min(100% - 24px, 1180px);
    padding: 24px 0;
  }

  .hero {
    padding: 32px 16px;
  }

  .rating-group {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .button,
  .hero__actions .button,
  .actions .button {
    width: 100%;
  }

  .copy-box {
    grid-template-columns: 1fr;
  }
}
