/* SERVICE 360 — Portal del cliente (premium): barra lateral en computadora, barra inferior en el
   teléfono, seguimiento en vivo, galería y ficha del vehículo. Solo tokens de service360.css. */

body { background: var(--bg); min-height: 100vh; }
.pt-app { display: grid; grid-template-columns: 1fr; min-height: 100vh; }
.pt-wrap { display: flex; flex-direction: column; min-width: 0; }
.pt-only-sm { display: grid; }

/* ---------- Marca y barra lateral ---------- */
.pt-logo { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--grad-btn); color: var(--green-ink);
  font-weight: 800; font-size: 15px; letter-spacing: -.02em; box-shadow: 0 6px 16px var(--green-ring); }
.pt-side { display: none; }
.pt-brand { display: flex; align-items: center; gap: 10px; padding: 18px 16px 14px; }
.pt-brand b { display: block; font-size: 15px; line-height: 1.2; }
.pt-brand small { display: block; font-size: 11.5px; color: var(--muted); }
.pt-nav { display: grid; gap: 2px; padding: 6px 10px; }
.pt-navbtn { display: flex; align-items: center; gap: 10px; width: 100%; height: 40px; padding: 0 12px; border: 0; border-radius: 12px; background: transparent;
  color: var(--muted); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; text-align: left; }
.pt-navbtn:hover { background: var(--hover); color: var(--text); }
.pt-navbtn.on { background: var(--green-light); color: var(--green-darker); }
:root[data-theme="dark"] .pt-navbtn.on { color: var(--green-3); }
.pt-navbtn .n { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center; background: var(--bad); color: #fff; font-size: 11px; font-weight: 800; }
.pt-side-foot { margin-top: auto; padding: 10px; display: grid; gap: 6px; border-top: 1px solid var(--line); }
.pt-me { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--card-2); }
.pt-me b { display: block; font-size: 13px; }
.pt-me small { display: block; font-size: 11.5px; color: var(--muted); }

/* ---------- Barra superior ---------- */
.pt-top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.pt-top-title { flex: 1; min-width: 0; }
.pt-top-title b { display: block; font-size: 16px; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-top-title small { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-top-acts { display: flex; align-items: center; gap: 4px; }
.pt-icon { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--muted); cursor: pointer; }
.pt-icon:hover { color: var(--text); border-color: var(--line-strong); }
.pt-avatar { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--green-light); color: var(--green-darker); font-weight: 800; cursor: pointer; }

/* ---------- Barra inferior (teléfono) ---------- */
.pt-tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
.pt-tabbar button { position: relative; display: grid; justify-items: center; gap: 2px; padding: 6px 2px; border: 0; border-radius: 12px; background: none; color: var(--muted); font: inherit; font-size: 10.5px; font-weight: 700; cursor: pointer; }
.pt-tabbar button.on { color: var(--green-darker); }
:root[data-theme="dark"] .pt-tabbar button.on { color: var(--green-3); }
.pt-tabbar button.on svg { transform: translateY(-1px); }
.pt-tabbar .n { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 9.5px; display: grid; place-items: center; }
.pt-main { width: 100%; max-width: 1120px; margin: 0 auto; padding: 14px 14px 96px; display: grid; gap: 12px; outline: none; }
.pt-foot { text-align: center; font-size: 11px; color: var(--faint); padding: 0 0 92px; }

@media (min-width: 960px) {
  .pt-app { grid-template-columns: 260px minmax(0, 1fr); }
  .pt-side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--card); border-right: 1px solid var(--line); }
  .pt-tabbar, .pt-only-sm { display: none; }
  .pt-top { padding: 14px 24px; }
  .pt-main { padding: 20px 24px 28px; gap: 14px; }
  .pt-foot { padding-bottom: 20px; }
}

/* ---------- Bloques comunes ---------- */
.pt-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-sm); padding: 16px; display: grid; gap: 12px; min-width: 0; }
.pt-card-head { display: flex; align-items: center; gap: 8px; }
.pt-card-head h2 { font-size: 15px; font-weight: 800; }
.pt-card-head .end { margin-left: auto; }
.pt-skel { border-radius: 18px; background: linear-gradient(90deg, var(--card), var(--card-2), var(--card)); background-size: 200% 100%; animation: pt-sk 1.2s linear infinite; }
@keyframes pt-sk { to { background-position: -200% 0; } }
.pt-grid2 { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .pt-grid2 { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: start; } }
.pt-sec { font-size: 11.5px; font-weight: 800; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; }
.pt-empty { display: grid; justify-items: center; gap: 6px; text-align: center; color: var(--muted); font-size: 13px; padding: 26px 12px; }
.pt-empty svg { color: var(--green-darker); }
.pt-empty b { color: var(--text); font-size: 14.5px; }
.pt-chip { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap;
  background: var(--card-2); color: var(--muted); border: 1px solid var(--line); }
