:root {
  font:
    16px/1.5 system-ui,
    sans-serif;
  color: #1e2820;
  background: #f8f5ed;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background-image:
    linear-gradient(rgb(248 245 237 / 0.84), rgb(248 245 237 / 0.92)),
    url("brand/site-background-v1.png");
  background-attachment: fixed;
  background-size: cover;
}
header {
  min-height: 64px;
  padding: 12px 5vw;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #dfe3d7;
  background: #fffdf8;
}
header a {
  color: #296044;
  text-decoration: none;
  font-weight: 700;
}
main {
  width: min(900px, 90vw);
  margin: auto;
  padding: 56px 0;
}
.eyebrow {
  color: #296044;
  font-weight: 800;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
}
h1 {
  font-size: clamp(2.3rem, 7vw, 4.5rem);
  line-height: 1;
  margin: 0.15em 0 1rem;
}
nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 28px 0;
}
button,
nav a {
  padding: 9px 13px;
  border: 1px solid #296044;
  border-radius: 8px;
  background: #296044;
  color: #efffed;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
nav a {
  background: transparent;
  color: #296044;
}
section {
  margin: 24px 0;
  padding: 22px;
  border: 1px solid #dfe3d7;
  border-radius: 14px;
  background: #fffdf8;
}
body.login-only main > :not(#account) { display: none; }
body.login-only #account { margin-top: 0; }
form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
label {
  display: grid;
  gap: 5px;
  font-weight: 650;
}
input,
textarea,
select {
  width: 100%;
  min-height: 42px;
  padding: 8px;
  border: 1px solid #cbd3c9;
  border-radius: 7px;
  font: inherit;
  background: #fff;
}
textarea {
  min-height: 100px;
  resize: vertical;
}
form button {
  width: max-content;
  align-self: end;
}
.profile-avatar { display:flex; align-items:end; gap:12px; margin:18px 0; }
.profile-avatar .avatar { width:44px; height:44px; border-radius:50%; object-fit:cover; }
.profile-avatar { display:block; width:110px; height:110px; border-radius:50%; object-fit:cover; margin:0 0 16px; }
#profile-admin a { display:inline-block; margin-right:8px; padding:9px 13px; border:1px solid #296044; border-radius:8px; color:#296044; font-weight:700; text-decoration:none; }
#profile-admin button { display:inline-block; margin-right:8px; padding:9px 13px; border:1px solid var(--community-accent, #bf291d); border-radius:8px; color:var(--community-accent, #bf291d); background:transparent; font-weight:700; }
.card {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid #dfe3d7;
}
.card:first-child {
  border-top: 0;
}
.card h3,
.card p {
  margin: 0 0 4px;
}
.card p {
  color: #647067;
}
#list .card p { white-space: pre-wrap; }
#list .card a,
#list .card button {
  display: inline-block;
  margin: 6px 6px 0 0;
  padding: 9px 13px;
  border: 1px solid #296044;
  border-radius: 8px;
  color: #efffed;
  background: #296044;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.vote {
  background: transparent;
  color: #296044;
  white-space: nowrap;
}
.status {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #296044;
}
@media (max-width: 600px) {
  form {
    grid-template-columns: 1fr;
  }
}

body {
  background-color: #f8f5ed;
  background-image: url("brand/site-background-v1.png");
  background-position: center top;
  background-size: max(1280px, 100%) auto;
  background-attachment: fixed;
}

header {
  background-color: #18261c;
  background-image:
    linear-gradient(90deg, rgb(24 38 28 / 0.88), rgb(24 38 28 / 0.18)),
    url("brand/header-banner-v1.png");
  background-position: center right;
  background-size: cover;
  border-bottom: 0;
}

header a,
header strong {
  color: #f8f5ed;
}
header #logout { margin-left: auto; }

/* Edición comunitaria definitiva: el tema claro usa el mismo acento rojo
   de Solicitudes, manteniendo el encabezado oscuro de la marca. */
:root { --community-accent: #bf291d; }
.eyebrow, .status { color: var(--community-accent); }
button, nav a { border-color: var(--community-accent); background: var(--community-accent); color: #fff8f3; }
nav a, .vote { background: transparent; color: var(--community-accent); }
#profile-admin a, #list .card a, #list .card button { border-color: var(--community-accent); }
#list .card a, #list .card button { background: var(--community-accent); color: #fff8f3; }
body.send-only .eyebrow,
body.send-only nav { display: none; }

/* La página de envío comparte la preferencia de tema guardada en el cancionero. */
:root[data-theme="dark"] {
  color-scheme: dark;
  color: #edf5ed;
  background: #101712;
  --community-accent: #c43a2f;
}
:root[data-theme="dark"] body {
  color: #edf5ed;
  background-color: #101712;
  background-image:
    linear-gradient(rgb(16 23 18 / .93), rgb(16 23 18 / .96)),
    url("brand/header-banner-v1.png");
}
:root[data-theme="dark"] section {
  border-color: #314237;
  background: #172019;
}
:root[data-theme="dark"] input,
:root[data-theme="dark"] textarea,
:root[data-theme="dark"] select {
  color: #edf5ed;
  border-color: #405247;
  background: #101712;
}
:root[data-theme="dark"] .card { border-color: #314237; }
:root[data-theme="dark"] .card p { color: #a9b7ac; }
:root[data-theme="dark"] header { border-bottom: 1px solid #314237; }
