:root {
  color-scheme: light;
  font-family: Arial, Helvetica, sans-serif;
  background: #f6f4ef;
  color: #202124;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(24, 91, 125, 0.14), transparent 32%),
    linear-gradient(225deg, rgba(179, 70, 48, 0.14), transparent 34%),
    #f6f4ef;
}

button,
select,
input {
  font: inherit;
}

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

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 700;
  color: #6d4c32;
  text-transform: uppercase;
  letter-spacing: 0;
}

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

h1 {
  margin-bottom: 0;
  font-size: 34px;
}

.status-pill {
  min-width: 190px;
  padding: 10px 14px;
  border: 1px solid #d3cbc0;
  border-radius: 999px;
  background: #ffffff;
  font-size: 14px;
  text-align: center;
  white-space: nowrap;
}

.status-pill.ok {
  border-color: #8eb99a;
  background: #eff8f1;
  color: #225b31;
}

.status-pill.warn {
  border-color: #d2a44f;
  background: #fff7df;
  color: #7a5312;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 30px 0;
  border-top: 1px solid #d8d0c4;
  border-bottom: 1px solid #d8d0c4;
}

.hero h2 {
  max-width: 760px;
  margin-bottom: 10px;
  font-size: 44px;
  line-height: 1.05;
}

.hero p {
  max-width: 720px;
  margin-bottom: 0;
  color: #4f5357;
  font-size: 18px;
  line-height: 1.5;
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.primary-button,
.secondary-button {
  min-height: 48px;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0 18px;
  cursor: pointer;
  font-weight: 700;
}

.primary-button {
  background: #185b7d;
  color: #fff;
}

.secondary-button {
  background: #ffffff;
  color: #1f2f36;
  border-color: #bfc8cc;
}

.small-button {
  min-height: 34px;
  padding: 0 10px;
  font-size: 13px;
}

.primary-button:disabled,
.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.66;
}

.primary-button.loading,
.secondary-button.loading {
  cursor: wait;
}

.notice {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px solid #d2a44f;
  background: #fff7df;
  color: #68470f;
  line-height: 1.45;
}

.notice.hidden {
  display: none;
}

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

.stat {
  border: 1px solid #d8d0c4;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  padding: 16px;
  display: grid;
  gap: 4px;
}

.stat-value {
  font-size: 32px;
  font-weight: 800;
}

.stat-label {
  color: #555b60;
  font-size: 14px;
}

.progress-panel {
  margin-bottom: 18px;
  border: 1px solid #d8d0c4;
  border-radius: 8px;
  background: #fff;
  padding: 16px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  color: #444b50;
}

progress {
  width: 100%;
  height: 18px;
  accent-color: #185b7d;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 18px;
}

.results-panel {
  min-height: 560px;
}

.panel {
  min-height: 420px;
  border: 1px solid #d8d0c4;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  overflow: hidden;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid #e2dbd0;
  background: #fff;
}

.panel-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.panel-header h3 {
  margin-bottom: 0;
  font-size: 18px;
}

.panel-header span {
  min-width: 44px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #ece8df;
  text-align: center;
  font-weight: 700;
}

.list {
  max-height: 560px;
  overflow: auto;
}

.empty {
  margin: 0;
  padding: 22px 18px;
  color: #6b7176;
}

.event-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 6px;
  padding: 14px 18px;
  border-bottom: 1px solid #eee7dc;
}

.event-main {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.icon-button {
  min-width: 38px;
  min-height: 38px;
  border: 1px solid #d2c8ba;
  border-radius: 8px;
  background: #fff;
  color: #5f4534;
  cursor: pointer;
  font-weight: 700;
}

.icon-button:hover {
  background: #fff7df;
}

.remove-event-button {
  min-height: 34px;
  border: 1px solid #c8b9aa;
  border-radius: 8px;
  background: #fff;
  color: #6f2f20;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  padding: 0 10px;
}

.remove-event-button:hover {
  background: #fff1ea;
  border-color: #b46a54;
}

.event-row strong {
  font-size: 15px;
}

.meta {
  color: #656b70;
  font-size: 13px;
}

.event-row a {
  color: #185b7d;
  font-weight: 700;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.event-row a:hover {
  text-decoration: underline;
}

.exclude-form {
  padding: 16px 18px;
  border-bottom: 1px solid #eee7dc;
}

.exclude-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}

.input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.input-row input {
  min-height: 44px;
  border: 1px solid #bfc8cc;
  border-radius: 8px;
  padding: 0 12px;
}

.compact-list {
  max-height: 280px;
}

.exclude-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-bottom: 1px solid #eee7dc;
}

.exclude-row span {
  overflow-wrap: anywhere;
}

@media (max-width: 820px) {
  .topbar,
  .hero {
    display: block;
  }

  .status-pill {
    margin-top: 14px;
    text-align: left;
  }

  .hero h2 {
    font-size: 34px;
  }

  .actions {
    justify-content: flex-start;
    margin-top: 20px;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }

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

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

  .progress-header {
    display: grid;
  }

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

  .panel-header {
    align-items: flex-start;
  }

  .panel-tools {
    justify-content: flex-start;
  }
}
