:root {
  --green-950: #15372e;
  --green-900: #1d493c;
  --green-700: #2f6a57;
  --green-100: #e2eee7;
  --red-700: #9d382f;
  --red-100: #f8e6e3;
  --amber-100: #fff2cf;
  --amber-800: #76540a;
  --stone-950: #182226;
  --stone-700: #566268;
  --stone-300: #cbd2d0;
  --stone-200: #dfe4e2;
  --stone-100: #f3f5f4;
  --white: #ffffff;
  --radius: 6px;
  --content: 1080px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--stone-100);
  color: var(--stone-950);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

button,
input,
textarea,
select {
  font: inherit;
}

a {
  color: inherit;
}

.admin-header {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 10px max(24px, calc((100vw - var(--content)) / 2));
  background: var(--green-950);
  color: var(--white);
}

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

.admin-brand span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  color: #e7c56f;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.88rem;
  font-weight: 800;
}

.admin-header nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.admin-header nav a,
.admin-header nav button {
  min-height: 40px;
  border: 0;
  border-radius: var(--radius);
  padding: 9px 11px;
  background: transparent;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.86rem;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.admin-header nav a:hover,
.admin-header nav button:hover,
.admin-header nav .is-active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}

.admin-header nav form {
  margin: 0;
}

.admin-main {
  width: min(var(--content), calc(100% - 40px));
  margin: 0 auto;
  padding: 48px 0 72px;
}

.admin-kicker {
  margin: 0 0 4px;
  color: var(--green-700);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

h1,
h2,
p {
  overflow-wrap: anywhere;
}

h1,
h2 {
  margin: 0;
  line-height: 1.2;
}

h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.25rem;
}

h2 {
  font-size: 1.08rem;
}

.admin-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.admin-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 9px 14px;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

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

.admin-button-secondary {
  border-color: var(--stone-300);
  background: var(--white);
  color: var(--stone-950);
}

.admin-button-danger {
  border-color: #e4aaa4;
  background: var(--white);
  color: var(--red-700);
}

.admin-button:hover {
  filter: brightness(0.95);
}

.admin-button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(47, 106, 87, 0.24);
  outline-offset: 2px;
}

.notice {
  margin-bottom: 22px;
  border-left: 4px solid var(--green-700);
  padding: 12px 16px;
  background: var(--green-100);
  font-weight: 700;
}

.notice-error {
  border-left-color: var(--red-700);
  background: var(--red-100);
  color: var(--red-700);
}

.admin-event-list {
  border-top: 1px solid var(--stone-300);
}

.admin-event {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  border-bottom: 1px solid var(--stone-300);
  padding: 20px 0;
}

.admin-event-date {
  display: grid;
  color: var(--stone-700);
  font-size: 0.82rem;
}

.admin-event-date strong {
  color: var(--green-900);
  font-size: 1.5rem;
  line-height: 1.1;
}

.admin-event-content {
  min-width: 0;
}

.admin-event-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-event-content p {
  margin: 5px 0 0;
  color: var(--stone-700);
  font-size: 0.9rem;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.badge {
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.68rem;
  font-weight: 850;
}

.badge-published {
  background: var(--green-100);
  color: var(--green-700);
}

.badge-draft {
  background: var(--stone-200);
  color: var(--stone-700);
}

.badge-album {
  background: var(--amber-100);
  color: var(--amber-800);
}

.admin-event-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-event-actions form {
  margin: 0;
}

.admin-empty {
  border-left: 4px solid var(--green-700);
  padding: 20px;
  background: var(--white);
}

.admin-empty p {
  margin: 6px 0 0;
  color: var(--stone-700);
}

.admin-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  border-top: 1px solid var(--stone-300);
  padding-top: 24px;
}

.form-field {
  display: grid;
  align-content: start;
  gap: 7px;
}

.form-field-wide {
  grid-column: 1 / -1;
}

.form-field label,
.checkbox-field {
  font-size: 0.88rem;
  font-weight: 800;
}

.form-field input,
.form-field textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--stone-300);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: var(--white);
  color: var(--stone-950);
}

.form-field textarea {
  min-height: 160px;
  resize: vertical;
}

.form-field small {
  color: var(--stone-700);
  font-size: 0.78rem;
}

.field-error {
  color: var(--red-700);
  font-size: 0.82rem;
  font-weight: 750;
}

.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.checkbox-field input {
  width: 19px;
  height: 19px;
  margin: 2px 0 0;
  accent-color: var(--green-700);
}

.form-actions {
  display: flex;
  gap: 10px;
  border-top: 1px solid var(--stone-300);
  padding-top: 22px;
}

.auth-panel {
  width: min(100%, 520px);
  margin: 40px auto;
  border: 1px solid var(--stone-200);
  border-radius: var(--radius);
  padding: 32px;
  background: var(--white);
  box-shadow: 0 18px 45px rgba(24, 34, 38, 0.08);
}

.auth-panel > p:not(.admin-kicker) {
  margin: 10px 0 24px;
  color: var(--stone-700);
}

.auth-panel .admin-form,
.password-form {
  grid-template-columns: 1fr;
}

.auth-panel .notice {
  margin: 0 0 20px;
}

.password-form {
  max-width: 620px;
}

@media (max-width: 760px) {
  .admin-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .admin-header nav {
    width: 100%;
    overflow-x: auto;
  }

  .admin-main {
    width: min(var(--content), calc(100% - 28px));
    padding-top: 32px;
  }

  .admin-title-row {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-event {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .admin-event-actions {
    grid-column: 1 / -1;
  }

  .admin-event-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

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

  .form-field-wide {
    grid-column: auto;
  }

  .auth-panel {
    margin: 8px auto;
    padding: 24px;
  }
}

@media (max-width: 430px) {
  .admin-event {
    grid-template-columns: 1fr;
  }

  .admin-event-actions {
    grid-column: auto;
    align-items: stretch;
    flex-direction: column;
  }

  .admin-event-actions .admin-button {
    width: 100%;
  }

  .form-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

