.swim-app {
  background:
    radial-gradient(circle at 18% 10%, rgba(104, 228, 95, 0.22), transparent 28rem),
    radial-gradient(circle at 82% 18%, rgba(46, 124, 255, 0.28), transparent 30rem),
    linear-gradient(135deg, #07111f 0%, #0c1729 48%, #10243a 100%);
}

.swim-header {
  margin-bottom: 0;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid rgba(104, 228, 95, 0.28);
  border-radius: 999px;
  color: #dfffe0;
  background: rgba(104, 228, 95, 0.12);
  font-size: 0.9rem;
  font-weight: 800;
  white-space: nowrap;
}

.login-shell,
.swim-main {
  width: min(1180px, calc(100% - 40px));
  margin: 46px auto 0;
}

.login-shell {
  min-height: auto;
}

.login-panel {
  width: min(620px, 100%);
  margin: 24px auto 64px;
  padding: 36px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 28px;
  background: rgba(255,255,255,0.08);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.login-form {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

.login-form label {
  display: grid;
  gap: 8px;
  color: #d7e6f7;
  font-weight: 750;
}

.login-form input,
select {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 14px;
  padding: 0 14px;
  color: var(--text);
  background: rgba(7, 17, 31, 0.78);
  font: inherit;
}

select {
  min-width: 220px;
}

.form-error,
.form-note {
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  font-weight: 750;
}

.form-error {
  color: #ffe8e8;
  background: rgba(255, 80, 80, 0.18);
}

.form-note {
  color: #d9ffd8;
  background: rgba(104, 228, 95, 0.16);
}

.swim-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  gap: 28px;
  align-items: end;
  margin-bottom: 28px;
}

.compact-hero {
  min-height: auto;
  margin-bottom: 18px;
}

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

.compact-hero h1 {
  font-size: clamp(2.8rem, 6vw, 4.8rem);
}

.compact-hero .lead {
  margin-top: 18px;
}

.compact-hero .hero-metrics article {
  padding: 16px 18px;
}

.compact-hero .hero-metrics strong {
  font-size: 1.9rem;
}

.results-main {
  margin-top: 30px;
}

.results-main > .panel {
  margin-bottom: 20px;
}

.results-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: end;
  margin-bottom: 18px;
}

.results-title h1 {
  font-size: clamp(2.8rem, 6vw, 5rem);
  letter-spacing: -0.04em;
}

.results-title .lead {
  margin-top: 16px;
}

.results-counts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.results-counts article {
  padding: 16px 18px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(18px);
}

.results-counts span {
  color: var(--muted);
}

.results-counts strong {
  display: block;
  margin-top: 6px;
  color: var(--lime);
  font-size: 2rem;
}

.results-filter-panel {
  margin-bottom: 18px;
}

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

.analysis-teaser h2,
.analysis-teaser p {
  margin: 0;
}

.analysis-teaser p:not(.eyebrow) {
  margin-top: 8px;
  color: var(--muted);
}

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

.analysis-stat {
  min-height: 132px;
}

.analysis-stat span {
  display: block;
  color: var(--muted);
}

.analysis-stat strong {
  display: block;
  margin-top: 12px;
  color: var(--lime);
  font-size: 2rem;
  line-height: 1.1;
}

.admin-title h1 {
  font-size: clamp(2.8rem, 6vw, 4.6rem);
}

.admin-message {
  width: fit-content;
  margin: 0 0 18px;
}

.admin-form-panel {
  margin-bottom: 20px;
}

.meet-form {
  display: grid;
  gap: 22px;
}

.meet-form label {
  display: grid;
  gap: 8px;
  color: #d7e6f7;
  font-weight: 750;
}

.meet-form input {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 14px;
  padding: 0 14px;
  color: var(--text);
  background: rgba(7, 17, 31, 0.78);
  font: inherit;
}

.meet-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 16px;
}

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

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

.role-grid label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 76px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  background: rgba(255,255,255,0.07);
}

.role-grid input {
  width: auto;
  min-height: auto;
  margin-top: 4px;
}

.role-grid strong,
.role-grid small {
  display: block;
}

.role-grid small {
  margin-top: 3px;
  color: var(--muted);
}

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

.event-time-grid span {
  color: var(--muted);
}

.new-event-box {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(104, 228, 95, 0.22);
  border-radius: 18px;
  background: rgba(104, 228, 95, 0.08);
}

.new-event-box h2 {
  margin: 0;
  font-size: 1.2rem;
}

