.admin-body { min-height: 100vh; }
.admin-header { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.admin-header-links { display: flex; flex-wrap: wrap; gap: 8px 24px; color: var(--green); font-weight: 650; }
.admin-header-links a, .gate-actions a:not(.button) { text-underline-offset: 4px; }
.admin-main { padding-block: 48px 64px; }
.admin-title h1, .gate h1 { font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.1; letter-spacing: -.055em; }
.admin-title p, .gate p { margin-top: 10px; color: var(--muted); }

.edition-tools { display: flex; align-items: end; gap: 14px 24px; flex-wrap: wrap; margin-top: 26px; }
.edition-tools label { display: grid; gap: 6px; }
.edition-tools select { min-width: 180px; appearance: none; padding-right: 34px; }
.edition-tools label:has(select) { position: relative; }
.edition-tools label:has(select)::after {
  content: "";
  position: absolute;
  right: 15px;
  bottom: 18px;
  width: 8px;
  height: 8px;
  border: solid var(--green);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  pointer-events: none;
}
.add-year { padding: 8px 0; }
.add-year summary, .presenter-extra summary { color: var(--green); cursor: pointer; font-weight: 680; }
.add-year form { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.add-year input { width: 95px; }

.admin-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 42px;
  padding: 8px 15px;
  border: 1px solid var(--green);
  border-radius: 6px;
  background: var(--green);
  color: white;
  font-weight: 700;
}
.admin-button:hover { background: #073f31; }
.admin-button.secondary { background: var(--white); color: var(--green); border-color: #b7cfc1; }
.admin-button.secondary:hover { background: var(--paper); }
.admin-button:disabled, .section-button:disabled, .entry-actions button:disabled { opacity: .55; cursor: progress; }
.admin-status { display: flex; align-items: center; gap: 12px; min-height: 38px; margin-top: 11px; }
.admin-status p { color: var(--green); font-size: .9375rem; }
.admin-status p[data-error] { color: #94251f; }

.admin-nav { display: flex; flex-wrap: wrap; gap: 20px; border-bottom: 1px solid var(--line); margin-bottom: 23px; }
.section-button { border: 0; border-bottom: 3px solid transparent; background: transparent; padding: 10px 2px; color: var(--muted); font-weight: 680; }
.section-button[aria-pressed="true"] { border-color: var(--green); color: var(--green); }
.admin-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: clamp(21px, 5vw, 58px); align-items: start; }
.editor {
  display: grid;
  gap: 14px;
  padding: 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.editor h2, .entry-area h2 { font-size: 1.3rem; line-height: 1.25; letter-spacing: -.02em; }
.entry-area h2 { margin-bottom: 14px; }
.editor label, .edition-tools label { font-size: .9375rem; font-weight: 650; }
.editor input:not([type="hidden"], [type="checkbox"]), .editor textarea, .edition-tools input, .edition-tools select {
  font: inherit;
  width: 100%;
  padding: 8px 10px;
  background: var(--white);
  color: var(--ink);
  border: 1px solid #b7cfc1;
  border-radius: 6px;
}
.edition-tools .add-year input { width: 95px; }
.edition-tools select { padding-right: 34px; }
.editor label input:not([type="hidden"], [type="checkbox"]), .editor textarea { display: block; margin-top: 4px; font-weight: 450; }
.editor input:focus-visible, .editor textarea:focus-visible, .edition-tools input:focus-visible { outline: 2px solid #087d99; outline-offset: 2px; }
.editor textarea { resize: vertical; }
.optional, .field-hint { font-size: .875rem; color: var(--muted); font-weight: 450; }
.field-hint { display: block; margin-top: 4px; }
.presenter-extra { border-top: 1px solid var(--line); padding-top: 9px; }
.presenter-extra label { display: block; margin-top: 10px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.attached-pdf { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 16px; color: var(--green); font-size: .9375rem; }
.attached-pdf label { display: inline-flex; align-items: center; gap: 5px; }

.entry-list { display: grid; gap: 10px; }
.entry-list > p { padding: 15px; border: 1px solid var(--line); border-radius: 8px; background: #ecf4ef; color: var(--muted); }
.admin-entry { display: flex; gap: 15px; overflow: hidden; background: white; border: 1px solid var(--line); border-radius: 8px; }
.admin-entry img { width: 105px; flex: 0 0 105px; aspect-ratio: 1; align-self: stretch; object-fit: cover; background: #e8f1ec; }
.entry-copy { padding: 12px 14px 11px 0; min-width: 0; overflow-wrap: anywhere; }
.admin-entry img[hidden] + .entry-copy { padding-left: 14px; }
.entry-copy h3 { font-size: 1rem; line-height: 1.35; }
.entry-meta { color: var(--muted); font-size: .875rem; margin-top: 3px; }
.entry-actions { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 7px; }
.entry-actions button {
  border: 0;
  background: transparent;
  color: var(--green);
  font-weight: 680;
  padding: 3px 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.entry-actions .remove-entry { color: #94251f; }

.gate {
  width: min(560px, calc(100% - 32px));
  margin: max(5vh, 24px) auto 24px;
  padding: clamp(23px, 6vw, 48px);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.gate img { margin-bottom: 19px; }
.gate-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 19px; margin-top: 22px; }

@media (max-width: 715px) {
  .admin-main { padding-top: 30px; }
  .admin-panel { grid-template-columns: minmax(0, 1fr); }
  .admin-header-links, .admin-button { font-size: .9rem; }
  .editor { padding: 16px; }
}
