:root {
  color-scheme: light;
  --bg: #f5f7f6;
  --surface: #ffffff;
  --surface-soft: #eef5f1;
  --ink: #18201d;
  --muted: #66736e;
  --line: #dce5e1;
  --teal: #087f72;
  --teal-dark: #056459;
  --mint: #dff5ed;
  --coral: #c54f48;
  --amber: #f0b23f;
  --amber-soft: #fff4d9;
  --shadow: 0 18px 60px rgba(30, 49, 43, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #fbfcfb 0%, var(--bg) 58%, #eef4f1 100%);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

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

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0 26px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  place-items: center;
  border-radius: var(--radius);
  background: var(--ink);
  color: #ffffff;
  font-weight: 800;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--teal);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

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

h1 {
  font-size: clamp(1.85rem, 3vw, 3rem);
}

h2 {
  font-size: clamp(1.25rem, 2vw, 1.6rem);
}

.header-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(118px, 1fr));
  gap: 10px;
}

.stat {
  min-height: 70px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 8px 30px rgba(30, 49, 43, 0.06);
}

.stat span {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
}

.stat small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.active-stat {
  border-color: rgba(240, 178, 63, 0.55);
  background: var(--amber-soft);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(300px, 0.85fr) minmax(0, 1.35fr);
  gap: 22px;
  align-items: start;
}

.editor-panel,
.directory-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.editor-panel {
  position: sticky;
  top: 18px;
  padding: 22px;
}

.directory-panel {
  min-height: 560px;
  padding: 22px;
}

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

.contact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  min-width: 0;
}

label span {
  color: #34413d;
  font-size: 0.88rem;
  font-weight: 800;
}

label em {
  color: var(--muted);
  font-style: normal;
  font-weight: 600;
}

input[type="text"],
input[type="tel"],
input[type="url"],
input[type="password"],
input[type="search"] {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  outline: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

input[type="text"],
input[type="tel"],
input[type="url"],
input[type="password"] {
  min-height: 46px;
  padding: 10px 12px;
}

input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(8, 127, 114, 0.12);
}

.full-width {
  grid-column: 1 / -1;
}

.event-switch {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.event-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.switch-track {
  position: relative;
  width: 48px;
  height: 28px;
  border-radius: 999px;
  background: #a9b6b1;
  transition: background 160ms ease;
}

.switch-thumb {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
  transition: transform 160ms ease;
}

.event-switch input:checked + .switch-track {
  background: var(--teal);
}

.event-switch input:checked + .switch-track .switch-thumb {
  transform: translateX(20px);
}

.switch-copy {
  display: grid;
  gap: 2px;
}

.switch-copy small {
  color: var(--muted);
  font-weight: 650;
}

.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.primary-button,
.secondary-button,
.icon-button,
.card-action,
.event-button,
.segment {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--radius);
  min-height: 42px;
  padding: 0 14px;
  color: var(--ink);
  background: #ffffff;
  font-weight: 800;
  text-decoration: none;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

.primary-button {
  gap: 8px;
  background: var(--teal);
  color: #ffffff;
}

.primary-button:hover {
  background: var(--teal-dark);
}

.secondary-button {
  border-color: var(--line);
}

.secondary-button:hover,
.card-action:hover,
.segment:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.primary-button svg,
.icon-button svg,
.card-action svg,
.event-button svg,
.search-field svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-button {
  width: 42px;
  height: 42px;
  padding: 0;
  border-color: var(--line);
}

.directory-heading {
  align-items: start;
}

.search-field {
  position: relative;
  width: min(330px, 100%);
  flex: 1 1 260px;
}

.search-field svg {
  position: absolute;
  top: 50%;
  left: 12px;
  color: var(--muted);
  transform: translateY(-50%);
  pointer-events: none;
}

.search-field input {
  min-height: 44px;
  padding: 10px 12px 10px 40px;
}

.directory-tools {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.segment {
  min-height: 36px;
  padding: 0 12px;
  border-color: var(--line);
  color: var(--muted);
}

.segment.active {
  border-color: rgba(8, 127, 114, 0.28);
  background: var(--mint);
  color: var(--teal-dark);
}

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

.club-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.club-card.hosting {
  border-color: rgba(240, 178, 63, 0.75);
  background: linear-gradient(90deg, var(--amber-soft), #ffffff 48%);
}

.card-main {
  min-width: 0;
}

.card-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.club-title {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.22;
  overflow-wrap: anywhere;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.hosting .status-pill {
  background: var(--amber);
  color: #3a2907;
}

.university-name {
  margin: 0 0 12px;
  color: var(--muted);
  font-weight: 750;
  overflow-wrap: anywhere;
}

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

.detail-item {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.detail-item dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.detail-item dd {
  margin: 0;
  color: var(--ink);
  font-weight: 760;
  overflow-wrap: anywhere;
}

.detail-item a {
  color: var(--teal-dark);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.card-actions {
  display: grid;
  grid-template-columns: repeat(3, 42px);
  gap: 8px;
  align-content: start;
}

.card-action,
.event-button {
  width: 42px;
  height: 42px;
  padding: 0;
  border-color: var(--line);
}

.event-button.active {
  border-color: rgba(240, 178, 63, 0.8);
  background: var(--amber);
  color: #2e2108;
}

.danger:hover {
  border-color: var(--coral);
  color: var(--coral);
}

.empty-state {
  display: grid;
  justify-items: center;
  gap: 12px;
  min-height: 320px;
  padding: 44px 18px;
  border: 1px dashed #b7c4bf;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(8, 127, 114, 0.08), transparent 55%),
    #ffffff;
  text-align: center;
}

.empty-visual {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border-radius: var(--radius);
  background: var(--mint);
  color: var(--teal-dark);
}

.empty-visual svg {
  width: 42px;
  height: 42px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.empty-state h3 {
  margin: 0;
  font-size: 1.15rem;
}

.empty-state p {
  max-width: 34rem;
  margin: 0;
  color: var(--muted);
  font-weight: 650;
}

@media (max-width: 920px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .editor-panel {
    position: static;
  }
}

@media (max-width: 720px) {
  .app-shell {
    width: min(100% - 22px, 1180px);
    padding-top: 16px;
  }

  .app-header,
  .section-heading,
  .directory-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .header-stats,
  .contact-form,
  .detail-grid {
    grid-template-columns: 1fr;
  }

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

  .card-actions {
    grid-template-columns: repeat(3, 42px);
    justify-content: start;
  }

  .editor-panel,
  .directory-panel {
    padding: 16px;
  }
}
