:root {
  --bg: #07111c;
  --bg-soft: #0b1724;
  --card: #101d2a;
  --card-2: #132231;
  --border: rgba(255, 255, 255, 0.06);

  --text: #f4f7fb;
  --muted: #8d9bab;

  --blue: #2498ff;
  --green: #42d45b;
  --purple: #9665e8;
  --orange: #ff7a32;
  --red: #ef476f;

  --radius: 17px;

  --safe-top: env(safe-area-inset-top);
  --safe-bottom: env(safe-area-inset-bottom);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at 50% -10%, #14283a 0%, transparent 35%),
    var(--bg);
  color: var(--text);

  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "SF Pro Display",
    "Segoe UI",
    sans-serif;
}

body {
  min-height: 100vh;
}

button {
  font: inherit;
}

/* =========================================================
   APP
   ========================================================= */

.app-shell {
  width: 100%;
  max-width: 520px;
  min-height: 100vh;
  margin: 0 auto;
  padding-bottom: calc(94px + var(--safe-bottom));
}

.app-booting .app-shell {
  opacity: 0;
  visibility: hidden;
}

.app-splash {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 13px;
  padding: calc(26px + var(--safe-top)) 28px calc(28px + var(--safe-bottom));
  background:
    radial-gradient(circle at 50% 22%, rgba(36, 152, 255, 0.18), transparent 34%),
    radial-gradient(circle at 50% 72%, rgba(66, 212, 91, 0.12), transparent 28%),
    #07111c;
  color: var(--text);
  opacity: 1;
  transition: opacity 0.32s ease, visibility 0.32s ease;
}

.app-splash.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.app-splash-scene {
  position: relative;
  width: min(72vw, 310px);
  height: 112px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.app-splash-runner {
  width: 48px;
  height: 48px;
  color: var(--blue);
  filter: drop-shadow(0 0 18px rgba(36, 152, 255, 0.34));
  animation: appSplashRun 1.05s ease-in-out infinite;
}

.app-splash-satellite {
  width: 58px;
  height: 58px;
  color: #72f1a7;
  filter: drop-shadow(0 0 18px rgba(66, 212, 91, 0.26));
  animation: appSplashFloat 1.7s ease-in-out infinite;
}

.app-splash-track {
  position: absolute;
  left: 60px;
  right: 70px;
  top: 54px;
  height: 2px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(141, 155, 171, 0.18);
}

.app-splash-track span {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, var(--blue), #72f1a7);
  animation: appSplashSignal 1.1s ease-in-out infinite;
}

.app-splash-title {
  font-size: 34px;
  line-height: 1;
  font-weight: 850;
  letter-spacing: 0.02em;
}

.app-splash-subtitle {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
}

.app-splash-progress {
  width: min(52vw, 210px);
  height: 5px;
  margin-top: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(141, 155, 171, 0.16);
}

.app-splash-progress span {
  display: block;
  width: 46%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), #72f1a7);
  animation: appSplashProgress 1.2s ease-in-out infinite;
}

@keyframes appSplashRun {
  0%, 100% {
    transform: translate3d(0, 2px, 0) rotate(-3deg);
  }
  50% {
    transform: translate3d(12px, -3px, 0) rotate(4deg);
  }
}

@keyframes appSplashFloat {
  0%, 100% {
    transform: translateY(-3px) rotate(-4deg);
  }
  50% {
    transform: translateY(5px) rotate(5deg);
  }
}

@keyframes appSplashSignal {
  0% {
    transform: translateX(-120%);
    opacity: 0;
  }
  20%, 80% {
    opacity: 1;
  }
  100% {
    transform: translateX(250%);
    opacity: 0;
  }
}

@keyframes appSplashProgress {
  0% {
    transform: translateX(-110%);
  }
  55% {
    transform: translateX(78%);
  }
  100% {
    transform: translateX(235%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-splash-runner,
  .app-splash-satellite,
  .app-splash-track span,
  .app-splash-progress span {
    animation: none;
  }
}

/* =========================================================
   HEADER
   ========================================================= */

.topbar {
  min-height: 82px;
  padding:
    calc(14px + var(--safe-top))
    20px
    13px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  background: rgba(8, 20, 31, 0.86);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);

  border-bottom: 1px solid var(--border);

  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.brand-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.brand h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.1;
  font-weight: 750;
  letter-spacing: -0.4px;
}

.brand p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);

  box-shadow:
    0 0 0 5px rgba(66, 212, 91, 0.08),
    0 0 14px rgba(66, 212, 91, 0.45);
}

