:root {
  --ink: #151829;
  --muted: #62687a;
  --line: #d7dbe7;
  --navy: #17215f;
  --red: #e5252a;
  --gold: #c5a25e;
  --green: #138b49;
  --surface: #ffffff;
  --page: #f4f6fb;
  font-family: Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.hero {
  display: grid;
  grid-template-columns: 96px 1fr 170px;
  gap: 20px;
  align-items: center;
  padding: 22px 0;
}

.logo {
  width: 96px;
  height: 96px;
  object-fit: contain;
}

.mascot {
  justify-self: end;
  align-self: end;
  width: 166px;
  max-height: 170px;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 12px 18px rgba(15, 25, 60, 0.12));
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--red);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: 34px;
  line-height: 1.1;
}

h2 {
  margin-bottom: 10px;
  font-size: 18px;
}

.intro {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.5;
}

.grid {
  display: grid;
  grid-template-columns: minmax(280px, 380px) 1fr;
  gap: 16px;
  margin-top: 16px;
}

.panel,
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 10px 24px rgba(15, 25, 60, 0.06);
}

.panel-title {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.pending {
  color: #725000;
  background: #fff4cf;
}

.ready {
  color: #07542a;
  background: #dff6e9;
}

.error,
.locked {
  color: #7b1115;
  background: #ffe1e3;
}

.form {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 16px;
}

button {
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  color: #fff;
  background: var(--navy);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.small,
.empty {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.modules {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.module-button {
  color: var(--ink);
  text-align: left;
  background: #fbfcff;
}

.modules span,
.module-button {
  min-height: 40px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
}

.module-button.active {
  border-color: var(--navy);
  border-left-color: var(--red);
  background: #eef2ff;
}

.workspace-panel {
  margin-top: 16px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.metric {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.metric strong {
  display: block;
  margin-top: 7px;
  color: var(--navy);
  font-size: 22px;
}

.warning-metric strong {
  color: var(--red);
}

.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.registration-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.registration-tab {
  width: auto;
  min-height: 36px;
  padding: 8px 12px;
  color: var(--navy);
  border: 1px solid var(--line);
  background: #fff;
  font-size: 13px;
}

.registration-tab.active {
  color: #fff;
  border-color: var(--navy);
  background: var(--navy);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}

.calendar-month {
  margin: 16px 0;
}

.calendar-month h2 {
  margin: 0 0 8px;
  color: var(--navy);
  font-size: 18px;
}

.calendar-event-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.calendar-event-card {
  min-height: 120px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.calendar-event-card strong,
.calendar-event-card span {
  display: block;
}

.calendar-event-card strong {
  color: var(--navy);
}

.calendar-event-card span,
.calendar-event-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.calendar-month-grid-wrap {
  margin: 16px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.calendar-month-title h2 {
  margin: 0 0 10px;
  color: var(--navy);
  font-size: 18px;
}

.calendar-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.calendar-weekday {
  padding: 8px;
  background: #eef2ff;
  color: var(--navy);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.calendar-day {
  min-height: 110px;
  padding: 7px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
  overflow: hidden;
}

.calendar-day.muted-day {
  background: #f8fafc;
}

.calendar-day.has-event {
  background: #fffaf0;
}

.calendar-day strong {
  display: block;
  margin-bottom: 5px;
  color: var(--navy);
  font-size: 13px;
}

.calendar-day span {
  display: block;
  margin: 4px 0;
  padding: 4px 6px;
  border-left: 3px solid var(--gold);
  border-radius: 4px;
  background: #fff;
  color: var(--navy);
  font-size: 12px;
  line-height: 1.2;
}

.search {
  max-width: 380px;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #edf6f0;
  color: #07542a;
  font-size: 12px;
  font-weight: 700;
}

.gold-badge {
  background: #fff5dd;
  color: #7a5200;
}

.warning-badge {
  background: #fff1f2;
  color: #9f1239;
}

.clickable-row {
  cursor: pointer;
}

.clickable-row:hover {
  background: #f7f9ff;
}

.profile-header {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}

.profile-header h2 {
  margin-bottom: 6px;
  font-size: 24px;
}

.profile-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.detail-list {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 8px 12px;
  margin: 0;
}

.detail-list dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.detail-list dd {
  margin: 0;
}

.compact-form {
  gap: 10px;
}

.form-section {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.form-section legend {
  padding: 0 6px;
  color: var(--ink);
  font-weight: 700;
}

.form-subsection {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #e5e8f2;
  border-radius: 6px;
  background: #fbfcff;
}

.option-disabled {
  opacity: 0.58;
}

#honorary-removal-fields {
  display: grid;
  gap: 10px;
}

.checkbox-label {
  display: flex;
  grid-template-columns: none;
  gap: 10px;
  align-items: center;
  color: var(--ink);
}

.checkbox-label input {
  width: 18px;
  min-height: 18px;
  height: 18px;
  padding: 0;
}

.stack {
  display: grid;
  gap: 12px;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(260px, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}

.subtle-card {
  box-shadow: none;
}

textarea,
select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

.notice {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcff;
}

.notice.unread {
  border-left: 4px solid var(--red);
}

.target-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.preview-box {
  min-height: 44px;
  padding: 11px 12px;
  border: 1px solid #cbd4ea;
  border-radius: 6px;
  background: #f7f9ff;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.schedule-list {
  display: grid;
  gap: 6px;
  margin: 10px 0;
  padding: 0;
  list-style: none;
}

.schedule-list li {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}

.schedule-list li:last-child {
  border-bottom: 0;
}

.actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.reply-box {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.reply-textarea {
  width: 100%;
  min-height: 78px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  resize: vertical;
}

.flagged-report {
  border-left-color: #dc2626;
}

.thread-context {
  white-space: pre-wrap;
  max-height: 260px;
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--text);
  font-family: inherit;
}

.secondary-button {
  width: auto;
  min-height: 34px;
  padding: 7px 10px;
  color: var(--navy);
  border: 1px solid var(--line);
  background: #fff;
  font-size: 13px;
}

.danger-button {
  width: auto;
  min-height: 34px;
  padding: 7px 10px;
  color: #9f1239;
  border: 1px solid #fecdd3;
  background: #fff5f5;
  font-size: 13px;
}

.table-input {
  min-height: 36px;
  padding: 8px 10px;
  font-size: 14px;
}

.trial-date-input {
  min-width: 130px;
}

.inline-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  font-weight: 700;
  color: var(--navy);
}

.inline-toggle input {
  width: 18px;
  height: 18px;
}

.trials-prelims-row {
  background: #f8fafc;
}

.trials-prelims-row.hidden {
  display: none;
}

.trials-prelims-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 10px;
}

.trials-prelims-grid label {
  display: grid;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.table-textarea {
  width: 100%;
  min-width: 260px;
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  resize: vertical;
}

.constitution-description {
  max-width: 520px;
  margin-bottom: 10px;
  color: var(--muted);
  line-height: 1.45;
}

.committee-exit-box {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.committee-exit-box summary {
  cursor: pointer;
  color: var(--navy);
  font-weight: 700;
}

.committee-exit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.committee-exit-grid label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-weight: 700;
}

.inline-label {
  display: grid;
  gap: 6px;
  font-weight: 700;
  color: var(--muted);
}

.price-description-cell {
  min-width: 280px;
  width: 34%;
}

.price-column {
  width: 120px;
}

.price-amount-input {
  max-width: 105px;
  min-width: 95px;
}

.add-price-row {
  background: #f8fafc;
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 20px, 1120px);
    padding-top: 12px;
  }

  .hero {
    grid-template-columns: 72px 1fr 82px;
    gap: 14px;
  }

  .logo {
    width: 72px;
    height: 72px;
  }

  .mascot {
    width: 82px;
    max-height: 92px;
  }

  h1 {
    font-size: 27px;
  }

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

  .committee-exit-grid {
    grid-template-columns: 1fr;
  }

  .modules {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .toolbar,
  .split,
  .two-column,
  .target-fields {
    grid-template-columns: 1fr;
    display: grid;
  }

  .schedule-list li {
    grid-template-columns: 1fr;
  }

  .profile-header {
    display: grid;
  }

  .profile-badges {
    justify-content: flex-start;
  }

  .detail-list {
    grid-template-columns: 1fr;
  }

  .calendar-event-list,
  .calendar-month-grid {
    grid-template-columns: 1fr;
  }
}
