.admin-login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(ellipse at top, rgba(196, 163, 90, 0.2), transparent 50%),
    linear-gradient(160deg, #041a0f, #0a4729);
}

.admin-login__card {
  width: min(100% - 2rem, 420px);
  background: rgba(255, 255, 255, 0.96);
  padding: 2rem;
  border-radius: 2px;
  box-shadow: var(--shadow);
}

.admin-login h1 {
  font-size: 2.6rem;
}

.admin-body {
  background: #edf2ec;
  min-height: 100vh;
}

.admin-topbar {
  background: var(--green-950);
  color: white;
  padding: 1rem 0;
}

.admin-topbar__inner {
  width: min(100% - 2rem, 1200px);
  margin-inline: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.admin-topbar__sub {
  margin: 0;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.9rem;
}

.admin-settings {
  max-width: 520px;
}

.admin-settings__card {
  background: white;
  padding: 1.75rem;
  box-shadow: 0 10px 30px rgba(4, 26, 15, 0.06);
}

.admin-settings h1 {
  font-size: 2.4rem;
  margin-bottom: 0.4rem;
}

.admin-settings .form {
  margin-top: 1.25rem;
}

.admin-topbar__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.admin-topbar__actions a {
  color: var(--gold-400);
}

.admin-main {
  width: min(100% - 2rem, 1200px);
  margin: 1.5rem auto 3rem;
  display: grid;
  gap: 1.25rem;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.stat {
  background: white;
  padding: 1rem 1.1rem;
  border-left: 4px solid var(--green-700);
}

.stat span {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat strong {
  font-family: var(--font-display);
  font-size: 2.4rem;
  letter-spacing: 0.04em;
}

.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  user-select: none;
}

.switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.switch__track {
  position: relative;
  flex: none;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: rgba(15, 31, 22, 0.22);
  transition: background 0.18s ease;
}

.switch__track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 3px rgba(4, 26, 15, 0.35);
  transition: transform 0.18s ease;
}

.switch input:checked + .switch__track {
  background: var(--green-700);
}

.switch input:checked + .switch__track::after {
  transform: translateX(20px);
}

.switch input:focus-visible + .switch__track {
  outline: 2px solid var(--gold-600);
  outline-offset: 2px;
}

.switch__label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
}

.recurrence-pill {
  display: inline-block;
  margin-left: 0.45rem;
  padding: 0.15rem 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(0, 122, 51, 0.12);
  color: var(--green-700);
}

.drawer__danger {
  display: grid;
  gap: 0.6rem;
}

.admin-calendar-wrap,
.admin-list {
  background: white;
  padding: 1rem;
  box-shadow: 0 10px 30px rgba(4, 26, 15, 0.06);
}

.admin-list h2 {
  font-size: 1.8rem;
  margin-bottom: 0.75rem;
}

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

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  text-align: left;
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid rgba(15, 31, 22, 0.08);
  vertical-align: top;
}

th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.status {
  display: inline-block;
  padding: 0.2rem 0.45rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.status--pending { background: #f4e7c3; color: #6b5214; }
.status--confirmed { background: #cdeed8; color: #0b5a2a; }
.status--completed { background: #d7e2db; color: #1b4332; }
.status--cancelled { background: #e5e7eb; color: #4b5563; }

.linkish {
  background: none;
  border: none;
  color: var(--green-700);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.drawer[hidden] {
  display: none;
}

.drawer__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 26, 15, 0.45);
  z-index: 50;
}

.drawer__panel {
  position: fixed;
  top: 0;
  right: 0;
  width: min(100%, 420px);
  height: 100%;
  background: white;
  z-index: 60;
  padding: 1.5rem;
  overflow-y: auto;
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.18);
}

.drawer__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  border: none;
  background: transparent;
  font-size: 1.75rem;
  cursor: pointer;
  line-height: 1;
}

.drawer__current {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.drawer__subhead {
  font-size: 1.5rem;
  margin: 0 0 0.25rem;
}

.drawer__form {
  gap: 0.85rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(15, 31, 22, 0.12);
  max-width: none;
}

.drawer__form textarea {
  min-height: 90px;
}

.drawer__hint {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.drawer__danger {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(155, 28, 28, 0.2);
}

.btn--danger {
  width: 100%;
  background: transparent;
  border-color: rgba(155, 28, 28, 0.45);
  color: #9b1c1c;
}

.btn--danger:hover {
  background: #9b1c1c;
  color: #fff;
}

.drawer__dl {
  display: grid;
  gap: 0.85rem;
  margin: 1.25rem 0;
}

.drawer__dl div {
  display: grid;
  gap: 0.15rem;
}

.drawer__dl dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.drawer__dl dd {
  margin: 0;
}

.drawer__actions {
  display: grid;
  gap: 0.6rem;
}

.modal {
  padding: 0;
  border: none;
  background: transparent;
  width: min(92vw, 460px);
}

.modal::backdrop {
  background: rgba(4, 26, 15, 0.55);
}

.modal[open] .modal__panel {
  animation: modal-in 0.18s ease-out;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
}

.modal__panel {
  background: white;
  padding: 1.75rem;
  border-top: 4px solid var(--gold-400);
  box-shadow: 0 24px 60px rgba(4, 26, 15, 0.35);
}

.modal__title {
  font-family: var(--font-display);
  font-size: 1.9rem;
  letter-spacing: 0.03em;
  color: var(--green-900);
  margin: 0 0 0.65rem;
}

.modal__body p {
  margin: 0 0 0.65rem;
  color: var(--muted);
  line-height: 1.55;
}

.modal__body p:last-child {
  margin-bottom: 0;
}

.modal__actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 1.6rem;
}

.modal__actions .btn {
  flex: 1;
  width: auto;
}

.btn--danger-solid {
  background: #9b1c1c;
  border-color: #9b1c1c;
  color: white;
}

.btn--danger-solid:hover {
  background: #7f1616;
}

@media (prefers-reduced-motion: reduce) {
  .modal[open] .modal__panel {
    animation: none;
  }
}

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