:root { font: 16px system-ui, sans-serif; color: #19291f; background: #f1f5ef; }
body { margin: 0; }
header { background: #14291f; padding: 1rem max(1rem, calc((100vw - 48rem) / 2)); }
header a { color: #fff; font-weight: 700; text-decoration: none; }
main { width: min(48rem, calc(100% - 2rem)); margin: 2rem auto; }
section { background: #fff; padding: 1.25rem; margin: 1rem 0; border-radius: .75rem; border: 1px solid #c7d6c8; }
h2 { margin-top: 0; font-size: 1.2rem; }
a { color: #19533b; }
form, label { display: grid; gap: .5rem; }
form { gap: .85rem; justify-items: start; }
label { width: min(100%, 30rem); font-weight: 600; }
input, textarea, button { font: inherit; padding: .65rem; border: 1px solid #8a9f8d; border-radius: .4rem; min-width: 0; box-sizing: border-box; }
textarea { min-height: 7rem; }
button { background: #22543d; color: #fff; cursor: pointer; }
form:has(button[name="status"]) { display: flex; flex-wrap: wrap; }
li { margin-bottom: .65rem; }
li a { margin-left: .5rem; }
summary { cursor: pointer; margin: .8rem 0; }
.notice { white-space: pre-wrap; overflow-wrap: anywhere; }

.portal-dashboard {
  --forest: #163b2d;
  --line: #dce8de;
  --muted: #52685b;
  display: grid;
  grid-template-columns: 245px minmax(0, 1fr);
  min-height: 100vh;
  background: #f5f8f4;
  color: #19362a;
}
.portal-dashboard *, .portal-dashboard *::before { box-sizing: border-box; }
.portal-dashboard :focus-visible { outline: 3px solid #43885b; outline-offset: 3px; }
.dashboard-skip { position: absolute; z-index: 1; top: .5rem; left: .5rem; padding: .7rem; background: #fff; }
.dashboard-skip:not(:focus) { clip-path: inset(50%); }
.dashboard-sidebar {
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  min-height: 100vh;
  max-height: 100vh;
  overflow: auto;
  padding: 30px 17px 23px;
  background: var(--forest);
  color: #e3f0e7;
}
.dashboard-brand { display: grid; place-items: center; background: #fff; border-radius: 12px; margin: 0 4px 28px; padding: 6px 9px; }
.dashboard-brand img { width: 100%; max-width: 170px; }
.dashboard-sidebar nav { display: grid; gap: 5px; }
.dashboard-sidebar nav a, .dashboard-account button {
  display: block;
  padding: 12px;
  border-radius: 9px;
  color: #e3f0e7;
  font-size: .875rem;
  font-weight: 650;
  text-decoration: none;
}
.dashboard-sidebar nav a:hover, .dashboard-sidebar nav a[aria-current="page"], .dashboard-account button:hover { background: #295642; }
.dashboard-sidebar nav a[aria-current="page"] { box-shadow: inset 3px 0 #c8e7aa; color: #fff; }
.dashboard-account { margin-top: auto; padding-top: 14px; }
.dashboard-account button { border: 0; background: transparent; }
.portal-dashboard main { width: 100%; min-width: 0; margin: 0; }
.dashboard-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 65px;
  padding: 0 34px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: #24533d;
  font-size: .875rem;
  font-weight: 650;
}
.dashboard-avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #e5f1e6; }
.dashboard-content { max-width: 1500px; margin: auto; padding: 33px 34px 48px; }
.dashboard-banner {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 230px;
  padding: clamp(22px, 4vw, 46px);
  margin-bottom: 24px;
  border-radius: 20px;
  background: #16382c linear-gradient(90deg, #0a271fed, #0a271f9e 68%, #0a271f70);
  background-image: linear-gradient(90deg, #0a271fed, #0a271f9e 68%, #0a271f70), url("/granja-viana.webp");
  background-position: center;
  background-size: cover;
  color: #fff;
  overflow-wrap: anywhere;
}
.dashboard-banner h1 { margin: 0; font-size: clamp(30px, 4.5vw, 53px); line-height: 1.1; letter-spacing: -.045em; }
.dashboard-banner p { margin: 9px 0 0; color: #edf8e7; }
.dashboard-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 13px; }
.dashboard-card, .dashboard-panel { border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: 0 4px 14px #193e2d08; }
.dashboard-card { display: block; padding: 17px; color: #24533d; text-decoration: none; font-weight: 650; }
.dashboard-card:hover { background: #eef6ee; border-color: #8bb699; }
.dashboard-card strong { display: block; margin-top: 6px; font-size: 1.65rem; }
.dashboard-panel { margin: 16px 0 0; padding: 19px; }
.dashboard-panel h2 { margin: 0; font-size: 1.125rem; }
.dashboard-panel ul { list-style: none; padding: 0; margin: 12px 0 0; }
.dashboard-panel li { margin: 0; border-top: 1px solid var(--line); padding: 12px 0; overflow-wrap: anywhere; }
.dashboard-panel li:last-child { padding-bottom: 0; }
.dashboard-item { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.dashboard-item small { display: block; margin-top: 4px; color: var(--muted); }
.dashboard-item a { margin: 0; }
.dashboard-download { border: 1px solid var(--line); border-radius: 9px; padding: 8px 12px; font-size: .875rem; font-weight: 650; text-decoration: none; }
.dashboard-download:hover { background: #e5f1e6; }
.dashboard-empty { margin: 14px 0 0; color: var(--muted); font-size: .875rem; }
.dashboard-panel .notice { line-height: 1.55; margin: 10px 0 0; }

@media (max-width: 1000px) {
  .portal-dashboard { grid-template-columns: 205px minmax(0, 1fr); }
  .dashboard-top, .dashboard-content { padding-inline: 22px; }
}
@media (max-width: 690px) {
  .portal-dashboard { display: block; }
  .dashboard-sidebar { position: static; min-height: 0; max-height: none; padding: 12px; }
  .dashboard-brand { width: 146px; margin: 0 0 8px; }
  .dashboard-sidebar nav { display: flex; flex-wrap: wrap; }
  .dashboard-sidebar nav a, .dashboard-account button { padding: 8px 10px; }
  .dashboard-account { padding-top: 4px; }
  .dashboard-top { min-height: 48px; padding-inline: 12px; }
  .dashboard-content { padding: 16px 12px 28px; }
  .dashboard-banner { min-height: 170px; }
  .dashboard-panel { padding: 14px; }
}

.admin-account { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 14px; overflow-wrap: anywhere; }
.admin-account h3 { margin: 0; font-size: 1rem; }
.admin-account-note { color: var(--muted); font-size: .875rem; }
.admin-status {
  padding: 5px 9px;
  border-radius: 20px;
  background: #fff0d1;
  color: #69470f;
  font-size: .75rem;
  font-weight: 700;
}
.admin-status[data-status="approved"] { background: #e4f1e4; color: #24603c; }
.admin-status[data-status="blocked"] { background: #f8e7e2; color: #8c3426; }
.admin-actions { margin: 12px 0 0; gap: 8px; }
.admin-account button { font-size: .875rem; font-weight: 650; border-radius: 9px; border-color: #22543d; }
.admin-account button[value="blocked"] { border-color: #cfb7ae; background: #fff; color: #843c2b; }
.admin-account button[value="blocked"]:hover { background: #f8e7e2; }
.admin-publications { margin-top: 12px; border: 1px solid var(--line); border-radius: 9px; padding: 0 12px; }
.admin-publications > summary { font-weight: 650; }
.admin-publications > details { border-top: 1px solid var(--line); font-size: .9rem; }
.admin-publications form { padding-bottom: 14px; }
.admin-publications input, .admin-publications textarea { width: 100%; }

.dashboard-panel .photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(215px, 100%), 1fr));
  gap: 14px;
}
.dashboard-panel .photo-gallery li {
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.photo-gallery a { display: block; margin: 0; text-decoration: none; }
.photo-gallery a:focus-visible { outline-offset: -4px; }
.photo-gallery a:hover strong { text-decoration: underline; }
.photo-gallery img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #e5f1e6; }
.photo-gallery strong { display: block; padding: 11px; }

.access-layout { display: grid; grid-template-columns: minmax(290px, 1fr) minmax(360px, 1fr); min-height: 100vh; }
.access-layout * { box-sizing: border-box; }
.access-cover {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding: clamp(24px, 6vw, 84px);
  color: #fff;
  background: #163b2d linear-gradient(0deg, #102c23f5, #102c2370);
  background-image: linear-gradient(0deg, #102c23f5, #102c2370), url("/granja-viana.webp");
  background-size: cover;
  background-position: center;
}
.access-cover img { width: min(160px, 100%); background: #fff; border-radius: 12px; padding: 7px 12px; }
.access-title { font-size: clamp(28px, 4.5vw, 56px); line-height: 1.1; font-weight: 750; letter-spacing: -.04em; margin: 24px 0 0; }
.access-cover p:last-child { margin: 10px 0 0; color: #edf8e7; }
.access-main { display: grid; place-items: center; width: 100%; margin: 0; padding: clamp(16px, 4vw, 48px); }
.access-card { width: min(100%, 440px); padding: clamp(22px, 4vw, 36px); border: 1px solid #dce8de; border-radius: 18px; background: #fff; box-shadow: 0 12px 32px #19362a12; }
.access-card h1 { margin: 18px 0; line-height: 1.15; letter-spacing: -.03em; }
.access-site, .access-links { font-size: .875rem; }
.access-links { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.access-card form { justify-items: stretch; }
.access-card label { width: 100%; }
.access-card p, .access-card small { color: #52685b; line-height: 1.5; }
.access-card form p { margin: 0; font-size: .875rem; }
.access-card button { font-weight: 650; border-color: #22543d; }
.access-card button:hover { background: #163b2d; }
.access-card .access-message { padding: 10px 12px; border-radius: 8px; background: #eaf3ea; color: #19362a; }
.reset-link { width: 100%; }
@media (max-width: 740px) {
  .access-layout { display: block; }
  .access-cover img { width: 120px; }
  .access-title { margin-top: 14px; }
  .access-main { padding-top: 22px; }
}
