    :root {
      --bg:      #b7dffd;
      --surface: #ededed;
      --title:   #443030;
      --muted:   #877a7a;
      --accent:  #2196F3;
      --success: #25D366;
      --danger:  #e53935;
      --warning: #f59e0b;
      --border:  #cce0f5;
    }
    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    body { background: var(--bg); font-family: system-ui, sans-serif; min-height: 100vh; display: flex; flex-direction: column; }

    header { background: var(--surface); padding: 14px 20px; display: flex; align-items: center; gap: 14px; border-bottom: 1px solid rgba(0,0,0,0.08); }
    .btn-back { background: none; border: none; cursor: pointer; font-size: 22px; color: var(--title); }
    header h1 { font-size: 17px; font-weight: 700; color: var(--title); }

    main { flex: 1; max-width: 560px; margin: 0 auto; width: 100%; padding: 16px; }

    /* Buscador */
    .search-box { background: var(--surface); border-radius: 14px; padding: 20px; margin-bottom: 16px; }
    .search-box p { font-size: 13px; color: var(--muted); margin-bottom: 12px; line-height: 1.5; }
    .input-code {
      width: 100%; padding: 14px; border: 2px solid var(--border);
      border-radius: 10px; font-size: 18px; font-weight: 700; letter-spacing: 3px;
      text-align: center; text-transform: uppercase; color: var(--title);
      font-family: "Courier New", monospace; background: #fff;
    }
    .input-code:focus { outline: none; border-color: var(--accent); }
    .btn-buscar {
      width: 100%; padding: 14px; background: var(--accent); color: #fff;
      border: none; border-radius: 10px; font-size: 15px; font-weight: 700;
      cursor: pointer; margin-top: 10px;
    }
    .btn-buscar:disabled { opacity: 0.6; cursor: not-allowed; }

    /* Card pedido */
    .pedido-card { background: var(--surface); border-radius: 14px; padding: 18px; margin-bottom: 14px; }
    .pedido-card h3 { font-size: 14px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
    .info-row { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 6px; color: var(--muted); }
    .info-row strong { color: var(--title); }

    /* Badge estado */
    .badge { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 700; }
    .badge-pendiente  { background: #fff8e1; color: #b45309; }
    .badge-confirmado { background: #e3f2fd; color: #1565C0; }
    .badge-en_camino  { background: #ede9fe; color: #5b21b6; }
    .badge-entregado  { background: #e8f5e9; color: #1b5e20; }
    .badge-cancelado  { background: #ffebee; color: #b71c1c; }

    /* Timeline */
    .timeline { position: relative; padding-left: 24px; }
    .timeline::before { content: ''; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
    .timeline-item { position: relative; margin-bottom: 14px; }
    .timeline-item::before { content: ''; position: absolute; left: -20px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--border); border: 2px solid #fff; }
    .timeline-item.done::before { background: var(--accent); }
    .timeline-item.current::before { background: var(--success); box-shadow: 0 0 0 3px rgba(37,211,102,0.25); }
    .timeline-estado { font-size: 13px; font-weight: 700; color: var(--title); }
    .timeline-nota  { font-size: 12px; color: var(--muted); margin-top: 2px; }
    .timeline-fecha { font-size: 11px; color: var(--muted); margin-top: 2px; font-family: "Courier New", monospace; }

    /* Confirmar entrega */
    .confirmar-box { background: #e8f5e9; border: 2px solid #a5d6a7; border-radius: 14px; padding: 20px; margin-bottom: 14px; }
    .confirmar-box h3 { font-size: 15px; font-weight: 700; color: #1b5e20; margin-bottom: 8px; }
    .confirmar-box p { font-size: 13px; color: #2e7d32; margin-bottom: 14px; line-height: 1.5; }
    .input-entrega {
      width: 100%; padding: 14px; border: 2px solid #a5d6a7;
      border-radius: 10px; font-size: 20px; font-weight: 900; letter-spacing: 4px;
      text-align: center; text-transform: uppercase; color: var(--title);
      font-family: "Courier New", monospace; background: #fff; margin-bottom: 10px;
    }
    .btn-confirmar-entrega {
      width: 100%; padding: 14px; background: var(--success); color: #fff;
      border: none; border-radius: 10px; font-size: 15px; font-weight: 700; cursor: pointer;
    }

    .error-msg { background: #ffebee; border-radius: 10px; padding: 14px; color: var(--danger); font-size: 14px; text-align: center; margin-bottom: 14px; }
    .loading { text-align: center; padding: 40px; color: var(--muted); }