/* =========================================================
   DASHBOARD
   ========================================================= */

.dashboard {
  padding: 14px 14px 30px;
}

.coach-analysis-card {
  margin-bottom: 14px;
  padding: 15px 16px;
  border-color: rgba(0, 208, 255, .16);
}

.coach-analysis-card .card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.coach-analysis-card .card-header small {
  color: var(--blue);
  font-size: 9px;
}

.coach-analysis-empty {
  margin-top: 11px;
  color: var(--muted);
  font-size: 12px;
}

.card {
  background:
    linear-gradient(
      145deg,
      rgba(20, 35, 49, 0.96),
      rgba(13, 27, 39, 0.96)
    );

  border: 1px solid var(--border);
  border-radius: var(--radius);

  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.18);

  overflow: hidden;
}

.card-header {
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #dfe7ee;
}

/* =========================================================
   FORME DU JOUR
   ========================================================= */

.hero-card {
  padding: 17px;
  margin-bottom: 12px;
}

.hero-content {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 15px;
}

.score-ring {
  width: 116px;
  height: 116px;
  flex: 0 0 116px;

  border-radius: 50%;

  display: grid;
  place-items: center;

  background:
    conic-gradient(
      var(--green) 0deg 280deg,
      #263846 280deg 360deg
    );

  position: relative;
}

.score-ring::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: #10202c;
}

.score-ring-inner {
  position: relative;
  z-index: 2;
}

.score-ring-inner span {
  font-size: 38px;
  font-weight: 750;
  letter-spacing: -1px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.hero-copy strong {
  font-size: 25px;
  color: var(--green);
}

.hero-copy span {
  color: var(--muted);
  font-size: 14px;
}

/* =========================================================
   METRICS
   ========================================================= */

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 11px;
}

.metric-card {
  min-height: 165px;
  padding: 15px;

  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.metric-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  flex: 1;
  gap: 6px;
}

.metric-main.compact {
  align-items: flex-start;
  justify-content: flex-end;
}

.metric-value {
  font-size: 30px;
  font-weight: 750;
  letter-spacing: -1px;
}

.metric-value.small {
  font-size: 25px;
}

.metric-secondary {
  color: var(--muted);
  font-size: 13px;
}

/* =========================================================
   SOMMEIL
   ========================================================= */

.metric-card:nth-child(1) .metric-main {
  position: relative;
}

.metric-card:nth-child(1) .metric-main::before {
  content: "";
  position: absolute;

  width: 92px;
  height: 92px;

  border-radius: 50%;

  border: 8px solid rgba(150, 101, 232, 0.17);
  border-top-color: var(--purple);
  border-right-color: var(--purple);

  transform: rotate(25deg);
}

.metric-card:nth-child(1) .metric-value,
.metric-card:nth-child(1) .metric-secondary {
  position: relative;
  z-index: 2;
}

/* =========================================================
   BODY BATTERY
   ========================================================= */

.metric-card:nth-child(2) .metric-main {
  position: relative;
}

.metric-card:nth-child(2) .metric-main::before {
  content: "";
  position: absolute;

  width: 92px;
  height: 92px;

  border-radius: 50%;

  border: 8px solid rgba(36, 152, 255, 0.15);
  border-top-color: var(--blue);
  border-right-color: var(--blue);
  border-bottom-color: var(--blue);

  transform: rotate(15deg);
}

.metric-card:nth-child(2) .metric-value,
.metric-card:nth-child(2) .metric-secondary {
  position: relative;
  z-index: 2;
}

/* =========================================================
   HRV
   ========================================================= */

.sparkline-placeholder {
  height: 52px;
  display: flex;
  align-items: center;
}

.sparkline-line {
  width: 100%;
  height: 34px;

  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 40'%3E%3Cpath d='M0 28 L12 24 L20 8 L28 31 L40 22 L52 26 L65 13 L76 30 L88 27 L100 29 L112 15 L123 28 L136 25 L148 8 L158 29 L171 21 L183 27 L200 20' fill='none' stroke='%2342d45b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / 100% 100%
    no-repeat;

  filter: drop-shadow(0 0 5px rgba(66, 212, 91, 0.35));
}

