/* ────────────────────────────────────────────
   ORDER TRACKING VIEW (active order)
──────────────────────────────────────────── */
    #view-tracking {
      background: var(--cream);
    }

    .tracking-hero {
      background: var(--ink);
      padding: 28px 20px 32px;
      color: var(--cream);
      position: relative;
      overflow: hidden;
    }

    .tracking-hero::before {
      content: '';
      position: absolute;
      inset: 0;
      background:
        radial-gradient(circle at 80% 20%, rgba(200, 75, 47, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 20% 90%, rgba(192, 125, 42, 0.2) 0%, transparent 40%);
    }

    .tracking-hero-content {
      position: relative;
      z-index: 1;
    }

    .tracking-status-icon {
      width: 48px;
      height: 48px;
      margin-bottom: 12px;
      animation: float 3s ease-in-out infinite;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }

    .tracking-status-icon .app-icon,
    .tracking-status-icon svg {
      width: 48px;
      height: 48px;
    }

    @keyframes float {

      0%,
      100% {
        transform: translateY(0);
      }

      50% {
        transform: translateY(-6px);
      }
    }

    .tracking-status-title {
      font-family: var(--serif);
      font-size: 28px;
      font-weight: 700;
      letter-spacing: -0.5px;
      margin-bottom: 6px;
    }

    .tracking-status-msg {
      font-size: 14px;
      opacity: 0.7;
      line-height: 1.4;
    }

    /* Progress steps */
    .order-progress {
      padding: 20px;
    }

    .progress-track {
      display: flex;
      flex-direction: column;
      gap: 0;
    }

    .progress-step {
      display: flex;
      gap: 14px;
      position: relative;
    }

    .progress-step:not(:last-child)::after {
      content: '';
      position: absolute;
      left: 15px;
      top: 36px;
      width: 2px;
      height: calc(100% - 10px);
      background: var(--cream3);
    }

    .progress-step.done::after {
      background: var(--green);
    }

    .step-dot {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      background: var(--cream3);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 14px;
      flex-shrink: 0;
      margin-top: 4px;
      z-index: 1;
      transition: all 0.4s;
    }

    .progress-step.done .step-dot {
      background: var(--green);
      animation: stepPop 0.4s ease;
    }

    .progress-step.active .step-dot {
      background: var(--rust);
      animation: pulse-step 2s infinite;
    }

    @keyframes stepPop {
      0% {
        transform: scale(0.8);
      }

      50% {
        transform: scale(1.15);
      }

      100% {
        transform: scale(1);
      }
    }

    @keyframes pulse-step {

      0%,
      100% {
        box-shadow: 0 0 0 0 rgba(200, 75, 47, 0.4);
      }

      50% {
        box-shadow: 0 0 0 6px rgba(200, 75, 47, 0);
      }
    }

    .step-info {
      padding: 4px 0 24px;
    }

    .step-title {
      font-size: 14px;
      font-weight: 600;
      color: var(--ink);
    }

    .step-sub {
      font-size: 12px;
      color: var(--ink3);
      margin-top: 2px;
    }

    .progress-step:not(.done):not(.active) .step-title {
      color: var(--ink4);
    }

    /* Driver info card */
    .driver-card {
      margin: 0 20px 16px;
      background: var(--white);
      border-radius: var(--radius-lg);
      padding: 16px;
      display: flex;
      align-items: center;
      gap: 14px;
      box-shadow: var(--shadow-sm);
    }

    .driver-avatar {
      width: 52px;
      height: 52px;
      border-radius: 50%;
      background: var(--cream2);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 24px;
      flex-shrink: 0;
    }

    .driver-info {
      flex: 1;
    }

    .driver-name {
      font-size: 15px;
      font-weight: 700;
      margin-bottom: 2px;
    }

    .driver-meta {
      font-size: 12px;
      color: var(--ink3);
    }

    .driver-rating {
      color: var(--amber);
      font-weight: 600;
    }

    /* Live location badge */
    .live-badge {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      background: rgba(45, 106, 79, 0.12);
      color: var(--green);
      padding: 5px 10px;
      border-radius: var(--radius-full);
      font-size: 11px;
      font-weight: 600;
    }

    .live-dot {
      width: 6px;
      height: 6px;
      background: var(--green);
      border-radius: 50%;
      animation: blink 1.2s ease-in-out infinite;
    }

    @keyframes blink {

      0%,
      100% {
        opacity: 1;
      }

      50% {
        opacity: 0.2;
      }
    }

    /* Map placeholder */
    .map-placeholder {
      margin: 0 20px 16px;
      height: 180px;
      background: var(--cream2);
      border-radius: var(--radius-lg);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 8px;
      overflow: hidden;
      position: relative;
      box-shadow: var(--shadow-sm);
    }

    .map-grid {
      position: absolute;
      inset: 0;
      background-image:
        linear-gradient(var(--cream3) 1px, transparent 1px),
        linear-gradient(90deg, var(--cream3) 1px, transparent 1px);
      background-size: 30px 30px;
      opacity: 0.6;
    }

    .map-driver-dot {
      width: 40px;
      height: 40px;
      background: var(--rust);
      border-radius: 50% 50% 50% 0;
      transform: rotate(-45deg);
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 4px 12px rgba(200, 75, 47, 0.4);
      position: relative;
      z-index: 2;
      animation: driverBounce 2s ease-in-out infinite;
    }

    .map-driver-dot::after {
      content: '';
      font-size: 16px;
      transform: rotate(45deg);
    }

    @keyframes driverBounce {

      0%,
      100% {
        transform: rotate(-45deg) translateY(0);
      }

      50% {
        transform: rotate(-45deg) translateY(-4px);
      }
    }

    .map-dest {
      position: absolute;
      bottom: 20px;
      right: 20px;
      z-index: 2;
    }

    .map-dest-dot {
      width: 14px;
      height: 14px;
      background: var(--green);
      border-radius: 50%;
      border: 3px solid white;
      box-shadow: var(--shadow-sm);
    }

    .map-location-text {
      font-size: 12px;
      color: var(--ink3);
      font-weight: 500;
      position: relative;
      z-index: 2;
      background: rgba(255, 255, 255, 0.8);
      padding: 4px 10px;
      border-radius: var(--radius-full);
    }

    /* Order summary on tracking */
    .tracking-order-summary {
      margin: 0 20px 16px;
      background: var(--white);
      border-radius: var(--radius);
      padding: 14px;
      box-shadow: var(--shadow-sm);
    }

    .tracking-summary-title {
      font-size: 12px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 1px;
      color: var(--ink3);
      margin-bottom: 10px;
    }

    .tracking-item {
      display: flex;
      justify-content: space-between;
      font-size: 13px;
      padding: 4px 0;
      color: var(--ink2);
    }

    /* Actions on tracking */
    .tracking-actions {
      padding: 0 20px 20px;
      display: flex;
      gap: 10px;
    }

    /* Rating modal overlay */
    .rating-sheet {
      position: fixed;
      inset: 0;
      background: rgba(26, 22, 18, 0.5);
      backdrop-filter: blur(4px);
      z-index: 200;
      display: flex;
      align-items: flex-end;
      padding: 0;
      animation: fadeIn 0.2s ease;
    }

    .rating-sheet.hidden {
      display: none;
    }

    .rating-content {
      background: var(--white);
      width: 100%;
      border-radius: 24px 24px 0 0;
      padding: 28px 24px calc(40px + env(safe-area-inset-bottom));
      animation: sheetUp 0.35s cubic-bezier(0.34, 1.2, 0.64, 1);
    }

    @keyframes sheetUp {
      from {
        transform: translateY(100%);
      }

      to {
        transform: none;
      }
    }

    @keyframes fadeIn {
      from {
        opacity: 0;
      }

      to {
        opacity: 1;
      }
    }

    .rating-title {
      font-family: var(--serif);
      font-size: 24px;
      font-weight: 700;
      text-align: center;
      margin-bottom: 6px;
    }

    .rating-sub {
      text-align: center;
      color: var(--ink3);
      font-size: 14px;
      margin-bottom: 24px;
    }

    .rating-target {
      margin-bottom: 20px;
    }

    .rating-target-name {
      font-size: 14px;
      font-weight: 600;
      color: var(--ink2);
      margin-bottom: 10px;
    }

    .stars-row {
      display: flex;
      gap: 8px;
      justify-content: center;
    }

    .star-btn {
      font-size: 36px;
      cursor: pointer;
      filter: grayscale(1) opacity(0.25);
      transition: filter .15s, transform .15s;
      background: none;
      border: none;
      line-height: 1;
      padding: 2px;
      -webkit-tap-highlight-color: transparent;
    }

    .star-btn:hover {
      filter: grayscale(0) opacity(0.6);
      transform: scale(1.1);
    }

    .star-btn.lit {
      filter: none;
    }

    .star-btn.lit:last-child {
      animation: starPop 0.25s ease;
    }

    @keyframes starPop {
      0% {
        transform: scale(1)
      }

      50% {
        transform: scale(1.35)
      }

      100% {
        transform: scale(1)
      }
    }

    .rating-comment {
      margin-top: 16px;
    }
