:root {
  --wpi-bg: #EDF2F4;
  --wpi-surface: #FFFFFF;
  --wpi-dark: #0B3E6C;
  --wpi-accent: #2FA36B;
  --wpi-accent-hover: #1F7D4F;
  --wpi-accent-soft: #7BE0AE;
  --wpi-mid: #2F7D8C;
  --wpi-text: #2C3A44;
  --wpi-text-muted: #56656E;
  --wpi-warn: #B4571E;
  --wpi-line: #D7E2E7;
  --wpi-shadow: 0 1px 3px rgba(11, 62, 108, 0.06);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--wpi-bg);
  color: var(--wpi-text);
  font: 15px/1.5 "Open Sans", Arial, sans-serif;
}

a,
button,
input { font: inherit; }

.site-header {
  background: var(--wpi-surface);
  border-bottom: 1px solid var(--wpi-line);
}

.site-header__inner {
  width: min(1240px, calc(100% - 56px));
  margin: auto;
  padding: 19px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand-logo {
  width: 180px;
  height: auto;
}

.account {
  display: flex;
  align-items: center;
  gap: 12px;
}

.account__role {
  border-radius: 999px;
  background: var(--wpi-bg);
  color: var(--wpi-dark);
  padding: 8px 13px;
  font-weight: 700;
}

.account form { margin: 0; }

.text-button {
  border: 0;
  background: transparent;
  color: var(--wpi-dark);
  padding: 8px 0;
  font-weight: 700;
  cursor: pointer;
}

.text-button:hover { color: var(--wpi-accent-hover); }

.page {
  width: min(1240px, calc(100% - 56px));
  margin: auto;
  padding: 34px 0 56px;
}

.notice {
  margin-bottom: 18px;
  padding: 14px 17px;
  border-left: 4px solid var(--wpi-mid);
  border-radius: 10px;
  background: var(--wpi-surface);
  box-shadow: var(--wpi-shadow);
  color: var(--wpi-text-muted);
}

.notice strong { color: var(--wpi-dark); }

.page-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 24px;
}

