input,
select,
textarea {
  font-size: 16px;
}

* {
  touch-action: manipulation;
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family:
    -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display',
    system-ui, Arial, sans-serif;
  background: #f4f6f8;
}

body {
  margin: 0;
  background: #f2f4f7;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

.dash-container {
  padding-bottom: 80px;
}

/* HEADER */
.dash-header {
  background: linear-gradient(135deg, #0d2b4d, #1e4d8f);
  color: white;
  padding: 24px 18px 60px;
  border-radius: 0 0 24px 24px;
  display: flex;
  justify-content: space-between;
}

.greeting {
  font-size: 20px;
  font-weight: 600;
}

.subtitle {
  font-size: 13px;
  opacity: 0.8;
}

.bell i {
  font-size: 20px;
  color: yellow;
}

/* =========================
   NOTIFICATION BADGE
========================= */

.bell {
  position: relative;
}

.badge {
  position: absolute;
  top: -4px;
  right: -6px;

  background: #ff3b30;
  color: #fff;

  font-size: 10px;
  font-weight: bold;

  padding: 2px 6px;
  border-radius: 10px;

  min-width: 16px;
  text-align: center;
}

/* CARD */
.card {
  background: white;
  margin: 12px 16px;
  padding: 16px;
  border-radius: 18px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}

/* PROGRESS */
.progress-card {
  display: flex;
  gap: 20px;
}

.circle {
  width: 90px;
  height: 90px;
  border: 6px solid #2f80ed;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-weight: bold;
}

.progress-right {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stat {
  background: #f7f8fa;
  padding: 10px;
  border-radius: 10px;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
}

/* NEXT */
.next-card {
  margin-top: 0;
}

.next-header {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 10px;
}

.eta {
  color: #2f80ed;
}

.next-body {
  display: flex;
  align-items: center;
  gap: 12px;
}

.time-box {
  background: #f2f4f7;
  padding: 10px;
  border-radius: 10px;
  text-align: center;
}

.time {
  font-size: 18px;
  font-weight: bold;
}

.info {
  flex: 1;
}

.client {
  font-weight: bold;
}

.address {
  font-size: 12px;
  color: #666;
}

.go-btn {
  background: #2f80ed;
  color: white;
  border-radius: 50%;
  padding: 10px 14px;
  cursor: pointer;
}

/* ROUTE */
.timeline {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
}

.timeline div {
  font-size: 12px;
}

/* ACTIONS */
.actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.action {
  display: flex;
  align-items: center;
  gap: 10px;

  padding: 14px;
  border-radius: 12px;
  background: #f7f8fa;

  font-size: 14px;
  cursor: pointer;
}

.action i {
  font-size: 18px;
  color: #2f80ed;
}

/* =========================
   TIMELINE PREMIUM
========================= */

/* =========================
   TIMELINE SCROLL PRO
========================= */

.timeline-wrapper {
  overflow-x: auto;
  padding-bottom: 10px;
}

.timeline {
  display: flex;
  gap: 40px;
  min-width: max-content;
  padding: 10px 20px;
  position: relative;
}

.timeline-line {
  position: absolute;
  top: 18px;
  left: 0;
  right: 0;
  height: 2px;
  background: #ddd;
  z-index: 1;
}

.timeline-item {
  flex: 0 0 auto;
  text-align: center;
  scroll-snap-align: center;
  position: relative;
  z-index: 2;
  width: 100px;
}

.timeline-wrapper {
  scroll-snap-type: x mandatory;
}

.timeline-item .dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  margin: 0 auto;
  background: #ccc;
}

/* estados */
.timeline-item.done .dot {
  background: #27ae60;
}

.timeline-item.current .dot {
  background: #f2994a;
  box-shadow: 0 0 0 4px rgba(242, 153, 74, 0.2);
}

.timeline-item.pending .dot {
  background: #2f80ed;
}

.timeline-item .time {
  font-size: 12px;
  margin-top: 8px;
}

.timeline-item .label {
  font-size: 11px;
  color: #666;
}

/* =========================
   PROGRESS RING
========================= */

.circle {
  position: relative;
  width: 90px;
  height: 90px;
}

.progress-ring {
  display: block;
}

.progress-ring-bg {
  fill: none;
  stroke: #e6e6e6;
  stroke-width: 6;
}

.progress-ring-fill {
  fill: none;
  stroke: #00c23d;
  stroke-width: 6;
  stroke-linecap: butt;

  transform: rotate(-90deg);
  transform-origin: 45px 45px; /* 🔥 FIX REAL */

  transition: stroke-dashoffset 0.6s ease;
}

.circle-center {
  position: absolute;
  top: 50%;
  left: 50%;

  transform: translate(-50%, -50%); /* 🔥 FIX REAL */

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  font-weight: bold;
  text-align: center;
}

/* =========================
   NEXT VISIT PRO
========================= */

.next-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  margin-bottom: 10px;
}

.next-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.next-title i {
  color: #2f80ed;
}

.eta {
  color: #2f80ed;
  font-weight: 500;
}

.next-body {
  display: flex;
  align-items: center;
  gap: 12px;
}

.time-box {
  background: #f2f4f7;
  padding: 10px;
  border-radius: 12px;
  text-align: center;
  width: 60px;
}

.time {
  font-size: 18px;
  font-weight: bold;
}

.info {
  flex: 1;
}

.client {
  font-weight: 600;
}

.address {
  font-size: 12px;
  color: #666;
  margin-bottom: 6px;
}

.service-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  background: #e6f0ff;
  color: #2f80ed;

  font-size: 11px;
  padding: 4px 8px;
  border-radius: 8px;
}

.go-btn {
  background: #2f80ed;
  color: white;
  border-radius: 50%;
  width: 36px;
  height: 36px;

  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
}

/* =========================
   ANIMATIONS
========================= */

.fade-in {
  opacity: 0;
  transform: translateY(10px);
  animation: fadeInUp 0.4s ease forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.delay-1 {
  animation-delay: 0.1s;
}
.delay-2 {
  animation-delay: 0.2s;
}
.delay-3 {
  animation-delay: 0.3s;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* delay para cascada */
.delay-1 {
  animation-delay: 0.1s;
}
.delay-2 {
  animation-delay: 0.2s;
}
.delay-3 {
  animation-delay: 0.3s;
}

/* botones */
.action {
  transition: all 0.2s ease;
}

.action:active {
  transform: scale(0.96);
}

/* next visit */
.next-card {
  transition: all 0.3s ease;
}

.next-card.show {
  animation: fadeInUp 0.4s ease;
}

/* go button */
.go-btn {
  transition: all 0.2s ease;
}

.go-btn:active {
  transform: scale(0.9);
}

html {
  scroll-behavior: smooth;
}
