.chsen-admin {
  --chsen-ink: #17204b;
  --chsen-blue: #11194b;
  --chsen-gold: #b39a1c;
  --chsen-soft: #f7f4ea;
  --chsen-border: #ded8c5;
  --chsen-green: #2f8755;
  --chsen-red: #b4483e;
  --chsen-teal: #24798a;
  color: var(--chsen-ink);
}

.chsen-hero {
  margin: 18px 0 18px;
  padding: 28px 30px;
  border-radius: 8px;
  background: var(--chsen-blue);
  color: #fff;
  box-shadow: 0 18px 48px rgba(17, 25, 75, 0.18);
}

.chsen-hero p {
  margin: 0 0 8px;
  color: #dfcb56;
  font-weight: 900;
  text-transform: uppercase;
}

.chsen-hero h1 {
  margin: 0;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.1;
}

.chsen-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 20px;
}

.chsen-tabs a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--chsen-border);
  border-radius: 8px;
  background: #fff;
  color: var(--chsen-blue);
  font-weight: 800;
  text-decoration: none;
}

.chsen-tabs a:hover {
  border-color: var(--chsen-gold);
  color: var(--chsen-blue);
}

.chsen-panel {
  margin: 18px 0;
  padding: 22px;
  border: 1px solid var(--chsen-border);
  border-radius: 8px;
  background: #fffdf8;
  box-shadow: 0 16px 36px rgba(17, 25, 75, 0.08);
}

.chsen-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 16px;
}

.chsen-toolbar h2,
.chsen-panel h2 {
  margin: 0 0 8px;
  color: var(--chsen-blue);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
}

.chsen-toolbar p,
.chsen-panel p {
  margin: 4px 0;
}

.chsen-card-grid,
.chsen-rule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
}

.chsen-stat,
.chsen-rule-grid article {
  min-height: 92px;
  padding: 18px;
  border: 1px solid var(--chsen-border);
  border-left: 6px solid var(--chsen-gold);
  border-radius: 8px;
  background: #fff;
}

.chsen-stat strong {
  display: block;
  color: var(--chsen-blue);
  font-size: 32px;
  line-height: 1;
}

.chsen-stat span,
.chsen-rule-grid span {
  display: block;
  margin-top: 8px;
  color: #596070;
  font-weight: 700;
}

.chsen-stat--green { border-left-color: var(--chsen-green); }
.chsen-stat--red { border-left-color: var(--chsen-red); }
.chsen-stat--blue { border-left-color: var(--chsen-teal); }
.chsen-stat--amber { border-left-color: var(--chsen-gold); }

.chsen-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--chsen-border);
  border-radius: 8px;
  background: #fff;
}