/* =========================================================
   HEART RATE
   ========================================================= */

.heart-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 25px;
}

.heart-icon {
  color: var(--red);
  font-size: 28px;

  filter:
    drop-shadow(0 0 8px rgba(239, 71, 111, 0.28));
}

/* =========================================================
   TRAINING LOAD
   ========================================================= */

.load-card {
  margin-top: 11px;
  padding: 16px;
  cursor: pointer;
}

.load-card:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.load-content {
  min-height: 105px;

  display: flex;
  align-items: flex-end;
  gap: 20px;

  padding-top: 14px;
}

.load-bars {
  height: 75px;
  flex: 1;

  display: flex;
  align-items: flex-end;
  gap: 8px;

  padding-bottom: 5px;

  border-bottom: 1px solid rgba(255,255,255,.08);
}

.load-bars span {
  flex: 1;

  min-width: 5px;

  background:
    linear-gradient(
      to top,
      #1667b5,
      var(--blue)
    );

  border-radius: 3px 3px 0 0;

  box-shadow:
    0 0 7px rgba(36, 152, 255, 0.22);
}

.load-score {
  min-width: 72px;

  display: flex;
  flex-direction: column;
  align-items: flex-start;

  padding-bottom: 7px;
}

.load-score strong {
  font-size: 30px;
}

.load-score span {
  color: var(--muted);
  font-size: 12px;
}

.training-load-dialog {
  width: min(92vw, 520px);
  padding: 0;
  color: var(--text);
  background: #101923;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(0,0,0,.55);
}

.training-load-dialog::backdrop {
  background: rgba(2,7,13,.76);
  backdrop-filter: blur(4px);
}

.training-load-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px 18px 10px;
}

.training-load-dialog-close {
  width: 34px;
  height: 34px;
  color: var(--muted);
  background: rgba(255,255,255,.06);
  border: 0;
  border-radius: 50%;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.training-load-formula {
  margin: 0 18px 13px;
  padding: 10px 12px;
  color: var(--blue);
  background: rgba(36,152,255,.09);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.training-load-breakdown {
  display: grid;
  gap: 7px;
  padding: 0 18px;
}

.training-load-day {
  display: grid;
  grid-template-columns: 46px 58px 1fr 38px 40px;
  align-items: center;
  gap: 7px;
  padding: 10px 11px;
  background: rgba(255,255,255,.035);
  border-radius: 10px;
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}

.training-load-day strong {
  color: var(--text);
  text-align: left;
  text-transform: capitalize;
}

.training-load-day b {
  color: var(--green);
  font-size: 13px;
}

.training-load-empty {
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

.training-load-sources {
  padding: 13px 18px 18px;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

@media (max-width: 390px) {
  .training-load-day {
    grid-template-columns: 42px 52px 1fr 34px 36px;
    gap: 5px;
    padding-inline: 8px;
  }
}

/* =========================================================
   ACTIVITY
   ========================================================= */

.section-title {
  margin: 23px 2px 10px;

  color: var(--blue);

  font-size: 14px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: .4px;
}

.activity-card {
  min-height: 88px;

  display: flex;
  align-items: center;

  padding: 14px;
}

.activity-icon {
  width: 49px;
  height: 49px;

  flex: 0 0 49px;

  display: grid;
  place-items: center;

  border-radius: 50%;

  background: rgba(36, 152, 255, 0.17);

  font-size: 23px;
}

.activity-info {
  flex: 1;

  min-width: 0;

  display: flex;
  flex-direction: column;
  gap: 5px;

  margin-left: 12px;
}

.activity-info strong {
  font-size: 16px;

  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.activity-info span {
  color: var(--muted);
  font-size: 12px;
}

.activity-stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;

  margin-left: 10px;
}

.activity-stats strong {
  font-size: 16px;
}

.activity-stats span {
  color: var(--muted);
  font-size: 12px;
}

/* =========================================================
   BOTTOM NAVIGATION
   ========================================================= */

.bottom-nav {
  position: fixed;

  left: 50%;
  bottom: 0;

  transform: translateX(-50%);

  width: 100%;
  max-width: 520px;

  height: calc(73px + var(--safe-bottom));

  padding:
    8px
    7px
    calc(7px + var(--safe-bottom));

  display: grid;
  grid-template-columns: repeat(5, 1fr);

  background: rgba(8, 19, 29, 0.94);

  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);

  border-top: 1px solid var(--border);

  z-index: 30;
}

.nav-item {
  border: 0;
  background: transparent;
  color: #7f8b98;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  gap: 3px;

  cursor: pointer;
}

.nav-item span:last-child {
  font-size: 10px;
}

.nav-icon {
  font-size: 21px;
  line-height: 1;
}

.nav-icon svg {
  display: block;
  width: 26px;
  height: 26px;
  stroke: currentColor;
}

.nav-item.active {
  color: var(--blue);
}

/* =========================================================
   DESKTOP
   ========================================================= */

@media (min-width: 700px) {

  body {
    padding: 30px 0;
  }

  .app-shell {
    min-height: calc(100vh - 60px);

    border-radius: 30px;

    overflow: hidden;

    box-shadow:
      0 30px 80px rgba(0,0,0,.45);

    border: 1px solid rgba(255,255,255,.07);
  }

  .topbar {
    padding-top: 18px;
  }

  .bottom-nav {
    bottom: 30px;

    border-radius: 0 0 30px 30px;
  }
}

/* =========================================================
   CARTE INTERACTIVE LEAFLET
   ========================================================= */

#activity-map {
  width: 100%;
  height: 360px;
  min-height: 360px;

  border-radius: 14px;
  overflow: hidden;

  background: rgba(255, 255, 255, 0.02);
}


/* Contrôles Leaflet */

#activity-map .leaflet-control-zoom {
  border: none;

  box-shadow:
    0 4px 14px
    rgba(0, 0, 0, 0.25);
}


#activity-map .leaflet-control-zoom a {
  background: rgba(20, 24, 30, 0.92);

  color: #fff;

  border-color:
    rgba(255, 255, 255, 0.08);
}


