/* Estilos comunes de los mockups. Mobile-first; el panel se adapta a escritorio. */
:root {
  /* Colores de HojaTec (images-oficial/brand-colors.json): marino #102D54 y naranja #F56B20.
     El naranja puro es para acentos; sobre blanco el texto y los botones usan --brand-dark (contraste 5:1). */
  --brand: #F56B20;
  --brand-dark: #C2470C;
  --brand-darker: #A63B08;
  --brand-soft: #FFEDE2;
  --ink: #172235;
  --ink-2: #4A5568;
  --ink-3: #94A0B2;
  --line: #E2E8F0;
  --bg: #F4F6F9;
  --card: #FFFFFF;
  --nav: #102D54;
  --nav-2: #0B2140;
  --ok: #15803D;   --ok-soft: #DCFCE7;
  --warn: #B45309; --warn-soft: #FEF3C7;
  --bad: #B91C1C;  --bad-soft: #FEE2E2;
  --info: #1D4ED8; --info-soft: #DBEAFE;
  --violet: #6D28D9; --violet-soft: #EDE9FE;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 2px 8px rgba(0,0,0,.04);
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: 'Inter', system-ui, -apple-system, sans-serif; font-size: 14px; color: var(--ink); background: var(--bg); line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 22px; font-weight: 700; }
h2 { font-size: 17px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 600; }
p { margin: 0; }
img { max-width: 100%; display: block; }
.ti { font-size: 1.15em; vertical-align: -0.15em; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.bold { font-weight: 600; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.money { font-variant-numeric: tabular-nums; white-space: nowrap; }
.stack > * + * { margin-top: 12px; }
.stack-sm > * + * { margin-top: 6px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.top { align-items: flex-start; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.grid { display: grid; gap: 14px; }
.grid-2, .grid-3, .grid-4 { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 720px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1100px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 719px) { .hide-mobile { display: none !important; } }
@media (min-width: 720px) { .hide-desktop { display: none !important; } }

/* ── Componentes ───────────────────────────── */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.card-body { padding: 14px 16px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 10px; padding: 9px 14px; font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn:hover { background: #F9FAFB; }
.btn.primary { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn.primary:hover { background: var(--brand-darker); }
.btn.dark { background: var(--nav); border-color: var(--nav); color: #fff; }
.btn.outline { background: #fff; color: var(--nav); border: 1.5px solid var(--nav); }
.btn.outline:hover { background: var(--bg); }
.btn.wa { background: #25D366; border-color: #25D366; color: #fff; }
.btn.wa:hover { background: #1DA851; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { padding: 6px 10px; font-size: 13px; border-radius: 8px; }
.btn.lg { padding: 14px 18px; font-size: 16px; border-radius: 12px; }
.btn.block { width: 100%; }
.btn.danger { color: var(--bad); }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: #F3F4F6; color: var(--ink-2); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.violet { background: var(--violet-soft); color: var(--violet); }
.badge.brand { background: var(--brand-soft); color: var(--brand-dark); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--ink-3); }
.dot.ok { background: var(--ok); } .dot.warn { background: #F59E0B; } .dot.bad { background: var(--bad); } .dot.info { background: var(--info); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-weight: 500; font-size: 13px; cursor: pointer; white-space: nowrap; }
.chip.active { background: var(--nav); border-color: var(--nav); color: #fff; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tab { padding: 10px 12px; font-weight: 600; color: var(--ink-2); border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; }
.tab.active { color: var(--brand-dark); border-color: var(--brand); }
.kpi { display: flex; flex-direction: column; gap: 4px; }
.kpi .value { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.kpi .label { color: var(--ink-2); font-size: 13px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; color: #fff; background: var(--ink-2); flex-shrink: 0; }
.equip-ico { width: 42px; height: 42px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--brand-soft); color: var(--brand-dark); font-size: 22px; flex-shrink: 0; }
.equip-ico.cold { background: #E0F2FE; color: #0369A1; }
.equip-ico.air { background: #ECFDF5; color: #047857; }
.equip-ico.grey { background: #F3F4F6; color: var(--ink-2); }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { padding: 12px 16px; border-top: 1px solid var(--line); }
.list > li:first-child { border-top: 0; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-2); text-transform: uppercase; letter-spacing: .03em; padding: 10px 12px; border-bottom: 1px solid var(--line); background: #F8FAFC; white-space: nowrap; }
td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tr.clickable { cursor: pointer; } tr.clickable:hover td { background: #F8FAFC; }
label.field { display: block; }
label.field > span { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 5px; }
input[type=text], input[type=tel], input[type=number], input[type=date], input[type=search], input[type=email], input[type=password], input[type=time], input[type=url], select, textarea { width: 100%; font: inherit; color: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
.search { position: relative; }
.search .ti { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.search input { padding-left: 34px; }
.note { background: var(--info-soft); color: #1E3A8A; border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.note.warn { background: var(--warn-soft); color: #78350F; }
.note.brand { background: var(--brand-soft); color: #8A3309; }
.divider { height: 1px; background: var(--line); margin: 14px 0; }
.photo { aspect-ratio: 4/3; border-radius: 10px; background: linear-gradient(135deg, #E5E7EB, #F3F4F6); display: flex; align-items: center; justify-content: center; color: var(--ink-3); font-size: 28px; overflow: hidden; position: relative; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo .cap { position: absolute; left: 6px; bottom: 6px; font-size: 11px; background: rgba(0,0,0,.55); color: #fff; padding: 2px 7px; border-radius: 6px; }
.check { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); cursor: pointer; }
.check:first-child { border-top: 0; }
.check input { width: 22px; height: 22px; accent-color: var(--ok); flex-shrink: 0; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 16px 22px; }
.timeline li::before { content: ''; position: absolute; left: 5px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--brand); }
.timeline li::after { content: ''; position: absolute; left: 9px; top: 18px; bottom: 0; width: 1px; background: var(--line); }
.timeline li:last-child::after { display: none; }

/* ── Panel (dueño y secretaria) ─────────────── */
.panel { min-height: 100vh; }
.sidebar { display: none; }
.topbar { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; padding: 10px 16px; }
.topbar .who { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.logo { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 16px; letter-spacing: -.02em; }
.logo img { height: 28px; width: auto; }
.main { padding: 16px 16px 96px; max-width: 1200px; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: #fff; border-top: 1px solid var(--line); display: flex; justify-content: space-around; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
.bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10.5px; font-weight: 600; color: var(--ink-3); padding: 4px 6px; min-width: 56px; }
.bottom-nav a .ti { font-size: 22px; }
.bottom-nav a.active { color: var(--brand-dark); }
@media (min-width: 960px) {
  .panel { display: grid; grid-template-columns: 232px 1fr; }
  .sidebar { display: flex; flex-direction: column; background: var(--nav); color: #CBD5E1; position: sticky; top: 0; height: 100vh; padding: 16px 12px; gap: 2px; overflow-y: auto; }
  .sidebar .logo { color: #fff; padding: 6px 8px 18px; }
  .sidebar .logo img { height: 26px; }
  .sidebar a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; font-weight: 500; }
  .sidebar a:hover { background: rgba(255,255,255,.06); color: #fff; }
  .sidebar a.active { background: rgba(245,107,32,.16); color: #fff; box-shadow: inset 3px 0 0 var(--brand); }
  .sidebar a.active .ti { color: var(--brand); }
  .sidebar .sec { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #8A9BB4; padding: 14px 10px 6px; }
  .sidebar .count { margin-left: auto; background: var(--brand-dark); color: #fff; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; }
  .sidebar .foot { margin-top: auto; font-size: 12px; color: #8A9BB4; padding: 8px 10px; }
  .topbar .logo { display: none; }
  .bottom-nav { display: none; }
  .main { padding: 24px 28px 60px; }
}

/* ── Celular (app del técnico y enlaces públicos) ── */
.phone-page { min-height: 100vh; }
.device { background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; position: relative; }
.app-head { position: sticky; top: 0; z-index: 10; background: var(--nav); color: #fff; padding: 14px 16px; display: flex; align-items: center; gap: 12px; }
.app-head.light { background: #fff; color: var(--ink); border-bottom: 1px solid var(--line); }
.app-head .back { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: rgba(255,255,255,.12); font-size: 18px; }
.app-head.light .back { background: #F3F4F6; }
.app-body { padding: 14px 14px 110px; flex: 1; }
.app-foot { position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--line); padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); display: flex; gap: 10px; }
.device .bottom-nav { position: sticky; }
@media (min-width: 720px) {
  .phone-page { display: flex; align-items: flex-start; justify-content: center; gap: 36px; padding: 32px 20px; background: #E6EBF1; }
  .device { width: 390px; min-height: 0; height: 820px; border-radius: 44px; border: 12px solid #111827; box-shadow: 0 24px 60px rgba(0,0,0,.25); overflow: hidden; }
  .device-scroll { flex: 1; overflow-y: auto; display: flex; flex-direction: column; }
  .side-note { max-width: 320px; padding-top: 40px; }
}
@media (max-width: 719px) { .side-note { display: none; } .device-scroll { display: contents; } }
.side-note h2 { margin-bottom: 8px; }
.side-note p + p { margin-top: 10px; }

/* ── Botón de comentarios y regreso al recorrido ── */
.mock-fab { position: fixed; right: 16px; bottom: 84px; z-index: 50; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.mock-fab a { display: inline-flex; align-items: center; gap: 7px; background: #25D366; color: #fff; font-weight: 700; font-size: 13px; padding: 10px 14px; border-radius: 999px; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.mock-fab a.tour { background: var(--nav); }
@media (max-width: 719px) { .mock-fab a { padding: 8px 12px; font-size: 12px; } }
@media (min-width: 960px) { .mock-fab { bottom: 20px; } }
@media print { .mock-fab, .no-print { display: none !important; } body { background: #fff; } }

/* ── Identidad del taller y firma de HojaTec en los enlaces públicos ── */
/* El cliente final ve la marca del taller; HojaTec aparece solo como firma discreta. */
.taller-logo { width: 38px; height: 38px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; background: var(--brand-soft); color: var(--brand-dark); font-weight: 800; font-size: 14px; letter-spacing: -.02em; }
.powered { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 14px 16px 24px; font-size: 11px; color: var(--ink-3); }
.powered img { height: 14px; width: auto; }
