/* STARS RCM PRO — FieldSync Offline Foundation v3.9.0-r1 */
.stars-offline-indicator {
  position: fixed;
  z-index: 1450;
  right: max(10px, env(safe-area-inset-right));
  bottom: calc(76px + env(safe-area-inset-bottom));
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px;
  color: #fff;
  background: rgba(15,23,31,.94);
  box-shadow: 0 8px 28px rgba(0,0,0,.38);
  font: 800 10px/1.1 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  letter-spacing: .55px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.stars-offline-indicator.online { color: #7bf7ad; border-color: rgba(65,214,126,.45); }
.stars-offline-indicator.pending { color: #ffd35b; border-color: rgba(255,190,0,.55); }
.stars-offline-indicator.offline { color: #ffca72; border-color: rgba(255,145,54,.58); }
.stars-offline-indicator.error { color: #ff8994; border-color: rgba(255,71,87,.62); }
.stars-offline-indicator.syncing { color: #7fdcff; border-color: rgba(74,189,255,.62); }
.stars-offline-indicator.syncing::first-letter { animation: stars-sync-spin 1s linear infinite; }
@keyframes stars-sync-spin { to { transform: rotate(360deg); } }

.stars-offline-toast {
  position: fixed;
  z-index: 1900;
  left: 50%;
  bottom: calc(118px + env(safe-area-inset-bottom));
  width: max-content;
  max-width: calc(100vw - 32px);
  padding: 11px 16px;
  border: 1px solid rgba(255,190,0,.5);
  border-radius: 12px;
  color: #fff3c4;
  background: rgba(20,25,31,.98);
  box-shadow: 0 14px 38px rgba(0,0,0,.45);
  font: 750 12px/1.3 system-ui,-apple-system,sans-serif;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%,14px);
  transition: .22s ease;
}
.stars-offline-toast.show { opacity: 1; transform: translate(-50%,0); }

.stars-sync-modal {
  position: fixed;
  z-index: 2100;
  inset: 0;
  display: none;
  font-family: system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
.stars-sync-modal.open { display: block; }
.stars-sync-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.64);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
.stars-sync-sheet {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  overflow: auto;
  max-height: 88dvh;
  padding: 8px 14px calc(20px + env(safe-area-inset-bottom));
  color: #edf4f8;
  background: #11181f;
  border: 1px solid #293641;
  border-bottom: 0;
  border-radius: 23px 23px 0 0;
  box-shadow: 0 -18px 48px rgba(0,0,0,.48);
}
.stars-sync-grab {
  width: 50px;
  height: 5px;
  margin: 2px auto 14px;
  border-radius: 99px;
  background: #465663;
}
.stars-sync-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.stars-sync-head small {
  color: #ffc400;
  font-weight: 900;
  letter-spacing: 1.2px;
}
.stars-sync-head h2 { margin: 2px 0 0; font-size: 20px; }
.stars-sync-head button {
  width: 38px;
  height: 38px;
  border: 1px solid #34434f;
  border-radius: 50%;
  color: #dfe8ed;
  background: #1b252d;
  font-size: 23px;
}
.stars-sync-health {
  margin-top: 14px;
  padding: 13px;
  border: 1px solid #35444e;
  border-radius: 14px;
  background: #192229;
}
.stars-sync-health strong { display: block; font-size: 13px; }
.stars-sync-health small { display: block; margin-top: 5px; color: #9aabb5; }
.stars-sync-health.online strong { color: #6af09f; }
.stars-sync-health.pending strong { color: #ffd35b; }
.stars-sync-health.offline strong { color: #ffbd69; }
.stars-sync-health.error strong { color: #ff8490; }
.stars-sync-health.syncing strong { color: #72d6ff; }
.stars-sync-metrics {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 8px;
  margin-top: 10px;
}
.stars-sync-metrics div {
  min-width: 0;
  padding: 11px 8px;
  border: 1px solid #2c3943;
  border-radius: 12px;
  text-align: center;
  background: #151e25;
}
.stars-sync-metrics b {
  display: block;
  overflow: hidden;
  color: #fff;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stars-sync-metrics small { color: #8396a2; font-size: 9px; text-transform: uppercase; }
.stars-sync-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}
.stars-sync-actions button {
  min-height: 42px;
  padding: 9px;
  border: 1px solid #dba800;
  border-radius: 11px;
  color: #0c1115;
  background: #ffc400;
  font-size: 10px;
  font-weight: 900;
}
.stars-sync-actions button + button {
  color: #ffd75c;
  background: #1d262d;
}
.stars-sync-actions button:disabled { opacity: .6; }
.stars-sync-note {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid rgba(76,153,201,.3);
  border-radius: 10px;
  color: #a8c7d9;
  background: rgba(41,103,139,.1);
  font-size: 10px;
  line-height: 1.45;
}
.stars-sync-list { margin-top: 12px; }
.stars-sync-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
  padding: 10px;
  border: 1px solid #2a3740;
  border-radius: 11px;
  background: #151e25;
}
.stars-sync-row > div { min-width: 0; }
.stars-sync-row b {
  display: block;
  overflow: hidden;
  color: #e9f0f4;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stars-sync-row small { color: #80939f; font-size: 9px; }
.stars-sync-row p { margin: 4px 0 0; color: #ff9ba3; font-size: 9px; }
.stars-sync-row span {
  flex: none;
  padding: 4px 7px;
  border-radius: 999px;
  color: #ffd35b;
  background: rgba(255,190,0,.12);
  font-size: 8px;
  font-weight: 900;
}
.stars-sync-row.failed span,
.stars-sync-row.auth_required span,
.stars-sync-row.conflict span {
  color: #ff8994;
  background: rgba(255,71,87,.12);
}
.stars-sync-empty {
  padding: 20px 10px;
  color: #96a8b3;
  text-align: center;
  font-size: 12px;
}
.stars-sync-sheet footer {
  padding: 12px 0 0;
  color: #657782;
  text-align: center;
  font-size: 9px;
}

@media (min-width: 700px) {
  .stars-sync-sheet {
    right: 18px;
    bottom: 18px;
    left: auto;
    width: min(520px,calc(100vw - 36px));
    max-height: 84vh;
    border-bottom: 1px solid #293641;
    border-radius: 23px;
  }
  .stars-offline-indicator { bottom: 18px; }
}