#activity-map .leaflet-control-attribution {
  font-size: 8px;

  background:
    rgba(15, 18, 22, 0.75);

  color:
    rgba(255, 255, 255, 0.6);
}


#activity-map .leaflet-control-attribution a {
  color:
    rgba(255, 255, 255, 0.8);
}


/* =========================================================
   CARTE SUR MOBILE
   ========================================================= */

@media (max-width: 600px) {

  #activity-map {
    height: 300px;
    min-height: 300px;
  }

}

/* =========================================================
   HEADER IA COACH
   ========================================================= */

.topbar {
  min-height: 76px !important;
  height: auto !important;

  padding:
    calc(10px + env(safe-area-inset-top))
    18px
    10px !important;

  display: flex;
  align-items: center;
  justify-content: space-between;

  border-bottom: 1px solid rgba(255,255,255,.06);
}

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

.brand-logo {
  width: 42px;
  height: 42px;

  flex: 0 0 42px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 12px;

  background:
    linear-gradient(
      145deg,
      rgba(0, 208, 255, .18),
      rgba(47, 218, 113, .10)
    );

  border: 1px solid rgba(255,255,255,.08);
}

.brand-logo img {
  display: block;

  width: 32px;
  height: 32px;

  object-fit: contain;
}

.brand-text {
  min-width: 0;
}

