:root {
  --green-900: #143326;
  --green-800: #1f4d3a;
  --green-700: #286b4d;
  --gold-500: #d8a441;
  --gold-100: #fff4d9;
  --blue-700: #234b6f;
  --ink: #17211c;
  --muted: #5d6a62;
  --line: #dbe4dd;
  --paper: #fffdfa;
  --soft: #f1f7f3;
  --white: #ffffff;
  --shadow: 0 20px 55px rgba(20, 51, 38, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

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

a {
  color: inherit;
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.narrow {
  width: min(820px, calc(100% - 32px));
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 10;
  padding: 10px 14px;
  background: var(--gold-500);
  color: var(--ink);
  font-weight: 700;
}

.skip-link:focus {
  top: 16px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(255, 253, 250, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: var(--green-800);
  font-weight: 800;
}

.admin-header .brand-mark {
  width: 52px;
  border-radius: 8px;
  font-size: 13px;
}

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

.brand small {
  color: var(--muted);
  font-size: 13px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.main-nav a {
  padding: 10px 12px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  color: var(--green-900);
}

.main-nav a:hover,
.main-nav a.active {
  background: var(--soft);
  color: var(--green-800);
}

.admin-body .page-hero {
  background: var(--green-800);
}

.admin-footer {
  padding: 18px 0;
}

.admin-footer .footer-bottom {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--white);
  color: var(--green-900);
  font-weight: 800;
}

.hero {
  padding: 72px 0;
  background:
    linear-gradient(135deg, rgba(20, 51, 38, 0.92), rgba(35, 75, 111, 0.74)),
    radial-gradient(circle at 20% 10%, rgba(216, 164, 65, 0.38), transparent 32%),
    var(--green-900);
  color: var(--white);
}

.hero-grid,
.split,
.content-band,
.donation-grid,
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 36px;
  align-items: center;
}

.hero h1,
.page-hero h1 {
  margin: 12px 0 18px;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.02;
}

.hero p,
.page-hero p {
  max-width: 680px;
  font-size: 20px;
}

.eyebrow {
  display: inline-block;
  color: var(--gold-500);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-actions,
.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  border: 0;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
}

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

.button.secondary {
  background: var(--gold-500);
  color: var(--ink);
}

.button.light {
  background: var(--white);
  color: var(--green-900);
}

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

.hero-panel,
.qr-card,
.feature-card,
.audio-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.hero-panel {
  padding: 28px;
}

.hero-panel h2 {
  margin: 20px 0 8px;
  font-size: 30px;
}

.cross-window {
  height: 220px;
  border-radius: 8px;
  background:
    linear-gradient(90deg, transparent 45%, rgba(255,255,255,0.88) 45% 55%, transparent 55%),
    linear-gradient(0deg, transparent 45%, rgba(255,255,255,0.88) 45% 55%, transparent 55%),
    linear-gradient(135deg, #2a7050, #d8a441);
}

.section {
  padding: 72px 0;
}

.section.soft {
  background: var(--soft);
}

.section.dark {
  background: var(--green-900);
  color: var(--white);
}

.section-heading {
  margin-bottom: 28px;
}

.section h2,
.page-hero h1,
.prose h2 {
  color: inherit;
}

.section h2 {
  margin: 8px 0 14px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.12;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.audio-highlight-section {
  padding-top: 44px;
  padding-bottom: 44px;
}

.recent-audio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.recent-audio-card {
  display: grid;
  gap: 10px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.recent-audio-card h3,
.recent-audio-card p {
  margin: 0;
}

.recent-audio-card h3 {
  font-size: 24px;
  line-height: 1.15;
}

.recent-audio-card audio {
  margin-top: 6px;
}

.recent-audio-author {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.recent-audio-author .author-role {
  margin-left: 0;
}

.audio-highlight-action {
  display: flex;
  justify-content: center;
  margin-top: 22px;
}

.feature-card {
  padding: 24px;
}

.feature-icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--green-900);
  background: var(--gold-100);
  font-weight: 900;
}

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

.check-list p,
.pill-list span,
.audio-tags span {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--green-900);
  font-weight: 700;
}

.content-band {
  padding: 34px;
  border-left: 6px solid var(--gold-500);
  background: var(--soft);
}

.support-strip-section {
  padding: 28px 0;
  background: var(--soft);
}

.support-strip {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 20px 24px;
  border-left: 5px solid var(--gold-500);
  background: var(--white);
}

.support-strip h2,
.support-strip p {
  margin: 0;
}

.support-strip h2 {
  margin-top: 4px;
  font-size: 24px;
  line-height: 1.18;
}

.support-strip p {
  color: var(--muted);
}

.dark .content-band {
  background: transparent;
  border-color: var(--gold-500);
}

.page-hero {
  padding: 70px 0;
  background: var(--green-900);
  color: var(--white);
}

.prose {
  max-width: 900px;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 22px;
}

.values-grid div {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.values-grid strong,
.values-grid span {
  display: block;
}

.values-grid span {
  color: var(--muted);
}

.donation-grid {
  align-items: start;
}

.qr-card {
  padding: 24px;
}

.qr-card img {
  width: min(100%, 360px);
  margin: 18px auto;
  border: 10px solid var(--soft);
  border-radius: 8px;
}

.qr-placeholder {
  min-height: 260px;
  display: grid;
  place-items: center;
  gap: 8px;
  margin: 18px 0;
  padding: 24px;
  border: 2px dashed var(--line);
  border-radius: 8px;
  text-align: center;
  color: var(--muted);
  background: var(--soft);
}

.qr-placeholder strong,
.qr-placeholder span {
  display: block;
}

.audio-filters,
.contact-form {
  display: grid;
  gap: 14px;
  margin-bottom: 28px;
}

.login-layout {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 28px;
  align-items: start;
}

.login-invite {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.login-invite h2 {
  margin: 6px 0 12px;
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.12;
}

.audio-filters {
  grid-template-columns: 1fr;
}

.audio-search-heading {
  display: grid;
  gap: 12px;
}

.audio-search-heading h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.12;
}

.audio-search-heading label span {
  color: var(--muted);
  font-weight: 800;
}

.audio-search-heading .button {
  justify-self: start;
}

.audio-type-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.audio-type-options legend {
  width: 100%;
  margin-bottom: 2px;
  font-weight: 900;
  color: var(--green-900);
}

.audio-type-options label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  cursor: pointer;
}

.audio-type-options input {
  width: 16px;
  min-height: 16px;
}

label {
  display: grid;
  gap: 6px;
  font-weight: 800;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
}

.checkbox-label input {
  width: 20px;
  min-height: 20px;
}

.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.checkbox-group legend {
  width: 100%;
  font-weight: 900;
}

.checkbox-group label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
}

.checkbox-group input {
  width: 16px;
  min-height: 16px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--ink);
  background: var(--white);
  font: inherit;
}

.audio-list {
  display: grid;
  gap: 16px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

.pagination button {
  min-height: 42px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--green-900);
  font-weight: 800;
  cursor: pointer;
}

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

.pagination span {
  color: var(--muted);
  font-weight: 800;
}

.audio-card {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 20px;
  align-items: center;
  padding: 24px;
}

.audio-card h2 {
  margin: 6px 0 8px;
  font-size: 28px;
}

.audio-meta {
  color: var(--green-700);
  font-weight: 900;
}

.audio-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.audio-empty {
  display: grid;
  place-items: center;
  min-height: 86px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--soft);
  font-weight: 800;
}

.audio-locked {
  display: grid;
  gap: 8px;
  align-content: center;
  min-height: 120px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--gold-100);
}