.pt-chip.ok { background: var(--ok-bg); color: var(--ok-ink); border-color: transparent; }
.pt-chip.warn { background: var(--warn-bg); color: var(--warn-ink); border-color: transparent; }
.pt-chip.bad { background: var(--bad-bg); color: var(--bad-ink); border-color: transparent; }
.pt-chip.live { background: var(--green-light); color: var(--green-darker); border-color: transparent; }
.pt-chip.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 var(--green-ring); animation: pt-pulse 1.8s infinite; }
@keyframes pt-pulse { 70% { box-shadow: 0 0 0 7px transparent; } }
.pt-plate { display: inline-block; padding: 1px 7px; border-radius: 6px; border: 1.5px solid var(--line-strong); background: var(--card); font-weight: 800; font-size: 11px; letter-spacing: .06em; color: var(--text); }
.pt-late { color: var(--bad-ink); font-weight: 700; }
.pt-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.pt-btns .btn { height: 40px; }
.pt-full { width: 100%; height: 44px; justify-content: center; font-size: 14px; }
.pt-msg { padding: 10px 12px; border-radius: 12px; font-size: 13px; }
.pt-msg.bad { background: var(--bad-bg); color: var(--bad-ink); }
.muted { color: var(--muted); }

/* ---------- Bienvenida y números ---------- */
.pt-hero { position: relative; overflow: hidden; display: grid; gap: 4px; padding: 20px; border-radius: 22px; color: var(--side-text);
  background: radial-gradient(120% 140% at 100% 0%, var(--green-ring), transparent 55%), linear-gradient(135deg, var(--side-3), var(--side-1) 55%, var(--green-darker)); }
.pt-hero small { font-size: 12.5px; opacity: .8; }
.pt-hero h1 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.pt-hero p { font-size: 13.5px; opacity: .88; max-width: 560px; }
.pt-hero .pt-btns { margin-top: 8px; }
.pt-hero .btn { background: rgba(255, 255, 255, .14); color: #fff; border-color: rgba(255, 255, 255, .2); }
.pt-hero .btn-primary { background: var(--grad-btn); color: var(--green-ink); border-color: transparent; }
.pt-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 700px) { .pt-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.pt-stat { display: grid; gap: 2px; padding: 14px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); cursor: pointer; text-align: left; font: inherit; color: inherit; }
.pt-stat:hover { border-color: var(--green-ring); }
.pt-stat svg { color: var(--green-darker); }
.pt-stat b { font-size: 22px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pt-stat small { font-size: 12px; color: var(--muted); }
.pt-stat.alert b { color: var(--bad-ink); }
.pt-alert { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 16px; font-size: 13px; }
.pt-alert.warn { background: var(--warn-bg); color: var(--warn-ink); }
.pt-alert.info { background: var(--info-bg); color: var(--info-ink); }
.pt-alert > span { flex: 1; min-width: 0; }
.pt-alert .btn { flex: none; }

/* ---------- Seguimiento en vivo ---------- */
.pt-live { display: grid; gap: 12px; }
.pt-live-head { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; align-items: center; }
.pt-thumb { width: 76px; height: 58px; border-radius: 12px; overflow: hidden; display: grid; place-items: center; background: var(--green-light); color: var(--green-darker); }
.pt-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pt-live-head h3 { font-size: 16px; font-weight: 800; line-height: 1.25; }
.pt-live-head small { display: block; font-size: 12px; color: var(--muted); }
.pt-steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; }
.pt-steps li { position: relative; display: grid; justify-items: center; gap: 4px; text-align: center; }
.pt-steps li::before { content: ""; position: absolute; top: 15px; left: -50%; right: 50%; height: 3px; background: var(--line); }
.pt-steps li:first-child::before { display: none; }
.pt-steps li.hecha::before, .pt-steps li.actual::before { background: var(--green); }
.pt-steps i { position: relative; z-index: 1; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--card-2); border: 2px solid var(--line-strong); color: var(--faint); font-style: normal; }
.pt-steps li.hecha i { background: var(--green); border-color: var(--green); color: var(--green-ink); }
.pt-steps li.actual i { background: var(--card); border-color: var(--green); color: var(--green-darker); box-shadow: 0 0 0 5px var(--green-ring); animation: pt-pulse 1.8s infinite; }
.pt-steps span { font-size: 11.5px; font-weight: 700; }
.pt-steps small { font-size: 10.5px; color: var(--muted); }
@media (max-width: 480px) { .pt-steps small { display: none; } .pt-steps span { font-size: 10.5px; } }
.pt-eta { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--green-light); font-size: 13px; }
.pt-eta svg { flex: none; color: var(--green-darker); }
.pt-eta b { font-weight: 800; }

