/* ============================================================
   PPF Installer App — Design System
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;600;700&display=swap');

:root{
  color-scheme: dark;
  --bg: #0a0a0a;
  --bg-soft: #161616;
  --surface: rgba(255,255,255,0.045);
  --surface-strong: rgba(255,255,255,0.07);
  --border: rgba(255,255,255,0.09);
  --border-strong: rgba(255,255,255,0.16);
  --text: #f2f2f2;
  --text-dim: #a3a3a3;
  --text-faint: #737373;

  --accent: #22d3ee;
  --accent-2: #6366f1;
  --accent-grad: linear-gradient(135deg, #22d3ee 0%, #6366f1 100%);
  --warn: #fb923c;
  --warn-grad: linear-gradient(135deg, #fb923c 0%, #f43f5e 100%);
  --good: #34d399;
  --bad: #f87171;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;

  --shadow: 0 8px 30px rgba(0,0,0,0.35);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.45);

  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;

  --vehicle-body-1: #eef2f8;
  --vehicle-body-2: #8b98ad;
  --vehicle-body-shine: #ffffff;
  --vehicle-stroke: #0b1220;
  --vehicle-glass: rgba(34,211,238,0.4);
  --vehicle-wheel: #05070c;
  --vehicle-rim: #4b5566;
  --zone-fill: rgba(15,23,42,0.10);
  --zone-stroke: rgba(15,23,42,0.35);
}

html[data-theme="light"]{
  color-scheme: light;
  --bg: #eef1f8;
  --bg-soft: #e4e9f5;
  --surface: rgba(255,255,255,0.65);
  --surface-strong: rgba(255,255,255,0.9);
  --border: rgba(15,23,42,0.08);
  --border-strong: rgba(15,23,42,0.14);
  --text: #131826;
  --text-dim: #565f7a;
  --text-faint: #8790a8;
  --shadow: 0 8px 30px rgba(30,41,59,0.08);
  --shadow-lg: 0 20px 60px rgba(30,41,59,0.14);

  --vehicle-body-1: #64748b;
  --vehicle-body-2: #1e293b;
  --vehicle-body-shine: #cbd5e1;
  --vehicle-stroke: #0f172a;
  --vehicle-glass: rgba(37,99,235,0.32);
  --vehicle-wheel: #0f172a;
  --vehicle-rim: #64748b;
  --zone-fill: rgba(255,255,255,0.14);
  --zone-stroke: rgba(255,255,255,0.45);
}

*, *::before, *::after{ box-sizing: border-box; }
html, body{ height: 100%; }
body{
  margin: 0;
  font-family: var(--font);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(99,102,241,0.16), transparent 60%),
    radial-gradient(1000px 600px at 110% 10%, rgba(34,211,238,0.10), transparent 60%),
    var(--bg);
  color: var(--text);
  transition: background-color .35s ease, color .35s ease;
  min-height: 100%;
}
h1,h2,h3,h4{ font-family: var(--font-display); margin: 0; letter-spacing: -0.02em; }
p{ margin: 0; }
a{ color: inherit; text-decoration: none; }
button{ font-family: inherit; }
::selection{ background: var(--accent); color: #04121a; }

/* ---------- scrollbar ---------- */
::-webkit-scrollbar{ width: 10px; height: 10px; }
::-webkit-scrollbar-thumb{ background: var(--border-strong); border-radius: 20px; }
::-webkit-scrollbar-track{ background: transparent; }

/* ---------- layout shell ---------- */
.app-shell{ display: flex; min-height: 100vh; }

.sidebar{
  width: 250px;
  flex-shrink: 0;
  padding: 22px 16px;
  border-right: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 20px;
}
.brand-logo-strip{
  width: 100%; border-radius: 10px;
  padding: 6px 8px; display: flex; align-items: center; justify-content: center;
}
.brand-logo-strip img{ width: 100%; height: auto; display: block; mix-blend-mode: screen; }
.login-logo-img{
  border-radius: 14px; padding: 10px 16px;
  display: flex; align-items: center; justify-content: center;
}
.login-logo-img img{ max-width: 220px; width: 100%; height: auto; display: block; mix-blend-mode: screen; }