.brand-text h1 {
  margin: 0;

  font-size: 18px;
  line-height: 1.15;
  font-weight: 750;

  letter-spacing: -0.3px;

  color: var(--text, #fff);
}

.brand-text h1 span {
  font-size: 13px;
  font-weight: 500;

  color: var(--muted, #8fa0ad);
}

.brand-text p {
  margin: 4px 0 0;

  font-size: 11px;
  line-height: 1.2;

  color: var(--muted, #8fa0ad);
}

.status-dot {
  width: 10px;
  height: 10px;

  flex: 0 0 10px;

  margin-left: 12px;

  border-radius: 50%;

  background: var(--green, #2fda71);

  box-shadow:
    0 0 0 5px rgba(47,218,113,.08),
    0 0 12px rgba(47,218,113,.55);
}


/* =========================================================
   CHAT IA COACH
   ========================================================= */

.ia-chat-card {
  margin-top: 11px;
  padding: 15px;
  border-color: rgba(36, 152, 255, .18);
}

.ia-chat-card .card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ia-chat-card .card-header small {
  color: var(--blue);
  font-size: 9px;
}

.ia-chat-messages {
  max-height: 250px;
  overflow-y: auto;
  display: grid;
  gap: 9px;
  margin-top: 12px;
  padding-right: 2px;
}

.ia-chat-message {
  max-width: 88%;
  padding: 10px 11px;
  border-radius: 13px;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.055);
}

.ia-chat-message.user {
  justify-self: end;
  background: rgba(36, 152, 255, .16);
  border-color: rgba(36, 152, 255, .22);
}

.ia-chat-message strong {
  display: block;
  margin-bottom: 4px;
  color: var(--blue);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .35px;
}

.ia-chat-message.user strong {
  color: #d8ecff;
}

.ia-chat-message p {
  margin: 0;
  color: var(--text);
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.ia-chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.ia-chat-suggestions button {
  border: 1px solid rgba(36, 152, 255, .2);
  border-radius: 999px;
  padding: 7px 9px;
  color: #d8ecff;
  background: rgba(36, 152, 255, .1);
  font-size: 11px;
  font-weight: 700;
}

.ia-chat-form {
  display: flex;
  gap: 8px;
  margin-top: 11px;
}

.ia-chat-form input {
  min-width: 0;
  flex: 1;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 11px 12px;
  color: var(--text);
  background: rgba(255,255,255,.055);
  outline: none;
}

.ia-chat-form input:focus {
  border-color: rgba(36, 152, 255, .55);
}

.ia-chat-form button {
  border: 0;
  border-radius: 12px;
  padding: 0 12px;
  color: #03111d;
  background: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.ia-chat-form button:disabled {
  opacity: .55;
}

.ia-chat-status {
  min-height: 15px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
}

/* Global manual sync status */
.global-refresh-status {
  position: fixed;
  top: calc(62px + env(safe-area-inset-top));
  right: 20px;
  z-index: 45;
  min-width: 38px;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(36, 152, 255, .16);
  color: #cfeaff;
  border: 1px solid rgba(36, 152, 255, .34);
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
  text-align: center;
  box-shadow: 0 7px 18px rgba(0, 0, 0, .18);
  pointer-events: none;
}

.global-refresh-status[data-state="pending"] {
  min-width: 52px;
  background: rgba(255, 193, 7, .14);
  color: #ffe7a3;
  border-color: rgba(255, 193, 7, .34);
}

.global-refresh-status[data-state="success"],
.global-refresh-status[data-state="partial"] {
  background: rgba(66, 212, 91, .18);
  color: #d8ffe2;
  border-color: rgba(66, 212, 91, .38);
}

.global-refresh-status[data-state="empty"],
.global-refresh-status[data-state="error"] {
  background: rgba(239, 71, 111, .18);
  color: #ffd3dd;
  border-color: rgba(239, 71, 111, .36);
}


/* Pull-to-refresh manual sync */
.global-pull-refresh {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 14px);
  left: 50%;
  z-index: 80;
  transform: translate(-50%, calc(-58px + var(--pull-distance, 0px)));
  opacity: 0;
  pointer-events: none;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(45, 156, 255, 0.45);
  background: rgba(11, 28, 42, 0.92);
  color: #dceeff;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.24);
  transition: opacity 0.16s ease, transform 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.global-pull-refresh[data-state="pulling"],
.global-pull-refresh[data-state="armed"] {
  opacity: 1;
}

.global-pull-refresh[data-state="armed"],
.global-pull-refresh[data-state="success"],
.global-pull-refresh[data-state="partial"] {
  border-color: rgba(69, 226, 143, 0.62);
  color: #72f1a7;
}

.global-pull-refresh[data-state="pending"] {
  border-color: rgba(45, 156, 255, 0.62);
  color: #9fd4ff;
}

.global-pull-refresh[data-state="error"] {
  border-color: rgba(255, 88, 128, 0.72);
  color: #ffd6df;
}


/* Header sync activity indicator */
.global-sync-indicator {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #72f1a7;
  opacity: 0;
  transform: scale(0.88);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.global-sync-indicator:not([hidden]) {
  opacity: 1;
  transform: scale(1);
}

.global-sync-indicator[hidden] {
  display: none;
}

.global-sync-indicator span {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 3px solid rgba(114, 241, 167, 0.22);
  border-top-color: currentColor;
  animation: iaCoachSyncSpin 0.78s linear infinite;
}

@keyframes iaCoachSyncSpin {
  to {
    transform: rotate(360deg);
  }
}
