:root {
  --green: #166534;
  --green-light: #15803D;
  --gray-900: #1F2937;
  --gray-700: #374151;
  --gray-600: #4B5563;
  --gray-100: #F9FAFB;
  --gray-50: #FFFFFF;
  --line: #E5E7EB;
  --line-dark: #D1D5DB;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--gray-900);
  background: var(--gray-100);
  font-family: Inter, Arial, Helvetica, sans-serif;
  font-size: 15px;
}

a {
  color: inherit;
}

.official-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 10px clamp(18px, 5vw, 64px);
  border-bottom: 1px solid var(--line);
  background: #fff;
}

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

.official-brand > span {
  display: grid;
  width: 48px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--green);
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}

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

.official-brand small {
  color: var(--gray-600);
  font-size: 12px;
}

.official-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 18px;
  color: var(--gray-700);
  font-size: 13px;
  font-weight: 700;
}

.official-nav a {
  text-decoration: none;
}

.official-nav a:hover {
  color: var(--green);
}

.official-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 24px;
  padding: 32px clamp(18px, 5vw, 64px);
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.entity-panel,
.quick-access,
.official-section,
.contact-block {
  border: 1px solid var(--line);
  background: #fff;
}

.entity-panel,
.quick-access {
  padding: 24px;
}

.section-label {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.entity-panel h1 {
  max-width: 780px;
  margin: 0 0 18px;
  font-size: clamp(30px, 4.5vw, 52px);
  line-height: 1.05;
  letter-spacing: 0;
}

.entity-panel p {
  max-width: 820px;
  margin: 18px 0 0;
  color: var(--gray-700);
  line-height: 1.65;
}

.entity-data,
.contact-block dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  border: 1px solid var(--line);
  background: var(--line);
}

.entity-data div,
.contact-block dl div {
  padding: 14px;
  background: #fff;
}

dt {
  margin: 0 0 4px;
  color: var(--gray-600);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

dd {
  margin: 0;
  color: var(--gray-900);
  font-weight: 650;
  line-height: 1.45;
}

.quick-access h2 {
  margin: 0 0 14px;
  font-size: 20px;
}

.quick-access {
  display: grid;
  align-content: start;
  gap: 10px;
}

.quick-access a {
  display: grid;
  grid-template-columns: 34px 1fr;
  column-gap: 10px;
  row-gap: 2px;
  min-height: 66px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  text-decoration: none;
}

.quick-access a:hover,
.document-list a:hover,
.table-action:hover,
.official-nav a:hover {
  background: #F3F4F6;
}

.quick-access span {
  grid-row: span 2;
  color: var(--green);
  font-size: 19px;
}

.quick-access strong {
  color: var(--gray-900);
}

.quick-access small {
  color: var(--gray-600);
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  padding: 0 clamp(18px, 5vw, 64px) 28px;
  background: var(--line);
}

.status-strip article {
  min-height: 92px;
  padding: 18px;
  background: #fff;
}

.status-strip strong,
.status-strip span {
  display: block;
}

.status-strip strong {
  color: var(--green);
  font-size: 22px;
}

.status-strip span {
  margin-top: 5px;
  color: var(--gray-600);
}

.official-section {
  margin: 28px clamp(18px, 5vw, 64px);
  padding: 24px;
}

.official-section.white {
  background: #fff;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.15;
}

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

.official-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  background: #fff;
}