.kicker {
  margin: 0 0 7px;
  color: var(--wpi-accent-hover);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.page-intro h1,
.after-event h2,
.login-brand h1,
.login-card h2 {
  color: var(--wpi-dark);
  text-align: left;
}

.page-intro h1 {
  margin: 0;
  font-size: clamp(29px, 4vw, 42px);
  line-height: 1.1;
}

.page-intro p:not(.kicker) {
  margin: 10px 0 0;
  color: var(--wpi-text-muted);
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 11px 16px;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.button--primary {
  background: var(--wpi-accent);
  color: #fff;
}

.button--primary:hover { background: var(--wpi-accent-hover); }

.button--secondary {
  background: var(--wpi-surface);
  border-color: #BCD0D8;
  color: var(--wpi-dark);
}

.button--secondary:hover { border-color: var(--wpi-accent); }

.button--full { width: 100%; }

.table-card {
  overflow: hidden;
  border-radius: 12px;
  background: var(--wpi-surface);
  box-shadow: var(--wpi-shadow);
}

.portal-row {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1.05fr 1.25fr 0.8fr;
  gap: 18px;
  align-items: center;
  padding: 17px 21px;
  border-top: 1px solid var(--wpi-line);
}

.portal-row--new {
  box-shadow: inset 4px 0 0 var(--wpi-accent);
}

.portal-row--head {
  border-top: 0;
  background: #F7F9FA;
  color: var(--wpi-text-muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

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

.date-box {
  min-width: 56px;
  padding: 7px;
  border-radius: 10px;
  background: var(--wpi-bg);
  text-align: center;
}

.date-box strong {
  display: block;
  color: var(--wpi-dark);
  font-size: 19px;
  line-height: 1;
}

.date-box span {
  color: var(--wpi-text-muted);
  font-size: 11px;
  text-transform: uppercase;
}

.event h3 {
  margin: 0;
  color: var(--wpi-dark);
  font-size: 17px;
}

.event p,
.event time {
  display: block;
  margin: 2px 0 0;
  color: var(--wpi-text-muted);
  font-size: 12px;
}

.availability {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #17643E;
  font-weight: 700;
}

.availability__dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--wpi-accent);
}

.last-change {
  display: grid;
  gap: 2px;
  color: var(--wpi-text);
}

.last-change__label {
  color: var(--wpi-text-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.last-change time,
.last-change > span:last-child {
  font-weight: 700;
}

.last-change__new {
  width: fit-content;
  margin-bottom: 3px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #E8F7EF;
  color: #17643E;
  font-size: 11px;
  font-weight: 800;
}

.file-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.file-chip {
  border-radius: 999px;
  background: var(--wpi-bg);
  color: var(--wpi-dark);
  padding: 6px 9px;
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
}

.file-chip:hover {
  background: #DDE8EC;
  color: var(--wpi-accent-hover);
}

.file-chip--photos {
  background: #E8F7EF;
  color: #17643E;
}

.zip-button {
  justify-self: end;
  border-radius: 999px;
  background: var(--wpi-accent);
  color: #fff;
  padding: 9px 13px;
  font-weight: 750;
  text-decoration: none;
}

.zip-button:hover { background: var(--wpi-accent-hover); }

.empty-state {
  margin: 0;
  padding: 28px 21px;
  color: var(--wpi-text-muted);
}

.after-event {
  margin-top: 18px;
  padding: 22px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 20px;
  border-left: 4px solid var(--wpi-mid);
  border-radius: 12px;
  background: var(--wpi-surface);
  box-shadow: var(--wpi-shadow);
}

.after-event h2 {
  margin: 0;
  font-size: 20px;
}

.after-event p {
  margin: 4px 0 0;
  color: var(--wpi-text-muted);
}

.after-event__status {
  color: var(--wpi-mid);
  font-weight: 700;
  white-space: nowrap;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.login-shell {
  width: min(920px, 100%);
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  overflow: hidden;
  border-radius: 14px;
  background: var(--wpi-surface);
  box-shadow: 0 12px 35px rgba(11, 62, 108, 0.12);
}

.login-brand {
  min-height: 520px;
  padding: 42px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--wpi-dark);
  color: #fff;
}

.login-brand__logo {
  width: 210px;
  height: auto;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--wpi-surface);
}

.kicker--light { color: var(--wpi-accent-soft); }

.login-brand h1 {
  margin: 0 0 14px;
  color: #fff;
  font-size: clamp(30px, 4vw, 43px);
  line-height: 1.08;
}

.login-brand p:not(.kicker) {
  margin: 0;
  color: #D8E5EC;
}

.login-card {
  padding: 42px 36px;
  align-self: center;
}

.login-card h2 {
  margin: 0;
  font-size: 30px;
}

.login-card__intro {
  margin: 7px 0 24px;
  color: var(--wpi-text-muted);
}

.login-card form {
  display: grid;
  gap: 16px;
}

.login-card label {
  display: grid;
  gap: 6px;
  color: var(--wpi-dark);
  font-weight: 700;
}

.login-card input {
  width: 100%;
  min-height: 46px;
  padding: 10px 13px;
  border: 1px solid #AFC3CC;
  border-radius: 10px;
  background: #fff;
  color: var(--wpi-text);
}

.login-card input:focus {
  outline: 3px solid rgba(47, 163, 107, 0.22);
  border-color: var(--wpi-accent);
}

.error {
  padding: 11px 13px;
  border-left: 4px solid var(--wpi-warn);
  border-radius: 10px;
  background: #FFF5EF;
  color: #7B3511;
  font-weight: 700;
}

@media (max-width: 900px) {
  .page-intro { display: block; }
  .master-actions {
    justify-content: flex-start;
    margin-top: 18px;
  }
  .portal-row { grid-template-columns: 1.5fr 1fr 1fr auto; }
  .portal-row > :nth-child(4) { display: none; }
}

@media (max-width: 720px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-brand {
    min-height: auto;
    padding: 28px;
    gap: 42px;
  }
  .login-brand__logo { width: 180px; }
  .login-card { padding: 32px 28px 36px; }
}

@media (max-width: 620px) {
  .site-header__inner,
  .page { width: min(100% - 32px, 1240px); }
  .brand-logo { width: 150px; }
  .account__role { display: none; }
  .page { padding-top: 24px; }
  .page-intro h1 { font-size: 31px; }
  .master-actions .button { width: 100%; }
  .portal-row--head { display: none; }
  .portal-row {
    grid-template-columns: 1fr;
    padding: 18px;
  }
  .portal-row > :nth-child(4) { display: flex; }
  .zip-button { justify-self: start; }
  .after-event { grid-template-columns: 1fr; }
  .after-event__status { white-space: normal; }
  .login-page { padding: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
