/* track page */
/* =================================================================
     TRACK ORDER PAGE
  ==================================================================*/

  .tr-wrap{ max-width:var(--container); margin:0 auto; padding:12px 12px 0; }

  /* hero + form */
  .tr-hero{
    position:relative;
    overflow:hidden;
    border-radius:16px;
    padding:22px 18px 20px;
    color:#fff;
    background:
      radial-gradient(240px 160px at 100% 0%, rgba(255,255,255,0.18), transparent 70%),
      linear-gradient(135deg, var(--brand-light), var(--brand) 55%, var(--brand-dark));
  }
  .tr-hero-art{
    position:absolute;
    right:-12px; top:14px;
    width:110px; height:110px;
    opacity:.16;
    color:#fff;
  }
  .tr-hero-text h1{ position:relative; margin:0 0 4px; font-size:22px; font-weight:700; }
  .tr-hero-text p{ position:relative; margin:0 0 16px; font-size:12.5px; color:rgba(255,255,255,0.85); line-height:1.5; max-width:330px; }

  .tr-form{
    position:relative;
    background:#fff;
    border-radius:12px;
    padding:14px;
    display:grid;
    gap:10px;
    box-shadow:0 8px 24px rgba(0,0,0,0.12);
  }
  .tr-field label{ display:block; font-size:11.5px; font-weight:700; color:var(--muted); margin:0 0 5px; letter-spacing:.02em; }
  .tr-field input{
    width:100%;
    height:46px;
    border:1.5px solid var(--line-2);
    border-radius:10px;
    padding:0 12px;
    font-size:14px;
    color:var(--text);
    outline:none;
    background:#fff;
  }
  .tr-field input:focus{ border-color:var(--brand); }
  .tr-field input[aria-invalid="true"]{ border-color:#D64545; background:#FFF7F7; }
  .tr-err{ display:none; font-size:11.5px; color:#C0392B; margin-top:4px; }
  .tr-field input[aria-invalid="true"] + .tr-err{ display:block; }
  .tr-submit{
    height:48px;
    border:none;
    border-radius:10px;
    background:var(--brand);
    color:#fff;
    font-size:14px;
    font-weight:700;
    cursor:pointer;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
  }
  .tr-submit svg{ width:18px; height:18px; }
  .tr-submit .spin{
    width:16px; height:16px;
    border:2px solid rgba(255,255,255,.4);
    border-top-color:#fff;
    border-radius:50%;
    animation:spin .7s linear infinite;
    display:none;
  }
  .tr-submit.loading .spin{ display:block; }
  .tr-submit.loading .lbl-icon{ display:none; }
  @keyframes spin{ to{ transform:rotate(360deg); } }
  .tr-hint{ margin:2px 0 0; font-size:11.5px; color:var(--muted-2); text-align:center; }
  .tr-hint button{
    border:none; background:none; padding:0;
    color:var(--brand); font-weight:700; cursor:pointer; text-decoration:underline;
    font-size:inherit;
  }

  .tr-notfound{
    display:none;
    margin-top:14px;
    padding:14px;
    border-radius:12px;
    background:#FFF5F5;
    border:1px solid #F5C6C6;
    color:#8E2B2B;
    font-size:13px;
    line-height:1.5;
  }
  .tr-notfound.show{ display:block; }

  /* result */
  .tr-result{ margin-top:16px; }
  .tr-result[hidden]{ display:none; }
  .tr-card{
    background:#fff;
    border:1px solid var(--line);
    border-radius:14px;
    padding:16px;
    margin-bottom:12px;
  }
  .tr-status-head{ display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
  .tr-status-head .oid{ font-size:11.5px; color:var(--muted-2); font-weight:600; }
  .tr-status-head h2{ margin:2px 0 4px; font-size:19px; color:var(--text); }
  .tr-status-head .eta{ font-size:13px; color:var(--muted); }
  .tr-status-head .eta b{ color:var(--text); }
  .tr-pill{
    flex-shrink:0;
    font-size:11px;
    font-weight:700;
    padding:5px 10px;
    border-radius:999px;
    background:var(--brand-soft);
    color:var(--brand);
    white-space:nowrap;
  }
  .tr-pill.delivered{ background:#E6F5EC; color:#1E8A4C; }

  /* horizontal progress (compact) */
  .tr-bar{ position:relative; margin:18px 4px 4px; height:4px; border-radius:4px; background:var(--line-2); }
  .tr-bar span{ position:absolute; left:0; top:0; height:100%; border-radius:4px; background:var(--brand); width:0; transition:width .6s ease; }
  .tr-bar-labels{ display:flex; justify-content:space-between; margin-top:8px; font-size:10.5px; color:var(--muted-2); font-weight:600; }
  .tr-bar-labels .on{ color:var(--brand); }

  .tr-meta{ display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:16px; }
  .tr-meta div{ background:var(--surface); border-radius:10px; padding:10px 12px; }
  .tr-meta span{ display:block; font-size:10.5px; color:var(--muted-2); font-weight:600; text-transform:uppercase; letter-spacing:.04em; }
  .tr-meta b{ display:block; font-size:13px; color:var(--text); margin-top:2px; word-break:break-all; }
  .tr-copy{ border:none; background:none; color:var(--brand); font-size:11px; font-weight:700; padding:0; cursor:pointer; margin-top:2px; }

  .tr-card h3{ margin:0 0 12px; font-size:14px; color:var(--text); }

  /* vertical timeline */
  .tl{ list-style:none; margin:0; padding:0; }
  .tl li{ position:relative; display:flex; gap:12px; padding-bottom:18px; }
  .tl li:last-child{ padding-bottom:0; }
  .tl li::before{
    content:"";
    position:absolute;
    left:13px; top:28px; bottom:0;
    width:2px;
    background:var(--line-2);
  }
  .tl li:last-child::before{ display:none; }
  .tl li.done::before{ background:var(--brand); }
  .tl .dot{
    position:relative;
    z-index:1;
    width:28px; height:28px;
    border-radius:50%;
    flex-shrink:0;
    display:flex; align-items:center; justify-content:center;
    background:#fff;
    border:2px solid var(--line-2);
    color:var(--muted-3);
  }
  .tl .dot svg{ width:14px; height:14px; }
  .tl li.done .dot{ background:var(--brand); border-color:var(--brand); color:#fff; }
  .tl li.current .dot{ border-color:var(--brand); color:var(--brand); box-shadow:0 0 0 5px var(--brand-soft); }
  .tl li.current .dot::after{
    content:"";
    position:absolute;
    inset:-7px;
    border-radius:50%;
    border:2px solid var(--brand);
    opacity:0;
    animation:ring 1.6s ease-out infinite;
  }
  @keyframes ring{ 0%{ transform:scale(.8); opacity:.6; } 100%{ transform:scale(1.3); opacity:0; } }
  .tl .txt strong{ display:block; font-size:13.5px; color:var(--text); }
  .tl li.pending .txt strong{ color:var(--muted-2); font-weight:600; }
  .tl .txt span{ display:block; font-size:12px; color:var(--muted); margin-top:2px; line-height:1.45; }
  .tl .txt time{ display:block; font-size:11px; color:var(--muted-2); margin-top:3px; }

  /* items */
  .tr-item{ display:flex; gap:12px; align-items:center; padding:10px 0; border-top:1px solid var(--line); }
  .tr-item:first-of-type{ border-top:none; padding-top:0; }
  .tr-item img{ width:56px; height:56px; border-radius:8px; object-fit:cover; background:var(--surface); flex-shrink:0; }
  .tr-item .nm{ font-size:13px; font-weight:600; color:var(--text-2); }
  .tr-item .vr{ font-size:11.5px; color:var(--muted-2); }
  .tr-item .pr{ margin-left:auto; font-size:13px; font-weight:700; color:var(--text); white-space:nowrap; }
  .tr-total{ display:flex; justify-content:space-between; padding-top:12px; margin-top:4px; border-top:1px dashed var(--line-2); font-size:13.5px; font-weight:700; color:var(--text); }
  .tr-total small{ font-weight:500; color:var(--muted-2); font-size:11.5px; display:block; }

  .tr-address{ font-size:13px; line-height:1.55; color:var(--muted); }
  .tr-address b{ color:var(--text); }

  .tr-actions{ display:grid; grid-template-columns:1fr 1fr; gap:10px; }
  .tr-act{
    display:flex; align-items:center; justify-content:center; gap:8px;
    height:44px;
    border-radius:10px;
    font-size:13px; font-weight:700;
    text-decoration:none;
    cursor:pointer;
    border:1.5px solid var(--brand);
    background:#fff;
    color:var(--brand);
  }
  .tr-act svg{ width:17px; height:17px; }
  .tr-act.wa{ background:#1FAF55; border-color:#1FAF55; color:#fff; }

  /* help + faq */
  .tr-help{ margin-top:22px; }
  .tr-help h2{ font-size:16px; color:var(--text); margin:0 0 10px; }
  .faq{ border:1px solid var(--line); border-radius:12px; overflow:hidden; background:#fff; }
  .faq details{ border-top:1px solid var(--line); }
  .faq details:first-child{ border-top:none; }
  .faq summary{
    list-style:none;
    cursor:pointer;
    padding:14px 16px;
    font-size:13.5px;
    font-weight:600;
    color:var(--text-2);
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
  }
  .faq summary::-webkit-details-marker{ display:none; }
  .faq summary::after{
    content:"+";
    font-size:18px;
    font-weight:500;
    color:var(--brand);
    transition:transform .2s ease;
  }
  .faq details[open] summary::after{ transform:rotate(45deg); }
  .faq details p{ margin:0; padding:0 16px 14px; font-size:13px; line-height:1.6; color:var(--muted); }

  .tr-contact{
    margin-top:14px;
    display:flex;
    align-items:center;
    gap:12px;
    padding:14px;
    border-radius:12px;
    background:var(--brand-soft);
  }
  .tr-contact .ic{ width:40px; height:40px; border-radius:50%; background:#fff; color:var(--brand); display:flex; align-items:center; justify-content:center; flex-shrink:0; }
  .tr-contact .ic svg{ width:19px; height:19px; }
  .tr-contact strong{ display:block; font-size:13.5px; color:var(--text); }
  .tr-contact span{ font-size:12px; color:var(--muted); }
  .tr-contact a{ margin-left:auto; font-size:12.5px; font-weight:700; color:var(--brand); text-decoration:none; white-space:nowrap; }

  .tr-hint a{ color:var(--brand); font-weight:700; }
  .tr-item .nm a{ color:inherit; text-decoration:none; }
  .tr-item .nm a:hover{ color:var(--brand); }
  .tr-courier-link{ display:inline-block; margin-top:12px; font-size:13px; font-weight:700; color:var(--brand); text-decoration:none; }
  .tr-pill.cancelled{ background:#FDECEA; color:#B3261E; }
  .tl li.cancelled .dot{ background:#B3261E; border-color:#B3261E; color:#fff; }

  @media (max-width:1023px){
    .tr-hero-art{ display:none; }
    .tr-contact{ flex-wrap:wrap; }
    .tr-contact > div{ flex:1; min-width:0; }
    .tr-contact a{ margin-left:52px; flex-basis:100%; }
  }
  @media (min-width:1024px){
    .crumbs{ max-width:var(--page-max); padding:16px 32px 0; }
    .tr-wrap{ max-width:var(--page-max); padding:14px 32px 0; }
    .tr-hero{ padding:40px 44px; display:grid; grid-template-columns:1fr 440px; gap:40px; align-items:center; }
    .tr-hero-text h1{ font-size:32px; }
    .tr-hero-text p{ font-size:14px; margin:0; max-width:420px; }
    .tr-hero-art{ width:200px; height:200px; right:auto; left:44%; top:auto; bottom:-30px; }
    .tr-form{ grid-column:2; padding:20px; }
    .tr-hero-text{ grid-column:1; }
    .tr-result{ display:grid; grid-template-columns:minmax(0,1.4fr) minmax(0,1fr); gap:16px; align-items:start; margin-top:22px; }
    .tr-result[hidden]{ display:none; }
    .tr-col{ min-width:0; }
    .tr-help{ display:block; }
    .tr-help h2{ grid-column:1 / -1; margin-bottom:0; }
    .tr-contact{ margin-top:0; }
  }

  /* ---------- Simple centred "Track your order" card (matches the login card) ---------- */
  .tr-box{
    width:100%;
    max-width:420px;
    margin:20px auto 0;
    padding:30px 24px 26px;
    background:#fff;
    border:1px solid var(--line);
    border-radius:18px;
    box-shadow:0 18px 40px rgba(17,19,24,0.07);
    text-align:center;
  }
  .tr-badge{
    width:52px; height:52px; margin:0 auto 14px; border-radius:50%;
    display:flex; align-items:center; justify-content:center;
    background:var(--brand-soft); color:var(--brand);
  }
  .tr-badge svg{ width:22px; height:22px; }
  .tr-box h1{ margin:0 0 4px; font-size:22px; font-weight:700; color:var(--text); }
  .tr-box .tr-sub{ margin:0 0 20px; font-size:13.5px; color:var(--muted); }
  .tr-box .tr-form{ padding:0; box-shadow:none; border-radius:0; gap:14px; grid-column:auto; background:none; text-align:left; }
  .tr-box .tr-field label{ font-size:12.5px; color:var(--text-2); letter-spacing:0; }
  .tr-box .tr-submit{ margin-top:4px; }
  .tr-box .tr-notfound{ text-align:center; }
  main:has(.tr-box){ display:flex; flex-direction:column; background:radial-gradient(700px 320px at 50% 0%, var(--brand-soft), transparent 70%); }
  main:has(.tr-box) > .tr-wrap{ flex:1 0 auto; width:100%; display:flex; flex-direction:column; padding-bottom:40px; }
  main:has(#trResult[hidden]) .tr-box{ margin-top:auto; margin-bottom:auto; }
  @media (min-width:1024px){
    .tr-box{ max-width:440px; padding:38px 36px 32px; }
    .tr-box h1{ font-size:24px; }
    .tr-result{ margin-top:28px; }
  }