html[data-theme="dark"] .login-logo-img,
:root:not([data-theme]) .login-logo-img{
  background: transparent;
}

.nav-item{
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-size: 14px; font-weight: 500;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, transform .15s ease;
}
.nav-item .ic{ width: 18px; height: 18px; flex-shrink: 0; opacity: .85; }
.ui-icon{ display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; vertical-align: -4px; }
.ui-icon svg{ width: 100%; height: 100%; }
.nav-item:hover{ background: var(--surface-strong); color: var(--text); }
.nav-item.active{
  background: linear-gradient(135deg, rgba(34,211,238,0.16), rgba(99,102,241,0.14));
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(34,211,238,0.25);
}
.nav-spacer{ flex: 1; }
.nav-foot{ padding-top: 10px; border-top: 1px solid var(--border); }
#profileTrigger:hover{ background: var(--surface-strong); }

.main{
  flex: 1;
  min-width: 0;
  padding: 26px 34px 60px;
}
.topbar{
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; gap: 16px; flex-wrap: wrap;
}
.page-title{ font-size: 22px; font-weight: 700; }
.page-sub{ font-size: 13px; color: var(--text-dim); margin-top: 4px; }

/* ---------- glass card ---------- */
.card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card.hoverable:hover{ transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow-lg); }
.card-pad{ padding: 20px; }

/* ---------- buttons ---------- */
.btn{
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--surface-strong);
  color: var(--text);
  font-weight: 600; font-size: 13.5px;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, opacity .2s ease;
  user-select: none;
}
.btn:hover{ transform: translateY(-1px); }
.btn:active{ transform: translateY(0); }
.btn-primary{
  background: var(--accent-grad);
  border: none;
  color: #04121a;
  box-shadow: 0 8px 24px rgba(34,211,238,0.25);
}
.btn-primary:hover{ box-shadow: 0 10px 30px rgba(34,211,238,0.4); }
.btn-warn{
  background: var(--warn-grad);
  border: none; color: #250a02;
  box-shadow: 0 8px 24px rgba(244,63,94,0.25);
}
.btn-ghost{ background: transparent; border-color: var(--border); color: var(--text-dim); }
.btn-ghost:hover{ color: var(--text); border-color: var(--border-strong); }
.btn-sm{ padding: 7px 12px; font-size: 12.5px; border-radius: 10px; }
.btn-block{ width: 100%; }
.btn[disabled]{ opacity: .45; cursor: not-allowed; transform: none !important; }
.btn .ic{ width: 15px; height: 15px; }

.icon-btn{
  width: 38px; height: 38px; border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-strong); border: 1px solid var(--border);
  cursor: pointer; color: var(--text-dim);
  transition: all .2s ease;
}
.icon-btn:hover{ color: var(--text); border-color: var(--border-strong); transform: translateY(-1px); }
.icon-btn svg{ width: 17px; height: 17px; }