.new-event-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px minmax(0, 1fr);
  gap: 14px;
}

.form-submit-label .button {
  min-height: 48px;
}

.event-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.event-chip-list span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 11px;
  border-radius: 999px;
  color: #d7e6f7;
  background: rgba(255,255,255,0.08);
  font-weight: 750;
}

.form-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.inline-delete-form {
  margin: 0;
}

.danger-link {
  min-height: 34px;
  border: 1px solid rgba(255, 120, 120, 0.35);
  border-radius: 999px;
  padding: 0 12px;
  color: #ffd8d8;
  background: rgba(255, 80, 80, 0.14);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.danger-link:hover {
  background: rgba(255, 80, 80, 0.24);
}


.swim-hero h1 {
  font-size: clamp(3.2rem, 7vw, 6.2rem);
  letter-spacing: -0.04em;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.hero-metrics article,
.panel {
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 22px;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(18px);
}

.hero-metrics article {
  padding: 20px;
}

.hero-metrics span,
.pb-card span,
.pr-list small {
  color: var(--muted);
}

.hero-metrics strong {
  display: block;
  margin-top: 6px;
  font-size: 2.2rem;
  color: var(--lime);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 20px;
  align-items: start;
  margin-bottom: 20px;
}

.panel {
  padding: 24px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.panel h2 {
  margin: 0;
  font-size: 1.45rem;
}

.trend-chart {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.trend-chart .axis {
  stroke: rgba(255,255,255,0.24);
  stroke-width: 1;
}

.trend-chart polyline {
  fill: none;
  stroke: var(--lime);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trend-chart circle {
  fill: #07111f;
  stroke: var(--lime);
  stroke-width: 3;
}

.trend-chart .pb-point {
  fill: var(--lime);
  stroke: #f0ffd8;
  stroke-width: 4;
}

.trend-chart text {
  fill: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.trend-chart .delta {
  fill: var(--lime);
  font-size: 15px;
}

.trend-chart .point-label {
  fill: #edf6ff;
  font-size: 14px;
  font-weight: 900;
  paint-order: stroke;
  stroke: rgba(7, 17, 31, 0.92);
  stroke-width: 5px;
  stroke-linejoin: round;
}

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

.pr-list article {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.07);
}

.pr-list strong,
.pr-list span,
.pr-list small {
  display: block;
}

.pr-list span {
  margin: 5px 0;
  color: #d7e6f7;
}

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

.pb-card {
  min-height: 150px;
  padding: 18px;
  border-radius: 18px;
  color: var(--dark);
  background: var(--card);
  display: flex;
  flex-direction: column;
}

.pb-card strong {
  margin: 10px 0;
  font-size: 1.8rem;
}

.pb-card small {
  margin-top: auto;
  color: #43546a;
  line-height: 1.4;
}

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

.filters {
  display: flex;
  align-items: end;
  gap: 14px;
  flex-wrap: wrap;
}

.filters label {
  display: grid;
  gap: 8px;
  color: #d7e6f7;
  font-weight: 750;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 780px;
}

th,
td {
  padding: 13px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  text-align: left;
}

th {
  color: var(--lime);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

td {
  color: #d7e6f7;
}

.empty-table {
  padding: 28px 12px;
  color: var(--muted);
  text-align: center;
}

.pb-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 28px;
  border-radius: 999px;
  color: #06101d;
  background: var(--lime);
  font-size: 0.78rem;
  font-weight: 900;
}

.empty-state {
  margin: 0;
  color: var(--muted);
}

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

@media (max-width: 980px) {
  .swim-hero,
  .dashboard-grid,
  .results-title,
  .analysis-grid {
    grid-template-columns: 1fr;
  }

  .pb-grid,
  .event-time-grid,
  .user-form-grid,
  .role-grid,
  .new-event-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .login-shell,
  .swim-main {
    width: min(100% - 24px, 1180px);
  }

  .login-panel,
  .panel {
    padding: 20px;
    border-radius: 20px;
  }

  .hero-metrics,
  .pb-grid,
  .event-time-grid,
  .new-event-grid,
  .user-form-grid,
  .role-grid,
  .meet-form-grid,
  .results-counts {
    grid-template-columns: 1fr;
  }

  .panel-head {
    flex-direction: column;
  }

  .analysis-teaser {
    align-items: flex-start;
    flex-direction: column;
  }

  select {
    min-width: 100%;
  }
}