.official-table th,
.official-table td {
  padding: 13px 12px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.official-table th {
  color: var(--gray-700);
  background: #F3F4F6;
  font-size: 12px;
  text-transform: uppercase;
}

.status,
.category {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 0 9px;
  border: 1px solid var(--line-dark);
  background: #fff;
  color: var(--gray-700);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-open {
  border-color: #86efac;
  color: #14532d;
  background: #f0fdf4;
}

.status-closed {
  border-color: #cbd5e1;
  color: #334155;
  background: #f8fafc;
}

.table-action {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--green);
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.info-grid,
.notice-grid,
.partner-list,
.legal-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

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

.info-grid article,
.notice-grid article,
.partner-list article,
.legal-columns article {
  padding: 18px;
  border: 1px solid var(--line);
  background: #fff;
}

.doc-icon {
  color: var(--green);
  font-size: 22px;
}

.info-grid h3,
.notice-grid h3,
.partner-list h3,
.legal-columns h3 {
  margin: 10px 0 8px;
  font-size: 20px;
  line-height: 1.2;
}

.info-grid p,
.notice-grid p,
.partner-list p,
.legal-columns li {
  color: var(--gray-700);
  line-height: 1.6;
}

.legal-columns ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
}

.document-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

.document-list a {
  display: grid;
  gap: 6px;
  min-height: 120px;
  padding: 16px;
  background: #fff;
  text-decoration: none;
}

.document-list span {
  width: max-content;
  padding: 3px 6px;
  border: 1px solid var(--green);
  color: var(--green);
  font-size: 11px;
  font-weight: 900;
}

.document-list strong {
  font-size: 18px;
}

.document-list small,
.notice-grid time {
  color: var(--gray-600);
}

.category {
  width: max-content;
  border-color: #bbf7d0;
  color: #14532d;
  background: #f0fdf4;
}

.contact-block {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(320px, 1fr);
  gap: 24px;
  margin: 28px clamp(18px, 5vw, 64px);
  padding: 24px;
}

.contact-block h2 {
  margin: 0 0 8px;
  font-size: clamp(24px, 3vw, 34px);
}

.contact-block p {
  color: var(--gray-700);
  line-height: 1.6;
}

.official-footer {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  gap: 24px;
  padding: 28px clamp(18px, 5vw, 64px);
  color: #D1D5DB;
  background: var(--gray-900);
}

.official-footer strong,
.official-footer span,
.official-footer a {
  display: block;
}

.official-footer strong {
  color: #fff;
}

.official-footer a {
  margin-bottom: 7px;
  text-decoration: none;
}

.official-footer a:hover {
  color: #fff;
}

.installer-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--gray-100);
}

.installer-card,
.job-page,
.admin-card {
  border: 1px solid var(--line);
  background: #fff;
}

.installer-card,
.job-page {
  width: min(920px, 100%);
  padding: 28px;
}

.job-page {
  margin: 40px auto;
}

.form-stack,
.admin-card {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--gray-600);
  font-size: 13px;
  font-weight: 800;
}

input,
textarea,
select {
  width: 100%;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid var(--line-dark);
  color: var(--gray-900);
  background: #fff;
  font: inherit;
}

textarea {
  resize: vertical;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
}

.check input {
  width: auto;
  min-height: auto;
}

.button,
button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid var(--green);
  color: #fff;
  background: var(--green);
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

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

.alert {
  padding: 12px 14px;
  border: 1px solid #bbf7d0;
  color: #14532d;
  background: #f0fdf4;
  font-weight: 800;
}

.danger {
  color: #8c1d1d;
  background: #ffe2e2;
}

.admin-body {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
  background: var(--gray-100);
}

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
  color: #eaf4ee;
  background: var(--gray-900);
}

.admin-sidebar a {
  padding: 10px 11px;
  color: rgba(234, 244, 238, .78);
  text-decoration: none;
  font-weight: 800;
}

.admin-sidebar a.active,
.admin-sidebar a:hover {
  color: #fff;
  background: var(--green);
}

.admin-main {
  padding: 28px;
}