.chsen-calendar__weekday {
  padding: 12px 10px;
  background: var(--chsen-soft);
  color: var(--chsen-blue);
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.chsen-calendar__day {
  min-height: 126px;
  padding: 10px;
  border-top: 1px solid var(--chsen-border);
  border-right: 1px solid var(--chsen-border);
  background: #fff;
}

.chsen-calendar__day:nth-child(7n) {
  border-right: 0;
}

.chsen-calendar__day.is-muted {
  background: #f8f8f4;
  color: #8d93a0;
}

.chsen-calendar__date {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(180, 158, 60, 0.26);
  border-radius: 999px;
  color: var(--chsen-blue);
  font-size: 13px;
}

.chsen-event-chip {
  display: grid;
  gap: 3px;
  margin: 8px 0 0;
  padding: 8px;
  border-radius: 6px;
  background: #eef6f2;
  color: var(--chsen-blue);
  text-decoration: none;
}

.chsen-event-chip span {
  overflow: hidden;
  font-size: 12px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chsen-event-chip em {
  font-size: 11px;
  font-style: normal;
  opacity: 0.75;
}

.chsen-event-chip--cancelled { background: #fff0ee; }
.chsen-event-chip--postponed,
.chsen-event-chip--provisional { background: #fff8dc; }
.chsen-event-chip--enquiry { background: #edf4ff; }

.chsen-public-calendar-wrap {
  display: grid;
  gap: 16px;
  margin: 24px 0;
}

.chsen-public-calendar-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(180, 158, 60, 0.28);
}

.chsen-public-calendar-head h3 {
  margin: 0;
  color: var(--chsen-blue);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(1.55rem, 2vw, 2rem);
}

.chsen-calendar--public {
  border-color: rgba(180, 158, 60, 0.45);
  box-shadow: 0 22px 48px rgba(23, 32, 75, 0.08);
}

.chsen-calendar--public .chsen-calendar__weekday {
  background: var(--chsen-blue);
  color: #fff;
}

.chsen-calendar--public .chsen-calendar__day {
  background: linear-gradient(180deg, #fff 0%, #fbfaf4 100%);
}

.chsen-calendar--public .chsen-event-chip {
  border: 1px solid rgba(23, 32, 75, 0.08);
  background: #fff;
  box-shadow: 0 8px 20px rgba(23, 32, 75, 0.08);
}

.chsen-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}

.chsen-list {
  display: grid;
  gap: 12px;
}

.chsen-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--chsen-border);
  border-radius: 8px;
  background: #fff;
}

.chsen-row h3 {
  margin: 8px 0;
  color: var(--chsen-blue);
  font-size: 20px;
}

.chsen-row__actions {
  display: flex;
  gap: 8px;
}

.chsen-pill {
  display: inline-flex;
  align-items: center;
  margin: 0 6px 6px 0;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--chsen-blue);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.chsen-pill--confirmed,
.chsen-pill--public,
.chsen-pill--published,
.chsen-pill--done { background: var(--chsen-green); }
.chsen-pill--cancelled,
.chsen-pill--archived { background: var(--chsen-red); }
.chsen-pill--postponed,
.chsen-pill--provisional,
.chsen-pill--todo,
.chsen-pill--draft { background: var(--chsen-gold); color: var(--chsen-blue); }
.chsen-pill--doing,
.chsen-pill--enquiry { background: var(--chsen-teal); }

.chsen-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}

.chsen-form-grid h2 {
  grid-column: 1 / -1;
}

.chsen-field,
.chsen-inline-form label,
.chsen-repeat-row label,
.chsen-check {
  display: grid;
  gap: 7px;
  color: var(--chsen-blue);
  font-weight: 800;
}

.chsen-field--wide,
.chsen-fieldset,
.chsen-repeat-row__wide {
  grid-column: 1 / -1;
}

.chsen-field input,
.chsen-field select,
.chsen-field textarea,
.chsen-inline-form input,
.chsen-inline-form select,
.chsen-inline-form textarea,
.chsen-repeat-row input,
.chsen-repeat-row select {
  min-height: 42px;
  border: 1px solid #cfc8b6;
  border-radius: 6px;
}

.chsen-check {
  align-self: end;
  grid-template-columns: auto 1fr;
  align-items: center;
}

.chsen-fieldset {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--chsen-border);
  border-radius: 8px;
}

.chsen-fieldset legend {
  padding: 0 8px;
  color: var(--chsen-gold);
  font-weight: 900;
  text-transform: uppercase;
}

.chsen-media-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 44px;
}

.chsen-media-preview img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--chsen-border);
}

.chsen-repeat-list {
  display: grid;
  gap: 12px;
}

.chsen-repeat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--chsen-border);
  border-radius: 8px;
  background: #fff;
}

.chsen-inline-form {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  align-items: end;
}

.chsen-timeline {
  margin: 0;
  padding-left: 20px;
}

.chsen-timeline li {
  margin: 8px 0;
}

.chsen-public-status {
  display: inline-flex;
  margin: 0 0 8px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #fff0df;
  color: #17204b;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.chsen-public-status--cancelled {
  background: #fff0ee;
  color: #96342e;
}

@media (max-width: 900px) {
  .chsen-calendar {
    display: block;
  }

  .chsen-calendar__weekday {
    display: none;
  }

  .chsen-calendar__day {
    min-height: auto;
    border-right: 0;
  }

  .chsen-public-calendar-head {
    display: block;
  }

  .chsen-row {
    grid-template-columns: 1fr;
  }
}