/* ---------- Vehículos ---------- */
.pt-cars { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.pt-car { display: grid; gap: 0; overflow: hidden; padding: 0; border-radius: 18px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-sm); cursor: pointer; text-align: left; font: inherit; color: inherit; }
.pt-car:hover { border-color: var(--green-ring); transform: translateY(-1px); transition: transform .15s ease; }
.pt-car-pic { height: 140px; display: grid; place-items: center; background: linear-gradient(135deg, var(--green-light), var(--card-2)); color: var(--green-darker); position: relative; }
.pt-car-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pt-car-pic .pt-chip { position: absolute; left: 10px; top: 10px; }
.pt-car-body { display: grid; gap: 4px; padding: 12px 14px 14px; }
.pt-car-body b { font-size: 15px; font-weight: 800; }
.pt-car-body small { font-size: 12px; color: var(--muted); }

/* Ficha del vehículo */
.pt-back { display: inline-flex; align-items: center; gap: 4px; justify-self: start; padding: 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.pt-vhead { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .pt-vhead { grid-template-columns: 300px minmax(0, 1fr); align-items: center; } }
.pt-vpic { height: 190px; border-radius: 18px; overflow: hidden; display: grid; place-items: center; background: linear-gradient(135deg, var(--green-light), var(--card-2)); color: var(--green-darker); }
.pt-vpic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pt-vinfo h2 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.pt-specs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.pt-vtabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.pt-vtabs button { flex: none; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--muted); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.pt-vtabs button.on { background: var(--grad-btn); color: var(--green-ink); border-color: transparent; }
.pt-timeline { display: grid; margin: 0; padding: 0; list-style: none; }
.pt-timeline li { position: relative; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; padding-bottom: 14px; }
.pt-timeline li:not(:last-child)::before { content: ""; position: absolute; left: 14px; top: 30px; bottom: 0; width: 2px; background: var(--line); }
.pt-timeline li.hecha:not(:last-child)::before { background: var(--green); }
.pt-timeline i { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--card-2); border: 2px solid var(--line-strong); color: var(--faint); font-style: normal; }
.pt-timeline li.hecha i { background: var(--green); border-color: var(--green); color: var(--green-ink); }
.pt-timeline li.actual i { border-color: var(--green); color: var(--green-darker); box-shadow: 0 0 0 4px var(--green-ring); }
.pt-timeline b { display: block; font-size: 14px; padding-top: 4px; }
.pt-timeline small { display: block; font-size: 12px; color: var(--muted); }
.pt-work { display: grid; gap: 6px; }
.pt-work div { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--card-2); font-size: 13px; }
.pt-work div span { flex: 1; min-width: 0; }
.pt-msgs { display: grid; gap: 8px; }
.pt-bubble { padding: 10px 12px; border-radius: 4px 14px 14px 14px; background: var(--info-bg); font-size: 13px; line-height: 1.45; white-space: pre-line; }
.pt-bubble small { display: block; margin-top: 4px; font-size: 11px; color: var(--muted); }
.pt-gallery { display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.pt-gallery button { position: relative; aspect-ratio: 4 / 3; border: 0; padding: 0; border-radius: 12px; overflow: hidden; background: var(--card-2); cursor: zoom-in; }
.pt-gallery img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pt-gallery small { position: absolute; left: 6px; bottom: 6px; padding: 2px 7px; border-radius: 999px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 10.5px; font-weight: 700; }
.pt-lightbox { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .86); }
.pt-lightbox[hidden] { display: none; }
.pt-lightbox img { max-width: 100%; max-height: 90vh; border-radius: 12px; }
.pt-light-x { position: absolute; top: 14px; right: 14px; background: rgba(255, 255, 255, .12); color: #fff; border-color: transparent; }

/* ---------- Listas ---------- */
.pt-list { display: grid; gap: 6px; }
.pt-item { display: flex; gap: 10px; align-items: center; padding: 11px 12px; border-radius: 14px; background: var(--card-2); border: 1px solid var(--line); font-size: 13px; color: inherit; text-decoration: none; }
a.pt-item:hover { border-color: var(--green-ring); }
.pt-item > div { flex: 1; min-width: 0; }
.pt-item b { display: block; font-weight: 700; }
.pt-item small { display: block; color: var(--muted); font-size: 12px; }
.pt-item .amt { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pt-ic { width: 34px; height: 34px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--green-light); color: var(--green-darker); }
.pt-ic.warn { background: var(--warn-bg); color: var(--warn-ink); }
.pt-ic.bad { background: var(--bad-bg); color: var(--bad-ink); }
.pt-balance { display: grid; gap: 4px; padding: 18px; border-radius: 20px; color: var(--side-text); background: linear-gradient(135deg, var(--side-2), var(--side-1) 55%, var(--green-darker)); }
.pt-balance small { font-size: 12.5px; opacity: .85; }
.pt-balance b { font-size: 28px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pt-balance.paid { background: linear-gradient(135deg, #1f3b26, #2f6b3a); }
.pt-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 12px; background: var(--card-2); border: 1px solid var(--line); justify-self: start; }
.pt-seg button { height: 30px; padding: 0 12px; border: 0; border-radius: 9px; background: none; color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.pt-seg button.on { background: var(--card); color: var(--text); box-shadow: var(--shadow-sm); }
.pt-year { font-size: 13px; font-weight: 800; color: var(--muted); margin-top: 4px; }
.pt-total { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 14px; border-radius: 14px; background: var(--green-light); }
.pt-total b { font-size: 21px; font-weight: 800; font-variant-numeric: tabular-nums; }
.pt-total small { display: block; font-size: 12px; color: var(--muted); }
.pt-line { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 8px; align-items: start; padding: 10px 0; border-top: 1px solid var(--line); font-size: 13px; }
.pt-line:first-child { border-top: 0; }
.pt-line input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--green-dark); }
.pt-line.off b, .pt-line.off .amt { color: var(--muted); text-decoration: line-through; }
.pt-line b { display: block; font-weight: 600; }
.pt-line small { display: block; color: var(--muted); font-size: 12px; }
.pt-line .amt { font-weight: 700; font-variant-numeric: tabular-nums; }
.pt-hours { display: flex; flex-wrap: wrap; gap: 6px; }
.pt-hours button { height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--card-2); color: var(--text); font: inherit; font-weight: 700; cursor: pointer; }
.pt-hours button.on { background: var(--grad-btn); color: var(--green-ink); border-color: transparent; }
.pt-contact { display: grid; gap: 6px; }
.pt-contact a, .pt-contact span { display: flex; align-items: center; gap: 8px; font-size: 13px; color: inherit; text-decoration: none; }
.pt-contact svg { color: var(--green-darker); flex: none; }

/* ---------- Hoja inferior ---------- */
.pt-sheet { position: fixed; inset: 0; z-index: 40; display: grid; align-items: end; }
.pt-sheet[hidden] { display: none; }
.pt-sheet-back { position: absolute; inset: 0; background: var(--overlay); }
.pt-sheet-box { position: relative; max-height: 92vh; overflow: auto; background: var(--card); border-radius: 22px 22px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
  display: grid; gap: 12px; width: 100%; max-width: 640px; margin: 0 auto; animation: pt-up .22s ease; }
@keyframes pt-up { from { transform: translateY(24px); opacity: .6; } }
.pt-sheet-box h3 { font-size: 18px; font-weight: 800; }
.pt-sheet-head { display: flex; align-items: center; gap: 8px; }
.pt-sheet-head .btn { margin-left: auto; }
@media (min-width: 700px) {
  .pt-sheet { align-items: center; }
  .pt-sheet-box { border-radius: 22px; max-height: 86vh; }
}
@media (prefers-reduced-motion: reduce) {
  .pt-chip.live::before, .pt-steps li.actual i { animation: none; }
  .pt-sheet-box { animation: none; }
}
@media print { .pt-side, .pt-top, .pt-tabbar, .pt-foot { display: none !important; } }

/* En el teléfono la ayuda ya está en el «?» de arriba: sin botón flotante sobre la barra inferior */
@media (max-width: 959px) {
  .gd-fab { display: none; }
}