.admin-top,
.filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.admin-card {
  margin-bottom: 20px;
  padding: 20px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.metric-grid article {
  padding: 20px;
  border: 1px solid var(--line);
  background: #fff;
}

.metric-grid strong {
  display: block;
  font-size: 38px;
}

code {
  padding: 2px 6px;
  background: #eef2ec;
}

@media (max-width: 1080px) {
  .official-topbar,
  .admin-top,
  .filter-row {
    align-items: stretch;
    flex-direction: column;
  }

  .official-nav {
    justify-content: flex-start;
  }

  .official-hero,
  .contact-block {
    grid-template-columns: 1fr;
  }

  .status-strip,
  .info-grid,
  .notice-grid,
  .partner-list,
  .document-list,
  .metric-grid,
  .official-footer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .entity-data,
  .contact-block dl,
  .status-strip,
  .info-grid,
  .notice-grid,
  .partner-list,
  .document-list,
  .legal-columns,
  .metric-grid,
  .official-footer {
    grid-template-columns: 1fr;
  }

  .official-section,
  .contact-block {
    margin-left: 14px;
    margin-right: 14px;
    padding: 18px;
  }

  .official-hero {
    padding-left: 14px;
    padding-right: 14px;
  }

  .status-strip {
    padding-left: 14px;
    padding-right: 14px;
  }

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

  .admin-sidebar {
    position: static;
    height: auto;
  }
}

/* GSolucoes polish: admin follows the Instituto Horizonte Social visual family */
:root {
  --panel-deep: #003f3b;
  --panel-green: #008b64;
  --panel-mint: #e9f6ef;
  --panel-paper: #f7f7f4;
  --panel-line: #dfe6e2;
  --panel-ink: #053c39;
}

.admin-body {
  background: var(--panel-paper);
  font-family: "Plus Jakarta Sans", Inter, Arial, Helvetica, sans-serif;
}

.admin-sidebar {
  background: linear-gradient(180deg, var(--panel-deep), #002c28);
  box-shadow: 8px 0 30px rgba(0, 45, 40, .1);
}

.admin-sidebar strong {
  display: block;
  padding: 0 0 18px;
  color: #fff;
  font-size: 18px;
  line-height: 1.2;
}

.admin-sidebar a {
  border-radius: 10px;
  color: rgba(255, 255, 255, .78);
}

.admin-sidebar a.active,
.admin-sidebar a:hover {
  color: var(--panel-deep);
  background: var(--panel-mint);
}

.admin-main {
  padding: clamp(22px, 4vw, 38px);
}

.admin-top {
  min-height: 76px;
  padding: 20px 24px;
  border: 1px solid var(--panel-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(0, 45, 40, .06);
}

.admin-top h1 {
  margin: 0;
  color: var(--panel-ink);
  font-size: clamp(26px, 3vw, 38px);
}

.metric-grid article,
.admin-card {
  border: 1px solid var(--panel-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(0, 45, 40, .06);
}

.metric-grid article {
  min-height: 140px;
}

.metric-grid strong {
  color: var(--panel-green);
}

.admin-card h2 {
  color: var(--panel-ink);
}

.admin-card label {
  color: #596a65;
}

.admin-card input,
.admin-card textarea,
.admin-card select,
.installer-card input,
.installer-card textarea,
.installer-card select {
  border-color: var(--panel-line);
  border-radius: 10px;
}

.admin-card input:focus,
.admin-card textarea:focus,
.admin-card select:focus,
.installer-card input:focus,
.installer-card textarea:focus,
.installer-card select:focus {
  outline: 3px solid rgba(0, 139, 100, .14);
  border-color: var(--panel-green);
}

.admin-body .button,
.installer-page .button,
.admin-body button,
.installer-page button {
  border-radius: 10px;
  background: var(--panel-green);
  box-shadow: none;
}

.admin-body .button.ghost,
.admin-body button.ghost {
  border: 1px solid var(--panel-line);
  color: var(--panel-deep);
  background: #fff;
}

.admin-body .button.secondary {
  border-color: rgba(0, 139, 100, .3);
  color: var(--panel-deep);
  background: #fff;
}

.installer-page {
  background:
    linear-gradient(90deg, rgba(0, 35, 32, .96), rgba(0, 63, 59, .78)),
    url("https://images.unsplash.com/photo-1529156069898-49953e39b3ac?auto=format&fit=crop&w=1600&q=84") center / cover;
}

.installer-card {
  border-radius: 20px;
  box-shadow: 0 24px 70px rgba(0, 35, 32, .22);
}

.installer-card h1 {
  color: var(--panel-ink);
}

/* ONG3 admin visual based on the approved Instituto Horizonte mockup */
.admin-body {
  grid-template-columns: 256px minmax(0, 1fr);
  background: #f8fafc;
  color: #1e293b;
  font-family: "Plus Jakarta Sans", Inter, Arial, Helvetica, sans-serif;
}

.admin-sidebar {
  gap: 4px;
  padding: 0 16px 18px;
  color: #cbd5e1;
  background: #0f172a;
  box-shadow: none;
}

.admin-brand {
  display: grid;
  grid-template-columns: 36px 1fr;
  column-gap: 12px;
  row-gap: 0;
  align-items: center;
  min-height: 80px;
  margin: 0 -16px 14px;
  padding: 0 24px;
  border-bottom: 1px solid rgba(148, 163, 184, .16);
}

.admin-brand span {
  grid-row: span 2;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: #059669;
  font-weight: 800;
}

.admin-brand strong {
  padding: 0;
  color: #fff;
  font-size: 14px;
}

.admin-brand small {
  color: #34d399;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.admin-sidebar > strong {
  display: none;
}

.admin-sidebar a {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 700;
}

.admin-sidebar a svg {
  width: 17px;
  height: 17px;
}

.admin-sidebar a.active,
.admin-sidebar a:hover {
  color: #fff;
  background: rgba(30, 41, 59, .92);
}

.admin-sidebar a.active svg {
  color: #34d399;
}

.admin-main {
  padding: 0;
}

.admin-top {
  min-height: 80px;
  margin: 0;
  padding: 18px 32px;
  border: 0;
  border-bottom: 1px solid #e2e8f0;
  border-radius: 0;
  box-shadow: none;
}

.admin-top h1 {
  color: #0f172a;
  font-size: 22px;
  font-weight: 800;
}

.admin-top span {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.metric-grid,
.admin-main > .admin-card,
.admin-main > .filter-row,
.admin-main > .alert {
  margin-left: 32px;
  margin-right: 32px;
}

.metric-grid {
  gap: 24px;
  padding-top: 32px;
}

.metric-grid article,
.admin-card {
  border: 1px solid rgba(226, 232, 240, .9);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.metric-grid article {
  min-height: 128px;
  padding: 24px;
}

.metric-grid strong {
  color: #0f172a;
  font-size: 30px;
}

.metric-grid span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.admin-card {
  padding: 24px;
}

.admin-card h2 {
  margin: 0;
  color: #0f172a;
  font-size: 18px;
  font-weight: 800;
}

.admin-card label {
  color: #64748b;
  font-size: 12px;
}

.admin-card input,
.admin-card textarea,
.admin-card select,
.installer-card input,
.installer-card textarea,
.installer-card select {
  border-color: #e2e8f0;
  border-radius: 12px;
  color: #0f172a;
  background: #fff;
}

.admin-card input:focus,
.admin-card textarea:focus,
.admin-card select:focus {
  outline: 3px solid rgba(16, 185, 129, .15);
  border-color: #059669;
}

.admin-body .button,
.admin-body button,
.installer-page .button {
  border-color: #047857;
  border-radius: 12px;
  background: #047857;
}

.admin-body .button.secondary,
.admin-body .button.ghost,
.admin-body button.ghost {
  border-color: #e2e8f0;
  color: #0f172a;
  background: #fff;
}

.settings-hero {
  border-color: #e2e8f0;
  background: linear-gradient(135deg, #f0fdf4, #fff);
}

.brand-preview,
.update-box,
.settings-note {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.installer-page {
  background:
    linear-gradient(120deg, rgba(15, 23, 42, .95), rgba(6, 78, 59, .78)),
    url("https://images.unsplash.com/photo-1577896851231-70ef18881754?auto=format&fit=crop&w=1600&q=84") center / cover;
}

.settings-card {
  gap: 18px;
}

.settings-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 22px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--panel-line);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(0, 63, 59, .08), rgba(0, 139, 100, .08)),
    #fff;
}

.settings-hero h2 {
  margin: 0 0 8px;
  color: var(--panel-ink);
  font-size: clamp(24px, 3vw, 34px);
}

.settings-hero p,
.settings-note {
  margin: 0;
  color: #60736d;
  line-height: 1.65;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.brand-preview {
  min-height: 128px;
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 16px;
  border: 1px solid rgba(0, 63, 59, .14);
  border-radius: 16px;
  color: var(--panel-deep);
  background: rgba(255, 255, 255, .74);
  text-align: center;
}

.brand-preview img {
  max-width: 170px;
  max-height: 86px;
  object-fit: contain;
}

.brand-preview strong {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--panel-green);
  font-size: 22px;
}

.brand-preview span {
  color: #60736d;
  font-size: 13px;
  font-weight: 800;
}

.settings-card input[type="color"] {
  height: 48px;
  padding: 4px;
}

.settings-note {
  padding: 14px;
  border: 1px solid var(--panel-line);
  border-radius: 12px;
  background: #f8fbf9;
}

.update-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border: 1px solid rgba(0, 139, 100, .18);
  border-radius: 14px;
  background: #f5fbf8;
}

.update-box h3 {
  margin: 0 0 6px;
  color: var(--panel-ink);
}

.update-box p {
  margin: 0;
  color: #60736d;
  line-height: 1.55;
}

@media (max-width: 900px) {
  .settings-hero,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .update-box {
    align-items: stretch;
    flex-direction: column;
  }
}
