:root {
  --viva-teal: #0d8b82;
  --viva-teal-dark: #076b65;
  --viva-yellow: #f4c430;
  --viva-green: #7dbb43;
  --viva-red: #ef4056;
  --viva-bg: #f5f9f8;
}
html, body { max-width: 100%; overflow-x: hidden; }
body { background: var(--viva-bg); color: #183331; }
img { max-width: 100%; }
a { color: var(--viva-teal-dark); }
.brand-logo { width: auto; height: 48px; object-fit: contain; }
.nav-account-group { display: flex; flex: 0 0 auto; flex-flow: row nowrap; align-items: center; gap: .5rem; margin-left: .25rem; white-space: nowrap; }
.nav-user-chip { padding: .3rem .55rem; border-radius: 999px; background: #f1f8f7; min-width: 0; }
.nav-user-avatar { width: 32px !important; height: 32px !important; max-width: 32px; max-height: 32px; flex: 0 0 32px; border-radius: 50%; object-fit: cover; display: inline-flex; align-items: center; justify-content: center; background: var(--viva-teal); color: white; font-weight: 800; }
.nav-user-fallback { font-size: .95rem; text-transform: uppercase; }
.nav-user-text { max-width: 160px; line-height: 1.1; }
.nav-user-text > div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-account-group .btn { flex: 0 0 auto; white-space: nowrap; }
.btn-primary { --bs-btn-bg: var(--viva-teal); --bs-btn-border-color: var(--viva-teal); --bs-btn-hover-bg: var(--viva-teal-dark); --bs-btn-hover-border-color: var(--viva-teal-dark); }
.btn-outline-primary { --bs-btn-color: var(--viva-teal); --bs-btn-border-color: var(--viva-teal); --bs-btn-hover-bg: var(--viva-teal); --bs-btn-hover-border-color: var(--viva-teal); }
.text-primary { color: var(--viva-teal) !important; }
.hero { background: radial-gradient(circle at 80% 20%, rgba(244,196,48,.18), transparent 30%), linear-gradient(145deg, #fff, #eaf6f4); }
.hero-logo { max-height: 430px; border-radius: 2rem; mix-blend-mode: multiply; }
.eyebrow { color: var(--viva-teal); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; font-size: .78rem; }
.feature-card { height: 100%; background: #fff; border-radius: 1rem; padding: 2rem; box-shadow: 0 .5rem 2rem rgba(20,80,75,.08); }
.feature-card h2 { font-size: 1.2rem; margin-top: 1rem; }
.feature-card p { color: #66817e; margin-bottom: 0; }
.feature-number { width: 2.5rem; height: 2.5rem; display: grid; place-items: center; border-radius: 50%; background: var(--viva-yellow); font-weight: 800; }
.form-shell { max-width: 620px; border-radius: 1rem; }
.form-control, .form-select { min-height: 48px; border-radius: .7rem; }
textarea.form-control { min-height: 110px; }
.dashboard-actions { display: flex; flex-direction: column; align-items: stretch; gap: .65rem; min-width: min(100%, 420px); }
.dashboard-actions > .btn { width: 100%; }
.dashboard-support-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.dashboard-support-actions .btn { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; white-space: normal; line-height: 1.15; }
.invite-row, .submission-row, .member-row, .ranking-row { display: flex; gap: 1rem; align-items: center; justify-content: space-between; padding: 1rem 0; border-bottom: 1px solid #e7efee; }
.invite-row:last-child, .submission-row:last-child, .member-row:last-child, .ranking-row:last-child { border-bottom: 0; }
.submission-scroll { max-height: 28rem; overflow-y: auto; padding-right: .35rem; }
.submission-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: .25rem; }
.avatar { width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center; border-radius: 50%; background: var(--viva-teal); color: white; font-weight: 800; }
.avatar-photo { object-fit: cover; }
.team-image { width: 88px !important; height: 88px !important; max-width: 88px; max-height: 88px; object-fit: cover; border-radius: 1rem; }
.status { border-radius: 2rem; padding: .35rem .65rem; font-size: .74rem; font-weight: 700; }
.status-pending { background: #fff2c2; color: #765b00; }
.status-approved { background: #dff2df; color: #236823; }
.status-rejected { background: #fde2e6; color: #9c2334; }
.status-missing { background: #edf1f1; color: #5b6e6c; }
.period-select { min-width: 300px; }
.tracking-table th:first-child { min-width: 230px; }
.tracking-table td { min-width: 145px; }
.moderation-proof { width: 100%; max-height: 220px; object-fit: cover; border-radius: 1rem; background: #edf3f2; }
.strava-proof-card { min-height: 180px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; padding: 1rem; border-radius: 1rem; background: #fc4c02; color: #fff; text-align: center; text-decoration: none; }
.strava-proof-card:hover { color: #fff; filter: brightness(.95); }
.strava-proof-card strong { font-size: 1.35rem; }
.strava-proof-card span { font-size: .85rem; opacity: .9; overflow-wrap: anywhere; }
.submission-thumb-link { width: 64px; height: 64px; max-width: 64px; max-height: 64px; flex: 0 0 64px; display: block; overflow: hidden; border-radius: .75rem; background: #e7efee; }
.submission-thumb { width: 64px !important; height: 64px !important; max-width: 64px; max-height: 64px; object-fit: cover; border-radius: .75rem; display: block; }
.submission-proof-fallback { width: 64px; height: 64px; flex: 0 0 64px; display: grid; place-items: center; border-radius: .75rem; background: #fc4c02; color: #fff; font-size: .72rem; font-weight: 900; text-align: center; line-height: 1.05; }
.strava-panel { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem; border: 1px solid #e3eeec; border-radius: 1rem; background: #f8fbfa; }
.source-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.source-option { min-height: 48px; display: flex; align-items: center; gap: .6rem; padding: .75rem .9rem; border: 1px solid #d7e7e5; border-radius: .75rem; background: #fff; cursor: pointer; font-weight: 700; }
.source-option .form-check-input { flex: 0 0 auto; margin: 0; }
.source-option:has(.form-check-input:checked) { border-color: var(--viva-teal); background: #eef8f7; color: var(--viva-teal-dark); }
.rating-options { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .5rem; }
.rating-option { min-height: 44px; display: flex; align-items: center; justify-content: center; gap: .4rem; padding: .6rem; border: 1px solid #d7e7e5; border-radius: .75rem; background: #fff; cursor: pointer; font-weight: 800; }
.rating-option .form-check-input { margin: 0; }
.rating-option:has(.form-check-input:checked) { border-color: var(--viva-teal); background: #eef8f7; color: var(--viva-teal-dark); }
.sprint-shell { padding: 1.75rem; border-radius: 1rem; background: #fff; box-shadow: 0 .5rem 2rem rgba(20,80,75,.08); }
.sprint-shell-header { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1.25rem; }
.sprint-grid { --bs-gutter-x: 2rem; --bs-gutter-y: 2rem; }
.sprint-card { height: 100%; overflow: hidden; border: 1px solid #e3eeec; border-radius: 1rem; background: #fff; box-shadow: 0 .35rem 1.25rem rgba(20,80,75,.08); }
.sprint-card-header { padding: 1rem 1.1rem; color: #fff; background: var(--viva-teal); }
.sprint-card-2 .sprint-card-header { background: #568f32; }
.sprint-card-3 .sprint-card-header { background: #b88912; }
.sprint-frequency { font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; opacity: .88; }
.sprint-period { margin-top: .35rem; font-size: .98rem; font-weight: 800; }
.sprint-period span { display: block; margin-top: .15rem; font-size: .75rem; font-weight: 600; opacity: .82; }
.sprint-card-body { padding: .35rem 1rem; }
.sprint-row { display: flex; gap: .75rem; align-items: center; justify-content: space-between; padding: .85rem 0; border-bottom: 1px solid #e7efee; }
.sprint-row:last-child { border-bottom: 0; }
.sprint-activity { min-width: 0; }
.sprint-activity strong { display: block; line-height: 1.25; }
.sprint-activity span { display: block; margin-top: .2rem; color: #66817e; font-size: .75rem; }
.ranking-shell { border-radius: 1rem; overflow: hidden; max-width: 850px; margin: auto; }
.ranking-row { padding: 1.15rem 1.5rem; }
.rank-position { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: #e5f3f1; color: var(--viva-teal-dark); font-weight: 900; }
.rank-team-media { width: 32px; height: 32px; flex: 0 0 32px; }
.rank-team-image { width: 32px; height: 32px; border-radius: .6rem; object-fit: cover; display: block; }
.rank-team-fallback { width: 32px; height: 32px; border-radius: .6rem; background: var(--viva-teal); color: white; display: grid; place-items: center; font-weight: 900; font-size: .75rem; }
.ranking-row:first-child .rank-position { background: var(--viva-yellow); color: #543f00; }
.rank-score { color: var(--viva-teal-dark); font-size: 1.45rem; font-weight: 900; white-space: nowrap; }
.rank-score span { font-size: .7rem; text-transform: uppercase; }
@media (max-width: 1199.98px) {
  .navbar-nav { padding: .75rem 0; }
  .nav-account-group { margin: .65rem 0 0; padding-top: .75rem; border-top: 1px solid #e7efee; justify-content: space-between; }
  .nav-user-chip { max-width: calc(100% - 70px); }
}
@media (max-width: 576px) {
  .container { --bs-gutter-x: 1.25rem; }
  .card-body { padding: 1rem !important; }
  .dashboard-actions { width: 100%; min-width: 0; }
  .dashboard-support-actions { grid-template-columns: 1fr; }
  .hero { text-align: center; }
  .hero-logo { max-height: 260px; }
  .ranking-row { padding: 1rem; }
  .rank-score { font-size: 1.15rem; }
  .invite-row { align-items: flex-start; flex-direction: column; }
  .submission-row { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: start; gap: .75rem; }
  .submission-row > .status { grid-column: 2; justify-self: start; }
  .submission-row .flex-grow-1 { min-width: 0; }
  .submission-row strong, .submission-row .small { overflow-wrap: anywhere; }
  .brand-logo { height: 44px; }
  .nav-user-text { min-width: 0; }
  .nav-user-text > div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sprint-shell { padding: 1rem; margin-left: -.25rem; margin-right: -.25rem; background: linear-gradient(145deg, #e9f6f4, #f8fbfa); border: 1px solid #dcecea; box-shadow: none; }
  .sprint-grid { --bs-gutter-x: 1rem; --bs-gutter-y: 1rem; }
  .sprint-shell-header { margin-bottom: 1rem; }
  .sprint-card-header { padding: .9rem 1rem; }
  .sprint-row { align-items: flex-start; }
  .sprint-row .status { flex: 0 0 auto; max-width: 46%; text-align: center; white-space: normal; }
  .period-select { width: 100%; min-width: 0; }
  .moderation-proof { max-height: 180px; }
  .strava-panel { align-items: flex-start; flex-direction: column; }
  .source-options { grid-template-columns: 1fr; }
}
