:root {
  --bg: #f4f8fb;
  --ink: #122126;
  --muted: #61727a;
  --line: #d8e4ea;
  --panel: #ffffff;
  --blue: #17a4df;
  --blue-dark: #0475aa;
  --navy: #14252b;
  --ice: #e7f6fd;
  --gold: #f3ba2f;
  --rose: #b13b4a;
  --shadow: 0 18px 50px rgba(18, 33, 38, 0.09);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

button,
input {
  font: inherit;
}

.topbar {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 0 auto;
  max-width: 1180px;
  padding: 24px 20px 14px;
}

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

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

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

h2 {
  font-size: clamp(1.45rem, 4vw, 3rem);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  font-size: 1rem;
  margin-top: 8px;
}

.eyebrow {
  color: var(--blue-dark);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.month-pill {
  background: var(--navy);
  border: 1px solid var(--navy);
  border-radius: 6px;
  color: #fff;
  font-weight: 800;
  padding: 10px 14px;
  white-space: nowrap;
}

main {
  margin: 0 auto;
  max-width: 1180px;
  padding: 0 20px 40px;
}

.hero {
  align-items: stretch;
  background:
    linear-gradient(90deg, rgba(20, 37, 43, 0.98) 0%, rgba(20, 37, 43, 0.9) 36%, rgba(23, 164, 223, 0.92) 100%),
    repeating-linear-gradient(90deg, transparent 0 78px, rgba(255,255,255,0.16) 78px 79px),
    repeating-linear-gradient(0deg, transparent 0 44px, rgba(255,255,255,0.1) 44px 45px);
  background-size: cover;
  border-radius: 8px;
  box-shadow: var(--shadow);
  color: #fff;
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.8fr);
  min-height: 360px;
  overflow: hidden;
  padding: clamp(28px, 5vw, 56px);
}

.hero .eyebrow {
  color: #91dcff;
}

.hero-copy {
  align-self: center;
  display: grid;
  gap: 18px;
  max-width: 650px;
}

.hero-copy p:not(.eyebrow) {
  color: rgba(255, 255, 255, 0.87);
  font-size: 1.08rem;
  max-width: 580px;
}

.hero-actions,
.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button,
.icon-button {
  align-items: center;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 44px;
  padding: 11px 16px;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover,
.icon-button:hover {
  transform: translateY(-1px);
}

.primary {
  background: var(--blue);
  color: #fff;
}

.secondary {
  background: #fff;
  color: var(--navy);
}

.danger {
  background: #f8dfe3;
  color: var(--rose);
}

.full {
  width: 100%;
}

.hero-stats {
  align-self: end;
  display: grid;
  gap: 12px;
}

.hero-stats div {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 6px;
  padding: 18px;
}

.hero-stats span {
  display: block;
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 900;
  line-height: 1;
}

.hero-stats small {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 750;
}

.leaderboard-section,
.split,
footer {
  margin-top: 26px;
}

.section-heading,
.panel-heading {
  align-items: end;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.section-heading h2,
.panel-heading h2 {
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.section-note {
  color: var(--muted);
  margin-top: 4px;
}

.icon-button {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink);
}

.leaderboard {
  display: grid;
  gap: 10px;
}

.leader-row {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  gap: 12px;
  grid-template-columns: 56px minmax(0, 1fr) minmax(120px, auto);
  padding: 0;
  overflow: hidden;
}

.rank {
  align-items: center;
  background: var(--navy);
  border-radius: 0;
  color: #fff;
  display: inline-flex;
  font-weight: 900;
  height: 100%;
  justify-content: center;
  min-height: 70px;
  width: 56px;
}

.leader-row:first-child {
  border-color: rgba(7, 152, 216, 0.45);
  box-shadow: 0 10px 24px rgba(7, 152, 216, 0.12);
}

.leader-row:first-child .rank {
  background: var(--blue);
  color: #fff;
}

.leader-name {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 14px 0;
}

.leader-name strong {
  overflow-wrap: anywhere;
}

.leader-name small,
.steps small,
.form-note,
footer {
  color: var(--muted);
}

.steps {
  font-weight: 900;
  padding: 14px;
  text-align: right;
}

.split {
  align-items: start;
  display: grid;
  gap: 20px;
  grid-template-columns: 0.9fr 1.1fr 0.9fr;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
  padding: 22px;
}

.client-chip,
.today-strip {
  background: var(--ice);
  border: 1px solid #bee8fb;
  border-radius: 6px;
  color: var(--navy);
  font-weight: 800;
  padding: 12px;
}

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

.today-strip span {
  color: var(--blue-dark);
  font-size: 0.9rem;
}

.big-submit {
  font-size: 1.05rem;
  min-height: 54px;
}

.optional-details {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.optional-details summary {
  color: var(--blue-dark);
  cursor: pointer;
  font-weight: 900;
}

.optional-grid {
  display: grid;
  gap: 12px;
  padding-top: 12px;
}

.daily-help {
  background: #fbfdff;
}

.flow-list {
  display: grid;
  gap: 10px;
}

.flow-list div {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  gap: 10px;
  grid-template-columns: 34px 1fr;
  padding: 10px;
}

.flow-list span {
  align-items: center;
  background: var(--navy);
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  font-weight: 900;
  height: 30px;
  justify-content: center;
  width: 30px;
}

label {
  color: var(--ink);
  display: grid;
  font-weight: 800;
  gap: 7px;
}

input {
  background: #fbfdff;
  border: 1px solid #bfd3dd;
  border-radius: 6px;
  color: var(--ink);
  min-height: 46px;
  padding: 10px 12px;
  width: 100%;
}

input[type="file"] {
  cursor: pointer;
  padding: 9px 10px;
}

input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(7, 152, 216, 0.16);
  outline: 0;
}

.admin-lock {
  display: grid;
  gap: 12px;
}

.admin-tools {
  display: grid;
  gap: 14px;
}

.client-add {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  padding-top: 14px;
}

.hidden {
  display: none;
}

.pending-list {
  display: grid;
  gap: 10px;
}

.pending-item {
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.pending-item p {
  color: var(--muted);
}

.proof-image {
  aspect-ratio: 16 / 10;
  background: #eef6fa;
  border: 1px solid var(--line);
  border-radius: 6px;
  max-width: 260px;
  object-fit: cover;
  width: 100%;
}

.pending-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.empty {
  background: #fbfcfa;
  border: 1px dashed #cfd7d1;
  border-radius: 6px;
  color: var(--muted);
  padding: 18px;
  text-align: center;
}

footer {
  padding-bottom: 28px;
  text-align: center;
}

@media (max-width: 760px) {
  .topbar,
  .section-heading,
  .panel-heading {
    align-items: start;
    flex-direction: column;
  }

  .brand {
    align-items: start;
  }

  .hero,
  .split {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .leader-row {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .steps {
    grid-column: 2;
    text-align: left;
  }
}
