/* Fibra Obra — pensado para móvil con guantes y sol: objetivos táctiles grandes, contraste alto, sin efectos finos. */
:root {
  --bg: #eef1f5; --surface: #fff; --text: #0b1220; --muted: #455063; --border: #b7c0cd;
  --primary: #0b57d0; --primary-d: #083f9b; --navy: #0b3d91; --danger: #b3261e; --ok: #146c2e; --warn: #8a4b00; --warn-bg: #fff1d6; --ok-bg: #dff3e4;
  --tap: 52px; --radius: 14px; --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body { font: 17px/1.45 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; color: var(--text); background: var(--bg); overscroll-behavior: none; }
body.has-modal { overflow: hidden; }
#app { height: 100%; display: flex; flex-direction: column; }
h1 { font-size: 24px; margin: 0 0 12px; } h2 { font-size: 20px; margin: 0 0 8px; } h3 { font-size: 17px; margin: 16px 0 6px; }
a { color: var(--primary); }
button { font: inherit; color: inherit; }
.muted { color: var(--muted); font-size: 15px; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.warn-text { color: var(--warn); font-weight: 700; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .5px; }
[hidden] { display: none !important; }
.ico { display: inline-flex; flex: none; vertical-align: middle; }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--tap); padding: 0 20px; border-radius: 12px; border: 2px solid transparent; font-weight: 700; font-size: 17px; cursor: pointer; text-decoration: none; touch-action: manipulation; user-select: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; } .btn-primary:active { background: var(--primary-d); }
.btn-ghost { background: #fff; color: var(--primary); border-color: var(--primary); } .btn-ghost:active { background: #e8f0fe; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { min-height: 44px; padding: 0 14px; font-size: 16px; }
.btn-xl { min-height: 64px; font-size: 19px; flex: 1; }
.btn-block { width: 100%; }
.icon-btn { width: 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: transparent; border-radius: 12px; cursor: pointer; color: inherit; position: relative; flex: none; text-decoration: none; }
.icon-btn:active { background: rgba(0,0,0,.12); }
.linkbtn { background: none; border: 0; color: var(--primary); text-decoration: underline; cursor: pointer; padding: 6px 0; font-size: inherit; }
:focus-visible { outline: 3px solid #ffbf00; outline-offset: 2px; }
.avatar, .topbar .icon-btn.avatar { border-radius: 50%; background: #fff; color: var(--navy); font-weight: 800; font-size: 20px; }
.avatar.sm { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; background: var(--navy); color: #fff; flex: none; font-size: 17px; }

/* ---------- Formularios ---------- */
.field { display: block; margin: 0 0 14px; }
.lbl { display: block; font-weight: 700; margin-bottom: 4px; font-size: 15px; }
.hint { display: block; color: var(--muted); font-size: 14px; margin-top: 3px; }
.input { width: 100%; min-height: var(--tap); padding: 10px 12px; font-size: 17px; border: 2px solid #7d8899; border-radius: 10px; background: #fff; color: var(--text); font-family: inherit; }
textarea.input { min-height: 90px; resize: vertical; }
select.input { appearance: auto; }
.input:focus { border-color: var(--primary); outline: 3px solid #b6d0fb; }
.form-error { background: #fde7e5; color: #7d1710; border: 2px solid var(--danger); padding: 10px 12px; border-radius: 10px; margin: 8px 0 12px; font-weight: 600; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; }
fieldset.coords { border: 2px solid var(--border); border-radius: 12px; margin: 0 0 14px; padding: 10px 12px 2px; }
fieldset.coords legend { font-weight: 700; padding: 0 6px; }
.check { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 4px 0; cursor: pointer; font-size: 17px; }
.check input { width: 26px; height: 26px; flex: none; accent-color: var(--primary); }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0 12px; }
.dot { width: 14px; height: 14px; border-radius: 50%; display: inline-block; flex: none; }

/* ---------- Estructura ---------- */
.page { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.topbar { display: flex; align-items: center; gap: 4px; padding: calc(var(--safe-t) + 6px) 8px 6px 10px; background: var(--navy); color: #fff; min-height: 60px; flex: none; z-index: 1200; }
.topbar .icon-btn { color: #fff; }
.topbar-brand { width: 40px; height: 40px; border-radius: 10px; background: #fff; color: var(--navy); font-weight: 900; display: flex; align-items: center; justify-content: center; flex: none; margin-right: 4px; }
.topbar-title { flex: 1; min-width: 0; }
.topbar-title .tt { font-weight: 800; font-size: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-title .ts { font-size: 14px; opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.filter-btn.active { background: #ffd400; color: #111; }
.filter-btn.active::after { content: attr(data-n); position: absolute; top: 2px; right: 2px; background: #b3261e; color: #fff; font-size: 12px; font-weight: 800; min-width: 18px; height: 18px; border-radius: 9px; display: flex; align-items: center; justify-content: center; }
.content { flex: 1; min-height: 0; overflow: auto; position: relative; }
.scroll-pad { padding: 12px 12px 90px; max-width: 900px; margin: 0 auto; }
.cards { padding: 12px 12px 100px; max-width: 900px; margin: 0 auto; display: grid; gap: 12px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin: 0 0 12px; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.cards .card { margin: 0; }
.project-card { display: block; text-decoration: none; color: inherit; }
.project-card:active { background: #e8f0fe; }
.pc-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.tt { font-weight: 800; }
.badge { display: inline-block; background: #e8eefb; color: var(--navy); border: 1px solid #b6c8ee; border-radius: 999px; padding: 2px 10px; font-size: 14px; font-weight: 700; white-space: nowrap; height: fit-content; }
.statbar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: #dde3ec; }
.pc-stats { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; font-size: 15px; color: var(--muted); }
.chip-count { display: inline-flex; align-items: center; gap: 5px; } .chip-count i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty .ico { color: var(--primary); } .empty.small { padding: 24px 12px; }
.fab-row { position: fixed; left: 0; right: 0; bottom: calc(var(--safe-b) + 16px); display: flex; justify-content: center; pointer-events: none; z-index: 900; }
.fab-row .btn { pointer-events: auto; box-shadow: 0 4px 14px rgba(0,0,0,.35); min-height: 60px; }
.loading { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; height: 100%; color: var(--muted); }
.spinner { width: 42px; height: 42px; border: 5px solid #cfd8e6; border-top-color: var(--primary); border-radius: 50%; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.sync-pill .ico { animation: none; }
.sync-pill.busy .ico { animation: spin 1.2s linear infinite; }

/* ---------- Acceso ---------- */
.auth-wrap { min-height: 100%; display: flex; align-items: center; justify-content: center; padding: 20px; background: linear-gradient(160deg, #0b3d91, #0a2a63); overflow: auto; }
.auth-card { background: #fff; border-radius: 18px; padding: 24px; width: 100%; max-width: 420px; box-shadow: 0 10px 40px rgba(0,0,0,.4); }
.auth-card.inline { box-shadow: none; padding: 0; max-width: none; }
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.brand-mark { width: 52px; height: 52px; border-radius: 14px; background: var(--navy); color: #fff; font-weight: 900; font-size: 22px; display: flex; align-items: center; justify-content: center; }
.brand-name { font-weight: 900; font-size: 22px; } .brand-sub { color: var(--muted); font-size: 14px; }
.link-center { display: block; text-align: center; margin-top: 14px; }
.auth-card .btn-block { margin-top: 6px; }

/* ---------- Sincronización ---------- */
.sync-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 10px; border-radius: 999px; border: 2px solid rgba(255,255,255,.7); background: transparent; color: #fff; font-weight: 700; font-size: 14px; cursor: pointer; flex: none; max-width: 46vw; }
.sync-pill span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sync-pill.off { background: #ffd400; color: #111; border-color: #ffd400; }
.sync-pill.busy { background: #fff; color: var(--navy); }
.sync-pill.bad { background: var(--danger); border-color: var(--danger); }
.sync-panel .oplist { list-style: none; margin: 8px 0; padding: 0; }
.oplist li { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; }
.oplist li.failed { border-color: var(--danger); background: #fff5f4; }
.op-t { font-weight: 700; } .op-err { color: var(--danger); font-weight: 600; margin-top: 4px; } .op-actions { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }

/* ---------- Modales y avisos ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(8, 18, 40, .62); display: flex; align-items: flex-end; justify-content: center; z-index: 3000; }
.modal { background: #fff; width: 100%; max-width: 520px; max-height: 94dvh; display: flex; flex-direction: column; border-radius: 20px 20px 0 0; box-shadow: 0 -6px 30px rgba(0,0,0,.4); }
.modal-wide { max-width: 680px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 8px 4px 18px; }
.modal-head h2 { margin: 0; font-size: 21px; overflow-wrap: anywhere; }
.modal-body { padding: 10px 18px 6px; overflow: auto; flex: 1; -webkit-overflow-scrolling: touch; }
.modal-foot { display: flex; gap: 10px; padding: 12px 18px calc(var(--safe-b) + 14px); border-top: 1px solid #dde3ec; justify-content: flex-end; flex-wrap: wrap; }
.modal-foot .btn { flex: 1 1 140px; }
@media (min-width: 700px) { .modal-back { align-items: center; } .modal { border-radius: 20px; } .modal-foot .btn { flex: 0 1 auto; min-width: 140px; } }
.toasts { position: fixed; top: calc(var(--safe-t) + 70px); left: 0; right: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 4000; pointer-events: none; padding: 0 12px; }
.toast { background: #0b1220; color: #fff; padding: 14px 18px; border-radius: 12px; font-weight: 600; max-width: 520px; box-shadow: 0 6px 20px rgba(0,0,0,.4); transition: opacity .3s; border-left: 8px solid #7aa7ff; }
.toast-ok { border-left-color: #4ade80; } .toast-err { background: #7d1710; border-left-color: #ffb4ab; }
.toast.out { opacity: 0; }
.menu .menu-user { padding: 4px 0 12px; border-bottom: 1px solid #dde3ec; margin-bottom: 6px; }
.menu-item { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 56px; padding: 0 6px; border: 0; background: none; text-align: left; font-size: 18px; font-weight: 600; color: var(--text); text-decoration: none; cursor: pointer; border-radius: 10px; }
.menu-item:active { background: #e8f0fe; }
.menu-cards { display: grid; gap: 10px; }
.menu-card { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; text-decoration: none; color: var(--text); width: 100%; text-align: left; cursor: pointer; min-height: 72px; }
.menu-card > div { flex: 1; } .menu-card:active { background: #e8f0fe; } .menu-card .ico { color: var(--primary); }

/* ---------- Personas y listas ---------- */
.people { list-style: none; margin: 0 0 10px; padding: 0; }
.person { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #e3e8ef; }
.person:last-child { border-bottom: 0; } .person.inactive { opacity: .55; }
.p-main { flex: 1; min-width: 0; } .p-main .muted { overflow-wrap: anywhere; }
.p-actions select { min-width: 150px; min-height: 44px; }
.chip { display: inline-block; background: #e8eefb; color: var(--navy); border-radius: 999px; padding: 2px 10px; font-size: 14px; font-weight: 700; margin-left: 6px; }
.chip.warn { background: var(--warn-bg); color: var(--warn); } .chip.ok { background: var(--ok-bg); color: var(--ok); }
.audit { list-style: none; padding: 0; margin: 0 0 10px; } .audit li { padding: 10px 0; border-bottom: 1px solid #e3e8ef; }
.tips { margin: 6px 0 12px; padding-left: 20px; } .tips li { margin: 4px 0; }
.table-wrap { overflow: auto; margin: 8px 0; border: 1px solid var(--border); border-radius: 10px; }
.tbl { border-collapse: collapse; width: 100%; font-size: 15px; } .tbl th, .tbl td { padding: 8px 10px; border-bottom: 1px solid #e3e8ef; text-align: left; white-space: nowrap; } .tbl th { background: #f1f4f9; }
.maprow { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(150px, 1.3fr); gap: 10px; align-items: center; margin-bottom: 8px; }
.maprow .mr-l { font-weight: 600; } .req { color: var(--danger); }
.progress { height: 18px; background: #dde3ec; border-radius: 9px; overflow: hidden; } .progress .bar { height: 100%; width: 0; background: var(--primary); transition: width .3s; } .pt { margin-top: 8px; }

/* ---------- Proyecto: mapa, lista, navegación ---------- */
.project-content { overflow: hidden; display: block; }
.tab-body { position: absolute; inset: 0; overflow: auto; }
.map-wrap { position: absolute; inset: 0; }
.map-wrap > .leaflet-container, .map-wrap > .map-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.map { position: absolute; inset: 0; background: #d7dde6; z-index: 0; }
.map-tools { position: absolute; top: 12px; right: 12px; z-index: 800; display: flex; flex-direction: column; gap: 10px; }
.map-tools .icon-btn { background: #fff; border: 2px solid #1b2a44; width: 52px; height: 52px; color: #0b1220; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.map-note { position: absolute; left: 12px; top: 12px; z-index: 800; background: #fff; border: 2px solid #1b2a44; border-radius: 10px; padding: 6px 12px; font-weight: 700; font-size: 14px; max-width: 55%; }
.leaflet-container { font: inherit; }
.leaflet-touch .leaflet-bar a { width: 52px; height: 52px; line-height: 52px; font-size: 26px; color: #0b1220; }
.leaflet-touch .leaflet-bar { border: 2px solid #1b2a44; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.leaflet-control-attribution { font-size: 11px; max-width: 70vw; }
.leaflet-top.leaflet-left { top: 8px; }
.crosshair { position: absolute; left: 50%; top: 50%; width: 0; height: 0; z-index: 700; pointer-events: none; }
.cross-v, .cross-h { position: absolute; background: #ff1744; box-shadow: 0 0 0 2px #fff; }
.cross-v { width: 4px; height: 56px; left: -2px; top: -28px; } .cross-h { width: 56px; height: 4px; top: -2px; left: -28px; }
.action-bar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1100; background: #fff; border-top: 3px solid var(--navy); padding: 12px 12px 14px; box-shadow: 0 -4px 16px rgba(0,0,0,.3); }
.ab-title { font-weight: 800; text-align: center; margin-bottom: 8px; } .ab-row { display: flex; gap: 8px; flex-wrap: wrap; } .ab-row .btn { flex: 1 1 130px; }
.fab { position: absolute; right: 16px; bottom: 16px; width: 68px; height: 68px; border-radius: 50%; background: #d62d20; color: #fff; border: 3px solid #fff; box-shadow: 0 4px 14px rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 1000; }
.fab:active { background: #a8231a; }
.bottom-nav { display: flex; background: #fff; border-top: 2px solid #1b2a44; padding-bottom: var(--safe-b); flex: none; z-index: 1200; }
.nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 64px; text-decoration: none; color: #3b4557; font-weight: 700; font-size: 13px; }
.nav-item.on { color: var(--primary); box-shadow: inset 0 4px 0 var(--primary); background: #eef4ff; }
.sheet-layer { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1000; display: flex; justify-content: center; pointer-events: none; }
.sheet-layer.tall { top: 0; }
.sheet { background: #fff; width: 100%; max-width: 760px; max-height: 62%; display: flex; flex-direction: column; border-radius: 20px 20px 0 0; box-shadow: 0 -4px 22px rgba(0,0,0,.4); pointer-events: auto; border-top: 3px solid var(--navy); }
.sheet-layer.tall .sheet { max-height: 100%; height: 100%; border-radius: 0; border-top: 0; }
.sheet-grab { width: 48px; height: 5px; background: #b7c0cd; border-radius: 3px; margin: 8px auto 2px; flex: none; }
.sheet-head { display: flex; align-items: center; gap: 10px; padding: 4px 8px 4px 14px; flex: none; }
.sh-main { flex: 1; min-width: 0; } .sh-main h2 { margin: 0; font-size: 22px; } .sh-main .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.type-badge { min-width: 44px; height: 44px; padding: 0 6px; border-radius: 12px; background: var(--navy); color: #fff; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; flex: none; font-size: 15px; }
.status-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 6px 12px; flex: none; }
.status-btn { min-height: 52px; border-radius: 12px; border: 3px solid var(--c); background: #fff; color: var(--c); font-weight: 800; font-size: 14px; line-height: 1.1; padding: 4px; cursor: pointer; }
.status-btn.on { background: var(--c); color: #fff; } .status-btn:disabled { cursor: default; }
.status-btn:disabled:not(.on) { opacity: .55; }
.hint-bar { margin: 0 12px 6px; padding: 8px 10px; background: var(--warn-bg); border-radius: 10px; font-size: 14px; color: var(--warn); font-weight: 600; flex: none; }
.sheet-actions { display: flex; gap: 8px; padding: 6px 12px; flex-wrap: wrap; flex: none; }
.tabs { display: flex; border-bottom: 2px solid #dde3ec; flex: none; padding: 0 6px; }
.tab { flex: 1; min-height: 50px; border: 0; background: none; font-weight: 700; font-size: 16px; border-bottom: 5px solid transparent; margin-bottom: -2px; cursor: pointer; color: #3b4557; }
.tab.on { color: var(--primary); border-bottom-color: var(--primary); }
.sheet-body { overflow: auto; padding: 8px 14px 24px; flex: 1; min-height: 120px; -webkit-overflow-scrolling: touch; }
.kvs { display: grid; } .kv { display: grid; grid-template-columns: 38% 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid #e3e8ef; } .kv .k { color: var(--muted); font-size: 15px; } .kv .v { font-weight: 600; overflow-wrap: anywhere; }
.status-chip { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 15px; white-space: nowrap; } .status-chip i { width: 14px; height: 14px; border-radius: 50%; background: var(--c); display: inline-block; border: 2px solid #fff; box-shadow: 0 0 0 1.5px var(--c); }
.childlist, .obslist { list-style: none; padding: 0; margin: 0 0 10px; }
.childlist a { display: flex; align-items: center; gap: 10px; padding: 8px 0; text-decoration: none; color: inherit; border-bottom: 1px solid #e3e8ef; min-height: 56px; } .cl-main { flex: 1; min-width: 0; }
.danger-zone { margin-top: 24px; padding-top: 12px; border-top: 2px dashed #e1b3af; }
.photo-bar { background: #f3f6fb; border: 2px solid #c9d6ee; border-radius: 14px; padding: 12px; margin-bottom: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 8px; }
.chip-btn { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 2px solid var(--primary); background: #fff; color: var(--primary); font-weight: 700; cursor: pointer; font-size: 16px; }
.chip-btn.on { background: var(--primary); color: #fff; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.ph { position: relative; aspect-ratio: 1; border: 0; padding: 0; border-radius: 12px; overflow: hidden; background: #d7dde6; cursor: pointer; }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; } .ph-none { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--muted); }
.ph-label { position: absolute; left: 4px; bottom: 4px; background: rgba(11,18,32,.85); color: #fff; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.ph-pend { position: absolute; right: 4px; top: 4px; background: #ffd400; color: #111; border-radius: 50%; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; }
.obs-new { background: #f3f6fb; border: 2px solid #c9d6ee; border-radius: 14px; padding: 12px; margin-bottom: 12px; }
.obslist li { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; } .obslist li.done { background: #f4f7f4; } .ob-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 4px; } .ob-head .chip { margin-left: 0; }
.list-wrap { display: flex; flex-direction: column; height: 100%; }
.searchbar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: #fff; border-bottom: 2px solid #dde3ec; flex: none; }
.searchbar .input { flex: 1; }
.list-count { padding: 6px 14px; flex: none; }
.list { overflow: auto; flex: 1; padding: 0 0 120px; background: #fff; -webkit-overflow-scrolling: touch; }
.row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid #e3e8ef; text-decoration: none; color: inherit; min-height: 68px; }
.row:active, .row.sel { background: #e8f0fe; } .row-main { flex: 1; min-width: 0; } .row-main .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-meta { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; } .counts { display: flex; gap: 10px; } .counts span { display: inline-flex; align-items: center; gap: 3px; }
.row .tt .chip { font-size: 12px; }

/* ---------- Pines del mapa ---------- */
.pin-wrap { background: none; border: 0; }
.pin { position: relative; width: 44px; height: 44px; }
.pin-dot { position: absolute; left: 4px; top: 4px; width: 36px; height: 36px; border-radius: 50%; background: var(--c); color: #fff; font: 800 13px/30px system-ui, sans-serif; text-align: center; border: 3px solid #fff; box-shadow: 0 0 0 2px #0b1220, 0 2px 6px rgba(0,0,0,.55); }
.pin.child .pin-dot { width: 28px; height: 28px; left: 8px; top: 8px; line-height: 22px; font-size: 11px; }
.pin.sel .pin-dot { box-shadow: 0 0 0 4px #ffd400, 0 0 0 7px #0b1220; transform: scale(1.18); }
.pin.pending .pin-dot { border-style: dashed; border-color: #ffd400; }
.pin.failed .pin-dot { box-shadow: 0 0 0 4px #b3261e, 0 0 0 6px #fff; }
.pin-label { display: none; position: absolute; left: 44px; top: 9px; background: #fff; color: #0b1220; font: 700 13px system-ui, sans-serif; padding: 2px 7px; border-radius: 7px; border: 2px solid #0b1220; white-space: nowrap; }
.show-labels .pin-label { display: block; }

/* ---------- Visor de fotos ---------- */
.modal-viewer { max-width: 900px; }
.viewer-img { width: 100%; max-height: 62dvh; object-fit: contain; background: #0b1220; border-radius: 10px; display: block; }
.viewer-cap { padding: 8px 0; } .vc-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .viewer-cap .chip { margin-left: 0; }
.viewer-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 8px; }

/* ---------- Escritorio ---------- */
@media (min-width: 900px) {
  .project-content { display: flex; }
  .tab-body { position: relative; inset: auto; flex: 1; min-width: 0; }
  .sheet-layer { position: relative; left: auto; right: auto; bottom: auto; width: 0; overflow: hidden; transition: width .2s; z-index: 1000; }
  .sheet-layer.open { width: 460px; }
  .sheet-layer .sheet, .sheet-layer.tall .sheet { max-height: none; height: 100%; width: 460px; border-radius: 0; border-top: 0; border-left: 3px solid var(--navy); box-shadow: -4px 0 18px rgba(0,0,0,.25); }
  .sheet-grab { display: none; }
  .action-bar { left: 50%; right: auto; transform: translateX(-50%); width: min(560px, 90%); bottom: 16px; border-radius: 14px; border: 3px solid var(--navy); }
  .tab-body > .scroll-pad, .tab-body > .scroll-pad { overflow: auto; }
  .tab-body { overflow: auto; }
  .nav-item { flex-direction: row; gap: 10px; font-size: 15px; }
}
@media (max-width: 380px) { .status-btn { font-size: 12px; } .maprow { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