.audio-locked strong,
.audio-locked span {
  display: block;
}

.audio-locked span {
  color: var(--muted);
}

.audio-empty.large {
  min-height: 140px;
}

.notice {
  margin: 0 0 22px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  font-weight: 700;
}

.notice.success {
  border-color: #95c8a1;
  background: #eaf7ed;
  color: #1e5b2d;
}

.notice.warning {
  border-color: #e3c579;
  background: #fff7df;
  color: #6f4b00;
}

.notice.error {
  border-color: #dc9a9a;
  background: #fff0f0;
  color: #842626;
}

audio {
  width: 100%;
}

.contact-form {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.form-narrow {
  width: min(620px, calc(100% - 32px));
}

.form-wide {
  width: min(920px, calc(100% - 32px));
}

.form-grid,
.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

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

.admin-card {
  display: grid;
  gap: 8px;
  min-height: 150px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  text-decoration: none;
  box-shadow: var(--shadow);
}

.admin-card strong {
  font-size: 22px;
  color: var(--green-900);
}

.admin-card span {
  color: var(--muted);
}

.admin-table-wrap {
  margin-bottom: 28px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.admin-filters {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  align-items: end;
  margin-bottom: 22px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.admin-table th,
.admin-table td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.admin-table th {
  background: var(--soft);
  color: var(--green-900);
}

.table-actions {
  display: flex;
  gap: 12px;
  font-weight: 800;
}

.current-file {
  margin: 0;
  font-weight: 700;
}

.profile-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  align-items: start;
}

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

.profile-card {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 28px;
  text-align: center;
}

.profile-avatar,
.profile-photo {
  width: 86px;
  height: 86px;
  border-radius: 50%;
}

.profile-avatar {
  display: grid;
  place-items: center;
  color: var(--white);
  background: var(--green-800);
  font-size: 36px;
  font-weight: 900;
}

.profile-photo {
  object-fit: cover;
  border: 4px solid var(--soft);
}

.profile-card h2,
.profile-card p {
  margin: 0;
}

.profile-card p {
  color: var(--muted);
  word-break: break-word;
}

.credit-qr {
  width: min(100%, 240px);
  margin: 10px auto;
  border: 8px solid var(--soft);
  border-radius: 8px;
}

.profile-badge {
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--gold-100);
  color: var(--green-900);
  font-weight: 900;
}

.profile-roles {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
}

.profile-roles span {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  color: var(--green-900);
  font-size: 14px;
  font-weight: 800;
}

.photo-form {
  width: 100%;
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.profile-main {
  display: grid;
  gap: 20px;
}

.profile-panel {
  padding: 24px;
}

.profile-panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.profile-panel h2 {
  margin: 4px 0 0;
  font-size: 28px;
  line-height: 1.15;
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.permission {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.permission strong,
.permission span {
  display: block;
}

.permission span {
  color: var(--muted);
}

.permission.yes {
  border-color: #afd4b7;
  background: #eef9f0;
}

.permission.no {
  border-color: #e4c2c2;
  background: #fff3f3;
}

.password-form {
  display: grid;
  gap: 14px;
}

.member-note {
  margin: 18px 0 0;
  padding: 14px 16px;
  border-left: 4px solid var(--gold-500);
  background: var(--soft);
  color: var(--muted);
  font-weight: 700;
}

.member-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
}

.member-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.audio-author {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 10px;
  color: var(--muted);
  font-weight: 800;
}

.audio-author img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}

.author-role {
  display: inline-flex;
  margin-left: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  vertical-align: middle;
}

.author-role-anciao {
  background: #3b145f;
  color: var(--white);
}

.author-role-pastor {
  background: #174832;
  color: var(--white);
}

.author-role-evangelista {
  background: #173f6f;
  color: var(--white);
}

.author-role-missionario {
  background: #285f57;
  color: var(--white);
}

.author-role-other {
  background: #b98322;
  color: #1f1605;
}

.site-footer {
  padding: 46px 0 22px;
  color: var(--white);
  background: var(--green-900);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
  gap: 28px;
}

.footer-grid a {
  display: block;
  margin-top: 8px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.78);
  font-size: 14px;
}

@media (max-width: 820px) {
  body {
    font-size: 16px;
  }

  .header-inner {
    min-height: 68px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 76px;
    display: none;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    box-shadow: var(--shadow);
  }

  .main-nav.is-open {
    display: grid;
  }

  .main-nav a {
    border-radius: 8px;
  }

  .hero,
  .section,
  .page-hero {
    padding: 48px 0;
  }

  .hero-grid,
  .split,
  .content-band,
  .support-strip,
  .donation-grid,
  .contact-grid,
  .audio-card,
  .footer-grid,
  .audio-filters {
    grid-template-columns: 1fr;
  }

  .feature-grid,
  .recent-audio-grid,
  .values-grid,
  .form-grid,
  .admin-grid,
  .admin-filters,
  .profile-layout,
  .permission-grid,
  .member-actions {
    grid-template-columns: 1fr;
  }

  .login-layout {
    grid-template-columns: 1fr;
  }

  .member-action-buttons {
    justify-content: flex-start;
  }

  .hero h1,
  .page-hero h1 {
    font-size: 40px;
  }

  .hero p,
  .page-hero p {
    font-size: 18px;
  }

  .content-band {
    padding: 24px;
  }

  .footer-bottom {
    display: grid;
  }
}