/* ---------- form controls ---------- */
label{ font-size: 12.5px; font-weight: 600; color: var(--text-dim); display: block; margin-bottom: 7px; }
.field{ margin-bottom: 16px; }
input[type="text"], input[type="email"], input[type="password"], input[type="date"], input[type="number"], select, textarea{
  width: 100%;
  padding: 11px 13px;
  border-radius: 11px;
  border: 1px solid var(--border-strong);
  background: var(--bg-soft);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
input:focus, select:focus, textarea:focus{
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(34,211,238,0.18);
}
textarea{ resize: vertical; min-height: 70px; }
.hint{ font-size: 11.5px; color: var(--text-faint); margin-top: 6px; }

.check-row{ display: flex; align-items: center; gap: 9px; padding: 9px 0; cursor: pointer; user-select: none; }
.check-row input{ width: 17px; height: 17px; accent-color: var(--accent); }
.check-row span{ font-size: 13.5px; }

/* ---------- chips / badges ---------- */
.chip{
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600;
  background: var(--surface-strong); border: 1px solid var(--border);
  color: var(--text-dim);
}
.chip-dot{ width: 6px; height: 6px; border-radius: 50%; }
.chip-draft{ color: #fbbf24; background: rgba(251,191,36,0.12); border-color: rgba(251,191,36,0.3); }
.chip-draft .chip-dot{ background: #fbbf24; }
.chip-final{ color: #34d399; background: rgba(52,211,153,0.12); border-color: rgba(52,211,153,0.3); }
.chip-final .chip-dot{ background: #34d399; }
.chip-accent{ color: #22d3ee; background: rgba(34,211,238,0.12); border-color: rgba(34,211,238,0.3); }
.chip-warn{ color: #f97316; background: rgba(249,115,22,0.12); border-color: rgba(249,115,22,0.3); font-weight:600; }

.toggle-switch{ position:relative; display:inline-block; width:48px; height:26px; flex-shrink:0; }
.toggle-switch input{ opacity:0; width:0; height:0; position:absolute; }
.toggle-track{ position:absolute; inset:0; background:#3a3a3a; border-radius:26px; transition:.2s; cursor:pointer; border:1px solid rgba(255,255,255,0.08); }
.toggle-track:before{ content:''; position:absolute; width:20px; height:20px; left:2px; top:2px; background:#fff; border-radius:50%; transition:.2s; box-shadow:0 1px 3px rgba(0,0,0,0.4); }
.toggle-switch input:checked + .toggle-track{ background:#d4a017; border-color:#d4a017; }
.toggle-switch input:checked + .toggle-track:before{ transform:translateX(22px); }

.tag{
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 10px;
  background: var(--surface-strong); border: 1px solid var(--border);
  font-size: 12.5px; font-weight: 500;
}
.tag button{ background: none; border: none; color: var(--text-faint); cursor: pointer; font-size: 13px; line-height: 1; padding: 0; }
.tag button:hover{ color: var(--bad); }

/* ---------- avatars ---------- */
.avatar{
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff; flex-shrink: 0;
  font-family: var(--font-display);
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,0.25);
}
.avatar img{ width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.avatar-24{ width: 24px; height: 24px; font-size: 9.5px; }
.avatar-32{ width: 32px; height: 32px; font-size: 11px; }
.avatar-40{ width: 40px; height: 40px; font-size: 13px; }
.avatar-56{ width: 56px; height: 56px; font-size: 17px; }

/* ---------- stat cards ---------- */
.stat-grid{ display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat-card{ padding: 18px 20px; position: relative; overflow: hidden; }
.stat-label{ font-size: 12px; color: var(--text-dim); font-weight: 600; margin-bottom: 10px; }
.stat-value{ font-family: var(--font-display); font-size: 30px; font-weight: 700; letter-spacing: -0.02em; }
.stat-value small{ font-size: 15px; color: var(--text-faint); font-weight: 600; }
.stat-delta{ font-size: 12px; margin-top: 8px; display: flex; align-items: center; gap: 5px; font-weight: 600; }
.stat-delta.up{ color: var(--good); }
.stat-delta.down{ color: var(--bad); }
.stat-icon{ position: absolute; right: 16px; top: 16px; width: 34px; height: 34px; border-radius: 10px; display:flex; align-items:center; justify-content:center; opacity: .9; }

/* progress bar */
.progress{ height: 8px; border-radius: 999px; background: var(--bg-soft); overflow: hidden; border: 1px solid var(--border); }
.progress-fill{ height: 100%; border-radius: 999px; background: var(--accent-grad); width: 0%; transition: width 1s cubic-bezier(.16,1,.3,1); }

/* ---------- toasts ---------- */
.toast-stack{ position: fixed; bottom: 22px; right: 22px; display: flex; flex-direction: column; gap: 10px; z-index: 9999; }
.toast{
  min-width: 280px; max-width: 360px;
  padding: 13px 16px; border-radius: 13px;
  background: var(--surface-strong); backdrop-filter: blur(18px);
  border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 11px;
  transform: translateX(30px); opacity: 0;
  animation: toastIn .35s cubic-bezier(.2,.8,.3,1.2) forwards;
  position: relative; overflow: hidden;
}
.toast.leaving{ animation: toastOut .3s ease forwards; }
@keyframes toastIn{ to{ transform: translateX(0); opacity: 1; } }
@keyframes toastOut{ to{ transform: translateX(30px); opacity: 0; } }
.toast-ic{ width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0; display:flex; align-items:center; justify-content:center; }
.toast.success .toast-ic{ background: rgba(52,211,153,0.18); color: var(--good); }
.toast.error .toast-ic{ background: rgba(248,113,113,0.18); color: var(--bad); }
.toast.info .toast-ic{ background: rgba(34,211,238,0.18); color: var(--accent); }
.toast-msg{ font-size: 13.5px; font-weight: 600; }
.toast-sub{ font-size: 11.5px; color: var(--text-dim); font-weight: 500; margin-top: 1px; }
.toast-bar{ position: absolute; left: 0; bottom: 0; height: 2.5px; background: var(--accent); animation: toastBar 3.2s linear forwards; }
@keyframes toastBar{ from{ width: 100%; } to{ width: 0%; } }

/* ---------- modal ---------- */
.modal-overlay{
  position: fixed; inset: 0; background: rgba(4,8,16,0.55); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; z-index: 999;
  opacity: 0; pointer-events: none; transition: opacity .25s ease;
}
.modal-overlay.show{ opacity: 1; pointer-events: all; }
.modal{
  width: min(460px, 92vw);
  background: var(--bg-soft); border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  padding: 26px; transform: scale(.92) translateY(10px); transition: transform .3s cubic-bezier(.2,.8,.3,1.2);
}
.modal-overlay.show .modal{ transform: scale(1) translateY(0); }
.modal-icon{ width: 48px; height: 48px; border-radius: 14px; display:flex; align-items:center; justify-content:center; margin-bottom: 16px; }
.modal-title{ font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.modal-text{ font-size: 13.5px; color: var(--text-dim); line-height: 1.55; margin-bottom: 20px; }
.modal-actions{ display: flex; gap: 10px; justify-content: flex-end; }

/* ---------- theme toggle ---------- */
.theme-toggle{
  width: 52px; height: 30px; border-radius: 999px;
  background: var(--surface-strong); border: 1px solid var(--border-strong);
  position: relative; cursor: pointer; flex-shrink: 0;
}
.theme-toggle .knob{
  position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent-grad); transition: transform .3s cubic-bezier(.2,.8,.3,1.2);
  display: flex; align-items: center; justify-content: center; color: #04121a;
}
.theme-toggle .knob svg{ width: 13px; height: 13px; }
html[data-theme="light"] .theme-toggle .knob{ transform: translateX(22px); }

/* ---------- misc animations ---------- */
@keyframes fadeUp{ from{ opacity:0; transform: translateY(10px);} to{opacity:1; transform: translateY(0);} }
.fade-up{ animation: fadeUp .5s cubic-bezier(.2,.7,.3,1) both; }
.d1{ animation-delay: .04s; } .d2{ animation-delay: .08s; } .d3{ animation-delay: .12s; }
.d4{ animation-delay: .16s; } .d5{ animation-delay: .2s; } .d6{ animation-delay: .24s; }

.page-enter{ animation: pageEnter .4s cubic-bezier(.2,.7,.3,1) both; }
@keyframes pageEnter{ from{ opacity: 0; transform: translateY(8px);} to{ opacity:1; transform: translateY(0);} }

/* table */
.table-wrap{ overflow-x: auto; }
table{ width: 100%; border-collapse: collapse; font-size: 13.5px; }
th{ text-align: left; padding: 10px 14px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-faint); font-weight: 700; border-bottom: 1px solid var(--border); }
td{ padding: 8px 14px; border-bottom: 1px solid var(--border); }
tr:last-child td{ border-bottom: none; }
tbody tr{ transition: background .15s ease; }
tbody tr:hover{ background: var(--surface-strong); }

/* listado de trabajos en formato tarjeta para móvil (reemplaza la tabla) */
.mobile-job-list{ display: none; flex-direction: column; gap: 10px; }
.job-card{
  padding: 14px; border-radius: 14px;
  background: var(--surface-strong); border: 1px solid var(--border);
}
.job-card-top{ display:flex; align-items:flex-start; justify-content:space-between; gap:10px; margin-bottom:8px; }
.job-card-title{ font-weight: 700; font-size: 14.5px; }
.job-card-sub{ font-size: 12.5px; color: var(--text-dim); margin-top: 2px; }
.job-card-meta{ display:flex; flex-wrap:wrap; gap: 6px 16px; font-size: 12px; color: var(--text-dim); margin-top: 8px; }
.job-card-meta b{ color: var(--text); font-weight: 600; }
.job-card-actions{ display:flex; gap:8px; margin-top: 12px; }
.job-card-actions .btn{ flex: 1; }

@media (max-width: 700px){
  .table-wrap{ display: none; }
  .mobile-job-list{ display: flex; }
}

@media (max-width: 480px){
  .form-actions{ flex-direction: column-reverse; align-items: stretch; }
  .form-actions .btn{ width: 100%; }
}

/* empty state */
.empty{ text-align:center; padding: 50px 20px; color: var(--text-faint); }
.empty svg{ width: 46px; height: 46px; margin-bottom: 14px; opacity: .5; }

/* utility */
.row{ display:flex; align-items:center; }
.between{ justify-content: space-between; }
.gap-8{ gap:8px;} .gap-10{gap:10px;} .gap-12{gap:12px;} .gap-16{gap:16px;} .gap-20{gap:20px;}
.mt-8{margin-top:8px;} .mt-12{margin-top:12px;} .mt-16{margin-top:16px;} .mt-24{margin-top:24px;}
.mb-8{margin-bottom:8px;} .mb-12{margin-bottom:12px;} .mb-16{margin-bottom:16px;}
.muted{ color: var(--text-dim); }
.faint{ color: var(--text-faint); }
.small{ font-size: 12.5px; }
.grid-2{ display:grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3{ display:grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
@media (max-width: 900px){ .grid-2, .grid-3{ grid-template-columns: 1fr; } }
.flex-wrap{ flex-wrap: wrap; }

/* login page */
.login-wrap{ min-height:100vh; display:flex; align-items:center; justify-content:center; padding: 20px; position: relative; }
.login-card{ width: min(400px, 100%); padding: 34px 30px; }
.login-logo{ display:flex; flex-direction:column; align-items:center; gap:12px; margin-bottom: 26px; }
.role-switch{ display:flex; gap:8px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 12px; padding: 4px; margin-bottom: 20px; }
.role-switch button{ flex:1; border:none; background: transparent; padding: 9px; border-radius: 9px; color: var(--text-dim); font-weight: 600; font-size: 13px; cursor:pointer; transition: all .2s ease; }
.role-switch button.active{ background: var(--accent-grad); color: #04121a; box-shadow: 0 6px 16px rgba(34,211,238,0.3); }

/* tiempo del trabajo (hora de inicio/fin, no un cronómetro visible) */
.time-tracker{ display:flex; flex-direction: column; gap: 6px; }
.time-tracker-row{ display:flex; align-items:center; justify-content: space-between; gap: 16px; min-width: 200px; }
.time-label{ font-size: 12.5px; color: var(--text-dim); font-weight: 600; }
.time-value{ font-family: var(--font-display); font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
#durationDisplay{ font-size: 20px; }
.time-tracker.running #endTimeDisplay{ color: var(--accent); }
#overtimeBox textarea{ min-height: 60px; }

/* upload dropzone */
.dropzone{
  border: 1.5px dashed var(--border-strong); border-radius: var(--radius);
  padding: 26px; text-align: center; cursor: pointer; transition: all .2s ease;
  background: var(--surface);
}
.dropzone:hover{ border-color: var(--accent); background: rgba(34,211,238,0.05); }
.media-grid{ display:grid; grid-template-columns: repeat(auto-fill, minmax(90px,1fr)); gap: 10px; margin-top: 14px; }
.media-thumb{ aspect-ratio: 1; border-radius: 10px; background: var(--bg-soft); border: 1px solid var(--border); display:flex; align-items:center; justify-content:center; position:relative; overflow:hidden; font-size: 22px; cursor: pointer; transition: transform .15s ease; }
.media-thumb:hover{ transform: scale(1.03); }
.media-thumb img, .media-thumb video{ width:100%; height:100%; object-fit:cover; pointer-events:none; }
.media-thumb .stage-tag{ position:absolute; bottom:3px; left:3px; right:3px; font-size:9px; text-align:center; padding:2px 4px; border-radius:5px; background:rgba(0,0,0,0.55); color:#fff; font-weight:700; }
.media-thumb .rm{ position:absolute; top:3px; right:3px; width:18px;height:18px;border-radius:50%; background:rgba(0,0,0,0.5); color:#fff; display:flex; align-items:center; justify-content:center; font-size:11px; cursor:pointer; }

/* auth badge */
.role-badge{ padding: 4px 10px; border-radius: 8px; font-size: 11px; font-weight: 700; letter-spacing: .02em; }
.role-badge.installer{ background: rgba(99,102,241,0.16); color: #a5b4fc; }
.role-badge.admin{ background: rgba(251,146,60,0.16); color: #fdba74; }
.role-badge.vendedor{ background: rgba(52,211,153,0.16); color: #34d399; }

/* insignia de solicitudes pendientes, tipo notificación de redes sociales */
.pending-badge{
  position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: 999px; background: #f87171; color: #fff; font-size: 10.5px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; border: 2px solid var(--bg);
}

.mobile-nav{
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 500;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  background: var(--surface-strong);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-strong);
  align-items: stretch;
  justify-content: space-around;
  gap: 4px;
}
.mobile-nav-item{
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 4px;
  border-radius: 12px;
  border: none; background: transparent;
  color: var(--text-faint);
  font-family: var(--font);
  cursor: pointer;
}
.mobile-nav-item .ic{ width: 20px; height: 20px; }
.mobile-nav-item .mn-label{ font-size: 10px; font-weight: 600; }
.mobile-nav-item.active{ color: var(--accent); }

@media (max-width: 860px){
  .sidebar{ display:none; }
  .main{ padding: 20px 18px 104px; }
  .mobile-nav{ display: flex; }

  /* más aire y toques más cómodos en pantallas angostas */
  .card-pad{ padding: 18px; }
  .stat-grid{ gap: 14px; }
  .stat-card{ padding: 18px; }
  .grid-2{ gap: 14px; }
  .field{ margin-bottom: 18px; }
  input[type="text"], input[type="email"], input[type="password"], input[type="date"], input[type="number"], select, textarea{
    padding: 13px 14px; font-size: 15px;
  }
  .btn{ padding: 12px 18px; min-height: 44px; }
  .btn-sm{ padding: 10px 14px; min-height: 38px; }
  .chip{ padding: 7px 13px; font-size: 12.5px; }
  .job-card{ padding: 16px; }
  .job-card-meta{ gap: 8px 14px; }
  h3{ font-size: 16px; }
  .page-title{ font-size: 20px; }
  .topbar{ gap: 14px; margin-bottom: 20px; }
  .modal{ padding: 22px; }
}

/* ---- chip-sm para inspección ---- */
.chip-sm { padding: 3px 8px; font-size: 11px; }

/* ---- print: mostrar solo la inspección ---- */
@media print {
  body.print-inspection .sidebar,
  body.print-inspection .mobile-nav,
  body.print-inspection .topbar,
  body.print-inspection #statusChip,
  body.print-inspection .card:not(#inspectionCard),
  body.print-inspection #inspToggleRow { display: none !important; }
  body.print-inspection #inspectionCard { display: block !important; box-shadow: none; border: none; }
  body.print-inspection #inspBody { display: block !important; }
  body.print-inspection #inspPrintBtn { display: none !important; }
}
